# deployContract

## Description

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

## Parameters

| Name         | Type   | Description                                                    |
| ------------ | ------ | -------------------------------------------------------------- |
| `blockchain` | string | The blockchain network on which the contract will be deployed. |
| `privateKey` | string | The private key of the wallet used to deploy the contract.     |
| `name`       | string | The name of the Soulbound contract to be deployed.             |
| `symbol`     | string | The symbol of the Soulbound contract to be deployed.           |

## Response

| Name       | Type   | Description                                                                                                        |
| ---------- | ------ | ------------------------------------------------------------------------------------------------------------------ |
| `code`     | number | A code indicating the success or failure of the function. 1 indicates success, while 0 indicates failure.          |
| `contract` | object | An object containing information about the deployed contract, including the contract address and transaction hash. |

## 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:

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

```jsx
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

```jsx
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.


---

# 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/contracts/soulbound/deploycontract.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.
