Skip to content

Latest commit

 

History

History
52 lines (37 loc) · 1.35 KB

README.md

File metadata and controls

52 lines (37 loc) · 1.35 KB

Chainlink Functions implementation

This project is an example of a command-line interface (CLI) that uses the functions-toolkit to interact with Chainlink Functions. Official docs.

Installation

To set up the project, follow these steps:

  1. Clone this repository.

    git clone https://github.com/DynamicNFTHub/AutoMetaNFT.git
  2. Change the dir.

    cd AutoMetaNFT
  3. Install the required dependencies.

    npm install
  4. I use @chainlink/env-enc package to encrypt environment variables at rest. Set the password to encrypt and decrypt the environment varilable file .env.enc:

    npx env-enc set-pw
  5. Set the following variables:

  • PRIVATE_KEY
  • POLYGON_MUMBAI_RPC_URL
  • WEB_SERVER_AUTHENTICATION_KEY
  1. Modify your "source.js":

     const url = "" // REPLACE this with your REST url
  2. Modify your "updateRequest.js":

    const consumerAddress = "0x" // REPLACE this with your Functions consumer address
    const subscriptionId = 3 // REPLACE this with your subscription ID
  3. Run the "updateRequest.js" script:

    node scripts/updateRequest.js