From eaabe37bf0834323931cae384f5f87fc9347f6c2 Mon Sep 17 00:00:00 2001 From: Junion <69495294+Jun1on@users.noreply.github.com> Date: Wed, 26 Jun 2024 15:33:36 -0400 Subject: [PATCH] update implementations --- contracts/middleware/BaseMiddleware.sol | 5 +++-- .../implementation/BaseMiddlewareImplementation.sol | 5 +---- .../shared/implementation/FeeTakingLiteImplementation.sol | 8 ++------ 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/contracts/middleware/BaseMiddleware.sol b/contracts/middleware/BaseMiddleware.sol index ce7bbe68..ce4a7004 100644 --- a/contracts/middleware/BaseMiddleware.sol +++ b/contracts/middleware/BaseMiddleware.sol @@ -26,6 +26,7 @@ contract BaseMiddleware is Proxy { } // yo how do i remove this warning - // receive() external payable { - // } + receive() external payable { + _delegate(_implementation()); + } } diff --git a/test/shared/implementation/BaseMiddlewareImplementation.sol b/test/shared/implementation/BaseMiddlewareImplementation.sol index db954fc6..fcabbd48 100644 --- a/test/shared/implementation/BaseMiddlewareImplementation.sol +++ b/test/shared/implementation/BaseMiddlewareImplementation.sol @@ -11,9 +11,6 @@ contract BaseMiddlewareImplementation is BaseMiddleware { constructor(IPoolManager _poolManager, address _implementation, BaseMiddleware addressToEtch) BaseMiddleware(_poolManager, _implementation) { - //Hooks.validateHookPermissions(addressToEtch, getHookPermissions()); + Hooks.validateHookPermissions(IHooks(address(addressToEtch)), BaseHook(_implementation).getHookPermissions()); } - - // make this a no-op in testing - //function validateHookAddress(BaseHook _this) internal pure override {} } diff --git a/test/shared/implementation/FeeTakingLiteImplementation.sol b/test/shared/implementation/FeeTakingLiteImplementation.sol index 346b3099..a9145bc7 100644 --- a/test/shared/implementation/FeeTakingLiteImplementation.sol +++ b/test/shared/implementation/FeeTakingLiteImplementation.sol @@ -5,12 +5,8 @@ import {BaseHook} from "../../../contracts/BaseHook.sol"; import {FeeTakingLite} from "../../middleware/FeeTakingLite.sol"; import {IPoolManager} from "@uniswap/v4-core/src/interfaces/IPoolManager.sol"; import {Hooks} from "@uniswap/v4-core/src/libraries/Hooks.sol"; +import {IHooks} from "@uniswap/v4-core/src/interfaces/IHooks.sol"; contract FeeTakingLiteImplementation is FeeTakingLite { - constructor(IPoolManager _poolManager, FeeTakingLite addressToEtch) FeeTakingLite(_poolManager) { - //Hooks.validateHookPermissions(addressToEtch, getHookPermissions()); - } - - // make this a no-op in testing - //function validateHookAddress(BaseHook _this) internal pure override {} + constructor(IPoolManager _poolManager, FeeTakingLite addressToEtch) FeeTakingLite(_poolManager) {} }