ProtocolParamUpdate.deserialize constructor

ProtocolParamUpdate.deserialize(
  1. CborMapValue<CborObject, CborObject> cbor
)

Implementation

factory ProtocolParamUpdate.deserialize(CborMapValue cbor) {
  return ProtocolParamUpdate(
    minfeeA: cbor.getIntValueAs<CborNumeric?>(0)?.toBigInt(),
    minFeeB: cbor.getIntValueAs<CborNumeric?>(1)?.toBigInt(),
    maxBlockBodySize: cbor.getIntValueAs<CborIntValue?>(2)?.value,
    maxTxSize: cbor.getIntValueAs<CborIntValue?>(3)?.value,
    maxBlockHeaderSize: cbor.getIntValueAs<CborIntValue?>(4)?.value,
    keyDeposit: cbor.getIntValueAs<CborNumeric?>(5)?.toBigInt(),
    poolDeposit: cbor.getIntValueAs<CborNumeric?>(6)?.toBigInt(),
    maxEpoch: cbor.getIntValueAs<CborIntValue?>(7)?.value,
    nOpt: cbor.getIntValueAs<CborIntValue?>(8)?.value,
    poolPledgeInfluence: cbor
        .getIntValueAs<CborTagValue?>(9)
        ?.convertTo<UnitInterval, CborTagValue>(
            (e) => UnitInterval.deserialize(e)),
    expansionRate: cbor
        .getIntValueAs<CborTagValue?>(10)
        ?.convertTo<UnitInterval, CborTagValue>(
            (e) => UnitInterval.deserialize(e)),
    treasuryGrowthRate: cbor
        .getIntValueAs<CborTagValue?>(11)
        ?.convertTo<UnitInterval, CborTagValue>(
            (e) => UnitInterval.deserialize(e)),
    d: cbor
        .getIntValueAs<CborTagValue?>(12)
        ?.convertTo<UnitInterval, CborTagValue>(
            (e) => UnitInterval.deserialize(e)),
    extraEntropy: cbor
        .getIntValueAs<CborListValue?>(13)
        ?.convertTo<Nonce, CborListValue>((e) => Nonce.deserialize(e)),
    protocolVersion: cbor
        .getIntValueAs<CborListValue?>(14)
        ?.convertTo<ProtocolVersion, CborListValue>(
            (e) => ProtocolVersion.deserialize(e)),
    minPoolCost: cbor.getIntValueAs<CborNumeric?>(16)?.toBigInt(),
    adaPerUtxoByte: cbor.getIntValueAs<CborNumeric?>(17)?.toBigInt(),
    costModel: cbor
        .getIntValueAs<CborMapValue?>(18)
        ?.convertTo<Costmdls, CborMapValue>((e) => Costmdls.deserialize(e)),
    executionCosts: cbor
        .getIntValueAs<CborListValue?>(19)
        ?.convertTo<ExUnitPrices, CborListValue>(
            (e) => ExUnitPrices.deserialize(e)),
    maxTxExUnits: cbor
        .getIntValueAs<CborListValue?>(20)
        ?.convertTo<ExUnits, CborListValue>((e) => ExUnits.deserialize(e)),
    maxBlockExUnits: cbor
        .getIntValueAs<CborListValue?>(21)
        ?.convertTo<ExUnits, CborListValue>((e) => ExUnits.deserialize(e)),
    maxValueSize: cbor.getIntValueAs<CborIntValue?>(22)?.value,
    collateralPercentage: cbor.getIntValueAs<CborIntValue?>(23)?.value,
    maxCollateralInputs: cbor.getIntValueAs<CborIntValue?>(24)?.value,
    poolVotingThresholds: cbor
        .getIntValueAs<CborListValue?>(25)
        ?.convertTo<PoolVotingThresholds, CborListValue>(
            (e) => PoolVotingThresholds.deserialize(e)),
    drepVotingThresholds: cbor
        .getIntValueAs<CborListValue?>(26)
        ?.convertTo<DRepVotingThresholds, CborListValue>(
            (e) => DRepVotingThresholds.deserialize(e)),
    minCommitteeSize: cbor.getIntValueAs<CborIntValue?>(27)?.value,
    committeeTermLimit: cbor.getIntValueAs<CborIntValue?>(28)?.value,
    governanceActionValidityPeriod:
        cbor.getIntValueAs<CborIntValue?>(29)?.value,
    governanceActionDeposit: cbor.getIntValueAs<CborIntValue?>(30)?.value,
    drepDeposit: cbor.getIntValueAs<CborNumeric?>(31)?.toBigInt(),
    drepInactivityPeriod: cbor.getIntValueAs<CborIntValue?>(32)?.value,
    refScriptCoinsPerByte: cbor
        .getIntValueAs<CborTagValue?>(33)
        ?.convertTo<UnitInterval, CborTagValue>(
            (e) => UnitInterval.deserialize(e)),
  );
}