Skip to content
This repository was archived by the owner on Aug 3, 2026. It is now read-only.

feat: use RNG instead of chain ID for ERC20 decimals in tests - #1493

Open
DeVikingMark wants to merge 1 commit into
ithacaxyz:mainfrom
DeVikingMark:feat/erc20-random-decimals-testing
Open

feat: use RNG instead of chain ID for ERC20 decimals in tests#1493
DeVikingMark wants to merge 1 commit into
ithacaxyz:mainfrom
DeVikingMark:feat/erc20-random-decimals-testing

Conversation

@DeVikingMark

Copy link
Copy Markdown

Problem

All ERC20 tokens on the same chain have identical decimals (determined by chain ID), limiting test scenarios.

Solution

  • Replace provider.get_chain_id().await? % 2 == 0 with rand::random::<bool>()
  • Add tests to validate random decimal generation

Changes

  • Modified: tests/e2e/environment.rs
    • Updated deploy_erc20() to use RNG for decimal selection
    • Added test cases for decimal randomness validation

Fixes #1345

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Test ERC20s with different decimals combinations

1 participant