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)
          ?.castTo<UnitInterval, CborTagValue>(
              (e) => UnitInterval.deserialize(e)),
      expansionRate: cbor.getValueFromIntKey<CborTagValue?>(10)?.castTo<UnitInterval, CborTagValue>(
          (e) => UnitInterval.deserialize(e)),
      treasuryGrowthRate: cbor
          .getValueFromIntKey<CborTagValue?>(11)
          ?.castTo<UnitInterval, CborTagValue>(
              (e) => UnitInterval.deserialize(e)),
      d: cbor.getValueFromIntKey<CborTagValue?>(12)?.castTo<UnitInterval, CborTagValue>(
          (e) => UnitInterval.deserialize(e)),
      extraEntropy: cbor
          .getValueFromIntKey<CborListValue?>(13)
          ?.castTo<Nonce, CborListValue>((e) => Nonce.deserialize(e)),
      protocolVersion: cbor
          .getValueFromIntKey<CborListValue?>(14)
          ?.castTo<ProtocolVersion, CborListValue>((e) => ProtocolVersion.deserialize(e)),
      minPoolCost: cbor.getValueFromIntKey<CborObject?>(16)?.getInteger(),
      adaPerUtxoByte: cbor.getValueFromIntKey<CborObject?>(17)?.getInteger(),
      costModel: cbor.getValueFromIntKey<CborMapValue?>(18)?.castTo<Costmdls, CborMapValue>((e) => Costmdls.deserialize(e)),
      executionCosts: cbor.getValueFromIntKey<CborListValue?>(19)?.castTo<ExUnitPrices, CborListValue>((e) => ExUnitPrices.deserialize(e)),
      maxTxExUnits: cbor.getValueFromIntKey<CborListValue?>(20)?.castTo<ExUnits, CborListValue>((e) => ExUnits.deserialize(e)),
      maxBlockExUnits: cbor.getValueFromIntKey<CborListValue?>(21)?.castTo<ExUnits, CborListValue>((e) => ExUnits.deserialize(e)),
      maxValueSize: cbor.getValueFromIntKey<CborIntValue?>(22)?.value,
      collateralPercentage: cbor.getValueFromIntKey<CborIntValue?>(23)?.value,
      maxCollateralInputs: cbor.getValueFromIntKey<CborIntValue?>(24)?.value);
}