encode method
Encode the provided value as bytes and wrap it in Substrate SCALE format.
Implementation
@override
BuBytes encode(String value) {
final toBytes = StringUtils.encode(value);
final List<int> lengthBytes = const SubstrateScaleCUintEncoder().encode(
toBytes.length.toString(),
);
return BuBytes([...lengthBytes, ...toBytes]);
}