Repository navigation
Add ReplicaWhitelistHook hook on ethereum - #10544
Merged
Ponx merged 1 commit intoOct 13, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Review: hooks/ethereum/0x0c3291d38f23042dab5a3f6c369488c77456c080.json
Address Flags
Address ends in 0xc080 → lower 14 bits = 0b00_0000_1000_0000 → bit 7 set.
| Flag | Expected | JSON |
|---|---|---|
| beforeSwap | true | true ✓ |
| all others | false | false ✓ |
Confirmed by getHookPermissions() in source.
Source Code Analysis
_beforeSwap checks tx.origin against an external ISwapWhitelist contract. Reverts with SwapperNotWhitelisted for non-whitelisted callers. Returns ZERO_DELTA and fee 0 — no swap modification.
Properties
- dynamicFee: false — returns fee
0, noupdateDynamicLPFee()orlpFeeOverride. ✓ - upgradeable: false —
swapWhitelistisimmutable; no proxy, no mutable implementation. ✓ - requiresCustomSwapData: false —
hookDataparameter is unused. ✓ - vanillaSwap: true —
beforeSwapis pure revert-based access control; swap execution is unmodified. ✓ - swapAccess: "allowlist" — gates on
ISwapWhitelist.isWhitelisted(tx.origin). ✓
Metadata
- name:
ReplicaWhitelistHookmatches contract name in source. ✓ - description: Accurately describes the access control logic,
tx.origincheck, and revert behavior. ✓ - verifiedSource: true — confirmed by
source_meta.json. ✓ - chainId: 1 — correct for Ethereum mainnet. ✓
All fields are correct. Approving.
Ponx
approved these changes
Oct 13, 2026
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
A Uniswap v4 hook that restricts swaps to whitelisted addresses. It checks
tx.originagainst an externalISwapWhitelistcontract inbeforeSwap, reverting withSwapperNotWhitelistedfor non-whitelisted callers. No modification to swap execution occurs beyond access control.Flags
Properties
Warnings
None
Closes #10543