Skip to main content

Module function_selector_collision

Module function_selector_collision 

Source

Re-exportsΒ§

use super::FunctionSelectorCollision; πŸ”’
use crate::linter::LateLintPass; πŸ”’
use crate::linter::LintContext; πŸ”’
use crate::sol::Severity; πŸ”’
use crate::sol::SolLint; πŸ”’
use crate::sol::analysis::arg_for_param; πŸ”’
use crate::sol::analysis::branch_always_exits; πŸ”’
use crate::sol::analysis::expr_is_address; πŸ”’
use crate::sol::analysis::is_address_cast; πŸ”’
use crate::sol::analysis::is_require_or_assert; πŸ”’
use crate::sol::analysis::ty_contract_id; πŸ”’
use alloy_primitives::Selector; πŸ”’
use solar::ast::LitKind; πŸ”’
use solar::ast::UnOpKind; πŸ”’
use solar::interface::data_structures::Never; πŸ”’
use solar::interface::kw; πŸ”’
use solar::interface::sym; πŸ”’
use solar::sema::Gcx; πŸ”’
use solar::sema::builtins::Builtin; πŸ”’
use solar::sema::hir; πŸ”’
use solar::sema::hir::BinOpKind; πŸ”’
use solar::sema::hir::ContractId; πŸ”’
use solar::sema::hir::ContractKind; πŸ”’
use solar::sema::hir::Expr; πŸ”’
use solar::sema::hir::ExprKind; πŸ”’
use solar::sema::hir::LoopSource; πŸ”’
use solar::sema::hir::Stmt; πŸ”’
use solar::sema::hir::StmtKind; πŸ”’
use solar::sema::hir::VariableId; πŸ”’
use solar::sema::hir::Visit; πŸ”’
use std::collections::HashMap; πŸ”’
use std::collections::HashSet; πŸ”’
use std::ops::ControlFlow; πŸ”’

StructsΒ§

CalldataInput πŸ”’
A parameter that initially holds the full msg.data: the fallback’s own, or one of the modifier-th applied modifier (the same modifier may be applied several times).
Continuation πŸ”’
What _ resumes: the rest of the modifier chain and the function body.
DelegateTarget πŸ”’
DelegateTargetCollector πŸ”’
LoopControl πŸ”’
PathState πŸ”’
SelectorFilter πŸ”’
The msg.sig constraints known to hold on a path.

ConstantsΒ§

MAX_LOOP_PATH_STATES πŸ”’
Path-state cap above which selector constraints are widened to β€œany selector”.

StaticsΒ§

FUNCTION_SELECTOR_COLLISION

FunctionsΒ§

dedup πŸ”’
delegated_contract πŸ”’
The statically typed implementation contract of a proxy-style <addr>.delegatecall(<full calldata>), with the calldata input that must be unmodified for the forwarding to be complete.
extend_unique πŸ”’
full_calldata_source πŸ”’
Some(None) for msg.data, Some(Some(input)) for a known full-calldata input, None otherwise.
lvalue_contains_var πŸ”’
selector_guard πŸ”’
msg.sig == F.selector / msg.sig != F.selector as (selector, matches).
typed_contract_behind_address_cast πŸ”’