Skip to content

Commit

Permalink
feat: sendRawTransaction cheatcode
Browse files Browse the repository at this point in the history
  • Loading branch information
teddav committed May 29, 2024
1 parent aa333c6 commit c2e7007
Show file tree
Hide file tree
Showing 18 changed files with 318 additions and 88 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ out.json
.idea
.vscode
bloat*
/test_implem/
/test_alloy_rcp/
46 changes: 12 additions & 34 deletions Cargo.lock

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

30 changes: 29 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -224,4 +224,32 @@ axum = "0.7"
hyper = "1.0"
reqwest = { version = "0.12", default-features = false }
tower = "0.4"
tower-http = "0.5"
tower-http = "0.5"

[patch.'https://github.com/alloy-rs/alloy']
alloy-consensus = { path = "../alloy/crates/consensus" }
alloy-contract = { path = "../alloy/crates/contract" }
alloy-eips = { path = "../alloy/crates/eips" }
alloy-genesis = { path = "../alloy/crates/genesis" }
alloy-json-rpc = { path = "../alloy/crates/json-rpc" }
alloy-network = { path = "../alloy/crates/network" }
alloy-node-bindings = { path = "../alloy/crates/node-bindings" }
alloy-provider = { path = "../alloy/crates/provider" }
alloy-pubsub = { path = "../alloy/crates/pubsub" }
alloy-rpc-client = { path = "../alloy/crates/rpc-client" }
alloy-rpc-types-engine = { path = "../alloy/crates/rpc-types-engine" }
alloy-rpc-types-trace = { path = "../alloy/crates/rpc-types-trace" }
alloy-rpc-types = { path = "../alloy/crates/rpc-types" }
alloy-signer = { path = "../alloy/crates/signer" }
alloy-signer-wallet = { path = "../alloy/crates/signer-wallet" }
alloy-signer-aws = { path = "../alloy/crates/signer-aws" }
alloy-signer-ledger = { path = "../alloy/crates/signer-ledger" }
alloy-signer-trezor = { path = "../alloy/crates/signer-trezor" }
alloy-transport = { path = "../alloy/crates/transport" }
alloy-transport-http = { path = "../alloy/crates/transport-http" }
alloy-transport-ipc = { path = "../alloy/crates/transport-ipc" }
alloy-transport-ws = { path = "../alloy/crates/transport-ws" }

[patch.crates-io]
revm = { path = "../revm/crates/revm" }
revm-primitives = { path = "../revm/crates/primitives" }
4 changes: 3 additions & 1 deletion crates/cheatcodes/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,14 @@ alloy-primitives.workspace = true
alloy-genesis.workspace = true
alloy-sol-types.workspace = true
alloy-provider.workspace = true
alloy-rpc-types.workspace = true
alloy-rpc-types = { workspace = true, features = ["k256"] }
alloy-signer.workspace = true
alloy-signer-wallet = { workspace = true, features = [
"mnemonic-all-languages",
"keystore",
] }
alloy-consensus = { workspace = true, features = ["k256"] }
alloy-rlp.workspace = true
parking_lot = "0.12"

eyre.workspace = true
Expand Down
20 changes: 20 additions & 0 deletions crates/cheatcodes/assets/cheatcodes.json

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

4 changes: 4 additions & 0 deletions crates/cheatcodes/spec/src/vm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -677,6 +677,10 @@ interface Vm {
#[cheatcode(group = Evm, safety = Safe)]
function lastCallGas() external view returns (Gas memory gas);

/// takes a signed transaction as bytes and executes it
#[cheatcode(group = Evm, safety = Safe)]
function sendRawTransaction(bytes calldata data) external;

// ======== Test Assertions and Utilities ========

/// If the condition is false, discard this run's fuzz inputs and generate new ones.
Expand Down
Loading

0 comments on commit c2e7007

Please sign in to comment.