Add FWATokenHook hook on ethereum#1116
Merged
marktoda merged 1 commit intoJul 21, 2026
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
Review: hooks/ethereum/0x2c67eba8a50af0db5fba55f725247a75cbda6444.json
Address Flags
Address 0x2c67eba8a50af0db5fba55f725247a75cbda6444 — last 2 bytes 0x6444 = 0b0110_0100_0100_0100.
Decoding bits 13–0:
| Bit | Flag | Expected | JSON |
|---|---|---|---|
| 13 | beforeInitialize | 1 | true ✓ |
| 12 | afterInitialize | 0 | false ✓ |
| 11 | beforeAddLiquidity | 0 | false ✓ |
| 10 | afterAddLiquidity | 1 | true ✓ |
| 9 | beforeRemoveLiquidity | 0 | false ✓ |
| 8 | afterRemoveLiquidity | 0 | false ✓ |
| 7 | beforeSwap | 0 | false ✓ |
| 6 | afterSwap | 1 | true ✓ |
| 5 | beforeDonate | 0 | false ✓ |
| 4 | afterDonate | 0 | false ✓ |
| 3 | beforeSwapReturnsDelta | 0 | false ✓ |
| 2 | afterSwapReturnsDelta | 1 | true ✓ |
| 1 | afterAddLiquidityReturnsDelta | 0 | false ✓ |
| 0 | afterRemoveLiquidityReturnsDelta | 0 | false ✓ |
getHookPermissions() in the verified source confirms identical values.
Properties
- dynamicFee: false — No
updateDynamicLPFee()call. NobeforeSwapflag. Fee is a fixed 1% (FEE_BIPS = 100 / TOTAL_BIPS = 10_000). ✓ - upgradeable: false — No proxy pattern, no
delegatecall, no mutable implementation slot, noSELFDESTRUCT.source_meta.jsonconfirmsproxy: false. ✓ - requiresCustomSwapData: false —
_afterSwapignoreshookDataentirely; swaps execute correctly with empty calldata. ✓ - vanillaSwap: false — Correct.
afterSwapReturnsDeltais true and the hook executes a nested pool swap inside_handleBuy(poolManager.swap(...)in_swapTokenToEth), which modifies how the swap executes. ✓ - swapAccess: "governance" — Buy-side access control in
_afterSwapgates onexternalBuysEnabled, a boolean toggled by the owner viasetExternalBuysEnabled(). This is governance gating. ✓
Metadata
- chainId: 1 — Matches
ethereuminchains.json. ✓ - name: "FWATokenHook" — Matches
ContractNamefrom Etherscan (source_meta.json) and the NatSpec@titlein source. No promotional/audit language. ✓ - verifiedSource: true —
source_meta.jsonconfirmsverified: true. ✓ - description — Accurately reflects the source: flat 1% fee in both directions, buy fees taken in FWAToken and swapped to ETH, sell fees taken in ETH, pool init gated on
launching(), buy-side revert viaExternalBuysDisableduntil owner enables external trading. All claims substantiated by the Solidity logic. ✓
Verdict
All flags, properties, and metadata are correct and consistent with the on-chain verified source.
marktoda
approved these changes
Jul 21, 2026
marktoda
left a comment
Contributor
There was a problem hiding this comment.
Bot review verified. FWATokenHook (ethereum). Flags: beforeInitialize, afterAddLiquidity, afterSwap, afterSwapReturnsDelta. LGTM.
marktoda
deleted the
hooks/ethereum/0x2c67eba8a50af0db5fba55f725247a75cbda6444
branch
July 21, 2026 16:24
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ETH/FWAToken pool hook that charges a flat 1% fee on all swaps, routing proceeds to an owner-set fee wallet (buys: fee taken in FWAToken and swapped to ETH; sells: fee taken in ETH). Pool initialization is gated on the token's
launching()flag; buy-side swaps revert for unauthorized callers until the owner enables external trading viaexternalBuysEnabled.Flags
Properties
Warnings
Closes #1111