infrastructure-upgrade/lib/v3-core/contracts/test/MockTimeUniswapV3PoolDeployer.sol
T-Hax 735546619e
init
Signed-off-by: T-Hax <>
2023-04-08 18:46:18 +00:00

36 lines
969 B
Solidity

// SPDX-License-Identifier: UNLICENSED
pragma solidity =0.7.6;
import '../interfaces/IUniswapV3PoolDeployer.sol';
import './MockTimeUniswapV3Pool.sol';
contract MockTimeUniswapV3PoolDeployer is IUniswapV3PoolDeployer {
struct Parameters {
address factory;
address token0;
address token1;
uint24 fee;
int24 tickSpacing;
}
Parameters public override parameters;
event PoolDeployed(address pool);
function deploy(
address factory,
address token0,
address token1,
uint24 fee,
int24 tickSpacing
) external returns (address pool) {
parameters = Parameters({factory: factory, token0: token0, token1: token1, fee: fee, tickSpacing: tickSpacing});
pool = address(
new MockTimeUniswapV3Pool{salt: keccak256(abi.encodePacked(token0, token1, fee, tickSpacing))}()
);
emit PoolDeployed(pool);
delete parameters;
}
}