{"id":18481208,"url":"https://github.com/andrejrakic/chainlinkhackathon-eurobet","last_synced_at":"2025-06-28T14:34:09.416Z","repository":{"id":123786160,"uuid":"348355061","full_name":"andrejrakic/ChainlinkHackathon-EuroBet","owner":"andrejrakic","description":"UEFA Euro Winner Decentralized Betting Platform, developed at Chainlink Hackathon","archived":false,"fork":false,"pushed_at":"2021-04-10T16:31:09.000Z","size":3267,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-16T21:18:34.374Z","etag":null,"topics":["chainlink"],"latest_commit_sha":null,"homepage":"","language":"Solidity","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andrejrakic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-03-16T13:19:22.000Z","updated_at":"2024-02-01T06:35:14.000Z","dependencies_parsed_at":"2024-07-27T07:01:09.972Z","dependency_job_id":null,"html_url":"https://github.com/andrejrakic/ChainlinkHackathon-EuroBet","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrejrakic%2FChainlinkHackathon-EuroBet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrejrakic%2FChainlinkHackathon-EuroBet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrejrakic%2FChainlinkHackathon-EuroBet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrejrakic%2FChainlinkHackathon-EuroBet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andrejrakic","download_url":"https://codeload.github.com/andrejrakic/ChainlinkHackathon-EuroBet/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254012853,"owners_count":21999326,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["chainlink"],"created_at":"2024-11-06T12:22:41.482Z","updated_at":"2025-05-13T19:30:16.092Z","avatar_url":"https://github.com/andrejrakic.png","language":"Solidity","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Chainlink Hackathon - Euro Bet\n\nUser navigates to `ipfs://bafybeib33bkmmw772bdbnjr5j7iiyihxlb4gt73ufer77wrf33afuxblza/` or http://andrejrakic.github.io/ChainlinkHackathon-EuroBet/ and connect its Metamask wallet to Kovan testnet\n\nUser places bet with some amount of ETH, for example `placeBet(\"England\", 0.5 ETH)`\n\n[EuroBet.sol](/contracts/EuroBet.sol) smart contract request odd for winning championship from Chainlink's oracle\n\nAnd mints NFT as Betting Ticket to User's address with tokenUri in `ETH amount + odd + teamName` format.\n\n**Why we need Chainlink?** We can't write odds in mapping of smart contract because that values are going to change during time and we need to fetch them from betting bookmaker's apis.\n\nNFT tickets are now in User's wallet, so one can trade them, use as a collateral, sell at auction, or whatever one wants. The point is that if NFT becomes winning bet ticket, only way for cash out is with that particular NFT.\n\n\nOnce betting is finished and we finally find out which team is a champion, one can call Cash Out function from the core EuroBet.sol smart contract, providing its NFT Betting Ticket. If bet is won, NFT is going to be burn and initial ETH amount * odd is going to be send to the ones wallet.\n\n\n## Live Demo\n\n\u003cimg height=\"50\" src=\"https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2F1%2F18%2FIpfs-logo-1024-ice-text.png\u0026f=1\u0026nofb=1\" /\u003e\n\nReact Dapp _(make sure to have Metamask installed and connected to Kovan testnet)_ available at\n\n```\nipfs://bafybeib33bkmmw772bdbnjr5j7iiyihxlb4gt73ufer77wrf33afuxblza/\n```\nor\n\nhttp://andrejrakic.github.io/ChainlinkHackathon-EuroBet/\n\n## Smart contracts \n\n\u003cimg height=\"30\" src=\"https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Fetherscan.io%2Fimages%2Flogo-ether.png%3Fv%3D0.0.1\u0026f=1\u0026nofb=1\" /\u003e\n\n[EuroBet](/contracts/EuroBet.sol) core smart contract: https://kovan.etherscan.io/address/0xa530d2026341b720ec367cd52df49417aa861225\n\nBetTicket NFT smart contract: https://kovan.etherscan.io/token/0x7e7ed52d6611d8ff4edfba838726ef200d18675a\n\n## External Adapter\n\n\u003cimg height=\"50\" src=\"https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Fstatic.coindesk.com%2Fwp-content%2Fuploads%2F2019%2F02%2Fchainlink-combo-logo.png\u0026f=1\u0026nofb=1\" /\u003e\n\nSince odds change during time, one can not write it on chain via mapping and therefore one need Chainlink oracles to get that info when placing bets. External adapter is available [here](./external-adapter)\n\n## Subgraph\n\n\u003cimg height=\"40\" src=\"https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Fwww.cryptocurrencymarket.uk%2Fcoins_images%2Fthe-graph%2Flarge.png\u0026f=1\u0026nofb=1\" /\u003e\n\nSubgraph for indexing data: https://thegraph.com/explorer/subgraph/andrejrakic/euro-bet\n\n## Unit tests\n\n\u003cimg height=\"30\" src=\"https://assets-global.website-files.com/5f6b7190899f41fb70882d08/60491e71bf5ce3b2cbadca5d_hardhat-logo.png\" /\u003e\n\n_Make sure to install all necessary dependencies_\n\n```\nnpm test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrejrakic%2Fchainlinkhackathon-eurobet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrejrakic%2Fchainlinkhackathon-eurobet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrejrakic%2Fchainlinkhackathon-eurobet/lists"}