From f4429c4ff33b333d6ed774adae73ad4d41d2142a Mon Sep 17 00:00:00 2001 From: Alexey Pashinov Date: Tue, 17 Dec 2024 17:23:28 +0100 Subject: [PATCH] Fix derive wallet address for jetton mintless tokens --- nekoton-abi/Cargo.toml | 2 +- nekoton-contracts/src/jetton/mod.rs | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/nekoton-abi/Cargo.toml b/nekoton-abi/Cargo.toml index 70208fab6..92d512c56 100644 --- a/nekoton-abi/Cargo.toml +++ b/nekoton-abi/Cargo.toml @@ -29,7 +29,7 @@ ton_abi = { git = "https://github.com/broxus/ton-labs-abi" } ton_block = { git = "https://github.com/broxus/ton-labs-block.git" } ton_executor = { git = "https://github.com/broxus/ton-labs-executor.git" } ton_types = { git = "https://github.com/broxus/ton-labs-types.git" } -ton_vm = { git = "https://github.com/broxus/ton-labs-vm.git" } +ton_vm = { git = "https://github.com/broxus/ton-labs-vm.git", branch = "feature/jetton" } nekoton-derive = { path = "../nekoton-derive", optional = true } nekoton-utils = { path = "../nekoton-utils" } diff --git a/nekoton-contracts/src/jetton/mod.rs b/nekoton-contracts/src/jetton/mod.rs index 12c64a579..457dc0a74 100644 --- a/nekoton-contracts/src/jetton/mod.rs +++ b/nekoton-contracts/src/jetton/mod.rs @@ -287,6 +287,19 @@ mod tests { let details = contract.get_details()?; assert_eq!(details.admin_address, MsgAddressInt::default()); + let owner = nekoton_utils::unpack_std_smc_addr( + "UQA8aeJrWO-5DZ-1Zs2juDYfT4V_ud2KY8gegMd33gHjeUaF", + true, + )?; + + let address = contract.get_wallet_address(&owner)?; + assert_eq!( + address, + MsgAddressInt::from_str( + "0:3d97d11909a20de878c4400ed241a714065d3a0f4d4f0d60ecaf0dbe11cdd1bc" + )? + ); + Ok(()) } }