SDK Explorer

Estimates gas fees for a contract execution transaction.

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.

userId
string
Required

Unique system-generated identifier for the user.

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:
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.

userToken
string
Required

The JSON Web Token (JWT) representing the user.

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 3:
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.

userId
string
Required

Unique system-generated identifier for the user.

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 4:
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.

userToken
string
Required

The JSON Web Token (JWT) representing the user.

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: 'functionSig',
3  abiParameters: [param1],
4  contractAddress: 'contract-id',
5  source: { walletId: 'wallet-id' },
6  userId: 'user-id',
7})
8console.log(response.data)
Did this page help you?
© 2023-2025 Circle Technology Services, LLC. All rights reserved.