Summary
The macro extends every key in its inlined list without checking that the entry exists. A contract
can legitimately declare a key it has not written yet — long_escrow declares DataKey::Balance
before any deposit. Nothing in the suite pins down what happens on that path, so a future change to
the generated code could turn it into a panic without any test noticing.
Find out what the host actually does for extend_ttl on a missing key, then write the test that
records it.
Acceptance Criteria
Tech Stack
Rust (edition 2021, toolchain 1.93.0 pinned in rust-toolchain.toml), soroban-sdk 27.0.4,
target wasm32v1-none. Build with stellar contract build, never cargo build. Tests are
#[cfg(test)] modules on Env::default(); run them with cargo test --all.
Summary
The macro extends every key in its inlined list without checking that the entry exists. A contract
can legitimately declare a key it has not written yet —
long_escrowdeclaresDataKey::Balancebefore any deposit. Nothing in the suite pins down what happens on that path, so a future change to
the generated code could turn it into a panic without any test noticing.
Find out what the host actually does for
extend_ttlon a missing key, then write the test thatrecords it.
Acceptance Criteria
crates/maintainable/src/test.rscallsextend_allon a contract with a declaredpersistent key that was never written.
the key is skipped, or it returns a specific error.
Tech Stack
Rust (edition 2021, toolchain 1.93.0 pinned in
rust-toolchain.toml),soroban-sdk27.0.4,target
wasm32v1-none. Build withstellar contract build, nevercargo build. Tests are#[cfg(test)]modules onEnv::default(); run them withcargo test --all.