Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hardcoded POOL_INIT_CODE_HASH is unexpected value #348

Open
funderbrker opened this issue May 31, 2023 · 4 comments
Open

Hardcoded POOL_INIT_CODE_HASH is unexpected value #348

funderbrker opened this issue May 31, 2023 · 4 comments

Comments

@funderbrker
Copy link

Hardcoded value seen in v3-periphery/contracts/libraries/PoolAddress.solis 0xa598dd2fba360510c5a8f02f44423a4468e902df5857dbce3ca162a43a3a31ff, which results in incorrect pool address computation.

When the value is updated to 0xe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b54 (as seen in the Uniswap v3 SDK and this issue Uniswap/v3-sdk#113) the pool address computations align with pools currently deployed on mainnet.

Not sure why this value is in the file. From a external user pov, it was unexpected.

@Toluphene
Copy link

Great

@funderbrker
Copy link
Author

this issue exists on the 0.8 branch. introduced by b325bb0, which changes to pool init code hash even though the hash used to deploy pools is immutable and not affected by the changes in this commit.

@marktoda

@funderbrker
Copy link
Author

fix in fork here for public reference 0.8...funderbrker:v3-periphery:0.8

@polus-arcticus
Copy link

thanks for this, after patching out the PoolAddress.sol library and using it with this code the computed pool was correct

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants