SDK Explorer

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

Parameters
input
object
Required

Represents the input parameters for estimating transfer fees.

option 1:
abiFunctionSignature
string
Required

The contract ABI function signature to be interacted with in the smart contract. For example, burn(uint256).

abiParameters
array of anys
Required

The parameters required by the contract ABI function to perform the contract interaction.

contractAddress
string
Required

The blockchain address of the contract to be executed.

source
object

Information about the source.

option 1:
walletId
string
Required

Identifier for the originating wallet.

option 2:
blockchain
string
Required

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

Allowed valuesARBARB-SEPOLIAAVAXAVAX-FUJIBASEBASE-SEPOLIAETHETH-SEPOLIAMATICMATIC-AMOYOPOP-SEPOLIAUNIUNI-SEPOLIA
sourceAddress
string
Required

The source blockchain address of the transaction.

option 2:
callData
string
Required

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.

contractAddress
string
Required

The blockchain address of the contract to be executed.

source
object

Information about the source.

option 1:
walletId
string
Required

Identifier for the originating wallet.

option 2:
blockchain
string
Required

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

Allowed valuesARBARB-SEPOLIAAVAXAVAX-FUJIBASEBASE-SEPOLIAETHETH-SEPOLIAMATICMATIC-AMOYOPOP-SEPOLIAUNIUNI-SEPOLIA
sourceAddress
string
Required

The source blockchain address of the transaction.

Responses
Example
1const response = await client.estimateContractExecutionFee({
2  abiFunctionSignature: 'burn(uint256)',
3  abiParameters: [1000],
4  contractAddress: '656d6fd6-d430-459c-9ba4-5c2074433f1b',
5  source: {
6    walletId: '9a014a34-4706-4e3f-879d-fc2a8764877c',
7  },
8})
9console.log(response.data)
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.