Skip to content

Add contract events for TTL extension and protocol fee recipient updates with shared event assertion helper #573

Description

@Chucks1093

Summary

Two admin and lifecycle operations — storage TTL extension and protocol fee recipient updates — emit no observable events, leaving indexers with no signal unless they poll storage directly. Both events should be added together with a shared test assertion helper that makes event verification consistent across all future event tests.

Scope

  • Emit a contract event on TTL extension with fields: creator_id, extended_at_ledger, new_expiry_ledger
  • Emit a contract event on set_protocol_fee_recipient with fields: old_recipient, new_recipient, updated_at_ledger
  • Each event must use a distinct topic so indexers can filter without scanning all events
  • Add assert_event(env, contract_id, topic, expected_fields) test helper — extracts events from transaction result meta, filters by topic, compares fields with a clear mismatch message
  • Use the helper in tests for both new events

Acceptance Criteria

  • TTL extension event emitted with correct fields on every extension call
  • Fee recipient event emitted with correct fields on every admin update
  • Each event has a distinct topic
  • assert_event helper filters by topic and contract correctly
  • Field mismatch produces a clear assertion message
  • Both new event tests use the shared helper

ETA: 12 hours


Coordinate on Telegram

Metadata

Metadata

Assignees

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