Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: test fix for new era test node dynamic fee calculation #1556

Merged
merged 4 commits into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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