ScaleRawBytes class

A wrapper for raw SCALE-encoded bytes that should be written as-is during encoding, bypassing the normal encode/decode cycle.

This is useful when you already have SCALE-encoded bytes and want to include them in a larger SCALE-encoded structure without decoding and re-encoding them.

Example:

// You have already-encoded call data
final callData = someCall.encode(); // Uint8List

// You want to wrap it in another call without decode/re-encode
final wrappedCall = RuntimeCall(
  palletName: 'Multisig',
  callName: 'as_multi',
  args: {
    'call': ScaleRawBytes(callData), // Use bytes directly
    ...
  },
);

Constructors

ScaleRawBytes(Uint8List bytes)
Creates a wrapper for raw SCALE-encoded bytes
const

Properties

bytes Uint8List
The raw SCALE-encoded bytes
final
hashCode int
The hash code for this object.
no setterinherited
props List<Object>
The list of properties that will be used to determine whether two instances are equal.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

codec → const $ScaleRawBytesCodec