🔗deployContract
Description
The deployContract
function returns a Promise that resolves to a newly deployed ERC721 contract on the specified blockchain network.
The function takes in the blockchain type, a private key, and a base URI for the contract's metadata. The returned contract object can then be used to interact with the deployed contract on the blockchain
Parameters
Parameter | Type | Description |
---|---|---|
| string | Takes a string parameter specifying the name of the blockchain network (For eg. bsc, polygon, eth, ava, gnosis, moonbeam) |
| string | Requires a private key corresponding to the account that will be used to deploy the contract. |
| string | Expects a string that represent the Token's base URI |
Response
Property | Type | Description |
---|---|---|
| object | Returns an object containing the transaction hash and contract address |
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 deployContract
request using the NEST® SDK:
Response
Use Cases
Contract deployment: The primary use case for the
deployContract
function is to deploy an ERC721 contract on a specified blockchain network. This allows users to create and deploy their unique tokens on a blockchain.Token metadata: The
deployContract
function takes in a base URI parameter, which can be used to specify the metadata for the token contract. This can include information such as token name, description, and image, and is commonly used to provide additional context about a token.Automated token deployment: The
deployContract
function can be integrated into automated deployment workflows, allowing developers to automatically deploy new token contracts as part of their continuous integration and deployment process.
Last updated