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

Factory methods to return Proxy's extcodehash and runtimeCode #31

Open
gitpusha opened this issue Mar 19, 2020 · 1 comment
Open

Factory methods to return Proxy's extcodehash and runtimeCode #31

gitpusha opened this issue Mar 19, 2020 · 1 comment
Labels
contracts This issue is related to contract changes

Comments

@gitpusha
Copy link

It would be great if the CPK Factory had two pure methods that returned the 👍

  1. extcodehash of the Proxy being deployed
  2. runtimCode (because why not)

This way protocols that want to do some Proxy verification/identification have a trivial way of comparing the calling Proxy's extcodehash against that from the CPK Factory.

The mastercopy is already queriable, which would then make a sound on-chain Gnosis Proxy identification and verification procedure possible and trivial.

@cag
Copy link
Contributor

cag commented Mar 20, 2020

In principle, I don't oppose this. Still, I feel like a lot of what needs to be verified is actually in the storage of the proxy instance. Some proxy verification/identification may be done, but I guess depending on the question "what are you trying to protect users from," it might be prudent to consider what checking the extcodehash won't do (for example, it won't protect from bad storage setups from arbitrary factories deploying the same proxy code).

@rmeissner rmeissner added the contracts This issue is related to contract changes label Apr 1, 2020
@cag cag mentioned this issue Dec 21, 2020
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contracts This issue is related to contract changes
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants