读取状态与事件
当前 ABI:版本化源码 c96cd0d。示例使用已激活的 PACKAGE_VERSION 对象;历史非版本化地址需要不同 ABI。详见版本管理及部署参考。
通过 Sui 数据 API 读取共享对象字段及动态字段,使用事件查询历史。创建时的 migration_witness(initializer) 访问器读取初始化器的交易平台见证,不是通用共享对象读取器。
Presale 字段
跳转到“Presale 字段”| 类别 | 字段 |
|---|---|
| 生命周期与时间 | lifecycle、start_ms(共享前为零)、duration_ms(提前结束后为实际运行时长)、liquidity_window_ms、uncapped(starts_after_ms、access)、hard_cap(starts_after_ms、closes_when_filled) |
| 进度 | raise_target、total_commitments、participants(已认购且尚未领取的钱包数)、quote |
| 条款 | eligibility、token_allocation、participant_vesting、recipient_payouts、raise_payouts、fee_split、migration_witness(交易平台见证类型) |
| Blast | protocol_fees、protocol_quote、protocol_tokens、partner_id、unpaid_protocol_quote |
| 托管余额 | sale_tokens、liquidity_tokens、recipient_tokens |
预售本身不存储池档位,请从下述 VenueConfig 或 PoolTierReserved 事件读取。
钱包认购记录是预售 ID 上的动态字段,名称类型为 blast_presale::CommitmentKey(包装钱包地址的位置结构体),值为含 quote 和 wallet_cap 的 Commitment。首次认购前及领取后均不存在该字段。
常见查询
跳转到“常见查询”- 是否开放?
lifecycle == Open且start_ms ≤ now < start_ms + duration_ms。 - 是否募满? 存在
hard_cap,now ≥ start_ms + hard_cap.starts_after_ms,且total_commitments ≥ raise_target。此时认购以EPresaleFilled中止。 - 是否可提前结算? 已按上述条件募满,且
hard_cap.closes_when_filled为true。 - 成交比例? 认购达到目标后,为
raise_target ÷ total_commitments。 - 钱包是否领取? 在
Migrated或Cancelled后,其认购字段已删除,且存在指明该钱包的Claimed事件。 - 钱包将获得多少? 将
token_allocation、total_commitments、raise_target及该钱包的quote代入领取公式。 - 金库在哪里? 查找
presale_id对应的VaultCreated事件。
其他对象
跳转到“其他对象”blast_presale_package::PackageVersion:嵌套generation.generation为当前操作代数。发布先创建自有Bootstrap;只有package_admin::wrap激活后才共享可用的版本对象。升级提交与代数推进在同一笔交易完成;包 ID、published-at与操作代数不是同一个值。aftermath::FinalizeTicket<Meme, Quote>:仅在创建 PTB 内存在,new与初始化器一同返回;只能在同一笔交易中由 Aftermath 的finalize消耗,不会成为共享对象。aftermath::PoolCreation<Lp, Meme, Quote>:presale_id、create_pool_cap;迁移消耗该共享预留对象。FeePolicy:destination、fees。CreationPolicy:allowed_quotes、allowed_migration_witnesses;已接受的伙伴是以PartnerKey为键的动态字段。VenueConfig:每场预售档位是名为venue_config::PoolTierKey<Meme>的动态字段,值为含tick_spacing和pool_fee_rate的venue_config::PoolTier。Cetus 预售预留的PoolCreationCap是cetus::CreationCapKey<Meme>下的动态对象字段。Vault:presale_id和presale_cap_id(无预售金库使用零 ID)、pool_id、fee_split、protocol_fees、partner_id、暂存的 Blast 费用、剩余代币、持币奖励余额、next_round、last_checkpoint。Round:vault_id、number、claim_deadline_ms、root、leaf_count、meme、quote、claimed_bitmap(叶节点i对应字i / 256的第i % 256位)、treasury、gas_reserve。gas 余额存在表示待结算;none表示未启用补偿或已结算,通过发布及结算事件区分。Vesting<T>:balance、beneficiary、start_ms、cliff_ms、period_ms、periods、released。
事件
跳转到“事件”预售事件携带 <SaleToken, Quote>,金库及轮次事件携带 <Meme, Quote>。可按完整泛型类型或发出事件的模块过滤。
| 阶段 | 事件 | 用途 |
|---|---|---|
| 创建 | venue_config::PoolTierReserved(Cetus、Bluefin 和 Aftermath),然后 PresaleCreated |
池档位(tick_spacing、pool_fee_rate),类型为 <Meme, Quote, Venue>,其中 Venue 是 cetus::Venue、bluefin::Venue 或 aftermath::Venue;Aftermath 的 tick 间距为 0,费率以 DAO 费用基点记录。随后记录全部条款,包括 uncapped、hard_cap、Blast 快照、treasury_cap_id 和 presale_cap_id。 |
| 共享 | PresaleOpened |
start_ms、计划 end_ms 和 liquidity_deadline_ms、uncapped_from_ms、hard_cap_from_ms(无硬顶时为 none)、partner_id。 |
| 费率变更 | ProtocolFeesChanged |
新费率、Blast 金额、买家 token_allocation。 |
| 认购 | Committed |
quote、wallet_commitment、total_commitments、participants;钱包为交易发送者。 |
| 结算 | PresaleFunded、PresaleCancelled |
接受及可退还的 Quote。PresaleFunded 还携带实际 end_ms 和 liquidity_deadline_ms,提前结束时早于 PresaleOpened 中的时间。 |
| 迁移 | ProtocolFeesPaid、RaiseAllocated、RecipientAllocated、PresaleMigrated、VaultCreated |
带 vesting_id 的付款、LP 金额、金库、池和仓位 ID。VaultCreated 类型为 <Meme, Quote, Venue>。 |
| 合作伙伴付款 | PartnerPaid、ProtocolFeesPaid |
合作伙伴分成。 |
| 领取 | Claimed |
tokens、quote_refund、remaining_participants、vesting_id。 |
| 收取手续费 | FeesCollected、HolderMemePaid |
总额、Blast 部分、各接收方金额、持币奖励份额;持币奖励 Meme 付给治理财库,Quote 留供奖励轮次使用。 |
| 金库合作伙伴付款 | ProtocolLpFeesPaid |
合作伙伴及 Blast 金额。 |
| 锁定仓位 | VaultCreated |
零 presale_id、零迁移剩余代币;池、仓位、流动性、手续费分配及 Blast 费率。 |
| 剩余代币 | MigrationResidualsClaimed |
已领取金额。 |
| 奖励轮次 | RoundPublished、RewardClaimed、GasReserveSettled、RoundClosed |
持币奖励预算、独立 gas 预留、保存的财库地址、付款、补偿和退还余额。 |
| 分期解锁 | VestingCreated、VestingClaimed |
解锁条款及已释放金额。 |
Aftermath 与操作代数事件
跳转到“Aftermath 与操作代数事件”aftermath::PoolCreationReserved将预售 ID 绑定到预留对象和 LP 创建凭证。aftermath::DaoFeePoolCreated记录基础池、DAO 费用池、金库、OwnerCap 和 LP 币种。Aftermath 的VaultCreated.position_id指 OwnerCap,不是 Cetus/Bluefin 仓位。- 升级提交由共享 admin 包发出
OperationalVersionAdvanced<BLAST_PRESALE_PACKAGE>,携带container_id、package_id、previous_generation和new_generation。这是 admin 直接发出的事件,不属于 presale 模块,也不采用 launchpad 的事件封装。