Skip to main content

contracts/handlers/institutional-vault-handler

Classes

InstitutionalVaultHandler

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

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:47

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:181

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:191

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:203

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:212

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:222

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:241

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:260

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:270

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:610

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:231

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:280

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:293

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:72

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:107

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:82

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:134

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:152

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:143

Get the eigen pod manager contract address.

Returns

Promise<`0x${string}`>

The eigen pod manager contract address.

getEigenPodWithdrawalCredentials()

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

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

Get the eigen pod withdrawal credentials.

Returns

Promise<`0x${string}`>

The eigen pod withdrawal credentials as bytes.

getNonRestakedValidatorETH()

getNonRestakedValidatorETH(): Promise<bigint>

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

Get the non-restaked validator ETH.

Returns

Promise<bigint>

The non-restaked validator ETH.

getNonRestakingWithdrawalCredentialsFactory()

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

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

Get the non-restaking withdrawal credentials factory address.

Returns

Promise<`0x${string}`>

The non-restaking withdrawal credentials factory address.

getNoRestakingWithdrawalCredentials()

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

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

Get the no-restaking withdrawal credentials address.

Returns

Promise<`0x${string}`>

The no-restaking withdrawal credentials address.

getRestakedValidatorETH()

getRestakedValidatorETH(): Promise<bigint>

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

Get the restaked validator ETH.

Returns

Promise<bigint>

The restaked validator ETH.

getWeth()

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

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

Get the WETH contract address.

Returns

Promise<`0x${string}`>

The WETH contract address.

getWithdrawalCredentials()

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

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

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:334

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:344

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:354

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:364

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:374

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:386

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:396

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:406

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:416

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:426

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:435

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:463

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:625

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}`>

requestWithdrawal()

requestWithdrawal(requests, value): Promise<`0x${string}`>

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

Request withdrawal from the EigenPod.

Parameters
ParameterTypeDescription
requestsWithdrawalRequest[]The withdrawal requests containing pubkey and amountGwei.
valuebigintThe amount of ETH to send with the transaction.
Returns

Promise<`0x${string}`>

setValidatorsETH()

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

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

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:497

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:520

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:554

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:563

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:572

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:582

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:596

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:61

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:542

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}`>

withdrawNonRestakedETH()

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

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

Withdraw non-restaked ETH from the vault.

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

WithdrawalRequest

WithdrawalRequest = object

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

Properties

PropertyTypeDefined in
amountGweibigintlib/contracts/handlers/institutional-vault-handler.ts:26
pubkeyHexlib/contracts/handlers/institutional-vault-handler.ts:25