Skip to content

Commit 58c3051

Browse files
committed
Initial commit
0 parents  commit 58c3051

16 files changed

+8361
-0
lines changed

.github/workflows/CI.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: CI
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
8+
jobs:
9+
run-ci:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
with:
14+
submodules: recursive
15+
- uses: actions/setup-node@v2
16+
- name: Install dev dependencies
17+
run: npm install
18+
19+
- name: Install Foundry
20+
uses: onbjerg/foundry-toolchain@v1
21+
with:
22+
version: nightly
23+
24+
- name: Run lint check
25+
run: npm run lint:check
26+
27+
- name: Run tests
28+
run: forge test

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
out/
2+
cache/
3+
node_modules/
4+
.env

.gitmodules

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[submodule "lib/ds-test"]
2+
path = lib/ds-test
3+
url = https://github.com/dapphub/ds-test
4+
[submodule "lib/solmate"]
5+
path = lib/solmate
6+
url = https://github.com/Rari-Capital/solmate
7+
[submodule "lib/forge-std"]
8+
path = lib/forge-std
9+
url = https://github.com/brockelmore/forge-std

.solhint.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"extends": "solhint:recommended",
3+
"rules": {
4+
"compiler-version": ["error",">=0.8.0"],
5+
"avoid-low-level-calls": "off"
6+
}
7+
}

.vscode/settings.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"editor.formatOnSave": true,
3+
"solidity.formatter": "prettier",
4+
"[solidity]": {
5+
"editor.defaultFormatter": "JuanBlanco.solidity"
6+
}
7+
}

README.md

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Forge Template
2+
3+
A template for quickly getting started with forge
4+
5+
## Getting Started
6+
7+
```
8+
mkdir my-project
9+
cd my-project
10+
forge init --template https://github.com/FrankieIsLost/forge-template
11+
git submodule update --init --recursive ## initialize submodule dependencies
12+
npm install ## install development dependencies
13+
forge build
14+
forge test
15+
```
16+
17+
## Features
18+
19+
### Testing Utilities
20+
21+
Includes a `Utilities.sol` contract with common testing methods (like creating users with an initial balance), as well as various other utility contracts.
22+
23+
### Preinstalled dependencies
24+
25+
`ds-test` for testing, `forge-std` for better cheatcode UX, and `solmate` for optimized contract implementations.
26+
27+
### Linting
28+
29+
Pre-configured `solhint` and `prettier-plugin-solidity`. Can be run by
30+
31+
```
32+
npm run solhint
33+
npm run prettier
34+
```
35+
36+
### CI with Github Actions
37+
38+
Automatically run linting and tests on pull requests.
39+
40+
### Default Configuration
41+
42+
Including `.gitignore`, `.vscode`, `remappings.txt`
43+
44+
## Acknowledgement
45+
46+
Inspired by great dapptools templates like https://github.com/gakonst/forge-template, https://github.com/gakonst/dapptools-template and https://github.com/transmissions11/dapptools-template

lib/ds-test

Submodule ds-test added at 0a5da56

lib/forge-std

Submodule forge-std added at 4aa8f01

lib/solmate

Submodule solmate added at dd13c61

0 commit comments

Comments
 (0)