@engage-protocol/game-result-calculation
Version:
Logic used for the off-chain resolution of Engage Protocol and Majority sessions
33 lines (20 loc) • 690 B
Markdown
# Majority Protocol Off-Chain Session Resolution
Logic used for the off-chain resolution of Majority Protocol sessions with scripts for self-verification.
## Prerequisites
- Node v22+
- [pnpm](https://pnpm.io/installation)
## Run verification
Install dependencies:
```bash
pnpm install
```
### Via remote file
Use the input data file URL provided by UMA to run the script:
```bash
pnpm start <url>
```
### Via self-retrieved data
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
```