This guide covers installing required tools and preparing the workspace for both local testing and Sepolia deployment. Follow in order.
- macOS/Linux (Windows: use WSL2)
- Git 2.30+
- Node.js 18+ and npm 8+
- Recommended via nvm:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash nvm install 18 && nvm use 18
- Recommended via nvm:
- Foundry (forge/cast)
curl -L https://foundry.paradigm.xyz | bashfoundryup
- Optional CLIs (helpful)
- jq:
brew install jq(macOS) orapt-get install jq(Linux)
- jq:
git clone https://github.com/<your_org>/Chainlink_Playground.git
cd Chainlink_PlaygroundNo git submodules are required. Dependencies for the Foundry project are vendored under v4-template/lib/.
cd functions-hardhat-starter-kit
# Husky is not used; skip prepare scripts to avoid git-hook errors
HUSKY=0 npm cicd ../v4-template
forge --version
forge buildThis compiles Uniswap v4 hook contracts and our on-chain components used by the Hardhat scripts.
cd ../functions-hardhat-starter-kit
node scripts/build-and-copy-artifacts.js
npx hardhat compile- Local full cycle (Functions local testnet): see
functions-hardhat-starter-kit/TEST_LOCAL.md - Sepolia deployment: see
functions-hardhat-starter-kit/DEPLOY_SEPOLIA.md
- For local: only
PRIVATE_KEYis needed (local test key is fine, see README_LOCAL.md) - For Sepolia: set
PRIVATE_KEY,ETHEREUM_SEPOLIA_RPC_URL,DON_SECRETS_SLOT_ID,DON_SECRETS_VERSION(see DEPLOY_SEPOLIA.md)
- Husky error during npm install: use
HUSKY=0 npm ciornpm ci --ignore-scripts. - Hardhat warns about Solidity 0.8.30 support: harmless; compilation still works.
- If
forgeis not found, open a new shell (adds Foundry to PATH) or rerunfoundryup. - If artifact copy fails initially, ensure step 4 (Foundry build) completed, then rerun step 5.