# availableContracts

## Description

The `availableContracts` function is an asynchronous function that retrieves a list of available contracts for a specific blockchain.<br>

## Parameters

| Parameter    | Data Type | Description                                            |
| ------------ | --------- | ------------------------------------------------------ |
| `blockchain` | string    | The blockchain for which to fetch available contracts. |

## Response

| Field   | Data Type | Description                                                                                                       |
| ------- | --------- | ----------------------------------------------------------------------------------------------------------------- |
| `code`  | number    | A numeric value indicating the execution status (1 for success, 0 for error).                                     |
| `error` | any       | The error object containing details about the encountered error, if applicable.                                   |
| `types` | array     | An array of available contract types for the specified blockchain. Each contract type is represented as a string. |

## Example Request and Response

### Prerequisites&#x20;

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 `availableContracts` request using the Volary SDK:

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

const info = new BlockchainInfo();

async function main() {
    const response = await info.availableContracts('klay')
    console.log(response)
}

main();

```

```jsx
```

### Response

```sh
{
        code: 1,
        types: [
          { contract: 'ERC20', parameters: [Object] },
          { contract: 'ERC721', parameters: [Object] },
          { contract: 'ERC1155', parameters: [Object] },
          { contract: 'Soulbound', parameters: [Object] }
        ]
      }
```

## Use Cases

* The `listAvailableContracts` function can be used to fetch a list of available contracts for a specific blockchain supported by the blockchain gateway. It can be helpful when providing a selection of contract types for users to choose from or when validating the contract type input in other functions.


---

# 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/blockchaininfo/availablecontracts.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.
