From c75c7588fc68074dd4521e0bc1ce7aa9f48cc929 Mon Sep 17 00:00:00 2001 From: MikeDiam Date: Thu, 5 Sep 2024 16:24:52 +0300 Subject: [PATCH] [subgraph update] update multicall --- README.md | 78 ++++++++++--------- changelog/next-release.md | 35 +++++++++ src/StakeWiseSDK.ts | 2 - src/contracts/index.ts | 5 +- src/contracts/multicall/index.ts | 7 +- .../multicall/rewardSplitterMulticall.ts | 17 ++-- .../multicall/util/getHarvestArgs.ts | 14 ++-- src/contracts/multicall/vaultMulticall.ts | 13 ++-- .../subgraph/vault/harvestParamsQuery.graphql | 1 + .../osToken/transactions/mint/common.ts | 1 - .../getClaimAmount/getAssetsFromShares.ts | 1 - .../requests/getClaimAmount/getShares.ts | 1 - .../transactions/claimRewards/common.ts | 4 +- .../claimRewards/getSharesFromAssets.ts | 1 - .../updateFeeRecipients/common.ts | 4 +- .../parseExitRequests.spec.ts | 2 +- src/methods/vault/requests/getStakeBalance.ts | 1 - .../requests/getVault/modifyVault.spec.ts | 5 ++ .../transactions/claimExitQueue/common.ts | 4 +- .../transactions/deposit/otherToken/common.ts | 10 ++- .../vault/transactions/operate/common.ts | 4 +- .../vault/transactions/withdraw/common.ts | 5 +- 22 files changed, 131 insertions(+), 84 deletions(-) diff --git a/README.md b/README.md index 8643c34d..f5c1709c 100644 --- a/README.md +++ b/README.md @@ -640,41 +640,46 @@ type Output = { description: string | null restakeOperatorsManager: string restakeWithdrawalsManager: string + osTokenConfig: { + ltvPercent: bigint + thresholdPercent: bigint + } } ``` -| Name | Description | -|--------------------|---------------------------------------------------------------| -| `apy` | Current vault apy | -| `isErc20` | Does the vault have its own ERC20 token | -| `capacity` | Maximum TVL of Vault | -| `createdAt` | Date of Creation | -| `feePercent` | Commission rate | -| `isPrivate` | Whether the storage is private | -| `isRestake` | Indicates whether the Vault is a restaking vault | -| `isBlocklist` | Whether the storage has blocklist | -| `vaultAdmin` | Vault administrator address | -| `totalAssets` | TVL of Vault | -| `feeRecipient` | Vault fee address | -| `whitelistManager` | Whitelist manager | -| `vaultAddress` | Address of vault | -| `mevRecipient` | Validator fee recipient | -| `whitelistCount` | Number of addresses in the [whitelist](#sdkvaultgetwhitelist) | -| `blocklistCount` | Number of addresses in the [blocklist](#sdkvaultgetblocklist) | -| `imageUrl` | Link for vault logo | -| `blocklistManager` | Blocklist manager | -| `depositDataManager` | Keys manager address | -| `isSmoothingPool` | Smoothing poll or Vault escrow | -| `tokenName` | ERC20 token name | -| `tokenSymbol` | ERC20 token symbol | -| `displayName` | Name of vault | -| `description` | Description of vault | -| `whitelist` | List of authorized users for deposits | -| `blocklist` | List of blocked users for deposits | -| `performance` | Vault performance indicator (percent) | -| `version` | Vault version | -| `restakeOperatorsManager` | If the Vault is a restaking vault, restake operators manager can add/remove restake operators | -| `restakeWithdrawalsManager` | If the Vault is a restaking vault, restake withdrawals manager can manage EigenLayer withdrawals | +| Name | Description | +|-----------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `apy` | Current vault apy | +| `isErc20` | Does the vault have its own ERC20 token | +| `capacity` | Maximum TVL of Vault | +| `createdAt` | Date of Creation | +| `feePercent` | Commission rate | +| `isPrivate` | Whether the storage is private | +| `isRestake` | Indicates whether the Vault is a restaking vault | +| `isBlocklist` | Whether the storage has blocklist | +| `vaultAdmin` | Vault administrator address | +| `totalAssets` | TVL of Vault | +| `feeRecipient` | Vault fee address | +| `whitelistManager` | Whitelist manager | +| `vaultAddress` | Address of vault | +| `mevRecipient` | Validator fee recipient | +| `whitelistCount` | Number of addresses in the [whitelist](#sdkvaultgetwhitelist) | +| `blocklistCount` | Number of addresses in the [blocklist](#sdkvaultgetblocklist) | +| `imageUrl` | Link for vault logo | +| `blocklistManager` | Blocklist manager | +| `depositDataManager` | Keys manager address | +| `isSmoothingPool` | Smoothing poll or Vault escrow | +| `tokenName` | ERC20 token name | +| `tokenSymbol` | ERC20 token symbol | +| `displayName` | Name of vault | +| `description` | Description of vault | +| `whitelist` | List of authorized users for deposits | +| `blocklist` | List of blocked users for deposits | +| `performance` | Vault performance indicator (percent) | +| `version` | Vault version | +| `restakeOperatorsManager` | If the Vault is a restaking vault, restake operators manager can add/remove restake operators | +| `restakeWithdrawalsManager` | If the Vault is a restaking vault, restake withdrawals manager can manage EigenLayer withdrawals | +| `osTokenConfig` | contains the ltvPercent, which is the percentage used to calculate how much a user can mint in OsToken shares, and thresholdPercent, which is the liquidation threshold percentage used to calculate the health factor for the OsToken position | #### Example: @@ -726,6 +731,7 @@ Necessary to update the vault state type Output = { reward: string proof: Array + canHarvest: boolean rewardsRoot: string unlockedMevReward: string } @@ -745,10 +751,10 @@ Getting user's balance in the vault #### Arguments: -| Name | Type | Required | -|------|------|-------------| -| userAddress | `string` | **Yes** | -| vaultAddress | `string` | **Yes** | +| Name | Type | Required | +|--------------|----------|----------| +| userAddress | `string` | **Yes** | +| vaultAddress | `string` | **Yes** | #### Returns: diff --git a/changelog/next-release.md b/changelog/next-release.md index c0b7d935..40ed4e34 100644 --- a/changelog/next-release.md +++ b/changelog/next-release.md @@ -1 +1,36 @@ - Breaking change: Removed `sdk.osToken.getConfig`. Use `sdk.vault.getVault` instead to get osToken config data `{ osTokenConfig: { ltvPercent, thresholdPercent } }`. +- Added canHarvest: boolean to `sdk.vault.getHarvestParams` response. + +# Updates +### 1. `sdk.vault.getVault` + +#### New output field: + +```ts +type AddedOutput = { + osTokenConfig: { + ltvPercent: string + thresholdPercent: string + } +} +``` + +| Name | Description | +|-----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `osTokenConfig` | contains the `ltvPercent`, which is the percentage used to calculate how much a user can mint in OsToken shares, and `thresholdPercent`, which is the liquidation threshold percentage used to calculate the health factor for the OsToken position | + +--- +### 2. `sdk.vault.getHarvestParams` + +#### New output field: + +```ts +type AddedOutput = { + canHarvest: boolean +} +``` + +--- + +### 3. Removed method +### `sdk.vault.getVault` diff --git a/src/StakeWiseSDK.ts b/src/StakeWiseSDK.ts index 91d8bbe6..36506887 100644 --- a/src/StakeWiseSDK.ts +++ b/src/StakeWiseSDK.ts @@ -54,7 +54,6 @@ class StakeWiseSDK { vaultMulticall({ userAddress, vaultAddress, request }: VaultMulticallInput) { return vaultMulticall({ vaultContract: this.contracts.helpers.createVault(vaultAddress), - keeperContract: this.contracts.base.keeper, options: this.options, vaultAddress, userAddress, @@ -67,7 +66,6 @@ class StakeWiseSDK { return rewardSplitterMulticall({ rewardSplitterContract: this.contracts.helpers.createRewardSplitter(rewardSplitterAddress), - keeperContract: this.contracts.base.keeper, options: this.options, vaultAddress, userAddress, diff --git a/src/contracts/index.ts b/src/contracts/index.ts index 5b29cd3a..2f204437 100644 --- a/src/contracts/index.ts +++ b/src/contracts/index.ts @@ -1,6 +1,7 @@ export { default as createContracts } from './createContracts' export { default as createContract } from './createContract' export { default as multicall } from './multicall/commonMulticall' -export { default as vaultMulticall } from './multicall/vaultMulticall' export { default as eigenPodOwnerMulticall } from './multicall/eigenPodOwnerMulticall' -export { default as rewardSplitterMulticall } from './multicall/rewardSplitterMulticall' + +export { vaultMulticall, rewardSplitterMulticall } from './multicall' +export type { VaultMulticallBaseInput, RewardSplitterMulticallBaseInput } from './multicall' diff --git a/src/contracts/multicall/index.ts b/src/contracts/multicall/index.ts index d11ea99b..2b5ebee7 100644 --- a/src/contracts/multicall/index.ts +++ b/src/contracts/multicall/index.ts @@ -1,4 +1,7 @@ -export { default as vaultMulticall } from './vaultMulticall' export { default as commonMulticall } from './commonMulticall' -export { default as rewardSplitterMulticall } from './rewardSplitterMulticall' +export { default as vaultMulticall } from './vaultMulticall' +export type { VaultMulticallBaseInput } from './vaultMulticall' + +export { default as rewardSplitterMulticall } from './rewardSplitterMulticall' +export type { RewardSplitterMulticallBaseInput } from './rewardSplitterMulticall' diff --git a/src/contracts/multicall/rewardSplitterMulticall.ts b/src/contracts/multicall/rewardSplitterMulticall.ts index 57e15d5b..464b872c 100644 --- a/src/contracts/multicall/rewardSplitterMulticall.ts +++ b/src/contracts/multicall/rewardSplitterMulticall.ts @@ -7,21 +7,23 @@ import { handleTransactionData, } from './util' -import type { KeeperAbi, RewardSplitterAbi } from '../types' +import type { RewardSplitterAbi } from '../types' import type { MulticallRequestInput } from './types' -type RewardSplittersMulticallInput = { +export type RewardSplitterMulticallBaseInput = { userAddress: string vaultAddress: string options: StakeWise.Options - request: MulticallRequestInput - keeperContract: KeeperAbi rewardSplitterContract: RewardSplitterAbi } -const rewardSplittersMulticall = async (values: RewardSplittersMulticallInput): Promise => { - const { request, options, userAddress, vaultAddress, keeperContract, rewardSplitterContract } = values +type RewardSplitterMulticallInput = RewardSplitterMulticallBaseInput & { + request: MulticallRequestInput +} + +const rewardSplitterMulticall = async (values: RewardSplitterMulticallInput): Promise => { + const { request, options, userAddress, vaultAddress, rewardSplitterContract } = values const { params, callStatic, estimateGas, transactionData } = request let multicallParams = [ ...params ] @@ -36,7 +38,6 @@ const rewardSplittersMulticall = async (values: RewardSplitte const harvestArgs = await getHarvestArgs({ options, vaultAddress, - keeperContract, }) if (harvestArgs) { @@ -70,4 +71,4 @@ const rewardSplittersMulticall = async (values: RewardSplitte } -export default rewardSplittersMulticall +export default rewardSplitterMulticall diff --git a/src/contracts/multicall/util/getHarvestArgs.ts b/src/contracts/multicall/util/getHarvestArgs.ts index ba1726d0..351c78eb 100644 --- a/src/contracts/multicall/util/getHarvestArgs.ts +++ b/src/contracts/multicall/util/getHarvestArgs.ts @@ -1,23 +1,21 @@ import getHarvestParams from '../../../methods/vault/requests/getHarvestParams' -import type { KeeperAbi } from '../../types' import type { HarvestParamsQueryPayload } from '../../../graphql/subgraph/vault' type Input = { options: StakeWise.Options vaultAddress: string - keeperContract: KeeperAbi } const getHarvestArgs = async (props: Input): Promise => { - const { options, vaultAddress, keeperContract } = props + const { options, vaultAddress } = props - const [ harvestParams, canHarvest ] = await Promise.all([ - getHarvestParams({ options, vaultAddress }), - keeperContract.canHarvest(vaultAddress), - ]) + const harvestParams = await getHarvestParams({ + options, + vaultAddress, + }) - if (canHarvest) { + if (harvestParams?.canHarvest) { return harvestParams } diff --git a/src/contracts/multicall/vaultMulticall.ts b/src/contracts/multicall/vaultMulticall.ts index 0cf7c291..2691ba15 100644 --- a/src/contracts/multicall/vaultMulticall.ts +++ b/src/contracts/multicall/vaultMulticall.ts @@ -9,21 +9,23 @@ import { } from './util' import type { MulticallRequestInput } from './types' -import type { KeeperAbi, OtherTokenVaultAbi, VaultAbi } from '../types' +import type { OtherTokenVaultAbi, VaultAbi } from '../types' import { Network } from '../../utils' type VaultContractAbi = VaultAbi | OtherTokenVaultAbi -type VaultMulticallInput = { +export type VaultMulticallBaseInput = { userAddress: string vaultAddress: string - keeperContract: KeeperAbi options: StakeWise.Options - request: MulticallRequestInput vaultContract: VaultContractAbi } +type VaultMulticallInput = VaultMulticallBaseInput & { + request: MulticallRequestInput +} + // Methods with _checkHarvested() call const harvestCheckMethods = [ 'deposit', @@ -43,7 +45,7 @@ const harvestCheckMethods = [ * This method will also add swapXdaiToGno execution if needed. */ const vaultMulticall = async (values: VaultMulticallInput): Promise => { - const { options, vaultAddress, userAddress, request, vaultContract, keeperContract } = values + const { options, vaultAddress, userAddress, request, vaultContract } = values const { params, callStatic, estimateGas, transactionData } = request const contract = await getSignedContract({ @@ -61,7 +63,6 @@ const vaultMulticall = async (values: VaultMulticallInput): P const harvestArgs = await getHarvestArgs({ options, vaultAddress, - keeperContract, }) if (harvestArgs) { diff --git a/src/graphql/subgraph/vault/harvestParamsQuery.graphql b/src/graphql/subgraph/vault/harvestParamsQuery.graphql index 9a35fed6..9af08379 100644 --- a/src/graphql/subgraph/vault/harvestParamsQuery.graphql +++ b/src/graphql/subgraph/vault/harvestParamsQuery.graphql @@ -1,6 +1,7 @@ query HarvestParams($address: ID!) { harvestParams: vault(id: $address) { proof + canHarvest rewardsRoot reward: proofReward unlockedMevReward: proofUnlockedMevReward diff --git a/src/methods/osToken/transactions/mint/common.ts b/src/methods/osToken/transactions/mint/common.ts index 5a906856..c39696bd 100644 --- a/src/methods/osToken/transactions/mint/common.ts +++ b/src/methods/osToken/transactions/mint/common.ts @@ -13,7 +13,6 @@ export const commonLogic = (values: MintInput) => { const multicallArgs: Omit[0], 'request'> = { vaultContract: contracts.helpers.createVault(vaultAddress), - keeperContract: contracts.base.keeper, vaultAddress, userAddress, options, diff --git a/src/methods/rewardSplitter/requests/getClaimAmount/getAssetsFromShares.ts b/src/methods/rewardSplitter/requests/getClaimAmount/getAssetsFromShares.ts index ed1ee599..6ea0f7ec 100644 --- a/src/methods/rewardSplitter/requests/getClaimAmount/getAssetsFromShares.ts +++ b/src/methods/rewardSplitter/requests/getClaimAmount/getAssetsFromShares.ts @@ -24,7 +24,6 @@ const getAssetsFromShares = async (input: GetAssetsFromSharesInput) => { options, userAddress, vaultAddress, - keeperContract: contracts.base.keeper, vaultContract: contracts.helpers.createVault(vaultAddress), }) diff --git a/src/methods/rewardSplitter/requests/getClaimAmount/getShares.ts b/src/methods/rewardSplitter/requests/getClaimAmount/getShares.ts index 28264c74..be29c174 100644 --- a/src/methods/rewardSplitter/requests/getClaimAmount/getShares.ts +++ b/src/methods/rewardSplitter/requests/getClaimAmount/getShares.ts @@ -25,7 +25,6 @@ const getShares = async (input: GetSharesInput) => { options, userAddress, vaultAddress, - keeperContract: contracts.base.keeper, rewardSplitterContract: contracts.helpers.createRewardSplitter(rewardSplitterAddress), }) diff --git a/src/methods/rewardSplitter/transactions/claimRewards/common.ts b/src/methods/rewardSplitter/transactions/claimRewards/common.ts index b3471dfc..0b45fed0 100644 --- a/src/methods/rewardSplitter/transactions/claimRewards/common.ts +++ b/src/methods/rewardSplitter/transactions/claimRewards/common.ts @@ -1,5 +1,6 @@ import { validateArgs } from '../../../../utils' import { rewardSplitterMulticall } from '../../../../contracts' +import type { RewardSplitterMulticallBaseInput } from '../../../../contracts' import type { ClaimRewardsInput } from './types' import getSharesFromAssets from './getSharesFromAssets' @@ -14,9 +15,8 @@ export const commonLogic = async (values: ClaimRewardsInput) => { validateArgs.address({ vaultAddress, userAddress, rewardSplitterAddress }) validateArgs.bigint({ assets }) - const baseMulticall = { + const baseMulticall: RewardSplitterMulticallBaseInput = { rewardSplitterContract: contracts.helpers.createRewardSplitter(rewardSplitterAddress), - keeperContract: contracts.base.keeper, vaultAddress, userAddress, options, diff --git a/src/methods/rewardSplitter/transactions/claimRewards/getSharesFromAssets.ts b/src/methods/rewardSplitter/transactions/claimRewards/getSharesFromAssets.ts index 1bf59362..ebec80e7 100644 --- a/src/methods/rewardSplitter/transactions/claimRewards/getSharesFromAssets.ts +++ b/src/methods/rewardSplitter/transactions/claimRewards/getSharesFromAssets.ts @@ -24,7 +24,6 @@ const getSharesFromAssets = async (input: GetSharesFromAssetsInput) => { options, userAddress, vaultAddress, - keeperContract: contracts.base.keeper, vaultContract: contracts.helpers.createVault(vaultAddress), }) diff --git a/src/methods/rewardSplitter/transactions/updateFeeRecipients/common.ts b/src/methods/rewardSplitter/transactions/updateFeeRecipients/common.ts index 3bf6d601..a7e48819 100644 --- a/src/methods/rewardSplitter/transactions/updateFeeRecipients/common.ts +++ b/src/methods/rewardSplitter/transactions/updateFeeRecipients/common.ts @@ -3,6 +3,7 @@ import { isAddress } from 'ethers' import vault from '../../../vault' import { validateArgs } from '../../../../utils' import { rewardSplitterMulticall } from '../../../../contracts' +import type { RewardSplitterMulticallBaseInput } from '../../../../contracts' import { checkAdminAccess } from '../../../vault/transactions/util' import type { FeeRecipient, UpdateFeeRecipientsInput } from './types' @@ -41,9 +42,8 @@ export const commonLogic = async (values: UpdateFeeRecipientsInput) => { await checkAdminAccess(values) - const baseMulticall = { + const baseMulticall: RewardSplitterMulticallBaseInput = { rewardSplitterContract: contracts.helpers.createRewardSplitter(rewardSplitterAddress), - keeperContract: contracts.base.keeper, vaultAddress, userAddress, options, diff --git a/src/methods/vault/requests/getExitQueuePositions/parseExitRequests.spec.ts b/src/methods/vault/requests/getExitQueuePositions/parseExitRequests.spec.ts index d6fb3f40..e81771af 100644 --- a/src/methods/vault/requests/getExitQueuePositions/parseExitRequests.spec.ts +++ b/src/methods/vault/requests/getExitQueuePositions/parseExitRequests.spec.ts @@ -20,7 +20,7 @@ describe('parseExitRequests function', () => { const network = Network.Holesky const config = configs[network] - const provider = new JsonRpcProvider(config.network.url) + const provider = new JsonRpcProvider('') const contracts = createContracts({ provider, config }) const input: ParseExitRequestsInput = { diff --git a/src/methods/vault/requests/getStakeBalance.ts b/src/methods/vault/requests/getStakeBalance.ts index a1ac5b76..59eaedeb 100644 --- a/src/methods/vault/requests/getStakeBalance.ts +++ b/src/methods/vault/requests/getStakeBalance.ts @@ -29,7 +29,6 @@ const getStakeBalance = async (values: GetStakeBalanceInput) => { userAddress, vaultAddress, vaultContract, - keeperContract: contracts.base.keeper, request: { callStatic: true, params: [ diff --git a/src/methods/vault/requests/getVault/modifyVault.spec.ts b/src/methods/vault/requests/getVault/modifyVault.spec.ts index 03b8effd..784e31b9 100644 --- a/src/methods/vault/requests/getVault/modifyVault.spec.ts +++ b/src/methods/vault/requests/getVault/modifyVault.spec.ts @@ -29,6 +29,7 @@ describe('modifyVault', () => { capacity: '1000000000000000', validatorsRoot: 'mockValidators', description: 'This is a mock vault', + isCollateralized: true, admin: '0xeefffd4c23d2e8c845870e273861e7d60df49663', address: '0xeefffd4c23d2e8c845870e273861e7d60df49663', mevEscrow: '0xeefffd4c23d2e8c845870e273861e7d60df49663', @@ -40,6 +41,10 @@ describe('modifyVault', () => { depositDataManager: '0xeefffd4c23d2e8c845870e273861e7d60df49663', restakeOperatorsManager: '0xeefffd4c23d2e8c845870e273861e7d60df49663', restakeWithdrawalsManager: '0xeefffd4c23d2e8c845870e273861e7d60df49663', + osTokenConfig: { + ltvPercent: '0', + liqThresholdPercent: '0', + }, }, } diff --git a/src/methods/vault/transactions/claimExitQueue/common.ts b/src/methods/vault/transactions/claimExitQueue/common.ts index d03f8542..17424917 100644 --- a/src/methods/vault/transactions/claimExitQueue/common.ts +++ b/src/methods/vault/transactions/claimExitQueue/common.ts @@ -1,5 +1,6 @@ import { validateArgs } from '../../../../utils' import { vaultMulticall } from '../../../../contracts' +import type { VaultMulticallBaseInput } from '../../../../contracts' import type { ClaimExitQueueInput } from './types' @@ -17,9 +18,8 @@ export const commonLogic = (values: ClaimExitQueueInput) => { validatePositions(positions) - const baseMulticallArgs = { + const baseMulticallArgs: VaultMulticallBaseInput = { vaultContract: contracts.helpers.createVault(vaultAddress), - keeperContract: contracts.base.keeper, vaultAddress, userAddress, options, diff --git a/src/methods/vault/transactions/deposit/otherToken/common.ts b/src/methods/vault/transactions/deposit/otherToken/common.ts index 7262c1aa..0b02d0a2 100644 --- a/src/methods/vault/transactions/deposit/otherToken/common.ts +++ b/src/methods/vault/transactions/deposit/otherToken/common.ts @@ -3,6 +3,7 @@ import { ZeroAddress } from 'ethers' import type { DepositInput } from '../types' import { validateArgs } from '../../../../../utils' import { vaultMulticall } from '../../../../../contracts' +import type { VaultMulticallBaseInput } from '../../../../../contracts' export const commonLogic = (values: DepositInput) => { @@ -18,12 +19,15 @@ export const commonLogic = (values: DepositInput) => { }, ] - return { + const baseInput: VaultMulticallBaseInput = { vaultContract: contracts.helpers.createOtherTokenVault(vaultAddress), - keeperContract: contracts.base.keeper, - request: { params }, vaultAddress, userAddress, options, } + + return { + ...baseInput, + request: { params }, + } } diff --git a/src/methods/vault/transactions/operate/common.ts b/src/methods/vault/transactions/operate/common.ts index 3c08e247..2f5d4663 100644 --- a/src/methods/vault/transactions/operate/common.ts +++ b/src/methods/vault/transactions/operate/common.ts @@ -1,6 +1,7 @@ import type { MulticallTransactionInput } from './types' import { validateArgs } from '../../../../utils' import { vaultMulticall } from '../../../../contracts' +import type { VaultMulticallBaseInput } from '../../../../contracts' import { getMetadataParams, @@ -62,8 +63,7 @@ export const commonLogic = async (values: MulticallTransactionInput) => { } } - const baseMulticall = { - keeperContract: contracts.base.keeper, + const baseMulticall: VaultMulticallBaseInput = { vaultContract, vaultAddress, userAddress, diff --git a/src/methods/vault/transactions/withdraw/common.ts b/src/methods/vault/transactions/withdraw/common.ts index 845707c2..517a8097 100644 --- a/src/methods/vault/transactions/withdraw/common.ts +++ b/src/methods/vault/transactions/withdraw/common.ts @@ -1,6 +1,6 @@ import type { WithdrawInput } from './types' import { validateArgs } from '../../../../utils' -import { vaultMulticall } from '../../../../contracts' +import { vaultMulticall, VaultMulticallBaseInput } from '../../../../contracts' export const commonLogic = async (values: WithdrawInput) => { @@ -19,8 +19,7 @@ export const commonLogic = async (values: WithdrawInput) => { // the funds are always withdrawn via a queue const isV1Version = version === 1 - const baseMulticallArgs: Omit[0], 'request'> = { - keeperContract: contracts.base.keeper, + const baseMulticallArgs: VaultMulticallBaseInput = { vaultContract, vaultAddress, userAddress,