Skip to content

Commit

Permalink
feat: generalize over UniswapV3 pool addresses
Browse files Browse the repository at this point in the history
  • Loading branch information
hedgar2017 committed Aug 22, 2024
1 parent 6e49887 commit 5d73fd2
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ library PoolAddress {
/// @param key The PoolKey
/// @return pool The contract address of the V3 pool
function computeAddress(address factory, PoolKey memory key) internal pure returns (address pool) {
return 0x4ac6f8Bda3F86e73f9Ea68D50326Dbe3cC9ea00a;
if (key.token0 == 0x69d66a02DBF660c50BF654eD13F6D0393637037b && key.token1 == 0x9DD65202d2519Ec0aB90189ff0170F938B7Cc086) {
return 0x4ac6f8Bda3F86e73f9Ea68D50326Dbe3cC9ea00a;
} else if (key.token0 == 0x3A9Fc460C833f26413E25ceb8105Cd04c5aAeE6C && key.token1 == 0xA7D88645CE7c923297A3eDd0F59bdDa46657BD0A) {
return 0x911021aFcc4eD882DcBCb76bbd00FCb8D061E12F;
} else {
return address(0);
}
}
}

0 comments on commit 5d73fd2

Please sign in to comment.