SDK Explorer

Creates a challenge for executing a contract transaction.

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 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 of anys
Required

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.

userId
string
Required

Unique system-generated identifier for the user.

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.

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

Optional reference or description used to identify the transaction.

walletId
string
Required

Unique system generated identifier of the wallet. Required when source Address and blockchain is not provided. Mutually exclusive. For contract deploys this wallet ID will be used as the source.

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:
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 of anys
Required

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.

userToken
string
Required

The JSON Web Token (JWT) representing the user.

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.

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

Optional reference or description used to identify the transaction.

walletId
string
Required

Unique system generated identifier of the wallet. Required when source Address and blockchain is not provided. Mutually exclusive. For contract deploys this wallet ID will be used as the source.

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

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.

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

Optional reference or description used to identify the transaction.

walletId
string
Required

Unique system generated identifier of the wallet. Required when source Address and blockchain is not provided. Mutually exclusive. For contract deploys this wallet ID will be used as the source.

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

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.

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

Optional reference or description used to identify the transaction.

walletId
string
Required

Unique system generated identifier of the wallet. Required when source Address and blockchain is not provided. Mutually exclusive. For contract deploys this wallet ID will be used as the source.

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.createUserTransactionContractExecutionChallenge({
2  userToken: "dummy-user-token",
3  abiFunctionSignature: "functionSig",
4  abiParameters: ["param1"],
5  contractAddress: "contract-id",
6  walletId: "wallet-id",
7  fee: {
8    type: "level",
9    config: {
10      feeLevel: "HIGH",
11    },
12  },
13})
14console.log(response.data?.challengeId)
Did this page help you?
© 2023-2025 Circle Technology Services, LLC. All rights reserved.