- In browser register in Alchemy or Infura
- In Alchemy or Infura create App, use network Goerli public testnet
- In file
.env
paste url with provider key for paramGOERLI_PROVIDER_URL
. Url with key you can get in already created app in Alchemy or Infura in step 3. - In Metamask create some test account and send there some ETH.
- In Metamask export private key from account created in step 4, and paste this key in
.env
file for paramDEPLOYER_PRIVATE_KEY
- Clone project
defender-multisig-timelock-proxy-workshop
- Enter to folder
defender-multisig-timelock-proxy-workshop
- Execute commands
npm install
npm run compile:hardhat
npm run export-abi
Go to folder defender-multisig-timelock-proxy-workshop
- To deploy Proxy and Implementation execute command:
npx hardhat run --network goerli scripts/00_first_deploy_upgradeable_smart_contract.js
- To change Smart Contract state execute command:
npx hardhat run --network goerli scripts/01_setup_balance.js
- To see changes on smart contract execute command:
npx hardhat run --network goerli scripts/utils/read_smart_contract_data.js
- To upgrade smart contract execute command:
npx hardhat run --network goerli scripts/02_upgrade_smart_contract_ok_version.js
- To see changes on smart contract execute command:
npx hardhat run --network goerli scripts/utils/read_smart_contract_data.js
To upgrade smart contract execute command:
npx hardhat run --network goerli scripts/03_upgrade_smart_contract_NOT_ok_version.js
To deploy only smart contract implementation execute command:
npx hardhat run --network goerli scripts/04_deploy_only_implementation.js
To execute upgradeTo
on Proxy smart contract execute command:
npx hardhat run --network goerli scripts/05_execute_proxy_uprade_to_implementation.js
- First edit
06_transfer_ownership.js
script and paste correct address to Timelock Controller from Defender. - Execute command:
npx hardhat run --network goerli scripts/06_transfer_ownership.js
Execute command:
npx hardhat run --network goerli scripts/07_deploy_only_implementation_v4.js