Skip to main content

contracts/handlers/institutional-vault-handler

Classes

InstitutionalVaultHandler

Defined in: lib/contracts/handlers/institutional-vault-handler.ts:28

Handler for the InstitutionalVault contract exposing methods to interact with the contract.

Constructors

Constructor

new InstitutionalVaultHandler(chain, walletClient, publicClient): InstitutionalVaultHandler

Defined in: lib/contracts/handlers/institutional-vault-handler.ts:42

Create the handler for the InstitutionalVault contract exposing methods to interact with the contract.

Parameters
ParameterTypeDescription
chainChainChain to use for the client.
walletClient{ }The wallet client to use for wallet interactions.
publicClient{ }The public client to use for public interactions.
Returns

InstitutionalVaultHandler

Methods

allowance()

allowance(owner, spender): Promise<bigint>

Defined in: lib/contracts/handlers/institutional-vault-handler.ts:140

Get the allowance for the spender to spend the owner's tokens.

Parameters
ParameterTypeDescription
owner`0x${string}`The owner of the tokens.
spender`0x${string}`The spender of the tokens.
Returns

Promise<bigint>

The allowance of the owner for the spender.

approve()

approve(spender, amount): Promise<`0x${string}`>

Defined in: lib/contracts/handlers/institutional-vault-handler.ts:150

Approve the spender to spend the owner's tokens.

Parameters
ParameterTypeDescription
spender`0x${string}`The spender of the tokens.
amountbigintThe amount of tokens to approve.
Returns

Promise<`0x${string}`>

asset()

asset(): Promise<`0x${string}`>

Defined in: lib/contracts/handlers/institutional-vault-handler.ts:162

Get the asset of the vault.

Returns

Promise<`0x${string}`>

The asset of the vault.

authority()

authority(): Promise<`0x${string}`>

Defined in: lib/contracts/handlers/institutional-vault-handler.ts:171

Get the authority of the vault.

Returns

Promise<`0x${string}`>

The authority of the vault.

balanceOf()

balanceOf(address): Promise<bigint>

Defined in: lib/contracts/handlers/institutional-vault-handler.ts:181

Get the balance of the address.

Parameters
ParameterTypeDescription
address`0x${string}`The address to get the balance of.
Returns

Promise<bigint>

The balance of the address.

completeQueuedWithdrawals()

completeQueuedWithdrawals(withdrawals, receiveAsTokens): Promise<`0x${string}`>

Defined in: lib/contracts/handlers/institutional-vault-handler.ts:200

Complete the queued withdrawals.

Parameters
ParameterTypeDescription
withdrawalsQueuedWithdrawal[]The withdrawals to complete.
receiveAsTokensboolean[]Whether to receive the assets as tokens.
Returns

Promise<`0x${string}`>

convertToAssets()

convertToAssets(shares): Promise<bigint>

Defined in: lib/contracts/handlers/institutional-vault-handler.ts:219

Convert shares to assets.

Parameters
ParameterTypeDescription
sharesbigintThe number of shares to convert.
Returns

Promise<bigint>

The number of assets.

convertToShares()

convertToShares(assets): Promise<bigint>

Defined in: lib/contracts/handlers/institutional-vault-handler.ts:229

Convert assets to shares.

Parameters
ParameterTypeDescription
assetsbigintThe number of assets to convert.
Returns

Promise<bigint>

The number of shares.

customExternalCall()

customExternalCall(target, data, value): Promise<`0x${string}`>

Defined in: lib/contracts/handlers/institutional-vault-handler.ts:555

Call a custom external function.

Parameters
ParameterTypeDescription
target`0x${string}`The target contract address.
data`0x${string}`The calldata to send a transaction to the target contract.
valuebigintThe amount of value to send to the target contract.
Returns

Promise<`0x${string}`>

decimals()

decimals(): Promise<number>

Defined in: lib/contracts/handlers/institutional-vault-handler.ts:190

Get the number of decimals of the token.

Returns

Promise<number>

The number of decimals of the token.

deposit()

deposit(assets, receiver): Promise<`0x${string}`>

