Skip to main content

Module arbitrary_send_erc20

Module arbitrary_send_erc20 

Source

StructsΒ§

Analyzer πŸ”’
CallsiteCollector πŸ”’
PendingRepayment πŸ”’
Outstanding EIP-3156 repayment licensed by a prior onFlashLoan call.
PermitRecord πŸ”’
An EIP-2612 permit with spender == address(this) seen earlier on the current path.
Rhs πŸ”’
Facts about an assignment’s RHS, captured before any write.
Sink πŸ”’
An ERC20 transferFrom-shaped sink.
State πŸ”’
Path-sensitive facts.
StateWrites πŸ”’

EnumsΒ§

TokenKey πŸ”’
Identifier correlating permit and sink token receivers: token or cfg.token.

ConstantsΒ§

CALLSITE_INDEX πŸ”’
HELPER_DEPTH πŸ”’
Recursion budget for _msgSender()-style helper chains.

StaticsΒ§

ARBITRARY_SEND_ERC20
ARBITRARY_SEND_ERC20_PERMIT

FunctionsΒ§

callsite_index πŸ”’
The call-site index of hir, built once per compilation unit.
canonical_args πŸ”’
Call arguments in declaration order, with the expected arity.
common_entries πŸ”’
has_transfer_from πŸ”’
ERC20’s transferFrom(address,address,uint256) returns (bool).
interface_has_function πŸ”’
is_internal_only πŸ”’
Internal functions and modifiers are only reachable from the compilation unit, so their parameters can be proven safe from the invocation sites seen there.
library_has_safe_transfer_from πŸ”’
4-arg safeTransferFrom(token, address, address, uint256) where token is address (Solady) or an ERC20 contract type (OpenZeppelin SafeERC20); ERC721/1155 helpers are excluded since their transferFrom has no return value.
match_flash_loan_call πŸ”’
EIP-3156 receiver.onFlashLoan(initiator, token, amount, fee, data) on a receiver type declaring the exact signature. Literal arguments yield None.
match_sink πŸ”’
recv.transferFrom(from, to, amt) / recv.safeTransferFrom(from, to, amt) on a contract declaring ERC20’s transferFrom(address,address,uint256) returns (bool) (ERC721’s same-named overload is excluded), addr.safeTransferFrom(..) via using SafeTransferLib for address, or the library form Lib.safeTransferFrom(token, from, to, amt).
origin_matches πŸ”’
True when expr is base(..) or a variable in vars, through parens, payable(..), casts, ternaries whose both arms qualify and no-arg helpers whose body returns such an expression.
state_writes πŸ”’
State variables written by fid or by the internal functions it calls (one level deep).
sum_operands πŸ”’
a + b with both operands variables.
token_key πŸ”’
token or cfg.token receiver key, through casts and payable(..).

Type AliasesΒ§

CallsiteFacts πŸ”’
Per internal function, whether every call site passes a statically safe / self argument for each parameter; None when some call site could not be matched to the parameters.