Testnet Oracles

Operator Contracts

Testnet Operator contracts are deployed and maintained on the following networks:

Jobs

Job IDs

To make testing simple, jobs are configured with the following properties:

  • Each request on a testnet costs 0.1 LINK.
  • Each oracle will wait for 1 confirmation before processing a request.
  • Jobs have the same IDs across each testnet.
  • Parameters are required. See examples for code snippets.

PurposeTasksJob IDRequired Parameters
GET>bytes:
HTTP GET to any public API
parse the response
return arbitrary-length raw byte data bytes.
The job specs can be found here
Http
JsonParse
Ethabiencode
7da2702f37fd48e5b1b9a5715e3509b6
GET>uint256:
HTTP GET to any public API
parse the response
multiply the result by a multiplier
return an unsigned integer uint256 .
The job specs can be found here
Http
JsonParse
Multiply
Ethabiencode
ca98366cc7314957b8c012c72f05aeeb
GET>int256:
HTTP GET to any public API
parse the response
multiply the result by a multiplier
return a signed integer int256.
The job specs can be found here
Http
JsonParse
Multiply
Ethabiencode
fcf4140d696d44b687012232948bdd5d
GET>bool:
HTTP GET to any public API
parse the response
return a boolean bool.
The job specs can be found here
Http
JsonParse
Ethabiencode
c1c5e92880894eb6b27d3cae19670aa3
GET>string:
HTTP GET to any public API
parse the response
return a sequence of characters string.
The job specs can be found here
Http
JsonParse
Ethabiencode
7d80a6386ef543a3abb52817f6707e3b

Examples

Get > bytes

A full example can be found here.

Request method
function request() public {
  Chainlink.Request memory req = _buildChainlinkRequest('7da2702f37fd48e5b1b9a5715e3509b6', address(this), this.fulfill.selector);
  req._add(
      'get',
      'https://ipfs.io/ipfs/QmZgsvrA1o1C8BGCrx6mHTqR1Ui1XqbCrtbMVrRLHtuPVD?filename=big-api-response.json'
  );
  req._add('path', 'image');
  _sendChainlinkRequest(req, (1 * LINK_DIVISIBILITY) / 10); // 0,1*10**18 LINK
}
Callback method
bytes public data;
string public imageUrl;
function fulfill(bytes32 requestId, bytes memory bytesData) public recordChainlinkFulfillment(requestId) {
    data = bytesData;
    imageUrl = string(data);
}

Get > uint256

A full example can be found here.

Request method
function request() public {
  Chainlink.Request memory req = _buildChainlinkRequest('ca98366cc7314957b8c012c72f05aeeb', address(this), this.fulfill.selector);
  req._add(
      'get',
      'https://min-api.cryptocompare.com/data/pricemultifull?fsyms=ETH&tsyms=USD'
  );
  req._add('path', 'RAW,ETH,USD,VOLUME24HOUR');
  req._addInt('times', 10**18); // Multiply by times value to remove decimals. Parameter required so pass '1' if the number returned doesn't have decimals
  _sendChainlinkRequest(req, (1 * LINK_DIVISIBILITY) / 10); // 0,1*10**18 LINK
}
Callback method
uint256 public volume;
function fulfill(bytes32 _requestId, uint256 _volume) public recordChainlinkFulfillment(_requestId) {
  volume = _volume;
}

Get > int256

Request method
function request() public {
  Chainlink.Request memory req = _buildChainlinkRequest('fcf4140d696d44b687012232948bdd5d', address(this), this.fulfill.selector);
  req._add(
      'get',
      'https://min-api.cryptocompare.com/data/pricemultifull?fsyms=ETH&tsyms=USD'
  );
  req._add('path', 'RAW,ETH,USD,VOLUME24HOUR');
  req._addInt('times', 10**18); // Multiply by times value to remove decimals. Parameter required so pass '1' if the number returned doesn't have decimals
  _sendChainlinkRequest(req, (1 * LINK_DIVISIBILITY) / 10); // 0,1*10**18 LINK
}
Callback method
int256 public volume;
function fulfill(bytes32 _requestId, int256 _volume) public recordChainlinkFulfillment(_requestId) {
  volume = _volume;
}

Get > bool

Request method
function request() public {
  Chainlink.Request memory req = _buildChainlinkRequest('c1c5e92880894eb6b27d3cae19670aa3', address(this), this.fulfill.selector);
  req._add(
      'get',
      'https://app.proofi.com/api/verify/eip155/0xCB5085214B6318aF3dd0FBbb5E74fbF6bf332151?contract=0x2f7f7E44ca1e2Ca1A54db4222cF97ab47EE026F1'
  );
  req._add('path', 'approved');
  _sendChainlinkRequest(req, (1 * LINK_DIVISIBILITY) / 10); // 0,1*10**18 LINK
}
Callback method
bool public approved;
function fulfill(bytes32 _requestId, bool _approved) public recordChainlinkFulfillment(_requestId) {
  approved = _approved;
}

Get > string

A full example can be found here.

Request method
function request() public {
  Chainlink.Request memory req = _buildChainlinkRequest('7d80a6386ef543a3abb52817f6707e3b', address(this), this.fulfill.selector);
  req._add(
      'get',
      'https://api.coingecko.com/api/v3/coins/markets?vs_currency=usd&per_page=10'
  );
  req._add('path', '0,id');
  _sendChainlinkRequest(req, (1 * LINK_DIVISIBILITY) / 10); // 0,1*10**18 LINK
}
Callback method
string public id;
function fulfill(bytes32 _requestId, string memory _id) public recordChainlinkFulfillment(_requestId) {
  id = _id;
}

Get the latest Chainlink content straight to your inbox.