Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@appliedblockchain/chainlink-plugins-api-consumer

Package Overview
Dependencies
Maintainers
27
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@appliedblockchain/chainlink-plugins-api-consumer

Hardhat TypeScript plugin that interacts with chainlink api consumer contract.

  • 0.0.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
27
Created
Source

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

  • @nomiclabs/hardhat-ethers

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.

Keywords

FAQs

Package last updated on 17 Aug 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc