API Reference

Estimate fee for a contract execution transaction

posthttps://api.circle.com/v1/w3s/transactions/contractExecution/estimateFee

  • Reference
  • Playground

Estimates gas fees that will be incurred for a contract execution transaction, given its ABI parameters and blockchain.

Header parameters
X-User-Token
string
Required

Unique system generated JWT session token for specific user.

Body parameters
contractAddress
string
Required

The blockchain address of the contract to be executed.

abiFunctionSignature
string

The contract ABI function signature or callData field is required for interacting with the smart contract. The ABI function signature cannot be used simultaneously with callData. e.g. burn(uint256)

abiParameters
array of strings, integers, booleans, arrays

The contract ABI function signature parameters for executing the contract interaction. Supported parameter types include string, integer, boolean, and array. These parameters should be used exclusively with the abiFunctionSignature and cannot be used with callData.

option 1: string
option 2: integer
option 3: boolean
option 4: array
callData
string

The raw transaction data, must be an even-length hexadecimal string with the 0x prefix, to be executed. It is important to note that the usage of callData is mutually exclusive with the abiFunctionSignature and abiParameters. Therefore, callData cannot be utilized simultaneously with either abiFunctionSignature or abiParameters.

amount
string

The amount of native token that will be sent to the contract abi execution. Optional field for payable api only, if not provided, no native token will be sent.

blockchain
string

Blockchain associated with the transaction. Required along with sourceAddress if you don't provide walletId. The blockchain and walletId fields are mutually exclusive.

Allowed valuesETHETH-SEPOLIAAVAXAVAX-FUJIMATICMATIC-AMOYARBARB-SEPOLIAUNIUNI-SEPOLIABASEBASE-SEPOLIAOPOP-SEPOLIA
sourceAddress
string

Source address of the transaction. Required along with blockchain if walletId is not provided. The sourceAddress and walletId fields are mutually exclusive.

walletId
string

Unique system generated identifier of the wallet. Required when sourceAddress and blockchain are not provided. Mutually exclusive with sourceAddress and blockchain. For contract deploys this wallet ID will be used as the source.

Response
RequestChoose a language
ResponseChoose an example
1{
2  "data": {
3    "high": {
4      "gasLimit": "21000",
5      "gasPrice": "",
6      "maxFee": "5.935224468",
7      "priorityFee": "1.022783914",
8      "baseFee": "1.022783914",
9      "networkFee": "0.0001246397138"
10    },
11    "low": {
12      "gasLimit": "21000",
13      "gasPrice": "",
14      "maxFee": "5.935224468",
15      "priorityFee": "1.022783914",
16      "baseFee": "1.022783914",
17      "networkFee": "0.0001246397138"
18    },
19    "medium": {
20      "gasLimit": "21000",
21      "gasPrice": "",
22      "maxFee": "5.935224468",
23      "priorityFee": "1.022783914",
24      "baseFee": "1.022783914",
25      "networkFee": "0.0001246397138"
26    },
27    "callGasLimit": "69222",
28    "verificationGasLimit": "56863",
29    "preVerificationGas": "44112"
30  }
31}
Did this page help you?
© 2023-2025 Circle Technology Services, LLC. All rights reserved.