The ABI API facilitates interactions with Ethereum-based smart contracts. Blockdaemon processes a large amount of smart contract data daily, but much of it has been difficult to access due to Solidity's RLP encoding. The ABI API resolves this issue.
With the ABI API, you can decode transactions and logs, analyze smart contract methods and parameters, retrieve ABI data, and support contract calls without relying on external tools. This can be useful in real-world applications such as blockchain analytics, automated testing of smart contracts, and enhancing decentralized applications (dApps) by improving data retrieval and interaction with the Ethereum network.
Authentication
You can authenticate your request by using your API Key either as a:
- Query parameter (
?apiKey=<YOUR_API_KEY>
) - Header (
X-API-Key: <YOUR_API_KEY>
) - Bearer token (
Authorization: Bearer <YOUR_API_KEY>
)
Example Request
Replace YOUR_API_KEY
with your actual API key:
curl --request GET \
--url 'https://svc.blockdaemon.com/abi/v1/polygon/amoy/contracts/test/abi?decodeAs=json' \
--header 'accept: application/json' \
--header 'authorization: Bearer YOUR_API_KEY'
Info:
Refer to the Authenticate Your API Requests page for more details.
API Endpoint Structure
The URL structure for ABI API endpoints is as follows.
https://svc.blockdaemon.com/abi/v1/
Available Endpoints
All data will be accessible through the following API endpoints:
Endpoint | What's this for? |
---|---|
Contract Events by Hash - GET /contracts/events/{hash} | Get event details for a contract based on the event hash. |
Contract Method by Hash - GET /contracts/methods/{hash} | Fetch the full method signature from a contract using the method hash. |
Contract Metadata by Address - GET /contracts/{address}/metadata | Fetches contract metadata, including ABI, name, symbol, implemented standards (e.g., ERC-20, ERC-721), and type. |
Contract ABI by Address - GET /contracts/{address}/abi | Get the contract's ABI for a specified address in either raw string or JSON format. |
👋 Need Help?
Contact us through email or our support page for any issues, bugs, or assistance you may need.