# Class Instantiation

Instantiating a Contract Class requires two steps. First,  import the Contract you need from the SDK. Imports are explicit; read through the protocol architecture [docs](https://docs.enzyme.finance) or the [repo](https://github.com/enzymefinance/protocol) to understand which contract (or contracts) you will need.

```typescript
import { ComptrollerLib } from '@enzymefinance/protocol'
```

Next, instantiate a new class by passing it two parameters:

1. The `address` at which the contract is located on chain. Vault-specific contract addresses are available on the Vault's overview page on the [Enzyme app](https://app.enzyme.finance). Non vault-specific contract addresses can be found [here](https://contracts.enzyme.finance).
2. A `Signer` object. A Signer is a class imported from `ethers` and instantiated per their documentation. It describes the user on whose behalf the contract is being instantiated (and who will eventually call any methods on the class) and a connection to an Ethereum node.

Ethers [provides a good description](https://docs.ethers.io/v5/api/signer/) of the `Signer` object, and it's beyond the scope of this document to go into more detail. You can see an example of how a signer object is instantiated and passed to an Enzyme class in practice in the example [Enzyme Bot repo](https://github.com/avantgardefinance/enzyme-bot) and [accompanying blog post](https://medium.com/enzymefinance/building-a-trading-bot-on-enzyme-e002b6419b23).

```typescript
const address = '0xw23r...' // for example only
const signer = new Signer(privateKey, ethNodeAddress) // for example only

const vaultComptroller = new ComptrollerLib(address, signer)
```


---

# 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.enzyme.finance/enzyme-blue-sdk/building-blocks/class-instantiation.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.
