Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- module Test.Cardano.Ledger.Babbage.ImpTest
- class (AlonzoEraImp era, ConwayEraGov era, ConwayEraTxBody era, ConwayEraTxCert era, ConwayEraPParams era, STS (EraRule "ENACT" era), BaseM (EraRule "ENACT" era) ~ ShelleyBase, State (EraRule "ENACT" era) ~ EnactState era, Signal (EraRule "ENACT" era) ~ EnactSignal era, Environment (EraRule "ENACT" era) ~ (), NativeScript era ~ Timelock era, Script era ~ AlonzoScript era, GovState era ~ ConwayGovState era) ⇒ ConwayEraImp era
- enactConstitution ∷ ∀ era. (ConwayEraImp era, HasCallStack) ⇒ StrictMaybe (GovPurposeId 'ConstitutionPurpose era) → Constitution era → Credential 'DRepRole → NonEmpty (Credential 'HotCommitteeRole) → ImpTestM era GovActionId
- enactTreasuryWithdrawals ∷ ConwayEraImp era ⇒ [(RewardAccount, Coin)] → Credential 'DRepRole → NonEmpty (Credential 'HotCommitteeRole) → ImpTestM era GovActionId
- submitGovAction ∷ ∀ era. (ShelleyEraImp era, ConwayEraTxBody era, HasCallStack) ⇒ GovAction era → ImpTestM era GovActionId
- submitGovAction_ ∷ ∀ era. (ShelleyEraImp era, ConwayEraTxBody era, HasCallStack) ⇒ GovAction era → ImpTestM era ()
- submitGovActions ∷ ∀ era. (ShelleyEraImp era, ConwayEraTxBody era, HasCallStack) ⇒ NonEmpty (GovAction era) → ImpTestM era (NonEmpty GovActionId)
- submitProposal ∷ (ShelleyEraImp era, ConwayEraTxBody era, HasCallStack) ⇒ ProposalProcedure era → ImpTestM era GovActionId
- submitAndExpireProposalToMakeReward ∷ ConwayEraImp era ⇒ Credential 'Staking → ImpTestM era ()
- submitProposal_ ∷ (ShelleyEraImp era, ConwayEraTxBody era, HasCallStack) ⇒ ProposalProcedure era → ImpTestM era ()
- submitProposals ∷ (ShelleyEraImp era, ConwayEraGov era, ConwayEraTxBody era, HasCallStack) ⇒ NonEmpty (ProposalProcedure era) → ImpTestM era (NonEmpty GovActionId)
- submitFailingProposal ∷ (ShelleyEraImp era, ConwayEraTxBody era, HasCallStack) ⇒ ProposalProcedure era → NonEmpty (PredicateFailure (EraRule "LEDGER" era)) → ImpTestM era ()
- trySubmitGovAction ∷ (ShelleyEraImp era, ConwayEraTxBody era) ⇒ GovAction era → ImpTestM era (Either (NonEmpty (PredicateFailure (EraRule "LEDGER" era))) GovActionId)
- trySubmitGovActions ∷ (ShelleyEraImp era, ConwayEraTxBody era) ⇒ NonEmpty (GovAction era) → ImpTestM era (Either (NonEmpty (PredicateFailure (EraRule "LEDGER" era)), Tx era) (Tx era))
- trySubmitProposal ∷ (ShelleyEraImp era, ConwayEraTxBody era) ⇒ ProposalProcedure era → ImpTestM era (Either (NonEmpty (PredicateFailure (EraRule "LEDGER" era))) GovActionId)
- trySubmitProposals ∷ (ShelleyEraImp era, ConwayEraTxBody era) ⇒ NonEmpty (ProposalProcedure era) → ImpTestM era (Either (NonEmpty (PredicateFailure (EraRule "LEDGER" era)), Tx era) (Tx era))
- mkConstitutionProposal ∷ ConwayEraImp era ⇒ StrictMaybe (GovPurposeId 'ConstitutionPurpose era) → ImpTestM era (ProposalProcedure era, Constitution era)
- mkProposal ∷ (ShelleyEraImp era, ConwayEraTxBody era) ⇒ GovAction era → ImpTestM era (ProposalProcedure era)
- mkProposalWithRewardAccount ∷ (ShelleyEraImp era, ConwayEraTxBody era) ⇒ GovAction era → RewardAccount → ImpTestM era (ProposalProcedure era)
- mkTreasuryWithdrawalsGovAction ∷ ConwayEraGov era ⇒ [(RewardAccount, Coin)] → ImpTestM era (GovAction era)
- submitTreasuryWithdrawals ∷ (ShelleyEraImp era, ConwayEraTxBody era, ConwayEraGov era) ⇒ [(RewardAccount, Coin)] → ImpTestM era GovActionId
- submitVote ∷ (ShelleyEraImp era, ConwayEraTxBody era, HasCallStack) ⇒ Vote → Voter → GovActionId → ImpTestM era TxId
- submitVote_ ∷ (ShelleyEraImp era, ConwayEraTxBody era, HasCallStack) ⇒ Vote → Voter → GovActionId → ImpTestM era ()
- submitYesVote_ ∷ (ShelleyEraImp era, ConwayEraTxBody era, HasCallStack) ⇒ Voter → GovActionId → ImpTestM era ()
- submitFailingVote ∷ (ShelleyEraImp era, ConwayEraTxBody era, HasCallStack) ⇒ Voter → GovActionId → NonEmpty (PredicateFailure (EraRule "LEDGER" era)) → ImpTestM era ()
- trySubmitVote ∷ (ShelleyEraImp era, ConwayEraTxBody era) ⇒ Vote → Voter → GovActionId → ImpTestM era (Either (NonEmpty (PredicateFailure (EraRule "LEDGER" era))) TxId)
- registerDRep ∷ ConwayEraImp era ⇒ ImpTestM era (KeyHash 'DRepRole)
- unRegisterDRep ∷ ∀ era. (ShelleyEraImp era, ConwayEraTxCert era) ⇒ Credential 'DRepRole → ImpTestM era ()
- updateDRep ∷ ∀ era. (ShelleyEraImp era, ConwayEraTxCert era) ⇒ Credential 'DRepRole → ImpTestM era ()
- delegateToDRep ∷ ConwayEraImp era ⇒ Credential 'Staking → Coin → DRep → ImpTestM era (KeyPair 'Payment)
- setupSingleDRep ∷ ConwayEraImp era ⇒ Integer → ImpTestM era (Credential 'DRepRole, Credential 'Staking, KeyPair 'Payment)
- setupDRepWithoutStake ∷ ConwayEraImp era ⇒ ImpTestM era (KeyHash 'DRepRole, KeyHash 'Staking)
- setupPoolWithStake ∷ (ShelleyEraImp era, ConwayEraTxCert era) ⇒ Coin → ImpTestM era (KeyHash 'StakePool, Credential 'Payment, Credential 'Staking)
- setupPoolWithoutStake ∷ (ShelleyEraImp era, ConwayEraTxCert era) ⇒ ImpTestM era (KeyHash 'StakePool, Credential 'Staking)
- conwayModifyPParams ∷ ConwayEraGov era ⇒ (PParams era → PParams era) → ImpTestM era ()
- getProposals ∷ ConwayEraGov era ⇒ ImpTestM era (Proposals era)
- getEnactState ∷ ConwayEraGov era ⇒ ImpTestM era (EnactState era)
- getGovActionState ∷ (HasCallStack, ConwayEraGov era) ⇒ GovActionId → ImpTestM era (GovActionState era)
- lookupGovActionState ∷ ConwayEraGov era ⇒ GovActionId → ImpTestM era (Maybe (GovActionState era))
- expectPresentGovActionId ∷ (HasCallStack, ConwayEraGov era) ⇒ GovActionId → ImpTestM era ()
- expectMissingGovActionId ∷ (HasCallStack, ConwayEraGov era) ⇒ GovActionId → ImpTestM era ()
- getRatifyEnv ∷ ConwayEraGov era ⇒ ImpTestM era (RatifyEnv era)
- calculateDRepAcceptedRatio ∷ ∀ era. (HasCallStack, ConwayEraGov era) ⇒ GovActionId → ImpTestM era Rational
- calculatePoolAcceptedRatio ∷ ConwayEraGov era ⇒ GovActionId → ImpTestM era Rational
- calculateCommitteeAcceptedRatio ∷ ∀ era. (HasCallStack, ConwayEraGov era) ⇒ GovActionId → ImpTestM era Rational
- logAcceptedRatio ∷ (HasCallStack, ConwayEraGov era) ⇒ GovActionId → ImpTestM era ()
- isDRepAccepted ∷ (HasCallStack, ConwayEraGov era, ConwayEraPParams era) ⇒ GovActionId → ImpTestM era Bool
- isSpoAccepted ∷ (HasCallStack, ConwayEraGov era, ConwayEraPParams era) ⇒ GovActionId → ImpTestM era Bool
- isCommitteeAccepted ∷ (HasCallStack, ConwayEraGov era, ConwayEraPParams era) ⇒ GovActionId → ImpTestM era Bool
- getCommitteeMembers ∷ ConwayEraImp era ⇒ ImpTestM era (Set (Credential 'ColdCommitteeRole))
- getConstitution ∷ ConwayEraImp era ⇒ ImpTestM era (Constitution era)
- registerInitialCommittee ∷ (HasCallStack, ConwayEraImp era) ⇒ ImpTestM era (NonEmpty (Credential 'HotCommitteeRole))
- logRatificationChecks ∷ (ConwayEraGov era, ConwayEraPParams era, HasCallStack) ⇒ GovActionId → ImpTestM era ()
- resignCommitteeColdKey ∷ (ShelleyEraImp era, ConwayEraTxCert era) ⇒ Credential 'ColdCommitteeRole → StrictMaybe Anchor → ImpTestM era (Maybe (Credential 'HotCommitteeRole))
- registerCommitteeHotKey ∷ (ShelleyEraImp era, ConwayEraTxCert era) ⇒ Credential 'ColdCommitteeRole → ImpTestM era (Credential 'HotCommitteeRole)
- registerCommitteeHotKeys ∷ (ShelleyEraImp era, ConwayEraTxCert era) ⇒ ImpTestM era (Credential 'HotCommitteeRole) → NonEmpty (Credential 'ColdCommitteeRole) → ImpTestM era (NonEmpty (Credential 'HotCommitteeRole))
- logCurPParams ∷ (EraGov era, ToExpr (PParamsHKD Identity era), HasCallStack) ⇒ ImpTestM era ()
- electCommittee ∷ ∀ era. (HasCallStack, ConwayEraImp era) ⇒ StrictMaybe (GovPurposeId 'CommitteePurpose era) → Credential 'DRepRole → Set (Credential 'ColdCommitteeRole) → Map (Credential 'ColdCommitteeRole) EpochNo → ImpTestM era (GovPurposeId 'CommitteePurpose era)
- electBasicCommittee ∷ ∀ era. (HasCallStack, ConwayEraImp era) ⇒ ImpTestM era (Credential 'DRepRole, Credential 'HotCommitteeRole, GovPurposeId 'CommitteePurpose era)
- proposalsShowDebug ∷ Era era ⇒ Proposals era → Bool → Doc AnsiStyle
- getGovPolicy ∷ ConwayEraGov era ⇒ ImpTestM era (StrictMaybe ScriptHash)
- submitFailingGovAction ∷ ∀ era. (ShelleyEraImp era, ConwayEraTxBody era, HasCallStack) ⇒ GovAction era → NonEmpty (PredicateFailure (EraRule "LEDGER" era)) → ImpTestM era ()
- submitGovActionForest ∷ (StrictMaybe GovActionId → ImpTestM era GovActionId) → StrictMaybe GovActionId → Forest () → ImpTestM era (Forest GovActionId)
- submitGovActionTree ∷ (StrictMaybe GovActionId → ImpTestM era GovActionId) → StrictMaybe GovActionId → Tree () → ImpTestM era (Tree GovActionId)
- getProposalsForest ∷ ConwayEraGov era ⇒ ImpTestM era (Forest (StrictMaybe GovActionId))
- logProposalsForest ∷ (ConwayEraGov era, HasCallStack) ⇒ ImpTestM era ()
- logProposalsForestDiff ∷ (Era era, ToExpr (PParamsHKD StrictMaybe era), HasCallStack) ⇒ Proposals era → Proposals era → ImpTestM era ()
- getCCExpiry ∷ (HasCallStack, ConwayEraGov era) ⇒ Credential 'ColdCommitteeRole → ImpTestM era EpochNo
- ccShouldBeExpired ∷ (HasCallStack, ConwayEraGov era) ⇒ Credential 'ColdCommitteeRole → ImpTestM era ()
- ccShouldNotBeExpired ∷ (HasCallStack, ConwayEraGov era) ⇒ Credential 'ColdCommitteeRole → ImpTestM era ()
- ccShouldBeResigned ∷ HasCallStack ⇒ Credential 'ColdCommitteeRole → ImpTestM era ()
- ccShouldNotBeResigned ∷ HasCallStack ⇒ Credential 'ColdCommitteeRole → ImpTestM era ()
- getLastEnactedCommittee ∷ ConwayEraGov era ⇒ ImpTestM era (StrictMaybe (GovPurposeId 'CommitteePurpose era))
- getLastEnactedConstitution ∷ ConwayEraGov era ⇒ ImpTestM era (StrictMaybe (GovPurposeId 'ConstitutionPurpose era))
- submitParameterChange ∷ ConwayEraImp era ⇒ StrictMaybe GovActionId → PParamsUpdate era → ImpTestM era GovActionId
- mkMinFeeUpdateGovAction ∷ ConwayEraImp era ⇒ StrictMaybe GovActionId → ImpTestM era (GovAction era)
- mkParameterChangeGovAction ∷ ConwayEraImp era ⇒ StrictMaybe GovActionId → PParamsUpdate era → ImpTestM era (GovAction era)
- mkUpdateCommitteeProposal ∷ ConwayEraImp era ⇒ Maybe (StrictMaybe (GovPurposeId 'CommitteePurpose era)) → Set (Credential 'ColdCommitteeRole) → [(Credential 'ColdCommitteeRole, EpochInterval)] → UnitInterval → ImpTestM era (ProposalProcedure era)
- submitUpdateCommittee ∷ ConwayEraImp era ⇒ Maybe (StrictMaybe (GovPurposeId 'CommitteePurpose era)) → Set (Credential 'ColdCommitteeRole) → [(Credential 'ColdCommitteeRole, EpochInterval)] → UnitInterval → ImpTestM era GovActionId
- expectCommitteeMemberPresence ∷ (HasCallStack, ConwayEraGov era) ⇒ Credential 'ColdCommitteeRole → ImpTestM era ()
- expectCommitteeMemberAbsence ∷ (HasCallStack, ConwayEraGov era) ⇒ Credential 'ColdCommitteeRole → ImpTestM era ()
- getLastEnactedParameterChange ∷ ConwayEraGov era ⇒ ImpTestM era (StrictMaybe (GovPurposeId 'PParamUpdatePurpose era))
- getLastEnactedHardForkInitiation ∷ ConwayEraGov era ⇒ ImpTestM era (StrictMaybe (GovPurposeId 'HardForkPurpose era))
- getConstitutionProposals ∷ ConwayEraGov era ⇒ ImpTestM era (Map (GovPurposeId 'ConstitutionPurpose era) (PEdges (GovPurposeId 'ConstitutionPurpose era)))
- getParameterChangeProposals ∷ ConwayEraGov era ⇒ ImpTestM era (Map (GovPurposeId 'PParamUpdatePurpose era) (PEdges (GovPurposeId 'PParamUpdatePurpose era)))
- expectNumDormantEpochs ∷ HasCallStack ⇒ EpochNo → ImpTestM era ()
- submitConstitution ∷ ∀ era. ConwayEraImp era ⇒ StrictMaybe (GovPurposeId 'ConstitutionPurpose era) → ImpTestM era GovActionId
- isDRepExpired ∷ HasCallStack ⇒ Credential 'DRepRole → ImpTestM era Bool
- expectDRepExpiry ∷ HasCallStack ⇒ Credential 'DRepRole → EpochNo → ImpTestM era ()
- expectActualDRepExpiry ∷ HasCallStack ⇒ Credential 'DRepRole → EpochNo → ImpTestM era ()
- expectDRepNotRegistered ∷ HasCallStack ⇒ Credential 'DRepRole → ImpTestM era ()
- expectCurrentProposals ∷ (HasCallStack, ConwayEraGov era) ⇒ ImpTestM era ()
- expectNoCurrentProposals ∷ (HasCallStack, ConwayEraImp era) ⇒ ImpTestM era ()
- expectPulserProposals ∷ (HasCallStack, ConwayEraGov era) ⇒ ImpTestM era ()
- expectNoPulserProposals ∷ (HasCallStack, ConwayEraGov era) ⇒ ImpTestM era ()
- minorFollow ∷ ProtVer → ProtVer
- majorFollow ∷ ProtVer → ProtVer
- cantFollow ∷ ProtVer → ProtVer
- getsPParams ∷ EraGov era ⇒ Lens' (PParams era) a → ImpTestM era a
- currentProposalsShouldContain ∷ (HasCallStack, ConwayEraGov era) ⇒ GovActionId → ImpTestM era ()
- ifBootstrap ∷ EraGov era ⇒ ImpTestM era a → ImpTestM era a → ImpTestM era a
- whenBootstrap ∷ EraGov era ⇒ ImpTestM era () → ImpTestM era ()
- whenPostBootstrap ∷ EraGov era ⇒ ImpTestM era () → ImpTestM era ()
- submitYesVoteCCs_ ∷ ∀ era f. (ConwayEraImp era, Foldable f) ⇒ f (Credential 'HotCommitteeRole) → GovActionId → ImpTestM era ()
- donateToTreasury ∷ ConwayEraImp era ⇒ Coin → ImpTestM era ()
- expectMembers ∷ (HasCallStack, ConwayEraGov era) ⇒ Set (Credential 'ColdCommitteeRole) → ImpTestM era ()
- showConwayTxBalance ∷ (EraUTxO era, ConwayEraTxBody era, Tx era ~ AlonzoTx era) ⇒ PParams era → CertState era → UTxO era → AlonzoTx era → String
- logConwayTxBalance ∷ (EraUTxO era, EraGov era, ConwayEraTxBody era, Tx era ~ AlonzoTx era) ⇒ AlonzoTx era → ImpTestM era ()
- submitBootstrapAware ∷ EraGov era ⇒ ImpTestM era a → (NonEmpty (PredicateFailure (EraRule "LEDGER" era)) → ImpTestM era a) → SubmitFailureExpectation era → ImpTestM era a
- submitBootstrapAwareFailingVote ∷ ConwayEraImp era ⇒ Vote → Voter → GovActionId → SubmitFailureExpectation era → ImpTestM era ()
- submitBootstrapAwareFailingProposal ∷ ConwayEraImp era ⇒ ProposalProcedure era → SubmitFailureExpectation era → ImpTestM era (Maybe GovActionId)
- submitBootstrapAwareFailingProposal_ ∷ ConwayEraImp era ⇒ ProposalProcedure era → SubmitFailureExpectation era → ImpTestM era ()
- data SubmitFailureExpectation era
- = FailBootstrap (NonEmpty (PredicateFailure (EraRule "LEDGER" era)))
- | FailPostBootstrap (NonEmpty (PredicateFailure (EraRule "LEDGER" era)))
- | FailBootstrapAndPostBootstrap (FailBoth era)
- data FailBoth era = FailBoth {
- bootstrapFailures ∷ NonEmpty (PredicateFailure (EraRule "LEDGER" era))
- postBootstrapFailures ∷ NonEmpty (PredicateFailure (EraRule "LEDGER" era))
- delegateSPORewardAddressToDRep_ ∷ ConwayEraImp era ⇒ KeyHash 'StakePool → Coin → DRep → ImpTestM era ()
Documentation
class (AlonzoEraImp era, ConwayEraGov era, ConwayEraTxBody era, ConwayEraTxCert era, ConwayEraPParams era, STS (EraRule "ENACT" era), BaseM (EraRule "ENACT" era) ~ ShelleyBase, State (EraRule "ENACT" era) ~ EnactState era, Signal (EraRule "ENACT" era) ~ EnactSignal era, Environment (EraRule "ENACT" era) ~ (), NativeScript era ~ Timelock era, Script era ~ AlonzoScript era, GovState era ~ ConwayGovState era) ⇒ ConwayEraImp era Source #
Instances
enactConstitution ∷ ∀ era. (ConwayEraImp era, HasCallStack) ⇒ StrictMaybe (GovPurposeId 'ConstitutionPurpose era) → Constitution era → Credential 'DRepRole → NonEmpty (Credential 'HotCommitteeRole) → ImpTestM era GovActionId Source #
enactTreasuryWithdrawals ∷ ConwayEraImp era ⇒ [(RewardAccount, Coin)] → Credential 'DRepRole → NonEmpty (Credential 'HotCommitteeRole) → ImpTestM era GovActionId Source #
submitGovAction ∷ ∀ era. (ShelleyEraImp era, ConwayEraTxBody era, HasCallStack) ⇒ GovAction era → ImpTestM era GovActionId Source #
submitGovAction_ ∷ ∀ era. (ShelleyEraImp era, ConwayEraTxBody era, HasCallStack) ⇒ GovAction era → ImpTestM era () Source #
submitGovActions ∷ ∀ era. (ShelleyEraImp era, ConwayEraTxBody era, HasCallStack) ⇒ NonEmpty (GovAction era) → ImpTestM era (NonEmpty GovActionId) Source #
submitProposal ∷ (ShelleyEraImp era, ConwayEraTxBody era, HasCallStack) ⇒ ProposalProcedure era → ImpTestM era GovActionId Source #
submitAndExpireProposalToMakeReward ∷ ConwayEraImp era ⇒ Credential 'Staking → ImpTestM era () Source #
submitProposal_ ∷ (ShelleyEraImp era, ConwayEraTxBody era, HasCallStack) ⇒ ProposalProcedure era → ImpTestM era () Source #
submitProposals ∷ (ShelleyEraImp era, ConwayEraGov era, ConwayEraTxBody era, HasCallStack) ⇒ NonEmpty (ProposalProcedure era) → ImpTestM era (NonEmpty GovActionId) Source #
submitFailingProposal ∷ (ShelleyEraImp era, ConwayEraTxBody era, HasCallStack) ⇒ ProposalProcedure era → NonEmpty (PredicateFailure (EraRule "LEDGER" era)) → ImpTestM era () Source #
trySubmitGovAction ∷ (ShelleyEraImp era, ConwayEraTxBody era) ⇒ GovAction era → ImpTestM era (Either (NonEmpty (PredicateFailure (EraRule "LEDGER" era))) GovActionId) Source #
Submits a transaction that proposes the given governance action. For proposing
multiple actions in the same transaciton use trySubmitGovActions
instead.
trySubmitGovActions ∷ (ShelleyEraImp era, ConwayEraTxBody era) ⇒ NonEmpty (GovAction era) → ImpTestM era (Either (NonEmpty (PredicateFailure (EraRule "LEDGER" era)), Tx era) (Tx era)) Source #
Submits a transaction that proposes the given governance action
trySubmitProposal ∷ (ShelleyEraImp era, ConwayEraTxBody era) ⇒ ProposalProcedure era → ImpTestM era (Either (NonEmpty (PredicateFailure (EraRule "LEDGER" era))) GovActionId) Source #
Submits a transaction that proposes the given proposal
trySubmitProposals ∷ (ShelleyEraImp era, ConwayEraTxBody era) ⇒ NonEmpty (ProposalProcedure era) → ImpTestM era (Either (NonEmpty (PredicateFailure (EraRule "LEDGER" era)), Tx era) (Tx era)) Source #
mkConstitutionProposal ∷ ConwayEraImp era ⇒ StrictMaybe (GovPurposeId 'ConstitutionPurpose era) → ImpTestM era (ProposalProcedure era, Constitution era) Source #
mkProposal ∷ (ShelleyEraImp era, ConwayEraTxBody era) ⇒ GovAction era → ImpTestM era (ProposalProcedure era) Source #
mkProposalWithRewardAccount ∷ (ShelleyEraImp era, ConwayEraTxBody era) ⇒ GovAction era → RewardAccount → ImpTestM era (ProposalProcedure era) Source #
mkTreasuryWithdrawalsGovAction ∷ ConwayEraGov era ⇒ [(RewardAccount, Coin)] → ImpTestM era (GovAction era) Source #
submitTreasuryWithdrawals ∷ (ShelleyEraImp era, ConwayEraTxBody era, ConwayEraGov era) ⇒ [(RewardAccount, Coin)] → ImpTestM era GovActionId Source #
submitVote ∷ (ShelleyEraImp era, ConwayEraTxBody era, HasCallStack) ⇒ Vote → Voter → GovActionId → ImpTestM era TxId Source #
Submits a transaction with a Vote for the given governance action as some voter
submitVote_ ∷ (ShelleyEraImp era, ConwayEraTxBody era, HasCallStack) ⇒ Vote → Voter → GovActionId → ImpTestM era () Source #
submitYesVote_ ∷ (ShelleyEraImp era, ConwayEraTxBody era, HasCallStack) ⇒ Voter → GovActionId → ImpTestM era () Source #
Submits a transaction that votes Yes for the given governance action as some voter
submitFailingVote ∷ (ShelleyEraImp era, ConwayEraTxBody era, HasCallStack) ⇒ Voter → GovActionId → NonEmpty (PredicateFailure (EraRule "LEDGER" era)) → ImpTestM era () Source #
trySubmitVote ∷ (ShelleyEraImp era, ConwayEraTxBody era) ⇒ Vote → Voter → GovActionId → ImpTestM era (Either (NonEmpty (PredicateFailure (EraRule "LEDGER" era))) TxId) Source #
registerDRep ∷ ConwayEraImp era ⇒ ImpTestM era (KeyHash 'DRepRole) Source #
Submit a transaction that registers a new DRep and return the keyhash belonging to that DRep
unRegisterDRep ∷ ∀ era. (ShelleyEraImp era, ConwayEraTxCert era) ⇒ Credential 'DRepRole → ImpTestM era () Source #
Submit a transaction that unregisters a given DRep
updateDRep ∷ ∀ era. (ShelleyEraImp era, ConwayEraTxCert era) ⇒ Credential 'DRepRole → ImpTestM era () Source #
Submit a transaction that updates a given DRep
delegateToDRep ∷ ConwayEraImp era ⇒ Credential 'Staking → Coin → DRep → ImpTestM era (KeyPair 'Payment) Source #
setupSingleDRep ∷ ConwayEraImp era ⇒ Integer → ImpTestM era (Credential 'DRepRole, Credential 'Staking, KeyPair 'Payment) Source #
Registers a new DRep, registers its stake credentials and delegates the specified amount of ADA to it.
setupDRepWithoutStake ∷ ConwayEraImp era ⇒ ImpTestM era (KeyHash 'DRepRole, KeyHash 'Staking) Source #
In contrast to setupSingleDRep
, this function does not make a UTxO entry
that could count as delegated stake to the DRep
setupPoolWithStake ∷ (ShelleyEraImp era, ConwayEraTxCert era) ⇒ Coin → ImpTestM era (KeyHash 'StakePool, Credential 'Payment, Credential 'Staking) Source #
Sets up a stake pool with coin delegated to it.
NOTE: This uses the RegDepositDelegTxCert
for delegating, so it has to be
in Conway. The Shelley version of this function would have to separately
register the staking credential and then delegate it.
setupPoolWithoutStake ∷ (ShelleyEraImp era, ConwayEraTxCert era) ⇒ ImpTestM era (KeyHash 'StakePool, Credential 'Staking) Source #
conwayModifyPParams ∷ ConwayEraGov era ⇒ (PParams era → PParams era) → ImpTestM era () Source #
Modify the PParams in the current state with the given function
getProposals ∷ ConwayEraGov era ⇒ ImpTestM era (Proposals era) Source #
getEnactState ∷ ConwayEraGov era ⇒ ImpTestM era (EnactState era) Source #
getGovActionState ∷ (HasCallStack, ConwayEraGov era) ⇒ GovActionId → ImpTestM era (GovActionState era) Source #
Looks up the governance action state corresponding to the governance action id
lookupGovActionState ∷ ConwayEraGov era ⇒ GovActionId → ImpTestM era (Maybe (GovActionState era)) Source #
Looks up the governance action state corresponding to the governance action id
expectPresentGovActionId ∷ (HasCallStack, ConwayEraGov era) ⇒ GovActionId → ImpTestM era () Source #
expectMissingGovActionId ∷ (HasCallStack, ConwayEraGov era) ⇒ GovActionId → ImpTestM era () Source #
getRatifyEnv ∷ ConwayEraGov era ⇒ ImpTestM era (RatifyEnv era) Source #
Builds a RatifyEnv from the current state
calculateDRepAcceptedRatio ∷ ∀ era. (HasCallStack, ConwayEraGov era) ⇒ GovActionId → ImpTestM era Rational Source #
Calculates the ratio of DReps that have voted for the governance action
calculatePoolAcceptedRatio ∷ ConwayEraGov era ⇒ GovActionId → ImpTestM era Rational Source #
calculateCommitteeAcceptedRatio ∷ ∀ era. (HasCallStack, ConwayEraGov era) ⇒ GovActionId → ImpTestM era Rational Source #
Calculates the ratio of Committee members that have voted for the governance action
logAcceptedRatio ∷ (HasCallStack, ConwayEraGov era) ⇒ GovActionId → ImpTestM era () Source #
Logs the ratios of accepted votes per category
isDRepAccepted ∷ (HasCallStack, ConwayEraGov era, ConwayEraPParams era) ⇒ GovActionId → ImpTestM era Bool Source #
Checks whether the governance action has enough DRep votes to be accepted in the next epoch. (Note that no other checks except DRep votes are used)
isSpoAccepted ∷ (HasCallStack, ConwayEraGov era, ConwayEraPParams era) ⇒ GovActionId → ImpTestM era Bool Source #
isCommitteeAccepted ∷ (HasCallStack, ConwayEraGov era, ConwayEraPParams era) ⇒ GovActionId → ImpTestM era Bool Source #
getCommitteeMembers ∷ ConwayEraImp era ⇒ ImpTestM era (Set (Credential 'ColdCommitteeRole)) Source #
getConstitution ∷ ConwayEraImp era ⇒ ImpTestM era (Constitution era) Source #
registerInitialCommittee ∷ (HasCallStack, ConwayEraImp era) ⇒ ImpTestM era (NonEmpty (Credential 'HotCommitteeRole)) Source #
logRatificationChecks ∷ (ConwayEraGov era, ConwayEraPParams era, HasCallStack) ⇒ GovActionId → ImpTestM era () Source #
Logs the results of each check required to make the governance action pass
resignCommitteeColdKey ∷ (ShelleyEraImp era, ConwayEraTxCert era) ⇒ Credential 'ColdCommitteeRole → StrictMaybe Anchor → ImpTestM era (Maybe (Credential 'HotCommitteeRole)) Source #
Submits a transaction that resigns the cold key. Prior to resignation if there was hot credential authorization for this committee member it will be returned.
registerCommitteeHotKey ∷ (ShelleyEraImp era, ConwayEraTxCert era) ⇒ Credential 'ColdCommitteeRole → ImpTestM era (Credential 'HotCommitteeRole) Source #
Submits a transaction that registers a hot key for the given cold key. Returns the hot key hash.
registerCommitteeHotKeys Source #
∷ (ShelleyEraImp era, ConwayEraTxCert era) | |
⇒ ImpTestM era (Credential 'HotCommitteeRole) | Hot Credential generator |
→ NonEmpty (Credential 'ColdCommitteeRole) | |
→ ImpTestM era (NonEmpty (Credential 'HotCommitteeRole)) |
logCurPParams ∷ (EraGov era, ToExpr (PParamsHKD Identity era), HasCallStack) ⇒ ImpTestM era () Source #
electCommittee ∷ ∀ era. (HasCallStack, ConwayEraImp era) ⇒ StrictMaybe (GovPurposeId 'CommitteePurpose era) → Credential 'DRepRole → Set (Credential 'ColdCommitteeRole) → Map (Credential 'ColdCommitteeRole) EpochNo → ImpTestM era (GovPurposeId 'CommitteePurpose era) Source #
electBasicCommittee ∷ ∀ era. (HasCallStack, ConwayEraImp era) ⇒ ImpTestM era (Credential 'DRepRole, Credential 'HotCommitteeRole, GovPurposeId 'CommitteePurpose era) Source #
getGovPolicy ∷ ConwayEraGov era ⇒ ImpTestM era (StrictMaybe ScriptHash) Source #
submitFailingGovAction ∷ ∀ era. (ShelleyEraImp era, ConwayEraTxBody era, HasCallStack) ⇒ GovAction era → NonEmpty (PredicateFailure (EraRule "LEDGER" era)) → ImpTestM era () Source #
submitGovActionForest ∷ (StrictMaybe GovActionId → ImpTestM era GovActionId) → StrictMaybe GovActionId → Forest () → ImpTestM era (Forest GovActionId) Source #
submitGovActionTree ∷ (StrictMaybe GovActionId → ImpTestM era GovActionId) → StrictMaybe GovActionId → Tree () → ImpTestM era (Tree GovActionId) Source #
getProposalsForest ∷ ConwayEraGov era ⇒ ImpTestM era (Forest (StrictMaybe GovActionId)) Source #
logProposalsForest ∷ (ConwayEraGov era, HasCallStack) ⇒ ImpTestM era () Source #
logProposalsForestDiff ∷ (Era era, ToExpr (PParamsHKD StrictMaybe era), HasCallStack) ⇒ Proposals era → Proposals era → ImpTestM era () Source #
getCCExpiry ∷ (HasCallStack, ConwayEraGov era) ⇒ Credential 'ColdCommitteeRole → ImpTestM era EpochNo Source #
ccShouldBeExpired ∷ (HasCallStack, ConwayEraGov era) ⇒ Credential 'ColdCommitteeRole → ImpTestM era () Source #
ccShouldNotBeExpired ∷ (HasCallStack, ConwayEraGov era) ⇒ Credential 'ColdCommitteeRole → ImpTestM era () Source #
ccShouldBeResigned ∷ HasCallStack ⇒ Credential 'ColdCommitteeRole → ImpTestM era () Source #
Test the resignation status for a CC cold key to be resigned
ccShouldNotBeResigned ∷ HasCallStack ⇒ Credential 'ColdCommitteeRole → ImpTestM era () Source #
Test the resignation status for a CC cold key to not be resigned
getLastEnactedCommittee ∷ ConwayEraGov era ⇒ ImpTestM era (StrictMaybe (GovPurposeId 'CommitteePurpose era)) Source #
getLastEnactedConstitution ∷ ConwayEraGov era ⇒ ImpTestM era (StrictMaybe (GovPurposeId 'ConstitutionPurpose era)) Source #
submitParameterChange ∷ ConwayEraImp era ⇒ StrictMaybe GovActionId → PParamsUpdate era → ImpTestM era GovActionId Source #
mkMinFeeUpdateGovAction ∷ ConwayEraImp era ⇒ StrictMaybe GovActionId → ImpTestM era (GovAction era) Source #
mkParameterChangeGovAction ∷ ConwayEraImp era ⇒ StrictMaybe GovActionId → PParamsUpdate era → ImpTestM era (GovAction era) Source #
mkUpdateCommitteeProposal Source #
∷ ConwayEraImp era | |
⇒ Maybe (StrictMaybe (GovPurposeId 'CommitteePurpose era)) | Set the parent. When Nothing is supplied latest parent will be used. |
→ Set (Credential 'ColdCommitteeRole) | CC members to remove |
→ [(Credential 'ColdCommitteeRole, EpochInterval)] | CC members to add |
→ UnitInterval | |
→ ImpTestM era (ProposalProcedure era) |
submitUpdateCommittee Source #
∷ ConwayEraImp era | |
⇒ Maybe (StrictMaybe (GovPurposeId 'CommitteePurpose era)) | Set the parent. When Nothing is supplied latest parent will be used. |
→ Set (Credential 'ColdCommitteeRole) | CC members to remove |
→ [(Credential 'ColdCommitteeRole, EpochInterval)] | CC members to add |
→ UnitInterval | |
→ ImpTestM era GovActionId |
expectCommitteeMemberPresence ∷ (HasCallStack, ConwayEraGov era) ⇒ Credential 'ColdCommitteeRole → ImpTestM era () Source #
expectCommitteeMemberAbsence ∷ (HasCallStack, ConwayEraGov era) ⇒ Credential 'ColdCommitteeRole → ImpTestM era () Source #
getLastEnactedParameterChange ∷ ConwayEraGov era ⇒ ImpTestM era (StrictMaybe (GovPurposeId 'PParamUpdatePurpose era)) Source #
getLastEnactedHardForkInitiation ∷ ConwayEraGov era ⇒ ImpTestM era (StrictMaybe (GovPurposeId 'HardForkPurpose era)) Source #
getConstitutionProposals ∷ ConwayEraGov era ⇒ ImpTestM era (Map (GovPurposeId 'ConstitutionPurpose era) (PEdges (GovPurposeId 'ConstitutionPurpose era))) Source #
getParameterChangeProposals ∷ ConwayEraGov era ⇒ ImpTestM era (Map (GovPurposeId 'PParamUpdatePurpose era) (PEdges (GovPurposeId 'PParamUpdatePurpose era))) Source #
expectNumDormantEpochs ∷ HasCallStack ⇒ EpochNo → ImpTestM era () Source #
submitConstitution ∷ ∀ era. ConwayEraImp era ⇒ StrictMaybe (GovPurposeId 'ConstitutionPurpose era) → ImpTestM era GovActionId Source #
isDRepExpired ∷ HasCallStack ⇒ Credential 'DRepRole → ImpTestM era Bool Source #
expectDRepExpiry ∷ HasCallStack ⇒ Credential 'DRepRole → EpochNo → ImpTestM era () Source #
expectActualDRepExpiry ∷ HasCallStack ⇒ Credential 'DRepRole → EpochNo → ImpTestM era () Source #
expectDRepNotRegistered ∷ HasCallStack ⇒ Credential 'DRepRole → ImpTestM era () Source #
expectCurrentProposals ∷ (HasCallStack, ConwayEraGov era) ⇒ ImpTestM era () Source #
expectNoCurrentProposals ∷ (HasCallStack, ConwayEraImp era) ⇒ ImpTestM era () Source #
expectPulserProposals ∷ (HasCallStack, ConwayEraGov era) ⇒ ImpTestM era () Source #
expectNoPulserProposals ∷ (HasCallStack, ConwayEraGov era) ⇒ ImpTestM era () Source #
minorFollow ∷ ProtVer → ProtVer Source #
A legal ProtVer that differs in the minor Version
majorFollow ∷ ProtVer → ProtVer Source #
A legal ProtVer that moves to the next major Version
cantFollow ∷ ProtVer → ProtVer Source #
An illegal ProtVer that skips 3 minor versions
currentProposalsShouldContain ∷ (HasCallStack, ConwayEraGov era) ⇒ GovActionId → ImpTestM era () Source #
submitYesVoteCCs_ ∷ ∀ era f. (ConwayEraImp era, Foldable f) ⇒ f (Credential 'HotCommitteeRole) → GovActionId → ImpTestM era () Source #
donateToTreasury ∷ ConwayEraImp era ⇒ Coin → ImpTestM era () Source #
expectMembers ∷ (HasCallStack, ConwayEraGov era) ⇒ Set (Credential 'ColdCommitteeRole) → ImpTestM era () Source #
showConwayTxBalance ∷ (EraUTxO era, ConwayEraTxBody era, Tx era ~ AlonzoTx era) ⇒ PParams era → CertState era → UTxO era → AlonzoTx era → String Source #
logConwayTxBalance ∷ (EraUTxO era, EraGov era, ConwayEraTxBody era, Tx era ~ AlonzoTx era) ⇒ AlonzoTx era → ImpTestM era () Source #
submitBootstrapAware ∷ EraGov era ⇒ ImpTestM era a → (NonEmpty (PredicateFailure (EraRule "LEDGER" era)) → ImpTestM era a) → SubmitFailureExpectation era → ImpTestM era a Source #
submitBootstrapAwareFailingVote ∷ ConwayEraImp era ⇒ Vote → Voter → GovActionId → SubmitFailureExpectation era → ImpTestM era () Source #
submitBootstrapAwareFailingProposal ∷ ConwayEraImp era ⇒ ProposalProcedure era → SubmitFailureExpectation era → ImpTestM era (Maybe GovActionId) Source #
submitBootstrapAwareFailingProposal_ ∷ ConwayEraImp era ⇒ ProposalProcedure era → SubmitFailureExpectation era → ImpTestM era () Source #
data SubmitFailureExpectation era Source #
FailBootstrap (NonEmpty (PredicateFailure (EraRule "LEDGER" era))) | |
FailPostBootstrap (NonEmpty (PredicateFailure (EraRule "LEDGER" era))) | |
FailBootstrapAndPostBootstrap (FailBoth era) |
FailBoth | |
|
delegateSPORewardAddressToDRep_ ∷ ConwayEraImp era ⇒ KeyHash 'StakePool → Coin → DRep → ImpTestM era () Source #
Orphan instances
AlonzoEraImp ConwayEra Source # | |
MaryEraImp ConwayEra Source # | |
ShelleyEraImp ConwayEra Source # | |
initGenesis ∷ (HasKeyPairs s, MonadState s m, HasStatefulGen g m, MonadFail m) ⇒ m (Genesis ConwayEra) Source # initNewEpochState ∷ (HasKeyPairs s, MonadState s m, HasStatefulGen g m, MonadFail m) ⇒ m (NewEpochState ConwayEra) Source # initImpTestState ∷ (HasKeyPairs s, MonadState s m, HasStatefulGen g m, MonadFail m) ⇒ m (ImpTestState ConwayEra) Source # impSatisfyNativeScript ∷ Set (KeyHash 'Witness) → TxBody ConwayEra → NativeScript ConwayEra → ImpTestM ConwayEra (Maybe (Map (KeyHash 'Witness) (KeyPair 'Witness))) Source # modifyPParams ∷ (PParams ConwayEra → PParams ConwayEra) → ImpTestM ConwayEra () Source # fixupTx ∷ Tx ConwayEra → ImpTestM ConwayEra (Tx ConwayEra) Source # |