Skip to content

@assertions:includes!

Whether the string return of a call contains a substring, checked on-chain — exact byte sequence, case-sensitive, no wildcards.

Returns: bool

@assertions:includes!(call part)
NameTypeDescription
calladdressA :: call expression (or chain) returning a string
partstringNon-empty byte sequence to search for
load assertions
set $pool 0x44fA8E6f47987339850636F88629646662444217
# "Uniswap LP Token" contains "LP"
assertions:assert @includes!($pool::{name()(string)} "LP") == true
# The name must NOT mention a rebrand
assertions:assert @includes!($pool::{name()(string)} "Sushi") == false
  • Matches the exact byte sequence: case-sensitive, no wildcards or regex; a multi-byte UTF-8 part matches its exact encoding.
  • An empty part is rejected at build time — every string contains it, so the assertion could never fail.
  • Boolean-valued: usable bare, compared with == true / == false, or nested inside @bool!(...) logic.