Defined in: lib/contracts/handlers/institutional-vault-handler.ts:239

Deposit assets into the vault.

Parameters
ParameterTypeDescription
assetsbigintThe number of assets to deposit.
receiver`0x${string}`The address to receive the shares.
Returns

Promise<`0x${string}`>

depositETH()

depositETH(receiver, value): Promise<`0x${string}`>

Defined in: lib/contracts/handlers/institutional-vault-handler.ts:252

Deposit ETH into the vault.

Parameters
ParameterTypeDescription
receiver`0x${string}`The address to receive the shares.
valuebigintThe amount of ETH to deposit.
Returns

Promise<`0x${string}`>

getAddress()

getAddress(): `0x${string}` | undefined

Defined in: lib/contracts/handlers/institutional-vault-handler.ts:67

Get the address of the contract for this handler.

Returns

`0x${string}` | undefined

The address of the contract.

getBeaconDepositContract()

getBeaconDepositContract(): Promise<`0x${string}`>

Defined in: lib/contracts/handlers/institutional-vault-handler.ts:102

Get the beacon deposit contract address.

Returns

Promise<`0x${string}`>

The beacon deposit contract address.

getContract()

getContract(): object

Defined in: lib/contracts/handlers/institutional-vault-handler.ts:77

Get the contract. This is a method because the typings are complex and lost when trying to make it a member.

Returns

object

The viem contract.

getEigenDelegationManager()

getEigenDelegationManager(): Promise<`0x${string}`>

Defined in: lib/contracts/handlers/institutional-vault-handler.ts:111

Get the eigen delegation manager contract address.

Returns

Promise<`0x${string}`>

The eigen delegation manager.

getEigenPod()

getEigenPod(): Promise<`0x${string}`>

Defined in: lib/contracts/handlers/institutional-vault-handler.ts:129

Get the eigen pod address.

Returns

Promise<`0x${string}`>

The eigen pod address.

getEigenPodManager()

getEigenPodManager(): Promise<`0x${string}`>

Defined in: lib/contracts/handlers/institutional-vault-handler.ts:120

Get the eigen pod manager contract address.

Returns

Promise<`0x${string}`>

The eigen pod manager contract address.

getNonRestakedValidatorETH()

getNonRestakedValidatorETH(): Promise<bigint>

Defined in: lib/contracts/handlers/institutional-vault-handler.ts:265

Get the non-restaked validator ETH.

Returns

Promise<bigint>

The non-restaked validator ETH.

getRestakedValidatorETH()

getRestakedValidatorETH(): Promise<bigint>

Defined in: lib/contracts/handlers/institutional-vault-handler.ts:274

Get the restaked validator ETH.

Returns

Promise<bigint>

The restaked validator ETH.

getWithdrawalCredentials()

getWithdrawalCredentials(): Promise<`0x${string}`>

Defined in: lib/contracts/handlers/institutional-vault-handler.ts:283

Get the withdrawal credentials.

Returns

Promise<`0x${string}`>

The withdrawal credentials.

maxDeposit()

maxDeposit(address): Promise<bigint>

Defined in: lib/contracts/handlers/institutional-vault-handler.ts:293

Get the maximum deposit amount for the address.

Parameters
ParameterTypeDescription
address`0x${string}`The address to get the maximum deposit amount for.
Returns

Promise<bigint>

The maximum deposit amount for the address.

maxMint()

maxMint(address): Promise<bigint>

Defined in: lib/contracts/handlers/institutional-vault-handler.ts:303

Get the maximum mint amount for the address.

Parameters
ParameterTypeDescription
address`0x${string}`The address to get the maximum mint amount for.
Returns

Promise<bigint>

The maximum mint amount for the address.

maxRedeem()

maxRedeem(address): Promise<bigint>

Defined in: lib/contracts/handlers/institutional-vault-handler.ts:313

Get the maximum redeem amount for the address.

Parameters
ParameterTypeDescription
address`0x${string}`The address to get the maximum redeem amount for.
Returns

Promise<bigint>

