From effc11a5f62d7de9278246a40d2a30246dd07351 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Walter?= Date: Fri, 3 Nov 2023 16:52:37 +0100 Subject: [PATCH] Remove some unused implicit args --- src/kakarot/execution_context.cairo | 14 ++------------ src/kakarot/kakarot.cairo | 2 +- src/kakarot/library.cairo | 5 +---- src/kakarot/memory.cairo | 1 - src/kakarot/stack.cairo | 1 - tests/src/kakarot/accounts/eoa/mock_kakarot.cairo | 2 +- 6 files changed, 5 insertions(+), 20 deletions(-) diff --git a/src/kakarot/execution_context.cairo b/src/kakarot/execution_context.cairo index 996d730df..26d89e198 100644 --- a/src/kakarot/execution_context.cairo +++ b/src/kakarot/execution_context.cairo @@ -65,12 +65,7 @@ namespace ExecutionContext { // @dev Initialize the execution context of a specific contract. // @param call_context The call_context (see model.CallContext) to be executed. // @return ExecutionContext The initialized execution context. - func init{ - syscall_ptr: felt*, - pedersen_ptr: HashBuiltin*, - range_check_ptr, - bitwise_ptr: BitwiseBuiltin*, - }(call_context: model.CallContext*) -> model.ExecutionContext* { + func init(call_context: model.CallContext*) -> model.ExecutionContext* { let stack = Stack.init(); let memory = Memory.init(); let state = State.init(); @@ -161,12 +156,7 @@ namespace ExecutionContext { // TL;DR: ensure that the prover used values that are consistent with the dictionary. // @param self The pointer to the execution context. // @return Summary The pointer to the execution Summary. - func finalize{ - syscall_ptr: felt*, - pedersen_ptr: HashBuiltin*, - range_check_ptr, - bitwise_ptr: BitwiseBuiltin*, - }(self: model.ExecutionContext*) -> Summary* { + func finalize{range_check_ptr}(self: model.ExecutionContext*) -> Summary* { alloc_locals; let memory_summary = Memory.finalize(self.memory); let stack_summary = Stack.finalize(self.stack); diff --git a/src/kakarot/kakarot.cairo b/src/kakarot/kakarot.cairo index 1453fbecf..37d4576a8 100644 --- a/src/kakarot/kakarot.cairo +++ b/src/kakarot/kakarot.cairo @@ -124,7 +124,7 @@ func get_starknet_address{syscall_ptr: felt*, pedersen_ptr: HashBuiltin*, range_ // @return starknet_contract_address The newly deployed starknet contract address. @external func deploy_externally_owned_account{ - syscall_ptr: felt*, pedersen_ptr: HashBuiltin*, range_check_ptr, bitwise_ptr: BitwiseBuiltin* + syscall_ptr: felt*, pedersen_ptr: HashBuiltin*, range_check_ptr }(evm_address: felt) -> (starknet_contract_address: felt) { return Kakarot.deploy_externally_owned_account(evm_address); } diff --git a/src/kakarot/library.cairo b/src/kakarot/library.cairo index 2bff10367..9f32f1325 100644 --- a/src/kakarot/library.cairo +++ b/src/kakarot/library.cairo @@ -275,10 +275,7 @@ namespace Kakarot { // @param evm_contract_address The evm address that is mapped to the newly deployed starknet contract address. // @return starknet_contract_address The newly deployed starknet contract address. func deploy_externally_owned_account{ - syscall_ptr: felt*, - pedersen_ptr: HashBuiltin*, - range_check_ptr, - bitwise_ptr: BitwiseBuiltin*, + syscall_ptr: felt*, pedersen_ptr: HashBuiltin*, range_check_ptr }(evm_contract_address: felt) -> (starknet_contract_address: felt) { alloc_locals; diff --git a/src/kakarot/memory.cairo b/src/kakarot/memory.cairo index ca132cbdb..e0f30fdab 100644 --- a/src/kakarot/memory.cairo +++ b/src/kakarot/memory.cairo @@ -39,7 +39,6 @@ namespace Memory { // @notice Initialize the memory. // @return memory The pointer to the memory. func init() -> model.Memory* { - alloc_locals; let (word_dict_start: DictAccess*) = default_dict_new(0); return new model.Memory( word_dict_start=word_dict_start, word_dict=word_dict_start, bytes_len=0 diff --git a/src/kakarot/stack.cairo b/src/kakarot/stack.cairo index d39b6113b..54a848239 100644 --- a/src/kakarot/stack.cairo +++ b/src/kakarot/stack.cairo @@ -29,7 +29,6 @@ namespace Stack { // @notice Initialize the stack. // @return The pointer to the stack. func init() -> model.Stack* { - alloc_locals; let (dict_ptr_start: DictAccess*) = default_dict_new(0); return new model.Stack(dict_ptr_start, dict_ptr_start, 0); } diff --git a/tests/src/kakarot/accounts/eoa/mock_kakarot.cairo b/tests/src/kakarot/accounts/eoa/mock_kakarot.cairo index a93d47ed4..0a51bf6ae 100644 --- a/tests/src/kakarot/accounts/eoa/mock_kakarot.cairo +++ b/tests/src/kakarot/accounts/eoa/mock_kakarot.cairo @@ -55,7 +55,7 @@ func get_starknet_address{syscall_ptr: felt*, pedersen_ptr: HashBuiltin*, range_ // @return starknet_contract_address The newly deployed starknet contract address. @external func deploy_externally_owned_account{ - syscall_ptr: felt*, pedersen_ptr: HashBuiltin*, range_check_ptr, bitwise_ptr: BitwiseBuiltin* + syscall_ptr: felt*, pedersen_ptr: HashBuiltin*, range_check_ptr }(evm_address: felt) -> (starknet_contract_address: felt) { return Kakarot.deploy_externally_owned_account(evm_address); }