From a9ed1b5e4f98e869134c35eed7ad65e16203818f Mon Sep 17 00:00:00 2001 From: enitrat Date: Wed, 18 Sep 2024 16:56:04 +0200 Subject: [PATCH] remove prints --- crates/evm/src/instructions/memory_operations.cairo | 1 - crates/evm/src/interpreter.cairo | 7 +++---- crates/evm/src/test_utils.cairo | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/crates/evm/src/instructions/memory_operations.cairo b/crates/evm/src/instructions/memory_operations.cairo index b340f96b..3597803d 100644 --- a/crates/evm/src/instructions/memory_operations.cairo +++ b/crates/evm/src/instructions/memory_operations.cairo @@ -104,7 +104,6 @@ pub impl MemoryOperation of MemoryOperationTrait { fn exec_sstore(ref self: VM) -> Result<(), EVMError> { let key = self.stack.pop()?; let new_value = self.stack.pop()?; - println!("key: {}, new_value: {}", key, new_value); ensure(self.gas_left() > gas::CALL_STIPEND, EVMError::OutOfGas)?; // EIP-1706 let evm_address = self.message().target.evm; diff --git a/crates/evm/src/interpreter.cairo b/crates/evm/src/interpreter.cairo index ba4a0356..cb7f0bfc 100644 --- a/crates/evm/src/interpreter.cairo +++ b/crates/evm/src/interpreter.cairo @@ -108,8 +108,9 @@ pub impl EVMImpl of EVMTrait { let (message, is_deploy_tx) = { let mut sender_account = env.state.get_account(origin.evm); - // Charge the intrinsic gas to the sender so that it's not available for the execution of the transaction - // but don't trigger any actual transfer, as only the actual consumde gas is charged at the end of the transaction + // Charge the intrinsic gas to the sender so that it's not available for the execution + // of the transaction but don't trigger any actual transfer, as only the actual consumde + // gas is charged at the end of the transaction sender_account.set_balance(sender_account.balance() - max_fee.into()); let (message, is_deploy_tx) = self @@ -124,7 +125,6 @@ pub impl EVMImpl of EVMTrait { let mut summary = Self::process_message_call(message, env, is_deploy_tx); - // Cancel the max_fee that was taken from the sender to prevent double charging let mut sender_account = summary.state.get_account(origin.evm); sender_account.set_balance(sender_account.balance() + max_fee.into()); @@ -406,7 +406,6 @@ pub impl EVMImpl of EVMTrait { } fn execute_opcode(ref self: VM, opcode: u8) -> Result<(), EVMError> { - println!("Address {:?}, opcode {:?}, pc {:?}, gas left in call {:?}", self.message().code_address.evm, opcode, self.pc(), self.gas_left()); // Call the appropriate function based on the opcode. if opcode == 0x00 { // STOP diff --git a/crates/evm/src/test_utils.cairo b/crates/evm/src/test_utils.cairo index 2b5ac3ae..90f0fc51 100644 --- a/crates/evm/src/test_utils.cairo +++ b/crates/evm/src/test_utils.cairo @@ -131,7 +131,7 @@ pub fn origin() -> EthAddress { 'origin'.try_into().unwrap() } -pub fn dual_origin() -> Address{ +pub fn dual_origin() -> Address { let origin_evm = origin(); let origin_starknet = utils::helpers::compute_starknet_address( test_address(), origin_evm, uninitialized_account()