deployProxy
plugin.
hardhat.config.js
to configure Hardhat to use this packageSimpleStorage.sol
contract from before. Please place this file in the /contracts
directory of your project. The code is as follows:
/scripts
directory called upgrade_storage.js
.npx hardhat run
cmd instead of the ignition deploy
.10
.contracts/
directory with the name SimpleStorageV2
updateProxy
function from OpenZeppelin to update the contract,
scripts/
called upgrade_storagev2
. Use the following code:run
cmd to upgrade the contract from the set network.
increment()
that we added in our update. Launch the console: