Skip to content

Commit

Permalink
Add support for Ganache
Browse files Browse the repository at this point in the history
  • Loading branch information
intoverflow committed Apr 18, 2024
1 parent 9c01ddf commit 3ed92d2
Show file tree
Hide file tree
Showing 11 changed files with 3,878 additions and 25 deletions.
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"rust-analyzer.linkedProjects": [
"./Cargo.toml",
"./guests/eth-block/Cargo.toml",
"./guests/anvil-block/Cargo.toml",
"./guests/ganache-merge-block/Cargo.toml",
"./guests/ganache-shanghai-block/Cargo.toml",
"./guests/op-block/Cargo.toml",
"./guests/op-compose/Cargo.toml",
"./guests/op-derive/Cargo.toml",
Expand Down
2 changes: 1 addition & 1 deletion guests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ edition = "2021"
risc0-build = { workspace = true }

[package.metadata.risc0]
methods = ["eth-block", "op-block", "op-derive", "op-compose", "anvil-block"]
methods = ["eth-block", "ganache-merge-block", "ganache-shanghai-block", "op-block", "op-derive", "op-compose"]

[features]
debug-guest-build = []
Expand Down

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

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "anvil-block"
name = "ganache-merge-block"
version = "0.1.0"
edition = "2021"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
use risc0_zkvm::guest::env;
use zeth_lib::{
builder::{BlockBuilderStrategy, EthereumStrategy},
consts::ANVIL_CHAIN_SPEC,
consts::GANACHE_MERGE_CHAIN_SPEC,
};

risc0_zkvm::guest::entry!(main);
Expand All @@ -26,7 +26,7 @@ pub fn main() {
// Read the input previous block and transaction data
let input = env::read();
// Build the resulting block
let mut output = EthereumStrategy::build_from(&ANVIL_CHAIN_SPEC, input)
let mut output = EthereumStrategy::build_from(&GANACHE_MERGE_CHAIN_SPEC, input)
.expect("Failed to build the resulting block");
// Abridge successful construction results
if let Some(replaced_state) = output.replace_state_with_hash() {
Expand Down
Loading

0 comments on commit 3ed92d2

Please sign in to comment.