Uniswap / v3-periphery

🦄 🦄 🦄 Peripheral smart contracts for interacting with Uniswap v3
https://uniswap.org
GNU General Public License v2.0
1.16k stars 1.08k forks source link

PoolAddress lib returns wrong addresses in version 0.8 #321

Open larryob opened 1 year ago

larryob commented 1 year ago

This commit seems to be the cause. You can find an example of this error here.

drLis commented 1 year ago

@larryob is right. I have same problem because in both versions POOL_INIT_CODE_HASH are hardcoded and in 0.8 version we also need POOL_INIT_CODE_HASH == 0xe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b54 for correct address computation. Can you please unhardcode it or downgrade? @NoahZinsmeister @ewilz @moodysalem

drLis commented 1 year ago

Possible it will be more corrent make POOL_INIT_CODE_HASH argument of function for that library?

andreujuanc commented 1 year ago

There is a possible ambiguous truncation there, that's why it fails on up to date version of the compiler.