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

feat: integration tests setup #177

Draft
wants to merge 433 commits into
base: main
Choose a base branch
from
Draft

feat: integration tests setup #177

wants to merge 433 commits into from

Conversation

pcheremu
Copy link
Collaborator

@pcheremu pcheremu commented Feb 15, 2024

What ❔

no changes with integration-tests branch except fixed commit signatures

Integration tests setup

Why ❔

Checklist

  • PR title corresponds to the body of PR (we generate changelog entries from PRs).
  • Tests for the changes have been added / updated.
  • Documentation comments have been added / updated.

Romsters and others added 30 commits February 15, 2024 16:36
# What ❔

- use new tokens API
- remove token library
- remove token price API usage
- refactoring
# What ❔

Refactor TokenIconLabel component and its usage.

## Why ❔

The problem came from the local environment where we don't have ETH in
DB and it's not returned by the tokens endpoint so the custom token icon
is shown:
<img width="477" alt="image"
src="https://github.com/matter-labs/block-explorer/assets/6553665/932bc268-6af3-4f3e-881f-43575068f680">

since we already have a token icon url in upsteam components - we can
just pass it to TokenIconLabel component and simplify the component
itself.

<img width="474" alt="image"
src="https://github.com/matter-labs/block-explorer/assets/6553665/1601b1c2-2f90-468a-a8c9-d725274436cf">


## Checklist

<!-- Check your PR fulfills the following items. -->
<!-- For draft PRs check the boxes as you complete them. -->

- [X] PR title corresponds to the body of PR (we generate changelog
entries from PRs).
- [X] Tests for the changes have been added / updated.
# What ❔

- remove tokens minLiquidity filter when value is 0 as provider doesn't
return 0 liquidity tokens when filter is set to 0
# What ❔

- validate bridge init log to be produced by bridge contract

## Why ❔

- if token is bridged outside of bridge it can't rely on provided token
l1 address
# What ❔

1. Remove new prover notification since it's not needed anymore.
2. Add Sepolia Testnet production configuration.

## Why ❔

We need a Sepolia block explorer production environment to eventually
use it as a main Testnet environment.

## Checklist

<!-- Check your PR fulfills the following items. -->
<!-- For draft PRs check the boxes as you complete them. -->

- [X] PR title corresponds to the body of PR (we generate changelog
entries from PRs).
- [X] Tests for the changes have been added / updated.
# What ❔

- add coingecko tokens off-chain data provider

## Why ❔

- to support both L1 and L2 zksync tokens

## Checklist

<!-- Check your PR fulfills the following items. -->
<!-- For draft PRs check the boxes as you complete them. -->

- [+ ] PR title corresponds to the body of PR (we generate changelog
entries from PRs).
- [ +] Tests for the changes have been added / updated.
# What ❔

Hide Sepolia network on prod.

## Why ❔

We need to hold off on announcing Sepolia support in Block Explorer
until all other teams are ready to do this.

## Checklist

<!-- Check your PR fulfills the following items. -->
<!-- For draft PRs check the boxes as you complete them. -->

- [X] PR title corresponds to the body of PR (we generate changelog
entries from PRs).
# What ❔

Renamed tokens page title to "To tokens"

## Why ❔

