SDK Explorer

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

Parameters
input
object
Required

Represents the input for deploying a contract.

abiJson
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 valuesARBARB-SEPOLIABASEBASE-SEPOLIAETHETH-SEPOLIAMATICMATIC-AMOYOPOP-SEPOLIAUNIUNI-SEPOLIA
bytecode
string
Required

Bytecode of the contract being deployed.

constructorParameters
array of anys

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

constructorSignature
string

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

sourceAddress
string

The source address of the transaction.

walletId
string

Unique identifier of the wallet that will deploy the contract.

Responses
Example
1const response = await client.estimateContractDeploymentFee({
2  sourceAddress: '0x1bf9ad0cc2ad298c69a2995aa806ee832788218c',
3  blockchain: 'MATIC-AMOY',
4  bytecode: '0x60806040523480156200001157600080fd5b50604051806040...',
5  constructorSignature: 'constructor(string ticker, uint256 totalSupply)',
6  constructorParameters: [ 'TICK', 10000],
7})
8console.log(response.data)
ResponseChoose an example
1{
2  "data": {
3    "high": {
4      "gasLimit": "21000",
5      "gasPrice": "",
6      "maxFee": "5.935224468",
7      "priorityFee": "1.022783914",
8      "baseFee": "1.022783914",
9      "networkFee": "0.0001246397138"
10    },
11    "low": {
12      "gasLimit": "21000",
13      "gasPrice": "",
14      "maxFee": "5.935224468",
15      "priorityFee": "1.022783914",
16      "baseFee": "1.022783914",
17      "networkFee": "0.0001246397138"
18    },
19    "medium": {
20      "gasLimit": "21000",
21      "gasPrice": "",
22      "maxFee": "5.935224468",
23      "priorityFee": "1.022783914",
24      "baseFee": "1.022783914",
25      "networkFee": "0.0001246397138"
26    }
27  }
28}
Did this page help you?
© 2023-2025 Circle Technology Services, LLC. All rights reserved.