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

Fix failing e2e tests in test_viem_tx #293

Merged
merged 6 commits into from
Dec 17, 2024

Conversation

Kourin1996
Copy link

Fixes https://github.com/celo-org/celo-blockchain-planning/issues/844

This PR fixes failing e2e tests e2e_test/js-tests/test_viem_tx.mjs

Fixes made

  • send overlapping nonce tx in different currencies
    • Fixes calculation of failToBumpCurrencyCap. The original calculation converted (native token fee) - 1 to the token fee value by multiplying it by numerator and dividing it by a large denominator. However, this division effectively negated the decrement operation. The new calculation make sure to get a lower fee rather than the given amount.
    • Increases timeout to 60s (It takes around 50s when running locally)
  • send fee currency tx with just high enough gas price
    • Casts from BigInt to Number because chai's assert functions reject BigInt arguments for integers comparison

How to check locally

export NETWORK=alfajores
./e2e_test/run_all_tests.sh viem

@Kourin1996 Kourin1996 self-assigned this Dec 10, 2024
@Kourin1996 Kourin1996 marked this pull request as draft December 10, 2024 14:11
@Kourin1996 Kourin1996 marked this pull request as ready for review December 10, 2024 22:25
Copy link

@piersy piersy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Kourin1996 it's great to have these tests working again!

@Kourin1996 Kourin1996 changed the base branch from celo10 to celo11 December 17, 2024 13:46
@Kourin1996 Kourin1996 changed the base branch from celo11 to celo10 December 17, 2024 13:47
@Kourin1996 Kourin1996 force-pushed the Kourin1996/fix-e2e-test_viem_tx branch from edf019e to 69234e4 Compare December 17, 2024 14:14
@Kourin1996 Kourin1996 changed the base branch from celo10 to celo11 December 17, 2024 14:14
@Kourin1996 Kourin1996 merged commit e49dd9e into celo11 Dec 17, 2024
4 checks passed
@Kourin1996 Kourin1996 deleted the Kourin1996/fix-e2e-test_viem_tx branch December 17, 2024 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants