Skip to content
Merged

1 #400

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions uniswap/uniswap4.py
Original file line number Diff line number Diff line change
Expand Up @@ -777,8 +777,8 @@ def get_token(self, address: AddressLike, abi_name: str = "erc20") -> ERC20Token
return ERC20Token(symbol, address, name, decimals)

def get_pool_id(self, currency0: Union[AddressLike, str, None], currency1: Union[AddressLike, str, None], fee : int, tickSpacing : int, hooks : Union[AddressLike, str, None] = NOHOOK_ADDRESS) -> bytes:
currency0 = str(self.w3.to_checksum_address(currency0))
currency1 = str(self.w3.to_checksum_address(currency1))
currency0 = self.w3.to_checksum_address(str(currency0))
currency1 = self.w3.to_checksum_address(str(currency1))
if int(currency0, 16) > int(currency1, 16):
currency0 , currency1 = currency1 , currency0
pool_id = bytes(self.w3.solidity_keccak(["address", "address", "int24", "int24", "address"], [(currency0, currency1, fee, tickSpacing, hooks)]))
Expand Down