> For the complete documentation index, see [llms.txt](https://docs.enzyme.finance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.enzyme.finance/enzyme-blue-sdk/building-blocks/class-instantiation.md).

# Class Instantiation

Importing a Contract Class and making it your own

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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.enzyme.finance/enzyme-blue-sdk/building-blocks/class-instantiation.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
