Skip to content

Commit

Permalink
Ran cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
omerfirmak committed Nov 23, 2023
1 parent 2159a0a commit 0e98020
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
11 changes: 6 additions & 5 deletions vm/rust/src/juno_state_reader.rs
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
use std::{
ffi::{c_char, c_uchar, c_void, CStr},
slice, sync::Mutex,
slice,
sync::Mutex,
};

use blockifier::execution::contract_class::ContractClass;
use blockifier::state::errors::StateError;
use blockifier::{
execution::contract_class::{ContractClassV0, ContractClassV1},
state::state_api::{StateReader, StateResult},
};
use cached::{Cached, SizedCache};
use once_cell::sync::Lazy;
use starknet_api::core::{ClassHash, CompiledClassHash, ContractAddress, Nonce};
use starknet_api::hash::StarkFelt;
use starknet_api::state::StorageKey;
use cached::{SizedCache, Cached};
use blockifier::execution::contract_class::ContractClass;
use blockifier::state::errors::StateError;
use once_cell::sync::Lazy;

extern "C" {
fn JunoFree(ptr: *const c_void);
Expand Down
14 changes: 10 additions & 4 deletions vm/rust/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ use blockifier::{
abi::constants::{INITIAL_GAS_COST, N_STEPS_RESOURCE},
block_context::BlockContext,
execution::{
common_hints::ExecutionMode,
contract_class::{ContractClass, ContractClassV1},
entry_point::{CallEntryPoint, CallType, EntryPointExecutionContext, ExecutionResources},
common_hints::ExecutionMode,
},
fee::fee_utils::calculate_tx_fee,
state::cached_state::CachedState,
Expand All @@ -41,7 +41,7 @@ use starknet_api::{
transaction::Fee,
};
use starknet_api::{
core::{ChainId, ContractAddress, EntryPointSelector, ClassHash},
core::{ChainId, ClassHash, ContractAddress, EntryPointSelector},
hash::StarkHash,
transaction::TransactionVersion,
};
Expand Down Expand Up @@ -232,7 +232,12 @@ pub extern "C" fn cairoVMExecute(
_ => None,
};

let txn = transaction_from_api(txn_and_query_bit.txn.clone(), contract_class, paid_fee_on_l1, txn_and_query_bit.query_bit);
let txn = transaction_from_api(
txn_and_query_bit.txn.clone(),
contract_class,
paid_fee_on_l1,
txn_and_query_bit.query_bit,
);
if let Err(e) = txn {
report_error(reader_handle, e.to_string().as_str());
return;
Expand Down Expand Up @@ -268,7 +273,8 @@ pub extern "C" fn cairoVMExecute(
}

let actual_fee = t.actual_fee.0.into();
let mut trace = jsonrpc::new_transaction_trace(txn_and_query_bit.txn, t, &mut txn_state);
let mut trace =
jsonrpc::new_transaction_trace(txn_and_query_bit.txn, t, &mut txn_state);
if trace.is_err() {
report_error(
reader_handle,
Expand Down

0 comments on commit 0e98020

Please sign in to comment.