Skip to content

Commit

Permalink
test: refactoring lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
pcheremu committed Sep 26, 2023
1 parent 1a7fa82 commit f0c5d05
Show file tree
Hide file tree
Showing 17 changed files with 15 additions and 24 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,5 @@ lerna-debug.log*
packages/app/allure-results/
packages/app/tests/e2e/artifacts/
packages/bets/src/playbook/artifacts*
packages/bets/src/playbook/cache*
packages/bets/src/playbook/cache*
packages/bets/src/playbook/buffer/*
2 changes: 1 addition & 1 deletion packages/bets/src/playbook/buffer/L1.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0x96b30fDfeEdffCafbb145401687D6b9B50EA1010
0x52546980e93668872651AFC9097db47e5DEc46f3
2 changes: 1 addition & 1 deletion packages/bets/src/playbook/buffer/L2.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0xEBf9D3ead9A8c2bb8cEa438B8Dfa9f1AFf44bfa7
0xf43624d811c5DC9eF91cF237ab9B8eE220D438eE
1 change: 0 additions & 1 deletion packages/bets/src/playbook/deploy/deploy-paymaster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { promises as fs } from "fs";
import { Wallet } from "zksync-web3";

import { Buffer, Wallets } from "../../entities";
import { Playbook } from "../playbook";

import type { HardhatRuntimeEnvironment } from "hardhat/types";

Expand Down
1 change: 0 additions & 1 deletion packages/bets/src/playbook/deploy/multicallCaller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { promises as fs } from "fs";

import { Buffer } from "../../entities";
import { Helper } from "../../helper";
import displayVerificationInfo from "../utils/displayVerificationInfo";
import getWallet from "../utils/getWallet";

import type { HardhatRuntimeEnvironment } from "hardhat/types";
Expand Down
2 changes: 1 addition & 1 deletion packages/bets/src/playbook/deploy/use-greeter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import type { HardhatRuntimeEnvironment } from "hardhat/types";
export default async function (hre: HardhatRuntimeEnvironment) {
const bufferRoute = "src/playbook/";
const helper = new Helper();
let contract: any;
let contract: any; // eslint-disable-line

const greeterContractAddress = await helper.getStringFromFile(bufferRoute + Buffer.greeterL2);

Expand Down
2 changes: 1 addition & 1 deletion packages/bets/src/playbook/deploy/use-multitransferETH.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as ethers from "ethers";
import { promises as fs } from "fs";
import { Provider, utils, Wallet } from "zksync-web3";
import { Provider, Wallet } from "zksync-web3";

import { localConfig } from "../../config";
import { Buffer, Token, Wallets } from "../../entities";
Expand Down
4 changes: 2 additions & 2 deletions packages/bets/src/playbook/deploy/use-paymaster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { promises as fs } from "fs";
import { Provider, utils, Wallet } from "zksync-web3";

import { localConfig } from "../../config";
import { Buffer, Wallets } from "../../entities";
import { Buffer } from "../../entities";
import { Helper } from "../../helper";

import type { HardhatRuntimeEnvironment } from "hardhat/types";
Expand Down Expand Up @@ -49,7 +49,7 @@ export default async function (hre: HardhatRuntimeEnvironment) {
},
});

const fee = gasPrice.mul(gasLimit.toString());
gasPrice.mul(gasLimit.toString());

const mintTx = await erc20.mint(emptyWallet.address, 90, {
customData: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Buffer, Logger, Wallets } from "../../../entities";
import { Buffer, Logger } from "../../../entities";
import { Helper } from "../../../helper";

let deployedContract: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
import { Buffer } from "../../../entities";
import { Helper } from "../../../helper";
import { Playbook } from "../../playbook";

export const deployViaPaymaster = async function () {
const helper = new Helper();
const playbookRoot = "src/playbook/";
const bufferPaymaster = playbookRoot + Buffer.paymaster;
const bufferCustomToken = playbookRoot + Buffer.paymaster;
const bufferEmptyWallet = playbookRoot + Buffer.emptyWalletAddress;

await helper.executeScript(`cd ${playbookRoot} && npm run compile`);
await helper.executeScript(`cd ${playbookRoot} && npm run deploy:paymaster`);

const paymasterAddress = await helper.getStringFromFile(bufferPaymaster);
const deployedToken = await helper.getStringFromFile(bufferCustomToken);
const emptyWallet = await helper.getStringFromFile(bufferEmptyWallet);

console.log("The custom token has been deployed via Paymaster: ", deployedToken);
console.log("The Paymaster transaction: ", paymasterAddress);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { promises as fs } from "fs";
import * as zksync from "zksync-web3";

import { localConfig } from "../../../config";
import { Buffer, Logger, Token, Wallets } from "../../../entities";
import { Buffer, Logger, Wallets } from "../../../entities";
import { Helper } from "../../../helper";

const helper = new Helper();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import * as ethers from "ethers";
import * as zksync from "zksync-web3";

import { localConfig } from "../../../config";
import { Logger, Wallets } from "../../../entities";
import { Logger } from "../../../entities";
import { Helper } from "../../../helper";

export const transferFailedState = async function (tokenAddress: string, tokenName?: string, units = 18) {
export const transferFailedState = async function (tokenAddress: string, tokenName?: string) {
const helper = new Helper();
const syncProvider = new zksync.Provider(localConfig.L2Network);
const ethProvider = ethers.getDefaultProvider(localConfig.L1Network);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { HardhatRuntimeEnvironment } from "hardhat/types";

import { Buffer } from "../../../entities";
import { Helper } from "../../../helper";

Expand Down
2 changes: 0 additions & 2 deletions packages/bets/tests/e2e/nft.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ let url: string;
let bufferFile;
let contract: string;
let element: Locator;
let selector: string;

//@id1658
test("Check the L2 NFT contract address", async ({ page }) => {
Expand All @@ -25,7 +24,6 @@ test("Check the L2 NFT contract address", async ({ page }) => {
await page.goto(targetUrl);

element = await page.locator(`text=${contract}`).first();
const richWallet = await page.locator(`text=0x36615...c049`).first();

await expect(element).toBeVisible(config.extraTimeout);
});
Expand Down
3 changes: 1 addition & 2 deletions packages/bets/tests/sdk-api/nft.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { setTimeout } from "timers/promises";

import { environment } from "../../src/config";
import { localConfig } from "../../src/config";
import { Logger, Token } from "../../src/entities";
import { Logger } from "../../src/entities";
import { Playbook } from "../../src/playbook/playbook";

describe("NFTs", () => {
Expand All @@ -13,7 +13,6 @@ describe("NFTs", () => {

describe("Deploy/check the NFT", () => {
jest.setTimeout(localConfig.standardTimeout);
let deployedToken: string;
const playbook = new Playbook();

//@id672
Expand Down
2 changes: 1 addition & 1 deletion packages/bets/tests/sdk-api/transactions/multiCall.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as request from "supertest";
import { setTimeout } from "timers/promises";

import { environment, localConfig } from "../../../src/config";
import { Buffer, Logger, Token, TransactionsStatus, TransactionsType, Wallets } from "../../../src/entities";
import { Buffer, Logger, Token, TransactionsType, Wallets } from "../../../src/entities";
import { Helper } from "../../../src/helper";
import { Playbook } from "../../../src/playbook/playbook";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as request from "supertest";
import { setTimeout } from "timers/promises";

import { environment, localConfig } from "../../../src/config";
import { Buffer, Logger, Token, TransactionsStatus, TransactionsType, Wallets } from "../../../src/entities";
import { Buffer, Logger, Token, TransactionsType, Wallets } from "../../../src/entities";
import { Helper } from "../../../src/helper";
import { Playbook } from "../../../src/playbook/playbook";

Expand Down

0 comments on commit f0c5d05

Please sign in to comment.