Skip to content

Conversation

olga24912
Copy link
Contributor

No description provided.

@olga24912 olga24912 requested a review from karim-en as a code owner September 10, 2024 11:53

async function updateAdminProxy(ethereumConfig, newAdmin) {
const privateKey = hre.network.config.accounts[0];
const signerWallet = new hre.ethers.Wallet(privateKey, hre.ethers.provider);
Copy link
Contributor

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();

Copy link
Contributor Author

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.

Copy link
Contributor

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

@olga24912 olga24912 requested a review from kiseln September 17, 2024 10:01
.connect(signerWallet)
.grantRole("0x0000000000000000000000000000000000000000000000000000000000000000", newAdmin);
console.log(`Grant Admin Role for ${newAdmin} Tx Hash: ${tx_grant_admin.hash}`);

Copy link
Contributor Author

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.

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.

2 participants