2.5k
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill openclaw/skills --skill evm-foundry- SKILL.md9.7 KB
Overview
This skill provides a concise Foundry development workflow for EVM-compatible chains with emphasis on Celo. It covers setup, compilation, testing, local forking, deployment, verification, and CLI interaction using forge, cast, and anvil. Use it to standardize projects, speed up iteration, and target Celo networks reliably.
How this skill works
The skill documents how to install Foundry, initialize projects, and configure foundry.toml for Celo mainnet and Sepolia. It explains writing Solidity contracts, adding OpenZeppelin dependencies, running tests locally or against a forked Celo node, deploying with broadcast scripts or forge create, and verifying contracts on Celo block explorers. It also summarizes common cast commands for on-chain interaction and anvil usage for local development and forking.
When to use it
- Starting a new Solidity project targeting Celo or other EVM chains
- Compiling and testing contracts with forge, including coverage and gas reports
- Running local development nodes and forked chain tests with anvil
- Deploying contracts to Celo mainnet or Sepolia and verifying on CeloScan
- Interacting with contracts or encoding/decoding calldata via cast
Best practices
- Keep foundry.toml and .env out of version control; load secrets with source .env
- Use anvil forks to test against real Celo state before mainnet deploys
- Add OpenZeppelin via forge install and maintain remappings in remappings.txt
- Use vm.env* and Script broadcasts for reproducible, automated deploys
- Run forge test --gas-report and forge coverage regularly to catch regressions
Example use cases
- Initialize a new forge project, add OpenZeppelin, write ERC20, and run unit and fuzz tests
- Run anvil --fork-url https://forno.celo.org and execute forked tests to validate mainnet interactions
- Deploy a governance contract to Celo Sepolia using a deploy script and verify it with CELOSCAN API key
- Use cast to read contract state, send transactions, and encode constructor args for verification
- Automate CI to run forge build, forge test --gas-report, and forge verify-contract on merges
FAQ
Use forge verify-contract with the correct chain-id (42220 for mainnet, 11142220 for Sepolia), provide the source path and CELOSCAN_API_KEY, and include constructor args encoded with cast if needed.
Can I run Foundry on Windows?
Yes—use Git Bash or WSL to run foundryup and Foundry tools; PowerShell or Command Prompt are not supported by the installer.