Consensys / Consensys/abi-decoder

Receiving undefined decode input from transacation

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

Description

Hi, I am trying to decode input from transaction that I receive:

```
{
from: '0x1987d1c15d95cab34c154ede0a4c3bf7dba5c287',
input: '0xa9059cbb0000000000000000000000001987d1c15d95cab34c154ede0a4c3bf7dba5c287000000000000000000000000000000000000000000000000002386f26fc10000',
to: '0x8f3cf7ad23cd3cadbd9735aff958023239c6a063',
}
```

The code looks like:

```
abiDecoder.addABI(ABI);
const decodedData = abiDecoder.decodeMethod("0xa9059cbb0000000000000000000000001987d1c15d95cab34c154ede0a4c3bf7dba5c287000000000000000000000000000000000000000000000000002386f26fc10000");
console.log(decodedData);
```

But this is returning undefined.

Any thing that I am missing.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by inspecting the ABI supplied to abiDecoder.addABI and the decodeMethod call shown in the issue; the repository file and a failing test are not identified. Compare the transaction method selector with the registered ABI, then reproduce the call and add a focused test if the expected decoding behavior can be established.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
blockchain
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.