Cyfrin / aderyn

Aderyn 🦜 Rust-based Solidity AST analyzer.
https://docs.cyfrin.io/
GNU General Public License v2.0
406 stars 58 forks source link

contract-locks-ether Should look for `withdraw` functions in the inheritance/extension graph #742

Closed alexroan closed 1 month ago

alexroan commented 1 month ago

Detector Title contract-locks-ether

To Reproduce

  1. Create a base contract with a withdraw function
  2. Create an child contract with a payable function
  3. This detector captures the child contract despite a withdraw function being present

Expected behavior Withdraw function should be found in the inheritance graph

TilakMaddy commented 1 month ago

when you say create a withdraw function, does it actually mean a function that sends eth away using address.call{value: xxx}() / transfer /send ?

TilakMaddy commented 1 month ago

@alexroan Please checkout the fix in the branch and close the issue if it works