Skip to content

Commit 1fee875

Browse files
authored
Update uniswap4.py: removed to_checksum_address in get_pool_id()
1 parent 30a4efe commit 1fee875

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

uniswap/uniswap4.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -735,8 +735,8 @@ def _get_tx_params(self, value: Wei = Wei(0), gas: Optional[Wei] = None, max_fee
735735
# ------ Helpers ------------------------------------------------------------
736736

737737
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:
738-
currency0 = self.w3.to_checksum_address(str(currency0))
739-
currency1 = self.w3.to_checksum_address(str(currency1))
738+
currency0 = str(currency0)
739+
currency1 = str(currency1)
740740
if int(currency0, 16) > int(currency1, 16):
741741
currency0 , currency1 = currency1 , currency0
742742
pool_id = bytes(self.w3.solidity_keccak(["address", "address", "int24", "int24", "address"], [(currency0, currency1, fee, tickSpacing, hooks)]))

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy