Expand description
Utility helpers for composable (conditional) orders.
Mirrors utils.ts from the @cowprotocol/composable TypeScript SDK:
address checks, EIP-712 hash-to-string reversal, ABI validation, and
conversion from raw on-chain structs to typed orders.
Functionsยง
- balance_
to_ string - Reverse-map a
keccak256-hashed token-balance string back to its name. - create_
set_ domain_ verifier_ tx - Encode a
setDomainVerifier(bytes32 domain, address verifier)call. - default_
token_ formatter - Default token formatter: produces
"{amount}@{address}". - from_
struct_ to_ order - Decode a raw on-chain
GpV2OrderStructinto a typedUnsignedOrder. - get_
block_ info - Get block information (number and timestamp) for constructing conditional orders.
- get_
domain_ verifier - Alias for
get_domain_verifier_calldata. - get_
domain_ verifier_ calldata - Get the domain verifier address for a Safe from the
ExtensibleFallbackHandler. - get_
is_ valid_ result - Check whether an
IsValidResultrepresents a valid state. - is_
composable_ cow - Returns
trueifaddressis the canonicalComposableCowfactory address. - is_
extensible_ fallback_ handler - Returns
trueifaddressis the canonicalExtensibleFallbackHandlercontract. - is_
valid_ abi - Returns
trueifhexis a plausibly valid ABI-encodedConditionalOrderParams. - kind_
to_ string - Reverse-map a
keccak256-hashed order-kind string back to its name. - transform_
data_ to_ struct - Transform raw contract data bytes into a
ConditionalOrderParamsstruct. - transform_
struct_ to_ data - Transform a
ConditionalOrderParamsstruct back into ABI-encoded hex.