Skip to content

Conversation

@AbilityTechy
Copy link

This PR implements the core event creation mechanism for the Predictify hybrid smart contract, enabling administrators to create, validate, and store prediction events. This feature creates a foundation for event management distinct from the full market lifecycle.

Changes

  • New Types: Added Event struct and EventStatus enum to manage event state.
  • Storage: Implemented EventStorage for secure persistence and unique ID generation.
  • Validation: Added EventValidator to enforce business rules (future end times, minimum outcomes, valid descriptions).
  • Event Emission: Introduced EventCreatedEvent to notify off-chain indexers of new events.
  • Core Logic: Implemented create_event and get_event functions in the main contract.
  • Testing: Added comprehensive unit and integration tests covering happy paths, authorization, and edge cases.

Checklist

  • Code compiles and passes local tests
  • New types and storage patterns follow existing conventions
  • Input validation added for all user-supplied data
  • Events are emitted for tracking

Related Issues

Closes #196

@greatest0fallt1me
Copy link
Contributor

@AbilityTechy, please resolve the conflicts.

@greatest0fallt1me
Copy link
Contributor

@AbilityTechy, please fix the pipeline and resolve the conflicts.

@greatest0fallt1me
Copy link
Contributor

@AbilityTechy

1 similar comment
@greatest0fallt1me
Copy link
Contributor

@AbilityTechy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: implement event creation for prediction markets

2 participants