This commit is contained in:
pradyuman-verma 2021-11-19 02:08:57 +05:30
parent faa1cc6b0f
commit a1c6607cdc
No known key found for this signature in database
GPG Key ID: 03CEE9087D1D5E4C

View File

@ -46,30 +46,6 @@ contract uniswapSample {
UniswapV3Pool(0xCEda10b4d3bdE429DdA3A6daB87b38360313CBdB);
uint24 public constant poolFee = 3000;
function computeAddress(address factory_, PoolKey memory key_)
internal
pure
returns (address pool_)
{
require(key_.token0 < key_.token1);
pool_ = address(
uint160(
uint256(
keccak256(
abi.encodePacked(
hex"ff",
factory_,
keccak256(
abi.encode(key_.token0, key_.token1, key_.fee)
),
POOL_INIT_CODE_HASH
)
)
)
)
);
}
function getPriceLimit(
ISwapRouter.ExactInputSingleParams params,
bool zeroForOne