Skip to main content

Module cpmm_creator_fee

Module cpmm_creator_fee 

Source
Expand description

CPMM creator-fee collection upgrade helpers. No RPC or account-existence check is required.

Structs§

AccountMeta
Describes a single account read or written by a program during instruction execution.
CreatorFeeSplit
Instruction
A directive for a single invocation of a Solana program.

Enums§

CollectionUpgradeError

Constants§

CREATOR_FEE_SHARE_DENOMINATOR

Functions§

derive_creator_fee_share
Canonical address, including when the PDA has not been created on-chain.
effective_creator_fee_share_rate
Use the existing PDA’s rate (including zero), otherwise the config’s rate. The caller must supply a validated PDA for the relevant creator/config pair.
split_creator_fee
Exact collection-time estimate: protocol share floors; all remaining dust goes to the creator. Apply independently to creator_fees_token_0 and _1. This does not mutate PoolState or infer a collection result from a shred transaction.
upgrade_creator_fee_collection_instruction
Append mandatory readonly accounts to a pre-upgrade collection call. The first 14 accounts (including all privileges) remain unchanged. Already-upgraded calls have their appended addresses and signer flags checked and are returned unchanged. Writable supersets are accepted. Errors leave the instruction unchanged. amm_config must be the pool’s config; this helper does not fetch PoolState.