@symmetry-hq/sdk 1.0.15 → 1.0.17
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/index.js +6 -6
- package/package.json +1 -1
- package/src/index.ts +6 -6
- package/test.ts +27 -9
package/dist/index.js
CHANGED
|
@@ -791,7 +791,7 @@ class SymmetryCore {
|
|
|
791
791
|
web3_js_1.ComputeBudgetProgram.setComputeUnitLimit({ units: constants_1.COMPUTE_UNITS }),
|
|
792
792
|
web3_js_1.ComputeBudgetProgram.setComputeUnitPrice({ microLamports: this.sdkParams.priorityFee }),
|
|
793
793
|
],
|
|
794
|
-
lookupTables: [],
|
|
794
|
+
lookupTables: [vault.lookupTables.active[0]],
|
|
795
795
|
}]] };
|
|
796
796
|
// Only execute in the same transaction when there is no delay and no scheduled activation.
|
|
797
797
|
if (modificationDelay.eq(new bn_js_1.default(0)) && activationTimestamp.eq(new bn_js_1.default(0))) {
|
|
@@ -840,8 +840,8 @@ class SymmetryCore {
|
|
|
840
840
|
ixs.push(web3_js_1.ComputeBudgetProgram.setComputeUnitPrice({ microLamports: this.sdkParams.priorityFee }));
|
|
841
841
|
txBatchData.batches.push([{
|
|
842
842
|
payer: manager,
|
|
843
|
-
instructions: ixs,
|
|
844
|
-
lookupTables: [],
|
|
843
|
+
instructions: ixs, // TODO: use jup lookup tables
|
|
844
|
+
lookupTables: [vault.lookupTables.active[0]],
|
|
845
845
|
}]);
|
|
846
846
|
txBatchData.batches.push([{
|
|
847
847
|
payer: manager,
|
|
@@ -850,7 +850,7 @@ class SymmetryCore {
|
|
|
850
850
|
web3_js_1.ComputeBudgetProgram.setComputeUnitLimit({ units: constants_1.COMPUTE_UNITS }),
|
|
851
851
|
web3_js_1.ComputeBudgetProgram.setComputeUnitPrice({ microLamports: this.sdkParams.priorityFee }),
|
|
852
852
|
],
|
|
853
|
-
lookupTables: [],
|
|
853
|
+
lookupTables: [vault.lookupTables.active[0]],
|
|
854
854
|
}]);
|
|
855
855
|
}
|
|
856
856
|
else {
|
|
@@ -863,7 +863,7 @@ class SymmetryCore {
|
|
|
863
863
|
web3_js_1.ComputeBudgetProgram.setComputeUnitLimit({ units: constants_1.COMPUTE_UNITS }),
|
|
864
864
|
web3_js_1.ComputeBudgetProgram.setComputeUnitPrice({ microLamports: this.sdkParams.priorityFee }),
|
|
865
865
|
],
|
|
866
|
-
lookupTables: vault.lookupTables.active,
|
|
866
|
+
lookupTables: [vault.lookupTables.active[0]],
|
|
867
867
|
}],
|
|
868
868
|
[{
|
|
869
869
|
payer: manager,
|
|
@@ -872,7 +872,7 @@ class SymmetryCore {
|
|
|
872
872
|
web3_js_1.ComputeBudgetProgram.setComputeUnitLimit({ units: constants_1.COMPUTE_UNITS }),
|
|
873
873
|
web3_js_1.ComputeBudgetProgram.setComputeUnitPrice({ microLamports: this.sdkParams.priorityFee }),
|
|
874
874
|
],
|
|
875
|
-
lookupTables: vault.lookupTables.active,
|
|
875
|
+
lookupTables: [vault.lookupTables.active[0]],
|
|
876
876
|
}]
|
|
877
877
|
];
|
|
878
878
|
}
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -834,7 +834,7 @@ export class SymmetryCore {
|
|
|
834
834
|
ComputeBudgetProgram.setComputeUnitLimit({units: COMPUTE_UNITS}),
|
|
835
835
|
ComputeBudgetProgram.setComputeUnitPrice({microLamports: this.sdkParams.priorityFee}),
|
|
836
836
|
],
|
|
837
|
-
lookupTables: [],
|
|
837
|
+
lookupTables: [vault.lookupTables.active[0]],
|
|
838
838
|
}]]};
|
|
839
839
|
|
|
840
840
|
// Only execute in the same transaction when there is no delay and no scheduled activation.
|
|
@@ -884,8 +884,8 @@ export class SymmetryCore {
|
|
|
884
884
|
ixs.push(ComputeBudgetProgram.setComputeUnitPrice({microLamports: this.sdkParams.priorityFee}));
|
|
885
885
|
txBatchData.batches.push([{
|
|
886
886
|
payer: manager,
|
|
887
|
-
instructions: ixs,
|
|
888
|
-
lookupTables: [],
|
|
887
|
+
instructions: ixs, // TODO: use jup lookup tables
|
|
888
|
+
lookupTables: [vault.lookupTables.active[0]],
|
|
889
889
|
}]);
|
|
890
890
|
txBatchData.batches.push([{
|
|
891
891
|
payer: manager,
|
|
@@ -894,7 +894,7 @@ export class SymmetryCore {
|
|
|
894
894
|
ComputeBudgetProgram.setComputeUnitLimit({units: COMPUTE_UNITS}),
|
|
895
895
|
ComputeBudgetProgram.setComputeUnitPrice({microLamports: this.sdkParams.priorityFee}),
|
|
896
896
|
],
|
|
897
|
-
lookupTables: [],
|
|
897
|
+
lookupTables: [vault.lookupTables.active[0]],
|
|
898
898
|
}]);
|
|
899
899
|
} else {
|
|
900
900
|
txBatchData.batches = [
|
|
@@ -906,7 +906,7 @@ export class SymmetryCore {
|
|
|
906
906
|
ComputeBudgetProgram.setComputeUnitLimit({units: COMPUTE_UNITS}),
|
|
907
907
|
ComputeBudgetProgram.setComputeUnitPrice({microLamports: this.sdkParams.priorityFee}),
|
|
908
908
|
],
|
|
909
|
-
lookupTables: vault.lookupTables.active,
|
|
909
|
+
lookupTables: [vault.lookupTables.active[0]],
|
|
910
910
|
}],
|
|
911
911
|
[{
|
|
912
912
|
payer: manager,
|
|
@@ -915,7 +915,7 @@ export class SymmetryCore {
|
|
|
915
915
|
ComputeBudgetProgram.setComputeUnitLimit({units: COMPUTE_UNITS}),
|
|
916
916
|
ComputeBudgetProgram.setComputeUnitPrice({microLamports: this.sdkParams.priorityFee}),
|
|
917
917
|
],
|
|
918
|
-
lookupTables: vault.lookupTables.active,
|
|
918
|
+
lookupTables: [vault.lookupTables.active[0]],
|
|
919
919
|
}]
|
|
920
920
|
];
|
|
921
921
|
}
|
package/test.ts
CHANGED
|
@@ -322,30 +322,48 @@ async function testStates() {
|
|
|
322
322
|
|
|
323
323
|
if (tests.addOrEditToken) {
|
|
324
324
|
let add_token: AddOrEditTokenInput = {
|
|
325
|
-
token_mint: "
|
|
325
|
+
token_mint: "XsoCS1TfEyfFhfvj8EtZ528L3CaKBDBRqRapnBbDF2W",
|
|
326
326
|
active: true,
|
|
327
327
|
min_oracles_thresh: 1,
|
|
328
|
-
min_conf_bps:
|
|
328
|
+
min_conf_bps: 50,
|
|
329
329
|
conf_thresh_bps: 200,
|
|
330
330
|
conf_multiplier: 1,
|
|
331
331
|
oracles: [
|
|
332
332
|
{
|
|
333
|
-
oracle_type: "
|
|
333
|
+
oracle_type: "raydium_clmm",
|
|
334
334
|
account_lut_id: 0,
|
|
335
335
|
account_lut_index: 0,
|
|
336
|
-
account:
|
|
337
|
-
weight_bps:
|
|
338
|
-
is_required:
|
|
336
|
+
account: "6truu3rZuiB9rKQg4VYC3Dt3QwV7DgwGqXrYUcrvnDDE",
|
|
337
|
+
weight_bps: 5000,
|
|
338
|
+
is_required: false,
|
|
339
339
|
conf_thresh_bps: 200,
|
|
340
340
|
volatility_thresh_bps: 200,
|
|
341
341
|
max_slippage_bps: 100,
|
|
342
|
-
min_liquidity:
|
|
342
|
+
min_liquidity: 0,
|
|
343
343
|
staleness_thresh: 120,
|
|
344
344
|
staleness_conf_rate_bps: 50,
|
|
345
345
|
token_decimals: 9,
|
|
346
|
-
twap_seconds_ago:
|
|
346
|
+
twap_seconds_ago: 50,
|
|
347
347
|
twap_secondary_seconds_ago: 100,
|
|
348
|
-
quote_token: "
|
|
348
|
+
quote_token: "wsol",
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
oracle_type: "raydium_clmm",
|
|
352
|
+
account_lut_id: 0,
|
|
353
|
+
account_lut_index: 0,
|
|
354
|
+
account: "4pCZCVEiYyT4efNdXUdL2tJF8VGMgiMXrZWq6FiNXhRw",
|
|
355
|
+
weight_bps: 5000,
|
|
356
|
+
is_required: false,
|
|
357
|
+
conf_thresh_bps: 200,
|
|
358
|
+
volatility_thresh_bps: 200,
|
|
359
|
+
max_slippage_bps: 100,
|
|
360
|
+
min_liquidity: 0,
|
|
361
|
+
staleness_thresh: 120,
|
|
362
|
+
staleness_conf_rate_bps: 50,
|
|
363
|
+
token_decimals: 9,
|
|
364
|
+
twap_seconds_ago: 50,
|
|
365
|
+
twap_secondary_seconds_ago: 100,
|
|
366
|
+
quote_token: "wsol",
|
|
349
367
|
},
|
|
350
368
|
],
|
|
351
369
|
};
|