@star-factory/sdk-launchpad 0.1.0
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/README.md +343 -0
- package/dist/claims/accounts.d.ts +49 -0
- package/dist/claims/accounts.d.ts.map +1 -0
- package/dist/claims/accounts.js +118 -0
- package/dist/claims/accounts.js.map +1 -0
- package/dist/claims/eligibility.d.ts +67 -0
- package/dist/claims/eligibility.d.ts.map +1 -0
- package/dist/claims/eligibility.js +275 -0
- package/dist/claims/eligibility.js.map +1 -0
- package/dist/claims/index.d.ts +5 -0
- package/dist/claims/index.d.ts.map +1 -0
- package/dist/claims/index.js +41 -0
- package/dist/claims/index.js.map +1 -0
- package/dist/claims/pdas.d.ts +24 -0
- package/dist/claims/pdas.d.ts.map +1 -0
- package/dist/claims/pdas.js +43 -0
- package/dist/claims/pdas.js.map +1 -0
- package/dist/claims/tx.d.ts +47 -0
- package/dist/claims/tx.d.ts.map +1 -0
- package/dist/claims/tx.js +126 -0
- package/dist/claims/tx.js.map +1 -0
- package/dist/index.d.ts +27 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +40 -0
- package/dist/index.js.map +1 -0
- package/dist/instructions/cancel-launch.d.ts +16 -0
- package/dist/instructions/cancel-launch.d.ts.map +1 -0
- package/dist/instructions/cancel-launch.js +72 -0
- package/dist/instructions/cancel-launch.js.map +1 -0
- package/dist/instructions/configure-launch.d.ts +16 -0
- package/dist/instructions/configure-launch.d.ts.map +1 -0
- package/dist/instructions/configure-launch.js +50 -0
- package/dist/instructions/configure-launch.js.map +1 -0
- package/dist/instructions/constants.d.ts +8 -0
- package/dist/instructions/constants.d.ts.map +1 -0
- package/dist/instructions/constants.js +14 -0
- package/dist/instructions/constants.js.map +1 -0
- package/dist/instructions/create-launch-token.d.ts +18 -0
- package/dist/instructions/create-launch-token.d.ts.map +1 -0
- package/dist/instructions/create-launch-token.js +65 -0
- package/dist/instructions/create-launch-token.js.map +1 -0
- package/dist/instructions/execute-launch.d.ts +68 -0
- package/dist/instructions/execute-launch.d.ts.map +1 -0
- package/dist/instructions/execute-launch.js +190 -0
- package/dist/instructions/execute-launch.js.map +1 -0
- package/dist/instructions/index.d.ts +8 -0
- package/dist/instructions/index.d.ts.map +1 -0
- package/dist/instructions/index.js +57 -0
- package/dist/instructions/index.js.map +1 -0
- package/dist/instructions/initialize-launch.d.ts +15 -0
- package/dist/instructions/initialize-launch.d.ts.map +1 -0
- package/dist/instructions/initialize-launch.js +71 -0
- package/dist/instructions/initialize-launch.js.map +1 -0
- package/dist/instructions/pdas.d.ts +95 -0
- package/dist/instructions/pdas.d.ts.map +1 -0
- package/dist/instructions/pdas.js +168 -0
- package/dist/instructions/pdas.js.map +1 -0
- package/dist/pdas.d.ts +19 -0
- package/dist/pdas.d.ts.map +1 -0
- package/dist/pdas.js +40 -0
- package/dist/pdas.js.map +1 -0
- package/dist/sdk.d.ts +274 -0
- package/dist/sdk.d.ts.map +1 -0
- package/dist/sdk.js +505 -0
- package/dist/sdk.js.map +1 -0
- package/dist/types.d.ts +578 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +8 -0
- package/dist/types.js.map +1 -0
- package/dist/zc/client.d.ts +69 -0
- package/dist/zc/client.d.ts.map +1 -0
- package/dist/zc/client.js +121 -0
- package/dist/zc/client.js.map +1 -0
- package/dist/zc/constants.d.ts +49 -0
- package/dist/zc/constants.d.ts.map +1 -0
- package/dist/zc/constants.js +64 -0
- package/dist/zc/constants.js.map +1 -0
- package/dist/zc/index.d.ts +4 -0
- package/dist/zc/index.d.ts.map +1 -0
- package/dist/zc/index.js +7 -0
- package/dist/zc/index.js.map +1 -0
- package/dist/zc/types.d.ts +65 -0
- package/dist/zc/types.d.ts.map +1 -0
- package/dist/zc/types.js +3 -0
- package/dist/zc/types.js.map +1 -0
- package/package.json +63 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Star Launchpad SDK
|
|
4
|
+
*
|
|
5
|
+
* Full lifecycle SDK for the Star Launchpad program:
|
|
6
|
+
*
|
|
7
|
+
* Admin / launch flow:
|
|
8
|
+
* 1. Initialize launch (creates vault via CPI)
|
|
9
|
+
* 2. Configure launch (set vanity mint + metadata)
|
|
10
|
+
* 3. Create launch token (mint total supply)
|
|
11
|
+
* 4. Reserve admin (off-chain ZC API call)
|
|
12
|
+
* 5. Execute launch (pool + DAO + authority transfer)
|
|
13
|
+
* 6. Cancel launch (pre-Launched states only)
|
|
14
|
+
*
|
|
15
|
+
* Client / claim flow:
|
|
16
|
+
* 7. Check claim eligibility
|
|
17
|
+
* 8. Build claim transactions
|
|
18
|
+
*
|
|
19
|
+
* @see https://docs.combinator.trade/llms.txt
|
|
20
|
+
* @see programs/launchpad/spec/09-zc-dao-creation.md
|
|
21
|
+
*/
|
|
22
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
+
exports.sortMints = exports.derivePoolAddress = exports.LaunchpadSDK = void 0;
|
|
24
|
+
const tslib_1 = require("tslib");
|
|
25
|
+
// Main SDK
|
|
26
|
+
var sdk_1 = require("./sdk");
|
|
27
|
+
Object.defineProperty(exports, "LaunchpadSDK", { enumerable: true, get: function () { return sdk_1.LaunchpadSDK; } });
|
|
28
|
+
// Types
|
|
29
|
+
tslib_1.__exportStar(require("./types"), exports);
|
|
30
|
+
// PDAs (pool derivation)
|
|
31
|
+
var pdas_1 = require("./pdas");
|
|
32
|
+
Object.defineProperty(exports, "derivePoolAddress", { enumerable: true, get: function () { return pdas_1.derivePoolAddress; } });
|
|
33
|
+
Object.defineProperty(exports, "sortMints", { enumerable: true, get: function () { return pdas_1.sortMints; } });
|
|
34
|
+
// Instructions (admin TX builders + external PDAs)
|
|
35
|
+
tslib_1.__exportStar(require("./instructions"), exports);
|
|
36
|
+
// Claims (client-facing token claims)
|
|
37
|
+
tslib_1.__exportStar(require("./claims"), exports);
|
|
38
|
+
// ZC (re-export everything)
|
|
39
|
+
tslib_1.__exportStar(require("./zc"), exports);
|
|
40
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;AAEH,WAAW;AACX,6BAAqC;AAA5B,mGAAA,YAAY,OAAA;AAErB,QAAQ;AACR,kDAAwB;AAExB,yBAAyB;AACzB,+BAAsD;AAA7C,yGAAA,iBAAiB,OAAA;AAAE,iGAAA,SAAS,OAAA;AAErC,mDAAmD;AACnD,yDAA+B;AAE/B,sCAAsC;AACtC,mDAAyB;AAEzB,4BAA4B;AAC5B,+CAAqB"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Idl, Program } from '@coral-xyz/anchor';
|
|
2
|
+
import { Connection, Transaction } from '@solana/web3.js';
|
|
3
|
+
import type { CancelLaunchOptions } from '../types';
|
|
4
|
+
/**
|
|
5
|
+
* Build an unsigned `cancel_launch` transaction.
|
|
6
|
+
*
|
|
7
|
+
* Cancels a launch from any pre-Launched state (FundraiseActive, ReadyToLaunch,
|
|
8
|
+
* TokenCreated). If tokens were minted (TokenCreated), they are burned and the
|
|
9
|
+
* mint authority is revoked. Then CPI to vault::initiate_refund enables user refunds.
|
|
10
|
+
*
|
|
11
|
+
* @param connection - Solana RPC connection (for blockhash)
|
|
12
|
+
* @param launchpadProgram - Anchor program instance for the launchpad
|
|
13
|
+
* @param opts - Cancel launch options
|
|
14
|
+
*/
|
|
15
|
+
export declare function buildCancelLaunchTx(connection: Connection, launchpadProgram: Program<Idl>, opts: CancelLaunchOptions): Promise<Transaction>;
|
|
16
|
+
//# sourceMappingURL=cancel-launch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cancel-launch.d.ts","sourceRoot":"","sources":["../../src/instructions/cancel-launch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAEtD,OAAO,EAEH,UAAU,EAGV,WAAW,EAEd,MAAM,iBAAiB,CAAC;AAGzB,OAAO,KAAK,EAAE,mBAAmB,EAAuB,MAAM,UAAU,CAAC;AAuBzE;;;;;;;;;;GAUG;AACH,wBAAsB,mBAAmB,CACvC,UAAU,EAAE,UAAU,EACtB,gBAAgB,EAAE,OAAO,CAAC,GAAG,CAAC,EAC9B,IAAI,EAAE,mBAAmB,GACxB,OAAO,CAAC,WAAW,CAAC,CA4DtB"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildCancelLaunchTx = buildCancelLaunchTx;
|
|
4
|
+
const spl_token_1 = require("@solana/spl-token");
|
|
5
|
+
const web3_js_1 = require("@solana/web3.js");
|
|
6
|
+
const pdas_1 = require("../claims/pdas");
|
|
7
|
+
const types_1 = require("../types");
|
|
8
|
+
// ============================================================================
|
|
9
|
+
// cancel_launch Transaction Builder
|
|
10
|
+
// ============================================================================
|
|
11
|
+
/**
|
|
12
|
+
* Determine whether the cancel instruction needs base_mint and token_vault accounts.
|
|
13
|
+
*
|
|
14
|
+
* These are only required when the state is `TokenCreated` (tokens have been minted
|
|
15
|
+
* and need to be burned).
|
|
16
|
+
*/
|
|
17
|
+
function needsTokenAccounts(launchConfigData) {
|
|
18
|
+
return (0, types_1.getLaunchStateKey)(launchConfigData.state) === 'tokenCreated';
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Build an unsigned `cancel_launch` transaction.
|
|
22
|
+
*
|
|
23
|
+
* Cancels a launch from any pre-Launched state (FundraiseActive, ReadyToLaunch,
|
|
24
|
+
* TokenCreated). If tokens were minted (TokenCreated), they are burned and the
|
|
25
|
+
* mint authority is revoked. Then CPI to vault::initiate_refund enables user refunds.
|
|
26
|
+
*
|
|
27
|
+
* @param connection - Solana RPC connection (for blockhash)
|
|
28
|
+
* @param launchpadProgram - Anchor program instance for the launchpad
|
|
29
|
+
* @param opts - Cancel launch options
|
|
30
|
+
*/
|
|
31
|
+
async function buildCancelLaunchTx(connection, launchpadProgram, opts) {
|
|
32
|
+
const { admin, launchConfig, launchConfigData, vaultProgramId, feePayer, computeUnits, priorityFee, } = opts;
|
|
33
|
+
const launchpadProgramId = launchpadProgram.programId;
|
|
34
|
+
const tokenProgramId = opts.tokenProgramId ?? spl_token_1.TOKEN_PROGRAM_ID;
|
|
35
|
+
const [launchpadSigner] = (0, pdas_1.deriveLaunchpadSignerPda)(launchConfig, launchpadProgramId);
|
|
36
|
+
// Base mint and token vault are optional (only for TokenCreated state)
|
|
37
|
+
const hasTokens = needsTokenAccounts(launchConfigData);
|
|
38
|
+
const baseMint = hasTokens ? launchConfigData.baseMint : null;
|
|
39
|
+
let tokenVault = null;
|
|
40
|
+
if (hasTokens && baseMint) {
|
|
41
|
+
tokenVault = (0, spl_token_1.getAssociatedTokenAddressSync)(baseMint, launchpadSigner, true);
|
|
42
|
+
}
|
|
43
|
+
const methods = launchpadProgram.methods;
|
|
44
|
+
const ix = await methods
|
|
45
|
+
.cancelLaunch()
|
|
46
|
+
.accounts({
|
|
47
|
+
admin,
|
|
48
|
+
launchConfig,
|
|
49
|
+
launchpadSigner,
|
|
50
|
+
baseMint: baseMint ?? null,
|
|
51
|
+
tokenVault: tokenVault ?? null,
|
|
52
|
+
fundraiseState: launchConfigData.fundraiseState,
|
|
53
|
+
vaultProgram: vaultProgramId,
|
|
54
|
+
tokenProgram: tokenProgramId,
|
|
55
|
+
systemProgram: web3_js_1.SystemProgram.programId,
|
|
56
|
+
})
|
|
57
|
+
.instruction();
|
|
58
|
+
const tx = new web3_js_1.Transaction();
|
|
59
|
+
if (computeUnits) {
|
|
60
|
+
tx.add(web3_js_1.ComputeBudgetProgram.setComputeUnitLimit({ units: computeUnits }));
|
|
61
|
+
}
|
|
62
|
+
if (priorityFee) {
|
|
63
|
+
tx.add(web3_js_1.ComputeBudgetProgram.setComputeUnitPrice({ microLamports: priorityFee }));
|
|
64
|
+
}
|
|
65
|
+
tx.add(ix);
|
|
66
|
+
tx.feePayer = feePayer ?? admin;
|
|
67
|
+
const { blockhash, lastValidBlockHeight } = await connection.getLatestBlockhash('confirmed');
|
|
68
|
+
tx.recentBlockhash = blockhash;
|
|
69
|
+
tx.lastValidBlockHeight = lastValidBlockHeight;
|
|
70
|
+
return tx;
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=cancel-launch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cancel-launch.js","sourceRoot":"","sources":["../../src/instructions/cancel-launch.ts"],"names":[],"mappings":";;AA8CA,kDAgEC;AA7GD,iDAAoF;AACpF,6CAOyB;AAEzB,yCAA0D;AAE1D,oCAA6C;AAQ7C,+EAA+E;AAC/E,oCAAoC;AACpC,+EAA+E;AAE/E;;;;;GAKG;AACH,SAAS,kBAAkB,CAAC,gBAAqC;IAC/D,OAAO,IAAA,yBAAiB,EAAC,gBAAgB,CAAC,KAAK,CAAC,KAAK,cAAc,CAAC;AACtE,CAAC;AAED;;;;;;;;;;GAUG;AACI,KAAK,UAAU,mBAAmB,CACvC,UAAsB,EACtB,gBAA8B,EAC9B,IAAyB;IAEzB,MAAM,EACJ,KAAK,EACL,YAAY,EACZ,gBAAgB,EAChB,cAAc,EACd,QAAQ,EACR,YAAY,EACZ,WAAW,GACZ,GAAG,IAAI,CAAC;IAET,MAAM,kBAAkB,GAAG,gBAAgB,CAAC,SAAS,CAAC;IACtD,MAAM,cAAc,GAAG,IAAI,CAAC,cAAc,IAAI,4BAAgB,CAAC;IAC/D,MAAM,CAAC,eAAe,CAAC,GAAG,IAAA,+BAAwB,EAAC,YAAY,EAAE,kBAAkB,CAAC,CAAC;IAErF,uEAAuE;IACvE,MAAM,SAAS,GAAG,kBAAkB,CAAC,gBAAgB,CAAC,CAAC;IACvD,MAAM,QAAQ,GAAG,SAAS,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AAS,CAAC;IAC/B,EAAE,CAAC,oBAAoB,GAAG,oBAAoB,CAAC;IAE/C,OAAO,EAAE,CAAC;AACZ,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Idl, Program } from '@coral-xyz/anchor';
|
|
2
|
+
import { Connection, Transaction } from '@solana/web3.js';
|
|
3
|
+
import type { ConfigureLaunchOptions } from '../types';
|
|
4
|
+
/**
|
|
5
|
+
* Build an unsigned `configure_launch` transaction.
|
|
6
|
+
*
|
|
7
|
+
* Sets vanity mint configuration and token metadata on the LaunchConfig.
|
|
8
|
+
* Transitions FundraiseActive → ReadyToLaunch.
|
|
9
|
+
* Requires vault.status == TgeRequested.
|
|
10
|
+
*
|
|
11
|
+
* @param connection - Solana RPC connection (for blockhash)
|
|
12
|
+
* @param launchpadProgram - Anchor program instance for the launchpad
|
|
13
|
+
* @param opts - Configure launch options
|
|
14
|
+
*/
|
|
15
|
+
export declare function buildConfigureLaunchTx(connection: Connection, launchpadProgram: Program<Idl>, opts: ConfigureLaunchOptions): Promise<Transaction>;
|
|
16
|
+
//# sourceMappingURL=configure-launch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configure-launch.d.ts","sourceRoot":"","sources":["../../src/instructions/configure-launch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAEH,UAAU,EACV,WAAW,EAEd,MAAM,iBAAiB,CAAC;AAEzB,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAYvD;;;;;;;;;;GAUG;AACH,wBAAsB,sBAAsB,CAC1C,UAAU,EAAE,UAAU,EACtB,gBAAgB,EAAE,OAAO,CAAC,GAAG,CAAC,EAC9B,IAAI,EAAE,sBAAsB,GAC3B,OAAO,CAAC,WAAW,CAAC,CAoDtB"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildConfigureLaunchTx = buildConfigureLaunchTx;
|
|
4
|
+
const web3_js_1 = require("@solana/web3.js");
|
|
5
|
+
// ============================================================================
|
|
6
|
+
// configure_launch Transaction Builder
|
|
7
|
+
// ============================================================================
|
|
8
|
+
/**
|
|
9
|
+
* Build an unsigned `configure_launch` transaction.
|
|
10
|
+
*
|
|
11
|
+
* Sets vanity mint configuration and token metadata on the LaunchConfig.
|
|
12
|
+
* Transitions FundraiseActive → ReadyToLaunch.
|
|
13
|
+
* Requires vault.status == TgeRequested.
|
|
14
|
+
*
|
|
15
|
+
* @param connection - Solana RPC connection (for blockhash)
|
|
16
|
+
* @param launchpadProgram - Anchor program instance for the launchpad
|
|
17
|
+
* @param opts - Configure launch options
|
|
18
|
+
*/
|
|
19
|
+
async function buildConfigureLaunchTx(connection, launchpadProgram, opts) {
|
|
20
|
+
const { admin, launchConfig, fundraiseState, basePubkey, vanitySeed, expectedMint, name, symbol, uri, feePayer, computeUnits, priorityFee, } = opts;
|
|
21
|
+
const methods = launchpadProgram.methods;
|
|
22
|
+
const ix = await methods.configureLaunch({
|
|
23
|
+
basePubkey,
|
|
24
|
+
vanitySeed,
|
|
25
|
+
expectedMint,
|
|
26
|
+
name,
|
|
27
|
+
symbol,
|
|
28
|
+
uri,
|
|
29
|
+
})
|
|
30
|
+
.accounts({
|
|
31
|
+
admin,
|
|
32
|
+
launchConfig,
|
|
33
|
+
fundraiseState,
|
|
34
|
+
})
|
|
35
|
+
.instruction();
|
|
36
|
+
const tx = new web3_js_1.Transaction();
|
|
37
|
+
if (computeUnits) {
|
|
38
|
+
tx.add(web3_js_1.ComputeBudgetProgram.setComputeUnitLimit({ units: computeUnits }));
|
|
39
|
+
}
|
|
40
|
+
if (priorityFee) {
|
|
41
|
+
tx.add(web3_js_1.ComputeBudgetProgram.setComputeUnitPrice({ microLamports: priorityFee }));
|
|
42
|
+
}
|
|
43
|
+
tx.add(ix);
|
|
44
|
+
tx.feePayer = feePayer ?? admin;
|
|
45
|
+
const { blockhash, lastValidBlockHeight } = await connection.getLatestBlockhash('confirmed');
|
|
46
|
+
tx.recentBlockhash = blockhash;
|
|
47
|
+
tx.lastValidBlockHeight = lastValidBlockHeight;
|
|
48
|
+
return tx;
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=configure-launch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configure-launch.js","sourceRoot":"","sources":["../../src/instructions/configure-launch.ts"],"names":[],"mappings":";;AA+BA,wDAwDC;AAtFD,6CAKyB;AAUzB,+EAA+E;AAC/E,uCAAuC;AACvC,+EAA+E;AAE/E;;;;;;;;;;GAUG;AACI,KAAK,UAAU,sBAAsB,CAC1C,UAAsB,EACtB,gBAA8B,EAC9B,IAA4B;IAE5B,MAAM,EACJ,KAAK,EACL,YAAY,EACZ,cAAc,EACd,UAAU,EACV,UAAU,EACV,YAAY,EACZ,IAAI,EACJ,MAAM,EACN,GAAG,EACH,QAAQ,EACR,YAAY,EACZ,WAAW,GACZ,GAAG,IAAI,CAAC;IAET,MAAM,OAAO,GAAG,gBAAgB,CAAC,OAEhC,CAAC;IAEF,MAAM,EAAE,GAA2B,MAAM,OAAO,CAAC,eAAe,CAAC;QAC7D,UAAU;QACV,UAAU;QACV,YAAY;QACZ,IAAI;QACJ,MAAM;QACN,GAAG;KACJ,CAAC;SACD,QAAQ,CAAC;QACR,KAAK;QACL,YAAY;QACZ,cAAc;KACf,CAAC;SACD,WAAW,EAAE,CAAC;IAEjB,MAAM,EAAE,GAAG,IAAI,qBAAW,EAAE,CAAC;IAE7B,IAAI,YAAY,EAAE,CAAC;QACjB,EAAE,CAAC,GAAG,CAAC,8BAAoB,CAAC,mBAAmB,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC;IAC5E,CAAC;IACD,IAAI,WAAW,EAAE,CAAC;QAChB,EAAE,CAAC,GAAG,CAAC,8BAAoB,CAAC,mBAAmB,CAAC,EAAE,aAAa,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC;IACnF,CAAC;IAED,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IACX,EAAE,CAAC,QAAQ,GAAG,QAAQ,IAAI,KAAK,CAAC;IAEhC,MAAM,EAAE,SAAS,EAAE,oBAAoB,EAAE,GAAG,MAAM,UAAU,CAAC,kBAAkB,CAAC,WAAW,CAAC,CAAC;IAC7F,EAAE,CAAC,eAAe,GAAG,SAAS,CAAC;IAC/B,EAAE,CAAC,oBAAoB,GAAG,oBAAoB,CAAC;IAE/C,OAAO,EAAE,CAAC;AACZ,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PublicKey } from '@solana/web3.js';
|
|
2
|
+
/** Squads Multisig v4 program. */
|
|
3
|
+
export declare const SQUADS_PROGRAM_ID: PublicKey;
|
|
4
|
+
/** Metaplex Token Metadata program. */
|
|
5
|
+
export declare const METAPLEX_PROGRAM_ID: PublicKey;
|
|
6
|
+
/** Token-2022 (SPL Token Extensions) program. */
|
|
7
|
+
export declare const TOKEN_2022_PROGRAM_ID: PublicKey;
|
|
8
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/instructions/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAM5C,kCAAkC;AAClC,eAAO,MAAM,iBAAiB,WAE7B,CAAC;AAEF,uCAAuC;AACvC,eAAO,MAAM,mBAAmB,WAE/B,CAAC;AAEF,iDAAiD;AACjD,eAAO,MAAM,qBAAqB,WAEjC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TOKEN_2022_PROGRAM_ID = exports.METAPLEX_PROGRAM_ID = exports.SQUADS_PROGRAM_ID = void 0;
|
|
4
|
+
const web3_js_1 = require("@solana/web3.js");
|
|
5
|
+
// ============================================================================
|
|
6
|
+
// External Program IDs
|
|
7
|
+
// ============================================================================
|
|
8
|
+
/** Squads Multisig v4 program. */
|
|
9
|
+
exports.SQUADS_PROGRAM_ID = new web3_js_1.PublicKey('SQDS4ep65T869zMMBKyuUq6aD6EgTu8psMjkvj52pCf');
|
|
10
|
+
/** Metaplex Token Metadata program. */
|
|
11
|
+
exports.METAPLEX_PROGRAM_ID = new web3_js_1.PublicKey('metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s');
|
|
12
|
+
/** Token-2022 (SPL Token Extensions) program. */
|
|
13
|
+
exports.TOKEN_2022_PROGRAM_ID = new web3_js_1.PublicKey('TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb');
|
|
14
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/instructions/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAE5C,+EAA+E;AAC/E,uBAAuB;AACvB,+EAA+E;AAE/E,kCAAkC;AACrB,QAAA,iBAAiB,GAAG,IAAI,mBAAS,CAC5C,6CAA6C,CAC9C,CAAC;AAEF,uCAAuC;AAC1B,QAAA,mBAAmB,GAAG,IAAI,mBAAS,CAC9C,6CAA6C,CAC9C,CAAC;AAEF,iDAAiD;AACpC,QAAA,qBAAqB,GAAG,IAAI,mBAAS,CAChD,6CAA6C,CAC9C,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Idl, Program } from '@coral-xyz/anchor';
|
|
2
|
+
import { Connection, Transaction } from '@solana/web3.js';
|
|
3
|
+
import type { CreateLaunchTokenOptions } from '../types';
|
|
4
|
+
/**
|
|
5
|
+
* Build an unsigned `create_launch_token` transaction.
|
|
6
|
+
*
|
|
7
|
+
* Creates the vanity mint, Metaplex metadata, and mints total supply
|
|
8
|
+
* to the launchpad token vault.
|
|
9
|
+
* Transitions ReadyToLaunch → TokenCreated.
|
|
10
|
+
*
|
|
11
|
+
* **Important**: The transaction must be signed by both `admin` and `baseKeypair`.
|
|
12
|
+
*
|
|
13
|
+
* @param connection - Solana RPC connection (for blockhash)
|
|
14
|
+
* @param launchpadProgram - Anchor program instance for the launchpad
|
|
15
|
+
* @param opts - Create launch token options
|
|
16
|
+
*/
|
|
17
|
+
export declare function buildCreateLaunchTokenTx(connection: Connection, launchpadProgram: Program<Idl>, opts: CreateLaunchTokenOptions): Promise<Transaction>;
|
|
18
|
+
//# sourceMappingURL=create-launch-token.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-launch-token.d.ts","sourceRoot":"","sources":["../../src/instructions/create-launch-token.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAMtD,OAAO,EAEH,UAAU,EAGV,WAAW,EAEd,MAAM,iBAAiB,CAAC;AAGzB,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAczD;;;;;;;;;;;;GAYG;AACH,wBAAsB,wBAAwB,CAC5C,UAAU,EAAE,UAAU,EACtB,gBAAgB,EAAE,OAAO,CAAC,GAAG,CAAC,EAC9B,IAAI,EAAE,wBAAwB,GAC7B,OAAO,CAAC,WAAW,CAAC,CA4DtB"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildCreateLaunchTokenTx = buildCreateLaunchTokenTx;
|
|
4
|
+
const spl_token_1 = require("@solana/spl-token");
|
|
5
|
+
const web3_js_1 = require("@solana/web3.js");
|
|
6
|
+
const pdas_1 = require("../claims/pdas");
|
|
7
|
+
const constants_1 = require("./constants");
|
|
8
|
+
const pdas_2 = require("./pdas");
|
|
9
|
+
// ============================================================================
|
|
10
|
+
// create_launch_token Transaction Builder
|
|
11
|
+
// ============================================================================
|
|
12
|
+
/**
|
|
13
|
+
* Build an unsigned `create_launch_token` transaction.
|
|
14
|
+
*
|
|
15
|
+
* Creates the vanity mint, Metaplex metadata, and mints total supply
|
|
16
|
+
* to the launchpad token vault.
|
|
17
|
+
* Transitions ReadyToLaunch → TokenCreated.
|
|
18
|
+
*
|
|
19
|
+
* **Important**: The transaction must be signed by both `admin` and `baseKeypair`.
|
|
20
|
+
*
|
|
21
|
+
* @param connection - Solana RPC connection (for blockhash)
|
|
22
|
+
* @param launchpadProgram - Anchor program instance for the launchpad
|
|
23
|
+
* @param opts - Create launch token options
|
|
24
|
+
*/
|
|
25
|
+
async function buildCreateLaunchTokenTx(connection, launchpadProgram, opts) {
|
|
26
|
+
const { admin, baseKeypairPubkey, launchConfig, expectedMint, metaplexProgramId, feePayer, computeUnits, priorityFee, } = opts;
|
|
27
|
+
const launchpadProgramId = launchpadProgram.programId;
|
|
28
|
+
const metaplex = metaplexProgramId ?? constants_1.METAPLEX_PROGRAM_ID;
|
|
29
|
+
// Derive accounts
|
|
30
|
+
const [launchpadSigner] = (0, pdas_1.deriveLaunchpadSignerPda)(launchConfig, launchpadProgramId);
|
|
31
|
+
const [metadata] = (0, pdas_2.deriveMetadataPda)(expectedMint, metaplex);
|
|
32
|
+
const tokenVault = (0, spl_token_1.getAssociatedTokenAddressSync)(expectedMint, launchpadSigner, true);
|
|
33
|
+
const methods = launchpadProgram.methods;
|
|
34
|
+
const ix = await methods
|
|
35
|
+
.createLaunchToken()
|
|
36
|
+
.accounts({
|
|
37
|
+
admin,
|
|
38
|
+
baseKeypair: baseKeypairPubkey,
|
|
39
|
+
launchConfig,
|
|
40
|
+
launchpadSigner,
|
|
41
|
+
mint: expectedMint,
|
|
42
|
+
metadata,
|
|
43
|
+
tokenVault,
|
|
44
|
+
metadataProgram: metaplex,
|
|
45
|
+
tokenProgram: spl_token_1.TOKEN_PROGRAM_ID,
|
|
46
|
+
associatedTokenProgram: spl_token_1.ASSOCIATED_TOKEN_PROGRAM_ID,
|
|
47
|
+
systemProgram: web3_js_1.SystemProgram.programId,
|
|
48
|
+
rent: web3_js_1.SYSVAR_RENT_PUBKEY,
|
|
49
|
+
})
|
|
50
|
+
.instruction();
|
|
51
|
+
const tx = new web3_js_1.Transaction();
|
|
52
|
+
if (computeUnits) {
|
|
53
|
+
tx.add(web3_js_1.ComputeBudgetProgram.setComputeUnitLimit({ units: computeUnits }));
|
|
54
|
+
}
|
|
55
|
+
if (priorityFee) {
|
|
56
|
+
tx.add(web3_js_1.ComputeBudgetProgram.setComputeUnitPrice({ microLamports: priorityFee }));
|
|
57
|
+
}
|
|
58
|
+
tx.add(ix);
|
|
59
|
+
tx.feePayer = feePayer ?? admin;
|
|
60
|
+
const { blockhash, lastValidBlockHeight } = await connection.getLatestBlockhash('confirmed');
|
|
61
|
+
tx.recentBlockhash = blockhash;
|
|
62
|
+
tx.lastValidBlockHeight = lastValidBlockHeight;
|
|
63
|
+
return tx;
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=create-launch-token.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-launch-token.js","sourceRoot":"","sources":["../../src/instructions/create-launch-token.ts"],"names":[],"mappings":";;AA2CA,4DAgEC;AA1GD,iDAI2B;AAC3B,6CAOyB;AAEzB,yCAA0D;AAE1D,2CAAkD;AAClD,iCAA2C;AAQ3C,+EAA+E;AAC/E,0CAA0C;AAC1C,+EAA+E;AAE/E;;;;;;;;;;;;GAYG;AACI,KAAK,UAAU,wBAAwB,CAC5C,UAAsB,EACtB,gBAA8B,EAC9B,IAA8B;IAE9B,MAAM,EACJ,KAAK,EACL,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,iBAAiB,EACjB,QAAQ,EACR,YAAY,EACZ,WAAW,GACZ,GAAG,IAAI,CAAC;IAET,MAAM,kBAAkB,GAAG,gBAAg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hC,MAAM,EAAE,SAAS,EAAE,oBAAoB,EAAE,GAAG,MAAM,UAAU,CAAC,kBAAkB,CAAC,WAAW,CAAC,CAAC;IAC7F,EAAE,CAAC,eAAe,GAAG,SAAS,CAAC;IAC/B,EAAE,CAAC,oBAAoB,GAAG,oBAAoB,CAAC;IAE/C,OAAO,EAAE,CAAC;AACZ,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import type { Idl, Program } from '@coral-xyz/anchor';
|
|
2
|
+
import { Connection, PublicKey, Transaction } from '@solana/web3.js';
|
|
3
|
+
import type { ExecuteLaunchOptions } from '../types';
|
|
4
|
+
/**
|
|
5
|
+
* Build an unsigned `execute_launch` transaction.
|
|
6
|
+
*
|
|
7
|
+
* This is the most complex instruction in the launchpad program.
|
|
8
|
+
* It atomically:
|
|
9
|
+
* 1. Finalizes the vault (accept_and_calculate via CPI)
|
|
10
|
+
* 2. Distributes tokens (participants vault, liquidity pool, team)
|
|
11
|
+
* 3. Creates a DAMM pool with full-range liquidity
|
|
12
|
+
* 4. Creates a futarchy DAO with Squads multisigs
|
|
13
|
+
* 5. Transfers mint authority + metadata authority to DAO
|
|
14
|
+
* 6. Routes raised funds to DAO treasury
|
|
15
|
+
*
|
|
16
|
+
* Transitions TokenCreated → Launched.
|
|
17
|
+
*
|
|
18
|
+
* **Important**: Requires an Address Lookup Table (ALT) for the ~35 accounts.
|
|
19
|
+
* The returned Transaction contains legacy instructions — caller should
|
|
20
|
+
* compile to a VersionedTransaction with the ALT before sending.
|
|
21
|
+
*
|
|
22
|
+
* @param connection - Solana RPC connection (for blockhash + squads config fetch)
|
|
23
|
+
* @param launchpadProgram - Anchor program instance for the launchpad
|
|
24
|
+
* @param opts - Execute launch options
|
|
25
|
+
*/
|
|
26
|
+
export declare function buildExecuteLaunchTx(connection: Connection, launchpadProgram: Program<Idl>, opts: ExecuteLaunchOptions): Promise<{
|
|
27
|
+
tx: Transaction;
|
|
28
|
+
accounts: ExecuteLaunchAccountsResolved;
|
|
29
|
+
}>;
|
|
30
|
+
/**
|
|
31
|
+
* All resolved accounts for an `execute_launch` instruction.
|
|
32
|
+
*
|
|
33
|
+
* Returned alongside the transaction so the caller can create an
|
|
34
|
+
* Address Lookup Table with these addresses.
|
|
35
|
+
*/
|
|
36
|
+
export interface ExecuteLaunchAccountsResolved {
|
|
37
|
+
admin: PublicKey;
|
|
38
|
+
launchConfig: PublicKey;
|
|
39
|
+
launchpadSigner: PublicKey;
|
|
40
|
+
baseMint: PublicKey;
|
|
41
|
+
quoteMint: PublicKey;
|
|
42
|
+
launchpadTokenVault: PublicKey;
|
|
43
|
+
launchpadFundsVault: PublicKey;
|
|
44
|
+
adminTokenAta: PublicKey;
|
|
45
|
+
fundraiseState: PublicKey;
|
|
46
|
+
tgeConfig: PublicKey;
|
|
47
|
+
vaultAta: PublicKey;
|
|
48
|
+
positionNftMint: PublicKey;
|
|
49
|
+
positionNftAccount: PublicKey;
|
|
50
|
+
dammPoolAuthority: PublicKey;
|
|
51
|
+
dammPool: PublicKey;
|
|
52
|
+
dammPosition: PublicKey;
|
|
53
|
+
dammTokenAVault: PublicKey;
|
|
54
|
+
dammTokenBVault: PublicKey;
|
|
55
|
+
dammEventAuthority: PublicKey;
|
|
56
|
+
dao: PublicKey;
|
|
57
|
+
moderator: PublicKey;
|
|
58
|
+
programConfig: PublicKey;
|
|
59
|
+
futarchyProgramConfigTreasury: PublicKey;
|
|
60
|
+
treasuryMultisig: PublicKey;
|
|
61
|
+
mintMultisig: PublicKey;
|
|
62
|
+
mintCreateKey: PublicKey;
|
|
63
|
+
newDaoAdmin: PublicKey;
|
|
64
|
+
daoTreasury: PublicKey;
|
|
65
|
+
daoTreasuryQuoteAta: PublicKey;
|
|
66
|
+
metadata: PublicKey;
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=execute-launch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execute-launch.d.ts","sourceRoot":"","sources":["../../src/instructions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EAAE,SAAS,CAAC;IACzC,gBAAgB,EAAE,SAAS,CAAC;IAC5B,YAAY,EAAE,SAAS,CAAC;IACxB,aAAa,EAAE,SAAS,CAAC;IACzB,WAAW,EAAE,SAAS,CAAC;IACvB,WAAW,EAAE,SAAS,CAAC;IACvB,mBAAmB,EAAE,SAAS,CAAC;IAC/B,QAAQ,EAAE,SAAS,CAAC;CACrB"}
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildExecuteLaunchTx = buildExecuteLaunchTx;
|
|
4
|
+
const spl_token_1 = require("@solana/spl-token");
|
|
5
|
+
const web3_js_1 = require("@solana/web3.js");
|
|
6
|
+
const pdas_1 = require("../claims/pdas");
|
|
7
|
+
const constants_1 = require("../zc/constants");
|
|
8
|
+
const constants_2 = require("./constants");
|
|
9
|
+
const pdas_2 = require("./pdas");
|
|
10
|
+
// ============================================================================
|
|
11
|
+
// execute_launch Transaction Builder
|
|
12
|
+
// ============================================================================
|
|
13
|
+
/**
|
|
14
|
+
* Resolve the Squads program config treasury from on-chain data.
|
|
15
|
+
*
|
|
16
|
+
* The futarchy program reads the treasury pubkey from bytes 48–80
|
|
17
|
+
* of the Squads program config account.
|
|
18
|
+
*/
|
|
19
|
+
async function resolveSquadsProgramConfigTreasury(connection, programConfig) {
|
|
20
|
+
const info = await connection.getAccountInfo(programConfig);
|
|
21
|
+
if (!info || info.data.length < 80) {
|
|
22
|
+
throw new Error(`Cannot read Squads program config treasury from ${programConfig.toBase58()}`);
|
|
23
|
+
}
|
|
24
|
+
return new web3_js_1.PublicKey(info.data.subarray(48, 80));
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Build an unsigned `execute_launch` transaction.
|
|
28
|
+
*
|
|
29
|
+
* This is the most complex instruction in the launchpad program.
|
|
30
|
+
* It atomically:
|
|
31
|
+
* 1. Finalizes the vault (accept_and_calculate via CPI)
|
|
32
|
+
* 2. Distributes tokens (participants vault, liquidity pool, team)
|
|
33
|
+
* 3. Creates a DAMM pool with full-range liquidity
|
|
34
|
+
* 4. Creates a futarchy DAO with Squads multisigs
|
|
35
|
+
* 5. Transfers mint authority + metadata authority to DAO
|
|
36
|
+
* 6. Routes raised funds to DAO treasury
|
|
37
|
+
*
|
|
38
|
+
* Transitions TokenCreated → Launched.
|
|
39
|
+
*
|
|
40
|
+
* **Important**: Requires an Address Lookup Table (ALT) for the ~35 accounts.
|
|
41
|
+
* The returned Transaction contains legacy instructions — caller should
|
|
42
|
+
* compile to a VersionedTransaction with the ALT before sending.
|
|
43
|
+
*
|
|
44
|
+
* @param connection - Solana RPC connection (for blockhash + squads config fetch)
|
|
45
|
+
* @param launchpadProgram - Anchor program instance for the launchpad
|
|
46
|
+
* @param opts - Execute launch options
|
|
47
|
+
*/
|
|
48
|
+
async function buildExecuteLaunchTx(connection, launchpadProgram, opts) {
|
|
49
|
+
const { admin, launchConfig, launchConfigData, poolActivationTime, daoName, treasuryCosigner, newDaoAdmin, dammPool, vaultProgramId, feePayer, computeUnits, priorityFee, } = opts;
|
|
50
|
+
const launchpadProgramId = launchpadProgram.programId;
|
|
51
|
+
const dammProgramId = opts.dammProgramId ?? constants_1.DAMM_PROGRAM_ID;
|
|
52
|
+
const futarchyProgramId = opts.futarchyProgramId ?? constants_1.ZC_FUTARCHY_PROGRAM_ID;
|
|
53
|
+
const squadsProgramId = opts.squadsProgramId ?? constants_2.SQUADS_PROGRAM_ID;
|
|
54
|
+
const metaplexProgramId = opts.metaplexProgramId ?? constants_2.METAPLEX_PROGRAM_ID;
|
|
55
|
+
const tokenProgramId = opts.tokenProgramId ?? spl_token_1.TOKEN_PROGRAM_ID;
|
|
56
|
+
const baseMint = launchConfigData.baseMint;
|
|
57
|
+
const quoteMint = launchConfigData.quoteMint;
|
|
58
|
+
const fundraiseState = launchConfigData.fundraiseState;
|
|
59
|
+
if (!baseMint) {
|
|
60
|
+
throw new Error('LaunchConfig.baseMint is not set — call configure_launch first');
|
|
61
|
+
}
|
|
62
|
+
// --- Launchpad PDAs ---
|
|
63
|
+
const [launchpadSigner] = (0, pdas_1.deriveLaunchpadSignerPda)(launchConfig, launchpadProgramId);
|
|
64
|
+
const [positionNftMint] = (0, pdas_2.derivePositionNftMintPda)(launchConfig, launchpadProgramId);
|
|
65
|
+
// --- Launchpad token accounts ---
|
|
66
|
+
const launchpadTokenVault = (0, spl_token_1.getAssociatedTokenAddressSync)(baseMint, launchpadSigner, true);
|
|
67
|
+
const launchpadFundsVault = (0, spl_token_1.getAssociatedTokenAddressSync)(quoteMint, launchpadSigner, true);
|
|
68
|
+
const adminTokenAta = (0, spl_token_1.getAssociatedTokenAddressSync)(baseMint, admin);
|
|
69
|
+
// --- Vault PDAs ---
|
|
70
|
+
const [tgeConfig] = (0, pdas_2.deriveTgeConfigPda)(fundraiseState, vaultProgramId);
|
|
71
|
+
const vaultAta = (0, spl_token_1.getAssociatedTokenAddressSync)(quoteMint, fundraiseState, true);
|
|
72
|
+
// --- DAMM PDAs ---
|
|
73
|
+
const [dammPoolAuthority] = (0, pdas_2.deriveDammPoolAuthority)(dammProgramId);
|
|
74
|
+
const [dammTokenAVault] = (0, pdas_2.deriveDammTokenVault)(baseMint, dammPool, dammProgramId);
|
|
75
|
+
const [dammTokenBVault] = (0, pdas_2.deriveDammTokenVault)(quoteMint, dammPool, dammProgramId);
|
|
76
|
+
const [dammPosition] = (0, pdas_2.deriveDammPosition)(positionNftMint, dammProgramId);
|
|
77
|
+
const [positionNftAccount] = (0, pdas_2.deriveDammPositionNftAccount)(positionNftMint, dammProgramId);
|
|
78
|
+
const [dammEventAuthority] = (0, pdas_2.deriveDammEventAuthority)(dammProgramId);
|
|
79
|
+
// --- Futarchy + Squads PDAs ---
|
|
80
|
+
const [dao] = (0, pdas_2.deriveDaoPda)(daoName, futarchyProgramId);
|
|
81
|
+
const [moderator] = (0, pdas_2.deriveModeratorPda)(daoName, futarchyProgramId);
|
|
82
|
+
const [mintCreateKey] = (0, pdas_2.deriveMintCreateKeyPda)(dao, daoName, futarchyProgramId);
|
|
83
|
+
const [treasuryMultisig] = (0, pdas_2.deriveSquadsMultisig)(dao, squadsProgramId);
|
|
84
|
+
const [mintMultisig] = (0, pdas_2.deriveSquadsMultisig)(mintCreateKey, squadsProgramId);
|
|
85
|
+
const [daoTreasury] = (0, pdas_2.deriveSquadsVault)(treasuryMultisig, 0, squadsProgramId);
|
|
86
|
+
const [programConfig] = (0, pdas_2.deriveSquadsProgramConfig)(squadsProgramId);
|
|
87
|
+
// --- RPC fetch: squads program config treasury ---
|
|
88
|
+
const futarchyProgramConfigTreasury = await resolveSquadsProgramConfigTreasury(connection, programConfig);
|
|
89
|
+
// --- DAO treasury ATA ---
|
|
90
|
+
const daoTreasuryQuoteAta = (0, spl_token_1.getAssociatedTokenAddressSync)(quoteMint, daoTreasury, true);
|
|
91
|
+
// --- Metaplex ---
|
|
92
|
+
const [metadata] = (0, pdas_2.deriveMetadataPda)(baseMint, metaplexProgramId);
|
|
93
|
+
// --- Build instruction ---
|
|
94
|
+
const methods = launchpadProgram.methods;
|
|
95
|
+
const ix = await methods.executeLaunch({
|
|
96
|
+
poolActivationTime,
|
|
97
|
+
daoName,
|
|
98
|
+
treasuryCosigner,
|
|
99
|
+
})
|
|
100
|
+
.accounts({
|
|
101
|
+
admin,
|
|
102
|
+
launchConfig,
|
|
103
|
+
launchpadSigner,
|
|
104
|
+
baseMint,
|
|
105
|
+
quoteMint,
|
|
106
|
+
launchpadTokenVault,
|
|
107
|
+
launchpadFundsVault,
|
|
108
|
+
adminTokenAta,
|
|
109
|
+
fundraiseState,
|
|
110
|
+
tgeConfig,
|
|
111
|
+
vaultAta,
|
|
112
|
+
vaultProgram: vaultProgramId,
|
|
113
|
+
positionNftMint,
|
|
114
|
+
positionNftAccount,
|
|
115
|
+
dammPoolAuthority,
|
|
116
|
+
dammPool,
|
|
117
|
+
dammPosition,
|
|
118
|
+
dammTokenAVault,
|
|
119
|
+
dammTokenBVault,
|
|
120
|
+
dammEventAuthority,
|
|
121
|
+
dammProgram: dammProgramId,
|
|
122
|
+
dao,
|
|
123
|
+
moderator,
|
|
124
|
+
futarchyProgramConfig: programConfig,
|
|
125
|
+
futarchyProgramConfigTreasury,
|
|
126
|
+
treasuryMultisig,
|
|
127
|
+
mintMultisig,
|
|
128
|
+
mintCreateKey,
|
|
129
|
+
squadsProgram: squadsProgramId,
|
|
130
|
+
futarchyProgram: futarchyProgramId,
|
|
131
|
+
newDaoAdmin,
|
|
132
|
+
daoTreasury,
|
|
133
|
+
daoTreasuryQuoteAta,
|
|
134
|
+
metadata,
|
|
135
|
+
metadataProgram: metaplexProgramId,
|
|
136
|
+
tokenProgram: tokenProgramId,
|
|
137
|
+
token2022Program: constants_2.TOKEN_2022_PROGRAM_ID,
|
|
138
|
+
associatedTokenProgram: spl_token_1.ASSOCIATED_TOKEN_PROGRAM_ID,
|
|
139
|
+
systemProgram: web3_js_1.SystemProgram.programId,
|
|
140
|
+
})
|
|
141
|
+
.instruction();
|
|
142
|
+
// --- Assemble transaction ---
|
|
143
|
+
const tx = new web3_js_1.Transaction();
|
|
144
|
+
if (computeUnits) {
|
|
145
|
+
tx.add(web3_js_1.ComputeBudgetProgram.setComputeUnitLimit({ units: computeUnits }));
|
|
146
|
+
}
|
|
147
|
+
if (priorityFee) {
|
|
148
|
+
tx.add(web3_js_1.ComputeBudgetProgram.setComputeUnitPrice({ microLamports: priorityFee }));
|
|
149
|
+
}
|
|
150
|
+
tx.add(ix);
|
|
151
|
+
tx.feePayer = feePayer ?? admin;
|
|
152
|
+
const { blockhash, lastValidBlockHeight } = await connection.getLatestBlockhash('confirmed');
|
|
153
|
+
tx.recentBlockhash = blockhash;
|
|
154
|
+
tx.lastValidBlockHeight = lastValidBlockHeight;
|
|
155
|
+
// Return all resolved accounts so the caller can build an ALT
|
|
156
|
+
const accounts = {
|
|
157
|
+
admin,
|
|
158
|
+
launchConfig,
|
|
159
|
+
launchpadSigner,
|
|
160
|
+
baseMint,
|
|
161
|
+
quoteMint,
|
|
162
|
+
launchpadTokenVault,
|
|
163
|
+
launchpadFundsVault,
|
|
164
|
+
adminTokenAta,
|
|
165
|
+
fundraiseState,
|
|
166
|
+
tgeConfig,
|
|
167
|
+
vaultAta,
|
|
168
|
+
positionNftMint,
|
|
169
|
+
positionNftAccount,
|
|
170
|
+
dammPoolAuthority,
|
|
171
|
+
dammPool,
|
|
172
|
+
dammPosition,
|
|
173
|
+
dammTokenAVault,
|
|
174
|
+
dammTokenBVault,
|
|
175
|
+
dammEventAuthority,
|
|
176
|
+
dao,
|
|
177
|
+
moderator,
|
|
178
|
+
programConfig,
|
|
179
|
+
futarchyProgramConfigTreasury,
|
|
180
|
+
treasuryMultisig,
|
|
181
|
+
mintMultisig,
|
|
182
|
+
mintCreateKey,
|
|
183
|
+
newDaoAdmin,
|
|
184
|
+
daoTreasury,
|
|
185
|
+
daoTreasuryQuoteAta,
|
|
186
|
+
metadata,
|
|
187
|
+
};
|
|
188
|
+
return { tx, accounts };
|
|
189
|
+
}
|
|
190
|
+
//# sourceMappingURL=execute-launch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execute-launch.js","sourceRoot":"","sources":["../../src/instructions/execute-launch.ts"],"names":[],"mappings":";;AA2FA,oDAsLC;AAhRD,iDAI2B;AAC3B,6CAOyB;AAEzB,yCAA0D;AAE1D,+CAA0E;AAC1E,2CAIqB;AACrB,iCAegB;AAQhB,+EAA+E;AAC/E,qCAAqC;AACrC,+EAA+E;AAE/E;;;;;GAKG;AACH,KAAK,UAAU,kCAAkC,CAC/C,UAAsB,EACtB,aAAwB;IAExB,MAAM,IAAI,GAAG,MAAM,UAAU,CAAC,cAAc,CAAC,aAAa,CAAC,CAAC;IAC5D,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,EAAE,EAAE,CAAC;QACnC,MAAM,IAAI,KAAK,CACb,mDAAmD,aAAa,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;QACR,eAAe;QACf,kBAAkB;QAClB,iBAAiB;QACjB,QAAQ;QACR,YAAY;QACZ,eAAe;QACf,eAAe;QACf,kBAAkB;QAClB,GAAG;QACH,SAAS;QACT,aAAa;QACb,6BAA6B;QAC7B,gBAAgB;QAChB,YAAY;QACZ,aAAa;QACb,WAAW;QACX,WAAW;QACX,mBAAmB;QACnB,QAAQ;KACT,CAAC;IAEF,OAAO,EAAE,EAAE,EAAE,QAAQ,EAAE,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { buildCancelLaunchTx } from './cancel-launch';
|
|
2
|
+
export { buildConfigureLaunchTx } from './configure-launch';
|
|
3
|
+
export { buildCreateLaunchTokenTx } from './create-launch-token';
|
|
4
|
+
export { buildExecuteLaunchTx, type ExecuteLaunchAccountsResolved } from './execute-launch';
|
|
5
|
+
export { buildInitializeLaunchTx } from './initialize-launch';
|
|
6
|
+
export { deriveDammEventAuthority, deriveDammPoolAuthority, deriveDammPosition, deriveDammPositionNftAccount, deriveDammTokenVault, deriveDaoPda, deriveMetadataPda, deriveMintCreateKeyPda, deriveModeratorPda, derivePositionNftMintPda, deriveSquadsMultisig, deriveSquadsProgramConfig, deriveSquadsVault, deriveTgeConfigPda, deriveVaultPda } from './pdas';
|
|
7
|
+
export { METAPLEX_PROGRAM_ID, SQUADS_PROGRAM_ID, TOKEN_2022_PROGRAM_ID } from './constants';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/instructions/index.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,KAAK,6BAA6B,EAAE,MAAM,kBAAkB,CAAC;AAC5F,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAG9D,OAAO,EACH,wBAAwB,EAExB,uBAAuB,EAAE,kBAAkB,EAC3C,4BAA4B,EAAE,oBAAoB,EAElD,YAAY,EAEZ,iBAAiB,EAAE,sBAAsB,EAAE,kBAAkB,EAE7D,wBAAwB,EAExB,oBAAoB,EAAE,yBAAyB,EAAE,iBAAiB,EAAE,kBAAkB,EAEtF,cAAc,EACjB,MAAM,QAAQ,CAAC;AAGhB,OAAO,EACH,mBAAmB,EAAE,iBAAiB,EAAE,qBAAqB,EAChE,MAAM,aAAa,CAAC"}
|