Skip to content
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

Fix rate limiting in verifyContracts.js #140

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions deployment/verifyContracts.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ const pathDeployParameters = path.join(__dirname, './deploy_parameters.json');
const deployOutputParameters = require(pathDeployOutputParameters);
const deployParameters = require(pathDeployParameters);

function sleep(s) {
return new Promise((resolve) => {
setTimeout(resolve, s * 1000);
});
}

async function main() {
// load deployer account
if (typeof process.env.ETHERSCAN_API_KEY === 'undefined') {
Expand Down Expand Up @@ -37,6 +43,7 @@ async function main() {
} catch (error) {
// expect(error.message.toLowerCase().includes('already verified')).to.be.equal(true);
}
await sleep(1);

// verify verifier
try {
Expand All @@ -49,6 +56,7 @@ async function main() {
} catch (error) {
expect(error.message.toLowerCase().includes('already verified')).to.be.equal(true);
}
await sleep(1);

const { minDelayTimelock } = deployParameters;
const { timelockAddress } = deployParameters;
Expand All @@ -69,6 +77,7 @@ async function main() {
} catch (error) {
expect(error.message.toLowerCase().includes('already verified')).to.be.equal(true);
}
await sleep(1);

// verify proxy admin
try {
Expand All @@ -81,6 +90,7 @@ async function main() {
} catch (error) {
expect(error.message.toLowerCase().includes('already verified')).to.be.equal(true);
}
await sleep(1);

// verify zkEVM address
try {
Expand All @@ -101,6 +111,7 @@ async function main() {
} catch (error) {
expect(error.message.toLowerCase().includes('proxyadmin')).to.be.equal(true);
}
await sleep(1);

// verify global exit root address
try {
Expand All @@ -117,6 +128,7 @@ async function main() {
} catch (error) {
expect(error.message.toLowerCase().includes('proxyadmin')).to.be.equal(true);
}
await sleep(1);

try {
await hre.run(
Expand Down