getmefcknabi
v0.1.3
Published
✨ Extract ABIs from any smart contract with minimal hassle - CLI tool with interactive mode to extract ABIs from verified and unverified contracts on any EVM chain
Maintainers
Readme
GetMeFcknABI CLI
🚀 Features
- 🎯 Extract ABIs from any smart contract address
- 🛡️ Works with unverified contracts by analyzing their bytecode
- 🔗 Support for all major EVM chains (Ethereum, Polygon, Arbitrum, Optimism, etc.)
- 🎨 Interactive mode with guided prompts
- 📝 Multiple output formats (JSON and TypeScript)
- 🧩 Custom RPC support for any chain
- 🎭 Proxy contract resolution to get the implementation ABI
- 💻 Beautiful terminal UI with colors and animations
📦 Installation
# Install globally
npm install -g getmefcknabi
# Or run directly with npx
npx getmefcknabi --interactive🔧 Usage
Interactive Mode (Recommended)
The easiest way to use GetMeFcknABI is in interactive mode:
getmefcknabi --interactiveThis will guide you through a series of prompts to:
- Enter a contract address
- Select a blockchain network
- Optionally provide a custom RPC URL
- Choose an output format (JSON or TypeScript)
- Specify a custom output filename (optional)
Command Line Arguments
For scripting or quick use, you can provide all parameters directly:
getmefcknabi -a 0xContractAddress -c 1 -f jsonRequired Arguments:
-a, --address <address>- Smart contract address-c, --chainId <chainId>- Chain ID (e.g., 1 for Ethereum Mainnet)-f, --format <format>- Output format: json or typescript
Optional Arguments:
-r, --rpcUrl <url>- Custom RPC URL (will use default if not provided)-o, --output <file>- Output file path (defaults to<address>.<extension>)-q, --quiet- Suppress logs and only output the ABI-i, --interactive- Run in interactive mode-h, --help- Display help information-V, --version- Output the version number
Examples
# Get ABI from Ethereum mainnet contract in JSON format
getmefcknabi -a 0xf08a50178dfcde18524640ea6618a1f965821715 -c 1 -f json
# Get ABI from Polygon using a custom RPC in TypeScript format with custom output path
getmefcknabi -a 0xf08a50178dfcde18524640ea6618a1f965821715 -c 137 -r https://polygon-rpc.com -f typescript -o ./contracts/MyContract.ts
# Run in interactive mode
getmefcknabi --interactive🌐 Supported Chains
GetMeFcknABI supports all EVM-compatible chains, including:
- Ethereum Mainnet (1)
- Ethereum Sepolia (11155111)
- Polygon (137)
- Polygon Mumbai (80001)
- Arbitrum One (42161)
- Arbitrum Sepolia (421614)
- Optimism (10)
- Optimism Sepolia (11155420)
- Base (8453)
- Base Sepolia (84532)
- BNB Smart Chain (56)
- Avalanche C-Chain (43114)
And any other EVM chain when providing a custom RPC URL and chain ID!
🔍 How It Works
GetMeFcknABI uses a combination of techniques to extract the most complete ABI possible:
- Block Explorer APIs - To get verified contract ABIs
- Bytecode Analysis - For unverified contracts
- 4byte Directory - To resolve function signatures
- Proxy Resolution - To handle proxy contracts (EIP-1967, UUPS, etc.)
🤝 Contributing
Contributions are welcome! Feel free to open issues and pull requests.
- Fork the repository
- Create your feature branch:
git checkout -b my-new-feature - Commit your changes:
git commit -am 'Add some feature' - Push to the branch:
git push origin my-new-feature - Submit a pull request
📄 License
MIT License - see LICENSE for details
