Skip to main content

transform_data_to_struct

Function transform_data_to_struct 

Source
pub fn transform_data_to_struct(
    data: &[u8],
) -> Result<ConditionalOrderParams, CowError>
Expand description

Transform raw contract data bytes into a ConditionalOrderParams struct.

Decodes the ABI-encoded bytes (handler + salt + staticInput) into the structured ConditionalOrderParams type.

This is the Rust equivalent of transformDataToStruct in the TypeScript SDK.

ยงErrors

Returns CowError::AppData if the data is too short or malformed.