Skip to content

feat: add renaissance-oracle contract with 2-of-N multi-sig confirmation#17

Open
ComputerOracle wants to merge 1 commit into
Exquisitech:mainfrom
ComputerOracle:feat/oracle-contract
Open

feat: add renaissance-oracle contract with 2-of-N multi-sig confirmation#17
ComputerOracle wants to merge 1 commit into
Exquisitech:mainfrom
ComputerOracle:feat/oracle-contract

Conversation

@ComputerOracle

Copy link
Copy Markdown

feat: Oracle Contract — 2-of-N multi-sig match result verification

Adds renaissance-oracle, a dedicated on-chain oracle contract that accepts verified football match results from authorized data providers and makes them
available to the betting and rewards contracts.

What's included:

  • submit_result — first oracle submits a result; enforces [started_at, finished_at] window via ledger timestamp
  • confirm_result — additional oracles confirm; same oracle cannot confirm twice
  • get_result / is_finalized — read-only getters for downstream contracts
  • 2-of-N threshold: result is finalized only after 2 distinct oracle signatures
  • Errors: OracleUnauthorized, AlreadySubmitted, AlreadyConfirmed, ResultNotFound, AlreadyFinalized, WindowViolation
  • Events: ResultSub, ResultCon, ResultFin

Tests cover:

  • Happy path 2-of-2 finalization
  • Double-submit rejection
  • Double-confirm rejection
  • Late submission (after finished_at)
  • Early submission (before started_at)
  • Unauthorized submit and confirm

closes #12

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.

implement match result oracle contract

1 participant