We show only top tokens there, not all of them
…ches/blocks (#107)

# What ❔

Different _no transaction_ messages for non-existing and empty
batches/blocks:
Empty batch:
<img width="1259" alt="image"
src="https://github.com/matter-labs/block-explorer/assets/6553665/b3f8d9fc-dee8-4178-91c3-26eaff3be660">
Non-existing batch:
<img width="1263" alt="image"
src="https://github.com/matter-labs/block-explorer/assets/6553665/da083f5f-c887-41f0-9173-0c51064fca91">

## Why ❔

For better UX we want to show different _no transaction_ messages in
different cases:
`This Batch doesn’t have any transactions` - for empty batch,
`This Batch has not been created or sealed yet` - for non-existing
batch,
same for blocks.

## Checklist

<!-- Check your PR fulfills the following items. -->
<!-- For draft PRs check the boxes as you complete them. -->

- [X] PR title corresponds to the body of PR (we generate changelog
entries from PRs).
- [X] Tests for the changes have been added / updated.
# What ❔

Enable sepolia network on prod.

## Checklist

<!-- Check your PR fulfills the following items. -->
<!-- For draft PRs check the boxes as you complete them. -->

- [X] PR title corresponds to the body of PR (we generate changelog
entries from PRs).
…erGas fields for transaction (#109)

# What ❔

Return `gasUsed`, `gasPerPubdata`, `maxFeePerGas` and
`maxPriorityFeePerGas` fields for transaction.

## Why ❔

For better UX we want to show gas and fee related fields on UI so we
need to return these fields from the API first.

## Checklist

<!-- Check your PR fulfills the following items. -->
<!-- For draft PRs check the boxes as you complete them. -->

- [X] PR title corresponds to the body of PR (we generate changelog
entries from PRs).
- [X] Tests for the changes have been added / updated.
# What ❔

- fetch and store tx error and revert reason;
- return tx error and revert reason via API;
- display tx error on UI;

## Why ❔

- fast way to see what's the reason of transaction failure;

## Checklist

- [+] PR title corresponds to the body of PR (we generate changelog
entries from PRs).
- [+] Tests for the changes have been added / updated.
- [+] Documentation comments have been added / updated.
# What ❔

Sepolia staging hostname.

- [X] PR title corresponds to the body of PR (we generate changelog
entries from PRs).
# What ❔

- remove $ from copy-pasteable commands
- add sepolia links
# What ❔

<img width="441" alt="image"
src="https://github.com/matter-labs/block-explorer/assets/6553665/b69c7a82-4f3a-4afa-abc5-8b7385a5079d">

## Why ❔

For better user experience it was requested to show gas fields and
limits on UI.

## Checklist

<!-- Check your PR fulfills the following items. -->
<!-- For draft PRs check the boxes as you complete them. -->

- [X] PR title corresponds to the body of PR (we generate changelog
entries from PRs).
- [X] Tests for the changes have been added / updated.
…d of a separate call (#115)

# What ❔

Api contract endpoint to use `creatorAddress` field instead of a
separate DB call to fetch txReceipt.

## Why ❔

We don't need a DB call to fetch contract creator address.

## Checklist

<!-- Check your PR fulfills the following items. -->
<!-- For draft PRs check the boxes as you complete them. -->

- [X] PR title corresponds to the body of PR (we generate changelog
entries from PRs).
- [X] Tests for the changes have been added / updated.
# What ❔

update ui tests for sepolia

## Why ❔

keep tests up to date

## Checklist


- [+ ] PR title corresponds to the body of PR (we generate changelog
entries from PRs).
- [ +] Tests for the changes have been added / updated.
- [- ] Documentation comments have been added / updated.
# What ❔

- show logs without parsed event if it fails.

## Why ❔

- currently it shows no logs at all if even one of many logs is failed
to parse.

This is a quick fix for now. The issue can be reproduced with proxy
contracts if there are some events emitted which are defined in the
implementation contract. To properly fix it we should use both proxy and
implementation ABI.
# What ❔

- Save tokens which affected balances after processing every block.

## Why ❔

- If token initially deployed didn't have all the required attributes we
need to try to save it again later.

## Checklist

- [+] PR title corresponds to the body of PR (we generate changelog
entries from PRs).
- [+] Tests for the changes have been added / updated.
# What ❔

Use liquidity tokens filter only on mainnet.

## Why ❔

To show tokens without liquidity on testnets, local envs and
hyperchains.

## Checklist

<!-- Check your PR fulfills the following items. -->
<!-- For draft PRs check the boxes as you complete them. -->

- [X] PR title corresponds to the body of PR (we generate changelog
entries from PRs).
- [X] Tests for the changes have been added / updated.
olehbairak and others added 22 commits March 12, 2024 19:28
Fixed explicit timeout and changed const txSumETH to enum data type
…t-cases

test: create autotests for Withdraw test cases
…t-for-Accounts-tc1854

test: create autotest for Accounts tc1854
…sapi-accounts-api-automate-test-cases-for-contracts-api
Added test cases for tc1966, tc1952, tc1950, tc1949
…api-deposit-multitransfer-transfer

test: new automation test for Multitransfer + Transfer
…-accounts-api-automate-test-cases-for-contracts-api

feat: new automation scope for tests on Contracts API + Tokens API
@pcheremu pcheremu marked this pull request as draft April 9, 2024 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automation writing/fixing/maintaining auto-tests/e2e-tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants