Package Exports
- evm-calldata-decode
- evm-calldata-decode/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (evm-calldata-decode) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
evm-calldata-decode
Library for decoding function name and arguments from EVM calldata
Warning: This project is in beta state. There might (and most probably will) be changes in the future to its API and working. Also, no guarantees can be made about its stability, efficiency, and security at this stage.
Table of Contents
Install
npm install evm-calldata-decode --save
The project also expects peer dependency @ethersproject
or the individual modules @ethersproject/abi, @ethersproject/bignumber, @ethersproject/bytes, @ethersproject/keccak256, @ethersproject/strings
Usage
import { decodeCallData } from 'evm-calldata-decode'
Decode calldata with ABI
const calldata = '0x1234567800000...'
const abi = '[{"inputs": [...],"name": "mint","type": "function", ...}, ...]'
decodeCallDataWithSignatureDB(calldata, abi)
Decode calldate with online smart contract validator
NOT IMPLEMENTED YET
Attempts to decode calldata with ABI retrieved from Etherscan or Sourcify.
const calldata = '0x1234567800000....'
const contract_address = '0x0....0'
decodeCallDataWithSignatureDB(calldata, contract_address)
Decode calldata with evm signature database
NOT IMPLEMENTED YET
Attempts to decode calldata with a signature retrieved from Ethereum Signature Database. This is a last resort option if only the calldata are known.
const calldata = '0x1234567800000....'
decodeCallDataWithSignatureDB(calldata)