Estimate the fee required to deploy contract by template.
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.
Source address of the transaction. Required along with blockchain if walletId is not provided.
The sourceAddress and walletId fields are mutually exclusive.
JSON object that contains the template deployment parameters used to initialize the contract(s) on-chain.
Unique system generated identifier of the wallet. For contract deploys this wallet ID will be used as the source.
The universally unique identifier of the resource.
Developer-provided parameter used to identify this request. Useful when communicating with Circle Support.
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())
131{
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 "network_fee_raw": "0.0001246397138",
11 "l_1_fee": "0.000000000000140021"
12 },
13 "low": {
14 "gas_limit": "21000",
15 "gas_price": "",
16 "max_fee": "5.935224468",
17 "priority_fee": "1.022783914",
18 "base_fee": "1.022783914",
19 "network_fee": "0.0001246397138",
20 "network_fee_raw": "0.0001246397138",
21 "l_1_fee": "0.000000000000140021"
22 },
23 "medium": {
24 "gas_limit": "21000",
25 "gas_price": "",
26 "max_fee": "5.935224468",
27 "priority_fee": "1.022783914",
28 "base_fee": "1.022783914",
29 "network_fee": "0.0001246397138",
30 "network_fee_raw": "0.0001246397138",
31 "l_1_fee": "0.000000000000140021"
32 }
33 }
34}