Consensys / Consensys/abi-decoder
How to decode the contract function name and parameters from a Polygon transaction?
- Dominant language
- JavaScript
- Stars
- 641
- Forks
- 215
- PR merge metrics
- No merged PRs in 30d
Description
Using this transaction: https://polygonscan.com/tx/0x1b4165c1093936b74803666c75edd720fbd1713b5f77160e3a726299fb04078d
I thought I could simply decode the `Input Data` to figure out the function name and parameters, so I can call that function directly from Nodejs.
However, it's just returning `undefined` :thinking:
```
const inputData = "0x4ae301550000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b400000000000000000000000000000000000000000000000000000000000000034254430000000000000000000000000000000000000000000000000000000000";
const decodedData = abiDecoder.decodeMethod(inputData);
console.log(decodedData);
```
Am I using this package incorrectly? Is there any other way to figure out the contract function name and parameters for this transaction?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.