-
Notifications
You must be signed in to change notification settings - Fork 306
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
set verifiers forkID & add README in updateRollup tool
- Loading branch information
Showing
13 changed files
with
8,096 additions
and
523 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
2,158 changes: 2,158 additions & 0 deletions
2,158
contracts/verifiers/previousVerifiers/FflonkVerifier_10.sol
Large diffs are not rendered by default.
Oops, something went wrong.
2,158 changes: 2,158 additions & 0 deletions
2,158
contracts/verifiers/previousVerifiers/FflonkVerifier_11.sol
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
add_rollup_type_output.json | ||
add_rollup_type_output-*.json | ||
add_rollup_type.json | ||
genesis.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"realVerifier": true, | ||
"forkID": 12, | ||
"deployerPvtKey": "", | ||
"maxFeePerGas":"", | ||
"maxPriorityFeePerGas":"", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
updateRollupOutput-*.json | ||
updateRollup.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# Update rollup | ||
Script to deploy call `updateRollup` function in the `PolygonRollupManager.sol` smart contract | ||
|
||
## Install | ||
``` | ||
npm i | ||
``` | ||
|
||
## Setup | ||
- Config file | ||
- `rollupAddress`: rollup address of the rollup that is going to be updated | ||
- `newRollupTypeID`: select which is the `rollupTypeID` to upgrade | ||
- `upgradeData`: data necessary to perform the upgrade (default to `0x`) | ||
- `polygonRollupManagerAddress`: `PolygonRollupManager.sol` SC address | ||
- `timelockDelay (optional)`: at least it should be the minimum delay of the timelock smart contract | ||
- `deployerPvtKey`: private key deployer | ||
- First option will load `deployerPvtKey`. Otherwise, `process.env.MNEMONIC` will be loaded from the `.env` file | ||
- `maxFeePerGas`: set custom gas | ||
- `maxPriorityFeePerGas`: set custom gas | ||
- `multiplierGas`: set custom gas | ||
- A network should be selected when running the script | ||
- examples: `-- sepolia` or `--mainnet` | ||
- This uses variables set in `hardhat.config.ts` | ||
- Which uses some environment variables that should be set in `.env` | ||
> All paths are from root repository | ||
## Usage | ||
> All commands are done from root repository. | ||
### Call 'addNewRollupType' from an EOA | ||
- Copy configuration file: | ||
``` | ||
cp ./tools/updateRollup/updateRollup.json.example ./tools/updateRollup/updateRollup.json | ||
``` | ||
|
||
- Set your parameters | ||
- Run tool: | ||
- Standrad transaction: | ||
``` | ||
npx hardhat run ./tools/updateRollup/updateRollup.ts --network sepolia | ||
``` | ||
|
||
### Generate 'updateRollup' data to the Timelock SC | ||
|
||
- Copy configuration file: | ||
``` | ||
cp ./tools/updateRollup/updateRollup.json.example ./tools/updateRollup/updateRollup.json | ||
``` | ||
|
||
- Set your parameters | ||
- Run tool: | ||
``` | ||
npx hardhat run ./tools/updateRollup/updateRollupTimelock.ts --network sepolia | ||
``` | ||
- Output: | ||
- scheduleData | ||
- executeData | ||
> send data to the timelock contract address: | ||
> - use your favourite browser extension | ||
> - send tx to timelock address with hex data as `scheduleData` | ||
> - wait `timelockDelay` and then send `executeData` to timelock address |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.