feat: Pancakeswap V3 support
This commit is contained in:
@@ -5,8 +5,6 @@ pragma solidity >=0.5.0;
|
||||
|
||||
/// @title Provides functions for deriving a pool address from the factory, tokens, and the fee
|
||||
library PoolAddressV2 {
|
||||
bytes32 internal constant POOL_INIT_CODE_HASH =
|
||||
0xe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b54;
|
||||
|
||||
/// @notice The identifying key of the pool
|
||||
struct PoolKey {
|
||||
@@ -33,7 +31,7 @@ library PoolAddressV2 {
|
||||
/// @param factory The Uniswap V3 factory contract address
|
||||
/// @param key The PoolKey
|
||||
/// @return pool The contract address of the V3 pool
|
||||
function computeAddress(address factory, PoolKey memory key)
|
||||
function computeAddress(address factory, PoolKey memory key, bytes32 initCode)
|
||||
internal
|
||||
pure
|
||||
returns (address pool)
|
||||
@@ -49,7 +47,7 @@ library PoolAddressV2 {
|
||||
keccak256(
|
||||
abi.encode(key.token0, key.token1, key.fee)
|
||||
),
|
||||
POOL_INIT_CODE_HASH
|
||||
initCode
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user