Skip to content

Commit

Permalink
PathKey to its own library
Browse files Browse the repository at this point in the history
  • Loading branch information
ConjunctiveNormalForm committed Nov 16, 2023
1 parent 20af595 commit e3f6c7e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
14 changes: 14 additions & 0 deletions contracts/libraries/PathKey.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//SPDX-License-Identifier: UNLICENSED

pragma solidity ^0.8.20;

import {Currency} from "@uniswap/v4-core/contracts/types/Currency.sol";
import {IHooks} from "@uniswap/v4-core/contracts/interfaces/IHooks.sol";

struct PathKey {
Currency intermediateCurrency;
uint24 fee;
int24 tickSpacing;
IHooks hooks;
bytes hookData;
}
9 changes: 1 addition & 8 deletions contracts/libraries/SwapIntention.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

pragma solidity ^0.8.20;

import {PathKey} from "./PathKey.sol";
import {Currency} from "@uniswap/v4-core/contracts/types/Currency.sol";
import {IHooks} from "@uniswap/v4-core/contracts/interfaces/IHooks.sol";
import {PoolKey} from "@uniswap/v4-core/contracts/types/PoolKey.sol";
Expand All @@ -18,14 +19,6 @@ struct SwapInfo {
bytes params;
}

struct PathKey {
Currency intermediateCurrency;
uint24 fee;
int24 tickSpacing;
IHooks hooks;
bytes hookData;
}

struct ExactInputSingleParams {
PoolKey poolKey;
bool zeroForOne;
Expand Down

0 comments on commit e3f6c7e

Please sign in to comment.