Deploy a smart contract that automatically fetches live sports results from a URL and resolves user bets without a middleman.
Build a Next.js web frontend that lets users place predictions and view results from a live GenLayer smart contract.
Use this boilerplate as a starting point for any GenLayer app that needs real-world data or AI inside a smart contract.
Requires GenLayer Studio (hosted or local install) and the GenLayer CLI installed globally via npm before deployment.
This repository is a starter project for building applications on GenLayer, a blockchain platform that allows smart contracts to call out to the internet and use AI during execution. The boilerplate comes with a working example: a football match betting game built as a smart contract. The football bets contract lets users place a prediction on which team will win a given match. After the match is over, anyone can trigger resolution, at which point the contract fetches the actual result from a URL and compares it against the stored predictions. Users who guessed correctly earn points. The contract also lets you query all bets and check point totals for any player. The project has three main parts. First, there is the smart contract itself, written in Python and deployed to GenLayer using a command-line tool called the GenLayer CLI. Second, there is a Next.js web frontend built with TypeScript, TanStack Query for data fetching, and Radix UI for interface components. The frontend connects to the deployed contract so users can interact with it through a browser. Third, there is a test suite that runs against the deployed contract in the GenLayer Studio environment to verify that creating bets, resolving them, and querying results all work correctly. To run this example, you need either the hosted GenLayer Studio or a local installation of it, plus the GenLayer CLI installed globally via npm. Setup involves deploying the contract, copying an environment configuration file, adding the deployed contract address, and starting the Next.js development server. This is a boilerplate template meant to be the starting point for new GenLayer projects, not a finished application.
← genlayerlabs on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.