No description
Find a file
2023-02-13 02:27:25 -08:00
dist fix another bug 2023-02-13 02:27:25 -08:00
src fix another bug 2023-02-13 02:27:25 -08:00
.gitignore fix bug 2023-02-12 20:17:57 -08:00
.prettierignore add prettier, readme 2022-12-05 18:03:40 -08:00
jest.config.js add prettier, readme 2022-12-05 18:03:40 -08:00
package.json fix another bug 2023-02-13 02:27:25 -08:00
pnpm-lock.yaml release on npm 2023-02-12 00:38:12 -08:00
prettier.config.js add prettier, readme 2022-12-05 18:03:40 -08:00
README.md fix another bug 2023-02-13 02:27:25 -08:00
tsconfig.build.json add definitions 2022-12-07 03:26:53 -08:00
tsconfig.json release on npm 2023-02-12 00:38:12 -08:00

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)!;