cardano-ledger-alonzo-test-1.3.1.0: Tests for Cardano ledger introducing Plutus Core
Safe HaskellSafe-Inferred
LanguageHaskell2010

Test.Cardano.Ledger.Alonzo.AlonzoEraGen

Description

AlonzoEra instances for EraGen and ScriptClass

Synopsis

Documentation

vKeyLockedAdaOnlyTxOut AlonzoEraBool Source #

We are choosing new TxOut to pay fees, We want only Key locked addresss with Ada only values.

genAlonzoMintMultiAssetGen (MultiAsset, [AlonzoScript AlonzoEra]) Source #

Gen a Mint value in the Alonzo Era, with a 10% chance that it includes an AlonzoScript

genPairGen a → Gen b → Gen (a, b) Source #

genSetOrd a ⇒ Gen a → Gen (Set a) Source #

genAlonzoPParamsUpdateConstantsPParams AlonzoEraGen (PParamsUpdate AlonzoEra) Source #

Gen an Alonzo PParamsUpdate, by adding to a Shelley PParamsData

sumCollateral ∷ (EraTx era, AlonzoEraTxBody era) ⇒ Tx era → UTxO era → Coin Source #

storageCost ∷ ∀ era t. (EraPParams era, EncCBOR t) ⇒ IntegerPParams era → t → Coin Source #

getDataMap ∷ ∀ era. Era era ⇒ ScriptInfo era → Map ScriptHash (Script era) → Map DataHash (Data era) Source #

dataFromAddrAddrStrictMaybe DataHash Source #

If an Address is script address, we can find a potential data hash for it from genEraTwoPhase3Arg, which contains all known 3 arg plutus scripts in the tests set. If the script has is not in that map, then its data hash is SNothing.

dataMapFromTxOut ∷ [TxOut AlonzoEra] → TxDats AlonzoEraTxDats AlonzoEra Source #

We can find the data associated with the data hashes in the TxOuts, since genEraTwoPhase3Arg, which contains all known 3 arg plutus scripts stores the data.

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

langsUsedAlonzoEraScript era ⇒ Map ScriptHash (Script era) → Set Language Source #

given the "txscripts" field of the TxWits, compute the set of languages used in a transaction

Orphan instances

EraGen AlonzoEra Source # 
Instance details

Methods

genGenesisValueGenEnv AlonzoEraGen (Value AlonzoEra) Source #

genEraTwoPhase3Arg ∷ [TwoPhase3ArgInfo AlonzoEra] Source #

genEraTwoPhase2Arg ∷ [TwoPhase2ArgInfo AlonzoEra] Source #

genEraTxBodyGenEnv AlonzoEraUTxO AlonzoEraPParams AlonzoEraSlotNoSet TxInStrictSeq (TxOut AlonzoEra) → StrictSeq (TxCert AlonzoEra) → WithdrawalsCoinStrictMaybe (Update AlonzoEra) → StrictMaybe TxAuxDataHashGen (TxBody AlonzoEra, [Script AlonzoEra]) Source #

genEraAuxiliaryDataConstantsGen (StrictMaybe (TxAuxData AlonzoEra)) Source #

updateEraTxBodyUTxO AlonzoEraPParams AlonzoEraTxWits AlonzoEraTxBody AlonzoEraCoinSet TxInTxOut AlonzoEraTxBody AlonzoEra Source #

addInputsTxBody AlonzoEraSet TxInTxBody AlonzoEra Source #

genEraPParamsUpdateConstantsPParams AlonzoEraGen (PParamsUpdate AlonzoEra) Source #

genEraPParamsConstantsGen (PParams AlonzoEra) Source #

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

genEraGoodTxOutTxOut AlonzoEraBool Source #

constructTxTxBody AlonzoEraTxWits AlonzoEraStrictMaybe (TxAuxData AlonzoEra) → Tx AlonzoEra Source #

genEraScriptCostPParams AlonzoEraScript AlonzoEraCoin Source #

genEraDoneUTxO AlonzoEraPParams AlonzoEraTx AlonzoEraGen (Tx AlonzoEra) Source #

genEraTweakBlockPParams AlonzoEraSeq (Tx AlonzoEra) → Gen (Seq (Tx AlonzoEra)) Source #

hasFailedScriptsTx AlonzoEraBool Source #

feeOrCollateralTx AlonzoEraUTxO AlonzoEraCoin Source #

MinGenTxout AlonzoEra Source # 
Instance details

ScriptClass AlonzoEra Source # 
Instance details