eth-decoder
Simple library to decode ethereum transaction and logs
Install
$ npm install --save eth-decoder
Usage
Log parser
import { LogDecoder } from "eth-decoder"
const ERC20TokenABI =
const decoder = new LogDecoder(
[
ERC20TokenABI,
]
);
const parsedLogs = decoder.decodeLogs(receipt.logs)
console.log(parsedLogs)
Tx parser
import { TxDecoder } from "eth-decoder"
const ERC20TokenABI =
const decoder = new TxDecoder(
[
ERC20TokenABI,
]
);
const parsedTx = decoder.decodeTx({ data: '0x..', value: '1000', from: '...', ... })
console.log(parsedTx)
License
MIT