diff --git a/.github/workflows/binaries.yml b/.github/workflows/binaries.yml index 985f91fa5..c008cc7b4 100644 --- a/.github/workflows/binaries.yml +++ b/.github/workflows/binaries.yml @@ -133,18 +133,18 @@ jobs: $Env:STELLAR_CLI_VERSION = "${{ env.VERSION }}" ISCC.exe installer.iss - - name: Build provenance for attestation (release only) - if: github.event_name == 'release' - uses: actions/attest-build-provenance@v1 - with: - subject-path: ${{ env.STELLAR_CLI_INSTALLER }} - - name: Upload Artifact uses: actions/upload-artifact@v4 with: name: ${{ env.STELLAR_CLI_INSTALLER }} path: Output/stellar-installer.exe + - name: Build provenance for attestation (release only) + if: github.event_name == 'release' + uses: actions/attest-build-provenance@v1 + with: + subject-path: ${{ env.STELLAR_CLI_INSTALLER }} + - name: Upload to Release (release only) if: github.event_name == 'release' uses: actions/github-script@v7 diff --git a/Cargo.lock b/Cargo.lock index bd4ca6045..b896d63f0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -270,7 +270,7 @@ dependencies = [ "bstr", "doc-comment", "libc", - "predicates 3.1.2", + "predicates", "predicates-core", "predicates-tree", "wait-timeout", @@ -285,7 +285,7 @@ dependencies = [ "anstyle", "doc-comment", "globwalk", - "predicates 3.1.2", + "predicates", "predicates-core", "predicates-tree", "tempfile", @@ -848,7 +848,7 @@ dependencies = [ "anstream", "anstyle", "clap_lex", - "strsim 0.11.1", + "strsim", ] [[package]] @@ -944,17 +944,6 @@ dependencies = [ "libc", ] -[[package]] -name = "crate-git-revision" -version = "0.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f998aef136a4e7833b0e4f0fc0939a59c40140b28e0ffbf524ad84fb2cc568c8" -dependencies = [ - "serde", - "serde_derive", - "serde_json", -] - [[package]] name = "crate-git-revision" version = "0.0.6" @@ -1022,7 +1011,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" dependencies = [ "generic-array", - "rand_core 0.6.4", + "rand_core", "subtle", "zeroize", ] @@ -1078,19 +1067,6 @@ dependencies = [ "syn 2.0.77", ] -[[package]] -name = "curve25519-dalek" -version = "3.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61" -dependencies = [ - "byteorder 1.5.0", - "digest 0.9.0", - "rand_core 0.5.1", - "subtle", - "zeroize", -] - [[package]] name = "curve25519-dalek" version = "4.1.3" @@ -1182,7 +1158,7 @@ dependencies = [ "ident_case", "proc-macro2", "quote", - "strsim 0.11.1", + "strsim", "syn 2.0.77", ] @@ -1284,16 +1260,7 @@ version = "5.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a49173b84e034382284f27f1af4dcbbd231ffa358c0fe316541a7337f376a35" dependencies = [ - "dirs-sys 0.4.1", -] - -[[package]] -name = "dirs" -version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059" -dependencies = [ - "dirs-sys 0.3.7", + "dirs-sys", ] [[package]] @@ -1302,7 +1269,7 @@ version = "5.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" dependencies = [ - "dirs-sys 0.4.1", + "dirs-sys", ] [[package]] @@ -1315,17 +1282,6 @@ dependencies = [ "dirs-sys-next", ] -[[package]] -name = "dirs-sys" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" -dependencies = [ - "libc", - "redox_users", - "winapi", -] - [[package]] name = "dirs-sys" version = "0.4.1" @@ -1394,16 +1350,7 @@ dependencies = [ "digest 0.10.7", "elliptic-curve", "rfc6979", - "signature 2.1.0", -] - -[[package]] -name = "ed25519" -version = "1.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7" -dependencies = [ - "signature 1.6.4", + "signature", ] [[package]] @@ -1413,19 +1360,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" dependencies = [ "pkcs8", - "signature 2.1.0", -] - -[[package]] -name = "ed25519-dalek" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" -dependencies = [ - "curve25519-dalek 3.2.0", - "ed25519 1.5.3", - "sha2 0.9.9", - "zeroize", + "signature", ] [[package]] @@ -1434,9 +1369,9 @@ version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871" dependencies = [ - "curve25519-dalek 4.1.3", - "ed25519 2.2.3", - "rand_core 0.6.4", + "curve25519-dalek", + "ed25519", + "rand_core", "serde", "sha2 0.10.8", "subtle", @@ -1461,7 +1396,7 @@ dependencies = [ "ff", "generic-array", "group", - "rand_core 0.6.4", + "rand_core", "sec1", "subtle", "zeroize", @@ -1607,7 +1542,7 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" dependencies = [ - "rand_core 0.6.4", + "rand_core", "subtle", ] @@ -1880,7 +1815,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ "ff", - "rand_core 0.6.4", + "rand_core", "subtle", ] @@ -2305,15 +2240,18 @@ dependencies = [ [[package]] name = "hyper-tls" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" +checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" dependencies = [ "bytes", - "hyper 0.14.30", + "http-body-util", + "hyper 1.4.1", + "hyper-util", "native-tls", "tokio", "tokio-native-tls", + "tower-service", ] [[package]] @@ -3338,20 +3276,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" -[[package]] -name = "predicates" -version = "2.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59230a63c37f3e18569bdb90e4a89cbf5bf8b06fea0b84e65ea10cc4df47addd" -dependencies = [ - "difflib", - "float-cmp", - "itertools 0.10.5", - "normalize-line-endings", - "predicates-core", - "regex", -] - [[package]] name = "predicates" version = "3.1.2" @@ -3360,7 +3284,10 @@ checksum = "7e9086cc7640c29a356d1a29fd134380bee9d8f79a17410aa76e7ad295f42c97" dependencies = [ "anstyle", "difflib", + "float-cmp", + "normalize-line-endings", "predicates-core", + "regex", ] [[package]] @@ -3488,7 +3415,7 @@ checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", "rand_chacha", - "rand_core 0.6.4", + "rand_core", ] [[package]] @@ -3498,15 +3425,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core 0.6.4", + "rand_core", ] -[[package]] -name = "rand_core" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" - [[package]] name = "rand_core" version = "0.6.4" @@ -3580,46 +3501,6 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" -[[package]] -name = "reqwest" -version = "0.11.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" -dependencies = [ - "base64 0.21.7", - "bytes", - "encoding_rs", - "futures-core", - "futures-util", - "h2 0.3.26", - "http 0.2.12", - "http-body 0.4.6", - "hyper 0.14.30", - "hyper-tls", - "ipnet", - "js-sys", - "log", - "mime", - "native-tls", - "once_cell", - "percent-encoding", - "pin-project-lite", - "rustls-pemfile 1.0.4", - "serde", - "serde_json", - "serde_urlencoded", - "sync_wrapper 0.1.2", - "system-configuration", - "tokio", - "tokio-native-tls", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "winreg", -] - [[package]] name = "reqwest" version = "0.12.7" @@ -3639,11 +3520,13 @@ dependencies = [ "http-body-util", "hyper 1.4.1", "hyper-rustls 0.27.3", + "hyper-tls", "hyper-util", "ipnet", "js-sys", "log", "mime", + "native-tls", "once_cell", "percent-encoding", "pin-project-lite", @@ -3655,8 +3538,10 @@ dependencies = [ "serde", "serde_json", "serde_urlencoded", - "sync_wrapper 1.0.1", + "sync_wrapper", + "system-configuration", "tokio", + "tokio-native-tls", "tokio-rustls 0.26.0", "tokio-util", "tower-service", @@ -4299,12 +4184,6 @@ dependencies = [ "libc", ] -[[package]] -name = "signature" -version = "1.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" - [[package]] name = "signature" version = "2.1.0" @@ -4312,7 +4191,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e1788eed21689f9cf370582dfc467ef36ed9c707f073528ddafa8d83e3b8500" dependencies = [ "digest 0.10.7", - "rand_core 0.6.4", + "rand_core", ] [[package]] @@ -4336,24 +4215,13 @@ dependencies = [ "autocfg", ] -[[package]] -name = "slip10" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28724a6e6f70b0cb115c580891483da6f3aa99e6a353598303a57f89d23aa6bc" -dependencies = [ - "ed25519-dalek 1.0.1", - "hmac 0.9.0", - "sha2 0.9.9", -] - [[package]] name = "slipped10" version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0a45443e66aa5d96db5e02d17db056e1ca970232a4fe73e1f9bc1816d68f4e98" dependencies = [ - "ed25519-dalek 2.1.1", + "ed25519-dalek", "hmac 0.9.0", "sha2 0.9.9", ] @@ -4406,18 +4274,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "soroban-builtin-sdk-macros" -version = "21.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f57a68ef8777e28e274de0f3a88ad9a5a41d9a2eb461b4dd800b086f0e83b80" -dependencies = [ - "itertools 0.11.0", - "proc-macro2", - "quote", - "syn 2.0.77", -] - [[package]] name = "soroban-builtin-sdk-macros" version = "22.0.0-rc.3" @@ -4432,7 +4288,7 @@ dependencies = [ [[package]] name = "soroban-cli" -version = "22.0.0-rc.1" +version = "22.0.0" dependencies = [ "assert_cmd", "assert_fs", @@ -4446,12 +4302,11 @@ dependencies = [ "clap", "clap-markdown", "clap_complete", - "crate-git-revision 0.0.4", + "crate-git-revision", "csv", "directories", - "dirs 4.0.0", "dotenvy", - "ed25519-dalek 2.1.1", + "ed25519-dalek", "ethnum", "flate2", "fqdn", @@ -4470,10 +4325,10 @@ dependencies = [ "open", "pathdiff", "phf", - "predicates 2.1.5", + "predicates", "rand", "regex", - "reqwest 0.12.7", + "reqwest", "rpassword", "rust-embed", "semver", @@ -4485,17 +4340,17 @@ dependencies = [ "sha2 0.10.8", "shell-escape", "shlex", - "soroban-ledger-snapshot 22.0.0-rc.3", - "soroban-sdk 22.0.0-rc.3", - "soroban-spec 22.0.0-rc.3", + "soroban-ledger-snapshot", + "soroban-sdk", + "soroban-spec", "soroban-spec-json", - "soroban-spec-rust 22.0.0-rc.3", + "soroban-spec-rust", "soroban-spec-tools", "soroban-spec-typescript", "stellar-rpc-client", "stellar-strkey 0.0.11", - "stellar-xdr 22.0.0-rc.1.1", - "strsim 0.10.0", + "stellar-xdr", + "strsim", "strum 0.17.1", "strum_macros 0.17.1", "tempfile", @@ -4504,8 +4359,8 @@ dependencies = [ "thiserror", "tokio", "tokio-util", - "toml 0.5.11", - "toml_edit 0.21.1", + "toml", + "toml_edit", "tracing", "tracing-appender", "tracing-subscriber", @@ -4514,29 +4369,10 @@ dependencies = [ "walkdir", "wasm-gen", "wasm-opt", - "wasmparser 0.90.0", + "wasmparser", "which", ] -[[package]] -name = "soroban-env-common" -version = "21.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fd1c89463835fe6da996318156d39f424b4f167c725ec692e5a7a2d4e694b3d" -dependencies = [ - "arbitrary", - "crate-git-revision 0.0.6", - "ethnum", - "num-derive", - "num-traits", - "serde", - "soroban-env-macros 21.2.1", - "soroban-wasmi", - "static_assertions", - "stellar-xdr 21.2.0", - "wasmparser 0.116.1", -] - [[package]] name = "soroban-env-common" version = "22.0.0-rc.3" @@ -4544,26 +4380,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39b6d2ec8955243394278e1fae88be3b367fcfed9cf74e5044799a90786a8642" dependencies = [ "arbitrary", - "crate-git-revision 0.0.6", + "crate-git-revision", "ethnum", "num-derive", "num-traits", "serde", - "soroban-env-macros 22.0.0-rc.3", + "soroban-env-macros", "soroban-wasmi", "static_assertions", - "stellar-xdr 22.0.0-rc.1.1", - "wasmparser 0.116.1", -] - -[[package]] -name = "soroban-env-guest" -version = "21.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bfb2536811045d5cd0c656a324cbe9ce4467eb734c7946b74410d90dea5d0ce" -dependencies = [ - "soroban-env-common 21.2.1", - "static_assertions", + "stellar-xdr", + "wasmparser", ] [[package]] @@ -4572,43 +4398,10 @@ version = "22.0.0-rc.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4002fc582cd20cc9b9fbb73959bc5d6b5b15feda11485cbfab0c28e78ecbab3e" dependencies = [ - "soroban-env-common 22.0.0-rc.3", + "soroban-env-common", "static_assertions", ] -[[package]] -name = "soroban-env-host" -version = "21.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b7a32c28f281c423189f1298960194f0e0fc4eeb72378028171e556d8cd6160" -dependencies = [ - "backtrace", - "curve25519-dalek 4.1.3", - "ecdsa", - "ed25519-dalek 2.1.1", - "elliptic-curve", - "generic-array", - "getrandom", - "hex-literal", - "hmac 0.12.1", - "k256", - "num-derive", - "num-integer", - "num-traits", - "p256", - "rand", - "rand_chacha", - "sec1", - "sha2 0.10.8", - "sha3", - "soroban-builtin-sdk-macros 21.2.1", - "soroban-env-common 21.2.1", - "soroban-wasmi", - "static_assertions", - "stellar-strkey 0.0.8", - "wasmparser 0.116.1", -] - [[package]] name = "soroban-env-host" version = "22.0.0-rc.3" @@ -4619,9 +4412,9 @@ dependencies = [ "ark-ec", "ark-ff", "ark-serialize", - "curve25519-dalek 4.1.3", + "curve25519-dalek", "ecdsa", - "ed25519-dalek 2.1.1", + "ed25519-dalek", "elliptic-curve", "generic-array", "getrandom", @@ -4637,27 +4430,12 @@ dependencies = [ "sec1", "sha2 0.10.8", "sha3", - "soroban-builtin-sdk-macros 22.0.0-rc.3", - "soroban-env-common 22.0.0-rc.3", + "soroban-builtin-sdk-macros", + "soroban-env-common", "soroban-wasmi", "static_assertions", "stellar-strkey 0.0.9", - "wasmparser 0.116.1", -] - -[[package]] -name = "soroban-env-macros" -version = "21.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "242926fe5e0d922f12d3796cd7cd02dd824e5ef1caa088f45fce20b618309f64" -dependencies = [ - "itertools 0.11.0", - "proc-macro2", - "quote", - "serde", - "serde_json", - "stellar-xdr 21.2.0", - "syn 2.0.77", + "wasmparser", ] [[package]] @@ -4671,27 +4449,13 @@ dependencies = [ "quote", "serde", "serde_json", - "stellar-xdr 22.0.0-rc.1.1", + "stellar-xdr", "syn 2.0.77", ] [[package]] name = "soroban-hello" -version = "22.0.0-rc.1" - -[[package]] -name = "soroban-ledger-snapshot" -version = "21.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84589856911dfd6731695c9b51c858aed6d4540118c0a1e5c4c858ea13bc744c" -dependencies = [ - "serde", - "serde_json", - "serde_with", - "soroban-env-common 21.2.1", - "soroban-env-host 21.2.1", - "thiserror", -] +version = "0.0.0" [[package]] name = "soroban-ledger-snapshot" @@ -4702,31 +4466,11 @@ dependencies = [ "serde", "serde_json", "serde_with", - "soroban-env-common 22.0.0-rc.3", - "soroban-env-host 22.0.0-rc.3", + "soroban-env-common", + "soroban-env-host", "thiserror", ] -[[package]] -name = "soroban-sdk" -version = "21.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69e39bf9e8ab05579c836e8e5be5f2f4c5ba75e7337ece20e975e82fc3a9d41e" -dependencies = [ - "arbitrary", - "bytes-lit", - "ctor", - "ed25519-dalek 2.1.1", - "rand", - "serde", - "serde_json", - "soroban-env-guest 21.2.1", - "soroban-env-host 21.2.1", - "soroban-ledger-snapshot 21.7.3", - "soroban-sdk-macros 21.7.3", - "stellar-strkey 0.0.8", -] - [[package]] name = "soroban-sdk" version = "22.0.0-rc.3" @@ -4736,70 +4480,38 @@ dependencies = [ "arbitrary", "bytes-lit", "ctor", - "ed25519-dalek 2.1.1", + "ed25519-dalek", "rand", "rustc_version", "serde", "serde_json", - "soroban-env-guest 22.0.0-rc.3", - "soroban-env-host 22.0.0-rc.3", - "soroban-ledger-snapshot 22.0.0-rc.3", - "soroban-sdk-macros 22.0.0-rc.3", + "soroban-env-guest", + "soroban-env-host", + "soroban-ledger-snapshot", + "soroban-sdk-macros", "stellar-strkey 0.0.9", ] -[[package]] -name = "soroban-sdk-macros" -version = "21.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63c2173f1aacd56b4405eed71cb2a9694dff99d51ba72d4f0cbc5e4961fdabf4" -dependencies = [ - "crate-git-revision 0.0.6", - "darling", - "itertools 0.11.0", - "proc-macro2", - "quote", - "rustc_version", - "sha2 0.10.8", - "soroban-env-common 21.2.1", - "soroban-spec 21.7.3", - "soroban-spec-rust 21.7.3", - "stellar-xdr 21.2.0", - "syn 2.0.77", -] - [[package]] name = "soroban-sdk-macros" version = "22.0.0-rc.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "508c9d819a05109120664aab86c371e1b72c5bea20b1a13158b4ef7948d9f673" dependencies = [ - "crate-git-revision 0.0.6", + "crate-git-revision", "darling", "itertools 0.10.5", "proc-macro2", "quote", "rustc_version", "sha2 0.10.8", - "soroban-env-common 22.0.0-rc.3", - "soroban-spec 22.0.0-rc.3", - "soroban-spec-rust 22.0.0-rc.3", - "stellar-xdr 22.0.0-rc.1.1", + "soroban-env-common", + "soroban-spec", + "soroban-spec-rust", + "stellar-xdr", "syn 2.0.77", ] -[[package]] -name = "soroban-spec" -version = "21.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7705bffbcc747c08e81698b87b4a787f8b268c25d88f777160091dc1ee8121cb" -dependencies = [ - "base64 0.13.1", - "stellar-xdr 21.2.0", - "thiserror", - "wasmparser 0.116.1", -] - [[package]] name = "soroban-spec" version = "22.0.0-rc.3" @@ -4807,38 +4519,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69001c97783ed3ce197eac2404e7beeabedd16e40e6f0aa210d1bc6a13063c33" dependencies = [ "base64 0.13.1", - "stellar-xdr 22.0.0-rc.1.1", + "stellar-xdr", "thiserror", - "wasmparser 0.116.1", + "wasmparser", ] [[package]] name = "soroban-spec-json" -version = "22.0.0-rc.1" +version = "22.0.0" dependencies = [ "pretty_assertions", "serde", "serde_derive", "serde_json", "sha2 0.9.9", - "soroban-spec 22.0.0-rc.3", - "stellar-xdr 22.0.0-rc.1.1", - "thiserror", -] - -[[package]] -name = "soroban-spec-rust" -version = "21.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48207ebc8616c2804a17203d1d86c53c3d3c804b682cbab011a135893db1cf78" -dependencies = [ - "prettyplease", - "proc-macro2", - "quote", - "sha2 0.10.8", - "soroban-spec 21.7.3", - "stellar-xdr 21.2.0", - "syn 2.0.77", + "soroban-spec", + "stellar-xdr", "thiserror", ] @@ -4852,33 +4548,33 @@ dependencies = [ "proc-macro2", "quote", "sha2 0.10.8", - "soroban-spec 22.0.0-rc.3", - "stellar-xdr 22.0.0-rc.1.1", + "soroban-spec", + "stellar-xdr", "syn 2.0.77", "thiserror", ] [[package]] name = "soroban-spec-tools" -version = "22.0.0-rc.1" +version = "22.0.0" dependencies = [ "base64 0.21.7", "ethnum", "hex", "itertools 0.10.5", "serde_json", - "soroban-spec 22.0.0-rc.3", + "soroban-spec", "stellar-strkey 0.0.11", - "stellar-xdr 22.0.0-rc.1.1", + "stellar-xdr", "thiserror", "tokio", - "wasmparser 0.90.0", + "wasmparser", "which", ] [[package]] name = "soroban-spec-typescript" -version = "22.0.0-rc.1" +version = "22.0.0" dependencies = [ "base64 0.21.7", "heck 0.4.1", @@ -4890,8 +4586,8 @@ dependencies = [ "serde_derive", "serde_json", "sha2 0.9.9", - "soroban-spec 22.0.0-rc.3", - "stellar-xdr 22.0.0-rc.1.1", + "soroban-spec", + "stellar-xdr", "temp-dir", "thiserror", "walkdir", @@ -4899,26 +4595,26 @@ dependencies = [ [[package]] name = "soroban-test" -version = "22.0.0-rc.1" +version = "22.0.0" dependencies = [ "assert_cmd", "assert_fs", - "ed25519-dalek 2.1.1", + "ed25519-dalek", "fs_extra", "hex", - "predicates 2.1.5", + "predicates", "sep5", "serde_json", "sha2 0.10.8", "soroban-cli", - "soroban-ledger-snapshot 22.0.0-rc.3", - "soroban-spec 22.0.0-rc.3", + "soroban-ledger-snapshot", + "soroban-spec", "soroban-spec-tools", "stellar-rpc-client", "stellar-strkey 0.0.11", "thiserror", "tokio", - "toml 0.8.19", + "toml", "ulid", "walkdir", "which", @@ -4926,11 +4622,11 @@ dependencies = [ [[package]] name = "soroban-token-sdk" -version = "21.7.2" +version = "22.0.0-rc.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c6ede0da76646037f3ea5db9ccd37830865444bb24f137cb8f0af8282c784f5" +checksum = "17bb933a3dcf41d234f6d669b077eb755663773630c6899a1c8a30dddf950f52" dependencies = [ - "soroban-sdk 21.7.2", + "soroban-sdk", ] [[package]] @@ -4970,23 +4666,23 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "stellar-bye" -version = "22.0.0-rc.1" +version = "0.0.0" [[package]] name = "stellar-cli" -version = "22.0.0-rc.1" +version = "22.0.0" dependencies = [ "soroban-cli", ] [[package]] name = "stellar-ledger" -version = "22.0.0-rc.1" +version = "22.0.0" dependencies = [ "async-trait", "bollard", "byteorder 1.5.0", - "ed25519-dalek 2.1.1", + "ed25519-dalek", "env_logger", "futures", "hex", @@ -4998,18 +4694,18 @@ dependencies = [ "once_cell", "phf", "pretty_assertions", - "reqwest 0.11.27", + "reqwest", "sep5", "serde", "serde_derive", "serde_json", "serial_test", - "sha2 0.9.9", - "slip10", - "soroban-spec 22.0.0-rc.3", + "sha2 0.10.8", + "slipped10", + "soroban-spec", "stellar-rpc-client", "stellar-strkey 0.0.11", - "stellar-xdr 22.0.0-rc.1.1", + "stellar-xdr", "test-case", "testcontainers", "thiserror", @@ -5035,7 +4731,7 @@ dependencies = [ "serde_with", "sha2 0.10.8", "stellar-strkey 0.0.9", - "stellar-xdr 22.0.0-rc.1.1", + "stellar-xdr", "termcolor", "termcolor_output", "thiserror", @@ -5050,7 +4746,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "12d2bf45e114117ea91d820a846fd1afbe3ba7d717988fee094ce8227a3bf8bd" dependencies = [ "base32", - "crate-git-revision 0.0.6", + "crate-git-revision", "thiserror", ] @@ -5060,7 +4756,7 @@ version = "0.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e3aa3ed00e70082cb43febc1c2afa5056b9bb3e348bbb43d0cd0aa88a611144" dependencies = [ - "crate-git-revision 0.0.6", + "crate-git-revision", "data-encoding", "thiserror", ] @@ -5071,26 +4767,10 @@ version = "0.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0989c9a05eccbd08b60e603a1c7e3ed3ec92c0de73b8681fc964d272ab2b2697" dependencies = [ - "crate-git-revision 0.0.6", + "crate-git-revision", "data-encoding", ] -[[package]] -name = "stellar-xdr" -version = "21.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2675a71212ed39a806e415b0dbf4702879ff288ec7f5ee996dda42a135512b50" -dependencies = [ - "arbitrary", - "base64 0.13.1", - "crate-git-revision 0.0.6", - "escape-bytes", - "hex", - "serde", - "serde_with", - "stellar-strkey 0.0.8", -] - [[package]] name = "stellar-xdr" version = "22.0.0-rc.1.1" @@ -5100,7 +4780,7 @@ dependencies = [ "arbitrary", "base64 0.13.1", "clap", - "crate-git-revision 0.0.6", + "crate-git-revision", "escape-bytes", "hex", "schemars", @@ -5124,12 +4804,6 @@ dependencies = [ "precomputed-hash", ] -[[package]] -name = "strsim" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" - [[package]] name = "strsim" version = "0.11.1" @@ -5224,12 +4898,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "sync_wrapper" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" - [[package]] name = "sync_wrapper" version = "1.0.1" @@ -5241,20 +4909,20 @@ dependencies = [ [[package]] name = "system-configuration" -version = "0.5.1" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", "core-foundation", "system-configuration-sys", ] [[package]] name = "system-configuration-sys" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" dependencies = [ "core-foundation-sys", "libc", @@ -5356,52 +5024,52 @@ dependencies = [ [[package]] name = "test_constructor" -version = "22.0.0-rc.1" +version = "0.0.0" dependencies = [ - "soroban-sdk 22.0.0-rc.3", + "soroban-sdk", ] [[package]] name = "test_custom_account" -version = "22.0.0-rc.1" +version = "0.0.0" dependencies = [ - "soroban-sdk 21.7.2", + "soroban-sdk", ] [[package]] name = "test_custom_types" -version = "22.0.0-rc.1" +version = "0.0.0" dependencies = [ - "soroban-sdk 21.7.2", + "soroban-sdk", ] [[package]] name = "test_hello_world" -version = "22.0.0-rc.1" +version = "0.0.0" dependencies = [ - "soroban-sdk 21.7.2", + "soroban-sdk", ] [[package]] name = "test_swap" -version = "22.0.0-rc.1" +version = "0.0.0" dependencies = [ - "soroban-sdk 21.7.2", + "soroban-sdk", ] [[package]] name = "test_token" -version = "22.0.0-rc.1" +version = "0.0.0" dependencies = [ - "soroban-sdk 21.7.2", + "soroban-sdk", "soroban-token-sdk", ] [[package]] name = "test_udt" -version = "22.0.0-rc.1" +version = "22.0.0" dependencies = [ - "soroban-sdk 21.7.2", + "soroban-sdk", ] [[package]] @@ -5414,7 +5082,7 @@ dependencies = [ "bollard", "bollard-stubs", "bytes", - "dirs 5.0.1", + "dirs", "docker_credential", "either", "futures", @@ -5422,7 +5090,7 @@ dependencies = [ "memchr", "parse-display", "pin-project-lite", - "reqwest 0.12.7", + "reqwest", "serde", "serde_json", "serde_with", @@ -5633,15 +5301,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "toml" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" -dependencies = [ - "serde", -] - [[package]] name = "toml" version = "0.8.19" @@ -5651,7 +5310,7 @@ dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.20", + "toml_edit", ] [[package]] @@ -5663,17 +5322,6 @@ dependencies = [ "serde", ] -[[package]] -name = "toml_edit" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" -dependencies = [ - "indexmap 2.3.0", - "toml_datetime", - "winnow 0.5.40", -] - [[package]] name = "toml_edit" version = "0.22.20" @@ -5684,7 +5332,7 @@ dependencies = [ "serde", "serde_spanned", "toml_datetime", - "winnow 0.6.18", + "winnow", ] [[package]] @@ -6018,9 +5666,9 @@ dependencies = [ [[package]] name = "wasm-opt" -version = "0.114.2" +version = "0.116.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "effbef3bd1dde18acb401f73e740a6f3d4a1bc651e9773bddc512fe4d8d68f67" +checksum = "2fd87a4c135535ffed86123b6fb0f0a5a0bc89e50416c942c5f0662c645f679c" dependencies = [ "anyhow", "libc", @@ -6034,9 +5682,9 @@ dependencies = [ [[package]] name = "wasm-opt-cxx-sys" -version = "0.114.2" +version = "0.116.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c09e24eb283919ace2ed5733bda4842a59ce4c8de110ef5c6d98859513d17047" +checksum = "8c57b28207aa724318fcec6575fe74803c23f6f266fce10cbc9f3f116762f12e" dependencies = [ "anyhow", "cxx", @@ -6046,9 +5694,9 @@ dependencies = [ [[package]] name = "wasm-opt-sys" -version = "0.114.2" +version = "0.116.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36f2f817bed2e8d65eb779fa37317e74de15585751f903c9118342d1970703a4" +checksum = "8a1cce564dc768dacbdb718fc29df2dba80bd21cb47d8f77ae7e3d95ceb98cbe" dependencies = [ "anyhow", "cc", @@ -6087,15 +5735,6 @@ dependencies = [ "paste", ] -[[package]] -name = "wasmparser" -version = "0.90.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b62c8d843f4423efee314dc75a1049886deba3214f7e7f9ff0e4e58b4d618581" -dependencies = [ - "indexmap 1.9.3", -] - [[package]] name = "wasmparser" version = "0.116.1" @@ -6381,15 +6020,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" -[[package]] -name = "winnow" -version = "0.5.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" -dependencies = [ - "memchr", -] - [[package]] name = "winnow" version = "0.6.18" diff --git a/Cargo.toml b/Cargo.toml index 31e92e40b..d2572e9c0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,24 +19,24 @@ exclude = [ ] [workspace.package] -version = "22.0.0-rc.1" +version = "22.0.0" rust-version = "1.81.0" # Dependencies located in this repo: [workspace.dependencies.soroban-cli] -version = "=22.0.0-rc.1" +version = "=22.0.0" path = "cmd/soroban-cli" [workspace.dependencies.soroban-spec-json] -version = "=22.0.0-rc.1" +version = "=22.0.0" path = "./cmd/crates/soroban-spec-json" [workspace.dependencies.soroban-spec-typescript] -version = "22.0.0-rc.1" +version = "22.0.0" path = "./cmd/crates/soroban-spec-typescript" [workspace.dependencies.soroban-spec-tools] -version = "22.0.0-rc.1" +version = "22.0.0" path = "./cmd/crates/soroban-spec-tools" # Dependencies from the rs-stellar-xdr repo: @@ -91,7 +91,7 @@ tracing = "0.1.37" tracing-subscriber = "0.3.16" tracing-appender = "0.2.2" which = "4.4.0" -wasmparser = "0.90.0" +wasmparser = "0.116.1" directories = "5.0.1" ulid = "1.1" termcolor = "1.1.3" @@ -100,7 +100,11 @@ ed25519-dalek = ">= 2.1.1" http = "1.0.0" jsonrpsee-http-client = "0.20.1" jsonrpsee-core = "0.20.1" -tokio = "1.28.1" +walkdir = "2.5.0" +toml_edit = "0.22.20" +toml = "0.8.19" +reqwest = "0.12.7" +predicates = "3.1.2" [profile.test-wasms] inherits = "release" diff --git a/cmd/crates/soroban-spec-typescript/ts-tests/initialize.sh b/cmd/crates/soroban-spec-typescript/ts-tests/initialize.sh index d85eff115..031061cca 100755 --- a/cmd/crates/soroban-spec-typescript/ts-tests/initialize.sh +++ b/cmd/crates/soroban-spec-typescript/ts-tests/initialize.sh @@ -37,6 +37,7 @@ function deploy_all() { } function bind() { exe eval "./soroban contract bindings typescript --contract-id $(cat $1) --output-dir ./node_modules/$2 --overwrite" + exe eval "sh -c \"cd ./node_modules/$2 && npm install && npm run build\"" } function bind_all() { bind contract-id-custom-types.txt test-custom-types diff --git a/cmd/crates/soroban-test/Cargo.toml b/cmd/crates/soroban-test/Cargo.toml index d9eb31bdd..d035652d1 100644 --- a/cmd/crates/soroban-test/Cargo.toml +++ b/cmd/crates/soroban-test/Cargo.toml @@ -6,7 +6,7 @@ repository = "https://github.com/stellar/soroban-test" authors = ["Stellar Development Foundation "] license = "Apache-2.0" readme = "README.md" -version = "22.0.0-rc.1" +version.workspace = true edition = "2021" rust-version.workspace = true autobins = false @@ -29,9 +29,9 @@ thiserror = "1.0.31" sha2 = "0.10.6" assert_cmd = "2.0.4" assert_fs = "1.0.7" -predicates = "2.1.5" +predicates = { workspace = true } fs_extra = "1.3.0" -toml = "0.8.10" +toml = { workspace = true } [dev-dependencies] diff --git a/cmd/crates/soroban-test/tests/fixtures/bye/Cargo.toml b/cmd/crates/soroban-test/tests/fixtures/bye/Cargo.toml index acee77f4b..deccb9c75 100644 --- a/cmd/crates/soroban-test/tests/fixtures/bye/Cargo.toml +++ b/cmd/crates/soroban-test/tests/fixtures/bye/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "stellar-bye" -version = "22.0.0-rc.1" +version = "0.0.0" edition = "2021" publish = false diff --git a/cmd/crates/soroban-test/tests/fixtures/hello/Cargo.toml b/cmd/crates/soroban-test/tests/fixtures/hello/Cargo.toml index 2a212a532..fe7eb636a 100644 --- a/cmd/crates/soroban-test/tests/fixtures/hello/Cargo.toml +++ b/cmd/crates/soroban-test/tests/fixtures/hello/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "soroban-hello" -version = "22.0.0-rc.1" +version = "0.0.0" edition = "2021" publish = false diff --git a/cmd/crates/soroban-test/tests/fixtures/test-wasms/constructor/Cargo.toml b/cmd/crates/soroban-test/tests/fixtures/test-wasms/constructor/Cargo.toml index 8c38fecb4..69d8a6430 100644 --- a/cmd/crates/soroban-test/tests/fixtures/test-wasms/constructor/Cargo.toml +++ b/cmd/crates/soroban-test/tests/fixtures/test-wasms/constructor/Cargo.toml @@ -1,11 +1,10 @@ [package] name = "test_constructor" -version = "22.0.0-rc.1" +version = "0.0.0" authors = ["Stellar Development Foundation "] license = "Apache-2.0" edition = "2021" publish = false -rust-version.workspace = true [lib] crate-type = ["cdylib"] diff --git a/cmd/crates/soroban-test/tests/fixtures/test-wasms/custom_account/Cargo.toml b/cmd/crates/soroban-test/tests/fixtures/test-wasms/custom_account/Cargo.toml index 9be386b69..765f671c6 100644 --- a/cmd/crates/soroban-test/tests/fixtures/test-wasms/custom_account/Cargo.toml +++ b/cmd/crates/soroban-test/tests/fixtures/test-wasms/custom_account/Cargo.toml @@ -1,18 +1,17 @@ [package] name = "test_custom_account" -version = "22.0.0-rc.1" +version = "0.0.0" authors = ["Stellar Development Foundation "] license = "Apache-2.0" edition = "2021" publish = false -rust-version.workspace = true [lib] crate-type = ["cdylib"] doctest = false [dependencies] -soroban-sdk = { version = "=21.7.2" } +soroban-sdk = { workspace = true } [dev-dependencies] -soroban-sdk = { version = "=21.7.2", features = ["testutils"]} +soroban-sdk = { workspace = true, features = ["testutils"]} diff --git a/cmd/crates/soroban-test/tests/fixtures/test-wasms/custom_account/src/lib.rs b/cmd/crates/soroban-test/tests/fixtures/test-wasms/custom_account/src/lib.rs index c71324110..ed924322b 100644 --- a/cmd/crates/soroban-test/tests/fixtures/test-wasms/custom_account/src/lib.rs +++ b/cmd/crates/soroban-test/tests/fixtures/test-wasms/custom_account/src/lib.rs @@ -115,7 +115,9 @@ impl CustomAccountInterface for Contract { return Err(Error::NotPermitted); } } - Context::CreateContractHostFn(_) => return Err(Error::InvalidContext), + Context::CreateContractWithCtorHostFn(_) | Context::CreateContractHostFn(_) => { + return Err(Error::InvalidContext) + } }; } diff --git a/cmd/crates/soroban-test/tests/fixtures/test-wasms/custom_type/Cargo.toml b/cmd/crates/soroban-test/tests/fixtures/test-wasms/custom_type/Cargo.toml index 7c4ca5828..b5a17c6a5 100644 --- a/cmd/crates/soroban-test/tests/fixtures/test-wasms/custom_type/Cargo.toml +++ b/cmd/crates/soroban-test/tests/fixtures/test-wasms/custom_type/Cargo.toml @@ -1,18 +1,17 @@ [package] name = "test_custom_types" -version = "22.0.0-rc.1" +version = "0.0.0" authors = ["Stellar Development Foundation "] license = "Apache-2.0" edition = "2021" publish = false -rust-version.workspace = true [lib] crate-type = ["cdylib", "rlib"] doctest = false [dependencies] -soroban-sdk = { version = "=21.7.2" } +soroban-sdk = { workspace = true } [dev-dependencies] -soroban-sdk = { version = "=21.7.2", features = ["testutils"]} +soroban-sdk = { workspace = true, features = ["testutils"]} diff --git a/cmd/crates/soroban-test/tests/fixtures/test-wasms/hello_world/Cargo.toml b/cmd/crates/soroban-test/tests/fixtures/test-wasms/hello_world/Cargo.toml index 19b7353ca..a13c98a39 100644 --- a/cmd/crates/soroban-test/tests/fixtures/test-wasms/hello_world/Cargo.toml +++ b/cmd/crates/soroban-test/tests/fixtures/test-wasms/hello_world/Cargo.toml @@ -1,18 +1,17 @@ [package] name = "test_hello_world" -version = "22.0.0-rc.1" +version = "0.0.0" authors = ["Stellar Development Foundation "] license = "Apache-2.0" edition = "2021" publish = false -rust-version.workspace = true [lib] crate-type = ["cdylib", "rlib"] doctest = false [dependencies] -soroban-sdk = { version = "=21.7.2" } +soroban-sdk = { workspace = true } [dev-dependencies] -soroban-sdk = { version = "=21.7.2", features = ["testutils"]} +soroban-sdk = { workspace = true, features = ["testutils"]} diff --git a/cmd/crates/soroban-test/tests/fixtures/test-wasms/hello_world/src/lib.rs b/cmd/crates/soroban-test/tests/fixtures/test-wasms/hello_world/src/lib.rs index 40006a1b7..b4b53c237 100644 --- a/cmd/crates/soroban-test/tests/fixtures/test-wasms/hello_world/src/lib.rs +++ b/cmd/crates/soroban-test/tests/fixtures/test-wasms/hello_world/src/lib.rs @@ -77,7 +77,7 @@ mod test { #[test] fn test_hello() { let env = Env::default(); - let contract_id = env.register_contract(None, Contract); + let contract_id = env.register(Contract, ()); let client = ContractClient::new(&env, &contract_id); let world = symbol_short!("world"); let res = client.hello(&world); diff --git a/cmd/crates/soroban-test/tests/fixtures/test-wasms/swap/Cargo.toml b/cmd/crates/soroban-test/tests/fixtures/test-wasms/swap/Cargo.toml index 509483408..495a52d71 100644 --- a/cmd/crates/soroban-test/tests/fixtures/test-wasms/swap/Cargo.toml +++ b/cmd/crates/soroban-test/tests/fixtures/test-wasms/swap/Cargo.toml @@ -1,18 +1,17 @@ [package] name = "test_swap" -version.workspace = true +version = "0.0.0" authors = ["Stellar Development Foundation "] license = "Apache-2.0" edition = "2021" publish = false -rust-version.workspace = true [lib] crate-type = ["cdylib"] doctest = false [dependencies] -soroban-sdk = { version = "=21.7.2" } +soroban-sdk = { workspace = true } [dev-dependencies] -soroban-sdk = { version = "=21.7.2", features = ["testutils"] } +soroban-sdk = { workspace = true, features = ["testutils"] } diff --git a/cmd/crates/soroban-test/tests/fixtures/test-wasms/swap/src/test.rs b/cmd/crates/soroban-test/tests/fixtures/test-wasms/swap/src/test.rs index 5c973880e..a60615162 100644 --- a/cmd/crates/soroban-test/tests/fixtures/test-wasms/swap/src/test.rs +++ b/cmd/crates/soroban-test/tests/fixtures/test-wasms/swap/src/test.rs @@ -21,7 +21,7 @@ fn create_token_contract<'a>(e: &Env, admin: &Address) -> (TokenClient<'a>, Toke } fn create_atomic_swap_contract(e: &Env) -> AtomicSwapContractClient { - AtomicSwapContractClient::new(e, &e.register_contract(None, AtomicSwapContract {})) + AtomicSwapContractClient::new(e, &e.register(AtomicSwapContract {}, ())) } #[test] diff --git a/cmd/crates/soroban-test/tests/fixtures/test-wasms/token/Cargo.toml b/cmd/crates/soroban-test/tests/fixtures/test-wasms/token/Cargo.toml index 03055f2b7..6456983e8 100644 --- a/cmd/crates/soroban-test/tests/fixtures/test-wasms/token/Cargo.toml +++ b/cmd/crates/soroban-test/tests/fixtures/test-wasms/token/Cargo.toml @@ -1,19 +1,18 @@ [package] name = "test_token" -version.workspace = true +version = "0.0.0" description = "Soroban standard token contract" authors = ["Stellar Development Foundation "] license = "Apache-2.0" edition = "2021" publish = false -rust-version.workspace = true [lib] crate-type = ["cdylib"] [dependencies] -soroban-sdk = { version = "=21.7.2" } -soroban-token-sdk = { version = "=21.7.2" } +soroban-sdk = { workspace = true } +soroban-token-sdk = { workspace = true } [dev-dependencies] -soroban-sdk = { version = "=21.7.2", features = ["testutils"] } +soroban-sdk = { workspace = true, features = ["testutils"] } diff --git a/cmd/crates/soroban-test/tests/fixtures/test-wasms/token/src/test.rs b/cmd/crates/soroban-test/tests/fixtures/test-wasms/token/src/test.rs index 08be5f9ef..cd892a646 100644 --- a/cmd/crates/soroban-test/tests/fixtures/test-wasms/token/src/test.rs +++ b/cmd/crates/soroban-test/tests/fixtures/test-wasms/token/src/test.rs @@ -9,7 +9,7 @@ use soroban_sdk::{ }; fn create_token<'a>(e: &Env, admin: &Address) -> TokenClient<'a> { - let token = TokenClient::new(e, &e.register_contract(None, Token {})); + let token = TokenClient::new(e, &e.register(Token {}, ())); token.initialize(admin, &7, &"name".into_val(e), &"symbol".into_val(e)); token } @@ -247,7 +247,7 @@ fn initialize_already_initialized() { fn decimal_is_over_max() { let e = Env::default(); let admin = Address::generate(&e); - let token = TokenClient::new(&e, &e.register_contract(None, Token {})); + let token = TokenClient::new(&e, &e.register(Token {}, ())); token.initialize( &admin, &(u32::from(u8::MAX) + 1), diff --git a/cmd/crates/soroban-test/tests/fixtures/test-wasms/udt/Cargo.toml b/cmd/crates/soroban-test/tests/fixtures/test-wasms/udt/Cargo.toml index aea356447..206284802 100644 --- a/cmd/crates/soroban-test/tests/fixtures/test-wasms/udt/Cargo.toml +++ b/cmd/crates/soroban-test/tests/fixtures/test-wasms/udt/Cargo.toml @@ -12,7 +12,7 @@ crate-type = ["cdylib"] doctest = false [dependencies] -soroban-sdk = { version = "=21.7.2" } +soroban-sdk = { workspace = true } [dev-dependencies] -soroban-sdk = { version = "=21.7.2" , features = ["testutils"]} +soroban-sdk = { workspace = true , features = ["testutils"]} diff --git a/cmd/crates/soroban-test/tests/fixtures/test-wasms/udt/src/lib.rs b/cmd/crates/soroban-test/tests/fixtures/test-wasms/udt/src/lib.rs index 695d8a7a3..efb3cf480 100644 --- a/cmd/crates/soroban-test/tests/fixtures/test-wasms/udt/src/lib.rs +++ b/cmd/crates/soroban-test/tests/fixtures/test-wasms/udt/src/lib.rs @@ -80,7 +80,7 @@ mod test { #[test] fn test_add() { let e = Env::default(); - let contract_id = e.register_contract(None, Contract); + let contract_id = e.register(Contract, ()); let client = ContractClient::new(&e, &contract_id); let udt = UdtStruct { diff --git a/cmd/crates/soroban-test/tests/it/integration/hello_world.rs b/cmd/crates/soroban-test/tests/it/integration/hello_world.rs index a6bd00c91..fd38c2012 100644 --- a/cmd/crates/soroban-test/tests/it/integration/hello_world.rs +++ b/cmd/crates/soroban-test/tests/it/integration/hello_world.rs @@ -96,7 +96,7 @@ async fn invoke() { .arg("--id") .arg(id) .assert() - .stdout(predicates::str::contains(id).not()) + .stdout(predicates::str::contains(id)) .success(); invoke_hello_world_with_lib(sandbox, id).await; let config_locator = locator::Args { diff --git a/cmd/crates/stellar-ledger/Cargo.toml b/cmd/crates/stellar-ledger/Cargo.toml index 10fd34e42..b3d6318a4 100644 --- a/cmd/crates/stellar-ledger/Cargo.toml +++ b/cmd/crates/stellar-ledger/Cargo.toml @@ -21,20 +21,20 @@ thiserror = "1.0.32" serde = "1.0.82" serde_derive = "1.0.82" serde_json = "1.0.82" -sha2 = "0.9.9" +sha2 = { workspace = true } ed25519-dalek = { workspace = true } stellar-strkey = { workspace = true } ledger-transport-hid = "0.10.0" ledger-transport = "0.10.0" sep5.workspace = true -slip10 = "0.4.3" +slip10 = { package = "slipped10", version = "0.4.6" } tracing = { workspace = true } hex.workspace = true byteorder = "1.5.0" bollard = { workspace = true } home = "0.5.9" tokio = { version = "1", features = ["full"] } -reqwest = { version = "0.11", features = ["json"] } +reqwest = { workspace = true, features = ["json"] } soroban-rpc.workspace = true phf = { version = "0.11.2", features = ["macros"] } futures = "0.3.30" diff --git a/cmd/soroban-cli/Cargo.toml b/cmd/soroban-cli/Cargo.toml index 224902eae..e6e205248 100644 --- a/cmd/soroban-cli/Cargo.toml +++ b/cmd/soroban-cli/Cargo.toml @@ -6,7 +6,7 @@ repository = "https://github.com/stellar/stellar-cli" authors = ["Stellar Development Foundation "] license = "Apache-2.0" readme = "README.md" -version = "22.0.0-rc.1" +version.workspace = true edition = "2021" rust-version.workspace = true autobins = false @@ -83,18 +83,17 @@ reqwest = { version = "0.12.7", default-features = false, features = [ jsonrpsee-http-client = "0.20.1" jsonrpsee-core = "0.20.1" regex = "1.6.0" -wasm-opt = { version = "0.114.0", optional = true } +wasm-opt = { version = "0.116.1", optional = true } chrono = { version = "0.4.27", features = ["serde"] } rpassword = "7.2.0" -dirs = "4.0.0" -toml = "0.5.9" +toml = { workspace = true } itertools = "0.10.5" shlex = "1.1.0" sep5 = { workspace = true } ethnum = { workspace = true } clap-markdown = { version = "0.1.4", optional = true } which = { workspace = true, features = ["regex"] } -strsim = "0.10.0" +strsim = "0.11.1" heck = "0.5.0" tracing = { workspace = true } tracing-appender = { workspace = true } @@ -109,7 +108,7 @@ strum_macros = "0.17.1" async-compression = { version = "0.4.12", features = ["tokio", "gzip"] } shell-escape = "0.1.5" tempfile = "3.8.1" -toml_edit = "0.21.0" +toml_edit = { workspace = true } rust-embed = { version = "8.2.0", features = ["debug-embed"] } bollard = { workspace = true } futures-util = "0.3.30" @@ -128,7 +127,7 @@ wasm-gen = "0.1.4" serde_with = "3.11.0" [build-dependencies] -crate-git-revision = "0.0.4" +crate-git-revision = "0.0.6" serde.workspace = true thiserror.workspace = true @@ -136,6 +135,6 @@ thiserror.workspace = true [dev-dependencies] assert_cmd = "2.0.4" assert_fs = "1.0.7" -predicates = "2.1.5" +predicates = { workspace = true } walkdir = "2.5.0" mockito = "1.5.0" diff --git a/cmd/soroban-cli/src/commands/contract/bindings/typescript.rs b/cmd/soroban-cli/src/commands/contract/bindings/typescript.rs index 84e2b1762..679e757f4 100644 --- a/cmd/soroban-cli/src/commands/contract/bindings/typescript.rs +++ b/cmd/soroban-cli/src/commands/contract/bindings/typescript.rs @@ -5,14 +5,13 @@ use soroban_spec_tools::contract as contract_spec; use soroban_spec_typescript::{self as typescript, boilerplate::Project}; use stellar_strkey::DecodeError; +use crate::print::Print; use crate::wasm; use crate::{ commands::{contract::fetch, global, NetworkRunnable}, - config::{ - self, locator, - network::{self, Network}, - }, + config::{self, locator, network}, get_spec::{self, get_remote_contract_spec}, + xdr::{Hash, ScAddress}, }; #[derive(Parser, Debug, Clone)] @@ -83,20 +82,27 @@ impl NetworkRunnable for Cmd { global_args: Option<&global::Args>, config: Option<&config::Args>, ) -> Result<(), Error> { + let print = Print::new(global_args.is_some_and(|a| a.quiet)); + + let network = self.network.get(&self.locator).ok().unwrap_or_else(|| { + network::DEFAULTS + .get("testnet") + .expect("no network specified and testnet network not found") + .into() + }); + + let contract_id = self + .locator + .resolve_contract_id(&self.contract_id, &network.network_passphrase)? + .0; + let contract_address = ScAddress::Contract(Hash(contract_id)); + let spec = if let Some(wasm) = &self.wasm { + print.infoln("Loading contract spec from file..."); let wasm: wasm::Args = wasm.into(); wasm.parse()?.spec } else { - let network = config.map_or_else( - || self.network.get(&self.locator).map_err(Error::from), - |c| c.get_network().map_err(Error::from), - )?; - - let contract_id = self - .locator - .resolve_contract_id(&self.contract_id, &network.network_passphrase)? - .0; - + print.globeln(format!("Downloading contract spec: {contract_address}")); get_remote_contract_spec( &contract_id, &self.locator, @@ -119,16 +125,7 @@ impl NetworkRunnable for Cmd { } std::fs::create_dir_all(&self.output_dir)?; let p: Project = self.output_dir.clone().try_into()?; - let Network { - rpc_url, - network_passphrase, - .. - } = self.network.get(&self.locator).ok().unwrap_or_else(|| { - network::DEFAULTS - .get("futurenet") - .expect("why did we remove the default futurenet network?") - .into() - }); + print.infoln(format!("Network: {}", network.network_passphrase)); let absolute_path = self.output_dir.canonicalize()?; let file_name = absolute_path .file_name() @@ -136,24 +133,19 @@ impl NetworkRunnable for Cmd { let contract_name = &file_name .to_str() .ok_or_else(|| Error::NotUtf8(file_name.to_os_string()))?; + print.infoln(format!("Embedding contract address: {contract_address}")); p.init( contract_name, - &self.contract_id, - &rpc_url, - &network_passphrase, + &contract_address.to_string(), + &network.rpc_url, + &network.network_passphrase, &spec, )?; - std::process::Command::new("npm") - .arg("install") - .current_dir(&self.output_dir) - .spawn()? - .wait()?; - std::process::Command::new("npm") - .arg("run") - .arg("build") - .current_dir(&self.output_dir) - .spawn()? - .wait()?; + print.checkln("Generated!"); + print.infoln(format!( + "Run \"npm install && npm run build\" in {:?} to build the JavaScript NPM package.", + self.output_dir + )); Ok(()) } } diff --git a/cmd/soroban-cli/src/commands/contract/deploy/asset.rs b/cmd/soroban-cli/src/commands/contract/deploy/asset.rs index 169c0109a..04a0380ed 100644 --- a/cmd/soroban-cli/src/commands/contract/deploy/asset.rs +++ b/cmd/soroban-cli/src/commands/contract/deploy/asset.rs @@ -110,12 +110,12 @@ impl NetworkRunnable for Cmd { source_account, )?; if self.fee.build_only { - return Ok(TxnResult::Txn(tx)); + return Ok(TxnResult::Txn(Box::new(tx))); } let txn = simulate_and_assemble_transaction(&client, &tx).await?; let txn = self.fee.apply_to_assembled_txn(txn).transaction().clone(); if self.fee.sim_only { - return Ok(TxnResult::Txn(txn)); + return Ok(TxnResult::Txn(Box::new(txn))); } let get_txn_resp = client .send_transaction_polling(&self.config.sign_with_local_key(txn).await?) diff --git a/cmd/soroban-cli/src/commands/contract/deploy/wasm.rs b/cmd/soroban-cli/src/commands/contract/deploy/wasm.rs index 9bf63802c..1d85832b0 100644 --- a/cmd/soroban-cli/src/commands/contract/deploy/wasm.rs +++ b/cmd/soroban-cli/src/commands/contract/deploy/wasm.rs @@ -265,14 +265,14 @@ impl NetworkRunnable for Cmd { // Get the account sequence number let account_details = client.get_account(&source_account.to_string()).await?; let sequence: i64 = account_details.seq_num.into(); - let txn = build_create_contract_tx( + let txn = Box::new(build_create_contract_tx( wasm_hash, sequence + 1, self.fee.fee, source_account, contract_id_preimage, constructor_params.as_ref(), - )?; + )?); if self.fee.build_only { print.checkln("Transaction built!"); @@ -282,7 +282,7 @@ impl NetworkRunnable for Cmd { print.infoln("Simulating deploy transaction…"); let txn = simulate_and_assemble_transaction(&client, &txn).await?; - let txn = self.fee.apply_to_assembled_txn(txn).transaction().clone(); + let txn = Box::new(self.fee.apply_to_assembled_txn(txn).transaction().clone()); if self.fee.sim_only { print.checkln("Done!"); @@ -293,7 +293,7 @@ impl NetworkRunnable for Cmd { print.log_transaction(&txn, &network, true)?; let get_txn_resp = client - .send_transaction_polling(&config.sign_with_local_key(txn).await?) + .send_transaction_polling(&config.sign_with_local_key(*txn).await?) .await? .try_into()?; diff --git a/cmd/soroban-cli/src/commands/contract/extend.rs b/cmd/soroban-cli/src/commands/contract/extend.rs index 6ec8ebdb1..e56cbe166 100644 --- a/cmd/soroban-cli/src/commands/contract/extend.rs +++ b/cmd/soroban-cli/src/commands/contract/extend.rs @@ -140,7 +140,7 @@ impl NetworkRunnable for Cmd { .await?; let sequence: i64 = account_details.seq_num.into(); - let tx = Transaction { + let tx = Box::new(Transaction { source_account, fee: self.fee.fee, seq_num: SequenceNumber(sequence + 1), @@ -167,7 +167,7 @@ impl NetworkRunnable for Cmd { }, resource_fee: 0, }), - }; + }); if self.fee.build_only { return Ok(TxnResult::Txn(tx)); } diff --git a/cmd/soroban-cli/src/commands/contract/init.rs b/cmd/soroban-cli/src/commands/contract/init.rs index 96f28c64e..9147bacf0 100644 --- a/cmd/soroban-cli/src/commands/contract/init.rs +++ b/cmd/soroban-cli/src/commands/contract/init.rs @@ -275,7 +275,7 @@ mod tests { let contract_dir = project_dir.join("contracts").join(contract_name); let cargo_toml_path = contract_dir.as_path().join("Cargo.toml"); let cargo_toml_str = read_to_string(cargo_toml_path.clone()).unwrap(); - let doc = cargo_toml_str.parse::().unwrap(); + let doc: toml_edit::DocumentMut = cargo_toml_str.parse().unwrap(); assert!( doc.get("dependencies") .unwrap() diff --git a/cmd/soroban-cli/src/commands/contract/install.rs b/cmd/soroban-cli/src/commands/contract/install.rs index a215a987d..0a9ec856d 100644 --- a/cmd/soroban-cli/src/commands/contract/install.rs +++ b/cmd/soroban-cli/src/commands/contract/install.rs @@ -146,7 +146,7 @@ impl NetworkRunnable for Cmd { build_install_contract_code_tx(&contract, sequence + 1, self.fee.fee, &source_account)?; if self.fee.build_only { - return Ok(TxnResult::Txn(tx_without_preflight)); + return Ok(TxnResult::Txn(Box::new(tx_without_preflight))); } // Don't check whether the contract is already installed when the user @@ -186,7 +186,7 @@ impl NetworkRunnable for Cmd { print.infoln("Simulating install transaction…"); let txn = simulate_and_assemble_transaction(&client, &tx_without_preflight).await?; - let txn = self.fee.apply_to_assembled_txn(txn).transaction().clone(); + let txn = Box::new(self.fee.apply_to_assembled_txn(txn).transaction().clone()); if self.fee.sim_only { return Ok(TxnResult::Txn(txn)); @@ -195,7 +195,7 @@ impl NetworkRunnable for Cmd { print.globeln("Submitting install transaction…"); let txn_resp = client - .send_transaction_polling(&self.config.sign_with_local_key(txn).await?) + .send_transaction_polling(&self.config.sign_with_local_key(*txn).await?) .await?; if args.map_or(true, |a| !a.no_cache) { diff --git a/cmd/soroban-cli/src/commands/contract/invoke.rs b/cmd/soroban-cli/src/commands/contract/invoke.rs index 04eeaebd6..c7b631343 100644 --- a/cmd/soroban-cli/src/commands/contract/invoke.rs +++ b/cmd/soroban-cli/src/commands/contract/invoke.rs @@ -25,10 +25,10 @@ use crate::{ print, rpc, xdr::{ self, AccountEntry, AccountEntryExt, AccountId, ContractEvent, ContractEventType, - DiagnosticEvent, HostFunction, InvokeContractArgs, InvokeHostFunctionOp, LedgerEntryData, - Limits, Memo, MuxedAccount, Operation, OperationBody, Preconditions, PublicKey, - ScSpecEntry, SequenceNumber, String32, StringM, Thresholds, Transaction, TransactionExt, - Uint256, VecM, WriteXdr, + DiagnosticEvent, HostFunction, InvokeContractArgs, InvokeHostFunctionOp, Limits, Memo, + MuxedAccount, Operation, OperationBody, Preconditions, PublicKey, ScSpecEntry, + SequenceNumber, String32, StringM, Thresholds, Transaction, TransactionExt, Uint256, VecM, + WriteXdr, }, Pwd, }; @@ -93,8 +93,6 @@ pub enum Error { ParseIntError(#[from] ParseIntError), #[error(transparent)] Rpc(#[from] rpc::Error), - #[error("unexpected contract code data type: {0:?}")] - UnexpectedContractCodeDataType(LedgerEntryData), #[error("missing operation result")] MissingOperationResult, #[error("error loading signing key: {0}")] @@ -258,21 +256,22 @@ impl NetworkRunnable for Cmd { let sequence: i64 = account_details.seq_num.into(); let AccountId(PublicKey::PublicKeyTypeEd25519(account_id)) = account_details.account_id; - let tx = build_invoke_contract_tx( + let tx = Box::new(build_invoke_contract_tx( host_function_params.clone(), sequence + 1, self.fee.fee, account_id, - )?; + )?); if self.fee.build_only { return Ok(TxnResult::Txn(tx)); } let txn = simulate_and_assemble_transaction(&client, &tx).await?; - let txn = self.fee.apply_to_assembled_txn(txn); + let assembled = self.fee.apply_to_assembled_txn(txn); + let mut txn = Box::new(assembled.transaction().clone()); if self.fee.sim_only { - return Ok(TxnResult::Txn(txn.transaction().clone())); + return Ok(TxnResult::Txn(txn)); } - let sim_res = txn.sim_response(); + let sim_res = assembled.sim_response(); if global_args.map_or(true, |a| !a.no_cache) { data::write(sim_res.clone().into(), &network.rpc_uri()?)?; } @@ -281,12 +280,11 @@ impl NetworkRunnable for Cmd { ShouldSend::Yes => { let global::Args { no_cache, .. } = global_args.cloned().unwrap_or_default(); // Need to sign all auth entries - let mut txn = txn.transaction().clone(); if let Some(tx) = config.sign_soroban_authorizations(&txn, &signers).await? { - txn = tx; + txn = Box::new(tx); } let res = client - .send_transaction_polling(&config.sign_with_local_key(txn).await?) + .send_transaction_polling(&config.sign_with_local_key(*txn).await?) .await?; if !no_cache { data::write(res.clone().try_into()?, &network.rpc_uri()?)?; diff --git a/cmd/soroban-cli/src/commands/contract/restore.rs b/cmd/soroban-cli/src/commands/contract/restore.rs index 92fc4b41d..cb35e6304 100644 --- a/cmd/soroban-cli/src/commands/contract/restore.rs +++ b/cmd/soroban-cli/src/commands/contract/restore.rs @@ -141,7 +141,7 @@ impl NetworkRunnable for Cmd { .await?; let sequence: i64 = account_details.seq_num.into(); - let tx = Transaction { + let tx = Box::new(Transaction { source_account, fee: self.fee.fee, seq_num: SequenceNumber(sequence + 1), @@ -167,12 +167,12 @@ impl NetworkRunnable for Cmd { }, resource_fee: 0, }), - }; + }); if self.fee.build_only { return Ok(TxnResult::Txn(tx)); } let res = client - .send_transaction_polling(&config.sign_with_local_key(tx).await?) + .send_transaction_polling(&config.sign_with_local_key(*tx).await?) .await?; if args.map_or(true, |a| !a.no_cache) { data::write(res.clone().try_into()?, &network.rpc_uri()?)?; diff --git a/cmd/soroban-cli/src/commands/tx/args.rs b/cmd/soroban-cli/src/commands/tx/args.rs index fc99b9591..1da1f230a 100644 --- a/cmd/soroban-cli/src/commands/tx/args.rs +++ b/cmd/soroban-cli/src/commands/tx/args.rs @@ -87,7 +87,7 @@ impl Args { let network = self.config.get_network()?; let client = Client::new(&network.rpc_url)?; if self.fee.build_only { - return Ok(TxnEnvelopeResult::TxnEnvelope(tx.into())); + return Ok(TxnEnvelopeResult::TxnEnvelope(Box::new(tx.into()))); } let txn_resp = client diff --git a/cmd/soroban-cli/src/commands/txn_result.rs b/cmd/soroban-cli/src/commands/txn_result.rs index d6b308b3a..568fd79d2 100644 --- a/cmd/soroban-cli/src/commands/txn_result.rs +++ b/cmd/soroban-cli/src/commands/txn_result.rs @@ -2,7 +2,7 @@ use crate::xdr::{Transaction, TransactionEnvelope, TransactionV1Envelope, VecM}; #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord)] pub enum TxnResult { - Txn(Transaction), + Txn(Box), Res(R), } @@ -16,12 +16,12 @@ impl TxnResult { pub fn to_envelope(self) -> TxnEnvelopeResult { match self { - TxnResult::Txn(tx) => { - TxnEnvelopeResult::TxnEnvelope(TransactionEnvelope::Tx(TransactionV1Envelope { - tx, + TxnResult::Txn(tx) => TxnEnvelopeResult::TxnEnvelope(Box::new( + TransactionEnvelope::Tx(TransactionV1Envelope { + tx: *tx, signatures: VecM::default(), - })) - } + }), + )), TxnResult::Res(res) => TxnEnvelopeResult::Res(res), } } @@ -29,6 +29,6 @@ impl TxnResult { #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord)] pub enum TxnEnvelopeResult { - TxnEnvelope(TransactionEnvelope), + TxnEnvelope(Box), Res(R), } diff --git a/cmd/soroban-cli/src/config/locator.rs b/cmd/soroban-cli/src/config/locator.rs index cf30aec7d..68a95f628 100644 --- a/cmd/soroban-cli/src/config/locator.rs +++ b/cmd/soroban-cli/src/config/locator.rs @@ -1,4 +1,5 @@ use clap::arg; +use directories::UserDirs; use itertools::Itertools; use serde::de::DeserializeOwned; use std::{ @@ -449,11 +450,10 @@ impl KeyType { } pub fn read_from_path(path: &Path) -> Result { - let data = fs::read(path).map_err(|_| Error::NetworkFileRead { + let data = fs::read_to_string(path).map_err(|_| Error::NetworkFileRead { path: path.to_path_buf(), })?; - let res = toml::from_slice(data.as_slice()); - Ok(res?) + Ok(toml::from_str(&data)?) } pub fn read_with_global(&self, key: &str, pwd: &Path) -> Result { @@ -524,8 +524,9 @@ pub fn global_config_path() -> Result { let config_dir = if let Ok(config_home) = std::env::var("XDG_CONFIG_HOME") { PathBuf::from_str(&config_home).map_err(|_| Error::XdgConfigHome(config_home))? } else { - dirs::home_dir() + UserDirs::new() .ok_or(Error::HomeDirNotFound)? + .home_dir() .join(".config") }; diff --git a/cmd/soroban-cli/src/config/mod.rs b/cmd/soroban-cli/src/config/mod.rs index 271e4c960..fb4c787fd 100644 --- a/cmd/soroban-cli/src/config/mod.rs +++ b/cmd/soroban-cli/src/config/mod.rs @@ -172,9 +172,8 @@ impl Config { let path = locator::config_file()?; if path.exists() { - let data = fs::read(&path).map_err(|_| locator::Error::FileRead { path })?; - - Ok(toml::from_slice(&data)?) + let data = fs::read_to_string(&path).map_err(|_| locator::Error::FileRead { path })?; + Ok(toml::from_str(&data)?) } else { Ok(Config::default()) } diff --git a/cmd/soroban-cli/src/utils/contract-template/src/test.rs b/cmd/soroban-cli/src/utils/contract-template/src/test.rs index af69a7ecb..0bdcba082 100644 --- a/cmd/soroban-cli/src/utils/contract-template/src/test.rs +++ b/cmd/soroban-cli/src/utils/contract-template/src/test.rs @@ -6,7 +6,7 @@ use soroban_sdk::{vec, Env, String}; #[test] fn test() { let env = Env::default(); - let contract_id = env.register_contract(None, Contract); + let contract_id = env.register(Contract, ()); let client = ContractClient::new(&env, &contract_id); let words = client.hello(&String::from_str(&env, "Dev")); diff --git a/cmd/soroban-cli/src/wasm.rs b/cmd/soroban-cli/src/wasm.rs index a907e021a..30f7a3e4a 100644 --- a/cmd/soroban-cli/src/wasm.rs +++ b/cmd/soroban-cli/src/wasm.rs @@ -42,7 +42,7 @@ pub enum Error { #[error(transparent)] Rpc(#[from] soroban_rpc::Error), #[error("unexpected contract data {0:?}")] - UnexpectedContractToken(ContractDataEntry), + UnexpectedContractToken(Box), #[error( "cannot fetch wasm for contract because the contract is \ a network built-in asset contract that does not have a downloadable code binary" @@ -136,5 +136,5 @@ pub async fn fetch_from_contract( ContractExecutable::StellarAsset => Err(ContractIsStellarAsset), }; } - Err(UnexpectedContractToken(data_entry)) + Err(UnexpectedContractToken(Box::new(data_entry))) } diff --git a/cmd/stellar-cli/Cargo.toml b/cmd/stellar-cli/Cargo.toml index 21e7e307b..e1f1dce6b 100644 --- a/cmd/stellar-cli/Cargo.toml +++ b/cmd/stellar-cli/Cargo.toml @@ -6,7 +6,7 @@ repository = "https://github.com/stellar/stellar-cli" authors = ["Stellar Development Foundation "] license = "Apache-2.0" readme = "README.md" -version = "22.0.0-rc.1" +version.workspace = true edition = "2021" rust-version.workspace = true autobins = false diff --git a/deny.toml b/deny.toml index 7588e71f1..238e91a14 100644 --- a/deny.toml +++ b/deny.toml @@ -252,6 +252,63 @@ deny = [ # Certain crates/versions that will be skipped when doing duplicate detection. skip = [ + + # Requires updating slipped10 to newest sha2 others are dependents that will be updated + { crate = "sha2", reason = "temporary duplicate until upstream updates" }, + { crate = "digest", reason = "temporary duplicate until upstream updates" }, + { crate = "block-buffer", reason = "temporary duplicate until upstream updates" }, + # slipped again 0.12.1 + { crate = "hmac", reason = "temp" }, + + # update rpassword, hidapi (then ledger-transport-hid), and dirs-sys (then directories) to 0.52 + # { crate = "window-sys", reason = "temp" }, + + # syn is too large of a surface to check + { crate = "syn", reason = "Too many crates haven't updated to v2" }, + + # Need to release new version and update all stellar crates + { crate = "stellar-strkey", reason = "Temp until new release and updates upstream", version = "0.0.8" }, + + # Need to update jsonrpsee in stellar-rpc-client + { crate = "rustls-pemfile", reason = "Temp until new release and updates upstream" }, + { crate = "rustls-webpki", reason = "Temp until new release and updates upstream" }, + { crate = "rustls-native-certs", reason = "Temp until new release and updates upstream", version = "0.7.3" }, + { crate = "rustls", reason = "Temp until new release and updates upstream" }, + { crate = "hyper", reason = "temporary duplicate until upstream updates" }, + { crate = "hyper-rustls", reason = "temporary duplicate until upstream updates", version = "0.27.3" }, + { crate = "http-body", reason = "temporary duplicate until upstream updates" }, + { crate = "http", reason = "temporary duplicate until upstream updates" }, + { crate = "h2", reason = "temporary duplicate until upstream updates", version = "0.3.26" }, + { crate = "base64", reason = "temporary duplicate until upstream updates", version = "0.22.1" }, + # Upgrade stellar-rpc-client to use 0.26.0 + { crate = "tokio-rustls", reason = "temporary duplicate until upstream updates" }, + + # wasm-opt + { crate = "heck", reason = "wasm-opt needs to update to 0.5", version = "0.5.0"}, + { crate = "strum", reason = "wasm-opt needs to update", version = "0.26.3" }, + { crate = "strum_macros", reason = "wasm-opt needs to update", version = "0.26.4" }, + + + # soroban-env-host must upgrade ark-* to 0.14.5 + { crate = "hashbrown", reason = "temp", version = "13.2"}, + + { crate = "windows-sys", reason = "temp", version = "0.59.0"}, + { crate = "windows-targets", reason = "temp", version = "0.52.6"}, + { crate = "windows_x86_64_gnu", reason = "temp", version = "0.52.6"}, + { crate = "windows_x86_64_msvc", reason = "temp", version = "0.52.6"}, + # { crate = "dir-sys", reason = "temp", version } + # + # update tracing-subscriber + { crate = "regex-syntax", reason = "temp", version = "0.8.4" }, + { crate = "regex-automata", reason = "temp", version = "0.4.7" }, + + # wasm-gen update + { crate = "byteorder", reason = "temp", version = "1.5.0" }, + + # testcontainers + { crate = "idna", reason = "temp", version = "0.5.0" }, + + # { name = "hashbrown", version = "=0.13.2" }, # { name = "syn", version = "=1.0.109" }, ]