Skip to content

Commit f507395

Browse files
authored
Upgrade stellar-rpc-client. (#2498)
1 parent 8097cf5 commit f507395

20 files changed

Lines changed: 270 additions & 240 deletions

File tree

Cargo.lock

Lines changed: 233 additions & 184 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ exclude = [
2222

2323
[workspace.package]
2424
version = "26.0.0"
25-
rust-version = "1.92.0"
25+
rust-version = "1.93.0"
2626

2727
# Dependencies located in this repo:
2828
[workspace.dependencies.soroban-cli]
@@ -71,7 +71,7 @@ version = "26.0.0-rc.1"
7171
# Dependencies from the rs-stellar-rpc-client repo:
7272
[workspace.dependencies.soroban-rpc]
7373
package = "stellar-rpc-client"
74-
version = "26.0.0-rc.1"
74+
version = "26.0.0-rc.2"
7575

7676
# Dependencies from elsewhere shared by crates:
7777
[workspace.dependencies]
@@ -107,8 +107,6 @@ termcolor = "1.1.3"
107107
termcolor_output = "1.0.1"
108108
ed25519-dalek = ">= 2.1.1"
109109
http = "1.0.0"
110-
jsonrpsee-http-client = "0.20.1"
111-
jsonrpsee-core = "0.20.1"
112110
walkdir = "2.5.0"
113111
toml_edit = "0.22.20"
114112
toml = "0.8.19"

cmd/crates/soroban-spec-typescript/src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,10 @@ pub fn generate(spec: &[ScSpecEntry]) -> String {
125125
// Filter out function entries with names that start with "__" and partition the results
126126
for entry in &collected {
127127
match entry {
128-
Entry::Function { name, inputs, .. } if name == "__constructor" => {
129-
if !inputs.is_empty() {
130-
constructor_args = Some(inputs.clone());
131-
}
128+
Entry::Function { name, inputs, .. }
129+
if name == "__constructor" && !inputs.is_empty() =>
130+
{
131+
constructor_args = Some(inputs.clone());
132132
}
133133
_ => {}
134134
}

cmd/crates/soroban-test/tests/it/build.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -763,7 +763,7 @@ fn build_no_error_for_package() {
763763
let cargo_toml_path = dir_path.join("Cargo.toml");
764764
let cargo_toml_path_content = std::fs::read_to_string(&cargo_toml_path).unwrap();
765765
let modified_cargo_toml_content =
766-
format!("{cargo_toml_path_content}\n[profile.release]\noverflow-checks = true\n",);
766+
format!("{cargo_toml_path_content}\n[profile.release]\noverflow-checks = true\n");
767767
std::fs::write(&cargo_toml_path, modified_cargo_toml_content).unwrap();
768768

769769
sandbox
@@ -876,7 +876,7 @@ fn build_errors_when_overflow_check_only_applied_to_members() {
876876
let member_cargo_toml_path = dir_path.join("contracts").join("add").join("Cargo.toml");
877877
let member_cargo_toml_content = std::fs::read_to_string(&member_cargo_toml_path).unwrap();
878878
let modified_member_content =
879-
format!("{member_cargo_toml_content}\n[profile.release]\noverflow-checks = true\n",);
879+
format!("{member_cargo_toml_content}\n[profile.release]\noverflow-checks = true\n");
880880
std::fs::write(&member_cargo_toml_path, modified_member_content).unwrap();
881881

882882
// Add overflow-checks = true to "add2" member
@@ -887,7 +887,7 @@ fn build_errors_when_overflow_check_only_applied_to_members() {
887887
.join("Cargo.toml");
888888
let member_2_cargo_toml_content = std::fs::read_to_string(&member_2_cargo_toml_path).unwrap();
889889
let modified_member_2_content =
890-
format!("{member_2_cargo_toml_content}\n[profile.release]\noverflow-checks = true\n",);
890+
format!("{member_2_cargo_toml_content}\n[profile.release]\noverflow-checks = true\n");
891891
std::fs::write(&member_2_cargo_toml_path, modified_member_2_content).unwrap();
892892

893893
sandbox

cmd/crates/stellar-ledger/src/emulator_test_support/http_transport.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ impl Exchange for Emulator {
7373
let resp: Response = HttpClient::new()
7474
.post(&self.url)
7575
.headers(headers)
76-
.timeout(Duration::from_secs(60))
76+
.timeout(Duration::from_mins(1))
7777
.json(&request)
7878
.send()
7979
.await

cmd/soroban-cli/Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,6 @@ reqwest = { version = "0.12.7", default-features = false, features = [
7979
"blocking",
8080
"stream",
8181
] }
82-
jsonrpsee-http-client = "0.20.1"
83-
jsonrpsee-core = "0.20.1"
8482
regex = "1.6.0"
8583
wasm-opt = { version = "0.116.1", optional = true }
8684
chrono = { version = "0.4.27", features = ["serde"] }

cmd/soroban-cli/src/commands/contract/arg_parsing.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -629,8 +629,7 @@ fn parse_argument_with_validation(
629629
// unit variants — from_string in soroban-spec-tools handles both forms correctly.
630630
let is_union_udt = if let ScSpecTypeDef::Udt(udt) = expected_type {
631631
spec.find(&udt.name.to_utf8_string_lossy())
632-
.map(|entry| matches!(entry, ScSpecEntry::UdtUnionV0(_)))
633-
.unwrap_or(false)
632+
.is_ok_and(|entry| matches!(entry, ScSpecEntry::UdtUnionV0(_)))
634633
} else {
635634
false
636635
};

cmd/soroban-cli/src/commands/contract/deploy/wasm.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,6 @@ pub enum Error {
9292
#[error("xdr processing error: {0}")]
9393
Xdr(#[from] XdrError),
9494

95-
#[error("jsonrpc error: {0}")]
96-
JsonRpc(#[from] jsonrpsee_core::Error),
97-
9895
#[error("cannot parse salt: {salt}")]
9996
CannotParseSalt { salt: String },
10097

cmd/soroban-cli/src/commands/contract/init.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use std::borrow::Cow;
22
use std::{
3-
fs::{create_dir_all, metadata, write, Metadata},
3+
fs::{create_dir_all, metadata, write},
44
io,
55
path::{Path, PathBuf},
66
str,
@@ -158,10 +158,7 @@ impl Runner {
158158
}
159159

160160
fn file_exists(file_path: &Path) -> bool {
161-
metadata(file_path)
162-
.as_ref()
163-
.map(Metadata::is_file)
164-
.unwrap_or(false)
161+
metadata(file_path).is_ok_and(|m| m.is_file())
165162
}
166163

167164
fn create_dir_all(path: &Path) -> Result<(), Error> {

cmd/soroban-cli/src/commands/contract/upload.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,6 @@ pub enum Error {
7171
#[error("xdr processing error: {0}")]
7272
Xdr(#[from] XdrError),
7373

74-
#[error("jsonrpc error: {0}")]
75-
JsonRpc(#[from] jsonrpsee_core::Error),
76-
7774
#[error(transparent)]
7875
Rpc(#[from] rpc::Error),
7976

0 commit comments

Comments
 (0)