Skip to content

Emit Deposit and Withdraw ledger events #15

Description

@Code-Paragon

Problem

The deposit and withdraw functions mutate the vault state and user balances silently, making it impossible for standard blockchain explorers to parse individual LP activity.

Expected behavior

Both functions use env.events().publish() to broadcast structured logs detailing the user address, underlying amount transferred, and ysTokens minted/burned.

Files to update

  • src/vault.rs
  • src/test.rs

Project relevance

Provides the historical data layer required by external indexing tools and the internal analytics dashboard to chart user-specific portfolio activity over time.

Acceptance criteria

  • Feature works as described
  • Tests are added or updated where needed
  • Documentation is updated where needed
  • Events are published using specific symbols like Symbol::new(&env, "deposit")
  • No TypeScript, lint, test, or build errors

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