deserialize static method

ScriptABI deserialize(
  1. Deserializer deserializer
)

Implementation

static ScriptABI deserialize(Deserializer deserializer) {
  int index = deserializer.deserializeUleb128AsU32();
  switch (index) {
    case 0:
      return TransactionScriptABI.load(deserializer);
    case 1:
      return EntryFunctionABI.load(deserializer);
    default:
      throw ArgumentError("Unknown variant index for TransactionPayload: $index");
  }
}