From 88853526ee36a9f6af4c80f7eb7844ae65887b28 Mon Sep 17 00:00:00 2001 From: sarantapodarousa <75222483+sarantapodarousa@users.noreply.github.com> Date: Sat, 25 Feb 2023 19:35:35 +0100 Subject: [PATCH] Remove unneeded code (#536) Time spent on this PR: 0,5 days ## Pull request type Please check the type of change your PR introduces: - [ ] Bugfix - [ ] Feature - [ ] Code style update (formatting, renaming) - [x] Refactoring (no functional changes, no api changes) - [ ] Build related changes - [ ] Documentation content changes - [ ] Other (please describe): ## What is the current behavior? In the fuction by codelane there is unecessary code. Resolves #513 ## What is the new behavior? Suppression of alloc locals from the body - - - ## Other information --- src/kakarot/accounts/contract/contract_account.cairo | 2 +- src/kakarot/accounts/contract/library.cairo | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/kakarot/accounts/contract/contract_account.cairo b/src/kakarot/accounts/contract/contract_account.cairo index f34611004..eacd09c19 100644 --- a/src/kakarot/accounts/contract/contract_account.cairo +++ b/src/kakarot/accounts/contract/contract_account.cairo @@ -55,7 +55,7 @@ func bytecode{ func bytecode_len{ syscall_ptr: felt*, pedersen_ptr: HashBuiltin*, range_check_ptr, bitwise_ptr: BitwiseBuiltin* }() -> (len: felt) { - let len = ContractAccount.bytecode_len(); + let (len) = ContractAccount.bytecode_len(); return (len=len); } diff --git a/src/kakarot/accounts/contract/library.cairo b/src/kakarot/accounts/contract/library.cairo index 303bcb325..ef17f3fd1 100644 --- a/src/kakarot/accounts/contract/library.cairo +++ b/src/kakarot/accounts/contract/library.cairo @@ -100,11 +100,8 @@ namespace ContractAccount { syscall_ptr: felt*, pedersen_ptr: HashBuiltin*, range_check_ptr, - bitwise_ptr: BitwiseBuiltin*, - }() -> felt { - alloc_locals; - let (_bytecode_len) = bytecode_len_.read(); - return _bytecode_len; + }() -> (res: felt) { + return bytecode_len_.read(); } // @notice This function is used to get the bytecode of the smart contract.