A launch
Configs and quote assets
Each launch picks a config by id and a quote asset by address. The config sets the supply and pool settings. The opening price comes from the config for native launches, and from the quote asset’s own settings for ERC-20 launches. Check that a quote asset is approved before offering it, and checkcanLaunch before
quoting a launch, since launching can be paused while whitelisted wallets can
still launch.
Reading the terms
Pinned terms
ReadpreviewLaunchEconomics right before launching and pass the result as
expectedEconomics. If the protocol changes the config or fee settings in
between, the launch reverts instead of going through on terms you didn’t quote.
Passing zero skips the check. The value is a hash of the supply, pool settings,
fee settings and opening tick. It’s computed differently from v2, so always read
it from the v3 factory. Don’t reuse a v2 value or build it yourself.
Deriving the pool id
Most hook functions take a pool id, and the factory doesn’t store it. Rebuild the pool key from the launch record and hash it. Currencies are sorted by address, and native ETH is the zero address, so it always comes first.From a token address to a pool id