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
- vorssaint/vorssaint-utilsOne free menu bar app replaces a dozen paid Mac utilities
- Alishahryar1/free-claude-codeA local proxy that lets coding AI agents run on 49 free or cheap model providers instead of one paid service
- freestylefly/awesome-gpt-image-2A library of 532 reverse-engineered prompts that turn GPT-Image2 into a predictable image-making tool
- block/buzzAn open-source workspace where humans and AI agents chat, code, and review in the same rooms
- NousResearch/hermes-agentNous Research's Hermes is an AI agent that gets smarter the more you use it
- virgiliojr94/book-to-skillA tool that turns technical book PDFs into on-demand reference skills for AI coding agents
- VoltAgent/awesome-agent-skillsA single hub collecting over 1000 'how-to' manuals that make AI coding assistants act like experts
- anthropics/claude-plugins-communityA shared shelf where anyone's Claude add-ons get listed for install