Skip to content

Commit

Permalink
Merge branch 'main' into 10-22-change_natspec_to_ILockCallback.lockAc…
Browse files Browse the repository at this point in the history
…quired
  • Loading branch information
marktoda authored Oct 30, 2023
2 parents 4d7b2ea + 1474c1d commit d5df467
Showing 1 changed file with 87 additions and 0 deletions.
87 changes: 87 additions & 0 deletions contracts/test/BaseTestHooks.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.20;

import {IHooks} from "../interfaces/IHooks.sol";
import {PoolKey} from "../types/PoolKey.sol";
import {BalanceDelta} from "../types/BalanceDelta.sol";
import {IPoolManager} from "../interfaces/IPoolManager.sol";

contract BaseTestHooks is IHooks {
error HookNotImplemented();

function beforeInitialize(address sender, PoolKey calldata key, uint160 sqrtPriceX96, bytes calldata hookData)
external
virtual
returns (bytes4)
{
revert HookNotImplemented();
}

function afterInitialize(
address sender,
PoolKey calldata key,
uint160 sqrtPriceX96,
int24 tick,
bytes calldata hookData
) external virtual returns (bytes4) {
revert HookNotImplemented();
}

function beforeModifyPosition(
address sender,
PoolKey calldata key,
IPoolManager.ModifyPositionParams calldata params,
bytes calldata hookData
) external virtual returns (bytes4) {
revert HookNotImplemented();
}

function afterModifyPosition(
address sender,
PoolKey calldata key,
IPoolManager.ModifyPositionParams calldata params,
BalanceDelta delta,
bytes calldata hookData
) external virtual returns (bytes4) {
revert HookNotImplemented();
}

function beforeSwap(
address sender,
PoolKey calldata key,
IPoolManager.SwapParams calldata params,
bytes calldata hookData
) external virtual returns (bytes4) {
revert HookNotImplemented();
}

function afterSwap(
address sender,
PoolKey calldata key,
IPoolManager.SwapParams calldata params,
BalanceDelta delta,
bytes calldata hookData
) external virtual returns (bytes4) {
revert HookNotImplemented();
}

function beforeDonate(
address sender,
PoolKey calldata key,
uint256 amount0,
uint256 amount1,
bytes calldata hookData
) external virtual returns (bytes4) {
revert HookNotImplemented();
}

function afterDonate(
address sender,
PoolKey calldata key,
uint256 amount0,
uint256 amount1,
bytes calldata hookData
) external virtual returns (bytes4) {
revert HookNotImplemented();
}
}

0 comments on commit d5df467

Please sign in to comment.