Summary
Setting up several tokens in a fixture requires repeated .with_token() calls:
let env = MockEnv::builder()
.with_token("USDC", 6)
.with_token("EURC", 6)
.with_token("BTC", 8)
.with_token("ETH", 18)
.build();
A bulk registration method would reduce noise in fixture setup code.
Proposed API
let env = MockEnv::builder()
.with_tokens([
("USDC", 6),
("EURC", 6),
("BTC", 8),
("ETH", 18),
])
.build();
Or using a typed enum for well-known assets:
.with_tokens([WellKnownAsset::USDC, WellKnownAsset::EURC])
Acceptance Criteria
Summary
Setting up several tokens in a fixture requires repeated
.with_token()calls:A bulk registration method would reduce noise in fixture setup code.
Proposed API
Or using a typed enum for well-known assets:
Acceptance Criteria
with_tokens()accepts anyIntoIterator<Item = (&str, u32)>env.token("USDC")after buildWellKnownAssetenum added with USDC, EURC, XLM variants (optional, feature-gated)with_token()unchanged