Skip to content

Hardhat Upgrades #5342

Answered by alymurtazamemon
Nlferu asked this question in Q&A
Apr 18, 2023 · 2 comments · 5 replies
Discussion options

You must be logged in to vote

@Neftyr You can find it here LINK

I think you got this code from the openzepplin tutorial on hardhat-upgrades, right? Here they are using the Gnosis Safe to upgrade the contract.

There they first create the V1 of the implementation contract and deploy using hardhat upgrades; example;

async function main() {
  const Box = await ethers.getContractFactory("Box");
  console.log("Deploying Box...");
  const box = await upgrades.deployProxy(Box, [42], { initializer: 'store' });
  console.log("Box deployed to:", box.address);
}

then they transfer the ownership of ProxyAdmin to Gnosis Safe, if you have read about this, you must know that using hardhat-upgrades only the owner of ProxyAdmin can upg…

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
5 replies
@Nlferu
Comment options

@alymurtazamemon
Comment options

@Nlferu
Comment options

@alymurtazamemon
Comment options

@Nlferu
Comment options

Answer selected by Nlferu
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants