foundry-soliditylisted
Install: claude install-skill tenequm/skills
# Foundry Solidity Development
Complete guide for building secure, efficient smart contracts with **Foundry 1.5.0** and **Solidity 0.8.30**.
## When to Use This Skill
- Developing Ethereum/EVM smart contracts
- Writing Forge tests (unit, fuzz, invariant, fork)
- Deploying contracts with scripts
- Using Foundry tools (forge, cast, anvil, chisel)
- Working with `foundry.toml`, `*.t.sol`, `*.s.sol` files
- Debugging transactions and contract interactions
## Quick Start
```bash
# Create new project
forge init my-project && cd my-project
# Build contracts
forge build
# Run tests
forge test
# Deploy (dry-run)
forge script script/Deploy.s.sol --rpc-url sepolia
# Deploy (broadcast)
forge script script/Deploy.s.sol --rpc-url sepolia --broadcast --verify
```
## Project Structure
```
my-project/
├── foundry.toml # Configuration
├── src/ # Contracts
│ └── Counter.sol
├── test/ # Tests (*.t.sol)
│ └── Counter.t.sol
├── script/ # Deploy scripts (*.s.sol)
│ └── Deploy.s.sol
└── lib/ # Dependencies
└── forge-std/
```
## Core Commands
### Build & Test
```bash
forge build # Compile
forge test # Run all tests
forge test -vvvv # With traces
forge test --match-test testDeposit # Filter by test name
forge test --match-contract Vault # Filter by contract
forge test --fork-url $RPC_URL # Fork testing
forge test --gas-report