From c7e3bdcf0ddf24c8c0eae15123b730409571fc2e Mon Sep 17 00:00:00 2001 From: Stanislav Eliseev Date: Thu, 21 Sep 2023 16:15:38 +0200 Subject: [PATCH] Add int256_number and array_int256_number unpackers to nekoton_abi helpers --- nekoton-abi/src/abi_helpers.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/nekoton-abi/src/abi_helpers.rs b/nekoton-abi/src/abi_helpers.rs index 3ce5800a2..d84316448 100644 --- a/nekoton-abi/src/abi_helpers.rs +++ b/nekoton-abi/src/abi_helpers.rs @@ -1,5 +1,5 @@ -use num_bigint::{BigUint, BigInt}; -use ton_abi::{ParamType, TokenValue, Uint, Int}; +use num_bigint::{BigInt, BigUint}; +use ton_abi::{Int, ParamType, TokenValue, Uint}; use ton_types::UInt256; use super::{BuildTokenValue, KnownParamType, UnpackerError, UnpackerResult}; @@ -178,8 +178,9 @@ pub mod array_int256_number { use super::*; pub fn unpack(value: &TokenValue) -> UnpackerResult> { match value { - TokenValue::Array(ParamType::Int(256), array) => - array.iter().map(int256_number::unpack).collect(), + TokenValue::Array(ParamType::Int(256), array) => { + array.iter().map(int256_number::unpack).collect() + } _ => Err(UnpackerError::InvalidAbi), } }