Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
dvush committed Dec 11, 2020
1 parent 3031cd0 commit 9c16d26
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions contracts/test/unit_tests/zksync_test_bench.ts
Original file line number Diff line number Diff line change
@@ -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);

Expand All @@ -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');
Expand All @@ -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,
Expand Down

0 comments on commit 9c16d26

Please sign in to comment.