sui_adapter_latest::programmable_transactions::execution

Function bcs_argument_validate

Source
pub fn bcs_argument_validate(
    bytes: &[u8],
    idx: u16,
    layout: PrimitiveArgumentLayout,
) -> Result<(), ExecutionError>
Expand description

Checks the bytes against the SpecialArgumentLayout using bcs. It does not actually generate the deserialized value, only walks the bytes. While not necessary if the layout does not contain special arguments (e.g. Option or String) we check the BCS bytes for predictability