Created
October 18, 2025 14:09
-
-
Save siexp/f2267ff0ee68884c5ec1ae8e38c28ddd to your computer and use it in GitHub Desktop.
Revisions
-
siexp created this gist
Oct 18, 2025 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,48 @@ export const createMint = async () => { const raydium = await initSdk() const programId = DEVNET_PROGRAM_ID.LAUNCHPAD_PROGRAM // devent: DEVNET_PROGRAM_ID.LAUNCHPAD_PROGRAM // тут можно переберать адреса пока не получите тот что нужен const pair = Keypair.generate() const mintA = pair.publicKey const configId = getPdaLaunchpadConfigId(programId, NATIVE_MINT, 0, 0).publicKey const configData = await raydium.connection.getAccountInfo(configId) if (!configData) throw new Error('config not found') const configInfo = LaunchpadConfig.decode(configData.data) const mintBInfo = await raydium.token.getTokenInfo(configInfo.mintB) const inAmount = new BN(1000) const { execute, transactions, extInfo } = await raydium.launchpad.createLaunchpad({ programId, mintA, decimals: 6, name: 'new launchpad mint', symbol: 'NLP', migrateType: 'amm', uri: // Вот это ссылка на json metadata https://developers.metaplex.com/token-metadata/token-standard#the-fungible-standard // пример https://raw.githubusercontent.com/solana-developers/program-examples/new-examples/tokens/tokens/.assets/spl-token.json configId, configInfo, mintBDecimals: mintBInfo.decimals, // default 9 platformId: new PublicKey('BBLa8QnHbN41pEJUzFdtdPKZTAiSmAssWpHYk7M7abUo'), txVersion: TxVersion.V0, slippage: new BN(100), // means 1% buyAmount: inAmount, createOnly: true, // true means create mint only, false will "create and buy together" // обязательно чтобы пара подписала эту транзу extraSigners: [pair], }) try { const sentInfo = await execute({ sequentially: true }) console.log('poolId: ', extInfo.swapInfo.amountB) console.log(sentInfo) } catch (e: any) { console.log(e) } }