cardano-ledger-shelley-test-1.5.1.0: Test helpers from cardano-ledger-shelley exposed to other packages
Safe HaskellSafe-Inferred
LanguageHaskell2010

Test.Cardano.Ledger.Shelley.Generator.Trace.Ledger

Synopsis

Documentation

mkGenesisLedgerState ∷ ∀ a era ledger. (EraGen era, EraGov era) ⇒ GenEnv era → IRC ledger → Gen (Either a (LedgerState era)) Source #

Generate initial state for the LEDGER STS using the STS environment.

Note: this function must be usable in place of applySTS and needs to align with the signature 'RuleContext sts -> Gen (Either [[PredicateFailure sts]] (State sts))'. To achieve this we (1) use 'IRC LEDGER' (the "initial rule context") instead of simply LedgerEnv and (2) always return Right (since this function does not raise predicate failures).

Orphan instances

(EraGen era, EraGov era, EraUTxO era, Mock (EraCrypto era), MinLEDGER_STS era, Embed (EraRule "DELPL" era) (CERTS era), Environment (EraRule "DELPL" era) ~ DelplEnv era, State (EraRule "DELPL" era) ~ CertState era, Signal (EraRule "DELPL" era) ~ TxCert era, PredicateFailure (EraRule "DELPL" era) ~ ShelleyDelplPredFailure era, Embed (EraRule "DELEGS" era) (ShelleyLEDGER era), Embed (EraRule "UTXOW" era) (ShelleyLEDGER era), Environment (EraRule "UTXOW" era) ~ UtxoEnv era, State (EraRule "UTXOW" era) ~ UTxOState era, Signal (EraRule "UTXOW" era) ~ Tx era, Environment (EraRule "DELEGS" era) ~ DelegsEnv era, State (EraRule "DELEGS" era) ~ CertState era, Signal (EraRule "DELEGS" era) ~ Seq (TxCert era), ProtVerAtMost era 8) ⇒ HasTrace (ShelleyLEDGER era) (GenEnv era) Source # 
Instance details

Associated Types

type BaseEnv (ShelleyLEDGER era) Source #

(EraGen era, EraGov era, EraUTxO era, Mock (EraCrypto era), MinLEDGER_STS era, Embed (EraRule "DELPL" era) (CERTS era), Environment (EraRule "DELPL" era) ~ DelplEnv era, State (EraRule "DELPL" era) ~ CertState era, Signal (EraRule "DELPL" era) ~ TxCert era, PredicateFailure (EraRule "DELPL" era) ~ ShelleyDelplPredFailure era, Embed (EraRule "DELEG" era) (ShelleyDELPL era), Embed (EraRule "LEDGER" era) (ShelleyLEDGERS era), ProtVerAtMost era 8) ⇒ HasTrace (ShelleyLEDGERS era) (GenEnv era) Source # 
Instance details

Associated Types

type BaseEnv (ShelleyLEDGERS era) Source #