-
Notifications
You must be signed in to change notification settings - Fork 305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/update upgrade script #79
Conversation
invocamanman
commented
Jan 3, 2023
- Upgrade script hackmd updated
94ad2f1
to
8cf823e
Compare
8cf823e
to
afc55f3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯
deployment/README.md
Outdated
|
||
## Notes | ||
|
||
- `gensis.json` has been generated using the tool: `https://github.com/0xPolygonHermez/zkevm-commonjs/blob/main/tools/fill-genesis/create-genesis.js` using as generator file: `genesis-gen.json` | ||
- `gensis.json` has been generated using the tool: `src/create-genesis.js` using as generator file: `genesis-gen.json` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- `gensis.json` has been generated using the tool: `src/create-genesis.js` using as generator file: `genesis-gen.json` | |
- `genesis.json` has been generated using the tool: `src/create-genesis.js` using as generator file: `genesis-gen.json` |
upgrade/README.md
Outdated
- Update the `polygonZkEVMFactory` with the new implementation contract you want to upgrade | ||
- Run the script | ||
|
||
Otherwise, inc ase of timelock use `timeLockUpgrade.js` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise, inc ase of timelock use `timeLockUpgrade.js` | |
Otherwise, in case of timelock use `timeLockUpgrade.js` |
upgrade/README.md
Outdated
- Update the `minDelay` with the delay that you want to use | ||
- Run the script | ||
- Now the necessary transactions to interact with the timelock are printed in the screen `schedule` and `execute` | ||
- With the owner of the timelock ( multisig or account), send the data printed by `schedule` to the `Timelock` contract. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- With the owner of the timelock ( multisig or account), send the data printed by `schedule` to the `Timelock` contract. | |
- With the owner of the timelock (multisig or account), send the data printed by `schedule` to the `Timelock` contract. |
upgrade/README.md
Outdated
- Run the script | ||
- Now the necessary transactions to interact with the timelock are printed in the screen `schedule` and `execute` | ||
- With the owner of the timelock ( multisig or account), send the data printed by `schedule` to the `Timelock` contract. | ||
- Once the necessary timeout has pass, with the same account you can now send the data printed by `execute` to the `Timelock` contract and the contracts will be upgraded. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Once the necessary timeout has pass, with the same account you can now send the data printed by `execute` to the `Timelock` contract and the contracts will be upgraded. | |
- Once the necessary timeout has expired, with the same account you can now send the data printed by `execute` to the `Timelock` contract and the contracts will be upgraded. |
upgrade/simpleUpgradeScript.js
Outdated
@@ -27,24 +27,15 @@ async function main() { | |||
// compìle contracts | |||
await hre.run('compile'); | |||
|
|||
const polygonZkEVMProxyAddress = '0xfefefefefefefefefefefefee'; | |||
const polygonZkEVMFactory = await ethers.getContractFactory('PolygonZkEVMMock'); | |||
const proxyPolygonAddress = '0xfefefefefefefefefefefefee'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This parameter should be loaded by cli
or input-upgrade.json
@@ -27,23 +27,26 @@ async function main() { | |||
// compìle contracts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Output with upgrade information should be provided as well in json format
upgrade/timeLockUpgrade.js
Outdated
minDelay, | ||
], | ||
); | ||
// Executre operation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Executre operation | |
// Execute operation |
const output = []; | ||
|
||
// Upgrade zkevm | ||
for (const upgrade of upgradeParameters.upgrades) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would check in advance upgrade.contractName
existence
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😸