Skip to content

Commit

Permalink
Merge pull request #1271 from Plutonomicon/klntsky/571-stake-pool-tar…
Browse files Browse the repository at this point in the history
…get-num

Add `stakePoolTargetNum` protocol parameter
  • Loading branch information
klntsky authored Nov 30, 2022
2 parents 8705691 + 6b35608 commit bf43e4b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)

### Fixed

- Added missing `stakePoolTargetNum` ("`nOpt`") protocol parameter (see [CIP-9](https://cips.cardano.org/cips/cip9/)) ([#571](https://github.com/Plutonomicon/cardano-transaction-lib/issues/571))

## [3.0.0] - 2022-11-21

### Added
Expand Down
6 changes: 3 additions & 3 deletions src/Internal/QueryM/Ogmios.purs
Original file line number Diff line number Diff line change
Expand Up @@ -1000,7 +1000,7 @@ type ProtocolParametersRaw =
, "stakeKeyDeposit" :: BigInt
, "poolDeposit" :: BigInt
, "poolRetirementEpochBound" :: BigInt
, "desiredNumberOfPools" :: BigInt
, "desiredNumberOfPools" :: UInt
, "poolInfluence" :: PParamRational
, "monetaryExpansion" :: PParamRational
, "treasuryExpansion" :: PParamRational
Expand Down Expand Up @@ -1054,8 +1054,7 @@ newtype ProtocolParameters = ProtocolParameters
, stakePoolDeposit :: Coin
, minPoolCost :: Coin
, poolRetireMaxEpoch :: Epoch
-- TODO: add stakePoolTargetNum :: UInt
-- https://github.com/Plutonomicon/cardano-transaction-lib/issues/571
, stakePoolTargetNum :: UInt
, poolPledgeInfluence :: Rational
, monetaryExpansion :: Rational
, treasuryCut :: Rational
Expand Down Expand Up @@ -1099,6 +1098,7 @@ instance DecodeAeson ProtocolParameters where
, stakePoolDeposit: Coin ps.poolDeposit
, minPoolCost: Coin ps.minPoolCost
, poolRetireMaxEpoch: Epoch ps.poolRetirementEpochBound
, stakePoolTargetNum: ps.desiredNumberOfPools
, poolPledgeInfluence: unwrap ps.poolInfluence
, monetaryExpansion: unwrap ps.monetaryExpansion
, treasuryCut: unwrap ps.treasuryExpansion -- Rational
Expand Down

0 comments on commit bf43e4b

Please sign in to comment.