@haven-fi/solauto-sdk 1.0.298 → 1.0.300
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/dist/clients/solautoMarginfiClient.d.ts.map +1 -1
- package/dist/clients/solautoMarginfiClient.js +3 -3
- package/dist/constants/marginfiAccounts.d.ts.map +1 -1
- package/dist/constants/marginfiAccounts.js +69 -13
- package/dist/constants/pythConstants.d.ts +2 -2
- package/dist/constants/pythConstants.js +2 -2
- package/dist/constants/switchboardConstants.d.ts +4 -0
- package/dist/constants/switchboardConstants.d.ts.map +1 -0
- package/dist/constants/switchboardConstants.js +35 -0
- package/dist/constants/tokenConstants.d.ts +7 -2
- package/dist/constants/tokenConstants.d.ts.map +1 -1
- package/dist/constants/tokenConstants.js +46 -16
- package/dist/idls/switchboard.json +1 -0
- package/dist/transactions/transactionUtils.d.ts.map +1 -1
- package/dist/transactions/transactionUtils.js +1 -1
- package/dist/utils/generalUtils.d.ts +5 -2
- package/dist/utils/generalUtils.d.ts.map +1 -1
- package/dist/utils/generalUtils.js +54 -7
- package/dist/utils/marginfiUtils.d.ts +5 -5
- package/dist/utils/marginfiUtils.d.ts.map +1 -1
- package/dist/utils/marginfiUtils.js +19 -15
- package/dist/utils/solauto/generalUtils.d.ts +3 -3
- package/dist/utils/solauto/generalUtils.d.ts.map +1 -1
- package/dist/utils/solauto/generalUtils.js +4 -4
- package/local/createFeeAccounts.ts +52 -0
- package/local/shared.ts +1 -1
- package/package.json +5 -2
- package/src/clients/solautoMarginfiClient.ts +3 -0
- package/src/constants/marginfiAccounts.ts +70 -13
- package/src/constants/pythConstants.ts +4 -4
- package/src/constants/switchboardConstants.ts +10 -0
- package/src/constants/tokenConstants.ts +45 -15
- package/src/idls/switchboard.json +1 -0
- package/src/transactions/transactionUtils.ts +1 -0
- package/src/utils/generalUtils.ts +93 -10
- package/src/utils/marginfiUtils.ts +22 -10
- package/src/utils/solauto/generalUtils.ts +6 -3
- package/tests/transactions/solautoMarginfi.ts +1 -1
- package/tests/unit/rebalanceCalculations.ts +6 -2
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"solautoMarginfiClient.d.ts","sourceRoot":"","sources":["../../src/clients/solautoMarginfiClient.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,MAAM,EACN,kBAAkB,EAMnB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,SAAS,EAA8B,MAAM,iBAAiB,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAM1D,OAAO,EACL,kBAAkB,EAElB,aAAa,EAGb,iBAAiB,EACjB,wBAAwB,EACxB,gCAAgC,EAKjC,MAAM,cAAc,CAAC;AAOtB,OAAO,EAEL,eAAe,EAUhB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,gBAAgB,EAChB,eAAe,EAChB,MAAM,iCAAiC,CAAC;AAQzC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,WAAW,yBAA0B,SAAQ,iBAAiB;IAClE,eAAe,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;IACrC,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,aAAa,CAAC,EAAE,SAAS,CAAC;CAC3B;AAED,qBAAa,qBAAsB,SAAQ,aAAa;IACtD,OAAO,CAAC,WAAW,CAAkB;IAE9B,eAAe,EAAG,SAAS,CAAC;IAE5B,sBAAsB,EAAE,MAAM,CAAa;IAC3C,eAAe,EAAG,SAAS,GAAG,MAAM,CAAC;IACrC,iBAAiB,EAAG,SAAS,CAAC;IAC9B,aAAa,EAAG,SAAS,CAAC;IAE1B,sBAAsB,EAAG,qBAAqB,CAAC;IAC/C,oBAAoB,EAAG,qBAAqB,CAAC;IAE7C,iBAAiB,EAAG,SAAS,CAAC;IAC9B,eAAe,EAAG,SAAS,CAAC;IAG5B,i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this.initialized = true;
|
62
62
|
}
|
63
63
|
async setIntermediaryMarginfiDetails() {
|
64
|
-
const existingMarginfiAccounts = (await (0, marginfiUtils_1.getAllMarginfiAccountsByAuthority)(this.umi, (0, umi_web3js_adapters_1.toWeb3JsPublicKey)(this.signer.publicKey), false))
|
64
|
+
const existingMarginfiAccounts = (await (0, marginfiUtils_1.getAllMarginfiAccountsByAuthority)(this.connection, this.umi, (0, umi_web3js_adapters_1.toWeb3JsPublicKey)(this.signer.publicKey), false))
|
65
65
|
.filter((x) => !x.marginfiAccount.equals(this.marginfiAccountPk))
|
66
66
|
.sort((a, b) => a.marginfiAccount.toString().localeCompare(b.marginfiAccount.toString()));
|
67
67
|
const emptyMarginfiAccounts = existingMarginfiAccounts.length > 0
|
@@ -105,7 +105,7 @@ class SolautoMarginfiClient extends solautoClient_1.SolautoClient {
|
|
105
105
|
return [0, 0];
|
106
106
|
}
|
107
107
|
else {
|
108
|
-
const [maxLtv, liqThreshold] = await (0, marginfiUtils_1.getMaxLtvAndLiqThreshold)(this.umi, this.marginfiGroup, {
|
108
|
+
const [maxLtv, liqThreshold] = await (0, marginfiUtils_1.getMaxLtvAndLiqThreshold)(this.connection, this.umi, this.marginfiGroup, {
|
109
109
|
mint: this.supplyMint,
|
110
110
|
}, {
|
111
111
|
mint: this.debtMint,
|
@@ -445,7 +445,7 @@ class SolautoMarginfiClient extends solautoClient_1.SolautoClient {
|
|
445
445
|
const useDesignatedMint = !this.selfManaged &&
|
446
446
|
(this.solautoPositionData === null ||
|
447
447
|
!(0, umi_web3js_adapters_1.toWeb3JsPublicKey)(this.signer.publicKey).equals(this.authority));
|
448
|
-
const freshState = await (0, marginfiUtils_1.getMarginfiAccountPositionState)(this.umi, { pk: this.marginfiAccountPk }, this.marginfiGroup, useDesignatedMint ? { mint: this.supplyMint } : undefined, useDesignatedMint ? { mint: this.debtMint } : undefined, this.livePositionUpdates);
|
448
|
+
const freshState = await (0, marginfiUtils_1.getMarginfiAccountPositionState)(this.connection, this.umi, { pk: this.marginfiAccountPk }, this.marginfiGroup, useDesignatedMint ? { mint: this.supplyMint } : undefined, useDesignatedMint ? { mint: this.debtMint } : undefined, this.livePositionUpdates);
|
449
449
|
if (freshState) {
|
450
450
|
this.log("Fresh state", freshState);
|
451
451
|
const supplyPrice = (0, generalUtils_1.safeGetPrice)(freshState?.supply.mint);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"marginfiAccounts.d.ts","sourceRoot":"","sources":["../../src/constants/marginfiAccounts.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;
|
1
|
+
{"version":3,"file":"marginfiAccounts.d.ts","sourceRoot":"","sources":["../../src/constants/marginfiAccounts.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAI1D,eAAO,MAAM,sBAAsB,iDACa,CAAC;AAEjD,eAAO,MAAM,cAAc,QAA+B,CAAC;AAI3D,eAAO,MAAM,iBAAiB,EAAE;IAC9B,CAAC,KAAK,EAAE,MAAM,GAAG;QAAE,CAAC,KAAK,EAAE,MAAM,GAAG,qBAAqB,CAAA;KAAE,CAAC;CAgK7D,CAAC;AAEF,eAAO,MAAM,8BAA8B,iDACK,CAAC"}
|
@@ -27,8 +27,10 @@ exports.MARGINFI_ACCOUNTS_LOOKUP_TABLE = exports.MARGINFI_ACCOUNTS = exports.DEF
|
|
27
27
|
const spl_token_1 = require("@solana/spl-token");
|
28
28
|
const tokens = __importStar(require("./tokenConstants"));
|
29
29
|
const web3_js_1 = require("@solana/web3.js");
|
30
|
+
const switchboardConstants_1 = require("./switchboardConstants");
|
30
31
|
exports.DEFAULT_MARGINFI_GROUP = "4qp6Fx6tnZkY5Wropq9wUYgtFxXKwE6viZxFHg3rdAG8";
|
31
32
|
exports.DEFAULT_PUBKEY = web3_js_1.PublicKey.default.toString();
|
33
|
+
const USDC_PRICE_ORACLE = "Dpw1EAVrSB1ibxiDQyTAW6Zip3J4Btk2x4SgApQCeFbX";
|
32
34
|
exports.MARGINFI_ACCOUNTS = {
|
33
35
|
[exports.DEFAULT_MARGINFI_GROUP.toString()]: {
|
34
36
|
[spl_token_1.NATIVE_MINT.toString()]: {
|
@@ -67,24 +69,24 @@ exports.MARGINFI_ACCOUNTS = {
|
|
67
69
|
vaultAuthority: "AEZb1XH5bfLwqk3hBKDuLfWyJKdLTgDPCkgn64BJKcvV",
|
68
70
|
priceOracle: "DCNeMcAZGU7pAsqu5q2xMKerq35BnUuTkagt1dkR1xB",
|
69
71
|
},
|
72
|
+
[tokens.H_SOL]: {
|
73
|
+
bank: "GJCi1uj3kYPZ64puA5sLUiCQfFapxT2xnREzrbDzFkYY",
|
74
|
+
liquidityVault: "8M97jkdr4rJtPnQ4yQ9stD6qVwaUvjrBdDPDbHJnPJLf",
|
75
|
+
vaultAuthority: "8x7mgTn5RvHR8Tn3CJqexSuQwrs6MLEy8csuXCDVvvpt",
|
76
|
+
priceOracle: switchboardConstants_1.SWITCHBOARD_PRICE_FEED_IDS[tokens.H_SOL.toString()],
|
77
|
+
},
|
78
|
+
[tokens.JUP_SOL]: {
|
79
|
+
bank: "8LaUZadNqtzuCG7iCvZd7d5cbquuYfv19KjAg6GPuuCb",
|
80
|
+
liquidityVault: "B1zjqKPoYp9bTMhzFADaAvjyGb49FMitLpi6P3Pa3YR6",
|
81
|
+
vaultAuthority: "93Qqsge2jHVsWLd8vas4cWghrsZJooMUr5JKN5DtcfMX",
|
82
|
+
priceOracle: switchboardConstants_1.SWITCHBOARD_PRICE_FEED_IDS[tokens.JUP_SOL.toString()],
|
83
|
+
},
|
70
84
|
[tokens.JUP]: {
|
71
85
|
bank: "Guu5uBc8k1WK1U2ihGosNaCy57LSgCkpWAabtzQqrQf8",
|
72
86
|
liquidityVault: "4w49W4fNDn778wsBa6TNq9hvebZKU17ymsptrEZ8zrsm",
|
73
87
|
vaultAuthority: "2MBwwAhL3c73Jy7HkWd9ofzh1bU39JBabrZCFQR2tUof",
|
74
88
|
priceOracle: "7dbob1psH1iZBS7qPsm3Kwbf5DzSXK8Jyg31CTgTnxH5",
|
75
89
|
},
|
76
|
-
[tokens.BONK]: {
|
77
|
-
bank: "DeyH7QxWvnbbaVB4zFrf4hoq7Q8z1ZT14co42BGwGtfM",
|
78
|
-
liquidityVault: "7FdQsXmCW3N5JQbknj3F9Yqq73er9VZJjGhEEMS8Ct2A",
|
79
|
-
vaultAuthority: "26kcZkdjJc94PdhqiLiEaGiLCYgAVVUfpDaZyK4cqih3",
|
80
|
-
priceOracle: "DBE3N8uNjhKPRHfANdwGvCZghWXyLPdqdSbEW2XFwBiX",
|
81
|
-
},
|
82
|
-
[tokens.WIF]: {
|
83
|
-
bank: "9dpu8KL5ABYiD3WP2Cnajzg1XaotcJvZspv29Y1Y3tn1",
|
84
|
-
liquidityVault: "4kT3EXc5dDVndUU9mV6EH3Jh3CSEvpcCZjuMkwqrtxUy",
|
85
|
-
vaultAuthority: "9gNrvvZ9RuTyRWooiEEypwcXU6kyXW8yWuhXU8tWUH5L",
|
86
|
-
priceOracle: "6B23K3tkb51vLZA14jcEQVCA1pfHptzEHFA93V5dYwbT",
|
87
|
-
},
|
88
90
|
[tokens.JTO]: {
|
89
91
|
bank: "EdB7YADw4XUt6wErT8kHGCUok4mnTpWGzPUU9rWDebzb",
|
90
92
|
liquidityVault: "3bY1DEkXodGmPMG5f7ABA12228MBG5JdAAKf5cgkB6G1",
|
@@ -125,7 +127,7 @@ exports.MARGINFI_ACCOUNTS = {
|
|
125
127
|
bank: "2s37akK2eyBbp8DZgCm7RtsaEz8eJP3Nxd4urLHQv7yB",
|
126
128
|
liquidityVault: "7jaiZR5Sk8hdYN9MxTpczTcwbWpb5WEoxSANuUwveuat",
|
127
129
|
vaultAuthority: "3uxNepDbmkDNq6JhRja5Z8QwbTrfmkKP8AKZV5chYDGG",
|
128
|
-
priceOracle:
|
130
|
+
priceOracle: USDC_PRICE_ORACLE,
|
129
131
|
},
|
130
132
|
[tokens.USDT]: {
|
131
133
|
bank: "HmpMfL8942u22htC4EMiWgLX931g3sacXFR6KjuLgKLV",
|
@@ -133,6 +135,60 @@ exports.MARGINFI_ACCOUNTS = {
|
|
133
135
|
vaultAuthority: "9r6z6KgkEytHCdQWNxvDQH98PsfU98f1m5PCg47mY2XE",
|
134
136
|
priceOracle: "HT2PLQBcG5EiCcNSaMHAjSgd9F98ecpATbk4Sk5oYuM",
|
135
137
|
},
|
138
|
+
[tokens.BONK]: {
|
139
|
+
bank: "DeyH7QxWvnbbaVB4zFrf4hoq7Q8z1ZT14co42BGwGtfM",
|
140
|
+
liquidityVault: "7FdQsXmCW3N5JQbknj3F9Yqq73er9VZJjGhEEMS8Ct2A",
|
141
|
+
vaultAuthority: "26kcZkdjJc94PdhqiLiEaGiLCYgAVVUfpDaZyK4cqih3",
|
142
|
+
priceOracle: "DBE3N8uNjhKPRHfANdwGvCZghWXyLPdqdSbEW2XFwBiX",
|
143
|
+
},
|
144
|
+
[tokens.WIF]: {
|
145
|
+
bank: "9dpu8KL5ABYiD3WP2Cnajzg1XaotcJvZspv29Y1Y3tn1",
|
146
|
+
liquidityVault: "4kT3EXc5dDVndUU9mV6EH3Jh3CSEvpcCZjuMkwqrtxUy",
|
147
|
+
vaultAuthority: "9gNrvvZ9RuTyRWooiEEypwcXU6kyXW8yWuhXU8tWUH5L",
|
148
|
+
priceOracle: "6B23K3tkb51vLZA14jcEQVCA1pfHptzEHFA93V5dYwbT",
|
149
|
+
},
|
150
|
+
},
|
151
|
+
["DQ2jqDJw9uzTwttf6h6r217BQ7kws3jZbJXDkfbCJa1q"]: {
|
152
|
+
[tokens.POPCAT]: {
|
153
|
+
bank: "845oEvt1oduoBj5zQxTr21cWWaUVnRjGerJuW3yMo2nn",
|
154
|
+
liquidityVault: "At6R64ip51zay4dT6k1WnVGETSMcaiY5vggD5DVTgxri",
|
155
|
+
vaultAuthority: "dNraDCWb5usDSoW4kD1Mi2E9WsNu6EABcQZqnrDfjNb",
|
156
|
+
priceOracle: switchboardConstants_1.SWITCHBOARD_PRICE_FEED_IDS[tokens.POPCAT.toString()],
|
157
|
+
},
|
158
|
+
[tokens.USDC]: {
|
159
|
+
bank: "EXrnNVfLagt3j4hCHSD9WqK75o6dkZBtjpnrSrSC78MA",
|
160
|
+
liquidityVault: "D9HSUYz3Rg2cTH65dUPaQS1MYxofNTeLecsAjiBgVPur",
|
161
|
+
vaultAuthority: "5ivKgJnxQ9CewJcKYSPQUiQFdfJki6YS87FqohnMSsFM",
|
162
|
+
priceOracle: USDC_PRICE_ORACLE,
|
163
|
+
},
|
164
|
+
},
|
165
|
+
["EpzY5EYF1A5eFDRfjtsPXSYMPmEx1FXKaXPnouTMF4dm"]: {
|
166
|
+
[tokens.RETARDIO]: {
|
167
|
+
bank: "3J5rKmCi7JXG6qmiobFJyAidVTnnNAMGj4jomfBxKGRM",
|
168
|
+
liquidityVault: "863K9YPVT3xbUGFZevrQJLqMux3UdRkwNQ6usAp4hJyy",
|
169
|
+
vaultAuthority: "Qsv2rnNRdv59AwRU3YmGPMCTdKT41CDAKyYAr4srCJR",
|
170
|
+
priceOracle: switchboardConstants_1.SWITCHBOARD_PRICE_FEED_IDS[tokens.RETARDIO.toString()],
|
171
|
+
},
|
172
|
+
[tokens.USDC]: {
|
173
|
+
bank: "6cgYhBFWCc5sNHxkvSRhd5H9AdAHR41zKwuF37HmLry5",
|
174
|
+
liquidityVault: "7orVfNL5ZjqvdSaDgYLgBk4i5B3AnwFXNqqAvJbx6DFy",
|
175
|
+
vaultAuthority: "G4Azxk4PYtNRmDZkJppYo3rNAinkZXzYpQPG5dVDh4Nj",
|
176
|
+
priceOracle: USDC_PRICE_ORACLE,
|
177
|
+
},
|
178
|
+
},
|
179
|
+
["G1rt3EpQ43K3bY457rhukQGRAo2QxydFAGRKqnjKzyr5"]: {
|
180
|
+
[tokens.BILLY]: {
|
181
|
+
bank: "Dj3PndQ3j1vuga5ApiFWWAfQ4h3wBtgS2SeLZBT2LD4g",
|
182
|
+
liquidityVault: "BRcRMDVPBQzXNXWtSS6bNotcGxhVsxfiAt1qf8nFVUpx",
|
183
|
+
vaultAuthority: "36SgFh1qBRyj1PEhsn7Kg9Sfwbrn7rHP7kvTM5o5n6AL",
|
184
|
+
priceOracle: switchboardConstants_1.SWITCHBOARD_PRICE_FEED_IDS[tokens.BILLY.toString()],
|
185
|
+
},
|
186
|
+
[tokens.USDC]: {
|
187
|
+
bank: "A7vBgCowCYeja7GTc3pyqUBdC9Gkue2gWaMjGZW38meM",
|
188
|
+
liquidityVault: "DBGhZ8TJTG2Pacdva27zY9etaro24o1tTA3LToSjYHbx",
|
189
|
+
vaultAuthority: "Cg6BCqkGny7A2AXCV8rikhHXM82wqqfzmdsTobEeTQkH",
|
190
|
+
priceOracle: USDC_PRICE_ORACLE,
|
191
|
+
},
|
136
192
|
},
|
137
193
|
};
|
138
194
|
exports.MARGINFI_ACCOUNTS_LOOKUP_TABLE = "GAjmWmBPcH5Gxbiykasydj6RsCEaCLyHEvK6kHdFigc6";
|
@@ -6,8 +6,6 @@ export declare const PYTH_PRICE_FEED_IDS: {
|
|
6
6
|
LSTxxxnJzKDFSLr4dUkPcmCf5VyryEqzPLz5j4bpxFp: string;
|
7
7
|
"5oVNBeEEQvYi1cX3ir8Dx5n1P7pdxydbGF2X4TxVusJm": string;
|
8
8
|
JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN: string;
|
9
|
-
DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263: string;
|
10
|
-
EKpQGSJtjMFqKZ9KQanSqYXRcF8fBopzLHYxdM65zcjm: string;
|
11
9
|
jtojtomepa8beP8AuQc6eXt5FriJwfFMwQx2v2f9mCL: string;
|
12
10
|
"27G8MtK7VtTcCHkpASjSDdkWWYfoqT6ggEuKidVJidD4": string;
|
13
11
|
"3NZ9JMVBmGAqocybic2c7LQCJScmgsAZ6vQqTDzcqmJh": string;
|
@@ -16,5 +14,7 @@ export declare const PYTH_PRICE_FEED_IDS: {
|
|
16
14
|
HZ1JovNiVvGrGNiiYvEozEVgZ58xaU3RKwX8eACQBCt3: string;
|
17
15
|
EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v: string;
|
18
16
|
Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB: string;
|
17
|
+
DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263: string;
|
18
|
+
EKpQGSJtjMFqKZ9KQanSqYXRcF8fBopzLHYxdM65zcjm: string;
|
19
19
|
};
|
20
20
|
//# sourceMappingURL=pythConstants.d.ts.map
|
@@ -35,8 +35,6 @@ exports.PYTH_PRICE_FEED_IDS = {
|
|
35
35
|
[tokens.LST]: "0x12fb674ee496045b1d9cf7d5e65379acb026133c2ad69f3ed996fb9fe68e3a37",
|
36
36
|
[tokens.INF]: "0xf51570985c642c49c2d6e50156390fdba80bb6d5f7fa389d2f012ced4f7d208f",
|
37
37
|
[tokens.JUP]: "0x0a0408d619e9380abad35060f9192039ed5042fa6f82301d0e48bb52be830996",
|
38
|
-
[tokens.BONK]: "0x72b021217ca3fe68922a19aaf990109cb9d84e9ad004b4d2025ad6f529314419",
|
39
|
-
[tokens.WIF]: "0x4ca4beeca86f0d164160323817a4e42b10010a724c2217c6ee41b54cd4cc61fc",
|
40
38
|
[tokens.JTO]: "0xb43660a5f790c69354b0729a5ef9d50d68f1df92107540210b9cccba1f947cc2",
|
41
39
|
[tokens.JLP]: "0xc811abc82b4bad1f9bd711a2773ccaa935b03ecef974236942cec5e0eb845a3a",
|
42
40
|
[tokens.WBTC]: "0xc9d8b075a5c69303365ae23633d4e085199bf5c520a3b90fed1322a0342ffc33",
|
@@ -45,4 +43,6 @@ exports.PYTH_PRICE_FEED_IDS = {
|
|
45
43
|
[tokens.PYTH]: "0x0bbf28e9a841a1cc788f6a361b17ca072d0ea3098a1e5df1c3922d06719579ff",
|
46
44
|
[tokens.USDC]: "0xeaa020c61cc479712813461ce153894a96a6c00b21ed0cfc2798d1f9a9e9c94a",
|
47
45
|
[tokens.USDT]: "0x2b89b9dc8fdf9f34709a5b106b472f0f39bb6ca9ce04b0fd7f2e971688e2e53b",
|
46
|
+
[tokens.BONK]: "0x72b021217ca3fe68922a19aaf990109cb9d84e9ad004b4d2025ad6f529314419",
|
47
|
+
[tokens.WIF]: "0x4ca4beeca86f0d164160323817a4e42b10010a724c2217c6ee41b54cd4cc61fc",
|
48
48
|
};
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"switchboardConstants.d.ts","sourceRoot":"","sources":["../../src/constants/switchboardConstants.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,0BAA0B,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAM/D,CAAC"}
|
@@ -0,0 +1,35 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
9
|
+
}) : (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
o[k2] = m[k];
|
12
|
+
}));
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
15
|
+
}) : function(o, v) {
|
16
|
+
o["default"] = v;
|
17
|
+
});
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
19
|
+
if (mod && mod.__esModule) return mod;
|
20
|
+
var result = {};
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
22
|
+
__setModuleDefault(result, mod);
|
23
|
+
return result;
|
24
|
+
};
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
26
|
+
exports.SWITCHBOARD_PRICE_FEED_IDS = void 0;
|
27
|
+
const tokens = __importStar(require("./tokenConstants"));
|
28
|
+
// https://beta.ondemand.switchboard.xyz/solana/mainnet
|
29
|
+
exports.SWITCHBOARD_PRICE_FEED_IDS = {
|
30
|
+
[tokens.JUP_SOL]: "HX5WM3qzogAfRCjBUWwnniLByMfFrjm1b5yo4KoWGR27",
|
31
|
+
[tokens.H_SOL]: "1snBjCaHejZqQsAqkELAKNaqUrDNNCr7zmNX6qaQCzg",
|
32
|
+
[tokens.POPCAT]: "FTcFqwCjAgv2VMaowQ9XSBcesVzFzZkaju25nKio6bki",
|
33
|
+
[tokens.RETARDIO]: "EvPXnpMoyrj4B6P55LDP2VpSLkTBWom2SqL4486ToNhM",
|
34
|
+
[tokens.BILLY]: "uBe4er4VSMgYvBNwSbFctSShRXNPkCfaPh7zHMBFeBi",
|
35
|
+
};
|
@@ -3,9 +3,9 @@ export declare const JITO_SOL = "J1toso1uCk3RLmjorhTtrVwY9HJ7X8V9yYac6Y7kGCPn";
|
|
3
3
|
export declare const LST = "LSTxxxnJzKDFSLr4dUkPcmCf5VyryEqzPLz5j4bpxFp";
|
4
4
|
export declare const M_SOL = "mSoLzYCxHdYgdzU16g5QSh3i5K3z3KZK7ytfqcJm7So";
|
5
5
|
export declare const INF = "5oVNBeEEQvYi1cX3ir8Dx5n1P7pdxydbGF2X4TxVusJm";
|
6
|
+
export declare const H_SOL = "he1iusmfkpAdwvxLNGV8Y1iSbj4rUy6yMhEA3fotn9A";
|
7
|
+
export declare const JUP_SOL = "jupSoLaHXQiZZTSfEWMTRRgpnyFm8f6sZdosWBjx93v";
|
6
8
|
export declare const JUP = "JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN";
|
7
|
-
export declare const BONK = "DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263";
|
8
|
-
export declare const WIF = "EKpQGSJtjMFqKZ9KQanSqYXRcF8fBopzLHYxdM65zcjm";
|
9
9
|
export declare const JTO = "jtojtomepa8beP8AuQc6eXt5FriJwfFMwQx2v2f9mCL";
|
10
10
|
export declare const JLP = "27G8MtK7VtTcCHkpASjSDdkWWYfoqT6ggEuKidVJidD4";
|
11
11
|
export declare const WBTC = "3NZ9JMVBmGAqocybic2c7LQCJScmgsAZ6vQqTDzcqmJh";
|
@@ -14,6 +14,11 @@ export declare const HNT = "hntyVP6YFm1Hg25TN9WGLqM12b8TQmcknKrdu1oxWux";
|
|
14
14
|
export declare const PYTH = "HZ1JovNiVvGrGNiiYvEozEVgZ58xaU3RKwX8eACQBCt3";
|
15
15
|
export declare const USDC = "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v";
|
16
16
|
export declare const USDT = "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB";
|
17
|
+
export declare const BONK = "DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263";
|
18
|
+
export declare const WIF = "EKpQGSJtjMFqKZ9KQanSqYXRcF8fBopzLHYxdM65zcjm";
|
19
|
+
export declare const POPCAT = "7GCihgDB8fe6KNjn2MYtkzZcRjQy3t9GHdC8uHYmW2hr";
|
20
|
+
export declare const RETARDIO = "6ogzHhzdrQr9Pgv6hZ2MNze7UrzBMAFyBBWUYp1Fhitx";
|
21
|
+
export declare const BILLY = "3B5wuUrMEi5yATD7on46hKfej3pfmd7t1RKgrsN3pump";
|
17
22
|
export declare const ALL_SUPPORTED_TOKENS: string[];
|
18
23
|
interface TokenInfo {
|
19
24
|
ticker: string;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"tokenConstants.d.ts","sourceRoot":"","sources":["../../src/constants/tokenConstants.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,KAAK,gDAAgD,CAAC;AACnE,eA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CAAC,EAAE,OAAO,CAAC;CACjB;AAED,eAAO,MAAM,UAAU,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAA;CAoGlD,CAAC"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.TOKEN_INFO = exports.ALL_SUPPORTED_TOKENS = exports.USDT = exports.USDC = exports.PYTH = exports.HNT = exports.WETH = exports.WBTC = exports.JLP = exports.JTO = exports.
|
3
|
+
exports.TOKEN_INFO = exports.ALL_SUPPORTED_TOKENS = exports.BILLY = exports.RETARDIO = exports.POPCAT = exports.WIF = exports.BONK = exports.USDT = exports.USDC = exports.PYTH = exports.HNT = exports.WETH = exports.WBTC = exports.JLP = exports.JTO = exports.JUP = exports.JUP_SOL = exports.H_SOL = exports.INF = exports.M_SOL = exports.LST = exports.JITO_SOL = exports.B_SOL = void 0;
|
4
4
|
const spl_token_1 = require("@solana/spl-token");
|
5
5
|
const web3_js_1 = require("@solana/web3.js");
|
6
6
|
// When adding token ensure a price feed is provided in pythConstants.ts & the token is in TOKEN_INFO
|
@@ -9,9 +9,9 @@ exports.JITO_SOL = "J1toso1uCk3RLmjorhTtrVwY9HJ7X8V9yYac6Y7kGCPn";
|
|
9
9
|
exports.LST = "LSTxxxnJzKDFSLr4dUkPcmCf5VyryEqzPLz5j4bpxFp";
|
10
10
|
exports.M_SOL = "mSoLzYCxHdYgdzU16g5QSh3i5K3z3KZK7ytfqcJm7So";
|
11
11
|
exports.INF = "5oVNBeEEQvYi1cX3ir8Dx5n1P7pdxydbGF2X4TxVusJm";
|
12
|
+
exports.H_SOL = "he1iusmfkpAdwvxLNGV8Y1iSbj4rUy6yMhEA3fotn9A";
|
13
|
+
exports.JUP_SOL = "jupSoLaHXQiZZTSfEWMTRRgpnyFm8f6sZdosWBjx93v";
|
12
14
|
exports.JUP = "JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN";
|
13
|
-
exports.BONK = "DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263";
|
14
|
-
exports.WIF = "EKpQGSJtjMFqKZ9KQanSqYXRcF8fBopzLHYxdM65zcjm";
|
15
15
|
exports.JTO = "jtojtomepa8beP8AuQc6eXt5FriJwfFMwQx2v2f9mCL";
|
16
16
|
exports.JLP = "27G8MtK7VtTcCHkpASjSDdkWWYfoqT6ggEuKidVJidD4";
|
17
17
|
exports.WBTC = "3NZ9JMVBmGAqocybic2c7LQCJScmgsAZ6vQqTDzcqmJh";
|
@@ -20,6 +20,11 @@ exports.HNT = "hntyVP6YFm1Hg25TN9WGLqM12b8TQmcknKrdu1oxWux";
|
|
20
20
|
exports.PYTH = "HZ1JovNiVvGrGNiiYvEozEVgZ58xaU3RKwX8eACQBCt3";
|
21
21
|
exports.USDC = "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v";
|
22
22
|
exports.USDT = "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB";
|
23
|
+
exports.BONK = "DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263";
|
24
|
+
exports.WIF = "EKpQGSJtjMFqKZ9KQanSqYXRcF8fBopzLHYxdM65zcjm";
|
25
|
+
exports.POPCAT = "7GCihgDB8fe6KNjn2MYtkzZcRjQy3t9GHdC8uHYmW2hr";
|
26
|
+
exports.RETARDIO = "6ogzHhzdrQr9Pgv6hZ2MNze7UrzBMAFyBBWUYp1Fhitx";
|
27
|
+
exports.BILLY = "3B5wuUrMEi5yATD7on46hKfej3pfmd7t1RKgrsN3pump";
|
23
28
|
exports.ALL_SUPPORTED_TOKENS = [
|
24
29
|
spl_token_1.NATIVE_MINT.toString(),
|
25
30
|
exports.B_SOL,
|
@@ -27,9 +32,9 @@ exports.ALL_SUPPORTED_TOKENS = [
|
|
27
32
|
exports.JITO_SOL,
|
28
33
|
exports.LST,
|
29
34
|
exports.INF,
|
35
|
+
exports.H_SOL,
|
36
|
+
exports.JUP_SOL,
|
30
37
|
exports.JUP,
|
31
|
-
exports.BONK,
|
32
|
-
exports.WIF,
|
33
38
|
exports.JTO,
|
34
39
|
exports.JLP,
|
35
40
|
exports.WBTC,
|
@@ -38,6 +43,11 @@ exports.ALL_SUPPORTED_TOKENS = [
|
|
38
43
|
exports.PYTH,
|
39
44
|
exports.USDC,
|
40
45
|
exports.USDT,
|
46
|
+
exports.BONK,
|
47
|
+
exports.WIF,
|
48
|
+
exports.POPCAT,
|
49
|
+
exports.RETARDIO,
|
50
|
+
exports.BILLY,
|
41
51
|
];
|
42
52
|
exports.TOKEN_INFO = {
|
43
53
|
[web3_js_1.PublicKey.default.toString()]: {
|
@@ -73,18 +83,18 @@ exports.TOKEN_INFO = {
|
|
73
83
|
decimals: 9,
|
74
84
|
isLST: true,
|
75
85
|
},
|
86
|
+
[exports.H_SOL]: {
|
87
|
+
ticker: "hSOL",
|
88
|
+
decimals: 9,
|
89
|
+
},
|
90
|
+
[exports.JUP_SOL]: {
|
91
|
+
ticker: "JupSOL",
|
92
|
+
decimals: 9,
|
93
|
+
},
|
76
94
|
[exports.JUP]: {
|
77
95
|
ticker: "JUP",
|
78
96
|
decimals: 6,
|
79
97
|
},
|
80
|
-
[exports.BONK]: {
|
81
|
-
ticker: "BONK",
|
82
|
-
decimals: 5,
|
83
|
-
},
|
84
|
-
[exports.WIF]: {
|
85
|
-
ticker: "WIF",
|
86
|
-
decimals: 6
|
87
|
-
},
|
88
98
|
[exports.JTO]: {
|
89
99
|
ticker: "JTO",
|
90
100
|
decimals: 9,
|
@@ -99,15 +109,15 @@ exports.TOKEN_INFO = {
|
|
99
109
|
},
|
100
110
|
[exports.WETH]: {
|
101
111
|
ticker: "WETH",
|
102
|
-
decimals: 8
|
112
|
+
decimals: 8,
|
103
113
|
},
|
104
114
|
[exports.HNT]: {
|
105
115
|
ticker: "HNT",
|
106
|
-
decimals: 8
|
116
|
+
decimals: 8,
|
107
117
|
},
|
108
118
|
[exports.PYTH]: {
|
109
119
|
ticker: "PYTH",
|
110
|
-
decimals: 6
|
120
|
+
decimals: 6,
|
111
121
|
},
|
112
122
|
[exports.USDC]: {
|
113
123
|
ticker: "USDC",
|
@@ -119,4 +129,24 @@ exports.TOKEN_INFO = {
|
|
119
129
|
decimals: 6,
|
120
130
|
isStableCoin: true,
|
121
131
|
},
|
132
|
+
[exports.BONK]: {
|
133
|
+
ticker: "BONK",
|
134
|
+
decimals: 5,
|
135
|
+
},
|
136
|
+
[exports.WIF]: {
|
137
|
+
ticker: "WIF",
|
138
|
+
decimals: 6,
|
139
|
+
},
|
140
|
+
[exports.POPCAT]: {
|
141
|
+
ticker: "POPCAT",
|
142
|
+
decimals: 9,
|
143
|
+
},
|
144
|
+
[exports.RETARDIO]: {
|
145
|
+
ticker: "RETARDIO",
|
146
|
+
decimals: 6,
|
147
|
+
},
|
148
|
+
[exports.BILLY]: {
|
149
|
+
ticker: "BILLY",
|
150
|
+
decimals: 6,
|
151
|
+
},
|
122
152
|
};
|
@@ -0,0 +1 @@
|
|
1
|
+
{ "address": "SBondMDrcV3K4kxZR1HNVT7osZxAHVHgYXL5Ze1oMUv", "metadata": { "name": "sb_on_demand", "version": "0.1.0", "spec": "0.1.0", "description": "Created with Anchor" }, "instructions": [{ "name": "guardian_quote_verify", "discriminator": [168, 36, 93, 156, 157, 150, 148, 45], "accounts": [{ "name": "guardian", "writable": true }, { "name": "oracle", "writable": true }, { "name": "authority", "signer": true, "relations": ["oracle"] }, { "name": "guardian_queue", "writable": true, "relations": ["state"] }, { "name": "state" }, { "name": "recent_slothashes", "address": "SysvarS1otHashes111111111111111111111111111" }], "args": [{ "name": "params", "type": { "defined": { "name": "GuardianQuoteVerifyParams" } } }] }, { "name": "guardian_register", "discriminator": [159, 76, 53, 117, 219, 29, 116, 135], "accounts": [{ "name": "oracle", "writable": true }, { "name": "state" }, { "name": "guardian_queue", "relations": ["state"] }, { "name": "authority", "signer": true, "relations": ["state"] }], "args": [{ "name": "params", "type": { "defined": { "name": "GuardianRegisterParams" } } }] }, { "name": "guardian_unregister", "discriminator": [215, 19, 61, 120, 155, 224, 120, 60], "accounts": [{ "name": "oracle", "writable": true }, { "name": "state" }, { "name": "guardian_queue", "writable": true, "relations": ["state"] }, { "name": "authority", "signer": true, "relations": ["state"] }], "args": [{ "name": "params", "type": { "defined": { "name": "GuardianUnregisterParams" } } }] }, { "name": "oracle_heartbeat", "discriminator": [10, 175, 217, 130, 111, 35, 117, 54], "accounts": [{ "name": "oracle", "writable": true }, { "name": "oracle_stats", "writable": true, "pda": { "seeds": [{ "kind": "const", "value": [79, 114, 97, 99, 108, 101, 83, 116, 97, 116, 115] }, { "kind": "account", "path": "oracle" }] } }, { "name": "oracle_signer", "signer": true }, { "name": "queue", "writable": true, "relations": ["oracle", "gc_node"] }, { "name": "gc_node", "writable": true }, { "name": "program_state", "writable": true }, { "name": "payer", "writable": true, "signer": true }, { "name": "system_program", "address": "11111111111111111111111111111111" }, { "name": "token_program", "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" }, { "name": "native_mint", "address": "So11111111111111111111111111111111111111112" }, { "name": "queue_escrow", "writable": true }, { "name": "stake_program", "address": "SBSTk6t52R89MmCdD739Rdd97HdbTQUFHe41vCX7pTt", "relations": ["program_state"] }, { "name": "delegation_pool", "writable": true }, { "name": "delegation_group", "writable": true }], "args": [{ "name": "params", "type": { "defined": { "name": "OracleHeartbeatParams" } } }] }, { "name": "oracle_init", "discriminator": [21, 158, 66, 65, 60, 221, 148, 61], "accounts": [{ "name": "oracle", "writable": true, "signer": true }, { "name": "oracle_stats", "writable": true, "pda": { "seeds": [{ "kind": "const", "value": [79, 114, 97, 99, 108, 101, 83, 116, 97, 116, 115] }, { "kind": "account", "path": "oracle" }] } }, { "name": "program_state", "writable": true }, { "name": "payer", "writable": true, "signer": true }, { "name": "system_program", "address": "11111111111111111111111111111111" }, { "name": "token_program", "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" }, { "name": "lut_signer" }, { "name": "lut", "writable": true }, { "name": "address_lookup_table_program", "address": "AddressLookupTab1e1111111111111111111111111" }, { "name": "stake_program", "relations": ["program_state"] }, { "name": "stake_pool", "relations": ["program_state"] }], "args": [{ "name": "params", "type": { "defined": { "name": "OracleInitParams" } } }] }, { "name": "oracle_set_configs", "discriminator": [129, 111, 223, 4, 191, 188, 70, 180], "accounts": [{ "name": "oracle" }, { "name": "authority", "signer": true, "relations": ["oracle"] }], "args": [{ "name": "params", "type": { "defined": { "name": "OracleSetConfigsParams" } } }] }, { "name": "oracle_update_delegation", "discriminator": [46, 198, 113, 223, 160, 189, 118, 90], "accounts": [{ "name": "oracle", "writable": true }, { "name": "oracle_stats", "pda": { "seeds": [{ "kind": "const", "value": [79, 114, 97, 99, 108, 101, 83, 116, 97, 116, 115] }, { "kind": "account", "path": "oracle" }] } }, { "name": "queue", "relations": ["oracle"] }, { "name": "authority", "signer": true }, { "name": "program_state", "writable": true }, { "name": "payer", "writable": true, "signer": true }, { "name": "system_program", "address": "11111111111111111111111111111111" }, { "name": "token_program", "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" }, { "name": "delegation_pool", "writable": true }, { "name": "lut_signer" }, { "name": "lut", "writable": true }, { "name": "address_lookup_table_program", "address": "AddressLookupTab1e1111111111111111111111111" }, { "name": "switch_mint" }, { "name": "native_mint", "address": "So11111111111111111111111111111111111111112" }, { "name": "wsol_vault", "writable": true }, { "name": "switch_vault", "writable": true }, { "name": "stake_program", "relations": ["program_state"] }, { "name": "stake_pool" }, { "name": "delegation_group" }], "args": [{ "name": "params", "type": { "defined": { "name": "OracleUpdateDelegationParams" } } }] }, { "name": "permission_set", "discriminator": [211, 122, 185, 120, 129, 182, 55, 103], "accounts": [{ "name": "authority", "signer": true }, { "name": "granter" }], "args": [{ "name": "params", "type": { "defined": { "name": "PermissionSetParams" } } }] }, { "name": "pull_feed_close", "discriminator": [19, 134, 50, 142, 177, 215, 196, 83], "accounts": [{ "name": "pull_feed", "writable": true }, { "name": "reward_escrow", "writable": true }, { "name": "lut", "writable": true }, { "name": "lut_signer" }, { "name": "payer", "writable": true, "signer": true }, { "name": "state" }, { "name": "authority", "writable": true, "signer": true, "relations": ["pull_feed"] }, { "name": "token_program", "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" }, { "name": "associated_token_program", "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL" }, { "name": "system_program", "address": "11111111111111111111111111111111" }, { "name": "address_lookup_table_program", "address": "AddressLookupTab1e1111111111111111111111111" }], "args": [{ "name": "params", "type": { "defined": { "name": "PullFeedCloseParams" } } }] }, { "name": "pull_feed_init", "discriminator": [198, 130, 53, 198, 235, 61, 143, 40], "accounts": [{ "name": "pull_feed", "writable": true, "signer": true }, { "name": "queue" }, { "name": "authority" }, { "name": "payer", "writable": true, "signer": true }, { "name": "system_program", "address": "11111111111111111111111111111111" }, { "name": "program_state" }, { "name": "reward_escrow", "writable": true, "pda": { "seeds": [{ "kind": "account", "path": "pull_feed" }, { "kind": "const", "value": [6, 221, 246, 225, 215, 101, 161, 147, 217, 203, 225, 70, 206, 235, 121, 172, 28, 180, 133, 237, 95, 91, 55, 145, 58, 140, 245, 133, 126, 255, 0, 169] }, { "kind": "account", "path": "wrapped_sol_mint" }], "program": { "kind": "const", "value": [140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19, 153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89] } } }, { "name": "token_program", "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" }, { "name": "associated_token_program", "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL" }, { "name": "wrapped_sol_mint", "address": "So11111111111111111111111111111111111111112" }, { "name": "lut_signer" }, { "name": "lut", "writable": true }, { "name": "address_lookup_table_program", "address": "AddressLookupTab1e1111111111111111111111111" }], "args": [{ "name": "params", "type": { "defined": { "name": "PullFeedInitParams" } } }] }, { "name": "pull_feed_set_configs", "discriminator": [217, 45, 11, 246, 64, 26, 82, 168], "accounts": [{ "name": "pull_feed", "writable": true }, { "name": "authority", "signer": true, "relations": ["pull_feed"] }], "args": [{ "name": "params", "type": { "defined": { "name": "PullFeedSetConfigsParams" } } }] }, { "name": "pull_feed_submit_response", "discriminator": [150, 22, 215, 166, 143, 93, 48, 137], "accounts": [{ "name": "feed", "writable": true }, { "name": "queue", "relations": ["feed"] }, { "name": "program_state" }, { "name": "recent_slothashes", "address": "SysvarS1otHashes111111111111111111111111111" }, { "name": "payer", "writable": true, "signer": true }, { "name": "system_program", "address": "11111111111111111111111111111111" }, { "name": "reward_vault", "writable": true }, { "name": "token_program", "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" }, { "name": "token_mint", "address": "So11111111111111111111111111111111111111112" }], "args": [{ "name": "params", "type": { "defined": { "name": "PullFeedSubmitResponseParams" } } }] }, { "name": "pull_feed_submit_response_many", "discriminator": [47, 156, 45, 25, 200, 71, 37, 215], "accounts": [{ "name": "queue" }, { "name": "program_state" }, { "name": "recent_slothashes", "address": "SysvarS1otHashes111111111111111111111111111" }, { "name": "payer", "writable": true, "signer": true }, { "name": "system_program", "address": "11111111111111111111111111111111" }, { "name": "reward_vault", "writable": true }, { "name": "token_program", "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" }, { "name": "token_mint", "address": "So11111111111111111111111111111111111111112" }], "args": [{ "name": "params", "type": { "defined": { "name": "PullFeedSubmitResponseManyParams" } } }] }, { "name": "queue_add_mr_enclave", "discriminator": [199, 255, 81, 50, 60, 133, 171, 138], "accounts": [{ "name": "queue", "writable": true }, { "name": "authority", "signer": true }, { "name": "program_authority" }, { "name": "state" }], "args": [{ "name": "params", "type": { "defined": { "name": "QueueAddMrEnclaveParams" } } }] }, { "name": "queue_allow_subsidies", "discriminator": [94, 203, 82, 157, 188, 138, 202, 108], "accounts": [{ "name": "queue", "writable": true }, { "name": "authority", "signer": true, "relations": ["state"] }, { "name": "state", "writable": true }], "args": [{ "name": "params", "type": { "defined": { "name": "QueueAllowSubsidiesParams" } } }] }, { "name": "queue_garbage_collect", "discriminator": [187, 208, 104, 247, 16, 91, 96, 98], "accounts": [{ "name": "queue", "writable": true }, { "name": "oracle", "writable": true }, { "name": "authority", "signer": true }, { "name": "state" }], "args": [{ "name": "params", "type": { "defined": { "name": "QueueGarbageCollectParams" } } }] }, { "name": "queue_init", "discriminator": [144, 18, 99, 145, 133, 27, 207, 13], "accounts": [{ "name": "queue", "writable": true, "signer": true }, { "name": "queue_escrow", "writable": true, "pda": { "seeds": [{ "kind": "account", "path": "queue" }, { "kind": "const", "value": [6, 221, 246, 225, 215, 101, 161, 147, 217, 203, 225, 70, 206, 235, 121, 172, 28, 180, 133, 237, 95, 91, 55, 145, 58, 140, 245, 133, 126, 255, 0, 169] }, { "kind": "account", "path": "native_mint" }], "program": { "kind": "const", "value": [140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19, 153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89] } } }, { "name": "authority" }, { "name": "payer", "writable": true, "signer": true }, { "name": "system_program", "address": "11111111111111111111111111111111" }, { "name": "token_program", "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" }, { "name": "native_mint", "address": "So11111111111111111111111111111111111111112" }, { "name": "program_state" }, { "name": "lut_signer", "writable": true }, { "name": "lut", "writable": true }, { "name": "address_lookup_table_program", "address": "AddressLookupTab1e1111111111111111111111111" }, { "name": "associated_token_program", "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL" }], "args": [{ "name": "params", "type": { "defined": { "name": "QueueInitParams" } } }] }, { "name": "queue_init_delegation_group", "discriminator": [239, 146, 75, 158, 20, 166, 159, 14], "accounts": [{ "name": "queue", "writable": true }, { "name": "payer", "writable": true, "signer": true }, { "name": "system_program", "address": "11111111111111111111111111111111" }, { "name": "program_state" }, { "name": "lut_signer" }, { "name": "lut", "writable": true }, { "name": "address_lookup_table_program", "address": "AddressLookupTab1e1111111111111111111111111" }, { "name": "delegation_group", "writable": true }, { "name": "stake_program", "relations": ["program_state"] }, { "name": "stake_pool" }], "args": [{ "name": "params", "type": { "defined": { "name": "QueueInitDelegationGroupParams" } } }] }, { "name": "queue_remove_mr_enclave", "discriminator": [3, 64, 135, 33, 190, 133, 68, 252], "accounts": [{ "name": "queue", "writable": true }, { "name": "authority", "signer": true }, { "name": "program_authority" }, { "name": "state" }], "args": [{ "name": "params", "type": { "defined": { "name": "QueueRemoveMrEnclaveParams" } } }] }, { "name": "queue_set_configs", "discriminator": [54, 183, 243, 199, 49, 103, 142, 48], "accounts": [{ "name": "queue", "writable": true }, { "name": "authority", "signer": true }, { "name": "state" }], "args": [{ "name": "params", "type": { "defined": { "name": "QueueSetConfigsParams" } } }] }, { "name": "randomness_commit", "discriminator": [52, 170, 152, 201, 179, 133, 242, 141], "accounts": [{ "name": "randomness", "writable": true }, { "name": "queue", "relations": ["randomness", "oracle"] }, { "name": "oracle", "writable": true }, { "name": "recent_slothashes", "address": "SysvarS1otHashes111111111111111111111111111" }, { "name": "authority", "signer": true, "relations": ["randomness"] }], "args": [{ "name": "params", "type": { "defined": { "name": "RandomnessCommitParams" } } }] }, { "name": "randomness_init", "discriminator": [9, 9, 204, 33, 50, 116, 113, 15], "accounts": [{ "name": "randomness", "writable": true, "signer": true }, { "name": "reward_escrow", "writable": true, "pda": { "seeds": [{ "kind": "account", "path": "randomness" }, { "kind": "const", "value": [6, 221, 246, 225, 215, 101, 161, 147, 217, 203, 225, 70, 206, 235, 121, 172, 28, 180, 133, 237, 95, 91, 55, 145, 58, 140, 245, 133, 126, 255, 0, 169] }, { "kind": "account", "path": "wrapped_sol_mint" }], "program": { "kind": "const", "value": [140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19, 153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89] } } }, { "name": "authority", "signer": true }, { "name": "queue", "writable": true }, { "name": "payer", "writable": true, "signer": true }, { "name": "system_program", "address": "11111111111111111111111111111111" }, { "name": "token_program", "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" }, { "name": "associated_token_program", "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL" }, { "name": "wrapped_sol_mint", "address": "So11111111111111111111111111111111111111112" }, { "name": "program_state" }, { "name": "lut_signer" }, { "name": "lut", "writable": true }, { "name": "address_lookup_table_program", "address": "AddressLookupTab1e1111111111111111111111111" }], "args": [{ "name": "params", "type": { "defined": { "name": "RandomnessInitParams" } } }] }, { "name": "randomness_reveal", "discriminator": [197, 181, 187, 10, 30, 58, 20, 73], "accounts": [{ "name": "randomness", "writable": true }, { "name": "oracle", "relations": ["randomness"] }, { "name": "queue", "relations": ["oracle"] }, { "name": "stats", "writable": true, "pda": { "seeds": [{ "kind": "const", "value": [79, 114, 97, 99, 108, 101, 82, 97, 110, 100, 111, 109, 110, 101, 115, 115, 83, 116, 97, 116, 115] }, { "kind": "account", "path": "oracle" }] } }, { "name": "authority", "signer": true, "relations": ["randomness"] }, { "name": "payer", "writable": true, "signer": true }, { "name": "recent_slothashes", "address": "SysvarS1otHashes111111111111111111111111111" }, { "name": "system_program", "address": "11111111111111111111111111111111" }, { "name": "reward_escrow", "writable": true }, { "name": "token_program", "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" }, { "name": "wrapped_sol_mint", "address": "So11111111111111111111111111111111111111112" }, { "name": "program_state" }], "args": [{ "name": "params", "type": { "defined": { "name": "RandomnessRevealParams" } } }] }, { "name": "state_init", "discriminator": [103, 241, 106, 190, 217, 153, 87, 105], "accounts": [{ "name": "state", "writable": true, "pda": { "seeds": [{ "kind": "const", "value": [83, 84, 65, 84, 69] }] } }, { "name": "payer", "writable": true, "signer": true }, { "name": "system_program", "address": "11111111111111111111111111111111" }], "args": [{ "name": "params", "type": { "defined": { "name": "StateInitParams" } } }] }, { "name": "state_set_configs", "discriminator": [40, 98, 76, 37, 206, 9, 47, 144], "accounts": [{ "name": "state", "writable": true }, { "name": "authority", "signer": true, "relations": ["state"] }, { "name": "queue", "writable": true }, { "name": "payer", "writable": true, "signer": true }, { "name": "system_program", "address": "11111111111111111111111111111111" }], "args": [{ "name": "params", "type": { "defined": { "name": "StateSetConfigsParams" } } }] }], "accounts": [{ "name": "OracleAccountData", "discriminator": [128, 30, 16, 241, 170, 73, 55, 54] }, { "name": "OracleStatsAccountData", "discriminator": [180, 157, 178, 234, 240, 27, 152, 179] }, { "name": "PullFeedAccountData", "discriminator": [196, 27, 108, 196, 10, 215, 219, 40] }, { "name": "QueueAccountData", "discriminator": [217, 194, 55, 127, 184, 83, 138, 1] }, { "name": "RandomnessAccountData", "discriminator": [10, 66, 229, 135, 220, 239, 217, 114] }, { "name": "State", "discriminator": [216, 146, 107, 94, 104, 75, 182, 177] }], "events": [{ "name": "CostWhitelistEvent", "discriminator": [56, 107, 191, 127, 116, 6, 138, 149] }, { "name": "GarbageCollectionEvent", "discriminator": [232, 235, 2, 188, 8, 143, 145, 237] }, { "name": "GuardianQuoteVerifyEvent", "discriminator": [31, 37, 39, 6, 214, 186, 33, 115] }, { "name": "OracleHeartbeatEvent", "discriminator": [52, 29, 166, 2, 94, 7, 188, 13] }, { "name": "OracleInitEvent", "discriminator": [89, 193, 219, 200, 1, 83, 167, 24] }, { "name": "OracleQuoteOverrideEvent", "discriminator": [78, 204, 191, 210, 164, 196, 244, 65] }, { "name": "OracleQuoteRotateEvent", "discriminator": [26, 189, 196, 192, 225, 127, 26, 228] }, { "name": "OracleQuoteVerifyRequestEvent", "discriminator": [203, 209, 79, 0, 20, 71, 226, 202] }, { "name": "PermissionSetEvent", "discriminator": [148, 86, 123, 0, 102, 20, 119, 206] }, { "name": "PullFeedErrorValueEvent", "discriminator": [225, 80, 192, 95, 14, 12, 83, 192] }, { "name": "PullFeedValueEvents", "discriminator": [86, 7, 231, 28, 122, 161, 117, 69] }, { "name": "QueueAddMrEnclaveEvent", "discriminator": [170, 186, 175, 38, 216, 51, 69, 175] }, { "name": "QueueInitEvent", "discriminator": [44, 137, 99, 227, 107, 8, 30, 105] }, { "name": "QueueRemoveMrEnclaveEvent", "discriminator": [4, 105, 196, 60, 84, 122, 203, 196] }, { "name": "RandomnessCommitEvent", "discriminator": [88, 60, 172, 90, 112, 10, 206, 147] }], "errors": [{ "code": 6000, "name": "GenericError" }, { "code": 6001, "name": "InvalidQuote" }, { "code": 6002, "name": "InsufficientQueue" }, { "code": 6003, "name": "QueueFull" }, { "code": 6004, "name": "InvalidEnclaveSigner" }, { "code": 6005, "name": "InvalidSigner" }, { "code": 6006, "name": "MrEnclaveAlreadyExists" }, { "code": 6007, "name": "MrEnclaveAtCapacity" }, { "code": 6008, "name": "MrEnclaveDoesntExist" }, { "code": 6009, "name": "PermissionDenied" }, { "code": 6010, "name": "InvalidQueue" }, { "code": 6011, "name": "IncorrectMrEnclave" }, { "code": 6012, "name": "InvalidAuthority" }, { "code": 6013, "name": "InvalidMrEnclave" }, { "code": 6014, "name": "InvalidTimestamp" }, { "code": 6015, "name": "InvalidOracleIdx" }, { "code": 6016, "name": "InvalidSecpSignature" }, { "code": 6017, "name": "InvalidGuardianQueue" }, { "code": 6018, "name": "InvalidIndex" }, { "code": 6019, "name": "InvalidOracleQueue" }, { "code": 6020, "name": "InvalidPermission" }, { "code": 6021, "name": "InvalidePermissionedAccount" }, { "code": 6022, "name": "InvalidEpochRotate" }, { "code": 6023, "name": "InvalidEpochFinalize" }, { "code": 6024, "name": "InvalidEscrow" }, { "code": 6025, "name": "IllegalOracle" }, { "code": 6026, "name": "IllegalExecuteAttempt" }, { "code": 6027, "name": "IllegalFeedValue" }, { "code": 6028, "name": "InvalidOracleFeedStats" }, { "code": 6029, "name": "InvalidStateAuthority" }, { "code": 6030, "name": "NotEnoughSamples" }, { "code": 6031, "name": "OracleIsVerified" }, { "code": 6032, "name": "QueueIsEmpty" }, { "code": 6033, "name": "SecpRecoverFailure" }, { "code": 6034, "name": "StaleSample" }, { "code": 6035, "name": "SwitchboardRandomnessTooOld" }, { "code": 6036, "name": "EpochIdMismatch" }, { "code": 6037, "name": "GuardianAlreadyVoted" }, { "code": 6038, "name": "RandomnessNotRequested" }, { "code": 6039, "name": "InvalidSlotNumber" }, { "code": 6040, "name": "RandomnessOracleKeyExpired" }, { "code": 6041, "name": "InvalidAdvisory" }, { "code": 6042, "name": "InvalidOracleStats" }, { "code": 6043, "name": "InvalidStakeProgram" }, { "code": 6044, "name": "InvalidStakePool" }, { "code": 6045, "name": "InvalidDelegationPool" }, { "code": 6046, "name": "UnparsableAccount" }, { "code": 6047, "name": "InvalidInstruction" }, { "code": 6048, "name": "OracleAlreadyVerified" }, { "code": 6049, "name": "GuardianNotVerified" }, { "code": 6050, "name": "InvalidConstraint" }, { "code": 6051, "name": "InvalidDelegationGroup" }, { "code": 6052, "name": "OracleKeyNotFound" }, { "code": 6053, "name": "GuardianReregisterAttempt" }], "types": [{ "name": "CompactResult", "serialization": "bytemuck", "repr": { "kind": "c" }, "type": { "kind": "struct", "fields": [{ "name": "std_dev", "docs": ["The standard deviation of the submissions needed for quorom size"], "type": "f32" }, { "name": "mean", "docs": ["The mean of the submissions needed for quorom size"], "type": "f32" }, { "name": "slot", "docs": ["The slot at which this value was signed."], "type": "u64" }] } }, { "name": "CostWhitelistEvent", "type": { "kind": "struct", "fields": [{ "name": "feeds", "type": { "vec": "pubkey" } }, { "name": "reward", "type": "u32" }] } }, { "name": "CurrentResult", "serialization": "bytemuck", "repr": { "kind": "c" }, "type": { "kind": "struct", "fields": [{ "name": "value", "docs": ["The median value of the submissions needed for quorom size"], "type": "i128" }, { "name": "std_dev", "docs": ["The standard deviation of the submissions needed for quorom size"], "type": "i128" }, { "name": "mean", "docs": ["The mean of the submissions needed for quorom size"], "type": "i128" }, { "name": "range", "docs": ["The range of the submissions needed for quorom size"], "type": "i128" }, { "name": "min_value", "docs": ["The minimum value of the submissions needed for quorom size"], "type": "i128" }, { "name": "max_value", "docs": ["The maximum value of the submissions needed for quorom size"], "type": "i128" }, { "name": "num_samples", "docs": ["The number of samples used to calculate this result"], "type": "u8" }, { "name": "padding1", "type": { "array": ["u8", 7] } }, { "name": "slot", "docs": ["The slot at which this value was signed."], "type": "u64" }, { "name": "min_slot", "docs": ["The slot at which the first considered submission was made"], "type": "u64" }, { "name": "max_slot", "docs": ["The slot at which the last considered submission was made"], "type": "u64" }] } }, { "name": "GarbageCollectionEvent", "type": { "kind": "struct", "fields": [{ "name": "oracle", "type": "pubkey" }, { "name": "queue", "type": "pubkey" }] } }, { "name": "GuardianQuoteVerifyEvent", "type": { "kind": "struct", "fields": [{ "name": "quote", "type": "pubkey" }, { "name": "queue", "type": "pubkey" }, { "name": "oracle", "type": "pubkey" }] } }, { "name": "GuardianQuoteVerifyParams", "type": { "kind": "struct", "fields": [{ "name": "timestamp", "type": "i64" }, { "name": "mr_enclave", "type": { "array": ["u8", 32] } }, { "name": "_reserved1", "type": "u32" }, { "name": "ed25519_key", "type": "pubkey" }, { "name": "secp256k1_key", "type": { "array": ["u8", 64] } }, { "name": "slot", "type": "u64" }, { "name": "signature", "type": { "array": ["u8", 64] } }, { "name": "recovery_id", "type": "u8" }, { "name": "advisories", "type": { "vec": "u32" } }] } }, { "name": "GuardianRegisterParams", "type": { "kind": "struct", "fields": [] } }, { "name": "GuardianUnregisterParams", "type": { "kind": "struct", "fields": [] } }, { "name": "MegaSlotInfo", "serialization": "bytemuck", "repr": { "kind": "c" }, "type": { "kind": "struct", "fields": [{ "name": "reserved1", "type": "u64" }, { "name": "slot_end", "type": "u64" }, { "name": "perf_goal", "type": "i64" }, { "name": "current_signature_count", "type": "i64" }] } }, { "name": "MultiSubmission", "type": { "kind": "struct", "fields": [{ "name": "values", "type": { "vec": "i128" } }, { "name": "signature", "type": { "array": ["u8", 64] } }, { "name": "recovery_id", "type": "u8" }] } }, { "name": "OracleAccountData", "serialization": "bytemuck", "repr": { "kind": "c" }, "type": { "kind": "struct", "fields": [{ "name": "enclave", "docs": ["Represents the state of the quote verifiers enclave."], "type": { "defined": { "name": "Quote" } } }, { "name": "authority", "docs": ["The authority of the EnclaveAccount which is permitted to make account changes."], "type": "pubkey" }, { "name": "queue", "docs": ["Queue used for attestation to verify a MRENCLAVE measurement."], "type": "pubkey" }, { "name": "created_at", "docs": ["The unix timestamp when the quote was created."], "type": "i64" }, { "name": "last_heartbeat", "docs": ["The last time the quote heartbeated on-chain."], "type": "i64" }, { "name": "secp_authority", "type": { "array": ["u8", 64] } }, { "name": "gateway_uri", "docs": ["URI location of the verifier's gateway."], "type": { "array": ["u8", 64] } }, { "name": "permissions", "type": "u64" }, { "name": "is_on_queue", "docs": ["Whether the quote is located on the AttestationQueues buffer."], "type": "u8" }, { "name": "_padding1", "type": { "array": ["u8", 7] } }, { "name": "lut_slot", "type": "u64" }, { "name": "last_reward_epoch", "type": "u64" }, { "name": "_ebuf4", "type": { "array": ["u8", 16] } }, { "name": "_ebuf3", "type": { "array": ["u8", 32] } }, { "name": "_ebuf2", "type": { "array": ["u8", 64] } }, { "name": "_ebuf1", "type": { "array": ["u8", 1024] } }] } }, { "name": "OracleEpochInfo", "serialization": "bytemuck", "repr": { "kind": "c" }, "type": { "kind": "struct", "fields": [{ "name": "id", "type": "u64" }, { "name": "reserved1", "type": "u64" }, { "name": "slot_end", "type": "u64" }, { "name": "slash_score", "type": "u64" }, { "name": "reward_score", "type": "u64" }, { "name": "stake_score", "type": "u64" }] } }, { "name": "OracleHeartbeatEvent", "type": { "kind": "struct", "fields": [{ "name": "oracle", "type": "pubkey" }, { "name": "queue", "type": "pubkey" }] } }, { "name": "OracleHeartbeatParams", "type": { "kind": "struct", "fields": [{ "name": "gateway_uri", "type": { "option": { "array": ["u8", 64] } } }] } }, { "name": "OracleInitEvent", "type": { "kind": "struct", "fields": [{ "name": "oracle", "type": "pubkey" }] } }, { "name": "OracleInitParams", "type": { "kind": "struct", "fields": [{ "name": "recent_slot", "type": "u64" }, { "name": "authority", "type": "pubkey" }, { "name": "queue", "type": "pubkey" }, { "name": "secp_authority", "type": { "option": { "array": ["u8", 64] } } }] } }, { "name": "OracleQuoteOverrideEvent", "type": { "kind": "struct", "fields": [{ "name": "oracle", "type": "pubkey" }, { "name": "queue", "type": "pubkey" }] } }, { "name": "OracleQuoteRotateEvent", "type": { "kind": "struct", "fields": [{ "name": "oracle", "type": "pubkey" }] } }, { "name": "OracleQuoteVerifyRequestEvent", "type": { "kind": "struct", "fields": [{ "name": "quote", "type": "pubkey" }, { "name": "oracle", "type": "pubkey" }] } }, { "name": "OracleSetConfigsParams", "type": { "kind": "struct", "fields": [{ "name": "new_authority", "type": { "option": "pubkey" } }, { "name": "new_secp_authority", "type": { "option": { "array": ["u8", 64] } } }] } }, { "name": "OracleStatsAccountData", "serialization": "bytemuck", "repr": { "kind": "c" }, "type": { "kind": "struct", "fields": [{ "name": "owner", "type": "pubkey" }, { "name": "oracle", "type": "pubkey" }, { "name": "finalized_epoch", "docs": ["The last epoch that has completed. cleared after registered with the", "staking program."], "type": { "defined": { "name": "OracleEpochInfo" } } }, { "name": "current_epoch", "docs": ["The current epoch info being used by the oracle. for stake. Will moved", "to finalized_epoch as soon as the epoch is over."], "type": { "defined": { "name": "OracleEpochInfo" } } }, { "name": "mega_slot_info", "type": { "defined": { "name": "MegaSlotInfo" } } }, { "name": "last_transfer_slot", "type": "u64" }, { "name": "bump", "type": "u8" }, { "name": "padding1", "type": { "array": ["u8", 7] } }, { "name": "_ebuf", "docs": ["Reserved."], "type": { "array": ["u8", 1024] } }] } }, { "name": "OracleSubmission", "serialization": "bytemuck", "repr": { "kind": "c" }, "type": { "kind": "struct", "fields": [{ "name": "oracle", "docs": ["The public key of the oracle that submitted this value."], "type": "pubkey" }, { "name": "slot", "docs": ["The slot at which this value was signed."], "type": "u64" }, { "name": "padding1", "type": { "array": ["u8", 8] } }, { "name": "value", "docs": ["The value that was submitted."], "type": "i128" }] } }, { "name": "OracleUpdateDelegationParams", "type": { "kind": "struct", "fields": [{ "name": "_reserved1", "type": "u64" }] } }, { "name": "PermissionSetEvent", "type": { "kind": "struct", "fields": [{ "name": "permission", "type": "pubkey" }] } }, { "name": "PermissionSetParams", "type": { "kind": "struct", "fields": [{ "name": "permission", "type": "u8" }, { "name": "enable", "type": "bool" }] } }, { "name": "PullFeedAccountData", "docs": ["A representation of the data in a pull feed account."], "serialization": "bytemuck", "repr": { "kind": "c" }, "type": { "kind": "struct", "fields": [{ "name": "submissions", "docs": ["The oracle submissions for this feed."], "type": { "array": [{ "defined": { "name": "OracleSubmission" } }, 32] } }, { "name": "authority", "docs": ["The public key of the authority that can update the feed hash that", "this account will use for registering updates."], "type": "pubkey" }, { "name": "queue", "docs": ["The public key of the queue which oracles must be bound to in order to", "submit data to this feed."], "type": "pubkey" }, { "name": "feed_hash", "docs": ["SHA-256 hash of the job schema oracles will execute to produce data", "for this feed."], "type": { "array": ["u8", 32] } }, { "name": "initialized_at", "docs": ["The slot at which this account was initialized."], "type": "i64" }, { "name": "permissions", "type": "u64" }, { "name": "max_variance", "type": "u64" }, { "name": "min_responses", "type": "u32" }, { "name": "name", "type": { "array": ["u8", 32] } }, { "name": "padding1", "type": { "array": ["u8", 2] } }, { "name": "historical_result_idx", "type": "u8" }, { "name": "min_sample_size", "type": "u8" }, { "name": "last_update_timestamp", "type": "i64" }, { "name": "lut_slot", "type": "u64" }, { "name": "_reserved1", "type": { "array": ["u8", 32] } }, { "name": "result", "type": { "defined": { "name": "CurrentResult" } } }, { "name": "max_staleness", "type": "u32" }, { "name": "padding2", "type": { "array": ["u8", 12] } }, { "name": "historical_results", "type": { "array": [{ "defined": { "name": "CompactResult" } }, 32] } }, { "name": "_ebuf4", "type": { "array": ["u8", 8] } }, { "name": "_ebuf3", "type": { "array": ["u8", 24] } }, { "name": "_ebuf2", "type": { "array": ["u8", 256] } }] } }, { "name": "PullFeedCloseParams", "type": { "kind": "struct", "fields": [] } }, { "name": "PullFeedErrorValueEvent", "type": { "kind": "struct", "fields": [{ "name": "feed", "type": "pubkey" }, { "name": "oracle", "type": "pubkey" }] } }, { "name": "PullFeedInitParams", "type": { "kind": "struct", "fields": [{ "name": "feed_hash", "type": { "array": ["u8", 32] } }, { "name": "max_variance", "type": "u64" }, { "name": "min_responses", "type": "u32" }, { "name": "name", "type": { "array": ["u8", 32] } }, { "name": "recent_slot", "type": "u64" }, { "name": "ipfs_hash", "type": { "array": ["u8", 32] } }, { "name": "min_sample_size", "type": "u8" }, { "name": "max_staleness", "type": "u32" }] } }, { "name": "PullFeedSetConfigsParams", "type": { "kind": "struct", "fields": [{ "name": "feed_hash", "type": { "option": { "array": ["u8", 32] } } }, { "name": "authority", "type": { "option": "pubkey" } }, { "name": "max_variance", "type": { "option": "u64" } }, { "name": "min_responses", "type": { "option": "u32" } }, { "name": "name", "type": { "option": { "array": ["u8", 32] } } }, { "name": "ipfs_hash", "type": { "option": { "array": ["u8", 32] } } }, { "name": "min_sample_size", "type": { "option": "u8" } }, { "name": "max_staleness", "type": { "option": "u32" } }] } }, { "name": "PullFeedSubmitResponseManyParams", "type": { "kind": "struct", "fields": [{ "name": "slot", "type": "u64" }, { "name": "submissions", "type": { "vec": { "defined": { "name": "MultiSubmission" } } } }] } }, { "name": "PullFeedSubmitResponseParams", "type": { "kind": "struct", "fields": [{ "name": "slot", "type": "u64" }, { "name": "submissions", "type": { "vec": { "defined": { "name": "Submission" } } } }] } }, { "name": "PullFeedValueEvents", "type": { "kind": "struct", "fields": [{ "name": "feeds", "type": { "vec": "pubkey" } }, { "name": "oracles", "type": { "vec": "pubkey" } }, { "name": "values", "type": { "vec": { "vec": "i128" } } }, { "name": "reward", "type": "u32" }] } }, { "name": "QueueAccountData", "docs": ["An Queue represents a round-robin queue of oracle oracles who attest on-chain", "whether a Switchboard Function was executed within an enclave against an expected set of", "enclave measurements.", "", "For an oracle to join the queue, the oracle must first submit their enclave quote on-chain and", "wait for an existing oracle to attest their quote. If the oracle's quote matches an expected", "measurement within the queues mr_enclaves config, it is granted permissions and will start", "being assigned update requests."], "serialization": "bytemuck", "repr": { "kind": "c" }, "type": { "kind": "struct", "fields": [{ "name": "authority", "docs": ["The address of the authority which is permitted to add/remove allowed enclave measurements."], "type": "pubkey" }, { "name": "mr_enclaves", "docs": ["Allowed enclave measurements."], "type": { "array": [{ "array": ["u8", 32] }, 32] } }, { "name": "oracle_keys", "docs": ["The addresses of the quote oracles who have a valid", "verification status and have heartbeated on-chain recently."], "type": { "array": ["pubkey", 128] } }, { "name": "max_quote_verification_age", "docs": ["The maximum allowable time until a EnclaveAccount needs to be re-verified on-chain."], "type": "i64" }, { "name": "last_heartbeat", "docs": ["The unix timestamp when the last quote oracle heartbeated on-chain."], "type": "i64" }, { "name": "node_timeout", "type": "i64" }, { "name": "oracle_min_stake", "docs": ["The minimum number of lamports a quote oracle needs to lock-up in order to heartbeat and verify other quotes."], "type": "u64" }, { "name": "allow_authority_override_after", "type": "i64" }, { "name": "mr_enclaves_len", "docs": ["The number of allowed enclave measurements."], "type": "u32" }, { "name": "oracle_keys_len", "docs": ["The length of valid quote oracles for the given attestation queue."], "type": "u32" }, { "name": "reward", "docs": ["The reward paid to quote oracles for attesting on-chain."], "type": "u32" }, { "name": "curr_idx", "docs": ["Incrementer used to track the current quote oracle permitted to run any available functions."], "type": "u32" }, { "name": "gc_idx", "docs": ["Incrementer used to garbage collect and remove stale quote oracles."], "type": "u32" }, { "name": "require_authority_heartbeat_permission", "type": "u8" }, { "name": "require_authority_verify_permission", "type": "u8" }, { "name": "require_usage_permissions", "type": "u8" }, { "name": "signer_bump", "type": "u8" }, { "name": "mint", "type": "pubkey" }, { "name": "lut_slot", "type": "u64" }, { "name": "allow_subsidies", "type": "u8" }, { "name": "_ebuf6", "docs": ["Reserved."], "type": { "array": ["u8", 23] } }, { "name": "_ebuf5", "type": { "array": ["u8", 32] } }, { "name": "_ebuf4", "type": { "array": ["u8", 64] } }, { "name": "_ebuf3", "type": { "array": ["u8", 128] } }, { "name": "_ebuf2", "type": { "array": ["u8", 256] } }, { "name": "_ebuf1", "type": { "array": ["u8", 512] } }] } }, { "name": "QueueAddMrEnclaveEvent", "type": { "kind": "struct", "fields": [{ "name": "queue", "type": "pubkey" }, { "name": "mr_enclave", "type": { "array": ["u8", 32] } }] } }, { "name": "QueueAddMrEnclaveParams", "type": { "kind": "struct", "fields": [{ "name": "mr_enclave", "type": { "array": ["u8", 32] } }] } }, { "name": "QueueAllowSubsidiesParams", "type": { "kind": "struct", "fields": [{ "name": "allow_subsidies", "type": "u8" }] } }, { "name": "QueueGarbageCollectParams", "type": { "kind": "struct", "fields": [{ "name": "idx", "type": "u32" }] } }, { "name": "QueueInitDelegationGroupParams", "type": { "kind": "struct", "fields": [] } }, { "name": "QueueInitEvent", "type": { "kind": "struct", "fields": [{ "name": "queue", "type": "pubkey" }] } }, { "name": "QueueInitParams", "type": { "kind": "struct", "fields": [{ "name": "allow_authority_override_after", "type": "u32" }, { "name": "require_authority_heartbeat_permission", "type": "bool" }, { "name": "require_usage_permissions", "type": "bool" }, { "name": "max_quote_verification_age", "type": "u32" }, { "name": "reward", "type": "u32" }, { "name": "node_timeout", "type": "u32" }, { "name": "recent_slot", "type": "u64" }] } }, { "name": "QueueRemoveMrEnclaveEvent", "type": { "kind": "struct", "fields": [{ "name": "queue", "type": "pubkey" }, { "name": "mr_enclave", "type": { "array": ["u8", 32] } }] } }, { "name": "QueueRemoveMrEnclaveParams", "type": { "kind": "struct", "fields": [{ "name": "mr_enclave", "type": { "array": ["u8", 32] } }] } }, { "name": "QueueSetConfigsParams", "type": { "kind": "struct", "fields": [{ "name": "authority", "type": { "option": "pubkey" } }, { "name": "reward", "type": { "option": "u32" } }, { "name": "node_timeout", "type": { "option": "i64" } }] } }, { "name": "Quote", "serialization": "bytemuck", "repr": { "kind": "c" }, "type": { "kind": "struct", "fields": [{ "name": "enclave_signer", "docs": ["The address of the signer generated within an enclave."], "type": "pubkey" }, { "name": "mr_enclave", "docs": ["The quotes MRENCLAVE measurement dictating the contents of the secure enclave."], "type": { "array": ["u8", 32] } }, { "name": "verification_status", "docs": ["The VerificationStatus of the quote."], "type": "u8" }, { "name": "padding1", "type": { "array": ["u8", 7] } }, { "name": "verification_timestamp", "docs": ["The unix timestamp when the quote was last verified."], "type": "i64" }, { "name": "valid_until", "docs": ["The unix timestamp when the quotes verification status expires."], "type": "i64" }, { "name": "quote_registry", "docs": ["The off-chain registry where the verifiers quote can be located."], "type": { "array": ["u8", 32] } }, { "name": "registry_key", "docs": ["Key to lookup the buffer data on IPFS or an alternative decentralized storage solution."], "type": { "array": ["u8", 64] } }, { "name": "secp256k1_signer", "docs": ["The secp256k1 public key of the enclave signer. Derived from the enclave_signer."], "type": { "array": ["u8", 64] } }, { "name": "last_ed25519_signer", "type": "pubkey" }, { "name": "last_secp256k1_signer", "type": { "array": ["u8", 64] } }, { "name": "last_rotate_slot", "type": "u64" }, { "name": "guardian_approvers", "type": { "array": ["pubkey", 64] } }, { "name": "guardian_approvers_len", "type": "u8" }, { "name": "padding2", "type": { "array": ["u8", 7] } }, { "name": "staging_ed25519_signer", "type": "pubkey" }, { "name": "staging_secp256k1_signer", "type": { "array": ["u8", 64] } }, { "name": "_ebuf4", "docs": ["Reserved."], "type": { "array": ["u8", 32] } }, { "name": "_ebuf3", "type": { "array": ["u8", 128] } }, { "name": "_ebuf2", "type": { "array": ["u8", 256] } }, { "name": "_ebuf1", "type": { "array": ["u8", 512] } }] } }, { "name": "RandomnessAccountData", "serialization": "bytemuck", "repr": { "kind": "c" }, "type": { "kind": "struct", "fields": [{ "name": "authority", "type": "pubkey" }, { "name": "queue", "type": "pubkey" }, { "name": "seed_slothash", "type": { "array": ["u8", 32] } }, { "name": "seed_slot", "type": "u64" }, { "name": "oracle", "type": "pubkey" }, { "name": "reveal_slot", "type": "u64" }, { "name": "value", "type": { "array": ["u8", 32] } }, { "name": "lut_slot", "type": "u64" }, { "name": "_ebuf3", "type": { "array": ["u8", 24] } }, { "name": "_ebuf2", "type": { "array": ["u8", 64] } }, { "name": "_ebuf1", "type": { "array": ["u8", 128] } }, { "name": "active_secp256k1_signer", "type": { "array": ["u8", 64] } }, { "name": "active_secp256k1_expiration", "type": "i64" }] } }, { "name": "RandomnessCommitEvent", "type": { "kind": "struct", "fields": [{ "name": "randomness_account", "type": "pubkey" }, { "name": "oracle", "type": "pubkey" }, { "name": "slot", "type": "u64" }, { "name": "slothash", "type": { "array": ["u8", 32] } }] } }, { "name": "RandomnessCommitParams", "type": { "kind": "struct", "fields": [] } }, { "name": "RandomnessInitParams", "type": { "kind": "struct", "fields": [{ "name": "recent_slot", "type": "u64" }] } }, { "name": "RandomnessRevealParams", "type": { "kind": "struct", "fields": [{ "name": "signature", "type": { "array": ["u8", 64] } }, { "name": "recovery_id", "type": "u8" }, { "name": "value", "type": { "array": ["u8", 32] } }] } }, { "name": "State", "serialization": "bytemuck", "repr": { "kind": "c" }, "type": { "kind": "struct", "fields": [{ "name": "bump", "type": "u8" }, { "name": "test_only_disable_mr_enclave_check", "type": "u8" }, { "name": "enable_staking", "type": "u8" }, { "name": "padding1", "type": { "array": ["u8", 5] } }, { "name": "authority", "type": "pubkey" }, { "name": "guardian_queue", "type": "pubkey" }, { "name": "reserved1", "type": "u64" }, { "name": "epoch_length", "type": "u64" }, { "name": "current_epoch", "type": { "defined": { "name": "StateEpochInfo" } } }, { "name": "next_epoch", "type": { "defined": { "name": "StateEpochInfo" } } }, { "name": "finalized_epoch", "type": { "defined": { "name": "StateEpochInfo" } } }, { "name": "stake_pool", "type": "pubkey" }, { "name": "stake_program", "type": "pubkey" }, { "name": "switch_mint", "type": "pubkey" }, { "name": "sgx_advisories", "type": { "array": ["u16", 32] } }, { "name": "advisories_len", "type": "u8" }, { "name": "padding2", "type": "u8" }, { "name": "flat_reward_cut_percentage", "type": "u8" }, { "name": "enable_slashing", "type": "u8" }, { "name": "subsidy_amount", "type": "u32" }, { "name": "lut_slot", "type": "u64" }, { "name": "base_reward", "type": "u32" }, { "name": "_ebuf6", "type": { "array": ["u8", 28] } }, { "name": "_ebuf5", "type": { "array": ["u8", 32] } }, { "name": "_ebuf4", "type": { "array": ["u8", 64] } }, { "name": "_ebuf3", "type": { "array": ["u8", 128] } }, { "name": "_ebuf2", "type": { "array": ["u8", 512] } }, { "name": "cost_whitelist", "docs": ["Cost whitelist by authority"], "type": { "array": ["pubkey", 32] } }] } }, { "name": "StateEpochInfo", "serialization": "bytemuck", "repr": { "kind": "c" }, "type": { "kind": "struct", "fields": [{ "name": "id", "type": "u64" }, { "name": "_reserved1", "type": "u64" }, { "name": "slot_end", "type": "u64" }] } }, { "name": "StateInitParams", "type": { "kind": "struct", "fields": [] } }, { "name": "StateSetConfigsParams", "type": { "kind": "struct", "fields": [{ "name": "new_authority", "type": "pubkey" }, { "name": "test_only_disable_mr_enclave_check", "type": "u8" }, { "name": "stake_pool", "type": "pubkey" }, { "name": "stake_program", "type": "pubkey" }, { "name": "add_advisory", "type": "u16" }, { "name": "rm_advisory", "type": "u16" }, { "name": "epoch_length", "type": "u32" }, { "name": "reset_epochs", "type": "bool" }, { "name": "switch_mint", "type": "pubkey" }, { "name": "enable_staking", "type": "u8" }, { "name": "subsidy_amount", "type": "u32" }, { "name": "base_reward", "type": "u32" }, { "name": "add_cost_wl", "type": "pubkey" }, { "name": "rm_cost_wl", "type": "pubkey" }] } }, { "name": "Submission", "type": { "kind": "struct", "fields": [{ "name": "value", "type": "i128" }, { "name": "signature", "type": { "array": ["u8", 64] } }, { "name": "recovery_id", "type": "u8" }, { "name": "offset", "type": "u8" }] } }] }
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"transactionUtils.d.ts","sourceRoot":"","sources":["../../src/transactions/transactionUtils.ts"],"names":[],"mappings":"AAAA,O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E,kBAAkB,CAAC,CAAC,CA0BnD;AAED,wBAAsB,8BAA8B,CAAC,MAAM,EAAE,aAAa,oBA4CzE;AAED,wBAAsB,gCAAgC,CACpD,MAAM,EAAE,aAAa,EACrB,2BAA2B,CAAC,EAAE,MAAM,EACpC,UAAU,CAAC,EAAE,MAAM,GAClB,OAAO,CAAC,qBAAqB,GAAG,SAAS,CAAC,CAsH5C;AAED,wBAAsB,gCAAgC,CACpD,eAAe,EAAE,oBAAoB,EACrC,YAAY,EAAE,SAAS,EACvB,eAAe,EAAE,SAAS,GACzB,OAAO,CAAC,qBAAqB,GAAG,SAAS,CAAC,CAsC5C;AAED,wBAAgB,YAAY,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,kBAAkB,EAAE,KAAK,EAAE,GAAG;;;;EA0DxE"}
|
@@ -337,7 +337,7 @@ async function requiresRefreshBeforeRebalance(client) {
|
|
337
337
|
client.livePositionUpdates.debtAdjustment > BigInt(0)) {
|
338
338
|
return false;
|
339
339
|
}
|
340
|
-
const oldStateWithLatestPrices = await (0, generalUtils_2.positionStateWithLatestPrices)(client.solautoPositionData.state, constants_1.PRICES[client.supplyMint.toString()].price, constants_1.PRICES[client.debtMint.toString()].price);
|
340
|
+
const oldStateWithLatestPrices = await (0, generalUtils_2.positionStateWithLatestPrices)(client.connection, client.solautoPositionData.state, constants_1.PRICES[client.supplyMint.toString()].price, constants_1.PRICES[client.debtMint.toString()].price);
|
341
341
|
const utilizationRateDiff = Math.abs((client.solautoPositionState?.liqUtilizationRateBps ?? 0) -
|
342
342
|
oldStateWithLatestPrices.liqUtilizationRateBps);
|
343
343
|
client.log("Liq utilization rate diff:", utilizationRateDiff);
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { PublicKey } from "@solana/web3.js";
|
1
|
+
import { Connection, PublicKey } from "@solana/web3.js";
|
2
2
|
import { MaybeRpcAccount, Umi, PublicKey as UmiPublicKey } from "@metaplex-foundation/umi";
|
3
3
|
export declare function consoleLog(...args: any[]): void;
|
4
4
|
export declare function generateRandomU8(): number;
|
@@ -7,7 +7,10 @@ export declare function currentUnixSeconds(): number;
|
|
7
7
|
export declare function getSolanaAccountCreated(umi: Umi, pk: PublicKey): Promise<boolean>;
|
8
8
|
export declare function rpcAccountCreated(account: MaybeRpcAccount): boolean;
|
9
9
|
export declare function arraysAreEqual(arrayA: number[], arrayB: number[]): boolean;
|
10
|
-
export declare function
|
10
|
+
export declare function zip<T, U>(list1: T[], list2: U[]): [T, U][];
|
11
|
+
export declare function fetchTokenPrices(conn: Connection, mints: PublicKey[]): Promise<number[]>;
|
12
|
+
export declare function getPythPrices(mints: PublicKey[]): Promise<number[]>;
|
13
|
+
export declare function getSwitchboardPrices(conn: Connection, mints: PublicKey[]): Promise<number[]>;
|
11
14
|
export declare function safeGetPrice(mint: PublicKey | UmiPublicKey | undefined): number | undefined;
|
12
15
|
export type ErrorsToThrow = Array<new (...args: any[]) => Error>;
|
13
16
|
export declare function retryWithExponentialBackoff<T>(fn: (attemptNum: number, prevErr?: Error) => Promise<T>, retries?: number, delay?: number, errorsToThrow?: ErrorsToThrow): Promise<T>;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"generalUtils.d.ts","sourceRoot":"","sources":["../../src/utils/generalUtils.ts"],"names":[],"mappings":"AAAA,OAAO,
|
1
|
+
{"version":3,"file":"generalUtils.d.ts","sourceRoot":"","sources":["../../src/utils/generalUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EAEV,SAAS,EAGV,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,eAAe,EAEf,GAAG,EACH,SAAS,IAAI,YAAY,EAC1B,MAAM,0BAA0B,CAAC;AAalC,wBAAgB,UAAU,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI,CAI/C;AACD,wBAAgB,gBAAgB,IAAI,MAAM,CAEzC;AAED,wBAAgB,iBAAiB,IAAI,MAAM,CAO1C;AAED,wBAAgB,kBAAkB,IAAI,MAA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