The InheritanceManager contract, in its current implementation, lacks a mechanism to directly receive Ether. While it includes a sendETH
function to send Ether, there is no function, receive()
, or fallback()
method to enable external users or contracts to deposit Ether into the contract. This limitation critically hinders the contract's intended functionality as an inheritance wallet, as users cannot deposit Ether into it.
receive()
or fallback()
FunctionsThe contract does not implement a receive()
or fallback()
function, which are essential for handling Ether sent to the contract without a specific function call.
The receive()
function is specifically designed to handle direct Ether transfers.
The fallback()
function is a general-purpose function that executes when no other function signature matches the call.
The contract does not include any payable
functions designed to accept Ether as input.
The sendETH
function is used to send Ether out of the contract but cannot receive Ether (it lacks the payable
keyword).
The contractInteractions
function could potentially receive Ether, but there is no external way to provide the _value
argument.
Based on its functionality related to inheritance and asset transfer, the contract is expected to hold assets, including Ether. However, the inability to receive Ether directly contradicts this purpose.
sendETH
FunctioncontractInteractions
FunctionUsers cannot deposit Ether into the contract, rendering it impossible to use the contract as an inheritance wallet for Ether. This directly contradicts the contract's core purpose.
The inability to deposit Ether severely limits the contract's usefulness. It can only manage ERC20 tokens and handle Ether generated internally through interactions with other contracts (a highly limited and indirect method).
If Ether is accidentally sent to the contract, it will be permanently stuck, as there is no mechanism to retrieve or interact with it.
Manual Code Review
receive()
FunctionAdd a receive()
function to the contract. This is the most straightforward and recommended way to handle Ether deposits.
depositETH()
FunctionFor added clarity or more complex scenarios, implement a named depositETH()
function. This function can include additional logic or modifiers if needed.
contractInteractions
PayableModify the contractInteractions
function to include the payable
keyword, enabling it to receive Ether.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.