smartcontractkit / hardhat-chainlink

Integrates Chainlink into Hardhat projects. This package is currently in the BETA testing phase and is not recommended for production usage yet.
https://www.npmjs.com/package/@chainlink/hardhat-chainlink
MIT License
64 stars 31 forks source link

Feature/functions integration #11

Closed koteld closed 8 months ago

koteld commented 11 months ago

NPM package "@chainlink/functions-toolkit" integrated to the Hardhat-Chainlink plugin. Its methods were wrapped and are available both as Hardhat tasks and as methods in HRE. Thus, most of the work related to interaction with Chainlink Function and DONs, manipulating secrets, gists is delegated to the "@chainlink/functions-toolkit". Ability to run Functions simulations was wrapped as well and is available in the Hardhat-Chainlink plugin.

koteld commented 10 months ago

consider whether we should add npm-link https://docs.npmjs.com/cli/v8/commands/npm-link

so that we can use the PR version of the code in a sample project to test ?

In order to test that PR without publishing package to NPM you can:

  1. Run npm build-> it will produce files necessary for the package
  2. Run npm pack -> it will create a .tgz file of the package
  3. In the root folder of your Hardhat project run: npm install path/to/package.tgz
  4. Add require("@chainlink/hardhat-chainlink"); to thehardhat.config.jsin your Hardhat project That is it!
koteld commented 8 months ago

Hi @zeuslawyer, After you approved my PR, I had to make several changes to the toolkit documentation and some small changes to the project structure, variables names, and usage of functions-toolkit. Consequently, merging is blocked again by the repository rules. Could you please review the PR once more?

Thank you.