-
Notifications
You must be signed in to change notification settings - Fork 298
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 arg configuration to proxyAdmin and allow name to act as artifact #142
base: master
Are you sure you want to change the base?
Conversation
Just a side note, I think the naming could be improved too. |
src/helpers.ts
Outdated
try { | ||
proxyAdminDeployed = await partialExtension.get(proxyAdminName); | ||
} catch (e) { | ||
console.log( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it should not be a console.log
as this would show up everywhere including test output
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wighawag just pinging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Dylan, sorry did not find the time yet to fully review it, but in principle it looks good. Hopefully I ll find some time before I am back from my travel.
Hi guys, any update here? Would be useful having args for custom proxy admin contracts. |
Sorry @Dylan-Kerler @wighawag but I'm really needing this 🤣 |
Hey @marcelomorgado no update from me. AFAIK this is good to merge, it’s just waiting on @wighawag to review it. |
I ll try to review soon. By the way regarding openzeppelin proxy admin and the impossibility for it to be provided an specific owner at construction time, the hardhat-deploy proxy admin is a simple modification to it so you do not waste gas by setting the owner twice, see discussion here : OpenZeppelin/openzeppelin-contracts#2639 (comment) |
At the moment
[owner]
is passed as the constructor argument to every custom AdminContract in the proxy option. This is not desireable since a lot of ProxyAdmin contracts will take different constructor arguments. Specifically, for my use case the OpenZeppelin ProxyAdmin has no constructor at all.This change allows you to specify what arguments get passed to the AdminContract.
This change also adds a fall back to the artifact being the
name
if noartifactName
is specified. So here, because noartifactName
is specified, both the name and artifact is "ProxyAdmin".For example: