Skip to main content

underlying_var

Function underlying_var 

Source
fn underlying_var(expr: &Expr<'_>) -> Option<VariableId>
Expand description

Resolves a VariableId for bare idents and type-cast / payable(...) / parens wraps.

Strips elementary-type casts (e.g. address(x)), contract / interface casts (e.g. IERC20(rawToken) — encoded as Call with the contract ident as callee), and payable(...) wrappers. Stripping interface casts lets permit and sink correlate when both sides wrap the same underlying raw-address variable.