cooked-validators
Safe HaskellSafe-Inferred
LanguageHaskell2010

Cooked.Skeleton.Proposal

Description

This module exposes the proposals constructs used in a TxSkel and their associated utilities. To issue proposals in a skeleton, the usual way is to invoke txSkelProposals = [simpleProposal script govAction1, simpleProposal pk govAction2, ... ]

Synopsis

Data types

data ParameterChange where Source #

These are all the protocol parameters. They are taken from https://github.com/IntersectMBO/cardano-ledger/blob/c4fbc05999866fea7c0cb1b211fd5288f286b95d/eras/conway/impl/cddl-files/conway.cddl#L381-L412 and will most likely change in future eras.

Constructors

FeePerByte :: Integer -> ParameterChange

The linear factor for the minimum fee calculation

FeeFixed :: Integer -> ParameterChange

The constant factor for the minimum fee calculation

MaxBlockBodySize :: Integer -> ParameterChange

Maximal block body size

MaxTxSize :: Integer -> ParameterChange

Maximal transaction size

MaxBlockHeaderSize :: Integer -> ParameterChange

Maximal block header size

KeyDeposit :: Integer -> ParameterChange

The amount of a key registration deposit

PoolDeposit :: Integer -> ParameterChange

The amount of a pool registration deposit

PoolRetirementMaxEpoch :: Integer -> ParameterChange

Maximum number of epochs in the future a pool retirement is allowed to be scheduled future for.

PoolNumber :: Integer -> ParameterChange

Desired number of pools

PoolInfluence :: Rational -> ParameterChange

Pool influence

MonetaryExpansion :: Rational -> ParameterChange

Monetary expansion

TreasuryCut :: Rational -> ParameterChange

Treasury expansion

MinPoolCost :: Integer -> ParameterChange

Minimum Stake Pool Cost

CoinsPerUTxOByte :: Integer -> ParameterChange

Cost in lovelace per byte of UTxO storage

CostModels

Cost models for non-native script languages

Fields

Prices

Prices of execution units

Fields

MaxTxExUnits

Max total script execution resources units allowed per tx

Fields

MaxBlockExUnits

Max total script execution resources units allowed per block

Fields

MaxValSize :: Integer -> ParameterChange

Max size of a Value in an output

CollateralPercentage :: Integer -> ParameterChange

Percentage of the txfee which must be provided as collateral when including non-native scripts.

MaxCollateralInputs :: Integer -> ParameterChange

Maximum number of collateral inputs allowed in a transaction

PoolVotingThresholds

Thresholds for pool votes

DRepVotingThresholds

Thresholds for DRep votes

CommitteeMinSize :: Integer -> ParameterChange

Minimum size of the Constitutional Committee

CommitteeMaxTermLength :: Integer -> ParameterChange

The Constitutional Committee Term limit in number of Slots

GovActionLifetime :: Integer -> ParameterChange

Gov action lifetime in number of Epochs

GovActionDeposit :: Integer -> ParameterChange

The amount of the Gov Action deposit

DRepRegistrationDeposit :: Integer -> ParameterChange

The amount of a DRep registration deposit

DRepActivity :: Integer -> ParameterChange

The number of Epochs that a DRep can perform no activity without losing their Active status.

MinFeeRefScriptCostPerByte :: Rational -> ParameterChange

Reference scripts fee for the minimum fee calculation

data TxSkelProposal where Source #

This bundles a governance action into an actual proposal

Constructors

TxSkelProposal 

Fields

Optics

txSkelProposalMConstitutionAT :: forall kind. Typeable kind => AffineTraversal' TxSkelProposal (Maybe (User kind Redemption)) Source #

Focuses on the optional constitution of a TxSkelProposal

txSkelProposalGovernanceActionAT :: forall req. Typeable req => AffineTraversal' TxSkelProposal (GovernanceAction req) Source #

Focuses on the governance action of a TxSkelProposal

Smart constructors

simpleProposal :: (ToCredential cred, Typeable kind) => cred -> GovernanceAction kind -> TxSkelProposal Source #

Builds a TxSkelProposal from a credential and a gov action. Does not set any constitution (when applicable) nor anchor.

Utilities

fillConstitution :: (ToVScript script, Typeable script) => script -> TxSkelProposal -> TxSkelProposal Source #

Sets the constitution script with an empty redeemer when empty. This will not tamper with an existing constitution script and redeemer.