diff --git a/contracts/test/unit_tests/zksync_test_bench.ts b/contracts/test/unit_tests/zksync_test_bench.ts index 23a1e132f7..2b00ea8954 100644 --- a/contracts/test/unit_tests/zksync_test_bench.ts +++ b/contracts/test/unit_tests/zksync_test_bench.ts @@ -1,20 +1,19 @@ -import {ethers} from 'ethers'; -import {parseEther} from 'ethers/lib/utils'; -import {ETHProxy} from 'zksync'; -import {Deployer, readContractCode, readProductionContracts} from '../../src.ts/deploy'; -import {ZkSyncProcessOpUnitTest, ZkSyncProcessOpUnitTestFactory} from '../../typechain'; +import { ethers } from 'ethers'; +import { parseEther } from 'ethers/lib/utils'; +import { ETHProxy } from 'zksync'; +import { Deployer, readContractCode, readProductionContracts } from '../../src.ts/deploy'; +import { ZkSyncProcessOpUnitTest, ZkSyncProcessOpUnitTestFactory } from '../../typechain'; const hardhat = require('hardhat'); -const {simpleEncode} = require('ethereumjs-abi'); -const {expect} = require('chai'); -const {getCallRevertReason, IERC20_INTERFACE} = require('./common'); +const { simpleEncode } = require('ethereumjs-abi'); +const { expect } = require('chai'); +const { getCallRevertReason, IERC20_INTERFACE } = require('./common'); const TEST_PRIORITY_EXPIRATION = 101; const CHUNK_SIZE = 9; let wallet, exitWallet; - describe('ZK priority queue ops unit tests', function () { this.timeout(50000); @@ -25,9 +24,9 @@ describe('ZK priority queue ops unit tests', function () { [wallet, exitWallet] = await hardhat.ethers.getSigners(); const contracts = readProductionContracts(); - contracts.zkSync = readContractCode("dev-contracts/ZkSyncProcessOpUnitTest"); - const deployer = new Deployer({deployWallet: wallet, contracts}); - await deployer.deployAll({gasLimit: 6500000}); + contracts.zkSync = readContractCode('dev-contracts/ZkSyncProcessOpUnitTest'); + const deployer = new Deployer({ deployWallet: wallet, contracts }); + await deployer.deployAll({ gasLimit: 6500000 }); zksyncContract = ZkSyncProcessOpUnitTestFactory.connect(deployer.addresses.ZkSync, wallet); const tokenContractFactory = await hardhat.ethers.getContractFactory('TestnetERC20Token'); @@ -48,15 +47,16 @@ describe('ZK priority queue ops unit tests', function () { const pubdata = ethers.utils.concat([]); const ethWitness = ethers.utils.concat([]); const processableOperationsHash = ethers.utils.keccak256(pubdata); - const offsetCommitment = new Uint8Array(pubdata.length/CHUNK_SIZE); + const offsetCommitment = new Uint8Array(pubdata.length / CHUNK_SIZE); offsetCommitment[0] = 1; - await zksyncContract.collectOnchainOpsExternal({ + await zksyncContract.collectOnchainOpsExternal( + { blockNumber: 0, feeAccount: 0, newStateHash: ethers.constants.HashZero, publicData: pubdata, timestamp: 0, - onchainOperations: [{publicDataOffset: 0, ethWitness}], + onchainOperations: [{ publicDataOffset: 0, ethWitness }] }, processableOperationsHash, 0,