Skip to main content

operate

Description:

Updates the vault by authorized personnel such as the vault admin, whitelistManager, blocklist manager, validators manager.

Arguments:

NameTypeRequiredAccessDescription
whitelistManagerArray<{ address: string, isNew: boolean }>NowhitelistManagerList of addresses to update the whitelist. Use isNew: true to add a new address, isNew: false to remove an existing one. Max count at time - 700 addresses.
blocklistArray<{ address: string, isNew: boolean }>NoBlocklist managerList of addresses to update the blocklist. Use isNew: true to add a new address, isNew: false to remove an existing one. Max count at time - 700 addresses.
validatorsManagerstringNoAdminAddress of the vault deposit data manager. Support only second version on valults.
whitelistManagerstringNoAdminAddress of the vault whitelistManager
feeRecipientstringNoAdminAddress of the vault fee recipient
blocklistManagerstringNoAdminThe blocklisted vault blocklist manager
imagestringNoAdminThe vault image in base64 string format (will be uploaded to IPFS; maximum size is 1 MB)
displayNamestringNoAdminThe vault display name (will be uploaded to IPFS; maximum size is 30 characters)
descriptionstringNoAdminThe vault description (will be uploaded to IPFS; maximum size is 1000 characters)
userAddressstringYes-The address of the user making the update (admin, whitelist manager, blocklist manager or keys manager)
vaultAddressstringYes-The address of the vault

Example:

// Data to update the vault by admin.
const params = {
userAddress: '0x...',
vaultAddress: '0x...',
image: '...',
displayName: '...',
description: '...',
feeRecipient: '0x...',
blocklistManager: '0x...',
whitelistManager: '0x...',
validatorsManager: '0x...',
}

// Data to update the vault by vault keys manager.
const keysManagerParams = {
vaultAddress: '0x...',
userAddress: '0x...',
}

// Data to update the private vault by whitelist manager.
// The whitelist contains addresses allowed to stake or mint within
// the vault.
const whitelistParams = {
whitelist: [
{
address: '0x...',
isNew: true,
},
{
address: '0x...',
isNew: false,
},
],
vaultAddress: '0x...',
userAddress: '0x...',
}

// Data to update blocklisted vault by blocklist manager.
// The blocklist contains addresses disallowed to stake or mint within
// the vault.
const blocklistParams = {
blocklist: [
{
address: '0x...',
isNew: true,
},
{
address: '0x...',
isNew: false,
},
],
vaultAddress: '0x...',
userAddress: '0x...',
}

// Send transaction
const hash = await sdk.vault.operate(params)
// When you sign transactions on the backend (for custodians)
const { data, to } = await sdk.vault.operate.encode(params)
// Get an approximate gas per transaction
const gas = await sdk.vault.operate.estimateGas(params)