Skip to content

Commit

Permalink
update verify contracts
Browse files Browse the repository at this point in the history
  • Loading branch information
invocamanman committed Jan 29, 2024
1 parent 74722f1 commit 36ca048
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 17 deletions.
1 change: 1 addition & 0 deletions deployment/v2/4_createRollup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@ async function main() {
outputJson.createRollupBlock = blockDeploymentRollup.number;
outputJson.rollupAddress = newZKEVMAddress;
outputJson.verifierAddress = verifierContract.target;
outputJson.consensusContract = consensusContract;

fs.writeFileSync(pathOutputJson, JSON.stringify(outputJson, null, 1));
}
Expand Down
58 changes: 41 additions & 17 deletions deployment/v2/verifyContracts.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,24 +166,48 @@ async function main() {
expect(error.message.toLowerCase().includes('already verified')).to.be.equal(true);
}

// verify zkEVM address
try {
await hre.run(
'verify:verify',
{
contract: 'contracts/v2/consensus/zkEVM/PolygonZkEVMEtrog.sol:PolygonZkEVMEtrog',
address: createRollupOutputParameters.rollupAddress,
constructorArguments: [
deployOutputParameters.polygonZkEVMGlobalExitRootAddress,
deployOutputParameters.polTokenAddress,
deployOutputParameters.polygonZkEVMBridgeAddress,
deployOutputParameters.polygonRollupManager,
],
},
);
} catch (error) {
// expect(error.message.toLowerCase().includes('proxyadmin')).to.be.equal(true);
// verify zkEVM address or validium

if (createRollupOutputParameters.consensusContract == "PolygonZkEVMEtrog") {

Check failure on line 171 in deployment/v2/verifyContracts.js

View workflow job for this annotation

GitHub Actions / lint-and-test (16.x)

Expected '===' and instead saw '=='

Check failure on line 171 in deployment/v2/verifyContracts.js

View workflow job for this annotation

GitHub Actions / lint-and-test (16.x)

Strings must use singlequote

Check failure on line 171 in deployment/v2/verifyContracts.js

View workflow job for this annotation

GitHub Actions / lint-and-test (16.x)

Expected '===' and instead saw '=='

Check failure on line 171 in deployment/v2/verifyContracts.js

View workflow job for this annotation

GitHub Actions / lint-and-test (16.x)

Strings must use singlequote
try {
await hre.run(
'verify:verify',
{
contract: 'contracts/v2/consensus/zkEVM/PolygonZkEVMEtrog.sol:PolygonZkEVMEtrog',
address: createRollupOutputParameters.rollupAddress,
constructorArguments: [
deployOutputParameters.polygonZkEVMGlobalExitRootAddress,
deployOutputParameters.polTokenAddress,
deployOutputParameters.polygonZkEVMBridgeAddress,
deployOutputParameters.polygonRollupManager,
],
},
);
} catch (error) {
// expect(error.message.toLowerCase().includes('proxyadmin')).to.be.equal(true);
}
} else {
if(createRollupOutputParameters.consensusContract == "PolygonValidiumEtrog") {

Check failure on line 190 in deployment/v2/verifyContracts.js

View workflow job for this annotation

GitHub Actions / lint-and-test (16.x)

Expected space(s) after "if"

Check failure on line 190 in deployment/v2/verifyContracts.js

View workflow job for this annotation

GitHub Actions / lint-and-test (16.x)

Unexpected if as the only statement in an else block

Check failure on line 190 in deployment/v2/verifyContracts.js

View workflow job for this annotation

GitHub Actions / lint-and-test (16.x)

Expected '===' and instead saw '=='

Check failure on line 190 in deployment/v2/verifyContracts.js

View workflow job for this annotation

GitHub Actions / lint-and-test (16.x)

Strings must use singlequote

Check failure on line 190 in deployment/v2/verifyContracts.js

View workflow job for this annotation

GitHub Actions / lint-and-test (16.x)

Expected space(s) after "if"

Check failure on line 190 in deployment/v2/verifyContracts.js

View workflow job for this annotation

GitHub Actions / lint-and-test (16.x)

Unexpected if as the only statement in an else block

Check failure on line 190 in deployment/v2/verifyContracts.js

View workflow job for this annotation

GitHub Actions / lint-and-test (16.x)

Expected '===' and instead saw '=='

Check failure on line 190 in deployment/v2/verifyContracts.js

View workflow job for this annotation

GitHub Actions / lint-and-test (16.x)

Strings must use singlequote
try {
await hre.run(
'verify:verify',
{
contract: 'contracts/v2/consensus/validium/PolygonValidiumEtrog.sol:PolygonValidiumEtrog',
address: createRollupOutputParameters.rollupAddress,
constructorArguments: [
deployOutputParameters.polygonZkEVMGlobalExitRootAddress,
deployOutputParameters.polTokenAddress,
deployOutputParameters.polygonZkEVMBridgeAddress,
deployOutputParameters.polygonRollupManager,
],
},
);
} catch (error) {
// expect(error.message.toLowerCase().includes('proxyadmin')).to.be.equal(true);
}
}
}

Check failure on line 209 in deployment/v2/verifyContracts.js

View workflow job for this annotation

GitHub Actions / lint-and-test (16.x)

Block must not be padded by blank lines

Check failure on line 209 in deployment/v2/verifyContracts.js

View workflow job for this annotation

GitHub Actions / lint-and-test (16.x)

Block must not be padded by blank lines

Check failure on line 210 in deployment/v2/verifyContracts.js

View workflow job for this annotation

GitHub Actions / lint-and-test (16.x)

Trailing spaces not allowed

Check failure on line 210 in deployment/v2/verifyContracts.js

View workflow job for this annotation

GitHub Actions / lint-and-test (16.x)

Trailing spaces not allowed
}

main()
Expand Down

0 comments on commit 36ca048

Please sign in to comment.