Consensys / Consensys/abi-decoder

Failed to decode giving BigNumber Error

Open
#20 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
641
Forks
215
PR merge metrics
No merged PRs in 30d

Description

I was trying to function with different input types, the decoder fails with one of the input and function parameters sequences.

1.To replicate deploy the given contract

contract simple{

uint256 deliveryID;
bytes32[3][] stlFileHash;
string status;

function stringAndUint(string _status,uint256 _deliveryID){
status=_status;
deliveryID=_deliveryID;
}

function stringAndUintAndBytes(bytes32[3][] _stlFileHash,uint256 _deliveryID,string _status){
deliveryID=_deliveryID;
status=_status;
stlFileHash = _stlFileHash;

}

}

2.Use Solidity compiler version on remix: 0.4.18+commit.9cf6e910.Emscripten.clang
3.Input to function stringAndUintAndBytes: [["0x736f6d65","0x736f6d65","0x736f6d65"]],12,"created"

Error:

ethDecoder/node_modules/abi-decoder/node_modules/bignumber.js/bignumber.js:1209
throw error;
BigNumber Error: new BigNumber() not a base 16 number:

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the failure with Solidity 0.4.18 using stringAndUintAndBytes and the supplied nested bytes32 input. Start at ethDecoder/node_modules/abi-decoder/node_modules/bignumber.js/bignumber.js:1209 and trace how abi-decoder handles that parameter sequence. Done means the example decodes without the BigNumber base-16 error.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, solidity
Domain
blockchain
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.