Skip to content

Commit 73bdd0a

Browse files
authored
add v2 to getVaultVersion, update holesky factories, add queuedShares (#190)
1 parent 95e9d4c commit 73bdd0a

File tree

5 files changed

+20
-6
lines changed

5 files changed

+20
-6
lines changed

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -560,13 +560,15 @@ type Output = {
560560
createdAt: number
561561
feePercent: number
562562
isPrivate: boolean
563+
isGenesis: boolean
563564
isRestake: boolean
564565
vaultAdmin: string
565566
totalAssets: string
566567
performance: number
567568
feeRecipient: string
568569
vaultAddress: string
569570
mevRecipient: string
571+
queuedShares: string
570572
whitelistCount: number
571573
blocklistCount: number
572574
imageUrl: string | null
@@ -597,6 +599,7 @@ type Output = {
597599
| `feePercent` | Commission rate |
598600
| `isPrivate` | Whether the vault is private |
599601
| `isGenesis` | Is a stakewise vault |
602+
| `queuedShares` | The total number of queued shares|
600603
| `isRestake` | Indicates whether the Vault is a restaking vault |
601604
| `isBlocklist` | Whether the vault has blocklist |
602605
| `vaultAdmin` | Vault administrator address |

changelog/next-release.md

+2
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,15 @@ type AddedOutput = {
1010
thresholdPercent: string
1111
}
1212
isGenesis: boolean
13+
queuedShares: string
1314
}
1415
```
1516
1617
| Name | Description |
1718
|------|-------------|
1819
| `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 |
1920
| `isGenesis` | This vault is owned by stakewise |
21+
| `queuedShares` | The total number of queued shares |
2022
2123
---
2224
### 2. `sdk.vault.getHarvestParams`

src/graphql/subgraph/vault/vaultQuery.graphql

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ query Vault($address: ID!) {
2727
whitelister
2828
tokenSymbol
2929
feeRecipient
30+
queuedShares
3031
blocklistCount
3132
whitelistCount
3233
depositDataRoot

src/utils/configs/holesky.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,14 @@ export default {
3535
rewardSplitterFactory: '0x2Ed24638b3aB48cF0076f19199c78A62bfEb5889',
3636
},
3737
factories: {
38-
vault: '0xA1424Bd00e6940A58B1232ad4160A77dD0AC3099',
39-
erc20Vault: '0xc6e7d05B3F6e73E3A86C6deAE0Da1fce993cF833',
38+
vault: '0x4E3D8197c2cb9bCd29e3DCeAE3670d3d5e774017',
39+
erc20Vault: '0x1bE3Ad178d85CE1b6a7fCF5baEFe68F26541b07C',
4040

41-
privateVault: '0x8023518b2192FB5384DAdc596765B3dD1cdFe471',
42-
erc20PrivateVault: '0x481f28C0D733614aF87897E43d0D52C451799592',
41+
privateVault: '0x7a4F9912a812d932da57d73Cb5E5784B2c1cBA4A',
42+
erc20PrivateVault: '0x3573a482D0e50f85F6B09E4DB404Ce94Da760033',
4343

44-
blocklistVault: '0x90a9428b8c58cA80B28aAF46B936D42e87797449',
45-
erc20BlocklistVault: '0x82FE8C78CaE0013471179e76224ef89941bAaa75',
44+
blocklistVault: '0x58FDD303ab66722130C01533e7A1177f2b3a2949',
45+
erc20BlocklistVault: '0x32634dEc69D4523D2f980Be92494dC03bD4C9fce',
4646
},
4747
special: {
4848
stakeCalculator: '0x90b82e4b3aa385b4a02b7ebc1892a4bed6b5c465',

src/utils/getVaultVersion.ts

+8
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,17 @@ const getVaultVersion = async (values: Input) => {
1010

1111
const version = await vaultContract.version()
1212
const isV1Version = version === 1n
13+
const isV2Version = version === 2n
14+
15+
const isMoreV1 = version > 1n
16+
const isMoreV2 = version > 2n
1317

1418
return {
19+
version: Number(version),
1520
isV1Version,
21+
isV2Version,
22+
isMoreV1,
23+
isMoreV2,
1624
}
1725
}
1826

0 commit comments

Comments
 (0)