EntryFunctionBytes class

This class exists solely to represent a sequence of fixed bytes as a serialized entry function, because serializing an entry function appends a prefix that's only used for entry function arguments.

NOTE: Using this class for serialized script functions will lead to erroneous and unexpected behavior.

If you wish to convert this class back to a TransactionArgument, you must know the type of the argument beforehand, and use the appropriate class to deserialize the bytes within an instance of this class.

Inheritance
Implemented types

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
value → FixedBytes
final

Methods

bcsToBytes() → Uint8List
Serializes a Serializable value to its BCS representation. This function is the Dart SDK equivalent of bcs::to_bytes in Move.
inherited
bcsToHex() → Hex
Converts the BCS-serialized bytes of a value into a Hex instance.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
serialize(Serializer serializer) → void
override
serializeForEntryFunction(Serializer serializer) → void
When we serialize these bytes as an entry function argument, we need to serialize the length prefix. This essentially converts the underlying fixed byte vector to a type-agnostic byte vector.
override
toString() → String
Returns the hex string representation of the value with the 0x prefix.
inherited
toStringWithoutPrefix() → String
Returns the hex string representation of the value without the 0x prefix.
inherited

Operators

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

Static Methods

deserialize(Deserializer deserializer, int length) → EntryFunctionBytes
The only way to create an instance of this class is to use this static method. This function should only be used when deserializing a sequence of EntryFunctionPayload arguments.