In `DeployHookScript.sol`, the `flags` parameter is set to use `Hooks.BEFORE_SWAP_FLAG` and `Hooks.BEFORE_INITIALIZE_FLAG`.
However, TokenLaunchHook is meant to implement a before-swap & and an after-initialize
This will lead to a `HookAddressNotValid` revert on hook deployment, as the implemented functions do not match the flags specified.
The flags parameter used in hook deployment should be set with the hook functions the specific hook implements, specifically _afterInitialize and beforeSwap
The script however sets the flags to use beforeSwap and beforeInitialize, resulting in a revert on deployment as the flags do not match the hook implementation
Likelihood: High
This will cause a revert during hook initialization, preventing deployment and usage of the hook.
Impact: Medium
The hook cannot be deployed using the provided script until the flags are corrected
The below test deploys with the same logic as the script... resulting in a revert
Running forge script script/Vanguard/deployLaunchHook.s.sol on a local Anvil instance reproduces the revert
Correct the `flags` variable in `DeployHookScript.sol` to use `Hooks.AFTER_INITIALIZE_FLAG` instead of `Hooks.BEFORE_INITIALIZE_FLAG`.
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.