This repository contains a minimal boilerplate for developing smart contracts that integrate with Aave v4 using Foundry.
- Foundry
Install or update Foundry:
curl -L https://foundry.paradigm.xyz | bash
foundryupforge installCreate a .env file copying the .env.example file:
cp .env.example .envUpdate the .env file with the correct values.
RPC_URL– RPC endpoint (Tenderly Virtual TestNet or public network).SPOKE_ADDRESS– Aave v4 spoke (e.g. Core on Ethereum mainnet:0x89914a22E30CDf88A06e801E407ca82520210a79).RESERVE_ID– Reserve identifier (e.g.4for USDC on Core).PRIVATE_KEY– Optional deployer key used by scripts (keep it secret).TENDERLY_ACCESS_KEY– Tenderly access token for verification.
forge buildforge testforge script script/Deploy_ReserveUtilization.s.sol:DeployReserveUtilization \
--rpc-url <RPC_URL> \
--broadcastforge verify-contract \
<DEPLOYED_ADDRESS> \
src/ReserveUtilization.sol:ReserveUtilization \
--verifier-url <RPC_URL>/verify/etherscan \
--etherscan-api-key <TENDERLY_ACCESS_KEY> \
--watchforge verify-contract \
<DEPLOYED_ADDRESS> \
src/ReserveUtilization.sol:ReserveUtilization \
--chain <CHAIN_ID> \
--etherscan-api-key $ETHERSCAN_API_KEYAave v4 Foundry Boilerplate MIT licensed