Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[submodule "contracts/lib/forge-std"]
path = contracts/lib/forge-std
url = https://github.com/foundry-rs/forge-std
[submodule "contracts/lib/solmate"]
path = contracts/lib/solmate
url = https://github.com/transmissions11/solmate
105 changes: 80 additions & 25 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ members = [
"crates/flashblocks-rpc",
"crates/metering",
"crates/node",
"crates/test-utils",
"crates/transaction-tracing",
]

Expand Down Expand Up @@ -41,6 +42,7 @@ codegen-units = 1
base-reth-flashblocks-rpc = { path = "crates/flashblocks-rpc" }
base-reth-metering = { path = "crates/metering" }
base-reth-node = { path = "crates/node" }
base-reth-test-utils = { path = "crates/test-utils" }
base-reth-transaction-tracing = { path = "crates/transaction-tracing" }

# base/tips
Expand All @@ -55,7 +57,10 @@ reth-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.2"
reth-rpc-eth-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.2" }
reth-optimism-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.2" }
reth-rpc-convert = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.2" }
reth-optimism-rpc = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.2" }
reth-optimism-rpc = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.2", features = [
"client",
] }
reth-rpc-layer = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.2" }
reth-optimism-evm = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.2" }
reth-optimism-chainspec = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.2" }
reth-provider = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.2" }
Expand All @@ -69,6 +74,7 @@ reth-exex = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.2" }
reth-db = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.2" }
reth-testing-utils = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.2" }
reth-db-common = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.2" }
reth-ipc = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.2" }

# revm
revm = { version = "29.0.0", default-features = false }
Expand Down
14 changes: 14 additions & 0 deletions contracts/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Compiler files
cache/
out/

# Ignores development broadcast logs
!/broadcast
/broadcast/*/31337/
/broadcast/**/dry-run/

# Docs
docs/

# Dotenv file
.env
66 changes: 66 additions & 0 deletions contracts/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
## Foundry

**Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.**

Foundry consists of:

- **Forge**: Ethereum testing framework (like Truffle, Hardhat and DappTools).
- **Cast**: Swiss army knife for interacting with EVM smart contracts, sending transactions and getting chain data.
- **Anvil**: Local Ethereum node, akin to Ganache, Hardhat Network.
- **Chisel**: Fast, utilitarian, and verbose solidity REPL.

## Documentation

https://book.getfoundry.sh/

## Usage

### Build

```shell
$ forge build
```

### Test

```shell
$ forge test
```

### Format

```shell
$ forge fmt
```

### Gas Snapshots

```shell
$ forge snapshot
```

### Anvil

```shell
$ anvil
```

### Deploy

```shell
$ forge script script/Counter.s.sol:CounterScript --rpc-url <your_rpc_url> --private-key <your_private_key>
```

### Cast

```shell
$ cast <subcommand>
```

### Help

```shell
$ forge --help
$ anvil --help
$ cast --help
```
8 changes: 8 additions & 0 deletions contracts/foundry.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"lib/forge-std": {
"tag": {
"name": "v1.11.0",
"rev": "8e40513d678f392f398620b3ef2b418648b33e89"
}
}
}
6 changes: 6 additions & 0 deletions contracts/foundry.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[profile.default]
src = "src"
out = "out"
libs = ["lib"]

# See more config options https://github.com/foundry-rs/foundry/blob/master/crates/config/README.md#all-options
1 change: 1 addition & 0 deletions contracts/lib/forge-std
Submodule forge-std added at 8e4051
1 change: 1 addition & 0 deletions contracts/lib/solmate
Submodule solmate added at 89365b
19 changes: 19 additions & 0 deletions contracts/script/Counter.s.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;

import {Script} from "forge-std/Script.sol";
import {Counter} from "../src/Counter.sol";

contract CounterScript is Script {
Counter public counter;

function setUp() public {}

function run() public {
vm.startBroadcast();

counter = new Counter();

vm.stopBroadcast();
}
}
Loading
Loading