Skip to main content

Module decode

Module decode 

Source
Expand description

SCALE decode into cyscale’s value shapes (see value.rs).

Every convention here is pinned by the shape corpus (sdk/python/tests/fixtures/shape_corpus): AccountId32 renders as ss58, Vec<u8> as utf8-else-hex strings, [u8; N] as 0x-hex, enums as {"Variant": payload} (unit variants as bare strings), Options unwrap, newtype composites unwrap, BTreeMaps become dicts with native keys, and Era renders as "00" / (period, phase).

Structs§

Cursor

Functions§

compact_len
compact_u128
Compact-decoded u128 (the four SCALE compact modes). In strict mode the encoding must be canonical (minimal-width for its value), matching the SCALE spec: a decoder that accepts non-minimal compacts admits multiple wire encodings for the same integer.
convert_type_string
cyscale’s convert_type_string: normalize a metadata typeName the way the old codec rendered call-arg types (T::Balance -> Balance, Box<<T as Config>::RuntimeCall> -> RuntimeCall, Vec<u8> -> Bytes).