Chainlink Developers

Welcome to the Chainlink documentation site. You'll find comprehensive guides and documentation to help you start working with Chainlink as quickly as possible, as well as support if you get stuck. Click here for an introductory walkthrough on how to create a Chainlink request on the Ropsten test network!

Building on Chainlink? Click here to get started!

Get Started

TheRundown Oracle Node

TheRundown is the leading platform for real-time odds from the most popular sportsbooks, sports and markets.

Steps For Using This Oracle

Network Details

Ethereum Mainnet

Payment Amount: 1 LINK
LINK Token Address: <<MAINNET_LINK_TOKEN>>
Oracle Address: 0x0ae3a0e0e3feb67ec83f423b3b653051aa9bf4d3
JobID: 8ea9bb3a6b3f41c1b8cc6a041895a660

Ethereum Kovan Testnet

Payment Amount: 0.1 LINK
LINK Token Address: <<KOVAN_LINK_TOKEN>>
Oracle Address: 0x56dd6586DB0D08c6Ce7B2f2805af28616E082455
JobID: dbb65efc02d34cddb920eca1bec22ade

Polygon (Matic) Mainnet

Payment Amount: 0.03 LINK
LINK Token Address: <<MATIC_MAINNET_LINK_TOKEN>>
Oracle Address: 0xcD5BdCc649f81B9E53671Eb0D17c2831AF04e1d1
JobID: 96cf91943c8f40b19c6eb401f49f36f9

Create Your Contract

Import ChainlinkClient.sol into your contract so you can inherit the Chainlink behavior.

pragma solidity ^0.4.24;

import "@chainlink/contracts/v0.4/ChainlinkClient.sol";

contract TheRundownChainlink is ChainlinkClient {
  
  uint256 oraclePayment;
  
  constructor(uint256 _oraclePayment) public {
    setPublicChainlinkToken();
    oraclePayment = _oraclePayment;
  }
  // Additional functions here:
  
}
pragma solidity ^0.5.0;

import "@chainlink/contracts/v0.5/ChainlinkClient.sol";

contract TheRundownChainlink is ChainlinkClient {
  
  uint256 oraclePayment;
  
  constructor(uint256 _oraclePayment) public {
    setPublicChainlinkToken();
    oraclePayment = _oraclePayment;
  }
  // Additional functions here:
  
}
pragma solidity ^0.6.0;

import "@chainlink/contracts/v0.6/ChainlinkClient.sol";

contract TheRundownChainlink is ChainlinkClient {
  
  uint256 oraclePayment;
  
  constructor(uint256 _oraclePayment) public {
    setPublicChainlinkToken();
    oraclePayment = _oraclePayment;
  }
  // Additional functions here:
  
}

Tasks

Request Parameters

matchId

Numerical identifier for a given match.

Solidity Example

req.add("matchId", "5527455bb80a5e9884153786aeb5f2b2");

Chainlink Examples

The examples below show how to create a request for the Chainlink node.

requestScore function

function requestScore
(
  address _oracle,
  bytes32 _jobId,
  string memory _matchId
)
  public
  onlyOwner
{
  Chainlink.Request memory req = buildChainlinkRequest(_jobId, this, this.fulfill.selector);
  req. add("matchId", _matchId);
  sendChainlinkRequestTo(_oracle, req, oraclePayment);
}

fulfill function

uint256 public score;

function fulfill(bytes32 _requestId, uint256 _score)
  public
  recordChainlinkFulfillment(_requestId)
{
  score = _score;
}

Documentation and Support

Updated 18 days ago


TheRundown Oracle Node


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.