Skip to content

Commit

Permalink
remove prints
Browse files Browse the repository at this point in the history
  • Loading branch information
enitrat committed Sep 18, 2024
1 parent 22a4efd commit a9ed1b5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
1 change: 0 additions & 1 deletion crates/evm/src/instructions/memory_operations.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
7 changes: 3 additions & 4 deletions crates/evm/src/interpreter.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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());
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion crates/evm/src/test_utils.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit a9ed1b5

Please sign in to comment.