has_dynamic
Checks if any of the provided EVM types are dynamic.
Dynamic types in Solidity/EVM include arrays, strings, and bytes. These types are not encoded inline and instead use an offset pointing to their actual data location elsewhere in calldata. This helper is used to determine if special encoding/decoding logic is needed.
Arguments
types- A span ofEVMTypesrepresenting the types to check.
Returns
trueif any type is dynamic; otherwise,false.
Examples
let static_types = array![EVMTypes::Uint256, EVMTypes::Address].span();
assert!(!has_dynamic(static_types));
let dynamic_types = array![EVMTypes::Uint256, EVMTypes::Bytes].span();
assert!(has_dynamic(dynamic_types));
Fully qualified path: alexandria_evm::utils::has_dynamic
pub fn has_dynamic(types: Span<EVMTypes>) -> bool