Skip to content

Commit

Permalink
refactor(blockifier): rename actual_cost to receipt (#896)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yoni-Starkware authored Sep 19, 2024
1 parent 633f8fd commit 2ab9918
Show file tree
Hide file tree
Showing 10 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion crates/blockifier/src/blockifier/stateful_validator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ use crate::blockifier::transaction_executor::{
};
use crate::context::{BlockContext, TransactionContext};
use crate::execution::call_info::CallInfo;
use crate::fee::actual_cost::TransactionReceipt;
use crate::fee::fee_checks::PostValidationReport;
use crate::fee::receipt::TransactionReceipt;
use crate::state::cached_state::CachedState;
use crate::state::errors::StateError;
use crate::state::state_api::StateReader;
Expand Down
2 changes: 1 addition & 1 deletion crates/blockifier/src/fee.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pub mod actual_cost;
pub mod eth_gas_constants;
pub mod fee_checks;
pub mod fee_utils;
pub mod gas_usage;
pub mod receipt;
2 changes: 1 addition & 1 deletion crates/blockifier/src/fee/fee_checks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ use starknet_types_core::felt::Felt;
use thiserror::Error;

use crate::context::TransactionContext;
use crate::fee::actual_cost::TransactionReceipt;
use crate::fee::fee_utils::{get_balance_and_if_covers_fee, get_fee_by_gas_vector};
use crate::fee::receipt::TransactionReceipt;
use crate::state::state_api::StateReader;
use crate::transaction::errors::TransactionExecutionError;
use crate::transaction::objects::{
Expand Down
2 changes: 1 addition & 1 deletion crates/blockifier/src/fee/fee_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ use starknet_api::transaction::{Fee, Resource, ValidResourceBounds};
use crate::abi::constants::N_STEPS_RESOURCE;
use crate::blockifier::block::GasPrices;
use crate::context::BlockContext;
use crate::fee::actual_cost::TransactionReceipt;
use crate::fee::fee_checks::{FeeCheckError, FeeCheckReportFields, PostExecutionReport};
use crate::fee::fee_utils::get_vm_resources_cost;
use crate::fee::receipt::TransactionReceipt;
use crate::test_utils::contracts::FeatureContract;
use crate::test_utils::initial_test_state::test_state;
use crate::test_utils::{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use crate::transaction::transaction_types::TransactionType;
use crate::utils::usize_from_u128;

#[cfg(test)]
#[path = "actual_cost_test.rs"]
#[path = "receipt_test.rs"]
pub mod test;

/// Parameters required to compute actual cost of a transaction.
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion crates/blockifier/src/transaction/account_transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ use crate::context::{BlockContext, TransactionContext};
use crate::execution::call_info::{CallInfo, Retdata};
use crate::execution::contract_class::ContractClass;
use crate::execution::entry_point::{CallEntryPoint, CallType, EntryPointExecutionContext};
use crate::fee::actual_cost::TransactionReceipt;
use crate::fee::fee_checks::{FeeCheckReportFields, PostExecutionReport};
use crate::fee::fee_utils::{
get_fee_by_gas_vector,
get_sequencer_balance_keys,
verify_can_pay_committed_bounds,
};
use crate::fee::gas_usage::estimate_minimal_gas_vector;
use crate::fee::receipt::TransactionReceipt;
use crate::retdata;
use crate::state::cached_state::{StateChanges, TransactionalState};
use crate::state::state_api::{State, StateReader, UpdatableState};
Expand Down
2 changes: 1 addition & 1 deletion crates/blockifier/src/transaction/objects.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ use crate::abi::constants as abi_constants;
use crate::blockifier::block::BlockInfo;
use crate::context::TransactionContext;
use crate::execution::call_info::{CallInfo, ExecutionSummary, MessageL1CostInfo, OrderedEvent};
use crate::fee::actual_cost::TransactionReceipt;
use crate::fee::eth_gas_constants;
use crate::fee::fee_utils::{get_fee_by_gas_vector, get_vm_resources_cost};
use crate::fee::gas_usage::{
Expand All @@ -34,6 +33,7 @@ use crate::fee::gas_usage::{
get_log_message_to_l1_emissions_cost,
get_onchain_data_segment_length,
};
use crate::fee::receipt::TransactionReceipt;
use crate::state::cached_state::StateChangesCount;
use crate::transaction::constants;
use crate::transaction::errors::{
Expand Down
2 changes: 1 addition & 1 deletion crates/blockifier/src/transaction/transaction_execution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use crate::bouncer::verify_tx_weights_in_bounds;
use crate::context::BlockContext;
use crate::execution::contract_class::ClassInfo;
use crate::execution::entry_point::EntryPointExecutionContext;
use crate::fee::actual_cost::TransactionReceipt;
use crate::fee::receipt::TransactionReceipt;
use crate::state::cached_state::TransactionalState;
use crate::state::state_api::UpdatableState;
use crate::transaction::account_transaction::AccountTransaction;
Expand Down
2 changes: 1 addition & 1 deletion crates/blockifier/src/transaction/transactions_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ use crate::execution::entry_point::{CallEntryPoint, CallType};
use crate::execution::errors::{ConstructorEntryPointExecutionError, EntryPointExecutionError};
use crate::execution::syscalls::hint_processor::EmitEventError;
use crate::execution::syscalls::SyscallSelector;
use crate::fee::actual_cost::TransactionReceipt;
use crate::fee::fee_utils::balance_to_big_uint;
use crate::fee::gas_usage::{
estimate_minimal_gas_vector,
get_da_gas_cost,
get_onchain_data_segment_length,
};
use crate::fee::receipt::TransactionReceipt;
use crate::state::cached_state::{CachedState, StateChangesCount, TransactionalState};
use crate::state::errors::StateError;
use crate::state::state_api::{State, StateReader};
Expand Down

0 comments on commit 2ab9918

Please sign in to comment.