Skip to content

refactor(l2): rewrite integration tests #2681

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

Merged
merged 8 commits into from
May 8, 2025
Merged

refactor(l2): rewrite integration tests #2681

merged 8 commits into from
May 8, 2025

Conversation

ManuelBilbao
Copy link
Contributor

@ManuelBilbao ManuelBilbao commented May 6, 2025

Motivation

L2 tests were broken since two tests were waiting for funds in L2 without depositing.

Description

  • Adds test_deposit, test_transfer, test_withdraw, test_deploy, test_call_with_deposit functions that are used by all the tests.
  • The deposits and transfers are now done from an L1 rich wallet to a random L2 wallet.
  • Adds L1ToL2TransactionData struct to the SDK. This struct contains the current L2 data for privileged transactions.
  • Adds send_l1_to_l2_transaction function to the SDK.
  • Adds deposit_through_contract_call function to the SDK (wrapper over the above).

@ManuelBilbao ManuelBilbao requested a review from a team as a code owner May 6, 2025 17:26
@ManuelBilbao ManuelBilbao added the L2 Rollup client label May 6, 2025
Copy link

github-actions bot commented May 6, 2025

Lines of code report

Total lines added: 94
Total lines removed: 0
Total lines changed: 94

Detailed view
+----------------------------------------------+-------+------+
| File                                         | Lines | Diff |
+----------------------------------------------+-------+------+
| ethrex/crates/l2/sdk/src/l1_to_l2_tx_data.rs | 71    | +71  |
+----------------------------------------------+-------+------+
| ethrex/crates/l2/sdk/src/sdk.rs              | 237   | +23  |
+----------------------------------------------+-------+------+

@ilitteri ilitteri changed the title fix(l2): deposit funds to L2 at start of tests refactor(l2): rewrite integration tests May 7, 2025
@jrchatruc jrchatruc added this pull request to the merge queue May 8, 2025
Merged via the queue into main with commit af8f6ec May 8, 2025
12 checks passed
@jrchatruc jrchatruc deleted the fix_l2_tests branch May 8, 2025 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L2 Rollup client
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants