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 (EraCrypto era) → NonEmpty (Credential 'HotCommitteeRole (EraCrypto era)) → ImpTestM era (GovActionId (EraCrypto era))
- enactTreasuryWithdrawals ∷ ConwayEraImp era ⇒ [(RewardAccount (EraCrypto era), Coin)] → Credential 'DRepRole (EraCrypto era) → NonEmpty (Credential 'HotCommitteeRole (EraCrypto era)) → ImpTestM era (GovActionId (EraCrypto era))
- submitGovAction ∷ ∀ era. (ShelleyEraImp era, ConwayEraTxBody era, HasCallStack) ⇒ GovAction era → ImpTestM era (GovActionId (EraCrypto era))
- 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 (EraCrypto era)))
- submitProposal ∷ (ShelleyEraImp era, ConwayEraTxBody era, HasCallStack) ⇒ ProposalProcedure era → ImpTestM era (GovActionId (EraCrypto era))
- submitAndExpireProposalToMakeReward ∷ ConwayEraImp era ⇒ Credential 'Staking (EraCrypto era) → 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 (EraCrypto era)))
- 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 (EraCrypto era)))
- 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 (EraCrypto era)))
- 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 (EraCrypto era) → ImpTestM era (ProposalProcedure era)
- mkTreasuryWithdrawalsGovAction ∷ ConwayEraGov era ⇒ [(RewardAccount (EraCrypto era), Coin)] → ImpTestM era (GovAction era)
- submitTreasuryWithdrawals ∷ (ShelleyEraImp era, ConwayEraTxBody era, ConwayEraGov era) ⇒ [(RewardAccount (EraCrypto era), Coin)] → ImpTestM era (GovActionId (EraCrypto era))
- submitVote ∷ (ShelleyEraImp era, ConwayEraTxBody era, HasCallStack) ⇒ Vote → Voter (EraCrypto era) → GovActionId (EraCrypto era) → ImpTestM era (TxId (EraCrypto era))
- submitVote_ ∷ (ShelleyEraImp era, ConwayEraTxBody era, HasCallStack) ⇒ Vote → Voter (EraCrypto era) → GovActionId (EraCrypto era) → ImpTestM era ()
- submitYesVote_ ∷ (ShelleyEraImp era, ConwayEraTxBody era, HasCallStack) ⇒ Voter (EraCrypto era) → GovActionId (EraCrypto era) → ImpTestM era ()
- submitFailingVote ∷ (ShelleyEraImp era, ConwayEraTxBody era, HasCallStack) ⇒ Voter (EraCrypto era) → GovActionId (EraCrypto era) → NonEmpty (PredicateFailure (EraRule "LEDGER" era)) → ImpTestM era ()
- trySubmitVote ∷ (ShelleyEraImp era, ConwayEraTxBody era) ⇒ Vote → Voter (EraCrypto era) → GovActionId (EraCrypto era) → ImpTestM era (Either (NonEmpty (PredicateFailure (EraRule "LEDGER" era))) (TxId (EraCrypto era)))
- registerDRep ∷ ConwayEraImp era ⇒ ImpTestM era (KeyHash 'DRepRole (EraCrypto era))
- unRegisterDRep ∷ ∀ era. (ShelleyEraImp era, ConwayEraTxCert era) ⇒ Credential 'DRepRole (EraCrypto era) → ImpTestM era ()
- updateDRep ∷ ∀ era. (ShelleyEraImp era, ConwayEraTxCert era) ⇒ Credential 'DRepRole (EraCrypto era) → ImpTestM era ()
- delegateToDRep ∷ ConwayEraImp era ⇒ Credential 'Staking (EraCrypto era) → Coin → DRep (EraCrypto era) → ImpTestM era (KeyPair 'Payment (EraCrypto era))
- setupSingleDRep ∷ ConwayEraImp era ⇒ Integer → ImpTestM era (Credential 'DRepRole (EraCrypto era), Credential 'Staking (EraCrypto era), KeyPair 'Payment (EraCrypto era))
- setupDRepWithoutStake ∷ ConwayEraImp era ⇒ ImpTestM era (KeyHash 'DRepRole (EraCrypto era), KeyHash 'Staking (EraCrypto era))
- setupPoolWithStake ∷ (ShelleyEraImp era, ConwayEraTxCert era) ⇒ Coin → ImpTestM era (KeyHash 'StakePool (EraCrypto era), Credential 'Payment (EraCrypto era), Credential 'Staking (EraCrypto era))
- setupPoolWithoutStake ∷ (ShelleyEraImp era, ConwayEraTxCert era) ⇒ ImpTestM era (KeyHash 'StakePool (EraCrypto era), Credential 'Staking (EraCrypto era))
- 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 (EraCrypto era) → ImpTestM era (GovActionState era)
- lookupGovActionState ∷ ConwayEraGov era ⇒ GovActionId (EraCrypto era) → ImpTestM era (Maybe (GovActionState era))
- expectPresentGovActionId ∷ (HasCallStack, ConwayEraGov era) ⇒ GovActionId (EraCrypto era) → ImpTestM era ()
- expectMissingGovActionId ∷ (HasCallStack, ConwayEraGov era) ⇒ GovActionId (EraCrypto era) → ImpTestM era ()
- getRatifyEnv ∷ ConwayEraGov era ⇒ ImpTestM era (RatifyEnv era)
- calculateDRepAcceptedRatio ∷ ∀ era. (HasCallStack, ConwayEraGov era) ⇒ GovActionId (EraCrypto era) → ImpTestM era Rational
- calculatePoolAcceptedRatio ∷ ConwayEraGov era ⇒ GovActionId (EraCrypto era) → ImpTestM era Rational
- calculateCommitteeAcceptedRatio ∷ ∀ era. (HasCallStack, ConwayEraGov era) ⇒ GovActionId (EraCrypto era) → ImpTestM era Rational
- logAcceptedRatio ∷ (HasCallStack, ConwayEraGov era) ⇒ GovActionId (EraCrypto era) → ImpTestM era ()
- isDRepAccepted ∷ (HasCallStack, ConwayEraGov era, ConwayEraPParams era) ⇒ GovActionId (EraCrypto era) → ImpTestM era Bool
- isSpoAccepted ∷ (HasCallStack, ConwayEraGov era, ConwayEraPParams era) ⇒ GovActionId (EraCrypto era) → ImpTestM era Bool
- isCommitteeAccepted ∷ (HasCallStack, ConwayEraGov era, ConwayEraPParams era) ⇒ GovActionId (EraCrypto era) → ImpTestM era Bool
- getCommitteeMembers ∷ ConwayEraImp era ⇒ ImpTestM era (Set (Credential 'ColdCommitteeRole (EraCrypto era)))
- getConstitution ∷ ConwayEraImp era ⇒ ImpTestM era (Constitution era)
- registerInitialCommittee ∷ (HasCallStack, ConwayEraImp era) ⇒ ImpTestM era (NonEmpty (Credential 'HotCommitteeRole (EraCrypto era)))
- logRatificationChecks ∷ (ConwayEraGov era, ConwayEraPParams era, HasCallStack) ⇒ GovActionId (EraCrypto era) → ImpTestM era ()
- resignCommitteeColdKey ∷ (ShelleyEraImp era, ConwayEraTxCert era) ⇒ Credential 'ColdCommitteeRole (EraCrypto era) → StrictMaybe (Anchor (EraCrypto era)) → ImpTestM era (Maybe (Credential 'HotCommitteeRole (EraCrypto era)))
- registerCommitteeHotKey ∷ (ShelleyEraImp era, ConwayEraTxCert era) ⇒ Credential 'ColdCommitteeRole (EraCrypto era) → ImpTestM era (Credential 'HotCommitteeRole (EraCrypto era))
- registerCommitteeHotKeys ∷ (ShelleyEraImp era, ConwayEraTxCert era) ⇒ ImpTestM era (Credential 'HotCommitteeRole (EraCrypto era)) → NonEmpty (Credential 'ColdCommitteeRole (EraCrypto era)) → ImpTestM era (NonEmpty (Credential 'HotCommitteeRole (EraCrypto era)))
- logCurPParams ∷ (EraGov era, ToExpr (PParamsHKD Identity era), HasCallStack) ⇒ ImpTestM era ()
- electCommittee ∷ ∀ era. (HasCallStack, ConwayEraImp era) ⇒ StrictMaybe (GovPurposeId 'CommitteePurpose era) → Credential 'DRepRole (EraCrypto era) → Set (Credential 'ColdCommitteeRole (EraCrypto era)) → Map (Credential 'ColdCommitteeRole (EraCrypto era)) EpochNo → ImpTestM era (GovPurposeId 'CommitteePurpose era)
- electBasicCommittee ∷ ∀ era. (HasCallStack, ConwayEraImp era) ⇒ ImpTestM era (Credential 'DRepRole (EraCrypto era), Credential 'HotCommitteeRole (EraCrypto era), GovPurposeId 'CommitteePurpose era)
- proposalsShowDebug ∷ Era era ⇒ Proposals era → Bool → Doc AnsiStyle
- getGovPolicy ∷ ConwayEraGov era ⇒ ImpTestM era (StrictMaybe (ScriptHash (EraCrypto era)))
- submitFailingGovAction ∷ ∀ era. (ShelleyEraImp era, ConwayEraTxBody era, HasCallStack) ⇒ GovAction era → NonEmpty (PredicateFailure (EraRule "LEDGER" era)) → ImpTestM era ()
- submitGovActionForest ∷ (StrictMaybe (GovActionId (EraCrypto era)) → ImpTestM era (GovActionId (EraCrypto era))) → StrictMaybe (GovActionId (EraCrypto era)) → Forest () → ImpTestM era (Forest (GovActionId (EraCrypto era)))
- submitGovActionTree ∷ (StrictMaybe (GovActionId (EraCrypto era)) → ImpTestM era (GovActionId (EraCrypto era))) → StrictMaybe (GovActionId (EraCrypto era)) → Tree () → ImpTestM era (Tree (GovActionId (EraCrypto era)))
- getProposalsForest ∷ ConwayEraGov era ⇒ ImpTestM era (Forest (StrictMaybe (GovActionId (EraCrypto era))))
- 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 (EraCrypto era) → ImpTestM era EpochNo
- ccShouldBeExpired ∷ (HasCallStack, ConwayEraGov era) ⇒ Credential 'ColdCommitteeRole (EraCrypto era) → ImpTestM era ()
- ccShouldNotBeExpired ∷ (HasCallStack, ConwayEraGov era) ⇒ Credential 'ColdCommitteeRole (EraCrypto era) → ImpTestM era ()
- ccShouldBeResigned ∷ HasCallStack ⇒ Credential 'ColdCommitteeRole (EraCrypto era) → ImpTestM era ()
- ccShouldNotBeResigned ∷ HasCallStack ⇒ Credential 'ColdCommitteeRole (EraCrypto era) → 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 (EraCrypto era)) → PParamsUpdate era → ImpTestM era (GovActionId (EraCrypto era))
- mkMinFeeUpdateGovAction ∷ ConwayEraImp era ⇒ StrictMaybe (GovActionId (EraCrypto era)) → ImpTestM era (GovAction era)
- mkParameterChangeGovAction ∷ ConwayEraImp era ⇒ StrictMaybe (GovActionId (EraCrypto era)) → PParamsUpdate era → ImpTestM era (GovAction era)
- mkUpdateCommitteeProposal ∷ ConwayEraImp era ⇒ Maybe (StrictMaybe (GovPurposeId 'CommitteePurpose era)) → Set (Credential 'ColdCommitteeRole (EraCrypto era)) → [(Credential 'ColdCommitteeRole (EraCrypto era), EpochInterval)] → UnitInterval → ImpTestM era (ProposalProcedure era)
- submitUpdateCommittee ∷ ConwayEraImp era ⇒ Maybe (StrictMaybe (GovPurposeId 'CommitteePurpose era)) → Set (Credential 'ColdCommitteeRole (EraCrypto era)) → [(Credential 'ColdCommitteeRole (EraCrypto era), EpochInterval)] → UnitInterval → ImpTestM era (GovActionId (EraCrypto era))
- expectCommitteeMemberPresence ∷ (HasCallStack, ConwayEraGov era) ⇒ Credential 'ColdCommitteeRole (EraCrypto era) → ImpTestM era ()
- expectCommitteeMemberAbsence ∷ (HasCallStack, ConwayEraGov era) ⇒ Credential 'ColdCommitteeRole (EraCrypto era) → 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 (EraCrypto era))
- isDRepExpired ∷ HasCallStack ⇒ Credential 'DRepRole (EraCrypto era) → ImpTestM era Bool
- expectDRepExpiry ∷ HasCallStack ⇒ Credential 'DRepRole (EraCrypto era) → EpochNo → ImpTestM era ()
- expectActualDRepExpiry ∷ HasCallStack ⇒ Credential 'DRepRole (EraCrypto era) → EpochNo → ImpTestM era ()
- expectDRepNotRegistered ∷ HasCallStack ⇒ Credential 'DRepRole (EraCrypto era) → 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 (EraCrypto era) → 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 (EraCrypto era)) → GovActionId (EraCrypto era) → ImpTestM era ()
- donateToTreasury ∷ ConwayEraImp era ⇒ Coin → ImpTestM era ()
- expectMembers ∷ (HasCallStack, ConwayEraGov era) ⇒ Set (Credential 'ColdCommitteeRole (EraCrypto era)) → 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 (EraCrypto era) → GovActionId (EraCrypto era) → SubmitFailureExpectation era → ImpTestM era ()
- submitBootstrapAwareFailingProposal ∷ ConwayEraImp era ⇒ ProposalProcedure era → SubmitFailureExpectation era → ImpTestM era (Maybe (GovActionId (EraCrypto era)))
- 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 (EraCrypto era) → Coin → DRep (EraCrypto era) → 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
(Crypto c, NFData (SigDSIGN (DSIGN c)), NFData (VerKeyDSIGN (DSIGN c)), ADDRHASH c ~ Blake2b_224, DSIGN c ~ Ed25519DSIGN, Signable (DSIGN c) (Hash (HASH c) EraIndependentTxBody)) ⇒ ConwayEraImp (ConwayEra c) Source # | |
Defined in Test.Cardano.Ledger.Conway.ImpTest |
enactConstitution ∷ ∀ era. (ConwayEraImp era, HasCallStack) ⇒ StrictMaybe (GovPurposeId 'ConstitutionPurpose era) → Constitution era → Credential 'DRepRole (EraCrypto era) → NonEmpty (Credential 'HotCommitteeRole (EraCrypto era)) → ImpTestM era (GovActionId (EraCrypto era)) Source #
enactTreasuryWithdrawals ∷ ConwayEraImp era ⇒ [(RewardAccount (EraCrypto era), Coin)] → Credential 'DRepRole (EraCrypto era) → NonEmpty (Credential 'HotCommitteeRole (EraCrypto era)) → ImpTestM era (GovActionId (EraCrypto era)) Source #
submitGovAction ∷ ∀ era. (ShelleyEraImp era, ConwayEraTxBody era, HasCallStack) ⇒ GovAction era → ImpTestM era (GovActionId (EraCrypto era)) 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 (EraCrypto era))) Source #
submitProposal ∷ (ShelleyEraImp era, ConwayEraTxBody era, HasCallStack) ⇒ ProposalProcedure era → ImpTestM era (GovActionId (EraCrypto era)) Source #
submitAndExpireProposalToMakeReward ∷ ConwayEraImp era ⇒ Credential 'Staking (EraCrypto era) → 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 (EraCrypto era))) 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 (EraCrypto era))) 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 (EraCrypto era))) 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 (EraCrypto era) → ImpTestM era (ProposalProcedure era) Source #
mkTreasuryWithdrawalsGovAction ∷ ConwayEraGov era ⇒ [(RewardAccount (EraCrypto era), Coin)] → ImpTestM era (GovAction era) Source #
submitTreasuryWithdrawals ∷ (ShelleyEraImp era, ConwayEraTxBody era, ConwayEraGov era) ⇒ [(RewardAccount (EraCrypto era), Coin)] → ImpTestM era (GovActionId (EraCrypto era)) Source #
submitVote ∷ (ShelleyEraImp era, ConwayEraTxBody era, HasCallStack) ⇒ Vote → Voter (EraCrypto era) → GovActionId (EraCrypto era) → ImpTestM era (TxId (EraCrypto era)) Source #
Submits a transaction with a Vote for the given governance action as some voter
submitVote_ ∷ (ShelleyEraImp era, ConwayEraTxBody era, HasCallStack) ⇒ Vote → Voter (EraCrypto era) → GovActionId (EraCrypto era) → ImpTestM era () Source #
submitYesVote_ ∷ (ShelleyEraImp era, ConwayEraTxBody era, HasCallStack) ⇒ Voter (EraCrypto era) → GovActionId (EraCrypto era) → ImpTestM era () Source #
Submits a transaction that votes Yes for the given governance action as some voter
submitFailingVote ∷ (ShelleyEraImp era, ConwayEraTxBody era, HasCallStack) ⇒ Voter (EraCrypto era) → GovActionId (EraCrypto era) → NonEmpty (PredicateFailure (EraRule "LEDGER" era)) → ImpTestM era () Source #
trySubmitVote ∷ (ShelleyEraImp era, ConwayEraTxBody era) ⇒ Vote → Voter (EraCrypto era) → GovActionId (EraCrypto era) → ImpTestM era (Either (NonEmpty (PredicateFailure (EraRule "LEDGER" era))) (TxId (EraCrypto era))) Source #
registerDRep ∷ ConwayEraImp era ⇒ ImpTestM era (KeyHash 'DRepRole (EraCrypto era)) 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 (EraCrypto era) → ImpTestM era () Source #
Submit a transaction that unregisters a given DRep
updateDRep ∷ ∀ era. (ShelleyEraImp era, ConwayEraTxCert era) ⇒ Credential 'DRepRole (EraCrypto era) → ImpTestM era () Source #
Submit a transaction that updates a given DRep
delegateToDRep ∷ ConwayEraImp era ⇒ Credential 'Staking (EraCrypto era) → Coin → DRep (EraCrypto era) → ImpTestM era (KeyPair 'Payment (EraCrypto era)) Source #
setupSingleDRep ∷ ConwayEraImp era ⇒ Integer → ImpTestM era (Credential 'DRepRole (EraCrypto era), Credential 'Staking (EraCrypto era), KeyPair 'Payment (EraCrypto era)) 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 (EraCrypto era), KeyHash 'Staking (EraCrypto era)) 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 (EraCrypto era), Credential 'Payment (EraCrypto era), Credential 'Staking (EraCrypto era)) 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 (EraCrypto era), Credential 'Staking (EraCrypto era)) 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 (EraCrypto era) → ImpTestM era (GovActionState era) Source #
Looks up the governance action state corresponding to the governance action id
lookupGovActionState ∷ ConwayEraGov era ⇒ GovActionId (EraCrypto era) → ImpTestM era (Maybe (GovActionState era)) Source #
Looks up the governance action state corresponding to the governance action id
expectPresentGovActionId ∷ (HasCallStack, ConwayEraGov era) ⇒ GovActionId (EraCrypto era) → ImpTestM era () Source #
expectMissingGovActionId ∷ (HasCallStack, ConwayEraGov era) ⇒ GovActionId (EraCrypto era) → ImpTestM era () Source #
getRatifyEnv ∷ ConwayEraGov era ⇒ ImpTestM era (RatifyEnv era) Source #
Builds a RatifyEnv from the current state
calculateDRepAcceptedRatio ∷ ∀ era. (HasCallStack, ConwayEraGov era) ⇒ GovActionId (EraCrypto era) → ImpTestM era Rational Source #
Calculates the ratio of DReps that have voted for the governance action
calculatePoolAcceptedRatio ∷ ConwayEraGov era ⇒ GovActionId (EraCrypto era) → ImpTestM era Rational Source #
calculateCommitteeAcceptedRatio ∷ ∀ era. (HasCallStack, ConwayEraGov era) ⇒ GovActionId (EraCrypto era) → ImpTestM era Rational Source #
Calculates the ratio of Committee members that have voted for the governance action
logAcceptedRatio ∷ (HasCallStack, ConwayEraGov era) ⇒ GovActionId (EraCrypto era) → ImpTestM era () Source #
Logs the ratios of accepted votes per category
isDRepAccepted ∷ (HasCallStack, ConwayEraGov era, ConwayEraPParams era) ⇒ GovActionId (EraCrypto era) → 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 (EraCrypto era) → ImpTestM era Bool Source #
isCommitteeAccepted ∷ (HasCallStack, ConwayEraGov era, ConwayEraPParams era) ⇒ GovActionId (EraCrypto era) → ImpTestM era Bool Source #
getCommitteeMembers ∷ ConwayEraImp era ⇒ ImpTestM era (Set (Credential 'ColdCommitteeRole (EraCrypto era))) Source #
getConstitution ∷ ConwayEraImp era ⇒ ImpTestM era (Constitution era) Source #
registerInitialCommittee ∷ (HasCallStack, ConwayEraImp era) ⇒ ImpTestM era (NonEmpty (Credential 'HotCommitteeRole (EraCrypto era))) Source #
logRatificationChecks ∷ (ConwayEraGov era, ConwayEraPParams era, HasCallStack) ⇒ GovActionId (EraCrypto era) → ImpTestM era () Source #
Logs the results of each check required to make the governance action pass
resignCommitteeColdKey ∷ (ShelleyEraImp era, ConwayEraTxCert era) ⇒ Credential 'ColdCommitteeRole (EraCrypto era) → StrictMaybe (Anchor (EraCrypto era)) → ImpTestM era (Maybe (Credential 'HotCommitteeRole (EraCrypto era))) 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 (EraCrypto era) → ImpTestM era (Credential 'HotCommitteeRole (EraCrypto era)) 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 (EraCrypto era)) | Hot Credential generator |
→ NonEmpty (Credential 'ColdCommitteeRole (EraCrypto era)) | |
→ ImpTestM era (NonEmpty (Credential 'HotCommitteeRole (EraCrypto era))) |
logCurPParams ∷ (EraGov era, ToExpr (PParamsHKD Identity era), HasCallStack) ⇒ ImpTestM era () Source #
electCommittee ∷ ∀ era. (HasCallStack, ConwayEraImp era) ⇒ StrictMaybe (GovPurposeId 'CommitteePurpose era) → Credential 'DRepRole (EraCrypto era) → Set (Credential 'ColdCommitteeRole (EraCrypto era)) → Map (Credential 'ColdCommitteeRole (EraCrypto era)) EpochNo → ImpTestM era (GovPurposeId 'CommitteePurpose era) Source #
electBasicCommittee ∷ ∀ era. (HasCallStack, ConwayEraImp era) ⇒ ImpTestM era (Credential 'DRepRole (EraCrypto era), Credential 'HotCommitteeRole (EraCrypto era), GovPurposeId 'CommitteePurpose era) Source #
getGovPolicy ∷ ConwayEraGov era ⇒ ImpTestM era (StrictMaybe (ScriptHash (EraCrypto era))) Source #
submitFailingGovAction ∷ ∀ era. (ShelleyEraImp era, ConwayEraTxBody era, HasCallStack) ⇒ GovAction era → NonEmpty (PredicateFailure (EraRule "LEDGER" era)) → ImpTestM era () Source #
submitGovActionForest ∷ (StrictMaybe (GovActionId (EraCrypto era)) → ImpTestM era (GovActionId (EraCrypto era))) → StrictMaybe (GovActionId (EraCrypto era)) → Forest () → ImpTestM era (Forest (GovActionId (EraCrypto era))) Source #
submitGovActionTree ∷ (StrictMaybe (GovActionId (EraCrypto era)) → ImpTestM era (GovActionId (EraCrypto era))) → StrictMaybe (GovActionId (EraCrypto era)) → Tree () → ImpTestM era (Tree (GovActionId (EraCrypto era))) Source #
getProposalsForest ∷ ConwayEraGov era ⇒ ImpTestM era (Forest (StrictMaybe (GovActionId (EraCrypto era)))) 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 (EraCrypto era) → ImpTestM era EpochNo Source #
ccShouldBeExpired ∷ (HasCallStack, ConwayEraGov era) ⇒ Credential 'ColdCommitteeRole (EraCrypto era) → ImpTestM era () Source #
ccShouldNotBeExpired ∷ (HasCallStack, ConwayEraGov era) ⇒ Credential 'ColdCommitteeRole (EraCrypto era) → ImpTestM era () Source #
ccShouldBeResigned ∷ HasCallStack ⇒ Credential 'ColdCommitteeRole (EraCrypto era) → ImpTestM era () Source #
Test the resignation status for a CC cold key to be resigned
ccShouldNotBeResigned ∷ HasCallStack ⇒ Credential 'ColdCommitteeRole (EraCrypto era) → 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 (EraCrypto era)) → PParamsUpdate era → ImpTestM era (GovActionId (EraCrypto era)) Source #
mkMinFeeUpdateGovAction ∷ ConwayEraImp era ⇒ StrictMaybe (GovActionId (EraCrypto era)) → ImpTestM era (GovAction era) Source #
mkParameterChangeGovAction ∷ ConwayEraImp era ⇒ StrictMaybe (GovActionId (EraCrypto era)) → 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 (EraCrypto era)) | CC members to remove |
→ [(Credential 'ColdCommitteeRole (EraCrypto era), 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 (EraCrypto era)) | CC members to remove |
→ [(Credential 'ColdCommitteeRole (EraCrypto era), EpochInterval)] | CC members to add |
→ UnitInterval | |
→ ImpTestM era (GovActionId (EraCrypto era)) |
expectCommitteeMemberPresence ∷ (HasCallStack, ConwayEraGov era) ⇒ Credential 'ColdCommitteeRole (EraCrypto era) → ImpTestM era () Source #
expectCommitteeMemberAbsence ∷ (HasCallStack, ConwayEraGov era) ⇒ Credential 'ColdCommitteeRole (EraCrypto era) → 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 (EraCrypto era)) Source #
isDRepExpired ∷ HasCallStack ⇒ Credential 'DRepRole (EraCrypto era) → ImpTestM era Bool Source #
expectDRepExpiry ∷ HasCallStack ⇒ Credential 'DRepRole (EraCrypto era) → EpochNo → ImpTestM era () Source #
expectActualDRepExpiry ∷ HasCallStack ⇒ Credential 'DRepRole (EraCrypto era) → EpochNo → ImpTestM era () Source #
expectDRepNotRegistered ∷ HasCallStack ⇒ Credential 'DRepRole (EraCrypto era) → 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 (EraCrypto era) → ImpTestM era () Source #
submitYesVoteCCs_ ∷ ∀ era f. (ConwayEraImp era, Foldable f) ⇒ f (Credential 'HotCommitteeRole (EraCrypto era)) → GovActionId (EraCrypto era) → ImpTestM era () Source #
donateToTreasury ∷ ConwayEraImp era ⇒ Coin → ImpTestM era () Source #
expectMembers ∷ (HasCallStack, ConwayEraGov era) ⇒ Set (Credential 'ColdCommitteeRole (EraCrypto era)) → 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 (EraCrypto era) → GovActionId (EraCrypto era) → SubmitFailureExpectation era → ImpTestM era () Source #
submitBootstrapAwareFailingProposal ∷ ConwayEraImp era ⇒ ProposalProcedure era → SubmitFailureExpectation era → ImpTestM era (Maybe (GovActionId (EraCrypto era))) 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 (EraCrypto era) → Coin → DRep (EraCrypto era) → ImpTestM era () Source #