Logic used for the off-chain resolution of Majority protocol sessions
npm install @engage-protocol/game-result-calculationLogic used for the off-chain resolution of Majority protocol sessions with scripts for self-verification.
- Node v22+
- pnpm
Install dependencies:
``bash`
pnpm install
Use the input data file URL provided by UMA to run the script:
`bash`
pnpm start
Query the on-chain state and events data, and format it to fit the arguments of the calculateResults function. Save the data to a JSON file at ./scripts/data.json and run the following command:
`bash``
pnpm start file://./scripts/data.json