The maximum redeem amount for the address.

maxWithdraw()

maxWithdraw(address): Promise<bigint>

Defined in: lib/contracts/handlers/institutional-vault-handler.ts:323

Get the maximum withdraw amount for the address.

Parameters
ParameterTypeDescription
address`0x${string}`The address to get the maximum withdraw amount for.
Returns

Promise<bigint>

The maximum withdraw amount for the address.

mint()

mint(shares, receiver): Promise<`0x${string}`>

Defined in: lib/contracts/handlers/institutional-vault-handler.ts:333

Mint shares to the receiver.

Parameters
ParameterTypeDescription
sharesbigintThe number of shares to mint.
receiver`0x${string}`The address to receive the shares.
Returns

Promise<`0x${string}`>

name()

name(): Promise<string>

Defined in: lib/contracts/handlers/institutional-vault-handler.ts:345

Get the name of the contract.

Returns

Promise<string>

The name of the contract.

previewDeposit()

previewDeposit(assets): Promise<bigint>

Defined in: lib/contracts/handlers/institutional-vault-handler.ts:355

Preview the deposit amount for the assets.

Parameters
ParameterTypeDescription
assetsbigintThe number of assets to deposit.
Returns

Promise<bigint>

The number of shares to receive.

previewMint()

previewMint(shares): Promise<bigint>

Defined in: lib/contracts/handlers/institutional-vault-handler.ts:365

Preview the mint amount for the shares.

Parameters
ParameterTypeDescription
sharesbigintThe number of shares to mint.
Returns

Promise<bigint>

The number of assets to receive.

previewRedeem()

previewRedeem(shares): Promise<bigint>

Defined in: lib/contracts/handlers/institutional-vault-handler.ts:375

Preview the redeem amount for the shares.

Parameters
ParameterTypeDescription
sharesbigintThe number of shares to redeem.
Returns

Promise<bigint>

The number of assets to receive.

previewWithdraw()

previewWithdraw(shares): Promise<bigint>

Defined in: lib/contracts/handlers/institutional-vault-handler.ts:385

Preview the withdraw amount for the shares.

Parameters
ParameterTypeDescription
sharesbigintThe number of shares to withdraw.
Returns

Promise<bigint>

The number of assets to receive.

queueWithdrawals()

queueWithdrawals(shares): Promise<`0x${string}`>

Defined in: lib/contracts/handlers/institutional-vault-handler.ts:394

Queue the withdrawals.

Parameters
ParameterTypeDescription
sharesbigintThe number of shares to withdraw.
Returns

Promise<`0x${string}`>

redeem()

redeem(shares, receiver, owner): Promise<`0x${string}`>

Defined in: lib/contracts/handlers/institutional-vault-handler.ts:408

Redeem the shares to the receiver.

Parameters
ParameterTypeDescription
sharesbigintThe number of shares to redeem.
receiver`0x${string}`The address to receive the assets.
owner`0x${string}`The owner of the shares.
Returns

Promise<`0x${string}`>

requestEigenPodConsolidation()

requestEigenPodConsolidation(srcPubkeys, targetPubkeys, value): Promise<`0x${string}`>

Defined in: lib/contracts/handlers/institutional-vault-handler.ts:569

Request EigenPod consolidation.

Parameters
ParameterTypeDescription
srcPubkeys`0x${string}`[]The source public keys.
targetPubkeys`0x${string}`[]The target public keys.
valuebigintThe amount to send to the target contract (small quantity of GWei)
Returns

Promise<`0x${string}`>

setValidatorsETH()

setValidatorsETH(restakedValidatorsETH, nonRestakedValidatorsETH): Promise<`0x${string}`>

Defined in: lib/contracts/handlers/institutional-vault-handler.ts:421

Set the validators ETH.

Parameters
ParameterTypeDescription
restakedValidatorsETHbigintThe amount of restaked validator ETH.
nonRestakedValidatorsETHbigintThe amount of non-restaked validator ETH.
Returns

Promise<`0x${string}`>

startNonRestakingValidators()

