> 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/examples/adding-authorized-traders.md).

# Adding Authorized Traders

Grant permission to accounts to trade on behalf of your Vault

You may want to grant or revoke approval from a particular Ethereum address to make trades on behalf of your Vault. Below is the process for querying which addresses are currently and editing that list appropriately.

```typescript
import { IntegrationManager } from '@enzymefinance/protocol';
import { providers, Wallet } from 'ethers';

// an example provider
const provider = providers.StaticJsonRpcProvider(ethNodeAddress, ethNetwork); 

// an example wallet (a subclass of Signer that can be called directly)
const wallet = new Wallet(investorsEthPrivateKey, provider)

// the IntegrationManager contract address, available at contracts.enzyme.finance
const integrationManagerAddress = '0x23k20d...';

// the Vault's comptroller address, available at the vault dashboard at app.enzyme.finance
const vaultComptrollerAddress = '0x2d9es...';

// an arbitrary address; we'll permission it if it's not already and
// revoke permission if it is.
const arbitraryAddress = '0x94d0s...';

// instantiate the Integration Manager contract
const integrationManagerContract = new IntegrationManager(
    integrationManagerAddress,
    wallet,
);

// determine whether the arbitrary address is currently permissioned
const isCurrentlyPermissioned = await integrationManagerContract.isAuthUserForFund(
    vaultComptrollerAddress,
    arbitraryAddress,
);

// conditionally instantiate the transaction
const authUserTx = !isCurrentlyPermissioneded
    ? integrationManagerContract.addAuthUserForFund.args(
        vaultComptrollerAddress,
        arbitraryAddress,
    ) 
    : integrationManagerContract.removeAuthUserForFund.args(
        vaultComptrollerAddress,
        arbitraryAddress,
    );

// send the transaction
const authUserTxReceipt = await authUserTx.send();
console.log('Pending transaction:', authUserTxReceipt.hash);
console.log('Transaction included in block number:', authUserTxReceipt.blockNumber);

```


---

# 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/examples/adding-authorized-traders.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.
