01 · Getting started
Quick start
Deploy, attach, register, then initialize. Do the last three in one transaction.
Five steps stand between you and a pool. The last three should happen together, so nobody else can register your pool key first.
- On Elysium mainnet the hub, the modules, TraderRouter, and TalosLaunch are already deployed. The addresses are on the Networks page. On any other chain, deploy them. Each hook address has to carry the permission flags for that contract.
script/00_DeployHooks.s.solmines those addresses. - Deploy TraderRouter against the same PoolManager. Traders should swap through it. It writes the real wallet into the swap data, so a cap or a budget sticks to the right person.
- On each hook, the deployer calls
attachHubonce, with the hub's address. - The launch controller calls
createLaunchon each hook. The pool key's hook field is the hub, not the individual hook. Then the same wallet callshub.createMarketwith the hooks in the order they should run. - That same wallet calls
initializeon the PoolManager, then adds liquidity.
Using one hook by itself
Skip the hub. Put that hook in the pool key, call createLaunch, then initialize. You do not call attachHub.
Once each module has called attachHub, TalosLaunch.open runs create, register, and initialize in one transaction.
The account that calls createLaunch has to be the account that initializes the pool. For a stacked market, that same account calls createMarket. TalosLaunch is that account for the pools it opens. Registration is first-come for a given pool key. The full call order, hook data layout, and gas notes are in the developer guide.
The hooks fit any EVM chain with Uniswap v4. The first launch is Elysium.