chainlink-test-helpers

0.6.0-6 • Public • Published

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.

assertActionThrows

await h.assertActionThrows(async () => {
  await cc.createRequest(jobId, url, path, times, {from: consumer});
});

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});

increaseBlocks

h.increaseBlocks(25)

increaseTime5Minutes

h.increaseTime5Minutes();

Readme

Keywords

none

Package Sidebar

Install

npm i chainlink-test-helpers

Weekly Downloads

5

Version

0.6.0-6

License

MIT

Unpacked Size

5.8 kB

Total Files

4

Last publish

Collaborators

  • thodges