Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove redundant voting and proposal procedures functions. Update cardano-api. #856

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ repository cardano-haskell-packages
-- you need to run if you change them
index-state:
, hackage.haskell.org 2024-08-08T19:27:29Z
, cardano-haskell-packages 2024-08-08T07:19:00Z
, cardano-haskell-packages 2024-08-13T10:37:21Z

packages:
cardano-cli
Expand Down
3 changes: 1 addition & 2 deletions cardano-cli/cardano-cli.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ library
binary,
bytestring,
canonical-json,
cardano-api ^>=9.1,
cardano-api ^>=9.2,
cardano-binary,
cardano-crypto,
cardano-crypto-class ^>=2.1.2,
Expand Down Expand Up @@ -372,7 +372,6 @@ test-suite cardano-cli-golden
cardano-cli,
cardano-cli:cardano-cli-test-lib,
cardano-crypto-wrapper,
cardano-data >=1.1,
cardano-ledger-byron,
cardano-ledger-shelley >=1.10.0.0,
cardano-strict-containers ^>=0.1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ data GovernanceActionUpdateCommitteeCmdArgs era
= GovernanceActionUpdateCommitteeCmdArgs
{ eon :: !(ConwayEraOnwards era)
, networkId :: !L.Network
, deposit :: !L.Coin
, deposit :: !Lovelace
, returnAddress :: !StakeIdentifier
, proposalUrl :: !ProposalUrl
, proposalHash :: !(L.SafeHash L.StandardCrypto L.AnchorData)
Expand All @@ -63,7 +63,7 @@ data GovernanceActionCreateConstitutionCmdArgs era
= GovernanceActionCreateConstitutionCmdArgs
{ eon :: !(ConwayEraOnwards era)
, networkId :: !L.Network
, deposit :: !L.Coin
, deposit :: !Lovelace
, stakeCredential :: !StakeIdentifier
, mPrevGovernanceActionId :: !(Maybe (TxId, Word16))
, proposalUrl :: !ProposalUrl
Expand All @@ -80,7 +80,7 @@ data GovernanceActionInfoCmdArgs era
= GovernanceActionInfoCmdArgs
{ eon :: !(ConwayEraOnwards era)
, networkId :: !L.Network
, deposit :: !L.Coin
, deposit :: !Lovelace
, returnStakeAddress :: !StakeIdentifier
, proposalUrl :: !ProposalUrl
, proposalHash :: !(L.SafeHash L.StandardCrypto L.AnchorData)
Expand All @@ -92,7 +92,7 @@ data GovernanceActionCreateNoConfidenceCmdArgs era
= GovernanceActionCreateNoConfidenceCmdArgs
{ eon :: !(ConwayEraOnwards era)
, networkId :: !L.Network
, deposit :: !L.Coin
, deposit :: !Lovelace
, returnStakeAddress :: !StakeIdentifier
, proposalUrl :: !ProposalUrl
, proposalHash :: !(L.SafeHash L.StandardCrypto L.AnchorData)
Expand Down Expand Up @@ -123,11 +123,11 @@ data GovernanceActionTreasuryWithdrawalCmdArgs era
= GovernanceActionTreasuryWithdrawalCmdArgs
{ eon :: !(ConwayEraOnwards era)
, networkId :: !L.Network
, deposit :: !L.Coin
, deposit :: !Lovelace
, returnAddr :: !StakeIdentifier
, proposalUrl :: !ProposalUrl
, proposalHash :: !(L.SafeHash L.StandardCrypto L.AnchorData)
, treasuryWithdrawal :: ![(VerificationKeyOrHashOrFile StakeKey, L.Coin)]
, treasuryWithdrawal :: ![(VerificationKeyOrHashOrFile StakeKey, Lovelace)]
, constitutionScriptHash :: !(Maybe ScriptHash)
, outFile :: !(File () Out)
}
Expand All @@ -137,7 +137,7 @@ data GovernanceActionHardforkInitCmdArgs era
= GovernanceActionHardforkInitCmdArgs
{ eon :: !(ConwayEraOnwards era)
, networkId :: !L.Network
, deposit :: !L.Coin
, deposit :: !Lovelace
, returnStakeAddress :: !StakeIdentifier
, mPrevGovernanceActionId :: !(Maybe (TxId, Word16))
, proposalUrl :: !ProposalUrl
Expand All @@ -160,7 +160,7 @@ data UpdateProtocolParametersConwayOnwards era
= UpdateProtocolParametersConwayOnwards
{ eon :: !(ConwayEraOnwards era)
, networkId :: !L.Network
, deposit :: !L.Coin
, deposit :: !Lovelace
, returnAddr :: !StakeIdentifier
, proposalUrl :: !ProposalUrl
, proposalHash :: !(L.SafeHash L.StandardCrypto L.AnchorData)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ data GovernanceDRepRegistrationCertificateCmdArgs era
= GovernanceDRepRegistrationCertificateCmdArgs
{ eon :: !(ConwayEraOnwards era)
, drepHashSource :: !DRepHashSource
, deposit :: !L.Coin
, deposit :: !Lovelace
, mAnchor :: !(Maybe (L.Anchor (L.EraCrypto (ShelleyLedgerEra era))))
, outFile :: !(File () Out)
}
Expand All @@ -59,7 +59,7 @@ data GovernanceDRepRetirementCertificateCmdArgs era
= GovernanceDRepRetirementCertificateCmdArgs
{ eon :: !(ConwayEraOnwards era)
, drepHashSource :: !DRepHashSource
, deposit :: !L.Coin
, deposit :: !Lovelace
, outFile :: !(File () Out)
}

Expand Down
44 changes: 22 additions & 22 deletions cardano-cli/src/Cardano/CLI/EraBased/Options/Common.hs
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ pFileInDirection l h =
, Opt.completer (Opt.bashCompleter "file")
]

parseLovelace :: Parsec.Parser L.Coin
parseLovelace :: Parsec.Parser Lovelace
parseLovelace = do
i <- decimal
if i > toInteger (maxBound :: Word64)
Expand Down Expand Up @@ -580,7 +580,7 @@ pMIRPot =
]
]

pRewardAmt :: Parser L.Coin
pRewardAmt :: Parser Lovelace
pRewardAmt =
Opt.option (readerFromParsecParser parseLovelace) $
mconcat
Expand All @@ -589,7 +589,7 @@ pRewardAmt =
, Opt.help "The reward for the relevant reward account."
]

pTransferAmt :: Parser L.Coin
pTransferAmt :: Parser Lovelace
pTransferAmt =
Opt.option (readerFromParsecParser parseLovelace) $
mconcat
Expand Down Expand Up @@ -1063,7 +1063,7 @@ pUrl l h =
, Opt.help h
]

pGovActionDeposit :: Parser L.Coin
pGovActionDeposit :: Parser Lovelace
pGovActionDeposit =
Opt.option (readerFromParsecParser parseLovelace) $
mconcat
Expand All @@ -1072,7 +1072,7 @@ pGovActionDeposit =
, Opt.help "Deposit required to submit a governance action."
]

