This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function removeLiquidityETHWithPermit( | |
address token, | |
uint weight, | |
uint liquidity, | |
uint amountTokenMin, | |
uint amountETHMin, | |
address to, | |
uint deadline, | |
bool approveMax, uint8 v, bytes32 r, bytes32 s | |
) external virtual override returns (uint amountToken, uint amountETH) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function removeLiquidityETHWithPermit( | |
address token, | |
uint weight, | |
uint liquidity, | |
uint amountTokenMin, | |
uint amountETHMin, | |
address to, | |
uint deadline, | |
bool approveMax, uint8 v, bytes32 r, bytes32 s | |
) external virtual override returns (uint amountToken, uint amountETH) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function createPool(address token0, address token1) external override returns (IPool pool) { | |
(address tokenA, address tokenB) = token0 < token1 ? (token0, token1) : (token1, token0); | |
bytes memory bytecode = type(Pool).creationCode; | |
bytes32 salt = keccak256(abi.encodePacked(tokenA, tokenB)); | |
assembly { | |
pool := create2(0, add(bytecode, 32), mload(bytecode), salt) | |
} | |
} |