cardano-ledger-shelley-ma-test-1.3.0.0: Shelley ledger with multiasset and time lock support.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Test.Cardano.Ledger.AllegraEraGen

Synopsis

Documentation

someLeaf ∷ ∀ era. (AllegraEraScript era, NativeScript era ~ Timelock era) ⇒ KeyHash 'WitnessNativeScript era Source #

Generate some Leaf Timelock (i.e. a Signature or TimeStart or TimeExpire).

Because we don't know how these "leaf scripts" will be situated in larger scripts (e.g. the script generated here might form part of a RequireAll or RequireMOf script) we must make sure that all timelocks generated here are valid for all slots.

To achieve this we arrange the timelock scripts like so: RequireAnyOf [ RequireAllOf [RequireTimeExpire k, RequireSignature x], RequireAllOf [RequireTimeStart k, RequireSignature x] ] where k is arbitrary. This means that regardless of slot, there will be a valid sub-branch of script.

genValidityIntervalSlotNoGen ValidityInterval Source #

Generates a trivial validity interval that is valid for the current slot.

Note: the validity interval must be a subset of all timelock script intervals that apply to the transaction. This depends on which generated scripts are actually required to validate the transaction (which is itself not always deterministic, e.g. 'RequireMOf n scripts').

A more sophisticated generator would compute which set of scripts would validate the transaction, and from that compute a minimal ValidityInterval that fits into all timelock slot ranges.

Orphan instances

EraGen AllegraEra Source # 
Instance details

Methods

genGenesisValueGenEnv AllegraEraGen (Value AllegraEra) Source #

genEraTwoPhase3Arg ∷ [TwoPhase3ArgInfo AllegraEra] Source #

genEraTwoPhase2Arg ∷ [TwoPhase2ArgInfo AllegraEra] Source #

genEraTxBodyGenEnv AllegraEraUTxO AllegraEraPParams AllegraEraSlotNoSet TxInStrictSeq (TxOut AllegraEra) → StrictSeq (TxCert AllegraEra) → WithdrawalsCoinStrictMaybe (Update AllegraEra) → StrictMaybe TxAuxDataHashGen (TxBody AllegraEra, [Script AllegraEra]) Source #

genEraAuxiliaryDataConstantsGen (StrictMaybe (TxAuxData AllegraEra)) Source #

updateEraTxBodyUTxO AllegraEraPParams AllegraEraTxWits AllegraEraTxBody AllegraEraCoinSet TxInTxOut AllegraEraTxBody AllegraEra Source #

addInputsTxBody AllegraEraSet TxInTxBody AllegraEra Source #

genEraPParamsUpdateConstantsPParams AllegraEraGen (PParamsUpdate AllegraEra) Source #

genEraPParamsConstantsGen (PParams AllegraEra) Source #

genEraTxWits ∷ (UTxO AllegraEra, TxBody AllegraEra, ScriptInfo AllegraEra) → Set (WitVKey 'Witness) → Map ScriptHash (Script AllegraEra) → TxWits AllegraEra Source #

genEraGoodTxOutTxOut AllegraEraBool Source #

constructTxTxBody AllegraEraTxWits AllegraEraStrictMaybe (TxAuxData AllegraEra) → Tx AllegraEra Source #

genEraScriptCostPParams AllegraEraScript AllegraEraCoin Source #

genEraDoneUTxO AllegraEraPParams AllegraEraTx AllegraEraGen (Tx AllegraEra) Source #

genEraTweakBlockPParams AllegraEraSeq (Tx AllegraEra) → Gen (Seq (Tx AllegraEra)) Source #

hasFailedScriptsTx AllegraEraBool Source #

feeOrCollateralTx AllegraEraUTxO AllegraEraCoin Source #

MinGenTxout AllegraEra Source # 
Instance details

ScriptClass AllegraEra Source # 
Instance details