@drift-labs/sdk 2.72.0-beta.2 → 2.72.0-beta.4
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/lib/adminClient.d.ts +0 -1
- package/lib/adminClient.js +60 -27
- package/lib/constants/perpMarkets.js +10 -0
- package/lib/idl/drift.json +36 -0
- package/package.json +1 -1
- package/src/adminClient.ts +285 -189
- package/src/constants/perpMarkets.ts +10 -0
- package/src/idl/drift.json +36 -0
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.72.0-beta.
|
|
1
|
+
2.72.0-beta.4
|
package/lib/adminClient.d.ts
CHANGED
|
@@ -23,7 +23,6 @@ export declare class AdminClient extends DriftClient {
|
|
|
23
23
|
updatePerpMarketCurveUpdateIntensity(perpMarketIndex: number, curveUpdateIntensity: number): Promise<TransactionSignature>;
|
|
24
24
|
updatePerpMarketTargetBaseAssetAmountPerLp(perpMarketIndex: number, targetBaseAssetAmountPerLP: number): Promise<TransactionSignature>;
|
|
25
25
|
updatePerpMarketMarginRatio(perpMarketIndex: number, marginRatioInitial: number, marginRatioMaintenance: number): Promise<TransactionSignature>;
|
|
26
|
-
updatePerpMarketFundingPeriod(perpMarketIndex: number, fundingPeriod: BN): Promise<TransactionSignature>;
|
|
27
26
|
updatePerpMarketImfFactor(perpMarketIndex: number, imfFactor: number, unrealizedPnlImfFactor: number): Promise<TransactionSignature>;
|
|
28
27
|
updatePerpMarketBaseSpread(perpMarketIndex: number, baseSpread: number): Promise<TransactionSignature>;
|
|
29
28
|
updateAmmJitIntensity(perpMarketIndex: number, ammJitIntensity: number): Promise<TransactionSignature>;
|
package/lib/adminClient.js
CHANGED
|
@@ -341,18 +341,6 @@ class AdminClient extends driftClient_1.DriftClient {
|
|
|
341
341
|
const { txSig } = await this.sendTransaction(tx, [], this.opts);
|
|
342
342
|
return txSig;
|
|
343
343
|
}
|
|
344
|
-
async updatePerpMarketFundingPeriod(perpMarketIndex, fundingPeriod) {
|
|
345
|
-
const updatePerpMarketMarginRatioIx = await this.program.instruction.updatePerpMarketFundingRate(fundingPeriod, {
|
|
346
|
-
accounts: {
|
|
347
|
-
admin: this.wallet.publicKey,
|
|
348
|
-
state: await this.getStatePublicKey(),
|
|
349
|
-
perpMarket: await (0, pda_1.getPerpMarketPublicKey)(this.program.programId, perpMarketIndex),
|
|
350
|
-
},
|
|
351
|
-
});
|
|
352
|
-
const tx = await this.buildTransaction(updatePerpMarketMarginRatioIx);
|
|
353
|
-
const { txSig } = await this.sendTransaction(tx, [], this.opts);
|
|
354
|
-
return txSig;
|
|
355
|
-
}
|
|
356
344
|
async updatePerpMarketImfFactor(perpMarketIndex, imfFactor, unrealizedPnlImfFactor) {
|
|
357
345
|
return await this.program.rpc.updatePerpMarketImfFactor(imfFactor, unrealizedPnlImfFactor, {
|
|
358
346
|
accounts: {
|
|
@@ -824,104 +812,137 @@ class AdminClient extends driftClient_1.DriftClient {
|
|
|
824
812
|
return txSig;
|
|
825
813
|
}
|
|
826
814
|
async updatePerpAuctionDuration(minDuration) {
|
|
827
|
-
|
|
815
|
+
const updatePerpAuctionDurationIx = await this.program.instruction.updatePerpAuctionDuration(typeof minDuration === 'number' ? minDuration : minDuration.toNumber(), {
|
|
828
816
|
accounts: {
|
|
829
817
|
admin: this.wallet.publicKey,
|
|
830
818
|
state: await this.getStatePublicKey(),
|
|
831
819
|
},
|
|
832
820
|
});
|
|
821
|
+
const tx = await this.buildTransaction(updatePerpAuctionDurationIx);
|
|
822
|
+
const { txSig } = await this.sendTransaction(tx, [], this.opts);
|
|
823
|
+
return txSig;
|
|
833
824
|
}
|
|
834
825
|
async updateSpotAuctionDuration(defaultAuctionDuration) {
|
|
835
|
-
|
|
826
|
+
const updateSpotAuctionDurationIx = await this.program.instruction.updateSpotAuctionDuration(defaultAuctionDuration, {
|
|
836
827
|
accounts: {
|
|
837
828
|
admin: this.wallet.publicKey,
|
|
838
829
|
state: await this.getStatePublicKey(),
|
|
839
830
|
},
|
|
840
831
|
});
|
|
832
|
+
const tx = await this.buildTransaction(updateSpotAuctionDurationIx);
|
|
833
|
+
const { txSig } = await this.sendTransaction(tx, [], this.opts);
|
|
834
|
+
return txSig;
|
|
841
835
|
}
|
|
842
836
|
async updatePerpMarketMaxFillReserveFraction(perpMarketIndex, maxBaseAssetAmountRatio) {
|
|
843
|
-
|
|
837
|
+
const updatePerpMarketMaxFillReserveFractionIx = await this.program.instruction.updatePerpMarketMaxFillReserveFraction(maxBaseAssetAmountRatio, {
|
|
844
838
|
accounts: {
|
|
845
839
|
admin: this.wallet.publicKey,
|
|
846
840
|
state: await this.getStatePublicKey(),
|
|
847
841
|
perpMarket: await (0, pda_1.getPerpMarketPublicKey)(this.program.programId, perpMarketIndex),
|
|
848
842
|
},
|
|
849
843
|
});
|
|
844
|
+
const tx = await this.buildTransaction(updatePerpMarketMaxFillReserveFractionIx);
|
|
845
|
+
const { txSig } = await this.sendTransaction(tx, [], this.opts);
|
|
846
|
+
return txSig;
|
|
850
847
|
}
|
|
851
848
|
async updateMaxSlippageRatio(perpMarketIndex, maxSlippageRatio) {
|
|
852
|
-
|
|
849
|
+
const updateMaxSlippageRatioIx = await this.program.instruction.updateMaxSlippageRatio(maxSlippageRatio, {
|
|
853
850
|
accounts: {
|
|
854
851
|
admin: this.wallet.publicKey,
|
|
855
852
|
state: await this.getStatePublicKey(),
|
|
856
853
|
perpMarket: this.getPerpMarketAccount(perpMarketIndex).pubkey,
|
|
857
854
|
},
|
|
858
855
|
});
|
|
856
|
+
const tx = await this.buildTransaction(updateMaxSlippageRatioIx);
|
|
857
|
+
const { txSig } = await this.sendTransaction(tx, [], this.opts);
|
|
858
|
+
return txSig;
|
|
859
859
|
}
|
|
860
860
|
async updatePerpMarketUnrealizedAssetWeight(perpMarketIndex, unrealizedInitialAssetWeight, unrealizedMaintenanceAssetWeight) {
|
|
861
|
-
|
|
861
|
+
const updatePerpMarketUnrealizedAssetWeightIx = await this.program.instruction.updatePerpMarketUnrealizedAssetWeight(unrealizedInitialAssetWeight, unrealizedMaintenanceAssetWeight, {
|
|
862
862
|
accounts: {
|
|
863
863
|
admin: this.wallet.publicKey,
|
|
864
864
|
state: await this.getStatePublicKey(),
|
|
865
865
|
perpMarket: await (0, pda_1.getPerpMarketPublicKey)(this.program.programId, perpMarketIndex),
|
|
866
866
|
},
|
|
867
867
|
});
|
|
868
|
+
const tx = await this.buildTransaction(updatePerpMarketUnrealizedAssetWeightIx);
|
|
869
|
+
const { txSig } = await this.sendTransaction(tx, [], this.opts);
|
|
870
|
+
return txSig;
|
|
868
871
|
}
|
|
869
872
|
async updatePerpMarketMaxImbalances(perpMarketIndex, unrealizedMaxImbalance, maxRevenueWithdrawPerPeriod, quoteMaxInsurance) {
|
|
870
|
-
|
|
873
|
+
const updatePerpMarketMaxImabalancesIx = await this.program.instruction.updatePerpMarketMaxImbalances(unrealizedMaxImbalance, maxRevenueWithdrawPerPeriod, quoteMaxInsurance, {
|
|
871
874
|
accounts: {
|
|
872
875
|
admin: this.wallet.publicKey,
|
|
873
876
|
state: await this.getStatePublicKey(),
|
|
874
877
|
perpMarket: await (0, pda_1.getPerpMarketPublicKey)(this.program.programId, perpMarketIndex),
|
|
875
878
|
},
|
|
876
879
|
});
|
|
880
|
+
const tx = await this.buildTransaction(updatePerpMarketMaxImabalancesIx);
|
|
881
|
+
const { txSig } = await this.sendTransaction(tx, [], this.opts);
|
|
882
|
+
return txSig;
|
|
877
883
|
}
|
|
878
884
|
async updatePerpMarketMaxOpenInterest(perpMarketIndex, maxOpenInterest) {
|
|
879
|
-
|
|
885
|
+
const updatePerpMarketMaxOpenInterestIx = await this.program.instruction.updatePerpMarketMaxOpenInterest(maxOpenInterest, {
|
|
880
886
|
accounts: {
|
|
881
887
|
admin: this.wallet.publicKey,
|
|
882
888
|
state: await this.getStatePublicKey(),
|
|
883
889
|
perpMarket: await (0, pda_1.getPerpMarketPublicKey)(this.program.programId, perpMarketIndex),
|
|
884
890
|
},
|
|
885
891
|
});
|
|
892
|
+
const tx = await this.buildTransaction(updatePerpMarketMaxOpenInterestIx);
|
|
893
|
+
const { txSig } = await this.sendTransaction(tx, [], this.opts);
|
|
894
|
+
return txSig;
|
|
886
895
|
}
|
|
887
896
|
async updatePerpMarketFeeAdjustment(perpMarketIndex, feeAdjustment) {
|
|
888
|
-
|
|
897
|
+
const updatepPerpMarketFeeAdjustmentIx = await this.program.instruction.updatePerpMarketFeeAdjustment(feeAdjustment, {
|
|
889
898
|
accounts: {
|
|
890
899
|
admin: this.wallet.publicKey,
|
|
891
900
|
state: await this.getStatePublicKey(),
|
|
892
901
|
perpMarket: await (0, pda_1.getPerpMarketPublicKey)(this.program.programId, perpMarketIndex),
|
|
893
902
|
},
|
|
894
903
|
});
|
|
904
|
+
const tx = await this.buildTransaction(updatepPerpMarketFeeAdjustmentIx);
|
|
905
|
+
const { txSig } = await this.sendTransaction(tx, [], this.opts);
|
|
906
|
+
return txSig;
|
|
895
907
|
}
|
|
896
908
|
async updateSerumVault(srmVault) {
|
|
897
|
-
|
|
909
|
+
const updateSerumVaultIx = await this.program.instruction.updateSerumVault(srmVault, {
|
|
898
910
|
accounts: {
|
|
899
911
|
admin: this.wallet.publicKey,
|
|
900
912
|
state: await this.getStatePublicKey(),
|
|
901
913
|
srmVault: srmVault,
|
|
902
914
|
},
|
|
903
915
|
});
|
|
916
|
+
const tx = await this.buildTransaction(updateSerumVaultIx);
|
|
917
|
+
const { txSig } = await this.sendTransaction(tx, [], this.opts);
|
|
918
|
+
return txSig;
|
|
904
919
|
}
|
|
905
920
|
async updatePerpMarketLiquidationFee(perpMarketIndex, liquidatorFee, ifLiquidationFee) {
|
|
906
|
-
|
|
921
|
+
const updatePerpMarketLiquidationFeeIx = await this.program.instruction.updatePerpMarketLiquidationFee(liquidatorFee, ifLiquidationFee, {
|
|
907
922
|
accounts: {
|
|
908
923
|
admin: this.wallet.publicKey,
|
|
909
924
|
state: await this.getStatePublicKey(),
|
|
910
925
|
perpMarket: await (0, pda_1.getPerpMarketPublicKey)(this.program.programId, perpMarketIndex),
|
|
911
926
|
},
|
|
912
927
|
});
|
|
928
|
+
const tx = await this.buildTransaction(updatePerpMarketLiquidationFeeIx);
|
|
929
|
+
const { txSig } = await this.sendTransaction(tx, [], this.opts);
|
|
930
|
+
return txSig;
|
|
913
931
|
}
|
|
914
932
|
async updateSpotMarketLiquidationFee(spotMarketIndex, liquidatorFee, ifLiquidationFee) {
|
|
915
|
-
|
|
933
|
+
const updateSpotMarketLiquidationFeeIx = await this.program.instruction.updateSpotMarketLiquidationFee(liquidatorFee, ifLiquidationFee, {
|
|
916
934
|
accounts: {
|
|
917
935
|
admin: this.wallet.publicKey,
|
|
918
936
|
state: await this.getStatePublicKey(),
|
|
919
937
|
spotMarket: await (0, pda_1.getSpotMarketPublicKey)(this.program.programId, spotMarketIndex),
|
|
920
938
|
},
|
|
921
939
|
});
|
|
940
|
+
const tx = await this.buildTransaction(updateSpotMarketLiquidationFeeIx);
|
|
941
|
+
const { txSig } = await this.sendTransaction(tx, [], this.opts);
|
|
942
|
+
return txSig;
|
|
922
943
|
}
|
|
923
944
|
async initializeProtocolIfSharesTransferConfig() {
|
|
924
|
-
|
|
945
|
+
const initializeProtocolIfSharesTransferConfigIx = await this.program.instruction.initializeProtocolIfSharesTransferConfig({
|
|
925
946
|
accounts: {
|
|
926
947
|
admin: this.wallet.publicKey,
|
|
927
948
|
state: await this.getStatePublicKey(),
|
|
@@ -930,15 +951,21 @@ class AdminClient extends driftClient_1.DriftClient {
|
|
|
930
951
|
protocolIfSharesTransferConfig: (0, pda_1.getProtocolIfSharesTransferConfigPublicKey)(this.program.programId),
|
|
931
952
|
},
|
|
932
953
|
});
|
|
954
|
+
const tx = await this.buildTransaction(initializeProtocolIfSharesTransferConfigIx);
|
|
955
|
+
const { txSig } = await this.sendTransaction(tx, [], this.opts);
|
|
956
|
+
return txSig;
|
|
933
957
|
}
|
|
934
958
|
async updateProtocolIfSharesTransferConfig(whitelistedSigners, maxTransferPerEpoch) {
|
|
935
|
-
|
|
959
|
+
const updateProtocolIfSharesTransferConfigIx = await this.program.instruction.updateProtocolIfSharesTransferConfig(whitelistedSigners || null, maxTransferPerEpoch, {
|
|
936
960
|
accounts: {
|
|
937
961
|
admin: this.wallet.publicKey,
|
|
938
962
|
state: await this.getStatePublicKey(),
|
|
939
963
|
protocolIfSharesTransferConfig: (0, pda_1.getProtocolIfSharesTransferConfigPublicKey)(this.program.programId),
|
|
940
964
|
},
|
|
941
965
|
});
|
|
966
|
+
const tx = await this.buildTransaction(updateProtocolIfSharesTransferConfigIx);
|
|
967
|
+
const { txSig } = await this.sendTransaction(tx, [], this.opts);
|
|
968
|
+
return txSig;
|
|
942
969
|
}
|
|
943
970
|
async initializePrelaunchOracle(perpMarketIndex, price, maxPrice) {
|
|
944
971
|
const params = {
|
|
@@ -946,7 +973,7 @@ class AdminClient extends driftClient_1.DriftClient {
|
|
|
946
973
|
price: price || null,
|
|
947
974
|
maxPrice: maxPrice || null,
|
|
948
975
|
};
|
|
949
|
-
|
|
976
|
+
const initializePrelaunchOracleIx = await this.program.instruction.initializePrelaunchOracle(params, {
|
|
950
977
|
accounts: {
|
|
951
978
|
admin: this.wallet.publicKey,
|
|
952
979
|
state: await this.getStatePublicKey(),
|
|
@@ -955,6 +982,9 @@ class AdminClient extends driftClient_1.DriftClient {
|
|
|
955
982
|
systemProgram: anchor.web3.SystemProgram.programId,
|
|
956
983
|
},
|
|
957
984
|
});
|
|
985
|
+
const tx = await this.buildTransaction(initializePrelaunchOracleIx);
|
|
986
|
+
const { txSig } = await this.sendTransaction(tx, [], this.opts);
|
|
987
|
+
return txSig;
|
|
958
988
|
}
|
|
959
989
|
async updatePrelaunchOracleParams(perpMarketIndex, price, maxPrice) {
|
|
960
990
|
const params = {
|
|
@@ -962,13 +992,16 @@ class AdminClient extends driftClient_1.DriftClient {
|
|
|
962
992
|
price: price || null,
|
|
963
993
|
maxPrice: maxPrice || null,
|
|
964
994
|
};
|
|
965
|
-
|
|
995
|
+
const updatePrelaunchOracleParamsIx = await this.program.instruction.updatePrelaunchOracleParams(params, {
|
|
966
996
|
accounts: {
|
|
967
997
|
admin: this.wallet.publicKey,
|
|
968
998
|
state: await this.getStatePublicKey(),
|
|
969
999
|
prelaunchOracle: await (0, pda_1.getPrelaunchOraclePublicKey)(this.program.programId, perpMarketIndex),
|
|
970
1000
|
},
|
|
971
1001
|
});
|
|
1002
|
+
const tx = await this.buildTransaction(updatePrelaunchOracleParamsIx);
|
|
1003
|
+
const { txSig } = await this.sendTransaction(tx, [], this.opts);
|
|
1004
|
+
return txSig;
|
|
972
1005
|
}
|
|
973
1006
|
}
|
|
974
1007
|
exports.AdminClient = AdminClient;
|
|
@@ -516,6 +516,16 @@ exports.MainnetPerpMarkets = [
|
|
|
516
516
|
launchTs: 1709136669000,
|
|
517
517
|
oracleSource: __1.OracleSource.PYTH,
|
|
518
518
|
},
|
|
519
|
+
{
|
|
520
|
+
fullName: 'Wormhole',
|
|
521
|
+
category: ['Bridge'],
|
|
522
|
+
symbol: 'W-PERP',
|
|
523
|
+
baseAssetSymbol: 'W',
|
|
524
|
+
marketIndex: 27,
|
|
525
|
+
oracle: new web3_js_1.PublicKey('GU6CA7a2KCyhpfqZNb36UAfc9uzKBM8jHjGdt245QhYX'),
|
|
526
|
+
launchTs: 1710418343000,
|
|
527
|
+
oracleSource: __1.OracleSource.Prelaunch,
|
|
528
|
+
},
|
|
519
529
|
];
|
|
520
530
|
exports.PerpMarkets = {
|
|
521
531
|
devnet: exports.DevnetPerpMarkets,
|
package/lib/idl/drift.json
CHANGED
|
@@ -4993,6 +4993,11 @@
|
|
|
4993
4993
|
"isMut": true,
|
|
4994
4994
|
"isSigner": false
|
|
4995
4995
|
},
|
|
4996
|
+
{
|
|
4997
|
+
"name": "perpMarket",
|
|
4998
|
+
"isMut": true,
|
|
4999
|
+
"isSigner": false
|
|
5000
|
+
},
|
|
4996
5001
|
{
|
|
4997
5002
|
"name": "state",
|
|
4998
5003
|
"isMut": false,
|
|
@@ -5007,6 +5012,37 @@
|
|
|
5007
5012
|
}
|
|
5008
5013
|
}
|
|
5009
5014
|
]
|
|
5015
|
+
},
|
|
5016
|
+
{
|
|
5017
|
+
"name": "deletePrelaunchOracle",
|
|
5018
|
+
"accounts": [
|
|
5019
|
+
{
|
|
5020
|
+
"name": "admin",
|
|
5021
|
+
"isMut": true,
|
|
5022
|
+
"isSigner": true
|
|
5023
|
+
},
|
|
5024
|
+
{
|
|
5025
|
+
"name": "prelaunchOracle",
|
|
5026
|
+
"isMut": true,
|
|
5027
|
+
"isSigner": false
|
|
5028
|
+
},
|
|
5029
|
+
{
|
|
5030
|
+
"name": "perpMarket",
|
|
5031
|
+
"isMut": false,
|
|
5032
|
+
"isSigner": false
|
|
5033
|
+
},
|
|
5034
|
+
{
|
|
5035
|
+
"name": "state",
|
|
5036
|
+
"isMut": false,
|
|
5037
|
+
"isSigner": false
|
|
5038
|
+
}
|
|
5039
|
+
],
|
|
5040
|
+
"args": [
|
|
5041
|
+
{
|
|
5042
|
+
"name": "perpMarketIndex",
|
|
5043
|
+
"type": "u16"
|
|
5044
|
+
}
|
|
5045
|
+
]
|
|
5010
5046
|
}
|
|
5011
5047
|
],
|
|
5012
5048
|
"accounts": [
|
package/package.json
CHANGED
package/src/adminClient.ts
CHANGED
|
@@ -650,32 +650,6 @@ export class AdminClient extends DriftClient {
|
|
|
650
650
|
return txSig;
|
|
651
651
|
}
|
|
652
652
|
|
|
653
|
-
public async updatePerpMarketFundingPeriod(
|
|
654
|
-
perpMarketIndex: number,
|
|
655
|
-
fundingPeriod: BN
|
|
656
|
-
): Promise<TransactionSignature> {
|
|
657
|
-
const updatePerpMarketMarginRatioIx =
|
|
658
|
-
await this.program.instruction.updatePerpMarketFundingRate(
|
|
659
|
-
fundingPeriod,
|
|
660
|
-
{
|
|
661
|
-
accounts: {
|
|
662
|
-
admin: this.wallet.publicKey,
|
|
663
|
-
state: await this.getStatePublicKey(),
|
|
664
|
-
perpMarket: await getPerpMarketPublicKey(
|
|
665
|
-
this.program.programId,
|
|
666
|
-
perpMarketIndex
|
|
667
|
-
),
|
|
668
|
-
},
|
|
669
|
-
}
|
|
670
|
-
);
|
|
671
|
-
|
|
672
|
-
const tx = await this.buildTransaction(updatePerpMarketMarginRatioIx);
|
|
673
|
-
|
|
674
|
-
const { txSig } = await this.sendTransaction(tx, [], this.opts);
|
|
675
|
-
|
|
676
|
-
return txSig;
|
|
677
|
-
}
|
|
678
|
-
|
|
679
653
|
public async updatePerpMarketImfFactor(
|
|
680
654
|
perpMarketIndex: number,
|
|
681
655
|
imfFactor: number,
|
|
@@ -1601,61 +1575,91 @@ export class AdminClient extends DriftClient {
|
|
|
1601
1575
|
public async updatePerpAuctionDuration(
|
|
1602
1576
|
minDuration: BN | number
|
|
1603
1577
|
): Promise<TransactionSignature> {
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1578
|
+
const updatePerpAuctionDurationIx =
|
|
1579
|
+
await this.program.instruction.updatePerpAuctionDuration(
|
|
1580
|
+
typeof minDuration === 'number' ? minDuration : minDuration.toNumber(),
|
|
1581
|
+
{
|
|
1582
|
+
accounts: {
|
|
1583
|
+
admin: this.wallet.publicKey,
|
|
1584
|
+
state: await this.getStatePublicKey(),
|
|
1585
|
+
},
|
|
1586
|
+
}
|
|
1587
|
+
);
|
|
1588
|
+
|
|
1589
|
+
const tx = await this.buildTransaction(updatePerpAuctionDurationIx);
|
|
1590
|
+
|
|
1591
|
+
const { txSig } = await this.sendTransaction(tx, [], this.opts);
|
|
1592
|
+
|
|
1593
|
+
return txSig;
|
|
1613
1594
|
}
|
|
1614
1595
|
|
|
1615
1596
|
public async updateSpotAuctionDuration(
|
|
1616
1597
|
defaultAuctionDuration: number
|
|
1617
1598
|
): Promise<TransactionSignature> {
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1599
|
+
const updateSpotAuctionDurationIx =
|
|
1600
|
+
await this.program.instruction.updateSpotAuctionDuration(
|
|
1601
|
+
defaultAuctionDuration,
|
|
1602
|
+
{
|
|
1603
|
+
accounts: {
|
|
1604
|
+
admin: this.wallet.publicKey,
|
|
1605
|
+
state: await this.getStatePublicKey(),
|
|
1606
|
+
},
|
|
1607
|
+
}
|
|
1608
|
+
);
|
|
1609
|
+
|
|
1610
|
+
const tx = await this.buildTransaction(updateSpotAuctionDurationIx);
|
|
1611
|
+
|
|
1612
|
+
const { txSig } = await this.sendTransaction(tx, [], this.opts);
|
|
1613
|
+
|
|
1614
|
+
return txSig;
|
|
1627
1615
|
}
|
|
1628
1616
|
|
|
1629
1617
|
public async updatePerpMarketMaxFillReserveFraction(
|
|
1630
1618
|
perpMarketIndex: number,
|
|
1631
1619
|
maxBaseAssetAmountRatio: number
|
|
1632
1620
|
): Promise<TransactionSignature> {
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1621
|
+
const updatePerpMarketMaxFillReserveFractionIx =
|
|
1622
|
+
await this.program.instruction.updatePerpMarketMaxFillReserveFraction(
|
|
1623
|
+
maxBaseAssetAmountRatio,
|
|
1624
|
+
{
|
|
1625
|
+
accounts: {
|
|
1626
|
+
admin: this.wallet.publicKey,
|
|
1627
|
+
state: await this.getStatePublicKey(),
|
|
1628
|
+
perpMarket: await getPerpMarketPublicKey(
|
|
1629
|
+
this.program.programId,
|
|
1630
|
+
perpMarketIndex
|
|
1631
|
+
),
|
|
1632
|
+
},
|
|
1633
|
+
}
|
|
1634
|
+
);
|
|
1635
|
+
|
|
1636
|
+
const tx = await this.buildTransaction(
|
|
1637
|
+
updatePerpMarketMaxFillReserveFractionIx
|
|
1645
1638
|
);
|
|
1639
|
+
|
|
1640
|
+
const { txSig } = await this.sendTransaction(tx, [], this.opts);
|
|
1641
|
+
|
|
1642
|
+
return txSig;
|
|
1646
1643
|
}
|
|
1647
1644
|
|
|
1648
1645
|
public async updateMaxSlippageRatio(
|
|
1649
1646
|
perpMarketIndex: number,
|
|
1650
1647
|
maxSlippageRatio: number
|
|
1651
1648
|
): Promise<TransactionSignature> {
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1649
|
+
const updateMaxSlippageRatioIx =
|
|
1650
|
+
await this.program.instruction.updateMaxSlippageRatio(maxSlippageRatio, {
|
|
1651
|
+
accounts: {
|
|
1652
|
+
admin: this.wallet.publicKey,
|
|
1653
|
+
state: await this.getStatePublicKey(),
|
|
1654
|
+
perpMarket: this.getPerpMarketAccount(perpMarketIndex).pubkey,
|
|
1655
|
+
},
|
|
1656
|
+
});
|
|
1657
|
+
|
|
1658
|
+
const tx = await this.buildTransaction(updateMaxSlippageRatioIx);
|
|
1659
|
+
|
|
1660
|
+
const { txSig } = await this.sendTransaction(tx, [], this.opts);
|
|
1661
|
+
|
|
1662
|
+
return txSig;
|
|
1659
1663
|
}
|
|
1660
1664
|
|
|
1661
1665
|
public async updatePerpMarketUnrealizedAssetWeight(
|
|
@@ -1663,20 +1667,29 @@ export class AdminClient extends DriftClient {
|
|
|
1663
1667
|
unrealizedInitialAssetWeight: number,
|
|
1664
1668
|
unrealizedMaintenanceAssetWeight: number
|
|
1665
1669
|
): Promise<TransactionSignature> {
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1670
|
+
const updatePerpMarketUnrealizedAssetWeightIx =
|
|
1671
|
+
await this.program.instruction.updatePerpMarketUnrealizedAssetWeight(
|
|
1672
|
+
unrealizedInitialAssetWeight,
|
|
1673
|
+
unrealizedMaintenanceAssetWeight,
|
|
1674
|
+
{
|
|
1675
|
+
accounts: {
|
|
1676
|
+
admin: this.wallet.publicKey,
|
|
1677
|
+
state: await this.getStatePublicKey(),
|
|
1678
|
+
perpMarket: await getPerpMarketPublicKey(
|
|
1679
|
+
this.program.programId,
|
|
1680
|
+
perpMarketIndex
|
|
1681
|
+
),
|
|
1682
|
+
},
|
|
1683
|
+
}
|
|
1684
|
+
);
|
|
1685
|
+
|
|
1686
|
+
const tx = await this.buildTransaction(
|
|
1687
|
+
updatePerpMarketUnrealizedAssetWeightIx
|
|
1679
1688
|
);
|
|
1689
|
+
|
|
1690
|
+
const { txSig } = await this.sendTransaction(tx, [], this.opts);
|
|
1691
|
+
|
|
1692
|
+
return txSig;
|
|
1680
1693
|
}
|
|
1681
1694
|
|
|
1682
1695
|
public async updatePerpMarketMaxImbalances(
|
|
@@ -1685,89 +1698,129 @@ export class AdminClient extends DriftClient {
|
|
|
1685
1698
|
maxRevenueWithdrawPerPeriod: BN,
|
|
1686
1699
|
quoteMaxInsurance: BN
|
|
1687
1700
|
): Promise<TransactionSignature> {
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1701
|
+
const updatePerpMarketMaxImabalancesIx =
|
|
1702
|
+
await this.program.instruction.updatePerpMarketMaxImbalances(
|
|
1703
|
+
unrealizedMaxImbalance,
|
|
1704
|
+
maxRevenueWithdrawPerPeriod,
|
|
1705
|
+
quoteMaxInsurance,
|
|
1706
|
+
{
|
|
1707
|
+
accounts: {
|
|
1708
|
+
admin: this.wallet.publicKey,
|
|
1709
|
+
state: await this.getStatePublicKey(),
|
|
1710
|
+
perpMarket: await getPerpMarketPublicKey(
|
|
1711
|
+
this.program.programId,
|
|
1712
|
+
perpMarketIndex
|
|
1713
|
+
),
|
|
1714
|
+
},
|
|
1715
|
+
}
|
|
1716
|
+
);
|
|
1717
|
+
|
|
1718
|
+
const tx = await this.buildTransaction(updatePerpMarketMaxImabalancesIx);
|
|
1719
|
+
|
|
1720
|
+
const { txSig } = await this.sendTransaction(tx, [], this.opts);
|
|
1721
|
+
|
|
1722
|
+
return txSig;
|
|
1703
1723
|
}
|
|
1704
1724
|
|
|
1705
1725
|
public async updatePerpMarketMaxOpenInterest(
|
|
1706
1726
|
perpMarketIndex: number,
|
|
1707
1727
|
maxOpenInterest: BN
|
|
1708
1728
|
): Promise<TransactionSignature> {
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1729
|
+
const updatePerpMarketMaxOpenInterestIx =
|
|
1730
|
+
await this.program.instruction.updatePerpMarketMaxOpenInterest(
|
|
1731
|
+
maxOpenInterest,
|
|
1732
|
+
{
|
|
1733
|
+
accounts: {
|
|
1734
|
+
admin: this.wallet.publicKey,
|
|
1735
|
+
state: await this.getStatePublicKey(),
|
|
1736
|
+
perpMarket: await getPerpMarketPublicKey(
|
|
1737
|
+
this.program.programId,
|
|
1738
|
+
perpMarketIndex
|
|
1739
|
+
),
|
|
1740
|
+
},
|
|
1741
|
+
}
|
|
1742
|
+
);
|
|
1743
|
+
|
|
1744
|
+
const tx = await this.buildTransaction(updatePerpMarketMaxOpenInterestIx);
|
|
1745
|
+
|
|
1746
|
+
const { txSig } = await this.sendTransaction(tx, [], this.opts);
|
|
1747
|
+
|
|
1748
|
+
return txSig;
|
|
1722
1749
|
}
|
|
1723
1750
|
|
|
1724
1751
|
public async updatePerpMarketFeeAdjustment(
|
|
1725
1752
|
perpMarketIndex: number,
|
|
1726
1753
|
feeAdjustment: number
|
|
1727
1754
|
): Promise<TransactionSignature> {
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1755
|
+
const updatepPerpMarketFeeAdjustmentIx =
|
|
1756
|
+
await this.program.instruction.updatePerpMarketFeeAdjustment(
|
|
1757
|
+
feeAdjustment,
|
|
1758
|
+
{
|
|
1759
|
+
accounts: {
|
|
1760
|
+
admin: this.wallet.publicKey,
|
|
1761
|
+
state: await this.getStatePublicKey(),
|
|
1762
|
+
perpMarket: await getPerpMarketPublicKey(
|
|
1763
|
+
this.program.programId,
|
|
1764
|
+
perpMarketIndex
|
|
1765
|
+
),
|
|
1766
|
+
},
|
|
1767
|
+
}
|
|
1768
|
+
);
|
|
1769
|
+
|
|
1770
|
+
const tx = await this.buildTransaction(updatepPerpMarketFeeAdjustmentIx);
|
|
1771
|
+
|
|
1772
|
+
const { txSig } = await this.sendTransaction(tx, [], this.opts);
|
|
1773
|
+
|
|
1774
|
+
return txSig;
|
|
1738
1775
|
}
|
|
1739
1776
|
|
|
1740
1777
|
public async updateSerumVault(
|
|
1741
1778
|
srmVault: PublicKey
|
|
1742
1779
|
): Promise<TransactionSignature> {
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
admin: this.wallet.publicKey,
|
|
1746
|
-
state: await this.getStatePublicKey(),
|
|
1747
|
-
srmVault: srmVault,
|
|
1748
|
-
},
|
|
1749
|
-
});
|
|
1750
|
-
}
|
|
1751
|
-
|
|
1752
|
-
public async updatePerpMarketLiquidationFee(
|
|
1753
|
-
perpMarketIndex: number,
|
|
1754
|
-
liquidatorFee: number,
|
|
1755
|
-
ifLiquidationFee: number
|
|
1756
|
-
): Promise<TransactionSignature> {
|
|
1757
|
-
return await this.program.rpc.updatePerpMarketLiquidationFee(
|
|
1758
|
-
liquidatorFee,
|
|
1759
|
-
ifLiquidationFee,
|
|
1780
|
+
const updateSerumVaultIx = await this.program.instruction.updateSerumVault(
|
|
1781
|
+
srmVault,
|
|
1760
1782
|
{
|
|
1761
1783
|
accounts: {
|
|
1762
1784
|
admin: this.wallet.publicKey,
|
|
1763
1785
|
state: await this.getStatePublicKey(),
|
|
1764
|
-
|
|
1765
|
-
this.program.programId,
|
|
1766
|
-
perpMarketIndex
|
|
1767
|
-
),
|
|
1786
|
+
srmVault: srmVault,
|
|
1768
1787
|
},
|
|
1769
1788
|
}
|
|
1770
1789
|
);
|
|
1790
|
+
|
|
1791
|
+
const tx = await this.buildTransaction(updateSerumVaultIx);
|
|
1792
|
+
|
|
1793
|
+
const { txSig } = await this.sendTransaction(tx, [], this.opts);
|
|
1794
|
+
|
|
1795
|
+
return txSig;
|
|
1796
|
+
}
|
|
1797
|
+
|
|
1798
|
+
public async updatePerpMarketLiquidationFee(
|
|
1799
|
+
perpMarketIndex: number,
|
|
1800
|
+
liquidatorFee: number,
|
|
1801
|
+
ifLiquidationFee: number
|
|
1802
|
+
): Promise<TransactionSignature> {
|
|
1803
|
+
const updatePerpMarketLiquidationFeeIx =
|
|
1804
|
+
await this.program.instruction.updatePerpMarketLiquidationFee(
|
|
1805
|
+
liquidatorFee,
|
|
1806
|
+
ifLiquidationFee,
|
|
1807
|
+
{
|
|
1808
|
+
accounts: {
|
|
1809
|
+
admin: this.wallet.publicKey,
|
|
1810
|
+
state: await this.getStatePublicKey(),
|
|
1811
|
+
perpMarket: await getPerpMarketPublicKey(
|
|
1812
|
+
this.program.programId,
|
|
1813
|
+
perpMarketIndex
|
|
1814
|
+
),
|
|
1815
|
+
},
|
|
1816
|
+
}
|
|
1817
|
+
);
|
|
1818
|
+
|
|
1819
|
+
const tx = await this.buildTransaction(updatePerpMarketLiquidationFeeIx);
|
|
1820
|
+
|
|
1821
|
+
const { txSig } = await this.sendTransaction(tx, [], this.opts);
|
|
1822
|
+
|
|
1823
|
+
return txSig;
|
|
1771
1824
|
}
|
|
1772
1825
|
|
|
1773
1826
|
public async updateSpotMarketLiquidationFee(
|
|
@@ -1775,51 +1828,78 @@ export class AdminClient extends DriftClient {
|
|
|
1775
1828
|
liquidatorFee: number,
|
|
1776
1829
|
ifLiquidationFee: number
|
|
1777
1830
|
): Promise<TransactionSignature> {
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1831
|
+
const updateSpotMarketLiquidationFeeIx =
|
|
1832
|
+
await this.program.instruction.updateSpotMarketLiquidationFee(
|
|
1833
|
+
liquidatorFee,
|
|
1834
|
+
ifLiquidationFee,
|
|
1835
|
+
{
|
|
1836
|
+
accounts: {
|
|
1837
|
+
admin: this.wallet.publicKey,
|
|
1838
|
+
state: await this.getStatePublicKey(),
|
|
1839
|
+
spotMarket: await getSpotMarketPublicKey(
|
|
1840
|
+
this.program.programId,
|
|
1841
|
+
spotMarketIndex
|
|
1842
|
+
),
|
|
1843
|
+
},
|
|
1844
|
+
}
|
|
1845
|
+
);
|
|
1846
|
+
|
|
1847
|
+
const tx = await this.buildTransaction(updateSpotMarketLiquidationFeeIx);
|
|
1848
|
+
|
|
1849
|
+
const { txSig } = await this.sendTransaction(tx, [], this.opts);
|
|
1850
|
+
|
|
1851
|
+
return txSig;
|
|
1852
|
+
}
|
|
1853
|
+
|
|
1854
|
+
public async initializeProtocolIfSharesTransferConfig(): Promise<TransactionSignature> {
|
|
1855
|
+
const initializeProtocolIfSharesTransferConfigIx =
|
|
1856
|
+
await this.program.instruction.initializeProtocolIfSharesTransferConfig({
|
|
1782
1857
|
accounts: {
|
|
1783
1858
|
admin: this.wallet.publicKey,
|
|
1784
1859
|
state: await this.getStatePublicKey(),
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1860
|
+
rent: SYSVAR_RENT_PUBKEY,
|
|
1861
|
+
systemProgram: anchor.web3.SystemProgram.programId,
|
|
1862
|
+
protocolIfSharesTransferConfig:
|
|
1863
|
+
getProtocolIfSharesTransferConfigPublicKey(this.program.programId),
|
|
1789
1864
|
},
|
|
1790
|
-
}
|
|
1865
|
+
});
|
|
1866
|
+
|
|
1867
|
+
const tx = await this.buildTransaction(
|
|
1868
|
+
initializeProtocolIfSharesTransferConfigIx
|
|
1791
1869
|
);
|
|
1792
|
-
}
|
|
1793
1870
|
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
admin: this.wallet.publicKey,
|
|
1798
|
-
state: await this.getStatePublicKey(),
|
|
1799
|
-
rent: SYSVAR_RENT_PUBKEY,
|
|
1800
|
-
systemProgram: anchor.web3.SystemProgram.programId,
|
|
1801
|
-
protocolIfSharesTransferConfig:
|
|
1802
|
-
getProtocolIfSharesTransferConfigPublicKey(this.program.programId),
|
|
1803
|
-
},
|
|
1804
|
-
});
|
|
1871
|
+
const { txSig } = await this.sendTransaction(tx, [], this.opts);
|
|
1872
|
+
|
|
1873
|
+
return txSig;
|
|
1805
1874
|
}
|
|
1806
1875
|
|
|
1807
1876
|
public async updateProtocolIfSharesTransferConfig(
|
|
1808
1877
|
whitelistedSigners?: PublicKey[],
|
|
1809
1878
|
maxTransferPerEpoch?: BN
|
|
1810
1879
|
): Promise<TransactionSignature> {
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1880
|
+
const updateProtocolIfSharesTransferConfigIx =
|
|
1881
|
+
await this.program.instruction.updateProtocolIfSharesTransferConfig(
|
|
1882
|
+
whitelistedSigners || null,
|
|
1883
|
+
maxTransferPerEpoch,
|
|
1884
|
+
{
|
|
1885
|
+
accounts: {
|
|
1886
|
+
admin: this.wallet.publicKey,
|
|
1887
|
+
state: await this.getStatePublicKey(),
|
|
1888
|
+
protocolIfSharesTransferConfig:
|
|
1889
|
+
getProtocolIfSharesTransferConfigPublicKey(
|
|
1890
|
+
this.program.programId
|
|
1891
|
+
),
|
|
1892
|
+
},
|
|
1893
|
+
}
|
|
1894
|
+
);
|
|
1895
|
+
|
|
1896
|
+
const tx = await this.buildTransaction(
|
|
1897
|
+
updateProtocolIfSharesTransferConfigIx
|
|
1822
1898
|
);
|
|
1899
|
+
|
|
1900
|
+
const { txSig } = await this.sendTransaction(tx, [], this.opts);
|
|
1901
|
+
|
|
1902
|
+
return txSig;
|
|
1823
1903
|
}
|
|
1824
1904
|
|
|
1825
1905
|
public async initializePrelaunchOracle(
|
|
@@ -1832,18 +1912,26 @@ export class AdminClient extends DriftClient {
|
|
|
1832
1912
|
price: price || null,
|
|
1833
1913
|
maxPrice: maxPrice || null,
|
|
1834
1914
|
};
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
this.
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1915
|
+
|
|
1916
|
+
const initializePrelaunchOracleIx =
|
|
1917
|
+
await this.program.instruction.initializePrelaunchOracle(params, {
|
|
1918
|
+
accounts: {
|
|
1919
|
+
admin: this.wallet.publicKey,
|
|
1920
|
+
state: await this.getStatePublicKey(),
|
|
1921
|
+
prelaunchOracle: await getPrelaunchOraclePublicKey(
|
|
1922
|
+
this.program.programId,
|
|
1923
|
+
perpMarketIndex
|
|
1924
|
+
),
|
|
1925
|
+
rent: SYSVAR_RENT_PUBKEY,
|
|
1926
|
+
systemProgram: anchor.web3.SystemProgram.programId,
|
|
1927
|
+
},
|
|
1928
|
+
});
|
|
1929
|
+
|
|
1930
|
+
const tx = await this.buildTransaction(initializePrelaunchOracleIx);
|
|
1931
|
+
|
|
1932
|
+
const { txSig } = await this.sendTransaction(tx, [], this.opts);
|
|
1933
|
+
|
|
1934
|
+
return txSig;
|
|
1847
1935
|
}
|
|
1848
1936
|
|
|
1849
1937
|
public async updatePrelaunchOracleParams(
|
|
@@ -1856,15 +1944,23 @@ export class AdminClient extends DriftClient {
|
|
|
1856
1944
|
price: price || null,
|
|
1857
1945
|
maxPrice: maxPrice || null,
|
|
1858
1946
|
};
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
this.
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1947
|
+
|
|
1948
|
+
const updatePrelaunchOracleParamsIx =
|
|
1949
|
+
await this.program.instruction.updatePrelaunchOracleParams(params, {
|
|
1950
|
+
accounts: {
|
|
1951
|
+
admin: this.wallet.publicKey,
|
|
1952
|
+
state: await this.getStatePublicKey(),
|
|
1953
|
+
prelaunchOracle: await getPrelaunchOraclePublicKey(
|
|
1954
|
+
this.program.programId,
|
|
1955
|
+
perpMarketIndex
|
|
1956
|
+
),
|
|
1957
|
+
},
|
|
1958
|
+
});
|
|
1959
|
+
|
|
1960
|
+
const tx = await this.buildTransaction(updatePrelaunchOracleParamsIx);
|
|
1961
|
+
|
|
1962
|
+
const { txSig } = await this.sendTransaction(tx, [], this.opts);
|
|
1963
|
+
|
|
1964
|
+
return txSig;
|
|
1869
1965
|
}
|
|
1870
1966
|
}
|
|
@@ -527,6 +527,16 @@ export const MainnetPerpMarkets: PerpMarketConfig[] = [
|
|
|
527
527
|
launchTs: 1709136669000,
|
|
528
528
|
oracleSource: OracleSource.PYTH,
|
|
529
529
|
},
|
|
530
|
+
{
|
|
531
|
+
fullName: 'Wormhole',
|
|
532
|
+
category: ['Bridge'],
|
|
533
|
+
symbol: 'W-PERP',
|
|
534
|
+
baseAssetSymbol: 'W',
|
|
535
|
+
marketIndex: 27,
|
|
536
|
+
oracle: new PublicKey('GU6CA7a2KCyhpfqZNb36UAfc9uzKBM8jHjGdt245QhYX'),
|
|
537
|
+
launchTs: 1710418343000,
|
|
538
|
+
oracleSource: OracleSource.Prelaunch,
|
|
539
|
+
},
|
|
530
540
|
];
|
|
531
541
|
|
|
532
542
|
export const PerpMarkets: { [key in DriftEnv]: PerpMarketConfig[] } = {
|
package/src/idl/drift.json
CHANGED
|
@@ -4993,6 +4993,11 @@
|
|
|
4993
4993
|
"isMut": true,
|
|
4994
4994
|
"isSigner": false
|
|
4995
4995
|
},
|
|
4996
|
+
{
|
|
4997
|
+
"name": "perpMarket",
|
|
4998
|
+
"isMut": true,
|
|
4999
|
+
"isSigner": false
|
|
5000
|
+
},
|
|
4996
5001
|
{
|
|
4997
5002
|
"name": "state",
|
|
4998
5003
|
"isMut": false,
|
|
@@ -5007,6 +5012,37 @@
|
|
|
5007
5012
|
}
|
|
5008
5013
|
}
|
|
5009
5014
|
]
|
|
5015
|
+
},
|
|
5016
|
+
{
|
|
5017
|
+
"name": "deletePrelaunchOracle",
|
|
5018
|
+
"accounts": [
|
|
5019
|
+
{
|
|
5020
|
+
"name": "admin",
|
|
5021
|
+
"isMut": true,
|
|
5022
|
+
"isSigner": true
|
|
5023
|
+
},
|
|
5024
|
+
{
|
|
5025
|
+
"name": "prelaunchOracle",
|
|
5026
|
+
"isMut": true,
|
|
5027
|
+
"isSigner": false
|
|
5028
|
+
},
|
|
5029
|
+
{
|
|
5030
|
+
"name": "perpMarket",
|
|
5031
|
+
"isMut": false,
|
|
5032
|
+
"isSigner": false
|
|
5033
|
+
},
|
|
5034
|
+
{
|
|
5035
|
+
"name": "state",
|
|
5036
|
+
"isMut": false,
|
|
5037
|
+
"isSigner": false
|
|
5038
|
+
}
|
|
5039
|
+
],
|
|
5040
|
+
"args": [
|
|
5041
|
+
{
|
|
5042
|
+
"name": "perpMarketIndex",
|
|
5043
|
+
"type": "u16"
|
|
5044
|
+
}
|
|
5045
|
+
]
|
|
5010
5046
|
}
|
|
5011
5047
|
],
|
|
5012
5048
|
"accounts": [
|