About this project
This boilerplate demonstrates a GenLayer use case centered on a Football Bets intelligent contract. Users create bets by supplying a match date, teams, and predicted winner. After a match, the contract retrieves results from BBC Sport, uses an LLM to extract the score, and validates resolution through GenLayer's equivalence mechanism. Correct predictions award points, and the contract exposes user-point and leaderboard views.
The repository provides a complete development workflow. Python contracts live in the contracts directory, while direct tests run in memory with pytest and mock both web requests and LLM calls for fast feedback. Integration tests deploy to GenLayer Studio and exercise end-to-end consensus behavior. A genvm-lint configuration checks contracts for issues such as forbidden imports, invalid storage types, missing decorators or annotations, and non-deterministic operations.
Included tooling covers GitHub Actions CI for linting and direct tests, gltest network configuration, TypeScript deployment scripts, and configuration templates. The frontend is a Next.js 15 application using TypeScript, TanStack Query, and Radix UI; it connects to a deployed contract through an environment variable.
Requirements include Python 3.12 or newer, the globally installed GenLayer CLI, and GenLayer Studio for integration testing or deployment. The documented workflow is to lint after contract changes, run direct tests frequently during development, and run Studio integration tests before deployment.
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.