startNonRestakingValidators(pubKeys, signatures, amountsInGwei, depositDataRoots): Promise<`0x${string}`>

Defined in: lib/contracts/handlers/institutional-vault-handler.ts:442

Start the non-restaking validators.

Parameters
ParameterTypeDescription
pubKeys`0x${string}`[]The public keys of the validators.
signatures`0x${string}`[]The signatures of the validators.
amountsInGweibigint[]The amounts of the validators.
depositDataRoots`0x${string}`[]The deposit data roots of the validators.
Returns

Promise<`0x${string}`>

startRestakingValidators()

startRestakingValidators(pubKeys, signatures, amountsInGwei, depositDataRoots): Promise<`0x${string}`>

Defined in: lib/contracts/handlers/institutional-vault-handler.ts:465

Start the restaking validators.

Parameters
ParameterTypeDescription
pubKeys`0x${string}`[]The public keys of the validators.
signatures`0x${string}`[]The signatures of the validators.
amountsInGweibigint[]The amounts of the validators.
depositDataRoots`0x${string}`[]The deposit data roots of the validators.
Returns

Promise<`0x${string}`>

symbol()

symbol(): Promise<string>

Defined in: lib/contracts/handlers/institutional-vault-handler.ts:499

Get the symbol of the contract.

Returns

Promise<string>

The symbol of the contract.

totalAssets()

totalAssets(): Promise<bigint>

Defined in: lib/contracts/handlers/institutional-vault-handler.ts:508

Get the total assets of the vault.

Returns

Promise<bigint>

The total assets of the vault.

totalSupply()

totalSupply(): Promise<bigint>

Defined in: lib/contracts/handlers/institutional-vault-handler.ts:517

Get the total supply of the vault.

Returns

Promise<bigint>

The total supply of the vault.

transfer()

transfer(to, value): Promise<`0x${string}`>

Defined in: lib/contracts/handlers/institutional-vault-handler.ts:527

Transfer the value to the to address.

Parameters
ParameterTypeDescription
to`0x${string}`The address to transfer the value to.
valuebigintThe amount of value to transfer.
Returns

Promise<`0x${string}`>

transferFrom()

transferFrom(from, to, value): Promise<`0x${string}`>

Defined in: lib/contracts/handlers/institutional-vault-handler.ts:541

Transfer the value from the from address to the to address.

Parameters
ParameterTypeDescription
from`0x${string}`The address to transfer the value from.
to`0x${string}`The address to transfer the value to.
valuebigintThe amount of value to transfer.
Returns

Promise<`0x${string}`>

withAddress()

withAddress(address): InstitutionalVaultHandler

Defined in: lib/contracts/handlers/institutional-vault-handler.ts:56

Set the address of the contract for this handler.

Parameters
ParameterTypeDescription
address`0x${string}`The address of the contract.
Returns

InstitutionalVaultHandler

The handler.

withdraw()

withdraw(assets, receiver, owner): Promise<`0x${string}`>

Defined in: lib/contracts/handlers/institutional-vault-handler.ts:487

Withdraw the assets to the receiver.

Parameters
ParameterTypeDescription
assetsbigintThe number of assets to withdraw.
receiver`0x${string}`The address to receive the assets.
owner`0x${string}`The owner of the assets.
Returns

Promise<`0x${string}`>

Type Aliases

QueuedWithdrawal

QueuedWithdrawal = object

Defined in: lib/contracts/handlers/institutional-vault-handler.ts:14

Properties

PropertyTypeDefined in
delegatedToAddresslib/contracts/handlers/institutional-vault-handler.ts:16
noncebigintlib/contracts/handlers/institutional-vault-handler.ts:18
scaledSharesbigint[]lib/contracts/handlers/institutional-vault-handler.ts:21
stakerAddresslib/contracts/handlers/institutional-vault-handler.ts:15
startBlocknumberlib/contracts/handlers/institutional-vault-handler.ts:19
strategiesAddress[]lib/contracts/handlers/institutional-vault-handler.ts:20
withdrawerAddresslib/contracts/handlers/institutional-vault-handler.ts:17