Skip to content

Issue 23 — mock-amm.swap parameter naming is misleading #23

Description

@Junman140

Labels: code-quality, priority:low
Body:

Problem
swap(env, to, amount_in, min_amount_out) uses to for the address that is both paying token_in and receiving token_out. This reads as "recipient only" and will confuse anyone extending it to support swap-and-send-elsewhere.

Proposed fix
Rename to trader (or split into payer/recipient if swap-to-another-address becomes a requirement).

Acceptance criteria

  • Parameter renamed, call sites updated
  • Doc comment clarifies semantics

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions