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.
Represents the input parameters for creating a new contract execution transaction.
The contract ABI function signature to be interacted with in the smart contract.
Example: burn(uint256)
.
The parameters required by the contract ABI function to perform the contract interaction. Supported types include string, number, and boolean.
Specifies the transfer amount in decimal format.
The blockchain address of the contract to be executed.
Represents the configuration for setting fees. It can be either FeeLevelInput, GasInput, or FeeInput.
The maximum gas units for the transaction, required if feeLevel isn't provided. Use the Estimate Fee methods for this limit's estimation.
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.
Requires maxFee, and gasLimit but incompatible with feeLevel or gasPrice. Use the Estimate Fee methods for fee estimates.
The maximum gas units for the transaction, required if feeLevel is not provided. Use the Estimate Fee methods for this limit's estimation.
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.
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.
An optional client-provided reference or description for the transaction.
Identifier for the originating wallet.
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.
The raw transaction data, must be an even-length hexadecimal string with the 0x
prefix.
callData
cannot be used simultaneously with abiFunctionSignature
or abiParameters
.
Specifies the transfer amount in decimal format.
The blockchain address of the contract to be executed.
Represents the configuration for setting fees. It can be either FeeLevelInput, GasInput, or FeeInput.
The maximum gas units for the transaction, required if feeLevel isn't provided. Use the Estimate Fee methods for this limit's estimation.
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.
Requires maxFee, and gasLimit but incompatible with feeLevel or gasPrice. Use the Estimate Fee methods for fee estimates.
The maximum gas units for the transaction, required if feeLevel is not provided. Use the Estimate Fee methods for this limit's estimation.
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.
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.
An optional client-provided reference or description for the transaction.
Identifier for the originating wallet.
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.
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)
1{
2 "data": {
3 "id": "c4d1da72-111e-4d52-bdbf-2e74a2d803d5",
4 "state": "CANCELLED"
5 }
6}