03 · Build
Launch a pool
The order of calls, and the mistakes that revert.
Register before you initialize. The hook will reject a pool that was initialized first.
Stacked pool
attachHubon every module, from the wallet that deployed that module.createLaunchon every module, from the launch controller. The pool key uses the hub ashooks.hub.createMarket(key, modules)from that same controller. The array is the run order.PoolManager.initializefrom that same controller.- Add liquidity. For the floor hook, the sponsor calls
seedinstead, and approves the hook for both tokens. An empty sponsor is the controller.
Single hook
Leave the hub out. The pool key's hook is the module. Call createLaunch, then initialize, from the same wallet.
Band fee, milestone unlock, floor graduation, decay fee, calm fee, pioneer seats, dump weight, and drawdown fee set the pool fee themselves. Create those pools with the dynamic fee flag. A static fee is fine for a stack that does not include them.
Traders
Send swaps through TraderRouter. It puts the trader's address in the first word of the hook data. A lock length or a referrer goes in the next word. When a pool uses both, the lock is the first of those and the referrer is the second. The hooks ignore a trader address that comes from anyone other than the router you named.
NextIntegrateThe calls a launchpad makes, in the order the contracts expect.