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
CreateContractExecutionTransactionForDeveloperRequest
object
Required
idempotency_key
string

Universally unique identifier (UUID v4) idempotency key. This key is utilized to ensure exactly-once execution of mutating requests. To create a UUIDv4 go to uuidgenerator.net. If the same key is reused, it will be treated as the same request and the original response will be returned.

abi_function_signature
string

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)

abi_parameters
array of

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.

call_data
string

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.

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.

contract_address
string
Required

The blockchain address of the contract to be executed.

entity_secret_ciphertext
string

A base64 string expression of the entity secret ciphertext. The entity secret should be encrypted by the entity public key. Circle mandates that the entity secret ciphertext is unique for each API request.

fee_level
string

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 valuesLOWMEDIUMHIGH
gas_limit
string

The maximum units of gas to use for the transaction. Required if feeLevel is not provided. Estimates for this limit can be obtained through the POST /transactions/transfer/estimateFee API. GasLimit override (only supported for EOA wallets): Using gasLimit together with feeLevel, the provided gasLimit is required to be greater or equal to feeLevel estimation and will override the estimation's gasLimit.

gas_price
string

For blockchains without EIP-1559 support, the maximum price of gas, in gwei, to use per each unit of gas (see gasLimit). Requires gasLimit. Cannot be used with feeLevel, priorityFee, or maxFee. Estimates for this fee can be obtained through the POST /transactions/transfer/estimateFee API.

max_fee
string

For blockchains with EIP-1559 support, the maximum price per unit of gas (see gasLimit), in gwei. Requires priorityFee, and gasLimit to be present. Cannot be used with feeLevel or gasPrice. Estimates for this fee can be obtained through the POST /transactions/transfer/estimateFee API.

priority_fee
string

For blockchains with EIP-1559 support, the “tip”, in gwei, to add to the base fee as an incentive for validators. Please note that the maxFee and gasLimit parameters are required alongside the priorityFee. The feeLevel and gasPrice parameters cannot be used with the priorityFee. Estimations for this fee can be obtained through the POST /transactions/transfer/estimateFee API.

ref_id
string

Optional reference or description used to identify the transaction.

wallet_id
string
Required

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

Responses
Example
1from circle.web3 import developer_controlled_wallets
2from circle.web3 import utils
3
4client = utils.init_developer_controlled_wallets_client(api_key=key, entity_secret=entitySecret)
5
6api_instance = developer_controlled_wallets.TransactionsApi(client)
7
8request = developer_controlled_wallets.CreateContractExecutionTransactionForDeveloperRequest.from_dict({
9    "abiFunctionSignature": "ping()",
10    "walletId": "301e9038-e4c3-5a77-a9fe-95fd644f4c85",
11    "contractAddress": "0x4e2f1c3a5d8b7c9e5f6a8b7c9e5f6a8b7c9e5f6a",
12    "feeLevel": "HIGH",
13})
14response = api_instance.create_developer_transaction_contract_execution(create_contract_execution_transaction_for_developer_request=request)
15print(response.json())
16
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.