pNewGovActionDeposit :: Parser L.Coin
pNewGovActionDeposit :: Parser Lovelace
pNewGovActionDeposit =
Opt.option (readerFromParsecParser parseLovelace) $
mconcat
Expand Down Expand Up @@ -1687,7 +1687,7 @@ pWithdrawal
-> BalanceTxExecUnits
-> Parser
( StakeAddress
, L.Coin
, Lovelace
, Maybe (ScriptWitnessFiles WitCtxStake)
)
pWithdrawal sbe balance =
Expand Down Expand Up @@ -1719,7 +1719,7 @@ pWithdrawal sbe balance =
, "a script witness."
]

parseWithdrawal :: Parsec.Parser (StakeAddress, L.Coin)
parseWithdrawal :: Parsec.Parser (StakeAddress, Lovelace)
parseWithdrawal =
(,) <$> parseStakeAddress <* Parsec.char '+' <*> parseLovelace

Expand Down Expand Up @@ -2308,7 +2308,7 @@ pReturnCollateral =
<*> pure TxOutDatumByNone -- TODO: Babbage era - we should be able to return these
<*> pure ReferenceScriptAnyEraNone -- TODO: Babbage era - we should be able to return these

pTotalCollateral :: Parser L.Coin
pTotalCollateral :: Parser Lovelace
pTotalCollateral =
Opt.option (L.Coin <$> readerFromParsecParser decimal) $
mconcat
Expand Down Expand Up @@ -2603,7 +2603,7 @@ pInvalidHereafter eon =
, pure Nothing
]

pTxFee :: Parser L.Coin
pTxFee :: Parser Lovelace
pTxFee =
fmap (L.Coin . (fromIntegral :: Natural -> Integer)) $
Opt.option Opt.auto $
Expand Down Expand Up @@ -2929,7 +2929,7 @@ pPoolOwnerVerificationKeyOrFile =
, VerificationKeyFilePath <$> pPoolOwnerVerificationKeyFile
]

