Skip to content

Commit

Permalink
chore: test fix for new era test node dynamic fee calculation (#1556)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
kiriyaga-txfusion and kiriyaga authored Dec 2, 2024
1 parent 0225ebd commit 92b650e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
6 changes: 3 additions & 3 deletions e2e/fixture-projects/node/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down
24 changes: 12 additions & 12 deletions packages/hardhat-zksync-ethers/test/tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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();
Expand Down Expand Up @@ -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();
Expand All @@ -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();
Expand Down Expand Up @@ -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);
Expand All @@ -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 {
Expand All @@ -478,7 +478,7 @@ describe('Plugin tests', async function () {

const gasPrice = await wallet.provider.send('eth_gasPrice', []);

assert.strictEqual('0x17d7840', gasPrice);
assert.isNotNull(gasPrice);
});
});

Expand All @@ -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');
Expand All @@ -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',
Expand Down Expand Up @@ -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 {
Expand All @@ -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 () {
Expand Down Expand Up @@ -600,7 +600,7 @@ describe('Plugin tests', async function () {

const gasPrice = await wallet.provider.send('eth_gasPrice', []);

assert.strictEqual('0x17d7840', gasPrice);
assert.isNotNull(gasPrice);
});
});
});
Expand Down

0 comments on commit 92b650e

Please sign in to comment.