ワンクリックで
etherscan
Documentation and capabilities reference for Etherscan
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Documentation and capabilities reference for Etherscan
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
List of actions, guidelines and tools used for generating risk assessment reports for protocols and assets.
Procedure for authoring contract dependency graph YAML files (reports/graph/<slug>.yaml) from a completed risk assessment report.
Focused procedure for refreshing existing risk reports by validating mutable on-chain roles, proxy implementations, TVL, strategy allocations, and other current-state data without rewriting the full assessment.
| name | etherscan |
| description | Documentation and capabilities reference for Etherscan |
| metadata | {"mintlify-proj":"etherscan"} |
Hello World.
Etherscan and other scan sites enables agents to query and analyze blockchain data across 60+ EVM-compatible chains through a unified API. Agents can retrieve account balances, transaction histories, token transfers, contract information, gas prices, and network statistics. The platform supports contract verification, source code retrieval, and metadata enrichment for addresses. With Model Context Protocol (MCP) integration, agents can connect directly to AI models like ChatGPT and Claude for blockchain-aware applications.
GET /v2/api?module=account&action=balance&address=0x...&chainid=1action=txlistaction=txlistinternalaction=getminedblocksaction=tokenbalance&contractaddress=0x...action=tokentx, filter by contract addressaction=tokensupplyaction=tokennfttx and action=token1155txmodule=contract&action=getabi&address=0x...action=getsourcecodeaction=getcontractcreationaction=verifysourcecode (POST request)action=verifyvyper&codeformat=vyper-jsonaction=verifystylusaction=verifyproxycontractaction=checkverifystatusFor tokens / contracts that use OpenZeppelin AccessControl (or AccessControlEnumerable) — common in mint authority, governance, and timelock contracts — use eth_call to read the role registry directly. Roles are bytes32 values; well-known names hash to predictable values.
Resolve a role hash: roles are keccak256(<NAME>). With cast:
cast keccak "MINTER_ROLE"
# 0x9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6
Or off the JS side: ethers.id("MINTER_ROLE").
Special case: DEFAULT_ADMIN_ROLE is the all-zero bytes32, 0x0000…0000.
Count role holders: getRoleMemberCount(bytes32 role) returns (uint256) — only available on AccessControlEnumerable.
cast call <contract> "getRoleMemberCount(bytes32)(uint256)" $(cast keccak "MINTER_ROLE")
Enumerate role holders by index: getRoleMember(bytes32 role, uint256 index) returns (address).
for i in $(seq 0 $((count - 1))); do
cast call <contract> "getRoleMember(bytes32,uint256)(address)" $(cast keccak "MINTER_ROLE") $i
done
Check a specific address: hasRole(bytes32 role, address account) returns (bool).
cast call <contract> "hasRole(bytes32,address)(bool)" $(cast keccak "MINTER_ROLE") 0xACCOUNT
Plain AccessControl (no Enumerable): there is no on-chain way to enumerate holders. You must trace RoleGranted(role, account, sender) and RoleRevoked(role, account, sender) events:
GET /v2/api?module=logs&action=getLogs
&address=0xCONTRACT
&topic0=0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d # RoleGranted
&topic1=<role-hash-padded-to-32-bytes>
Then verify each candidate is still active with hasRole.
Liquity-fork whitelist mapping (e.g. MUSD on Ethereum): the token exposes a plain mintList(address) returns (bool) mapping. There is no enumerator. Walk addToMintList(address) events and check each result with mintList.
Role admins: getRoleAdmin(bytes32 role) returns (bytes32) — tells you which role can grant/revoke this role. Useful for tracing the privilege chain (e.g. MINTER_ROLE admin = DEFAULT_ADMIN_ROLE → which is held by the timelock).
Ownable / single-owner contracts: owner() returns (address). The owner is implicitly the mint authority on Ownable token patterns.
module=logs&action=getLogs&address=0x...&fromBlock=X&toBlock=Ymodule=transaction&action=getstatusaction=gettxreceiptstatusmodule=proxy&action=eth_callaction=ethgetblockbynumberaction=ethgettransactionbyhashaction=ethgettransactionreceiptaction=ethgetcodeaction=ethgetstorageataction=ethsendrawtransactionaction=ethestimategasmodule=nametag&action=getaddresstag (Pro Plus tier)chainid parameter: Ethereum (1), Base (8453), Arbitrum (42161), Polygon (137), Optimism (10), Avalanche (43114), and many othersGET /v2/api?module=account&action=balance&address=0x...&chainid=1GET /v2/api?module=account&action=addresstokenbalance&address=0x...GET /v2/api?module=stats&action=ethprice&chainid=1GET /v2/api?module=account&action=txlist&address=0x...&startblock=0&endblock=latestGET /v2/api?module=account&action=tokentx&contractaddress=0xUSDC&address=0x...GET /v2/api?module=transaction&action=gettxreceiptstatus&txhash=0x...GET /v2/api?module=contract&action=getsourcecode&address=0x...POST /v2/api?module=contract&action=verifysourcecode&contractaddress=0x...&sourceCode=...&compilerversion=v0.8.24GET /v2/api?module=contract&action=checkverifystatus&guid=...GET /v2/api?module=contract&action=getabi&address=0x...Used to produce the Token Mint Authority section of a risk report (see reports/skill.md § Pass 1.6).
GET /v2/api?module=contract&action=getsourcecode&address=0xTOKEN. Grep mint( and burn( to find the access-control modifier(s).cast keccak "MINTER_ROLE". Repeat for any other minter-class roles you find (e.g. RECEIPT_TOKEN_MINTER).AccessControlEnumerable: get getRoleMemberCount then iterate getRoleMember(role, i). If plain AccessControl: scan RoleGranted / RoleRevoked events and verify with hasRole.getOwners() and getThreshold() on a Gnosis Safe), or a known protocol contract. Use the address-metadata endpoint or the contract's name/source to identify it.getRoleAdmin(role) to know who can grant the role — that is the next layer of trust to document.GET /v2/api?module=logs&action=getLogs&address=0x...&fromBlock=12878196&toBlock=12878196topic0=0x... parameter for specific event signaturespage and offset parameterschainid parameterEtherscan integrates with:
https://mcp.etherscan.io/mcp enables direct integration with ChatGPT, Claude, and other LLMsAPI Key Management: Create free or paid API keys from the Etherscan dashboard. Free tier supports selected chains with 3 calls/second limit. Paid tiers (Lite through Pro Plus) offer higher rate limits (5-30 calls/second) and access to PRO endpoints.
Rate Limits: Free tier: 3 calls/second, 100,000 calls/day. Standard: 10 calls/second, 200,000 calls/day. Professional: 30 calls/second, 1,000,000 calls/day. Some endpoints throttled to 2 calls/second regardless of tier.
Supported Chains: 60+ EVM-compatible chains including Ethereum Mainnet, Sepolia, BNB Smart Chain, Polygon, Base, Arbitrum, Optimism, Avalanche, Linea, Blast, and many others. Each chain has a unique chainid parameter.
Response Format: All endpoints return JSON with status, message, and result fields. Status "1" indicates success, "0" indicates failure.
Block Parameters: Endpoints accept block numbers as integers or hex format (0x...). Use "latest" for the most recent block. Historical queries limited to last 128 blocks for some endpoints.
Address Format: All addresses must be in checksummed format (0x...). Endpoints support querying up to 20 addresses separated by commas.
Contract Verification: Requires exact compiler version, optimization settings, and constructor arguments. Supports Solidity, Vyper, and Stylus languages. Verification status can be checked asynchronously.
PRO Endpoints: Historical balance queries, token holder lists, daily network metrics, and address metadata require Standard Plan or higher. Some PRO endpoints throttled to 2 calls/second.
MCP Integration: Authenticate with Etherscan API key as Bearer token in Authorization header when using the MCP server for AI model integration.
For additional documentation and navigation, see: https://docs.etherscan.io/llms.txt