Skip to content

Commit 76ba454

Browse files
committed
initial commit
0 parents  commit 76ba454

16 files changed

Lines changed: 3221 additions & 0 deletions

File tree

.env.example

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# ── Wallet ──────────────────────────────────────────────
2+
PRIVATE_KEY=0x0000000000000000000000000000000000000000000000000000000000000000
3+
4+
# ── RPC ─────────────────────────────────────────────────
5+
RPC_URL=https://rpc.evm.xrpl.org
6+
7+
# ── Deployed contract (fill after deploy) ────────────────
8+
CONTRACT_ADDRESS=0x0000000000000000000000000000000000000000
9+
10+
# ── Optional: block explorer verify ─────────────────────
11+
# ETHERSCAN_API_KEY=

.github/workflows/test.yml

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

.gitignore

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Foundry
2+
out/
3+
cache/
4+
broadcast/
5+
6+
# Environment
7+
.env
8+
9+
# Node (if any tooling added)
10+
node_modules/
11+
12+
# OS
13+
.DS_Store
14+
Thumbs.db
15+
16+
.vercel

.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

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.15.0",
5+
"rev": "0844d7e1fc5e60d77b68e469bff60265f236c398"
6+
}
7+
}
8+
}

foundry.toml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
[profile.default]
2+
src = "src"
3+
out = "out"
4+
libs = ["lib"]
5+
test = "test"
6+
script = "script"
7+
solc = "0.8.24"
8+
optimizer = true
9+
optimizer_runs = 200
10+
verbosity = 2
11+
12+
[profile.default.fuzz]
13+
runs = 512
14+
seed = "0xdeadbeef"
15+
16+
[profile.default.invariant]
17+
runs = 128
18+
depth = 15
19+
20+
[fmt]
21+
line_length = 100
22+
tab_width = 4
23+
bracket_spacing = true

0 commit comments

Comments
 (0)