Skip to content

Commit

Permalink
feat: foundry-cheatcodes (#5998)
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniPopes authored Oct 17, 2023
1 parent b89418f commit ee5d02c
Show file tree
Hide file tree
Showing 36 changed files with 11,344 additions and 20 deletions.
3 changes: 3 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[alias]
cheats = "test -p foundry-cheatcodes --features schema tests::"

[target.x86_64-pc-windows-msvc]
rustflags = [
# Increases the stack size to 10MB, which is
Expand Down
69 changes: 69 additions & 0 deletions Cargo.lock

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

8 changes: 8 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ foundry-abi = { path = "crates/abi" }
foundry-binder = { path = "crates/binder" }
foundry-cli = { path = "crates/cli" }
foundry-common = { path = "crates/common" }
foundry-cheatcodes = { path = "crates/cheatcodes" }
foundry-config = { path = "crates/config" }
foundry-evm = { path = "crates/evm" }
foundry-macros = { path = "crates/macros" }
Expand Down Expand Up @@ -156,6 +157,7 @@ alloy-primitives = "0.4.1"
alloy-dyn-abi = "0.4.1"
alloy-json-abi = "0.4.1"
alloy-sol-types = "0.4.1"
syn-solidity = "0.4.1"

solang-parser = "=0.3.2"

Expand All @@ -165,6 +167,12 @@ itertools = "0.11"
chrono = { version = "0.4", default-features = false, features = ["clock", "std"] }
hex = { package = "const-hex", version = "1.6", features = ["hex"] }
protobuf = "=3.2.0"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
tracing = "0.1"
jsonpath_lib = "0.3"
eyre = "0.6"
color-eyre = "0.6"

#[patch."https://github.com/gakonst/ethers-rs"]
#ethers = { path = "../ethers-rs/ethers" }
Expand Down
59 changes: 59 additions & 0 deletions crates/cheatcodes/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
[package]
name = "foundry-cheatcodes"
description = "Foundry cheatcodes definitions and implementations"

version.workspace = true
edition.workspace = true
rust-version.workspace = true
authors.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true
exclude.workspace = true

[dependencies]
foundry-macros.workspace = true
alloy-primitives.workspace = true
alloy-sol-types.workspace = true
serde.workspace = true
serde_json.workspace = true

# schema
schemars = { version = "0.8.15", optional = true }

# impls
foundry-common = { workspace = true, optional = true }
foundry-config = { workspace = true, optional = true }
foundry-utils = { workspace = true, optional = true }
alloy-dyn-abi = { workspace = true, optional = true }
alloy-json-abi = { workspace = true, optional = true }
ethers = { workspace = true, optional = true, features = ["ethers-solc"] }
eyre = { workspace = true, optional = true }
futures = { version = "0.3", optional = true }
hex = { workspace = true, optional = true }
itertools = { workspace = true, optional = true }
jsonpath_lib = { workspace = true, optional = true }
revm = { workspace = true, optional = true }
thiserror = { version = "1", optional = true }
tracing = { workspace = true, optional = true }
walkdir = { version = "2", optional = true }

[features]
schema = ["dep:schemars"]
impls = [
"dep:foundry-common",
"dep:foundry-config",
"dep:foundry-utils",
"dep:alloy-dyn-abi",
"dep:alloy-json-abi",
"dep:ethers",
"dep:eyre",
"dep:futures",
"dep:hex",
"dep:itertools",
"dep:jsonpath_lib",
"dep:revm",
"dep:thiserror",
"dep:tracing",
"dep:walkdir",
]
5 changes: 5 additions & 0 deletions crates/cheatcodes/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# foundry-cheatcodes

Foundry cheatcodes definitions and implementations.

All cheatcodes are defined in a single macro call.
Loading

0 comments on commit ee5d02c

Please sign in to comment.