Summary
The self-transfer check (crates/checks/src/transfer.rs) has inline unit tests but no standalone fixture crates under test-contracts/.
What to add
test-contracts/self-transfer-vulnerable/src/lib.rs — a transfer method that does not check from != to.
test-contracts/self-transfer-safe/src/lib.rs — the same method with an assert!(from != to) or equivalent guard.
Cargo.toml for each.
Acceptance criteria
- Vulnerable fixture produces at least one
self-transfer finding
- Safe fixture produces zero findings
cargo check passes inside each fixture directory
Summary
The
self-transfercheck (crates/checks/src/transfer.rs) has inline unit tests but no standalone fixture crates undertest-contracts/.What to add
test-contracts/self-transfer-vulnerable/src/lib.rs— atransfermethod that does not checkfrom != to.test-contracts/self-transfer-safe/src/lib.rs— the same method with anassert!(from != to)or equivalent guard.Cargo.tomlfor each.Acceptance criteria
self-transferfindingcargo checkpasses inside each fixture directory