Hooks
Every hook SuperHooks writes for you is saved to your workspace. You see it as a card in the chat and on the Hooks page.
The hook card
| Part | What it tells you |
|---|---|
| Name and version | The Solidity contract name. Each time the hook is changed the version goes up. |
| Compile badge | Compiling, Compiles, or the number of compiler errors. |
| Setup summary | The hook's rules and the pool planned for it. See below. |
| Permissions | The callbacks the hook uses. See Hooks. |
| Deployments | Each address the hook was deployed to, with an explorer link. A deployment made from an older version is marked outdated. |
| View code | Opens the full source, with a Copy button. |
Setup summary
Every hook card opens with a setup summary, so you can check the configuration without reading Solidity.
| Column | Shows |
|---|---|
| Hook | Each rule the hook enforces and what it is set to, for example "Swap fee: 1% to your wallet" or "Buy cap: 0.5 ETH per swap, first hour". Also the owner and how many of the 14 permissions the hook uses. |
| Pool | The pool the hook was written for: pair, LP fee, tick spacing and starting price. Anything not decided yet says "Not set yet". |
The summary is written by SuperHooks when it saves the hook. It is a description, not a guarantee: the Solidity under View code is what actually runs. If the two disagree, tell SuperHooks and treat the code as the truth.
Once the hook is deployed, a Prepare pool button appears. It asks SuperHooks to prepare the planned pool, and SuperHooks asks you for anything still missing, usually your token's address or the starting price.
Compiling
The hook compiles in your browser the moment the card appears. Nothing is sent to a server.
- Compiler: solc 0.8.26, EVM version cancun, optimizer on.
- If the contract is too complex for the default pipeline, the app retries with the IR pipeline automatically.
If there are errors, the card shows them and a Fix with SuperHooks button. Pressing it sends the errors to the chat, and the hook is rewritten as a new version.
Deploying
Deploy is enabled once the hook compiles and your wallet is connected.
- Your wallet is switched to Robinhood Chain.
- The app finds a hook address that matches the permissions. See Hook addresses.
- The deployment is simulated. If it would revert, you get an explanation and no transaction is sent.
- You confirm one transaction.
- The address is saved to your workspace and shown on the card.
Constructor arguments
The app fills in the constructor for you:
constructor(IPoolManager): gets Robinhood Chain's PoolManager.constructor(IPoolManager, address): gets the PoolManager and your wallet address, which becomes the hook's owner.
Other constructor shapes are not supported. SuperHooks writes hooks in one of these two forms.
Changing a deployed hook
Contracts cannot be edited after deployment. If you change a hook, deploy the new version. It will have a new address, and a pool created with the old address keeps using the old code. To use the new version you need a new pool.
Deleting
The trash icon on the Hooks page removes the hook from your workspace. Contracts that were already deployed stay on-chain.