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

Remix now supports deploying UUPS upgradeable contracts #155

Closed
htadashi opened this issue Jul 20, 2022 · 9 comments · Fixed by #161
Closed

Remix now supports deploying UUPS upgradeable contracts #155

htadashi opened this issue Jul 20, 2022 · 9 comments · Fixed by #161
Labels
good first issue Good for newcomers

Comments

@htadashi
Copy link

The new release (v0.25.0) of Remix IDE added support for UUPS upgradeable contracts (see ethereum/remix-project#2260 for the specific commit).
Thus, the warning tooltip introduced in #63 can be removed if the UUPS option is selected.

@ericglau ericglau added the good first issue Good for newcomers label Jul 20, 2022
@frangio
Copy link
Contributor

frangio commented Jul 20, 2022

We should test it to understand how it works. I'm specifically wondering about initialization. We might still need a "warning" tooltip to tell people that they have to call the initializer manually.

@joaofreires
Copy link
Contributor

@htadashi is it possible to have the Deploy with Proxy enabled by customized url params?

@htadashi
Copy link
Author

@frangio Good point, this is important. But I think better than alerting in a tooltip would be if Remix would have a "Deploy proxy and initialize" option enabled as a default.

@joaofreires In this way, the Contract Wizard wouldn't even need to pass a custom url param when opening the source code in Remix.

What do you think? If it makes sense, I could open an issue in Remix and reference this issue there.

@frangio
Copy link
Contributor

frangio commented Jul 22, 2022

I don't think it makes sense for Remix to have "Deploy with Proxy" as the default. Not sure if that was the proposal.

@joaofreires Suggestion is really good, if this isn't possible we should definitely open an issue in Remix.

@joaofreires
Copy link
Contributor

joaofreires commented Jul 22, 2022

I took a brief look into the remix proxy support PR: ethereum/remix-project#2260 , more specifically at: libs/remix-core-plugin/src/lib/openzeppelin-proxy.ts.

Looks like Remix identify by itself if the contract is an OpenZeppelin proxy or not. I don't know if it is this worse for them to have the proxy enabled by default, since they know the context to apply it. Though, this is a Remix decision.

The most we can do right now is @frangio suggestion:

We might still need a "warning" tooltip to tell people that they have to call the initializer manually.

@htadashi
Copy link
Author

@frangio I was thinking if it would make sense to add a "Deploy with proxy and initialize" option and make it enabled as the default whenever Remix detects a UUPS contract - something similar to this mockup:
image

My reasoning was that users could ignore the tooltip alerting them to call the initializer manually if the button "Open in Remix" is enabled (and clicking on it directly opens the contract in Remix instead of forcing them to read the tooltip). However, @joaofreires last comment changed my mind since I am not sure if this would be a good decision in Remix side.

@ioedeveloper
Copy link

ioedeveloper commented Jul 25, 2022

@htadashi I don't see why a tooltip alerting users to call the initializer manually is required, because remix automatically calls the intialize function on deploy when "deploy with proxy" is checked.
I think the suggestion of @joaofreires is good to have a customized url param that enables "deploy with proxy" by default.

@MatiFalcone
Copy link

Is there an example or tutorial on how to achieve this? Thank you!

@ericglau
Copy link
Member

ericglau commented Apr 6, 2024

@MatiFalcone Remix has some documentation on this: https://remix-ide.readthedocs.io/en/latest/run_proxy_contracts.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants