hooksim
@c0llback
<>MaxSwapHook.sol
Solidity · ^0.8.24
getHookPermissions() — parsed live
beforeInitialize afterInitialize beforeAddLiquidity afterAddLiquidity beforeRemoveLiquidity afterRemoveLiquidity beforeSwap afterSwap beforeDonate afterDonate
scenario.config
00scenarios
01pool
02state
03swap
04constructor
simulation result
// awaiting simulation — configure a scenario and run

how it works. hooksim parses your hook's getHookPermissions() and guard requires, then models the swap with a constant-product approximation — entirely in your browser, no compiler, no node, no wallet. it estimates the verdict, amount out, price impact, gas and call trace in milliseconds.

what it doesn't do. it doesn't execute your Solidity — custom fee logic, BeforeSwapDelta, state reads and oracles aren't run, and v4's concentrated liquidity is approximated. use it to reason about control flow, permissions and guards fast — not as a substitute for a Foundry test when you need exact onchain numbers.

in-browser model1 hooks
Ln 52Solidity