📌deployContract

Description

The deployContract function is used to deploy a Soulbound contract on a specified blockchain network.

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 deployContract request using the Nest SDK:

const {SOULBOUND} = require('@nest25/evm-chains-lib')
// create instance of SOULBOUND
const soul = new SOULBOUND();
const privateKey = "your private key here"

const main = async () => {
    // deploy soulbound contract
    const contract = await soul.deployContract(
        'optimism',
        privateKey,
        "SulBoundbyHarshInSDK",
        "SDDK");
    // print contract address
    console.log(contract.address);
}
main()

Response

Contract deployed at 0xe6811ffc22D567A0267B5260211C34074e091022. Transaction hash: 0x99916877816ce81f0091a5107282b077d9f637824bf9291c355762bee4b13713

Use Cases

  • NFT marketplaces: They can use this function to deploy Soulbound contracts for their non-fungible tokens, which can restrict their transfer to only certain whitelisted addresses.

  • Gaming: Companies can use this function to deploy Soulbound contracts for in-game assets, which can restrict their transfer to only certain authorized players.

Last updated