From 4d5b37fb3df6fb00c4586704e51f099c4634e120 Mon Sep 17 00:00:00 2001 From: debjit Date: Tue, 3 Dec 2024 16:34:32 +0530 Subject: [PATCH] rewards contract call not made to fail if contract not deployed --- src/gnosis.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gnosis.rs b/src/gnosis.rs index d896eb0..fdc8689 100644 --- a/src/gnosis.rs +++ b/src/gnosis.rs @@ -1,6 +1,7 @@ use std::collections::HashMap; use crate::errors::GnosisBlockExecutionError; +use alloy_consensus::constants::KECCAK_EMPTY; use alloy_eips::eip4895::{Withdrawal, Withdrawals}; use alloy_primitives::{address, Address, U256}; use alloy_sol_macro::sol; @@ -156,6 +157,10 @@ where } }; + if state.get(&block_rewards_contract).unwrap().info.code_hash == KECCAK_EMPTY { + return Ok(HashMap::new()); + } + let output_bytes = match result { ExecutionResult::Success { output, .. } => match output { Output::Call(output_bytes) |