Skip to main content

Module arbitrary_send_eth

Module arbitrary_send_eth 

Source

Re-exportsยง

use super::ArbitrarySendEth; ๐Ÿ”’
use crate::linter::LateLintPass; ๐Ÿ”’
use crate::linter::LintContext; ๐Ÿ”’
use crate::sol::Severity; ๐Ÿ”’
use crate::sol::SolLint; ๐Ÿ”’
use crate::sol::analysis::DEFAULT_HELPER_ANALYSIS_CACHE_LIMIT; ๐Ÿ”’
use crate::sol::analysis::HelperAnalysisCache; ๐Ÿ”’
use crate::sol::analysis::arg_for_param; ๐Ÿ”’
use crate::sol::analysis::branch_always_exits; ๐Ÿ”’
use crate::sol::analysis::callee_no_arg_returns; ๐Ÿ”’
use crate::sol::analysis::function_no_arg_returns; ๐Ÿ”’
use crate::sol::analysis::is_address_like_cast; ๐Ÿ”’
use crate::sol::analysis::is_address_self; ๐Ÿ”’
use crate::sol::analysis::is_builtin; ๐Ÿ”’
use crate::sol::analysis::is_contract_cast; ๐Ÿ”’
use crate::sol::analysis::is_literal_zero; ๐Ÿ”’
use crate::sol::analysis::is_msg_sender; ๐Ÿ”’
use crate::sol::analysis::is_require_or_assert; ๐Ÿ”’
use crate::sol::analysis::is_sender_member; ๐Ÿ”’
use crate::sol::analysis::loop_stmts; ๐Ÿ”’
use crate::sol::analysis::loop_update; ๐Ÿ”’
use crate::sol::analysis::modifier_prefix; ๐Ÿ”’
use crate::sol::analysis::referenced_item; ๐Ÿ”’
use crate::sol::analysis::tuple_elems; ๐Ÿ”’
use crate::sol::analysis::underlying_var; ๐Ÿ”’
use crate::sol::analysis::var_is_address_like; ๐Ÿ”’
use solar::ast::BinOpKind; ๐Ÿ”’
use solar::ast::LitKind; ๐Ÿ”’
use solar::ast::StateMutability; ๐Ÿ”’
use solar::ast::UnOpKind; ๐Ÿ”’
use solar::interface::Span; ๐Ÿ”’
use solar::interface::data_structures::Never; ๐Ÿ”’
use solar::interface::sym; ๐Ÿ”’
use solar::sema::Gcx; ๐Ÿ”’
use solar::sema::builtins::Builtin; ๐Ÿ”’
use solar::sema::hir; ๐Ÿ”’
use solar::sema::hir::CallArgs; ๐Ÿ”’
use solar::sema::hir::ContractId; ๐Ÿ”’
use solar::sema::hir::ContractKind; ๐Ÿ”’
use solar::sema::hir::ElementaryType; ๐Ÿ”’
use solar::sema::hir::Expr; ๐Ÿ”’
use solar::sema::hir::ExprKind; ๐Ÿ”’
use solar::sema::hir::FunctionId; ๐Ÿ”’
use solar::sema::hir::Hir; ๐Ÿ”’
use solar::sema::hir::ItemId; ๐Ÿ”’
use solar::sema::hir::LoopSource; ๐Ÿ”’
use solar::sema::hir::Modifier; ๐Ÿ”’
use solar::sema::hir::Res; ๐Ÿ”’
use solar::sema::hir::Stmt; ๐Ÿ”’
use solar::sema::hir::StmtKind; ๐Ÿ”’
use solar::sema::hir::TypeKind; ๐Ÿ”’
use solar::sema::hir::Variable; ๐Ÿ”’
use solar::sema::hir::VariableId; ๐Ÿ”’
use solar::sema::hir::Visit; ๐Ÿ”’
use solar::sema::ty::TyKind; ๐Ÿ”’
use std::collections::HashSet; ๐Ÿ”’
use std::ops::ControlFlow; ๐Ÿ”’

Structsยง

Analyzer ๐Ÿ”’
CallerGuards ๐Ÿ”’
Recognises guards that restrict msg.sender to a deploy-time-fixed principal, backed by a memoised analysis of which state variables may alias address(this).
SelfAssignScan ๐Ÿ”’
Scans one function, its modifiers / base constructors and inlined internal helpers for an assignment that may plant address(this) into target.
State ๐Ÿ”’
Path-sensitive facts.

Constantsยง

HELPER_CALL_DEPTH ๐Ÿ”’
Cap on inlined helper calls (covers ctor โ†’ _init โ†’ _initInner โ†’ _initLeaf).
HELPER_DEPTH ๐Ÿ”’
Recursion budget for _msgSender()-style helper chains.
SELF_ALIAS_DEPTH ๐Ÿ”’
Recursion budget for self-alias chains.

Staticsยง

ARBITRARY_SEND_ETH

Functionsยง

expr_is_array_or_bytes ๐Ÿ”’
expr_is_function ๐Ÿ”’
identity_helper_arg ๐Ÿ”’
Argument returned verbatim (modulo casts) by an identity helper call id(x) / Lib.id(x).
index_is_static ๐Ÿ”’
True when an index expression only depends on literals and state: no locals, parameters, builtins (msg.sender) or non-cast calls.
invoked_function ๐Ÿ”’
The function invoked by a modifier or base-constructor invocation.
is_msg_sender_like ๐Ÿ”’
msg.sender modulo parens, casts, payable(..) and no-arg helpers such as _msgSender().
is_numeric_cast ๐Ÿ”’
uint<N>(..) / int<N>(..) cast head.
is_trusted_literal ๐Ÿ”’
An address literal or the integer literal 0.
lhs_root_var ๐Ÿ”’
Variable at the root of an lvalue, through member / index accesses and address casts.
match_eth_library_call ๐Ÿ”’
Destination of an OpenZeppelin Address / Solady SafeTransferLib ETH helper, called either statically (Lib.f(to, ...)) or via using ... for address (to.f(...)).
match_sink ๐Ÿ”’
Destination of an ETH-sending call: selfdestruct(x), x.{call,send,transfer}, f{value: v}(), IFoo(x).f{value: v}() and common OpenZeppelin/Solady helpers. Sends to address(this) or of a literal-zero amount are not sinks.
peel_casts ๐Ÿ”’
Looks through parens, payable(..), address-like casts and integer casts.
stmt_contains_return ๐Ÿ”’
True when any statement of a helper body is a return (bare or valued).