Skip to content

Commit ae0660e

Browse files
committed
initial commit
0 parents  commit ae0660e

1,642 files changed

Lines changed: 360183 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/test.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: CI
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
push:
8+
pull_request:
9+
workflow_dispatch:
10+
11+
env:
12+
FOUNDRY_PROFILE: ci
13+
14+
jobs:
15+
check:
16+
name: Foundry project
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v5
20+
with:
21+
persist-credentials: false
22+
submodules: recursive
23+
24+
- name: Install Foundry
25+
uses: foundry-rs/foundry-toolchain@v1
26+
27+
- name: Show Forge version
28+
run: forge --version
29+
30+
- name: Run Forge fmt
31+
run: forge fmt --check
32+
33+
- name: Run Forge build
34+
run: forge build --sizes
35+
36+
- name: Run Forge tests
37+
run: forge test -vvv

.gitignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Compiler files
2+
cache/
3+
out/
4+
5+
# Ignores development broadcast logs
6+
!/broadcast
7+
/broadcast/*/31337/
8+
/broadcast/**/dry-run/
9+
10+
# Docs
11+
docs/
12+
13+
# Dotenv file
14+
.env

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "lib/forge-std"]
2+
path = lib/forge-std
3+
url = https://github.com/foundry-rs/forge-std

.prettierrc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"printWidth": 500,
3+
"tabWidth": 4,
4+
"overrides": [
5+
{
6+
"files": "*.sol",
7+
"options": {
8+
"printWidth": 500
9+
}
10+
}
11+
]
12+
}

README.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
## Foundry
2+
3+
**Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.**
4+
5+
Foundry consists of:
6+
7+
- **Forge**: Ethereum testing framework (like Truffle, Hardhat and DappTools).
8+
- **Cast**: Swiss army knife for interacting with EVM smart contracts, sending transactions and getting chain data.
9+
- **Anvil**: Local Ethereum node, akin to Ganache, Hardhat Network.
10+
- **Chisel**: Fast, utilitarian, and verbose solidity REPL.
11+
12+
## Documentation
13+
14+
https://book.getfoundry.sh/
15+
16+
## Usage
17+
18+
### Build
19+
20+
```shell
21+
$ forge build
22+
```
23+
24+
### Test
25+
26+
```shell
27+
$ forge test
28+
```
29+
30+
### Format
31+
32+
```shell
33+
$ forge fmt
34+
```
35+
36+
### Gas Snapshots
37+
38+
```shell
39+
$ forge snapshot
40+
```
41+
42+
### Anvil
43+
44+
```shell
45+
$ anvil
46+
```
47+
48+
### Deploy
49+
50+
```shell
51+
$ forge script script/Counter.s.sol:CounterScript --rpc-url <your_rpc_url> --private-key <your_private_key>
52+
```
53+
54+
### Cast
55+
56+
```shell
57+
$ cast <subcommand>
58+
```
59+
60+
### Help
61+
62+
```shell
63+
$ forge --help
64+
$ anvil --help
65+
$ cast --help
66+
```

foundry.lock

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"lib/forge-std": {
3+
"tag": {
4+
"name": "v1.11.0",
5+
"rev": "8e40513d678f392f398620b3ef2b418648b33e89"
6+
}
7+
}
8+
}

foundry.toml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
[profile.default]
2+
src = "src"
3+
out = "out"
4+
libs = ["lib"]
5+
6+
# See more config options https://github.com/foundry-rs/foundry/blob/master/crates/config/README.md#all-options
7+
solc = "0.8.22"
8+
# https://github.com/OpenZeppelin/openzeppelin-foundry-upgrades
9+
ffi = true
10+
ast = true
11+
build_info = true
12+
extra_output = ["storageLayout"]
13+
fs_permissions = [{ access = "read-write", path = "./"}]
14+
15+
[rpc_endpoints]
16+
sepolia = "${SEPOLIA_RPC_URL}"
17+
18+
[fmt]
19+
line_length = 500
20+
tab_width = 4
21+

lib/forge-std

Submodule forge-std added at 27ab851
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/config@2.3.0/schema.json",
3+
"changelog": [
4+
"@changesets/changelog-github",
5+
{
6+
"repo": "OpenZeppelin/openzeppelin-contracts"
7+
}
8+
],
9+
"commit": false,
10+
"access": "public",
11+
"baseBranch": "master"
12+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
comment: off
2+
github_checks:
3+
annotations: false
4+
coverage:
5+
status:
6+
patch:
7+
default:
8+
target: 95%
9+
only_pulls: true
10+
project:
11+
default:
12+
threshold: 1%
13+
ignore:
14+
- "test"
15+
- "contracts/mocks"
16+
- "contracts/vendor"

0 commit comments

Comments
 (0)