[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-73444":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":8,"htmlUrl":8,"language":9,"languages":8,"totalLinesOfCode":8,"stars":10,"forks":11,"watchers":12,"openIssues":13,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":15,"stars7d":16,"stars30d":17,"stars90d":14,"forks30d":14,"starsTrendScore":18,"compositeScore":19,"rankGlobal":8,"rankLanguage":8,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":23,"hasPages":21,"topics":24,"createdAt":8,"pushedAt":8,"updatedAt":25,"readmeContent":26,"aiSummary":27,"trendingCount":14,"starSnapshotCount":14,"syncStatus":28,"lastSyncTime":29,"discoverSource":30},73444,"genlayer-project-boilerplate","genlayerlabs\u002Fgenlayer-project-boilerplate","genlayerlabs",null,"TypeScript",13410,676,94,12,0,79,142,345,237,43.49,"MIT License",false,"main",true,[],"2026-06-12 02:03:13","# Sample GenLayer project\n[![License: MIT](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-MIT-green.svg)](https:\u002F\u002Fopensource.org\u002Flicense\u002Fmit\u002F)\n[![Discord](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDiscord-Join%20us-5865F2?logo=discord&logoColor=white)](https:\u002F\u002Fdiscord.gg\u002F8Jm4v89VAu)\n[![Telegram](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FTelegram--T.svg?style=social&logo=telegram)](https:\u002F\u002Ft.me\u002Fgenlayer)\n[![Twitter](https:\u002F\u002Fimg.shields.io\u002Ftwitter\u002Furl\u002Fhttps\u002Ftwitter.com\u002Fyeagerai.svg?style=social&label=Follow%20%40GenLayer)](https:\u002F\u002Fx.com\u002FGenLayer)\n[![GitHub star chart](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Fyeagerai\u002Fgenlayer-project-boilerplate?style=social)](https:\u002F\u002Fstar-history.com\u002F#yeagerai\u002Fgenlayer-js)\n\n## 👀 About\nThis project includes the boilerplate code for a GenLayer use case implementation, specifically a football bets game.\n\n## 📦 What's included\n- Basic requirements to deploy and test your intelligent contracts locally\n- Configuration file template\n\u003C!-- - Test functions to write complete end-to-end tests -->\n- An example of an intelligent contract (Football Bets)\n- Example end-to-end tests for the contract provided\n- A production-ready Next.js 15 frontend with TypeScript, TanStack Query, and Radix UI\n\n## 🛠️ Requirements\n- A running GenLayer Studio (Install from [Docs](https:\u002F\u002Fdocs.genlayer.com\u002Fdevelopers\u002Fintelligent-contracts\u002Ftooling-setup#using-the-genlayer-studio) or work with the hosted version of [GenLayer Studio](https:\u002F\u002Fstudio.genlayer.com\u002F)). If you are working locally, this repository code does not need to be located in the same directory as the Genlayer Studio.\n- [GenLayer CLI](https:\u002F\u002Fgithub.com\u002Fgenlayerlabs\u002Fgenlayer-cli) globally installed. To install or update the GenLayer CLI run `npm install -g genlayer`\n\n## 🚀 Steps to run this example\n\n### 1. Deploy the contract\n   Deploy the contract from `\u002Fcontracts\u002Ffootball_bets.py` using the GenLayer CLI:\n   1. Choose the network that you want to use (studionet, localnet, or tesnet-*): `genlayer network`\n   2. Execute the deploy command `genlayer deploy`. This command is going to execute the deploy script located in `\u002Fdeploy\u002FdeployScript.ts`\n\n### 2. Setup the frontend environment\n  1. All the content of the dApp is located in the `\u002Ffrontend` folder.\n  2. Copy the `.env.example` file in the `frontend` folder and rename it to `.env`, then fill in the values for your configuration. The provided NEXT_PUBLIC_GENLAYER_RPC_URL value is the backend of the hosted GenLayer Studio.\n  3. Add the deployed contract address to the `\u002Ffrontend\u002F.env` under the variable `NEXT_PUBLIC_CONTRACT_ADDRESS`\n\n### 4. Run the frontend Next.js app\n   Execute the following commands in your terminal:\n\n   **Using bun:**\n   ```shell\n   cd frontend\n   bun install\n   bun dev\n   ```\n\n   **Using npm:**\n   ```shell\n   cd frontend\n   npm install\n   npm run dev\n   ```\n\n   The terminal should display a link to access your frontend app (usually at \u003Chttp:\u002F\u002Flocalhost:3000\u002F>).\n   For more information on the code see [GenLayerJS](https:\u002F\u002Fgithub.com\u002Fyeagerai\u002Fgenlayer-js).\n   \n### 5. Test contracts\n1. Install the Python packages listed in the `requirements.txt` file in a virtual environment.\n2. Make sure your GenLayer Studio is running. Then execute the following command in your terminal:\n   ```shell\n   gltest\n   ```\n\n## ⚽ How the Football Bets Contract Works\n\nThe Football Bets contract allows users to create bets for football matches, resolve those bets, and earn points for correct bets. Here's a breakdown of its main functionalities:\n\n1. Creating Bets:\n   - Users can create a bet for a specific football match by providing the game date, team names, and their predicted winner.\n   - The contract checks if the game has already finished and if the user has already made a bet for this match.\n\n2. Resolving Bets:\n   - After a match has concluded, users can resolve their bets.\n   - The contract fetches the actual match result from a specified URL.\n   - If the Bet was correct, the user earns a point.\n\n3. Querying Data:\n   - Users can retrieve all bets.\n   - The contract also allows querying of points, either for all players or for a specific player.\n\n4. Getting Points:\n   - Points are awarded for correct bets.\n   - Users can check their total points or the points of any player.\n\n## 🧪 Tests\n\nThis project includes integration tests that interact with the contract deployed in the Studio. These tests cover the main functionalities of the Football Bets contract:\n\n1. Creating a bet\n2. Resolving a bet\n3. Querying bets for a player\n4. Querying points for a player\n\nThe tests simulate real-world interactions with the contract, ensuring that it behaves correctly under various scenarios. They use the GenLayer Studio to deploy and interact with the contract, providing a comprehensive check of the contract's functionality in a controlled environment.\n\nTo run the tests, use the `gltest` command as mentioned in the \"Steps to run this example\" section.\n\n\n## 💬 Community\nConnect with the GenLayer community to discuss, collaborate, and share insights:\n- **[Discord Channel](https:\u002F\u002Fdiscord.gg\u002F8Jm4v89VAu)**: Our primary hub for discussions, support, and announcements.\n- **[Telegram Group](https:\u002F\u002Ft.me\u002Fgenlayer)**: For more informal chats and quick updates.\n\nYour continuous feedback drives better product development. Please engage with us regularly to test, discuss, and improve GenLayer.\n\n## 📖 Documentation\nFor detailed information on how to use GenLayerJS SDK, please refer to our [documentation](https:\u002F\u002Fdocs.genlayer.com\u002F).\n\n## 📜 License\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n","该项目提供了一个基于GenLayer实现足球投注游戏的样板代码。核心功能包括本地部署和测试智能合约的基础需求、配置文件模板、一个示例智能合约（Football Bets）及其端到端测试，以及一个生产就绪的Next.js 15前端应用，该前端应用使用TypeScript、TanStack Query和Radix UI构建。项目适合用于开发基于区块链的智能合约应用，特别是对于希望快速启动并运行类似足球投注等应用场景的开发者而言。",2,"2026-06-11 03:45:35","high_star"]