Skip to content

Add test fixtures for self-transfer check (safe + vulnerable crates) #118

Description

@lonerthefirst3-sudo

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

  1. test-contracts/self-transfer-vulnerable/src/lib.rs — a transfer method that does not check from != to.
  2. test-contracts/self-transfer-safe/src/lib.rs — the same method with an assert!(from != to) or equivalent guard.
  3. 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

Metadata

Metadata

Labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions