File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -142,6 +142,21 @@ contract UniswapHook is BaseHook {
142
142
}
143
143
144
144
function getHookPermissions () public pure override returns (Hooks.Permissions memory ) {
145
+ /**
146
+ * @dev Hook Permissions without overrides:
147
+ * - beforeInitialize, beforeDoate, beforeAddLiquidity
148
+ * We use BaseHook's original reverts to *intentionally* revert
149
+ *
150
+ * beforeInitialize: the hook reverts for initializations NOT going through EulerSwap.activateHook()
151
+ * we want to prevent users from initializing other pairs with the same hook address
152
+ *
153
+ * beforeDonate: because the hook does not support native concentrated liquidity, any
154
+ * donations are permanently irrecoverable. The hook reverts on beforeDonate to prevent accidental misusage
155
+ *
156
+ * beforeAddLiquidity: the hook reverts to prevent v3-CLAMM positions
157
+ * because the hook is a "custom curve", any concentrated liquidity position sits idle and entirely unused
158
+ * to protect users from accidentally creating non-productive positions, the hook reverts on beforeAddLiquidity
159
+ */
145
160
return Hooks.Permissions ({
146
161
beforeInitialize: true ,
147
162
afterInitialize: false ,
You can’t perform that action at this time.
0 commit comments