hedge-web3 0.1.50 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/declarations/Constants.d.ts +2 -1
- package/declarations/idl/vault.d.ts +192 -41
- package/declarations/index.d.ts +1 -0
- package/declarations/instructions/claimLiquidationPoolPosition.d.ts +1 -1
- package/declarations/instructions/claimStakingPoolPosition.d.ts +1 -1
- package/declarations/instructions/closeClaimedLiquidationPoolPosition.d.ts +5 -0
- package/declarations/instructions/closeLiquidationPoolPosition.d.ts +1 -1
- package/declarations/instructions/createStakingPool.d.ts +1 -1
- package/declarations/instructions/createVault.d.ts +1 -1
- package/declarations/instructions/depositLiquidationPool.d.ts +1 -1
- package/declarations/instructions/depositStakingPool.d.ts +1 -1
- package/declarations/instructions/depositVault.d.ts +1 -1
- package/declarations/instructions/initHedgeFoundation.d.ts +1 -1
- package/declarations/instructions/liquidateVault.d.ts +2 -2
- package/declarations/instructions/loanVault.d.ts +1 -1
- package/declarations/instructions/redeemVault.d.ts +1 -1
- package/declarations/instructions/refreshOraclePrice.d.ts +3 -3
- package/declarations/instructions/repayVault.d.ts +1 -1
- package/declarations/instructions/setHalted.d.ts +1 -1
- package/declarations/instructions/updateVaultType.d.ts +4 -1
- package/declarations/instructions/withdrawStakingPool.d.ts +1 -1
- package/declarations/instructions/withdrawVault.d.ts +1 -1
- package/declarations/state/VaultAccount.d.ts +9 -6
- package/declarations/utils/getLinkedListAccounts.d.ts +1 -1
- package/lib/Constants.js +3 -2
- package/lib/idl/vault.js +192 -41
- package/lib/index.js +1 -0
- package/lib/instructions/claimLiquidationPoolPosition.js +5 -1
- package/lib/instructions/claimStakingPoolPosition.js +5 -1
- package/lib/instructions/closeClaimedLiquidationPoolPosition.js +38 -0
- package/lib/instructions/closeLiquidationPoolPosition.js +5 -1
- package/lib/instructions/createStakingPool.js +5 -1
- package/lib/instructions/createVault.js +5 -1
- package/lib/instructions/depositLiquidationPool.js +5 -1
- package/lib/instructions/depositStakingPool.js +5 -1
- package/lib/instructions/depositVault.js +12 -8
- package/lib/instructions/initHedgeFoundation.js +5 -1
- package/lib/instructions/initHedgeFoundationTokens.js +5 -1
- package/lib/instructions/liquidateVault.js +10 -8
- package/lib/instructions/loanVault.js +9 -6
- package/lib/instructions/redeemVault.js +9 -6
- package/lib/instructions/refreshOraclePrice.js +8 -3
- package/lib/instructions/repayVault.js +9 -6
- package/lib/instructions/setHalted.js +5 -1
- package/lib/instructions/updateVaultType.js +9 -2
- package/lib/instructions/withdrawStakingPool.js +5 -1
- package/lib/instructions/withdrawVault.js +9 -6
- package/lib/state/VaultAccount.js +28 -32
- package/lib/utils/getLinkedListAccounts.js +54 -57
- package/package.json +1 -1
- package/src/Constants.ts +2 -1
- package/src/idl/vault.ts +384 -82
- package/src/index.ts +1 -0
- package/src/instructions/claimLiquidationPoolPosition.ts +3 -2
- package/src/instructions/claimStakingPoolPosition.ts +3 -2
- package/src/instructions/closeClaimedLiquidationPoolPosition.ts +31 -0
- package/src/instructions/closeLiquidationPoolPosition.ts +3 -2
- package/src/instructions/createStakingPool.ts +3 -2
- package/src/instructions/createVault.ts +3 -2
- package/src/instructions/depositLiquidationPool.ts +3 -2
- package/src/instructions/depositStakingPool.ts +3 -2
- package/src/instructions/depositVault.ts +11 -11
- package/src/instructions/initHedgeFoundation.ts +3 -2
- package/src/instructions/initHedgeFoundationTokens.ts +2 -1
- package/src/instructions/liquidateVault.ts +11 -10
- package/src/instructions/loanVault.ts +11 -9
- package/src/instructions/redeemVault.ts +7 -7
- package/src/instructions/refreshOraclePrice.ts +9 -6
- package/src/instructions/repayVault.ts +7 -7
- package/src/instructions/setHalted.ts +3 -2
- package/src/instructions/updateVaultType.ts +10 -2
- package/src/instructions/withdrawStakingPool.ts +5 -3
- package/src/instructions/withdrawVault.ts +7 -7
- package/src/state/VaultAccount.ts +37 -32
- package/src/state/VaultType.ts +62 -0
- package/src/utils/getLinkedListAccounts.ts +61 -60
- package/src/utils/sendAndConfirmWithDebug.ts +27 -0
package/src/idl/vault.ts
CHANGED
@@ -1177,6 +1177,11 @@ export type Vault = {
|
|
1177
1177
|
"name": "systemProgram",
|
1178
1178
|
"isMut": false,
|
1179
1179
|
"isSigner": false
|
1180
|
+
},
|
1181
|
+
{
|
1182
|
+
"name": "chainlinkProgram",
|
1183
|
+
"isMut": false,
|
1184
|
+
"isSigner": false
|
1180
1185
|
}
|
1181
1186
|
],
|
1182
1187
|
"args": [
|
@@ -1649,6 +1654,74 @@ export type Vault = {
|
|
1649
1654
|
}
|
1650
1655
|
}
|
1651
1656
|
]
|
1657
|
+
},
|
1658
|
+
{
|
1659
|
+
"name": "adminMigrateVault",
|
1660
|
+
"accounts": [
|
1661
|
+
{
|
1662
|
+
"name": "payer",
|
1663
|
+
"isMut": true,
|
1664
|
+
"isSigner": true
|
1665
|
+
},
|
1666
|
+
{
|
1667
|
+
"name": "vaultSystemState",
|
1668
|
+
"isMut": true,
|
1669
|
+
"isSigner": false
|
1670
|
+
},
|
1671
|
+
{
|
1672
|
+
"name": "vaultAccount",
|
1673
|
+
"isMut": true,
|
1674
|
+
"isSigner": false
|
1675
|
+
},
|
1676
|
+
{
|
1677
|
+
"name": "vaultTypeAccount",
|
1678
|
+
"isMut": true,
|
1679
|
+
"isSigner": false
|
1680
|
+
}
|
1681
|
+
],
|
1682
|
+
"args": []
|
1683
|
+
},
|
1684
|
+
{
|
1685
|
+
"name": "adminMigrateOracle",
|
1686
|
+
"accounts": [
|
1687
|
+
{
|
1688
|
+
"name": "payer",
|
1689
|
+
"isMut": true,
|
1690
|
+
"isSigner": true
|
1691
|
+
},
|
1692
|
+
{
|
1693
|
+
"name": "vaultSystemState",
|
1694
|
+
"isMut": true,
|
1695
|
+
"isSigner": false
|
1696
|
+
},
|
1697
|
+
{
|
1698
|
+
"name": "oracleInfoAccount",
|
1699
|
+
"isMut": true,
|
1700
|
+
"isSigner": false
|
1701
|
+
},
|
1702
|
+
{
|
1703
|
+
"name": "vaultTypeAccount",
|
1704
|
+
"isMut": true,
|
1705
|
+
"isSigner": false
|
1706
|
+
}
|
1707
|
+
],
|
1708
|
+
"args": []
|
1709
|
+
},
|
1710
|
+
{
|
1711
|
+
"name": "closeClaimedLiquidationPool",
|
1712
|
+
"accounts": [
|
1713
|
+
{
|
1714
|
+
"name": "payer",
|
1715
|
+
"isMut": true,
|
1716
|
+
"isSigner": true
|
1717
|
+
},
|
1718
|
+
{
|
1719
|
+
"name": "poolPosition",
|
1720
|
+
"isMut": true,
|
1721
|
+
"isSigner": false
|
1722
|
+
}
|
1723
|
+
],
|
1724
|
+
"args": []
|
1652
1725
|
}
|
1653
1726
|
],
|
1654
1727
|
"accounts": [
|
@@ -1717,7 +1790,7 @@ export type Vault = {
|
|
1717
1790
|
"type": {
|
1718
1791
|
"array": [
|
1719
1792
|
"u128",
|
1720
|
-
|
1793
|
+
128
|
1721
1794
|
]
|
1722
1795
|
}
|
1723
1796
|
},
|
@@ -1777,10 +1850,6 @@ export type Vault = {
|
|
1777
1850
|
"type": {
|
1778
1851
|
"kind": "struct",
|
1779
1852
|
"fields": [
|
1780
|
-
{
|
1781
|
-
"name": "state",
|
1782
|
-
"type": "u64"
|
1783
|
-
},
|
1784
1853
|
{
|
1785
1854
|
"name": "era",
|
1786
1855
|
"type": "publicKey"
|
@@ -1789,14 +1858,6 @@ export type Vault = {
|
|
1789
1858
|
"name": "ownerAccount",
|
1790
1859
|
"type": "publicKey"
|
1791
1860
|
},
|
1792
|
-
{
|
1793
|
-
"name": "deposit",
|
1794
|
-
"type": "u64"
|
1795
|
-
},
|
1796
|
-
{
|
1797
|
-
"name": "closedUsh",
|
1798
|
-
"type": "u64"
|
1799
|
-
},
|
1800
1861
|
{
|
1801
1862
|
"name": "productSnapshotEntry",
|
1802
1863
|
"type": "u128"
|
@@ -1810,7 +1871,7 @@ export type Vault = {
|
|
1810
1871
|
"type": {
|
1811
1872
|
"array": [
|
1812
1873
|
"u128",
|
1813
|
-
|
1874
|
+
128
|
1814
1875
|
]
|
1815
1876
|
}
|
1816
1877
|
},
|
@@ -1819,7 +1880,7 @@ export type Vault = {
|
|
1819
1880
|
"type": {
|
1820
1881
|
"array": [
|
1821
1882
|
"u128",
|
1822
|
-
|
1883
|
+
128
|
1823
1884
|
]
|
1824
1885
|
}
|
1825
1886
|
},
|
@@ -1827,6 +1888,14 @@ export type Vault = {
|
|
1827
1888
|
"name": "hedgeRewardsSnapshotAccum",
|
1828
1889
|
"type": "u128"
|
1829
1890
|
},
|
1891
|
+
{
|
1892
|
+
"name": "deposit",
|
1893
|
+
"type": "u64"
|
1894
|
+
},
|
1895
|
+
{
|
1896
|
+
"name": "closedUsh",
|
1897
|
+
"type": "u64"
|
1898
|
+
},
|
1830
1899
|
{
|
1831
1900
|
"name": "timestampOpened",
|
1832
1901
|
"type": "u64"
|
@@ -1834,6 +1903,12 @@ export type Vault = {
|
|
1834
1903
|
{
|
1835
1904
|
"name": "timestampClosed",
|
1836
1905
|
"type": "u64"
|
1906
|
+
},
|
1907
|
+
{
|
1908
|
+
"name": "state",
|
1909
|
+
"type": {
|
1910
|
+
"defined": "PositionState"
|
1911
|
+
}
|
1837
1912
|
}
|
1838
1913
|
]
|
1839
1914
|
}
|
@@ -1844,8 +1919,8 @@ export type Vault = {
|
|
1844
1919
|
"kind": "struct",
|
1845
1920
|
"fields": [
|
1846
1921
|
{
|
1847
|
-
"name": "
|
1848
|
-
"type": "
|
1922
|
+
"name": "vaultType",
|
1923
|
+
"type": "publicKey"
|
1849
1924
|
},
|
1850
1925
|
{
|
1851
1926
|
"name": "oraclePyth",
|
@@ -1858,6 +1933,22 @@ export type Vault = {
|
|
1858
1933
|
{
|
1859
1934
|
"name": "oracleSwitchboard",
|
1860
1935
|
"type": "publicKey"
|
1936
|
+
},
|
1937
|
+
{
|
1938
|
+
"name": "priorityPyth",
|
1939
|
+
"type": "i8"
|
1940
|
+
},
|
1941
|
+
{
|
1942
|
+
"name": "priorityChainlink",
|
1943
|
+
"type": "i8"
|
1944
|
+
},
|
1945
|
+
{
|
1946
|
+
"name": "prioritySwitchboard",
|
1947
|
+
"type": "i8"
|
1948
|
+
},
|
1949
|
+
{
|
1950
|
+
"name": "vaultTypeName",
|
1951
|
+
"type": "string"
|
1861
1952
|
}
|
1862
1953
|
]
|
1863
1954
|
}
|
@@ -1880,7 +1971,7 @@ export type Vault = {
|
|
1880
1971
|
"type": {
|
1881
1972
|
"array": [
|
1882
1973
|
"u128",
|
1883
|
-
|
1974
|
+
128
|
1884
1975
|
]
|
1885
1976
|
}
|
1886
1977
|
},
|
@@ -1889,7 +1980,7 @@ export type Vault = {
|
|
1889
1980
|
"type": {
|
1890
1981
|
"array": [
|
1891
1982
|
"u128",
|
1892
|
-
|
1983
|
+
128
|
1893
1984
|
]
|
1894
1985
|
}
|
1895
1986
|
},
|
@@ -1977,7 +2068,7 @@ export type Vault = {
|
|
1977
2068
|
"type": {
|
1978
2069
|
"array": [
|
1979
2070
|
"u128",
|
1980
|
-
|
2071
|
+
128
|
1981
2072
|
]
|
1982
2073
|
}
|
1983
2074
|
},
|
@@ -2061,7 +2152,7 @@ export type Vault = {
|
|
2061
2152
|
},
|
2062
2153
|
{
|
2063
2154
|
"name": "totalUshSupply",
|
2064
|
-
"type": "
|
2155
|
+
"type": "u128"
|
2065
2156
|
},
|
2066
2157
|
{
|
2067
2158
|
"name": "totalVaults",
|
@@ -2101,10 +2192,6 @@ export type Vault = {
|
|
2101
2192
|
"type": {
|
2102
2193
|
"kind": "struct",
|
2103
2194
|
"fields": [
|
2104
|
-
{
|
2105
|
-
"name": "collateralType",
|
2106
|
-
"type": "string"
|
2107
|
-
},
|
2108
2195
|
{
|
2109
2196
|
"name": "collateralMint",
|
2110
2197
|
"type": "publicKey"
|
@@ -2177,15 +2264,27 @@ export type Vault = {
|
|
2177
2264
|
"name": "interestRatePerSecond",
|
2178
2265
|
"type": "u128"
|
2179
2266
|
},
|
2267
|
+
{
|
2268
|
+
"name": "deprecated",
|
2269
|
+
"type": "bool"
|
2270
|
+
},
|
2271
|
+
{
|
2272
|
+
"name": "totalFeesAccumulatedUsh",
|
2273
|
+
"type": "u128"
|
2274
|
+
},
|
2275
|
+
{
|
2276
|
+
"name": "totalFeesAccumulatedCollateral",
|
2277
|
+
"type": "u128"
|
2278
|
+
},
|
2279
|
+
{
|
2280
|
+
"name": "vaultTypeName",
|
2281
|
+
"type": "string"
|
2282
|
+
},
|
2180
2283
|
{
|
2181
2284
|
"name": "firstVaultToRedeem",
|
2182
2285
|
"type": {
|
2183
2286
|
"option": "publicKey"
|
2184
2287
|
}
|
2185
|
-
},
|
2186
|
-
{
|
2187
|
-
"name": "deprecated",
|
2188
|
-
"type": "bool"
|
2189
2288
|
}
|
2190
2289
|
]
|
2191
2290
|
}
|
@@ -2212,12 +2311,14 @@ export type Vault = {
|
|
2212
2311
|
"type": "u64"
|
2213
2312
|
},
|
2214
2313
|
{
|
2215
|
-
"name": "
|
2216
|
-
"type":
|
2314
|
+
"name": "vaultStatus",
|
2315
|
+
"type": {
|
2316
|
+
"defined": "VaultStatus"
|
2317
|
+
}
|
2217
2318
|
},
|
2218
2319
|
{
|
2219
|
-
"name": "
|
2220
|
-
"type": "
|
2320
|
+
"name": "vaultType",
|
2321
|
+
"type": "publicKey"
|
2221
2322
|
},
|
2222
2323
|
{
|
2223
2324
|
"name": "bump",
|
@@ -2241,12 +2342,6 @@ export type Vault = {
|
|
2241
2342
|
"defined": "CurrencyType"
|
2242
2343
|
}
|
2243
2344
|
},
|
2244
|
-
{
|
2245
|
-
"name": "vaultStatus",
|
2246
|
-
"type": {
|
2247
|
-
"defined": "VaultStatus"
|
2248
|
-
}
|
2249
|
-
},
|
2250
2345
|
{
|
2251
2346
|
"name": "timeCreated",
|
2252
2347
|
"type": "u64"
|
@@ -2255,6 +2350,14 @@ export type Vault = {
|
|
2255
2350
|
"name": "timeLastInteraction",
|
2256
2351
|
"type": "u64"
|
2257
2352
|
},
|
2353
|
+
{
|
2354
|
+
"name": "vaultTypeName",
|
2355
|
+
"type": "string"
|
2356
|
+
},
|
2357
|
+
{
|
2358
|
+
"name": "pdaSalt",
|
2359
|
+
"type": "string"
|
2360
|
+
},
|
2258
2361
|
{
|
2259
2362
|
"name": "nextVaultToRedeem",
|
2260
2363
|
"type": {
|
@@ -2349,6 +2452,24 @@ export type Vault = {
|
|
2349
2452
|
"option": "publicKey"
|
2350
2453
|
}
|
2351
2454
|
},
|
2455
|
+
{
|
2456
|
+
"name": "priorityChainlink",
|
2457
|
+
"type": {
|
2458
|
+
"option": "i8"
|
2459
|
+
}
|
2460
|
+
},
|
2461
|
+
{
|
2462
|
+
"name": "priorityPyth",
|
2463
|
+
"type": {
|
2464
|
+
"option": "i8"
|
2465
|
+
}
|
2466
|
+
},
|
2467
|
+
{
|
2468
|
+
"name": "prioritySwitchboard",
|
2469
|
+
"type": {
|
2470
|
+
"option": "i8"
|
2471
|
+
}
|
2472
|
+
},
|
2352
2473
|
{
|
2353
2474
|
"name": "deprecated",
|
2354
2475
|
"type": {
|
@@ -2673,8 +2794,8 @@ export type Vault = {
|
|
2673
2794
|
},
|
2674
2795
|
{
|
2675
2796
|
"code": 6020,
|
2676
|
-
"name": "
|
2677
|
-
"msg": "Can only redeem
|
2797
|
+
"name": "NotRedeemingLowestCollateralRatioVault",
|
2798
|
+
"msg": "Can only redeem lowest collateral ratio vault in system."
|
2678
2799
|
},
|
2679
2800
|
{
|
2680
2801
|
"code": 6021,
|
@@ -2688,8 +2809,38 @@ export type Vault = {
|
|
2688
2809
|
},
|
2689
2810
|
{
|
2690
2811
|
"code": 6023,
|
2812
|
+
"name": "InvalidSaltLength",
|
2813
|
+
"msg": "Salt for new vaults must be of length 8"
|
2814
|
+
},
|
2815
|
+
{
|
2816
|
+
"code": 6024,
|
2817
|
+
"name": "InvalidNameLength",
|
2818
|
+
"msg": "Name for new vault type must be length 16"
|
2819
|
+
},
|
2820
|
+
{
|
2821
|
+
"code": 6025,
|
2691
2822
|
"name": "UpdateVaultTypeBadMaxDebtExtended",
|
2692
2823
|
"msg": "New Max debt extended value is less than the current debt!"
|
2824
|
+
},
|
2825
|
+
{
|
2826
|
+
"code": 6026,
|
2827
|
+
"name": "UpdateVaultTypeNoEnabledOracles",
|
2828
|
+
"msg": "No Enabled Oracles!"
|
2829
|
+
},
|
2830
|
+
{
|
2831
|
+
"code": 6027,
|
2832
|
+
"name": "UpdateVaultTypeDuplicateOraclePriorities",
|
2833
|
+
"msg": "Duplicate Oracle Priorities"
|
2834
|
+
},
|
2835
|
+
{
|
2836
|
+
"code": 6028,
|
2837
|
+
"name": "UpdateVaultTypeInvalidOraclePriority",
|
2838
|
+
"msg": "Invalid Oracle Priority"
|
2839
|
+
},
|
2840
|
+
{
|
2841
|
+
"code": 6029,
|
2842
|
+
"name": "OracleUpdateFailed",
|
2843
|
+
"msg": "OracleUpdateFailed"
|
2693
2844
|
}
|
2694
2845
|
]
|
2695
2846
|
};
|
@@ -3873,6 +4024,11 @@ export const IDL: Vault = {
|
|
3873
4024
|
"name": "systemProgram",
|
3874
4025
|
"isMut": false,
|
3875
4026
|
"isSigner": false
|
4027
|
+
},
|
4028
|
+
{
|
4029
|
+
"name": "chainlinkProgram",
|
4030
|
+
"isMut": false,
|
4031
|
+
"isSigner": false
|
3876
4032
|
}
|
3877
4033
|
],
|
3878
4034
|
"args": [
|
@@ -4345,6 +4501,74 @@ export const IDL: Vault = {
|
|
4345
4501
|
}
|
4346
4502
|
}
|
4347
4503
|
]
|
4504
|
+
},
|
4505
|
+
{
|
4506
|
+
"name": "adminMigrateVault",
|
4507
|
+
"accounts": [
|
4508
|
+
{
|
4509
|
+
"name": "payer",
|
4510
|
+
"isMut": true,
|
4511
|
+
"isSigner": true
|
4512
|
+
},
|
4513
|
+
{
|
4514
|
+
"name": "vaultSystemState",
|
4515
|
+
"isMut": true,
|
4516
|
+
"isSigner": false
|
4517
|
+
},
|
4518
|
+
{
|
4519
|
+
"name": "vaultAccount",
|
4520
|
+
"isMut": true,
|
4521
|
+
"isSigner": false
|
4522
|
+
},
|
4523
|
+
{
|
4524
|
+
"name": "vaultTypeAccount",
|
4525
|
+
"isMut": true,
|
4526
|
+
"isSigner": false
|
4527
|
+
}
|
4528
|
+
],
|
4529
|
+
"args": []
|
4530
|
+
},
|
4531
|
+
{
|
4532
|
+
"name": "adminMigrateOracle",
|
4533
|
+
"accounts": [
|
4534
|
+
{
|
4535
|
+
"name": "payer",
|
4536
|
+
"isMut": true,
|
4537
|
+
"isSigner": true
|
4538
|
+
},
|
4539
|
+
{
|
4540
|
+
"name": "vaultSystemState",
|
4541
|
+
"isMut": true,
|
4542
|
+
"isSigner": false
|
4543
|
+
},
|
4544
|
+
{
|
4545
|
+
"name": "oracleInfoAccount",
|
4546
|
+
"isMut": true,
|
4547
|
+
"isSigner": false
|
4548
|
+
},
|
4549
|
+
{
|
4550
|
+
"name": "vaultTypeAccount",
|
4551
|
+
"isMut": true,
|
4552
|
+
"isSigner": false
|
4553
|
+
}
|
4554
|
+
],
|
4555
|
+
"args": []
|
4556
|
+
},
|
4557
|
+
{
|
4558
|
+
"name": "closeClaimedLiquidationPool",
|
4559
|
+
"accounts": [
|
4560
|
+
{
|
4561
|
+
"name": "payer",
|
4562
|
+
"isMut": true,
|
4563
|
+
"isSigner": true
|
4564
|
+
},
|
4565
|
+
{
|
4566
|
+
"name": "poolPosition",
|
4567
|
+
"isMut": true,
|
4568
|
+
"isSigner": false
|
4569
|
+
}
|
4570
|
+
],
|
4571
|
+
"args": []
|
4348
4572
|
}
|
4349
4573
|
],
|
4350
4574
|
"accounts": [
|
@@ -4413,7 +4637,7 @@ export const IDL: Vault = {
|
|
4413
4637
|
"type": {
|
4414
4638
|
"array": [
|
4415
4639
|
"u128",
|
4416
|
-
|
4640
|
+
128
|
4417
4641
|
]
|
4418
4642
|
}
|
4419
4643
|
},
|
@@ -4473,10 +4697,6 @@ export const IDL: Vault = {
|
|
4473
4697
|
"type": {
|
4474
4698
|
"kind": "struct",
|
4475
4699
|
"fields": [
|
4476
|
-
{
|
4477
|
-
"name": "state",
|
4478
|
-
"type": "u64"
|
4479
|
-
},
|
4480
4700
|
{
|
4481
4701
|
"name": "era",
|
4482
4702
|
"type": "publicKey"
|
@@ -4485,14 +4705,6 @@ export const IDL: Vault = {
|
|
4485
4705
|
"name": "ownerAccount",
|
4486
4706
|
"type": "publicKey"
|
4487
4707
|
},
|
4488
|
-
{
|
4489
|
-
"name": "deposit",
|
4490
|
-
"type": "u64"
|
4491
|
-
},
|
4492
|
-
{
|
4493
|
-
"name": "closedUsh",
|
4494
|
-
"type": "u64"
|
4495
|
-
},
|
4496
4708
|
{
|
4497
4709
|
"name": "productSnapshotEntry",
|
4498
4710
|
"type": "u128"
|
@@ -4506,7 +4718,7 @@ export const IDL: Vault = {
|
|
4506
4718
|
"type": {
|
4507
4719
|
"array": [
|
4508
4720
|
"u128",
|
4509
|
-
|
4721
|
+
128
|
4510
4722
|
]
|
4511
4723
|
}
|
4512
4724
|
},
|
@@ -4515,7 +4727,7 @@ export const IDL: Vault = {
|
|
4515
4727
|
"type": {
|
4516
4728
|
"array": [
|
4517
4729
|
"u128",
|
4518
|
-
|
4730
|
+
128
|
4519
4731
|
]
|
4520
4732
|
}
|
4521
4733
|
},
|
@@ -4523,6 +4735,14 @@ export const IDL: Vault = {
|
|
4523
4735
|
"name": "hedgeRewardsSnapshotAccum",
|
4524
4736
|
"type": "u128"
|
4525
4737
|
},
|
4738
|
+
{
|
4739
|
+
"name": "deposit",
|
4740
|
+
"type": "u64"
|
4741
|
+
},
|
4742
|
+
{
|
4743
|
+
"name": "closedUsh",
|
4744
|
+
"type": "u64"
|
4745
|
+
},
|
4526
4746
|
{
|
4527
4747
|
"name": "timestampOpened",
|
4528
4748
|
"type": "u64"
|
@@ -4530,6 +4750,12 @@ export const IDL: Vault = {
|
|
4530
4750
|
{
|
4531
4751
|
"name": "timestampClosed",
|
4532
4752
|
"type": "u64"
|
4753
|
+
},
|
4754
|
+
{
|
4755
|
+
"name": "state",
|
4756
|
+
"type": {
|
4757
|
+
"defined": "PositionState"
|
4758
|
+
}
|
4533
4759
|
}
|
4534
4760
|
]
|
4535
4761
|
}
|
@@ -4540,8 +4766,8 @@ export const IDL: Vault = {
|
|
4540
4766
|
"kind": "struct",
|
4541
4767
|
"fields": [
|
4542
4768
|
{
|
4543
|
-
"name": "
|
4544
|
-
"type": "
|
4769
|
+
"name": "vaultType",
|
4770
|
+
"type": "publicKey"
|
4545
4771
|
},
|
4546
4772
|
{
|
4547
4773
|
"name": "oraclePyth",
|
@@ -4554,6 +4780,22 @@ export const IDL: Vault = {
|
|
4554
4780
|
{
|
4555
4781
|
"name": "oracleSwitchboard",
|
4556
4782
|
"type": "publicKey"
|
4783
|
+
},
|
4784
|
+
{
|
4785
|
+
"name": "priorityPyth",
|
4786
|
+
"type": "i8"
|
4787
|
+
},
|
4788
|
+
{
|
4789
|
+
"name": "priorityChainlink",
|
4790
|
+
"type": "i8"
|
4791
|
+
},
|
4792
|
+
{
|
4793
|
+
"name": "prioritySwitchboard",
|
4794
|
+
"type": "i8"
|
4795
|
+
},
|
4796
|
+
{
|
4797
|
+
"name": "vaultTypeName",
|
4798
|
+
"type": "string"
|
4557
4799
|
}
|
4558
4800
|
]
|
4559
4801
|
}
|
@@ -4576,7 +4818,7 @@ export const IDL: Vault = {
|
|
4576
4818
|
"type": {
|
4577
4819
|
"array": [
|
4578
4820
|
"u128",
|
4579
|
-
|
4821
|
+
128
|
4580
4822
|
]
|
4581
4823
|
}
|
4582
4824
|
},
|
@@ -4585,7 +4827,7 @@ export const IDL: Vault = {
|
|
4585
4827
|
"type": {
|
4586
4828
|
"array": [
|
4587
4829
|
"u128",
|
4588
|
-
|
4830
|
+
128
|
4589
4831
|
]
|
4590
4832
|
}
|
4591
4833
|
},
|
@@ -4673,7 +4915,7 @@ export const IDL: Vault = {
|
|
4673
4915
|
"type": {
|
4674
4916
|
"array": [
|
4675
4917
|
"u128",
|
4676
|
-
|
4918
|
+
128
|
4677
4919
|
]
|
4678
4920
|
}
|
4679
4921
|
},
|
@@ -4757,7 +4999,7 @@ export const IDL: Vault = {
|
|
4757
4999
|
},
|
4758
5000
|
{
|
4759
5001
|
"name": "totalUshSupply",
|
4760
|
-
"type": "
|
5002
|
+
"type": "u128"
|
4761
5003
|
},
|
4762
5004
|
{
|
4763
5005
|
"name": "totalVaults",
|
@@ -4797,10 +5039,6 @@ export const IDL: Vault = {
|
|
4797
5039
|
"type": {
|
4798
5040
|
"kind": "struct",
|
4799
5041
|
"fields": [
|
4800
|
-
{
|
4801
|
-
"name": "collateralType",
|
4802
|
-
"type": "string"
|
4803
|
-
},
|
4804
5042
|
{
|
4805
5043
|
"name": "collateralMint",
|
4806
5044
|
"type": "publicKey"
|
@@ -4873,15 +5111,27 @@ export const IDL: Vault = {
|
|
4873
5111
|
"name": "interestRatePerSecond",
|
4874
5112
|
"type": "u128"
|
4875
5113
|
},
|
5114
|
+
{
|
5115
|
+
"name": "deprecated",
|
5116
|
+
"type": "bool"
|
5117
|
+
},
|
5118
|
+
{
|
5119
|
+
"name": "totalFeesAccumulatedUsh",
|
5120
|
+
"type": "u128"
|
5121
|
+
},
|
5122
|
+
{
|
5123
|
+
"name": "totalFeesAccumulatedCollateral",
|
5124
|
+
"type": "u128"
|
5125
|
+
},
|
5126
|
+
{
|
5127
|
+
"name": "vaultTypeName",
|
5128
|
+
"type": "string"
|
5129
|
+
},
|
4876
5130
|
{
|
4877
5131
|
"name": "firstVaultToRedeem",
|
4878
5132
|
"type": {
|
4879
5133
|
"option": "publicKey"
|
4880
5134
|
}
|
4881
|
-
},
|
4882
|
-
{
|
4883
|
-
"name": "deprecated",
|
4884
|
-
"type": "bool"
|
4885
5135
|
}
|
4886
5136
|
]
|
4887
5137
|
}
|
@@ -4908,12 +5158,14 @@ export const IDL: Vault = {
|
|
4908
5158
|
"type": "u64"
|
4909
5159
|
},
|
4910
5160
|
{
|
4911
|
-
"name": "
|
4912
|
-
"type":
|
5161
|
+
"name": "vaultStatus",
|
5162
|
+
"type": {
|
5163
|
+
"defined": "VaultStatus"
|
5164
|
+
}
|
4913
5165
|
},
|
4914
5166
|
{
|
4915
|
-
"name": "
|
4916
|
-
"type": "
|
5167
|
+
"name": "vaultType",
|
5168
|
+
"type": "publicKey"
|
4917
5169
|
},
|
4918
5170
|
{
|
4919
5171
|
"name": "bump",
|
@@ -4937,12 +5189,6 @@ export const IDL: Vault = {
|
|
4937
5189
|
"defined": "CurrencyType"
|
4938
5190
|
}
|
4939
5191
|
},
|
4940
|
-
{
|
4941
|
-
"name": "vaultStatus",
|
4942
|
-
"type": {
|
4943
|
-
"defined": "VaultStatus"
|
4944
|
-
}
|
4945
|
-
},
|
4946
5192
|
{
|
4947
5193
|
"name": "timeCreated",
|
4948
5194
|
"type": "u64"
|
@@ -4951,6 +5197,14 @@ export const IDL: Vault = {
|
|
4951
5197
|
"name": "timeLastInteraction",
|
4952
5198
|
"type": "u64"
|
4953
5199
|
},
|
5200
|
+
{
|
5201
|
+
"name": "vaultTypeName",
|
5202
|
+
"type": "string"
|
5203
|
+
},
|
5204
|
+
{
|
5205
|
+
"name": "pdaSalt",
|
5206
|
+
"type": "string"
|
5207
|
+
},
|
4954
5208
|
{
|
4955
5209
|
"name": "nextVaultToRedeem",
|
4956
5210
|
"type": {
|
@@ -5045,6 +5299,24 @@ export const IDL: Vault = {
|
|
5045
5299
|
"option": "publicKey"
|
5046
5300
|
}
|
5047
5301
|
},
|
5302
|
+
{
|
5303
|
+
"name": "priorityChainlink",
|
5304
|
+
"type": {
|
5305
|
+
"option": "i8"
|
5306
|
+
}
|
5307
|
+
},
|
5308
|
+
{
|
5309
|
+
"name": "priorityPyth",
|
5310
|
+
"type": {
|
5311
|
+
"option": "i8"
|
5312
|
+
}
|
5313
|
+
},
|
5314
|
+
{
|
5315
|
+
"name": "prioritySwitchboard",
|
5316
|
+
"type": {
|
5317
|
+
"option": "i8"
|
5318
|
+
}
|
5319
|
+
},
|
5048
5320
|
{
|
5049
5321
|
"name": "deprecated",
|
5050
5322
|
"type": {
|
@@ -5369,8 +5641,8 @@ export const IDL: Vault = {
|
|
5369
5641
|
},
|
5370
5642
|
{
|
5371
5643
|
"code": 6020,
|
5372
|
-
"name": "
|
5373
|
-
"msg": "Can only redeem
|
5644
|
+
"name": "NotRedeemingLowestCollateralRatioVault",
|
5645
|
+
"msg": "Can only redeem lowest collateral ratio vault in system."
|
5374
5646
|
},
|
5375
5647
|
{
|
5376
5648
|
"code": 6021,
|
@@ -5384,8 +5656,38 @@ export const IDL: Vault = {
|
|
5384
5656
|
},
|
5385
5657
|
{
|
5386
5658
|
"code": 6023,
|
5659
|
+
"name": "InvalidSaltLength",
|
5660
|
+
"msg": "Salt for new vaults must be of length 8"
|
5661
|
+
},
|
5662
|
+
{
|
5663
|
+
"code": 6024,
|
5664
|
+
"name": "InvalidNameLength",
|
5665
|
+
"msg": "Name for new vault type must be length 16"
|
5666
|
+
},
|
5667
|
+
{
|
5668
|
+
"code": 6025,
|
5387
5669
|
"name": "UpdateVaultTypeBadMaxDebtExtended",
|
5388
5670
|
"msg": "New Max debt extended value is less than the current debt!"
|
5671
|
+
},
|
5672
|
+
{
|
5673
|
+
"code": 6026,
|
5674
|
+
"name": "UpdateVaultTypeNoEnabledOracles",
|
5675
|
+
"msg": "No Enabled Oracles!"
|
5676
|
+
},
|
5677
|
+
{
|
5678
|
+
"code": 6027,
|
5679
|
+
"name": "UpdateVaultTypeDuplicateOraclePriorities",
|
5680
|
+
"msg": "Duplicate Oracle Priorities"
|
5681
|
+
},
|
5682
|
+
{
|
5683
|
+
"code": 6028,
|
5684
|
+
"name": "UpdateVaultTypeInvalidOraclePriority",
|
5685
|
+
"msg": "Invalid Oracle Priority"
|
5686
|
+
},
|
5687
|
+
{
|
5688
|
+
"code": 6029,
|
5689
|
+
"name": "OracleUpdateFailed",
|
5690
|
+
"msg": "OracleUpdateFailed"
|
5389
5691
|
}
|
5390
5692
|
]
|
5391
5693
|
};
|