@drift-labs/sdk 2.92.0-beta.1 → 2.92.0-beta.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/VERSION +1 -1
- package/package.json +1 -1
- package/tests/ci/verifyConstants.ts +17 -0
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.92.0-beta.
|
|
1
|
+
2.92.0-beta.2
|
package/package.json
CHANGED
|
@@ -61,9 +61,14 @@ describe('Verify Constants', function () {
|
|
|
61
61
|
},
|
|
62
62
|
});
|
|
63
63
|
|
|
64
|
+
let lutAccounts : string[];
|
|
65
|
+
|
|
64
66
|
before(async () => {
|
|
65
67
|
await devnetDriftClient.subscribe();
|
|
66
68
|
await mainnetDriftClient.subscribe();
|
|
69
|
+
|
|
70
|
+
const lookupTable = await mainnetDriftClient.fetchMarketLookupTableAccount();
|
|
71
|
+
lutAccounts = lookupTable.state.addresses.map((x) => x.toBase58());
|
|
67
72
|
});
|
|
68
73
|
|
|
69
74
|
after(async () => {
|
|
@@ -106,6 +111,12 @@ describe('Verify Constants', function () {
|
|
|
106
111
|
market.marketIndex
|
|
107
112
|
}, market: ${market.pubkey.toBase58()}, constants: ${correspondingConfigMarket.mint.toBase58()}, chain: ${market.mint.toBase58()}`
|
|
108
113
|
);
|
|
114
|
+
|
|
115
|
+
const lutHasMarket = lutAccounts.includes(market.pubkey.toBase58());
|
|
116
|
+
assert(lutHasMarket, `Mainnet LUT is missing spot market ${market.marketIndex} pubkey ${market.pubkey.toBase58()}`);
|
|
117
|
+
|
|
118
|
+
const lutHasMarketOracle = lutAccounts.includes(market.oracle.toBase58());
|
|
119
|
+
assert(lutHasMarketOracle, `Mainnet LUT is missing spot market ${market.marketIndex} oracle ${market.oracle.toBase58()}`);
|
|
109
120
|
}
|
|
110
121
|
|
|
111
122
|
const perpMarkets = mainnetDriftClient.getPerpMarketAccounts();
|
|
@@ -137,6 +148,12 @@ describe('Verify Constants', function () {
|
|
|
137
148
|
correspondingConfigMarket.oracleSource
|
|
138
149
|
)}, chain: ${getVariant(market.amm.oracleSource)}`
|
|
139
150
|
);
|
|
151
|
+
|
|
152
|
+
const lutHasMarket = lutAccounts.includes(market.pubkey.toBase58());
|
|
153
|
+
assert(lutHasMarket, `Mainnet LUT is missing perp market ${market.marketIndex} pubkey ${market.pubkey.toBase58()}`);
|
|
154
|
+
|
|
155
|
+
const lutHasMarketOracle = lutAccounts.includes(market.amm.oracle.toBase58());
|
|
156
|
+
assert(lutHasMarketOracle, `Mainnet LUT is missing perp market ${market.marketIndex} oracle ${market.amm.oracle.toBase58()}`);
|
|
140
157
|
}
|
|
141
158
|
});
|
|
142
159
|
|