diff --git a/soroban-env-common/env.json b/soroban-env-common/env.json index 602f3a5e3..1c3bb11f5 100644 --- a/soroban-env-common/env.json +++ b/soroban-env-common/env.json @@ -788,18 +788,6 @@ ], "return": "Object", "docs": "Deploys a contract from the current contract. `wasm_hash` must be a hash of the contract code that has already been installed on this network. `salt` is used to create a unique contract id." - }, - { - "export": "4", - "name": "create_token_from_contract", - "args": [ - { - "name": "salt", - "type": "Object" - } - ], - "return": "Object", - "docs": "Deploys a built-in token contract from the current contract. `salt` is used to create a unique contract id for the token." } ] }, diff --git a/soroban-env-common/src/meta.rs b/soroban-env-common/src/meta.rs index 8d833b29d..737da31de 100644 --- a/soroban-env-common/src/meta.rs +++ b/soroban-env-common/src/meta.rs @@ -58,5 +58,5 @@ pub const ENV_META_V0_SECTION_NAME: &'static str = "contractenvmetav0"; soroban_env_macros::generate_env_meta_consts!( - interface_version: 26, + interface_version: 27, ); diff --git a/soroban-env-host/src/host.rs b/soroban-env-host/src/host.rs index 83a2576d4..91940778b 100644 --- a/soroban-env-host/src/host.rs +++ b/soroban-env-host/src/host.rs @@ -1771,17 +1771,6 @@ impl VmCallerCheckedEnv for Host { self.create_contract_with_id_preimage(code, id_preimage) } - fn create_token_from_contract( - &self, - _vmcaller: &mut VmCaller, - salt: Object, - ) -> Result { - let contract_id = self.get_current_contract_id()?; - let salt = self.uint256_from_obj_input("salt", salt)?; - let id_preimage = self.id_preimage_from_contract(contract_id, salt)?; - self.create_contract_with_id_preimage(ScContractCode::Token, id_preimage) - } - // Notes on metering: here covers the args unpacking. The actual VM work is changed at lower layers. fn call( &self, diff --git a/soroban-env-host/src/native_contract/token/balance.rs b/soroban-env-host/src/native_contract/token/balance.rs index 2bf0c4825..b8bdc155e 100644 --- a/soroban-env-host/src/native_contract/token/balance.rs +++ b/soroban-env-host/src/native_contract/token/balance.rs @@ -85,12 +85,6 @@ pub fn write_state(e: &Host, id: Identifier, is_frozen: bool) -> Result<(), Host // Metering: covered by components pub fn transfer_classic_balance(e: &Host, to_key: AccountId, amount: i64) -> Result<(), HostError> { match read_metadata(e)? { - Metadata::Token(_) => { - return Err(e.err_status_msg( - ContractError::OperationNotSupportedError, - "smart tokens don't support conversions to/from classic", - )) - } Metadata::Native => transfer_account_balance(e, to_key, amount)?, Metadata::AlphaNum4(asset) => transfer_trustline_balance( e, diff --git a/soroban-env-host/src/native_contract/token/contract.rs b/soroban-env-host/src/native_contract/token/contract.rs index 8233153ad..2637abab0 100644 --- a/soroban-env-host/src/native_contract/token/contract.rs +++ b/soroban-env-host/src/native_contract/token/contract.rs @@ -11,10 +11,10 @@ use crate::native_contract::token::balance::{ use crate::native_contract::token::cryptography::check_auth; use crate::native_contract::token::event; use crate::native_contract::token::metadata::{ - has_metadata, read_decimal, read_name, read_symbol, write_metadata, + has_metadata, read_name, read_symbol, write_metadata, }; use crate::native_contract::token::nonce::read_nonce; -use crate::native_contract::token::public_types::{Identifier, Metadata, Signature, TokenMetadata}; +use crate::native_contract::token::public_types::{Identifier, Metadata, Signature}; use crate::{err, HostError}; use soroban_env_common::xdr::Asset; @@ -35,9 +35,6 @@ pub trait TokenTrait { /// (burn, freeze, unfreeze, mint, set_admin) will always fail fn init_asset(e: &Host, asset_bytes: Bytes) -> Result<(), HostError>; - /// init creates a token contract that does not wrap an asset on the classic side. - fn init(e: &Host, admin: Identifier, metadata: TokenMetadata) -> Result<(), HostError>; - fn nonce(e: &Host, id: Identifier) -> Result; fn allowance(e: &Host, from: Identifier, spender: Identifier) -> Result; @@ -190,19 +187,6 @@ impl TokenTrait for Token { Ok(()) } - fn init(e: &Host, admin: Identifier, metadata: TokenMetadata) -> Result<(), HostError> { - if has_metadata(&e)? { - return Err(e.err_status_msg( - ContractError::AlreadyInitializedError, - "token has been already initialized", - )); - } - - write_administrator(&e, admin)?; - write_metadata(&e, Metadata::Token(metadata))?; - Ok(()) - } - fn nonce(e: &Host, id: Identifier) -> Result { read_nonce(e, id) } @@ -380,8 +364,8 @@ impl TokenTrait for Token { Ok(()) } - fn decimals(e: &Host) -> Result { - read_decimal(&e) + fn decimals(_e: &Host) -> Result { + Ok(7) } fn name(e: &Host) -> Result { diff --git a/soroban-env-host/src/native_contract/token/metadata.rs b/soroban-env-host/src/native_contract/token/metadata.rs index 9caca7fe0..4ed21f7ef 100644 --- a/soroban-env-host/src/native_contract/token/metadata.rs +++ b/soroban-env-host/src/native_contract/token/metadata.rs @@ -28,7 +28,6 @@ pub fn has_metadata(e: &Host) -> Result { // Metering: *mostly* covered by components. `bytes_new_from_slice` and `Bytes` not covered. pub fn read_name(e: &Host) -> Result { match read_metadata(e)? { - Metadata::Token(token) => Ok(token.name), Metadata::Native => Ok(Bytes::try_from_val(e, e.bytes_new_from_slice(b"native")?)?), Metadata::AlphaNum4(asset) => { let mut res: Bytes = asset.asset_code.into(); @@ -56,17 +55,8 @@ pub fn read_name(e: &Host) -> Result { // Metering: *mostly* covered by components.`bytes_new_from_slice` and `Bytes` not covered. pub fn read_symbol(e: &Host) -> Result { match read_metadata(e)? { - Metadata::Token(token) => Ok(token.symbol), Metadata::Native => Ok(Bytes::try_from_val(e, e.bytes_new_from_slice(b"native")?)?), Metadata::AlphaNum4(asset) => Ok(asset.asset_code.into()), Metadata::AlphaNum12(asset) => Ok(asset.asset_code.into()), } } - -// Metering: covered by components -pub fn read_decimal(e: &Host) -> Result { - match read_metadata(e)? { - Metadata::Token(token) => Ok(token.decimals), - Metadata::Native | Metadata::AlphaNum4(_) | Metadata::AlphaNum12(_) => Ok(7), - } -} diff --git a/soroban-env-host/src/native_contract/token/public_types.rs b/soroban-env-host/src/native_contract/token/public_types.rs index 7299cbbc3..0b74f3a7b 100644 --- a/soroban-env-host/src/native_contract/token/public_types.rs +++ b/soroban-env-host/src/native_contract/token/public_types.rs @@ -83,14 +83,6 @@ pub enum SignaturePayload { V0(SignaturePayloadV0), } -#[derive(Clone)] -#[contracttype] -pub struct TokenMetadata { - pub name: Bytes, - pub symbol: Bytes, - pub decimals: u32, -} - #[derive(Clone)] #[contracttype] pub struct AlphaNum4Metadata { @@ -108,7 +100,6 @@ pub struct AlphaNum12Metadata { #[derive(Clone)] #[contracttype] pub enum Metadata { - Token(TokenMetadata), Native, AlphaNum4(AlphaNum4Metadata), AlphaNum12(AlphaNum12Metadata), diff --git a/soroban-env-host/src/native_contract/token/test_token.rs b/soroban-env-host/src/native_contract/token/test_token.rs index 55f3847c4..102a5c85b 100644 --- a/soroban-env-host/src/native_contract/token/test_token.rs +++ b/soroban-env-host/src/native_contract/token/test_token.rs @@ -1,14 +1,10 @@ use crate::{ host_vec, - native_contract::{ - testutils::{sign_args, HostVec, TestSigner}, - token::public_types::TokenMetadata, - }, - test::util::{generate_account_id, generate_bytes_array}, + native_contract::testutils::{sign_args, HostVec, TestSigner}, Host, HostError, }; use soroban_env_common::{ - xdr::{Asset, ContractId, CreateContractArgs, HostFunction, ScContractCode, Uint256}, + xdr::{Asset, ContractId, CreateContractArgs, HostFunction, ScContractCode}, CheckedEnv, RawVal, }; use soroban_env_common::{Symbol, TryFromVal, TryIntoVal}; @@ -23,23 +19,6 @@ pub(crate) struct TestToken<'a> { } impl<'a> TestToken<'a> { - pub(crate) fn new(host: &'a Host) -> Self { - host.set_source_account(generate_account_id()); - let id_obj: RawVal = host - .invoke_function(HostFunction::CreateContract(CreateContractArgs { - contract_id: ContractId::SourceAccount(Uint256(generate_bytes_array())), - source: ScContractCode::Token, - })) - .unwrap() - .try_into_val(host) - .unwrap(); - host.remove_source_account(); - Self { - id: BytesN::<32>::try_from_val(host, id_obj).unwrap(), - host, - } - } - pub(crate) fn new_from_asset(host: &'a Host, asset: Asset) -> Self { let id_obj: RawVal = host .invoke_function(HostFunction::CreateContract(CreateContractArgs { @@ -55,17 +34,6 @@ impl<'a> TestToken<'a> { } } - pub(crate) fn init(&self, admin: Identifier, metadata: TokenMetadata) -> Result<(), HostError> { - Ok(self - .host - .call( - self.id.clone().into(), - Symbol::from_str("init").into(), - host_vec![self.host, admin, metadata].into(), - )? - .try_into_val(self.host)?) - } - pub(crate) fn nonce(&self, id: Identifier) -> Result { Ok(self .host diff --git a/soroban-env-host/src/test/token.rs b/soroban-env-host/src/test/token.rs index 65702ed63..4f7a7cbe9 100644 --- a/soroban-env-host/src/test/token.rs +++ b/soroban-env-host/src/test/token.rs @@ -11,7 +11,7 @@ use crate::{ }, token::{ error::ContractError, - public_types::{Ed25519Signature, Identifier, Signature, TokenMetadata}, + public_types::{Ed25519Signature, Identifier, Signature}, test_token::TestToken, }, }, @@ -29,9 +29,9 @@ use soroban_env_common::{ }, RawVal, }; -use soroban_env_common::{CheckedEnv, EnvBase, Symbol, TryFromVal, TryIntoVal}; +use soroban_env_common::{CheckedEnv, Symbol, TryFromVal, TryIntoVal}; -use crate::native_contract::base_types::{Bytes, BytesN}; +use crate::native_contract::base_types::BytesN; struct TokenTest { host: Host, @@ -64,23 +64,41 @@ impl TokenTest { } } - fn default_smart_token_with_admin_id(&self, admin: Identifier) -> TestToken { - let token = TestToken::new(&self.host); + fn default_token_with_admin_id(&self, new_admin: Identifier) -> TestToken { + let issuer_id = signer_to_account_id(&self.host, &self.admin_key); + self.create_classic_account( + &issuer_id, + vec![(&self.admin_key, 100)], + 10_000_000, + 1, + [1, 0, 0, 0], + None, + None, + ); + + let asset_code = [0_u8; 4]; + let asset = Asset::CreditAlphanum4(AlphaNum4 { + asset_code: AssetCode4(asset_code), + issuer: issuer_id.clone(), + }); + + let token = TestToken::new_from_asset(&self.host, asset.clone()); + + let issuer = TestSigner::account(&issuer_id, vec![&self.admin_key]); + token - .init( - admin, - TokenMetadata { - name: self.convert_bytes(b"abcd"), - symbol: self.convert_bytes(b"123xyz"), - decimals: 8, - }, + .set_admin( + &issuer, + token.nonce(issuer.get_identifier(&self.host)).unwrap(), + new_admin, ) .unwrap(); + token } - fn default_smart_token(&self, admin: &TestSigner) -> TestToken { - self.default_smart_token_with_admin_id(admin.get_identifier(&self.host)) + fn default_token(&self, admin: &TestSigner) -> TestToken { + self.default_token_with_admin_id(admin.get_identifier(&self.host)) } fn get_native_balance(&self, account_id: &AccountId) -> i64 { @@ -230,10 +248,6 @@ impl TokenTest { key } - fn convert_bytes(&self, bytes: &[u8]) -> Bytes { - Bytes::try_from_val(&self.host, self.host.bytes_new_from_slice(bytes).unwrap()).unwrap() - } - fn run_from_contract( &self, contract_id_bytes: &BytesN<32>, @@ -282,105 +296,6 @@ fn to_contract_err(e: HostError) -> ContractError { num_traits::FromPrimitive::from_u32(e.status.get_code()).unwrap() } -#[test] -fn test_smart_token_init_and_balance() { - let test = TokenTest::setup(); - let token = TestToken::new(&test.host); - let admin = TestSigner::Ed25519(&test.admin_key); - let token_metadata = TokenMetadata { - name: test.convert_bytes(&[0, 0, b'a']), - symbol: test.convert_bytes(&[255, 123, 0, b'a']), - decimals: 0xffffffff, - }; - token - .init(admin.get_identifier(&test.host), token_metadata.clone()) - .unwrap(); - - // Make sure double initialization is not possible. - assert_eq!( - to_contract_err( - token - .init(admin.get_identifier(&test.host), token_metadata.clone()) - .err() - .unwrap() - ), - ContractError::AlreadyInitializedError - ); - - assert_eq!(token.name().unwrap().to_vec(), vec![0, 0, b'a']); - assert_eq!(token.symbol().unwrap().to_vec(), vec![255, 123, 0, b'a']); - assert_eq!(token.decimals().unwrap(), 0xffffffff); - - let user = TestSigner::Ed25519(&test.user_key); - - assert_eq!(token.balance(user.get_identifier(&test.host)).unwrap(), 0); - assert_eq!(token.nonce(admin.get_identifier(&test.host)).unwrap(), 0); - - token - .mint(&admin, 0, user.get_identifier(&test.host), 10_000_000) - .unwrap(); - - assert_eq!( - token.balance(user.get_identifier(&test.host)).unwrap(), - 10_000_000 - ); - assert_eq!(token.nonce(admin.get_identifier(&test.host)).unwrap(), 1); -} - -#[test] -fn test_smart_tokens_dont_support_classic_ops() { - let test = TokenTest::setup(); - let admin = TestSigner::Ed25519(&test.admin_key); - let token = test.default_smart_token(&admin); - let account_id = signer_to_account_id(&test.host, &test.user_key); - let user = TestSigner::account(&account_id, vec![&test.user_key]); - test.create_classic_account( - &account_id, - vec![(&test.user_key, 100)], - 10_000_000, - 0, - [1, 0, 0, 0], - None, - None, - ); - - token - .mint( - &admin, - token.nonce(admin.get_identifier(&test.host)).unwrap(), - user.get_identifier(&test.host), - 100_000, - ) - .unwrap(); - - assert_eq!( - to_contract_err( - token - .export( - &user, - token.nonce(user.get_identifier(&test.host)).unwrap(), - 1 - ) - .err() - .unwrap() - ), - ContractError::OperationNotSupportedError - ); - assert_eq!( - to_contract_err( - token - .import( - &user, - token.nonce(user.get_identifier(&test.host)).unwrap(), - 1 - ) - .err() - .unwrap() - ), - ContractError::OperationNotSupportedError - ); -} - #[test] fn test_native_token_smart_roundtrip() { let test = TokenTest::setup(); @@ -410,23 +325,6 @@ fn test_native_token_smart_roundtrip() { let user = TestSigner::account(&account_id, vec![&test.user_key]); - // Wrapped token can't be initialized as regular token. - assert_eq!( - to_contract_err( - token - .init( - user.get_identifier(&test.host), - TokenMetadata { - name: test.convert_bytes(b"native"), - symbol: test.convert_bytes(b"native"), - decimals: 7, - }, - ) - .err() - .unwrap() - ), - ContractError::AlreadyInitializedError - ); // Also can't set a new admin (and there is no admin in the first place). assert!(token .set_admin(&user, 0, user.get_identifier(&test.host)) @@ -562,24 +460,6 @@ fn test_classic_asset_roundtrip(asset_code: &[u8]) { let user = TestSigner::account(&account_id, vec![&test.user_key]); - // Wrapped token can't be initialized as regular token. - assert_eq!( - to_contract_err( - token - .init( - user.get_identifier(&test.host), - TokenMetadata { - name: test.convert_bytes(b"native"), - symbol: test.convert_bytes(b"native"), - decimals: 7, - }, - ) - .err() - .unwrap() - ), - ContractError::AlreadyInitializedError - ); - assert_eq!( test.get_classic_trustline_balance(&trustline_key), 10_000_000 @@ -670,7 +550,7 @@ fn test_classic_asset12_smart_roundtrip() { fn test_direct_transfer() { let test = TokenTest::setup(); let admin = TestSigner::Ed25519(&test.admin_key); - let token = test.default_smart_token(&admin); + let token = test.default_token(&admin); let user = TestSigner::Ed25519(&test.user_key); let user_2 = TestSigner::Ed25519(&test.user_key_2); @@ -745,7 +625,7 @@ fn test_direct_transfer() { fn test_transfer_with_allowance() { let test = TokenTest::setup(); let admin = TestSigner::Ed25519(&test.admin_key); - let token = test.default_smart_token(&admin); + let token = test.default_token(&admin); let user = TestSigner::Ed25519(&test.user_key); let user_2 = TestSigner::Ed25519(&test.user_key_2); @@ -894,7 +774,7 @@ fn test_transfer_with_allowance() { fn test_freeze_and_unfreeze() { let test = TokenTest::setup(); let admin = TestSigner::Ed25519(&test.admin_key); - let token = test.default_smart_token(&admin); + let token = test.default_token(&admin); let user = TestSigner::Ed25519(&test.user_key); let user_2 = TestSigner::Ed25519(&test.user_key_2); @@ -990,7 +870,7 @@ fn test_freeze_and_unfreeze() { fn test_burn() { let test = TokenTest::setup(); let admin = TestSigner::Ed25519(&test.admin_key); - let token = test.default_smart_token(&admin); + let token = test.default_token(&admin); let user = TestSigner::Ed25519(&test.user_key); token @@ -1053,7 +933,7 @@ fn test_burn() { fn test_set_admin() { let test = TokenTest::setup(); let admin = TestSigner::Ed25519(&test.admin_key); - let token = test.default_smart_token(&admin); + let token = test.default_token(&admin); let new_admin = TestSigner::Ed25519(&test.user_key); // Give admin rights to the new admin. @@ -1214,7 +1094,7 @@ fn test_account_invoker_auth() { let user_id = Identifier::Account(user_acc.clone()); let acc_invoker = TestSigner::AccountInvoker; - let token = test.default_smart_token_with_admin_id(admin_id.clone()); + let token = test.default_token_with_admin_id(admin_id.clone()); // Admin invoker can perform admin operation. test.run_from_account(admin_acc.clone(), || { @@ -1293,7 +1173,7 @@ fn test_contract_invoker_auth() { let admin_contract_id = Identifier::Contract(admin_contract_id_bytes.clone()); let user_contract_id = Identifier::Contract(user_contract_id_bytes.clone()); - let token = test.default_smart_token_with_admin_id(admin_contract_id.clone()); + let token = test.default_token_with_admin_id(admin_contract_id.clone()); test.run_from_contract(&admin_contract_id_bytes, || { token.mint(&contract_invoker, 0, user_contract_id.clone(), 1000) @@ -1365,7 +1245,7 @@ fn test_contract_invoker_auth() { fn test_auth_rejected_with_incorrect_nonce() { let test = TokenTest::setup(); let admin = TestSigner::Ed25519(&test.admin_key); - let token = test.default_smart_token(&admin); + let token = test.default_token(&admin); let user = TestSigner::Ed25519(&test.user_key); let user_2 = TestSigner::Ed25519(&test.user_key_2); @@ -1450,7 +1330,7 @@ fn test_auth_rejected_with_incorrect_nonce() { fn test_auth_rejected_with_incorrect_signer() { let test = TokenTest::setup(); let admin = TestSigner::Ed25519(&test.admin_key); - let token = test.default_smart_token(&admin); + let token = test.default_token(&admin); let user = TestSigner::Ed25519(&test.user_key); let nonce = 0; @@ -1501,7 +1381,7 @@ fn test_auth_rejected_with_incorrect_signer() { fn test_auth_rejected_for_incorrect_function_name() { let test = TokenTest::setup(); let admin = TestSigner::Ed25519(&test.admin_key); - let token = test.default_smart_token(&admin); + let token = test.default_token(&admin); let user = TestSigner::Ed25519(&test.user_key); let nonce = 0; @@ -1541,7 +1421,7 @@ fn test_auth_rejected_for_incorrect_function_name() { fn test_auth_rejected_for_incorrect_function_args() { let test = TokenTest::setup(); let admin = TestSigner::Ed25519(&test.admin_key); - let token = test.default_smart_token(&admin); + let token = test.default_token(&admin); let user = TestSigner::Ed25519(&test.user_key); let nonce = 0; @@ -1802,7 +1682,7 @@ fn test_classic_account_multisig_auth() { fn test_negative_amounts_are_not_allowed() { let test = TokenTest::setup(); let admin = TestSigner::Ed25519(&test.admin_key); - let token = test.default_smart_token(&admin); + let token = test.default_token(&admin); let user = TestSigner::Ed25519(&test.user_key); let user_2 = TestSigner::Ed25519(&test.user_key_2); diff --git a/soroban-test-wasms/wasm-workspace/Cargo.lock b/soroban-test-wasms/wasm-workspace/Cargo.lock index 9d38edfe0..e2ad0fd63 100644 --- a/soroban-test-wasms/wasm-workspace/Cargo.lock +++ b/soroban-test-wasms/wasm-workspace/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "addr2line" -version = "0.17.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ecd88a8c8378ca913a680cd98f0f13ac67383d35993f86c90a70e3f137816b" +checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" dependencies = [ "gimli", ] @@ -34,9 +34,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" -version = "0.3.66" +version = "0.3.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cab84319d616cfb654d03394f38ab7e6f0919e181b1b57e1fd15e7fb4077d9a7" +checksum = "233d376d6d185f2a3093e58f283f60f880315b6c60075b01f36b3b85154564ca" dependencies = [ "addr2line", "cc", @@ -103,9 +103,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.77" +version = "1.0.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9f73505338f7d905b19d18738976aae232eb46b8efc15554ffc56deb5d9ebe4" +checksum = "a20104e2335ce8a659d6dd92a51a767a0c062599c73b343fd152cb401e828c3d" [[package]] name = "cfg-if" @@ -434,9 +434,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.26.2" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22030e2c5a68ec659fde1e949a745124b48e6fa8b045b7ed5bd1fe4ccc5c4e5d" +checksum = "dec7af912d60cdbd3677c1af9352ebae6fb8394d165568a2234df0fa00f87793" [[package]] name = "hashbrown" @@ -568,9 +568,9 @@ checksum = "8452105ba047068f40ff7093dd1d9da90898e63dd61736462e9cdda6a90ad3c3" [[package]] name = "miniz_oxide" -version = "0.5.4" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96590ba8f175222643a85693f33d26e9c8a015f599c216509b1a6894af675d34" +checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" dependencies = [ "adler", ] @@ -630,9 +630,9 @@ dependencies = [ [[package]] name = "object" -version = "0.29.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21158b2c33aa6d4561f1c0a6ea283ca92bc54802a93b263e910746d679a7eb53" +checksum = "239da7f290cfa979f43f85a8efeee9a8a76d0827c356d37f9d3d7254d6b537fb" dependencies = [ "memchr", ] @@ -774,18 +774,18 @@ checksum = "9c8132065adcfd6e02db789d9285a0deb2f3fcb04002865ab67d5fb103533898" [[package]] name = "serde" -version = "1.0.149" +version = "1.0.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "256b9932320c590e707b94576e3cc1f7c9024d0ee6612dfbcf1cb106cbe8e055" +checksum = "e326c9ec8042f1b5da33252c8a37e9ffbd2c9bef0155215b6e6c80c790e05f91" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.149" +version = "1.0.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4eae9b04cbffdfd550eb462ed33bc6a1b68c935127d008b27444d08380f94e4" +checksum = "42a3df25b0713732468deadad63ab9da1f1fd75a48a15024b50363f128db627e" dependencies = [ "proc-macro2", "quote", @@ -916,7 +916,7 @@ dependencies = [ [[package]] name = "soroban-ledger-snapshot" version = "0.3.2" -source = "git+https://github.com/stellar/rs-soroban-sdk?rev=c8175bd#c8175bd90194c7bd670eececcd27d1a669cc8367" +source = "git+https://github.com/stellar/rs-soroban-sdk?rev=0b6e010#0b6e0104721eed8d5f13e20e9b19b1880feada0a" dependencies = [ "serde", "serde_json", @@ -937,7 +937,7 @@ dependencies = [ [[package]] name = "soroban-sdk" version = "0.3.2" -source = "git+https://github.com/stellar/rs-soroban-sdk?rev=c8175bd#c8175bd90194c7bd670eececcd27d1a669cc8367" +source = "git+https://github.com/stellar/rs-soroban-sdk?rev=0b6e010#0b6e0104721eed8d5f13e20e9b19b1880feada0a" dependencies = [ "bytes-lit", "ed25519-dalek", @@ -952,7 +952,7 @@ dependencies = [ [[package]] name = "soroban-sdk-macros" version = "0.3.2" -source = "git+https://github.com/stellar/rs-soroban-sdk?rev=c8175bd#c8175bd90194c7bd670eececcd27d1a669cc8367" +source = "git+https://github.com/stellar/rs-soroban-sdk?rev=0b6e010#0b6e0104721eed8d5f13e20e9b19b1880feada0a" dependencies = [ "darling", "itertools", @@ -968,7 +968,7 @@ dependencies = [ [[package]] name = "soroban-spec" version = "0.3.2" -source = "git+https://github.com/stellar/rs-soroban-sdk?rev=c8175bd#c8175bd90194c7bd670eececcd27d1a669cc8367" +source = "git+https://github.com/stellar/rs-soroban-sdk?rev=0b6e010#0b6e0104721eed8d5f13e20e9b19b1880feada0a" dependencies = [ "base64", "darling", diff --git a/soroban-test-wasms/wasm-workspace/Cargo.toml b/soroban-test-wasms/wasm-workspace/Cargo.toml index 73d8b3e29..74c7ddf52 100644 --- a/soroban-test-wasms/wasm-workspace/Cargo.toml +++ b/soroban-test-wasms/wasm-workspace/Cargo.toml @@ -48,7 +48,7 @@ soroban-env-host = { path = "../../soroban-env-host" } [workspace.dependencies.soroban-sdk] version = "0.3.2" git = "https://github.com/stellar/rs-soroban-sdk" -rev = "c8175bd" +rev = "0b6e010" # Uncomment the following to build against local SDK. This is useful when env # changes are breaking for SDK and require the respective SDK change diff --git a/soroban-test-wasms/wasm-workspace/opt/example_add_i32.wasm b/soroban-test-wasms/wasm-workspace/opt/example_add_i32.wasm index cc3159079..5683454d7 100644 Binary files a/soroban-test-wasms/wasm-workspace/opt/example_add_i32.wasm and b/soroban-test-wasms/wasm-workspace/opt/example_add_i32.wasm differ diff --git a/soroban-test-wasms/wasm-workspace/opt/example_complex.wasm b/soroban-test-wasms/wasm-workspace/opt/example_complex.wasm index a8a475a58..8f3c161fb 100644 Binary files a/soroban-test-wasms/wasm-workspace/opt/example_complex.wasm and b/soroban-test-wasms/wasm-workspace/opt/example_complex.wasm differ diff --git a/soroban-test-wasms/wasm-workspace/opt/example_contract_data.wasm b/soroban-test-wasms/wasm-workspace/opt/example_contract_data.wasm index 04a398989..938011a7b 100644 Binary files a/soroban-test-wasms/wasm-workspace/opt/example_contract_data.wasm and b/soroban-test-wasms/wasm-workspace/opt/example_contract_data.wasm differ diff --git a/soroban-test-wasms/wasm-workspace/opt/example_create_contract.wasm b/soroban-test-wasms/wasm-workspace/opt/example_create_contract.wasm index 40938be07..1566daef2 100644 Binary files a/soroban-test-wasms/wasm-workspace/opt/example_create_contract.wasm and b/soroban-test-wasms/wasm-workspace/opt/example_create_contract.wasm differ diff --git a/soroban-test-wasms/wasm-workspace/opt/example_fannkuch.wasm b/soroban-test-wasms/wasm-workspace/opt/example_fannkuch.wasm index 592bfaceb..e0e9488f2 100644 Binary files a/soroban-test-wasms/wasm-workspace/opt/example_fannkuch.wasm and b/soroban-test-wasms/wasm-workspace/opt/example_fannkuch.wasm differ diff --git a/soroban-test-wasms/wasm-workspace/opt/example_fib.wasm b/soroban-test-wasms/wasm-workspace/opt/example_fib.wasm index 6435dec33..100fd0b8b 100644 Binary files a/soroban-test-wasms/wasm-workspace/opt/example_fib.wasm and b/soroban-test-wasms/wasm-workspace/opt/example_fib.wasm differ diff --git a/soroban-test-wasms/wasm-workspace/opt/example_hostile.wasm b/soroban-test-wasms/wasm-workspace/opt/example_hostile.wasm index e30c88671..520599fe4 100644 Binary files a/soroban-test-wasms/wasm-workspace/opt/example_hostile.wasm and b/soroban-test-wasms/wasm-workspace/opt/example_hostile.wasm differ diff --git a/soroban-test-wasms/wasm-workspace/opt/example_invoke_contract.wasm b/soroban-test-wasms/wasm-workspace/opt/example_invoke_contract.wasm index 3d75edaf6..551f3afd7 100644 Binary files a/soroban-test-wasms/wasm-workspace/opt/example_invoke_contract.wasm and b/soroban-test-wasms/wasm-workspace/opt/example_invoke_contract.wasm differ diff --git a/soroban-test-wasms/wasm-workspace/opt/example_linear_memory.wasm b/soroban-test-wasms/wasm-workspace/opt/example_linear_memory.wasm index 40ca5a22b..6d2d11a16 100644 Binary files a/soroban-test-wasms/wasm-workspace/opt/example_linear_memory.wasm and b/soroban-test-wasms/wasm-workspace/opt/example_linear_memory.wasm differ diff --git a/soroban-test-wasms/wasm-workspace/opt/example_vec.wasm b/soroban-test-wasms/wasm-workspace/opt/example_vec.wasm index 80afc3830..57e262611 100644 Binary files a/soroban-test-wasms/wasm-workspace/opt/example_vec.wasm and b/soroban-test-wasms/wasm-workspace/opt/example_vec.wasm differ