Creating a platform
Creating a platform
import {
TxVersion,
LAUNCHPAD_PROGRAM,
DEVNET_PROGRAM_ID,
} from '@raydium-io/raydium-sdk-v2'
import { initSdk } from './config'
import { PublicKey } from '@solana/web3.js'
import BN from 'bn.js'
const createPlatform = async () => {
const raydium = await initSdk()
const owner = raydium.ownerPubKey
const { execute, extInfo } = await raydium.launchpad.createPlatformConfig({
programId: LAUNCHPAD_PROGRAM, // Use DEVNET_PROGRAM_ID.LAUNCHPAD_PROGRAM for devnet
// Wallet configuration
platformAdmin: owner,
platformClaimFeeWallet: owner,
platformLockNftWallet: owner,
platformVestingWallet: owner,
// CPMM pool fee tier for migrated pools
cpConfigId: new PublicKey('DNXgeM9EiiaAbaWvwjHj9fQQLAX5ZsfHyvmYUNRAdNC8'),
// Token-2022 transfer fee authority (receives fee authorities post-migration)
transferFeeExtensionAuth: owner,
// Fee configuration
feeRate: new BN(10000), // 1% platform fee on bonding curve trades
creatorFeeRate: new BN(5000), // 0.5% creator fee on bonding curve trades
// LP distribution at migration (must sum to 1,000,000)
migrateCpLockNftScale: {
platformScale: new BN(100000), // 10% to platform (locked)
creatorScale: new BN(100000), // 10% to creator (locked)
burnScale: new BN(800000), // 80% burned
},
// Platform metadata
name: 'My LaunchLab',
web: 'https://mylaunchlab.io',
img: 'https://mylaunchlab.io/logo.png',
txVersion: TxVersion.V0,
})
const { txId } = await execute({ sendAndConfirm: true })
console.log('Platform created:', extInfo.platformId.toBase58())
}Configuration parameters
Wallet configuration
Parameter
Type
Description
Fee configuration
Parameter
Type
Description
LP distribution at migration
Parameter
Type
Description
Pool configuration
Parameter
Type
Description
Metadata
Parameter
Type
Description
Updating platform configuration
Available update types
Type
Value
Description
Enforcing launch parameters (optional)
How parameter enforcement works
Deriving your platform ID
Last updated
Was this helpful?