https://github.com/owieth/foundry-setup
Production-ready Foundry/Solidity project template with CI, static analysis, and GitHub Pages docs
https://github.com/owieth/foundry-setup
ci-cd ethereum forge foundry-rs hardhat-alternative security smart-contracts solidity template
Last synced: 2 months ago
JSON representation
Production-ready Foundry/Solidity project template with CI, static analysis, and GitHub Pages docs
- Host: GitHub
- URL: https://github.com/owieth/foundry-setup
- Owner: owieth
- Created: 2023-06-19T07:39:16.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2026-03-30T13:12:27.000Z (3 months ago)
- Last Synced: 2026-04-04T10:56:17.186Z (2 months ago)
- Topics: ci-cd, ethereum, forge, foundry-rs, hardhat-alternative, security, smart-contracts, solidity, template
- Language: Solidity
- Homepage: https://owieth.github.io/foundry-setup/
- Size: 568 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Foundry Setup Template
[](https://github.com/owieth/foundry-setup/actions/workflows/test.yml)
[](https://github.com/owieth/foundry-setup/actions/workflows/slither.yml)
[](LICENSE)

A template repository for Foundry/Solidity projects with CI, static analysis, and auto-generated docs.
## Quick Start
**Prerequisites:** [Install Foundry](https://book.getfoundry.sh/getting-started/installation)
```shell
# Clone and set up
git clone https://github.com/owieth/foundry-setup
cd foundry-setup
forge install
# Copy environment variables
cp .env.example .env
# Fill in your values, then:
source .env
```
## Local Development
### Build & Test
```shell
forge build
forge test -vvvv
forge snapshot
```
### Format
```shell
forge fmt
forge fmt --check
```
### Generate Docs
```shell
forge doc
forge doc --serve # preview at http://localhost:3000
```
### Deploy
```shell
source .env
forge script script/.s.sol:<Contract> --rpc-url <chain> --broadcast --verify -vvvvv
```
### Local Fork with Anvil
```shell
# Fresh local chain
anvil
# Fork Sepolia
anvil -f https://eth-sepolia.g.alchemy.com/v2/<your_api_key>
```
## Contract Layout
Layout of `**.sol`:
- version
- imports
- interfaces, libraries, contracts
- usings (`using ... for ...`)
- errors
- type declarations
- state variables
- events
- modifiers
- functions
Layout of functions (inside `**.sol` after modifiers):
- constructor
- receive (if exists)
- fallback (if exists)
- external
- public
- internal
- private
- view & pure (last per visibility group)
More → [STYLE.md](./STYLE.md)