The deployment script mines for BEFORE_INITIALIZE_FLAG but the contract implements afterInitialize, causing deployment to fail or produce an unusable hook.
Location: script/deployLaunchHook.s.sol:28
Location: src/TokenLaunchHook.sol:94-111
Likelihood:
This occurs on every deployment using the provided script
The script is the only deployment mechanism provided in the repository
No validation exists to catch this mismatch during deployment
Impact:
Deployed hook address will have BEFORE_INITIALIZE permission bit set
PoolManager will NOT call afterInitialize (wrong flag in address)
launchStartBlock and initialLiquidity will never be set (remain 0)
All swaps will revert with PoolNotInitialized() error
Contract is completely non-functional after deployment
The deployment script mines for a hook address with BEFORE_INITIALIZE_FLAG set, but the contract's getHookPermissions() declares afterInitialize: true. When PoolManager validates the hook, it checks that the address bits match the declared permissions. This mismatch causes the hook to malfunction.
Fix the deployment script:
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.
The contest is complete and the rewards are being distributed.