Skip to content

Conversation

@shekhirin
Copy link
Contributor

Test for #1200

@shekhirin shekhirin added this to the Productionization milestone Aug 22, 2025
@shekhirin shekhirin self-assigned this Aug 22, 2025
@jenpaff jenpaff linked an issue Aug 26, 2025 that may be closed by this pull request
@shekhirin shekhirin assigned klkvr and unassigned shekhirin Sep 1, 2025
@klkvr klkvr force-pushed the alexey/e2e-different-decimals branch from 9ec732c to 18a22d0 Compare September 2, 2025 10:52
@klkvr klkvr force-pushed the alexey/e2e-different-decimals branch from 18a22d0 to bbbbe50 Compare September 2, 2025 11:00
// Either 6 or 18 decimals to test interop between same asset UIDs with different decimals.
//
// TODO: is there a nicer way to do this deterministically?
let decimals_ = if provider.get_chain_id().await? % 2 == 0 { 6 } else { 18 };
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'd rather not tie this to chain ID, and instead maybe pass rng all the way to this function, so that we can set the seed if we want. Making it a derivative of chain ID means that all ERC-20 on that chain will have the same number of decimals, right?

Copy link
Member

@klkvr klkvr Sep 5, 2025

Choose a reason for hiding this comment

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

yeah agree that this feels a bit hacky, though I wouldn't want it to be random either because with 4 retries any failing test will likely just be retried and succeed

another option would be to run all kinds of configurations like we do with payment configs

relay/tests/e2e/mod.rs

Lines 45 to 51 in f8d6585

/// Runs all configurations (in both ERC20 and native payment methods).
pub async fn run_e2e<'a, F>(build_txs: F) -> Result<()>
where
F: Fn(&Environment) -> Vec<TxContext<'a>> + Send + Sync + Copy,
{
run_configs(build_txs, PaymentConfig::iter()).await
}

@klkvr
Copy link
Member

klkvr commented Sep 8, 2025

was merged into #1201

@klkvr klkvr closed this Sep 8, 2025
klkvr added a commit that referenced this pull request Sep 8, 2025
Fixes #1200

Blocked by #1220, needs testing

---------

Co-authored-by: Arsenii Kulikov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Interop assets might have different decimals across chains

4 participants