Consensys / Consensys/abi-decoder

decoding abi

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

Description

In README:

*Need to pass the ABI's manually to the library in order to be able to decode params later*

```
//Add ABI's

const testABI = [{"inputs": [{"type": ....}];
abiDecoder.addABI(testABI);

//Decode Tx data

const testData = "0x53d9d910000........0000a6d9c5f7d4de3cef51ad3b7235d79ccc95114daa";
const decodedData = abiDecoder.decodeMethod(testData);
```

1) What's `testData`? Is it `transaction.input`? Or what is it?

2) `abiDecoder.addABI(testABI);` - does this mean that once I've added some abi (`abi1`), the method `decodeMethod` will ONLY be able to decode methods using once specified `abi1`? What if I have multiple abi-s and multiple methods to decode? In other words, how can I decode a specifi method with a specific `abi`?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.