⛏️deploy
Description
The estimateFee
function is an asynchronous function used to estimate the fee for deploying an ERC1155 contract on a specified blockchain and environment.
Parameters
Parameter | Data Type | Description |
---|---|---|
| string | The blockchain on which the contract will be deployed. |
| string | The contract type ('erc1155' for ERC1155 contract deployment). |
| string | The function type ('deploy' for contract deployment). |
| string | The environment or network of the blockchain. |
| number | The amount used for the 'mint' function (optional, default value is 1). |
Response
Field | Data Type | Description |
---|---|---|
| number | The response code indicating the success or failure of the operation. |
| number | The estimated fee for the contract deployment. |
| number | The estimated fee in VLRY (virtual asset). |
| number | The estimated fee in USD (United States Dollar). |
Example Request and Response
Prerequisites
Before making requests with NEST® SDK, you must have it installed.
You can install NEST® SDK using either npm
or yarn
. Use the following commands to install NEST® SDK:
Request
Here is an example of how to make a deploy
request using the NEST® SDK:
Response
Use Cases
Estimating ERC1155 contract deployment fee: By invoking this function with the contract type as 'erc20' and function type as 'deploy', you can estimate the fee for deploying an ERC1155 contract on the specified blockchain and environment.
Sending HTTP request: The function sends an HTTP request to the blockchain explorer's API to estimate the fee for contract deployment.
Last updated