SDK Explorer

Estimate the network fee for deploying a smart contract on a specified blockchain, given the contract bytecode.

Parameters
ContractDeploymentEstimateFeeRequest
object
Required
abi_json
string

The contract's ABI in a JSON stringified format.

blockchain
string

The blockchain network that the resource is to be created on or is currently on. Required along with sourceAddress if you don't provide walletId. The blockchain and walletId fields are mutually exclusive.

Allowed valuesETHETH-SEPOLIAMATICMATIC-AMOYARBARB-SEPOLIAUNIUNI-SEPOLIABASEBASE-SEPOLIAOPOP-SEPOLIA
bytecode
string
Required

Bytecode of the contract being deployed.

constructor_signature
string

Signature of the constructor if the contract has one. constructor() by default.

constructor_parameters
array of

A list of arguments to pass to the contract's constructor function. Must be an empty array if there are no constructor parameters.

source_address
string

Source address of the transaction. Required along with blockchain if walletId is not provided. The sourceAddress and walletId fields are mutually exclusive.

wallet_id
string

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.

x_request_id
string

Developer-provided parameter used to identify this request. Useful when communicating with Circle Support.

Responses
Example
1from circle.web3 import smart_contract_platform
2from circle.web3 import utils
3
4client = utils.init_smart_contract_platform_client(api_key=key, entity_secret=entitySecret)
5
6api_instance = smart_contract_platform.DeployImportApi(client)
7request = smart_contract_platform.ContractDeploymentEstimateFeeRequest.from_dict({
8    "abiJson": "<contract's-abi-json>",
9    "bytecode": "<hex-encoded-bytecode>",
10    "blockchain": "ETH-SEPOLIA",
11    "walletId": "301e9038-e4c3-5a77-a9fe-95fd644f4c85"
12})
13response = api_instance.estimate_contract_deploy(contract_deployment_estimate_fee_request=request)
14print(response.json())
15
ResponseChoose an example
1{
2  "data": {
3    "high": {
4      "gas_limit": "21000",
5      "gas_price": "",
6      "max_fee": "5.935224468",
7      "priority_fee": "1.022783914",
8      "base_fee": "1.022783914",
9      "network_fee": "0.0001246397138"
10    },
11    "low": {
12      "gas_limit": "21000",
13      "gas_price": "",
14      "max_fee": "5.935224468",
15      "priority_fee": "1.022783914",
16      "base_fee": "1.022783914",
17      "network_fee": "0.0001246397138"
18    },
19    "medium": {
20      "gas_limit": "21000",
21      "gas_price": "",
22      "max_fee": "5.935224468",
23      "priority_fee": "1.022783914",
24      "base_fee": "1.022783914",
25      "network_fee": "0.0001246397138"
26    }
27  }
28}
Did this page help you?
© 2023-2025 Circle Technology Services, LLC. All rights reserved.