Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
AlonzoEra instances for EraGen and ScriptClass
Synopsis
- vKeyLockedAdaOnly ∷ TxOut AlonzoEra → Bool
- phase2scripts3Arg ∷ ∀ era. AlonzoEraScript era ⇒ [TwoPhase3ArgInfo era]
- phase2scripts2Arg ∷ ∀ era. AlonzoEraScript era ⇒ [TwoPhase2ArgInfo era]
- phase2scripts3ArgSucceeds ∷ ∀ era. AlonzoEraScript era ⇒ Script era → Bool
- phase2scripts2ArgSucceeds ∷ ∀ era. AlonzoEraScript era ⇒ Script era → Bool
- genPlutus2Arg ∷ AlonzoEraScript era ⇒ Gen (Maybe (TwoPhase2ArgInfo era))
- genAlonzoMint ∷ MultiAsset → Gen (MultiAsset, [AlonzoScript AlonzoEra])
- genPair ∷ Gen a → Gen b → Gen (a, b)
- genPlutusData ∷ Gen Data
- genSet ∷ Ord a ⇒ Gen a → Gen (Set a)
- genAux ∷ Constants → Gen (StrictMaybe (AlonzoTxAuxData AlonzoEra))
- unTime ∷ AlonzoScript era → Timelock era
- okAsCollateral ∷ UTxO AlonzoEra → TxIn → Bool
- genAlonzoTxBody ∷ GenEnv AlonzoEra → UTxO AlonzoEra → PParams AlonzoEra → SlotNo → Set TxIn → StrictSeq (TxOut AlonzoEra) → StrictSeq (TxCert AlonzoEra) → Withdrawals → Coin → StrictMaybe (Update AlonzoEra) → StrictMaybe TxAuxDataHash → Gen (TxBody AlonzoEra, [Script AlonzoEra])
- genSlotAfter ∷ SlotNo → Gen SlotNo
- genAlonzoPParamsUpdate ∷ Constants → PParams AlonzoEra → Gen (PParamsUpdate AlonzoEra)
- genAlonzoPParams ∷ Constants → Gen (PParams AlonzoEra)
- bigMem ∷ Natural
- bigStep ∷ Natural
- genMaxTxExUnits ∷ Gen ExUnits
- genMaxBlockExUnits ∷ Gen ExUnits
- sumCollateral ∷ (EraTx era, AlonzoEraTxBody era) ⇒ Tx era → UTxO era → Coin
- storageCost ∷ ∀ era t. (EraPParams era, EncCBOR t) ⇒ Integer → PParams era → t → Coin
- addRedeemMap ∷ (Data, Natural, Natural) → AlonzoPlutusPurpose AsIxItem AlonzoEra → Map (AlonzoPlutusPurpose AsIx AlonzoEra) (Data AlonzoEra, ExUnits) → Map (AlonzoPlutusPurpose AsIx AlonzoEra) (Data AlonzoEra, ExUnits)
- getDataMap ∷ ∀ era. Era era ⇒ ScriptInfo era → Map ScriptHash (Script era) → Map DataHash (Data era)
- dataFromAddr ∷ Addr → StrictMaybe DataHash
- dataMapFromTxOut ∷ [TxOut AlonzoEra] → TxDats AlonzoEra → TxDats AlonzoEra
- addMaybeDataHashToTxOut ∷ TxOut AlonzoEra → TxOut AlonzoEra
- someLeaf ∷ ∀ era. (AllegraEraScript era, NativeScript era ~ Timelock era) ⇒ Proxy era → KeyHash 'Witness → AlonzoScript era
- langsUsed ∷ AlonzoEraScript era ⇒ Map ScriptHash (Script era) → Set Language
Documentation
vKeyLockedAdaOnly ∷ TxOut AlonzoEra → Bool Source #
We are choosing new TxOut to pay fees, We want only Key locked addresss with Ada only values.
phase2scripts3Arg ∷ ∀ era. AlonzoEraScript era ⇒ [TwoPhase3ArgInfo era] Source #
phase2scripts2Arg ∷ ∀ era. AlonzoEraScript era ⇒ [TwoPhase2ArgInfo era] Source #
phase2scripts3ArgSucceeds ∷ ∀ era. AlonzoEraScript era ⇒ Script era → Bool Source #
phase2scripts2ArgSucceeds ∷ ∀ era. AlonzoEraScript era ⇒ Script era → Bool Source #
genPlutus2Arg ∷ AlonzoEraScript era ⇒ Gen (Maybe (TwoPhase2ArgInfo era)) Source #
genAlonzoMint ∷ MultiAsset → Gen (MultiAsset, [AlonzoScript AlonzoEra]) Source #
Gen a Mint value in the Alonzo Era, with a 10% chance that it includes an AlonzoScript
genAux ∷ Constants → Gen (StrictMaybe (AlonzoTxAuxData AlonzoEra)) Source #
unTime ∷ AlonzoScript era → Timelock era Source #
genAlonzoTxBody ∷ GenEnv AlonzoEra → UTxO AlonzoEra → PParams AlonzoEra → SlotNo → Set TxIn → StrictSeq (TxOut AlonzoEra) → StrictSeq (TxCert AlonzoEra) → Withdrawals → Coin → StrictMaybe (Update AlonzoEra) → StrictMaybe TxAuxDataHash → Gen (TxBody AlonzoEra, [Script AlonzoEra]) Source #
genAlonzoPParamsUpdate ∷ Constants → PParams AlonzoEra → Gen (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) ⇒ Integer → PParams era → t → Coin Source #
addRedeemMap ∷ (Data, Natural, Natural) → AlonzoPlutusPurpose AsIxItem AlonzoEra → Map (AlonzoPlutusPurpose AsIx AlonzoEra) (Data AlonzoEra, ExUnits) → Map (AlonzoPlutusPurpose AsIx AlonzoEra) (Data AlonzoEra, ExUnits) Source #
getDataMap ∷ ∀ era. Era era ⇒ ScriptInfo era → Map ScriptHash (Script era) → Map DataHash (Data era) Source #
dataFromAddr ∷ Addr → StrictMaybe 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 AlonzoEra → TxDats 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 'Witness → AlonzoScript era Source #
langsUsed ∷ AlonzoEraScript era ⇒ Map ScriptHash (Script era) → Set Language Source #
given the "txscripts" field of the TxWits, compute the set of languages used in a transaction