{"id":52005165,"url":"https://github.com/smartcontractkit/cre-bootcamp-2026","last_synced_at":"2026-07-31T14:30:50.723Z","repository":{"id":332915353,"uuid":"1125808286","full_name":"smartcontractkit/cre-bootcamp-2026","owner":"smartcontractkit","description":null,"archived":false,"fork":false,"pushed_at":"2026-04-30T05:00:22.000Z","size":18218,"stargazers_count":13,"open_issues_count":1,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-30T06:14:31.647Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://smartcontractkit.github.io/cre-bootcamp-2026/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/smartcontractkit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-31T12:02:14.000Z","updated_at":"2026-04-30T05:00:26.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/smartcontractkit/cre-bootcamp-2026","commit_stats":null,"previous_names":["smartcontractkit/cre-bootcamp-2026"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/smartcontractkit/cre-bootcamp-2026","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smartcontractkit%2Fcre-bootcamp-2026","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smartcontractkit%2Fcre-bootcamp-2026/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smartcontractkit%2Fcre-bootcamp-2026/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smartcontractkit%2Fcre-bootcamp-2026/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smartcontractkit","download_url":"https://codeload.github.com/smartcontractkit/cre-bootcamp-2026/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smartcontractkit%2Fcre-bootcamp-2026/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":36122275,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-07-20T02:08:10.276Z","status":"online","status_checked_at":"2026-07-31T02:00:06.731Z","response_time":112,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-07-31T14:30:49.935Z","updated_at":"2026-07-31T14:30:50.713Z","avatar_url":"https://github.com/smartcontractkit.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CRE Bootcamp: AI-Powered Prediction Markets\n\nA hands-on bootcamp for building with [**Chainlink Runtime Environment (CRE)**](https://docs.chain.link/cre).\n\nIt is also available in:\n- [Español](https://smartcontractkit.github.io/cre-bootcamp-2026/es/)\n- [Mandarin](https://smartcontractkit.github.io/cre-bootcamp-2026/cn/)\n- [Português](https://smartcontractkit.github.io/cre-bootcamp-2026/pt/)\n\n\u003e **Disclaimer**: This tutorial represents an educational example to use a Chainlink system, product, or service and is provided to demonstrate how to interact with Chainlink's systems, products, and services to integrate them into your own. This template is provided \"AS IS\" and \"AS AVAILABLE\" without warranties of any kind, it has not been audited, and it may be missing key checks or error handling to make the usage of the system, product or service more clear. Do not use the code in this example in a production environment without completing your own audits and application of best practices. Neither Chainlink Labs, the Chainlink Foundation, nor Chainlink node operators are responsible for unintended outputs that are generated due to errors in code.\n\n## 📚 Book\n\nThe bootcamp tutorial is available in a markdown book format.\n\nEither visit:\n\n**https://smartcontractkit.github.io/cre-bootcamp-2026/**\n\nOr run locally:\n\n```bash\ncargo install mdbook\ncd book\nmdbook serve --open\n```\n\n## Curriculum\n\n**Day 1: Foundations + Market Creation**\n\n- CRE Mental Model\n- Project Setup\n- Smart Contract Development\n- HTTP Trigger \u0026 EVM Write\n\n**Day 2: Complete Settlement Workflow**\n\n- Log Trigger\n- EVM Read\n- AI Integration (Gemini)\n- End-to-End Testing\n\n## What You'll Build\n\nAn AI-powered prediction market using CRE capabilities:\n\n- **HTTP Trigger** - Create markets via API requests\n- **Log Trigger** - Event-driven settlement automation\n- **EVM Read** - Read market state from the blockchain\n- **HTTP Capability** - Query Gemini AI for real-world outcomes\n- **EVM Write** - Verified on-chain writes with DON consensus\n\n## Required Setup\n\nComplete these **before** the bootcamp:\n\n- [Node.js v20+](https://nodejs.org/)\n- [Bun v1.3+](https://bun.sh/)\n- [CRE CLI](https://docs.chain.link/cre/getting-started/cli-installation)\n- [Foundry](https://book.getfoundry.sh/getting-started/installation)\n- [Ethereum Sepolia in your wallet](https://chainlist.org/chain/11155111)\n- [Sepolia ETH from faucet](https://faucets.chain.link/)\n- [Gemini API Key](https://aistudio.google.com/apikey)\n\n## Running the Example\n\n### 1. Clone the repository\n\n```bash\ngit clone https://github.com/smartcontractkit/cre-bootcamp-2026.git\ncd cre-bootcamp-2026\n```\n\n#### Repo structure\n\nThe main focus of the bootcamp will be the following:\n\n```\n├── prediction-market\n│   ├── contracts  # smart contracts\n│   ├── my-workflow # CRE workflows\n│   ├── project.yaml # CRE project config\n│   └── secrets.yaml  # secrets for CRE to use at runtime\n```\n\n### 2. Set up environment variables\n\nCreate `.env` in `prediction-market/` and set `CRE_ETH_PRIVATE_KEY` and `GEMINI_API_KEY_VAR` variables:\n\n```bash\n###############################################################################\n### REQUIRED ENVIRONMENT VARIABLES - SENSITIVE INFORMATION                  ###\n### DO NOT STORE RAW SECRETS HERE IN PLAINTEXT IF AVOIDABLE                 ###\n### DO NOT UPLOAD OR SHARE THIS FILE UNDER ANY CIRCUMSTANCES                ###\n###############################################################################\n\n# Ethereum private key or 1Password reference (e.g. op://vault/item/field)\nCRE_ETH_PRIVATE_KEY=YOUR_PRIVATE_KEY_HERE\n\n# Default target used when --target flag is not specified (e.g. staging-settings, production-settings, my-target)\nCRE_TARGET=staging-settings\n\n# Gemini configuration: API Key\nGEMINI_API_KEY_VAR=YOUR_GEMINI_API_KEY_HERE\n```\n\n### 3. Install workflow dependencies\n\n```bash\ncd prediction-market/my-workflow\nbun install\ncd ..\n```\n\n### 4. Deploy the smart contract\n\n```bash\nsource .env\ncd contracts\n\nforge create src/PredictionMarket.sol:PredictionMarket \\\n  --rpc-url \"https://ethereum-sepolia-rpc.publicnode.com\" \\\n  --private-key $CRE_ETH_PRIVATE_KEY \\\n  --broadcast \\\n  --constructor-args 0x15fc6ae953e024d975e77382eeec56a9101f9f88\n```\n\n\u003e Note: the contructor argument is the [CRE Forwarder Contract](https://docs.chain.link/cre/guides/workflow/using-evm-client/supported-networks-go#understanding-forwarder-addresses) address.\n\nSave the deployed Prediction Market Contract address and update `my-workflow/config.staging.json`:\n\n```json\n{\n  \"evms\": [\n    {\n      \"marketAddress\": \"0xYOUR_DEPLOYED_ADDRESS\",\n      ...\n    }\n  ]\n}\n```\n\n### 5. Create a market (HTTP Trigger)\n\n```bash\ncd ..  # Back to prediction-market/\ncre workflow simulate my-workflow --broadcast\n```\n\nSelect HTTP trigger (option 1) and enter:\n\n```json\n{ \"question\": \"Will Argentina win the 2022 World Cup?\" }\n```\n\n### 6. Place a prediction\n\n```bash\nexport MARKET_ADDRESS=0xYOUR_DEPLOYED_ADDRESS\n\ncast send $MARKET_ADDRESS \\\n  \"predict(uint256,uint8)\" 0 0 \\\n  --value 0.01ether \\\n  --rpc-url \"https://ethereum-sepolia-rpc.publicnode.com\" \\\n  --private-key $CRE_ETH_PRIVATE_KEY\n```\n\n\u003e Note: `0 0` above corresponds to do the Market Id and the prediction (Yes = 0, No = 1). See the `predict()` function in `./prediction-market/contracts/src/PredictionMarket.sol`\n\n### 7. Request settlement\n\nRequest settlement by passing in the relevant Market Id.\n\n```bash\ncast send $MARKET_ADDRESS \\\n  \"requestSettlement(uint256)\" 0 \\\n  --rpc-url \"https://ethereum-sepolia-rpc.publicnode.com\" \\\n  --private-key $CRE_ETH_PRIVATE_KEY\n```\n\nSave the transaction hash!\n\n### 8. Settle the market (Log Trigger)\n\n```bash\ncre workflow simulate my-workflow --broadcast\n```\n\nSelect Log trigger (option 2), enter the tx hash from step 7 and event index `0`.\n\n### 9. Claim winnings\n\n```bash\ncast send $MARKET_ADDRESS \\\n  \"claim(uint256)\" 0 \\\n  --rpc-url \"https://ethereum-sepolia-rpc.publicnode.com\" \\\n  --private-key $CRE_ETH_PRIVATE_KEY\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmartcontractkit%2Fcre-bootcamp-2026","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmartcontractkit%2Fcre-bootcamp-2026","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmartcontractkit%2Fcre-bootcamp-2026/lists"}