Skip to content

Add integration test for sell event emitted with correct fields on successful sale #581

Description

@Chucks1093

Summary

The sell function should emit a contract event on success, but there is no integration test verifying the event fields. A test should perform a sell and assert the emitted event contains the correct seller, creator, quantity, proceeds, and ledger fields.

Scope

  • Set up a holder with 2 keys via buy transactions
  • Sell 1 key and extract the contract events from the result meta
  • Assert one sell event emitted with fields: seller, creator_id, quantity, proceeds, ledger
  • Assert proceeds equals the sell price at that supply step minus fees

Acceptance Criteria

  • Exactly one sell event emitted per transaction
  • All five fields present with correct values
  • proceeds matches sell price minus creator and protocol fees
  • ledger matches the transaction ledger number

ETA: 12 hours


Coordinate on Telegram

Metadata

Metadata

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