Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Romsters committed Dec 12, 2024
1 parent 5bf6d11 commit 9da055e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
14 changes: 7 additions & 7 deletions e2e-tests/test/anvil-apis.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ const provider = getTestProvider();

describe("anvil_setNextBlockBaseFeePerGas", function () {
it("Should change gas price", async function () {
const oldBaseFee = (await provider.getGasPrice());
const oldBaseFee = await provider.getGasPrice();
const expectedNewBaseFee = oldBaseFee + 42n;

// Act
await provider.send("anvil_setNextBlockBaseFeePerGas", [ethers.toBeHex(expectedNewBaseFee)]);

// Assert
const newBaseFee = (await provider.getGasPrice());
const newBaseFee = await provider.getGasPrice();
expect(newBaseFee).to.equal(expectedNewBaseFee);

// Revert
Expand All @@ -28,7 +28,7 @@ describe("anvil_setNextBlockBaseFeePerGas", function () {
it("Should produce a block with new gas price", async function () {
const wallet = new Wallet(RichAccounts[0].PrivateKey, provider);
const userWallet = Wallet.createRandom().connect(provider);
const oldBaseFee = (await provider.getGasPrice());
const oldBaseFee = await provider.getGasPrice();
const expectedNewBaseFee = oldBaseFee + 42n;

// Act
Expand Down Expand Up @@ -318,8 +318,8 @@ describe("anvil_impersonateAccount & anvil_stopImpersonatingAccount", function (
await provider.send("anvil_stopImpersonatingAccount", [richAccount]);

// Assert
expect((await userWallet.getBalance())).to.eq(ethers.parseEther("0.42"));
expect((await provider.getBalance(richAccount))).to.eq(beforeBalance - ethers.parseEther("0.42"));
expect(await userWallet.getBalance()).to.eq(ethers.parseEther("0.42"));
expect(await provider.getBalance(richAccount)).to.eq(beforeBalance - ethers.parseEther("0.42"));
});
});

Expand All @@ -345,8 +345,8 @@ describe("anvil_autoImpersonateAccount", function () {
await provider.send("anvil_autoImpersonateAccount", [false]);

// Assert
expect((await userWallet.getBalance())).to.eq(ethers.parseEther("0.42"));
expect((await provider.getBalance(richAccount))).to.eq(beforeBalance - ethers.parseEther("0.42"));
expect(await userWallet.getBalance()).to.eq(ethers.parseEther("0.42"));
expect(await provider.getBalance(richAccount)).to.eq(beforeBalance - ethers.parseEther("0.42"));
});
});

Expand Down
5 changes: 1 addition & 4 deletions e2e-tests/test/hardhat-apis.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,7 @@ describe("hardhat_mine", function () {
const startingTimestamp: number = await provider.send("config_getCurrentTimestamp", []);

// Act
await provider.send("hardhat_mine", [
ethers.toBeHex(numberOfBlocks),
ethers.toBeHex(intervalInSeconds),
]);
await provider.send("hardhat_mine", [ethers.toBeHex(numberOfBlocks), ethers.toBeHex(intervalInSeconds)]);

// Assert
const latestBlock = await provider.getBlock("latest");
Expand Down

0 comments on commit 9da055e

Please sign in to comment.