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

safety precautions for on_idle hook #864

Merged

safety precautions for on_idle hook

011e11e
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
Merged

safety precautions for on_idle hook #864

safety precautions for on_idle hook
011e11e
Select commit
Loading
Failed to load commit list.
GitHub Actions / E2E report yarn test-rolldownWithdrawal succeeded Dec 9, 2024 in 0s

E2E report yarn test-rolldownWithdrawal ✅

Tests passed successfully

✅ e2eTests/reports/junit.xml-59954e20-b60a-11ef-ba0e-c76ab0ae51a7.xml

11 tests were completed in 1086s with 11 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
test/sequential/rolldown.withdraw.fees.test.ts 5✅ 119s
test/sequential/rolldown.withdraw.merkleRoot.test.ts 6✅ 967s

✅ test/sequential/rolldown.withdraw.fees.test.ts

✅ GIVEN a withdrawal, WHEN paying with GASP and withdrawing GASP, some fees goes to treasury
✅ GIVEN a withdrawal, WHEN paying with GASP and withdrawing Eth, some fees goes to treasury
✅ GIVEN a withdrawal, WHEN paying with GASP and withdrawing ALL GASP, extrinsic fail
✅ GIVEN a withdrawal, WHEN user having only Eth and withdrawing Eth, extrinsic fail
✅ Given a fee withdrawal payment WHEN withdrawal is sent from another account THEN the fee is deducted from from sender's account

✅ test/sequential/rolldown.withdraw.merkleRoot.test.ts

Withdraw & Batches tests -
  ✅ Given a cancel WHEN block is processed THEN it will create an update that needs to be sent through a batch to L1 for justification
  ✅ Given a withdraw extrinsic run WHEN token address does not exist THEN a withdraw fail and no l2update is stored
  ✅ Given a withdraw extrinsic run WHEN token address exist but requester does not have funds THEN a withdraw fail and no l2update is stored
  ✅ Given a succeed withdraw, when block is executed Then tokens are removed from user wallet
  ✅ GIVEN <batchSize - 1> withdraws, AND manually generated batch and create another withdraw for some other network (arb) THEN the batch is not generated
  ✅ Given a failed deposit TX, then a withdrawal can be created by `refundFailedDeposit