Skip to content

Add helper for asserting contract event fields in test assertions #559

Description

@Chucks1093

Summary

Tests that verify emitted contract events repeat the same boilerplate to extract and compare event fields from the transaction result meta. A shared test helper should reduce this to a single assertion call.

Scope

  • Add assert_event(env, contract_id, topic, expected_fields) test helper
  • Helper should extract events from the transaction result, filter by topic, and compare fields
  • Add usage in at least two existing event-emitting test cases to validate the helper

Acceptance Criteria

  • Helper filters events by topic and contract correctly
  • Field comparison fails with a clear message on mismatch
  • Used in at least two existing test cases
  • No duplication of event extraction boilerplate in updated tests

ETA: 12 hours


Coordinate on Telegram

Metadata

Metadata

Assignees

No one assigned

    Labels

    GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions