-
Notifications
You must be signed in to change notification settings - Fork 314
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add support for forkID in the tool 'deployVerifier'
addRollupType tool improvement PR review 1 genesis update verifier deployment
- Loading branch information
1 parent
9094f21
commit e307104
Showing
23 changed files
with
13,592 additions
and
10,977 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
4,022 changes: 2,011 additions & 2,011 deletions
4,022
compiled-contracts/PolygonRollupManagerMock.json
Large diffs are not rendered by default.
Oops, something went wrong.
4,036 changes: 2,018 additions & 2,018 deletions
4,036
compiled-contracts/PolygonRollupManagerMockInternalTest.json
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
2,280 changes: 1,140 additions & 1,140 deletions
2,280
compiled-contracts/PolygonZkEVMEtrogPrevious.json
Large diffs are not rendered by default.
Oops, something went wrong.
2,480 changes: 1,240 additions & 1,240 deletions
2,480
compiled-contracts/PolygonZkEVMExistentEtrog.json
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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
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 @@ | ||
add_rollup_type_output.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# Add Rollup Type | ||
Script to call `addNewRollupType` function with no timelock involved | ||
|
||
## Install | ||
``` | ||
npm i | ||
``` | ||
|
||
## Setup | ||
- Config file | ||
- `consensusContract`: select between consensus contract. Supprted: `["PolygonZkEVMEtrog", "PolygonValidiumEtrog"]` | ||
- `polygonRollupManagerAddress`: polygonRollupManager smart contract address | ||
- `verifierAddress`: verifier to be used | ||
- `description`: string to describe rollup type added. Example: "Type: Validium, Version: etrog, genesis: /ipfs/QmUXnRoPbUmZuEZCGyiHjEsoNcFVu3hLtSvhpnfBS2mAYU" | ||
- `forkID`: forkID to be used | ||
- `rollupCompatibilityID`: rollup compatibility ID | ||
- `timelockDelay`: timelock delay | ||
- `timelockSalt(optional)`: timelock salt | ||
- `predecessor(optional)`: timelock predecessor | ||
- `deployerPvtKey(optional)`: private key deployer | ||
- First option will load `deployerPvtKey`. Otherwise, `process.env.MNEMONIC` will be loaded from the `.env` file | ||
- `maxFeePerGas(optional)`: string, Set `maxFeePerGas`, must define aswell `maxPriorityFeePerGas` to use it | ||
- `maxPriorityFeePerGas(optional)`: string, Set `maxPriorityFeePerGas`, must define aswell `maxFeePerGas` to use it | ||
- `multiplierGas(optional)`: number, Gas multiplier with 3 decimals. If `maxFeePerGas` and `maxPriorityFeePerGas` are set, this will not take effect | ||
- 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 files: | ||
``` | ||
cp ./tools/addRollupType/add_rollup_type.json.example ./tools/addRollupType/add_rollup_type.json | ||
``` | ||
|
||
``` | ||
cp ./tools/addRollupType/genesis.json.example ./tools/addRollupType/genesis.json | ||
``` | ||
|
||
- Set your parameters | ||
- Run tool: | ||
``` | ||
npx hardhat run ./tools/addRollupType/addRollupType.ts --network sepolia | ||
``` | ||
|
||
### Generate 'addNewRollupType' to the Timelock SC | ||
|
||
- Copy configuration file: | ||
``` | ||
cp ./tools/addRollupType/add_rollup_type.json.example ./tools/addRollupType/add_rollup_type.json | ||
``` | ||
|
||
- Set your parameters | ||
- Run tool: | ||
``` | ||
npx hardhat run ./tools/addRollupType/addRollupType.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
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
File renamed without changes.
Oops, something went wrong.