Skip to content

Commit

Permalink
rewards contract call not made to fail if contract not deployed
Browse files Browse the repository at this point in the history
  • Loading branch information
debjit-bw committed Dec 3, 2024
1 parent 9d4ad0b commit 4d5b37f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/gnosis.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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) |
Expand Down

0 comments on commit 4d5b37f

Please sign in to comment.