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.
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 |