This project is an example of a command-line interface (CLI) that uses the functions-toolkit to interact with Chainlink Functions.
To set up the project, follow these steps:
-
Clone the repository.
git clone https://github.com/smartcontractkit/functions-example
-
Clone the repository.
cd functions-example -
Install the required dependencies.
npm install
-
We 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
Set the following variables:
- PRIVATE_KEY
- ETHEREUM_SEPOLIA_RPC_URL
- Install Deno so you can compile and simulate your Functions source code on your local machine.
deno run --allow-net server.ts