# deploy

## Description

The `estimateFee` function is an asynchronous function used to estimate the fee for deploying an ERC721 contract on a specified blockchain and environment.

## Parameters

| Parameter      | Data Type | Description                                                             |
| -------------- | --------- | ----------------------------------------------------------------------- |
| `blockchain`   | string    | The blockchain on which the contract will be deployed.                  |
| `contract`     | string    | The contract type ('erc721' for ERC721 contract deployment).            |
| `functionType` | string    | The function type ('deploy' for contract deployment).                   |
| `env`          | string    | The environment or network of the blockchain.                           |
| `amount`       | number    | The amount used for the 'mint' function (optional, default value is 1). |

## Response

| Field          | Data Type | Description                                                           |
| -------------- | --------- | --------------------------------------------------------------------- |
| `code`         | number    | The response code indicating the success or failure of the operation. |
| `result`       | number    | The estimated fee for the contract deployment.                        |
| `VLRYEstimate` | number    | The estimated fee in VLRY (virtual asset).                            |
| `USDEstimate`  | number    | The estimated fee in USD (United States Dollar).                      |

## Example Request and Response

### Prerequisites

Before making requests with Volary SDK, you must have it installed.

You can install Volary SDK using either **`npm`** or **`yarn`**. Use the following commands to install Volary SDK:

<br>

```sh
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 Volary SDK:

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

const nft = new Nft('testnet');

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

main();
```

### Response

```sh
 result {
        code: 1,
        result: 0.4566197654759562,
        VLRYEstimate: 5752.045274360977,
        USDEstimate: 862.8067911541465
      }
```

### Use Cases

* **Estimating ERC721 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 ERC721 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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.volary.io/sdks-guide/blockchain-sdks/evm-chains-sdk/nft/estimatefee/erc721/deploy.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
