Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/openchainxyz/abi-guesser
https://github.com/openchainxyz/abi-guesser
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/openchainxyz/abi-guesser
- Owner: openchainxyz
- Created: 2022-12-02T15:38:07.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2023-02-13T10:28:35.000Z (almost 2 years ago)
- Last Synced: 2024-10-15T00:32:44.195Z (3 months ago)
- Language: TypeScript
- Size: 133 KB
- Stars: 281
- Watchers: 6
- Forks: 18
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- On-Chain-Investigations-Tools-List - abi guesser
README
# 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
```bash
npm i @openchainxyz/abi-guesser
```## Usage
```javascript
import { guessAbiEncodedData, guessFragment } from '@openchainxyz/abi-guesser'const paramTypes: ParamType[] = guessAbiEncodedData(calldata)!;
const fragment: FunctionFragment = guessFragment(calldata)!;
```