Skip to content

[Contract] Resolve dead code and reach a clean clippy #27

Open

Description

@Gbangbolaoluwagbemiga

Problem

#[allow(dead_code)] masks unused functions — get_next_escrow_id and is_authorized_arbiter
in escrow_core.rs. Dead code hides intent and bloats the WASM.

What needs to be done

  • Determine whether each #[allow(dead_code)] item is genuinely needed; wire it into the flow or delete it
  • Remove the #[allow(dead_code)] attributes
  • Run cargo clippy --all-targets -- -D warnings and fix everything it flags
  • Run cargo fmt

Acceptance criteria

  • Zero #[allow(dead_code)] in contracts/secureflow/src/
  • cargo clippy -- -D warnings passes clean

Relevant files

contracts/secureflow/src/escrow_core.rs

Good first issue — small, self-contained, great way to learn the contract layout.

Activity

  1. changed the title [-]Resolve dead code and reach a clean clippy[/-] [+][Contract] Resolve dead code and reach a clean clippy[/+] on Jun 17, 2026
  2. guptakumarranjeet150 commented on Oct 7, 2026

    @guptakumarranjeet150

    Greetings,

    I would like to work on this issue.

    Plan:

    1. Audit storage layout and state invariants ensuring strict auth guards.
    2. Implement deterministic state transitions with safe checked arithmetic.
    3. Add hermetic unit and regression tests covering authorized, unauthorized, and boundary edge cases.
    4. Profile instruction and CPU/gas limits under Soroban host environment.

    Could you please assign this issue to me? Looking forward to delivering a clean PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    good-first-issueGood entry point for new contributorsqualityCode quality & correctness cleanups

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions