hedge-web3 0.2.18 → 0.2.19
Sign up to get free protection for your applications and to get access to all the features.
@@ -76,6 +76,10 @@ export declare type Vault = {
|
|
76
76
|
"name": "maxDebtExtended";
|
77
77
|
"type": "u64";
|
78
78
|
},
|
79
|
+
{
|
80
|
+
"name": "emergencyModeThreshold";
|
81
|
+
"type": "u64";
|
82
|
+
},
|
79
83
|
{
|
80
84
|
"name": "canBeRedeemed";
|
81
85
|
"type": "bool";
|
@@ -2794,6 +2798,12 @@ export declare type Vault = {
|
|
2794
2798
|
"option": "u64";
|
2795
2799
|
};
|
2796
2800
|
},
|
2801
|
+
{
|
2802
|
+
"name": "emergencyModeThreshold";
|
2803
|
+
"type": {
|
2804
|
+
"option": "u64";
|
2805
|
+
};
|
2806
|
+
},
|
2797
2807
|
{
|
2798
2808
|
"name": "oracleChainlink";
|
2799
2809
|
"type": {
|
package/lib/idl/vault.js
CHANGED
@@ -79,6 +79,10 @@ exports.IDL = {
|
|
79
79
|
"name": "maxDebtExtended",
|
80
80
|
"type": "u64"
|
81
81
|
},
|
82
|
+
{
|
83
|
+
"name": "emergencyModeThreshold",
|
84
|
+
"type": "u64"
|
85
|
+
},
|
82
86
|
{
|
83
87
|
"name": "canBeRedeemed",
|
84
88
|
"type": "bool"
|
@@ -2797,6 +2801,12 @@ exports.IDL = {
|
|
2797
2801
|
"option": "u64"
|
2798
2802
|
}
|
2799
2803
|
},
|
2804
|
+
{
|
2805
|
+
"name": "emergencyModeThreshold",
|
2806
|
+
"type": {
|
2807
|
+
"option": "u64"
|
2808
|
+
}
|
2809
|
+
},
|
2800
2810
|
{
|
2801
2811
|
"name": "oracleChainlink",
|
2802
2812
|
"type": {
|
@@ -26,19 +26,20 @@ function updateVaultType(program, provider, payer, vaultTypeAccount, oracleInfoA
|
|
26
26
|
}
|
27
27
|
exports.updateVaultType = updateVaultType;
|
28
28
|
function updateVaultTypeStatusInstruction(program, vaultSystemStatePublicKey, payerPublicKey, vaultTypeAccount, oracleInfoAccount, vaultTypeConfig) {
|
29
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
29
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
30
30
|
return __awaiter(this, void 0, void 0, function* () {
|
31
31
|
const config = {
|
32
32
|
maxDebtExtended: (_a = vaultTypeConfig.maxDebtExtended) !== null && _a !== void 0 ? _a : null,
|
33
33
|
minDebtPerVault: (_b = vaultTypeConfig.minDebtPerVault) !== null && _b !== void 0 ? _b : null,
|
34
34
|
loanInitFee: (_c = vaultTypeConfig.loanInitFee) !== null && _c !== void 0 ? _c : null,
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
35
|
+
emergencyModeThreshold: (_d = vaultTypeConfig.emergencyModeThreshold) !== null && _d !== void 0 ? _d : null,
|
36
|
+
oracleChainlink: (_e = vaultTypeConfig.oracleChainlink) !== null && _e !== void 0 ? _e : null,
|
37
|
+
oraclePyth: (_f = vaultTypeConfig.oraclePyth) !== null && _f !== void 0 ? _f : null,
|
38
|
+
oracleSwitchboard: (_g = vaultTypeConfig.oracleSwitchboard) !== null && _g !== void 0 ? _g : null,
|
39
|
+
deprecated: (_h = vaultTypeConfig.deprecated) !== null && _h !== void 0 ? _h : null,
|
40
|
+
priorityPyth: (_j = vaultTypeConfig.priorityPyth) !== null && _j !== void 0 ? _j : null,
|
41
|
+
priorityChainlink: (_k = vaultTypeConfig.priorityChainlink) !== null && _k !== void 0 ? _k : null,
|
42
|
+
prioritySwitchboard: (_l = vaultTypeConfig.prioritySwitchboard) !== null && _l !== void 0 ? _l : null,
|
42
43
|
};
|
43
44
|
return yield program.methods
|
44
45
|
.updateVaultType(config)
|
package/package.json
CHANGED
package/src/idl/vault.ts
CHANGED
@@ -76,6 +76,10 @@ export type Vault = {
|
|
76
76
|
"name": "maxDebtExtended",
|
77
77
|
"type": "u64"
|
78
78
|
},
|
79
|
+
{
|
80
|
+
"name": "emergencyModeThreshold",
|
81
|
+
"type": "u64"
|
82
|
+
},
|
79
83
|
{
|
80
84
|
"name": "canBeRedeemed",
|
81
85
|
"type": "bool"
|
@@ -2794,6 +2798,12 @@ export type Vault = {
|
|
2794
2798
|
"option": "u64"
|
2795
2799
|
}
|
2796
2800
|
},
|
2801
|
+
{
|
2802
|
+
"name": "emergencyModeThreshold",
|
2803
|
+
"type": {
|
2804
|
+
"option": "u64"
|
2805
|
+
}
|
2806
|
+
},
|
2797
2807
|
{
|
2798
2808
|
"name": "oracleChainlink",
|
2799
2809
|
"type": {
|
@@ -3325,6 +3335,10 @@ export const IDL: Vault = {
|
|
3325
3335
|
"name": "maxDebtExtended",
|
3326
3336
|
"type": "u64"
|
3327
3337
|
},
|
3338
|
+
{
|
3339
|
+
"name": "emergencyModeThreshold",
|
3340
|
+
"type": "u64"
|
3341
|
+
},
|
3328
3342
|
{
|
3329
3343
|
"name": "canBeRedeemed",
|
3330
3344
|
"type": "bool"
|
@@ -6043,6 +6057,12 @@ export const IDL: Vault = {
|
|
6043
6057
|
"option": "u64"
|
6044
6058
|
}
|
6045
6059
|
},
|
6060
|
+
{
|
6061
|
+
"name": "emergencyModeThreshold",
|
6062
|
+
"type": {
|
6063
|
+
"option": "u64"
|
6064
|
+
}
|
6065
|
+
},
|
6046
6066
|
{
|
6047
6067
|
"name": "oracleChainlink",
|
6048
6068
|
"type": {
|
@@ -28,6 +28,7 @@ export interface VaultTypeConfig {
|
|
28
28
|
maxDebtExtended?: BN
|
29
29
|
minDebtPerVault?: BN
|
30
30
|
loanInitFee?: BN
|
31
|
+
emergencyModeThreshold?: BN
|
31
32
|
|
32
33
|
oracleChainlink?: PublicKey
|
33
34
|
oraclePyth?: PublicKey
|
@@ -76,6 +77,7 @@ export async function updateVaultTypeStatusInstruction(
|
|
76
77
|
maxDebtExtended: vaultTypeConfig.maxDebtExtended ?? null,
|
77
78
|
minDebtPerVault: vaultTypeConfig.minDebtPerVault ?? null,
|
78
79
|
loanInitFee: vaultTypeConfig.loanInitFee ?? null,
|
80
|
+
emergencyModeThreshold: vaultTypeConfig.emergencyModeThreshold ?? null,
|
79
81
|
oracleChainlink: vaultTypeConfig.oracleChainlink ?? null,
|
80
82
|
oraclePyth: vaultTypeConfig.oraclePyth ?? null,
|
81
83
|
oracleSwitchboard: vaultTypeConfig.oracleSwitchboard ?? null,
|