Skip to main content

setDepositDataRoot

Description:

Adding root validators to vaults version 2 or higher

Arguments:

NameTypeRequiredDescription
depositDataRootstringYesThe vault validators merkle tree
userAddressstringYesThe user address
vaultAddressstringYesThe address of the vault

Example:

const params = {
depositDataRoot: 'hash',
vaultAddress: '0x...',
userAddress: '0x...',
}

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