pPoolPledge :: Parser L.Coin
pPoolPledge :: Parser Lovelace
pPoolPledge =
Opt.option (readerFromParsecParser parseLovelace) $
mconcat
Expand All @@ -2938,7 +2938,7 @@ pPoolPledge =
, Opt.help "The stake pool's pledge."
]

pPoolCost :: Parser L.Coin
pPoolCost :: Parser Lovelace
pPoolCost =
Opt.option (readerFromParsecParser parseLovelace) $
mconcat
Expand Down Expand Up @@ -3126,7 +3126,7 @@ pCostModels =
, Opt.completer (Opt.bashCompleter "file")
]

pMinFeePerByteFactor :: Parser L.Coin
pMinFeePerByteFactor :: Parser Lovelace
pMinFeePerByteFactor =
Opt.option (readerFromParsecParser parseLovelace) $
mconcat
Expand All @@ -3135,7 +3135,7 @@ pMinFeePerByteFactor =
, Opt.help "The linear factor per byte for the minimum fee calculation."
]

pMinFeeConstantFactor :: Parser L.Coin
pMinFeeConstantFactor :: Parser Lovelace
pMinFeeConstantFactor =
Opt.option (readerFromParsecParser parseLovelace) $
mconcat
Expand All @@ -3144,7 +3144,7 @@ pMinFeeConstantFactor =
, Opt.help "The constant factor for the minimum fee calculation."
]

pMinUTxOValue :: Parser L.Coin
pMinUTxOValue :: Parser Lovelace
pMinUTxOValue =
Opt.option (readerFromParsecParser parseLovelace) $
mconcat
Expand All @@ -3153,7 +3153,7 @@ pMinUTxOValue =
, Opt.help "The minimum allowed UTxO value (Shelley to Mary eras)."
]

pMinPoolCost :: Parser L.Coin
pMinPoolCost :: Parser Lovelace
pMinPoolCost =
Opt.option (readerFromParsecParser parseLovelace) $
mconcat
Expand Down Expand Up @@ -3189,7 +3189,7 @@ pMaxBlockHeaderSize =
, Opt.help "Maximum block header size."
]

pKeyRegistDeposit :: Parser L.Coin
pKeyRegistDeposit :: Parser Lovelace
pKeyRegistDeposit =
Opt.option (readerFromParsecParser parseLovelace) $
mconcat
Expand All @@ -3198,7 +3198,7 @@ pKeyRegistDeposit =
, Opt.help "Key registration deposit amount."
]

pDrepDeposit :: Parser L.Coin
pDrepDeposit :: Parser Lovelace
pDrepDeposit =
Opt.option (readerFromParsecParser parseLovelace) $
mconcat
Expand All @@ -3207,7 +3207,7 @@ pDrepDeposit =
, Opt.help "DRep deposit amount (same at registration and retirement)."
]

pPoolDeposit :: Parser L.Coin
pPoolDeposit :: Parser Lovelace
pPoolDeposit =
Opt.option (readerFromParsecParser parseLovelace) $
mconcat
Expand Down Expand Up @@ -3304,7 +3304,7 @@ pExtraEntropy =
. BSC.pack
=<< some Parsec.hexDigit

pUTxOCostPerByte :: Parser L.Coin
pUTxOCostPerByte :: Parser Lovelace
pUTxOCostPerByte =
Opt.option (readerFromParsecParser parseLovelace) $
mconcat
Expand Down Expand Up @@ -3601,7 +3601,7 @@ pGovActionLifetime =
, Opt.help "Maximal lifetime of governance actions, in epochs."
]

pDRepDeposit :: Parser L.Coin
pDRepDeposit :: Parser Lovelace
pDRepDeposit =
Opt.option (readerFromParsecParser parseLovelace) $
mconcat
Expand Down Expand Up @@ -3710,13 +3710,13 @@ pAlwaysNoConfidence =
, Opt.help "Always vote no confidence"
]

pDrepRefund :: Parser (DRepHashSource, L.Coin)
pDrepRefund :: Parser (DRepHashSource, Lovelace)
pDrepRefund =
(,)
<$> pDRepHashSource
<*> pDepositRefund

pDepositRefund :: Parser L.Coin
pDepositRefund :: Parser Lovelace
pDepositRefund =
Opt.option (readerFromParsecParser parseLovelace) $
mconcat
Expand Down
Loading
Loading