Crypto APIs icon

Crypto APIs

Interact with Crypto APIs — blockchain data, transactions, market data, and more

Actions77

Blockchain Fee → Estimate Contract Interaction Gas

AI-generated

Summary

Estimates the gas limit for an EVM contract interaction using the sender, destination contract, native coin value, and calldata. Sends these fields to the Crypto APIs gas-limit endpoint and returns the unwrapped response item.

Inputs

  • Blockchain Type — Select EVM to use this operation; the UI also lists Solana, Tezos, UTXO, and XRP, but the shown blockchain and interaction fields are scoped to EVM.
  • Blockchain (required) — Choose the EVM chain. The available choices are Arbitrum, Avalanche C-Chain, Base, Optimism, Polygon, and Tron.
  • Network (required) — Choose the network from the available options: Sepolia, Mainnet, Fuji, Amoy, or Nile.
  • From Address (required) — Sender address; sent as the interaction sender.
  • Amount (required) — Native coin value sent with the call, in the smallest unit (for example, wei); use "0" when the call sends no value.
  • Contract Address (required) — Destination contract address; sent as the interaction recipient.
  • Calldata (required) — Hex-encoded calldata for the contract interaction; sent as inputData.

Output shape

a single record

The request targets the contract-interaction gas-limit endpoint. The API response is unwrapped from data.item; API or request errors are raised by the node.

Links

Discussion