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

feat: detect eip-1167 and legacy vyper proxies #984

Merged
merged 1 commit into from
Mar 9, 2021

Conversation

banteg
Copy link
Collaborator

@banteg banteg commented Mar 8, 2021

What I did

Added support for EIP-1167 and Vyper create_forwarder_to proxies when using Contract.from_explorer.

Related issue: #

How I did it

I match the bytecode and replace the address to fetch from explorer if a minimal proxy pattern is detected. This adds an additional eth_getCode call.

How to verify it

eip_1167 = Contract.from_explorer('0x9528b97E7495A78325517744B2edBE0150310311')
old_vyper = Contract.from_explorer('0xb32747B4045479B77a8b8Eb44029ba12580214F8')

Checklist

  • I have confirmed that my PR passes all linting checks
  • I have included test cases
  • I have updated the documentation
  • I have added an entry to the changelog

fubuloubu
fubuloubu previously approved these changes Mar 8, 2021
@iamdefinitelyahuman
Copy link
Member

Please lint and then should be gtg

@fubuloubu
Copy link
Contributor

@iamdefinitelyahuman
Copy link
Member

Fails are happening from a change in solc 0.8.2 that broke functionality elsewhere. It needs fixing, but it's unrelated to this PR so shouldn't be a blocker to merge.

@banteg
Copy link
Collaborator Author

banteg commented Mar 9, 2021

Black made this a bit ugly, force-pushed the formatting it suggested.

@iamdefinitelyahuman iamdefinitelyahuman merged commit f9e6626 into eth-brownie:master Mar 9, 2021
@banteg banteg deleted the feat/eip-1167 branch March 11, 2021 10:45
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.

3 participants