From 8c5eba96db41659b18d69ac16bd6c80e0b1e4883 Mon Sep 17 00:00:00 2001 From: Leigh McCulloch <351529+leighmcculloch@users.noreply.github.com> Date: Wed, 22 Nov 2023 12:53:32 -0800 Subject: [PATCH] Restore previous auth state in client (#1174) ### What Restore previous auth state in client after client finishes invoke. ### Why The client is presented in such a way that it looks like invocations with a client that has been configured with certain auth will apply the auth only during invocations with it. It's unintuitive that the auths from the client apply forever after the invocation. Close #1084 Dependent on: - https://github.com/stellar/rs-soroban-env/pull/1244 --- Cargo.lock | 18 +++- Cargo.toml | 6 +- soroban-sdk-macros/src/derive_client.rs | 34 ++++-- soroban-sdk/src/env.rs | 52 ++++----- soroban-sdk/src/prng.rs | 23 ++-- soroban-sdk/src/tests/prng.rs | 70 ++++++------ soroban-sdk/src/tests/token_client.rs | 3 +- soroban-sdk/src/testutils.rs | 4 +- .../tests/auth/auth_10_one/test.1.json | 88 +++++++-------- .../tests/auth/auth_15_one_repeat/test.1.json | 90 ++++++++-------- .../test.1.json | 44 ++++---- .../auth/auth_20_deep_one_address/test.1.json | 32 +++--- .../test_auth_tree.1.json | 4 +- .../test.1.json | 66 ++++++------ .../test_auth_tree.1.json | 4 +- .../test.1.json | 66 ++++++------ .../test_auth_tree.1.json | 4 +- .../test_auth_as_tree.1.json | 62 +++++------ ...uth_not_allowed_with_separated_tree.1.json | 4 +- .../tests/budget/test_budget.1.json | 4 +- .../contract_add_i32/test_functional.1.json | 4 +- .../test_invoke_expect_error.1.json | 4 +- .../contract_assert/test_try_invoke.1.json | 4 +- .../contract_docs/fn_/test_functional.1.json | 4 +- .../test_invoke_expect_error.1.json | 4 +- .../test_invoke_expect_string.1.json | 4 +- .../contract_invoke/test_try_invoke.1.json | 4 +- .../test_functional.1.json | 4 +- .../tests/contract_snapshot/test.1.json | 4 +- .../tests/contract_snapshot/test.2.json | 5 +- .../tests/contract_store/test_storage.1.json | 22 +++- .../contract_udt_enum/test_functional.1.json | 4 +- .../test_functional.1.json | 4 +- .../test_functional.1.json | 4 +- .../test_long_names_functional.1.json | 4 +- .../test_functional.1.json | 4 +- ...ult_and_from_snapshot_same_settings.1.json | 5 +- ...ult_and_from_snapshot_same_settings.2.json | 5 +- .../test_snapshots/tests/max_ttl/max.1.json | 4 +- .../tests/prng/test_prng_fill_array.1.json | 4 +- .../tests/prng/test_prng_fill_bytes.1.json | 4 +- .../tests/prng/test_prng_fill_bytesn.1.json | 4 +- .../tests/prng/test_prng_fill_slice.1.json | 4 +- .../tests/prng/test_prng_fill_u64.1.json | 4 +- .../tests/prng/test_prng_gen_array.1.json | 4 +- .../tests/prng/test_prng_gen_bytesn.1.json | 4 +- .../tests/prng/test_prng_gen_len_bytes.1.json | 4 +- .../tests/prng/test_prng_gen_range_u64.1.json | 4 +- .../tests/prng/test_prng_gen_u64.1.json | 4 +- .../tests/prng/test_prng_seed.1.json | 4 +- .../tests/prng/test_prng_seed.2.json | 4 +- .../tests/prng/test_prng_shuffle.1.json | 5 +- .../tests/prng/test_vec_shuffle.1.json | 5 +- .../tests/storage_testutils/all.1.json | 5 +- .../token_client/test_mock_all_auth.1.json | 101 ++++++++++-------- .../tests/token_client/test_mock_auth.1.json | 96 +++++++++-------- .../test_snapshots/test/test_add.1.json | 4 +- .../test_snapshots/test/test_add.1.json | 4 +- .../test_snapshots/test/test_add.1.json | 4 +- .../alloc/test_snapshots/test/test_add.1.json | 4 +- .../test_a/test_with_mock_all_auth.1.json | 36 ++++--- .../test_a/test_with_mock_auth.1.json | 32 +++--- ...est_with_real_contract_auth_approve.1.json | 32 +++--- ...est_with_real_contract_auth_decline.1.json | 4 +- .../test_b/test_with_mock_all_auth.1.json | 70 ++++++------ .../test_b/test_with_mock_auth.1.json | 66 ++++++------ ...est_with_real_contract_auth_approve.1.json | 66 ++++++------ ...est_with_real_contract_auth_decline.1.json | 4 +- .../test_snapshots/test/test_hello.1.json | 4 +- .../test_snapshots/test/hello_ok.1.json | 5 +- .../test/try_hello_error.1.json | 5 +- .../test/try_hello_error_panic.1.json | 5 +- .../test/try_hello_error_panic_string.1.json | 5 +- .../test_snapshots/test/try_hello_ok.1.json | 5 +- .../test_snapshots/test/test_pub_event.1.json | 4 +- .../test_snapshots/test/test_add.1.json | 4 +- .../test_snapshots/test/test_logging.1.json | 4 +- .../test_snapshots/test/test_hello.1.json | 6 +- tests/udt/test_snapshots/test/test_add.1.json | 5 +- .../test_snapshots/test/test_add.1.json | 4 +- 80 files changed, 819 insertions(+), 598 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d09a4ec73..a2a516e57 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -548,6 +548,12 @@ dependencies = [ "serde", ] +[[package]] +name = "hex-literal" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" + [[package]] name = "hmac" version = "0.12.1" @@ -1127,7 +1133,7 @@ checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" [[package]] name = "soroban-builtin-sdk-macros" version = "20.0.0-rc2" -source = "git+https://github.com/stellar/rs-soroban-env?rev=8e593abadd9d3723810c644af01e1124badca244#8e593abadd9d3723810c644af01e1124badca244" +source = "git+https://github.com/stellar/rs-soroban-env?rev=c26e8a9224c004e3931ae15cc2e29a4facf3a856#c26e8a9224c004e3931ae15cc2e29a4facf3a856" dependencies = [ "itertools", "proc-macro2", @@ -1138,7 +1144,7 @@ dependencies = [ [[package]] name = "soroban-env-common" version = "20.0.0-rc2" -source = "git+https://github.com/stellar/rs-soroban-env?rev=8e593abadd9d3723810c644af01e1124badca244#8e593abadd9d3723810c644af01e1124badca244" +source = "git+https://github.com/stellar/rs-soroban-env?rev=c26e8a9224c004e3931ae15cc2e29a4facf3a856#c26e8a9224c004e3931ae15cc2e29a4facf3a856" dependencies = [ "arbitrary", "crate-git-revision", @@ -1155,7 +1161,7 @@ dependencies = [ [[package]] name = "soroban-env-guest" version = "20.0.0-rc2" -source = "git+https://github.com/stellar/rs-soroban-env?rev=8e593abadd9d3723810c644af01e1124badca244#8e593abadd9d3723810c644af01e1124badca244" +source = "git+https://github.com/stellar/rs-soroban-env?rev=c26e8a9224c004e3931ae15cc2e29a4facf3a856#c26e8a9224c004e3931ae15cc2e29a4facf3a856" dependencies = [ "soroban-env-common", "static_assertions", @@ -1164,12 +1170,14 @@ dependencies = [ [[package]] name = "soroban-env-host" version = "20.0.0-rc2" -source = "git+https://github.com/stellar/rs-soroban-env?rev=8e593abadd9d3723810c644af01e1124badca244#8e593abadd9d3723810c644af01e1124badca244" +source = "git+https://github.com/stellar/rs-soroban-env?rev=c26e8a9224c004e3931ae15cc2e29a4facf3a856#c26e8a9224c004e3931ae15cc2e29a4facf3a856" dependencies = [ "backtrace", "curve25519-dalek", "ed25519-dalek", "getrandom", + "hex-literal", + "hmac", "k256", "num-derive", "num-integer", @@ -1188,7 +1196,7 @@ dependencies = [ [[package]] name = "soroban-env-macros" version = "20.0.0-rc2" -source = "git+https://github.com/stellar/rs-soroban-env?rev=8e593abadd9d3723810c644af01e1124badca244#8e593abadd9d3723810c644af01e1124badca244" +source = "git+https://github.com/stellar/rs-soroban-env?rev=c26e8a9224c004e3931ae15cc2e29a4facf3a856#c26e8a9224c004e3931ae15cc2e29a4facf3a856" dependencies = [ "itertools", "proc-macro2", diff --git a/Cargo.toml b/Cargo.toml index 58ec53cf3..e83d030ad 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -42,17 +42,17 @@ soroban-token-sdk = { version = "20.0.0-rc2", path = "soroban-token-sdk" } [workspace.dependencies.soroban-env-common] version = "20.0.0-rc2" git = "https://github.com/stellar/rs-soroban-env" -rev = "8e593abadd9d3723810c644af01e1124badca244" +rev = "c26e8a9224c004e3931ae15cc2e29a4facf3a856" [workspace.dependencies.soroban-env-guest] version = "20.0.0-rc2" git = "https://github.com/stellar/rs-soroban-env" -rev = "8e593abadd9d3723810c644af01e1124badca244" +rev = "c26e8a9224c004e3931ae15cc2e29a4facf3a856" [workspace.dependencies.soroban-env-host] version = "20.0.0-rc2" git = "https://github.com/stellar/rs-soroban-env" -rev = "8e593abadd9d3723810c644af01e1124badca244" +rev = "c26e8a9224c004e3931ae15cc2e29a4facf3a856" [workspace.dependencies.stellar-strkey] version = "0.0.8" diff --git a/soroban-sdk-macros/src/derive_client.rs b/soroban-sdk-macros/src/derive_client.rs index 4c5cb3cc8..9dd2301d9 100644 --- a/soroban-sdk-macros/src/derive_client.rs +++ b/soroban-sdk-macros/src/derive_client.rs @@ -181,9 +181,11 @@ pub fn derive_client_impl(crate_path: &Path, name: &str, fns: &[syn_ext::Fn]) -> quote! { #(#fn_attrs)* pub fn #fn_ident(&self, #(#fn_input_types),*) -> #fn_output { - // TODO: Undo the mock and restore previous auth state after - // https://github.com/stellar/rs-soroban-env/issues/785 is - // implemented. + use core::ops::Not; + #[cfg(any(test, feature = "testutils"))] + let old_auth_manager = self.env.in_contract().not().then(|| + self.env.host().snapshot_auth_manager().unwrap() + ); #[cfg(any(test, feature = "testutils"))] { if let Some(set_auths) = self.set_auths { @@ -201,19 +203,26 @@ pub fn derive_client_impl(crate_path: &Path, name: &str, fns: &[syn_ext::Fn]) -> } } use #crate_path::{IntoVal,FromVal}; - self.env.invoke_contract( + let res = self.env.invoke_contract( &self.address, &#crate_path::Symbol::new(&self.env, &#fn_name), #crate_path::vec![&self.env, #(#fn_input_names.into_val(&self.env)),*], - ) + ); + #[cfg(any(test, feature = "testutils"))] + if let Some(old_auth_manager) = old_auth_manager { + self.env.host().set_auth_manager(old_auth_manager).unwrap(); + } + res } #(#fn_attrs)* pub fn #fn_try_ident(&self, #(#fn_input_types),*) -> #fn_try_output { #[cfg(any(test, feature = "testutils"))] - // TODO: Undo the mock and restore previous auth state after - // https://github.com/stellar/rs-soroban-env/issues/785 is - // implemented. + use core::ops::Not; + #[cfg(any(test, feature = "testutils"))] + let old_auth_manager = self.env.in_contract().not().then(|| + self.env.host().snapshot_auth_manager().unwrap() + ); #[cfg(any(test, feature = "testutils"))] { if let Some(set_auths) = self.set_auths { @@ -227,11 +236,16 @@ pub fn derive_client_impl(crate_path: &Path, name: &str, fns: &[syn_ext::Fn]) -> } } use #crate_path::{IntoVal,FromVal}; - self.env.try_invoke_contract( + let res = self.env.try_invoke_contract( &self.address, &#crate_path::Symbol::new(&self.env, &#fn_name), #crate_path::vec![&self.env, #(#fn_input_names.into_val(&self.env)),*], - ) + ); + #[cfg(any(test, feature = "testutils"))] + if let Some(old_auth_manager) = old_auth_manager { + self.env.host().set_auth_manager(old_auth_manager).unwrap(); + } + res } } }) diff --git a/soroban-sdk/src/env.rs b/soroban-sdk/src/env.rs index 7c76246c6..52325838d 100644 --- a/soroban-sdk/src/env.rs +++ b/soroban-sdk/src/env.rs @@ -465,6 +465,11 @@ use xdr::{ #[cfg(any(test, feature = "testutils"))] #[cfg_attr(feature = "docs", doc(cfg(feature = "testutils")))] impl Env { + #[doc(hidden)] + pub fn in_contract(&self) -> bool { + self.env_impl.has_frame().unwrap() + } + #[doc(hidden)] pub fn host(&self) -> &internal::Host { &self.env_impl @@ -532,13 +537,16 @@ impl Env { let auth_snapshot_in_hook = auth_snapshot.clone(); env_impl .set_top_contract_invocation_hook(Some(Rc::new(move |host, event| { - if let ContractInvocationEvent::Finish = event { - let new_auths = host - .get_authenticated_authorizations() - // If an error occurs getting the authenticated authorizations - // it means that no auth has occurred. - .unwrap_or_default(); - (*auth_snapshot_in_hook).borrow_mut().0.extend(new_auths); + match event { + ContractInvocationEvent::Start => {} + ContractInvocationEvent::Finish => { + let new_auths = host + .get_authenticated_authorizations() + // If an error occurs getting the authenticated authorizations + // it means that no auth has occurred. + .unwrap(); + (*auth_snapshot_in_hook).borrow_mut().0.push(new_auths); + } } }))) .unwrap(); @@ -600,7 +608,12 @@ impl Env { env_impl: &internal::EnvImpl, args: &[Val], ) -> Option { - let env = Env::with_impl(env_impl.clone()); + let env = Env { + env_impl: env_impl.clone(), + generators: Default::default(), + auth_snapshot: Default::default(), + snapshot: None, + }; self.0.call( crate::Symbol::try_from_val(&env, func) .unwrap_infallible() @@ -1050,8 +1063,12 @@ impl Env { /// # fn main() { } /// ``` pub fn auths(&self) -> std::vec::Vec<(Address, AuthorizedInvocation)> { - let authorizations = self.env_impl.get_authenticated_authorizations().unwrap(); - authorizations + (*self.auth_snapshot) + .borrow() + .0 + .last() + .cloned() + .unwrap_or_default() .into_iter() .map(|(sc_addr, invocation)| { ( @@ -1422,21 +1439,6 @@ impl Env { } } -#[doc(hidden)] -impl Env { - pub fn with_impl(env_impl: internal::EnvImpl) -> Env { - Env { - env_impl, - #[cfg(any(test, feature = "testutils"))] - generators: Default::default(), - #[cfg(any(test, feature = "testutils"))] - auth_snapshot: Default::default(), - #[cfg(any(test, feature = "testutils"))] - snapshot: None, - } - } -} - #[doc(hidden)] impl internal::EnvBase for Env { type Error = Infallible; diff --git a/soroban-sdk/src/prng.rs b/soroban-sdk/src/prng.rs index 69a197a2d..56a192a45 100644 --- a/soroban-sdk/src/prng.rs +++ b/soroban-sdk/src/prng.rs @@ -124,7 +124,7 @@ impl Prng { /// # env.prng().seed(Bytes::from_array(&env, &[1; 32])); /// let mut value: u64 = 0; /// env.prng().fill(&mut value); - /// assert_eq!(value, 14156542310752927490); + /// assert_eq!(value, 8478755077819529274); /// # }) /// # } /// # #[cfg(not(feature = "testutils"))] @@ -150,8 +150,9 @@ impl Prng { /// assert_eq!( /// value, /// [ - /// 2, 63, 55, 32, 58, 36, 118, 196, 37, 102, 166, 28, 197, 92, 60, 168, 117, 219, - /// 180, 204, 65, 192, 222, 183, 137, 248, 231, 191, 136, 24, 54, 56 + /// 58, 248, 248, 38, 210, 150, 170, 117, 122, 110, 9, 101, 244, 57, + /// 221, 102, 164, 48, 43, 104, 222, 229, 242, 29, 25, 148, 88, 204, + /// 130, 148, 2, 66 /// ], /// ); /// # }) @@ -190,7 +191,7 @@ impl Prng { /// # env.as_contract(&contract_id, || { /// # env.prng().seed(Bytes::from_array(&env, &[1; 32])); /// let value: u64 = env.prng().gen(); - /// assert_eq!(value, 14156542310752927490); + /// assert_eq!(value, 8478755077819529274); /// # }) /// # } /// # #[cfg(not(feature = "testutils"))] @@ -215,8 +216,9 @@ impl Prng { /// assert_eq!( /// value, /// [ - /// 2, 63, 55, 32, 58, 36, 118, 196, 37, 102, 166, 28, 197, 92, 60, 168, 117, 219, - /// 180, 204, 65, 192, 222, 183, 137, 248, 231, 191, 136, 24, 54, 56 + /// 58, 248, 248, 38, 210, 150, 170, 117, 122, 110, 9, 101, 244, 57, + /// 221, 102, 164, 48, 43, 104, 222, 229, 242, 29, 25, 148, 88, 204, + /// 130, 148, 2, 66 /// ], /// ); /// # }) @@ -263,8 +265,9 @@ impl Prng { /// assert_eq!(value, Bytes::from_slice( /// &env, /// &[ - /// 2, 63, 55, 32, 58, 36, 118, 196, 37, 102, 166, 28, 197, 92, 60, 168, 117, 219, - /// 180, 204, 65, 192, 222, 183, 137, 248, 231, 191, 136, 24, 54, 56 + /// 58, 248, 248, 38, 210, 150, 170, 117, 122, 110, 9, 101, 244, 57, + /// 221, 102, 164, 48, 43, 104, 222, 229, 242, 29, 25, 148, 88, 204, + /// 130, 148, 2, 66 /// ], /// )); /// # }) @@ -308,7 +311,7 @@ impl Prng { /// # env.prng().seed(Bytes::from_array(&env, &[1; 32])); /// // Get a value in the range of 1 to 100, inclusive. /// let value: u64 = env.prng().gen_range(1..=100); - /// assert_eq!(value, 77); + /// assert_eq!(value, 46); /// # }) /// # } /// # #[cfg(not(feature = "testutils"))] @@ -348,7 +351,7 @@ impl Prng { /// # env.prng().seed(Bytes::from_array(&env, &[1; 32])); /// // Get a value in the range of 1 to 100, inclusive. /// let value = env.prng().u64_in_range(1..=100); - /// assert_eq!(value, 77); + /// assert_eq!(value, 46); /// # }) /// # } /// # #[cfg(not(feature = "testutils"))] diff --git a/soroban-sdk/src/tests/prng.rs b/soroban-sdk/src/tests/prng.rs index 77c3729a0..046a1b435 100644 --- a/soroban-sdk/src/tests/prng.rs +++ b/soroban-sdk/src/tests/prng.rs @@ -37,7 +37,7 @@ fn test_prng_shuffle() { e.as_contract(&id, || { let v = vec![&e, 1, 2, 3]; - assert_eq!(v.to_shuffled(), vec![&e, 3, 2, 1]); + assert_eq!(v.to_shuffled(), vec![&e, 3, 1, 2]); }); e.as_contract(&id, || { @@ -54,7 +54,7 @@ fn test_vec_shuffle() { e.as_contract(&id, || { let v = vec![&e, 1, 2, 3]; let s = v.to_shuffled(); - assert_eq!(s, vec![&e, 3, 2, 1]); + assert_eq!(s, vec![&e, 3, 1, 2]); assert_eq!(v, vec![&e, 1, 2, 3]); }); @@ -74,9 +74,9 @@ fn test_prng_fill_u64() { e.as_contract(&id, || { let mut v: u64 = 0; e.prng().fill(&mut v); - assert_eq!(v, 15905370036469238889); + assert_eq!(v, 6775509081846337106); e.prng().fill(&mut v); - assert_eq!(v, 9820564573332354559); + assert_eq!(v, 2134185115815765970); }); } @@ -86,8 +86,8 @@ fn test_prng_gen_u64() { let id = e.register_contract(None, TestPrngContract); e.as_contract(&id, || { - assert_eq!(e.prng().gen::(), 15905370036469238889); - assert_eq!(e.prng().gen::(), 9820564573332354559); + assert_eq!(e.prng().gen::(), 6775509081846337106); + assert_eq!(e.prng().gen::(), 2134185115815765970); }); } @@ -97,7 +97,7 @@ fn test_prng_gen_range_u64() { let id = e.register_contract(None, TestPrngContract); e.as_contract(&id, || { - assert_eq!(e.prng().gen_range::(..), 15905370036469238889); + assert_eq!(e.prng().gen_range::(..), 6775509081846337106); assert_eq!(e.prng().gen_range::(u64::MAX..), u64::MAX); assert_eq!( e.prng().gen_range::(u64::MAX - 1..u64::MAX), @@ -134,8 +134,8 @@ fn test_prng_fill_bytes() { Bytes::from_array( &e, &[ - 105, 12, 228, 36, 199, 57, 187, 220, 255, 181, 66, 167, 114, 167, 73, 136, 126, - 229, 99, 124, 156, 9, 231, 42, 211, 148, 110, 234, 189, 179, 224, 119 + 82, 78, 226, 155, 156, 113, 7, 94, 210, 231, 31, 49, 14, 38, 158, 29, 119, 169, + 67, 74, 0, 33, 229, 5, 124, 88, 142, 155, 100, 252, 88, 124 ] ) ); @@ -145,8 +145,8 @@ fn test_prng_fill_bytes() { Bytes::from_array( &e, &[ - 12, 120, 166, 125, 4, 130, 72, 67, 232, 216, 155, 171, 240, 65, 91, 25, 149, - 135, 147, 217, 131, 98, 2, 123, 78, 144, 194, 14, 36, 113, 79, 193 + 135, 192, 91, 227, 201, 91, 94, 147, 96, 233, 24, 221, 122, 144, 212, 16, 4, + 136, 28, 41, 249, 105, 126, 159, 101, 184, 58, 122, 80, 8, 9, 250 ] ) ); @@ -164,8 +164,8 @@ fn test_prng_gen_len_bytes() { Bytes::from_array( &e, &[ - 105, 12, 228, 36, 199, 57, 187, 220, 255, 181, 66, 167, 114, 167, 73, 136, 126, - 229, 99, 124, 156, 9, 231, 42, 211, 148, 110, 234, 189, 179, 224, 119 + 82, 78, 226, 155, 156, 113, 7, 94, 210, 231, 31, 49, 14, 38, 158, 29, 119, 169, + 67, 74, 0, 33, 229, 5, 124, 88, 142, 155, 100, 252, 88, 124 ] ) ); @@ -174,8 +174,8 @@ fn test_prng_gen_len_bytes() { Bytes::from_array( &e, &[ - 12, 120, 166, 125, 4, 130, 72, 67, 232, 216, 155, 171, 240, 65, 91, 25, 149, - 135, 147, 217, 131, 98, 2, 123, 78, 144, 194, 14, 36, 113, 79, 193 + 135, 192, 91, 227, 201, 91, 94, 147, 96, 233, 24, 221, 122, 144, 212, 16, 4, + 136, 28, 41, 249, 105, 126, 159, 101, 184, 58, 122, 80, 8, 9, 250 ] ) ); @@ -195,8 +195,8 @@ fn test_prng_fill_bytesn() { BytesN::from_array( &e, &[ - 105, 12, 228, 36, 199, 57, 187, 220, 255, 181, 66, 167, 114, 167, 73, 136, 126, - 229, 99, 124, 156, 9, 231, 42, 211, 148, 110, 234, 189, 179, 224, 119 + 82, 78, 226, 155, 156, 113, 7, 94, 210, 231, 31, 49, 14, 38, 158, 29, 119, 169, + 67, 74, 0, 33, 229, 5, 124, 88, 142, 155, 100, 252, 88, 124 ] ) ); @@ -206,8 +206,8 @@ fn test_prng_fill_bytesn() { BytesN::from_array( &e, &[ - 12, 120, 166, 125, 4, 130, 72, 67, 232, 216, 155, 171, 240, 65, 91, 25, 149, - 135, 147, 217, 131, 98, 2, 123, 78, 144, 194, 14, 36, 113, 79, 193 + 135, 192, 91, 227, 201, 91, 94, 147, 96, 233, 24, 221, 122, 144, 212, 16, 4, + 136, 28, 41, 249, 105, 126, 159, 101, 184, 58, 122, 80, 8, 9, 250 ] ) ); @@ -225,8 +225,8 @@ fn test_prng_gen_bytesn() { BytesN::from_array( &e, &[ - 105, 12, 228, 36, 199, 57, 187, 220, 255, 181, 66, 167, 114, 167, 73, 136, 126, - 229, 99, 124, 156, 9, 231, 42, 211, 148, 110, 234, 189, 179, 224, 119 + 82, 78, 226, 155, 156, 113, 7, 94, 210, 231, 31, 49, 14, 38, 158, 29, 119, 169, + 67, 74, 0, 33, 229, 5, 124, 88, 142, 155, 100, 252, 88, 124 ] ) ); @@ -235,8 +235,8 @@ fn test_prng_gen_bytesn() { BytesN::from_array( &e, &[ - 12, 120, 166, 125, 4, 130, 72, 67, 232, 216, 155, 171, 240, 65, 91, 25, 149, - 135, 147, 217, 131, 98, 2, 123, 78, 144, 194, 14, 36, 113, 79, 193 + 135, 192, 91, 227, 201, 91, 94, 147, 96, 233, 24, 221, 122, 144, 212, 16, 4, + 136, 28, 41, 249, 105, 126, 159, 101, 184, 58, 122, 80, 8, 9, 250 ] ) ); @@ -255,16 +255,16 @@ fn test_prng_fill_slice() { assert_eq!( v, [ - 105, 12, 228, 36, 199, 57, 187, 220, 255, 181, 66, 167, 114, 167, 73, 136, 126, - 229, 99, 124, 156, 9, 231, 42, 211, 148, 110, 234, 189, 179, 224, 119 + 82, 78, 226, 155, 156, 113, 7, 94, 210, 231, 31, 49, 14, 38, 158, 29, 119, 169, 67, + 74, 0, 33, 229, 5, 124, 88, 142, 155, 100, 252, 88, 124 ] ); e.prng().fill(v); assert_eq!( v, [ - 12, 120, 166, 125, 4, 130, 72, 67, 232, 216, 155, 171, 240, 65, 91, 25, 149, 135, - 147, 217, 131, 98, 2, 123, 78, 144, 194, 14, 36, 113, 79, 193 + 135, 192, 91, 227, 201, 91, 94, 147, 96, 233, 24, 221, 122, 144, 212, 16, 4, 136, + 28, 41, 249, 105, 126, 159, 101, 184, 58, 122, 80, 8, 9, 250 ] ); }); @@ -281,16 +281,16 @@ fn test_prng_fill_array() { assert_eq!( v, [ - 105, 12, 228, 36, 199, 57, 187, 220, 255, 181, 66, 167, 114, 167, 73, 136, 126, - 229, 99, 124, 156, 9, 231, 42, 211, 148, 110, 234, 189, 179, 224, 119 + 82, 78, 226, 155, 156, 113, 7, 94, 210, 231, 31, 49, 14, 38, 158, 29, 119, 169, 67, + 74, 0, 33, 229, 5, 124, 88, 142, 155, 100, 252, 88, 124 ] ); e.prng().fill(&mut v); assert_eq!( v, [ - 12, 120, 166, 125, 4, 130, 72, 67, 232, 216, 155, 171, 240, 65, 91, 25, 149, 135, - 147, 217, 131, 98, 2, 123, 78, 144, 194, 14, 36, 113, 79, 193 + 135, 192, 91, 227, 201, 91, 94, 147, 96, 233, 24, 221, 122, 144, 212, 16, 4, 136, + 28, 41, 249, 105, 126, 159, 101, 184, 58, 122, 80, 8, 9, 250 ] ); }); @@ -305,15 +305,15 @@ fn test_prng_gen_array() { assert_eq!( e.prng().gen::<[u8; 32]>(), [ - 105, 12, 228, 36, 199, 57, 187, 220, 255, 181, 66, 167, 114, 167, 73, 136, 126, - 229, 99, 124, 156, 9, 231, 42, 211, 148, 110, 234, 189, 179, 224, 119 + 82, 78, 226, 155, 156, 113, 7, 94, 210, 231, 31, 49, 14, 38, 158, 29, 119, 169, 67, + 74, 0, 33, 229, 5, 124, 88, 142, 155, 100, 252, 88, 124 ] ); assert_eq!( e.prng().gen::<[u8; 32]>(), [ - 12, 120, 166, 125, 4, 130, 72, 67, 232, 216, 155, 171, 240, 65, 91, 25, 149, 135, - 147, 217, 131, 98, 2, 123, 78, 144, 194, 14, 36, 113, 79, 193 + 135, 192, 91, 227, 201, 91, 94, 147, 96, 233, 24, 221, 122, 144, 212, 16, 4, 136, + 28, 41, 249, 105, 126, 159, 101, 184, 58, 122, 80, 8, 9, 250 ] ); }); diff --git a/soroban-sdk/src/tests/token_client.rs b/soroban-sdk/src/tests/token_client.rs index 973cc59c3..bcba738e7 100644 --- a/soroban-sdk/src/tests/token_client.rs +++ b/soroban-sdk/src/tests/token_client.rs @@ -70,8 +70,9 @@ fn test_mock_all_auth() { .mock_all_auths_allowing_non_root_auth() .approve(&from, &spender, &20, &200); + let auths = env.auths(); assert_eq!( - env.auths(), + auths, std::vec![( from.clone(), AuthorizedInvocation { diff --git a/soroban-sdk/src/testutils.rs b/soroban-sdk/src/testutils.rs index 5afb3e410..389e92ef6 100644 --- a/soroban-sdk/src/testutils.rs +++ b/soroban-sdk/src/testutils.rs @@ -105,7 +105,9 @@ impl From for EventSnapshot { #[derive(Default, Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)] #[serde(rename_all = "snake_case")] -pub struct AuthSnapshot(pub std::vec::Vec<(xdr::ScAddress, xdr::SorobanAuthorizedInvocation)>); +pub struct AuthSnapshot( + pub std::vec::Vec>, +); impl AuthSnapshot { // Read in a [`AuthSnapshot`] from a reader. 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 9c1ffbe35..c8f4b08c7 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 @@ -5,50 +5,54 @@ }, "auth": [ [ - "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", - { - "function": { - "contract_fn": { - "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", - "function_name": "add", - "args": [ - { - "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" - }, - { - "i32": 10 - }, - { - "i32": 11 - } - ] - } - }, - "sub_invocations": [] - } + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "function_name": "add", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + }, + { + "i32": 10 + }, + { + "i32": 11 + } + ] + } + }, + "sub_invocations": [] + } + ] ], [ - "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", - { - "function": { - "contract_fn": { - "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", - "function_name": "add", - "args": [ - { - "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" - }, - { - "i32": 10 - }, - { - "i32": 13 - } - ] - } - }, - "sub_invocations": [] - } + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "function_name": "add", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + }, + { + "i32": 10 + }, + { + "i32": 13 + } + ] + } + }, + "sub_invocations": [] + } + ] ] ], "ledger": { 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 93e70582e..ec916da5c 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 @@ -5,50 +5,52 @@ }, "auth": [ [ - "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", - { - "function": { - "contract_fn": { - "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", - "function_name": "add", - "args": [ - { - "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" - }, - { - "i32": 10 - }, - { - "i32": 12 - } - ] - } - }, - "sub_invocations": [] - } - ], - [ - "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", - { - "function": { - "contract_fn": { - "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", - "function_name": "add", - "args": [ - { - "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" - }, - { - "i32": 10 - }, - { - "i32": 12 - } - ] - } - }, - "sub_invocations": [] - } + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "function_name": "add", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + }, + { + "i32": 10 + }, + { + "i32": 12 + } + ] + } + }, + "sub_invocations": [] + } + ], + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "function_name": "add", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + }, + { + "i32": 10 + }, + { + "i32": 12 + } + ] + } + }, + "sub_invocations": [] + } + ] ] ], "ledger": { 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 3ead4112d..b3dbe00b5 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 @@ -5,27 +5,29 @@ }, "auth": [ [ - "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", - { - "function": { - "contract_fn": { - "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", - "function_name": "add", - "args": [ - { - "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" - }, - { - "i32": 10 - }, - { - "i32": 12 - } - ] - } - }, - "sub_invocations": [] - } + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "function_name": "add", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + }, + { + "i32": 10 + }, + { + "i32": 12 + } + ] + } + }, + "sub_invocations": [] + } + ] ] ], "ledger": { 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 ed32bf7fd..571ead5d8 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 @@ -5,21 +5,23 @@ }, "auth": [ [ - "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", - { - "function": { - "contract_fn": { - "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", - "function_name": "fnb", - "args": [ - { - "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M" - } - ] - } - }, - "sub_invocations": [] - } + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "function_name": "fnb", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M" + } + ] + } + }, + "sub_invocations": [] + } + ] ] ], "ledger": { 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 ff6c3ac2c..1a73740fb 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 @@ -3,7 +3,9 @@ "address": 3, "nonce": 1 }, - "auth": [], + "auth": [ + [] + ], "ledger": { "protocol_version": 20, "sequence_number": 0, 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 80633b434..da5b3bcf5 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 @@ -5,38 +5,40 @@ }, "auth": [ [ - "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", - { - "function": { - "contract_fn": { - "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", - "function_name": "fnb", - "args": [ - { - "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M" - } - ] - } - }, - "sub_invocations": [] - } - ], - [ - "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", - { - "function": { - "contract_fn": { - "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", - "function_name": "fnb", - "args": [ - { - "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M" - } - ] - } - }, - "sub_invocations": [] - } + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "function_name": "fnb", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M" + } + ] + } + }, + "sub_invocations": [] + } + ], + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "function_name": "fnb", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M" + } + ] + } + }, + "sub_invocations": [] + } + ] ] ], "ledger": { 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 ff6c3ac2c..1a73740fb 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 @@ -3,7 +3,9 @@ "address": 3, "nonce": 1 }, - "auth": [], + "auth": [ + [] + ], "ledger": { "protocol_version": 20, "sequence_number": 0, 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 80633b434..da5b3bcf5 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 @@ -5,38 +5,40 @@ }, "auth": [ [ - "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", - { - "function": { - "contract_fn": { - "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", - "function_name": "fnb", - "args": [ - { - "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M" - } - ] - } - }, - "sub_invocations": [] - } - ], - [ - "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", - { - "function": { - "contract_fn": { - "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", - "function_name": "fnb", - "args": [ - { - "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M" - } - ] - } - }, - "sub_invocations": [] - } + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "function_name": "fnb", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M" + } + ] + } + }, + "sub_invocations": [] + } + ], + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "function_name": "fnb", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M" + } + ] + } + }, + "sub_invocations": [] + } + ] ] ], "ledger": { 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 ff6c3ac2c..1a73740fb 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 @@ -3,7 +3,9 @@ "address": 3, "nonce": 1 }, - "auth": [], + "auth": [ + [] + ], "ledger": { "protocol_version": 20, "sequence_number": 0, 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 ccd2a54ed..13b955457 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 @@ -5,36 +5,38 @@ }, "auth": [ [ - "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", - { - "function": { - "contract_fn": { - "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", - "function_name": "fna", - "args": [ - { - "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M" - } - ] - } - }, - "sub_invocations": [ - { - "function": { - "contract_fn": { - "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", - "function_name": "fnb", - "args": [ - { - "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M" - } - ] - } - }, - "sub_invocations": [] - } - ] - } + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "function_name": "fna", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M" + } + ] + } + }, + "sub_invocations": [ + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "function_name": "fnb", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M" + } + ] + } + }, + "sub_invocations": [] + } + ] + } + ] ] ], "ledger": { 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 e8f5ffec2..d502bc0a4 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 @@ -3,7 +3,9 @@ "address": 3, "nonce": 2 }, - "auth": [], + "auth": [ + [] + ], "ledger": { "protocol_version": 20, "sequence_number": 0, diff --git a/soroban-sdk/test_snapshots/tests/budget/test_budget.1.json b/soroban-sdk/test_snapshots/tests/budget/test_budget.1.json index c0d7703fd..e10dce845 100644 --- a/soroban-sdk/test_snapshots/tests/budget/test_budget.1.json +++ b/soroban-sdk/test_snapshots/tests/budget/test_budget.1.json @@ -3,7 +3,9 @@ "address": 1, "nonce": 0 }, - "auth": [], + "auth": [ + [] + ], "ledger": { "protocol_version": 20, "sequence_number": 0, 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 c7e37c15e..30de649cd 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 @@ -3,7 +3,9 @@ "address": 1, "nonce": 0 }, - "auth": [], + "auth": [ + [] + ], "ledger": { "protocol_version": 20, "sequence_number": 0, 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 4fbdcbd68..3ca020823 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 @@ -3,7 +3,9 @@ "address": 1, "nonce": 0 }, - "auth": [], + "auth": [ + [] + ], "ledger": { "protocol_version": 20, "sequence_number": 0, 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 ef07d7b02..a2e3ebb91 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 @@ -3,7 +3,9 @@ "address": 1, "nonce": 0 }, - "auth": [], + "auth": [ + [] + ], "ledger": { "protocol_version": 20, "sequence_number": 0, 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 be90de30a..9bf7ae611 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 @@ -3,7 +3,9 @@ "address": 1, "nonce": 0 }, - "auth": [], + "auth": [ + [] + ], "ledger": { "protocol_version": 20, "sequence_number": 0, 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 fab6ecd8d..2497dfefe 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 @@ -3,7 +3,9 @@ "address": 1, "nonce": 0 }, - "auth": [], + "auth": [ + [] + ], "ledger": { "protocol_version": 20, "sequence_number": 0, 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 fab6ecd8d..2497dfefe 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 @@ -3,7 +3,9 @@ "address": 1, "nonce": 0 }, - "auth": [], + "auth": [ + [] + ], "ledger": { "protocol_version": 20, "sequence_number": 0, 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 05f101b57..5b4956e2c 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 @@ -3,7 +3,9 @@ "address": 1, "nonce": 0 }, - "auth": [], + "auth": [ + [] + ], "ledger": { "protocol_version": 20, "sequence_number": 0, 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 38345df30..294d137bf 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 @@ -3,7 +3,9 @@ "address": 1, "nonce": 0 }, - "auth": [], + "auth": [ + [] + ], "ledger": { "protocol_version": 20, "sequence_number": 0, 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 ead3b2d9d..a3ae59875 100644 --- a/soroban-sdk/test_snapshots/tests/contract_snapshot/test.1.json +++ b/soroban-sdk/test_snapshots/tests/contract_snapshot/test.1.json @@ -3,7 +3,9 @@ "address": 0, "nonce": 0 }, - "auth": [], + "auth": [ + [] + ], "ledger": { "protocol_version": 20, "sequence_number": 0, 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 7b36666be..8da367650 100644 --- a/soroban-sdk/test_snapshots/tests/contract_snapshot/test.2.json +++ b/soroban-sdk/test_snapshots/tests/contract_snapshot/test.2.json @@ -3,7 +3,10 @@ "address": 1, "nonce": 0 }, - "auth": [], + "auth": [ + [], + [] + ], "ledger": { "protocol_version": 20, "sequence_number": 0, 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 af09c69d8..a35831008 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 @@ -3,7 +3,27 @@ "address": 1, "nonce": 0 }, - "auth": [], + "auth": [ + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [], + [] + ], "ledger": { "protocol_version": 20, "sequence_number": 0, 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 8a71dee0c..24df8eeb2 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 @@ -3,7 +3,9 @@ "address": 1, "nonce": 0 }, - "auth": [], + "auth": [ + [] + ], "ledger": { "protocol_version": 20, "sequence_number": 0, 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 e31f30834..a55f01792 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 @@ -3,7 +3,9 @@ "address": 1, "nonce": 0 }, - "auth": [], + "auth": [ + [] + ], "ledger": { "protocol_version": 20, "sequence_number": 0, 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 18b9d0e36..fcfb53a04 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 @@ -3,7 +3,9 @@ "address": 1, "nonce": 0 }, - "auth": [], + "auth": [ + [] + ], "ledger": { "protocol_version": 20, "sequence_number": 0, 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 5f4385447..842f2b3e7 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 @@ -3,7 +3,9 @@ "address": 1, "nonce": 0 }, - "auth": [], + "auth": [ + [] + ], "ledger": { "protocol_version": 20, "sequence_number": 0, 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 aa72208ee..8aa65fe96 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 @@ -3,7 +3,9 @@ "address": 1, "nonce": 0 }, - "auth": [], + "auth": [ + [] + ], "ledger": { "protocol_version": 20, "sequence_number": 0, 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 6055bc41f..ea67200b6 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 @@ -3,7 +3,10 @@ "address": 2, "nonce": 0 }, - "auth": [], + "auth": [ + [], + [] + ], "ledger": { "protocol_version": 20, "sequence_number": 0, 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 6055bc41f..ea67200b6 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 @@ -3,7 +3,10 @@ "address": 2, "nonce": 0 }, - "auth": [], + "auth": [ + [], + [] + ], "ledger": { "protocol_version": 20, "sequence_number": 0, 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 ec48a14c7..631a8b7b0 100644 --- a/soroban-sdk/test_snapshots/tests/max_ttl/max.1.json +++ b/soroban-sdk/test_snapshots/tests/max_ttl/max.1.json @@ -3,7 +3,9 @@ "address": 1, "nonce": 0 }, - "auth": [], + "auth": [ + [] + ], "ledger": { "protocol_version": 20, "sequence_number": 1, 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 7b5c7891f..73cf5d4e5 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 @@ -3,7 +3,9 @@ "address": 1, "nonce": 0 }, - "auth": [], + "auth": [ + [] + ], "ledger": { "protocol_version": 20, "sequence_number": 0, 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 7b5c7891f..73cf5d4e5 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 @@ -3,7 +3,9 @@ "address": 1, "nonce": 0 }, - "auth": [], + "auth": [ + [] + ], "ledger": { "protocol_version": 20, "sequence_number": 0, 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 7b5c7891f..73cf5d4e5 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 @@ -3,7 +3,9 @@ "address": 1, "nonce": 0 }, - "auth": [], + "auth": [ + [] + ], "ledger": { "protocol_version": 20, "sequence_number": 0, 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 7b5c7891f..73cf5d4e5 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 @@ -3,7 +3,9 @@ "address": 1, "nonce": 0 }, - "auth": [], + "auth": [ + [] + ], "ledger": { "protocol_version": 20, "sequence_number": 0, 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 7b5c7891f..73cf5d4e5 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 @@ -3,7 +3,9 @@ "address": 1, "nonce": 0 }, - "auth": [], + "auth": [ + [] + ], "ledger": { "protocol_version": 20, "sequence_number": 0, 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 7b5c7891f..73cf5d4e5 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 @@ -3,7 +3,9 @@ "address": 1, "nonce": 0 }, - "auth": [], + "auth": [ + [] + ], "ledger": { "protocol_version": 20, "sequence_number": 0, 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 7b5c7891f..73cf5d4e5 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 @@ -3,7 +3,9 @@ "address": 1, "nonce": 0 }, - "auth": [], + "auth": [ + [] + ], "ledger": { "protocol_version": 20, "sequence_number": 0, 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 7b5c7891f..73cf5d4e5 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 @@ -3,7 +3,9 @@ "address": 1, "nonce": 0 }, - "auth": [], + "auth": [ + [] + ], "ledger": { "protocol_version": 20, "sequence_number": 0, 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 7b5c7891f..73cf5d4e5 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 @@ -3,7 +3,9 @@ "address": 1, "nonce": 0 }, - "auth": [], + "auth": [ + [] + ], "ledger": { "protocol_version": 20, "sequence_number": 0, 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 7b5c7891f..73cf5d4e5 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 @@ -3,7 +3,9 @@ "address": 1, "nonce": 0 }, - "auth": [], + "auth": [ + [] + ], "ledger": { "protocol_version": 20, "sequence_number": 0, 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 7b5c7891f..73cf5d4e5 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 @@ -3,7 +3,9 @@ "address": 1, "nonce": 0 }, - "auth": [], + "auth": [ + [] + ], "ledger": { "protocol_version": 20, "sequence_number": 0, 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 7b5c7891f..73cf5d4e5 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 @@ -3,7 +3,9 @@ "address": 1, "nonce": 0 }, - "auth": [], + "auth": [ + [] + ], "ledger": { "protocol_version": 20, "sequence_number": 0, 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 7b5c7891f..258191ee1 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 @@ -3,7 +3,10 @@ "address": 1, "nonce": 0 }, - "auth": [], + "auth": [ + [], + [] + ], "ledger": { "protocol_version": 20, "sequence_number": 0, 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 7b5c7891f..258191ee1 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 @@ -3,7 +3,10 @@ "address": 1, "nonce": 0 }, - "auth": [], + "auth": [ + [], + [] + ], "ledger": { "protocol_version": 20, "sequence_number": 0, 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 606cc10e3..b1e44f898 100644 --- a/soroban-sdk/test_snapshots/tests/storage_testutils/all.1.json +++ b/soroban-sdk/test_snapshots/tests/storage_testutils/all.1.json @@ -3,7 +3,10 @@ "address": 1, "nonce": 0 }, - "auth": [], + "auth": [ + [], + [] + ], "ledger": { "protocol_version": 20, "sequence_number": 0, 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 880f20568..00cb1b8be 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 @@ -5,51 +5,60 @@ }, "auth": [ [ - "GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEGWF", - { - "function": { - "contract_fn": { - "contract_address": "CBEPDNVYXQGWB5YUBXKJWYJA7OXTZW5LFLNO5JRRGE6Z6C5OSUZPCCEL", - "function_name": "set_admin", - "args": [ - { - "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM" - } - ] - } - }, - "sub_invocations": [] - } + [ + "GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEGWF", + { + "function": { + "contract_fn": { + "contract_address": "CBEPDNVYXQGWB5YUBXKJWYJA7OXTZW5LFLNO5JRRGE6Z6C5OSUZPCCEL", + "function_name": "set_admin", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM" + } + ] + } + }, + "sub_invocations": [] + } + ] ], + [], + [], + [], + [], [ - "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4", - { - "function": { - "contract_fn": { - "contract_address": "CBEPDNVYXQGWB5YUBXKJWYJA7OXTZW5LFLNO5JRRGE6Z6C5OSUZPCCEL", - "function_name": "approve", - "args": [ - { - "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4" - }, - { - "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAK3IM" - }, - { - "i128": { - "hi": 0, - "lo": 20 + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4", + { + "function": { + "contract_fn": { + "contract_address": "CBEPDNVYXQGWB5YUBXKJWYJA7OXTZW5LFLNO5JRRGE6Z6C5OSUZPCCEL", + "function_name": "approve", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4" + }, + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAK3IM" + }, + { + "i128": { + "hi": 0, + "lo": 20 + } + }, + { + "u32": 200 } - }, - { - "u32": 200 - } - ] - } - }, - "sub_invocations": [] - } - ] + ] + } + }, + "sub_invocations": [] + } + ] + ], + [] ], "ledger": { "protocol_version": 20, @@ -95,7 +104,7 @@ "contract": "GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEGWF", "key": { "ledger_key_nonce": { - "nonce": 5827323990544907992 + "nonce": 801925984706572462 } }, "durability": "temporary" @@ -110,7 +119,7 @@ "contract": "GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEGWF", "key": { "ledger_key_nonce": { - "nonce": 5827323990544907992 + "nonce": 801925984706572462 } }, "durability": "temporary", @@ -199,7 +208,7 @@ "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4", "key": { "ledger_key_nonce": { - "nonce": 1851768990755774890 + "nonce": 5541220902715666415 } }, "durability": "temporary" @@ -214,7 +223,7 @@ "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4", "key": { "ledger_key_nonce": { - "nonce": 1851768990755774890 + "nonce": 5541220902715666415 } }, "durability": "temporary", 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 9c7cb8365..0670949fe 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 @@ -5,51 +5,59 @@ }, "auth": [ [ - "GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEGWF", - { - "function": { - "contract_fn": { - "contract_address": "CBEPDNVYXQGWB5YUBXKJWYJA7OXTZW5LFLNO5JRRGE6Z6C5OSUZPCCEL", - "function_name": "set_admin", - "args": [ - { - "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM" - } - ] - } - }, - "sub_invocations": [] - } + [ + "GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEGWF", + { + "function": { + "contract_fn": { + "contract_address": "CBEPDNVYXQGWB5YUBXKJWYJA7OXTZW5LFLNO5JRRGE6Z6C5OSUZPCCEL", + "function_name": "set_admin", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM" + } + ] + } + }, + "sub_invocations": [] + } + ] ], + [], + [], + [], [ - "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4", - { - "function": { - "contract_fn": { - "contract_address": "CBEPDNVYXQGWB5YUBXKJWYJA7OXTZW5LFLNO5JRRGE6Z6C5OSUZPCCEL", - "function_name": "approve", - "args": [ - { - "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4" - }, - { - "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAK3IM" - }, - { - "i128": { - "hi": 0, - "lo": 20 + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4", + { + "function": { + "contract_fn": { + "contract_address": "CBEPDNVYXQGWB5YUBXKJWYJA7OXTZW5LFLNO5JRRGE6Z6C5OSUZPCCEL", + "function_name": "approve", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4" + }, + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAK3IM" + }, + { + "i128": { + "hi": 0, + "lo": 20 + } + }, + { + "u32": 200 } - }, - { - "u32": 200 - } - ] - } - }, - "sub_invocations": [] - } - ] + ] + } + }, + "sub_invocations": [] + } + ] + ], + [] ], "ledger": { "protocol_version": 20, @@ -95,7 +103,7 @@ "contract": "GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEGWF", "key": { "ledger_key_nonce": { - "nonce": 5827323990544907992 + "nonce": 801925984706572462 } }, "durability": "temporary" @@ -110,7 +118,7 @@ "contract": "GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEGWF", "key": { "ledger_key_nonce": { - "nonce": 5827323990544907992 + "nonce": 801925984706572462 } }, "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 02546fa85..824dd4920 100644 --- a/tests/add_i128/test_snapshots/test/test_add.1.json +++ b/tests/add_i128/test_snapshots/test/test_add.1.json @@ -3,7 +3,9 @@ "address": 1, "nonce": 0 }, - "auth": [], + "auth": [ + [] + ], "ledger": { "protocol_version": 20, "sequence_number": 0, 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 8affd5ff9..acb77970b 100644 --- a/tests/add_u128/test_snapshots/test/test_add.1.json +++ b/tests/add_u128/test_snapshots/test/test_add.1.json @@ -3,7 +3,9 @@ "address": 1, "nonce": 0 }, - "auth": [], + "auth": [ + [] + ], "ledger": { "protocol_version": 20, "sequence_number": 0, 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 97eb4dfaa..8675ba1da 100644 --- a/tests/add_u64/test_snapshots/test/test_add.1.json +++ b/tests/add_u64/test_snapshots/test/test_add.1.json @@ -3,7 +3,9 @@ "address": 1, "nonce": 0 }, - "auth": [], + "auth": [ + [] + ], "ledger": { "protocol_version": 20, "sequence_number": 0, diff --git a/tests/alloc/test_snapshots/test/test_add.1.json b/tests/alloc/test_snapshots/test/test_add.1.json index 0346ea4f7..b786bbf01 100644 --- a/tests/alloc/test_snapshots/test/test_add.1.json +++ b/tests/alloc/test_snapshots/test/test_add.1.json @@ -3,7 +3,9 @@ "address": 1, "nonce": 0 }, - "auth": [], + "auth": [ + [] + ], "ledger": { "protocol_version": 20, "sequence_number": 0, 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 e7e6850e4..9a37ed333 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 @@ -5,21 +5,23 @@ }, "auth": [ [ - "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", - { - "function": { - "contract_fn": { - "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", - "function_name": "fn1", - "args": [ - { - "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" - } - ] - } - }, - "sub_invocations": [] - } + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "function_name": "fn1", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + ] + } + }, + "sub_invocations": [] + } + ] ] ], "ledger": { @@ -70,7 +72,7 @@ "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", "key": { "ledger_key_nonce": { - "nonce": 5827323990544907992 + "nonce": 801925984706572462 } }, "durability": "temporary" @@ -85,7 +87,7 @@ "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", "key": { "ledger_key_nonce": { - "nonce": 5827323990544907992 + "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 b8b591c69..8eda85ce7 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 @@ -5,21 +5,23 @@ }, "auth": [ [ - "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", - { - "function": { - "contract_fn": { - "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", - "function_name": "fn1", - "args": [ - { - "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" - } - ] - } - }, - "sub_invocations": [] - } + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "function_name": "fn1", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + ] + } + }, + "sub_invocations": [] + } + ] ] ], "ledger": { 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 6527f2c7b..6fe6d704b 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 @@ -5,21 +5,23 @@ }, "auth": [ [ - "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", - { - "function": { - "contract_fn": { - "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", - "function_name": "fn1", - "args": [ - { - "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" - } - ] - } - }, - "sub_invocations": [] - } + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "function_name": "fn1", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + ] + } + }, + "sub_invocations": [] + } + ] ] ], "ledger": { 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 2cc940901..e468ebc21 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 @@ -3,7 +3,9 @@ "address": 2, "nonce": 0 }, - "auth": [], + "auth": [ + [] + ], "ledger": { "protocol_version": 20, "sequence_number": 0, 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 fa9150af3..c85ac1004 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 @@ -5,39 +5,41 @@ }, "auth": [ [ - "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", - { - "function": { - "contract_fn": { - "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", - "function_name": "fn2", - "args": [ - { - "i32": 1 + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "function_name": "fn2", + "args": [ + { + "i32": 1 + }, + { + "i32": 2 + } + ] + } + }, + "sub_invocations": [ + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "function_name": "fn1", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M" + } + ] + } }, - { - "i32": 2 - } - ] - } - }, - "sub_invocations": [ - { - "function": { - "contract_fn": { - "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", - "function_name": "fn1", - "args": [ - { - "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M" - } - ] - } - }, - "sub_invocations": [] - } - ] - } + "sub_invocations": [] + } + ] + } + ] ] ], "ledger": { @@ -120,7 +122,7 @@ "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", "key": { "ledger_key_nonce": { - "nonce": 5827323990544907992 + "nonce": 801925984706572462 } }, "durability": "temporary" @@ -135,7 +137,7 @@ "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", "key": { "ledger_key_nonce": { - "nonce": 5827323990544907992 + "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 fd7105c9f..5ba6fff5e 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 @@ -5,39 +5,41 @@ }, "auth": [ [ - "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", - { - "function": { - "contract_fn": { - "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", - "function_name": "fn2", - "args": [ - { - "i32": 1 + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "function_name": "fn2", + "args": [ + { + "i32": 1 + }, + { + "i32": 2 + } + ] + } + }, + "sub_invocations": [ + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "function_name": "fn1", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M" + } + ] + } }, - { - "i32": 2 - } - ] - } - }, - "sub_invocations": [ - { - "function": { - "contract_fn": { - "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", - "function_name": "fn1", - "args": [ - { - "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M" - } - ] - } - }, - "sub_invocations": [] - } - ] - } + "sub_invocations": [] + } + ] + } + ] ] ], "ledger": { 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 5ae49f00d..8847d50e2 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 @@ -5,39 +5,41 @@ }, "auth": [ [ - "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", - { - "function": { - "contract_fn": { - "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", - "function_name": "fn2", - "args": [ - { - "i32": 1 + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "function_name": "fn2", + "args": [ + { + "i32": 1 + }, + { + "i32": 2 + } + ] + } + }, + "sub_invocations": [ + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "function_name": "fn1", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M" + } + ] + } }, - { - "i32": 2 - } - ] - } - }, - "sub_invocations": [ - { - "function": { - "contract_fn": { - "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", - "function_name": "fn1", - "args": [ - { - "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M" - } - ] - } - }, - "sub_invocations": [] - } - ] - } + "sub_invocations": [] + } + ] + } + ] ] ], "ledger": { 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 e10586eb6..693e41f16 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 @@ -3,7 +3,9 @@ "address": 3, "nonce": 0 }, - "auth": [], + "auth": [ + [] + ], "ledger": { "protocol_version": 20, "sequence_number": 0, diff --git a/tests/empty/test_snapshots/test/test_hello.1.json b/tests/empty/test_snapshots/test/test_hello.1.json index 1f5f9f0ca..f58219c2c 100644 --- a/tests/empty/test_snapshots/test/test_hello.1.json +++ b/tests/empty/test_snapshots/test/test_hello.1.json @@ -3,7 +3,9 @@ "address": 1, "nonce": 0 }, - "auth": [], + "auth": [ + [] + ], "ledger": { "protocol_version": 20, "sequence_number": 0, diff --git a/tests/errors/test_snapshots/test/hello_ok.1.json b/tests/errors/test_snapshots/test/hello_ok.1.json index 101e6f87c..37e4598d4 100644 --- a/tests/errors/test_snapshots/test/hello_ok.1.json +++ b/tests/errors/test_snapshots/test/hello_ok.1.json @@ -3,7 +3,10 @@ "address": 1, "nonce": 0 }, - "auth": [], + "auth": [ + [], + [] + ], "ledger": { "protocol_version": 20, "sequence_number": 0, 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 4a592db70..dfdb8e569 100644 --- a/tests/errors/test_snapshots/test/try_hello_error.1.json +++ b/tests/errors/test_snapshots/test/try_hello_error.1.json @@ -3,7 +3,10 @@ "address": 1, "nonce": 0 }, - "auth": [], + "auth": [ + [], + [] + ], "ledger": { "protocol_version": 20, "sequence_number": 0, 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 911a91f44..bf44067b5 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 @@ -3,7 +3,10 @@ "address": 1, "nonce": 0 }, - "auth": [], + "auth": [ + [], + [] + ], "ledger": { "protocol_version": 20, "sequence_number": 0, 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 fa6b963e8..47a83f6df 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 @@ -3,7 +3,10 @@ "address": 1, "nonce": 0 }, - "auth": [], + "auth": [ + [], + [] + ], "ledger": { "protocol_version": 20, "sequence_number": 0, 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 101e6f87c..37e4598d4 100644 --- a/tests/errors/test_snapshots/test/try_hello_ok.1.json +++ b/tests/errors/test_snapshots/test/try_hello_ok.1.json @@ -3,7 +3,10 @@ "address": 1, "nonce": 0 }, - "auth": [], + "auth": [ + [], + [] + ], "ledger": { "protocol_version": 20, "sequence_number": 0, 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 9f9ed853f..d242ae411 100644 --- a/tests/events/test_snapshots/test/test_pub_event.1.json +++ b/tests/events/test_snapshots/test/test_pub_event.1.json @@ -3,7 +3,9 @@ "address": 1, "nonce": 0 }, - "auth": [], + "auth": [ + [] + ], "ledger": { "protocol_version": 20, "sequence_number": 0, 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 932c73b1a..52ec91f8f 100644 --- a/tests/invoke_contract/test_snapshots/test/test_add.1.json +++ b/tests/invoke_contract/test_snapshots/test/test_add.1.json @@ -3,7 +3,9 @@ "address": 2, "nonce": 0 }, - "auth": [], + "auth": [ + [] + ], "ledger": { "protocol_version": 20, "sequence_number": 0, diff --git a/tests/logging/test_snapshots/test/test_logging.1.json b/tests/logging/test_snapshots/test/test_logging.1.json index 2da03852a..e09d61f60 100644 --- a/tests/logging/test_snapshots/test/test_logging.1.json +++ b/tests/logging/test_snapshots/test/test_logging.1.json @@ -3,7 +3,9 @@ "address": 1, "nonce": 0 }, - "auth": [], + "auth": [ + [] + ], "ledger": { "protocol_version": 20, "sequence_number": 0, diff --git a/tests/multiimpl/test_snapshots/test/test_hello.1.json b/tests/multiimpl/test_snapshots/test/test_hello.1.json index f9f4b3468..e57856e68 100644 --- a/tests/multiimpl/test_snapshots/test/test_hello.1.json +++ b/tests/multiimpl/test_snapshots/test/test_hello.1.json @@ -3,7 +3,11 @@ "address": 1, "nonce": 0 }, - "auth": [], + "auth": [ + [], + [], + [] + ], "ledger": { "protocol_version": 20, "sequence_number": 0, diff --git a/tests/udt/test_snapshots/test/test_add.1.json b/tests/udt/test_snapshots/test/test_add.1.json index d9131a029..37c8356d9 100644 --- a/tests/udt/test_snapshots/test/test_add.1.json +++ b/tests/udt/test_snapshots/test/test_add.1.json @@ -3,7 +3,10 @@ "address": 1, "nonce": 0 }, - "auth": [], + "auth": [ + [], + [] + ], "ledger": { "protocol_version": 20, "sequence_number": 0, 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 fc3f74c14..4a90aada9 100644 --- a/tests/workspace_contract/test_snapshots/test/test_add.1.json +++ b/tests/workspace_contract/test_snapshots/test/test_add.1.json @@ -3,7 +3,9 @@ "address": 1, "nonce": 0 }, - "auth": [], + "auth": [ + [] + ], "ledger": { "protocol_version": 20, "sequence_number": 0,