-
Notifications
You must be signed in to change notification settings - Fork 5
Script for deploy proxy on mainnet #68
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
base: master
Are you sure you want to change the base?
Conversation
|
||
async function updateAdminProxy(ethereumConfig, newAdmin) { | ||
const privateKey = hre.network.config.accounts[0]; | ||
const signerWallet = new hre.ethers.Wallet(privateKey, hre.ethers.provider); |
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.
I think this from the other script is equivalent and an easier way to get the signer
const [signerWallet] = await hre.ethers.getSigners();
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 returns HardhatEthersSigner, but I need Wallet.
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.
Signer seem to be enough for all subsequent uses of this object
.connect(signerWallet) | ||
.grantRole("0x0000000000000000000000000000000000000000000000000000000000000000", newAdmin); | ||
console.log(`Grant Admin Role for ${newAdmin} Tx Hash: ${tx_grant_admin.hash}`); | ||
|
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.
We need to wait for the transaction to complete.
No description provided.