Skip to content

Commit

Permalink
Merge branch 'main' into update-soroban-rpc-crate
Browse files Browse the repository at this point in the history
  • Loading branch information
psheth9 committed Mar 5, 2024
2 parents 123e3e7 + e84d015 commit caffb24
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions cmd/crates/soroban-rpc-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ pub enum Error {
MissingOp,
}

#[derive(serde::Deserialize, serde::Serialize, Debug)]
#[derive(serde::Deserialize, serde::Serialize, Debug, Clone)]
pub struct SendTransactionResponse {
pub hash: String,
pub status: String,
Expand All @@ -124,7 +124,7 @@ pub struct SendTransactionResponse {
pub latest_ledger_close_time: u32,
}

#[derive(serde::Deserialize, serde::Serialize, Debug)]
#[derive(serde::Deserialize, serde::Serialize, Debug, Clone)]
pub struct GetTransactionResponseRaw {
pub status: String,
#[serde(
Expand All @@ -144,7 +144,7 @@ pub struct GetTransactionResponseRaw {
// TODO: add ledger info and application order
}

#[derive(serde::Deserialize, serde::Serialize, Debug)]
#[derive(serde::Deserialize, serde::Serialize, Debug, Clone)]
pub struct GetTransactionResponse {
pub status: String,
pub envelope: Option<xdr::TransactionEnvelope>,
Expand Down Expand Up @@ -209,7 +209,7 @@ impl GetTransactionResponse {
}
}

#[derive(serde::Deserialize, serde::Serialize, Debug)]
#[derive(serde::Deserialize, serde::Serialize, Debug, Clone)]
pub struct LedgerEntryResult {
pub key: String,
pub xdr: String,
Expand All @@ -224,14 +224,14 @@ pub struct LedgerEntryResult {
pub live_until_ledger_seq_ledger_seq: Option<u32>,
}

#[derive(serde::Deserialize, serde::Serialize, Debug)]
#[derive(serde::Deserialize, serde::Serialize, Debug, Clone)]
pub struct GetLedgerEntriesResponse {
pub entries: Option<Vec<LedgerEntryResult>>,
#[serde(rename = "latestLedger")]
pub latest_ledger: i64,
}

#[derive(serde::Deserialize, serde::Serialize, Debug)]
#[derive(serde::Deserialize, serde::Serialize, Debug, Clone)]
pub struct GetNetworkResponse {
#[serde(
rename = "friendbotUrl",
Expand All @@ -244,15 +244,15 @@ pub struct GetNetworkResponse {
pub protocol_version: u32,
}

#[derive(serde::Deserialize, serde::Serialize, Debug)]
#[derive(serde::Deserialize, serde::Serialize, Debug, Clone)]
pub struct GetLatestLedgerResponse {
pub id: String,
#[serde(rename = "protocolVersion")]
pub protocol_version: u32,
pub sequence: u32,
}

#[derive(serde::Deserialize, serde::Serialize, Debug, Default)]
#[derive(serde::Deserialize, serde::Serialize, Debug, Default, Clone)]
pub struct Cost {
#[serde(
rename = "cpuInsns",
Expand All @@ -266,20 +266,20 @@ pub struct Cost {
pub mem_bytes: u64,
}

#[derive(serde::Deserialize, serde::Serialize, Debug)]
#[derive(serde::Deserialize, serde::Serialize, Debug, Clone)]
pub struct SimulateHostFunctionResultRaw {
#[serde(deserialize_with = "deserialize_default_from_null")]
pub auth: Vec<String>,
pub xdr: String,
}

#[derive(Debug)]
#[derive(Debug, Clone)]
pub struct SimulateHostFunctionResult {
pub auth: Vec<SorobanAuthorizationEntry>,
pub xdr: xdr::ScVal,
}

#[derive(serde::Deserialize, serde::Serialize, Debug, Default)]
#[derive(serde::Deserialize, serde::Serialize, Debug, Default, Clone)]
pub struct SimulateTransactionResponse {
#[serde(
rename = "minResourceFee",
Expand Down Expand Up @@ -354,7 +354,7 @@ impl SimulateTransactionResponse {
}
}

#[derive(serde::Deserialize, serde::Serialize, Debug, Default)]
#[derive(serde::Deserialize, serde::Serialize, Debug, Default, Clone)]
pub struct RestorePreamble {
#[serde(rename = "transactionData")]
pub transaction_data: String,
Expand All @@ -365,7 +365,7 @@ pub struct RestorePreamble {
pub min_resource_fee: u64,
}

#[derive(serde::Deserialize, serde::Serialize, Debug)]
#[derive(serde::Deserialize, serde::Serialize, Debug, Clone)]
pub struct GetEventsResponse {
#[serde(deserialize_with = "deserialize_default_from_null")]
pub events: Vec<Event>,
Expand Down Expand Up @@ -532,15 +532,15 @@ pub enum EventStart {
Cursor(String),
}

#[derive(Debug)]
#[derive(Debug, Clone)]
pub struct FullLedgerEntry {
pub key: LedgerKey,
pub val: LedgerEntryData,
pub last_modified_ledger: u32,
pub live_until_ledger_seq: u32,
}

#[derive(Debug)]
#[derive(Debug, Clone)]
pub struct FullLedgerEntries {
pub entries: Vec<FullLedgerEntry>,
pub latest_ledger: i64,
Expand Down

0 comments on commit caffb24

Please sign in to comment.