mirror of
https://github.com/openchainxyz/abi-guesser.git
synced 2025-12-17 08:45:27 +00:00
No description
| dist | ||
| src | ||
| .gitignore | ||
| .prettierignore | ||
| jest.config.js | ||
| package.json | ||
| pnpm-lock.yaml | ||
| prettier.config.js | ||
| README.md | ||
| tsconfig.build.json | ||
| tsconfig.json | ||
ABI Guesser
This package allows you to take any ABI-encoded blob of data, such as calldata, return data, or anything else that can be parsed with abi.decode(), and reverse-engineer the types of the values inside that blob.
Note that this package will not be able to guess the types for any data which was encoded in a non-standard manner.
Installation
npm i @openchainxyz/abi-guesser
Usage
import { guessAbiEncodedData, guessFragment } from '@openchainxyz/abi-guesser'
const paramTypes: ParamType[] = guessAbiEncodedData(calldata)!;
const fragment: FunctionFragment = guessFragment(calldata)!;