SDK Explorer

Estimate the fee required to deploy contract by template.

Parameters
ContractDeploymentEstimateRequest
object
Required
blockchain
string
Required

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

template_parameters
object

JSON object that contains the template deployment parameters used to initialize the contract(s) on-chain.

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.

id
string
Required

The universally unique identifier of the resource.

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.TemplatesApi(client)
7request = smart_contract_platform.ContractDeploymentEstimateRequest.from_dict({
8    "blockchain": "ETH-SEPOLIA",
9    "sourceAddress": "0x1b44F3514812d835EB1BDB0acB33d3fA3351Ee43",
10})
11response = api_instance.estimate_contract_template_deploy(id="a2b66f87-3131-2832-bcd3-175a36a4d442", contract_deployment_estimate_request=request)
12print(response.json())
13
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.