{"id":15888299,"url":"https://github.com/antoncoding/epuesta","last_synced_at":"2025-06-20T21:33:04.701Z","repository":{"id":41283935,"uuid":"208566928","full_name":"antoncoding/epuesta","owner":"antoncoding","description":"Decentralized betting framework on football. With Ethereum and ChainLink.","archived":false,"fork":false,"pushed_at":"2019-10-13T09:47:33.000Z","size":50,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-03T12:22:16.858Z","etag":null,"topics":[],"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/antoncoding.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}},"created_at":"2019-09-15T08:54:51.000Z","updated_at":"2024-12-12T13:59:13.000Z","dependencies_parsed_at":"2022-07-05T20:40:45.485Z","dependency_job_id":null,"html_url":"https://github.com/antoncoding/epuesta","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/antoncoding/epuesta","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antoncoding%2Fepuesta","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antoncoding%2Fepuesta/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antoncoding%2Fepuesta/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antoncoding%2Fepuesta/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/antoncoding","download_url":"https://codeload.github.com/antoncoding/epuesta/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antoncoding%2Fepuesta/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261020285,"owners_count":23098114,"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":[],"created_at":"2024-10-06T06:07:01.253Z","updated_at":"2025-06-20T21:32:59.687Z","avatar_url":"https://github.com/antoncoding.png","language":"Solidity","readme":"# Epuesta\n\nEpuesta is a decentralized betting broker framework built with ChainLink.\n\n![chainlinkImg](https://blog.chain.link/content/images/size/w2000/2019/07/Growing-Chainlink--1-.png)\n\nEveryone can create a new contract with our framework on Ethereum as a broker for a specific match, you can customize your need and offer different deals with the contract.\n\nThe finality of a match is provided by Chainlink nodes in an decentralized manner, and result is distributed fairly with the contract.\n\n## Integration for Node Operators\n\n### Add New Bridge - apifootball\n\nCurrently using [Apifootball](https://apifootball.com/documentation/) as our data source.\nA sample RESTful API external adopter can be found at [this repo](https://github.com/antoncoding/apifootball-adopter).\n\nRun it yourself or use our heroku server, then create a new **apifootball** Bridge with the adopter url.\n\nOur adopter is deployed at:\n\n```url\nhttps://apifootball-adopter.herokuapp.com/\n```\n\n![New Bridge](https://i.imgur.com/Rk7AIrR.png)\n\n### Add New Jobs\n\nWith our current design, a chainlink node has to add two jobs in order to be capable of being Epuesta data source oracle.\n\nThe job specs can be found in `jobs/`\n\n![new job](https://i.imgur.com/2YcYTgh.png)\n\n## Contract Creator\n\n### Request Team Score\n\n```solidity\nChainlink.Request memory req = buildChainlinkRequest(stringToBytes32(MATCH_SCORE_JOBID), this, this.callbackHometeamScore.selector);\nreq.add(\"match_id\", matchId);\nreq.add(\"copyPath\", \"match_hometeam_score\");\nsendChainlinkRequestTo(oracle, req, ORACLE_PAYMENT);\n```\n\nResponse in `uint256`\n\n### Verify Match Data\n\n**Check Match Live**\n\n```solidity\nChainlink.Request memory req = buildChainlinkRequest(stringToBytes32(MATCH_STATUS_JOBID), this, this.callbackMatchStarted.selector);\nreq.add(\"match_id\", matchId);\nreq.add(\"copyPath\", \"match_live\");\nreq.add(\"operator\", \"eq\");\nreq.add(\"value\", \"1\");\nsendChainlinkRequestTo(oracle, req, ORACLE_PAYMENT);\n```\n\nResponse in `boolean`","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantoncoding%2Fepuesta","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fantoncoding%2Fepuesta","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantoncoding%2Fepuesta/lists"}