Skip to content
Docs

Reference

Program

The Plinth program's address, accounts, instructions, events and error codes.

Address

G9kuqsqDRbrr9vt1Q7Ub7CkscKPpEjt9aaYPaLBQLJDF

The app's footer and every token page's Launch terms show the program it is connected to.

Accounts

Every account a launch uses is a program-derived address:

AccountSeedsHolds
Launch"launch", creator, nonce (u64, little-endian)Settings, sale state, the token's name and ticker
Token mint"mint", launchThe launch token: 6 decimals, minted only by the launch, no freeze authority
Treasury vault"vault", launchThe treasury's USDC, owned by the launch
Receipt"receipt", launch, actor, request (16 bytes)A permanent record of one operation
Protocol"protocol"No data. Owns the protocol's USDC account, its associated token account, which receives the protocol share of every purchase
Fund shares"shares", launchThe treasury's test fund shares, on the local test network

Instructions

InstructionSigned byArguments
create_launchthe creatornonce, name, symbol, team wallet, price, end price, allocation, opens, closes, team share, redemption fee, yield share
buythe buyerrequest, tokens, maximum cost, deadline. Pays the protocol share, then the team share, then the treasury
redeemthe holderrequest, tokens, minimum payout, deadline
follow_onthe creatorrequest, price, end price, allocation, opens, closes, deadline
donate_yieldanyonerequest, USDC amount, deadline
rebalance_localanyonerequest, deadline. Local test network only.

Prices are USDC atoms per whole token. Shares and fees are basis points: 10,000 is 100%.

Events

LaunchCreated records a new launch, its creator, its mint and its quote mint.

OperationConfirmed records each operation with its receipt fields:

Field
operation1 buy, 2 redeem, 3 follow-on, 4 yield, 5 rebalance
token_atoms, quote_atomsthe amounts moved
team_atomsthe team's part
fee_atomson a purchase, the 1% protocol share; on a redemption, the fee kept in the treasury
treasury_after, supply_afterthe treasury and supply once it ran

Error codes

CodeNameWhat it means
6000InvalidConfigurationA launch or sale setting is outside what the program accepts.
6001InvalidQuoteMintThe launch is not priced in USDC.
6002ArithmeticOverflowAn amount is too large for the program's arithmetic.
6003ZeroSupplyThe launch has no tokens in circulation.
6004InvalidAmountThe amount is zero.
6005ClosedLaunchThe launch has closed, or has no tokens in circulation.
6006SaleInactiveThe sale has not opened or has ended.
6007AllocationExceededThe purchase is larger than what the sale has left.
6008SlippageExceededThe cost rose above the maximum, or the payout fell below the minimum.
6009FloorDilutionThe purchase or follow-on price would lower the floor.
6010InsufficientTokensThe holder holds fewer tokens than the redemption burns.
6011SaleStillActiveA follow-on cannot open while the current sale is selling.
6012ExpiredTransactionThe deadline has passed, or is more than five minutes away.
6013LocalnetOnlyThe instruction runs only on the local test network.
6014InvalidLocalFundThe fund position does not match the launch.
6015InsufficientLiquidityThe buffer and fund cannot cover the redemption in this transaction.

The app turns these into plain sentences in the transaction panel.