@zemyth/raise-sdk 0.1.4 → 0.1.7
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/accounts/index.cjs +6 -6
- package/dist/accounts/index.cjs.map +1 -1
- package/dist/accounts/index.js +6 -6
- package/dist/accounts/index.js.map +1 -1
- package/dist/constants/index.cjs +48 -9
- package/dist/constants/index.cjs.map +1 -1
- package/dist/constants/index.d.cts +125 -9
- package/dist/constants/index.d.ts +125 -9
- package/dist/constants/index.js +46 -10
- package/dist/constants/index.js.map +1 -1
- package/dist/index.cjs +65 -21
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +64 -23
- package/dist/index.js.map +1 -1
- package/dist/instructions/index.cjs +10 -5
- package/dist/instructions/index.cjs.map +1 -1
- package/dist/instructions/index.d.cts +1 -1
- package/dist/instructions/index.d.ts +1 -1
- package/dist/instructions/index.js +11 -6
- package/dist/instructions/index.js.map +1 -1
- package/dist/pdas/index.cjs.map +1 -1
- package/dist/pdas/index.js.map +1 -1
- package/package.json +1 -1
- package/src/accounts/index.ts +3 -3
- package/src/client.ts +2 -2
- package/src/constants/index.ts +55 -9
- package/src/index.ts +3 -0
- package/src/instructions/index.ts +12 -7
|
@@ -447,7 +447,8 @@ async function submitForApproval(program, projectId, founder) {
|
|
|
447
447
|
founder
|
|
448
448
|
}).rpc();
|
|
449
449
|
}
|
|
450
|
-
async function approveProject(program, args,
|
|
450
|
+
async function approveProject(program, args, admin) {
|
|
451
|
+
const adminPubkey = admin instanceof web3_js.Keypair ? admin.publicKey : admin;
|
|
451
452
|
const projectPda = getProjectPDA(args.projectId, program.programId);
|
|
452
453
|
const tokenomicsPda = getTokenomicsPDA(projectPda, program.programId);
|
|
453
454
|
const tokenVaultPda = getTokenVaultPDA(projectPda, program.programId);
|
|
@@ -463,7 +464,7 @@ async function approveProject(program, args, adminKeypair) {
|
|
|
463
464
|
const computeBudgetIx = web3_js.ComputeBudgetProgram.setComputeUnitLimit({
|
|
464
465
|
units: 4e5
|
|
465
466
|
});
|
|
466
|
-
|
|
467
|
+
let builder = getMethods(program).approveProject().accountsPartial({
|
|
467
468
|
project: projectPda,
|
|
468
469
|
tokenomics: tokenomicsPda,
|
|
469
470
|
tokenVault: tokenVaultPda,
|
|
@@ -477,9 +478,13 @@ async function approveProject(program, args, adminKeypair) {
|
|
|
477
478
|
futureRoundTokenVault: futureRoundTokenVaultPda,
|
|
478
479
|
futureRoundVault: futureRoundVaultPda,
|
|
479
480
|
usdcMint: args.usdcMint,
|
|
480
|
-
authority:
|
|
481
|
-
payer:
|
|
482
|
-
}).preInstructions([computeBudgetIx])
|
|
481
|
+
authority: adminPubkey,
|
|
482
|
+
payer: adminPubkey
|
|
483
|
+
}).preInstructions([computeBudgetIx]);
|
|
484
|
+
if (admin instanceof web3_js.Keypair) {
|
|
485
|
+
builder = builder.signers([admin]);
|
|
486
|
+
}
|
|
487
|
+
return builder.rpc();
|
|
483
488
|
}
|
|
484
489
|
async function createMilestone(program, args, founder) {
|
|
485
490
|
const projectPda = getProjectPDA(args.projectId, program.programId);
|