Problem Statement. Config.allowed_tokens is unbounded. A repeated invocation of
set_config with thousands of distinct addresses bloats the wasm instance storage
permanently.
Why it matters. Soroban host costs grow with storage footprint. The contract should
self-protect.
Technical Context. set_config writes the entire Vec<Address> each call.
Expected Outcome. A new MAX_ALLOWED_TOKENS constant (default 32) enforced in
set_config returning a new error variant Error::TooManyAllowedTokens.
Acceptance Criteria.
- Test attempts
set_config with allowed_tokens: vec[0..=MAX = 33] returns error.
- All existing tests pass.
Files or modules likely to be affected. src/lib.rs, tests/aid_escrow_tests.rs.
Difficulty. Easy
Estimated effort. S
Backlog item #25 from `docs/maintainer-issue-backlog.md.
Problem Statement.
Config.allowed_tokensis unbounded. A repeated invocation ofset_configwith thousands of distinct addresses bloats the wasm instance storagepermanently.
Why it matters. Soroban host costs grow with storage footprint. The contract should
self-protect.
Technical Context.
set_configwrites the entireVec<Address>each call.Expected Outcome. A new
MAX_ALLOWED_TOKENSconstant (default 32) enforced inset_configreturning a new error variantError::TooManyAllowedTokens.Acceptance Criteria.
set_configwithallowed_tokens: vec[0..=MAX = 33]returns error.Files or modules likely to be affected.
src/lib.rs,tests/aid_escrow_tests.rs.Difficulty. Easy
Estimated effort. S
Backlog item #25 from `docs/maintainer-issue-backlog.md.