Skip to content

Commit

Permalink
Remove debug comments
Browse files Browse the repository at this point in the history
  • Loading branch information
lima-limon-inc committed Feb 6, 2025
1 parent db25a3a commit cc60389
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
2 changes: 0 additions & 2 deletions crates/vm/levm/src/environment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ pub type TransientStorage = HashMap<(Address, U256), U256>;

#[derive(Debug, Default, Clone)]
pub struct Environment {
// pub value: U256,
// pub calldata: Bytes,
/// The sender address of the transaction that originated
/// this execution.
pub origin: Address,
Expand Down
10 changes: 0 additions & 10 deletions crates/vm/levm/src/hooks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ impl Hook for DefaultHook {
db: Arc<dyn Database>,
env: &mut Environment,
) -> Result<(), VMError> {
// ACA SE MUTA
let sender_address = env.origin;
let sender_account = get_account(cache, db.clone(), sender_address);

Expand Down Expand Up @@ -90,7 +89,6 @@ impl Hook for DefaultHook {
}
}

// ACA SE MUTA.
// (1) GASLIMIT_PRICE_PRODUCT_OVERFLOW
let gaslimit_price_product =
env.gas_price
Expand All @@ -109,7 +107,6 @@ impl Hook for DefaultHook {

// For the transaction to be valid the sender account has to have a balance >= gas_price * gas_limit + value if tx is type 0 and 1
// balance >= max_fee_per_gas * gas_limit + value + blob_gas_cost if tx is type 2 or 3
// ACA SE MUTA.
let gas_fee_for_valid_tx = env
.tx_max_fee_per_gas
.unwrap_or(env.gas_price)
Expand Down Expand Up @@ -165,7 +162,6 @@ impl Hook for DefaultHook {
// because if the upfront cost is bigger than U256, then,
// technically, the sender will not be able to pay it.

// ACA SE MUTA.
// (3) INSUFFICIENT_ACCOUNT_FUNDS
decrease_account_balance(cache, db.clone(), sender_address, up_front_cost)
.map_err(|_| TxValidationError::InsufficientAccountFunds)?;
Expand All @@ -189,7 +185,6 @@ impl Hook for DefaultHook {
}
}

// ACA SE MUTA.
// (6) INTRINSIC_GAS_TOO_LOW
add_intrinsic_gas(
env.is_create(),
Expand All @@ -198,8 +193,6 @@ impl Hook for DefaultHook {
&env.access_list,
&env.authorization_list,
)?;

// ACA SE MUTA.
// (7) NONCE_IS_MAX
increment_account_nonce(cache, db.clone(), sender_address)
.map_err(|_| VMError::TxValidation(TxValidationError::NonceIsMax))?;
Expand Down Expand Up @@ -304,7 +297,6 @@ impl Hook for DefaultHook {
));
}

// ACA SE MUTA.
env.refunded_gas = eip7702_set_access_code(
cache,
db.clone(),
Expand All @@ -317,7 +309,6 @@ impl Hook for DefaultHook {
}

if env.is_create() {
// ACA SE MUTA.
// Assign bytecode to context and empty calldata
initial_call_frame.bytecode = std::mem::take(&mut initial_call_frame.calldata);
initial_call_frame.valid_jump_destinations =
Expand All @@ -326,7 +317,6 @@ impl Hook for DefaultHook {
// Transfer value to receiver
// It's here to avoid storing the "to" address in the cache before eip7702_set_access_code() step 7).

// ACA SE MUTA.
increase_account_balance(
cache,
db.clone(),
Expand Down

0 comments on commit cc60389

Please sign in to comment.