Skip to content

[Soroban] Payment reference (memo) validation in contract #818

Description

@Xaxxoo

Overview

Store the expected payment memo in the contract and validate that incoming deposits reference it correctly, preventing funds from being credited to the wrong payment.

Tasks

  • Store memo: Bytes per payment in contract storage
  • Add validate_memo(payment_id, memo) view function
  • NestJS calls validate_memo before confirming payment
  • Return error code for memo mismatch
  • Unit test mismatched and correct memo scenarios

Acceptance Criteria

  • Deposits with wrong memo cannot be confirmed
  • NestJS double-checks memo via contract before DB update

Activity

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions