Skip to content

Commit

Permalink
Problem: abi Array is encoed as FixedArray (fix crypto-com#930)
Browse files Browse the repository at this point in the history
fix array bug

tidy up

fix
  • Loading branch information
leejw51crypto committed Jul 25, 2023
1 parent e452233 commit 02c8fc1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion common/src/node/ethereum/abi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ impl TryFrom<&EthAbiToken> for Token {
.map(TryInto::try_into)
.collect::<Result<_, _>>()?,
),
EthAbiToken::Array(values) => Token::FixedArray(
EthAbiToken::Array(values) => Token::Array(
values
.iter()
.map(TryInto::try_into)
Expand Down
4 changes: 2 additions & 2 deletions common/src/transaction/ethereum/abi_contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ impl TryFrom<&EthAbiTokenBind> for EthAbiToken {
.map(TryInto::try_into)
.collect::<Result<_, _>>()?,
),
EthAbiTokenBind::Array { data } => EthAbiToken::FixedArray(
EthAbiTokenBind::Array { data } => EthAbiToken::Array(
data.iter()
.map(TryInto::try_into)
.collect::<Result<_, _>>()?,
),
EthAbiTokenBind::Tuple { data } => EthAbiToken::FixedArray(
EthAbiTokenBind::Tuple { data } => EthAbiToken::Tuple(
data.iter()
.map(TryInto::try_into)
.collect::<Result<_, _>>()?,
Expand Down

0 comments on commit 02c8fc1

Please sign in to comment.