Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: tomg10 <[email protected]>
  • Loading branch information
tomg10 committed Sep 10, 2024
1 parent 367d5c2 commit 1780f9e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion core/tests/ts-integration/tests/erc20.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { shouldChangeTokenBalances, shouldOnlyTakeFee } from '../src/modifiers/b

import * as zksync from 'zksync-ethers';
import * as ethers from 'ethers';
import { goodGasPrice, scaledGasPrice, waitUntilBlockFinalized } from '../src/helpers';
import { scaledGasPrice, waitForIncreasedL1Nonce, waitUntilBlockFinalized } from '../src/helpers';
import { L2_DEFAULT_ETH_PER_ACCOUNT } from '../src/context-owner';

describe('ERC20 contract checks', () => {
Expand Down Expand Up @@ -56,6 +56,7 @@ describe('ERC20 contract checks', () => {
{ wallet: alice, change: amount }
]);
const feeCheck = await shouldOnlyTakeFee(alice, true);
let nonce = await alice._signerL1().getNonce();
await expect(
alice.deposit({
token: tokenDetails.l1Address,
Expand All @@ -70,6 +71,7 @@ describe('ERC20 contract checks', () => {
}
})
).toBeAccepted([l1BalanceChange, l2BalanceChange, feeCheck]);
await waitForIncreasedL1Nonce(nonce, alice);
});

test('Can perform a transfer', async () => {
Expand Down Expand Up @@ -241,6 +243,7 @@ describe('ERC20 contract checks', () => {
}

// deposit handle with the precalculated max amount
let nonce = await alice._signerL1().getNonce();
const depositHandle = await alice.deposit({
token: tokenDetails.l1Address,
amount: tokenDepositAmount,
Expand All @@ -255,6 +258,7 @@ describe('ERC20 contract checks', () => {
{ wallet: alice, change: tokenDepositAmount }
]);
await expect(depositHandle).toBeAccepted([l2TokenBalanceChange]);
await waitForIncreasedL1Nonce(nonce, alice);
});

afterAll(async () => {
Expand Down

0 comments on commit 1780f9e

Please sign in to comment.