PlutusData.fromPointer constructor

PlutusData.fromPointer(
  1. Pointer pointer
)

Constructs a PlutusData instance from a pointer.

Implementation

factory PlutusData.fromPointer(Pointer pointer) {
  return ConstrPlutusData(
    alternative: BigInt.one,
    data: PlutusList([
      PlutusInteger(pointer.slot),
      PlutusInteger(pointer.txIndex),
      PlutusInteger(pointer.certIndex),
    ]),
  );
}