SDK Explorer

Creates a transaction which executes a smart contract. ABI parameters must be passed in the request. Related transactions may be submitted as a batch transaction in a single call.

Parameters
input
object
Required

Represents the input parameters for creating a new contract execution transaction.

option 1:
abiFunctionSignature
string
Required

The contract ABI function signature to be interacted with in the smart contract. Example: burn(uint256).

abiParameters
array of anys
Required

The parameters required by the contract ABI function to perform the contract interaction. Supported types include string, number, and boolean.

amount
string

Specifies the transfer amount in decimal format.

contractAddress
string
Required

The blockchain address of the contract to be executed.

fee
object
Required

Represents the configuration for setting fees. It can be either FeeLevelInput, GasInput, or FeeInput.

option 1:
config
object
Required
gasLimit
string
Required

The maximum gas units for the transaction, required if feeLevel isn't provided. Use the Estimate Fee methods for this limit's estimation.

maxFee
string
Required

The maximum price per gas unit (see gasLimit), in gwei. Requires priorityFee, and gasLimit, but incompatible with feeLevel or gasPrice. Use the Estimate Fee methods to get this fee's estimates.

priorityFee
string
Required

Requires maxFee, and gasLimit but incompatible with feeLevel or gasPrice. Use the Estimate Fee methods for fee estimates.

type
string
Allowed valuesabsolute
option 2:
config
object
Required
gasLimit
string
Required

The maximum gas units for the transaction, required if feeLevel is not provided. Use the Estimate Fee methods for this limit's estimation.

gasPrice
string
Required

For EIP-1559 supported blockchains, it's the max gas price per gas unit (see gasLimit), in gwei. Requires gasLimit and incompatible with feeLevel, priorityFee, or maxFee. Use the Estimate Fee methods for fee estimates.

type
string
Allowed valuesgas
option 3:
config
object
Required
feeLevel
string
Required

A dynamic blockchain fee level setting (LOW, MEDIUM, or HIGH) that will be used to pay gas for the transaction. Calculated based on network traffic, supply of validators, and demand for transaction verification. Cannot be used with gasPrice, priorityFee, or maxFee. Estimates for each fee level can be obtained through the POST /transactions/transfer/estimateFee API.

Allowed valuesHIGHLOWMEDIUM
type
string
Allowed valueslevel
refId
string

An optional client-provided reference or description for the transaction.

walletId
string
Required

Identifier for the originating wallet.

idempotencyKey
string

The optional idempotency key. An idempotency key is a unique identifier used to identify and handle duplicate requests in order to ensure idempotent behavior, where multiple identical requests have the same effect as a single request.

We will generate one if you do not provide it.

option 2:
callData
string
Required

The raw transaction data, must be an even-length hexadecimal string with the 0x prefix. callData cannot be used simultaneously with abiFunctionSignature or abiParameters.

amount
string

Specifies the transfer amount in decimal format.

contractAddress
string
Required

The blockchain address of the contract to be executed.

fee
object
Required

Represents the configuration for setting fees. It can be either FeeLevelInput, GasInput, or FeeInput.

option 1:
config
object
Required
gasLimit
string
Required

The maximum gas units for the transaction, required if feeLevel isn't provided. Use the Estimate Fee methods for this limit's estimation.

maxFee
string
Required

The maximum price per gas unit (see gasLimit), in gwei. Requires priorityFee, and gasLimit, but incompatible with feeLevel or gasPrice. Use the Estimate Fee methods to get this fee's estimates.

priorityFee
string
Required

Requires maxFee, and gasLimit but incompatible with feeLevel or gasPrice. Use the Estimate Fee methods for fee estimates.

type
string
Allowed valuesabsolute
option 2:
config
object
Required
gasLimit
string
Required

The maximum gas units for the transaction, required if feeLevel is not provided. Use the Estimate Fee methods for this limit's estimation.

gasPrice
string
Required

For EIP-1559 supported blockchains, it's the max gas price per gas unit (see gasLimit), in gwei. Requires gasLimit and incompatible with feeLevel, priorityFee, or maxFee. Use the Estimate Fee methods for fee estimates.

type
string
Allowed valuesgas
option 3:
config
object
Required
feeLevel
string
Required

A dynamic blockchain fee level setting (LOW, MEDIUM, or HIGH) that will be used to pay gas for the transaction. Calculated based on network traffic, supply of validators, and demand for transaction verification. Cannot be used with gasPrice, priorityFee, or maxFee. Estimates for each fee level can be obtained through the POST /transactions/transfer/estimateFee API.

Allowed valuesHIGHLOWMEDIUM
type
string
Allowed valueslevel
refId
string

An optional client-provided reference or description for the transaction.

walletId
string
Required

Identifier for the originating wallet.

idempotencyKey
string

The optional idempotency key. An idempotency key is a unique identifier used to identify and handle duplicate requests in order to ensure idempotent behavior, where multiple identical requests have the same effect as a single request.

We will generate one if you do not provide it.

Responses
Example
1const response = await client.createContractExecutionTransaction({
2  amount: '0.01',
3  abiFunctionSignature: 'burn(uint256)',
4  contractAddress: '0xa51c9c604b79a0fadbfed35dd576ca1bce71da0a',
5  walletId: 'a635d679-4207-4e37-b12e-766afb9b3892',
6  fee: {
7    type: 'level',
8    config: {
9      feeLevel: 'HIGH',
10    },
11  },
12})
13console.log(response.data)
ResponseChoose an example
1{
2  "data": {
3    "id": "c4d1da72-111e-4d52-bdbf-2e74a2d803d5",
4    "state": "CANCELLED"
5  }
6}
Did this page help you?
© 2023-2025 Circle Technology Services, LLC. All rights reserved.