Skip to content

Commit

Permalink
small scirpts fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
invocamanman committed Jan 30, 2024
1 parent 6d17286 commit 6466806
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
8 changes: 8 additions & 0 deletions deployment/v2/4_createRollup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,13 @@ async function main() {
deployOutput.polygonRollupManager
) as PolygonRollupManager;

const DEFAULT_ADMIN_ROLE = ethers.ZeroHash;
if ((await rollupManagerContract.hasRole(DEFAULT_ADMIN_ROLE, deployer.address)) == false) {
throw new Error(
`Deployer does not have admin role. Use the test flag on deploy_parameters if this is a test deployment`
);
}

let verifierContract;
if (realVerifier === true) {
const VerifierRollup = await ethers.getContractFactory("FflonkVerifier", deployer);
Expand All @@ -155,6 +162,7 @@ async function main() {
const CREATE_ROLLUP_ROLE = ethers.id("CREATE_ROLLUP_ROLE");

// Check role:

if ((await rollupManagerContract.hasRole(ADD_ROLLUP_TYPE_ROLE, deployer.address)) == false)
await rollupManagerContract.grantRole(ADD_ROLLUP_TYPE_ROLE, deployer.address);

Expand Down
2 changes: 1 addition & 1 deletion deployment/v2/deploy_parameters.json.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"test": false,
"test": true,
"timelockAdminAddress": "0x617b3a3528F9cDd6630fd3301B9c8911F7Bf063D",
"minDelayTimelock": 3600,
"salt": "0x0000000000000000000000000000000000000000000000000000000000000000",
Expand Down
1 change: 1 addition & 0 deletions docker/scripts/v2/deploy_parameters_docker.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"test": true,
"timelockAdminAddress": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266",
"minDelayTimelock": 3600,
"salt": "0x0000000000000000000000000000000000000000000000000000000000000000",
Expand Down

0 comments on commit 6466806

Please sign in to comment.