diff --git a/Cargo.lock b/Cargo.lock index 73cb6f01f..6a142f3ea 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -168,12 +168,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" -[[package]] -name = "base64" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" - [[package]] name = "base64" version = "0.22.1" @@ -257,6 +251,17 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "cfg_eval" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45565fc9416b9896014f5732ac776f810ee53a66730c17e4020c3ec064a8f88f" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.77", +] + [[package]] name = "chrono" version = "0.4.38" @@ -474,6 +479,12 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" +[[package]] +name = "dyn-clone" +version = "1.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c7a8fb8a9fbf66c1f703fe16184d10ca0ee9d23be5b4436400408ba54a95005" + [[package]] name = "ecdsa" version = "0.16.9" @@ -1113,6 +1124,17 @@ version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" +[[package]] +name = "schemars" +version = "0.8.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fbf2ae1b8bc8e02df939598064d22402220cd5bbcca1c76f7d6a310974d5615" +dependencies = [ + "dyn-clone", + "serde", + "serde_json", +] + [[package]] name = "sec1" version = "0.7.3" @@ -1166,15 +1188,16 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.9.0" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69cecfa94848272156ea67b2b1a53f20fc7bc638c4a46d2f8abde08f05f4b857" +checksum = "d6b6f7f2fcb69f747921f79f3926bd1e203fce4fef62c268dd3abfb6d86029aa" dependencies = [ - "base64 0.22.1", + "base64", "chrono", "hex", "indexmap 1.9.3", "indexmap 2.5.0", + "schemars", "serde", "serde_derive", "serde_json", @@ -1184,9 +1207,9 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.9.0" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8fee4991ef4f274617a51ad4af30519438dacb2f56ac773b08a1922ff743350" +checksum = "8d00caa5193a3c8362ac2b73be6b9e768aa5a4b2f721d8f4b339600c3cb51f8e" dependencies = [ "darling", "proc-macro2", @@ -1239,9 +1262,9 @@ checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "soroban-builtin-sdk-macros" -version = "22.1.3" +version = "23.0.0-rc.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf2e42bf80fcdefb3aae6ff3c7101a62cf942e95320ed5b518a1705bc11c6b2f" +checksum = "72a252f947730c56eb2655c3f69736eadc4ef37bb129877051d87353fdff29f9" dependencies = [ "itertools", "proc-macro2", @@ -1251,9 +1274,9 @@ dependencies = [ [[package]] name = "soroban-env-common" -version = "22.1.3" +version = "23.0.0-rc.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "027cd856171bfd6ad2c0ffb3b7dfe55ad7080fb3050c36ad20970f80da634472" +checksum = "8f4727a4d48b5690994d724752ebe06db5d008e88d1cf374303cdd2f16ebebee" dependencies = [ "arbitrary", "crate-git-revision", @@ -1270,9 +1293,9 @@ dependencies = [ [[package]] name = "soroban-env-guest" -version = "22.1.3" +version = "23.0.0-rc.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a07dda1ae5220d975979b19ad4fd56bc86ec7ec1b4b25bc1c5d403f934e592e" +checksum = "8d1f71190ccec807f3030b61779acd6f7f5b80262c8926f77458e7e72c353beb" dependencies = [ "soroban-env-common", "static_assertions", @@ -1280,9 +1303,9 @@ dependencies = [ [[package]] name = "soroban-env-host" -version = "22.1.3" +version = "23.0.0-rc.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66e8b03a4191d485eab03f066336112b2a50541a7553179553dc838b986b94dd" +checksum = "6a3ffa1528a878fd5c4162b92f4fbe960348dd4b4592d1251843e05cecbc6cd6" dependencies = [ "ark-bls12-381", "ark-ec", @@ -1316,9 +1339,9 @@ dependencies = [ [[package]] name = "soroban-env-macros" -version = "22.1.3" +version = "23.0.0-rc.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00eff744764ade3bc480e4909e3a581a240091f3d262acdce80b41f7069b2bd9" +checksum = "2bed72512c8bebc17340046587c208fd4791d3c79e4e0c3ee9b6b554dafbe968" dependencies = [ "itertools", "proc-macro2", @@ -1392,7 +1415,7 @@ dependencies = [ name = "soroban-spec" version = "22.0.8" dependencies = [ - "base64 0.13.1", + "base64", "pretty_assertions", "stellar-xdr", "thiserror", @@ -1458,25 +1481,26 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "stellar-strkey" -version = "0.0.9" +version = "0.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e3aa3ed00e70082cb43febc1c2afa5056b9bb3e348bbb43d0cd0aa88a611144" +checksum = "ee1832fb50c651ad10f734aaf5d31ca5acdfb197a6ecda64d93fcdb8885af913" dependencies = [ "crate-git-revision", "data-encoding", - "thiserror", ] [[package]] name = "stellar-xdr" -version = "22.1.0" +version = "23.0.0-rc.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ce69db907e64d1e70a3dce8d4824655d154749426a6132b25395c49136013e4" +checksum = "11e08476633f75dfda6d41769619d8b54280d6b7807ac36bf09fa9c62afb8cfd" dependencies = [ "arbitrary", - "base64 0.13.1", + "base64", + "cfg_eval", "crate-git-revision", "escape-bytes", + "ethnum", "hex", "serde", "serde_with", diff --git a/Cargo.toml b/Cargo.toml index 6b64ad008..b49c8c1fa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,25 +24,25 @@ soroban-ledger-snapshot = { version = "22.0.8", path = "soroban-ledger-snapshot" soroban-token-sdk = { version = "22.0.8", path = "soroban-token-sdk" } [workspace.dependencies.soroban-env-common] -version = "=22.1.3" +version = "=23.0.0-rc.1.1" #git = "https://github.com/stellar/rs-soroban-env" #rev = "bd0c80a1fe171e75f8d745f17975a73927d44ecd" [workspace.dependencies.soroban-env-guest] -version = "=22.1.3" +version = "=23.0.0-rc.1.1" #git = "https://github.com/stellar/rs-soroban-env" #rev = "bd0c80a1fe171e75f8d745f17975a73927d44ecd" [workspace.dependencies.soroban-env-host] -version = "=22.1.3" +version = "=23.0.0-rc.1.1" #git = "https://github.com/stellar/rs-soroban-env" #rev = "bd0c80a1fe171e75f8d745f17975a73927d44ecd" [workspace.dependencies.stellar-strkey] -version = "=0.0.9" +version = "=0.0.13" [workspace.dependencies.stellar-xdr] -version = "=22.1.0" +version = "=23.0.0-rc.1" default-features = false features = ["curr"] #git = "https://github.com/stellar/rs-stellar-xdr" diff --git a/soroban-ledger-snapshot/Cargo.toml b/soroban-ledger-snapshot/Cargo.toml index d6f9a6dd1..e17b3c49a 100644 --- a/soroban-ledger-snapshot/Cargo.toml +++ b/soroban-ledger-snapshot/Cargo.toml @@ -11,7 +11,7 @@ edition = "2021" rust-version.workspace = true [dependencies] -soroban-env-host = { workspace = true } +soroban-env-host = { workspace = true, features = ["testutils"] } soroban-env-common = {workspace = true, features = ["serde"]} serde = { version = "1.0.0", features = ["derive"] } serde_with = { version = "3.4.0", features = ["hex"] } diff --git a/soroban-ledger-snapshot/src/lib.rs b/soroban-ledger-snapshot/src/lib.rs index 0aba7bea9..6bc349d9f 100644 --- a/soroban-ledger-snapshot/src/lib.rs +++ b/soroban-ledger-snapshot/src/lib.rs @@ -61,10 +61,7 @@ impl LedgerSnapshot { self.set_ledger_info(li.clone()); Ok(()) }); - let _result = host.with_mut_storage(|s| { - self.update_entries(&s.map); - Ok(()) - }); + self.update_entries(&host.get_stored_entries().unwrap()); } // Get the ledger info in the snapshot. @@ -168,7 +165,7 @@ impl LedgerSnapshot { impl Default for LedgerSnapshot { fn default() -> Self { Self { - protocol_version: 22, + protocol_version: 23, sequence_number: Default::default(), timestamp: Default::default(), network_id: Default::default(), diff --git a/soroban-sdk/Cargo.toml b/soroban-sdk/Cargo.toml index 752fbf326..ed7c71530 100644 --- a/soroban-sdk/Cargo.toml +++ b/soroban-sdk/Cargo.toml @@ -27,7 +27,7 @@ soroban-env-guest = { workspace = true } [target.'cfg(not(target_family="wasm"))'.dependencies] soroban-env-host = { workspace = true, features = [] } -soroban-ledger-snapshot = { workspace = true } +soroban-ledger-snapshot = { workspace = true, optional = true } stellar-strkey = { workspace = true } arbitrary = { version = "~1.3.0", features = ["derive"], optional = true } derive_arbitrary = { version = "~1.3.0", optional = true } @@ -44,6 +44,7 @@ soroban-sdk-macros = { workspace = true, features = ["testutils"] } soroban-env-host = { workspace = true, features = ["testutils"] } stellar-xdr = { workspace = true, features = ["curr", "std"] } soroban-spec = { workspace = true } +soroban-ledger-snapshot = { workspace = true } ed25519-dalek = "2.0.0" rand = "0.8.5" ctor = "0.2.9" @@ -57,7 +58,7 @@ expect-test = "1.4.1" [features] alloc = [] -testutils = ["soroban-sdk-macros/testutils", "soroban-env-host/testutils", "dep:ed25519-dalek", "dep:arbitrary", "dep:derive_arbitrary", "dep:ctor"] +testutils = ["soroban-sdk-macros/testutils", "soroban-env-host/testutils", "dep:ed25519-dalek", "dep:arbitrary", "dep:derive_arbitrary", "dep:ctor", "dep:soroban-ledger-snapshot"] hazmat = [] docs = [] diff --git a/soroban-sdk/src/address.rs b/soroban-sdk/src/address.rs index 0ffe5d48b..b5a09d8a0 100644 --- a/soroban-sdk/src/address.rs +++ b/soroban-sdk/src/address.rs @@ -51,10 +51,15 @@ impl Debug for Address { let strkey = Strkey::PublicKeyEd25519(ed25519::PublicKey(ed25519)); write!(f, "AccountId({})", strkey.to_string())?; } - xdr::ScAddress::Contract(contract_id) => { + xdr::ScAddress::Contract(xdr::ContractId(contract_id)) => { let strkey = Strkey::Contract(Contract(contract_id.0)); write!(f, "Contract({})", strkey.to_string())?; } + ScAddress::MuxedAccount(_) + | ScAddress::ClaimableBalance(_) + | ScAddress::LiquidityPool(_) => { + return Err(core::fmt::Error); + } } } else { return Err(core::fmt::Error); @@ -316,7 +321,7 @@ impl Address { } #[cfg(any(not(target_family = "wasm"), test, feature = "testutils"))] -use crate::env::xdr::Hash; +use crate::env::xdr::{ContractId, Hash}; use crate::unwrap::UnwrapOptimized; #[cfg(any(test, feature = "testutils"))] @@ -325,7 +330,7 @@ impl crate::testutils::Address for Address { fn generate(env: &Env) -> Self { Self::try_from_val( env, - &ScAddress::Contract(Hash(env.with_generator(|mut g| g.address()))), + &ScAddress::Contract(ContractId(Hash(env.with_generator(|mut g| g.address())))), ) .unwrap() } @@ -333,7 +338,7 @@ impl crate::testutils::Address for Address { #[cfg(not(target_family = "wasm"))] impl Address { - pub(crate) fn contract_id(&self) -> Hash { + pub(crate) fn contract_id(&self) -> ContractId { let sc_address: ScAddress = self.try_into().unwrap(); if let ScAddress::Contract(c) = sc_address { c @@ -343,6 +348,6 @@ impl Address { } pub(crate) fn from_contract_id(env: &Env, contract_id: [u8; 32]) -> Self { - Self::try_from_val(env, &ScAddress::Contract(Hash(contract_id))).unwrap() + Self::try_from_val(env, &ScAddress::Contract(ContractId(Hash(contract_id)))).unwrap() } } diff --git a/soroban-sdk/src/env.rs b/soroban-sdk/src/env.rs index adeaee129..8661f2b03 100644 --- a/soroban-sdk/src/env.rs +++ b/soroban-sdk/src/env.rs @@ -122,8 +122,8 @@ use crate::{ }; use internal::{ AddressObject, Bool, BytesObject, DurationObject, I128Object, I256Object, I256Val, I64Object, - StorageType, StringObject, Symbol, SymbolObject, TimepointObject, U128Object, U256Object, - U256Val, U32Val, U64Object, U64Val, Void, + MuxedAddressObject, StorageType, StringObject, Symbol, SymbolObject, TimepointObject, + U128Object, U256Object, U256Val, U32Val, U64Object, U64Val, Void, }; #[doc(hidden)] @@ -453,7 +453,7 @@ impl Env { #[cfg(not(target_family = "wasm"))] impl Env { pub(crate) fn is_same_env(&self, other: &Self) -> bool { - self.env_impl.check_same_env(&other.env_impl).is_ok() + self.env_impl.is_same(&other.env_impl) } } @@ -514,7 +514,7 @@ impl Env { let rf = Rc::new(EmptySnapshotSource()); let info = internal::LedgerInfo { - protocol_version: 22, + protocol_version: 23, sequence_number: 0, timestamp: 0, network_id: [0; 32], @@ -947,42 +947,29 @@ impl Env { issuer_pk.clone(), ))); - self.host() - .with_mut_storage(|storage| { - let k = Rc::new(xdr::LedgerKey::Account(xdr::LedgerKeyAccount { + let k = Rc::new(xdr::LedgerKey::Account(xdr::LedgerKeyAccount { + account_id: issuer_id.clone(), + })); + + if self.host().get_ledger_entry(&k).unwrap().is_none() { + let v = Rc::new(xdr::LedgerEntry { + data: xdr::LedgerEntryData::Account(xdr::AccountEntry { account_id: issuer_id.clone(), - })); - - if !storage.has( - &k, - soroban_env_host::budget::AsBudget::as_budget(self.host()), - )? { - let v = Rc::new(xdr::LedgerEntry { - data: xdr::LedgerEntryData::Account(xdr::AccountEntry { - account_id: issuer_id.clone(), - balance: 0, - flags: 0, - home_domain: Default::default(), - inflation_dest: None, - num_sub_entries: 0, - seq_num: xdr::SequenceNumber(0), - thresholds: xdr::Thresholds([1; 4]), - signers: xdr::VecM::default(), - ext: xdr::AccountEntryExt::V0, - }), - last_modified_ledger_seq: 0, - ext: xdr::LedgerEntryExt::V0, - }); - storage.put( - &k, - &v, - None, - soroban_env_host::budget::AsBudget::as_budget(self.host()), - )? - } - Ok(()) - }) - .unwrap(); + balance: 0, + flags: 0, + home_domain: Default::default(), + inflation_dest: None, + num_sub_entries: 0, + seq_num: xdr::SequenceNumber(0), + thresholds: xdr::Thresholds([1; 4]), + signers: xdr::VecM::default(), + ext: xdr::AccountEntryExt::V0, + }), + last_modified_ledger_seq: 0, + ext: xdr::LedgerEntryExt::V0, + }); + self.host().add_ledger_entry(&k, &v, None).unwrap(); + } let asset = xdr::Asset::CreditAlphanum4(xdr::AlphaNum4 { asset_code: xdr::AssetCode4([b'a', b'a', b'a', 0]), @@ -1063,9 +1050,9 @@ impl Env { xdr::CreateContractArgsV2 { contract_id_preimage: xdr::ContractIdPreimage::Address( xdr::ContractIdPreimageFromAddress { - address: xdr::ScAddress::Contract(xdr::Hash( + address: xdr::ScAddress::Contract(xdr::ContractId(xdr::Hash( self.with_generator(|mut g| g.address()), - )), + ))), salt: xdr::Uint256([0; 32]), }, ), @@ -1498,15 +1485,8 @@ impl Env { }), }); let live_until_ledger = self.ledger().sequence() + 1; - self.env_impl - .with_mut_storage(|storage| { - storage.put( - &key, - &entry, - Some(live_until_ledger), - soroban_env_host::budget::AsBudget::as_budget(self.host()), - ) - }) + self.host() + .add_ledger_entry(&key, &entry, Some(live_until_ledger)) .unwrap(); self.env_impl .call_constructor_for_stored_contract_unsafe(&contract_id, constructor_args.to_object()) @@ -1518,11 +1498,11 @@ impl Env { /// Used to write or read contract data, or take other actions in tests for /// setting up tests or asserting on internal state. pub fn as_contract(&self, id: &Address, f: impl FnOnce() -> T) -> T { - let id: [u8; 32] = id.contract_id().into(); + let id = id.contract_id(); let func = Symbol::from_small_str(""); let mut t: Option = None; self.env_impl - .with_test_contract_frame(id.into(), func, || { + .with_test_contract_frame(id, func, || { t = Some(f()); Ok(().into()) }) @@ -1604,12 +1584,7 @@ impl Env { let snapshot = self.test_state.snapshot.clone().unwrap_or_default(); let mut snapshot = (*snapshot).clone(); snapshot.set_ledger_info(self.ledger().get()); - let budget = soroban_env_host::budget::AsBudget::as_budget(&self.env_impl); - let storage = self - .env_impl - .with_mut_storage(|s| Ok(s.map.clone())) - .unwrap(); - snapshot.update_entries(storage.iter(budget).unwrap()); + snapshot.update_entries(&self.host().get_stored_entries().unwrap()); snapshot } @@ -1812,13 +1787,6 @@ impl internal::EnvBase for Env { match e {} } - fn check_same_env(&self, other: &Self) -> Result<(), Self::Error> { - Ok(self - .env_impl - .check_same_env(&other.env_impl) - .unwrap_optimized()) - } - fn bytes_copy_from_slice( &self, b: BytesObject, diff --git a/soroban-sdk/src/events.rs b/soroban-sdk/src/events.rs index 6d6e9a986..3165eb918 100644 --- a/soroban-sdk/src/events.rs +++ b/soroban-sdk/src/events.rs @@ -120,7 +120,7 @@ impl testutils::Events for Events { } = e.event { vec.push_back(( - Address::from_contract_id(env, contract_id.0), + Address::from_contract_id(env, contract_id.0 .0), topics.try_into_val(env).unwrap(), data.try_into_val(env).unwrap(), )) diff --git a/soroban-sdk/src/num.rs b/soroban-sdk/src/num.rs index a2d67cfb5..ec67ffbd8 100644 --- a/soroban-sdk/src/num.rs +++ b/soroban-sdk/src/num.rs @@ -2,8 +2,8 @@ use core::{cmp::Ordering, convert::Infallible, fmt::Debug}; use super::{ env::internal::{ - DurationSmall, DurationVal, Env as _, EnvBase as _, I256Small, I256Val, TimepointSmall, - TimepointVal, U256Small, U256Val, + DurationSmall, DurationVal, Env as _, I256Small, I256Val, TimepointSmall, TimepointVal, + U256Small, U256Val, }, Bytes, ConversionError, Env, TryFromVal, TryIntoVal, Val, }; @@ -217,7 +217,6 @@ impl U256 { } pub fn from_be_bytes(env: &Env, bytes: &Bytes) -> Self { - env.check_same_env(bytes.env()).unwrap_infallible(); let val = env .u256_val_from_be_bytes(bytes.to_object()) .unwrap_infallible(); @@ -247,7 +246,6 @@ impl U256 { } pub fn add(&self, other: &U256) -> U256 { - self.env.check_same_env(&other.env).unwrap_infallible(); let val = self.env.u256_add(self.val, other.val).unwrap_infallible(); U256 { env: self.env.clone(), @@ -256,7 +254,6 @@ impl U256 { } pub fn sub(&self, other: &U256) -> U256 { - self.env.check_same_env(&other.env).unwrap_infallible(); let val = self.env.u256_sub(self.val, other.val).unwrap_infallible(); U256 { env: self.env.clone(), @@ -265,7 +262,6 @@ impl U256 { } pub fn mul(&self, other: &U256) -> U256 { - self.env.check_same_env(&other.env).unwrap_infallible(); let val = self.env.u256_mul(self.val, other.val).unwrap_infallible(); U256 { env: self.env.clone(), @@ -274,7 +270,6 @@ impl U256 { } pub fn div(&self, other: &U256) -> U256 { - self.env.check_same_env(&other.env).unwrap_infallible(); let val = self.env.u256_div(self.val, other.val).unwrap_infallible(); U256 { env: self.env.clone(), @@ -283,7 +278,6 @@ impl U256 { } pub fn rem_euclid(&self, other: &U256) -> U256 { - self.env.check_same_env(&other.env).unwrap_infallible(); let val = self .env .u256_rem_euclid(self.val, other.val) @@ -372,7 +366,6 @@ impl I256 { } pub fn from_be_bytes(env: &Env, bytes: &Bytes) -> Self { - env.check_same_env(bytes.env()).unwrap_infallible(); let val = env .i256_val_from_be_bytes(bytes.to_object()) .unwrap_infallible(); @@ -404,7 +397,6 @@ impl I256 { } pub fn add(&self, other: &I256) -> I256 { - self.env.check_same_env(&other.env).unwrap_infallible(); let val = self.env.i256_add(self.val, other.val).unwrap_infallible(); I256 { env: self.env.clone(), @@ -413,7 +405,6 @@ impl I256 { } pub fn sub(&self, other: &I256) -> I256 { - self.env.check_same_env(&other.env).unwrap_infallible(); let val = self.env.i256_sub(self.val, other.val).unwrap_infallible(); I256 { env: self.env.clone(), @@ -422,7 +413,6 @@ impl I256 { } pub fn mul(&self, other: &I256) -> I256 { - self.env.check_same_env(&other.env).unwrap_infallible(); let val = self.env.i256_mul(self.val, other.val).unwrap_infallible(); I256 { env: self.env.clone(), @@ -431,7 +421,6 @@ impl I256 { } pub fn div(&self, other: &I256) -> I256 { - self.env.check_same_env(&other.env).unwrap_infallible(); let val = self.env.i256_div(self.val, other.val).unwrap_infallible(); I256 { env: self.env.clone(), @@ -440,7 +429,6 @@ impl I256 { } pub fn rem_euclid(&self, other: &I256) -> I256 { - self.env.check_same_env(&other.env).unwrap_infallible(); let val = self .env .i256_rem_euclid(self.val, other.val) diff --git a/soroban-sdk/src/storage.rs b/soroban-sdk/src/storage.rs index f2e74ec46..122714faa 100644 --- a/soroban-sdk/src/storage.rs +++ b/soroban-sdk/src/storage.rs @@ -577,7 +577,7 @@ mod testutils { impl testutils::storage::Instance for Instance { fn all(&self) -> Map { let env = &self.storage.env; - let storage = env.host().with_mut_storage(|s| Ok(s.map.clone())).unwrap(); + let storage = env.host().get_stored_entries().unwrap(); let address: xdr::ScAddress = env.current_contract_address().try_into().unwrap(); for entry in storage { let (k, Some((v, _))) = entry else { @@ -661,7 +661,7 @@ mod testutils { } fn all(env: &Env, d: xdr::ContractDataDurability) -> Map { - let storage = env.host().with_mut_storage(|s| Ok(s.map.clone())).unwrap(); + let storage = env.host().get_stored_entries().unwrap(); let mut map = Map::::new(env); for entry in storage { let (_, Some((v, _))) = entry else { diff --git a/soroban-sdk/src/tests/cost_estimate.rs b/soroban-sdk/src/tests/cost_estimate.rs index 58da38a42..570517780 100644 --- a/soroban-sdk/src/tests/cost_estimate.rs +++ b/soroban-sdk/src/tests/cost_estimate.rs @@ -21,11 +21,12 @@ fn test_cost_estimate_with_storage() { client.put(&symbol_short!("k1"), &symbol_short!("v1")); expect![[r#" InvocationResources { - instructions: 455853, - mem_bytes: 1162241, - read_entries: 2, + instructions: 242479, + mem_bytes: 1126705, + disk_read_entries: 0, + memory_read_entries: 3, write_entries: 1, - read_bytes: 1028, + disk_read_bytes: 0, write_bytes: 80, contract_events_size_bytes: 0, persistent_rent_ledger_bytes: 327600, @@ -36,14 +37,14 @@ fn test_cost_estimate_with_storage() { .assert_eq(format!("{:#?}", e.cost_estimate().resources()).as_str()); expect![[r#" FeeEstimate { - total: 45010, - instructions: 1140, - read_entries: 18750, + total: 29122, + instructions: 607, + disk_read_entries: 6250, write_entries: 10000, - read_bytes: 1793, - write_bytes: 938, + disk_read_bytes: 0, + write_bytes: 274, contract_events: 0, - persistent_entry_rent: 12389, + persistent_entry_rent: 11991, temporary_entry_rent: 0, }"#]] .assert_eq(format!("{:#?}", e.cost_estimate().fee()).as_str()); @@ -53,11 +54,12 @@ fn test_cost_estimate_with_storage() { assert_eq!(client.get(&symbol_short!("k1")), Some(symbol_short!("v1"))); expect![[r#" InvocationResources { - instructions: 454080, - mem_bytes: 1161338, - read_entries: 3, + instructions: 241076, + mem_bytes: 1125802, + disk_read_entries: 0, + memory_read_entries: 3, write_entries: 0, - read_bytes: 1108, + disk_read_bytes: 0, write_bytes: 0, contract_events_size_bytes: 0, persistent_rent_ledger_bytes: 0, @@ -68,11 +70,11 @@ fn test_cost_estimate_with_storage() { .assert_eq(format!("{:#?}", e.cost_estimate().resources()).as_str()); expect![[r#" FeeEstimate { - total: 21819, - instructions: 1136, - read_entries: 18750, + total: 603, + instructions: 603, + disk_read_entries: 0, write_entries: 0, - read_bytes: 1933, + disk_read_bytes: 0, write_bytes: 0, contract_events: 0, persistent_entry_rent: 0, @@ -85,11 +87,12 @@ fn test_cost_estimate_with_storage() { client.del(&symbol_short!("k1")); expect![[r#" InvocationResources { - instructions: 452458, - mem_bytes: 1161558, - read_entries: 2, + instructions: 238618, + mem_bytes: 1126022, + disk_read_entries: 0, + memory_read_entries: 3, write_entries: 1, - read_bytes: 1108, + disk_read_bytes: 0, write_bytes: 0, contract_events_size_bytes: 0, persistent_rent_ledger_bytes: 0, @@ -100,11 +103,11 @@ fn test_cost_estimate_with_storage() { .assert_eq(format!("{:#?}", e.cost_estimate().resources()).as_str()); expect![[r#" FeeEstimate { - total: 31815, - instructions: 1132, - read_entries: 18750, + total: 16847, + instructions: 597, + disk_read_entries: 6250, write_entries: 10000, - read_bytes: 1933, + disk_read_bytes: 0, write_bytes: 0, contract_events: 0, persistent_entry_rent: 0, @@ -117,11 +120,12 @@ fn test_cost_estimate_with_storage() { assert_eq!(client.get(&symbol_short!("k1")), None); expect![[r#" InvocationResources { - instructions: 452445, - mem_bytes: 1161202, - read_entries: 3, + instructions: 238885, + mem_bytes: 1125666, + disk_read_entries: 0, + memory_read_entries: 3, write_entries: 0, - read_bytes: 1028, + disk_read_bytes: 0, write_bytes: 0, contract_events_size_bytes: 0, persistent_rent_ledger_bytes: 0, @@ -132,11 +136,11 @@ fn test_cost_estimate_with_storage() { .assert_eq(format!("{:#?}", e.cost_estimate().resources()).as_str()); expect![[r#" FeeEstimate { - total: 21675, - instructions: 1132, - read_entries: 18750, + total: 598, + instructions: 598, + disk_read_entries: 0, write_entries: 0, - read_bytes: 1793, + disk_read_bytes: 0, write_bytes: 0, contract_events: 0, persistent_entry_rent: 0, @@ -157,14 +161,14 @@ fn test_cost_estimate_budget() { // Budget breakdown corresponds to the last invocation only. expect![[r#" =============================================================================================================================================================================== - Cpu limit: 100000000; used: 455853 - Mem limit: 41943040; used: 1162241 + Cpu limit: 100000000; used: 242479 + Mem limit: 41943040; used: 1126705 =============================================================================================================================================================================== CostType iterations input cpu_insns mem_bytes const_term_cpu lin_term_cpu const_term_mem lin_term_mem WasmInsnExec 284 None 1136 0 4 0 0 0 - MemAlloc 27 Some(1052425) 143269 1052857 434 16 16 128 - MemCpy 95 Some(9665) 5186 0 42 16 0 0 - MemCmp 43 Some(1049) 2012 0 44 16 0 0 + MemAlloc 23 Some(1051337) 141397 1051705 434 16 16 128 + MemCpy 97 Some(9494) 5246 0 42 16 0 0 + MemCmp 60 Some(1806) 2854 0 44 16 0 0 DispatchHostFunction 1 None 310 0 310 0 0 0 VisitObject 2 None 122 0 61 0 0 0 ValSer 0 Some(0) 0 0 230 29 242 384 @@ -184,16 +188,16 @@ fn test_cost_estimate_budget() { Int256Pow 0 None 0 0 4286 0 99 0 Int256Shift 0 None 0 0 913 0 99 0 ChaCha20DrawBytes 0 Some(0) 0 0 1058 501 0 0 - ParseWasmInstructions 1 Some(137) 100273 24475 73077 25410 17564 6457 - ParseWasmFunctions 1 Some(5) 21123 1854 0 540752 0 47464 - ParseWasmGlobals 1 Some(3) 4133 314 0 176363 0 13420 - ParseWasmTableEntries 1 Some(0) 0 0 0 29989 0 6285 - ParseWasmTypes 1 Some(5) 41462 2526 0 1061449 0 64670 - ParseWasmDataSegments 1 Some(0) 0 0 0 237336 0 29074 - ParseWasmElemSegments 1 Some(0) 0 0 0 328476 0 48095 - ParseWasmImports 1 Some(4) 21932 3225 0 701845 0 103229 - ParseWasmExports 1 Some(7) 23481 1990 0 429383 0 36394 - ParseWasmDataSegmentBytes 1 Some(0) 0 0 0 28 0 257 + ParseWasmInstructions 0 Some(0) 0 0 73077 25410 17564 6457 + ParseWasmFunctions 0 Some(0) 0 0 0 540752 0 47464 + ParseWasmGlobals 0 Some(0) 0 0 0 176363 0 13420 + ParseWasmTableEntries 0 Some(0) 0 0 0 29989 0 6285 + ParseWasmTypes 0 Some(0) 0 0 0 1061449 0 64670 + ParseWasmDataSegments 0 Some(0) 0 0 0 237336 0 29074 + ParseWasmElemSegments 0 Some(0) 0 0 0 328476 0 48095 + ParseWasmImports 0 Some(0) 0 0 0 701845 0 103229 + ParseWasmExports 0 Some(0) 0 0 0 429383 0 36394 + ParseWasmDataSegmentBytes 0 Some(0) 0 0 0 28 0 257 InstantiateWasmInstructions 1 None 43030 70704 43030 0 70704 0 InstantiateWasmFunctions 1 Some(5) 295 570 0 7556 0 14613 InstantiateWasmGlobals 1 Some(3) 251 160 0 10711 0 6833 @@ -233,9 +237,9 @@ fn test_cost_estimate_budget() { Bls12381FrInv 0 None 0 0 35421 0 0 0 =============================================================================================================================================================================== Internal details (diagnostics info, does not affect fees) - Total # times meter was called: 192 - Shadow cpu limit: 100000000; used: 34332 - Shadow mem limit: 41943040; used: 27725 + Total # times meter was called: 197 + Shadow cpu limit: 100000000; used: 31868 + Shadow mem limit: 41943040; used: 27092 =============================================================================================================================================================================== diff --git a/soroban-sdk/src/tests/storage_testutils.rs b/soroban-sdk/src/tests/storage_testutils.rs index 411f8a231..cc3ca78de 100644 --- a/soroban-sdk/src/tests/storage_testutils.rs +++ b/soroban-sdk/src/tests/storage_testutils.rs @@ -121,15 +121,13 @@ fn temp_entry_expiration() { e.ledger().set_sequence_number(1100); assert!(!e.storage().temporary().has(&1)); - // Bump the ledger sequence back - the entry would exist again - test environment - // doesn't *actually* delete anything. Normally ledger sequence can never decrease - // though. + // Bump the ledger sequence back - the expired entry is removed from + // storage on any access. + // Normally ledger sequence can never decrease though. e.ledger().set_sequence_number(1099); - assert!(e.storage().temporary().has(&1)); - - // Bump the ledger sequence past expiration and set the new value for the entry. - e.ledger().set_sequence_number(2000); assert!(!e.storage().temporary().has(&1)); + + // Set the new value for the entry. e.storage().temporary().set(&1, &3); // The entry is written and the new TTL is set based on min temp entry TTL // setting. @@ -139,8 +137,7 @@ fn temp_entry_expiration() { } #[test] -#[should_panic(expected = "[testing-only] Accessed contract data key key that has been archived")] -fn test_persistent_entry_expiration() { +fn test_persistent_entry_automatically_restored() { let e = Env::default(); e.ledger().set_sequence_number(1000); e.ledger().set_min_persistent_entry_ttl(100); @@ -149,13 +146,11 @@ fn test_persistent_entry_expiration() { e.as_contract(&contract, || { e.storage().persistent().set(&1, &2); - e.ledger().set_sequence_number(1100); - // Persistent entries are archived when they expire and they no longer can be accessed - // by the contracts at all. - // In actual networks the contract interaction won't happen at all if the footprint - // has any archived entries, but in the tests the closest thing we can do to that is - // to just panic (even if the value doesn't need to be accessed). - let _ = e.storage().persistent().has(&1); + e.ledger().set_sequence_number(10000); + // Persistent entries are automatically restored and extended by the + // minimum TTL. + assert_eq!(e.storage().persistent().get(&1), Some(2)); + assert_eq!(e.storage().persistent().get_ttl(&1), 99); }); } diff --git a/soroban-sdk/src/testutils.rs b/soroban-sdk/src/testutils.rs index 0ebb8545c..69ca6f51e 100644 --- a/soroban-sdk/src/testutils.rs +++ b/soroban-sdk/src/testutils.rs @@ -473,24 +473,16 @@ impl StellarAssetIssuer { /// Returns the flags for the issuer. pub fn flags(&self) -> u32 { - self.env - .host() - .with_mut_storage(|storage| { - let k = Rc::new(xdr::LedgerKey::Account(xdr::LedgerKeyAccount { - account_id: self.account_id.clone(), - })); - - let entry = storage.get( - &k, - soroban_env_host::budget::AsBudget::as_budget(self.env.host()), - )?; - - match entry.data { - xdr::LedgerEntryData::Account(ref e) => Ok(e.flags.clone()), - _ => panic!("expected account entry but got {:?}", entry.data), - } - }) - .unwrap() + let k = Rc::new(xdr::LedgerKey::Account(xdr::LedgerKeyAccount { + account_id: self.account_id.clone(), + })); + + let (entry, _) = self.env.host().get_ledger_entry(&k).unwrap().unwrap(); + + match &entry.data { + xdr::LedgerEntryData::Account(e) => e.flags, + _ => panic!("expected account entry but got {:?}", entry.data), + } } /// Adds the flag specified to the existing issuer flags @@ -521,34 +513,21 @@ impl StellarAssetIssuer { ); } + let k = Rc::new(xdr::LedgerKey::Account(xdr::LedgerKeyAccount { + account_id: self.account_id.clone(), + })); + + let (entry, _) = self.env.host().get_ledger_entry(&k).unwrap().unwrap(); + let mut entry = entry.as_ref().clone(); + + match entry.data { + xdr::LedgerEntryData::Account(ref mut e) => e.flags = flags, + _ => panic!("expected account entry but got {:?}", entry.data), + } + self.env .host() - .with_mut_storage(|storage| { - let k = Rc::new(xdr::LedgerKey::Account(xdr::LedgerKeyAccount { - account_id: self.account_id.clone(), - })); - - let mut entry = storage - .get( - &k, - soroban_env_host::budget::AsBudget::as_budget(self.env.host()), - )? - .as_ref() - .clone(); - - match entry.data { - xdr::LedgerEntryData::Account(ref mut e) => e.flags = flags, - _ => panic!("expected account entry but got {:?}", entry.data), - } - - storage.put( - &k, - &Rc::new(entry), - None, - soroban_env_host::budget::AsBudget::as_budget(self.env.host()), - )?; - Ok(()) - }) + .add_ledger_entry(&k, &Rc::new(entry), None) .unwrap(); } } diff --git a/soroban-sdk/src/testutils/arbitrary.rs b/soroban-sdk/src/testutils/arbitrary.rs index a849a51cd..09ad61d29 100644 --- a/soroban-sdk/src/testutils/arbitrary.rs +++ b/soroban-sdk/src/testutils/arbitrary.rs @@ -640,9 +640,9 @@ mod objects { impl TryFromVal for Address { type Error = ConversionError; fn try_from_val(env: &Env, v: &ArbitraryAddress) -> Result { - use crate::env::xdr::{Hash, ScAddress}; + use crate::env::xdr::{ContractId, Hash, ScAddress}; - let sc_addr = ScVal::Address(ScAddress::Contract(Hash(v.inner))); + let sc_addr = ScVal::Address(ScAddress::Contract(ContractId(Hash(v.inner)))); Ok(sc_addr.into_val(env)) } } diff --git a/soroban-sdk/src/testutils/cost_estimate.rs b/soroban-sdk/src/testutils/cost_estimate.rs index bfc045c00..3fca2052b 100644 --- a/soroban-sdk/src/testutils/cost_estimate.rs +++ b/soroban-sdk/src/testutils/cost_estimate.rs @@ -45,25 +45,29 @@ impl CostEstimate { /// VM instantiation and execution, as well as Wasm reads/rent bumps will be /// missed. pub fn fee(&self) -> FeeEstimate { - // This is a snapshot of the fees as of 2024-12-11. + // This is a snapshot of the fees as of 2024-12-11 with slight + // adjustments for p23. + // This has to be updated before p23 goes live with the configuration + // used at the network upgrade time. let pubnet_fee_config = FeeConfiguration { fee_per_instruction_increment: 25, - fee_per_read_entry: 6250, + fee_per_disk_read_entry: 6250, fee_per_write_entry: 10000, - fee_per_read_1kb: 1786, - // This is a bit higher than the current network fee, it's an - // overestimate for the sake of providing a bit more conservative - // results in case if the state grows. - fee_per_write_1kb: 12000, + fee_per_disk_read_1kb: 1786, + fee_per_write_1kb: 3500, fee_per_historical_1kb: 16235, fee_per_contract_event_1kb: 10000, fee_per_transaction_size_1kb: 1624, }; let pubnet_persistent_rent_rate_denominator = 2103; let pubnet_temp_rent_rate_denominator = 4206; - + // This is a bit higher than the current network fee, it's an + // overestimate for the sake of providing a bit more conservative + // results in case if the state grows. + let fee_per_rent_1kb = 12000; self.resources().estimate_fees( &pubnet_fee_config, + fee_per_rent_1kb, pubnet_persistent_rent_rate_denominator, pubnet_temp_rent_rate_denominator, ) diff --git a/soroban-sdk/test_snapshots/tests/auth/auth_10_one/test.1.json b/soroban-sdk/test_snapshots/tests/auth/auth_10_one/test.1.json index 2a1c4c9e0..1d956571a 100644 --- a/soroban-sdk/test_snapshots/tests/auth/auth_10_one/test.1.json +++ b/soroban-sdk/test_snapshots/tests/auth/auth_10_one/test.1.json @@ -59,7 +59,7 @@ ] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", @@ -138,7 +138,7 @@ "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", "key": { "ledger_key_nonce": { - "nonce": 1 + "nonce": "1" } }, "durability": "temporary" @@ -153,7 +153,7 @@ "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", "key": { "ledger_key_nonce": { - "nonce": 1 + "nonce": "1" } }, "durability": "temporary", @@ -171,7 +171,7 @@ "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", "key": { "ledger_key_nonce": { - "nonce": 2 + "nonce": "2" } }, "durability": "temporary" @@ -186,7 +186,7 @@ "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", "key": { "ledger_key_nonce": { - "nonce": 2 + "nonce": "2" } }, "durability": "temporary", diff --git a/soroban-sdk/test_snapshots/tests/auth/auth_15_one_repeat/test.1.json b/soroban-sdk/test_snapshots/tests/auth/auth_15_one_repeat/test.1.json index 70b4d6805..14eaaa1b6 100644 --- a/soroban-sdk/test_snapshots/tests/auth/auth_15_one_repeat/test.1.json +++ b/soroban-sdk/test_snapshots/tests/auth/auth_15_one_repeat/test.1.json @@ -57,7 +57,7 @@ ] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", @@ -136,7 +136,7 @@ "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", "key": { "ledger_key_nonce": { - "nonce": 1 + "nonce": "1" } }, "durability": "temporary" @@ -151,7 +151,7 @@ "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", "key": { "ledger_key_nonce": { - "nonce": 1 + "nonce": "1" } }, "durability": "temporary", @@ -169,7 +169,7 @@ "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", "key": { "ledger_key_nonce": { - "nonce": 2 + "nonce": "2" } }, "durability": "temporary" @@ -184,7 +184,7 @@ "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", "key": { "ledger_key_nonce": { - "nonce": 2 + "nonce": "2" } }, "durability": "temporary", diff --git a/soroban-sdk/test_snapshots/tests/auth/auth_17_no_consume_requirement/test.1.json b/soroban-sdk/test_snapshots/tests/auth/auth_17_no_consume_requirement/test.1.json index 50da3e693..16b91e849 100644 --- a/soroban-sdk/test_snapshots/tests/auth/auth_17_no_consume_requirement/test.1.json +++ b/soroban-sdk/test_snapshots/tests/auth/auth_17_no_consume_requirement/test.1.json @@ -34,7 +34,7 @@ ] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", @@ -113,7 +113,7 @@ "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", "key": { "ledger_key_nonce": { - "nonce": 1 + "nonce": "1" } }, "durability": "temporary" @@ -128,7 +128,7 @@ "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", "key": { "ledger_key_nonce": { - "nonce": 1 + "nonce": "1" } }, "durability": "temporary", diff --git a/soroban-sdk/test_snapshots/tests/auth/auth_20_deep_one_address/test.1.json b/soroban-sdk/test_snapshots/tests/auth/auth_20_deep_one_address/test.1.json index 2147fad7e..3f21b5422 100644 --- a/soroban-sdk/test_snapshots/tests/auth/auth_20_deep_one_address/test.1.json +++ b/soroban-sdk/test_snapshots/tests/auth/auth_20_deep_one_address/test.1.json @@ -28,7 +28,7 @@ ] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", @@ -139,7 +139,7 @@ "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", "key": { "ledger_key_nonce": { - "nonce": 1 + "nonce": "1" } }, "durability": "temporary" @@ -154,7 +154,7 @@ "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", "key": { "ledger_key_nonce": { - "nonce": 1 + "nonce": "1" } }, "durability": "temporary", diff --git a/soroban-sdk/test_snapshots/tests/auth/auth_20_deep_one_address/test_auth_tree.1.json b/soroban-sdk/test_snapshots/tests/auth/auth_20_deep_one_address/test_auth_tree.1.json index 3883d48b8..246290987 100644 --- a/soroban-sdk/test_snapshots/tests/auth/auth_20_deep_one_address/test_auth_tree.1.json +++ b/soroban-sdk/test_snapshots/tests/auth/auth_20_deep_one_address/test_auth_tree.1.json @@ -10,7 +10,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/soroban-sdk/test_snapshots/tests/auth/auth_30_deep_one_address_repeat/test.1.json b/soroban-sdk/test_snapshots/tests/auth/auth_30_deep_one_address_repeat/test.1.json index 8df49f93f..7860cf415 100644 --- a/soroban-sdk/test_snapshots/tests/auth/auth_30_deep_one_address_repeat/test.1.json +++ b/soroban-sdk/test_snapshots/tests/auth/auth_30_deep_one_address_repeat/test.1.json @@ -46,7 +46,7 @@ ] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", @@ -157,7 +157,7 @@ "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", "key": { "ledger_key_nonce": { - "nonce": 1 + "nonce": "1" } }, "durability": "temporary" @@ -172,7 +172,7 @@ "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", "key": { "ledger_key_nonce": { - "nonce": 1 + "nonce": "1" } }, "durability": "temporary", @@ -190,7 +190,7 @@ "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", "key": { "ledger_key_nonce": { - "nonce": 2 + "nonce": "2" } }, "durability": "temporary" @@ -205,7 +205,7 @@ "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", "key": { "ledger_key_nonce": { - "nonce": 2 + "nonce": "2" } }, "durability": "temporary", diff --git a/soroban-sdk/test_snapshots/tests/auth/auth_30_deep_one_address_repeat/test_auth_tree.1.json b/soroban-sdk/test_snapshots/tests/auth/auth_30_deep_one_address_repeat/test_auth_tree.1.json index 3883d48b8..246290987 100644 --- a/soroban-sdk/test_snapshots/tests/auth/auth_30_deep_one_address_repeat/test_auth_tree.1.json +++ b/soroban-sdk/test_snapshots/tests/auth/auth_30_deep_one_address_repeat/test_auth_tree.1.json @@ -10,7 +10,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/soroban-sdk/test_snapshots/tests/auth/auth_35_deep_one_address_repeat_grouped/test.1.json b/soroban-sdk/test_snapshots/tests/auth/auth_35_deep_one_address_repeat_grouped/test.1.json index 8df49f93f..7860cf415 100644 --- a/soroban-sdk/test_snapshots/tests/auth/auth_35_deep_one_address_repeat_grouped/test.1.json +++ b/soroban-sdk/test_snapshots/tests/auth/auth_35_deep_one_address_repeat_grouped/test.1.json @@ -46,7 +46,7 @@ ] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", @@ -157,7 +157,7 @@ "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", "key": { "ledger_key_nonce": { - "nonce": 1 + "nonce": "1" } }, "durability": "temporary" @@ -172,7 +172,7 @@ "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", "key": { "ledger_key_nonce": { - "nonce": 1 + "nonce": "1" } }, "durability": "temporary", @@ -190,7 +190,7 @@ "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", "key": { "ledger_key_nonce": { - "nonce": 2 + "nonce": "2" } }, "durability": "temporary" @@ -205,7 +205,7 @@ "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", "key": { "ledger_key_nonce": { - "nonce": 2 + "nonce": "2" } }, "durability": "temporary", diff --git a/soroban-sdk/test_snapshots/tests/auth/auth_35_deep_one_address_repeat_grouped/test_auth_tree.1.json b/soroban-sdk/test_snapshots/tests/auth/auth_35_deep_one_address_repeat_grouped/test_auth_tree.1.json index 3883d48b8..246290987 100644 --- a/soroban-sdk/test_snapshots/tests/auth/auth_35_deep_one_address_repeat_grouped/test_auth_tree.1.json +++ b/soroban-sdk/test_snapshots/tests/auth/auth_35_deep_one_address_repeat_grouped/test_auth_tree.1.json @@ -10,7 +10,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/soroban-sdk/test_snapshots/tests/auth/auth_40_multi_one_address/test_auth_as_tree.1.json b/soroban-sdk/test_snapshots/tests/auth/auth_40_multi_one_address/test_auth_as_tree.1.json index 44f2a90b6..816401837 100644 --- a/soroban-sdk/test_snapshots/tests/auth/auth_40_multi_one_address/test_auth_as_tree.1.json +++ b/soroban-sdk/test_snapshots/tests/auth/auth_40_multi_one_address/test_auth_as_tree.1.json @@ -43,7 +43,7 @@ ] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", @@ -154,7 +154,7 @@ "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", "key": { "ledger_key_nonce": { - "nonce": 1 + "nonce": "1" } }, "durability": "temporary" @@ -169,7 +169,7 @@ "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", "key": { "ledger_key_nonce": { - "nonce": 1 + "nonce": "1" } }, "durability": "temporary", diff --git a/soroban-sdk/test_snapshots/tests/auth/auth_40_multi_one_address/test_auth_not_allowed_with_separated_tree.1.json b/soroban-sdk/test_snapshots/tests/auth/auth_40_multi_one_address/test_auth_not_allowed_with_separated_tree.1.json index 9bf1a2869..73c9c1343 100644 --- a/soroban-sdk/test_snapshots/tests/auth/auth_40_multi_one_address/test_auth_not_allowed_with_separated_tree.1.json +++ b/soroban-sdk/test_snapshots/tests/auth/auth_40_multi_one_address/test_auth_not_allowed_with_separated_tree.1.json @@ -11,7 +11,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/soroban-sdk/test_snapshots/tests/contract_add_i32/test_functional.1.json b/soroban-sdk/test_snapshots/tests/contract_add_i32/test_functional.1.json index a90f00a84..5bac03af9 100644 --- a/soroban-sdk/test_snapshots/tests/contract_add_i32/test_functional.1.json +++ b/soroban-sdk/test_snapshots/tests/contract_add_i32/test_functional.1.json @@ -8,7 +8,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/soroban-sdk/test_snapshots/tests/contract_assert/test_invoke_expect_error.1.json b/soroban-sdk/test_snapshots/tests/contract_assert/test_invoke_expect_error.1.json index a90f00a84..5bac03af9 100644 --- a/soroban-sdk/test_snapshots/tests/contract_assert/test_invoke_expect_error.1.json +++ b/soroban-sdk/test_snapshots/tests/contract_assert/test_invoke_expect_error.1.json @@ -8,7 +8,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/soroban-sdk/test_snapshots/tests/contract_assert/test_try_invoke.1.json b/soroban-sdk/test_snapshots/tests/contract_assert/test_try_invoke.1.json index a90f00a84..5bac03af9 100644 --- a/soroban-sdk/test_snapshots/tests/contract_assert/test_try_invoke.1.json +++ b/soroban-sdk/test_snapshots/tests/contract_assert/test_try_invoke.1.json @@ -8,7 +8,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/soroban-sdk/test_snapshots/tests/contract_custom_account_impl/test_functional.1.json b/soroban-sdk/test_snapshots/tests/contract_custom_account_impl/test_functional.1.json index a90f00a84..5bac03af9 100644 --- a/soroban-sdk/test_snapshots/tests/contract_custom_account_impl/test_functional.1.json +++ b/soroban-sdk/test_snapshots/tests/contract_custom_account_impl/test_functional.1.json @@ -8,7 +8,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/soroban-sdk/test_snapshots/tests/contract_docs/fn_/test_functional.1.json b/soroban-sdk/test_snapshots/tests/contract_docs/fn_/test_functional.1.json index a90f00a84..5bac03af9 100644 --- a/soroban-sdk/test_snapshots/tests/contract_docs/fn_/test_functional.1.json +++ b/soroban-sdk/test_snapshots/tests/contract_docs/fn_/test_functional.1.json @@ -8,7 +8,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/soroban-sdk/test_snapshots/tests/contract_duration/test_functional.1.json b/soroban-sdk/test_snapshots/tests/contract_duration/test_functional.1.json index a90f00a84..5bac03af9 100644 --- a/soroban-sdk/test_snapshots/tests/contract_duration/test_functional.1.json +++ b/soroban-sdk/test_snapshots/tests/contract_duration/test_functional.1.json @@ -8,7 +8,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/soroban-sdk/test_snapshots/tests/contract_fn/test_functional.1.json b/soroban-sdk/test_snapshots/tests/contract_fn/test_functional.1.json index a90f00a84..5bac03af9 100644 --- a/soroban-sdk/test_snapshots/tests/contract_fn/test_functional.1.json +++ b/soroban-sdk/test_snapshots/tests/contract_fn/test_functional.1.json @@ -8,7 +8,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/soroban-sdk/test_snapshots/tests/contract_invoke/test_invoke_expect_error.1.json b/soroban-sdk/test_snapshots/tests/contract_invoke/test_invoke_expect_error.1.json index a90f00a84..5bac03af9 100644 --- a/soroban-sdk/test_snapshots/tests/contract_invoke/test_invoke_expect_error.1.json +++ b/soroban-sdk/test_snapshots/tests/contract_invoke/test_invoke_expect_error.1.json @@ -8,7 +8,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/soroban-sdk/test_snapshots/tests/contract_invoke/test_invoke_expect_string.1.json b/soroban-sdk/test_snapshots/tests/contract_invoke/test_invoke_expect_string.1.json index a90f00a84..5bac03af9 100644 --- a/soroban-sdk/test_snapshots/tests/contract_invoke/test_invoke_expect_string.1.json +++ b/soroban-sdk/test_snapshots/tests/contract_invoke/test_invoke_expect_string.1.json @@ -8,7 +8,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/soroban-sdk/test_snapshots/tests/contract_invoke/test_try_invoke.1.json b/soroban-sdk/test_snapshots/tests/contract_invoke/test_try_invoke.1.json index a90f00a84..5bac03af9 100644 --- a/soroban-sdk/test_snapshots/tests/contract_invoke/test_try_invoke.1.json +++ b/soroban-sdk/test_snapshots/tests/contract_invoke/test_try_invoke.1.json @@ -8,7 +8,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/soroban-sdk/test_snapshots/tests/contract_invoke_arg_count/test_correct_arg_count.1.json b/soroban-sdk/test_snapshots/tests/contract_invoke_arg_count/test_correct_arg_count.1.json index bb544e617..7898d22cb 100644 --- a/soroban-sdk/test_snapshots/tests/contract_invoke_arg_count/test_correct_arg_count.1.json +++ b/soroban-sdk/test_snapshots/tests/contract_invoke_arg_count/test_correct_arg_count.1.json @@ -9,7 +9,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/soroban-sdk/test_snapshots/tests/contract_invoke_arg_count/test_too_few_args.1.json b/soroban-sdk/test_snapshots/tests/contract_invoke_arg_count/test_too_few_args.1.json index bb544e617..7898d22cb 100644 --- a/soroban-sdk/test_snapshots/tests/contract_invoke_arg_count/test_too_few_args.1.json +++ b/soroban-sdk/test_snapshots/tests/contract_invoke_arg_count/test_too_few_args.1.json @@ -9,7 +9,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/soroban-sdk/test_snapshots/tests/contract_invoke_arg_count/test_too_many_args.1.json b/soroban-sdk/test_snapshots/tests/contract_invoke_arg_count/test_too_many_args.1.json index bb544e617..7898d22cb 100644 --- a/soroban-sdk/test_snapshots/tests/contract_invoke_arg_count/test_too_many_args.1.json +++ b/soroban-sdk/test_snapshots/tests/contract_invoke_arg_count/test_too_many_args.1.json @@ -9,7 +9,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/soroban-sdk/test_snapshots/tests/contract_overlapping_type_fn_names/test_functional.1.json b/soroban-sdk/test_snapshots/tests/contract_overlapping_type_fn_names/test_functional.1.json index a90f00a84..5bac03af9 100644 --- a/soroban-sdk/test_snapshots/tests/contract_overlapping_type_fn_names/test_functional.1.json +++ b/soroban-sdk/test_snapshots/tests/contract_overlapping_type_fn_names/test_functional.1.json @@ -8,7 +8,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/soroban-sdk/test_snapshots/tests/contract_snapshot/test.1.json b/soroban-sdk/test_snapshots/tests/contract_snapshot/test.1.json index 9bebac8e0..a53ddaab9 100644 --- a/soroban-sdk/test_snapshots/tests/contract_snapshot/test.1.json +++ b/soroban-sdk/test_snapshots/tests/contract_snapshot/test.1.json @@ -8,7 +8,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/soroban-sdk/test_snapshots/tests/contract_snapshot/test.2.json b/soroban-sdk/test_snapshots/tests/contract_snapshot/test.2.json index 933916850..712e50f49 100644 --- a/soroban-sdk/test_snapshots/tests/contract_snapshot/test.2.json +++ b/soroban-sdk/test_snapshots/tests/contract_snapshot/test.2.json @@ -9,7 +9,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/soroban-sdk/test_snapshots/tests/contract_store/test_storage.1.json b/soroban-sdk/test_snapshots/tests/contract_store/test_storage.1.json index 9f7aa0dc3..ac6703a8e 100644 --- a/soroban-sdk/test_snapshots/tests/contract_store/test_storage.1.json +++ b/soroban-sdk/test_snapshots/tests/contract_store/test_storage.1.json @@ -41,7 +41,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/soroban-sdk/test_snapshots/tests/contract_store/test_temp_storage_extension_past_max_ttl_panics.1.json b/soroban-sdk/test_snapshots/tests/contract_store/test_temp_storage_extension_past_max_ttl_panics.1.json index 1ca0ec786..dc9f541d9 100644 --- a/soroban-sdk/test_snapshots/tests/contract_store/test_temp_storage_extension_past_max_ttl_panics.1.json +++ b/soroban-sdk/test_snapshots/tests/contract_store/test_temp_storage_extension_past_max_ttl_panics.1.json @@ -9,7 +9,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/soroban-sdk/test_snapshots/tests/contract_timepoint/test_functional.1.json b/soroban-sdk/test_snapshots/tests/contract_timepoint/test_functional.1.json index a90f00a84..5bac03af9 100644 --- a/soroban-sdk/test_snapshots/tests/contract_timepoint/test_functional.1.json +++ b/soroban-sdk/test_snapshots/tests/contract_timepoint/test_functional.1.json @@ -8,7 +8,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/soroban-sdk/test_snapshots/tests/contract_udt_enum/test_functional.1.json b/soroban-sdk/test_snapshots/tests/contract_udt_enum/test_functional.1.json index a90f00a84..5bac03af9 100644 --- a/soroban-sdk/test_snapshots/tests/contract_udt_enum/test_functional.1.json +++ b/soroban-sdk/test_snapshots/tests/contract_udt_enum/test_functional.1.json @@ -8,7 +8,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/soroban-sdk/test_snapshots/tests/contract_udt_enum_error/test_error.1.json b/soroban-sdk/test_snapshots/tests/contract_udt_enum_error/test_error.1.json index a90f00a84..5bac03af9 100644 --- a/soroban-sdk/test_snapshots/tests/contract_udt_enum_error/test_error.1.json +++ b/soroban-sdk/test_snapshots/tests/contract_udt_enum_error/test_error.1.json @@ -8,7 +8,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/soroban-sdk/test_snapshots/tests/contract_udt_enum_error/test_success.1.json b/soroban-sdk/test_snapshots/tests/contract_udt_enum_error/test_success.1.json index a90f00a84..5bac03af9 100644 --- a/soroban-sdk/test_snapshots/tests/contract_udt_enum_error/test_success.1.json +++ b/soroban-sdk/test_snapshots/tests/contract_udt_enum_error/test_success.1.json @@ -8,7 +8,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/soroban-sdk/test_snapshots/tests/contract_udt_option/test_functional.1.json b/soroban-sdk/test_snapshots/tests/contract_udt_option/test_functional.1.json index a90f00a84..5bac03af9 100644 --- a/soroban-sdk/test_snapshots/tests/contract_udt_option/test_functional.1.json +++ b/soroban-sdk/test_snapshots/tests/contract_udt_option/test_functional.1.json @@ -8,7 +8,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/soroban-sdk/test_snapshots/tests/contract_udt_struct/test_functional.1.json b/soroban-sdk/test_snapshots/tests/contract_udt_struct/test_functional.1.json index a90f00a84..5bac03af9 100644 --- a/soroban-sdk/test_snapshots/tests/contract_udt_struct/test_functional.1.json +++ b/soroban-sdk/test_snapshots/tests/contract_udt_struct/test_functional.1.json @@ -8,7 +8,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/soroban-sdk/test_snapshots/tests/contract_udt_struct/test_long_names_functional.1.json b/soroban-sdk/test_snapshots/tests/contract_udt_struct/test_long_names_functional.1.json index a90f00a84..5bac03af9 100644 --- a/soroban-sdk/test_snapshots/tests/contract_udt_struct/test_long_names_functional.1.json +++ b/soroban-sdk/test_snapshots/tests/contract_udt_struct/test_long_names_functional.1.json @@ -8,7 +8,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/soroban-sdk/test_snapshots/tests/contract_udt_struct_tuple/test_functional.1.json b/soroban-sdk/test_snapshots/tests/contract_udt_struct_tuple/test_functional.1.json index a90f00a84..5bac03af9 100644 --- a/soroban-sdk/test_snapshots/tests/contract_udt_struct_tuple/test_functional.1.json +++ b/soroban-sdk/test_snapshots/tests/contract_udt_struct_tuple/test_functional.1.json @@ -8,7 +8,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/soroban-sdk/test_snapshots/tests/cost_estimate/test_cost_estimate_budget.1.json b/soroban-sdk/test_snapshots/tests/cost_estimate/test_cost_estimate_budget.1.json index 5b0b035b5..fdb17d435 100644 --- a/soroban-sdk/test_snapshots/tests/cost_estimate/test_cost_estimate_budget.1.json +++ b/soroban-sdk/test_snapshots/tests/cost_estimate/test_cost_estimate_budget.1.json @@ -7,7 +7,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", @@ -22,7 +22,7 @@ "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", "key": { "ledger_key_nonce": { - "nonce": 801925984706572462 + "nonce": "801925984706572462" } }, "durability": "temporary" @@ -37,7 +37,7 @@ "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", "key": { "ledger_key_nonce": { - "nonce": 801925984706572462 + "nonce": "801925984706572462" } }, "durability": "temporary", diff --git a/soroban-sdk/test_snapshots/tests/cost_estimate/test_cost_estimate_with_storage.1.json b/soroban-sdk/test_snapshots/tests/cost_estimate/test_cost_estimate_with_storage.1.json index ee238468b..d7e500150 100644 --- a/soroban-sdk/test_snapshots/tests/cost_estimate/test_cost_estimate_with_storage.1.json +++ b/soroban-sdk/test_snapshots/tests/cost_estimate/test_cost_estimate_with_storage.1.json @@ -10,7 +10,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", @@ -25,7 +25,7 @@ "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", "key": { "ledger_key_nonce": { - "nonce": 801925984706572462 + "nonce": "801925984706572462" } }, "durability": "temporary" @@ -40,7 +40,7 @@ "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", "key": { "ledger_key_nonce": { - "nonce": 801925984706572462 + "nonce": "801925984706572462" } }, "durability": "temporary", diff --git a/soroban-sdk/test_snapshots/tests/env/default_and_from_snapshot_same_settings.1.json b/soroban-sdk/test_snapshots/tests/env/default_and_from_snapshot_same_settings.1.json index 64688eee3..aa982cc36 100644 --- a/soroban-sdk/test_snapshots/tests/env/default_and_from_snapshot_same_settings.1.json +++ b/soroban-sdk/test_snapshots/tests/env/default_and_from_snapshot_same_settings.1.json @@ -9,7 +9,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/soroban-sdk/test_snapshots/tests/env/default_and_from_snapshot_same_settings.2.json b/soroban-sdk/test_snapshots/tests/env/default_and_from_snapshot_same_settings.2.json index 64688eee3..aa982cc36 100644 --- a/soroban-sdk/test_snapshots/tests/env/default_and_from_snapshot_same_settings.2.json +++ b/soroban-sdk/test_snapshots/tests/env/default_and_from_snapshot_same_settings.2.json @@ -9,7 +9,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/soroban-sdk/test_snapshots/tests/env/register_contract_deploys_predictable_contract_ids.1.json b/soroban-sdk/test_snapshots/tests/env/register_contract_deploys_predictable_contract_ids.1.json index 52e20fa60..89c731f33 100644 --- a/soroban-sdk/test_snapshots/tests/env/register_contract_deploys_predictable_contract_ids.1.json +++ b/soroban-sdk/test_snapshots/tests/env/register_contract_deploys_predictable_contract_ids.1.json @@ -7,7 +7,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/soroban-sdk/test_snapshots/tests/env/register_contract_deploys_predictable_contract_ids.2.json b/soroban-sdk/test_snapshots/tests/env/register_contract_deploys_predictable_contract_ids.2.json index 1f466fb4f..1c3fd7099 100644 --- a/soroban-sdk/test_snapshots/tests/env/register_contract_deploys_predictable_contract_ids.2.json +++ b/soroban-sdk/test_snapshots/tests/env/register_contract_deploys_predictable_contract_ids.2.json @@ -9,7 +9,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/soroban-sdk/test_snapshots/tests/env/register_contract_deploys_predictable_contract_ids.3.json b/soroban-sdk/test_snapshots/tests/env/register_contract_deploys_predictable_contract_ids.3.json index 1f466fb4f..1c3fd7099 100644 --- a/soroban-sdk/test_snapshots/tests/env/register_contract_deploys_predictable_contract_ids.3.json +++ b/soroban-sdk/test_snapshots/tests/env/register_contract_deploys_predictable_contract_ids.3.json @@ -9,7 +9,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/soroban-sdk/test_snapshots/tests/max_ttl/max.1.json b/soroban-sdk/test_snapshots/tests/max_ttl/max.1.json index 619bd9239..2ffff1666 100644 --- a/soroban-sdk/test_snapshots/tests/max_ttl/max.1.json +++ b/soroban-sdk/test_snapshots/tests/max_ttl/max.1.json @@ -8,7 +8,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 1, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/soroban-sdk/test_snapshots/tests/prng/test_prng_fill_array.1.json b/soroban-sdk/test_snapshots/tests/prng/test_prng_fill_array.1.json index a90f00a84..5bac03af9 100644 --- a/soroban-sdk/test_snapshots/tests/prng/test_prng_fill_array.1.json +++ b/soroban-sdk/test_snapshots/tests/prng/test_prng_fill_array.1.json @@ -8,7 +8,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/soroban-sdk/test_snapshots/tests/prng/test_prng_fill_bytes.1.json b/soroban-sdk/test_snapshots/tests/prng/test_prng_fill_bytes.1.json index a90f00a84..5bac03af9 100644 --- a/soroban-sdk/test_snapshots/tests/prng/test_prng_fill_bytes.1.json +++ b/soroban-sdk/test_snapshots/tests/prng/test_prng_fill_bytes.1.json @@ -8,7 +8,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/soroban-sdk/test_snapshots/tests/prng/test_prng_fill_bytesn.1.json b/soroban-sdk/test_snapshots/tests/prng/test_prng_fill_bytesn.1.json index a90f00a84..5bac03af9 100644 --- a/soroban-sdk/test_snapshots/tests/prng/test_prng_fill_bytesn.1.json +++ b/soroban-sdk/test_snapshots/tests/prng/test_prng_fill_bytesn.1.json @@ -8,7 +8,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/soroban-sdk/test_snapshots/tests/prng/test_prng_fill_slice.1.json b/soroban-sdk/test_snapshots/tests/prng/test_prng_fill_slice.1.json index a90f00a84..5bac03af9 100644 --- a/soroban-sdk/test_snapshots/tests/prng/test_prng_fill_slice.1.json +++ b/soroban-sdk/test_snapshots/tests/prng/test_prng_fill_slice.1.json @@ -8,7 +8,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/soroban-sdk/test_snapshots/tests/prng/test_prng_fill_u64.1.json b/soroban-sdk/test_snapshots/tests/prng/test_prng_fill_u64.1.json index a90f00a84..5bac03af9 100644 --- a/soroban-sdk/test_snapshots/tests/prng/test_prng_fill_u64.1.json +++ b/soroban-sdk/test_snapshots/tests/prng/test_prng_fill_u64.1.json @@ -8,7 +8,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/soroban-sdk/test_snapshots/tests/prng/test_prng_gen_array.1.json b/soroban-sdk/test_snapshots/tests/prng/test_prng_gen_array.1.json index a90f00a84..5bac03af9 100644 --- a/soroban-sdk/test_snapshots/tests/prng/test_prng_gen_array.1.json +++ b/soroban-sdk/test_snapshots/tests/prng/test_prng_gen_array.1.json @@ -8,7 +8,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/soroban-sdk/test_snapshots/tests/prng/test_prng_gen_bytesn.1.json b/soroban-sdk/test_snapshots/tests/prng/test_prng_gen_bytesn.1.json index a90f00a84..5bac03af9 100644 --- a/soroban-sdk/test_snapshots/tests/prng/test_prng_gen_bytesn.1.json +++ b/soroban-sdk/test_snapshots/tests/prng/test_prng_gen_bytesn.1.json @@ -8,7 +8,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/soroban-sdk/test_snapshots/tests/prng/test_prng_gen_len_bytes.1.json b/soroban-sdk/test_snapshots/tests/prng/test_prng_gen_len_bytes.1.json index a90f00a84..5bac03af9 100644 --- a/soroban-sdk/test_snapshots/tests/prng/test_prng_gen_len_bytes.1.json +++ b/soroban-sdk/test_snapshots/tests/prng/test_prng_gen_len_bytes.1.json @@ -8,7 +8,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/soroban-sdk/test_snapshots/tests/prng/test_prng_gen_range_u64.1.json b/soroban-sdk/test_snapshots/tests/prng/test_prng_gen_range_u64.1.json index a90f00a84..5bac03af9 100644 --- a/soroban-sdk/test_snapshots/tests/prng/test_prng_gen_range_u64.1.json +++ b/soroban-sdk/test_snapshots/tests/prng/test_prng_gen_range_u64.1.json @@ -8,7 +8,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/soroban-sdk/test_snapshots/tests/prng/test_prng_gen_range_u64_panic_on_invalid_range.1.json b/soroban-sdk/test_snapshots/tests/prng/test_prng_gen_range_u64_panic_on_invalid_range.1.json index 2d0a0a650..51dbb7685 100644 --- a/soroban-sdk/test_snapshots/tests/prng/test_prng_gen_range_u64_panic_on_invalid_range.1.json +++ b/soroban-sdk/test_snapshots/tests/prng/test_prng_gen_range_u64_panic_on_invalid_range.1.json @@ -7,7 +7,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/soroban-sdk/test_snapshots/tests/prng/test_prng_gen_u64.1.json b/soroban-sdk/test_snapshots/tests/prng/test_prng_gen_u64.1.json index a90f00a84..5bac03af9 100644 --- a/soroban-sdk/test_snapshots/tests/prng/test_prng_gen_u64.1.json +++ b/soroban-sdk/test_snapshots/tests/prng/test_prng_gen_u64.1.json @@ -8,7 +8,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/soroban-sdk/test_snapshots/tests/prng/test_prng_seed.1.json b/soroban-sdk/test_snapshots/tests/prng/test_prng_seed.1.json index a90f00a84..5bac03af9 100644 --- a/soroban-sdk/test_snapshots/tests/prng/test_prng_seed.1.json +++ b/soroban-sdk/test_snapshots/tests/prng/test_prng_seed.1.json @@ -8,7 +8,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/soroban-sdk/test_snapshots/tests/prng/test_prng_seed.2.json b/soroban-sdk/test_snapshots/tests/prng/test_prng_seed.2.json index a90f00a84..5bac03af9 100644 --- a/soroban-sdk/test_snapshots/tests/prng/test_prng_seed.2.json +++ b/soroban-sdk/test_snapshots/tests/prng/test_prng_seed.2.json @@ -8,7 +8,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/soroban-sdk/test_snapshots/tests/prng/test_prng_shuffle.1.json b/soroban-sdk/test_snapshots/tests/prng/test_prng_shuffle.1.json index 90577a38c..7d7ba3783 100644 --- a/soroban-sdk/test_snapshots/tests/prng/test_prng_shuffle.1.json +++ b/soroban-sdk/test_snapshots/tests/prng/test_prng_shuffle.1.json @@ -9,7 +9,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/soroban-sdk/test_snapshots/tests/prng/test_vec_shuffle.1.json b/soroban-sdk/test_snapshots/tests/prng/test_vec_shuffle.1.json index 90577a38c..7d7ba3783 100644 --- a/soroban-sdk/test_snapshots/tests/prng/test_vec_shuffle.1.json +++ b/soroban-sdk/test_snapshots/tests/prng/test_vec_shuffle.1.json @@ -9,7 +9,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/soroban-sdk/test_snapshots/tests/storage_testutils/all.1.json b/soroban-sdk/test_snapshots/tests/storage_testutils/all.1.json index 8a13c9b8b..020764a1d 100644 --- a/soroban-sdk/test_snapshots/tests/storage_testutils/all.1.json +++ b/soroban-sdk/test_snapshots/tests/storage_testutils/all.1.json @@ -9,7 +9,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/soroban-sdk/test_snapshots/tests/storage_testutils/temp_entry_expiration.1.json b/soroban-sdk/test_snapshots/tests/storage_testutils/temp_entry_expiration.1.json index 8b6b22881..77d1770a1 100644 --- a/soroban-sdk/test_snapshots/tests/storage_testutils/temp_entry_expiration.1.json +++ b/soroban-sdk/test_snapshots/tests/storage_testutils/temp_entry_expiration.1.json @@ -8,8 +8,8 @@ [] ], "ledger": { - "protocol_version": 22, - "sequence_number": 2000, + "protocol_version": 23, + "sequence_number": 1099, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", "base_reserve": 0, @@ -45,7 +45,7 @@ }, "ext": "v0" }, - 2099 + 1198 ] ], [ diff --git a/soroban-sdk/test_snapshots/tests/storage_testutils/test_persistent_entry_expiration.1.json b/soroban-sdk/test_snapshots/tests/storage_testutils/test_persistent_entry_automatically_restored.1.json similarity index 96% rename from soroban-sdk/test_snapshots/tests/storage_testutils/test_persistent_entry_expiration.1.json rename to soroban-sdk/test_snapshots/tests/storage_testutils/test_persistent_entry_automatically_restored.1.json index 0b577008d..37a2cac6d 100644 --- a/soroban-sdk/test_snapshots/tests/storage_testutils/test_persistent_entry_expiration.1.json +++ b/soroban-sdk/test_snapshots/tests/storage_testutils/test_persistent_entry_automatically_restored.1.json @@ -4,11 +4,12 @@ "nonce": 0 }, "auth": [ + [], [] ], "ledger": { - "protocol_version": 22, - "sequence_number": 1100, + "protocol_version": 23, + "sequence_number": 10000, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", "base_reserve": 0, @@ -44,7 +45,7 @@ }, "ext": "v0" }, - 1099 + 10099 ] ], [ @@ -76,7 +77,7 @@ }, "ext": "v0" }, - 1099 + 10099 ] ], [ diff --git a/soroban-sdk/test_snapshots/tests/storage_testutils/ttl_getters.1.json b/soroban-sdk/test_snapshots/tests/storage_testutils/ttl_getters.1.json index 2202dd2c6..4e1d2d156 100644 --- a/soroban-sdk/test_snapshots/tests/storage_testutils/ttl_getters.1.json +++ b/soroban-sdk/test_snapshots/tests/storage_testutils/ttl_getters.1.json @@ -17,7 +17,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 1000, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/soroban-sdk/test_snapshots/tests/token_client/test_issuer_flags.1.json b/soroban-sdk/test_snapshots/tests/token_client/test_issuer_flags.1.json index c18c0afb0..c16407ed0 100644 --- a/soroban-sdk/test_snapshots/tests/token_client/test_issuer_flags.1.json +++ b/soroban-sdk/test_snapshots/tests/token_client/test_issuer_flags.1.json @@ -25,7 +25,7 @@ ] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", @@ -46,8 +46,8 @@ "data": { "account": { "account_id": "GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEGWF", - "balance": 0, - "seq_num": 0, + "balance": "0", + "seq_num": "0", "num_sub_entries": 0, "inflation_dest": null, "flags": 2, @@ -68,7 +68,7 @@ "contract": "GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEGWF", "key": { "ledger_key_nonce": { - "nonce": 801925984706572462 + "nonce": "801925984706572462" } }, "durability": "temporary" @@ -83,7 +83,7 @@ "contract": "GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEGWF", "key": { "ledger_key_nonce": { - "nonce": 801925984706572462 + "nonce": "801925984706572462" } }, "durability": "temporary", @@ -213,7 +213,7 @@ { "event": { "ext": "v0", - "contract_id": "48f1b6b8bc0d60f7140dd49b6120fbaf3cdbab2adaeea631313d9f0bae9532f1", + "contract_id": "CBEPDNVYXQGWB5YUBXKJWYJA7OXTZW5LFLNO5JRRGE6Z6C5OSUZPCCEL", "type_": "contract", "body": { "v0": { diff --git a/soroban-sdk/test_snapshots/tests/token_client/test_mock_all_auth.1.json b/soroban-sdk/test_snapshots/tests/token_client/test_mock_all_auth.1.json index 3e2189578..47aeaa99b 100644 --- a/soroban-sdk/test_snapshots/tests/token_client/test_mock_all_auth.1.json +++ b/soroban-sdk/test_snapshots/tests/token_client/test_mock_all_auth.1.json @@ -44,10 +44,7 @@ "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAK3IM" }, { - "i128": { - "hi": 0, - "lo": 20 - } + "i128": "20" }, { "u32": 200 @@ -62,7 +59,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", @@ -83,8 +80,8 @@ "data": { "account": { "account_id": "GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEGWF", - "balance": 0, - "seq_num": 0, + "balance": "0", + "seq_num": "0", "num_sub_entries": 0, "inflation_dest": null, "flags": 0, @@ -105,7 +102,7 @@ "contract": "GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEGWF", "key": { "ledger_key_nonce": { - "nonce": 801925984706572462 + "nonce": "801925984706572462" } }, "durability": "temporary" @@ -120,7 +117,7 @@ "contract": "GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEGWF", "key": { "ledger_key_nonce": { - "nonce": 801925984706572462 + "nonce": "801925984706572462" } }, "durability": "temporary", @@ -209,7 +206,7 @@ "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4", "key": { "ledger_key_nonce": { - "nonce": 5541220902715666415 + "nonce": "5541220902715666415" } }, "durability": "temporary" @@ -224,7 +221,7 @@ "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4", "key": { "ledger_key_nonce": { - "nonce": 5541220902715666415 + "nonce": "5541220902715666415" } }, "durability": "temporary", @@ -312,10 +309,7 @@ "symbol": "amount" }, "val": { - "i128": { - "hi": 0, - "lo": 20 - } + "i128": "20" } }, { diff --git a/soroban-sdk/test_snapshots/tests/token_client/test_mock_auth.1.json b/soroban-sdk/test_snapshots/tests/token_client/test_mock_auth.1.json index f01fdc763..eecf3e9db 100644 --- a/soroban-sdk/test_snapshots/tests/token_client/test_mock_auth.1.json +++ b/soroban-sdk/test_snapshots/tests/token_client/test_mock_auth.1.json @@ -44,10 +44,7 @@ "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAK3IM" }, { - "i128": { - "hi": 0, - "lo": 20 - } + "i128": "20" }, { "u32": 200 @@ -62,7 +59,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", @@ -83,8 +80,8 @@ "data": { "account": { "account_id": "GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEGWF", - "balance": 0, - "seq_num": 0, + "balance": "0", + "seq_num": "0", "num_sub_entries": 0, "inflation_dest": null, "flags": 0, @@ -105,7 +102,7 @@ "contract": "GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEGWF", "key": { "ledger_key_nonce": { - "nonce": 801925984706572462 + "nonce": "801925984706572462" } }, "durability": "temporary" @@ -120,7 +117,7 @@ "contract": "GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEGWF", "key": { "ledger_key_nonce": { - "nonce": 801925984706572462 + "nonce": "801925984706572462" } }, "durability": "temporary", @@ -241,7 +238,7 @@ "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4", "key": { "ledger_key_nonce": { - "nonce": 1 + "nonce": "1" } }, "durability": "temporary" @@ -256,7 +253,7 @@ "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4", "key": { "ledger_key_nonce": { - "nonce": 1 + "nonce": "1" } }, "durability": "temporary", @@ -344,10 +341,7 @@ "symbol": "amount" }, "val": { - "i128": { - "hi": 0, - "lo": 20 - } + "i128": "20" } }, { diff --git a/soroban-spec-rust/src/lib.rs b/soroban-spec-rust/src/lib.rs index 73319d99e..f539d3175 100644 --- a/soroban-spec-rust/src/lib.rs +++ b/soroban-spec-rust/src/lib.rs @@ -77,6 +77,7 @@ pub fn generate_without_file(specs: &[ScSpecEntry]) -> TokenStream { ScSpecEntry::UdtUnionV0(u) => spec_unions.push(u), ScSpecEntry::UdtEnumV0(e) => spec_enums.push(e), ScSpecEntry::UdtErrorEnumV0(e) => spec_error_enums.push(e), + ScSpecEntry::EventV0(_) => todo!(), } } diff --git a/soroban-spec-rust/src/types.rs b/soroban-spec-rust/src/types.rs index d5b45da42..45cefa1a7 100644 --- a/soroban-spec-rust/src/types.rs +++ b/soroban-spec-rust/src/types.rs @@ -148,6 +148,7 @@ pub fn generate_type_ident(spec: &ScSpecTypeDef) -> TokenStream { ScSpecTypeDef::Error => quote! { soroban_sdk::Error }, ScSpecTypeDef::Bytes => quote! { soroban_sdk::Bytes }, ScSpecTypeDef::Address => quote! { soroban_sdk::Address }, + ScSpecTypeDef::MuxedAddress => todo!(), ScSpecTypeDef::String => quote! { soroban_sdk::String }, ScSpecTypeDef::Option(o) => { let value_ident = generate_type_ident(&o.value_type); diff --git a/soroban-spec/Cargo.toml b/soroban-spec/Cargo.toml index 0d48f5306..d521d5df6 100644 --- a/soroban-spec/Cargo.toml +++ b/soroban-spec/Cargo.toml @@ -12,7 +12,7 @@ rust-version.workspace = true [dependencies] stellar-xdr = { workspace = true, features = ["curr", "std", "serde"] } -base64 = "0.13.0" +base64 = "0.22.1" thiserror = "1.0.32" wasmparser = "0.116.1" diff --git a/soroban-spec/src/read.rs b/soroban-spec/src/read.rs index a3b544c6b..441550cf3 100644 --- a/soroban-spec/src/read.rs +++ b/soroban-spec/src/read.rs @@ -1,5 +1,6 @@ use std::io::Cursor; +use base64::Engine; use stellar_xdr::curr as stellar_xdr; use stellar_xdr::{Limited, Limits, ReadXdr, ScSpecEntry}; use wasmparser::{BinaryReaderError, Parser, Payload}; @@ -15,7 +16,9 @@ pub enum ParseSpecBase64Error { } pub fn parse_base64(spec: &[u8]) -> Result, ParseSpecBase64Error> { - let decoded = base64::decode(spec).map_err(ParseSpecBase64Error::ParseBase64)?; + let decoded = base64::engine::general_purpose::STANDARD + .decode(spec) + .map_err(ParseSpecBase64Error::ParseBase64)?; parse_raw(&decoded).map_err(ParseSpecBase64Error::ParseXdr) } @@ -56,7 +59,9 @@ pub fn raw_from_wasm(wasm: &[u8]) -> Result, FromWasmError> { pub fn base64_from_wasm(wasm: &[u8]) -> Result { let raw = raw_from_wasm(wasm)?; - Ok(base64::encode(raw)) + let mut res = String::new(); + base64::engine::general_purpose::STANDARD.encode_string(raw, &mut res); + Ok(res) } pub fn from_wasm(wasm: &[u8]) -> Result, FromWasmError> { diff --git a/tests/account/test_snapshots/test/test.1.json b/tests/account/test_snapshots/test/test.1.json index e3e6d1bc4..d79b4a990 100644 --- a/tests/account/test_snapshots/test/test.1.json +++ b/tests/account/test_snapshots/test/test.1.json @@ -23,7 +23,7 @@ ] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", @@ -102,7 +102,7 @@ "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", "key": { "ledger_key_nonce": { - "nonce": 1 + "nonce": "1" } }, "durability": "temporary" @@ -117,7 +117,7 @@ "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", "key": { "ledger_key_nonce": { - "nonce": 1 + "nonce": "1" } }, "durability": "temporary", diff --git a/tests/add_i128/test_snapshots/test/test_add.1.json b/tests/add_i128/test_snapshots/test/test_add.1.json index a90f00a84..5bac03af9 100644 --- a/tests/add_i128/test_snapshots/test/test_add.1.json +++ b/tests/add_i128/test_snapshots/test/test_add.1.json @@ -8,7 +8,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/tests/add_u128/test_snapshots/test/test_add.1.json b/tests/add_u128/test_snapshots/test/test_add.1.json index a90f00a84..5bac03af9 100644 --- a/tests/add_u128/test_snapshots/test/test_add.1.json +++ b/tests/add_u128/test_snapshots/test/test_add.1.json @@ -8,7 +8,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/tests/add_u64/test_snapshots/test/test_add.1.json b/tests/add_u64/test_snapshots/test/test_add.1.json index a90f00a84..5bac03af9 100644 --- a/tests/add_u64/test_snapshots/test/test_add.1.json +++ b/tests/add_u64/test_snapshots/test/test_add.1.json @@ -8,7 +8,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/tests/auth/test_snapshots/test_a/test_with_mock_all_auth.1.json b/tests/auth/test_snapshots/test_a/test_with_mock_all_auth.1.json index b4d9cb0cf..219de88ae 100644 --- a/tests/auth/test_snapshots/test_a/test_with_mock_all_auth.1.json +++ b/tests/auth/test_snapshots/test_a/test_with_mock_all_auth.1.json @@ -26,7 +26,7 @@ ] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", @@ -73,7 +73,7 @@ "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", "key": { "ledger_key_nonce": { - "nonce": 801925984706572462 + "nonce": "801925984706572462" } }, "durability": "temporary" @@ -88,7 +88,7 @@ "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", "key": { "ledger_key_nonce": { - "nonce": 801925984706572462 + "nonce": "801925984706572462" } }, "durability": "temporary", diff --git a/tests/auth/test_snapshots/test_a/test_with_mock_auth.1.json b/tests/auth/test_snapshots/test_a/test_with_mock_auth.1.json index cf9b2a898..e67a0c5df 100644 --- a/tests/auth/test_snapshots/test_a/test_with_mock_auth.1.json +++ b/tests/auth/test_snapshots/test_a/test_with_mock_auth.1.json @@ -27,7 +27,7 @@ ] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", @@ -106,7 +106,7 @@ "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", "key": { "ledger_key_nonce": { - "nonce": 1 + "nonce": "1" } }, "durability": "temporary" @@ -121,7 +121,7 @@ "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", "key": { "ledger_key_nonce": { - "nonce": 1 + "nonce": "1" } }, "durability": "temporary", diff --git a/tests/auth/test_snapshots/test_a/test_with_real_contract_auth_approve.1.json b/tests/auth/test_snapshots/test_a/test_with_real_contract_auth_approve.1.json index 2df03be4a..761954cda 100644 --- a/tests/auth/test_snapshots/test_a/test_with_real_contract_auth_approve.1.json +++ b/tests/auth/test_snapshots/test_a/test_with_real_contract_auth_approve.1.json @@ -27,7 +27,7 @@ ] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", @@ -106,7 +106,7 @@ "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", "key": { "ledger_key_nonce": { - "nonce": 123 + "nonce": "123" } }, "durability": "temporary" @@ -121,7 +121,7 @@ "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", "key": { "ledger_key_nonce": { - "nonce": 123 + "nonce": "123" } }, "durability": "temporary", diff --git a/tests/auth/test_snapshots/test_a/test_with_real_contract_auth_decline.1.json b/tests/auth/test_snapshots/test_a/test_with_real_contract_auth_decline.1.json index bb544e617..7898d22cb 100644 --- a/tests/auth/test_snapshots/test_a/test_with_real_contract_auth_decline.1.json +++ b/tests/auth/test_snapshots/test_a/test_with_real_contract_auth_decline.1.json @@ -9,7 +9,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/tests/auth/test_snapshots/test_b/test_with_mock_all_auth.1.json b/tests/auth/test_snapshots/test_b/test_with_mock_all_auth.1.json index d126247aa..63c8d6330 100644 --- a/tests/auth/test_snapshots/test_b/test_with_mock_all_auth.1.json +++ b/tests/auth/test_snapshots/test_b/test_with_mock_all_auth.1.json @@ -45,7 +45,7 @@ ] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", @@ -124,7 +124,7 @@ "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", "key": { "ledger_key_nonce": { - "nonce": 801925984706572462 + "nonce": "801925984706572462" } }, "durability": "temporary" @@ -139,7 +139,7 @@ "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", "key": { "ledger_key_nonce": { - "nonce": 801925984706572462 + "nonce": "801925984706572462" } }, "durability": "temporary", diff --git a/tests/auth/test_snapshots/test_b/test_with_mock_auth.1.json b/tests/auth/test_snapshots/test_b/test_with_mock_auth.1.json index 497c095e4..ae6632e09 100644 --- a/tests/auth/test_snapshots/test_b/test_with_mock_auth.1.json +++ b/tests/auth/test_snapshots/test_b/test_with_mock_auth.1.json @@ -46,7 +46,7 @@ ] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", @@ -157,7 +157,7 @@ "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", "key": { "ledger_key_nonce": { - "nonce": 1 + "nonce": "1" } }, "durability": "temporary" @@ -172,7 +172,7 @@ "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", "key": { "ledger_key_nonce": { - "nonce": 1 + "nonce": "1" } }, "durability": "temporary", diff --git a/tests/auth/test_snapshots/test_b/test_with_real_contract_auth_approve.1.json b/tests/auth/test_snapshots/test_b/test_with_real_contract_auth_approve.1.json index f6da660e2..a31ecb870 100644 --- a/tests/auth/test_snapshots/test_b/test_with_real_contract_auth_approve.1.json +++ b/tests/auth/test_snapshots/test_b/test_with_real_contract_auth_approve.1.json @@ -46,7 +46,7 @@ ] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", @@ -157,7 +157,7 @@ "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", "key": { "ledger_key_nonce": { - "nonce": 543 + "nonce": "543" } }, "durability": "temporary" @@ -172,7 +172,7 @@ "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", "key": { "ledger_key_nonce": { - "nonce": 543 + "nonce": "543" } }, "durability": "temporary", diff --git a/tests/auth/test_snapshots/test_b/test_with_real_contract_auth_decline.1.json b/tests/auth/test_snapshots/test_b/test_with_real_contract_auth_decline.1.json index e6e7bdee7..c429e7c34 100644 --- a/tests/auth/test_snapshots/test_b/test_with_real_contract_auth_decline.1.json +++ b/tests/auth/test_snapshots/test_b/test_with_real_contract_auth_decline.1.json @@ -10,7 +10,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/tests/bls/test_snapshots/test/test_dummy_verify.1.json b/tests/bls/test_snapshots/test/test_dummy_verify.1.json index a90f00a84..5bac03af9 100644 --- a/tests/bls/test_snapshots/test/test_dummy_verify.1.json +++ b/tests/bls/test_snapshots/test/test_dummy_verify.1.json @@ -8,7 +8,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/tests/bls/test_snapshots/test/test_g1_mul.1.json b/tests/bls/test_snapshots/test/test_g1_mul.1.json index a90f00a84..5bac03af9 100644 --- a/tests/bls/test_snapshots/test/test_g1_mul.1.json +++ b/tests/bls/test_snapshots/test/test_g1_mul.1.json @@ -8,7 +8,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/tests/bls/test_snapshots/test/test_g2_mul.1.json b/tests/bls/test_snapshots/test/test_g2_mul.1.json index a90f00a84..5bac03af9 100644 --- a/tests/bls/test_snapshots/test/test_g2_mul.1.json +++ b/tests/bls/test_snapshots/test/test_g2_mul.1.json @@ -8,7 +8,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/tests/constructor/test_snapshots/test_constructor.1.json b/tests/constructor/test_snapshots/test_constructor.1.json index 38ce7f9ac..8e16b69c2 100644 --- a/tests/constructor/test_snapshots/test_constructor.1.json +++ b/tests/constructor/test_snapshots/test_constructor.1.json @@ -13,7 +13,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", @@ -58,7 +58,7 @@ }, "durability": "persistent", "val": { - "i64": 1000 + "i64": "1000" } } }, @@ -103,7 +103,7 @@ }, "durability": "temporary", "val": { - "i64": 2000 + "i64": "2000" } } }, @@ -147,7 +147,7 @@ ] }, "val": { - "i64": 3000 + "i64": "3000" } } ] diff --git a/tests/constructor/test_snapshots/test_missing_constructor_arguments_causes_panic.1.json b/tests/constructor/test_snapshots/test_missing_constructor_arguments_causes_panic.1.json index 2d0a0a650..51dbb7685 100644 --- a/tests/constructor/test_snapshots/test_missing_constructor_arguments_causes_panic.1.json +++ b/tests/constructor/test_snapshots/test_missing_constructor_arguments_causes_panic.1.json @@ -7,7 +7,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/tests/constructor/test_snapshots/test_passing_extra_constructor_arguments_causes_panic.1.json b/tests/constructor/test_snapshots/test_passing_extra_constructor_arguments_causes_panic.1.json index 2d0a0a650..51dbb7685 100644 --- a/tests/constructor/test_snapshots/test_passing_extra_constructor_arguments_causes_panic.1.json +++ b/tests/constructor/test_snapshots/test_passing_extra_constructor_arguments_causes_panic.1.json @@ -7,7 +7,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/tests/constructor/test_snapshots/test_passing_incorrectly_typed_constructor_arguments_causes_panic.1.json b/tests/constructor/test_snapshots/test_passing_incorrectly_typed_constructor_arguments_causes_panic.1.json index 2d0a0a650..51dbb7685 100644 --- a/tests/constructor/test_snapshots/test_passing_incorrectly_typed_constructor_arguments_causes_panic.1.json +++ b/tests/constructor/test_snapshots/test_passing_incorrectly_typed_constructor_arguments_causes_panic.1.json @@ -7,7 +7,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/tests/constructor/test_snapshots/test_passing_no_constructor_arguments_causes_panic.1.json b/tests/constructor/test_snapshots/test_passing_no_constructor_arguments_causes_panic.1.json index 2d0a0a650..51dbb7685 100644 --- a/tests/constructor/test_snapshots/test_passing_no_constructor_arguments_causes_panic.1.json +++ b/tests/constructor/test_snapshots/test_passing_no_constructor_arguments_causes_panic.1.json @@ -7,7 +7,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/tests/empty/test_snapshots/test/test_hello.1.json b/tests/empty/test_snapshots/test/test_hello.1.json index a90f00a84..5bac03af9 100644 --- a/tests/empty/test_snapshots/test/test_hello.1.json +++ b/tests/empty/test_snapshots/test/test_hello.1.json @@ -8,7 +8,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/tests/empty2/test_snapshots/test/test_hello.1.json b/tests/empty2/test_snapshots/test/test_hello.1.json index 2d0a0a650..51dbb7685 100644 --- a/tests/empty2/test_snapshots/test/test_hello.1.json +++ b/tests/empty2/test_snapshots/test/test_hello.1.json @@ -7,7 +7,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/tests/errors/test_snapshots/test/hello_ok.1.json b/tests/errors/test_snapshots/test/hello_ok.1.json index 1897d709d..cf813a02f 100644 --- a/tests/errors/test_snapshots/test/hello_ok.1.json +++ b/tests/errors/test_snapshots/test/hello_ok.1.json @@ -9,7 +9,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/tests/errors/test_snapshots/test/try_hello_error.1.json b/tests/errors/test_snapshots/test/try_hello_error.1.json index 90577a38c..7d7ba3783 100644 --- a/tests/errors/test_snapshots/test/try_hello_error.1.json +++ b/tests/errors/test_snapshots/test/try_hello_error.1.json @@ -9,7 +9,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/tests/errors/test_snapshots/test/try_hello_error_panic.1.json b/tests/errors/test_snapshots/test/try_hello_error_panic.1.json index 90577a38c..7d7ba3783 100644 --- a/tests/errors/test_snapshots/test/try_hello_error_panic.1.json +++ b/tests/errors/test_snapshots/test/try_hello_error_panic.1.json @@ -9,7 +9,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/tests/errors/test_snapshots/test/try_hello_error_panic_string.1.json b/tests/errors/test_snapshots/test/try_hello_error_panic_string.1.json index 90577a38c..7d7ba3783 100644 --- a/tests/errors/test_snapshots/test/try_hello_error_panic_string.1.json +++ b/tests/errors/test_snapshots/test/try_hello_error_panic_string.1.json @@ -9,7 +9,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/tests/errors/test_snapshots/test/try_hello_error_unexpected_contract_error.1.json b/tests/errors/test_snapshots/test/try_hello_error_unexpected_contract_error.1.json index 90577a38c..7d7ba3783 100644 --- a/tests/errors/test_snapshots/test/try_hello_error_unexpected_contract_error.1.json +++ b/tests/errors/test_snapshots/test/try_hello_error_unexpected_contract_error.1.json @@ -9,7 +9,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/tests/errors/test_snapshots/test/try_hello_ok.1.json b/tests/errors/test_snapshots/test/try_hello_ok.1.json index 1897d709d..cf813a02f 100644 --- a/tests/errors/test_snapshots/test/try_hello_ok.1.json +++ b/tests/errors/test_snapshots/test/try_hello_ok.1.json @@ -9,7 +9,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/tests/events/test_snapshots/test/test_pub_event.1.json b/tests/events/test_snapshots/test/test_pub_event.1.json index d05cadca4..ab6e093ea 100644 --- a/tests/events/test_snapshots/test/test_pub_event.1.json +++ b/tests/events/test_snapshots/test/test_pub_event.1.json @@ -8,7 +8,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", @@ -76,7 +76,7 @@ { "event": { "ext": "v0", - "contract_id": "0000000000000000000000000000000000000000000000000000000000000001", + "contract_id": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", "type_": "contract", "body": { "v0": { @@ -99,7 +99,7 @@ { "event": { "ext": "v0", - "contract_id": "0000000000000000000000000000000000000000000000000000000000000001", + "contract_id": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", "type_": "contract", "body": { "v0": { diff --git a/tests/fuzz/fuzz/Cargo.lock b/tests/fuzz/fuzz/Cargo.lock index a67876cf1..2e834627a 100644 --- a/tests/fuzz/fuzz/Cargo.lock +++ b/tests/fuzz/fuzz/Cargo.lock @@ -170,15 +170,9 @@ checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" [[package]] name = "base64" -version = "0.13.1" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" - -[[package]] -name = "base64" -version = "0.21.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "base64ct" @@ -228,6 +222,17 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "cfg_eval" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45565fc9416b9896014f5732ac776f810ee53a66730c17e4020c3ec064a8f88f" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + [[package]] name = "chrono" version = "0.4.26" @@ -383,6 +388,16 @@ dependencies = [ "zeroize", ] +[[package]] +name = "deranged" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c9e6a11ca8224451684bc0d7d5a7adbf8f2fd6887261a1cfc3c0432f9d4068e" +dependencies = [ + "powerfmt", + "serde", +] + [[package]] name = "derivative" version = "2.2.0" @@ -423,6 +438,12 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" +[[package]] +name = "dyn-clone" +version = "1.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c7a8fb8a9fbf66c1f703fe16184d10ca0ee9d23be5b4436400408ba54a95005" + [[package]] name = "ecdsa" version = "0.16.9" @@ -756,6 +777,12 @@ dependencies = [ "num-traits", ] +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + [[package]] name = "num-derive" version = "0.4.1" @@ -820,6 +847,12 @@ dependencies = [ "spki", ] +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + [[package]] name = "ppv-lite86" version = "0.2.17" @@ -918,6 +951,17 @@ version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" +[[package]] +name = "schemars" +version = "0.8.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fbf2ae1b8bc8e02df939598064d22402220cd5bbcca1c76f7d6a310974d5615" +dependencies = [ + "dyn-clone", + "serde", + "serde_json", +] + [[package]] name = "sec1" version = "0.7.2" @@ -970,15 +1014,16 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.7.0" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee80b0e361bbf88fd2f6e242ccd19cfda072cb0faa6ae694ecee08199938569a" +checksum = "d6b6f7f2fcb69f747921f79f3926bd1e203fce4fef62c268dd3abfb6d86029aa" dependencies = [ - "base64 0.21.2", + "base64", "chrono", "hex", "indexmap 1.9.3", "indexmap 2.2.6", + "schemars", "serde", "serde_derive", "serde_json", @@ -988,9 +1033,9 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.7.0" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6561dc161a9224638a31d876ccdfefbc1df91d3f3a8342eddb35f055d48c7655" +checksum = "8d00caa5193a3c8362ac2b73be6b9e768aa5a4b2f721d8f4b339600c3cb51f8e" dependencies = [ "darling", "proc-macro2", @@ -1037,9 +1082,9 @@ checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" [[package]] name = "soroban-builtin-sdk-macros" -version = "22.1.3" +version = "23.0.0-rc.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf2e42bf80fcdefb3aae6ff3c7101a62cf942e95320ed5b518a1705bc11c6b2f" +checksum = "72a252f947730c56eb2655c3f69736eadc4ef37bb129877051d87353fdff29f9" dependencies = [ "itertools", "proc-macro2", @@ -1049,9 +1094,9 @@ dependencies = [ [[package]] name = "soroban-env-common" -version = "22.1.3" +version = "23.0.0-rc.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "027cd856171bfd6ad2c0ffb3b7dfe55ad7080fb3050c36ad20970f80da634472" +checksum = "8f4727a4d48b5690994d724752ebe06db5d008e88d1cf374303cdd2f16ebebee" dependencies = [ "arbitrary", "crate-git-revision", @@ -1068,9 +1113,9 @@ dependencies = [ [[package]] name = "soroban-env-guest" -version = "22.1.3" +version = "23.0.0-rc.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a07dda1ae5220d975979b19ad4fd56bc86ec7ec1b4b25bc1c5d403f934e592e" +checksum = "8d1f71190ccec807f3030b61779acd6f7f5b80262c8926f77458e7e72c353beb" dependencies = [ "soroban-env-common", "static_assertions", @@ -1078,9 +1123,9 @@ dependencies = [ [[package]] name = "soroban-env-host" -version = "22.1.3" +version = "23.0.0-rc.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66e8b03a4191d485eab03f066336112b2a50541a7553179553dc838b986b94dd" +checksum = "6a3ffa1528a878fd5c4162b92f4fbe960348dd4b4592d1251843e05cecbc6cd6" dependencies = [ "ark-bls12-381", "ark-ec", @@ -1114,9 +1159,9 @@ dependencies = [ [[package]] name = "soroban-env-macros" -version = "22.1.3" +version = "23.0.0-rc.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00eff744764ade3bc480e4909e3a581a240091f3d262acdce80b41f7069b2bd9" +checksum = "2bed72512c8bebc17340046587c208fd4791d3c79e4e0c3ee9b6b554dafbe968" dependencies = [ "itertools", "proc-macro2", @@ -1181,7 +1226,7 @@ dependencies = [ name = "soroban-spec" version = "22.0.8" dependencies = [ - "base64 0.13.1", + "base64", "stellar-xdr", "thiserror", "wasmparser", @@ -1238,25 +1283,26 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "stellar-strkey" -version = "0.0.9" +version = "0.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e3aa3ed00e70082cb43febc1c2afa5056b9bb3e348bbb43d0cd0aa88a611144" +checksum = "ee1832fb50c651ad10f734aaf5d31ca5acdfb197a6ecda64d93fcdb8885af913" dependencies = [ "crate-git-revision", "data-encoding", - "thiserror", ] [[package]] name = "stellar-xdr" -version = "22.1.0" +version = "23.0.0-rc.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ce69db907e64d1e70a3dce8d4824655d154749426a6132b25395c49136013e4" +checksum = "11e08476633f75dfda6d41769619d8b54280d6b7807ac36bf09fa9c62afb8cfd" dependencies = [ "arbitrary", - "base64 0.13.1", + "base64", + "cfg_eval", "crate-git-revision", "escape-bytes", + "ethnum", "hex", "serde", "serde_with", @@ -1335,11 +1381,14 @@ dependencies = [ [[package]] name = "time" -version = "0.3.22" +version = "0.3.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea9e1b3cf1243ae005d9e74085d4d542f3125458f3a81af210d901dcd7411efd" +checksum = "8a7619e19bc266e0f9c5e6686659d394bc57973859340060a69221e57dbc0c40" dependencies = [ + "deranged", "itoa", + "num-conv", + "powerfmt", "serde", "time-core", "time-macros", @@ -1347,16 +1396,17 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.1" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" +checksum = "c9e9a38711f559d9e3ce1cdb06dd7c5b8ea546bc90052da6d06bb76da74bb07c" [[package]] name = "time-macros" -version = "0.2.9" +version = "0.2.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "372950940a5f07bf38dbe211d7283c9e6d7327df53794992d293e534c733d09b" +checksum = "3526739392ec93fd8b359c8e98514cb3e8e021beb4e5f597b00a0221f8ed8a49" dependencies = [ + "num-conv", "time-core", ] diff --git a/tests/invoke_contract/test_snapshots/test/test_add.1.json b/tests/invoke_contract/test_snapshots/test/test_add.1.json index bb544e617..7898d22cb 100644 --- a/tests/invoke_contract/test_snapshots/test/test_add.1.json +++ b/tests/invoke_contract/test_snapshots/test/test_add.1.json @@ -9,7 +9,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/tests/logging/test_snapshots/test/test_logging.1.json b/tests/logging/test_snapshots/test/test_logging.1.json index a90f00a84..5bac03af9 100644 --- a/tests/logging/test_snapshots/test/test_logging.1.json +++ b/tests/logging/test_snapshots/test/test_logging.1.json @@ -8,7 +8,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/tests/modular/test_snapshots/test/test.1.json b/tests/modular/test_snapshots/test/test.1.json index 43a30bb2a..53eeeec34 100644 --- a/tests/modular/test_snapshots/test/test.1.json +++ b/tests/modular/test_snapshots/test/test.1.json @@ -10,7 +10,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/tests/multiimpl/test_snapshots/test/test_hello.1.json b/tests/multiimpl/test_snapshots/test/test_hello.1.json index 43a30bb2a..53eeeec34 100644 --- a/tests/multiimpl/test_snapshots/test/test_hello.1.json +++ b/tests/multiimpl/test_snapshots/test/test_hello.1.json @@ -10,7 +10,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/tests/udt/test_snapshots/test/test_add.1.json b/tests/udt/test_snapshots/test/test_add.1.json index 90577a38c..7d7ba3783 100644 --- a/tests/udt/test_snapshots/test/test_add.1.json +++ b/tests/udt/test_snapshots/test/test_add.1.json @@ -9,7 +9,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/tests/workspace_contract/test_snapshots/test/test_add.1.json b/tests/workspace_contract/test_snapshots/test/test_add.1.json index a90f00a84..5bac03af9 100644 --- a/tests/workspace_contract/test_snapshots/test/test_add.1.json +++ b/tests/workspace_contract/test_snapshots/test/test_add.1.json @@ -8,7 +8,7 @@ [] ], "ledger": { - "protocol_version": 22, + "protocol_version": 23, "sequence_number": 0, "timestamp": 0, "network_id": "0000000000000000000000000000000000000000000000000000000000000000",