3. Project Structure

Your project might look like this:

compound-comet-tutorial/

├── package.json

├── package-lock.json

├── .env

└── index.js

The index.js file will contain our code.

Environment Variables

Create a .env file in your project folder to store your Sepolia RPC URL and private key safely (and don’t commit it to GitHub):

Example .env:

SEPOLIA_RPC_URL="https://sepolia.infura.io/v3/YOUR_INFURA_PROJECT_ID"

PRIVATE_KEY="0xYOUR_SEPOLIA_PRIVATE_KEY"

Replace:

• YOUR_INFURA_PROJECT_ID with an actual Infura ID (or another Ethereum node provider).

• 0xYOUR_SEPOLIA_PRIVATE_KEY with your wallet’s private key that holds test ETH on Sepolia.

Last updated