Skip to content

Emit Deposit Event on Vault Deposit #5

@greatest0fallt1me

Description

@greatest0fallt1me

Emit a Soroban contract event when a deposit is made, including depositor, amount, and new balance (or vault id) for indexing and transparency.

Requirements and context

  • Must be secure, tested, and documented
  • Should be efficient and easy to review
  • Use env.events().publish(...) with a stable event schema
  • Document event name and payload for Horizon/indexers

Suggested execution

  • Fork the repo and create a branch
  • git checkout -b feature/deposit-event
  • Implement changes
    • Define event struct or tuple (depositor, amount, new_balance, timestamp if needed)
    • Call env.events().publish(...) in deposit after state update
    • Add unit test that invokes deposit and asserts event emitted with correct data
  • Test and commit
    • Run tests; verify event in test
    • Include test output
  • Example commit message: feat: emit deposit event from vault

Guidelines

  • Minimum 95 percent test coverage
  • Clear documentation
  • Timeframe: 96 hours
  • Project details: #

Metadata

Metadata

Assignees

No one assigned

    Labels

    Stellar WaveIssues in the Stellar wave program

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions