diff --git a/nekoton-abi/src/known_param_type.rs b/nekoton-abi/src/known_param_type.rs index 4157d98ee..333a30b94 100644 --- a/nekoton-abi/src/known_param_type.rs +++ b/nekoton-abi/src/known_param_type.rs @@ -1,7 +1,7 @@ use std::collections::BTreeMap; use ton_abi::{Param, ParamType}; -use ton_block::{MsgAddrStd, MsgAddressInt}; +use ton_block::{MsgAddrStd, MsgAddress, MsgAddressInt}; use ton_types::{BuilderData, Cell}; use super::{MaybeRef, StandaloneToken}; @@ -120,6 +120,12 @@ impl KnownParamType for MsgAddressInt { } } +impl KnownParamType for MsgAddress { + fn param_type() -> ParamType { + ParamType::Address + } +} + impl KnownParamType for MsgAddrStd { fn param_type() -> ParamType { ParamType::Address diff --git a/nekoton-abi/src/token_unpacker.rs b/nekoton-abi/src/token_unpacker.rs index e30714d87..7a0c293e1 100644 --- a/nekoton-abi/src/token_unpacker.rs +++ b/nekoton-abi/src/token_unpacker.rs @@ -5,7 +5,7 @@ use std::sync::Arc; use num_bigint::{BigInt, BigUint}; use num_traits::ToPrimitive; use ton_abi::{Token, TokenValue}; -use ton_block::{MsgAddrStd, MsgAddressInt}; +use ton_block::{MsgAddrStd, MsgAddress, MsgAddressInt}; use ton_types::Cell; use super::{MaybeRef, StandaloneToken}; @@ -219,6 +219,15 @@ impl UnpackAbi for TokenValue { } } +impl UnpackAbi for TokenValue { + fn unpack(self) -> UnpackerResult { + match self { + TokenValue::Address(address) => Ok(address), + _ => Err(UnpackerError::InvalidAbi), + } + } +} + impl UnpackAbi for TokenValue { fn unpack(self) -> UnpackerResult { match self {