Skip to content

Reading state and events

Read shared object fields and dynamic fields through Sui’s data APIs, and use events for history. The creation-time migration_witness(initializer) accessor reads an initializer’s venue witness; it is not a general shared-object reader.

Group Fields
Lifecycle and timing lifecycle, start_ms (zero until shared), duration_ms (after an early close, the time the sale ran), liquidity_window_ms, uncapped (starts_after_ms, access), hard_cap (starts_after_ms, closes_when_filled)
Progress raise_target, total_commitments, participants (wallets committed and not yet claimed), quote
Terms eligibility, token_allocation, participant_vesting, recipient_payouts, raise_payouts, fee_split, migration_witness (the venue’s witness type)
Blast protocol_fees, protocol_quote, protocol_tokens, partner_id, unpaid_protocol_quote
Custody sale_tokens, liquidity_tokens, recipient_tokens

The sale holds no pool tier. Read it from the VenueConfig (below) or the PoolTierReserved event.

A wallet’s commitment is a dynamic field on the presale’s ID. Its name type is blast_presale::CommitmentKey, a positional struct wrapping the wallet address; its value is a Commitment with quote and wallet_cap. The field is absent before the first commit and after the claim.

  • Is it open? lifecycle == Open and start_ms ≤ now < start_ms + duration_ms.
  • Is it full? It has a hard_cap, now ≥ start_ms + hard_cap.starts_after_ms, and total_commitments ≥ raise_target. Commits then abort with EPresaleFilled.
  • Can it settle early? It is full, as above, and hard_cap.closes_when_filled is true.
  • Fill rate? raise_target ÷ total_commitments, once commitments reach the target.
  • Has a wallet claimed? After Migrated or Cancelled, its commitment field is gone and a Claimed event names it.
  • What will a wallet get? Apply the claim formulas to token_allocation, total_commitments, raise_target, and the wallet’s quote.
  • Where is its vault? Read the VaultCreated event for its presale_id.
  • FeePolicy: destination, fees.
  • CreationPolicy: allowed_quotes, allowed_migration_witnesses; accepted partners are dynamic fields keyed by PartnerKey.
  • VenueConfig: each sale’s tier is a dynamic field named venue_config::PoolTierKey<Meme>, whose value is a venue_config::PoolTier with tick_spacing and pool_fee_rate. A Cetus sale’s reserved PoolCreationCap is a dynamic object field under cetus::CreationCapKey<Meme>.
  • Vault: presale_id and presale_cap_id (the zero ID for a vault created without a presale), pool_id, fee_split, protocol_fees, partner_id, held Blast fees, residuals, holder-reward balances, next_round, last_checkpoint.
  • Round: vault_id, number, claim_deadline_ms, root, leaf_count, meme, quote, claimed_bitmap (leaf i is bit i % 256 of word i / 256), treasury, gas_reserve. A present gas balance is pending; none means reimbursement was disabled or already settled. Use publication and settlement events to distinguish those outcomes.
  • Vesting<T>: balance, beneficiary, start_ms, cliff_ms, period_ms, periods, released.

Sale events carry <SaleToken, Quote>; vault and round events carry <Meme, Quote>. Filter by the full generic type or by the emitting module.

Step Event Use
Create venue_config::PoolTierReserved (Cetus and Bluefin), then PresaleCreated The pool tier (tick_spacing, pool_fee_rate), typed <Meme, Quote, Venue> with cetus::Venue or bluefin::Venue. Then every term, including uncapped and hard_cap, Blast’s snapshot, treasury_cap_id, presale_cap_id.
Share PresaleOpened start_ms, scheduled end_ms and liquidity_deadline_ms, uncapped_from_ms, hard_cap_from_ms (none without a hard cap), partner_id.
Rate change ProtocolFeesChanged New rates, Blast amounts, buyers’ token_allocation.
Commit Committed quote, wallet_commitment, total_commitments, participants. The wallet is the sender.
Settle PresaleFunded, PresaleCancelled Accepted and refundable Quote. PresaleFunded also carries the actual end_ms and liquidity_deadline_ms, earlier than PresaleOpened’s after an early close.
Migrate ProtocolFeesPaid, RaiseAllocated, RecipientAllocated, PresaleMigrated, VaultCreated Payouts with vesting_id, LP amounts, vault, pool, and position IDs. VaultCreated is typed <Meme, Quote, Venue>.
Partner pay PartnerPaid, ProtocolFeesPaid The partner’s cut.
Claim Claimed tokens, quote_refund, remaining_participants, vesting_id.
Collect FeesCollected, HolderMemePaid Gross, Blast’s part, each recipient’s amount, holder allocation; holder Meme paid to the governed treasury. Holder Quote remains available for rounds.
Vault partner pay ProtocolLpFeesPaid Partner and Blast amounts.
Lock a position VaultCreated A zero presale_id and zero residuals; pool, position, liquidity, fee split, Blast’s rates.
Residuals MigrationResidualsClaimed Amounts claimed.
Rounds RoundPublished, RewardClaimed, GasReserveSettled, RoundClosed Holder budgets, separate gas reserve, saved treasury, payouts, reimbursements, and returned balances.
Vesting VestingCreated, VestingClaimed Schedule terms and releases.