Skip to content

Commit

Permalink
Remove unneeded code (kkrt-labs#536)
Browse files Browse the repository at this point in the history
<!--- Please provide a general summary of your changes in the title
above -->

<!-- Give an estimate of the time you spent on this PR in terms of work
days. Did you spend 0.5 days on this PR or rather 2 days? -->

Time spent on this PR: 0,5 days 

## Pull request type

<!-- Please try to limit your pull request to one type, submit multiple
pull requests if needed. -->

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.

<!-- Please describe the current behavior that you are modifying, or
link to a relevant issue. -->

Resolves  kkrt-labs#513

## What is the new behavior?

<!-- Please describe the behavior or changes that are being added by
this PR. -->
Suppression of alloc locals from the body 

-
-
-

## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
  • Loading branch information
sarantapodarousa authored Feb 25, 2023
1 parent 50b4a7c commit 8885352
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/kakarot/accounts/contract/contract_account.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
7 changes: 2 additions & 5 deletions src/kakarot/accounts/contract/library.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 8885352

Please sign in to comment.