curl --request POST \
--url https://api.circle.com/v1/w3s/templates/{id}/deploy/estimateFee \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"blockchain": "MATIC-AMOY",
"sourceAddress": "0x1bf9ad0cc2ad298c69a2995aa806ee832788218c",
"templateParameters": {},
"walletId": "a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11"
}
'{
"data": {
"high": {
"gasLimit": "21000",
"gasPrice": "<string>",
"maxFee": "5.935224468",
"priorityFee": "1.022783914",
"baseFee": "1.022783914",
"networkFee": "0.0001246397138",
"networkFeeRaw": "0.0001246397138",
"l1Fee": "0.000000000000140021"
},
"low": {
"gasLimit": "21000",
"gasPrice": "<string>",
"maxFee": "5.935224468",
"priorityFee": "1.022783914",
"baseFee": "1.022783914",
"networkFee": "0.0001246397138",
"networkFeeRaw": "0.0001246397138",
"l1Fee": "0.000000000000140021"
},
"medium": {
"gasLimit": "21000",
"gasPrice": "<string>",
"maxFee": "5.935224468",
"priorityFee": "1.022783914",
"baseFee": "1.022783914",
"networkFee": "0.0001246397138",
"networkFeeRaw": "0.0001246397138",
"l1Fee": "0.000000000000140021"
}
}
}Estimate the fee required to deploy contract by template.
curl --request POST \
--url https://api.circle.com/v1/w3s/templates/{id}/deploy/estimateFee \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"blockchain": "MATIC-AMOY",
"sourceAddress": "0x1bf9ad0cc2ad298c69a2995aa806ee832788218c",
"templateParameters": {},
"walletId": "a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11"
}
'{
"data": {
"high": {
"gasLimit": "21000",
"gasPrice": "<string>",
"maxFee": "5.935224468",
"priorityFee": "1.022783914",
"baseFee": "1.022783914",
"networkFee": "0.0001246397138",
"networkFeeRaw": "0.0001246397138",
"l1Fee": "0.000000000000140021"
},
"low": {
"gasLimit": "21000",
"gasPrice": "<string>",
"maxFee": "5.935224468",
"priorityFee": "1.022783914",
"baseFee": "1.022783914",
"networkFee": "0.0001246397138",
"networkFeeRaw": "0.0001246397138",
"l1Fee": "0.000000000000140021"
},
"medium": {
"gasLimit": "21000",
"gasPrice": "<string>",
"maxFee": "5.935224468",
"priorityFee": "1.022783914",
"baseFee": "1.022783914",
"networkFee": "0.0001246397138",
"networkFeeRaw": "0.0001246397138",
"l1Fee": "0.000000000000140021"
}
}
}Circle's API Keys are formatted in the following structure "PREFIX:ID:SECRET". All three parts are requred to make a successful request.
Developer-provided parameter used to identify this request. Useful when communicating with Circle Support. A unique identifier, which can be helpful for identifying a request when communicating with Circle support.
"2adba88e-9d63-44bc-b975-9b6ae3440dde"
The universally unique identifier of the resource.
"b3d9d2d5-4c12-4946-a09d-953e82fae2b0"
Request object for estimating the transaction fees for deploying a contract from a 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.
ETH, ETH-SEPOLIA, MATIC, MATIC-AMOY, ARB, ARB-SEPOLIA, UNI, UNI-SEPOLIA, BASE, BASE-SEPOLIA, OP, OP-SEPOLIA "MATIC-AMOY"
Source address of the transaction. Required along with blockchain if walletId is not provided.
The sourceAddress and walletId fields are mutually exclusive.
"0x1bf9ad0cc2ad298c69a2995aa806ee832788218c"
Unique system generated identifier of the wallet. For contract deploys this wallet ID will be used as the source.
"a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11"
Response object with estimated transaction fee values.
Show child attributes
Show child attributes
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.
"21000"
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.
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.
"5.935224468"
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.
"1.022783914"
For blockchains with EIP-1559 support, the estimated base fee represents the minimum fee required for a transaction to be included in a block on the blockchain. It is measured in gwei and compensates for the computational resources validators consume to process the transaction. The base fee is supplemented by a separate "tip" called the priority fee, which acts as an extra incentive for validators to prioritize the transaction. The priority fee is added to the base fee to calculate the final transaction fee.
"1.022783914"
The estimated network fee is the maximum amount of cryptocurrency (such as ETH, ARB, or SOL) that you will pay for your transaction. This fee depends on the parameters you set, including Gas Limit, Priority Fee, and Max Fee.
It compensates for the computational resources that validators consume to process the transaction. It is measured in native token such as ETH, SOL.
For blockchains with L1 data fees such as OP/BASE, the network fee is a combination of the Execution Gas Fee and the L1 Data Fee.
Each blockchain might use different formula for network fee. Refer to each specific blockchain's documentation to understand how networkFee is calculated.
"0.0001246397138"
Similar to networkFee, networkFeeRaw is an estimation with lower buffer and thus should be closer to the actual on-chain expense.
This field will only be returned in the estimation response.
"0.0001246397138"
This fee represents the Layer 1 (L1) rollup charge associated with transactions on Layer 2 blockchains. The amount is expressed in the native currency, such as ETH. This field is relevant for Layer 2 blockchains utilizing a rollup mechanism and for specific account types, such as externally owned accounts (EOAs) on the Optimism (OP) blockchain.
"0.000000000000140021"
Show child attributes
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.
"21000"
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.
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.
"5.935224468"
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.
"1.022783914"
For blockchains with EIP-1559 support, the estimated base fee represents the minimum fee required for a transaction to be included in a block on the blockchain. It is measured in gwei and compensates for the computational resources validators consume to process the transaction. The base fee is supplemented by a separate "tip" called the priority fee, which acts as an extra incentive for validators to prioritize the transaction. The priority fee is added to the base fee to calculate the final transaction fee.
"1.022783914"
The estimated network fee is the maximum amount of cryptocurrency (such as ETH, ARB, or SOL) that you will pay for your transaction. This fee depends on the parameters you set, including Gas Limit, Priority Fee, and Max Fee.
It compensates for the computational resources that validators consume to process the transaction. It is measured in native token such as ETH, SOL.
For blockchains with L1 data fees such as OP/BASE, the network fee is a combination of the Execution Gas Fee and the L1 Data Fee.
Each blockchain might use different formula for network fee. Refer to each specific blockchain's documentation to understand how networkFee is calculated.
"0.0001246397138"
Similar to networkFee, networkFeeRaw is an estimation with lower buffer and thus should be closer to the actual on-chain expense.
This field will only be returned in the estimation response.
"0.0001246397138"
This fee represents the Layer 1 (L1) rollup charge associated with transactions on Layer 2 blockchains. The amount is expressed in the native currency, such as ETH. This field is relevant for Layer 2 blockchains utilizing a rollup mechanism and for specific account types, such as externally owned accounts (EOAs) on the Optimism (OP) blockchain.
"0.000000000000140021"
Show child attributes
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.
"21000"
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.
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.
"5.935224468"
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.
"1.022783914"
For blockchains with EIP-1559 support, the estimated base fee represents the minimum fee required for a transaction to be included in a block on the blockchain. It is measured in gwei and compensates for the computational resources validators consume to process the transaction. The base fee is supplemented by a separate "tip" called the priority fee, which acts as an extra incentive for validators to prioritize the transaction. The priority fee is added to the base fee to calculate the final transaction fee.
"1.022783914"
The estimated network fee is the maximum amount of cryptocurrency (such as ETH, ARB, or SOL) that you will pay for your transaction. This fee depends on the parameters you set, including Gas Limit, Priority Fee, and Max Fee.
It compensates for the computational resources that validators consume to process the transaction. It is measured in native token such as ETH, SOL.
For blockchains with L1 data fees such as OP/BASE, the network fee is a combination of the Execution Gas Fee and the L1 Data Fee.
Each blockchain might use different formula for network fee. Refer to each specific blockchain's documentation to understand how networkFee is calculated.
"0.0001246397138"
Similar to networkFee, networkFeeRaw is an estimation with lower buffer and thus should be closer to the actual on-chain expense.
This field will only be returned in the estimation response.
"0.0001246397138"
This fee represents the Layer 1 (L1) rollup charge associated with transactions on Layer 2 blockchains. The amount is expressed in the native currency, such as ETH. This field is relevant for Layer 2 blockchains utilizing a rollup mechanism and for specific account types, such as externally owned accounts (EOAs) on the Optimism (OP) blockchain.
"0.000000000000140021"
Was this page helpful?