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

CREATE2 init code hash is not correct #13

Open
preston4896 opened this issue Jun 29, 2021 · 2 comments
Open

CREATE2 init code hash is not correct #13

preston4896 opened this issue Jun 29, 2021 · 2 comments

Comments

@preston4896
Copy link

Hi there, as I was trying to call the pairFor() method from the PancakeLibrary to compute the CREATE2 address of a token pair, I noticed that the address did not match the ones returned from the router.

After a closer look, I realized the hardcoded value, see line 24 of Pancake Library does not match the INIT_CODE_PAIR_HASH that was computed by the Factory. You can find the actual value here.

Using the value obtained from BSCscan, it resolves the issue that I had and I was able to get the correct pair address. I thought I would raise this issue for anyone who's also having a hard time with this.

@Sam-Devs
Copy link

Sam-Devs commented Jul 4, 2021

Hello Preston, you have to change the init hash with a new one.

@LaceLetho
Copy link

Thanks for your reminding, encounter the same issue and solved😄

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