Skip to content

Commit

Permalink
Add int256_number and array_int256_number unpackers to nekoton_abi he…
Browse files Browse the repository at this point in the history
…lpers
  • Loading branch information
MrWad3r committed Sep 21, 2023
1 parent 21a42ce commit c7e3bdc
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions nekoton-abi/src/abi_helpers.rs
Original file line number Diff line number Diff line change
@@ -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};
Expand Down Expand Up @@ -178,8 +178,9 @@ pub mod array_int256_number {
use super::*;
pub fn unpack(value: &TokenValue) -> UnpackerResult<Vec<BigInt>> {
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),
}
}
Expand Down

0 comments on commit c7e3bdc

Please sign in to comment.