Get contract code / check if contract
avax_get_codeCheck if an Ethereum address is a contract and retrieve its bytecode size and prefix to verify deployments on Avalanche networks.
Instructions
Return whether an address is a contract and its bytecode size (and bytecode prefix). Use to verify deployments.
Network: "mainnet" (C-Chain), "fuji" (testnet C-Chain), a known L1 key (mainnet, c-chain, fuji, dexalot, beam, dfk, dispatch-fuji, echo-fuji), or a full RPC URL.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"address": "<address>"
},
"name": "avax_get_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| address | Yes | 0x-prefixed 20-byte EVM address | |
| network | No | Network: "mainnet" (C-Chain), "fuji" (testnet C-Chain), a known L1 key (mainnet, c-chain, fuji, dexalot, beam, dfk, dispatch-fuji, echo-fuji), or a full RPC URL. | fuji |