ProtocolParamUpdate.deserialize constructor

ProtocolParamUpdate.deserialize(
  1. CborMapValue cbor
)

Implementation

factory ProtocolParamUpdate.deserialize(CborMapValue cbor) {
  return ProtocolParamUpdate(
      minfeeA: cbor.getValueFromIntKey<CborObject?>(0)?.getInteger(),
      minFeeB: cbor.getValueFromIntKey<CborObject?>(1)?.getInteger(),
      maxBlockBodySize: cbor.getValueFromIntKey<CborIntValue?>(2)?.value,
      maxTxSize: cbor.getValueFromIntKey<CborIntValue?>(3)?.value,
      maxBlockHeaderSize: cbor.getValueFromIntKey<CborIntValue?>(4)?.value,
      keyDeposit: cbor.getValueFromIntKey<CborObject?>(5)?.getInteger(),
      poolDeposit: cbor.getValueFromIntKey<CborObject?>(6)?.getInteger(),
      maxEpoch: cbor.getValueFromIntKey<CborIntValue?>(7)?.value,
      nOpt: cbor.getValueFromIntKey<CborIntValue?>(8)?.value,
      poolPledgeInfluence: cbor
          .getValueFromIntKey<CborTagValue?>(9)
          ?.to<UnitInterval, CborTagValue>(
              (e) => UnitInterval.deserialize(e)),
      expansionRate: cbor.getValueFromIntKey<CborTagValue?>(10)?.to<UnitInterval, CborTagValue>(
          (e) => UnitInterval.deserialize(e)),
      treasuryGrowthRate: cbor
          .getValueFromIntKey<CborTagValue?>(11)
          ?.to<UnitInterval, CborTagValue>(
              (e) => UnitInterval.deserialize(e)),
      d: cbor.getValueFromIntKey<CborTagValue?>(12)?.to<UnitInterval, CborTagValue>(
          (e) => UnitInterval.deserialize(e)),
      extraEntropy: cbor
          .getValueFromIntKey<CborListValue?>(13)
          ?.to<Nonce, CborListValue>((e) => Nonce.deserialize(e)),
      protocolVersion: cbor
          .getValueFromIntKey<CborListValue?>(14)
          ?.to<ProtocolVersion, CborListValue>((e) => ProtocolVersion.deserialize(e)),
      minPoolCost: cbor.getValueFromIntKey<CborObject?>(16)?.getInteger(),
      adaPerUtxoByte: cbor.getValueFromIntKey<CborObject?>(17)?.getInteger(),
      costModel: cbor.getValueFromIntKey<CborMapValue?>(18)?.to<Costmdls, CborMapValue>((e) => Costmdls.deserialize(e)),
      executionCosts: cbor.getValueFromIntKey<CborListValue?>(19)?.to<ExUnitPrices, CborListValue>((e) => ExUnitPrices.deserialize(e)),
      maxTxExUnits: cbor.getValueFromIntKey<CborListValue?>(20)?.to<ExUnits, CborListValue>((e) => ExUnits.deserialize(e)),
      maxBlockExUnits: cbor.getValueFromIntKey<CborListValue?>(21)?.to<ExUnits, CborListValue>((e) => ExUnits.deserialize(e)),
      maxValueSize: cbor.getValueFromIntKey<CborIntValue?>(22)?.value,
      collateralPercentage: cbor.getValueFromIntKey<CborIntValue?>(23)?.value,
      maxCollateralInputs: cbor.getValueFromIntKey<CborIntValue?>(24)?.value);
}