genlayerlabs/genlayer-project-boilerplate
A sample smart contract that reads football match results with AI and settles bets
This is a boilerplate project for GenLayer, a blockchain platform, showing how to build an intelligent contract that lets users bet on football match outcomes. The contract fetches match results from BBC Sport, uses an LLM to extract the score, and settles bets, all wrapped with a linter, fast mock tests, full integration tests, and a Next.js frontend. It has 16259 stars, making it a widely used starting point in the GenLayer ecosystem.
What it does
- Uses a football betting contract as a working example of an 'intelligent contract' that combines web access with LLM integration
- genvm-lint checks contracts before deployment, catching forbidden imports, invalid storage types, and other rule violations
- Direct mode tests mock web and LLM calls to run in milliseconds, while integration tests deploy to a real GenLayer Studio and verify actual consensus behavior
- After a match, the contract fetches the BBC Sport page, has an LLM extract the score, and validates the result through the 'equivalence principle' consensus check
- Ships with a production-style Next.js 15 frontend in TypeScript plus deployment scripts, covering the whole path from contract to UI
Why it matters
It gives developers a concrete, working example of a decentralized application that combines blockchain logic with live web data and AI judgment, rather than a purely theoretical description. It also demonstrates a fast development loop, using only the linter and in-memory tests, useful for AI coding agents that need quick feedback without running a full Studio instance.
Terms in this repo
- intelligent contract · GenLayer's term for a smart contract that can do more than usual, such as accessing the web or calling an LLM
- LLM · a large language model that understands and generates text
- equivalence principle · GenLayer's consensus mechanism where validators compare non-deterministic web/LLM results to agree on an outcome
- GenVM linter · a static analysis tool that checks contract code for forbidden calls or invalid storage types before deployment
- direct mode tests · in-memory tests that mock web requests and LLM calls to run quickly without a live Studio
Repository description (English)
genlayerlabs/genlayer-project-boilerplate
Open on GitHubTrending repos
- cathrynlavery/diagram-designA skill that makes AI coding tools draw magazine-quality diagrams instead of generic rounded boxes
- public-apis/public-apisA giant crowd-curated directory of free APIs for developers
- semantica-agi/semanticaAn open-source graph infrastructure that lets AI agents show their work, not just their answers
- cactus-compute/needleA 14MB AI model small enough to run tool-calling on a phone or watch, without internet
- unslothai/unslothA desktop app that lets you run and train AI models on your own computer, no coding required
- macro-inc/macroAn all-in-one workspace where email, chat, docs, tasks, and CRM are cross-linked and share one AI memory
- harry0703/MoneyPrinterTurboAn open-source tool that turns a single topic or keyword into a finished short video, complete with script, footage, subtitles, and music
- basecamp/omarchyA ready-made, opinionated Linux setup built by DHH
Latest from METAL LAB
- Grok leaks conversations, location data via commands hidden in ciphertext
- Cursor lets agents handle long-running tasks with new "/goal" command
- NVIDIA releases Switchyard, an LLM routing proxy for coding agents
- Caveman Cuts Claude Code Token Usage by 33% Using Caveman-Speak
- Apple Keeps 2027 Target for Camera AirPods, Qwen3.8-27B Makes 80 Tool Calls Locally