Estimate gas
avax_estimate_gasEstimate gas costs for Avalanche transactions by specifying recipient, data, value, and sender. Returns the current base fee to compute accurate fee budgets across mainnet, testnets, and L1s.
Instructions
Estimate gas for a transaction (to, data, value, from). Also returns current base fee so the agent can compute a fee budget.
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 |
|---|---|---|---|
| to | No | 0x-prefixed 20-byte EVM address | |
| data | No | 0x calldata | |
| from | No | 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 |
| value_wei | No | Value in wei as decimal string |