The ABI Function Selector is a web-based tool that helps developers working with Ethereum smart contracts to easily extract function names and their corresponding function selectors from a contract's ABI (Application Binary Interface).
Live demo: ABI Function Selector
- Parse and analyze Ethereum contract ABIs
- Extract function names from the ABI
- Generate function selectors for each function
- Display results in an easy-to-read format
- The user pastes the ABI of an Ethereum smart contract into the provided text area.
- Upon submission, the application parses the ABI and extracts all function definitions.
- For each function, it generates the function selector by:
- Creating a function signature string
- Converting the signature to UTF-8 bytes
- Calculating the Keccak-256 hash of the bytes
- Taking the first 4 bytes (8 characters) of the hash as the selector
- The results are displayed, showing each function name paired with its selector.
- Visit the ABI Function Selector website.
- Paste your Ethereum contract ABI into the text area.
- Click the "Get Selectors" button.
- View the results, which will show each function name and its corresponding selector.
- Built with React.js
- Uses the ethers.js library for Ethereum-related calculations
- Hosted on Vercel
To run this project locally:
- Clone the repository
- Install dependencies with
npm install
- Run the development server with
npm run dev
Contributions are welcome! Please feel free to submit a Pull Request.
If you have any questions or feedback, please open an issue in the GitHub repository.