thodges-gh / chainlink-test-helpers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Chainlink Test Helpers

Source for external Chainlinked contract testing helpers.

Click here to get started writing Chainlinked contracts.

Usage

Add to your project

npm install chainlink-test-helpers --save

Add to tests

const h = require("chainlink-test-helpers");

Helper Methods

Below are some examples of how to use the helper methods.

decodeRunRequest

let tx = await cc.createRequest(jobId, url, path, times, {from: consumer});
request = h.decodeRunRequest(tx.receipt.rawLogs[3]);

fulfillOracleRequest

let tx = await cc.createRequest(jobId, url, path, times, {from: consumer});
request = h.decodeRunRequest(tx.receipt.rawLogs[3]);
await h.fulfillOracleRequest(oc, request, response, {from: oracleNode});

linkContract

let link = await h.linkContract(defaultAccount)
await link.transfer(rc.address, totalPayment)

About


Languages

Language:TypeScript 100.0%