@drift-labs/vaults-sdk 0.1.220 → 0.1.221
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/lib/vaultClient.d.ts +7 -7
- package/lib/vaultClient.js +27 -66
- package/package.json +2 -2
- package/src/vaultClient.ts +34 -74
package/lib/vaultClient.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { BN, DriftClient, UserMap } from '@drift-labs/sdk';
|
|
|
5
5
|
import { Program, ProgramAccount } from '@coral-xyz/anchor';
|
|
6
6
|
import { DriftVaults } from './types/drift_vaults';
|
|
7
7
|
import { CompetitionsClient } from '@drift-labs/competitions-sdk';
|
|
8
|
-
import {
|
|
8
|
+
import { PublicKey, TransactionInstruction, TransactionSignature } from '@solana/web3.js';
|
|
9
9
|
import { Vault, VaultDepositor, WithdrawUnit } from './types/types';
|
|
10
10
|
import { UserMapConfig } from '@drift-labs/sdk/lib/userMap/userMapConfig';
|
|
11
11
|
export type TxParams = {
|
|
@@ -93,7 +93,7 @@ export declare class VaultClient {
|
|
|
93
93
|
profitShare: number | null;
|
|
94
94
|
hurdleRate: number | null;
|
|
95
95
|
permissioned: boolean | null;
|
|
96
|
-
}
|
|
96
|
+
}): Promise<TransactionSignature>;
|
|
97
97
|
getApplyProfitShareIx(vault: PublicKey, vaultDepositor: PublicKey): Promise<TransactionInstruction>;
|
|
98
98
|
private createInitVaultDepositorIx;
|
|
99
99
|
/**
|
|
@@ -113,18 +113,18 @@ export declare class VaultClient {
|
|
|
113
113
|
deposit(vaultDepositor: PublicKey, amount: BN, initVaultDepositor?: {
|
|
114
114
|
authority: PublicKey;
|
|
115
115
|
vault: PublicKey;
|
|
116
|
-
}): Promise<TransactionSignature>;
|
|
117
|
-
requestWithdraw(vaultDepositor: PublicKey, amount: BN, withdrawUnit: WithdrawUnit): Promise<TransactionSignature>;
|
|
116
|
+
}, txParams?: TxParams): Promise<TransactionSignature>;
|
|
117
|
+
requestWithdraw(vaultDepositor: PublicKey, amount: BN, withdrawUnit: WithdrawUnit, txParams?: TxParams): Promise<TransactionSignature>;
|
|
118
118
|
withdraw(vaultDepositor: PublicKey, txParams?: TxParams): Promise<TransactionSignature>;
|
|
119
|
-
forceWithdraw(vaultDepositor: PublicKey
|
|
120
|
-
cancelRequestWithdraw(vaultDepositor: PublicKey): Promise<TransactionSignature>;
|
|
119
|
+
forceWithdraw(vaultDepositor: PublicKey): Promise<TransactionSignature>;
|
|
120
|
+
cancelRequestWithdraw(vaultDepositor: PublicKey, txParams?: TxParams): Promise<TransactionSignature>;
|
|
121
121
|
/**
|
|
122
122
|
* Liquidates (become delegate for) a vault.
|
|
123
123
|
* @param
|
|
124
124
|
* @param
|
|
125
125
|
* @returns
|
|
126
126
|
*/
|
|
127
|
-
liquidate(vaultDepositor: PublicKey): Promise<TransactionSignature>;
|
|
127
|
+
liquidate(vaultDepositor: PublicKey, txParams?: TxParams): Promise<TransactionSignature>;
|
|
128
128
|
/**
|
|
129
129
|
* Used for UI wallet adapters compatibility
|
|
130
130
|
*/
|
package/lib/vaultClient.js
CHANGED
|
@@ -319,15 +319,14 @@ class VaultClient {
|
|
|
319
319
|
cuLimit: 1000000,
|
|
320
320
|
});
|
|
321
321
|
}
|
|
322
|
-
async managerUpdateVault(vault, params
|
|
323
|
-
|
|
322
|
+
async managerUpdateVault(vault, params) {
|
|
323
|
+
return await this.program.methods
|
|
324
|
+
.updateVault(params)
|
|
325
|
+
.accounts({
|
|
324
326
|
vault,
|
|
325
327
|
manager: this.driftClient.wallet.publicKey,
|
|
326
|
-
})
|
|
327
|
-
|
|
328
|
-
builder = builder.preInstructions(preIxs);
|
|
329
|
-
}
|
|
330
|
-
return builder.rpc(opts);
|
|
328
|
+
})
|
|
329
|
+
.rpc();
|
|
331
330
|
}
|
|
332
331
|
async getApplyProfitShareIx(vault, vaultDepositor) {
|
|
333
332
|
const vaultAccount = await this.program.account.vault.fetch(vault);
|
|
@@ -405,7 +404,7 @@ class VaultClient {
|
|
|
405
404
|
* @param initVaultDepositor If true, will initialize the vault depositor account
|
|
406
405
|
* @returns
|
|
407
406
|
*/
|
|
408
|
-
async deposit(vaultDepositor, amount, initVaultDepositor) {
|
|
407
|
+
async deposit(vaultDepositor, amount, initVaultDepositor, txParams) {
|
|
409
408
|
let vaultPubKey;
|
|
410
409
|
if (initVaultDepositor) {
|
|
411
410
|
vaultPubKey = initVaultDepositor.vault;
|
|
@@ -458,14 +457,14 @@ class VaultClient {
|
|
|
458
457
|
});
|
|
459
458
|
if (initVaultDepositor) {
|
|
460
459
|
const initIx = this.createInitVaultDepositorIx(vaultAccount.pubkey, initVaultDepositor.authority);
|
|
461
|
-
return await this.createAndSendTxn([initIx, depositIx]);
|
|
460
|
+
return await this.createAndSendTxn([initIx, depositIx], txParams);
|
|
462
461
|
}
|
|
463
462
|
else {
|
|
464
|
-
return await this.createAndSendTxn([depositIx]);
|
|
463
|
+
return await this.createAndSendTxn([depositIx], txParams);
|
|
465
464
|
}
|
|
466
465
|
}
|
|
467
466
|
}
|
|
468
|
-
async requestWithdraw(vaultDepositor, amount, withdrawUnit) {
|
|
467
|
+
async requestWithdraw(vaultDepositor, amount, withdrawUnit, txParams) {
|
|
469
468
|
const vaultDepositorAccount = await this.program.account.vaultDepositor.fetch(vaultDepositor);
|
|
470
469
|
const vaultAccount = await this.program.account.vault.fetch(vaultDepositorAccount.vault);
|
|
471
470
|
const user = await this.getSubscribedVaultUser(vaultAccount.user);
|
|
@@ -496,9 +495,7 @@ class VaultClient {
|
|
|
496
495
|
},
|
|
497
496
|
remainingAccounts,
|
|
498
497
|
});
|
|
499
|
-
return await this.createAndSendTxn([requestWithdrawIx],
|
|
500
|
-
cuLimit: 650000,
|
|
501
|
-
});
|
|
498
|
+
return await this.createAndSendTxn([requestWithdrawIx], txParams);
|
|
502
499
|
}
|
|
503
500
|
}
|
|
504
501
|
async withdraw(vaultDepositor, txParams) {
|
|
@@ -561,7 +558,7 @@ class VaultClient {
|
|
|
561
558
|
});
|
|
562
559
|
}
|
|
563
560
|
}
|
|
564
|
-
async forceWithdraw(vaultDepositor
|
|
561
|
+
async forceWithdraw(vaultDepositor) {
|
|
565
562
|
const vaultDepositorAccount = await this.program.account.vaultDepositor.fetch(vaultDepositor);
|
|
566
563
|
const vaultAccount = await this.program.account.vault.fetch(vaultDepositorAccount.vault);
|
|
567
564
|
const user = await this.getSubscribedVaultUser(vaultAccount.user);
|
|
@@ -590,52 +587,16 @@ class VaultClient {
|
|
|
590
587
|
tokenProgram: spl_token_1.TOKEN_PROGRAM_ID,
|
|
591
588
|
};
|
|
592
589
|
if (this.cliMode) {
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
builder = builder.preInstructions(preIxs);
|
|
604
|
-
}
|
|
605
|
-
else {
|
|
606
|
-
builder = builder.preInstructions([
|
|
607
|
-
web3_js_1.ComputeBudgetProgram.setComputeUnitLimit({
|
|
608
|
-
units: 600000,
|
|
609
|
-
}),
|
|
610
|
-
]);
|
|
611
|
-
}
|
|
612
|
-
const simResult = await builder
|
|
613
|
-
.accounts(accounts)
|
|
614
|
-
.remainingAccounts(remainingAccounts)
|
|
615
|
-
.simulate();
|
|
616
|
-
console.log(simResult);
|
|
617
|
-
console.log(simResult.events);
|
|
618
|
-
}
|
|
619
|
-
else {
|
|
620
|
-
let builder = this.program.methods.forceWithdraw();
|
|
621
|
-
if (preIxs) {
|
|
622
|
-
builder = builder.preInstructions(preIxs);
|
|
623
|
-
}
|
|
624
|
-
else {
|
|
625
|
-
builder = builder.preInstructions([
|
|
626
|
-
web3_js_1.ComputeBudgetProgram.setComputeUnitLimit({
|
|
627
|
-
units: 600000,
|
|
628
|
-
}),
|
|
629
|
-
web3_js_1.ComputeBudgetProgram.setComputeUnitPrice({
|
|
630
|
-
microLamports: 100000,
|
|
631
|
-
}),
|
|
632
|
-
]);
|
|
633
|
-
}
|
|
634
|
-
return await builder
|
|
635
|
-
.accounts(accounts)
|
|
636
|
-
.remainingAccounts(remainingAccounts)
|
|
637
|
-
.rpc(opts);
|
|
638
|
-
}
|
|
590
|
+
return await this.program.methods
|
|
591
|
+
.forceWithdraw()
|
|
592
|
+
.preInstructions([
|
|
593
|
+
web3_js_1.ComputeBudgetProgram.setComputeUnitLimit({
|
|
594
|
+
units: 400000,
|
|
595
|
+
}),
|
|
596
|
+
])
|
|
597
|
+
.accounts(accounts)
|
|
598
|
+
.remainingAccounts(remainingAccounts)
|
|
599
|
+
.rpc();
|
|
639
600
|
}
|
|
640
601
|
else {
|
|
641
602
|
const forceWithdrawIx = this.program.instruction.forceWithdraw({
|
|
@@ -647,7 +608,7 @@ class VaultClient {
|
|
|
647
608
|
return await this.createAndSendTxn([forceWithdrawIx]);
|
|
648
609
|
}
|
|
649
610
|
}
|
|
650
|
-
async cancelRequestWithdraw(vaultDepositor) {
|
|
611
|
+
async cancelRequestWithdraw(vaultDepositor, txParams) {
|
|
651
612
|
const vaultDepositorAccount = await this.program.account.vaultDepositor.fetch(vaultDepositor);
|
|
652
613
|
const vaultAccount = await this.program.account.vault.fetch(vaultDepositorAccount.vault);
|
|
653
614
|
const userStatsKey = (0, sdk_1.getUserStatsAccountPublicKey)(this.driftClient.program.programId, vaultDepositorAccount.vault);
|
|
@@ -678,7 +639,7 @@ class VaultClient {
|
|
|
678
639
|
},
|
|
679
640
|
remainingAccounts,
|
|
680
641
|
});
|
|
681
|
-
return await this.createAndSendTxn([cancelRequestWithdrawIx]);
|
|
642
|
+
return await this.createAndSendTxn([cancelRequestWithdrawIx], txParams);
|
|
682
643
|
}
|
|
683
644
|
}
|
|
684
645
|
/**
|
|
@@ -687,7 +648,7 @@ class VaultClient {
|
|
|
687
648
|
* @param
|
|
688
649
|
* @returns
|
|
689
650
|
*/
|
|
690
|
-
async liquidate(vaultDepositor) {
|
|
651
|
+
async liquidate(vaultDepositor, txParams) {
|
|
691
652
|
const vaultDepositorAccount = await this.program.account.vaultDepositor.fetch(vaultDepositor);
|
|
692
653
|
const vaultPubKey = vaultDepositorAccount.vault;
|
|
693
654
|
const vaultAccount = await this.program.account.vault.fetch(vaultPubKey);
|
|
@@ -722,7 +683,7 @@ class VaultClient {
|
|
|
722
683
|
},
|
|
723
684
|
remainingAccounts,
|
|
724
685
|
});
|
|
725
|
-
return await this.createAndSendTxn([liquidateIx]);
|
|
686
|
+
return await this.createAndSendTxn([liquidateIx], txParams);
|
|
726
687
|
}
|
|
727
688
|
}
|
|
728
689
|
/**
|
|
@@ -735,7 +696,7 @@ class VaultClient {
|
|
|
735
696
|
units: (_a = txParams === null || txParams === void 0 ? void 0 : txParams.cuLimit) !== null && _a !== void 0 ? _a : 400000,
|
|
736
697
|
}),
|
|
737
698
|
web3_js_1.ComputeBudgetProgram.setComputeUnitPrice({
|
|
738
|
-
microLamports: (_b = txParams === null || txParams === void 0 ? void 0 : txParams.cuPriceMicroLamports) !== null && _b !== void 0 ? _b :
|
|
699
|
+
microLamports: (_b = txParams === null || txParams === void 0 ? void 0 : txParams.cuPriceMicroLamports) !== null && _b !== void 0 ? _b : 1000000,
|
|
739
700
|
}),
|
|
740
701
|
...vaultIxs,
|
|
741
702
|
];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@drift-labs/vaults-sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.221",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"types": "lib/index.d.ts",
|
|
6
6
|
"directories": {
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"@coral-xyz/anchor": "^0.26.0",
|
|
11
11
|
"@drift-labs/competitions-sdk": "0.2.186",
|
|
12
|
-
"@drift-labs/sdk": "2.72.0-beta.
|
|
12
|
+
"@drift-labs/sdk": "2.72.0-beta.3",
|
|
13
13
|
"@solana/web3.js": "1.73.2",
|
|
14
14
|
"commander": "^11.0.0",
|
|
15
15
|
"dotenv": "^16.3.1",
|
package/src/vaultClient.ts
CHANGED
|
@@ -22,7 +22,6 @@ import {
|
|
|
22
22
|
} from './addresses';
|
|
23
23
|
import {
|
|
24
24
|
ComputeBudgetProgram,
|
|
25
|
-
ConfirmOptions,
|
|
26
25
|
PublicKey,
|
|
27
26
|
SystemProgram,
|
|
28
27
|
SYSVAR_RENT_PUBKEY,
|
|
@@ -525,19 +524,15 @@ export class VaultClient {
|
|
|
525
524
|
profitShare: number | null;
|
|
526
525
|
hurdleRate: number | null;
|
|
527
526
|
permissioned: boolean | null;
|
|
528
|
-
},
|
|
529
|
-
preIxs?: Array<TransactionInstruction>,
|
|
530
|
-
opts?: ConfirmOptions
|
|
531
|
-
): Promise<TransactionSignature> {
|
|
532
|
-
let builder = this.program.methods.updateVault(params).accounts({
|
|
533
|
-
vault,
|
|
534
|
-
manager: this.driftClient.wallet.publicKey,
|
|
535
|
-
});
|
|
536
|
-
if (preIxs) {
|
|
537
|
-
builder = builder.preInstructions(preIxs);
|
|
538
527
|
}
|
|
539
|
-
|
|
540
|
-
return
|
|
528
|
+
): Promise<TransactionSignature> {
|
|
529
|
+
return await this.program.methods
|
|
530
|
+
.updateVault(params)
|
|
531
|
+
.accounts({
|
|
532
|
+
vault,
|
|
533
|
+
manager: this.driftClient.wallet.publicKey,
|
|
534
|
+
})
|
|
535
|
+
.rpc();
|
|
541
536
|
}
|
|
542
537
|
|
|
543
538
|
public async getApplyProfitShareIx(
|
|
@@ -658,7 +653,8 @@ export class VaultClient {
|
|
|
658
653
|
initVaultDepositor?: {
|
|
659
654
|
authority: PublicKey;
|
|
660
655
|
vault: PublicKey;
|
|
661
|
-
}
|
|
656
|
+
},
|
|
657
|
+
txParams?: TxParams
|
|
662
658
|
): Promise<TransactionSignature> {
|
|
663
659
|
let vaultPubKey: PublicKey;
|
|
664
660
|
if (initVaultDepositor) {
|
|
@@ -736,9 +732,9 @@ export class VaultClient {
|
|
|
736
732
|
vaultAccount.pubkey,
|
|
737
733
|
initVaultDepositor.authority
|
|
738
734
|
);
|
|
739
|
-
return await this.createAndSendTxn([initIx, depositIx]);
|
|
735
|
+
return await this.createAndSendTxn([initIx, depositIx], txParams);
|
|
740
736
|
} else {
|
|
741
|
-
return await this.createAndSendTxn([depositIx]);
|
|
737
|
+
return await this.createAndSendTxn([depositIx], txParams);
|
|
742
738
|
}
|
|
743
739
|
}
|
|
744
740
|
}
|
|
@@ -746,7 +742,8 @@ export class VaultClient {
|
|
|
746
742
|
public async requestWithdraw(
|
|
747
743
|
vaultDepositor: PublicKey,
|
|
748
744
|
amount: BN,
|
|
749
|
-
withdrawUnit: WithdrawUnit
|
|
745
|
+
withdrawUnit: WithdrawUnit,
|
|
746
|
+
txParams?: TxParams
|
|
750
747
|
): Promise<TransactionSignature> {
|
|
751
748
|
const vaultDepositorAccount =
|
|
752
749
|
await this.program.account.vaultDepositor.fetch(vaultDepositor);
|
|
@@ -793,9 +790,7 @@ export class VaultClient {
|
|
|
793
790
|
}
|
|
794
791
|
);
|
|
795
792
|
|
|
796
|
-
return await this.createAndSendTxn([requestWithdrawIx],
|
|
797
|
-
cuLimit: 650_000,
|
|
798
|
-
});
|
|
793
|
+
return await this.createAndSendTxn([requestWithdrawIx], txParams);
|
|
799
794
|
}
|
|
800
795
|
}
|
|
801
796
|
|
|
@@ -892,12 +887,8 @@ export class VaultClient {
|
|
|
892
887
|
}
|
|
893
888
|
|
|
894
889
|
public async forceWithdraw(
|
|
895
|
-
vaultDepositor: PublicKey
|
|
896
|
-
|
|
897
|
-
preIxs?: Array<TransactionInstruction>,
|
|
898
|
-
simulate?: boolean,
|
|
899
|
-
opts?: ConfirmOptions
|
|
900
|
-
): Promise<TransactionSignature | TransactionInstruction | undefined> {
|
|
890
|
+
vaultDepositor: PublicKey
|
|
891
|
+
): Promise<TransactionSignature> {
|
|
901
892
|
const vaultDepositorAccount =
|
|
902
893
|
await this.program.account.vaultDepositor.fetch(vaultDepositor);
|
|
903
894
|
const vaultAccount = await this.program.account.vault.fetch(
|
|
@@ -946,49 +937,16 @@ export class VaultClient {
|
|
|
946
937
|
};
|
|
947
938
|
|
|
948
939
|
if (this.cliMode) {
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
.
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
} else {
|
|
960
|
-
builder = builder.preInstructions([
|
|
961
|
-
ComputeBudgetProgram.setComputeUnitLimit({
|
|
962
|
-
units: 600_000,
|
|
963
|
-
}),
|
|
964
|
-
]);
|
|
965
|
-
}
|
|
966
|
-
const simResult = await builder
|
|
967
|
-
.accounts(accounts)
|
|
968
|
-
.remainingAccounts(remainingAccounts)
|
|
969
|
-
.simulate();
|
|
970
|
-
|
|
971
|
-
console.log(simResult);
|
|
972
|
-
console.log(simResult.events);
|
|
973
|
-
} else {
|
|
974
|
-
let builder = this.program.methods.forceWithdraw();
|
|
975
|
-
if (preIxs) {
|
|
976
|
-
builder = builder.preInstructions(preIxs);
|
|
977
|
-
} else {
|
|
978
|
-
builder = builder.preInstructions([
|
|
979
|
-
ComputeBudgetProgram.setComputeUnitLimit({
|
|
980
|
-
units: 600_000,
|
|
981
|
-
}),
|
|
982
|
-
ComputeBudgetProgram.setComputeUnitPrice({
|
|
983
|
-
microLamports: 100_000,
|
|
984
|
-
}),
|
|
985
|
-
]);
|
|
986
|
-
}
|
|
987
|
-
return await builder
|
|
988
|
-
.accounts(accounts)
|
|
989
|
-
.remainingAccounts(remainingAccounts)
|
|
990
|
-
.rpc(opts);
|
|
991
|
-
}
|
|
940
|
+
return await this.program.methods
|
|
941
|
+
.forceWithdraw()
|
|
942
|
+
.preInstructions([
|
|
943
|
+
ComputeBudgetProgram.setComputeUnitLimit({
|
|
944
|
+
units: 400_000,
|
|
945
|
+
}),
|
|
946
|
+
])
|
|
947
|
+
.accounts(accounts)
|
|
948
|
+
.remainingAccounts(remainingAccounts)
|
|
949
|
+
.rpc();
|
|
992
950
|
} else {
|
|
993
951
|
const forceWithdrawIx = this.program.instruction.forceWithdraw({
|
|
994
952
|
accounts: {
|
|
@@ -1001,7 +959,8 @@ export class VaultClient {
|
|
|
1001
959
|
}
|
|
1002
960
|
|
|
1003
961
|
public async cancelRequestWithdraw(
|
|
1004
|
-
vaultDepositor: PublicKey
|
|
962
|
+
vaultDepositor: PublicKey,
|
|
963
|
+
txParams?: TxParams
|
|
1005
964
|
): Promise<TransactionSignature> {
|
|
1006
965
|
const vaultDepositorAccount =
|
|
1007
966
|
await this.program.account.vaultDepositor.fetch(vaultDepositor);
|
|
@@ -1045,7 +1004,7 @@ export class VaultClient {
|
|
|
1045
1004
|
remainingAccounts,
|
|
1046
1005
|
});
|
|
1047
1006
|
|
|
1048
|
-
return await this.createAndSendTxn([cancelRequestWithdrawIx]);
|
|
1007
|
+
return await this.createAndSendTxn([cancelRequestWithdrawIx], txParams);
|
|
1049
1008
|
}
|
|
1050
1009
|
}
|
|
1051
1010
|
|
|
@@ -1056,7 +1015,8 @@ export class VaultClient {
|
|
|
1056
1015
|
* @returns
|
|
1057
1016
|
*/
|
|
1058
1017
|
public async liquidate(
|
|
1059
|
-
vaultDepositor: PublicKey
|
|
1018
|
+
vaultDepositor: PublicKey,
|
|
1019
|
+
txParams?: TxParams
|
|
1060
1020
|
): Promise<TransactionSignature> {
|
|
1061
1021
|
const vaultDepositorAccount =
|
|
1062
1022
|
await this.program.account.vaultDepositor.fetch(vaultDepositor);
|
|
@@ -1102,7 +1062,7 @@ export class VaultClient {
|
|
|
1102
1062
|
remainingAccounts,
|
|
1103
1063
|
});
|
|
1104
1064
|
|
|
1105
|
-
return await this.createAndSendTxn([liquidateIx]);
|
|
1065
|
+
return await this.createAndSendTxn([liquidateIx], txParams);
|
|
1106
1066
|
}
|
|
1107
1067
|
}
|
|
1108
1068
|
|
|
@@ -1118,7 +1078,7 @@ export class VaultClient {
|
|
|
1118
1078
|
units: txParams?.cuLimit ?? 400_000,
|
|
1119
1079
|
}),
|
|
1120
1080
|
ComputeBudgetProgram.setComputeUnitPrice({
|
|
1121
|
-
microLamports: txParams?.cuPriceMicroLamports ??
|
|
1081
|
+
microLamports: txParams?.cuPriceMicroLamports ?? 1_000_000,
|
|
1122
1082
|
}),
|
|
1123
1083
|
...vaultIxs,
|
|
1124
1084
|
];
|