diff --git a/Cargo.lock b/Cargo.lock index 67c55538d..86bee737e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -563,9 +563,9 @@ dependencies = [ [[package]] name = "curve25519-dalek" -version = "4.1.0" +version = "4.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622178105f911d937a42cdb140730ba4a3ed2becd8ae6ce39c7d28b5d75d4588" +checksum = "e89b8c6a2e4b1f45971ad09761aafb85514a84744b67a95e32c3cc1352d1f65c" dependencies = [ "cfg-if", "cpufeatures", @@ -822,7 +822,7 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7277392b266383ef8396db7fdeb1e77b6c52fed775f5df15bb24f35b72156980" dependencies = [ - "curve25519-dalek 4.1.0", + "curve25519-dalek 4.1.1", "ed25519 2.2.2", "rand_core 0.6.4", "serde", @@ -2145,9 +2145,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.13" +version = "0.38.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7db8590df6dfcd144d22afd1b83b36c21a18d7cbc1dc4bb5295a8712e9eb662" +checksum = "747c788e9ce8e92b12cd485c49ddf90723550b654b32508f979b71a7b1ecda4f" dependencies = [ "bitflags 2.4.0", "errno", @@ -2191,9 +2191,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.101.5" +version = "0.101.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45a27e3b59326c16e23d30aeb7a36a24cc0d29e71d68ff611cdfb4a01d013bed" +checksum = "3c7d5dece342910d9ba34d259310cae3e0154b873b35408b787b59bce53d34fe" dependencies = [ "ring", "untrusted", @@ -2476,9 +2476,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.11.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" +checksum = "942b4a808e05215192e39f4ab80813e599068285906cc91aa64f923db842bd5a" [[package]] name = "socket2" @@ -3131,9 +3131,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.8" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" +checksum = "1d68074620f57a0b21594d9735eb2e98ab38b17f80d3fcb189fca266771ca60d" dependencies = [ "bytes", "futures-core", diff --git a/cmd/crates/soroban-test/tests/it/contract_sandbox.rs b/cmd/crates/soroban-test/tests/it/contract_sandbox.rs index df0088b3c..5acfe90d4 100644 --- a/cmd/crates/soroban-test/tests/it/contract_sandbox.rs +++ b/cmd/crates/soroban-test/tests/it/contract_sandbox.rs @@ -271,6 +271,7 @@ fn contract_data_read_failure() { .arg("read") .arg("--id=1") .arg("--key=COUNTER") + .arg("--durability=persistent") .assert() .failure() .stderr( @@ -315,9 +316,10 @@ fn contract_data_read() { .arg("read") .arg("--id=1") .arg("--key=COUNTER") + .arg("--durability=persistent") .assert() .success() - .stdout("COUNTER,1\n"); + .stdout("COUNTER,1,4096\n"); sandbox .new_assert_cmd("contract") @@ -333,9 +335,10 @@ fn contract_data_read() { .arg("read") .arg("--id=1") .arg("--key=COUNTER") + .arg("--durability=persistent") .assert() .success() - .stdout("COUNTER,2\n"); + .stdout("COUNTER,2,4096\n"); } #[test] diff --git a/cmd/soroban-rpc/internal/test/cli_test.go b/cmd/soroban-rpc/internal/test/cli_test.go index 181d222d9..8ceb2f213 100644 --- a/cmd/soroban-rpc/internal/test/cli_test.go +++ b/cmd/soroban-rpc/internal/test/cli_test.go @@ -166,7 +166,7 @@ func TestCLIRestore(t *testing.T) { restoreOutput := runSuccessfulCLICmd( t, fmt.Sprintf( - "contract restore --id %s --key COUNTER", + "contract restore --id %s --key COUNTER --durability persistent", strkeyContractID, ), ) diff --git a/docs/soroban-cli-full-docs.md b/docs/soroban-cli-full-docs.md index 63b85774b..ce09608ed 100644 --- a/docs/soroban-cli-full-docs.md +++ b/docs/soroban-cli-full-docs.md @@ -230,10 +230,12 @@ Extend the expiry ledger of a contract-data ledger entry. If no keys are specified the contract itself is bumped. -**Usage:** `soroban contract bump [OPTIONS] --durability --ledgers-to-expire ` +**Usage:** `soroban contract bump [OPTIONS] --ledgers-to-expire --durability ` ###### **Options:** +* `--ledgers-to-expire ` — Number of ledgers to extend the entries +* `--expiration-ledger-only` — Only print the new expiration ledger * `--id ` — Contract ID to which owns the data entries. If no keys provided the Contract's instance will be bumped * `--key ` — Storage key (symbols only) * `--key-xdr ` — Storage key (base64-encoded XDR) @@ -247,8 +249,6 @@ If no keys are specified the contract itself is bumped. - `temporary`: Temporary -* `--ledgers-to-expire ` — Number of ledgers to extend the entries -* `--expiration-ledger-only` — Only print the new expiration ledger * `--rpc-url ` — RPC server endpoint * `--network-passphrase ` — Network passphrase to sign the transaction sent to the rpc server * `--network ` — Name of network to use from config @@ -409,21 +409,10 @@ Optimize a WASM file Print the current value of a contract-data ledger entry -**Usage:** `soroban contract read [OPTIONS] --id ` +**Usage:** `soroban contract read [OPTIONS] --durability ` ###### **Options:** -* `--id ` — Contract ID to invoke -* `--key ` — Storage key (symbols only) -* `--key-xdr ` — Storage key (base64-encoded XDR ScVal) -* `--durability ` — Storage entry durability - - Possible values: - - `persistent`: - Persistent - - `temporary`: - Temporary - * `--output ` — Type of output to generate Default value: `string` @@ -436,6 +425,19 @@ Print the current value of a contract-data ledger entry - `xdr`: XDR +* `--id ` — Contract ID to which owns the data entries. If no keys provided the Contract's instance will be bumped +* `--key ` — Storage key (symbols only) +* `--key-xdr ` — Storage key (base64-encoded XDR) +* `--wasm ` — Path to Wasm file of contract code to bump +* `--wasm-hash ` — Path to Wasm file of contract code to bump +* `--durability ` — Storage entry durability + + Possible values: + - `persistent`: + Persistent + - `temporary`: + Temporary + * `--rpc-url ` — RPC server endpoint * `--network-passphrase ` — Network passphrase to sign the transaction sent to the rpc server * `--network ` — Name of network to use from config @@ -453,15 +455,24 @@ Restore an evicted value for a contract-data legder entry. If no keys are specificed the contract itself is restored. -**Usage:** `soroban contract restore [OPTIONS]` +**Usage:** `soroban contract restore [OPTIONS] --durability ` ###### **Options:** -* `--id ` — Contract ID to which owns the data entries. If no keys provided the Contract's instance will be restored +* `--id ` — Contract ID to which owns the data entries. If no keys provided the Contract's instance will be bumped * `--key ` — Storage key (symbols only) * `--key-xdr ` — Storage key (base64-encoded XDR) -* `--wasm ` — Path to Wasm file of contract code to restore -* `--wasm-hash ` — Hash of contract code to restore +* `--wasm ` — Path to Wasm file of contract code to bump +* `--wasm-hash ` — Path to Wasm file of contract code to bump +* `--durability ` — Storage entry durability + + Possible values: + - `persistent`: + Persistent + - `temporary`: + Temporary + +* `--ledgers-to-expire ` — Number of ledgers to extend the entry * `--rpc-url ` — RPC server endpoint * `--network-passphrase ` — Network passphrase to sign the transaction sent to the rpc server * `--network ` — Name of network to use from config