Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@
[submodule "lib/solady"]
path = lib/solady
url = https://github.com/vectorized/solady
[submodule "lib/multicaller"]
path = lib/multicaller
url = https://github.com/vectorized/multicaller
1 change: 1 addition & 0 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ via_ir = true
remappings = [
"bunni-v2=lib/bunni-v2",
"v4-core=lib/bunni-v2/lib/v4-core",
"multicaller=lib/multicaller",
]

[rpc_endpoints]
Expand Down
1 change: 1 addition & 0 deletions lib/multicaller
Submodule multicaller added at b7ef62
5 changes: 4 additions & 1 deletion src/FeeOverrideHooklet.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import { IBunniHub } from "bunni-v2/src/interfaces/IBunniHub.sol";
import { IBunniToken } from "bunni-v2/src/interfaces/IBunniToken.sol";
import { SWAP_FEE_BASE } from "bunni-v2/src/base/Constants.sol";

import { LibMulticaller } from "multicaller/src/LibMulticaller.sol";

import { PoolId, PoolIdLibrary } from "v4-core/src/types/PoolId.sol";
import { PoolKey } from "v4-core/src/types/PoolKey.sol";
import { IPoolManager } from "v4-core/src/interfaces/IPoolManager.sol";
Expand Down Expand Up @@ -56,8 +58,9 @@ contract FeeOverrideHooklet is IHooklet {

IBunniToken bunniToken = bunniHub.bunniTokenOfPool(id);
address owner = bunniToken.owner();
address msgSender = LibMulticaller.senderOrSigner();

if (msg.sender != owner) {
if (msgSender != owner) {
revert FeeOverrideHooklet__NotBunniTokenOwner();
}

Expand Down
Loading