Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BlockScout integration fixes #917

Merged
merged 2 commits into from
Sep 25, 2023
Merged
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
1 change: 1 addition & 0 deletions examples/demo-stf/src/genesis_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ fn get_evm_config(genesis_addresses: Vec<reth_primitives::Address>) -> EvmConfig
chain_id: 1,
limit_contract_code_size: None,
spec: vec![(0, SpecId::SHANGHAI)].into_iter().collect(),
block_timestamp_delta: 1u64,
..Default::default()
}
}
Expand Down
4 changes: 3 additions & 1 deletion module-system/module-implementations/sov-evm/src/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ impl<C: sov_modules_api::Context> Evm<C> {
.last(&mut working_set.accessory_state())
.expect("Head block must be set"),
Some(ref block_number) => {
let block_number = block_number.strip_prefix("0x").unwrap_or(block_number);
let block_number =
usize::from_str_radix(block_number, 16).expect("Block number must be hex");
self.blocks
Expand Down Expand Up @@ -122,9 +123,10 @@ impl<C: sov_modules_api::Context> Evm<C> {
};

// Build rpc block response
let total_difficulty = Some(block.header.difficulty);
let block = reth_rpc_types::Block {
header,
total_difficulty: Default::default(),
total_difficulty,
uncles: Default::default(),
transactions,
size: Default::default(),
Expand Down
8 changes: 8 additions & 0 deletions scripts/blockscout/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
DATABASE_URL="postgresql://postgres:foobar@localhost:5432/blockscout"
ETHEREUM_JSONRPC_HTTP_URL="http://127.0.0.1:12345"
ETHEREUM_JSONRPC_VARIANT="ganache"
COIN="sovereign"
MIX_ENV="dev"
MICROSERVICE_SC_VERIFIER_URL="http://0.0.0.0:8050/"
DISABLE_INDEXER="false"
LOG_LEVEL="trace"
1 change: 1 addition & 0 deletions scripts/retesteth/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
`config.json` is the WIP configuration file for using `retesteth` with `sov-evm`. It's based on the configuration options of `evmone` and must be extensively updated to work with `sov-evm`, it's broken as of now. Nonetheless, it's committed into version control to share progress across `sov-evm` maintainers.
Loading