From 92b650ead37fad8e53362da8606bc60e176633e8 Mon Sep 17 00:00:00 2001 From: Marko Arambasic <131957563+kiriyaga-txfusion@users.noreply.github.com> Date: Mon, 2 Dec 2024 14:16:15 +0100 Subject: [PATCH] chore: test fix for new era test node dynamic fee calculation (#1556) * chore: test fix for new era test node dinamic fee calculation * chore: test e2e test for node-zksync task * chore: test e2e test for node-zksync task with port 8012 * chore: test e2e test for node-zksync task with port 8012 --------- Co-authored-by: Marko Arambasic --- e2e/fixture-projects/node/test.sh | 6 ++--- packages/hardhat-zksync-ethers/test/tests.ts | 24 ++++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/e2e/fixture-projects/node/test.sh b/e2e/fixture-projects/node/test.sh index 8dcda210..3a650cd0 100644 --- a/e2e/fixture-projects/node/test.sh +++ b/e2e/fixture-projects/node/test.sh @@ -6,13 +6,13 @@ set -e echo "Running node" -pnpm hardhat node-zksync & +pnpm hardhat node-zksync --port 8012 & -sleep 3 +sleep 10 LOG_FILE="./era_test_node.log" -if grep -q "Node is ready at 127.0.0.1:8011" "$LOG_FILE"; then +if grep -q "Listening on 127.0.0.1:8012" "$LOG_FILE"; then echo "ZKsync node started successfully." else echo "Failed to start ZKsync node. Exiting with code 1." diff --git a/packages/hardhat-zksync-ethers/test/tests.ts b/packages/hardhat-zksync-ethers/test/tests.ts index ebf28c87..ac8c453f 100644 --- a/packages/hardhat-zksync-ethers/test/tests.ts +++ b/packages/hardhat-zksync-ethers/test/tests.ts @@ -54,7 +54,7 @@ describe('Plugin tests', async function () { it('the provider should handle requests', async function () { const gasPrice = await this.env.ethers.providerL2.send('eth_gasPrice', []); - assert.strictEqual('0x17d7840', gasPrice); + assert.isDefined(gasPrice); }); it('should get the gas price', async function () { const feeData = await this.env.ethers.providerL2.getFeeData(); @@ -67,7 +67,7 @@ describe('Plugin tests', async function () { it('the provider should handle requests', async function () { const gasPrice = await this.env.ethers.provider.send('eth_gasPrice', []); - assert.strictEqual('0x17d7840', gasPrice); + assert.isNotNull(gasPrice); }); it('should get the gas price', async function () { const feeData = await this.env.ethers.provider.getFeeData(); @@ -392,7 +392,7 @@ describe('Plugin tests', async function () { it('the provider should handle requests', async function () { const gasPrice = await this.env.zksyncEthers.providerL2.send('eth_gasPrice', []); - assert.strictEqual('0x17d7840', gasPrice); + assert.isNotNull(gasPrice); }); it('should get the gas price', async function () { const feeData = await this.env.zksyncEthers.providerL2.getFeeData(); @@ -405,7 +405,7 @@ describe('Plugin tests', async function () { it('the provider should handle requests', async function () { const gasPrice = await this.env.zksyncEthers.provider.send('eth_gasPrice', []); - assert.strictEqual('0x17d7840', gasPrice); + assert.isNotNull(gasPrice); }); it('should get the gas price', async function () { const feeData = await this.env.zksyncEthers.provider.getFeeData(); @@ -447,7 +447,7 @@ describe('Plugin tests', async function () { const gasPrice = await wallet.provider.send('eth_gasPrice', []); - assert.strictEqual('0x17d7840', gasPrice); + assert.isNotNull(gasPrice); }); it('get valid second wallet', async function () { const wallet = await this.env.ethers.getWallet(1); @@ -458,7 +458,7 @@ describe('Plugin tests', async function () { const gasPrice = await wallet.provider.send('eth_gasPrice', []); - assert.strictEqual('0x17d7840', gasPrice); + assert.isNotNull(gasPrice); }); it('get invalid third wallet', async function () { try { @@ -478,7 +478,7 @@ describe('Plugin tests', async function () { const gasPrice = await wallet.provider.send('eth_gasPrice', []); - assert.strictEqual('0x17d7840', gasPrice); + assert.isNotNull(gasPrice); }); }); @@ -493,7 +493,7 @@ describe('Plugin tests', async function () { const gasPrice = await signer.provider.send('eth_gasPrice', []); - assert.strictEqual('0x17d7840', gasPrice); + assert.isNotNull(gasPrice); }); it('get valid second signer', async function () { const signer = await this.env.ethers.getSigner('0xa61464658AfeAf65CccaaFD3a512b69A83B77618'); @@ -502,7 +502,7 @@ describe('Plugin tests', async function () { const gasPrice = await signer.provider.send('eth_gasPrice', []); - assert.strictEqual('0x17d7840', gasPrice); + assert.isNotNull(gasPrice); const response = await signer.sendTransaction({ to: '0x36615Cf349d7F6344891B1e7CA7C72883F5dc049', @@ -550,7 +550,7 @@ describe('Plugin tests', async function () { const gasPrice = await wallet.provider.send('eth_gasPrice', []); - assert.strictEqual('0x17d7840', gasPrice); + assert.isNotNull(gasPrice); }); it('get invalid second wallet with mnemonic', async function () { try { @@ -570,7 +570,7 @@ describe('Plugin tests', async function () { const gasPrice = await wallet.provider.send('eth_gasPrice', []); - assert.strictEqual('0x17d7840', gasPrice); + assert.isNotNull(gasPrice); }); }); describe('wallets with empty accounts', async function () { @@ -600,7 +600,7 @@ describe('Plugin tests', async function () { const gasPrice = await wallet.provider.send('eth_gasPrice', []); - assert.strictEqual('0x17d7840', gasPrice); + assert.isNotNull(gasPrice); }); }); });