Skip to content

[Contract] — Feature: Add is_event_finalized lightweight boolean view #1031

Description

@Olowodarey

Background

Clients that need only a yes/no answer for finalization must call get_event
and inspect the full Event struct. This is expensive for monitoring tools that
poll large numbers of events. A lightweight boolean view is needed.

Goal

Add is_event_finalized(env, event_id) -> bool that reads only the
Event.is_finalized flag.

Tasks

  1. In src/views.rs, add:
  2. Wire into lib.rs:
  3. Add tests in tests/views_tests.rs:

Acceptance Criteria

  • Correct boolean returned in all three states.
  • Consistent with get_event().is_finalized.

Files

contracts/creator-event-manager/src/views.rs,
contracts/creator-event-manager/src/lib.rs,
contracts/creator-event-manager/tests/views_tests.rs.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions