⛏️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

Response

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:

npm install @nest25/evm-chains-lib
OR
yarn add @nest25/evm-chains-lib

Request

Here is an example of how to make a deploy request using the NEST® SDK:

const { Nft } = require('@nest25/evm-chains-lib');

const nft = new Nft('testnet');

async function main() {
    const result = await nft.estimateFee('eth', 'erc1155', 'deploy', 1);
    console.log("result", result);
}

main();

Response

 result {
        code: 1,
        result: 0.32836054791881764,
        VLRYEstimate: 4136.362200559341,
        USDEstimate: 620.454330083901
      }

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