fn match_sink<'hir>(
gcx: Gcx<'hir>,
hir: &'hir Hir<'hir>,
has_solady_lib: bool,
expr: &'hir Expr<'hir>,
) -> Option<(&'hir Expr<'hir>, Option<TokenKey>)>Expand description
Matches an ERC20-like transfer sink. Returns (from_arg, token_var) where token_var is
the receiver’s underlying variable id when available (used for permit correlation).
Recognised:
recv.transferFrom(from, to, amt)/recv.safeTransferFrom(from, to, amt)whererecvis typed as a contract declaring ERC20’stransferFrom(address,address,uint256)→bool(ERC721’s same-named, no-return overload is excluded).Lib.safeTransferFrom(token, from, to, amt)library form.