@appliedblockchain/chainlink-plugins-api-consumer
TypeScript icon, indicating that this package has built-in type declarations

0.0.5 • Public • Published

Chainlink Consumer API Consumer

A Hardhat plugin that interacts with the Chainlink API Consumer contract.

What

This plugin will help you read data from a Chainlink API Consumer and call functions to update the data.

Installation

To install this plugin use:

npm install @appliedblockchain/chainlink-plugins-api-consumer @nomiclabs/hardhat-ethers --save

Import the plugin in your hardhat.config.js:

require("@appliedblockchain/chainlink-plugins-api-consumer");

Or if you are using TypeScript, in your hardhat.config.ts:

import "@appliedblockchain/chainlink-plugins-api-consumer";

Required plugins

Tasks

This plugin adds two tasks to interact with a API Consumer contract.

Read the contract data.

npx hardhat read-data --contract <contract address>

Request the data to be updated. It may take some minutes until a Chainlink node updates the data.

npx hardhat request-data --contract <contract address>

Environment extensions

This plugin adds the functions readData and requestData to the Hardhat Runtime Environment.

Read the contract data.

hre.readData(hre,contractAddress);

Request the data to be updated. It may take some minutes until a Chainlink node updates the data.

hre.requestData(hre,contractAddress);

Configuration

This plugin does not require configuration.

Usage

There are no additional steps you need to take for this plugin to work.

Install it and access the provided functions and the provided tasks through the Hardhat Runtime Environment anywhere you need it.

Package Sidebar

Install

npm i @appliedblockchain/chainlink-plugins-api-consumer

Weekly Downloads

9

Version

0.0.5

License

MIT

Unpacked Size

25 kB

Total Files

55

Last publish

Collaborators

  • ewan-sims-applied-blockchain
  • lanreayobamidele
  • andyharr15
  • aditya.gupta.appliedblockchain
  • geoffreychalk
  • brunoneves-devops
  • samfcmc
  • tiagorvmartins
  • kjack83
  • losceicco
  • ruisereno
  • telmof
  • andremfaria
  • lbltavaresab
  • ztadic91
  • pedrolino
  • alisson-diniz-ab
  • juniorerico
  • diogopalhais
  • gabspeck
  • ab-ci
  • andycampbell92
  • mirek
  • danchmelo
  • seromenho
  • kennypt
  • zeluisping
  • pmcleite-ab
  • filipepedro
  • mnikolaus
  • bertola
  • lpalmeida
  • lslima91