DRepVotingThresholds.deserialize constructor

DRepVotingThresholds.deserialize(
  1. CborListValue<CborObject> cbor
)

Implementation

factory DRepVotingThresholds.deserialize(CborListValue cbor) {
  return DRepVotingThresholds(
    motionNoConfidence:
        UnitInterval.deserialize(cbor.elementAt<CborTagValue>(0)),
    committeeNormal:
        UnitInterval.deserialize(cbor.elementAt<CborTagValue>(1)),
    committeeNoConfidence:
        UnitInterval.deserialize(cbor.elementAt<CborTagValue>(2)),
    updateConstitution:
        UnitInterval.deserialize(cbor.elementAt<CborTagValue>(3)),
    hardForkInitiation:
        UnitInterval.deserialize(cbor.elementAt<CborTagValue>(4)),
    ppNetworkGroup: UnitInterval.deserialize(cbor.elementAt<CborTagValue>(5)),
    ppEconomicGroup:
        UnitInterval.deserialize(cbor.elementAt<CborTagValue>(6)),
    ppTechnicalGroup:
        UnitInterval.deserialize(cbor.elementAt<CborTagValue>(7)),
    ppGovernanceGroup:
        UnitInterval.deserialize(cbor.elementAt<CborTagValue>(8)),
    treasuryWithdrawal:
        UnitInterval.deserialize(cbor.elementAt<CborTagValue>(9)),
  );
}