https://github.com/keycard-tech/eth-abi-repo
ETH ABI Repository for Keycard Shell
https://github.com/keycard-tech/eth-abi-repo
Last synced: 11 months ago
JSON representation
ETH ABI Repository for Keycard Shell
- Host: GitHub
- URL: https://github.com/keycard-tech/eth-abi-repo
- Owner: keycard-tech
- License: mit
- Created: 2025-07-15T10:33:57.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2025-07-16T09:33:30.000Z (about 1 year ago)
- Last Synced: 2025-08-07T11:27:03.643Z (12 months ago)
- Language: Python
- Size: 12.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ETH ABI Repository
This repository contains a selection of Ethereum SmartContract ABI descriptions in JSON format. These are fetched from [Etherscan](https://etherscan.io/) according to the `abi_list.csv` file in this repository and are saved to the `repo` directory of this repository.
`abi_list.csv` is a CSV file where each line is an entry. Its format is as follows
```csv
name,chainId,contractAddress,description
```
- `name`: a descriptive name of the ABI, this becomes the name of the saved JSON file
- `chainId`: the Chain ID where the contract is deployed
- `contractAddress`: the address of the contract to fetch the ABI, in case we are interested in a specific ERC this address can be of any contract fully implementing the ERC
- `description`: an additional comment, usually the contract name. This field is ignored
adding a ABI to this repository is done by adding a line to this file and running the `fetch_abi.py` script.
The script `build_abi.py` takes all JSON from the `repo` and generates a single file with all of them.
Feel free to use this repository however you like and to propose additions to the list. However since the purpose of this repository is to create an ABI database for [Keycard Shell](https://github.com/keycard-tech/keycard-shell) we will want to keep this list relatively short to fit the device memory.
## Usage
If you add entries to `abi_list.csv`, you will need to run
`python fetch_api.py`
but you will fist need to create an Etherscan API key and write it, in `.etherscan_apikey` without leading or trailing blanks or newlines.
To build the final ABI database just run
`python build_abi.py`
this does not require any API key since it only reads the files in the `repo` directory. You will find the output in `build/abi.json`
## Downloading the JSON
You can always download the latest build [by clicking here](https://github.com/keycard-tech/eth-abi-repo/releases/latest/download/abi.json) or from the Release page.