ekx-foundrylisted
Install: claude install-skill Ekinoxis-evm/claude-skills
# Foundry
Our contract toolchain for new Solidity work. (Two older suites are Hardhat — see
[`../ekx-hardhat/SKILL.md`](../ekx-hardhat/SKILL.md).)
Authoritative: the **`foundry-docs` MCP server**.
Web: https://book.getfoundry.sh
---
## Our `foundry.toml`
All three repos agree on the core:
```toml
[profile.default]
src = "src"
out = "out"
libs = ["lib"]
optimizer = true
optimizer_runs = 200
via_ir = true
[rpc_endpoints]
base_sepolia = "${BASE_SEPOLIA_RPC_URL}"
base = "${BASE_RPC_URL}"
[etherscan]
base_sepolia = { key = "${BASESCAN_API_KEY}", url = "https://api-sepolia.basescan.org/api" }
base = { key = "${BASESCAN_API_KEY}", url = "https://api.basescan.org/api" }
```
**`via_ir = true` is required, not optional.** Our contracts hit stack-too-deep
without it. It roughly triples compile time — that is the accepted cost. If a build
suddenly takes 3 minutes, this is why; do not "fix" it by turning IR off.
`optimizer_runs = 200` favours deploy cost over call cost. Correct for contracts
deployed per-property (an AuctionManager) or per-challenge; raise it for a
singleton called constantly.
**Pin your own `solc`.** The OZ copies vendored in `lib/` declare `0.8.27`/prague
in most suites and `0.8.31`/osaka in the newest. Inheriting whatever
`lib/` says produces version drift between repos.
---
## Daily commands
```bash
forge build
forge test -vvv # -vvv shows console.log + revert reasons
forge test --match-test testBid -vvvv
forge test --