Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- genAccountState ∷ Constants → Gen AccountState
- mkGenesisLedgerState ∷ ∀ a era ledger. (EraGen era, EraGov era) ⇒ GenEnv era → IRC ledger → Gen (Either a (LedgerState era))
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).