hyperledger-labs / blockchain-carbon-accounting

This project implements blockchain applications for climate action and accounting, including emissions calculations, carbon trading, and validation of climate claims. It is part of the Linux Foundation's Hyperledger Climate Action and Accounting SIG.
https://wiki.hyperledger.org/display/CASIG/Carbon+Accounting+and+Certification+WG
Apache License 2.0
188 stars 104 forks source link

test upgrading of DAO Governor and Timelock #156

Closed sichen1234 closed 3 years ago

sichen1234 commented 3 years ago

Test and document procedure for upgrading DAO Governor and Timelock while leaving the DAO token unchanged.

jamesondh commented 3 years ago

See documentation on upgrading only Governor.sol and Timelock.sol while leaving DAOToken.sol and NetEmissionsTokenNetwork.sol the same: https://github.com/opentaps/blockchain-carbon-accounting/blob/main/net-emissions-token-network/docs/using-the-contracts.md#upgrading-governorsol-and-timelocksol-without-upgrading-daotokensol and commits https://github.com/opentaps/blockchain-carbon-accounting/commit/98b7e1d90805644ff7616e25c5996b552cbc8f6e https://github.com/opentaps/blockchain-carbon-accounting/commit/8f757b98ddd7bc31a2162bf1d0150805527d0210

sichen1234 commented 3 years ago

What does "Make sure the current addresses of the contracts you'd like to upgrade are in deployments//" mean? Does it mean the "address": "0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9", in Governor.json?

jamesondh commented 3 years ago

When a contract is deployed, hardhat-deploy saves it to deployments/<network>/ so this folder needs to be committed to the repo and if you want to upgrade the Governor/Timelock on a given network, these files need to be there (so that the deployment script can reuse DAOToken and NetEmissionsTokenNetwork).