diff --git a/src/deployment/2_creategenesis.js b/src/deployment/2_creategenesis.js index 3ff9757..d022c39 100644 --- a/src/deployment/2_creategenesis.js +++ b/src/deployment/2_creategenesis.js @@ -325,7 +325,7 @@ async function main() { const deployerInfo = await getAddressInfo(deployer.address); genesis.push({ accountName: 'deployer', - balance: '0', + balance: '200000000000000000000000000', nonce: deployerInfo.nonce.toString(), address: deployer.address, }); diff --git a/src/deployment/3_deployContracts.js b/src/deployment/3_deployContracts.js index 584e041..6090c6f 100644 --- a/src/deployment/3_deployContracts.js +++ b/src/deployment/3_deployContracts.js @@ -421,7 +421,7 @@ async function main() { proxyBridgeAddress, ethers.constants.HashZero, ethers.constants.HashZero, - { gasLimit: 300000}, // required as native gas limit estimation would return a too low result + { gasLimit: 300000 }, // required as native gas limit estimation would return a too low result ); } catch (error) { console.error('polygonZkEVMGlobalExitRoot initialization error', error.message); diff --git a/src/scripts/clearNextNonce.js b/src/scripts/clearNextNonce.js index f70275d..640df53 100644 --- a/src/scripts/clearNextNonce.js +++ b/src/scripts/clearNextNonce.js @@ -1,11 +1,9 @@ /* eslint-disable no-await-in-loop, no-use-before-define, no-lonely-if, import/no-dynamic-require, global-require */ /* eslint-disable no-console, no-inner-declarations, no-undef, import/no-unresolved, no-restricted-syntax */ const path = require('path'); -const { ethers } = require('hardhat'); require('dotenv').config({ path: path.resolve(__dirname, '../.env') }); const common = require('../common/common'); - async function main() { const args = process.argv.slice(2); const deploymentName = args[0]; @@ -17,7 +15,7 @@ async function main() { const pendingTxCount = await currentProvider.getTransactionCount(deployer.address, 'pending'); const txCount = await currentProvider.getTransactionCount(deployer.address); - if (pendingTxCount == txCount) { + if (pendingTxCount === txCount) { console.log('Nothing to clear'); return; } @@ -31,7 +29,7 @@ async function main() { value: 0, nonce: txCount, // gasPrice: gasPrice, - gasLimit: 21000 + gasLimit: 21000, }); console.log('sending tx', tx); diff --git a/src/scripts/exportPK.js b/src/scripts/exportPK.js index 286200c..a942703 100644 --- a/src/scripts/exportPK.js +++ b/src/scripts/exportPK.js @@ -1,13 +1,16 @@ -var keythereum = require("keythereum"); +/* eslint-disable no-console */ -// Specify a data directory (optional; defaults to ~/.ethereum) -var datadir = "/home/ubuntu/zkevm/zkevm-config"; -var file = datadir + "/" + "aggregator.keystore"; +const keythereum = require('keythereum'); -var addr = "0x5669c63e3b461cf50696ad0378fe2e66b982d4a7"; +/* + * Specify a data directory (optional; defaults to ~/.ethereum) + * const datadir = '/home/ubuntu/zkevm/zkevm-config'; + * const file = datadir + '/' + 'aggregator.keystore'; + */ + +const addr = '0x5669c63e3b461cf50696ad0378fe2e66b982d4a7'; // Synchronous -var keyObject = keythereum.importFromFile(addr); +const keyObject = keythereum.importFromFile(addr); -var privateKey = keythereum.recover("password", keyObject); +const privateKey = keythereum.recover('password', keyObject); console.log(privateKey.toString('hex')); - diff --git a/src/scripts/prepareSequencer.js b/src/scripts/prepareSequencer.js index 22176d3..f23a089 100644 --- a/src/scripts/prepareSequencer.js +++ b/src/scripts/prepareSequencer.js @@ -27,7 +27,7 @@ async function main() { } const { polygonZkEVMAddress, - polygonZkEVMBridgeAddress, + // polygonZkEVMBridgeAddress, maticTokenAddress, trustedSequencer, } = deploymentOutput; @@ -51,10 +51,12 @@ async function main() { console.log('Approved zkevm by the sequencer to spend forkonomic tokens'); console.log('by the following tx: ', tx1.hash); - // const tx2 = await forkonomicToken.approve(polygonZkEVMBridgeAddress, ethers.constants.MaxUint256, { gasLimit: 100000 }); - // await tx2.wait(); - // console.log('Bridge also approved zkevm by the sequencer to spend forkonomic tokens'); - // console.log('by the following tx: ', tx2.hash); + /* + * const tx2 = await forkonomicToken.approve(polygonZkEVMBridgeAddress, ethers.constants.MaxUint256, { gasLimit: 100000 }); + * await tx2.wait(); + * console.log('Bridge also approved zkevm by the sequencer to spend forkonomic tokens'); + * console.log('by the following tx: ', tx2.hash); + */ } main().catch((e) => {