Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3dbb914

Browse files
authored
Merge pull request#399 from liquid-8/dev
more stupidity fix
2 parentsb3a53c5 +70a627b commit3dbb914

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

‎uniswap/types.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@ def __repr__(self) -> str:
3737
@dataclass
3838
classUniswapV4_path_key:
3939
# The lower currency of the pool, sorted numerically
40-
currency0 :Address
40+
currency0 :str
4141
# The higher currency of the pool, sorted numerically
42-
currency1 :Address
42+
currency1 :str
4343
# The pool swap fee, capped at 1_000_000. If the first bit is 1, the pool has a dynamic fee and must be exactly equal to 0x800000
4444
fee :int
4545
# Ticks that involve positions must be a multiple of tick spacing
4646
tickSpacing :int
4747
# The hooks of the pool
48-
hooks :List[Address]
48+
hooks :str

‎uniswap/uniswap4.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -777,8 +777,8 @@ def get_token(self, address: AddressLike, abi_name: str = "erc20") -> ERC20Token
777777
returnERC20Token(symbol,address,name,decimals)
778778

779779
defget_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:
780-
currency0=str(currency0)
781-
currency1=str(currency1)
780+
currency0=str(self.w3.to_checksum_address(currency0))
781+
currency1=str(self.w3.to_checksum_address(currency1))
782782
ifint(currency0,16)>int(currency1,16):
783783
currency0 ,currency1=currency1 ,currency0
784784
pool_id=bytes(self.w3.solidity_keccak(["address","address","int24","int24","address"], [(currency0,currency1,fee,tickSpacing,hooks)]))

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp