toCbor method

  1. @override
CborObject toCbor()
override

Converts the object to a CBOR object.

Implementation

@override
CborObject toCbor() {
  return CborListValue.fixedLength(<CborObject>[
    operator.toCbor(),
    vrfKeyHash.toCbor(),
    CborUnsignedValue.u64(pledge),
    CborUnsignedValue.u64(cost),
    margin.toCbor(),
    rewardAccount.toCbor(),
    CborListValue.fixedLength(poolOwners.map((e) => e.toCbor()).toList()),
    CborListValue.fixedLength(relays.map((e) => e.toCbor()).toList()),
    poolMetadata?.toCbor() ?? const CborNullValue()
  ]);
}