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

add function to getting create2 contract address #79

Closed
wants to merge 1 commit into from

Conversation

artemki2077
Copy link

@artemki2077 artemki2077 commented Nov 9, 2024

hi, you have a very cool repository, and as for me it is more convenient than web3 py, I am currently rewriting some of my scripts from web3 py to pons. And when I rewrote it, I saw that there was no function to get create 2 contract addresses, as it already exists in web3 py, I added

@fjarri
Copy link
Collaborator

fjarri commented Nov 9, 2024

Thanks for the PR! https://github.com/fjarri-eth/alysis already has a private method for the regular contract address calculation, so I think it may be worth it to expose it and this one in a similar fashion. I'll think about it over the weekend.

@fjarri fjarri mentioned this pull request Nov 10, 2024
@fjarri
Copy link
Collaborator

fjarri commented Nov 10, 2024

Implemented in #80, testing that the value is indeed what CREATE2 opcode produces, adding docs and removing some unnecessary bytes-hex conversions.

@fjarri fjarri closed this Nov 10, 2024
@artemki2077
Copy link
Author

cool, thanks, a little later then I'll add a function to calculate the address using the usual create

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

Successfully merging this pull request may close these issues.

2 participants