Skip to main content

Constants & Program IDs

All constants are exported from @runner-protocol/sdk and match the on-chain Rust constant definitions exactly.

Program IDs

import { PublicKey } from "@solana/web3.js";

// CCA V2 Auction Engine
export const CCA_V2_PROGRAM_ID = new PublicKey(
"F5DdorN9nawhpQJZkfLYx2SpcWxSTZnwh3ZRyNtXP5do"
);

// Launchpad Orchestrator
export const LAUNCHPAD_PROGRAM_ID = new PublicKey(
"8zfW4iLA7JagfotwCn8FT3SpdzUyGQ7CRSzjMwmJyK6F"
);

// SPL Token Program
export const TOKEN_PROGRAM_ID = new PublicKey(
"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
);

// Token-2022 Program (used by launched tokens)
export const TOKEN_2022_PROGRAM_ID = new PublicKey(
"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"
);

// Associated Token Account Program
export const ASSOCIATED_TOKEN_PROGRAM_ID = new PublicKey(
"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
);

CCA V2 PDA Seed Buffers

These seeds are used to derive Program Derived Addresses for CCA V2 accounts. They match the constants in packages/v2/programs/cca-v2/src/constants.rs.

export const SEED_AUCTION_CONFIG  = Buffer.from("cca_auction");
export const SEED_AUCTION_STATE = Buffer.from("cca_state");
export const SEED_SUPPLY_SCHEDULE = Buffer.from("cca_supply");
export const SEED_TICK = Buffer.from("cca_tick");
export const SEED_CHECKPOINT = Buffer.from("cca_checkpoint");
export const SEED_BID = Buffer.from("cca_bid");
export const SEED_QUOTE_VAULT = Buffer.from("cca_quote_vault");
export const SEED_BASE_VAULT = Buffer.from("cca_base_vault");
export const SEED_VAULT_AUTHORITY = Buffer.from("cca_vault_auth");
caution

All CCA V2 PDA seeds use the cca_ prefix. This is a common source of bugs -- do not omit the prefix when deriving addresses manually.

Launchpad PDA Seed Buffers

These seeds derive Launchpad program accounts. They match packages/launchpad/programs/launchpad/src/constants.rs.

export const SEED_PROTOCOL_CONFIG = Buffer.from("cca_protocol");
export const SEED_LAUNCH_CONFIG = Buffer.from("cca_launch");
export const SEED_TOKEN_MINT = Buffer.from("cca_token_mint");
export const SEED_MINT_AUTH = Buffer.from("cca_mint_auth");
export const SEED_LAUNCH_AUTH = Buffer.from("cca_launch_auth");
export const SEED_ESCROW = Buffer.from("escrow");

Escrow Type Buffers

Used as the third seed component when deriving escrow PDAs via findEscrowPda:

export const ESCROW_AUCTION  = Buffer.from("auction");
export const ESCROW_LP = Buffer.from("lp");
export const ESCROW_TEAM = Buffer.from("team");
export const ESCROW_PROCEEDS = Buffer.from("proceeds");
export const ESCROW_FEE = Buffer.from("fee");

Instruction Discriminators

Precomputed Anchor discriminators for CCA V2 instructions. Each is the first 8 bytes of sha256("global:<snake_case_instruction_name>").

// sha256("global:place_bid")[..8]
export const DISCRIMINATOR_PLACE_BID = Buffer.from([
238, 77, 148, 91, 200, 151, 92, 146,
]);

// sha256("global:claim_tokens")[..8]
export const DISCRIMINATOR_CLAIM_TOKENS = Buffer.from([
108, 216, 210, 231, 0, 212, 42, 64,
]);

// sha256("global:exit_bid")[..8]
export const DISCRIMINATOR_EXIT_BID = Buffer.from([
146, 67, 26, 184, 83, 215, 78, 14,
]);

// sha256("global:exit_partially_filled_bid")[..8]
export const DISCRIMINATOR_EXIT_PARTIALLY_FILLED_BID = Buffer.from([
86, 66, 82, 227, 228, 7, 213, 147,
]);
tip

The instruction names are snake_case (e.g., place_bid, not placeBid). This matches Rust function naming conventions in the CCA V2 program.