Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
ping-ke committed Jul 30, 2024
1 parent c732f47 commit 5d3d193
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions scripts/deployL2-it.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ const config = [
];
const storageCost = 1500000000000000; // storageCost - 1,500,000Gwei forever per blob - https://ethresear.ch/t/ethstorage-scaling-ethereum-storage-via-l2-and-da/14223/6#incentivization-for-storing-m-physical-replicas-1
const dcfFactor = 340282366367469178095360967382638002176n; // dcfFactor, it mean 0.95 for yearly discount
const sleep = (delay) => new Promise((resolve) => setTimeout(resolve, delay))

async function verifyContract(contract, args) {
// if (!process.env.ETHERSCAN_API_KEY) {
Expand Down Expand Up @@ -87,19 +86,20 @@ async function deployContract() {
await verifyContract(impl, [config, startTime, storageCost, dcfFactor]);

// wait for contract finalized
const i = 1
while (true) {
const block = await hre.ethers.provider.getBlock("finalized");
console.log(
"finalized block number is",
block.number,
"at",
new Date().toLocaleTimeString([], { hour: "2-digit", minute: "2-digit", second: "2-digit" })
);
setTimeout( () =>
console.log(
"finalized block number is",
block.number,
"at",
new Date().toLocaleTimeString([], { hour: "2-digit", minute: "2-digit", second: "2-digit" })
), 60000 * i++);

if (receipt.blockNumber < block.number) {
return;
}
sleep(60*000);
}
}

Expand Down

0 comments on commit 5d3d193

Please sign in to comment.