We refreshed our doc site!

Bookmarked links may have changed

Read release notes

createTransactionEstimateFee

Web3 Services
Compliance Engine

Estimate fee for a contract execution transaction

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

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
Required

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

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.

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
object
sourceAddress
object
walletId
object
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-2024 Circle Technology Services, LLC. All rights reserved.