Skip to main content

expr_sends_ether

Function expr_sends_ether 

Source
fn expr_sends_ether(hir: &Hir<'_>, expr: &Expr<'_>) -> bool
Expand description

Returns true if expr unambiguously moves ETH out of the contract: a non-zero {value: x} call option, .transfer/.send with a non-zero amount, low-level .delegatecall/.callcode (drainable via selfdestruct), or the selfdestruct builtin. Only literal 0 is treated as a zero amount; any other expression is assumed non-zero.