> 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/editing-a-vaults-permissioned-investors.md).

# Editing a Vault's Permissioned Investors

In the example below, we'll query the settings for a vault's implementation of the investor whitelist policy, then update it. Note that most policies cannot be changed once a Vault has been configured and deployed; only the investor whitelist and the investment limits.&#x20;

```typescript
import { InvestorWhitelist, PolicyManager, investorWhitelistArgs } from '@enzymefinance/protocol';
import { providers, BigNumber, Wallet, constants } from 'ethers';

const provider = providers.StaticJsonRpcProvider(ethNodeAddress, ethNetwork); 
const signer = new Wallet(investorsEthPrivateKey, provider);

// the address of the investor whitelist policy, available at contracts.enzyme.finance
const whitelistPolicyAddress = '0xsow9o...';

// the address of the policy manager contract, avalable at contracts.enzyme.finance
const policyManagerAddress = '0xw923...';

// the comptroller address of the vault in question, available at the 
// vault's overview page at app.enzyme.finance
const vaultComptrollerAddress = '0xwdfn289s...'; 

const whitelistContract = new InvestorWhitelist(
    whitelistPolicyAddress,
    provider,
);

// an arbitrary address to add or remove to the whitelist
// if the address does not exist in the list, we'll update it
// if the address does exist in the list, we'll remove it
const arbitraryAddress = '0x2iws...';

const addressIsInList = await whitelistContract.isInList(arbitraryAddress);

const investorsToAdd = addressIsInList ? undefined : [arbitraryAddress];
const investorsToRemove = addressIsInList ? [arbitraryAddress] : undefined;

const updatedPolicySettings = investorWhitelistArgs({
    investorsToAdd,
    investorsToRemove,
});

const policyManagerContract = new PolicyManager(
    policyManagerAddress,
    signer
);

const policyUpdateTx = policyManagerContract.updatePolicySettingsForFund.args(
    vaultComptrollerAddress,
    whitelistPolicyAddress,
    updatedPolicySettings,
);

const policyUpdateTxReceipt = await policyUpdateTransaction.send();
console.log('Pending transaction:', policyUpdateTxReceipt.hash);
console.log('Transaction included in block number:', policyUpdateTxReceipt.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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.enzyme.finance/enzyme-blue-sdk/examples/editing-a-vaults-permissioned-investors.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
