Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update v4-core:latest #89

Merged
merged 20 commits into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
rename getHooksCalls --> getHookPermissions
  • Loading branch information
saucepoint committed Dec 22, 2023
commit 79adb2777d30b788bcf7fd5223ea093276a7ae09
2 changes: 1 addition & 1 deletion .forge-snapshots/FullRangeAddInitialLiquidity.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
409213
409191
2 changes: 1 addition & 1 deletion .forge-snapshots/FullRangeAddLiquidity.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
203210
203188
2 changes: 1 addition & 1 deletion .forge-snapshots/FullRangeRemoveLiquidity.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
196013
195978
2 changes: 1 addition & 1 deletion .forge-snapshots/FullRangeRemoveLiquidityAndRebalance.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
376728
376636
2 changes: 1 addition & 1 deletion .forge-snapshots/TWAMMSubmitOrder.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
145878
145856
4 changes: 2 additions & 2 deletions contracts/BaseHook.sol
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ abstract contract BaseHook is IHooks {
_;
}

function getHooksCalls() public pure virtual returns (Hooks.Permissions memory);
function getHookPermissions() public pure virtual returns (Hooks.Permissions memory);

// this function is virtual so that we can override it during testing,
// which allows us to deploy an implementation to any address
// and then etch the bytecode into the correct address
function validateHookAddress(BaseHook _this) internal pure virtual {
Hooks.validateHookPermissions(_this, getHooksCalls());
Hooks.validateHookPermissions(_this, getHookPermissions());
}

function lockAcquired(address, /*sender*/ bytes calldata data)
Expand Down
2 changes: 1 addition & 1 deletion contracts/hooks/examples/FullRange.sol
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ contract FullRange is BaseHook, ILockCallback {
_;
}

function getHooksCalls() public pure override returns (Hooks.Permissions memory) {
function getHookPermissions() public pure override returns (Hooks.Permissions memory) {
return Hooks.Permissions({
beforeInitialize: true,
afterInitialize: false,
Expand Down
2 changes: 1 addition & 1 deletion contracts/hooks/examples/GeomeanOracle.sol
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ contract GeomeanOracle is BaseHook {

constructor(IPoolManager _poolManager) BaseHook(_poolManager) {}

function getHooksCalls() public pure override returns (Hooks.Permissions memory) {
function getHookPermissions() public pure override returns (Hooks.Permissions memory) {
return Hooks.Permissions({
beforeInitialize: true,
afterInitialize: true,
Expand Down
2 changes: 1 addition & 1 deletion contracts/hooks/examples/LimitOrder.sol
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ contract LimitOrder is BaseHook {

constructor(IPoolManager _poolManager) BaseHook(_poolManager) {}

function getHooksCalls() public pure override returns (Hooks.Permissions memory) {
function getHookPermissions() public pure override returns (Hooks.Permissions memory) {
return Hooks.Permissions({
beforeInitialize: false,
afterInitialize: true,
Expand Down
2 changes: 1 addition & 1 deletion contracts/hooks/examples/TWAMM.sol
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ contract TWAMM is BaseHook, ITWAMM {
expirationInterval = _expirationInterval;
}

function getHooksCalls() public pure override returns (Hooks.Permissions memory) {
function getHookPermissions() public pure override returns (Hooks.Permissions memory) {
return Hooks.Permissions({
beforeInitialize: true,
afterInitialize: false,
Expand Down
2 changes: 1 addition & 1 deletion contracts/hooks/examples/VolatilityOracle.sol
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ contract VolatilityOracle is BaseHook, IDynamicFeeManager {
deployTimestamp = _blockTimestamp();
}

function getHooksCalls() public pure override returns (Hooks.Permissions memory) {
function getHookPermissions() public pure override returns (Hooks.Permissions memory) {
return Hooks.Permissions({
beforeInitialize: true,
afterInitialize: false,
Expand Down
2 changes: 1 addition & 1 deletion test/shared/implementation/FullRangeImplementation.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {Hooks} from "@uniswap/v4-core/src/libraries/Hooks.sol";

contract FullRangeImplementation is FullRange {
constructor(IPoolManager _poolManager, FullRange addressToEtch) FullRange(_poolManager) {
Hooks.validateHookPermissions(addressToEtch, getHooksCalls());
Hooks.validateHookPermissions(addressToEtch, getHookPermissions());
}

// make this a no-op in testing
Expand Down
2 changes: 1 addition & 1 deletion test/shared/implementation/GeomeanOracleImplementation.sol
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ contract GeomeanOracleImplementation is GeomeanOracle {
uint32 public time;

constructor(IPoolManager _poolManager, GeomeanOracle addressToEtch) GeomeanOracle(_poolManager) {
Hooks.validateHookPermissions(addressToEtch, getHooksCalls());
Hooks.validateHookPermissions(addressToEtch, getHookPermissions());
}

// make this a no-op in testing
Expand Down
2 changes: 1 addition & 1 deletion test/shared/implementation/LimitOrderImplementation.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {Hooks} from "@uniswap/v4-core/src/libraries/Hooks.sol";

contract LimitOrderImplementation is LimitOrder {
constructor(IPoolManager _poolManager, LimitOrder addressToEtch) LimitOrder(_poolManager) {
Hooks.validateHookPermissions(addressToEtch, getHooksCalls());
Hooks.validateHookPermissions(addressToEtch, getHookPermissions());
}

// make this a no-op in testing
Expand Down
2 changes: 1 addition & 1 deletion test/shared/implementation/TWAMMImplementation.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {Hooks} from "@uniswap/v4-core/src/libraries/Hooks.sol";

contract TWAMMImplementation is TWAMM {
constructor(IPoolManager poolManager, uint256 interval, TWAMM addressToEtch) TWAMM(poolManager, interval) {
Hooks.validateHookPermissions(addressToEtch, getHooksCalls());
Hooks.validateHookPermissions(addressToEtch, getHookPermissions());
}

// make this a no-op in testing
Expand Down