Skip to main content

Module solmate_safe_transfer_lib

Module solmate_safe_transfer_lib 

Source

Re-exportsยง

use super::SolmateSafeTransferLib; ๐Ÿ”’
use crate::linter::LateLintPass; ๐Ÿ”’
use crate::linter::LintContext; ๐Ÿ”’
use crate::sol::Severity; ๐Ÿ”’
use crate::sol::SolLint; ๐Ÿ”’
use crate::sol::analysis::source_in_package; ๐Ÿ”’
use solar::sema::Gcx; ๐Ÿ”’
use solar::sema::hir::Expr; ๐Ÿ”’
use solar::sema::hir::ExprKind; ๐Ÿ”’
use solar::sema::hir::FunctionId; ๐Ÿ”’

Staticsยง

SOLMATE_SAFE_TRANSFER_LIB

Functionsยง

is_unchecked_token_op ๐Ÿ”’
Whether function_id is one of the token operations of solmateโ€™s SafeTransferLib. safeTransferETH stays out: sending ETH involves no token code. A same-name function of another library (Uniswapโ€™s TransferHelper style) stays out through the resolution, and so does a same-name library from another package (Soladyโ€™s SafeTransferLib checks token code on the empty-return path), which fails the provenance check: the declaring source must come from a solmate package path (lib/solmate, solmate/...). Matching a whole path component rather than a substring keeps a vendored or patched copy under a misleading path such as vendor/solmate-fixed/ from being recognized.