Skip to content

Commit

Permalink
fix: "cargo fmt"
Browse files Browse the repository at this point in the history
 Changes to be committed:
	modified:   bin/rundler/src/cli/mod.rs
	modified:   crates/rpc/src/eth/api.rs
	modified:   crates/types/src/hybrid_compute.rs
  • Loading branch information
mmontour1306 committed Nov 8, 2024
1 parent 07a1982 commit 256ee28
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
14 changes: 10 additions & 4 deletions bin/rundler/src/cli/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ use rundler_rpc::{EthApiSettings, RundlerApiSettings};
use rundler_sim::{
EstimationSettings, PrecheckSettings, PriorityFeeMode, SimulationSettings, MIN_CALL_GAS_LIMIT,
};
use rundler_types::hybrid_compute;
use rundler_types::contracts::v0_7::hc_helper::HCHelper;
use rundler_types::{contracts::v0_7::hc_helper::HCHelper, hybrid_compute};

/// Main entry point for the CLI
///
Expand All @@ -54,10 +53,17 @@ pub async fn run() -> anyhow::Result<()> {

let cs = chain_spec::resolve_chain_spec(&opt.common.network, &opt.common.chain_spec);
tracing::info!("Chain spec: {:#?}", cs);
let node_http = opt.common.node_http.clone().expect("must provide node_http");
let node_http = opt
.common
.node_http
.clone()
.expect("must provide node_http");
let p2 = rundler_provider::new_provider(&node_http, None)?;
let hx = HCHelper::new(opt.common.hc_helper_addr, p2);
let slot_idx = hx.response_slot().await.expect("Failed to get ResponseSlot");
let slot_idx = hx
.response_slot()
.await
.expect("Failed to get ResponseSlot");

hybrid_compute::init(
opt.common.hc_helper_addr,
Expand Down
3 changes: 1 addition & 2 deletions crates/rpc/src/eth/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ use jsonrpsee::{
};
use rundler_types::{
chain::ChainSpec,
contracts::v0_6::{simple_account::SimpleAccount},
contracts::v0_7::{hc_helper::HCHelper},
contracts::{v0_6::simple_account::SimpleAccount, v0_7::hc_helper::HCHelper},
hybrid_compute,
pool::Pool,
UserOperation, UserOperationOptionalGas, UserOperationVariant,
Expand Down
2 changes: 1 addition & 1 deletion crates/types/src/hybrid_compute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ pub fn hc_map_key(revert_data: &Bytes) -> H256 {
/// Calculates the HCHelper storage slot key for a ResponseCache entry
pub fn hc_storage_key(map_key: H256) -> H256 {
let cfg = HC_CONFIG.lock().unwrap();
let slot_idx_bytes:Bytes = cfg.slot_idx.encode().into();
let slot_idx_bytes: Bytes = cfg.slot_idx.encode().into();

let storage_key: H256 =
keccak256([Bytes::from(map_key.to_fixed_bytes()), slot_idx_bytes].concat()).into();
Expand Down

0 comments on commit 256ee28

Please sign in to comment.