Add OnlyHooksHook hook on ethereum#666
Open
hooklist-generator[bot] wants to merge 1 commit into
Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
Review: hooks/ethereum/0x903633d861ab705dc6a2ef91b478b9cab00f4044.json
Address Flags
Address 0x903633d861ab705dc6a2ef91b478b9cab00f4044 → last 14 bits = 0x0044 = 68 = 0b01000100:
| Bit | Flag | Expected | Hook File |
|---|---|---|---|
| 6 | afterSwap | true | true ✓ |
| 2 | afterSwapReturnsDelta | true | true ✓ |
| all others | — | false | false ✓ |
Confirmed by getHookPermissions() in source: p.afterSwap = true; p.afterSwapReturnDelta = true.
Properties
- dynamicFee: false — No
beforeSwaphook, nolpFeeOverride, noupdateDynamicLPFee()call. ✓ - upgradeable: false — No proxy pattern, no
delegatecall, no mutable implementation storage, noSELFDESTRUCT. ✓ - requiresCustomSwapData: false —
_trader()decodes hookData only iflength >= 32and address is non-zero; otherwise falls back totx.origin. Empty hookData never causes a revert. ✓ - vanillaSwap: false —
afterSwapReturnsDeltais true and the hook takes a fee from the output currency viapoolManager.take()+ positive return delta, materially altering swap output. Correctly false. ✓ - swapAccess: "none" — No
beforeSwapflag;afterSwapcontains no access control gating. ✓
Metadata
- chainId: 1 matches
ethereuminchains.json. ✓ - verifiedSource: true confirmed by
source_meta.json. ✓ - name: "OnlyHooksHook" matches the Solidity contract name exactly. ✓
- description accurately describes all key behaviors: 1% default fee (
hookFeeBps = 100, BPS = 10,000) on the unspecified (output) token viaafterSwapReturnsDelta; 50% protocol cut to treasury (protocolShareBps = 5000); creator half split evenly amongactiveBeneficiariesfromSubscriptionRegistry; unsubscribed traders route full creator share to treasury; trader identity decoded from hookData or falls back totx.origin; empty hookData never reverts. No promotional, audit, safety, or affiliation language. ✓
All checks pass.
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
Takes a fee (default 1%) on the output token of every swap via afterSwapReturnsDelta, routing 50% to the treasury and 50% split evenly among the trader's active creator beneficiaries per SubscriptionRegistry. Unsubscribed traders send the full creator share to treasury. Trader identity is decoded from hookData if present, otherwise falls back to tx.origin; empty hookData never reverts.
Flags
Properties
Warnings
Closes #665