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

The address generation is wrong when using create2 #6

Open
yingjun-wu opened this issue Jun 28, 2022 · 0 comments
Open

The address generation is wrong when using create2 #6

yingjun-wu opened this issue Jun 28, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@yingjun-wu
Copy link
Collaborator

eEVM/src/util.cpp

Lines 57 to 69 in 7de5ef5

uint8_t sender_arr[256];
to_big_endian(sender, sender_arr);
for (auto i = 0; i < 256; i++)
{
data.emplace_back(sender_arr[i]);
}
uint8_t salt_arr[256];
to_big_endian(salt, salt_arr);
for (auto i = 0; i < 256; i++)
{
data.emplace_back(salt_arr[i]);
}

we can find calculate preimage is always exactly 85 bytes long, but it doesn't seem satisfied, see line 57 and 64.

Reference Create2 EIP-1014

@yingjun-wu yingjun-wu added the bug Something isn't working label Jun 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant