Epuesta is a decentralized betting broker framework built with ChainLink.
Everyone 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.
The finality of a match is provided by Chainlink nodes in an decentralized manner, and result is distributed fairly with the contract.
Currently using Apifootball as our data source. A sample RESTful API external adopter can be found at this repo.
Run it yourself or use our heroku server, then create a new apifootball Bridge with the adopter url.
Our adopter is deployed at:
https://apifootball-adopter.herokuapp.com/
With our current design, a chainlink node has to add two jobs in order to be capable of being Epuesta data source oracle.
The job specs can be found in jobs/
Chainlink.Request memory req = buildChainlinkRequest(stringToBytes32(MATCH_SCORE_JOBID), this, this.callbackHometeamScore.selector);
req.add("match_id", matchId);
req.add("copyPath", "match_hometeam_score");
sendChainlinkRequestTo(oracle, req, ORACLE_PAYMENT);
Response in uint256
Check Match Live
Chainlink.Request memory req = buildChainlinkRequest(stringToBytes32(MATCH_STATUS_JOBID), this, this.callbackMatchStarted.selector);
req.add("match_id", matchId);
req.add("copyPath", "match_live");
req.add("operator", "eq");
req.add("value", "1");
sendChainlinkRequestTo(oracle, req, ORACLE_PAYMENT);
Response in boolean