20,000 USDC
View results
Submission Details
Severity: gas

## [G-02] Internal functions only called once can be inlined to save gas

Summary

[G-02] Internal functions only called once can be inlined to save gas

Not inlining costs 20 to 40 gas because of two extra JUMP instructions and additional stack operations needed for function calls.

file: /src/Beedle.sol
15 function _afterTokenTransfer(address from, address to, uint256 amount)
16 internal
17 override(ERC20, ERC20Votes)

https://github.com/Cyfrin/2023-07-beedle/blob/main/src/Beedle.sol#L15-L17

file: /src/Beedle.sol
29 function _burn(address account, uint256 amount)
30 internal
31 override(ERC20, ERC20Votes)

https://github.com/Cyfrin/2023-07-beedle/blob/main/src/Beedle.sol#L29-L31

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.