Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data MockChainError where
- MCEValidationError :: ValidationErrorInPhase -> MockChainError
- MCEUnbalanceable :: MCEUnbalanceableError -> TxSkel -> MockChainError
- MCENoSuitableCollateral :: MockChainError
- MCEGenerationError :: GenerateTxError -> MockChainError
- MCECalcFee :: MockChainError -> MockChainError
- MCEUnknownOutRefError :: String -> TxOutRef -> MockChainError
- MCEUnknownValidator :: String -> ValidatorHash -> MockChainError
- MCEUnknownDatum :: String -> DatumHash -> MockChainError
- FailWith :: String -> MockChainError
- OtherMockChainError :: (Show err, Eq err) => err -> MockChainError
- data MCEUnbalanceableError
- = MCEUnbalNotEnoughFunds Wallet Value
- | MCEUnbalNotEnoughReturning (Value, [TxOutRef]) (Value, [TxOutRef]) Value
- class (MonadFail m, MonadError MockChainError m) => MonadBlockChainBalancing m where
- getParams :: m Params
- utxosAtLedger :: Address -> m [(TxOutRef, TxOut)]
- datumFromHash :: DatumHash -> m (Maybe Datum)
- validatorFromHash :: ValidatorHash -> m (Maybe (Versioned Validator))
- txOutByRefLedger :: TxOutRef -> m (Maybe TxOut)
- class MonadBlockChainBalancing m => MonadBlockChainWithoutValidation m where
- allUtxosLedger :: m [(TxOutRef, TxOut)]
- currentSlot :: m Slot
- awaitSlot :: Slot -> m Slot
- class MonadBlockChainWithoutValidation m => MonadBlockChain m where
- validateTxSkel :: TxSkel -> m CardanoTx
- newtype AsTrans t (m :: Type -> Type) a = AsTrans {
- getTrans :: t m a
- allUtxos :: MonadBlockChainWithoutValidation m => m [(TxOutRef, TxOut)]
- currentTime :: MonadBlockChainWithoutValidation m => m (POSIXTime, POSIXTime)
- waitNSlots :: MonadBlockChainWithoutValidation m => Integer -> m Slot
- utxosAt :: MonadBlockChainBalancing m => Address -> m [(TxOutRef, TxOut)]
- txOutByRef :: MonadBlockChainBalancing m => TxOutRef -> m (Maybe TxOut)
- utxosFromCardanoTx :: CardanoTx -> [(TxOutRef, TxOut)]
- txOutV2FromLedger :: TxOut -> TxOut
- typedDatumFromTxOutRef :: (FromData a, MonadBlockChainWithoutValidation m) => TxOutRef -> m (Maybe a)
- valueFromTxOutRef :: MonadBlockChainWithoutValidation m => TxOutRef -> m (Maybe Value)
- outputDatumFromTxOutRef :: MonadBlockChainWithoutValidation m => TxOutRef -> m (Maybe OutputDatum)
- datumFromTxOutRef :: MonadBlockChainWithoutValidation m => TxOutRef -> m (Maybe Datum)
- resolveDatum :: (IsAbstractOutput out, ToOutputDatum (DatumType out), MonadBlockChainBalancing m) => out -> m (Maybe (ConcreteOutput (OwnerType out) Datum (ValueType out) (ReferenceScriptType out)))
- resolveTypedDatum :: (IsAbstractOutput out, ToOutputDatum (DatumType out), MonadBlockChainBalancing m, FromData a) => out -> m (Maybe (ConcreteOutput (OwnerType out) a (ValueType out) (ReferenceScriptType out)))
- resolveValidator :: (IsAbstractOutput out, ToCredential (OwnerType out), MonadBlockChainBalancing m) => out -> m (Maybe (ConcreteOutput (Versioned Validator) (DatumType out) (ValueType out) (ReferenceScriptType out)))
- resolveReferenceScript :: (IsAbstractOutput out, ToScriptHash (ReferenceScriptType out), MonadBlockChainBalancing m) => out -> m (Maybe (ConcreteOutput (OwnerType out) (DatumType out) (ValueType out) (Versioned Validator)))
- getEnclosingSlot :: MonadBlockChainWithoutValidation m => POSIXTime -> m Slot
- awaitEnclosingSlot :: MonadBlockChainWithoutValidation m => POSIXTime -> m Slot
- slotRangeBefore :: MonadBlockChainWithoutValidation m => POSIXTime -> m SlotRange
- slotRangeAfter :: MonadBlockChainWithoutValidation m => POSIXTime -> m SlotRange
- slotToTimeInterval :: MonadBlockChainWithoutValidation m => Slot -> m (POSIXTime, POSIXTime)
Documentation
data MockChainError where Source #
The errors that can be produced by the MockChainT
monad
MCEValidationError :: ValidationErrorInPhase -> MockChainError | |
MCEUnbalanceable :: MCEUnbalanceableError -> TxSkel -> MockChainError | |
MCENoSuitableCollateral :: MockChainError | Thrown when the balancing wallet owns no output that is pure Ada and with no datum. |
MCEGenerationError :: GenerateTxError -> MockChainError | |
MCECalcFee :: MockChainError -> MockChainError | Errors happening at fee calculation time. |
MCEUnknownOutRefError :: String -> TxOutRef -> MockChainError | Thrown when an output reference should be in the state of the mockchain, - but isn't. |
MCEUnknownValidator :: String -> ValidatorHash -> MockChainError | Same as |
MCEUnknownDatum :: String -> DatumHash -> MockChainError | Same as |
FailWith :: String -> MockChainError | Used to provide |
OtherMockChainError :: (Show err, Eq err) => err -> MockChainError |
Instances
data MCEUnbalanceableError Source #
MCEUnbalNotEnoughFunds Wallet Value | The balancing wallet misses some value to pay what is needed to balance + but isn't. |
MCEUnknownValidator :: String -> ValidatorHash -> MockChainError | Same as |
MCEUnknownDatum :: String -> DatumHash -> MockChainError | Same as |
FailWith :: String -> MockChainError | Used to provide |
OtherMockChainError :: (Show err, Eq err) => err -> MockChainError |
Instances
data MCEUnbalanceableError Source #
MCEUnbalNotEnoughFunds Wallet Value | The balancing wallet misses some value to pay what is needed to balance the transaction. |
MCEUnbalNotEnoughReturning (Value, [TxOutRef]) (Value, [TxOutRef]) Value | There is value to return to the balancing wallet but not enough to fullfill the min ada requirement and there is not enough in additional inputs to make it possible. |
Instances
Show MCEUnbalanceableError Source # | |
Defined in Cooked.MockChain.BlockChain showsPrec :: Int -> MCEUnbalanceableError -> ShowS # show :: MCEUnbalanceableError -> String # showList :: [MCEUnbalanceableError] -> ShowS # |
class (MonadFail m, MonadError MockChainError m) => MonadBlockChainBalancing m where Source #
Contains methods needed for balancing.
getParams :: m Params Source #
Returns the parameters of the chain.
utxosAtLedger :: Address -> m [(TxOutRef, TxOut)] Source #
Returns a list of all UTxOs at a certain address.
datumFromHash :: DatumHash -> m (Maybe Datum) Source #
Returns the datum with the given hash or Nothing
if there is none
validatorFromHash :: ValidatorHash -> m (Maybe (Versioned Validator)) Source #
Returns the full validator corresponding to hash, if that validator owns - something or if it is stored in the reference script field of some UTxO.
txOutByRefLedger :: TxOutRef -> m (Maybe TxOut) Source #
Returns an output given a reference to it
Instances
class MonadBlockChainBalancing m => MonadBlockChainWithoutValidation m where Source #
allUtxosLedger :: m [(TxOutRef, TxOut)] Source #
Returns a list of all currently known outputs.
currentSlot :: m Slot Source #
Returns the current slot number
awaitSlot :: Slot -> m Slot Source #
Waits until the current slot becomes greater or equal to the given slot, + something or if it is stored in the reference script field of some UTxO.
txOutByRefLedger :: TxOutRef -> m (Maybe TxOut) Source #
Returns an output given a reference to it
Instances
class MonadBlockChainBalancing m => MonadBlockChainWithoutValidation m where Source #
allUtxosLedger :: m [(TxOutRef, TxOut)] Source #
Returns a list of all currently known outputs.
currentSlot :: m Slot Source #
Returns the current slot number
awaitSlot :: Slot -> m Slot Source #
Waits until the current slot becomes greater or equal to the given slot, and returns the current slot after waiting.
Note that it might not wait for anything if the current slot is large - enough.
Instances
class MonadBlockChainWithoutValidation m => MonadBlockChain m where Source #
The main abstraction of the blockchain.
validateTxSkel :: TxSkel -> m CardanoTx Source #
Generates, balances and validates a transaction from a skeleton. + enough.
Instances
class MonadBlockChainWithoutValidation m => MonadBlockChain m where Source #
The main abstraction of the blockchain.
validateTxSkel :: TxSkel -> m CardanoTx Source #
Generates, balances and validates a transaction from a skeleton.
It returns the validated transaction and updates the state of the
blockchain. In MockChainT
, this means:
- deletes the consumed outputs from mcstIndex
- adds the produced outputs to msctIndex
- deletes the consumed datums from mcstDatums
- adds the produced datums to mcstDatums
- - adds the validators on outputs to the mcstValidators
.
Instances
newtype AsTrans t (m :: Type -> Type) a Source #
A newtype wrapper to be used with '-XDerivingVia' to derive instances of MonadBlockChain
+ - adds the validators on outputs to the mcstValidators
.
Instances
newtype AsTrans t (m :: Type -> Type) a Source #
A newtype wrapper to be used with '-XDerivingVia' to derive instances of MonadBlockChain
for any MonadTransControl
.
For example, to derive 'MonadBlockChain m => MonadBlockChain (ReaderT r m)', you'd write
deriving via (AsTrans (ReaderT r) m) instance MonadBlockChain m => MonadBlockChain (ReaderT r m)
and avoid the boilerplate of defining all the methods of the class yourself.
Instances
allUtxos :: MonadBlockChainWithoutValidation m => m [(TxOutRef, TxOut)] Source #
currentTime :: MonadBlockChainWithoutValidation m => m (POSIXTime, POSIXTime) Source #
Returns the closed ms interval corresponding to the current slot
waitNSlots :: MonadBlockChainWithoutValidation m => Integer -> m Slot Source #
Moves n slots fowards
utxosAt :: MonadBlockChainBalancing m => Address -> m [(TxOutRef, TxOut)] Source #
txOutByRef :: MonadBlockChainBalancing m => TxOutRef -> m (Maybe TxOut) Source #
utxosFromCardanoTx :: CardanoTx -> [(TxOutRef, TxOut)] Source #
txOutV2FromLedger :: TxOut -> TxOut Source #
typedDatumFromTxOutRef :: (FromData a, MonadBlockChainWithoutValidation m) => TxOutRef -> m (Maybe a) Source #
valueFromTxOutRef :: MonadBlockChainWithoutValidation m => TxOutRef -> m (Maybe Value) Source #
outputDatumFromTxOutRef :: MonadBlockChainWithoutValidation m => TxOutRef -> m (Maybe OutputDatum) Source #
datumFromTxOutRef :: MonadBlockChainWithoutValidation m => TxOutRef -> m (Maybe Datum) Source #
resolveDatum :: (IsAbstractOutput out, ToOutputDatum (DatumType out), MonadBlockChainBalancing m) => out -> m (Maybe (ConcreteOutput (OwnerType out) Datum (ValueType out) (ReferenceScriptType out))) Source #
Try to resolve the datum on the output: If there's an inline datum, take
diff --git a/Cooked-MockChain-Direct.html b/Cooked-MockChain-Direct.html
index 5e8ae1b1f..633d2436c 100644
--- a/Cooked-MockChain-Direct.html
+++ b/Cooked-MockChain-Direct.html
@@ -2,7 +2,7 @@
simple way to call validator scripts directly, without the need for all the
complexity the Contract
monad introduces.
Running a MockChain
produces a UtxoState
, a simplified view on
UtxoIndex
, which we also keep in our state.
data MockChainSt Source #
Slightly more concrete version of UtxoState
, used to actually run the
- simulation.
MockChainSt | |
|
Instances
Eq MockChainSt Source # | |
Defined in Cooked.MockChain.Direct (==) :: MockChainSt -> MockChainSt -> Bool # (/=) :: MockChainSt -> MockChainSt -> Bool # | |
Show MockChainSt Source # | |
Defined in Cooked.MockChain.Direct showsPrec :: Int -> MockChainSt -> ShowS # show :: MockChainSt -> String # showList :: [MockChainSt] -> ShowS # | |
Default MockChainSt Source # | |
Defined in Cooked.MockChain.Direct def :: MockChainSt | |
Monad m => MonadState MockChainSt (MockChainT m) Source # | |
Defined in Cooked.MockChain.Direct get :: MockChainT m MockChainSt # put :: MockChainSt -> MockChainT m () # state :: (MockChainSt -> (a, MockChainSt)) -> MockChainT m a # |
newtype MockChainEnv Source #
MockChainEnv | |
|
Instances
Show MockChainEnv Source # | |
Defined in Cooked.MockChain.Direct showsPrec :: Int -> MockChainEnv -> ShowS # show :: MockChainEnv -> String # showList :: [MockChainEnv] -> ShowS # | |
Default MockChainEnv Source # | |
Defined in Cooked.MockChain.Direct def :: MockChainEnv | |
Monad m => MonadReader MockChainEnv (MockChainT m) Source # | |
Defined in Cooked.MockChain.Direct ask :: MockChainT m MockChainEnv # local :: (MockChainEnv -> MockChainEnv) -> MockChainT m a -> MockChainT m a # reader :: (MockChainEnv -> a) -> MockChainT m a # |
newtype MockChainT m a Source #
Instances
type MockChain = MockChainT Identity Source #
combineMockChainT :: Monad m => (forall a. m a -> m a -> m a) -> MockChainT m x -> MockChainT m x -> MockChainT m x Source #
mapMockChainT :: (m (Either MockChainError (a, MockChainSt)) -> n (Either MockChainError (b, MockChainSt))) -> MockChainT m a -> MockChainT n b Source #
runMockChainTRaw :: Monad m => MockChainEnv -> MockChainSt -> MockChainT m a -> m (Either MockChainError (a, MockChainSt)) Source #
Executes a MockChainT
from some initial state and environment; does not
+ simulation.
MockChainSt | |
|
Instances
Eq MockChainSt Source # | |
Defined in Cooked.MockChain.Direct (==) :: MockChainSt -> MockChainSt -> Bool # (/=) :: MockChainSt -> MockChainSt -> Bool # | |
Show MockChainSt Source # | |
Defined in Cooked.MockChain.Direct showsPrec :: Int -> MockChainSt -> ShowS # show :: MockChainSt -> String # showList :: [MockChainSt] -> ShowS # | |
Default MockChainSt Source # | |
Defined in Cooked.MockChain.Direct def :: MockChainSt | |
Monad m => MonadState MockChainSt (MockChainT m) Source # | |
Defined in Cooked.MockChain.Direct get :: MockChainT m MockChainSt # put :: MockChainSt -> MockChainT m () # state :: (MockChainSt -> (a, MockChainSt)) -> MockChainT m a # |
newtype MockChainEnv Source #
MockChainEnv | |
|
Instances
Show MockChainEnv Source # | |
Defined in Cooked.MockChain.Direct showsPrec :: Int -> MockChainEnv -> ShowS # show :: MockChainEnv -> String # showList :: [MockChainEnv] -> ShowS # | |
Default MockChainEnv Source # | |
Defined in Cooked.MockChain.Direct def :: MockChainEnv | |
Monad m => MonadReader MockChainEnv (MockChainT m) Source # | |
Defined in Cooked.MockChain.Direct ask :: MockChainT m MockChainEnv # local :: (MockChainEnv -> MockChainEnv) -> MockChainT m a -> MockChainT m a # reader :: (MockChainEnv -> a) -> MockChainT m a # |
newtype MockChainT m a Source #
Instances
type MockChain = MockChainT Identity Source #
combineMockChainT :: Monad m => (forall a. m a -> m a -> m a) -> MockChainT m x -> MockChainT m x -> MockChainT m x Source #
mapMockChainT :: (m (Either MockChainError (a, MockChainSt)) -> n (Either MockChainError (b, MockChainSt))) -> MockChainT m a -> MockChainT n b Source #
runMockChainTRaw :: Monad m => MockChainEnv -> MockChainSt -> MockChainT m a -> m (Either MockChainError (a, MockChainSt)) Source #
Executes a MockChainT
from some initial state and environment; does not
convert the MockChainSt
into a UtxoState
.
runMockChainTFrom :: Monad m => InitialDistribution -> MockChainT m a -> m (Either MockChainError (a, UtxoState)) Source #
Executes a MockChainT
from an initial state set up with the given
initial value distribution. Similar to runMockChainT
, uses the default
environment. Returns a UtxoState
instead of a MockChainSt
. If you need
diff --git a/Cooked-MockChain-Staged.html b/Cooked-MockChain-Staged.html
index 569d37dca..3f361e3db 100644
--- a/Cooked-MockChain-Staged.html
+++ b/Cooked-MockChain-Staged.html
@@ -1,8 +1,8 @@
-
Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- interpretAndRunWith :: (forall m. Monad m => MockChainT m a -> m res) -> StagedMockChain a -> [(res, MockChainLog)]
- interpretAndRun :: StagedMockChain a -> [(Either MockChainError (a, UtxoState), MockChainLog)]
- data MockChainLogEntry
- newtype MockChainLog = MockChainLog {}
- type StagedMockChain = Staged MockChainOp
- runTweakFrom :: MockChainEnv -> MockChainSt -> Tweak InterpMockChain a -> TxSkel -> [Either MockChainError (a, TxSkel)]
- type MonadModalBlockChain m = (MonadBlockChain m, MonadModal m, Modification m ~ UntypedTweak InterpMockChain)
- somewhere :: MonadModalBlockChain m => Tweak InterpMockChain b -> m a -> m a
- runTweak :: Tweak InterpMockChain a -> TxSkel -> [Either MockChainError (a, TxSkel)]
- everywhere :: MonadModalBlockChain m => Tweak InterpMockChain b -> m a -> m a
- withTweak :: MonadModalBlockChain m => m x -> Tweak InterpMockChain a -> m x
Documentation
interpretAndRunWith :: (forall m. Monad m => MockChainT m a -> m res) -> StagedMockChain a -> [(res, MockChainLog)] Source #
Interprets the staged mockchain then runs the resulting computation with a +
Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- interpretAndRunWith :: (forall m. Monad m => MockChainT m a -> m res) -> StagedMockChain a -> [(res, MockChainLog)]
- interpretAndRun :: StagedMockChain a -> [(Either MockChainError (a, UtxoState), MockChainLog)]
- data MockChainLogEntry
- newtype MockChainLog = MockChainLog {}
- type StagedMockChain = Staged MockChainOp
- runTweakFrom :: MockChainEnv -> MockChainSt -> Tweak InterpMockChain a -> TxSkel -> [Either MockChainError (a, TxSkel)]
- type MonadModalBlockChain m = (MonadBlockChain m, MonadModal m, Modification m ~ UntypedTweak InterpMockChain)
- somewhere :: MonadModalBlockChain m => Tweak InterpMockChain b -> m a -> m a
- runTweak :: Tweak InterpMockChain a -> TxSkel -> [Either MockChainError (a, TxSkel)]
- everywhere :: MonadModalBlockChain m => Tweak InterpMockChain b -> m a -> m a
- withTweak :: MonadModalBlockChain m => m x -> Tweak InterpMockChain a -> m x
- there :: MonadModalBlockChain m => Integer -> Tweak InterpMockChain b -> m a -> m a
Documentation
interpretAndRunWith :: (forall m. Monad m => MockChainT m a -> m res) -> StagedMockChain a -> [(res, MockChainLog)] Source #
Interprets the staged mockchain then runs the resulting computation with a
custom function. This can be used, for example, to supply a custom
- InitialDistribution
by providing runMockChainTFrom
.
interpretAndRun :: StagedMockChain a -> [(Either MockChainError (a, UtxoState), MockChainLog)] Source #
data MockChainLogEntry Source #
newtype MockChainLog Source #
Instances
type StagedMockChain = Staged MockChainOp Source #
runTweakFrom :: MockChainEnv -> MockChainSt -> Tweak InterpMockChain a -> TxSkel -> [Either MockChainError (a, TxSkel)] Source #
type MonadModalBlockChain m = (MonadBlockChain m, MonadModal m, Modification m ~ UntypedTweak InterpMockChain) Source #
A modal mock chain is a mock chain that allows us to use LTL modifications
with Tweak
s
somewhere :: MonadModalBlockChain m => Tweak InterpMockChain b -> m a -> m a Source #
Apply a Tweak
to some transaction in the given Trace. The tweak must
apply at least once.
everywhere :: MonadModalBlockChain m => Tweak InterpMockChain b -> m a -> m a Source #
Apply a Tweak
to every transaction in a given trace. This is also
successful if there are no transactions at all.
withTweak :: MonadModalBlockChain m => m x -> Tweak InterpMockChain a -> m x Source #
Apply a Tweak
to the next transaction in the given trace. The order of
@@ -11,4 +11,5 @@
endpoint arguments `withTweak` someModification
...
where endpoint
builds and validates a single transaction depending on the
given arguments
. Then withTweak
says "I want to modify the transaction
- returned by this endpoint in the following way".
Orphan instances
MonadPlus m => MonadPlus (MockChainT m) Source # | |
mzero :: MockChainT m a # mplus :: MockChainT m a -> MockChainT m a -> MockChainT m a # |
there :: MonadModalBlockChain m => Integer -> Tweak InterpMockChain b -> m a -> m a Source #
Apply a Tweak
to the nth transaction in a given trace, 0 indexed.
+ Only successful when this transaction exists and can be modified.
Orphan instances
MonadPlus m => MonadPlus (MockChainT m) Source # | |
mzero :: MockChainT m a # mplus :: MockChainT m a -> MockChainT m a -> MockChainT m a # |
Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- utxoPayloadReferenceScript :: UtxoPayload -> Maybe ScriptHash
- utxoPayloadSkelOutDatum :: UtxoPayload -> TxSkelOutDatum
- utxoPayloadTxOutRef :: UtxoPayload -> TxOutRef
- utxoPayloadValue :: UtxoPayload -> Value
- utxoPayloadSet :: UtxoPayloadSet -> [UtxoPayload]
- data UtxoState
- holdsInState :: Address -> UtxoState -> Value
- newtype AsTrans t (m :: Type -> Type) a = AsTrans {
- getTrans :: t m a
- class MonadBlockChainWithoutValidation m => MonadBlockChain m where
- validateTxSkel :: TxSkel -> m CardanoTx
- class MonadBlockChainBalancing m => MonadBlockChainWithoutValidation m where
- allUtxosLedger :: m [(TxOutRef, TxOut)]
- currentSlot :: m Slot
- awaitSlot :: Slot -> m Slot
- class (MonadFail m, MonadError MockChainError m) => MonadBlockChainBalancing m where
- getParams :: m Params
- utxosAtLedger :: Address -> m [(TxOutRef, TxOut)]
- datumFromHash :: DatumHash -> m (Maybe Datum)
- validatorFromHash :: ValidatorHash -> m (Maybe (Versioned Validator))
- txOutByRefLedger :: TxOutRef -> m (Maybe TxOut)
- data MCEUnbalanceableError
- = MCEUnbalNotEnoughFunds Wallet Value
- | MCEUnbalNotEnoughReturning (Value, [TxOutRef]) (Value, [TxOutRef]) Value
- data MockChainError where
- MCEValidationError :: ValidationErrorInPhase -> MockChainError
- MCEUnbalanceable :: MCEUnbalanceableError -> TxSkel -> MockChainError
- MCENoSuitableCollateral :: MockChainError
- MCEGenerationError :: GenerateTxError -> MockChainError
- MCECalcFee :: MockChainError -> MockChainError
- MCEUnknownOutRefError :: String -> TxOutRef -> MockChainError
- MCEUnknownValidator :: String -> ValidatorHash -> MockChainError
- MCEUnknownDatum :: String -> DatumHash -> MockChainError
- FailWith :: String -> MockChainError
- OtherMockChainError :: (Show err, Eq err) => err -> MockChainError
- allUtxos :: MonadBlockChainWithoutValidation m => m [(TxOutRef, TxOut)]
- utxosAt :: MonadBlockChainBalancing m => Address -> m [(TxOutRef, TxOut)]
- txOutByRef :: MonadBlockChainBalancing m => TxOutRef -> m (Maybe TxOut)
- utxosFromCardanoTx :: CardanoTx -> [(TxOutRef, TxOut)]
- txOutV2FromLedger :: TxOut -> TxOut
- resolveDatum :: (IsAbstractOutput out, ToOutputDatum (DatumType out), MonadBlockChainBalancing m) => out -> m (Maybe (ConcreteOutput (OwnerType out) Datum (ValueType out) (ReferenceScriptType out)))
- resolveTypedDatum :: (IsAbstractOutput out, ToOutputDatum (DatumType out), MonadBlockChainBalancing m, FromData a) => out -> m (Maybe (ConcreteOutput (OwnerType out) a (ValueType out) (ReferenceScriptType out)))
- resolveValidator :: (IsAbstractOutput out, ToCredential (OwnerType out), MonadBlockChainBalancing m) => out -> m (Maybe (ConcreteOutput (Versioned Validator) (DatumType out) (ValueType out) (ReferenceScriptType out)))
- resolveReferenceScript :: (IsAbstractOutput out, ToScriptHash (ReferenceScriptType out), MonadBlockChainBalancing m) => out -> m (Maybe (ConcreteOutput (OwnerType out) (DatumType out) (ValueType out) (Versioned Validator)))
- outputDatumFromTxOutRef :: MonadBlockChainWithoutValidation m => TxOutRef -> m (Maybe OutputDatum)
- datumFromTxOutRef :: MonadBlockChainWithoutValidation m => TxOutRef -> m (Maybe Datum)
- typedDatumFromTxOutRef :: (FromData a, MonadBlockChainWithoutValidation m) => TxOutRef -> m (Maybe a)
- valueFromTxOutRef :: MonadBlockChainWithoutValidation m => TxOutRef -> m (Maybe Value)
- waitNSlots :: MonadBlockChainWithoutValidation m => Integer -> m Slot
- currentTime :: MonadBlockChainWithoutValidation m => m (POSIXTime, POSIXTime)
- slotToTimeInterval :: MonadBlockChainWithoutValidation m => Slot -> m (POSIXTime, POSIXTime)
- getEnclosingSlot :: MonadBlockChainWithoutValidation m => POSIXTime -> m Slot
- awaitEnclosingSlot :: MonadBlockChainWithoutValidation m => POSIXTime -> m Slot
- slotRangeBefore :: MonadBlockChainWithoutValidation m => POSIXTime -> m SlotRange
- slotRangeAfter :: MonadBlockChainWithoutValidation m => POSIXTime -> m SlotRange
- runUtxoSearch :: Monad m => UtxoSearch m a -> m [(TxOutRef, a)]
- allUtxosSearch :: MonadBlockChain m => UtxoSearch m TxOut
- allUtxosLedgerSearch :: MonadBlockChain m => UtxoSearch m TxOut
- utxosAtSearch :: MonadBlockChainBalancing m => Address -> UtxoSearch m TxOut
- utxosAtLedgerSearch :: MonadBlockChainBalancing m => Address -> UtxoSearch m TxOut
- utxosFromCardanoTxSearch :: Monad m => CardanoTx -> UtxoSearch m TxOut
- txOutByRefSearch :: MonadBlockChainBalancing m => [TxOutRef] -> UtxoSearch m TxOut
- filterWith :: Monad m => UtxoSearch m a -> (a -> m (Maybe b)) -> UtxoSearch m b
- filterWithPure :: Monad m => UtxoSearch m a -> (a -> Maybe b) -> UtxoSearch m b
- filterWithOptic :: (Is k An_AffineFold, Monad m) => UtxoSearch m a -> Optic' k is a b -> UtxoSearch m b
- filterWithPred :: Monad m => UtxoSearch m a -> (a -> Bool) -> UtxoSearch m a
- balancedTxSkel :: MonadBlockChainBalancing m => TxSkel -> m (TxSkel, Fee, Set TxOutRef)
- balancedTx :: MonadBlockChainBalancing m => (TxSkel, Fee, Set TxOutRef) -> m (Tx BabbageEra)
- txSkelInputData :: MonadBlockChainBalancing m => TxSkel -> m (Map DatumHash Datum)
- type MockChain = MockChainT Identity
- newtype MockChainT m a = MockChainT {
- unMockChain :: ReaderT MockChainEnv (StateT MockChainSt (ExceptT MockChainError m)) a
- newtype MockChainEnv = MockChainEnv {
- mceParams :: Params
- data MockChainSt = MockChainSt {
- mcstIndex :: UtxoIndex
- mcstDatums :: Map DatumHash (TxSkelOutDatum, Integer)
- mcstValidators :: Map ValidatorHash (Versioned Validator)
- mcstCurrentSlot :: Slot
- mcstToUtxoState :: MockChainSt -> UtxoState
- combineMockChainT :: Monad m => (forall a. m a -> m a -> m a) -> MockChainT m x -> MockChainT m x -> MockChainT m x
- mapMockChainT :: (m (Either MockChainError (a, MockChainSt)) -> n (Either MockChainError (b, MockChainSt))) -> MockChainT m a -> MockChainT n b
- runMockChainTRaw :: Monad m => MockChainEnv -> MockChainSt -> MockChainT m a -> m (Either MockChainError (a, MockChainSt))
- runMockChainTFrom :: Monad m => InitialDistribution -> MockChainT m a -> m (Either MockChainError (a, UtxoState))
- runMockChainT :: Monad m => MockChainT m a -> m (Either MockChainError (a, UtxoState))
- runMockChainRaw :: MockChainEnv -> MockChainSt -> MockChain a -> Either MockChainError (a, MockChainSt)
- runMockChainFrom :: InitialDistribution -> MockChain a -> Either MockChainError (a, UtxoState)
- runMockChain :: MockChain a -> Either MockChainError (a, UtxoState)
- utxoState0 :: UtxoState
- mockChainSt0 :: MockChainSt
- mockChainSt0From :: InitialDistribution -> MockChainSt
- utxoIndex0From :: InitialDistribution -> UtxoIndex
- utxoIndex0 :: UtxoIndex
- getIndex :: UtxoIndex -> Map TxOutRef TxOut
- runTransactionValidation :: Monad m => Params -> Tx BabbageEra -> [RawModTx] -> Map DatumHash Datum -> Map DatumHash TxSkelOutDatum -> Map ValidatorHash (Versioned Validator) -> MockChainT m CardanoTx
- type MonadModalBlockChain m = (MonadBlockChain m, MonadModal m, Modification m ~ UntypedTweak InterpMockChain)
- unMockChainLog :: MockChainLog -> [MockChainLogEntry]
- pattern MCLogFail :: String -> MockChainLogEntry
- pattern MCLogSubmittedTxSkel :: SkelContext -> TxSkel -> MockChainLogEntry
- pattern MCLogNewTx :: TxId -> MockChainLogEntry
- interpretAndRunWith :: (forall m. Monad m => MockChainT m a -> m res) -> StagedMockChain a -> [(res, MockChainLog)]
- interpretAndRun :: StagedMockChain a -> [(Either MockChainError (a, UtxoState), MockChainLog)]
- runTweak :: Tweak InterpMockChain a -> TxSkel -> [Either MockChainError (a, TxSkel)]
- runTweakFrom :: MockChainEnv -> MockChainSt -> Tweak InterpMockChain a -> TxSkel -> [Either MockChainError (a, TxSkel)]
- somewhere :: MonadModalBlockChain m => Tweak InterpMockChain b -> m a -> m a
- everywhere :: MonadModalBlockChain m => Tweak InterpMockChain b -> m a -> m a
- withTweak :: MonadModalBlockChain m => m x -> Tweak InterpMockChain a -> m x
- class IsProp prop where
- testCounterexample :: String -> prop -> prop
- testConjoin :: [prop] -> prop
- testDisjoin :: [prop] -> prop
- testFailure :: prop
- testSuccess :: prop
- testFailureMsg :: String -> prop
- testBool :: IsProp prop => Bool -> prop
- testAll :: IsProp prop => (a -> prop) -> [a] -> prop
- (.==.) :: (IsProp prop, Eq a) => a -> a -> prop
- (.&&.) :: IsProp prop => prop -> prop -> prop
- (.||.) :: IsProp prop => prop -> prop -> prop
- testSucceeds :: IsProp prop => PrettyCookedOpts -> StagedMockChain a -> prop
- testFails :: (IsProp prop, Show a) => PrettyCookedOpts -> (MockChainError -> prop) -> StagedMockChain a -> prop
- testSucceedsFrom :: IsProp prop => PrettyCookedOpts -> InitialDistribution -> StagedMockChain a -> prop
- testSucceedsFrom' :: IsProp prop => PrettyCookedOpts -> (a -> UtxoState -> prop) -> InitialDistribution -> StagedMockChain a -> prop
- testFailsFrom :: (IsProp prop, Show a) => PrettyCookedOpts -> (MockChainError -> prop) -> InitialDistribution -> StagedMockChain a -> prop
- isCekEvaluationFailure :: IsProp prop => PrettyCookedOpts -> MockChainError -> prop
- isCekEvaluationFailureWithMsg :: IsProp prop => PrettyCookedOpts -> (String -> Bool) -> MockChainError -> prop
- testAllSatisfiesFrom :: forall prop a. IsProp prop => PrettyCookedOpts -> (Either MockChainError (a, UtxoState) -> prop) -> InitialDistribution -> StagedMockChain a -> prop
- testBinaryRelatedBy :: IsProp prop => PrettyCookedOpts -> (UtxoState -> UtxoState -> prop) -> InitialDistribution -> StagedMockChain a -> prop
- testOneEquivClass :: IsProp prop => PrettyCookedOpts -> (UtxoState -> UtxoState -> prop) -> InitialDistribution -> StagedMockChain a -> prop
- testSatisfiesFrom' :: ([(Either MockChainError (a, UtxoState), MockChainLog)] -> prop) -> InitialDistribution -> StagedMockChain a -> prop
- assertionToMaybe :: Assertion -> IO (Maybe HUnitFailure)
- forAll :: Show a => Gen a -> (a -> Property) -> Property
Documentation
utxoPayloadReferenceScript :: UtxoPayload -> Maybe ScriptHash Source #
utxoPayloadTxOutRef :: UtxoPayload -> TxOutRef Source #
utxoPayloadValue :: UtxoPayload -> Value Source #
utxoPayloadSet :: UtxoPayloadSet -> [UtxoPayload] Source #
A description of who owns what in a blockchain. Owners are addresses +
Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- utxoPayloadReferenceScript :: UtxoPayload -> Maybe ScriptHash
- utxoPayloadSkelOutDatum :: UtxoPayload -> TxSkelOutDatum
- utxoPayloadTxOutRef :: UtxoPayload -> TxOutRef
- utxoPayloadValue :: UtxoPayload -> Value
- utxoPayloadSet :: UtxoPayloadSet -> [UtxoPayload]
- data UtxoState
- holdsInState :: Address -> UtxoState -> Value
- newtype AsTrans t (m :: Type -> Type) a = AsTrans {
- getTrans :: t m a
- class MonadBlockChainWithoutValidation m => MonadBlockChain m where
- validateTxSkel :: TxSkel -> m CardanoTx
- class MonadBlockChainBalancing m => MonadBlockChainWithoutValidation m where
- allUtxosLedger :: m [(TxOutRef, TxOut)]
- currentSlot :: m Slot
- awaitSlot :: Slot -> m Slot
- class (MonadFail m, MonadError MockChainError m) => MonadBlockChainBalancing m where
- getParams :: m Params
- utxosAtLedger :: Address -> m [(TxOutRef, TxOut)]
- datumFromHash :: DatumHash -> m (Maybe Datum)
- validatorFromHash :: ValidatorHash -> m (Maybe (Versioned Validator))
- txOutByRefLedger :: TxOutRef -> m (Maybe TxOut)
- data MCEUnbalanceableError
- = MCEUnbalNotEnoughFunds Wallet Value
- | MCEUnbalNotEnoughReturning (Value, [TxOutRef]) (Value, [TxOutRef]) Value
- data MockChainError where
- MCEValidationError :: ValidationErrorInPhase -> MockChainError
- MCEUnbalanceable :: MCEUnbalanceableError -> TxSkel -> MockChainError
- MCENoSuitableCollateral :: MockChainError
- MCEGenerationError :: GenerateTxError -> MockChainError
- MCECalcFee :: MockChainError -> MockChainError
- MCEUnknownOutRefError :: String -> TxOutRef -> MockChainError
- MCEUnknownValidator :: String -> ValidatorHash -> MockChainError
- MCEUnknownDatum :: String -> DatumHash -> MockChainError
- FailWith :: String -> MockChainError
- OtherMockChainError :: (Show err, Eq err) => err -> MockChainError
- allUtxos :: MonadBlockChainWithoutValidation m => m [(TxOutRef, TxOut)]
- utxosAt :: MonadBlockChainBalancing m => Address -> m [(TxOutRef, TxOut)]
- txOutByRef :: MonadBlockChainBalancing m => TxOutRef -> m (Maybe TxOut)
- utxosFromCardanoTx :: CardanoTx -> [(TxOutRef, TxOut)]
- txOutV2FromLedger :: TxOut -> TxOut
- resolveDatum :: (IsAbstractOutput out, ToOutputDatum (DatumType out), MonadBlockChainBalancing m) => out -> m (Maybe (ConcreteOutput (OwnerType out) Datum (ValueType out) (ReferenceScriptType out)))
- resolveTypedDatum :: (IsAbstractOutput out, ToOutputDatum (DatumType out), MonadBlockChainBalancing m, FromData a) => out -> m (Maybe (ConcreteOutput (OwnerType out) a (ValueType out) (ReferenceScriptType out)))
- resolveValidator :: (IsAbstractOutput out, ToCredential (OwnerType out), MonadBlockChainBalancing m) => out -> m (Maybe (ConcreteOutput (Versioned Validator) (DatumType out) (ValueType out) (ReferenceScriptType out)))
- resolveReferenceScript :: (IsAbstractOutput out, ToScriptHash (ReferenceScriptType out), MonadBlockChainBalancing m) => out -> m (Maybe (ConcreteOutput (OwnerType out) (DatumType out) (ValueType out) (Versioned Validator)))
- outputDatumFromTxOutRef :: MonadBlockChainWithoutValidation m => TxOutRef -> m (Maybe OutputDatum)
- datumFromTxOutRef :: MonadBlockChainWithoutValidation m => TxOutRef -> m (Maybe Datum)
- typedDatumFromTxOutRef :: (FromData a, MonadBlockChainWithoutValidation m) => TxOutRef -> m (Maybe a)
- valueFromTxOutRef :: MonadBlockChainWithoutValidation m => TxOutRef -> m (Maybe Value)
- waitNSlots :: MonadBlockChainWithoutValidation m => Integer -> m Slot
- currentTime :: MonadBlockChainWithoutValidation m => m (POSIXTime, POSIXTime)
- slotToTimeInterval :: MonadBlockChainWithoutValidation m => Slot -> m (POSIXTime, POSIXTime)
- getEnclosingSlot :: MonadBlockChainWithoutValidation m => POSIXTime -> m Slot
- awaitEnclosingSlot :: MonadBlockChainWithoutValidation m => POSIXTime -> m Slot
- slotRangeBefore :: MonadBlockChainWithoutValidation m => POSIXTime -> m SlotRange
- slotRangeAfter :: MonadBlockChainWithoutValidation m => POSIXTime -> m SlotRange
- runUtxoSearch :: Monad m => UtxoSearch m a -> m [(TxOutRef, a)]
- allUtxosSearch :: MonadBlockChain m => UtxoSearch m TxOut
- allUtxosLedgerSearch :: MonadBlockChain m => UtxoSearch m TxOut
- utxosAtSearch :: MonadBlockChainBalancing m => Address -> UtxoSearch m TxOut
- utxosAtLedgerSearch :: MonadBlockChainBalancing m => Address -> UtxoSearch m TxOut
- utxosFromCardanoTxSearch :: Monad m => CardanoTx -> UtxoSearch m TxOut
- txOutByRefSearch :: MonadBlockChainBalancing m => [TxOutRef] -> UtxoSearch m TxOut
- filterWith :: Monad m => UtxoSearch m a -> (a -> m (Maybe b)) -> UtxoSearch m b
- filterWithPure :: Monad m => UtxoSearch m a -> (a -> Maybe b) -> UtxoSearch m b
- filterWithOptic :: (Is k An_AffineFold, Monad m) => UtxoSearch m a -> Optic' k is a b -> UtxoSearch m b
- filterWithPred :: Monad m => UtxoSearch m a -> (a -> Bool) -> UtxoSearch m a
- balancedTxSkel :: MonadBlockChainBalancing m => TxSkel -> m (TxSkel, Fee, Set TxOutRef)
- balancedTx :: MonadBlockChainBalancing m => (TxSkel, Fee, Set TxOutRef) -> m (Tx BabbageEra)
- txSkelInputData :: MonadBlockChainBalancing m => TxSkel -> m (Map DatumHash Datum)
- type MockChain = MockChainT Identity
- newtype MockChainT m a = MockChainT {
- unMockChain :: ReaderT MockChainEnv (StateT MockChainSt (ExceptT MockChainError m)) a
- newtype MockChainEnv = MockChainEnv {
- mceParams :: Params
- data MockChainSt = MockChainSt {
- mcstIndex :: UtxoIndex
- mcstDatums :: Map DatumHash (TxSkelOutDatum, Integer)
- mcstValidators :: Map ValidatorHash (Versioned Validator)
- mcstCurrentSlot :: Slot
- mcstToUtxoState :: MockChainSt -> UtxoState
- combineMockChainT :: Monad m => (forall a. m a -> m a -> m a) -> MockChainT m x -> MockChainT m x -> MockChainT m x
- mapMockChainT :: (m (Either MockChainError (a, MockChainSt)) -> n (Either MockChainError (b, MockChainSt))) -> MockChainT m a -> MockChainT n b
- runMockChainTRaw :: Monad m => MockChainEnv -> MockChainSt -> MockChainT m a -> m (Either MockChainError (a, MockChainSt))
- runMockChainTFrom :: Monad m => InitialDistribution -> MockChainT m a -> m (Either MockChainError (a, UtxoState))
- runMockChainT :: Monad m => MockChainT m a -> m (Either MockChainError (a, UtxoState))
- runMockChainRaw :: MockChainEnv -> MockChainSt -> MockChain a -> Either MockChainError (a, MockChainSt)
- runMockChainFrom :: InitialDistribution -> MockChain a -> Either MockChainError (a, UtxoState)
- runMockChain :: MockChain a -> Either MockChainError (a, UtxoState)
- utxoState0 :: UtxoState
- mockChainSt0 :: MockChainSt
- mockChainSt0From :: InitialDistribution -> MockChainSt
- utxoIndex0From :: InitialDistribution -> UtxoIndex
- utxoIndex0 :: UtxoIndex
- getIndex :: UtxoIndex -> Map TxOutRef TxOut
- runTransactionValidation :: Monad m => Params -> Tx BabbageEra -> [RawModTx] -> Map DatumHash Datum -> Map DatumHash TxSkelOutDatum -> Map ValidatorHash (Versioned Validator) -> MockChainT m CardanoTx
- type MonadModalBlockChain m = (MonadBlockChain m, MonadModal m, Modification m ~ UntypedTweak InterpMockChain)
- unMockChainLog :: MockChainLog -> [MockChainLogEntry]
- pattern MCLogFail :: String -> MockChainLogEntry
- pattern MCLogSubmittedTxSkel :: SkelContext -> TxSkel -> MockChainLogEntry
- pattern MCLogNewTx :: TxId -> MockChainLogEntry
- interpretAndRunWith :: (forall m. Monad m => MockChainT m a -> m res) -> StagedMockChain a -> [(res, MockChainLog)]
- interpretAndRun :: StagedMockChain a -> [(Either MockChainError (a, UtxoState), MockChainLog)]
- runTweak :: Tweak InterpMockChain a -> TxSkel -> [Either MockChainError (a, TxSkel)]
- runTweakFrom :: MockChainEnv -> MockChainSt -> Tweak InterpMockChain a -> TxSkel -> [Either MockChainError (a, TxSkel)]
- somewhere :: MonadModalBlockChain m => Tweak InterpMockChain b -> m a -> m a
- everywhere :: MonadModalBlockChain m => Tweak InterpMockChain b -> m a -> m a
- there :: MonadModalBlockChain m => Integer -> Tweak InterpMockChain b -> m a -> m a
- withTweak :: MonadModalBlockChain m => m x -> Tweak InterpMockChain a -> m x
- class IsProp prop where
- testCounterexample :: String -> prop -> prop
- testConjoin :: [prop] -> prop
- testDisjoin :: [prop] -> prop
- testFailure :: prop
- testSuccess :: prop
- testFailureMsg :: String -> prop
- testBool :: IsProp prop => Bool -> prop
- testAll :: IsProp prop => (a -> prop) -> [a] -> prop
- (.==.) :: (IsProp prop, Eq a) => a -> a -> prop
- (.&&.) :: IsProp prop => prop -> prop -> prop
- (.||.) :: IsProp prop => prop -> prop -> prop
- testSucceeds :: IsProp prop => PrettyCookedOpts -> StagedMockChain a -> prop
- testFails :: (IsProp prop, Show a) => PrettyCookedOpts -> (MockChainError -> prop) -> StagedMockChain a -> prop
- testSucceedsFrom :: IsProp prop => PrettyCookedOpts -> InitialDistribution -> StagedMockChain a -> prop
- testSucceedsFrom' :: IsProp prop => PrettyCookedOpts -> (a -> UtxoState -> prop) -> InitialDistribution -> StagedMockChain a -> prop
- testFailsFrom :: (IsProp prop, Show a) => PrettyCookedOpts -> (MockChainError -> prop) -> InitialDistribution -> StagedMockChain a -> prop
- isCekEvaluationFailure :: IsProp prop => PrettyCookedOpts -> MockChainError -> prop
- isCekEvaluationFailureWithMsg :: IsProp prop => PrettyCookedOpts -> (String -> Bool) -> MockChainError -> prop
- testAllSatisfiesFrom :: forall prop a. IsProp prop => PrettyCookedOpts -> (Either MockChainError (a, UtxoState) -> prop) -> InitialDistribution -> StagedMockChain a -> prop
- testBinaryRelatedBy :: IsProp prop => PrettyCookedOpts -> (UtxoState -> UtxoState -> prop) -> InitialDistribution -> StagedMockChain a -> prop
- testOneEquivClass :: IsProp prop => PrettyCookedOpts -> (UtxoState -> UtxoState -> prop) -> InitialDistribution -> StagedMockChain a -> prop
- testSatisfiesFrom' :: ([(Either MockChainError (a, UtxoState), MockChainLog)] -> prop) -> InitialDistribution -> StagedMockChain a -> prop
- assertionToMaybe :: Assertion -> IO (Maybe HUnitFailure)
- forAll :: Show a => Gen a -> (a -> Property) -> Property
Documentation
utxoPayloadReferenceScript :: UtxoPayload -> Maybe ScriptHash Source #
utxoPayloadTxOutRef :: UtxoPayload -> TxOutRef Source #
utxoPayloadValue :: UtxoPayload -> Value Source #
utxoPayloadSet :: UtxoPayloadSet -> [UtxoPayload] Source #
A description of who owns what in a blockchain. Owners are addresses
and they each own a UtxoPayloadSet
.
Instances
Eq UtxoState Source # | |
Semigroup UtxoState Source # | |
PrettyCooked UtxoState Source # | Pretty print a |
Defined in Cooked.Pretty.Cooked prettyCooked :: UtxoState -> DocCooked Source # prettyCookedOpt :: PrettyCookedOpts -> UtxoState -> DocCooked Source # | |
Show a => PrettyCooked (Either MockChainError (a, UtxoState)) Source # | |
Defined in Cooked.Pretty.Cooked prettyCooked :: Either MockChainError (a, UtxoState) -> DocCooked Source # prettyCookedOpt :: PrettyCookedOpts -> Either MockChainError (a, UtxoState) -> DocCooked Source # | |
Show a => PrettyCooked (a, UtxoState) Source # | |
Defined in Cooked.Pretty.Cooked prettyCooked :: (a, UtxoState) -> DocCooked Source # prettyCookedOpt :: PrettyCookedOpts -> (a, UtxoState) -> DocCooked Source # |
holdsInState :: Address -> UtxoState -> Value Source #
Total value accessible to what's pointed by the address.
newtype AsTrans t (m :: Type -> Type) a Source #
A newtype wrapper to be used with '-XDerivingVia' to derive instances of MonadBlockChain
for any MonadTransControl
.
For example, to derive 'MonadBlockChain m => MonadBlockChain (ReaderT r m)', you'd write
deriving via (AsTrans (ReaderT r) m) instance MonadBlockChain m => MonadBlockChain (ReaderT r m)
and avoid the boilerplate of defining all the methods of the class yourself.
Instances
(MonadTransControl t, MonadError MockChainError m, Monad (t m)) => MonadError MockChainError (AsTrans t m) Source # | |
Defined in Cooked.MockChain.BlockChain throwError :: MockChainError -> AsTrans t m a # catchError :: AsTrans t m a -> (MockChainError -> AsTrans t m a) -> AsTrans t m a # | |
MonadTrans t => MonadTrans (AsTrans t) Source # | |
Defined in Cooked.MockChain.BlockChain | |
MonadTransControl t => MonadTransControl (AsTrans t) Source # | |
Monad (t m) => Monad (AsTrans t m) Source # | |
Functor (t m) => Functor (AsTrans t m) Source # | |
(MonadTrans t, MonadFail m, Monad (t m)) => MonadFail (AsTrans t m) Source # | |
Defined in Cooked.MockChain.BlockChain | |
Applicative (t m) => Applicative (AsTrans t m) Source # | |
Defined in Cooked.MockChain.BlockChain | |
(MonadTrans t, MonadBlockChain m, MonadBlockChainWithoutValidation (AsTrans t m)) => MonadBlockChain (AsTrans t m) Source # | |
Defined in Cooked.MockChain.BlockChain validateTxSkel :: TxSkel -> AsTrans t m CardanoTx Source # | |
(MonadTrans t, MonadBlockChainWithoutValidation m, Monad (t m), MonadError MockChainError (AsTrans t m)) => MonadBlockChainWithoutValidation (AsTrans t m) Source # | |
Defined in Cooked.MockChain.BlockChain | |
(MonadTrans t, MonadBlockChainBalancing m, Monad (t m), MonadError MockChainError (AsTrans t m)) => MonadBlockChainBalancing (AsTrans t m) Source # | |
Defined in Cooked.MockChain.BlockChain getParams :: AsTrans t m Params Source # utxosAtLedger :: Address -> AsTrans t m [(TxOutRef, TxOut)] Source # datumFromHash :: DatumHash -> AsTrans t m (Maybe Datum) Source # validatorFromHash :: ValidatorHash -> AsTrans t m (Maybe (Versioned Validator)) Source # txOutByRefLedger :: TxOutRef -> AsTrans t m (Maybe TxOut) Source # | |
type StT (AsTrans t) a Source # | |
Defined in Cooked.MockChain.BlockChain type StT (AsTrans t) a = StT t a |
class MonadBlockChainWithoutValidation m => MonadBlockChain m where Source #
The main abstraction of the blockchain.
validateTxSkel :: TxSkel -> m CardanoTx Source #
Generates, balances and validates a transaction from a skeleton.
@@ -8,15 +8,15 @@
- adds the produced outputs to msctIndex
- deletes the consumed datums from mcstDatums
- adds the produced datums to mcstDatums
- - adds the validators on outputs to the mcstValidators
.
Instances
MonadBlockChain StagedMockChain Source # | |
Defined in Cooked.MockChain.Staged validateTxSkel :: TxSkel -> StagedMockChain CardanoTx Source # | |
MonadBlockChain m => MonadBlockChain (ListT m) Source # | |
Defined in Cooked.MockChain.BlockChain validateTxSkel :: TxSkel -> ListT m CardanoTx Source # | |
Monad m => MonadBlockChain (MockChainT m) Source # | |
Defined in Cooked.MockChain.Direct validateTxSkel :: TxSkel -> MockChainT m CardanoTx Source # | |
MonadBlockChain m => MonadBlockChain (ReaderT r m) Source # | |
Defined in Cooked.MockChain.BlockChain validateTxSkel :: TxSkel -> ReaderT r m CardanoTx Source # | |
MonadBlockChain m => MonadBlockChain (StateT s m) Source # | |
Defined in Cooked.MockChain.BlockChain validateTxSkel :: TxSkel -> StateT s m CardanoTx Source # | |
(Monoid w, MonadBlockChain m) => MonadBlockChain (WriterT w m) Source # | |
Defined in Cooked.MockChain.BlockChain validateTxSkel :: TxSkel -> WriterT w m CardanoTx Source # | |
(MonadTrans t, MonadBlockChain m, MonadBlockChainWithoutValidation (AsTrans t m)) => MonadBlockChain (AsTrans t m) Source # | |
Defined in Cooked.MockChain.BlockChain validateTxSkel :: TxSkel -> AsTrans t m CardanoTx Source # |
class MonadBlockChainBalancing m => MonadBlockChainWithoutValidation m where Source #
allUtxosLedger :: m [(TxOutRef, TxOut)] Source #
Returns a list of all currently known outputs.
currentSlot :: m Slot Source #
Returns the current slot number
awaitSlot :: Slot -> m Slot Source #
Waits until the current slot becomes greater or equal to the given slot,
+ - adds the validators on outputs to the mcstValidators
.
Instances
MonadBlockChain StagedMockChain Source # | |
Defined in Cooked.MockChain.Staged validateTxSkel :: TxSkel -> StagedMockChain CardanoTx Source # | |
MonadBlockChain m => MonadBlockChain (ListT m) Source # | |
Defined in Cooked.MockChain.BlockChain validateTxSkel :: TxSkel -> ListT m CardanoTx Source # | |
Monad m => MonadBlockChain (MockChainT m) Source # | |
Defined in Cooked.MockChain.Direct validateTxSkel :: TxSkel -> MockChainT m CardanoTx Source # | |
MonadBlockChain m => MonadBlockChain (ReaderT r m) Source # | |
Defined in Cooked.MockChain.BlockChain validateTxSkel :: TxSkel -> ReaderT r m CardanoTx Source # | |
MonadBlockChain m => MonadBlockChain (StateT s m) Source # | |
Defined in Cooked.MockChain.BlockChain validateTxSkel :: TxSkel -> StateT s m CardanoTx Source # | |
(Monoid w, MonadBlockChain m) => MonadBlockChain (WriterT w m) Source # | |
Defined in Cooked.MockChain.BlockChain validateTxSkel :: TxSkel -> WriterT w m CardanoTx Source # | |
(MonadTrans t, MonadBlockChain m, MonadBlockChainWithoutValidation (AsTrans t m)) => MonadBlockChain (AsTrans t m) Source # | |
Defined in Cooked.MockChain.BlockChain validateTxSkel :: TxSkel -> AsTrans t m CardanoTx Source # |
class MonadBlockChainBalancing m => MonadBlockChainWithoutValidation m where Source #
allUtxosLedger :: m [(TxOutRef, TxOut)] Source #
Returns a list of all currently known outputs.
currentSlot :: m Slot Source #
Returns the current slot number
awaitSlot :: Slot -> m Slot Source #
Waits until the current slot becomes greater or equal to the given slot, and returns the current slot after waiting.
Note that it might not wait for anything if the current slot is large - enough.
Instances
MonadBlockChainWithoutValidation StagedMockChain Source # | |
Defined in Cooked.MockChain.Staged allUtxosLedger :: StagedMockChain [(TxOutRef, TxOut)] Source # currentSlot :: StagedMockChain Slot Source # awaitSlot :: Slot -> StagedMockChain Slot Source # | |
MonadBlockChainWithoutValidation m => MonadBlockChainWithoutValidation (ListT m) Source # | |
Defined in Cooked.MockChain.BlockChain allUtxosLedger :: ListT m [(TxOutRef, TxOut)] Source # currentSlot :: ListT m Slot Source # | |
Monad m => MonadBlockChainWithoutValidation (MockChainT m) Source # | |
Defined in Cooked.MockChain.Direct allUtxosLedger :: MockChainT m [(TxOutRef, TxOut)] Source # currentSlot :: MockChainT m Slot Source # awaitSlot :: Slot -> MockChainT m Slot Source # | |
MonadBlockChainWithoutValidation m => MonadBlockChainWithoutValidation (ReaderT r m) Source # | |
Defined in Cooked.MockChain.BlockChain | |
MonadBlockChainWithoutValidation m => MonadBlockChainWithoutValidation (StateT s m) Source # | |
Defined in Cooked.MockChain.BlockChain | |
(Monoid w, MonadBlockChainWithoutValidation m) => MonadBlockChainWithoutValidation (WriterT w m) Source # | |
Defined in Cooked.MockChain.BlockChain | |
(MonadTrans t, MonadBlockChainWithoutValidation m, Monad (t m), MonadError MockChainError (AsTrans t m)) => MonadBlockChainWithoutValidation (AsTrans t m) Source # | |
Defined in Cooked.MockChain.BlockChain |
class (MonadFail m, MonadError MockChainError m) => MonadBlockChainBalancing m where Source #
Contains methods needed for balancing.
getParams :: m Params Source #
Returns the parameters of the chain.
utxosAtLedger :: Address -> m [(TxOutRef, TxOut)] Source #
Returns a list of all UTxOs at a certain address.
datumFromHash :: DatumHash -> m (Maybe Datum) Source #
Returns the datum with the given hash or Nothing
if there is none
validatorFromHash :: ValidatorHash -> m (Maybe (Versioned Validator)) Source #
Returns the full validator corresponding to hash, if that validator owns - something or if it is stored in the reference script field of some UTxO.
txOutByRefLedger :: TxOutRef -> m (Maybe TxOut) Source #
Returns an output given a reference to it
Instances
MonadBlockChainBalancing StagedMockChain Source # | |
Defined in Cooked.MockChain.Staged getParams :: StagedMockChain Params Source # utxosAtLedger :: Address -> StagedMockChain [(TxOutRef, TxOut)] Source # datumFromHash :: DatumHash -> StagedMockChain (Maybe Datum) Source # validatorFromHash :: ValidatorHash -> StagedMockChain (Maybe (Versioned Validator)) Source # txOutByRefLedger :: TxOutRef -> StagedMockChain (Maybe TxOut) Source # | |
MonadBlockChainBalancing m => MonadBlockChainBalancing (ListT m) Source # | |
Defined in Cooked.MockChain.BlockChain getParams :: ListT m Params Source # utxosAtLedger :: Address -> ListT m [(TxOutRef, TxOut)] Source # datumFromHash :: DatumHash -> ListT m (Maybe Datum) Source # validatorFromHash :: ValidatorHash -> ListT m (Maybe (Versioned Validator)) Source # txOutByRefLedger :: TxOutRef -> ListT m (Maybe TxOut) Source # | |
Monad m => MonadBlockChainBalancing (MockChainT m) Source # | |
Defined in Cooked.MockChain.Direct getParams :: MockChainT m Params Source # utxosAtLedger :: Address -> MockChainT m [(TxOutRef, TxOut)] Source # datumFromHash :: DatumHash -> MockChainT m (Maybe Datum) Source # validatorFromHash :: ValidatorHash -> MockChainT m (Maybe (Versioned Validator)) Source # txOutByRefLedger :: TxOutRef -> MockChainT m (Maybe TxOut) Source # | |
MonadBlockChainBalancing m => MonadBlockChainBalancing (ReaderT r m) Source # | |
Defined in Cooked.MockChain.BlockChain getParams :: ReaderT r m Params Source # utxosAtLedger :: Address -> ReaderT r m [(TxOutRef, TxOut)] Source # datumFromHash :: DatumHash -> ReaderT r m (Maybe Datum) Source # validatorFromHash :: ValidatorHash -> ReaderT r m (Maybe (Versioned Validator)) Source # txOutByRefLedger :: TxOutRef -> ReaderT r m (Maybe TxOut) Source # | |
MonadBlockChainBalancing m => MonadBlockChainBalancing (StateT s m) Source # | |
Defined in Cooked.MockChain.BlockChain getParams :: StateT s m Params Source # utxosAtLedger :: Address -> StateT s m [(TxOutRef, TxOut)] Source # datumFromHash :: DatumHash -> StateT s m (Maybe Datum) Source # validatorFromHash :: ValidatorHash -> StateT s m (Maybe (Versioned Validator)) Source # txOutByRefLedger :: TxOutRef -> StateT s m (Maybe TxOut) Source # | |
(Monoid w, MonadBlockChainBalancing m) => MonadBlockChainBalancing (WriterT w m) Source # | |
Defined in Cooked.MockChain.BlockChain getParams :: WriterT w m Params Source # utxosAtLedger :: Address -> WriterT w m [(TxOutRef, TxOut)] Source # datumFromHash :: DatumHash -> WriterT w m (Maybe Datum) Source # validatorFromHash :: ValidatorHash -> WriterT w m (Maybe (Versioned Validator)) Source # txOutByRefLedger :: TxOutRef -> WriterT w m (Maybe TxOut) Source # | |
(MonadTrans t, MonadBlockChainBalancing m, Monad (t m), MonadError MockChainError (AsTrans t m)) => MonadBlockChainBalancing (AsTrans t m) Source # | |
Defined in Cooked.MockChain.BlockChain getParams :: AsTrans t m Params Source # utxosAtLedger :: Address -> AsTrans t m [(TxOutRef, TxOut)] Source # datumFromHash :: DatumHash -> AsTrans t m (Maybe Datum) Source # validatorFromHash :: ValidatorHash -> AsTrans t m (Maybe (Versioned Validator)) Source # txOutByRefLedger :: TxOutRef -> AsTrans t m (Maybe TxOut) Source # |
data MCEUnbalanceableError Source #
MCEUnbalNotEnoughFunds Wallet Value | The balancing wallet misses some value to pay what is needed to balance + enough. Instances
class (MonadFail m, MonadError MockChainError m) => MonadBlockChainBalancing m where Source # Contains methods needed for balancing. getParams :: m Params Source # Returns the parameters of the chain. utxosAtLedger :: Address -> m [(TxOutRef, TxOut)] Source # Returns a list of all UTxOs at a certain address. datumFromHash :: DatumHash -> m (Maybe Datum) Source # Returns the datum with the given hash or validatorFromHash :: ValidatorHash -> m (Maybe (Versioned Validator)) Source # Returns the full validator corresponding to hash, if that validator owns + something or if it is stored in the reference script field of some UTxO. txOutByRefLedger :: TxOutRef -> m (Maybe TxOut) Source # Returns an output given a reference to it Instances
data MCEUnbalanceableError Source #
Instances
data MockChainError where Source # The errors that can be produced by the
Instances
allUtxos :: MonadBlockChainWithoutValidation m => m [(TxOutRef, TxOut)] Source # utxosAt :: MonadBlockChainBalancing m => Address -> m [(TxOutRef, TxOut)] Source # txOutByRef :: MonadBlockChainBalancing m => TxOutRef -> m (Maybe TxOut) Source # utxosFromCardanoTx :: CardanoTx -> [(TxOutRef, TxOut)] Source # Retrieve the ordered list of outputs of the given CardanoTx. This is useful when writing endpoints and/or traces to fetch utxos of + but isn't. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
MCEUnknownValidator :: String -> ValidatorHash -> MockChainError | Same as | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
MCEUnknownDatum :: String -> DatumHash -> MockChainError | Same as | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
FailWith :: String -> MockChainError | Used to provide | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
OtherMockChainError :: (Show err, Eq err) => err -> MockChainError |
Instances
Eq MockChainError Source # | |
Defined in Cooked.MockChain.BlockChain (==) :: MockChainError -> MockChainError -> Bool # (/=) :: MockChainError -> MockChainError -> Bool # | |
Show MockChainError Source # | |
Defined in Cooked.MockChain.BlockChain showsPrec :: Int -> MockChainError -> ShowS # show :: MockChainError -> String # showList :: [MockChainError] -> ShowS # | |
PrettyCooked MockChainError Source # | |
Defined in Cooked.Pretty.Cooked | |
MonadError MockChainError StagedMockChain Source # | |
Defined in Cooked.MockChain.Staged throwError :: MockChainError -> StagedMockChain a # catchError :: StagedMockChain a -> (MockChainError -> StagedMockChain a) -> StagedMockChain a # | |
Monad m => MonadError MockChainError (MockChainT m) Source # | |
Defined in Cooked.MockChain.Direct throwError :: MockChainError -> MockChainT m a # catchError :: MockChainT m a -> (MockChainError -> MockChainT m a) -> MockChainT m a # | |
(MonadTransControl t, MonadError MockChainError m, Monad (t m)) => MonadError MockChainError (AsTrans t m) Source # | |
Defined in Cooked.MockChain.BlockChain throwError :: MockChainError -> AsTrans t m a # catchError :: AsTrans t m a -> (MockChainError -> AsTrans t m a) -> AsTrans t m a # | |
Show a => PrettyCooked (Either MockChainError (a, UtxoState)) Source # | |
Defined in Cooked.Pretty.Cooked prettyCooked :: Either MockChainError (a, UtxoState) -> DocCooked Source # prettyCookedOpt :: PrettyCookedOpts -> Either MockChainError (a, UtxoState) -> DocCooked Source # |
allUtxos :: MonadBlockChainWithoutValidation m => m [(TxOutRef, TxOut)] Source #
utxosAt :: MonadBlockChainBalancing m => Address -> m [(TxOutRef, TxOut)] Source #
txOutByRef :: MonadBlockChainBalancing m => TxOutRef -> m (Maybe TxOut) Source #
utxosFromCardanoTx :: CardanoTx -> [(TxOutRef, TxOut)] Source #
txOutV2FromLedger :: TxOut -> TxOut Source #
resolveDatum :: (IsAbstractOutput out, ToOutputDatum (DatumType out), MonadBlockChainBalancing m) => out -> m (Maybe (ConcreteOutput (OwnerType out) Datum (ValueType out) (ReferenceScriptType out))) Source #
Try to resolve the datum on the output: If there's an inline datum, take
that; if there's a datum hash, look the corresponding datum up (with
@@ -38,7 +38,7 @@
TxOutRef
s. Any TxOutRef
that doesn't correspond to a known output will be
filtered out.
filterWith :: Monad m => UtxoSearch m a -> (a -> m (Maybe b)) -> UtxoSearch m b Source #
Transform a UtxoSearch
by applying a possibly failing monadic "lookup"
on every output.
filterWithPure :: Monad m => UtxoSearch m a -> (a -> Maybe b) -> UtxoSearch m b Source #
filterWithOptic :: (Is k An_AffineFold, Monad m) => UtxoSearch m a -> Optic' k is a b -> UtxoSearch m b Source #
filterWithPred :: Monad m => UtxoSearch m a -> (a -> Bool) -> UtxoSearch m a Source #
balancedTxSkel :: MonadBlockChainBalancing m => TxSkel -> m (TxSkel, Fee, Set TxOutRef) Source #
balancedTx :: MonadBlockChainBalancing m => (TxSkel, Fee, Set TxOutRef) -> m (Tx BabbageEra) Source #
Take the output of balancedTxSkel
and turn it into an actual Cardano
- transaction.
txSkelInputData :: MonadBlockChainBalancing m => TxSkel -> m (Map DatumHash Datum) Source #
Look up the data on UTxOs the transaction consumes.
type MockChain = MockChainT Identity Source #
newtype MockChainT m a Source #
Instances
MonadFail StagedMockChain Source # | |
Defined in Cooked.MockChain.Staged fail :: String -> StagedMockChain a # | |
Alternative StagedMockChain Source # | |
Defined in Cooked.MockChain.Staged empty :: StagedMockChain a # (<|>) :: StagedMockChain a -> StagedMockChain a -> StagedMockChain a # some :: StagedMockChain a -> StagedMockChain [a] # many :: StagedMockChain a -> StagedMockChain [a] # | |
MonadTrans MockChainT Source # | |
Defined in Cooked.MockChain.Direct lift :: Monad m => m a -> MockChainT m a # | |
MonadBlockChain StagedMockChain Source # | |
Defined in Cooked.MockChain.Staged validateTxSkel :: TxSkel -> StagedMockChain CardanoTx Source # | |
MonadBlockChainWithoutValidation StagedMockChain Source # | |
Defined in Cooked.MockChain.Staged allUtxosLedger :: StagedMockChain [(TxOutRef, TxOut)] Source # currentSlot :: StagedMockChain Slot Source # awaitSlot :: Slot -> StagedMockChain Slot Source # | |
MonadBlockChainBalancing StagedMockChain Source # | |
Defined in Cooked.MockChain.Staged getParams :: StagedMockChain Params Source # utxosAtLedger :: Address -> StagedMockChain [(TxOutRef, TxOut)] Source # datumFromHash :: DatumHash -> StagedMockChain (Maybe Datum) Source # validatorFromHash :: ValidatorHash -> StagedMockChain (Maybe (Versioned Validator)) Source # txOutByRefLedger :: TxOutRef -> StagedMockChain (Maybe TxOut) Source # | |
MonadError MockChainError StagedMockChain Source # | |
Defined in Cooked.MockChain.Staged throwError :: MockChainError -> StagedMockChain a # catchError :: StagedMockChain a -> (MockChainError -> StagedMockChain a) -> StagedMockChain a # | |
Monad m => MonadState MockChainSt (MockChainT m) Source # | |
Defined in Cooked.MockChain.Direct get :: MockChainT m MockChainSt # put :: MockChainSt -> MockChainT m () # state :: (MockChainSt -> (a, MockChainSt)) -> MockChainT m a # | |
Monad m => MonadReader MockChainEnv (MockChainT m) Source # | |
Defined in Cooked.MockChain.Direct ask :: MockChainT m MockChainEnv # local :: (MockChainEnv -> MockChainEnv) -> MockChainT m a -> MockChainT m a # reader :: (MockChainEnv -> a) -> MockChainT m a # | |
Monad m => MonadError MockChainError (MockChainT m) Source # | |
Defined in Cooked.MockChain.Direct throwError :: MockChainError -> MockChainT m a # catchError :: MockChainT m a -> (MockChainError -> MockChainT m a) -> MockChainT m a # | |
Monad m => Monad (MockChainT m) Source # | Custom monad instance made to increase the slot count automatically |
Defined in Cooked.MockChain.Direct (>>=) :: MockChainT m a -> (a -> MockChainT m b) -> MockChainT m b # (>>) :: MockChainT m a -> MockChainT m b -> MockChainT m b # return :: a -> MockChainT m a # | |
Functor m => Functor (MockChainT m) Source # | |
Defined in Cooked.MockChain.Direct fmap :: (a -> b) -> MockChainT m a -> MockChainT m b # (<$) :: a -> MockChainT m b -> MockChainT m a # | |
Monad m => MonadFail (MockChainT m) Source # | |
Defined in Cooked.MockChain.Direct fail :: String -> MockChainT m a # | |
Monad m => Applicative (MockChainT m) Source # | |
Defined in Cooked.MockChain.Direct pure :: a -> MockChainT m a # (<*>) :: MockChainT m (a -> b) -> MockChainT m a -> MockChainT m b # liftA2 :: (a -> b -> c) -> MockChainT m a -> MockChainT m b -> MockChainT m c # (*>) :: MockChainT m a -> MockChainT m b -> MockChainT m b # (<*) :: MockChainT m a -> MockChainT m b -> MockChainT m a # | |
MonadPlus m => MonadPlus (MockChainT m) Source # | |
Defined in Cooked.MockChain.Staged mzero :: MockChainT m a # mplus :: MockChainT m a -> MockChainT m a -> MockChainT m a # | |
(Monad m, Alternative m) => Alternative (MockChainT m) Source # | |
Defined in Cooked.MockChain.Direct empty :: MockChainT m a # (<|>) :: MockChainT m a -> MockChainT m a -> MockChainT m a # some :: MockChainT m a -> MockChainT m [a] # many :: MockChainT m a -> MockChainT m [a] # | |
Monad m => MonadBlockChain (MockChainT m) Source # | |
Defined in Cooked.MockChain.Direct validateTxSkel :: TxSkel -> MockChainT m CardanoTx Source # | |
Monad m => MonadBlockChainWithoutValidation (MockChainT m) Source # | |
Defined in Cooked.MockChain.Direct allUtxosLedger :: MockChainT m [(TxOutRef, TxOut)] Source # currentSlot :: MockChainT m Slot Source # awaitSlot :: Slot -> MockChainT m Slot Source # | |
Monad m => MonadBlockChainBalancing (MockChainT m) Source # | |
Defined in Cooked.MockChain.Direct getParams :: MockChainT m Params Source # utxosAtLedger :: Address -> MockChainT m [(TxOutRef, TxOut)] Source # datumFromHash :: DatumHash -> MockChainT m (Maybe Datum) Source # validatorFromHash :: ValidatorHash -> MockChainT m (Maybe (Versioned Validator)) Source # txOutByRefLedger :: TxOutRef -> MockChainT m (Maybe TxOut) Source # |
newtype MockChainEnv Source #
MockChainEnv | |
|
Instances
Show MockChainEnv Source # | |
Defined in Cooked.MockChain.Direct showsPrec :: Int -> MockChainEnv -> ShowS # show :: MockChainEnv -> String # showList :: [MockChainEnv] -> ShowS # | |
Default MockChainEnv Source # | |
Defined in Cooked.MockChain.Direct def :: MockChainEnv | |
Monad m => MonadReader MockChainEnv (MockChainT m) Source # | |
Defined in Cooked.MockChain.Direct ask :: MockChainT m MockChainEnv # local :: (MockChainEnv -> MockChainEnv) -> MockChainT m a -> MockChainT m a # reader :: (MockChainEnv -> a) -> MockChainT m a # |
data MockChainSt Source #
Slightly more concrete version of UtxoState
, used to actually run the
+ transaction.
txSkelInputData :: MonadBlockChainBalancing m => TxSkel -> m (Map DatumHash Datum) Source #
Look up the data on UTxOs the transaction consumes.
type MockChain = MockChainT Identity Source #
newtype MockChainT m a Source #
Instances
MonadFail StagedMockChain Source # | |
Defined in Cooked.MockChain.Staged fail :: String -> StagedMockChain a # | |
Alternative StagedMockChain Source # | |
Defined in Cooked.MockChain.Staged empty :: StagedMockChain a # (<|>) :: StagedMockChain a -> StagedMockChain a -> StagedMockChain a # some :: StagedMockChain a -> StagedMockChain [a] # many :: StagedMockChain a -> StagedMockChain [a] # | |
MonadTrans MockChainT Source # | |
Defined in Cooked.MockChain.Direct lift :: Monad m => m a -> MockChainT m a # | |
MonadBlockChain StagedMockChain Source # | |
Defined in Cooked.MockChain.Staged validateTxSkel :: TxSkel -> StagedMockChain CardanoTx Source # | |
MonadBlockChainWithoutValidation StagedMockChain Source # | |
Defined in Cooked.MockChain.Staged allUtxosLedger :: StagedMockChain [(TxOutRef, TxOut)] Source # currentSlot :: StagedMockChain Slot Source # awaitSlot :: Slot -> StagedMockChain Slot Source # | |
MonadBlockChainBalancing StagedMockChain Source # | |
Defined in Cooked.MockChain.Staged getParams :: StagedMockChain Params Source # utxosAtLedger :: Address -> StagedMockChain [(TxOutRef, TxOut)] Source # datumFromHash :: DatumHash -> StagedMockChain (Maybe Datum) Source # validatorFromHash :: ValidatorHash -> StagedMockChain (Maybe (Versioned Validator)) Source # txOutByRefLedger :: TxOutRef -> StagedMockChain (Maybe TxOut) Source # | |
MonadError MockChainError StagedMockChain Source # | |
Defined in Cooked.MockChain.Staged throwError :: MockChainError -> StagedMockChain a # catchError :: StagedMockChain a -> (MockChainError -> StagedMockChain a) -> StagedMockChain a # | |
Monad m => MonadState MockChainSt (MockChainT m) Source # | |
Defined in Cooked.MockChain.Direct get :: MockChainT m MockChainSt # put :: MockChainSt -> MockChainT m () # state :: (MockChainSt -> (a, MockChainSt)) -> MockChainT m a # | |
Monad m => MonadReader MockChainEnv (MockChainT m) Source # | |
Defined in Cooked.MockChain.Direct ask :: MockChainT m MockChainEnv # local :: (MockChainEnv -> MockChainEnv) -> MockChainT m a -> MockChainT m a # reader :: (MockChainEnv -> a) -> MockChainT m a # | |
Monad m => MonadError MockChainError (MockChainT m) Source # | |
Defined in Cooked.MockChain.Direct throwError :: MockChainError -> MockChainT m a # catchError :: MockChainT m a -> (MockChainError -> MockChainT m a) -> MockChainT m a # | |
Monad m => Monad (MockChainT m) Source # | Custom monad instance made to increase the slot count automatically |
Defined in Cooked.MockChain.Direct (>>=) :: MockChainT m a -> (a -> MockChainT m b) -> MockChainT m b # (>>) :: MockChainT m a -> MockChainT m b -> MockChainT m b # return :: a -> MockChainT m a # | |
Functor m => Functor (MockChainT m) Source # | |
Defined in Cooked.MockChain.Direct fmap :: (a -> b) -> MockChainT m a -> MockChainT m b # (<$) :: a -> MockChainT m b -> MockChainT m a # | |
Monad m => MonadFail (MockChainT m) Source # | |
Defined in Cooked.MockChain.Direct fail :: String -> MockChainT m a # | |
Monad m => Applicative (MockChainT m) Source # | |
Defined in Cooked.MockChain.Direct pure :: a -> MockChainT m a # (<*>) :: MockChainT m (a -> b) -> MockChainT m a -> MockChainT m b # liftA2 :: (a -> b -> c) -> MockChainT m a -> MockChainT m b -> MockChainT m c # (*>) :: MockChainT m a -> MockChainT m b -> MockChainT m b # (<*) :: MockChainT m a -> MockChainT m b -> MockChainT m a # | |
MonadPlus m => MonadPlus (MockChainT m) Source # | |
Defined in Cooked.MockChain.Staged mzero :: MockChainT m a # mplus :: MockChainT m a -> MockChainT m a -> MockChainT m a # | |
(Monad m, Alternative m) => Alternative (MockChainT m) Source # | |
Defined in Cooked.MockChain.Direct empty :: MockChainT m a # (<|>) :: MockChainT m a -> MockChainT m a -> MockChainT m a # some :: MockChainT m a -> MockChainT m [a] # many :: MockChainT m a -> MockChainT m [a] # | |
Monad m => MonadBlockChain (MockChainT m) Source # | |
Defined in Cooked.MockChain.Direct validateTxSkel :: TxSkel -> MockChainT m CardanoTx Source # | |
Monad m => MonadBlockChainWithoutValidation (MockChainT m) Source # | |
Defined in Cooked.MockChain.Direct allUtxosLedger :: MockChainT m [(TxOutRef, TxOut)] Source # currentSlot :: MockChainT m Slot Source # awaitSlot :: Slot -> MockChainT m Slot Source # | |
Monad m => MonadBlockChainBalancing (MockChainT m) Source # | |
Defined in Cooked.MockChain.Direct getParams :: MockChainT m Params Source # utxosAtLedger :: Address -> MockChainT m [(TxOutRef, TxOut)] Source # datumFromHash :: DatumHash -> MockChainT m (Maybe Datum) Source # validatorFromHash :: ValidatorHash -> MockChainT m (Maybe (Versioned Validator)) Source # txOutByRefLedger :: TxOutRef -> MockChainT m (Maybe TxOut) Source # |
newtype MockChainEnv Source #
MockChainEnv | |
|
Instances
Show MockChainEnv Source # | |
Defined in Cooked.MockChain.Direct showsPrec :: Int -> MockChainEnv -> ShowS # show :: MockChainEnv -> String # showList :: [MockChainEnv] -> ShowS # | |
Default MockChainEnv Source # | |
Defined in Cooked.MockChain.Direct def :: MockChainEnv | |
Monad m => MonadReader MockChainEnv (MockChainT m) Source # | |
Defined in Cooked.MockChain.Direct ask :: MockChainT m MockChainEnv # local :: (MockChainEnv -> MockChainEnv) -> MockChainT m a -> MockChainT m a # reader :: (MockChainEnv -> a) -> MockChainT m a # |
data MockChainSt Source #
Slightly more concrete version of UtxoState
, used to actually run the
simulation.
MockChainSt | |
|
Instances
Eq MockChainSt Source # | |
Defined in Cooked.MockChain.Direct (==) :: MockChainSt -> MockChainSt -> Bool # (/=) :: MockChainSt -> MockChainSt -> Bool # | |
Show MockChainSt Source # | |
Defined in Cooked.MockChain.Direct showsPrec :: Int -> MockChainSt -> ShowS # show :: MockChainSt -> String # showList :: [MockChainSt] -> ShowS # | |
Default MockChainSt Source # | |
Defined in Cooked.MockChain.Direct def :: MockChainSt | |
Monad m => MonadState MockChainSt (MockChainT m) Source # | |
Defined in Cooked.MockChain.Direct get :: MockChainT m MockChainSt # put :: MockChainSt -> MockChainT m () # state :: (MockChainSt -> (a, MockChainSt)) -> MockChainT m a # |
combineMockChainT :: Monad m => (forall a. m a -> m a -> m a) -> MockChainT m x -> MockChainT m x -> MockChainT m x Source #
mapMockChainT :: (m (Either MockChainError (a, MockChainSt)) -> n (Either MockChainError (b, MockChainSt))) -> MockChainT m a -> MockChainT n b Source #
runMockChainTRaw :: Monad m => MockChainEnv -> MockChainSt -> MockChainT m a -> m (Either MockChainError (a, MockChainSt)) Source #
Executes a MockChainT
from some initial state and environment; does not
convert the MockChainSt
into a UtxoState
.
runMockChainTFrom :: Monad m => InitialDistribution -> MockChainT m a -> m (Either MockChainError (a, UtxoState)) Source #
Executes a MockChainT
from an initial state set up with the given
initial value distribution. Similar to runMockChainT
, uses the default
@@ -53,7 +53,8 @@
custom function. This can be used, for example, to supply a custom
InitialDistribution
by providing runMockChainTFrom
.
interpretAndRun :: StagedMockChain a -> [(Either MockChainError (a, UtxoState), MockChainLog)] Source #
runTweakFrom :: MockChainEnv -> MockChainSt -> Tweak InterpMockChain a -> TxSkel -> [Either MockChainError (a, TxSkel)] Source #
somewhere :: MonadModalBlockChain m => Tweak InterpMockChain b -> m a -> m a Source #
Apply a Tweak
to some transaction in the given Trace. The tweak must
apply at least once.
everywhere :: MonadModalBlockChain m => Tweak InterpMockChain b -> m a -> m a Source #
Apply a Tweak
to every transaction in a given trace. This is also
- successful if there are no transactions at all.
withTweak :: MonadModalBlockChain m => m x -> Tweak InterpMockChain a -> m x Source #
Apply a Tweak
to the next transaction in the given trace. The order of
+ successful if there are no transactions at all.
there :: MonadModalBlockChain m => Integer -> Tweak InterpMockChain b -> m a -> m a Source #
Apply a Tweak
to the nth transaction in a given trace, 0 indexed.
+ Only successful when this transaction exists and can be modified.
withTweak :: MonadModalBlockChain m => m x -> Tweak InterpMockChain a -> m x Source #
Apply a Tweak
to the next transaction in the given trace. The order of
arguments is reversed compared to somewhere
and everywhere
, because that
enables an idiom like
do ... endpoint arguments `withTweak` someModification diff --git a/Cooked-Tweak-Common.html b/Cooked-Tweak-Common.html index 891c42cdb..3327f56c5 100644 --- a/Cooked-Tweak-Common.html +++ b/Cooked-Tweak-Common.html @@ -13,7 +13,7 @@ to a transaction skeleton and get all results as a list.If you're trying to apply a tweak to a transaction directly before it's modified, consider using
MonadModalBlockChain
and idioms likewithTweak
,somewhere
, oreverywhere
.
data UntypedTweak m where Source #
This is a wrapper type used in the implementation of the Staged monad. You
- will probably never use it while you're building Tweak
s.
UntypedTweak :: Tweak m a -> UntypedTweak m |
Instances
MonadFail StagedMockChain Source # | |
Defined in Cooked.MockChain.Staged fail :: String -> StagedMockChain a # | |
Alternative StagedMockChain Source # | |
Defined in Cooked.MockChain.Staged empty :: StagedMockChain a # (<|>) :: StagedMockChain a -> StagedMockChain a -> StagedMockChain a # some :: StagedMockChain a -> StagedMockChain [a] # many :: StagedMockChain a -> StagedMockChain [a] # | |
MonadBlockChain StagedMockChain Source # | |
Defined in Cooked.MockChain.Staged validateTxSkel :: TxSkel -> StagedMockChain CardanoTx Source # | |
MonadBlockChainWithoutValidation StagedMockChain Source # | |
Defined in Cooked.MockChain.Staged allUtxosLedger :: StagedMockChain [(TxOutRef, TxOut)] Source # currentSlot :: StagedMockChain Slot Source # awaitSlot :: Slot -> StagedMockChain Slot Source # | |
MonadBlockChainBalancing StagedMockChain Source # | |
Defined in Cooked.MockChain.Staged getParams :: StagedMockChain Params Source # utxosAtLedger :: Address -> StagedMockChain [(TxOutRef, TxOut)] Source # datumFromHash :: DatumHash -> StagedMockChain (Maybe Datum) Source # validatorFromHash :: ValidatorHash -> StagedMockChain (Maybe (Versioned Validator)) Source # txOutByRefLedger :: TxOutRef -> StagedMockChain (Maybe TxOut) Source # | |
MonadError MockChainError StagedMockChain Source # | |
Defined in Cooked.MockChain.Staged throwError :: MockChainError -> StagedMockChain a # catchError :: StagedMockChain a -> (MockChainError -> StagedMockChain a) -> StagedMockChain a # | |
Monad m => Semigroup (UntypedTweak m) Source # | |
Defined in Cooked.Tweak.Common (<>) :: UntypedTweak m -> UntypedTweak m -> UntypedTweak m # sconcat :: NonEmpty (UntypedTweak m) -> UntypedTweak m # stimes :: Integral b => b -> UntypedTweak m -> UntypedTweak m # | |
Monad m => Monoid (UntypedTweak m) Source # | |
Defined in Cooked.Tweak.Common mempty :: UntypedTweak m # mappend :: UntypedTweak m -> UntypedTweak m -> UntypedTweak m # mconcat :: [UntypedTweak m] -> UntypedTweak m # |
User API
class (MonadPlus m, MonadBlockChainWithoutValidation m) => MonadTweak m where Source #
failingTweak :: MonadTweak m => m a Source #
The never-applicable tweak.
doNothingTweak :: MonadTweak m => m () Source #
The tweak that always applies and leaves the transaction unchanged.
viewTweak :: (MonadTweak m, Is k A_Getter) => Optic' k is TxSkel a -> m a Source #
The "tweak" that obtains some value from the TxSkel
. This does *not*
+ will probably never use it while you're building Tweak
s.
UntypedTweak :: Tweak m a -> UntypedTweak m |
Instances
MonadFail StagedMockChain Source # | |
Defined in Cooked.MockChain.Staged fail :: String -> StagedMockChain a # | |
Alternative StagedMockChain Source # | |
Defined in Cooked.MockChain.Staged empty :: StagedMockChain a # (<|>) :: StagedMockChain a -> StagedMockChain a -> StagedMockChain a # some :: StagedMockChain a -> StagedMockChain [a] # many :: StagedMockChain a -> StagedMockChain [a] # | |
MonadBlockChain StagedMockChain Source # | |
Defined in Cooked.MockChain.Staged validateTxSkel :: TxSkel -> StagedMockChain CardanoTx Source # | |
MonadBlockChainWithoutValidation StagedMockChain Source # | |
Defined in Cooked.MockChain.Staged allUtxosLedger :: StagedMockChain [(TxOutRef, TxOut)] Source # currentSlot :: StagedMockChain Slot Source # awaitSlot :: Slot -> StagedMockChain Slot Source # | |
MonadBlockChainBalancing StagedMockChain Source # | |
Defined in Cooked.MockChain.Staged getParams :: StagedMockChain Params Source # utxosAtLedger :: Address -> StagedMockChain [(TxOutRef, TxOut)] Source # datumFromHash :: DatumHash -> StagedMockChain (Maybe Datum) Source # validatorFromHash :: ValidatorHash -> StagedMockChain (Maybe (Versioned Validator)) Source # txOutByRefLedger :: TxOutRef -> StagedMockChain (Maybe TxOut) Source # | |
MonadError MockChainError StagedMockChain Source # | |
Defined in Cooked.MockChain.Staged throwError :: MockChainError -> StagedMockChain a # catchError :: StagedMockChain a -> (MockChainError -> StagedMockChain a) -> StagedMockChain a # | |
Monad m => Semigroup (UntypedTweak m) Source # | |
Defined in Cooked.Tweak.Common (<>) :: UntypedTweak m -> UntypedTweak m -> UntypedTweak m # sconcat :: NonEmpty (UntypedTweak m) -> UntypedTweak m # stimes :: Integral b => b -> UntypedTweak m -> UntypedTweak m # | |
Monad m => Monoid (UntypedTweak m) Source # | |
Defined in Cooked.Tweak.Common mempty :: UntypedTweak m # mappend :: UntypedTweak m -> UntypedTweak m -> UntypedTweak m # mconcat :: [UntypedTweak m] -> UntypedTweak m # |
User API
class (MonadPlus m, MonadBlockChainWithoutValidation m) => MonadTweak m where Source #
failingTweak :: MonadTweak m => m a Source #
The never-applicable tweak.
doNothingTweak :: MonadTweak m => m () Source #
The tweak that always applies and leaves the transaction unchanged.
viewTweak :: (MonadTweak m, Is k A_Getter) => Optic' k is TxSkel a -> m a Source #
The "tweak" that obtains some value from the TxSkel
. This does *not*
modify the transaction.
viewAllTweak :: (MonadTweak m, Is k A_Fold) => Optic' k is TxSkel a -> m [a] Source #
Like the viewTweak
, but returns a list of all foci
setTweak :: (MonadTweak m, Is k A_Setter) => Optic' k is TxSkel a -> a -> m () Source #
The tweak that sets a certain value in the TxSkel
.
overTweak :: (MonadTweak m, Is k A_Setter) => Optic' k is TxSkel a -> (a -> a) -> m () Source #
The tweak that modifies a certain value in the TxSkel
.
overMaybeTweak :: (MonadTweak m, Is k A_Traversal) => Optic' k is TxSkel a -> (a -> Maybe a) -> m [a] Source #
Like w)rWl~=o
z-30KpcEwboverTweak
, but only modifies foci on which the argument function
returns Just
the new focus. Returns a list of the foci that were modified,
as they were before the tweak, and in the order in which they occurred on
diff --git a/cooked-validators.haddock b/cooked-validators.haddock
index 3405249e325c70c80e829effc46df683ee11314c..bba46cc5f7e85eb468ca0c0836e4ee9460c82040 100644
GIT binary patch
delta 2503
zcmaJ@dr*|u6~E`Z-(7hu3oE)TAn*Z3G7W-O6JJ%diP~l|ZA>yw+DsBQuoR}a7#0&u
z97UsoV(Q}-H&Ue}K3b{?!lebB2}aCA?%ST+8}&UASG?oFmW!jL+tu!
z+9a%KkdicOn6yaQ%1Ik<=d{D8JB3#v9.&&. Cooked.MockChain.Testing, Cooked.MockChain, Cooked .==. Cooked.MockChain.Testing, Cooked.MockChain, Cooked .||. Cooked.MockChain.Testing, Cooked.MockChain, Cooked adaL Cooked.ValueUtils, Cooked addFirstSignerTweak Cooked.Tweak.Signers, Cooked.Tweak, Cooked addInputTweak Cooked.Tweak.AddInputsAndOutputs, Cooked.Tweak, Cooked addLabelTweak Cooked.Tweak.Labels, Cooked.Tweak, Cooked addLastSignerTweak Cooked.Tweak.Signers, Cooked.Tweak, Cooked addMintTweak Cooked.Tweak.AddInputsAndOutputs, Cooked.Tweak, Cooked addOutputTweak Cooked.Tweak.AddInputsAndOutputs, Cooked.Tweak, Cooked addSignersTweak Cooked.Tweak.Signers, Cooked.Tweak, Cooked addTokenAttack Cooked.Attack.AddToken, Cooked.Attack, Cooked AddTokenLbl 1 (Type/Class) Cooked.Attack.AddToken, Cooked.Attack, Cooked 2 (Data Constructor) Cooked.Attack.AddToken, Cooked.Attack, Cooked addToTxSkelMints Cooked.Skeleton, Cooked AdjustExistingOutput Cooked.Skeleton, Cooked allOutPermutsTweak Cooked.Tweak.OutPermutations, Cooked.Tweak, Cooked allUtxos Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked allUtxosLedger Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked allUtxosLedgerSearch Cooked.MockChain.UtxoSearch, Cooked.MockChain, Cooked allUtxosSearch Cooked.MockChain.UtxoSearch, Cooked.MockChain, Cooked applyEmulatorParamsModification Cooked.Skeleton, Cooked applyRawModOnBalancedTx Cooked.Skeleton, Cooked app_prec Cooked.ShowBS, Cooked assertionToMaybe Cooked.MockChain.Testing, Cooked.MockChain, Cooked AsTrans 1 (Type/Class) Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked 2 (Data Constructor) Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked awaitEnclosingSlot Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked awaitSlot Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked balancedTx Cooked.MockChain.Balancing, Cooked.MockChain, Cooked balancedTxSkel Cooked.MockChain.Balancing, Cooked.MockChain, Cooked BalanceOutputPolicy Cooked.Skeleton, Cooked BalanceWith Cooked.Skeleton, Cooked BalanceWithFirstSigner Cooked.Skeleton, Cooked BalancingUtxos Cooked.Skeleton, Cooked BalancingUtxosAll Cooked.Skeleton, Cooked BalancingUtxosAllowlist Cooked.Skeleton, Cooked BalancingUtxosBlocklist Cooked.Skeleton, Cooked BalancingUtxosDatumless Cooked.Skeleton, Cooked BalancingWallet Cooked.Skeleton, Cooked Builtin Cooked.Ltl centerAroundValidityRangeTweak Cooked.Tweak.ValidityRange, Cooked.Tweak, Cooked combineMockChainT Cooked.MockChain.Direct, Cooked.MockChain, Cooked combineModsTweak Cooked.Tweak.Common, Cooked.Tweak, Cooked ConcreteOutput 1 (Type/Class) Cooked.Output, Cooked 2 (Data Constructor) Cooked.Output, Cooked currentSlot Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked currentTime Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked datumFromHash Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked datumFromTxOutRef Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked datumHijackingAttack Cooked.Attack.DatumHijacking, Cooked.Attack, Cooked DatumHijackingLbl 1 (Type/Class) Cooked.Attack.DatumHijacking, Cooked.Attack, Cooked 2 (Data Constructor) Cooked.Attack.DatumHijacking, Cooked.Attack, Cooked datumHijackingTarget Cooked.Attack.DatumHijacking, Cooked.Attack, Cooked DatumType Cooked.Output, Cooked, Cooked distinctPermutations Cooked.Tweak.OutPermutations DocCooked Cooked.Pretty.Common, Cooked.Pretty, Cooked doNothingTweak Cooked.Tweak.Common, Cooked.Tweak, Cooked DontAdjustExistingOutput Cooked.Skeleton, Cooked doubleSatAttack Cooked.Attack.DoubleSat, Cooked.Attack, Cooked DoubleSatDelta Cooked.Attack.DoubleSat, Cooked.Attack, Cooked DoubleSatLbl 1 (Type/Class) Cooked.Attack.DoubleSat, Cooked.Attack, Cooked 2 (Data Constructor) Cooked.Attack.DoubleSat, Cooked.Attack, Cooked dupTokenAttack Cooked.Attack.DupToken, Cooked.Attack, Cooked DupTokenLbl 1 (Type/Class) Cooked.Attack.DupToken, Cooked.Attack, Cooked 2 (Data Constructor) Cooked.Attack.DupToken, Cooked.Attack, Cooked EmulatorParamsModification 1 (Type/Class) Cooked.Skeleton, Cooked 2 (Data Constructor) Cooked.Skeleton, Cooked ensureInputTweak Cooked.Tweak.AddInputsAndOutputs, Cooked.Tweak, Cooked ensureOutputTweak Cooked.Tweak.AddInputsAndOutputs, Cooked.Tweak, Cooked everywhere Cooked.MockChain.Staged, Cooked.MockChain, Cooked failingTweak Cooked.Tweak.Common, Cooked.Tweak, Cooked FailWith Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked Fee 1 (Type/Class) Cooked.Skeleton, Cooked 2 (Data Constructor) Cooked.Skeleton, Cooked feeLovelace Cooked.Skeleton, Cooked filterWith Cooked.MockChain.UtxoSearch, Cooked.MockChain, Cooked filterWithOptic Cooked.MockChain.UtxoSearch, Cooked.MockChain, Cooked filterWithPred Cooked.MockChain.UtxoSearch, Cooked.MockChain, Cooked filterWithPure Cooked.MockChain.UtxoSearch, Cooked.MockChain, Cooked flattenValueI Cooked.ValueUtils, Cooked forAll Cooked.MockChain.Testing, Cooked.MockChain, Cooked generateTx Cooked.MockChain.GenerateTx generateTxBodyContent Cooked.MockChain.GenerateTx GenerateTxError Cooked.MockChain.GenerateTx GenerateTxErrorGeneral Cooked.MockChain.GenerateTx GenTxParams Cooked.MockChain.GenerateTx getEnclosingSlot Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked getIndex Cooked.MockChain.Direct, Cooked.MockChain, Cooked getParams Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked getSignersTweak Cooked.Tweak.Signers, Cooked.Tweak, Cooked getTrans Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked getTxSkel Cooked.Tweak.Common, Cooked.Tweak, Cooked getValidityRangeTweak Cooked.Tweak.ValidityRange, Cooked.Tweak, Cooked gtpCollateralIns Cooked.MockChain.GenerateTx gtpFee Cooked.MockChain.GenerateTx hasEmptyTimeRangeTweak Cooked.Tweak.ValidityRange, Cooked.Tweak, Cooked hasFullTimeRangeTweak Cooked.Tweak.ValidityRange, Cooked.Tweak, Cooked hasLabelTweak Cooked.Tweak.Labels, Cooked.Tweak, Cooked hasSignersTweak Cooked.Tweak.Signers, Cooked.Tweak, Cooked holdsInState Cooked.MockChain.UtxoState, Cooked.MockChain, Cooked InitialDistribution 1 (Type/Class) Cooked.Wallet, Cooked 2 (Data Constructor) Cooked.Wallet, Cooked initialDistribution Cooked.Wallet, Cooked Instr Cooked.Ltl interpBuiltin Cooked.Ltl InterpLtl Cooked.Ltl interpLtl Cooked.Ltl interpLtlAndPruneUnfinished Cooked.Ltl interpretAndRun Cooked.MockChain.Staged, Cooked.MockChain, Cooked interpretAndRunWith Cooked.MockChain.Staged, Cooked.MockChain, Cooked intersectValidityRangeTweak Cooked.Tweak.ValidityRange, Cooked.Tweak, Cooked IsAbstractOutput Cooked.Output, Cooked isCekEvaluationFailure Cooked.MockChain.Testing, Cooked.MockChain, Cooked isCekEvaluationFailureWithMsg Cooked.MockChain.Testing, Cooked.MockChain, Cooked isOnlyAdaOutput Cooked.Output, Cooked isOutputWithDatumHash Cooked.Output, Cooked isOutputWithInlineDatum Cooked.Output, Cooked isOutputWithInlineDatumOfType Cooked.Output, Cooked isOutputWithoutDatum Cooked.Output, Cooked isPKOutputFrom Cooked.Output, Cooked IsProp Cooked.MockChain.Testing, Cooked.MockChain, Cooked isScriptOutputFrom Cooked.Output, Cooked isSignerTweak Cooked.Tweak.Signers, Cooked.Tweak, Cooked IsTxInfoOutput Cooked.Output, Cooked isValidAtTweak Cooked.Tweak.ValidityRange, Cooked.Tweak, Cooked isValidDuringTweak Cooked.Tweak.ValidityRange, Cooked.Tweak, Cooked isValidNowTweak Cooked.Tweak.ValidityRange, Cooked.Tweak, Cooked iviewTweak Cooked.Tweak.Common, Cooked.Tweak, Cooked KeepIdentity Cooked.Tweak.OutPermutations, Cooked.Tweak, Cooked knownWallets Cooked.Wallet, Cooked LabelConstrs Cooked.Skeleton, Cooked Ltl Cooked.Ltl, Cooked LtlAnd Cooked.Ltl, Cooked LtlAtom Cooked.Ltl, Cooked LtlFalsity Cooked.Ltl, Cooked LtlNext Cooked.Ltl, Cooked LtlOp Cooked.Ltl LtlOr Cooked.Ltl, Cooked LtlRelease Cooked.Ltl, Cooked LtlTruth Cooked.Ltl, Cooked LtlUntil Cooked.Ltl, Cooked makeValidityRangeNowTweak Cooked.Tweak.ValidityRange, Cooked.Tweak, Cooked makeValidityRangeSingletonTweak Cooked.Tweak.ValidityRange, Cooked.Tweak, Cooked MalformDatumLbl 1 (Type/Class) Cooked.Tweak.TamperDatum, Cooked.Tweak, Cooked 2 (Data Constructor) Cooked.Tweak.TamperDatum, Cooked.Tweak, Cooked malformDatumTweak Cooked.Tweak.TamperDatum, Cooked.Tweak, Cooked mapMockChainT Cooked.MockChain.Direct, Cooked.MockChain, Cooked MCECalcFee Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked MCEGenerationError Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked MCENoSuitableCollateral Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked mceParams Cooked.MockChain.Direct, Cooked.MockChain, Cooked MCEUnbalanceable Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked MCEUnbalanceableError Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked MCEUnbalNotEnoughFunds Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked MCEUnbalNotEnoughReturning Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked MCEUnknownDatum Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked MCEUnknownOutRefError Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked MCEUnknownValidator Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked MCEValidationError Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked MCLogFail Cooked.MockChain.Staged, Cooked.MockChain, Cooked MCLogNewTx Cooked.MockChain.Staged, Cooked.MockChain, Cooked MCLogSubmittedTxSkel Cooked.MockChain.Staged, Cooked.MockChain, Cooked mcstCurrentSlot Cooked.MockChain.Direct, Cooked.MockChain, Cooked mcstDatums Cooked.MockChain.Direct, Cooked.MockChain, Cooked mcstIndex Cooked.MockChain.Direct, Cooked.MockChain, Cooked mcstToUtxoState Cooked.MockChain.Direct, Cooked.MockChain, Cooked mcstValidators Cooked.MockChain.Direct, Cooked.MockChain, Cooked MintsConstrs Cooked.Skeleton, Cooked MintsRedeemer Cooked.Skeleton, Cooked MockChain Cooked.MockChain.Direct, Cooked.MockChain, Cooked MockChainEnv 1 (Type/Class) Cooked.MockChain.Direct, Cooked.MockChain, Cooked 2 (Data Constructor) Cooked.MockChain.Direct, Cooked.MockChain, Cooked MockChainError Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked MockChainLog 1 (Type/Class) Cooked.MockChain.Staged 2 (Data Constructor) Cooked.MockChain.Staged MockChainLogEntry Cooked.MockChain.Staged MockChainSt 1 (Type/Class) Cooked.MockChain.Direct, Cooked.MockChain, Cooked 2 (Data Constructor) Cooked.MockChain.Direct, Cooked.MockChain, Cooked mockChainSt0 Cooked.MockChain.Direct, Cooked.MockChain, Cooked mockChainSt0From Cooked.MockChain.Direct, Cooked.MockChain, Cooked MockChainT 1 (Type/Class) Cooked.MockChain.Direct, Cooked.MockChain, Cooked 2 (Data Constructor) Cooked.MockChain.Direct, Cooked.MockChain, Cooked Modification Cooked.Ltl, Cooked modifyLtl Cooked.Ltl, Cooked modifySignersTweak Cooked.Tweak.Signers, Cooked.Tweak, Cooked MonadBlockChain Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked MonadBlockChainBalancing Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked MonadBlockChainWithoutValidation Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked MonadModal Cooked.Ltl, Cooked MonadModalBlockChain Cooked.MockChain.Staged, Cooked.MockChain, Cooked MonadTweak Cooked.Tweak.Common, Cooked.Tweak, Cooked mPrettyTxOpts Cooked.Pretty.Cooked, Cooked.Pretty, Cooked negativePart Cooked.ValueUtils, Cooked NoMintsRedeemer Cooked.Skeleton, Cooked nowLater Cooked.Ltl nowLaterList Cooked.Ltl OmitIdentity Cooked.Tweak.OutPermutations, Cooked.Tweak, Cooked OtherMockChainError Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked outputAddress Cooked.Output, Cooked outputDatumFromTxOutRef Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked outputDatumL Cooked.Output, Cooked outputOutputDatum Cooked.Output, Cooked outputOwnerL Cooked.Output, Cooked outputReferenceScriptHash Cooked.Output, Cooked outputReferenceScriptL Cooked.Output, Cooked outputStakingCredentialL Cooked.Output, Cooked outputTxOut Cooked.Output, Cooked outputValue Cooked.Output, Cooked outputValueL Cooked.Output, Cooked overMaybeSelectingTweak Cooked.Tweak.Common, Cooked.Tweak, Cooked overMaybeTweak Cooked.Tweak.Common, Cooked.Tweak, Cooked overTweak Cooked.Tweak.Common, Cooked.Tweak, Cooked OwnerType Cooked.Output, Cooked, Cooked Pays Cooked.Skeleton, Cooked paysPK Cooked.Skeleton, Cooked paysScript Cooked.Skeleton, Cooked paysScriptDatumHash Cooked.Skeleton, Cooked paysScriptInlineDatum Cooked.Skeleton, Cooked paysScriptNoDatum Cooked.Skeleton, Cooked pcOptNumericUnderscores Cooked.Pretty.Options, Cooked.Pretty, Cooked pcOptPrintDefaultTxOpts Cooked.Pretty.Options, Cooked.Pretty, Cooked pcOptPrintedHashLength Cooked.Pretty.Options, Cooked.Pretty, Cooked pcOptPrintTxHashes Cooked.Pretty.Options, Cooked.Pretty, Cooked pcOptPrintTxOutRefs Cooked.Pretty.Options, Cooked.Pretty, Cooked PCOptTxOutRefs Cooked.Pretty.Options, Cooked.Pretty, Cooked PCOptTxOutRefsFull Cooked.Pretty.Options, Cooked.Pretty, Cooked PCOptTxOutRefsHidden Cooked.Pretty.Options, Cooked.Pretty, Cooked PCOptTxOutRefsPartial Cooked.Pretty.Options, Cooked.Pretty, Cooked permanentAssetClass Cooked.Currencies, Cooked permanentCurrencyPolicy Cooked.Currencies, Cooked permanentCurrencySymbol Cooked.Currencies, Cooked permanentTokenName Cooked.Currencies, Cooked permanentValue Cooked.Currencies, Cooked PermutOutTweakMode Cooked.Tweak.OutPermutations, Cooked.Tweak, Cooked positivePart Cooked.ValueUtils, Cooked prettyAddressState Cooked.Pretty.Cooked, Cooked.Pretty, Cooked prettyBalancingWallet Cooked.Pretty.Cooked, Cooked.Pretty, Cooked PrettyCooked Cooked.Pretty.Class, Cooked.Pretty, Cooked prettyCooked Cooked.Pretty.Class, Cooked.Pretty, Cooked prettyCookedOpt Cooked.Pretty.Class, Cooked.Pretty, Cooked PrettyCookedOpts 1 (Type/Class) Cooked.Pretty.Options, Cooked.Pretty, Cooked 2 (Data Constructor) Cooked.Pretty.Options, Cooked.Pretty, Cooked prettyEnumerate Cooked.Pretty.Common, Cooked.Pretty, Cooked prettyHash Cooked.Pretty.Common, Cooked.Pretty, Cooked prettyItemize Cooked.Pretty.Common, Cooked.Pretty, Cooked prettyItemizeNonEmpty Cooked.Pretty.Common, Cooked.Pretty, Cooked prettyItemizeNoTitle Cooked.Pretty.Common, Cooked.Pretty, Cooked prettyMints Cooked.Pretty.Cooked, Cooked.Pretty, Cooked prettyPayload Cooked.Pretty.Cooked, Cooked.Pretty, Cooked prettyPayloadGrouped Cooked.Pretty.Cooked, Cooked.Pretty, Cooked prettyReferenceScriptHash Cooked.Pretty.Cooked, Cooked.Pretty, Cooked prettySigners Cooked.Pretty.Cooked, Cooked.Pretty, Cooked prettyTxSkel Cooked.Pretty.Cooked, Cooked.Pretty, Cooked prettyTxSkelIn Cooked.Pretty.Cooked, Cooked.Pretty, Cooked prettyTxSkelInReference Cooked.Pretty.Cooked, Cooked.Pretty, Cooked prettyTxSkelOut Cooked.Pretty.Cooked, Cooked.Pretty, Cooked prettyTxSkelOutDatumMaybe Cooked.Pretty.Cooked, Cooked.Pretty, Cooked printCooked Cooked.Pretty.Class, Cooked.Pretty, Cooked printCookedOpt Cooked.Pretty.Class, Cooked.Pretty, Cooked PrivateKey Cooked.Wallet, Cooked producedOutput Cooked.Skeleton, Cooked putTxSkel Cooked.Tweak.Common, Cooked.Tweak, Cooked quickAssetClass Cooked.Currencies, Cooked quickCurrencyPolicy Cooked.Currencies, Cooked quickCurrencySymbol Cooked.Currencies, Cooked quickTokenName Cooked.Currencies, Cooked quickValue Cooked.Currencies, Cooked RawModTx Cooked.Skeleton, Cooked RawModTxAfterBalancing Cooked.Skeleton, Cooked redirectScriptOutputTweak Cooked.Attack.DatumHijacking, Cooked.Attack, Cooked ReferenceScriptType Cooked.Output, Cooked, Cooked removeInputTweak Cooked.Tweak.AddInputsAndOutputs, Cooked.Tweak, Cooked removeLabelTweak Cooked.Tweak.Labels, Cooked.Tweak, Cooked removeMintTweak Cooked.Tweak.AddInputsAndOutputs, Cooked.Tweak, Cooked removeOutputTweak Cooked.Tweak.AddInputsAndOutputs, Cooked.Tweak, Cooked removeSignersTweak Cooked.Tweak.Signers, Cooked.Tweak, Cooked removeSignerTweak Cooked.Tweak.Signers, Cooked.Tweak, Cooked renderString Cooked.Pretty.Common, Cooked.Pretty, Cooked replaceFirstSignerTweak Cooked.Tweak.Signers, Cooked.Tweak, Cooked resolveDatum Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked resolveReferenceScript Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked resolveTypedDatum Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked resolveValidator Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked Return Cooked.Ltl runMockChain Cooked.MockChain.Direct, Cooked.MockChain, Cooked runMockChainFrom Cooked.MockChain.Direct, Cooked.MockChain, Cooked runMockChainRaw Cooked.MockChain.Direct, Cooked.MockChain, Cooked runMockChainT Cooked.MockChain.Direct, Cooked.MockChain, Cooked runMockChainTFrom Cooked.MockChain.Direct, Cooked.MockChain, Cooked runMockChainTRaw Cooked.MockChain.Direct, Cooked.MockChain, Cooked runTransactionValidation Cooked.MockChain.Direct, Cooked.MockChain, Cooked runTweak Cooked.MockChain.Staged, Cooked.MockChain, Cooked runTweakFrom Cooked.MockChain.Staged, Cooked.MockChain, Cooked runTweakInChain Cooked.Tweak.Common runTweakInChain' Cooked.Tweak.Common runUtxoSearch Cooked.MockChain.UtxoSearch, Cooked.MockChain, Cooked selectP Cooked.Tweak.Common, Cooked.Tweak, Cooked setAlwaysValidRangeTweak Cooked.Tweak.ValidityRange, Cooked.Tweak, Cooked setSignersTweak Cooked.Tweak.Signers, Cooked.Tweak, Cooked setTweak Cooked.Tweak.Common, Cooked.Tweak, Cooked setValidityRangeTweak Cooked.Tweak.ValidityRange, Cooked.Tweak, Cooked ShowBS Cooked.ShowBS, Cooked showBS Cooked.ShowBS, Cooked showBSs Cooked.ShowBS, Cooked showBSsPrec Cooked.ShowBS, Cooked signersSatisfyTweak Cooked.Tweak.Signers, Cooked.Tweak, Cooked singleOutPermutTweak Cooked.Tweak.OutPermutations, Cooked.Tweak, Cooked SkelContext 1 (Type/Class) Cooked.Skeleton, Cooked 2 (Data Constructor) Cooked.Skeleton, Cooked skelContextTxOuts Cooked.Skeleton, Cooked skelContextTxSkelOutDatums Cooked.Skeleton, Cooked slotRangeAfter Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked slotRangeBefore Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked slotToTimeInterval Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked SomeMintsRedeemer Cooked.Skeleton, Cooked somewhere Cooked.MockChain.Staged, Cooked.MockChain, Cooked Staged Cooked.Ltl StagedMockChain Cooked.MockChain.Staged StartLtl Cooked.Ltl StopLtl Cooked.Ltl TamperDatumLbl 1 (Type/Class) Cooked.Tweak.TamperDatum, Cooked.Tweak, Cooked 2 (Data Constructor) Cooked.Tweak.TamperDatum, Cooked.Tweak, Cooked tamperDatumTweak Cooked.Tweak.TamperDatum, Cooked.Tweak, Cooked testAll Cooked.MockChain.Testing, Cooked.MockChain, Cooked testAllSatisfiesFrom Cooked.MockChain.Testing, Cooked.MockChain, Cooked testBinaryRelatedBy Cooked.MockChain.Testing, Cooked.MockChain, Cooked testBool Cooked.MockChain.Testing, Cooked.MockChain, Cooked testConjoin Cooked.MockChain.Testing, Cooked.MockChain, Cooked testCounterexample Cooked.MockChain.Testing, Cooked.MockChain, Cooked testDisjoin Cooked.MockChain.Testing, Cooked.MockChain, Cooked testFails Cooked.MockChain.Testing, Cooked.MockChain, Cooked testFailsFrom Cooked.MockChain.Testing, Cooked.MockChain, Cooked testFailure Cooked.MockChain.Testing, Cooked.MockChain, Cooked testFailureMsg Cooked.MockChain.Testing, Cooked.MockChain, Cooked testOneEquivClass Cooked.MockChain.Testing, Cooked.MockChain, Cooked testSatisfiesFrom' Cooked.MockChain.Testing, Cooked.MockChain, Cooked testSucceeds Cooked.MockChain.Testing, Cooked.MockChain, Cooked testSucceedsFrom Cooked.MockChain.Testing, Cooked.MockChain, Cooked testSucceedsFrom' Cooked.MockChain.Testing, Cooked.MockChain, Cooked testSuccess Cooked.MockChain.Testing, Cooked.MockChain, Cooked ToCardanoError Cooked.MockChain.GenerateTx ToCredential Cooked.Output, Cooked toCredential Cooked.Output, Cooked ToOutputDatum Cooked.Output, Cooked toOutputDatum Cooked.Output, Cooked toOutputWithReferenceScriptHash Cooked.Output, Cooked ToScript Cooked.Output, Cooked toScript Cooked.Output, Cooked ToScriptHash Cooked.Output, Cooked toScriptHash Cooked.Output, Cooked ToValue Cooked.Output, Cooked toValue Cooked.Output, Cooked Tweak Cooked.Tweak.Common TxBodyError Cooked.MockChain.GenerateTx TxLabel 1 (Type/Class) Cooked.Skeleton, Cooked 2 (Data Constructor) Cooked.Skeleton, Cooked txOptAutoSlotIncrease Cooked.Skeleton, Cooked txOptAutoSlotIncreaseL Cooked.Skeleton, Cooked txOptAwaitTxConfirmed Cooked.Skeleton, Cooked txOptAwaitTxConfirmedL Cooked.Skeleton, Cooked txOptBalance Cooked.Skeleton, Cooked txOptBalanceL Cooked.Skeleton, Cooked txOptBalanceOutputPolicy Cooked.Skeleton, Cooked txOptBalanceOutputPolicyL Cooked.Skeleton, Cooked txOptBalanceWallet Cooked.Skeleton, Cooked txOptBalanceWalletL Cooked.Skeleton, Cooked txOptBalancingUtxos Cooked.Skeleton, Cooked txOptBalancingUtxosL Cooked.Skeleton, Cooked txOptEmulatorParamsModification Cooked.Skeleton, Cooked txOptEmulatorParamsModificationL Cooked.Skeleton, Cooked txOptEnsureMinAda Cooked.Skeleton, Cooked txOptEnsureMinAdaL Cooked.Skeleton, Cooked TxOpts 1 (Type/Class) Cooked.Skeleton, Cooked 2 (Data Constructor) Cooked.Skeleton, Cooked txOptUnsafeModTx Cooked.Skeleton, Cooked txOptUnsafeModTxL Cooked.Skeleton, Cooked txOutByRef Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked txOutByRefLedger Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked txOutByRefSearch Cooked.MockChain.UtxoSearch, Cooked.MockChain, Cooked txOutV2FromLedger Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked TxSkel 1 (Type/Class) Cooked.Skeleton, Cooked 2 (Data Constructor) Cooked.Skeleton, Cooked txSkelInputData Cooked.MockChain.Balancing, Cooked.MockChain, Cooked txSkelIns Cooked.Skeleton, Cooked txSkelInsL Cooked.Skeleton, Cooked txSkelInsReference Cooked.Skeleton, Cooked txSkelInsReferenceL Cooked.Skeleton, Cooked txSkelLabel Cooked.Skeleton, Cooked txSkelLabelL Cooked.Skeleton, Cooked TxSkelMints Cooked.Skeleton, Cooked txSkelMints Cooked.Skeleton, Cooked txSkelMintsFromList Cooked.Skeleton, Cooked txSkelMintsL Cooked.Skeleton, Cooked txSkelMintsToList Cooked.Skeleton, Cooked txSkelMintsValue Cooked.Skeleton, Cooked TxSkelNoRedeemerForPK Cooked.Skeleton, Cooked txSkelOpts Cooked.Skeleton, Cooked txSkelOptsL Cooked.Skeleton, Cooked TxSkelOut Cooked.Skeleton, Cooked TxSkelOutDatum 1 (Type/Class) Cooked.Skeleton, Cooked 2 (Data Constructor) Cooked.Skeleton, Cooked TxSkelOutDatumConstrs Cooked.Skeleton, Cooked TxSkelOutDatumHash Cooked.Skeleton, Cooked txSkelOutDatumL Cooked.Skeleton, Cooked TxSkelOutInlineDatum Cooked.Skeleton, Cooked TxSkelOutNoDatum Cooked.Skeleton, Cooked txSkelOutOwnerTypeP Cooked.Skeleton, Cooked txSkelOutputData Cooked.Skeleton, Cooked txSkelOutputDatumTypeAT Cooked.Skeleton, Cooked txSkelOutputValue Cooked.Skeleton, Cooked txSkelOutReferenceScripts Cooked.Skeleton, Cooked txSkelOuts Cooked.Skeleton, Cooked txSkelOutsL Cooked.Skeleton, Cooked txSkelOutToCardanoTxOut Cooked.MockChain.GenerateTx txSkelOutTypedDatum Cooked.Skeleton, Cooked txSkelOutUntypedDatum Cooked.Skeleton, Cooked txSkelOutValidator Cooked.Skeleton, Cooked txSkelOutValidators Cooked.Skeleton, Cooked txSkelOutValue Cooked.Skeleton, Cooked txSkelOutValueL Cooked.Skeleton, Cooked TxSkelRedeemer Cooked.Skeleton, Cooked TxSkelRedeemerForReferencedScript Cooked.Skeleton, Cooked TxSkelRedeemerForScript Cooked.Skeleton, Cooked txSkelSigners Cooked.Skeleton, Cooked txSkelSignersL Cooked.Skeleton, Cooked txSkelTemplate Cooked.Skeleton, Cooked txSkelTypedRedeemer Cooked.Skeleton, Cooked txSkelValidityRange Cooked.Skeleton, Cooked txSkelValidityRangeL Cooked.Skeleton, Cooked typedDatumFromTxOutRef Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked typedValidatorFromBS Cooked.RawUPLC, Cooked typedValidatorFromUPLC Cooked.RawUPLC, Cooked unInitialDistribution Cooked.Wallet, Cooked unMockChain Cooked.MockChain.Direct, Cooked.MockChain, Cooked unMockChainLog Cooked.MockChain.Staged, Cooked.MockChain, Cooked unsafeTypedValidatorFromBS Cooked.RawUPLC, Cooked unsafeTypedValidatorFromUPLC Cooked.RawUPLC, Cooked UntypedTweak 1 (Type/Class) Cooked.Tweak.Common 2 (Data Constructor) Cooked.Tweak.Common utxoIndex0 Cooked.MockChain.Direct, Cooked.MockChain, Cooked utxoIndex0From Cooked.MockChain.Direct, Cooked.MockChain, Cooked UtxoPayload 1 (Type/Class) Cooked.MockChain.UtxoState 2 (Data Constructor) Cooked.MockChain.UtxoState utxoPayloadReferenceScript Cooked.MockChain.UtxoState, Cooked.MockChain, Cooked UtxoPayloadSet 1 (Type/Class) Cooked.MockChain.UtxoState 2 (Data Constructor) Cooked.MockChain.UtxoState utxoPayloadSet Cooked.MockChain.UtxoState, Cooked.MockChain, Cooked utxoPayloadSkelOutDatum Cooked.MockChain.UtxoState, Cooked.MockChain, Cooked utxoPayloadTxOutRef Cooked.MockChain.UtxoState, Cooked.MockChain, Cooked utxoPayloadValue Cooked.MockChain.UtxoState, Cooked.MockChain, Cooked utxosAt Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked utxosAtLedger Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked utxosAtLedgerSearch Cooked.MockChain.UtxoSearch, Cooked.MockChain, Cooked utxosAtSearch Cooked.MockChain.UtxoSearch, Cooked.MockChain, Cooked utxosFromCardanoTx Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked utxosFromCardanoTxSearch Cooked.MockChain.UtxoSearch, Cooked.MockChain, Cooked UtxoState 1 (Type/Class) Cooked.MockChain.UtxoState, Cooked.MockChain, Cooked 2 (Data Constructor) Cooked.MockChain.UtxoState utxoState Cooked.MockChain.UtxoState utxoState0 Cooked.MockChain.Direct, Cooked.MockChain, Cooked validateTxSkel Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked validatorFromHash Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked validityRangeSatisfiesTweak Cooked.Tweak.ValidityRange, Cooked.Tweak, Cooked valueFromTxOutRef Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked ValueType Cooked.Output, Cooked, Cooked viewAllTweak Cooked.Tweak.Common, Cooked.Tweak, Cooked viewTweak Cooked.Tweak.Common, Cooked.Tweak, Cooked waitNSlots Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked waitUntilValidTweak Cooked.Tweak.ValidityRange, Cooked.Tweak, Cooked Wallet Cooked.Wallet, Cooked wallet Cooked.Wallet, Cooked walletAddress Cooked.Wallet, Cooked walletPK Cooked.Wallet, Cooked walletPKHash Cooked.Wallet, Cooked walletPKHashToId Cooked.Wallet, Cooked walletSK Cooked.Wallet, Cooked walletStakingPK Cooked.Wallet, Cooked walletStakingPKHash Cooked.Wallet, Cooked walletStakingSK Cooked.Wallet, Cooked withDatum Cooked.Skeleton, Cooked withDatumHash Cooked.Skeleton, Cooked withInlineDatum Cooked.Skeleton, Cooked withReferenceScript Cooked.Skeleton, Cooked withStakingCredential Cooked.Skeleton, Cooked withTweak Cooked.MockChain.Staged, Cooked.MockChain, Cooked .&&. Cooked.MockChain.Testing, Cooked.MockChain, Cooked .==. Cooked.MockChain.Testing, Cooked.MockChain, Cooked .||. Cooked.MockChain.Testing, Cooked.MockChain, Cooked adaL Cooked.ValueUtils, Cooked addFirstSignerTweak Cooked.Tweak.Signers, Cooked.Tweak, Cooked addInputTweak Cooked.Tweak.AddInputsAndOutputs, Cooked.Tweak, Cooked addLabelTweak Cooked.Tweak.Labels, Cooked.Tweak, Cooked addLastSignerTweak Cooked.Tweak.Signers, Cooked.Tweak, Cooked addMintTweak Cooked.Tweak.AddInputsAndOutputs, Cooked.Tweak, Cooked addOutputTweak Cooked.Tweak.AddInputsAndOutputs, Cooked.Tweak, Cooked addSignersTweak Cooked.Tweak.Signers, Cooked.Tweak, Cooked addTokenAttack Cooked.Attack.AddToken, Cooked.Attack, Cooked AddTokenLbl 1 (Type/Class) Cooked.Attack.AddToken, Cooked.Attack, Cooked 2 (Data Constructor) Cooked.Attack.AddToken, Cooked.Attack, Cooked addToTxSkelMints Cooked.Skeleton, Cooked AdjustExistingOutput Cooked.Skeleton, Cooked allOutPermutsTweak Cooked.Tweak.OutPermutations, Cooked.Tweak, Cooked allUtxos Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked allUtxosLedger Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked allUtxosLedgerSearch Cooked.MockChain.UtxoSearch, Cooked.MockChain, Cooked allUtxosSearch Cooked.MockChain.UtxoSearch, Cooked.MockChain, Cooked applyEmulatorParamsModification Cooked.Skeleton, Cooked applyRawModOnBalancedTx Cooked.Skeleton, Cooked app_prec Cooked.ShowBS, Cooked assertionToMaybe Cooked.MockChain.Testing, Cooked.MockChain, Cooked AsTrans 1 (Type/Class) Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked 2 (Data Constructor) Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked awaitEnclosingSlot Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked awaitSlot Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked balancedTx Cooked.MockChain.Balancing, Cooked.MockChain, Cooked balancedTxSkel Cooked.MockChain.Balancing, Cooked.MockChain, Cooked BalanceOutputPolicy Cooked.Skeleton, Cooked BalanceWith Cooked.Skeleton, Cooked BalanceWithFirstSigner Cooked.Skeleton, Cooked BalancingUtxos Cooked.Skeleton, Cooked BalancingUtxosAll Cooked.Skeleton, Cooked BalancingUtxosAllowlist Cooked.Skeleton, Cooked BalancingUtxosBlocklist Cooked.Skeleton, Cooked BalancingUtxosDatumless Cooked.Skeleton, Cooked BalancingWallet Cooked.Skeleton, Cooked Builtin Cooked.Ltl centerAroundValidityRangeTweak Cooked.Tweak.ValidityRange, Cooked.Tweak, Cooked combineMockChainT Cooked.MockChain.Direct, Cooked.MockChain, Cooked combineModsTweak Cooked.Tweak.Common, Cooked.Tweak, Cooked ConcreteOutput 1 (Type/Class) Cooked.Output, Cooked 2 (Data Constructor) Cooked.Output, Cooked currentSlot Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked currentTime Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked datumFromHash Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked datumFromTxOutRef Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked datumHijackingAttack Cooked.Attack.DatumHijacking, Cooked.Attack, Cooked DatumHijackingLbl 1 (Type/Class) Cooked.Attack.DatumHijacking, Cooked.Attack, Cooked 2 (Data Constructor) Cooked.Attack.DatumHijacking, Cooked.Attack, Cooked datumHijackingTarget Cooked.Attack.DatumHijacking, Cooked.Attack, Cooked DatumType Cooked.Output, Cooked, Cooked distinctPermutations Cooked.Tweak.OutPermutations DocCooked Cooked.Pretty.Common, Cooked.Pretty, Cooked doNothingTweak Cooked.Tweak.Common, Cooked.Tweak, Cooked DontAdjustExistingOutput Cooked.Skeleton, Cooked doubleSatAttack Cooked.Attack.DoubleSat, Cooked.Attack, Cooked DoubleSatDelta Cooked.Attack.DoubleSat, Cooked.Attack, Cooked DoubleSatLbl 1 (Type/Class) Cooked.Attack.DoubleSat, Cooked.Attack, Cooked 2 (Data Constructor) Cooked.Attack.DoubleSat, Cooked.Attack, Cooked dupTokenAttack Cooked.Attack.DupToken, Cooked.Attack, Cooked DupTokenLbl 1 (Type/Class) Cooked.Attack.DupToken, Cooked.Attack, Cooked 2 (Data Constructor) Cooked.Attack.DupToken, Cooked.Attack, Cooked EmulatorParamsModification 1 (Type/Class) Cooked.Skeleton, Cooked 2 (Data Constructor) Cooked.Skeleton, Cooked ensureInputTweak Cooked.Tweak.AddInputsAndOutputs, Cooked.Tweak, Cooked ensureOutputTweak Cooked.Tweak.AddInputsAndOutputs, Cooked.Tweak, Cooked everywhere Cooked.MockChain.Staged, Cooked.MockChain, Cooked failingTweak Cooked.Tweak.Common, Cooked.Tweak, Cooked FailWith Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked Fee 1 (Type/Class) Cooked.Skeleton, Cooked 2 (Data Constructor) Cooked.Skeleton, Cooked feeLovelace Cooked.Skeleton, Cooked filterWith Cooked.MockChain.UtxoSearch, Cooked.MockChain, Cooked filterWithOptic Cooked.MockChain.UtxoSearch, Cooked.MockChain, Cooked filterWithPred Cooked.MockChain.UtxoSearch, Cooked.MockChain, Cooked filterWithPure Cooked.MockChain.UtxoSearch, Cooked.MockChain, Cooked flattenValueI Cooked.ValueUtils, Cooked forAll Cooked.MockChain.Testing, Cooked.MockChain, Cooked generateTx Cooked.MockChain.GenerateTx generateTxBodyContent Cooked.MockChain.GenerateTx GenerateTxError Cooked.MockChain.GenerateTx GenerateTxErrorGeneral Cooked.MockChain.GenerateTx GenTxParams Cooked.MockChain.GenerateTx getEnclosingSlot Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked getIndex Cooked.MockChain.Direct, Cooked.MockChain, Cooked getParams Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked getSignersTweak Cooked.Tweak.Signers, Cooked.Tweak, Cooked getTrans Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked getTxSkel Cooked.Tweak.Common, Cooked.Tweak, Cooked getValidityRangeTweak Cooked.Tweak.ValidityRange, Cooked.Tweak, Cooked gtpCollateralIns Cooked.MockChain.GenerateTx gtpFee Cooked.MockChain.GenerateTx hasEmptyTimeRangeTweak Cooked.Tweak.ValidityRange, Cooked.Tweak, Cooked hasFullTimeRangeTweak Cooked.Tweak.ValidityRange, Cooked.Tweak, Cooked hasLabelTweak Cooked.Tweak.Labels, Cooked.Tweak, Cooked hasSignersTweak Cooked.Tweak.Signers, Cooked.Tweak, Cooked holdsInState Cooked.MockChain.UtxoState, Cooked.MockChain, Cooked InitialDistribution 1 (Type/Class) Cooked.Wallet, Cooked 2 (Data Constructor) Cooked.Wallet, Cooked initialDistribution Cooked.Wallet, Cooked Instr Cooked.Ltl interpBuiltin Cooked.Ltl InterpLtl Cooked.Ltl interpLtl Cooked.Ltl interpLtlAndPruneUnfinished Cooked.Ltl interpretAndRun Cooked.MockChain.Staged, Cooked.MockChain, Cooked interpretAndRunWith Cooked.MockChain.Staged, Cooked.MockChain, Cooked intersectValidityRangeTweak Cooked.Tweak.ValidityRange, Cooked.Tweak, Cooked IsAbstractOutput Cooked.Output, Cooked isCekEvaluationFailure Cooked.MockChain.Testing, Cooked.MockChain, Cooked isCekEvaluationFailureWithMsg Cooked.MockChain.Testing, Cooked.MockChain, Cooked isOnlyAdaOutput Cooked.Output, Cooked isOutputWithDatumHash Cooked.Output, Cooked isOutputWithInlineDatum Cooked.Output, Cooked isOutputWithInlineDatumOfType Cooked.Output, Cooked isOutputWithoutDatum Cooked.Output, Cooked isPKOutputFrom Cooked.Output, Cooked IsProp Cooked.MockChain.Testing, Cooked.MockChain, Cooked isScriptOutputFrom Cooked.Output, Cooked isSignerTweak Cooked.Tweak.Signers, Cooked.Tweak, Cooked IsTxInfoOutput Cooked.Output, Cooked isValidAtTweak Cooked.Tweak.ValidityRange, Cooked.Tweak, Cooked isValidDuringTweak Cooked.Tweak.ValidityRange, Cooked.Tweak, Cooked isValidNowTweak Cooked.Tweak.ValidityRange, Cooked.Tweak, Cooked iviewTweak Cooked.Tweak.Common, Cooked.Tweak, Cooked KeepIdentity Cooked.Tweak.OutPermutations, Cooked.Tweak, Cooked knownWallets Cooked.Wallet, Cooked LabelConstrs Cooked.Skeleton, Cooked Ltl Cooked.Ltl, Cooked LtlAnd Cooked.Ltl, Cooked LtlAtom Cooked.Ltl, Cooked LtlFalsity Cooked.Ltl, Cooked LtlNext Cooked.Ltl, Cooked LtlOp Cooked.Ltl LtlOr Cooked.Ltl, Cooked LtlRelease Cooked.Ltl, Cooked LtlTruth Cooked.Ltl, Cooked LtlUntil Cooked.Ltl, Cooked makeValidityRangeNowTweak Cooked.Tweak.ValidityRange, Cooked.Tweak, Cooked makeValidityRangeSingletonTweak Cooked.Tweak.ValidityRange, Cooked.Tweak, Cooked MalformDatumLbl 1 (Type/Class) Cooked.Tweak.TamperDatum, Cooked.Tweak, Cooked 2 (Data Constructor) Cooked.Tweak.TamperDatum, Cooked.Tweak, Cooked malformDatumTweak Cooked.Tweak.TamperDatum, Cooked.Tweak, Cooked mapMockChainT Cooked.MockChain.Direct, Cooked.MockChain, Cooked MCECalcFee Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked MCEGenerationError Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked MCENoSuitableCollateral Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked mceParams Cooked.MockChain.Direct, Cooked.MockChain, Cooked MCEUnbalanceable Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked MCEUnbalanceableError Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked MCEUnbalNotEnoughFunds Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked MCEUnbalNotEnoughReturning Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked MCEUnknownDatum Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked MCEUnknownOutRefError Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked MCEUnknownValidator Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked MCEValidationError Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked MCLogFail Cooked.MockChain.Staged, Cooked.MockChain, Cooked MCLogNewTx Cooked.MockChain.Staged, Cooked.MockChain, Cooked MCLogSubmittedTxSkel Cooked.MockChain.Staged, Cooked.MockChain, Cooked mcstCurrentSlot Cooked.MockChain.Direct, Cooked.MockChain, Cooked mcstDatums Cooked.MockChain.Direct, Cooked.MockChain, Cooked mcstIndex Cooked.MockChain.Direct, Cooked.MockChain, Cooked mcstToUtxoState Cooked.MockChain.Direct, Cooked.MockChain, Cooked mcstValidators Cooked.MockChain.Direct, Cooked.MockChain, Cooked MintsConstrs Cooked.Skeleton, Cooked MintsRedeemer Cooked.Skeleton, Cooked MockChain Cooked.MockChain.Direct, Cooked.MockChain, Cooked MockChainEnv 1 (Type/Class) Cooked.MockChain.Direct, Cooked.MockChain, Cooked 2 (Data Constructor) Cooked.MockChain.Direct, Cooked.MockChain, Cooked MockChainError Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked MockChainLog 1 (Type/Class) Cooked.MockChain.Staged 2 (Data Constructor) Cooked.MockChain.Staged MockChainLogEntry Cooked.MockChain.Staged MockChainSt 1 (Type/Class) Cooked.MockChain.Direct, Cooked.MockChain, Cooked 2 (Data Constructor) Cooked.MockChain.Direct, Cooked.MockChain, Cooked mockChainSt0 Cooked.MockChain.Direct, Cooked.MockChain, Cooked mockChainSt0From Cooked.MockChain.Direct, Cooked.MockChain, Cooked MockChainT 1 (Type/Class) Cooked.MockChain.Direct, Cooked.MockChain, Cooked 2 (Data Constructor) Cooked.MockChain.Direct, Cooked.MockChain, Cooked Modification Cooked.Ltl, Cooked modifyLtl Cooked.Ltl, Cooked modifySignersTweak Cooked.Tweak.Signers, Cooked.Tweak, Cooked MonadBlockChain Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked MonadBlockChainBalancing Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked MonadBlockChainWithoutValidation Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked MonadModal Cooked.Ltl, Cooked MonadModalBlockChain Cooked.MockChain.Staged, Cooked.MockChain, Cooked MonadTweak Cooked.Tweak.Common, Cooked.Tweak, Cooked mPrettyTxOpts Cooked.Pretty.Cooked, Cooked.Pretty, Cooked negativePart Cooked.ValueUtils, Cooked NoMintsRedeemer Cooked.Skeleton, Cooked nowLater Cooked.Ltl nowLaterList Cooked.Ltl OmitIdentity Cooked.Tweak.OutPermutations, Cooked.Tweak, Cooked OtherMockChainError Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked outputAddress Cooked.Output, Cooked outputDatumFromTxOutRef Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked outputDatumL Cooked.Output, Cooked outputOutputDatum Cooked.Output, Cooked outputOwnerL Cooked.Output, Cooked outputReferenceScriptHash Cooked.Output, Cooked outputReferenceScriptL Cooked.Output, Cooked outputStakingCredentialL Cooked.Output, Cooked outputTxOut Cooked.Output, Cooked outputValue Cooked.Output, Cooked outputValueL Cooked.Output, Cooked overMaybeSelectingTweak Cooked.Tweak.Common, Cooked.Tweak, Cooked overMaybeTweak Cooked.Tweak.Common, Cooked.Tweak, Cooked overTweak Cooked.Tweak.Common, Cooked.Tweak, Cooked OwnerType Cooked.Output, Cooked, Cooked Pays Cooked.Skeleton, Cooked paysPK Cooked.Skeleton, Cooked paysScript Cooked.Skeleton, Cooked paysScriptDatumHash Cooked.Skeleton, Cooked paysScriptInlineDatum Cooked.Skeleton, Cooked paysScriptNoDatum Cooked.Skeleton, Cooked pcOptNumericUnderscores Cooked.Pretty.Options, Cooked.Pretty, Cooked pcOptPrintDefaultTxOpts Cooked.Pretty.Options, Cooked.Pretty, Cooked pcOptPrintedHashLength Cooked.Pretty.Options, Cooked.Pretty, Cooked pcOptPrintTxHashes Cooked.Pretty.Options, Cooked.Pretty, Cooked pcOptPrintTxOutRefs Cooked.Pretty.Options, Cooked.Pretty, Cooked PCOptTxOutRefs Cooked.Pretty.Options, Cooked.Pretty, Cooked PCOptTxOutRefsFull Cooked.Pretty.Options, Cooked.Pretty, Cooked PCOptTxOutRefsHidden Cooked.Pretty.Options, Cooked.Pretty, Cooked PCOptTxOutRefsPartial Cooked.Pretty.Options, Cooked.Pretty, Cooked permanentAssetClass Cooked.Currencies, Cooked permanentCurrencyPolicy Cooked.Currencies, Cooked permanentCurrencySymbol Cooked.Currencies, Cooked permanentTokenName Cooked.Currencies, Cooked permanentValue Cooked.Currencies, Cooked PermutOutTweakMode Cooked.Tweak.OutPermutations, Cooked.Tweak, Cooked positivePart Cooked.ValueUtils, Cooked prettyAddressState Cooked.Pretty.Cooked, Cooked.Pretty, Cooked prettyBalancingWallet Cooked.Pretty.Cooked, Cooked.Pretty, Cooked PrettyCooked Cooked.Pretty.Class, Cooked.Pretty, Cooked prettyCooked Cooked.Pretty.Class, Cooked.Pretty, Cooked prettyCookedOpt Cooked.Pretty.Class, Cooked.Pretty, Cooked PrettyCookedOpts 1 (Type/Class) Cooked.Pretty.Options, Cooked.Pretty, Cooked 2 (Data Constructor) Cooked.Pretty.Options, Cooked.Pretty, Cooked prettyEnumerate Cooked.Pretty.Common, Cooked.Pretty, Cooked prettyHash Cooked.Pretty.Common, Cooked.Pretty, Cooked prettyItemize Cooked.Pretty.Common, Cooked.Pretty, Cooked prettyItemizeNonEmpty Cooked.Pretty.Common, Cooked.Pretty, Cooked prettyItemizeNoTitle Cooked.Pretty.Common, Cooked.Pretty, Cooked prettyMints Cooked.Pretty.Cooked, Cooked.Pretty, Cooked prettyPayload Cooked.Pretty.Cooked, Cooked.Pretty, Cooked prettyPayloadGrouped Cooked.Pretty.Cooked, Cooked.Pretty, Cooked prettyReferenceScriptHash Cooked.Pretty.Cooked, Cooked.Pretty, Cooked prettySigners Cooked.Pretty.Cooked, Cooked.Pretty, Cooked prettyTxSkel Cooked.Pretty.Cooked, Cooked.Pretty, Cooked prettyTxSkelIn Cooked.Pretty.Cooked, Cooked.Pretty, Cooked prettyTxSkelInReference Cooked.Pretty.Cooked, Cooked.Pretty, Cooked prettyTxSkelOut Cooked.Pretty.Cooked, Cooked.Pretty, Cooked prettyTxSkelOutDatumMaybe Cooked.Pretty.Cooked, Cooked.Pretty, Cooked printCooked Cooked.Pretty.Class, Cooked.Pretty, Cooked printCookedOpt Cooked.Pretty.Class, Cooked.Pretty, Cooked PrivateKey Cooked.Wallet, Cooked producedOutput Cooked.Skeleton, Cooked putTxSkel Cooked.Tweak.Common, Cooked.Tweak, Cooked quickAssetClass Cooked.Currencies, Cooked quickCurrencyPolicy Cooked.Currencies, Cooked quickCurrencySymbol Cooked.Currencies, Cooked quickTokenName Cooked.Currencies, Cooked quickValue Cooked.Currencies, Cooked RawModTx Cooked.Skeleton, Cooked RawModTxAfterBalancing Cooked.Skeleton, Cooked redirectScriptOutputTweak Cooked.Attack.DatumHijacking, Cooked.Attack, Cooked ReferenceScriptType Cooked.Output, Cooked, Cooked removeInputTweak Cooked.Tweak.AddInputsAndOutputs, Cooked.Tweak, Cooked removeLabelTweak Cooked.Tweak.Labels, Cooked.Tweak, Cooked removeMintTweak Cooked.Tweak.AddInputsAndOutputs, Cooked.Tweak, Cooked removeOutputTweak Cooked.Tweak.AddInputsAndOutputs, Cooked.Tweak, Cooked removeSignersTweak Cooked.Tweak.Signers, Cooked.Tweak, Cooked removeSignerTweak Cooked.Tweak.Signers, Cooked.Tweak, Cooked renderString Cooked.Pretty.Common, Cooked.Pretty, Cooked replaceFirstSignerTweak Cooked.Tweak.Signers, Cooked.Tweak, Cooked resolveDatum Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked resolveReferenceScript Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked resolveTypedDatum Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked resolveValidator Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked Return Cooked.Ltl runMockChain Cooked.MockChain.Direct, Cooked.MockChain, Cooked runMockChainFrom Cooked.MockChain.Direct, Cooked.MockChain, Cooked runMockChainRaw Cooked.MockChain.Direct, Cooked.MockChain, Cooked runMockChainT Cooked.MockChain.Direct, Cooked.MockChain, Cooked runMockChainTFrom Cooked.MockChain.Direct, Cooked.MockChain, Cooked runMockChainTRaw Cooked.MockChain.Direct, Cooked.MockChain, Cooked runTransactionValidation Cooked.MockChain.Direct, Cooked.MockChain, Cooked runTweak Cooked.MockChain.Staged, Cooked.MockChain, Cooked runTweakFrom Cooked.MockChain.Staged, Cooked.MockChain, Cooked runTweakInChain Cooked.Tweak.Common runTweakInChain' Cooked.Tweak.Common runUtxoSearch Cooked.MockChain.UtxoSearch, Cooked.MockChain, Cooked selectP Cooked.Tweak.Common, Cooked.Tweak, Cooked setAlwaysValidRangeTweak Cooked.Tweak.ValidityRange, Cooked.Tweak, Cooked setSignersTweak Cooked.Tweak.Signers, Cooked.Tweak, Cooked setTweak Cooked.Tweak.Common, Cooked.Tweak, Cooked setValidityRangeTweak Cooked.Tweak.ValidityRange, Cooked.Tweak, Cooked ShowBS Cooked.ShowBS, Cooked showBS Cooked.ShowBS, Cooked showBSs Cooked.ShowBS, Cooked showBSsPrec Cooked.ShowBS, Cooked signersSatisfyTweak Cooked.Tweak.Signers, Cooked.Tweak, Cooked singleOutPermutTweak Cooked.Tweak.OutPermutations, Cooked.Tweak, Cooked SkelContext 1 (Type/Class) Cooked.Skeleton, Cooked 2 (Data Constructor) Cooked.Skeleton, Cooked skelContextTxOuts Cooked.Skeleton, Cooked skelContextTxSkelOutDatums Cooked.Skeleton, Cooked slotRangeAfter Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked slotRangeBefore Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked slotToTimeInterval Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked SomeMintsRedeemer Cooked.Skeleton, Cooked somewhere Cooked.MockChain.Staged, Cooked.MockChain, Cooked Staged Cooked.Ltl StagedMockChain Cooked.MockChain.Staged StartLtl Cooked.Ltl StopLtl Cooked.Ltl TamperDatumLbl 1 (Type/Class) Cooked.Tweak.TamperDatum, Cooked.Tweak, Cooked 2 (Data Constructor) Cooked.Tweak.TamperDatum, Cooked.Tweak, Cooked tamperDatumTweak Cooked.Tweak.TamperDatum, Cooked.Tweak, Cooked testAll Cooked.MockChain.Testing, Cooked.MockChain, Cooked testAllSatisfiesFrom Cooked.MockChain.Testing, Cooked.MockChain, Cooked testBinaryRelatedBy Cooked.MockChain.Testing, Cooked.MockChain, Cooked testBool Cooked.MockChain.Testing, Cooked.MockChain, Cooked testConjoin Cooked.MockChain.Testing, Cooked.MockChain, Cooked testCounterexample Cooked.MockChain.Testing, Cooked.MockChain, Cooked testDisjoin Cooked.MockChain.Testing, Cooked.MockChain, Cooked testFails Cooked.MockChain.Testing, Cooked.MockChain, Cooked testFailsFrom Cooked.MockChain.Testing, Cooked.MockChain, Cooked testFailure Cooked.MockChain.Testing, Cooked.MockChain, Cooked testFailureMsg Cooked.MockChain.Testing, Cooked.MockChain, Cooked testOneEquivClass Cooked.MockChain.Testing, Cooked.MockChain, Cooked testSatisfiesFrom' Cooked.MockChain.Testing, Cooked.MockChain, Cooked testSucceeds Cooked.MockChain.Testing, Cooked.MockChain, Cooked testSucceedsFrom Cooked.MockChain.Testing, Cooked.MockChain, Cooked testSucceedsFrom' Cooked.MockChain.Testing, Cooked.MockChain, Cooked testSuccess Cooked.MockChain.Testing, Cooked.MockChain, Cooked there Cooked.MockChain.Staged, Cooked.MockChain, Cooked ToCardanoError Cooked.MockChain.GenerateTx ToCredential Cooked.Output, Cooked toCredential Cooked.Output, Cooked ToOutputDatum Cooked.Output, Cooked toOutputDatum Cooked.Output, Cooked toOutputWithReferenceScriptHash Cooked.Output, Cooked ToScript Cooked.Output, Cooked toScript Cooked.Output, Cooked ToScriptHash Cooked.Output, Cooked toScriptHash Cooked.Output, Cooked ToValue Cooked.Output, Cooked toValue Cooked.Output, Cooked Tweak Cooked.Tweak.Common TxBodyError Cooked.MockChain.GenerateTx TxLabel 1 (Type/Class) Cooked.Skeleton, Cooked 2 (Data Constructor) Cooked.Skeleton, Cooked txOptAutoSlotIncrease Cooked.Skeleton, Cooked txOptAutoSlotIncreaseL Cooked.Skeleton, Cooked txOptAwaitTxConfirmed Cooked.Skeleton, Cooked txOptAwaitTxConfirmedL Cooked.Skeleton, Cooked txOptBalance Cooked.Skeleton, Cooked txOptBalanceL Cooked.Skeleton, Cooked txOptBalanceOutputPolicy Cooked.Skeleton, Cooked txOptBalanceOutputPolicyL Cooked.Skeleton, Cooked txOptBalanceWallet Cooked.Skeleton, Cooked txOptBalanceWalletL Cooked.Skeleton, Cooked txOptBalancingUtxos Cooked.Skeleton, Cooked txOptBalancingUtxosL Cooked.Skeleton, Cooked txOptEmulatorParamsModification Cooked.Skeleton, Cooked txOptEmulatorParamsModificationL Cooked.Skeleton, Cooked txOptEnsureMinAda Cooked.Skeleton, Cooked txOptEnsureMinAdaL Cooked.Skeleton, Cooked TxOpts 1 (Type/Class) Cooked.Skeleton, Cooked 2 (Data Constructor) Cooked.Skeleton, Cooked txOptUnsafeModTx Cooked.Skeleton, Cooked txOptUnsafeModTxL Cooked.Skeleton, Cooked txOutByRef Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked txOutByRefLedger Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked txOutByRefSearch Cooked.MockChain.UtxoSearch, Cooked.MockChain, Cooked txOutV2FromLedger Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked TxSkel 1 (Type/Class) Cooked.Skeleton, Cooked 2 (Data Constructor) Cooked.Skeleton, Cooked txSkelInputData Cooked.MockChain.Balancing, Cooked.MockChain, Cooked txSkelIns Cooked.Skeleton, Cooked txSkelInsL Cooked.Skeleton, Cooked txSkelInsReference Cooked.Skeleton, Cooked txSkelInsReferenceL Cooked.Skeleton, Cooked txSkelLabel Cooked.Skeleton, Cooked txSkelLabelL Cooked.Skeleton, Cooked TxSkelMints Cooked.Skeleton, Cooked txSkelMints Cooked.Skeleton, Cooked txSkelMintsFromList Cooked.Skeleton, Cooked txSkelMintsL Cooked.Skeleton, Cooked txSkelMintsToList Cooked.Skeleton, Cooked txSkelMintsValue Cooked.Skeleton, Cooked TxSkelNoRedeemerForPK Cooked.Skeleton, Cooked txSkelOpts Cooked.Skeleton, Cooked txSkelOptsL Cooked.Skeleton, Cooked TxSkelOut Cooked.Skeleton, Cooked TxSkelOutDatum 1 (Type/Class) Cooked.Skeleton, Cooked 2 (Data Constructor) Cooked.Skeleton, Cooked TxSkelOutDatumConstrs Cooked.Skeleton, Cooked TxSkelOutDatumHash Cooked.Skeleton, Cooked txSkelOutDatumL Cooked.Skeleton, Cooked TxSkelOutInlineDatum Cooked.Skeleton, Cooked TxSkelOutNoDatum Cooked.Skeleton, Cooked txSkelOutOwnerTypeP Cooked.Skeleton, Cooked txSkelOutputData Cooked.Skeleton, Cooked txSkelOutputDatumTypeAT Cooked.Skeleton, Cooked txSkelOutputValue Cooked.Skeleton, Cooked txSkelOutReferenceScripts Cooked.Skeleton, Cooked txSkelOuts Cooked.Skeleton, Cooked txSkelOutsL Cooked.Skeleton, Cooked txSkelOutToCardanoTxOut Cooked.MockChain.GenerateTx txSkelOutTypedDatum Cooked.Skeleton, Cooked txSkelOutUntypedDatum Cooked.Skeleton, Cooked txSkelOutValidator Cooked.Skeleton, Cooked txSkelOutValidators Cooked.Skeleton, Cooked txSkelOutValue Cooked.Skeleton, Cooked txSkelOutValueL Cooked.Skeleton, Cooked TxSkelRedeemer Cooked.Skeleton, Cooked TxSkelRedeemerForReferencedScript Cooked.Skeleton, Cooked TxSkelRedeemerForScript Cooked.Skeleton, Cooked txSkelSigners Cooked.Skeleton, Cooked txSkelSignersL Cooked.Skeleton, Cooked txSkelTemplate Cooked.Skeleton, Cooked txSkelTypedRedeemer Cooked.Skeleton, Cooked txSkelValidityRange Cooked.Skeleton, Cooked txSkelValidityRangeL Cooked.Skeleton, Cooked typedDatumFromTxOutRef Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked typedValidatorFromBS Cooked.RawUPLC, Cooked typedValidatorFromUPLC Cooked.RawUPLC, Cooked unInitialDistribution Cooked.Wallet, Cooked unMockChain Cooked.MockChain.Direct, Cooked.MockChain, Cooked unMockChainLog Cooked.MockChain.Staged, Cooked.MockChain, Cooked unsafeTypedValidatorFromBS Cooked.RawUPLC, Cooked unsafeTypedValidatorFromUPLC Cooked.RawUPLC, Cooked UntypedTweak 1 (Type/Class) Cooked.Tweak.Common 2 (Data Constructor) Cooked.Tweak.Common utxoIndex0 Cooked.MockChain.Direct, Cooked.MockChain, Cooked utxoIndex0From Cooked.MockChain.Direct, Cooked.MockChain, Cooked UtxoPayload 1 (Type/Class) Cooked.MockChain.UtxoState 2 (Data Constructor) Cooked.MockChain.UtxoState utxoPayloadReferenceScript Cooked.MockChain.UtxoState, Cooked.MockChain, Cooked UtxoPayloadSet 1 (Type/Class) Cooked.MockChain.UtxoState 2 (Data Constructor) Cooked.MockChain.UtxoState utxoPayloadSet Cooked.MockChain.UtxoState, Cooked.MockChain, Cooked utxoPayloadSkelOutDatum Cooked.MockChain.UtxoState, Cooked.MockChain, Cooked utxoPayloadTxOutRef Cooked.MockChain.UtxoState, Cooked.MockChain, Cooked utxoPayloadValue Cooked.MockChain.UtxoState, Cooked.MockChain, Cooked utxosAt Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked utxosAtLedger Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked utxosAtLedgerSearch Cooked.MockChain.UtxoSearch, Cooked.MockChain, Cooked utxosAtSearch Cooked.MockChain.UtxoSearch, Cooked.MockChain, Cooked utxosFromCardanoTx Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked utxosFromCardanoTxSearch Cooked.MockChain.UtxoSearch, Cooked.MockChain, Cooked UtxoState 1 (Type/Class) Cooked.MockChain.UtxoState, Cooked.MockChain, Cooked 2 (Data Constructor) Cooked.MockChain.UtxoState utxoState Cooked.MockChain.UtxoState utxoState0 Cooked.MockChain.Direct, Cooked.MockChain, Cooked validateTxSkel Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked validatorFromHash Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked validityRangeSatisfiesTweak Cooked.Tweak.ValidityRange, Cooked.Tweak, Cooked valueFromTxOutRef Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked ValueType Cooked.Output, Cooked, Cooked viewAllTweak Cooked.Tweak.Common, Cooked.Tweak, Cooked viewTweak Cooked.Tweak.Common, Cooked.Tweak, Cooked waitNSlots Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked waitUntilValidTweak Cooked.Tweak.ValidityRange, Cooked.Tweak, Cooked Wallet Cooked.Wallet, Cooked wallet Cooked.Wallet, Cooked walletAddress Cooked.Wallet, Cooked walletPK Cooked.Wallet, Cooked walletPKHash Cooked.Wallet, Cooked walletPKHashToId Cooked.Wallet, Cooked walletSK Cooked.Wallet, Cooked walletStakingPK Cooked.Wallet, Cooked walletStakingPKHash Cooked.Wallet, Cooked walletStakingSK Cooked.Wallet, Cooked withDatum Cooked.Skeleton, Cooked withDatumHash Cooked.Skeleton, Cooked withInlineDatum Cooked.Skeleton, Cooked withReferenceScript Cooked.Skeleton, Cooked withStakingCredential Cooked.Skeleton, Cooked withTweak Cooked.MockChain.Staged, Cooked.MockChain, Cooked TamperDatumLbl 1 (Type/Class) Cooked.Tweak.TamperDatum, Cooked.Tweak, Cooked 2 (Data Constructor) Cooked.Tweak.TamperDatum, Cooked.Tweak, Cooked tamperDatumTweak Cooked.Tweak.TamperDatum, Cooked.Tweak, Cooked testAll Cooked.MockChain.Testing, Cooked.MockChain, Cooked testAllSatisfiesFrom Cooked.MockChain.Testing, Cooked.MockChain, Cooked testBinaryRelatedBy Cooked.MockChain.Testing, Cooked.MockChain, Cooked testBool Cooked.MockChain.Testing, Cooked.MockChain, Cooked testConjoin Cooked.MockChain.Testing, Cooked.MockChain, Cooked testCounterexample Cooked.MockChain.Testing, Cooked.MockChain, Cooked testDisjoin Cooked.MockChain.Testing, Cooked.MockChain, Cooked testFails Cooked.MockChain.Testing, Cooked.MockChain, Cooked testFailsFrom Cooked.MockChain.Testing, Cooked.MockChain, Cooked testFailure Cooked.MockChain.Testing, Cooked.MockChain, Cooked testFailureMsg Cooked.MockChain.Testing, Cooked.MockChain, Cooked testOneEquivClass Cooked.MockChain.Testing, Cooked.MockChain, Cooked testSatisfiesFrom' Cooked.MockChain.Testing, Cooked.MockChain, Cooked testSucceeds Cooked.MockChain.Testing, Cooked.MockChain, Cooked testSucceedsFrom Cooked.MockChain.Testing, Cooked.MockChain, Cooked testSucceedsFrom' Cooked.MockChain.Testing, Cooked.MockChain, Cooked testSuccess Cooked.MockChain.Testing, Cooked.MockChain, Cooked ToCardanoError Cooked.MockChain.GenerateTx ToCredential Cooked.Output, Cooked toCredential Cooked.Output, Cooked ToOutputDatum Cooked.Output, Cooked toOutputDatum Cooked.Output, Cooked toOutputWithReferenceScriptHash Cooked.Output, Cooked ToScript Cooked.Output, Cooked toScript Cooked.Output, Cooked ToScriptHash Cooked.Output, Cooked toScriptHash Cooked.Output, Cooked ToValue Cooked.Output, Cooked toValue Cooked.Output, Cooked Tweak Cooked.Tweak.Common TxBodyError Cooked.MockChain.GenerateTx TxLabel 1 (Type/Class) Cooked.Skeleton, Cooked 2 (Data Constructor) Cooked.Skeleton, Cooked txOptAutoSlotIncrease Cooked.Skeleton, Cooked txOptAutoSlotIncreaseL Cooked.Skeleton, Cooked txOptAwaitTxConfirmed Cooked.Skeleton, Cooked txOptAwaitTxConfirmedL Cooked.Skeleton, Cooked txOptBalance Cooked.Skeleton, Cooked txOptBalanceL Cooked.Skeleton, Cooked txOptBalanceOutputPolicy Cooked.Skeleton, Cooked txOptBalanceOutputPolicyL Cooked.Skeleton, Cooked txOptBalanceWallet Cooked.Skeleton, Cooked txOptBalanceWalletL Cooked.Skeleton, Cooked txOptBalancingUtxos Cooked.Skeleton, Cooked txOptBalancingUtxosL Cooked.Skeleton, Cooked txOptEmulatorParamsModification Cooked.Skeleton, Cooked txOptEmulatorParamsModificationL Cooked.Skeleton, Cooked txOptEnsureMinAda Cooked.Skeleton, Cooked txOptEnsureMinAdaL Cooked.Skeleton, Cooked TxOpts 1 (Type/Class) Cooked.Skeleton, Cooked 2 (Data Constructor) Cooked.Skeleton, Cooked txOptUnsafeModTx Cooked.Skeleton, Cooked txOptUnsafeModTxL Cooked.Skeleton, Cooked txOutByRef Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked txOutByRefLedger Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked txOutByRefSearch Cooked.MockChain.UtxoSearch, Cooked.MockChain, Cooked txOutV2FromLedger Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked TxSkel 1 (Type/Class) Cooked.Skeleton, Cooked 2 (Data Constructor) Cooked.Skeleton, Cooked txSkelInputData Cooked.MockChain.Balancing, Cooked.MockChain, Cooked txSkelIns Cooked.Skeleton, Cooked txSkelInsL Cooked.Skeleton, Cooked txSkelInsReference Cooked.Skeleton, Cooked txSkelInsReferenceL Cooked.Skeleton, Cooked txSkelLabel Cooked.Skeleton, Cooked txSkelLabelL Cooked.Skeleton, Cooked TxSkelMints Cooked.Skeleton, Cooked txSkelMints Cooked.Skeleton, Cooked txSkelMintsFromList Cooked.Skeleton, Cooked txSkelMintsL Cooked.Skeleton, Cooked txSkelMintsToList Cooked.Skeleton, Cooked txSkelMintsValue Cooked.Skeleton, Cooked TxSkelNoRedeemerForPK Cooked.Skeleton, Cooked txSkelOpts Cooked.Skeleton, Cooked txSkelOptsL Cooked.Skeleton, Cooked TxSkelOut Cooked.Skeleton, Cooked TxSkelOutDatum 1 (Type/Class) Cooked.Skeleton, Cooked 2 (Data Constructor) Cooked.Skeleton, Cooked TxSkelOutDatumConstrs Cooked.Skeleton, Cooked TxSkelOutDatumHash Cooked.Skeleton, Cooked txSkelOutDatumL Cooked.Skeleton, Cooked TxSkelOutInlineDatum Cooked.Skeleton, Cooked TxSkelOutNoDatum Cooked.Skeleton, Cooked txSkelOutOwnerTypeP Cooked.Skeleton, Cooked txSkelOutputData Cooked.Skeleton, Cooked txSkelOutputDatumTypeAT Cooked.Skeleton, Cooked txSkelOutputValue Cooked.Skeleton, Cooked txSkelOutReferenceScripts Cooked.Skeleton, Cooked txSkelOuts Cooked.Skeleton, Cooked txSkelOutsL Cooked.Skeleton, Cooked txSkelOutToCardanoTxOut Cooked.MockChain.GenerateTx txSkelOutTypedDatum Cooked.Skeleton, Cooked txSkelOutUntypedDatum Cooked.Skeleton, Cooked txSkelOutValidator Cooked.Skeleton, Cooked txSkelOutValidators Cooked.Skeleton, Cooked txSkelOutValue Cooked.Skeleton, Cooked txSkelOutValueL Cooked.Skeleton, Cooked TxSkelRedeemer Cooked.Skeleton, Cooked TxSkelRedeemerForReferencedScript Cooked.Skeleton, Cooked TxSkelRedeemerForScript Cooked.Skeleton, Cooked txSkelSigners Cooked.Skeleton, Cooked txSkelSignersL Cooked.Skeleton, Cooked txSkelTemplate Cooked.Skeleton, Cooked txSkelTypedRedeemer Cooked.Skeleton, Cooked txSkelValidityRange Cooked.Skeleton, Cooked txSkelValidityRangeL Cooked.Skeleton, Cooked typedDatumFromTxOutRef Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked typedValidatorFromBS Cooked.RawUPLC, Cooked typedValidatorFromUPLC Cooked.RawUPLC, Cooked TamperDatumLbl 1 (Type/Class) Cooked.Tweak.TamperDatum, Cooked.Tweak, Cooked 2 (Data Constructor) Cooked.Tweak.TamperDatum, Cooked.Tweak, Cooked tamperDatumTweak Cooked.Tweak.TamperDatum, Cooked.Tweak, Cooked testAll Cooked.MockChain.Testing, Cooked.MockChain, Cooked testAllSatisfiesFrom Cooked.MockChain.Testing, Cooked.MockChain, Cooked testBinaryRelatedBy Cooked.MockChain.Testing, Cooked.MockChain, Cooked testBool Cooked.MockChain.Testing, Cooked.MockChain, Cooked testConjoin Cooked.MockChain.Testing, Cooked.MockChain, Cooked testCounterexample Cooked.MockChain.Testing, Cooked.MockChain, Cooked testDisjoin Cooked.MockChain.Testing, Cooked.MockChain, Cooked testFails Cooked.MockChain.Testing, Cooked.MockChain, Cooked testFailsFrom Cooked.MockChain.Testing, Cooked.MockChain, Cooked testFailure Cooked.MockChain.Testing, Cooked.MockChain, Cooked testFailureMsg Cooked.MockChain.Testing, Cooked.MockChain, Cooked testOneEquivClass Cooked.MockChain.Testing, Cooked.MockChain, Cooked testSatisfiesFrom' Cooked.MockChain.Testing, Cooked.MockChain, Cooked testSucceeds Cooked.MockChain.Testing, Cooked.MockChain, Cooked testSucceedsFrom Cooked.MockChain.Testing, Cooked.MockChain, Cooked testSucceedsFrom' Cooked.MockChain.Testing, Cooked.MockChain, Cooked testSuccess Cooked.MockChain.Testing, Cooked.MockChain, Cooked there Cooked.MockChain.Staged, Cooked.MockChain, Cooked ToCardanoError Cooked.MockChain.GenerateTx ToCredential Cooked.Output, Cooked toCredential Cooked.Output, Cooked ToOutputDatum Cooked.Output, Cooked toOutputDatum Cooked.Output, Cooked toOutputWithReferenceScriptHash Cooked.Output, Cooked ToScript Cooked.Output, Cooked toScript Cooked.Output, Cooked ToScriptHash Cooked.Output, Cooked toScriptHash Cooked.Output, Cooked ToValue Cooked.Output, Cooked toValue Cooked.Output, Cooked Tweak Cooked.Tweak.Common TxBodyError Cooked.MockChain.GenerateTx TxLabel 1 (Type/Class) Cooked.Skeleton, Cooked 2 (Data Constructor) Cooked.Skeleton, Cooked txOptAutoSlotIncrease Cooked.Skeleton, Cooked txOptAutoSlotIncreaseL Cooked.Skeleton, Cooked txOptAwaitTxConfirmed Cooked.Skeleton, Cooked txOptAwaitTxConfirmedL Cooked.Skeleton, Cooked txOptBalance Cooked.Skeleton, Cooked txOptBalanceL Cooked.Skeleton, Cooked txOptBalanceOutputPolicy Cooked.Skeleton, Cooked txOptBalanceOutputPolicyL Cooked.Skeleton, Cooked txOptBalanceWallet Cooked.Skeleton, Cooked txOptBalanceWalletL Cooked.Skeleton, Cooked txOptBalancingUtxos Cooked.Skeleton, Cooked txOptBalancingUtxosL Cooked.Skeleton, Cooked txOptEmulatorParamsModification Cooked.Skeleton, Cooked txOptEmulatorParamsModificationL Cooked.Skeleton, Cooked txOptEnsureMinAda Cooked.Skeleton, Cooked txOptEnsureMinAdaL Cooked.Skeleton, Cooked TxOpts 1 (Type/Class) Cooked.Skeleton, Cooked 2 (Data Constructor) Cooked.Skeleton, Cooked txOptUnsafeModTx Cooked.Skeleton, Cooked txOptUnsafeModTxL Cooked.Skeleton, Cooked txOutByRef Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked txOutByRefLedger Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked txOutByRefSearch Cooked.MockChain.UtxoSearch, Cooked.MockChain, Cooked txOutV2FromLedger Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked TxSkel 1 (Type/Class) Cooked.Skeleton, Cooked 2 (Data Constructor) Cooked.Skeleton, Cooked txSkelInputData Cooked.MockChain.Balancing, Cooked.MockChain, Cooked txSkelIns Cooked.Skeleton, Cooked txSkelInsL Cooked.Skeleton, Cooked txSkelInsReference Cooked.Skeleton, Cooked txSkelInsReferenceL Cooked.Skeleton, Cooked txSkelLabel Cooked.Skeleton, Cooked txSkelLabelL Cooked.Skeleton, Cooked TxSkelMints Cooked.Skeleton, Cooked txSkelMints Cooked.Skeleton, Cooked txSkelMintsFromList Cooked.Skeleton, Cooked txSkelMintsL Cooked.Skeleton, Cooked txSkelMintsToList Cooked.Skeleton, Cooked txSkelMintsValue Cooked.Skeleton, Cooked TxSkelNoRedeemerForPK Cooked.Skeleton, Cooked txSkelOpts Cooked.Skeleton, Cooked txSkelOptsL Cooked.Skeleton, Cooked TxSkelOut Cooked.Skeleton, Cooked TxSkelOutDatum 1 (Type/Class) Cooked.Skeleton, Cooked 2 (Data Constructor) Cooked.Skeleton, Cooked TxSkelOutDatumConstrs Cooked.Skeleton, Cooked TxSkelOutDatumHash Cooked.Skeleton, Cooked txSkelOutDatumL Cooked.Skeleton, Cooked TxSkelOutInlineDatum Cooked.Skeleton, Cooked TxSkelOutNoDatum Cooked.Skeleton, Cooked txSkelOutOwnerTypeP Cooked.Skeleton, Cooked txSkelOutputData Cooked.Skeleton, Cooked txSkelOutputDatumTypeAT Cooked.Skeleton, Cooked txSkelOutputValue Cooked.Skeleton, Cooked txSkelOutReferenceScripts Cooked.Skeleton, Cooked txSkelOuts Cooked.Skeleton, Cooked txSkelOutsL Cooked.Skeleton, Cooked txSkelOutToCardanoTxOut Cooked.MockChain.GenerateTx txSkelOutTypedDatum Cooked.Skeleton, Cooked txSkelOutUntypedDatum Cooked.Skeleton, Cooked txSkelOutValidator Cooked.Skeleton, Cooked txSkelOutValidators Cooked.Skeleton, Cooked txSkelOutValue Cooked.Skeleton, Cooked txSkelOutValueL Cooked.Skeleton, Cooked TxSkelRedeemer Cooked.Skeleton, Cooked TxSkelRedeemerForReferencedScript Cooked.Skeleton, Cooked TxSkelRedeemerForScript Cooked.Skeleton, Cooked txSkelSigners Cooked.Skeleton, Cooked txSkelSignersL Cooked.Skeleton, Cooked txSkelTemplate Cooked.Skeleton, Cooked txSkelTypedRedeemer Cooked.Skeleton, Cooked txSkelValidityRange Cooked.Skeleton, Cooked txSkelValidityRangeL Cooked.Skeleton, Cooked typedDatumFromTxOutRef Cooked.MockChain.BlockChain, Cooked.MockChain, Cooked typedValidatorFromBS Cooked.RawUPLC, Cooked typedValidatorFromUPLC Cooked.RawUPLC, Cooked
","name":"Ltl LtlTruth LtlFalsity LtlAtom LtlOr LtlAnd LtlNext LtlUntil LtlRelease","module":"Cooked.Ltl","link":"Cooked-Ltl.html#t:Ltl"},{"display_html":"nowLater :: Monoid a => Ltl a -> [(a, Ltl a)]","name":"nowLater","module":"Cooked.Ltl","link":"Cooked-Ltl.html#v:nowLater"},{"display_html":"nowLaterList :: Monoid a => [Ltl a] -> [(a, [Ltl a])]","name":"nowLaterList","module":"Cooked.Ltl","link":"Cooked-Ltl.html#v:nowLaterList"},{"display_html":"data LtlOp (modification :: *) (builtin :: * -> *) :: * -> * where
","name":"LtlOp Builtin StartLtl StopLtl","module":"Cooked.Ltl","link":"Cooked-Ltl.html#t:LtlOp"},{"display_html":"data Staged (op :: * -> *) :: * -> * where","name":"Staged Return Instr","module":"Cooked.Ltl","link":"Cooked-Ltl.html#t:Staged"},{"display_html":"interpLtl :: InterpLtl modification builtin m => Staged (LtlOp modification builtin) a -> StateT [Ltl modification] m a","name":"interpLtl","module":"Cooked.Ltl","link":"Cooked-Ltl.html#v:interpLtl"},{"display_html":"interpLtlAndPruneUnfinished :: InterpLtl modification builtin m => Staged (LtlOp modification builtin) a -> StateT [Ltl modification] m a","name":"interpLtlAndPruneUnfinished","module":"Cooked.Ltl","link":"Cooked-Ltl.html#v:interpLtlAndPruneUnfinished"},{"display_html":"class MonadPlus m => InterpLtl modification builtin m where
","name":"InterpLtl interpBuiltin","module":"Cooked.Ltl","link":"Cooked-Ltl.html#t:InterpLtl"},{"display_html":"class Monad m => MonadModal m where
","name":"MonadModal Modification modifyLtl","module":"Cooked.Ltl","link":"Cooked-Ltl.html#t:MonadModal"},{"display_html":"class IsAbstractOutput o","name":"IsAbstractOutput","module":"Cooked.Output","link":"Cooked-Output.html#t:IsAbstractOutput"},{"display_html":"type family OwnerType o","name":"OwnerType","module":"Cooked.Output","link":"Cooked-Output.html#t:OwnerType"},{"display_html":"type family DatumType o","name":"DatumType","module":"Cooked.Output","link":"Cooked-Output.html#t:DatumType"},{"display_html":"type family ValueType o","name":"ValueType","module":"Cooked.Output","link":"Cooked-Output.html#t:ValueType"},{"display_html":"type family ReferenceScriptType o","name":"ReferenceScriptType","module":"Cooked.Output","link":"Cooked-Output.html#t:ReferenceScriptType"},{"display_html":"outputOwnerL :: IsAbstractOutput o => Lens' o (OwnerType o)","name":"outputOwnerL","module":"Cooked.Output","link":"Cooked-Output.html#v:outputOwnerL"},{"display_html":"outputStakingCredentialL :: IsAbstractOutput o => Lens' o (Maybe StakingCredential)","name":"outputStakingCredentialL","module":"Cooked.Output","link":"Cooked-Output.html#v:outputStakingCredentialL"},{"display_html":"outputDatumL :: IsAbstractOutput o => Lens' o (DatumType o)","name":"outputDatumL","module":"Cooked.Output","link":"Cooked-Output.html#v:outputDatumL"},{"display_html":"outputValueL :: IsAbstractOutput o => Lens' o (ValueType o)","name":"outputValueL","module":"Cooked.Output","link":"Cooked-Output.html#v:outputValueL"},{"display_html":"outputReferenceScriptL :: IsAbstractOutput o => Lens' o (Maybe (ReferenceScriptType o))","name":"outputReferenceScriptL","module":"Cooked.Output","link":"Cooked-Output.html#v:outputReferenceScriptL"},{"display_html":"class ToCredential a where
","name":"ToCredential toCredential","module":"Cooked.Output","link":"Cooked-Output.html#t:ToCredential"},{"display_html":"class ToOutputDatum a where
","name":"ToOutputDatum toOutputDatum","module":"Cooked.Output","link":"Cooked-Output.html#t:ToOutputDatum"},{"display_html":"class ToValue a where
","name":"ToValue toValue","module":"Cooked.Output","link":"Cooked-Output.html#t:ToValue"},{"display_html":"class ToScript a where
","name":"ToScript toScript","module":"Cooked.Output","link":"Cooked-Output.html#t:ToScript"},{"display_html":"class ToScriptHash a where
","name":"ToScriptHash toScriptHash","module":"Cooked.Output","link":"Cooked-Output.html#t:ToScriptHash"},{"display_html":"type IsTxInfoOutput o = (IsAbstractOutput o, ToCredential (OwnerType o), ToOutputDatum (DatumType o), ToValue (ValueType o), ToScriptHash (ReferenceScriptType o))","name":"IsTxInfoOutput","module":"Cooked.Output","link":"Cooked-Output.html#t:IsTxInfoOutput"},{"display_html":"outputAddress :: (IsAbstractOutput o, ToCredential (OwnerType o)) => o -> Address","name":"outputAddress","module":"Cooked.Output","link":"Cooked-Output.html#v:outputAddress"},{"display_html":"outputOutputDatum :: (IsAbstractOutput o, ToOutputDatum (DatumType o)) => o -> OutputDatum","name":"outputOutputDatum","module":"Cooked.Output","link":"Cooked-Output.html#v:outputOutputDatum"},{"display_html":"outputValue :: (IsAbstractOutput o, ToValue (ValueType o)) => o -> Value","name":"outputValue","module":"Cooked.Output","link":"Cooked-Output.html#v:outputValue"},{"display_html":"outputReferenceScriptHash :: (IsAbstractOutput o, ToScriptHash (ReferenceScriptType o)) => o -> Maybe ScriptHash","name":"outputReferenceScriptHash","module":"Cooked.Output","link":"Cooked-Output.html#v:outputReferenceScriptHash"},{"display_html":"outputTxOut :: IsTxInfoOutput o => o -> TxOut","name":"outputTxOut","module":"Cooked.Output","link":"Cooked-Output.html#v:outputTxOut"},{"display_html":"data ConcreteOutput ownerType datumType valueType referenceScriptType where
","name":"ConcreteOutput ConcreteOutput","module":"Cooked.Output","link":"Cooked-Output.html#t:ConcreteOutput"},{"display_html":"toOutputWithReferenceScriptHash :: (IsAbstractOutput output, ToScriptHash (ReferenceScriptType output)) => output -> ConcreteOutput (OwnerType output) (DatumType output) (ValueType output) ScriptHash","name":"toOutputWithReferenceScriptHash","module":"Cooked.Output","link":"Cooked-Output.html#v:toOutputWithReferenceScriptHash"},{"display_html":"isOutputWithoutDatum :: IsTxInfoOutput output => output -> Maybe (ConcreteOutput (OwnerType output) () (ValueType output) (ReferenceScriptType output))","name":"isOutputWithoutDatum","module":"Cooked.Output","link":"Cooked-Output.html#v:isOutputWithoutDatum"},{"display_html":"isOutputWithInlineDatum :: IsTxInfoOutput output => output -> Maybe (ConcreteOutput (OwnerType output) Datum (ValueType output) (ReferenceScriptType output))","name":"isOutputWithInlineDatum","module":"Cooked.Output","link":"Cooked-Output.html#v:isOutputWithInlineDatum"},{"display_html":"isOutputWithDatumHash :: IsTxInfoOutput output => output -> Maybe (ConcreteOutput (OwnerType output) DatumHash (ValueType output) (ReferenceScriptType output))","name":"isOutputWithDatumHash","module":"Cooked.Output","link":"Cooked-Output.html#v:isOutputWithDatumHash"},{"display_html":"isOutputWithInlineDatumOfType :: (FromData a, IsTxInfoOutput output) => output -> Maybe (ConcreteOutput (OwnerType output) a (ValueType output) (ReferenceScriptType output))","name":"isOutputWithInlineDatumOfType","module":"Cooked.Output","link":"Cooked-Output.html#v:isOutputWithInlineDatumOfType"},{"display_html":"isScriptOutputFrom :: IsTxInfoOutput output => TypedValidator a -> output -> Maybe (ConcreteOutput (TypedValidator a) (DatumType output) (ValueType output) (ReferenceScriptType output))","name":"isScriptOutputFrom","module":"Cooked.Output","link":"Cooked-Output.html#v:isScriptOutputFrom"},{"display_html":"isPKOutputFrom :: IsTxInfoOutput output => PubKeyHash -> output -> Maybe (ConcreteOutput PubKeyHash (DatumType output) (ValueType output) (ReferenceScriptType output))","name":"isPKOutputFrom","module":"Cooked.Output","link":"Cooked-Output.html#v:isPKOutputFrom"},{"display_html":"isOnlyAdaOutput :: IsTxInfoOutput output => output -> Maybe (ConcreteOutput (OwnerType output) (DatumType output) Ada (ReferenceScriptType output))","name":"isOnlyAdaOutput","module":"Cooked.Output","link":"Cooked-Output.html#v:isOnlyAdaOutput"},{"display_html":"type DocCooked = Doc ()","name":"DocCooked","module":"Cooked.Pretty.Common","link":"Cooked-Pretty-Common.html#t:DocCooked"},{"display_html":"renderString :: (a -> DocCooked) -> a -> String","name":"renderString","module":"Cooked.Pretty.Common","link":"Cooked-Pretty-Common.html#v:renderString"},{"display_html":"prettyItemize :: DocCooked -> DocCooked -> [DocCooked] -> DocCooked","name":"prettyItemize","module":"Cooked.Pretty.Common","link":"Cooked-Pretty-Common.html#v:prettyItemize"},{"display_html":"prettyItemizeNoTitle :: DocCooked -> [DocCooked] -> DocCooked","name":"prettyItemizeNoTitle","module":"Cooked.Pretty.Common","link":"Cooked-Pretty-Common.html#v:prettyItemizeNoTitle"},{"display_html":"prettyItemizeNonEmpty :: DocCooked -> DocCooked -> [DocCooked] -> Maybe DocCooked","name":"prettyItemizeNonEmpty","module":"Cooked.Pretty.Common","link":"Cooked-Pretty-Common.html#v:prettyItemizeNonEmpty"},{"display_html":"prettyEnumerate :: DocCooked -> DocCooked -> [DocCooked] -> DocCooked","name":"prettyEnumerate","module":"Cooked.Pretty.Common","link":"Cooked-Pretty-Common.html#v:prettyEnumerate"},{"display_html":"prettyHash :: Show a => Int -> a -> DocCooked","name":"prettyHash","module":"Cooked.Pretty.Common","link":"Cooked-Pretty-Common.html#v:prettyHash"},{"display_html":"data PrettyCookedOpts = PrettyCookedOpts {
}","name":"PrettyCookedOpts PrettyCookedOpts pcOptPrintTxHashes pcOptPrintTxOutRefs pcOptPrintDefaultTxOpts pcOptPrintedHashLength pcOptNumericUnderscores","module":"Cooked.Pretty.Options","link":"Cooked-Pretty-Options.html#t:PrettyCookedOpts"},{"display_html":"data PCOptTxOutRefs","name":"PCOptTxOutRefs PCOptTxOutRefsHidden PCOptTxOutRefsFull PCOptTxOutRefsPartial","module":"Cooked.Pretty.Options","link":"Cooked-Pretty-Options.html#t:PCOptTxOutRefs"},{"display_html":"unsafeTypedValidatorFromUPLC :: forall a. Program NamedDeBruijn DefaultUni DefaultFun () -> TypedValidator a","name":"unsafeTypedValidatorFromUPLC","module":"Cooked.RawUPLC","link":"Cooked-RawUPLC.html#v:unsafeTypedValidatorFromUPLC"},{"display_html":"typedValidatorFromUPLC :: Program NamedDeBruijn DefaultUni DefaultFun () -> TypedValidator Any","name":"typedValidatorFromUPLC","module":"Cooked.RawUPLC","link":"Cooked-RawUPLC.html#v:typedValidatorFromUPLC"},{"display_html":"unsafeTypedValidatorFromBS :: forall a. ByteString -> Either String (TypedValidator a)","name":"unsafeTypedValidatorFromBS","module":"Cooked.RawUPLC","link":"Cooked-RawUPLC.html#v:unsafeTypedValidatorFromBS"},{"display_html":"typedValidatorFromBS :: ByteString -> Either String (TypedValidator Any)","name":"typedValidatorFromBS","module":"Cooked.RawUPLC","link":"Cooked-RawUPLC.html#v:typedValidatorFromBS"},{"display_html":"class ShowBS a where
","name":"ShowBS showBS showBSsPrec","module":"Cooked.ShowBS","link":"Cooked-ShowBS.html#t:ShowBS"},{"display_html":"showBSs :: ShowBS a => a -> BuiltinString -> BuiltinString","name":"showBSs","module":"Cooked.ShowBS","link":"Cooked-ShowBS.html#v:showBSs"},{"display_html":"app_prec :: Integer","name":"app_prec","module":"Cooked.ShowBS","link":"Cooked-ShowBS.html#v:app_prec"},{"display_html":"flattenValueI :: Iso' Value [(AssetClass, Integer)]","name":"flattenValueI","module":"Cooked.ValueUtils","link":"Cooked-ValueUtils.html#v:flattenValueI"},{"display_html":"positivePart :: Value -> Value","name":"positivePart","module":"Cooked.ValueUtils","link":"Cooked-ValueUtils.html#v:positivePart"},{"display_html":"negativePart :: Value -> Value","name":"negativePart","module":"Cooked.ValueUtils","link":"Cooked-ValueUtils.html#v:negativePart"},{"display_html":"adaL :: Lens' Value Ada","name":"adaL","module":"Cooked.ValueUtils","link":"Cooked-ValueUtils.html#v:adaL"},{"display_html":"knownWallets :: [Wallet]","name":"knownWallets","module":"Cooked.Wallet","link":"Cooked-Wallet.html#v:knownWallets"},{"display_html":"wallet :: Int -> Wallet","name":"wallet","module":"Cooked.Wallet","link":"Cooked-Wallet.html#v:wallet"},{"display_html":"walletPKHashToId :: PubKeyHash -> Maybe Int","name":"walletPKHashToId","module":"Cooked.Wallet","link":"Cooked-Wallet.html#v:walletPKHashToId"},{"display_html":"walletPK :: Wallet -> PubKey","name":"walletPK","module":"Cooked.Wallet","link":"Cooked-Wallet.html#v:walletPK"},{"display_html":"walletStakingPK :: Wallet -> Maybe PubKey","name":"walletStakingPK","module":"Cooked.Wallet","link":"Cooked-Wallet.html#v:walletStakingPK"},{"display_html":"walletPKHash :: Wallet -> PubKeyHash","name":"walletPKHash","module":"Cooked.Wallet","link":"Cooked-Wallet.html#v:walletPKHash"},{"display_html":"walletStakingPKHash :: Wallet -> Maybe PubKeyHash","name":"walletStakingPKHash","module":"Cooked.Wallet","link":"Cooked-Wallet.html#v:walletStakingPKHash"},{"display_html":"walletAddress :: Wallet -> Address","name":"walletAddress","module":"Cooked.Wallet","link":"Cooked-Wallet.html#v:walletAddress"},{"display_html":"walletSK :: MockWallet -> PrivateKey","name":"walletSK","module":"Cooked.Wallet","link":"Cooked-Wallet.html#v:walletSK"},{"display_html":"walletStakingSK :: Wallet -> Maybe PrivateKey","name":"walletStakingSK","module":"Cooked.Wallet","link":"Cooked-Wallet.html#v:walletStakingSK"},{"display_html":"initialDistribution :: [(Wallet, [Value])] -> InitialDistribution","name":"initialDistribution","module":"Cooked.Wallet","link":"Cooked-Wallet.html#v:initialDistribution"},{"display_html":"newtype InitialDistribution = InitialDistribution {
}","name":"InitialDistribution InitialDistribution unInitialDistribution","module":"Cooked.Wallet","link":"Cooked-Wallet.html#t:InitialDistribution"},{"display_html":"type Wallet = MockWallet","name":"Wallet","module":"Cooked.Wallet","link":"Cooked-Wallet.html#t:Wallet"},{"display_html":"type PrivateKey = XPrv","name":"PrivateKey","module":"Cooked.Wallet","link":"Cooked-Wallet.html#t:PrivateKey"},{"display_html":"class PrettyCooked a where
","name":"PrettyCooked prettyCookedOpt prettyCooked","module":"Cooked.Pretty.Class","link":"Cooked-Pretty-Class.html#t:PrettyCooked"},{"display_html":"printCookedOpt :: PrettyCooked a => PrettyCookedOpts -> a -> IO ()","name":"printCookedOpt","module":"Cooked.Pretty.Class","link":"Cooked-Pretty-Class.html#v:printCookedOpt"},{"display_html":"printCooked :: PrettyCooked a => a -> IO ()","name":"printCooked","module":"Cooked.Pretty.Class","link":"Cooked-Pretty-Class.html#v:printCooked"},{"display_html":"type LabelConstrs x = (Show x, Typeable x, Eq x, Ord x)","name":"LabelConstrs","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#t:LabelConstrs"},{"display_html":"data TxLabel where
","name":"TxLabel TxLabel","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#t:TxLabel"},{"display_html":"data BalanceOutputPolicy","name":"BalanceOutputPolicy AdjustExistingOutput DontAdjustExistingOutput","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#t:BalanceOutputPolicy"},{"display_html":"data BalancingWallet","name":"BalancingWallet BalanceWithFirstSigner BalanceWith","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#t:BalancingWallet"},{"display_html":"newtype RawModTx = RawModTxAfterBalancing (Tx BabbageEra -> Tx BabbageEra)","name":"RawModTx RawModTxAfterBalancing","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#t:RawModTx"},{"display_html":"newtype EmulatorParamsModification = EmulatorParamsModification (Params -> Params)","name":"EmulatorParamsModification EmulatorParamsModification","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#t:EmulatorParamsModification"},{"display_html":"data BalancingUtxos
","name":"BalancingUtxos BalancingUtxosAll BalancingUtxosDatumless BalancingUtxosAllowlist BalancingUtxosBlocklist","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#t:BalancingUtxos"},{"display_html":"applyEmulatorParamsModification :: Maybe EmulatorParamsModification -> Params -> Params","name":"applyEmulatorParamsModification","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:applyEmulatorParamsModification"},{"display_html":"applyRawModOnBalancedTx :: [RawModTx] -> Tx BabbageEra -> Tx BabbageEra","name":"applyRawModOnBalancedTx","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:applyRawModOnBalancedTx"},{"display_html":"data TxOpts = TxOpts {
}","name":"TxOpts TxOpts txOptEmulatorParamsModification txOptEnsureMinAda txOptAwaitTxConfirmed txOptAutoSlotIncrease txOptUnsafeModTx txOptBalance txOptBalanceOutputPolicy txOptBalanceWallet txOptBalancingUtxos","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#t:TxOpts"},{"display_html":"txOptEnsureMinAdaL :: Lens' TxOpts Bool","name":"txOptEnsureMinAdaL","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:txOptEnsureMinAdaL"},{"display_html":"txOptAwaitTxConfirmedL :: Lens' TxOpts Bool","name":"txOptAwaitTxConfirmedL","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:txOptAwaitTxConfirmedL"},{"display_html":"txOptAutoSlotIncreaseL :: Lens' TxOpts Bool","name":"txOptAutoSlotIncreaseL","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:txOptAutoSlotIncreaseL"},{"display_html":"txOptUnsafeModTxL :: Lens' TxOpts [RawModTx]","name":"txOptUnsafeModTxL","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:txOptUnsafeModTxL"},{"display_html":"txOptBalanceL :: Lens' TxOpts Bool","name":"txOptBalanceL","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:txOptBalanceL"},{"display_html":"txOptBalanceOutputPolicyL :: Lens' TxOpts BalanceOutputPolicy","name":"txOptBalanceOutputPolicyL","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:txOptBalanceOutputPolicyL"},{"display_html":"txOptBalanceWalletL :: Lens' TxOpts BalancingWallet","name":"txOptBalanceWalletL","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:txOptBalanceWalletL"},{"display_html":"txOptBalancingUtxosL :: Lens' TxOpts BalancingUtxos","name":"txOptBalancingUtxosL","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:txOptBalancingUtxosL"},{"display_html":"txOptEmulatorParamsModificationL :: Lens' TxOpts (Maybe EmulatorParamsModification)","name":"txOptEmulatorParamsModificationL","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:txOptEmulatorParamsModificationL"},{"display_html":"type MintsConstrs redeemer = (ToData redeemer, Show redeemer, PrettyCooked redeemer, Typeable redeemer)","name":"MintsConstrs","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#t:MintsConstrs"},{"display_html":"data MintsRedeemer where
","name":"MintsRedeemer NoMintsRedeemer SomeMintsRedeemer","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#t:MintsRedeemer"},{"display_html":"type TxSkelMints = Map (Versioned MintingPolicy) (MintsRedeemer, NEMap TokenName (NonZero Integer))","name":"TxSkelMints","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#t:TxSkelMints"},{"display_html":"addToTxSkelMints :: (Versioned MintingPolicy, MintsRedeemer, TokenName, Integer) -> TxSkelMints -> TxSkelMints","name":"addToTxSkelMints","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:addToTxSkelMints"},{"display_html":"txSkelMintsToList :: TxSkelMints -> [(Versioned MintingPolicy, MintsRedeemer, TokenName, Integer)]","name":"txSkelMintsToList","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:txSkelMintsToList"},{"display_html":"txSkelMintsFromList :: [(Versioned MintingPolicy, MintsRedeemer, TokenName, Integer)] -> TxSkelMints","name":"txSkelMintsFromList","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:txSkelMintsFromList"},{"display_html":"txSkelMintsValue :: TxSkelMints -> Value","name":"txSkelMintsValue","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:txSkelMintsValue"},{"display_html":"txSkelOutValueL :: Lens' TxSkelOut Value","name":"txSkelOutValueL","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:txSkelOutValueL"},{"display_html":"txSkelOutDatumL :: Lens' TxSkelOut TxSkelOutDatum","name":"txSkelOutDatumL","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:txSkelOutDatumL"},{"display_html":"txSkelOutValue :: TxSkelOut -> Value","name":"txSkelOutValue","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:txSkelOutValue"},{"display_html":"txSkelOutValidator :: TxSkelOut -> Maybe (Versioned Validator)","name":"txSkelOutValidator","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:txSkelOutValidator"},{"display_html":"type TxSkelOutDatumConstrs a = (Show a, PrettyCooked a, ToData a, Eq a, Typeable a)","name":"TxSkelOutDatumConstrs","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#t:TxSkelOutDatumConstrs"},{"display_html":"data TxSkelOutDatum where
","name":"TxSkelOutDatum TxSkelOutDatum TxSkelOutNoDatum TxSkelOutDatumHash TxSkelOutInlineDatum","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#t:TxSkelOutDatum"},{"display_html":"data TxSkelOut where
","name":"TxSkelOut Pays producedOutput","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#t:TxSkelOut"},{"display_html":"txSkelOutTypedDatum :: FromData a => TxSkelOutDatum -> Maybe a","name":"txSkelOutTypedDatum","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:txSkelOutTypedDatum"},{"display_html":"txSkelOutUntypedDatum :: TxSkelOutDatum -> Maybe Datum","name":"txSkelOutUntypedDatum","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:txSkelOutUntypedDatum"},{"display_html":"paysPK :: PubKeyHash -> Value -> TxSkelOut","name":"paysPK","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:paysPK"},{"display_html":"paysScript :: (ToData (DatumType a), Show (DatumType a), Typeable (DatumType a), Eq (DatumType a), PrettyCooked (DatumType a), Typeable a) => TypedValidator a -> DatumType a -> Value -> TxSkelOut","name":"paysScript","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:paysScript"},{"display_html":"paysScriptInlineDatum :: (ToData (DatumType a), Show (DatumType a), Typeable (DatumType a), Eq (DatumType a), PrettyCooked (DatumType a), Typeable a) => TypedValidator a -> DatumType a -> Value -> TxSkelOut","name":"paysScriptInlineDatum","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:paysScriptInlineDatum"},{"display_html":"paysScriptDatumHash :: (ToData (DatumType a), Show (DatumType a), Typeable (DatumType a), Eq (DatumType a), PrettyCooked (DatumType a), Typeable a) => TypedValidator a -> DatumType a -> Value -> TxSkelOut","name":"paysScriptDatumHash","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:paysScriptDatumHash"},{"display_html":"paysScriptNoDatum :: Typeable a => TypedValidator a -> Value -> TxSkelOut","name":"paysScriptNoDatum","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:paysScriptNoDatum"},{"display_html":"withDatum :: (ToData a, Show a, Typeable a, Eq a, PrettyCooked a) => TxSkelOut -> a -> TxSkelOut","name":"withDatum","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:withDatum"},{"display_html":"withInlineDatum :: (ToData a, Show a, Typeable a, Eq a, PrettyCooked a) => TxSkelOut -> a -> TxSkelOut","name":"withInlineDatum","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:withInlineDatum"},{"display_html":"withDatumHash :: (ToData a, Show a, Typeable a, Eq a, PrettyCooked a) => TxSkelOut -> a -> TxSkelOut","name":"withDatumHash","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:withDatumHash"},{"display_html":"withReferenceScript :: (Show script, ToScript script, Typeable script, ToScriptHash script) => TxSkelOut -> script -> TxSkelOut","name":"withReferenceScript","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:withReferenceScript"},{"display_html":"withStakingCredential :: TxSkelOut -> StakingCredential -> TxSkelOut","name":"withStakingCredential","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:withStakingCredential"},{"display_html":"data TxSkelRedeemer where
","name":"TxSkelRedeemer TxSkelNoRedeemerForPK TxSkelRedeemerForScript TxSkelRedeemerForReferencedScript","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#t:TxSkelRedeemer"},{"display_html":"txSkelTypedRedeemer :: FromData (RedeemerType a) => TxSkelRedeemer -> Maybe (RedeemerType a)","name":"txSkelTypedRedeemer","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:txSkelTypedRedeemer"},{"display_html":"data TxSkel where","name":"TxSkel TxSkel txSkelLabel txSkelOpts txSkelMints txSkelSigners txSkelValidityRange txSkelIns txSkelInsReference txSkelOuts","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#t:TxSkel"},{"display_html":"txSkelLabelL :: Lens' TxSkel (Set TxLabel)","name":"txSkelLabelL","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:txSkelLabelL"},{"display_html":"txSkelOptsL :: Lens' TxSkel TxOpts","name":"txSkelOptsL","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:txSkelOptsL"},{"display_html":"txSkelMintsL :: Lens' TxSkel TxSkelMints","name":"txSkelMintsL","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:txSkelMintsL"},{"display_html":"txSkelValidityRangeL :: Lens' TxSkel SlotRange","name":"txSkelValidityRangeL","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:txSkelValidityRangeL"},{"display_html":"txSkelSignersL :: Lens' TxSkel [Wallet]","name":"txSkelSignersL","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:txSkelSignersL"},{"display_html":"txSkelInsL :: Lens' TxSkel (Map TxOutRef TxSkelRedeemer)","name":"txSkelInsL","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:txSkelInsL"},{"display_html":"txSkelInsReferenceL :: Lens' TxSkel (Set TxOutRef)","name":"txSkelInsReferenceL","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:txSkelInsReferenceL"},{"display_html":"txSkelOutsL :: Lens' TxSkel [TxSkelOut]","name":"txSkelOutsL","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:txSkelOutsL"},{"display_html":"txSkelTemplate :: TxSkel","name":"txSkelTemplate","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:txSkelTemplate"},{"display_html":"txSkelOutputData :: TxSkel -> Map DatumHash TxSkelOutDatum","name":"txSkelOutputData","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:txSkelOutputData"},{"display_html":"newtype Fee = Fee {}","name":"Fee Fee feeLovelace","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#t:Fee"},{"display_html":"txSkelOutputValue :: TxSkel -> Fee -> Value","name":"txSkelOutputValue","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:txSkelOutputValue"},{"display_html":"txSkelOutValidators :: TxSkel -> Map ValidatorHash (Versioned Validator)","name":"txSkelOutValidators","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:txSkelOutValidators"},{"display_html":"txSkelOutOwnerTypeP :: forall ownerType. (ToCredential ownerType, Show ownerType, IsTxSkelOutAllowedOwner ownerType, Typeable ownerType) => Prism' TxSkelOut (ConcreteOutput ownerType TxSkelOutDatum Value (Versioned Script))","name":"txSkelOutOwnerTypeP","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:txSkelOutOwnerTypeP"},{"display_html":"txSkelOutputDatumTypeAT :: (FromData a, Typeable a) => AffineTraversal' TxSkelOut a","name":"txSkelOutputDatumTypeAT","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:txSkelOutputDatumTypeAT"},{"display_html":"data SkelContext = SkelContext {
}","name":"SkelContext SkelContext skelContextTxOuts skelContextTxSkelOutDatums","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#t:SkelContext"},{"display_html":"txSkelOutReferenceScripts :: TxSkel -> Map ValidatorHash (Versioned Validator)","name":"txSkelOutReferenceScripts","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:txSkelOutReferenceScripts"},{"display_html":"newtype UtxoState = UtxoState {
}","name":"UtxoState UtxoState utxoState","module":"Cooked.MockChain.UtxoState","link":"Cooked-MockChain-UtxoState.html#t:UtxoState"},{"display_html":"newtype UtxoPayloadSet = UtxoPayloadSet {}","name":"UtxoPayloadSet UtxoPayloadSet utxoPayloadSet","module":"Cooked.MockChain.UtxoState","link":"Cooked-MockChain-UtxoState.html#t:UtxoPayloadSet"},{"display_html":"data UtxoPayload = UtxoPayload {
}","name":"UtxoPayload UtxoPayload utxoPayloadTxOutRef utxoPayloadValue utxoPayloadSkelOutDatum utxoPayloadReferenceScript","module":"Cooked.MockChain.UtxoState","link":"Cooked-MockChain-UtxoState.html#t:UtxoPayload"},{"display_html":"holdsInState :: Address -> UtxoState -> Value","name":"holdsInState","module":"Cooked.MockChain.UtxoState","link":"Cooked-MockChain-UtxoState.html#v:holdsInState"},{"display_html":"data GenerateTxError
","name":"GenerateTxError TxBodyError ToCardanoError GenerateTxErrorGeneral","module":"Cooked.MockChain.GenerateTx","link":"Cooked-MockChain-GenerateTx.html#t:GenerateTxError"},{"display_html":"data GenTxParams","name":"GenTxParams gtpCollateralIns gtpFee","module":"Cooked.MockChain.GenerateTx","link":"Cooked-MockChain-GenerateTx.html#t:GenTxParams"},{"display_html":"generateTxBodyContent :: GenTxParams -> Params -> Map DatumHash Datum -> Map TxOutRef TxOut -> Map ValidatorHash (Versioned Validator) -> TxSkel -> Either GenerateTxError (TxBodyContent BuildTx BabbageEra)","name":"generateTxBodyContent","module":"Cooked.MockChain.GenerateTx","link":"Cooked-MockChain-GenerateTx.html#v:generateTxBodyContent"},{"display_html":"txSkelOutToCardanoTxOut :: Params -> TxSkelOut -> Either GenerateTxError (TxOut CtxTx BabbageEra)","name":"txSkelOutToCardanoTxOut","module":"Cooked.MockChain.GenerateTx","link":"Cooked-MockChain-GenerateTx.html#v:txSkelOutToCardanoTxOut"},{"display_html":"generateTx :: GenTxParams -> Params -> Map DatumHash Datum -> Map TxOutRef TxOut -> Map ValidatorHash (Versioned Validator) -> TxSkel -> Either GenerateTxError (Tx BabbageEra)","name":"generateTx","module":"Cooked.MockChain.GenerateTx","link":"Cooked-MockChain-GenerateTx.html#v:generateTx"},{"display_html":"data MockChainError where
","name":"MockChainError MCEValidationError MCEUnbalanceable MCENoSuitableCollateral MCEGenerationError MCECalcFee MCEUnknownOutRefError MCEUnknownValidator MCEUnknownDatum FailWith OtherMockChainError","module":"Cooked.MockChain.BlockChain","link":"Cooked-MockChain-BlockChain.html#t:MockChainError"},{"display_html":"data MCEUnbalanceableError
","name":"MCEUnbalanceableError MCEUnbalNotEnoughFunds MCEUnbalNotEnoughReturning","module":"Cooked.MockChain.BlockChain","link":"Cooked-MockChain-BlockChain.html#t:MCEUnbalanceableError"},{"display_html":"class (MonadFail m, MonadError MockChainError m) => MonadBlockChainBalancing m where
","name":"MonadBlockChainBalancing getParams datumFromHash utxosAtLedger validatorFromHash txOutByRefLedger","module":"Cooked.MockChain.BlockChain","link":"Cooked-MockChain-BlockChain.html#t:MonadBlockChainBalancing"},{"display_html":"class MonadBlockChainBalancing m => MonadBlockChainWithoutValidation m where
","name":"MonadBlockChainWithoutValidation awaitSlot currentSlot allUtxosLedger","module":"Cooked.MockChain.BlockChain","link":"Cooked-MockChain-BlockChain.html#t:MonadBlockChainWithoutValidation"},{"display_html":"class MonadBlockChainWithoutValidation m => MonadBlockChain m where
","name":"MonadBlockChain validateTxSkel","module":"Cooked.MockChain.BlockChain","link":"Cooked-MockChain-BlockChain.html#t:MonadBlockChain"},{"display_html":"newtype AsTrans t (m :: Type -> Type) a = AsTrans {
}","name":"AsTrans AsTrans getTrans","module":"Cooked.MockChain.BlockChain","link":"Cooked-MockChain-BlockChain.html#t:AsTrans"},{"display_html":"allUtxos :: MonadBlockChainWithoutValidation m => m [(TxOutRef, TxOut)]","name":"allUtxos","module":"Cooked.MockChain.BlockChain","link":"Cooked-MockChain-BlockChain.html#v:allUtxos"},{"display_html":"currentTime :: MonadBlockChainWithoutValidation m => m (POSIXTime, POSIXTime)","name":"currentTime","module":"Cooked.MockChain.BlockChain","link":"Cooked-MockChain-BlockChain.html#v:currentTime"},{"display_html":"waitNSlots :: MonadBlockChainWithoutValidation m => Integer -> m Slot","name":"waitNSlots","module":"Cooked.MockChain.BlockChain","link":"Cooked-MockChain-BlockChain.html#v:waitNSlots"},{"display_html":"utxosAt :: MonadBlockChainBalancing m => Address -> m [(TxOutRef, TxOut)]","name":"utxosAt","module":"Cooked.MockChain.BlockChain","link":"Cooked-MockChain-BlockChain.html#v:utxosAt"},{"display_html":"txOutByRef :: MonadBlockChainBalancing m => TxOutRef -> m (Maybe TxOut)","name":"txOutByRef","module":"Cooked.MockChain.BlockChain","link":"Cooked-MockChain-BlockChain.html#v:txOutByRef"},{"display_html":"utxosFromCardanoTx :: CardanoTx -> [(TxOutRef, TxOut)]","name":"utxosFromCardanoTx","module":"Cooked.MockChain.BlockChain","link":"Cooked-MockChain-BlockChain.html#v:utxosFromCardanoTx"},{"display_html":"txOutV2FromLedger :: TxOut -> TxOut","name":"txOutV2FromLedger","module":"Cooked.MockChain.BlockChain","link":"Cooked-MockChain-BlockChain.html#v:txOutV2FromLedger"},{"display_html":"typedDatumFromTxOutRef :: (FromData a, MonadBlockChainWithoutValidation m) => TxOutRef -> m (Maybe a)","name":"typedDatumFromTxOutRef","module":"Cooked.MockChain.BlockChain","link":"Cooked-MockChain-BlockChain.html#v:typedDatumFromTxOutRef"},{"display_html":"valueFromTxOutRef :: MonadBlockChainWithoutValidation m => TxOutRef -> m (Maybe Value)","name":"valueFromTxOutRef","module":"Cooked.MockChain.BlockChain","link":"Cooked-MockChain-BlockChain.html#v:valueFromTxOutRef"},{"display_html":"outputDatumFromTxOutRef :: MonadBlockChainWithoutValidation m => TxOutRef -> m (Maybe OutputDatum)","name":"outputDatumFromTxOutRef","module":"Cooked.MockChain.BlockChain","link":"Cooked-MockChain-BlockChain.html#v:outputDatumFromTxOutRef"},{"display_html":"datumFromTxOutRef :: MonadBlockChainWithoutValidation m => TxOutRef -> m (Maybe Datum)","name":"datumFromTxOutRef","module":"Cooked.MockChain.BlockChain","link":"Cooked-MockChain-BlockChain.html#v:datumFromTxOutRef"},{"display_html":"resolveDatum :: (IsAbstractOutput out, ToOutputDatum (DatumType out), MonadBlockChainBalancing m) => out -> m (Maybe (ConcreteOutput (OwnerType out) Datum (ValueType out) (ReferenceScriptType out)))","name":"resolveDatum","module":"Cooked.MockChain.BlockChain","link":"Cooked-MockChain-BlockChain.html#v:resolveDatum"},{"display_html":"resolveTypedDatum :: (IsAbstractOutput out, ToOutputDatum (DatumType out), MonadBlockChainBalancing m, FromData a) => out -> m (Maybe (ConcreteOutput (OwnerType out) a (ValueType out) (ReferenceScriptType out)))","name":"resolveTypedDatum","module":"Cooked.MockChain.BlockChain","link":"Cooked-MockChain-BlockChain.html#v:resolveTypedDatum"},{"display_html":"resolveValidator :: (IsAbstractOutput out, ToCredential (OwnerType out), MonadBlockChainBalancing m) => out -> m (Maybe (ConcreteOutput (Versioned Validator) (DatumType out) (ValueType out) (ReferenceScriptType out)))","name":"resolveValidator","module":"Cooked.MockChain.BlockChain","link":"Cooked-MockChain-BlockChain.html#v:resolveValidator"},{"display_html":"resolveReferenceScript :: (IsAbstractOutput out, ToScriptHash (ReferenceScriptType out), MonadBlockChainBalancing m) => out -> m (Maybe (ConcreteOutput (OwnerType out) (DatumType out) (ValueType out) (Versioned Validator)))","name":"resolveReferenceScript","module":"Cooked.MockChain.BlockChain","link":"Cooked-MockChain-BlockChain.html#v:resolveReferenceScript"},{"display_html":"getEnclosingSlot :: MonadBlockChainWithoutValidation m => POSIXTime -> m Slot","name":"getEnclosingSlot","module":"Cooked.MockChain.BlockChain","link":"Cooked-MockChain-BlockChain.html#v:getEnclosingSlot"},{"display_html":"awaitEnclosingSlot :: MonadBlockChainWithoutValidation m => POSIXTime -> m Slot","name":"awaitEnclosingSlot","module":"Cooked.MockChain.BlockChain","link":"Cooked-MockChain-BlockChain.html#v:awaitEnclosingSlot"},{"display_html":"slotRangeBefore :: MonadBlockChainWithoutValidation m => POSIXTime -> m SlotRange","name":"slotRangeBefore","module":"Cooked.MockChain.BlockChain","link":"Cooked-MockChain-BlockChain.html#v:slotRangeBefore"},{"display_html":"slotRangeAfter :: MonadBlockChainWithoutValidation m => POSIXTime -> m SlotRange","name":"slotRangeAfter","module":"Cooked.MockChain.BlockChain","link":"Cooked-MockChain-BlockChain.html#v:slotRangeAfter"},{"display_html":"slotToTimeInterval :: MonadBlockChainWithoutValidation m => Slot -> m (POSIXTime, POSIXTime)","name":"slotToTimeInterval","module":"Cooked.MockChain.BlockChain","link":"Cooked-MockChain-BlockChain.html#v:slotToTimeInterval"},{"display_html":"runTweakInChain :: (MonadBlockChainWithoutValidation m, MonadPlus m) => Tweak m a -> TxSkel -> m (a, TxSkel)","name":"runTweakInChain","module":"Cooked.Tweak.Common","link":"Cooked-Tweak-Common.html#v:runTweakInChain"},{"display_html":"runTweakInChain' :: MonadBlockChainWithoutValidation m => Tweak m a -> TxSkel -> m [(a, TxSkel)]","name":"runTweakInChain'","module":"Cooked.Tweak.Common","link":"Cooked-Tweak-Common.html#v:runTweakInChain-39-"},{"display_html":"type Tweak m = StateT TxSkel (ListT m)","name":"Tweak","module":"Cooked.Tweak.Common","link":"Cooked-Tweak-Common.html#t:Tweak"},{"display_html":"data UntypedTweak m where
","name":"UntypedTweak UntypedTweak","module":"Cooked.Tweak.Common","link":"Cooked-Tweak-Common.html#t:UntypedTweak"},{"display_html":"class (MonadPlus m, MonadBlockChainWithoutValidation m) => MonadTweak m where","name":"MonadTweak getTxSkel putTxSkel","module":"Cooked.Tweak.Common","link":"Cooked-Tweak-Common.html#t:MonadTweak"},{"display_html":"failingTweak :: MonadTweak m => m a","name":"failingTweak","module":"Cooked.Tweak.Common","link":"Cooked-Tweak-Common.html#v:failingTweak"},{"display_html":"doNothingTweak :: MonadTweak m => m ()","name":"doNothingTweak","module":"Cooked.Tweak.Common","link":"Cooked-Tweak-Common.html#v:doNothingTweak"},{"display_html":"viewTweak :: (MonadTweak m, Is k A_Getter) => Optic' k is TxSkel a -> m a","name":"viewTweak","module":"Cooked.Tweak.Common","link":"Cooked-Tweak-Common.html#v:viewTweak"},{"display_html":"viewAllTweak :: (MonadTweak m, Is k A_Fold) => Optic' k is TxSkel a -> m [a]","name":"viewAllTweak","module":"Cooked.Tweak.Common","link":"Cooked-Tweak-Common.html#v:viewAllTweak"},{"display_html":"setTweak :: (MonadTweak m, Is k A_Setter) => Optic' k is TxSkel a -> a -> m ()","name":"setTweak","module":"Cooked.Tweak.Common","link":"Cooked-Tweak-Common.html#v:setTweak"},{"display_html":"overTweak :: (MonadTweak m, Is k A_Setter) => Optic' k is TxSkel a -> (a -> a) -> m ()","name":"overTweak","module":"Cooked.Tweak.Common","link":"Cooked-Tweak-Common.html#v:overTweak"},{"display_html":"overMaybeTweak :: (MonadTweak m, Is k A_Traversal) => Optic' k is TxSkel a -> (a -> Maybe a) -> m [a]","name":"overMaybeTweak","module":"Cooked.Tweak.Common","link":"Cooked-Tweak-Common.html#v:overMaybeTweak"},{"display_html":"overMaybeSelectingTweak :: forall a m k is. (MonadTweak m, Is k A_Traversal) => Optic' k is TxSkel a -> (a -> Maybe a) -> (Integer -> Bool) -> m [a]","name":"overMaybeSelectingTweak","module":"Cooked.Tweak.Common","link":"Cooked-Tweak-Common.html#v:overMaybeSelectingTweak"},{"display_html":"selectP :: (a -> Bool) -> Prism' a a","name":"selectP","module":"Cooked.Tweak.Common","link":"Cooked-Tweak-Common.html#v:selectP"},{"display_html":"combineModsTweak :: (Eq is, Is k A_Traversal, MonadTweak m) => ([is] -> [[is]]) -> Optic' k (WithIx is) TxSkel x -> (is -> x -> m [(x, l)]) -> m [l]","name":"combineModsTweak","module":"Cooked.Tweak.Common","link":"Cooked-Tweak-Common.html#v:combineModsTweak"},{"display_html":"iviewTweak :: (MonadTweak m, Is k A_Getter) => Optic' k (WithIx is) TxSkel a -> m (is, a)","name":"iviewTweak","module":"Cooked.Tweak.Common","link":"Cooked-Tweak-Common.html#v:iviewTweak"},{"display_html":"getSignersTweak :: MonadTweak m => m [Wallet]","name":"getSignersTweak","module":"Cooked.Tweak.Signers","link":"Cooked-Tweak-Signers.html#v:getSignersTweak"},{"display_html":"modifySignersTweak :: MonadTweak m => ([Wallet] -> [Wallet]) -> m [Wallet]","name":"modifySignersTweak","module":"Cooked.Tweak.Signers","link":"Cooked-Tweak-Signers.html#v:modifySignersTweak"},{"display_html":"setSignersTweak :: MonadTweak m => [Wallet] -> m [Wallet]","name":"setSignersTweak","module":"Cooked.Tweak.Signers","link":"Cooked-Tweak-Signers.html#v:setSignersTweak"},{"display_html":"signersSatisfyTweak :: MonadTweak m => ([Wallet] -> Bool) -> m Bool","name":"signersSatisfyTweak","module":"Cooked.Tweak.Signers","link":"Cooked-Tweak-Signers.html#v:signersSatisfyTweak"},{"display_html":"isSignerTweak :: MonadTweak m => Wallet -> m Bool","name":"isSignerTweak","module":"Cooked.Tweak.Signers","link":"Cooked-Tweak-Signers.html#v:isSignerTweak"},{"display_html":"hasSignersTweak :: MonadTweak m => m Bool","name":"hasSignersTweak","module":"Cooked.Tweak.Signers","link":"Cooked-Tweak-Signers.html#v:hasSignersTweak"},{"display_html":"addFirstSignerTweak :: MonadTweak m => Wallet -> m [Wallet]","name":"addFirstSignerTweak","module":"Cooked.Tweak.Signers","link":"Cooked-Tweak-Signers.html#v:addFirstSignerTweak"},{"display_html":"addSignersTweak :: MonadTweak m => [Wallet] -> m [Wallet]","name":"addSignersTweak","module":"Cooked.Tweak.Signers","link":"Cooked-Tweak-Signers.html#v:addSignersTweak"},{"display_html":"addLastSignerTweak :: MonadTweak m => Wallet -> m [Wallet]","name":"addLastSignerTweak","module":"Cooked.Tweak.Signers","link":"Cooked-Tweak-Signers.html#v:addLastSignerTweak"},{"display_html":"removeSignersTweak :: MonadTweak m => [Wallet] -> m [Wallet]","name":"removeSignersTweak","module":"Cooked.Tweak.Signers","link":"Cooked-Tweak-Signers.html#v:removeSignersTweak"},{"display_html":"removeSignerTweak :: MonadTweak m => Wallet -> m [Wallet]","name":"removeSignerTweak","module":"Cooked.Tweak.Signers","link":"Cooked-Tweak-Signers.html#v:removeSignerTweak"},{"display_html":"replaceFirstSignerTweak :: MonadTweak m => Wallet -> m [Wallet]","name":"replaceFirstSignerTweak","module":"Cooked.Tweak.Signers","link":"Cooked-Tweak-Signers.html#v:replaceFirstSignerTweak"},{"display_html":"data PermutOutTweakMode
","name":"PermutOutTweakMode KeepIdentity OmitIdentity","module":"Cooked.Tweak.OutPermutations","link":"Cooked-Tweak-OutPermutations.html#t:PermutOutTweakMode"},{"display_html":"allOutPermutsTweak :: MonadTweak m => PermutOutTweakMode -> m ()","name":"allOutPermutsTweak","module":"Cooked.Tweak.OutPermutations","link":"Cooked-Tweak-OutPermutations.html#v:allOutPermutsTweak"},{"display_html":"singleOutPermutTweak :: MonadTweak m => Int -> m ()","name":"singleOutPermutTweak","module":"Cooked.Tweak.OutPermutations","link":"Cooked-Tweak-OutPermutations.html#v:singleOutPermutTweak"},{"display_html":"distinctPermutations :: Eq a => [a] -> [[a]]","name":"distinctPermutations","module":"Cooked.Tweak.OutPermutations","link":"Cooked-Tweak-OutPermutations.html#v:distinctPermutations"},{"display_html":"addLabelTweak :: (MonadTweak m, LabelConstrs x) => x -> m ()","name":"addLabelTweak","module":"Cooked.Tweak.Labels","link":"Cooked-Tweak-Labels.html#v:addLabelTweak"},{"display_html":"removeLabelTweak :: (MonadTweak m, LabelConstrs x) => x -> m ()","name":"removeLabelTweak","module":"Cooked.Tweak.Labels","link":"Cooked-Tweak-Labels.html#v:removeLabelTweak"},{"display_html":"hasLabelTweak :: (MonadTweak m, LabelConstrs x) => x -> m Bool","name":"hasLabelTweak","module":"Cooked.Tweak.Labels","link":"Cooked-Tweak-Labels.html#v:hasLabelTweak"},{"display_html":"tamperDatumTweak :: forall a m. (MonadTweak m, Show a, PrettyCooked a, ToData a, FromData a, Typeable a) => (a -> Maybe a) -> m [a]","name":"tamperDatumTweak","module":"Cooked.Tweak.TamperDatum","link":"Cooked-Tweak-TamperDatum.html#v:tamperDatumTweak"},{"display_html":"data TamperDatumLbl = TamperDatumLbl","name":"TamperDatumLbl TamperDatumLbl","module":"Cooked.Tweak.TamperDatum","link":"Cooked-Tweak-TamperDatum.html#t:TamperDatumLbl"},{"display_html":"malformDatumTweak :: forall a m. (MonadTweak m, ToData a, FromData a, Typeable a) => (a -> [BuiltinData]) -> m ()","name":"malformDatumTweak","module":"Cooked.Tweak.TamperDatum","link":"Cooked-Tweak-TamperDatum.html#v:malformDatumTweak"},{"display_html":"data MalformDatumLbl = MalformDatumLbl","name":"MalformDatumLbl MalformDatumLbl","module":"Cooked.Tweak.TamperDatum","link":"Cooked-Tweak-TamperDatum.html#t:MalformDatumLbl"},{"display_html":"ensureInputTweak :: MonadTweak m => TxOutRef -> TxSkelRedeemer -> m (Maybe (TxOutRef, TxSkelRedeemer))","name":"ensureInputTweak","module":"Cooked.Tweak.AddInputsAndOutputs","link":"Cooked-Tweak-AddInputsAndOutputs.html#v:ensureInputTweak"},{"display_html":"addInputTweak :: MonadTweak m => TxOutRef -> TxSkelRedeemer -> m ()","name":"addInputTweak","module":"Cooked.Tweak.AddInputsAndOutputs","link":"Cooked-Tweak-AddInputsAndOutputs.html#v:addInputTweak"},{"display_html":"removeInputTweak :: MonadTweak m => (TxOutRef -> TxSkelRedeemer -> Bool) -> m [(TxOutRef, TxSkelRedeemer)]","name":"removeInputTweak","module":"Cooked.Tweak.AddInputsAndOutputs","link":"Cooked-Tweak-AddInputsAndOutputs.html#v:removeInputTweak"},{"display_html":"ensureOutputTweak :: MonadTweak m => TxSkelOut -> m (Maybe TxSkelOut)","name":"ensureOutputTweak","module":"Cooked.Tweak.AddInputsAndOutputs","link":"Cooked-Tweak-AddInputsAndOutputs.html#v:ensureOutputTweak"},{"display_html":"addOutputTweak :: MonadTweak m => TxSkelOut -> m ()","name":"addOutputTweak","module":"Cooked.Tweak.AddInputsAndOutputs","link":"Cooked-Tweak-AddInputsAndOutputs.html#v:addOutputTweak"},{"display_html":"removeOutputTweak :: MonadTweak m => (TxSkelOut -> Bool) -> m [TxSkelOut]","name":"removeOutputTweak","module":"Cooked.Tweak.AddInputsAndOutputs","link":"Cooked-Tweak-AddInputsAndOutputs.html#v:removeOutputTweak"},{"display_html":"addMintTweak :: MonadTweak m => (Versioned MintingPolicy, MintsRedeemer, TokenName, Integer) -> m ()","name":"addMintTweak","module":"Cooked.Tweak.AddInputsAndOutputs","link":"Cooked-Tweak-AddInputsAndOutputs.html#v:addMintTweak"},{"display_html":"removeMintTweak :: MonadTweak m => ((Versioned MintingPolicy, MintsRedeemer, TokenName, Integer) -> Bool) -> m [(Versioned MintingPolicy, MintsRedeemer, TokenName, Integer)]","name":"removeMintTweak","module":"Cooked.Tweak.AddInputsAndOutputs","link":"Cooked-Tweak-AddInputsAndOutputs.html#v:removeMintTweak"},{"display_html":"runUtxoSearch :: Monad m => UtxoSearch m a -> m [(TxOutRef, a)]","name":"runUtxoSearch","module":"Cooked.MockChain.UtxoSearch","link":"Cooked-MockChain-UtxoSearch.html#v:runUtxoSearch"},{"display_html":"allUtxosSearch :: MonadBlockChain m => UtxoSearch m TxOut","name":"allUtxosSearch","module":"Cooked.MockChain.UtxoSearch","link":"Cooked-MockChain-UtxoSearch.html#v:allUtxosSearch"},{"display_html":"allUtxosLedgerSearch :: MonadBlockChain m => UtxoSearch m TxOut","name":"allUtxosLedgerSearch","module":"Cooked.MockChain.UtxoSearch","link":"Cooked-MockChain-UtxoSearch.html#v:allUtxosLedgerSearch"},{"display_html":"utxosAtSearch :: MonadBlockChainBalancing m => Address -> UtxoSearch m TxOut","name":"utxosAtSearch","module":"Cooked.MockChain.UtxoSearch","link":"Cooked-MockChain-UtxoSearch.html#v:utxosAtSearch"},{"display_html":"utxosAtLedgerSearch :: MonadBlockChainBalancing m => Address -> UtxoSearch m TxOut","name":"utxosAtLedgerSearch","module":"Cooked.MockChain.UtxoSearch","link":"Cooked-MockChain-UtxoSearch.html#v:utxosAtLedgerSearch"},{"display_html":"utxosFromCardanoTxSearch :: Monad m => CardanoTx -> UtxoSearch m TxOut","name":"utxosFromCardanoTxSearch","module":"Cooked.MockChain.UtxoSearch","link":"Cooked-MockChain-UtxoSearch.html#v:utxosFromCardanoTxSearch"},{"display_html":"txOutByRefSearch :: MonadBlockChainBalancing m => [TxOutRef] -> UtxoSearch m TxOut","name":"txOutByRefSearch","module":"Cooked.MockChain.UtxoSearch","link":"Cooked-MockChain-UtxoSearch.html#v:txOutByRefSearch"},{"display_html":"filterWith :: Monad m => UtxoSearch m a -> (a -> m (Maybe b)) -> UtxoSearch m b","name":"filterWith","module":"Cooked.MockChain.UtxoSearch","link":"Cooked-MockChain-UtxoSearch.html#v:filterWith"},{"display_html":"filterWithPure :: Monad m => UtxoSearch m a -> (a -> Maybe b) -> UtxoSearch m b","name":"filterWithPure","module":"Cooked.MockChain.UtxoSearch","link":"Cooked-MockChain-UtxoSearch.html#v:filterWithPure"},{"display_html":"filterWithOptic :: (Is k An_AffineFold, Monad m) => UtxoSearch m a -> Optic' k is a b -> UtxoSearch m b","name":"filterWithOptic","module":"Cooked.MockChain.UtxoSearch","link":"Cooked-MockChain-UtxoSearch.html#v:filterWithOptic"},{"display_html":"filterWithPred :: Monad m => UtxoSearch m a -> (a -> Bool) -> UtxoSearch m a","name":"filterWithPred","module":"Cooked.MockChain.UtxoSearch","link":"Cooked-MockChain-UtxoSearch.html#v:filterWithPred"},{"display_html":"balancedTxSkel :: MonadBlockChainBalancing m => TxSkel -> m (TxSkel, Fee, Set TxOutRef)","name":"balancedTxSkel","module":"Cooked.MockChain.Balancing","link":"Cooked-MockChain-Balancing.html#v:balancedTxSkel"},{"display_html":"balancedTx :: MonadBlockChainBalancing m => (TxSkel, Fee, Set TxOutRef) -> m (Tx BabbageEra)","name":"balancedTx","module":"Cooked.MockChain.Balancing","link":"Cooked-MockChain-Balancing.html#v:balancedTx"},{"display_html":"txSkelInputData :: MonadBlockChainBalancing m => TxSkel -> m (Map DatumHash Datum)","name":"txSkelInputData","module":"Cooked.MockChain.Balancing","link":"Cooked-MockChain-Balancing.html#v:txSkelInputData"},{"display_html":"mcstToUtxoState :: MockChainSt -> UtxoState","name":"mcstToUtxoState","module":"Cooked.MockChain.Direct","link":"Cooked-MockChain-Direct.html#v:mcstToUtxoState"},{"display_html":"data MockChainSt = MockChainSt {
}","name":"MockChainSt MockChainSt mcstCurrentSlot mcstValidators mcstDatums mcstIndex","module":"Cooked.MockChain.Direct","link":"Cooked-MockChain-Direct.html#t:MockChainSt"},{"display_html":"newtype MockChainEnv = MockChainEnv {
}","name":"MockChainEnv MockChainEnv mceParams","module":"Cooked.MockChain.Direct","link":"Cooked-MockChain-Direct.html#t:MockChainEnv"},{"display_html":"newtype MockChainT m a = MockChainT {
}","name":"MockChainT MockChainT unMockChain","module":"Cooked.MockChain.Direct","link":"Cooked-MockChain-Direct.html#t:MockChainT"},{"display_html":"type MockChain = MockChainT Identity","name":"MockChain","module":"Cooked.MockChain.Direct","link":"Cooked-MockChain-Direct.html#t:MockChain"},{"display_html":"combineMockChainT :: Monad m => (forall a. m a -> m a -> m a) -> MockChainT m x -> MockChainT m x -> MockChainT m x","name":"combineMockChainT","module":"Cooked.MockChain.Direct","link":"Cooked-MockChain-Direct.html#v:combineMockChainT"},{"display_html":"mapMockChainT :: (m (Either MockChainError (a, MockChainSt)) -> n (Either MockChainError (b, MockChainSt))) -> MockChainT m a -> MockChainT n b","name":"mapMockChainT","module":"Cooked.MockChain.Direct","link":"Cooked-MockChain-Direct.html#v:mapMockChainT"},{"display_html":"runMockChainTRaw :: Monad m => MockChainEnv -> MockChainSt -> MockChainT m a -> m (Either MockChainError (a, MockChainSt))","name":"runMockChainTRaw","module":"Cooked.MockChain.Direct","link":"Cooked-MockChain-Direct.html#v:runMockChainTRaw"},{"display_html":"runMockChainTFrom :: Monad m => InitialDistribution -> MockChainT m a -> m (Either MockChainError (a, UtxoState))","name":"runMockChainTFrom","module":"Cooked.MockChain.Direct","link":"Cooked-MockChain-Direct.html#v:runMockChainTFrom"},{"display_html":"runMockChainT :: Monad m => MockChainT m a -> m (Either MockChainError (a, UtxoState))","name":"runMockChainT","module":"Cooked.MockChain.Direct","link":"Cooked-MockChain-Direct.html#v:runMockChainT"},{"display_html":"runMockChainRaw :: MockChainEnv -> MockChainSt -> MockChain a -> Either MockChainError (a, MockChainSt)","name":"runMockChainRaw","module":"Cooked.MockChain.Direct","link":"Cooked-MockChain-Direct.html#v:runMockChainRaw"},{"display_html":"runMockChainFrom :: InitialDistribution -> MockChain a -> Either MockChainError (a, UtxoState)","name":"runMockChainFrom","module":"Cooked.MockChain.Direct","link":"Cooked-MockChain-Direct.html#v:runMockChainFrom"},{"display_html":"runMockChain :: MockChain a -> Either MockChainError (a, UtxoState)","name":"runMockChain","module":"Cooked.MockChain.Direct","link":"Cooked-MockChain-Direct.html#v:runMockChain"},{"display_html":"utxoState0 :: UtxoState","name":"utxoState0","module":"Cooked.MockChain.Direct","link":"Cooked-MockChain-Direct.html#v:utxoState0"},{"display_html":"mockChainSt0 :: MockChainSt","name":"mockChainSt0","module":"Cooked.MockChain.Direct","link":"Cooked-MockChain-Direct.html#v:mockChainSt0"},{"display_html":"mockChainSt0From :: InitialDistribution -> MockChainSt","name":"mockChainSt0From","module":"Cooked.MockChain.Direct","link":"Cooked-MockChain-Direct.html#v:mockChainSt0From"},{"display_html":"utxoIndex0From :: InitialDistribution -> UtxoIndex","name":"utxoIndex0From","module":"Cooked.MockChain.Direct","link":"Cooked-MockChain-Direct.html#v:utxoIndex0From"},{"display_html":"utxoIndex0 :: UtxoIndex","name":"utxoIndex0","module":"Cooked.MockChain.Direct","link":"Cooked-MockChain-Direct.html#v:utxoIndex0"},{"display_html":"getIndex :: UtxoIndex -> Map TxOutRef TxOut","name":"getIndex","module":"Cooked.MockChain.Direct","link":"Cooked-MockChain-Direct.html#v:getIndex"},{"display_html":"runTransactionValidation :: Monad m => Params -> Tx BabbageEra -> [RawModTx] -> Map DatumHash Datum -> Map DatumHash TxSkelOutDatum -> Map ValidatorHash (Versioned Validator) -> MockChainT m CardanoTx","name":"runTransactionValidation","module":"Cooked.MockChain.Direct","link":"Cooked-MockChain-Direct.html#v:runTransactionValidation"},{"display_html":"interpretAndRunWith :: (forall m. Monad m => MockChainT m a -> m res) -> StagedMockChain a -> [(res, MockChainLog)]","name":"interpretAndRunWith","module":"Cooked.MockChain.Staged","link":"Cooked-MockChain-Staged.html#v:interpretAndRunWith"},{"display_html":"interpretAndRun :: StagedMockChain a -> [(Either MockChainError (a, UtxoState), MockChainLog)]","name":"interpretAndRun","module":"Cooked.MockChain.Staged","link":"Cooked-MockChain-Staged.html#v:interpretAndRun"},{"display_html":"data MockChainLogEntry","name":"MockChainLogEntry MCLogSubmittedTxSkel MCLogNewTx MCLogFail","module":"Cooked.MockChain.Staged","link":"Cooked-MockChain-Staged.html#t:MockChainLogEntry"},{"display_html":"newtype MockChainLog = MockChainLog {}","name":"MockChainLog MockChainLog unMockChainLog","module":"Cooked.MockChain.Staged","link":"Cooked-MockChain-Staged.html#t:MockChainLog"},{"display_html":"type StagedMockChain = Staged MockChainOp","name":"StagedMockChain","module":"Cooked.MockChain.Staged","link":"Cooked-MockChain-Staged.html#t:StagedMockChain"},{"display_html":"runTweakFrom :: MockChainEnv -> MockChainSt -> Tweak InterpMockChain a -> TxSkel -> [Either MockChainError (a, TxSkel)]","name":"runTweakFrom","module":"Cooked.MockChain.Staged","link":"Cooked-MockChain-Staged.html#v:runTweakFrom"},{"display_html":"type MonadModalBlockChain m = (MonadBlockChain m, MonadModal m, Modification m ~ UntypedTweak InterpMockChain)","name":"MonadModalBlockChain","module":"Cooked.MockChain.Staged","link":"Cooked-MockChain-Staged.html#t:MonadModalBlockChain"},{"display_html":"somewhere :: MonadModalBlockChain m => Tweak InterpMockChain b -> m a -> m a","name":"somewhere","module":"Cooked.MockChain.Staged","link":"Cooked-MockChain-Staged.html#v:somewhere"},{"display_html":"runTweak :: Tweak InterpMockChain a -> TxSkel -> [Either MockChainError (a, TxSkel)]","name":"runTweak","module":"Cooked.MockChain.Staged","link":"Cooked-MockChain-Staged.html#v:runTweak"},{"display_html":"everywhere :: MonadModalBlockChain m => Tweak InterpMockChain b -> m a -> m a","name":"everywhere","module":"Cooked.MockChain.Staged","link":"Cooked-MockChain-Staged.html#v:everywhere"},{"display_html":"withTweak :: MonadModalBlockChain m => m x -> Tweak InterpMockChain a -> m x","name":"withTweak","module":"Cooked.MockChain.Staged","link":"Cooked-MockChain-Staged.html#v:withTweak"},{"display_html":"prettyTxSkel :: PrettyCookedOpts -> SkelContext -> TxSkel -> DocCooked","name":"prettyTxSkel","module":"Cooked.Pretty.Cooked","link":"Cooked-Pretty-Cooked.html#v:prettyTxSkel"},{"display_html":"prettyBalancingWallet :: PrettyCookedOpts -> Wallet -> DocCooked","name":"prettyBalancingWallet","module":"Cooked.Pretty.Cooked","link":"Cooked-Pretty-Cooked.html#v:prettyBalancingWallet"},{"display_html":"prettySigners :: PrettyCookedOpts -> TxOpts -> [Wallet] -> [DocCooked]","name":"prettySigners","module":"Cooked.Pretty.Cooked","link":"Cooked-Pretty-Cooked.html#v:prettySigners"},{"display_html":"prettyMints :: PrettyCookedOpts -> (Versioned MintingPolicy, MintsRedeemer, TokenName, Integer) -> DocCooked","name":"prettyMints","module":"Cooked.Pretty.Cooked","link":"Cooked-Pretty-Cooked.html#v:prettyMints"},{"display_html":"mPrettyTxOpts :: PrettyCookedOpts -> TxOpts -> Maybe DocCooked","name":"mPrettyTxOpts","module":"Cooked.Pretty.Cooked","link":"Cooked-Pretty-Cooked.html#v:mPrettyTxOpts"},{"display_html":"prettyTxSkelOut :: PrettyCookedOpts -> TxSkelOut -> DocCooked","name":"prettyTxSkelOut","module":"Cooked.Pretty.Cooked","link":"Cooked-Pretty-Cooked.html#v:prettyTxSkelOut"},{"display_html":"prettyTxSkelOutDatumMaybe :: PrettyCookedOpts -> TxSkelOutDatum -> Maybe DocCooked","name":"prettyTxSkelOutDatumMaybe","module":"Cooked.Pretty.Cooked","link":"Cooked-Pretty-Cooked.html#v:prettyTxSkelOutDatumMaybe"},{"display_html":"prettyTxSkelIn :: PrettyCookedOpts -> SkelContext -> (TxOutRef, TxSkelRedeemer) -> DocCooked","name":"prettyTxSkelIn","module":"Cooked.Pretty.Cooked","link":"Cooked-Pretty-Cooked.html#v:prettyTxSkelIn"},{"display_html":"prettyTxSkelInReference :: PrettyCookedOpts -> SkelContext -> TxOutRef -> Maybe DocCooked","name":"prettyTxSkelInReference","module":"Cooked.Pretty.Cooked","link":"Cooked-Pretty-Cooked.html#v:prettyTxSkelInReference"},{"display_html":"prettyAddressState :: PrettyCookedOpts -> Address -> UtxoPayloadSet -> DocCooked","name":"prettyAddressState","module":"Cooked.Pretty.Cooked","link":"Cooked-Pretty-Cooked.html#v:prettyAddressState"},{"display_html":"prettyPayloadGrouped :: PrettyCookedOpts -> [UtxoPayload] -> Maybe DocCooked","name":"prettyPayloadGrouped","module":"Cooked.Pretty.Cooked","link":"Cooked-Pretty-Cooked.html#v:prettyPayloadGrouped"},{"display_html":"prettyPayload :: PrettyCookedOpts -> Bool -> UtxoPayload -> Maybe DocCooked","name":"prettyPayload","module":"Cooked.Pretty.Cooked","link":"Cooked-Pretty-Cooked.html#v:prettyPayload"},{"display_html":"prettyReferenceScriptHash :: PrettyCookedOpts -> ScriptHash -> DocCooked","name":"prettyReferenceScriptHash","module":"Cooked.Pretty.Cooked","link":"Cooked-Pretty-Cooked.html#v:prettyReferenceScriptHash"},{"display_html":"module Cooked.Pretty.Options","name":"","module":"Cooked.Pretty","link":""},{"display_html":"module Cooked.Pretty.Cooked","name":"","module":"Cooked.Pretty","link":""},{"display_html":"module Cooked.Pretty.Common","name":"","module":"Cooked.Pretty","link":""},{"display_html":"module Cooked.Pretty.Class","name":"","module":"Cooked.Pretty","link":""},{"display_html":"class IsProp prop where
","name":"IsProp testFailureMsg testSuccess testFailure testDisjoin testConjoin testCounterexample","module":"Cooked.MockChain.Testing","link":"Cooked-MockChain-Testing.html#t:IsProp"},{"display_html":"testBool :: IsProp prop => Bool -> prop","name":"testBool","module":"Cooked.MockChain.Testing","link":"Cooked-MockChain-Testing.html#v:testBool"},{"display_html":"testAll :: IsProp prop => (a -> prop) -> [a] -> prop","name":"testAll","module":"Cooked.MockChain.Testing","link":"Cooked-MockChain-Testing.html#v:testAll"},{"display_html":"(.==.) :: (IsProp prop, Eq a) => a -> a -> prop","name":".==.","module":"Cooked.MockChain.Testing","link":"Cooked-MockChain-Testing.html#v:.-61--61-."},{"display_html":"(.&&.) :: IsProp prop => prop -> prop -> prop","name":".&&.","module":"Cooked.MockChain.Testing","link":"Cooked-MockChain-Testing.html#v:.-38--38-."},{"display_html":"(.||.) :: IsProp prop => prop -> prop -> prop","name":".||.","module":"Cooked.MockChain.Testing","link":"Cooked-MockChain-Testing.html#v:.-124--124-."},{"display_html":"testSucceeds :: IsProp prop => PrettyCookedOpts -> StagedMockChain a -> prop","name":"testSucceeds","module":"Cooked.MockChain.Testing","link":"Cooked-MockChain-Testing.html#v:testSucceeds"},{"display_html":"testFails :: (IsProp prop, Show a) => PrettyCookedOpts -> (MockChainError -> prop) -> StagedMockChain a -> prop","name":"testFails","module":"Cooked.MockChain.Testing","link":"Cooked-MockChain-Testing.html#v:testFails"},{"display_html":"testSucceedsFrom :: IsProp prop => PrettyCookedOpts -> InitialDistribution -> StagedMockChain a -> prop","name":"testSucceedsFrom","module":"Cooked.MockChain.Testing","link":"Cooked-MockChain-Testing.html#v:testSucceedsFrom"},{"display_html":"testSucceedsFrom' :: IsProp prop => PrettyCookedOpts -> (a -> UtxoState -> prop) -> InitialDistribution -> StagedMockChain a -> prop","name":"testSucceedsFrom'","module":"Cooked.MockChain.Testing","link":"Cooked-MockChain-Testing.html#v:testSucceedsFrom-39-"},{"display_html":"testFailsFrom :: (IsProp prop, Show a) => PrettyCookedOpts -> (MockChainError -> prop) -> InitialDistribution -> StagedMockChain a -> prop","name":"testFailsFrom","module":"Cooked.MockChain.Testing","link":"Cooked-MockChain-Testing.html#v:testFailsFrom"},{"display_html":"isCekEvaluationFailure :: IsProp prop => PrettyCookedOpts -> MockChainError -> prop","name":"isCekEvaluationFailure","module":"Cooked.MockChain.Testing","link":"Cooked-MockChain-Testing.html#v:isCekEvaluationFailure"},{"display_html":"isCekEvaluationFailureWithMsg :: IsProp prop => PrettyCookedOpts -> (String -> Bool) -> MockChainError -> prop","name":"isCekEvaluationFailureWithMsg","module":"Cooked.MockChain.Testing","link":"Cooked-MockChain-Testing.html#v:isCekEvaluationFailureWithMsg"},{"display_html":"testAllSatisfiesFrom :: forall prop a. IsProp prop => PrettyCookedOpts -> (Either MockChainError (a, UtxoState) -> prop) -> InitialDistribution -> StagedMockChain a -> prop","name":"testAllSatisfiesFrom","module":"Cooked.MockChain.Testing","link":"Cooked-MockChain-Testing.html#v:testAllSatisfiesFrom"},{"display_html":"testBinaryRelatedBy :: IsProp prop => PrettyCookedOpts -> (UtxoState -> UtxoState -> prop) -> InitialDistribution -> StagedMockChain a -> prop","name":"testBinaryRelatedBy","module":"Cooked.MockChain.Testing","link":"Cooked-MockChain-Testing.html#v:testBinaryRelatedBy"},{"display_html":"testOneEquivClass :: IsProp prop => PrettyCookedOpts -> (UtxoState -> UtxoState -> prop) -> InitialDistribution -> StagedMockChain a -> prop","name":"testOneEquivClass","module":"Cooked.MockChain.Testing","link":"Cooked-MockChain-Testing.html#v:testOneEquivClass"},{"display_html":"testSatisfiesFrom' :: ([(Either MockChainError (a, UtxoState), MockChainLog)] -> prop) -> InitialDistribution -> StagedMockChain a -> prop","name":"testSatisfiesFrom'","module":"Cooked.MockChain.Testing","link":"Cooked-MockChain-Testing.html#v:testSatisfiesFrom-39-"},{"display_html":"assertionToMaybe :: Assertion -> IO (Maybe HUnitFailure)","name":"assertionToMaybe","module":"Cooked.MockChain.Testing","link":"Cooked-MockChain-Testing.html#v:assertionToMaybe"},{"display_html":"forAll :: Show a => Gen a -> (a -> Property) -> Property","name":"forAll","module":"Cooked.MockChain.Testing","link":"Cooked-MockChain-Testing.html#v:forAll"},{"display_html":"utxoPayloadReferenceScript :: UtxoPayload -> Maybe ScriptHash","name":"utxoPayloadReferenceScript","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:utxoPayloadReferenceScript"},{"display_html":"utxoPayloadSkelOutDatum :: UtxoPayload -> TxSkelOutDatum","name":"utxoPayloadSkelOutDatum","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:utxoPayloadSkelOutDatum"},{"display_html":"utxoPayloadTxOutRef :: UtxoPayload -> TxOutRef","name":"utxoPayloadTxOutRef","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:utxoPayloadTxOutRef"},{"display_html":"utxoPayloadValue :: UtxoPayload -> Value","name":"utxoPayloadValue","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:utxoPayloadValue"},{"display_html":"utxoPayloadSet :: UtxoPayloadSet -> [UtxoPayload]","name":"utxoPayloadSet","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:utxoPayloadSet"},{"display_html":"data UtxoState","name":"UtxoState","module":"Cooked.MockChain","link":"Cooked-MockChain.html#t:UtxoState"},{"display_html":"holdsInState :: Address -> UtxoState -> Value","name":"holdsInState","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:holdsInState"},{"display_html":"newtype AsTrans t (m :: Type -> Type) a = AsTrans {
}","name":"AsTrans AsTrans getTrans","module":"Cooked.MockChain","link":"Cooked-MockChain.html#t:AsTrans"},{"display_html":"class MonadBlockChainWithoutValidation m => MonadBlockChain m where
","name":"MonadBlockChain validateTxSkel","module":"Cooked.MockChain","link":"Cooked-MockChain.html#t:MonadBlockChain"},{"display_html":"class MonadBlockChainBalancing m => MonadBlockChainWithoutValidation m where
","name":"MonadBlockChainWithoutValidation allUtxosLedger awaitSlot currentSlot","module":"Cooked.MockChain","link":"Cooked-MockChain.html#t:MonadBlockChainWithoutValidation"},{"display_html":"class (MonadFail m, MonadError MockChainError m) => MonadBlockChainBalancing m where
","name":"MonadBlockChainBalancing txOutByRefLedger validatorFromHash utxosAtLedger getParams datumFromHash","module":"Cooked.MockChain","link":"Cooked-MockChain.html#t:MonadBlockChainBalancing"},{"display_html":"data MCEUnbalanceableError
","name":"MCEUnbalanceableError MCEUnbalNotEnoughFunds MCEUnbalNotEnoughReturning","module":"Cooked.MockChain","link":"Cooked-MockChain.html#t:MCEUnbalanceableError"},{"display_html":"data MockChainError where
","name":"MockChainError OtherMockChainError FailWith MCEUnknownDatum MCEUnknownValidator MCEUnknownOutRefError MCECalcFee MCEGenerationError MCENoSuitableCollateral MCEValidationError MCEUnbalanceable","module":"Cooked.MockChain","link":"Cooked-MockChain.html#t:MockChainError"},{"display_html":"allUtxos :: MonadBlockChainWithoutValidation m => m [(TxOutRef, TxOut)]","name":"allUtxos","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:allUtxos"},{"display_html":"utxosAt :: MonadBlockChainBalancing m => Address -> m [(TxOutRef, TxOut)]","name":"utxosAt","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:utxosAt"},{"display_html":"txOutByRef :: MonadBlockChainBalancing m => TxOutRef -> m (Maybe TxOut)","name":"txOutByRef","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:txOutByRef"},{"display_html":"utxosFromCardanoTx :: CardanoTx -> [(TxOutRef, TxOut)]","name":"utxosFromCardanoTx","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:utxosFromCardanoTx"},{"display_html":"txOutV2FromLedger :: TxOut -> TxOut","name":"txOutV2FromLedger","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:txOutV2FromLedger"},{"display_html":"resolveDatum :: (IsAbstractOutput out, ToOutputDatum (DatumType out), MonadBlockChainBalancing m) => out -> m (Maybe (ConcreteOutput (OwnerType out) Datum (ValueType out) (ReferenceScriptType out)))","name":"resolveDatum","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:resolveDatum"},{"display_html":"resolveTypedDatum :: (IsAbstractOutput out, ToOutputDatum (DatumType out), MonadBlockChainBalancing m, FromData a) => out -> m (Maybe (ConcreteOutput (OwnerType out) a (ValueType out) (ReferenceScriptType out)))","name":"resolveTypedDatum","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:resolveTypedDatum"},{"display_html":"resolveValidator :: (IsAbstractOutput out, ToCredential (OwnerType out), MonadBlockChainBalancing m) => out -> m (Maybe (ConcreteOutput (Versioned Validator) (DatumType out) (ValueType out) (ReferenceScriptType out)))","name":"resolveValidator","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:resolveValidator"},{"display_html":"resolveReferenceScript :: (IsAbstractOutput out, ToScriptHash (ReferenceScriptType out), MonadBlockChainBalancing m) => out -> m (Maybe (ConcreteOutput (OwnerType out) (DatumType out) (ValueType out) (Versioned Validator)))","name":"resolveReferenceScript","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:resolveReferenceScript"},{"display_html":"outputDatumFromTxOutRef :: MonadBlockChainWithoutValidation m => TxOutRef -> m (Maybe OutputDatum)","name":"outputDatumFromTxOutRef","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:outputDatumFromTxOutRef"},{"display_html":"datumFromTxOutRef :: MonadBlockChainWithoutValidation m => TxOutRef -> m (Maybe Datum)","name":"datumFromTxOutRef","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:datumFromTxOutRef"},{"display_html":"typedDatumFromTxOutRef :: (FromData a, MonadBlockChainWithoutValidation m) => TxOutRef -> m (Maybe a)","name":"typedDatumFromTxOutRef","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:typedDatumFromTxOutRef"},{"display_html":"valueFromTxOutRef :: MonadBlockChainWithoutValidation m => TxOutRef -> m (Maybe Value)","name":"valueFromTxOutRef","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:valueFromTxOutRef"},{"display_html":"waitNSlots :: MonadBlockChainWithoutValidation m => Integer -> m Slot","name":"waitNSlots","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:waitNSlots"},{"display_html":"currentTime :: MonadBlockChainWithoutValidation m => m (POSIXTime, POSIXTime)","name":"currentTime","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:currentTime"},{"display_html":"slotToTimeInterval :: MonadBlockChainWithoutValidation m => Slot -> m (POSIXTime, POSIXTime)","name":"slotToTimeInterval","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:slotToTimeInterval"},{"display_html":"getEnclosingSlot :: MonadBlockChainWithoutValidation m => POSIXTime -> m Slot","name":"getEnclosingSlot","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:getEnclosingSlot"},{"display_html":"awaitEnclosingSlot :: MonadBlockChainWithoutValidation m => POSIXTime -> m Slot","name":"awaitEnclosingSlot","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:awaitEnclosingSlot"},{"display_html":"slotRangeBefore :: MonadBlockChainWithoutValidation m => POSIXTime -> m SlotRange","name":"slotRangeBefore","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:slotRangeBefore"},{"display_html":"slotRangeAfter :: MonadBlockChainWithoutValidation m => POSIXTime -> m SlotRange","name":"slotRangeAfter","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:slotRangeAfter"},{"display_html":"runUtxoSearch :: Monad m => UtxoSearch m a -> m [(TxOutRef, a)]","name":"runUtxoSearch","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:runUtxoSearch"},{"display_html":"allUtxosSearch :: MonadBlockChain m => UtxoSearch m TxOut","name":"allUtxosSearch","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:allUtxosSearch"},{"display_html":"allUtxosLedgerSearch :: MonadBlockChain m => UtxoSearch m TxOut","name":"allUtxosLedgerSearch","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:allUtxosLedgerSearch"},{"display_html":"utxosAtSearch :: MonadBlockChainBalancing m => Address -> UtxoSearch m TxOut","name":"utxosAtSearch","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:utxosAtSearch"},{"display_html":"utxosAtLedgerSearch :: MonadBlockChainBalancing m => Address -> UtxoSearch m TxOut","name":"utxosAtLedgerSearch","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:utxosAtLedgerSearch"},{"display_html":"utxosFromCardanoTxSearch :: Monad m => CardanoTx -> UtxoSearch m TxOut","name":"utxosFromCardanoTxSearch","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:utxosFromCardanoTxSearch"},{"display_html":"txOutByRefSearch :: MonadBlockChainBalancing m => [TxOutRef] -> UtxoSearch m TxOut","name":"txOutByRefSearch","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:txOutByRefSearch"},{"display_html":"filterWith :: Monad m => UtxoSearch m a -> (a -> m (Maybe b)) -> UtxoSearch m b","name":"filterWith","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:filterWith"},{"display_html":"filterWithPure :: Monad m => UtxoSearch m a -> (a -> Maybe b) -> UtxoSearch m b","name":"filterWithPure","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:filterWithPure"},{"display_html":"filterWithOptic :: (Is k An_AffineFold, Monad m) => UtxoSearch m a -> Optic' k is a b -> UtxoSearch m b","name":"filterWithOptic","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:filterWithOptic"},{"display_html":"filterWithPred :: Monad m => UtxoSearch m a -> (a -> Bool) -> UtxoSearch m a","name":"filterWithPred","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:filterWithPred"},{"display_html":"balancedTxSkel :: MonadBlockChainBalancing m => TxSkel -> m (TxSkel, Fee, Set TxOutRef)","name":"balancedTxSkel","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:balancedTxSkel"},{"display_html":"balancedTx :: MonadBlockChainBalancing m => (TxSkel, Fee, Set TxOutRef) -> m (Tx BabbageEra)","name":"balancedTx","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:balancedTx"},{"display_html":"txSkelInputData :: MonadBlockChainBalancing m => TxSkel -> m (Map DatumHash Datum)","name":"txSkelInputData","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:txSkelInputData"},{"display_html":"type MockChain = MockChainT Identity","name":"MockChain","module":"Cooked.MockChain","link":"Cooked-MockChain.html#t:MockChain"},{"display_html":"newtype MockChainT m a = MockChainT {
}","name":"MockChainT MockChainT unMockChain","module":"Cooked.MockChain","link":"Cooked-MockChain.html#t:MockChainT"},{"display_html":"newtype MockChainEnv = MockChainEnv {
}","name":"MockChainEnv MockChainEnv mceParams","module":"Cooked.MockChain","link":"Cooked-MockChain.html#t:MockChainEnv"},{"display_html":"data MockChainSt = MockChainSt {
}","name":"MockChainSt MockChainSt mcstCurrentSlot mcstValidators mcstIndex mcstDatums","module":"Cooked.MockChain","link":"Cooked-MockChain.html#t:MockChainSt"},{"display_html":"mcstToUtxoState :: MockChainSt -> UtxoState","name":"mcstToUtxoState","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:mcstToUtxoState"},{"display_html":"combineMockChainT :: Monad m => (forall a. m a -> m a -> m a) -> MockChainT m x -> MockChainT m x -> MockChainT m x","name":"combineMockChainT","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:combineMockChainT"},{"display_html":"mapMockChainT :: (m (Either MockChainError (a, MockChainSt)) -> n (Either MockChainError (b, MockChainSt))) -> MockChainT m a -> MockChainT n b","name":"mapMockChainT","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:mapMockChainT"},{"display_html":"runMockChainTRaw :: Monad m => MockChainEnv -> MockChainSt -> MockChainT m a -> m (Either MockChainError (a, MockChainSt))","name":"runMockChainTRaw","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:runMockChainTRaw"},{"display_html":"runMockChainTFrom :: Monad m => InitialDistribution -> MockChainT m a -> m (Either MockChainError (a, UtxoState))","name":"runMockChainTFrom","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:runMockChainTFrom"},{"display_html":"runMockChainT :: Monad m => MockChainT m a -> m (Either MockChainError (a, UtxoState))","name":"runMockChainT","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:runMockChainT"},{"display_html":"runMockChainRaw :: MockChainEnv -> MockChainSt -> MockChain a -> Either MockChainError (a, MockChainSt)","name":"runMockChainRaw","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:runMockChainRaw"},{"display_html":"runMockChainFrom :: InitialDistribution -> MockChain a -> Either MockChainError (a, UtxoState)","name":"runMockChainFrom","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:runMockChainFrom"},{"display_html":"runMockChain :: MockChain a -> Either MockChainError (a, UtxoState)","name":"runMockChain","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:runMockChain"},{"display_html":"utxoState0 :: UtxoState","name":"utxoState0","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:utxoState0"},{"display_html":"mockChainSt0 :: MockChainSt","name":"mockChainSt0","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:mockChainSt0"},{"display_html":"mockChainSt0From :: InitialDistribution -> MockChainSt","name":"mockChainSt0From","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:mockChainSt0From"},{"display_html":"utxoIndex0From :: InitialDistribution -> UtxoIndex","name":"utxoIndex0From","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:utxoIndex0From"},{"display_html":"utxoIndex0 :: UtxoIndex","name":"utxoIndex0","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:utxoIndex0"},{"display_html":"getIndex :: UtxoIndex -> Map TxOutRef TxOut","name":"getIndex","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:getIndex"},{"display_html":"runTransactionValidation :: Monad m => Params -> Tx BabbageEra -> [RawModTx] -> Map DatumHash Datum -> Map DatumHash TxSkelOutDatum -> Map ValidatorHash (Versioned Validator) -> MockChainT m CardanoTx","name":"runTransactionValidation","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:runTransactionValidation"},{"display_html":"type MonadModalBlockChain m = (MonadBlockChain m, MonadModal m, Modification m ~ UntypedTweak InterpMockChain)","name":"MonadModalBlockChain","module":"Cooked.MockChain","link":"Cooked-MockChain.html#t:MonadModalBlockChain"},{"display_html":"unMockChainLog :: MockChainLog -> [MockChainLogEntry]","name":"unMockChainLog","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:unMockChainLog"},{"display_html":"pattern MCLogFail :: String -> MockChainLogEntry","name":"MCLogFail","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:MCLogFail"},{"display_html":"pattern MCLogSubmittedTxSkel :: SkelContext -> TxSkel -> MockChainLogEntry","name":"MCLogSubmittedTxSkel","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:MCLogSubmittedTxSkel"},{"display_html":"pattern MCLogNewTx :: TxId -> MockChainLogEntry","name":"MCLogNewTx","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:MCLogNewTx"},{"display_html":"interpretAndRunWith :: (forall m. Monad m => MockChainT m a -> m res) -> StagedMockChain a -> [(res, MockChainLog)]","name":"interpretAndRunWith","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:interpretAndRunWith"},{"display_html":"interpretAndRun :: StagedMockChain a -> [(Either MockChainError (a, UtxoState), MockChainLog)]","name":"interpretAndRun","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:interpretAndRun"},{"display_html":"runTweak :: Tweak InterpMockChain a -> TxSkel -> [Either MockChainError (a, TxSkel)]","name":"runTweak","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:runTweak"},{"display_html":"runTweakFrom :: MockChainEnv -> MockChainSt -> Tweak InterpMockChain a -> TxSkel -> [Either MockChainError (a, TxSkel)]","name":"runTweakFrom","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:runTweakFrom"},{"display_html":"somewhere :: MonadModalBlockChain m => Tweak InterpMockChain b -> m a -> m a","name":"somewhere","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:somewhere"},{"display_html":"everywhere :: MonadModalBlockChain m => Tweak InterpMockChain b -> m a -> m a","name":"everywhere","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:everywhere"},{"display_html":"withTweak :: MonadModalBlockChain m => m x -> Tweak InterpMockChain a -> m x","name":"withTweak","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:withTweak"},{"display_html":"class IsProp prop where
","name":"IsProp testFailureMsg testSuccess testFailure testDisjoin testCounterexample testConjoin","module":"Cooked.MockChain","link":"Cooked-MockChain.html#t:IsProp"},{"display_html":"testBool :: IsProp prop => Bool -> prop","name":"testBool","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:testBool"},{"display_html":"testAll :: IsProp prop => (a -> prop) -> [a] -> prop","name":"testAll","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:testAll"},{"display_html":"(.==.) :: (IsProp prop, Eq a) => a -> a -> prop","name":".==.","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:.-61--61-."},{"display_html":"(.&&.) :: IsProp prop => prop -> prop -> prop","name":".&&.","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:.-38--38-."},{"display_html":"(.||.) :: IsProp prop => prop -> prop -> prop","name":".||.","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:.-124--124-."},{"display_html":"testSucceeds :: IsProp prop => PrettyCookedOpts -> StagedMockChain a -> prop","name":"testSucceeds","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:testSucceeds"},{"display_html":"testFails :: (IsProp prop, Show a) => PrettyCookedOpts -> (MockChainError -> prop) -> StagedMockChain a -> prop","name":"testFails","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:testFails"},{"display_html":"testSucceedsFrom :: IsProp prop => PrettyCookedOpts -> InitialDistribution -> StagedMockChain a -> prop","name":"testSucceedsFrom","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:testSucceedsFrom"},{"display_html":"testSucceedsFrom' :: IsProp prop => PrettyCookedOpts -> (a -> UtxoState -> prop) -> InitialDistribution -> StagedMockChain a -> prop","name":"testSucceedsFrom'","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:testSucceedsFrom-39-"},{"display_html":"testFailsFrom :: (IsProp prop, Show a) => PrettyCookedOpts -> (MockChainError -> prop) -> InitialDistribution -> StagedMockChain a -> prop","name":"testFailsFrom","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:testFailsFrom"},{"display_html":"isCekEvaluationFailure :: IsProp prop => PrettyCookedOpts -> MockChainError -> prop","name":"isCekEvaluationFailure","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:isCekEvaluationFailure"},{"display_html":"isCekEvaluationFailureWithMsg :: IsProp prop => PrettyCookedOpts -> (String -> Bool) -> MockChainError -> prop","name":"isCekEvaluationFailureWithMsg","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:isCekEvaluationFailureWithMsg"},{"display_html":"testAllSatisfiesFrom :: forall prop a. IsProp prop => PrettyCookedOpts -> (Either MockChainError (a, UtxoState) -> prop) -> InitialDistribution -> StagedMockChain a -> prop","name":"testAllSatisfiesFrom","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:testAllSatisfiesFrom"},{"display_html":"testBinaryRelatedBy :: IsProp prop => PrettyCookedOpts -> (UtxoState -> UtxoState -> prop) -> InitialDistribution -> StagedMockChain a -> prop","name":"testBinaryRelatedBy","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:testBinaryRelatedBy"},{"display_html":"testOneEquivClass :: IsProp prop => PrettyCookedOpts -> (UtxoState -> UtxoState -> prop) -> InitialDistribution -> StagedMockChain a -> prop","name":"testOneEquivClass","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:testOneEquivClass"},{"display_html":"testSatisfiesFrom' :: ([(Either MockChainError (a, UtxoState), MockChainLog)] -> prop) -> InitialDistribution -> StagedMockChain a -> prop","name":"testSatisfiesFrom'","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:testSatisfiesFrom-39-"},{"display_html":"assertionToMaybe :: Assertion -> IO (Maybe HUnitFailure)","name":"assertionToMaybe","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:assertionToMaybe"},{"display_html":"forAll :: Show a => Gen a -> (a -> Property) -> Property","name":"forAll","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:forAll"},{"display_html":"getValidityRangeTweak :: MonadTweak m => m SlotRange","name":"getValidityRangeTweak","module":"Cooked.Tweak.ValidityRange","link":"Cooked-Tweak-ValidityRange.html#v:getValidityRangeTweak"},{"display_html":"setValidityRangeTweak :: MonadTweak m => SlotRange -> m SlotRange","name":"setValidityRangeTweak","module":"Cooked.Tweak.ValidityRange","link":"Cooked-Tweak-ValidityRange.html#v:setValidityRangeTweak"},{"display_html":"setAlwaysValidRangeTweak :: MonadTweak m => m SlotRange","name":"setAlwaysValidRangeTweak","module":"Cooked.Tweak.ValidityRange","link":"Cooked-Tweak-ValidityRange.html#v:setAlwaysValidRangeTweak"},{"display_html":"validityRangeSatisfiesTweak :: MonadTweak m => (SlotRange -> Bool) -> m Bool","name":"validityRangeSatisfiesTweak","module":"Cooked.Tweak.ValidityRange","link":"Cooked-Tweak-ValidityRange.html#v:validityRangeSatisfiesTweak"},{"display_html":"isValidAtTweak :: MonadTweak m => Slot -> m Bool","name":"isValidAtTweak","module":"Cooked.Tweak.ValidityRange","link":"Cooked-Tweak-ValidityRange.html#v:isValidAtTweak"},{"display_html":"isValidNowTweak :: MonadTweak m => m Bool","name":"isValidNowTweak","module":"Cooked.Tweak.ValidityRange","link":"Cooked-Tweak-ValidityRange.html#v:isValidNowTweak"},{"display_html":"isValidDuringTweak :: MonadTweak m => SlotRange -> m Bool","name":"isValidDuringTweak","module":"Cooked.Tweak.ValidityRange","link":"Cooked-Tweak-ValidityRange.html#v:isValidDuringTweak"},{"display_html":"hasEmptyTimeRangeTweak :: MonadTweak m => m Bool","name":"hasEmptyTimeRangeTweak","module":"Cooked.Tweak.ValidityRange","link":"Cooked-Tweak-ValidityRange.html#v:hasEmptyTimeRangeTweak"},{"display_html":"hasFullTimeRangeTweak :: MonadTweak m => m Bool","name":"hasFullTimeRangeTweak","module":"Cooked.Tweak.ValidityRange","link":"Cooked-Tweak-ValidityRange.html#v:hasFullTimeRangeTweak"},{"display_html":"intersectValidityRangeTweak :: MonadTweak m => SlotRange -> m SlotRange","name":"intersectValidityRangeTweak","module":"Cooked.Tweak.ValidityRange","link":"Cooked-Tweak-ValidityRange.html#v:intersectValidityRangeTweak"},{"display_html":"centerAroundValidityRangeTweak :: MonadTweak m => Slot -> Integer -> m SlotRange","name":"centerAroundValidityRangeTweak","module":"Cooked.Tweak.ValidityRange","link":"Cooked-Tweak-ValidityRange.html#v:centerAroundValidityRangeTweak"},{"display_html":"makeValidityRangeSingletonTweak :: MonadTweak m => Slot -> m SlotRange","name":"makeValidityRangeSingletonTweak","module":"Cooked.Tweak.ValidityRange","link":"Cooked-Tweak-ValidityRange.html#v:makeValidityRangeSingletonTweak"},{"display_html":"makeValidityRangeNowTweak :: MonadTweak m => m SlotRange","name":"makeValidityRangeNowTweak","module":"Cooked.Tweak.ValidityRange","link":"Cooked-Tweak-ValidityRange.html#v:makeValidityRangeNowTweak"},{"display_html":"waitUntilValidTweak :: MonadTweak m => m Slot","name":"waitUntilValidTweak","module":"Cooked.Tweak.ValidityRange","link":"Cooked-Tweak-ValidityRange.html#v:waitUntilValidTweak"},{"display_html":"class (MonadPlus m, MonadBlockChainWithoutValidation m) => MonadTweak m where","name":"MonadTweak getTxSkel putTxSkel","module":"Cooked.Tweak","link":"Cooked-Tweak.html#t:MonadTweak"},{"display_html":"failingTweak :: MonadTweak m => m a","name":"failingTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:failingTweak"},{"display_html":"doNothingTweak :: MonadTweak m => m ()","name":"doNothingTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:doNothingTweak"},{"display_html":"viewTweak :: (MonadTweak m, Is k A_Getter) => Optic' k is TxSkel a -> m a","name":"viewTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:viewTweak"},{"display_html":"iviewTweak :: (MonadTweak m, Is k A_Getter) => Optic' k (WithIx is) TxSkel a -> m (is, a)","name":"iviewTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:iviewTweak"},{"display_html":"viewAllTweak :: (MonadTweak m, Is k A_Fold) => Optic' k is TxSkel a -> m [a]","name":"viewAllTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:viewAllTweak"},{"display_html":"setTweak :: (MonadTweak m, Is k A_Setter) => Optic' k is TxSkel a -> a -> m ()","name":"setTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:setTweak"},{"display_html":"overTweak :: (MonadTweak m, Is k A_Setter) => Optic' k is TxSkel a -> (a -> a) -> m ()","name":"overTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:overTweak"},{"display_html":"overMaybeTweak :: (MonadTweak m, Is k A_Traversal) => Optic' k is TxSkel a -> (a -> Maybe a) -> m [a]","name":"overMaybeTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:overMaybeTweak"},{"display_html":"overMaybeSelectingTweak :: forall a m k is. (MonadTweak m, Is k A_Traversal) => Optic' k is TxSkel a -> (a -> Maybe a) -> (Integer -> Bool) -> m [a]","name":"overMaybeSelectingTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:overMaybeSelectingTweak"},{"display_html":"combineModsTweak :: (Eq is, Is k A_Traversal, MonadTweak m) => ([is] -> [[is]]) -> Optic' k (WithIx is) TxSkel x -> (is -> x -> m [(x, l)]) -> m [l]","name":"combineModsTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:combineModsTweak"},{"display_html":"selectP :: (a -> Bool) -> Prism' a a","name":"selectP","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:selectP"},{"display_html":"getSignersTweak :: MonadTweak m => m [Wallet]","name":"getSignersTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:getSignersTweak"},{"display_html":"modifySignersTweak :: MonadTweak m => ([Wallet] -> [Wallet]) -> m [Wallet]","name":"modifySignersTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:modifySignersTweak"},{"display_html":"setSignersTweak :: MonadTweak m => [Wallet] -> m [Wallet]","name":"setSignersTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:setSignersTweak"},{"display_html":"signersSatisfyTweak :: MonadTweak m => ([Wallet] -> Bool) -> m Bool","name":"signersSatisfyTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:signersSatisfyTweak"},{"display_html":"isSignerTweak :: MonadTweak m => Wallet -> m Bool","name":"isSignerTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:isSignerTweak"},{"display_html":"hasSignersTweak :: MonadTweak m => m Bool","name":"hasSignersTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:hasSignersTweak"},{"display_html":"addFirstSignerTweak :: MonadTweak m => Wallet -> m [Wallet]","name":"addFirstSignerTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:addFirstSignerTweak"},{"display_html":"addSignersTweak :: MonadTweak m => [Wallet] -> m [Wallet]","name":"addSignersTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:addSignersTweak"},{"display_html":"addLastSignerTweak :: MonadTweak m => Wallet -> m [Wallet]","name":"addLastSignerTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:addLastSignerTweak"},{"display_html":"removeSignersTweak :: MonadTweak m => [Wallet] -> m [Wallet]","name":"removeSignersTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:removeSignersTweak"},{"display_html":"removeSignerTweak :: MonadTweak m => Wallet -> m [Wallet]","name":"removeSignerTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:removeSignerTweak"},{"display_html":"replaceFirstSignerTweak :: MonadTweak m => Wallet -> m [Wallet]","name":"replaceFirstSignerTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:replaceFirstSignerTweak"},{"display_html":"data PermutOutTweakMode
","name":"PermutOutTweakMode KeepIdentity OmitIdentity","module":"Cooked.Tweak","link":"Cooked-Tweak.html#t:PermutOutTweakMode"},{"display_html":"allOutPermutsTweak :: MonadTweak m => PermutOutTweakMode -> m ()","name":"allOutPermutsTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:allOutPermutsTweak"},{"display_html":"singleOutPermutTweak :: MonadTweak m => Int -> m ()","name":"singleOutPermutTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:singleOutPermutTweak"},{"display_html":"addLabelTweak :: (MonadTweak m, LabelConstrs x) => x -> m ()","name":"addLabelTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:addLabelTweak"},{"display_html":"removeLabelTweak :: (MonadTweak m, LabelConstrs x) => x -> m ()","name":"removeLabelTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:removeLabelTweak"},{"display_html":"hasLabelTweak :: (MonadTweak m, LabelConstrs x) => x -> m Bool","name":"hasLabelTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:hasLabelTweak"},{"display_html":"data MalformDatumLbl = MalformDatumLbl","name":"MalformDatumLbl MalformDatumLbl","module":"Cooked.Tweak","link":"Cooked-Tweak.html#t:MalformDatumLbl"},{"display_html":"data TamperDatumLbl = TamperDatumLbl","name":"TamperDatumLbl TamperDatumLbl","module":"Cooked.Tweak","link":"Cooked-Tweak.html#t:TamperDatumLbl"},{"display_html":"tamperDatumTweak :: forall a m. (MonadTweak m, Show a, PrettyCooked a, ToData a, FromData a, Typeable a) => (a -> Maybe a) -> m [a]","name":"tamperDatumTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:tamperDatumTweak"},{"display_html":"malformDatumTweak :: forall a m. (MonadTweak m, ToData a, FromData a, Typeable a) => (a -> [BuiltinData]) -> m ()","name":"malformDatumTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:malformDatumTweak"},{"display_html":"ensureInputTweak :: MonadTweak m => TxOutRef -> TxSkelRedeemer -> m (Maybe (TxOutRef, TxSkelRedeemer))","name":"ensureInputTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:ensureInputTweak"},{"display_html":"addInputTweak :: MonadTweak m => TxOutRef -> TxSkelRedeemer -> m ()","name":"addInputTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:addInputTweak"},{"display_html":"removeInputTweak :: MonadTweak m => (TxOutRef -> TxSkelRedeemer -> Bool) -> m [(TxOutRef, TxSkelRedeemer)]","name":"removeInputTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:removeInputTweak"},{"display_html":"ensureOutputTweak :: MonadTweak m => TxSkelOut -> m (Maybe TxSkelOut)","name":"ensureOutputTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:ensureOutputTweak"},{"display_html":"addOutputTweak :: MonadTweak m => TxSkelOut -> m ()","name":"addOutputTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:addOutputTweak"},{"display_html":"removeOutputTweak :: MonadTweak m => (TxSkelOut -> Bool) -> m [TxSkelOut]","name":"removeOutputTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:removeOutputTweak"},{"display_html":"addMintTweak :: MonadTweak m => (Versioned MintingPolicy, MintsRedeemer, TokenName, Integer) -> m ()","name":"addMintTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:addMintTweak"},{"display_html":"removeMintTweak :: MonadTweak m => ((Versioned MintingPolicy, MintsRedeemer, TokenName, Integer) -> Bool) -> m [(Versioned MintingPolicy, MintsRedeemer, TokenName, Integer)]","name":"removeMintTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:removeMintTweak"},{"display_html":"getValidityRangeTweak :: MonadTweak m => m SlotRange","name":"getValidityRangeTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:getValidityRangeTweak"},{"display_html":"setValidityRangeTweak :: MonadTweak m => SlotRange -> m SlotRange","name":"setValidityRangeTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:setValidityRangeTweak"},{"display_html":"setAlwaysValidRangeTweak :: MonadTweak m => m SlotRange","name":"setAlwaysValidRangeTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:setAlwaysValidRangeTweak"},{"display_html":"validityRangeSatisfiesTweak :: MonadTweak m => (SlotRange -> Bool) -> m Bool","name":"validityRangeSatisfiesTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:validityRangeSatisfiesTweak"},{"display_html":"isValidAtTweak :: MonadTweak m => Slot -> m Bool","name":"isValidAtTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:isValidAtTweak"},{"display_html":"isValidNowTweak :: MonadTweak m => m Bool","name":"isValidNowTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:isValidNowTweak"},{"display_html":"isValidDuringTweak :: MonadTweak m => SlotRange -> m Bool","name":"isValidDuringTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:isValidDuringTweak"},{"display_html":"hasEmptyTimeRangeTweak :: MonadTweak m => m Bool","name":"hasEmptyTimeRangeTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:hasEmptyTimeRangeTweak"},{"display_html":"hasFullTimeRangeTweak :: MonadTweak m => m Bool","name":"hasFullTimeRangeTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:hasFullTimeRangeTweak"},{"display_html":"intersectValidityRangeTweak :: MonadTweak m => SlotRange -> m SlotRange","name":"intersectValidityRangeTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:intersectValidityRangeTweak"},{"display_html":"centerAroundValidityRangeTweak :: MonadTweak m => Slot -> Integer -> m SlotRange","name":"centerAroundValidityRangeTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:centerAroundValidityRangeTweak"},{"display_html":"makeValidityRangeSingletonTweak :: MonadTweak m => Slot -> m SlotRange","name":"makeValidityRangeSingletonTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:makeValidityRangeSingletonTweak"},{"display_html":"makeValidityRangeNowTweak :: MonadTweak m => m SlotRange","name":"makeValidityRangeNowTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:makeValidityRangeNowTweak"},{"display_html":"waitUntilValidTweak :: MonadTweak m => m Slot","name":"waitUntilValidTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:waitUntilValidTweak"},{"display_html":"redirectScriptOutputTweak :: (MonadTweak m, Is k A_Traversal, Show (DatumType a), ToData (DatumType a)) => Optic' k is TxSkel (ConcreteOutput (TypedValidator a) TxSkelOutDatum Value (Versioned Script)) -> (ConcreteOutput (TypedValidator a) TxSkelOutDatum Value (Versioned Script) -> Maybe (TypedValidator a)) -> (Integer -> Bool) -> m [ConcreteOutput (TypedValidator a) TxSkelOutDatum Value (Versioned Script)]","name":"redirectScriptOutputTweak","module":"Cooked.Attack.DatumHijacking","link":"Cooked-Attack-DatumHijacking.html#v:redirectScriptOutputTweak"},{"display_html":"datumHijackingAttack :: forall a m. (MonadTweak m, Show (DatumType a), PrettyCooked (DatumType a), ToData (DatumType a), Typeable (DatumType a), Typeable a) => (ConcreteOutput (TypedValidator a) TxSkelOutDatum Value (Versioned Script) -> Bool) -> (Integer -> Bool) -> m [ConcreteOutput (TypedValidator a) TxSkelOutDatum Value (Versioned Script)]","name":"datumHijackingAttack","module":"Cooked.Attack.DatumHijacking","link":"Cooked-Attack-DatumHijacking.html#v:datumHijackingAttack"},{"display_html":"newtype DatumHijackingLbl = DatumHijackingLbl Address","name":"DatumHijackingLbl DatumHijackingLbl","module":"Cooked.Attack.DatumHijacking","link":"Cooked-Attack-DatumHijacking.html#t:DatumHijackingLbl"},{"display_html":"datumHijackingTarget :: TypedValidator a","name":"datumHijackingTarget","module":"Cooked.Attack.DatumHijacking","link":"Cooked-Attack-DatumHijacking.html#v:datumHijackingTarget"},{"display_html":"dupTokenAttack :: MonadTweak m => (AssetClass -> Integer -> Integer) -> Wallet -> m Value","name":"dupTokenAttack","module":"Cooked.Attack.DupToken","link":"Cooked-Attack-DupToken.html#v:dupTokenAttack"},{"display_html":"data DupTokenLbl = DupTokenLbl","name":"DupTokenLbl DupTokenLbl","module":"Cooked.Attack.DupToken","link":"Cooked-Attack-DupToken.html#t:DupTokenLbl"},{"display_html":"type DoubleSatDelta = (Map TxOutRef TxSkelRedeemer, [TxSkelOut], TxSkelMints)","name":"DoubleSatDelta","module":"Cooked.Attack.DoubleSat","link":"Cooked-Attack-DoubleSat.html#t:DoubleSatDelta"},{"display_html":"data DoubleSatLbl = DoubleSatLbl","name":"DoubleSatLbl DoubleSatLbl","module":"Cooked.Attack.DoubleSat","link":"Cooked-Attack-DoubleSat.html#t:DoubleSatLbl"},{"display_html":"doubleSatAttack :: (MonadTweak m, Eq is, Is k A_Traversal) => ([is] -> [[is]]) -> Optic' k (WithIx is) TxSkel a -> (is -> a -> m [(a, DoubleSatDelta)]) -> Wallet -> m ()","name":"doubleSatAttack","module":"Cooked.Attack.DoubleSat","link":"Cooked-Attack-DoubleSat.html#v:doubleSatAttack"},{"display_html":"addTokenAttack :: MonadTweak m => (Versioned MintingPolicy -> [(TokenName, Integer)]) -> Wallet -> m Value","name":"addTokenAttack","module":"Cooked.Attack.AddToken","link":"Cooked-Attack-AddToken.html#v:addTokenAttack"},{"display_html":"newtype AddTokenLbl = AddTokenLbl TokenName","name":"AddTokenLbl AddTokenLbl","module":"Cooked.Attack.AddToken","link":"Cooked-Attack-AddToken.html#t:AddTokenLbl"},{"display_html":"module Cooked.Attack.DupToken","name":"","module":"Cooked.Attack","link":""},{"display_html":"module Cooked.Attack.DoubleSat","name":"","module":"Cooked.Attack","link":""},{"display_html":"module Cooked.Attack.DatumHijacking","name":"","module":"Cooked.Attack","link":""},{"display_html":"module Cooked.Attack.AddToken","name":"","module":"Cooked.Attack","link":""},{"display_html":"module Cooked.Wallet","name":"","module":"Cooked","link":""},{"display_html":"module Cooked.ValueUtils","name":"","module":"Cooked","link":""},{"display_html":"module Cooked.Tweak","name":"","module":"Cooked","link":""},{"display_html":"module Cooked.Skeleton","name":"","module":"Cooked","link":""},{"display_html":"module Cooked.ShowBS","name":"","module":"Cooked","link":""},{"display_html":"module Cooked.RawUPLC","name":"","module":"Cooked","link":""},{"display_html":"module Cooked.Pretty","name":"","module":"Cooked","link":""},{"display_html":"module Cooked.Output","name":"","module":"Cooked","link":""},{"display_html":"module Cooked.MockChain","name":"","module":"Cooked","link":""},{"display_html":"module Cooked.Currencies","name":"","module":"Cooked","link":""},{"display_html":"module Cooked.Attack","name":"","module":"Cooked","link":""},{"display_html":"class Monad m => MonadModal m where
","name":"MonadModal Modification modifyLtl","module":"Cooked","link":"Cooked.html#t:MonadModal"},{"display_html":"data Ltl a
","name":"Ltl LtlTruth LtlFalsity LtlAtom LtlOr LtlAnd LtlNext LtlUntil LtlRelease","module":"Cooked","link":"Cooked.html#t:Ltl"}]
\ No newline at end of file
+[{"display_html":"quickTokenName :: String -> TokenName","name":"quickTokenName","module":"Cooked.Currencies","link":"Cooked-Currencies.html#v:quickTokenName"},{"display_html":"quickAssetClass :: String -> AssetClass","name":"quickAssetClass","module":"Cooked.Currencies","link":"Cooked-Currencies.html#v:quickAssetClass"},{"display_html":"quickValue :: String -> Integer -> Value","name":"quickValue","module":"Cooked.Currencies","link":"Cooked-Currencies.html#v:quickValue"},{"display_html":"permanentTokenName :: String -> TokenName","name":"permanentTokenName","module":"Cooked.Currencies","link":"Cooked-Currencies.html#v:permanentTokenName"},{"display_html":"permanentAssetClass :: String -> AssetClass","name":"permanentAssetClass","module":"Cooked.Currencies","link":"Cooked-Currencies.html#v:permanentAssetClass"},{"display_html":"permanentValue :: String -> Integer -> Value","name":"permanentValue","module":"Cooked.Currencies","link":"Cooked-Currencies.html#v:permanentValue"},{"display_html":"quickCurrencyPolicy :: MintingPolicy","name":"quickCurrencyPolicy","module":"Cooked.Currencies","link":"Cooked-Currencies.html#v:quickCurrencyPolicy"},{"display_html":"quickCurrencySymbol :: CurrencySymbol","name":"quickCurrencySymbol","module":"Cooked.Currencies","link":"Cooked-Currencies.html#v:quickCurrencySymbol"},{"display_html":"permanentCurrencyPolicy :: MintingPolicy","name":"permanentCurrencyPolicy","module":"Cooked.Currencies","link":"Cooked-Currencies.html#v:permanentCurrencyPolicy"},{"display_html":"permanentCurrencySymbol :: CurrencySymbol","name":"permanentCurrencySymbol","module":"Cooked.Currencies","link":"Cooked-Currencies.html#v:permanentCurrencySymbol"},{"display_html":"data Ltl a
","name":"Ltl LtlTruth LtlFalsity LtlAtom LtlOr LtlAnd LtlNext LtlUntil LtlRelease","module":"Cooked.Ltl","link":"Cooked-Ltl.html#t:Ltl"},{"display_html":"nowLater :: Monoid a => Ltl a -> [(a, Ltl a)]","name":"nowLater","module":"Cooked.Ltl","link":"Cooked-Ltl.html#v:nowLater"},{"display_html":"nowLaterList :: Monoid a => [Ltl a] -> [(a, [Ltl a])]","name":"nowLaterList","module":"Cooked.Ltl","link":"Cooked-Ltl.html#v:nowLaterList"},{"display_html":"data LtlOp (modification :: *) (builtin :: * -> *) :: * -> * where
","name":"LtlOp Builtin StartLtl StopLtl","module":"Cooked.Ltl","link":"Cooked-Ltl.html#t:LtlOp"},{"display_html":"data Staged (op :: * -> *) :: * -> * where","name":"Staged Return Instr","module":"Cooked.Ltl","link":"Cooked-Ltl.html#t:Staged"},{"display_html":"interpLtl :: InterpLtl modification builtin m => Staged (LtlOp modification builtin) a -> StateT [Ltl modification] m a","name":"interpLtl","module":"Cooked.Ltl","link":"Cooked-Ltl.html#v:interpLtl"},{"display_html":"interpLtlAndPruneUnfinished :: InterpLtl modification builtin m => Staged (LtlOp modification builtin) a -> StateT [Ltl modification] m a","name":"interpLtlAndPruneUnfinished","module":"Cooked.Ltl","link":"Cooked-Ltl.html#v:interpLtlAndPruneUnfinished"},{"display_html":"class MonadPlus m => InterpLtl modification builtin m where
","name":"InterpLtl interpBuiltin","module":"Cooked.Ltl","link":"Cooked-Ltl.html#t:InterpLtl"},{"display_html":"class Monad m => MonadModal m where
","name":"MonadModal Modification modifyLtl","module":"Cooked.Ltl","link":"Cooked-Ltl.html#t:MonadModal"},{"display_html":"class IsAbstractOutput o","name":"IsAbstractOutput","module":"Cooked.Output","link":"Cooked-Output.html#t:IsAbstractOutput"},{"display_html":"type family OwnerType o","name":"OwnerType","module":"Cooked.Output","link":"Cooked-Output.html#t:OwnerType"},{"display_html":"type family DatumType o","name":"DatumType","module":"Cooked.Output","link":"Cooked-Output.html#t:DatumType"},{"display_html":"type family ValueType o","name":"ValueType","module":"Cooked.Output","link":"Cooked-Output.html#t:ValueType"},{"display_html":"type family ReferenceScriptType o","name":"ReferenceScriptType","module":"Cooked.Output","link":"Cooked-Output.html#t:ReferenceScriptType"},{"display_html":"outputOwnerL :: IsAbstractOutput o => Lens' o (OwnerType o)","name":"outputOwnerL","module":"Cooked.Output","link":"Cooked-Output.html#v:outputOwnerL"},{"display_html":"outputStakingCredentialL :: IsAbstractOutput o => Lens' o (Maybe StakingCredential)","name":"outputStakingCredentialL","module":"Cooked.Output","link":"Cooked-Output.html#v:outputStakingCredentialL"},{"display_html":"outputDatumL :: IsAbstractOutput o => Lens' o (DatumType o)","name":"outputDatumL","module":"Cooked.Output","link":"Cooked-Output.html#v:outputDatumL"},{"display_html":"outputValueL :: IsAbstractOutput o => Lens' o (ValueType o)","name":"outputValueL","module":"Cooked.Output","link":"Cooked-Output.html#v:outputValueL"},{"display_html":"outputReferenceScriptL :: IsAbstractOutput o => Lens' o (Maybe (ReferenceScriptType o))","name":"outputReferenceScriptL","module":"Cooked.Output","link":"Cooked-Output.html#v:outputReferenceScriptL"},{"display_html":"class ToCredential a where
","name":"ToCredential toCredential","module":"Cooked.Output","link":"Cooked-Output.html#t:ToCredential"},{"display_html":"class ToOutputDatum a where
","name":"ToOutputDatum toOutputDatum","module":"Cooked.Output","link":"Cooked-Output.html#t:ToOutputDatum"},{"display_html":"class ToValue a where
","name":"ToValue toValue","module":"Cooked.Output","link":"Cooked-Output.html#t:ToValue"},{"display_html":"class ToScript a where
","name":"ToScript toScript","module":"Cooked.Output","link":"Cooked-Output.html#t:ToScript"},{"display_html":"class ToScriptHash a where
","name":"ToScriptHash toScriptHash","module":"Cooked.Output","link":"Cooked-Output.html#t:ToScriptHash"},{"display_html":"type IsTxInfoOutput o = (IsAbstractOutput o, ToCredential (OwnerType o), ToOutputDatum (DatumType o), ToValue (ValueType o), ToScriptHash (ReferenceScriptType o))","name":"IsTxInfoOutput","module":"Cooked.Output","link":"Cooked-Output.html#t:IsTxInfoOutput"},{"display_html":"outputAddress :: (IsAbstractOutput o, ToCredential (OwnerType o)) => o -> Address","name":"outputAddress","module":"Cooked.Output","link":"Cooked-Output.html#v:outputAddress"},{"display_html":"outputOutputDatum :: (IsAbstractOutput o, ToOutputDatum (DatumType o)) => o -> OutputDatum","name":"outputOutputDatum","module":"Cooked.Output","link":"Cooked-Output.html#v:outputOutputDatum"},{"display_html":"outputValue :: (IsAbstractOutput o, ToValue (ValueType o)) => o -> Value","name":"outputValue","module":"Cooked.Output","link":"Cooked-Output.html#v:outputValue"},{"display_html":"outputReferenceScriptHash :: (IsAbstractOutput o, ToScriptHash (ReferenceScriptType o)) => o -> Maybe ScriptHash","name":"outputReferenceScriptHash","module":"Cooked.Output","link":"Cooked-Output.html#v:outputReferenceScriptHash"},{"display_html":"outputTxOut :: IsTxInfoOutput o => o -> TxOut","name":"outputTxOut","module":"Cooked.Output","link":"Cooked-Output.html#v:outputTxOut"},{"display_html":"data ConcreteOutput ownerType datumType valueType referenceScriptType where
","name":"ConcreteOutput ConcreteOutput","module":"Cooked.Output","link":"Cooked-Output.html#t:ConcreteOutput"},{"display_html":"toOutputWithReferenceScriptHash :: (IsAbstractOutput output, ToScriptHash (ReferenceScriptType output)) => output -> ConcreteOutput (OwnerType output) (DatumType output) (ValueType output) ScriptHash","name":"toOutputWithReferenceScriptHash","module":"Cooked.Output","link":"Cooked-Output.html#v:toOutputWithReferenceScriptHash"},{"display_html":"isOutputWithoutDatum :: IsTxInfoOutput output => output -> Maybe (ConcreteOutput (OwnerType output) () (ValueType output) (ReferenceScriptType output))","name":"isOutputWithoutDatum","module":"Cooked.Output","link":"Cooked-Output.html#v:isOutputWithoutDatum"},{"display_html":"isOutputWithInlineDatum :: IsTxInfoOutput output => output -> Maybe (ConcreteOutput (OwnerType output) Datum (ValueType output) (ReferenceScriptType output))","name":"isOutputWithInlineDatum","module":"Cooked.Output","link":"Cooked-Output.html#v:isOutputWithInlineDatum"},{"display_html":"isOutputWithDatumHash :: IsTxInfoOutput output => output -> Maybe (ConcreteOutput (OwnerType output) DatumHash (ValueType output) (ReferenceScriptType output))","name":"isOutputWithDatumHash","module":"Cooked.Output","link":"Cooked-Output.html#v:isOutputWithDatumHash"},{"display_html":"isOutputWithInlineDatumOfType :: (FromData a, IsTxInfoOutput output) => output -> Maybe (ConcreteOutput (OwnerType output) a (ValueType output) (ReferenceScriptType output))","name":"isOutputWithInlineDatumOfType","module":"Cooked.Output","link":"Cooked-Output.html#v:isOutputWithInlineDatumOfType"},{"display_html":"isScriptOutputFrom :: IsTxInfoOutput output => TypedValidator a -> output -> Maybe (ConcreteOutput (TypedValidator a) (DatumType output) (ValueType output) (ReferenceScriptType output))","name":"isScriptOutputFrom","module":"Cooked.Output","link":"Cooked-Output.html#v:isScriptOutputFrom"},{"display_html":"isPKOutputFrom :: IsTxInfoOutput output => PubKeyHash -> output -> Maybe (ConcreteOutput PubKeyHash (DatumType output) (ValueType output) (ReferenceScriptType output))","name":"isPKOutputFrom","module":"Cooked.Output","link":"Cooked-Output.html#v:isPKOutputFrom"},{"display_html":"isOnlyAdaOutput :: IsTxInfoOutput output => output -> Maybe (ConcreteOutput (OwnerType output) (DatumType output) Ada (ReferenceScriptType output))","name":"isOnlyAdaOutput","module":"Cooked.Output","link":"Cooked-Output.html#v:isOnlyAdaOutput"},{"display_html":"type DocCooked = Doc ()","name":"DocCooked","module":"Cooked.Pretty.Common","link":"Cooked-Pretty-Common.html#t:DocCooked"},{"display_html":"renderString :: (a -> DocCooked) -> a -> String","name":"renderString","module":"Cooked.Pretty.Common","link":"Cooked-Pretty-Common.html#v:renderString"},{"display_html":"prettyItemize :: DocCooked -> DocCooked -> [DocCooked] -> DocCooked","name":"prettyItemize","module":"Cooked.Pretty.Common","link":"Cooked-Pretty-Common.html#v:prettyItemize"},{"display_html":"prettyItemizeNoTitle :: DocCooked -> [DocCooked] -> DocCooked","name":"prettyItemizeNoTitle","module":"Cooked.Pretty.Common","link":"Cooked-Pretty-Common.html#v:prettyItemizeNoTitle"},{"display_html":"prettyItemizeNonEmpty :: DocCooked -> DocCooked -> [DocCooked] -> Maybe DocCooked","name":"prettyItemizeNonEmpty","module":"Cooked.Pretty.Common","link":"Cooked-Pretty-Common.html#v:prettyItemizeNonEmpty"},{"display_html":"prettyEnumerate :: DocCooked -> DocCooked -> [DocCooked] -> DocCooked","name":"prettyEnumerate","module":"Cooked.Pretty.Common","link":"Cooked-Pretty-Common.html#v:prettyEnumerate"},{"display_html":"prettyHash :: Show a => Int -> a -> DocCooked","name":"prettyHash","module":"Cooked.Pretty.Common","link":"Cooked-Pretty-Common.html#v:prettyHash"},{"display_html":"data PrettyCookedOpts = PrettyCookedOpts {
}","name":"PrettyCookedOpts PrettyCookedOpts pcOptPrintTxHashes pcOptPrintTxOutRefs pcOptPrintDefaultTxOpts pcOptPrintedHashLength pcOptNumericUnderscores","module":"Cooked.Pretty.Options","link":"Cooked-Pretty-Options.html#t:PrettyCookedOpts"},{"display_html":"data PCOptTxOutRefs","name":"PCOptTxOutRefs PCOptTxOutRefsHidden PCOptTxOutRefsFull PCOptTxOutRefsPartial","module":"Cooked.Pretty.Options","link":"Cooked-Pretty-Options.html#t:PCOptTxOutRefs"},{"display_html":"unsafeTypedValidatorFromUPLC :: forall a. Program NamedDeBruijn DefaultUni DefaultFun () -> TypedValidator a","name":"unsafeTypedValidatorFromUPLC","module":"Cooked.RawUPLC","link":"Cooked-RawUPLC.html#v:unsafeTypedValidatorFromUPLC"},{"display_html":"typedValidatorFromUPLC :: Program NamedDeBruijn DefaultUni DefaultFun () -> TypedValidator Any","name":"typedValidatorFromUPLC","module":"Cooked.RawUPLC","link":"Cooked-RawUPLC.html#v:typedValidatorFromUPLC"},{"display_html":"unsafeTypedValidatorFromBS :: forall a. ByteString -> Either String (TypedValidator a)","name":"unsafeTypedValidatorFromBS","module":"Cooked.RawUPLC","link":"Cooked-RawUPLC.html#v:unsafeTypedValidatorFromBS"},{"display_html":"typedValidatorFromBS :: ByteString -> Either String (TypedValidator Any)","name":"typedValidatorFromBS","module":"Cooked.RawUPLC","link":"Cooked-RawUPLC.html#v:typedValidatorFromBS"},{"display_html":"class ShowBS a where
","name":"ShowBS showBS showBSsPrec","module":"Cooked.ShowBS","link":"Cooked-ShowBS.html#t:ShowBS"},{"display_html":"showBSs :: ShowBS a => a -> BuiltinString -> BuiltinString","name":"showBSs","module":"Cooked.ShowBS","link":"Cooked-ShowBS.html#v:showBSs"},{"display_html":"app_prec :: Integer","name":"app_prec","module":"Cooked.ShowBS","link":"Cooked-ShowBS.html#v:app_prec"},{"display_html":"flattenValueI :: Iso' Value [(AssetClass, Integer)]","name":"flattenValueI","module":"Cooked.ValueUtils","link":"Cooked-ValueUtils.html#v:flattenValueI"},{"display_html":"positivePart :: Value -> Value","name":"positivePart","module":"Cooked.ValueUtils","link":"Cooked-ValueUtils.html#v:positivePart"},{"display_html":"negativePart :: Value -> Value","name":"negativePart","module":"Cooked.ValueUtils","link":"Cooked-ValueUtils.html#v:negativePart"},{"display_html":"adaL :: Lens' Value Ada","name":"adaL","module":"Cooked.ValueUtils","link":"Cooked-ValueUtils.html#v:adaL"},{"display_html":"knownWallets :: [Wallet]","name":"knownWallets","module":"Cooked.Wallet","link":"Cooked-Wallet.html#v:knownWallets"},{"display_html":"wallet :: Int -> Wallet","name":"wallet","module":"Cooked.Wallet","link":"Cooked-Wallet.html#v:wallet"},{"display_html":"walletPKHashToId :: PubKeyHash -> Maybe Int","name":"walletPKHashToId","module":"Cooked.Wallet","link":"Cooked-Wallet.html#v:walletPKHashToId"},{"display_html":"walletPK :: Wallet -> PubKey","name":"walletPK","module":"Cooked.Wallet","link":"Cooked-Wallet.html#v:walletPK"},{"display_html":"walletStakingPK :: Wallet -> Maybe PubKey","name":"walletStakingPK","module":"Cooked.Wallet","link":"Cooked-Wallet.html#v:walletStakingPK"},{"display_html":"walletPKHash :: Wallet -> PubKeyHash","name":"walletPKHash","module":"Cooked.Wallet","link":"Cooked-Wallet.html#v:walletPKHash"},{"display_html":"walletStakingPKHash :: Wallet -> Maybe PubKeyHash","name":"walletStakingPKHash","module":"Cooked.Wallet","link":"Cooked-Wallet.html#v:walletStakingPKHash"},{"display_html":"walletAddress :: Wallet -> Address","name":"walletAddress","module":"Cooked.Wallet","link":"Cooked-Wallet.html#v:walletAddress"},{"display_html":"walletSK :: MockWallet -> PrivateKey","name":"walletSK","module":"Cooked.Wallet","link":"Cooked-Wallet.html#v:walletSK"},{"display_html":"walletStakingSK :: Wallet -> Maybe PrivateKey","name":"walletStakingSK","module":"Cooked.Wallet","link":"Cooked-Wallet.html#v:walletStakingSK"},{"display_html":"initialDistribution :: [(Wallet, [Value])] -> InitialDistribution","name":"initialDistribution","module":"Cooked.Wallet","link":"Cooked-Wallet.html#v:initialDistribution"},{"display_html":"newtype InitialDistribution = InitialDistribution {
}","name":"InitialDistribution InitialDistribution unInitialDistribution","module":"Cooked.Wallet","link":"Cooked-Wallet.html#t:InitialDistribution"},{"display_html":"type Wallet = MockWallet","name":"Wallet","module":"Cooked.Wallet","link":"Cooked-Wallet.html#t:Wallet"},{"display_html":"type PrivateKey = XPrv","name":"PrivateKey","module":"Cooked.Wallet","link":"Cooked-Wallet.html#t:PrivateKey"},{"display_html":"class PrettyCooked a where
","name":"PrettyCooked prettyCookedOpt prettyCooked","module":"Cooked.Pretty.Class","link":"Cooked-Pretty-Class.html#t:PrettyCooked"},{"display_html":"printCookedOpt :: PrettyCooked a => PrettyCookedOpts -> a -> IO ()","name":"printCookedOpt","module":"Cooked.Pretty.Class","link":"Cooked-Pretty-Class.html#v:printCookedOpt"},{"display_html":"printCooked :: PrettyCooked a => a -> IO ()","name":"printCooked","module":"Cooked.Pretty.Class","link":"Cooked-Pretty-Class.html#v:printCooked"},{"display_html":"type LabelConstrs x = (Show x, Typeable x, Eq x, Ord x)","name":"LabelConstrs","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#t:LabelConstrs"},{"display_html":"data TxLabel where
","name":"TxLabel TxLabel","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#t:TxLabel"},{"display_html":"data BalanceOutputPolicy","name":"BalanceOutputPolicy AdjustExistingOutput DontAdjustExistingOutput","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#t:BalanceOutputPolicy"},{"display_html":"data BalancingWallet","name":"BalancingWallet BalanceWithFirstSigner BalanceWith","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#t:BalancingWallet"},{"display_html":"newtype RawModTx = RawModTxAfterBalancing (Tx BabbageEra -> Tx BabbageEra)","name":"RawModTx RawModTxAfterBalancing","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#t:RawModTx"},{"display_html":"newtype EmulatorParamsModification = EmulatorParamsModification (Params -> Params)","name":"EmulatorParamsModification EmulatorParamsModification","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#t:EmulatorParamsModification"},{"display_html":"data BalancingUtxos
","name":"BalancingUtxos BalancingUtxosAll BalancingUtxosDatumless BalancingUtxosAllowlist BalancingUtxosBlocklist","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#t:BalancingUtxos"},{"display_html":"applyEmulatorParamsModification :: Maybe EmulatorParamsModification -> Params -> Params","name":"applyEmulatorParamsModification","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:applyEmulatorParamsModification"},{"display_html":"applyRawModOnBalancedTx :: [RawModTx] -> Tx BabbageEra -> Tx BabbageEra","name":"applyRawModOnBalancedTx","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:applyRawModOnBalancedTx"},{"display_html":"data TxOpts = TxOpts {
}","name":"TxOpts TxOpts txOptEmulatorParamsModification txOptEnsureMinAda txOptAwaitTxConfirmed txOptAutoSlotIncrease txOptUnsafeModTx txOptBalance txOptBalanceOutputPolicy txOptBalanceWallet txOptBalancingUtxos","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#t:TxOpts"},{"display_html":"txOptEnsureMinAdaL :: Lens' TxOpts Bool","name":"txOptEnsureMinAdaL","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:txOptEnsureMinAdaL"},{"display_html":"txOptAwaitTxConfirmedL :: Lens' TxOpts Bool","name":"txOptAwaitTxConfirmedL","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:txOptAwaitTxConfirmedL"},{"display_html":"txOptAutoSlotIncreaseL :: Lens' TxOpts Bool","name":"txOptAutoSlotIncreaseL","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:txOptAutoSlotIncreaseL"},{"display_html":"txOptUnsafeModTxL :: Lens' TxOpts [RawModTx]","name":"txOptUnsafeModTxL","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:txOptUnsafeModTxL"},{"display_html":"txOptBalanceL :: Lens' TxOpts Bool","name":"txOptBalanceL","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:txOptBalanceL"},{"display_html":"txOptBalanceOutputPolicyL :: Lens' TxOpts BalanceOutputPolicy","name":"txOptBalanceOutputPolicyL","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:txOptBalanceOutputPolicyL"},{"display_html":"txOptBalanceWalletL :: Lens' TxOpts BalancingWallet","name":"txOptBalanceWalletL","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:txOptBalanceWalletL"},{"display_html":"txOptBalancingUtxosL :: Lens' TxOpts BalancingUtxos","name":"txOptBalancingUtxosL","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:txOptBalancingUtxosL"},{"display_html":"txOptEmulatorParamsModificationL :: Lens' TxOpts (Maybe EmulatorParamsModification)","name":"txOptEmulatorParamsModificationL","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:txOptEmulatorParamsModificationL"},{"display_html":"type MintsConstrs redeemer = (ToData redeemer, Show redeemer, PrettyCooked redeemer, Typeable redeemer)","name":"MintsConstrs","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#t:MintsConstrs"},{"display_html":"data MintsRedeemer where
","name":"MintsRedeemer NoMintsRedeemer SomeMintsRedeemer","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#t:MintsRedeemer"},{"display_html":"type TxSkelMints = Map (Versioned MintingPolicy) (MintsRedeemer, NEMap TokenName (NonZero Integer))","name":"TxSkelMints","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#t:TxSkelMints"},{"display_html":"addToTxSkelMints :: (Versioned MintingPolicy, MintsRedeemer, TokenName, Integer) -> TxSkelMints -> TxSkelMints","name":"addToTxSkelMints","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:addToTxSkelMints"},{"display_html":"txSkelMintsToList :: TxSkelMints -> [(Versioned MintingPolicy, MintsRedeemer, TokenName, Integer)]","name":"txSkelMintsToList","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:txSkelMintsToList"},{"display_html":"txSkelMintsFromList :: [(Versioned MintingPolicy, MintsRedeemer, TokenName, Integer)] -> TxSkelMints","name":"txSkelMintsFromList","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:txSkelMintsFromList"},{"display_html":"txSkelMintsValue :: TxSkelMints -> Value","name":"txSkelMintsValue","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:txSkelMintsValue"},{"display_html":"txSkelOutValueL :: Lens' TxSkelOut Value","name":"txSkelOutValueL","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:txSkelOutValueL"},{"display_html":"txSkelOutDatumL :: Lens' TxSkelOut TxSkelOutDatum","name":"txSkelOutDatumL","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:txSkelOutDatumL"},{"display_html":"txSkelOutValue :: TxSkelOut -> Value","name":"txSkelOutValue","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:txSkelOutValue"},{"display_html":"txSkelOutValidator :: TxSkelOut -> Maybe (Versioned Validator)","name":"txSkelOutValidator","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:txSkelOutValidator"},{"display_html":"type TxSkelOutDatumConstrs a = (Show a, PrettyCooked a, ToData a, Eq a, Typeable a)","name":"TxSkelOutDatumConstrs","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#t:TxSkelOutDatumConstrs"},{"display_html":"data TxSkelOutDatum where
","name":"TxSkelOutDatum TxSkelOutDatum TxSkelOutNoDatum TxSkelOutDatumHash TxSkelOutInlineDatum","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#t:TxSkelOutDatum"},{"display_html":"data TxSkelOut where
","name":"TxSkelOut Pays producedOutput","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#t:TxSkelOut"},{"display_html":"txSkelOutTypedDatum :: FromData a => TxSkelOutDatum -> Maybe a","name":"txSkelOutTypedDatum","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:txSkelOutTypedDatum"},{"display_html":"txSkelOutUntypedDatum :: TxSkelOutDatum -> Maybe Datum","name":"txSkelOutUntypedDatum","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:txSkelOutUntypedDatum"},{"display_html":"paysPK :: PubKeyHash -> Value -> TxSkelOut","name":"paysPK","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:paysPK"},{"display_html":"paysScript :: (ToData (DatumType a), Show (DatumType a), Typeable (DatumType a), Eq (DatumType a), PrettyCooked (DatumType a), Typeable a) => TypedValidator a -> DatumType a -> Value -> TxSkelOut","name":"paysScript","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:paysScript"},{"display_html":"paysScriptInlineDatum :: (ToData (DatumType a), Show (DatumType a), Typeable (DatumType a), Eq (DatumType a), PrettyCooked (DatumType a), Typeable a) => TypedValidator a -> DatumType a -> Value -> TxSkelOut","name":"paysScriptInlineDatum","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:paysScriptInlineDatum"},{"display_html":"paysScriptDatumHash :: (ToData (DatumType a), Show (DatumType a), Typeable (DatumType a), Eq (DatumType a), PrettyCooked (DatumType a), Typeable a) => TypedValidator a -> DatumType a -> Value -> TxSkelOut","name":"paysScriptDatumHash","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:paysScriptDatumHash"},{"display_html":"paysScriptNoDatum :: Typeable a => TypedValidator a -> Value -> TxSkelOut","name":"paysScriptNoDatum","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:paysScriptNoDatum"},{"display_html":"withDatum :: (ToData a, Show a, Typeable a, Eq a, PrettyCooked a) => TxSkelOut -> a -> TxSkelOut","name":"withDatum","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:withDatum"},{"display_html":"withInlineDatum :: (ToData a, Show a, Typeable a, Eq a, PrettyCooked a) => TxSkelOut -> a -> TxSkelOut","name":"withInlineDatum","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:withInlineDatum"},{"display_html":"withDatumHash :: (ToData a, Show a, Typeable a, Eq a, PrettyCooked a) => TxSkelOut -> a -> TxSkelOut","name":"withDatumHash","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:withDatumHash"},{"display_html":"withReferenceScript :: (Show script, ToScript script, Typeable script, ToScriptHash script) => TxSkelOut -> script -> TxSkelOut","name":"withReferenceScript","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:withReferenceScript"},{"display_html":"withStakingCredential :: TxSkelOut -> StakingCredential -> TxSkelOut","name":"withStakingCredential","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:withStakingCredential"},{"display_html":"data TxSkelRedeemer where
","name":"TxSkelRedeemer TxSkelNoRedeemerForPK TxSkelRedeemerForScript TxSkelRedeemerForReferencedScript","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#t:TxSkelRedeemer"},{"display_html":"txSkelTypedRedeemer :: FromData (RedeemerType a) => TxSkelRedeemer -> Maybe (RedeemerType a)","name":"txSkelTypedRedeemer","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:txSkelTypedRedeemer"},{"display_html":"data TxSkel where","name":"TxSkel TxSkel txSkelLabel txSkelOpts txSkelMints txSkelSigners txSkelValidityRange txSkelIns txSkelInsReference txSkelOuts","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#t:TxSkel"},{"display_html":"txSkelLabelL :: Lens' TxSkel (Set TxLabel)","name":"txSkelLabelL","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:txSkelLabelL"},{"display_html":"txSkelOptsL :: Lens' TxSkel TxOpts","name":"txSkelOptsL","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:txSkelOptsL"},{"display_html":"txSkelMintsL :: Lens' TxSkel TxSkelMints","name":"txSkelMintsL","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:txSkelMintsL"},{"display_html":"txSkelValidityRangeL :: Lens' TxSkel SlotRange","name":"txSkelValidityRangeL","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:txSkelValidityRangeL"},{"display_html":"txSkelSignersL :: Lens' TxSkel [Wallet]","name":"txSkelSignersL","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:txSkelSignersL"},{"display_html":"txSkelInsL :: Lens' TxSkel (Map TxOutRef TxSkelRedeemer)","name":"txSkelInsL","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:txSkelInsL"},{"display_html":"txSkelInsReferenceL :: Lens' TxSkel (Set TxOutRef)","name":"txSkelInsReferenceL","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:txSkelInsReferenceL"},{"display_html":"txSkelOutsL :: Lens' TxSkel [TxSkelOut]","name":"txSkelOutsL","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:txSkelOutsL"},{"display_html":"txSkelTemplate :: TxSkel","name":"txSkelTemplate","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:txSkelTemplate"},{"display_html":"txSkelOutputData :: TxSkel -> Map DatumHash TxSkelOutDatum","name":"txSkelOutputData","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:txSkelOutputData"},{"display_html":"newtype Fee = Fee {}","name":"Fee Fee feeLovelace","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#t:Fee"},{"display_html":"txSkelOutputValue :: TxSkel -> Fee -> Value","name":"txSkelOutputValue","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:txSkelOutputValue"},{"display_html":"txSkelOutValidators :: TxSkel -> Map ValidatorHash (Versioned Validator)","name":"txSkelOutValidators","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:txSkelOutValidators"},{"display_html":"txSkelOutOwnerTypeP :: forall ownerType. (ToCredential ownerType, Show ownerType, IsTxSkelOutAllowedOwner ownerType, Typeable ownerType) => Prism' TxSkelOut (ConcreteOutput ownerType TxSkelOutDatum Value (Versioned Script))","name":"txSkelOutOwnerTypeP","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:txSkelOutOwnerTypeP"},{"display_html":"txSkelOutputDatumTypeAT :: (FromData a, Typeable a) => AffineTraversal' TxSkelOut a","name":"txSkelOutputDatumTypeAT","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:txSkelOutputDatumTypeAT"},{"display_html":"data SkelContext = SkelContext {
}","name":"SkelContext SkelContext skelContextTxOuts skelContextTxSkelOutDatums","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#t:SkelContext"},{"display_html":"txSkelOutReferenceScripts :: TxSkel -> Map ValidatorHash (Versioned Validator)","name":"txSkelOutReferenceScripts","module":"Cooked.Skeleton","link":"Cooked-Skeleton.html#v:txSkelOutReferenceScripts"},{"display_html":"newtype UtxoState = UtxoState {
}","name":"UtxoState UtxoState utxoState","module":"Cooked.MockChain.UtxoState","link":"Cooked-MockChain-UtxoState.html#t:UtxoState"},{"display_html":"newtype UtxoPayloadSet = UtxoPayloadSet {}","name":"UtxoPayloadSet UtxoPayloadSet utxoPayloadSet","module":"Cooked.MockChain.UtxoState","link":"Cooked-MockChain-UtxoState.html#t:UtxoPayloadSet"},{"display_html":"data UtxoPayload = UtxoPayload {
}","name":"UtxoPayload UtxoPayload utxoPayloadTxOutRef utxoPayloadValue utxoPayloadSkelOutDatum utxoPayloadReferenceScript","module":"Cooked.MockChain.UtxoState","link":"Cooked-MockChain-UtxoState.html#t:UtxoPayload"},{"display_html":"holdsInState :: Address -> UtxoState -> Value","name":"holdsInState","module":"Cooked.MockChain.UtxoState","link":"Cooked-MockChain-UtxoState.html#v:holdsInState"},{"display_html":"data GenerateTxError
","name":"GenerateTxError TxBodyError ToCardanoError GenerateTxErrorGeneral","module":"Cooked.MockChain.GenerateTx","link":"Cooked-MockChain-GenerateTx.html#t:GenerateTxError"},{"display_html":"data GenTxParams","name":"GenTxParams gtpCollateralIns gtpFee","module":"Cooked.MockChain.GenerateTx","link":"Cooked-MockChain-GenerateTx.html#t:GenTxParams"},{"display_html":"generateTxBodyContent :: GenTxParams -> Params -> Map DatumHash Datum -> Map TxOutRef TxOut -> Map ValidatorHash (Versioned Validator) -> TxSkel -> Either GenerateTxError (TxBodyContent BuildTx BabbageEra)","name":"generateTxBodyContent","module":"Cooked.MockChain.GenerateTx","link":"Cooked-MockChain-GenerateTx.html#v:generateTxBodyContent"},{"display_html":"txSkelOutToCardanoTxOut :: Params -> TxSkelOut -> Either GenerateTxError (TxOut CtxTx BabbageEra)","name":"txSkelOutToCardanoTxOut","module":"Cooked.MockChain.GenerateTx","link":"Cooked-MockChain-GenerateTx.html#v:txSkelOutToCardanoTxOut"},{"display_html":"generateTx :: GenTxParams -> Params -> Map DatumHash Datum -> Map TxOutRef TxOut -> Map ValidatorHash (Versioned Validator) -> TxSkel -> Either GenerateTxError (Tx BabbageEra)","name":"generateTx","module":"Cooked.MockChain.GenerateTx","link":"Cooked-MockChain-GenerateTx.html#v:generateTx"},{"display_html":"data MockChainError where
","name":"MockChainError MCEValidationError MCEUnbalanceable MCENoSuitableCollateral MCEGenerationError MCECalcFee MCEUnknownOutRefError MCEUnknownValidator MCEUnknownDatum FailWith OtherMockChainError","module":"Cooked.MockChain.BlockChain","link":"Cooked-MockChain-BlockChain.html#t:MockChainError"},{"display_html":"data MCEUnbalanceableError
","name":"MCEUnbalanceableError MCEUnbalNotEnoughFunds MCEUnbalNotEnoughReturning","module":"Cooked.MockChain.BlockChain","link":"Cooked-MockChain-BlockChain.html#t:MCEUnbalanceableError"},{"display_html":"class (MonadFail m, MonadError MockChainError m) => MonadBlockChainBalancing m where
","name":"MonadBlockChainBalancing getParams datumFromHash utxosAtLedger validatorFromHash txOutByRefLedger","module":"Cooked.MockChain.BlockChain","link":"Cooked-MockChain-BlockChain.html#t:MonadBlockChainBalancing"},{"display_html":"class MonadBlockChainBalancing m => MonadBlockChainWithoutValidation m where
","name":"MonadBlockChainWithoutValidation awaitSlot currentSlot allUtxosLedger","module":"Cooked.MockChain.BlockChain","link":"Cooked-MockChain-BlockChain.html#t:MonadBlockChainWithoutValidation"},{"display_html":"class MonadBlockChainWithoutValidation m => MonadBlockChain m where
","name":"MonadBlockChain validateTxSkel","module":"Cooked.MockChain.BlockChain","link":"Cooked-MockChain-BlockChain.html#t:MonadBlockChain"},{"display_html":"newtype AsTrans t (m :: Type -> Type) a = AsTrans {
}","name":"AsTrans AsTrans getTrans","module":"Cooked.MockChain.BlockChain","link":"Cooked-MockChain-BlockChain.html#t:AsTrans"},{"display_html":"allUtxos :: MonadBlockChainWithoutValidation m => m [(TxOutRef, TxOut)]","name":"allUtxos","module":"Cooked.MockChain.BlockChain","link":"Cooked-MockChain-BlockChain.html#v:allUtxos"},{"display_html":"currentTime :: MonadBlockChainWithoutValidation m => m (POSIXTime, POSIXTime)","name":"currentTime","module":"Cooked.MockChain.BlockChain","link":"Cooked-MockChain-BlockChain.html#v:currentTime"},{"display_html":"waitNSlots :: MonadBlockChainWithoutValidation m => Integer -> m Slot","name":"waitNSlots","module":"Cooked.MockChain.BlockChain","link":"Cooked-MockChain-BlockChain.html#v:waitNSlots"},{"display_html":"utxosAt :: MonadBlockChainBalancing m => Address -> m [(TxOutRef, TxOut)]","name":"utxosAt","module":"Cooked.MockChain.BlockChain","link":"Cooked-MockChain-BlockChain.html#v:utxosAt"},{"display_html":"txOutByRef :: MonadBlockChainBalancing m => TxOutRef -> m (Maybe TxOut)","name":"txOutByRef","module":"Cooked.MockChain.BlockChain","link":"Cooked-MockChain-BlockChain.html#v:txOutByRef"},{"display_html":"utxosFromCardanoTx :: CardanoTx -> [(TxOutRef, TxOut)]","name":"utxosFromCardanoTx","module":"Cooked.MockChain.BlockChain","link":"Cooked-MockChain-BlockChain.html#v:utxosFromCardanoTx"},{"display_html":"txOutV2FromLedger :: TxOut -> TxOut","name":"txOutV2FromLedger","module":"Cooked.MockChain.BlockChain","link":"Cooked-MockChain-BlockChain.html#v:txOutV2FromLedger"},{"display_html":"typedDatumFromTxOutRef :: (FromData a, MonadBlockChainWithoutValidation m) => TxOutRef -> m (Maybe a)","name":"typedDatumFromTxOutRef","module":"Cooked.MockChain.BlockChain","link":"Cooked-MockChain-BlockChain.html#v:typedDatumFromTxOutRef"},{"display_html":"valueFromTxOutRef :: MonadBlockChainWithoutValidation m => TxOutRef -> m (Maybe Value)","name":"valueFromTxOutRef","module":"Cooked.MockChain.BlockChain","link":"Cooked-MockChain-BlockChain.html#v:valueFromTxOutRef"},{"display_html":"outputDatumFromTxOutRef :: MonadBlockChainWithoutValidation m => TxOutRef -> m (Maybe OutputDatum)","name":"outputDatumFromTxOutRef","module":"Cooked.MockChain.BlockChain","link":"Cooked-MockChain-BlockChain.html#v:outputDatumFromTxOutRef"},{"display_html":"datumFromTxOutRef :: MonadBlockChainWithoutValidation m => TxOutRef -> m (Maybe Datum)","name":"datumFromTxOutRef","module":"Cooked.MockChain.BlockChain","link":"Cooked-MockChain-BlockChain.html#v:datumFromTxOutRef"},{"display_html":"resolveDatum :: (IsAbstractOutput out, ToOutputDatum (DatumType out), MonadBlockChainBalancing m) => out -> m (Maybe (ConcreteOutput (OwnerType out) Datum (ValueType out) (ReferenceScriptType out)))","name":"resolveDatum","module":"Cooked.MockChain.BlockChain","link":"Cooked-MockChain-BlockChain.html#v:resolveDatum"},{"display_html":"resolveTypedDatum :: (IsAbstractOutput out, ToOutputDatum (DatumType out), MonadBlockChainBalancing m, FromData a) => out -> m (Maybe (ConcreteOutput (OwnerType out) a (ValueType out) (ReferenceScriptType out)))","name":"resolveTypedDatum","module":"Cooked.MockChain.BlockChain","link":"Cooked-MockChain-BlockChain.html#v:resolveTypedDatum"},{"display_html":"resolveValidator :: (IsAbstractOutput out, ToCredential (OwnerType out), MonadBlockChainBalancing m) => out -> m (Maybe (ConcreteOutput (Versioned Validator) (DatumType out) (ValueType out) (ReferenceScriptType out)))","name":"resolveValidator","module":"Cooked.MockChain.BlockChain","link":"Cooked-MockChain-BlockChain.html#v:resolveValidator"},{"display_html":"resolveReferenceScript :: (IsAbstractOutput out, ToScriptHash (ReferenceScriptType out), MonadBlockChainBalancing m) => out -> m (Maybe (ConcreteOutput (OwnerType out) (DatumType out) (ValueType out) (Versioned Validator)))","name":"resolveReferenceScript","module":"Cooked.MockChain.BlockChain","link":"Cooked-MockChain-BlockChain.html#v:resolveReferenceScript"},{"display_html":"getEnclosingSlot :: MonadBlockChainWithoutValidation m => POSIXTime -> m Slot","name":"getEnclosingSlot","module":"Cooked.MockChain.BlockChain","link":"Cooked-MockChain-BlockChain.html#v:getEnclosingSlot"},{"display_html":"awaitEnclosingSlot :: MonadBlockChainWithoutValidation m => POSIXTime -> m Slot","name":"awaitEnclosingSlot","module":"Cooked.MockChain.BlockChain","link":"Cooked-MockChain-BlockChain.html#v:awaitEnclosingSlot"},{"display_html":"slotRangeBefore :: MonadBlockChainWithoutValidation m => POSIXTime -> m SlotRange","name":"slotRangeBefore","module":"Cooked.MockChain.BlockChain","link":"Cooked-MockChain-BlockChain.html#v:slotRangeBefore"},{"display_html":"slotRangeAfter :: MonadBlockChainWithoutValidation m => POSIXTime -> m SlotRange","name":"slotRangeAfter","module":"Cooked.MockChain.BlockChain","link":"Cooked-MockChain-BlockChain.html#v:slotRangeAfter"},{"display_html":"slotToTimeInterval :: MonadBlockChainWithoutValidation m => Slot -> m (POSIXTime, POSIXTime)","name":"slotToTimeInterval","module":"Cooked.MockChain.BlockChain","link":"Cooked-MockChain-BlockChain.html#v:slotToTimeInterval"},{"display_html":"runTweakInChain :: (MonadBlockChainWithoutValidation m, MonadPlus m) => Tweak m a -> TxSkel -> m (a, TxSkel)","name":"runTweakInChain","module":"Cooked.Tweak.Common","link":"Cooked-Tweak-Common.html#v:runTweakInChain"},{"display_html":"runTweakInChain' :: MonadBlockChainWithoutValidation m => Tweak m a -> TxSkel -> m [(a, TxSkel)]","name":"runTweakInChain'","module":"Cooked.Tweak.Common","link":"Cooked-Tweak-Common.html#v:runTweakInChain-39-"},{"display_html":"type Tweak m = StateT TxSkel (ListT m)","name":"Tweak","module":"Cooked.Tweak.Common","link":"Cooked-Tweak-Common.html#t:Tweak"},{"display_html":"data UntypedTweak m where
","name":"UntypedTweak UntypedTweak","module":"Cooked.Tweak.Common","link":"Cooked-Tweak-Common.html#t:UntypedTweak"},{"display_html":"class (MonadPlus m, MonadBlockChainWithoutValidation m) => MonadTweak m where","name":"MonadTweak getTxSkel putTxSkel","module":"Cooked.Tweak.Common","link":"Cooked-Tweak-Common.html#t:MonadTweak"},{"display_html":"failingTweak :: MonadTweak m => m a","name":"failingTweak","module":"Cooked.Tweak.Common","link":"Cooked-Tweak-Common.html#v:failingTweak"},{"display_html":"doNothingTweak :: MonadTweak m => m ()","name":"doNothingTweak","module":"Cooked.Tweak.Common","link":"Cooked-Tweak-Common.html#v:doNothingTweak"},{"display_html":"viewTweak :: (MonadTweak m, Is k A_Getter) => Optic' k is TxSkel a -> m a","name":"viewTweak","module":"Cooked.Tweak.Common","link":"Cooked-Tweak-Common.html#v:viewTweak"},{"display_html":"viewAllTweak :: (MonadTweak m, Is k A_Fold) => Optic' k is TxSkel a -> m [a]","name":"viewAllTweak","module":"Cooked.Tweak.Common","link":"Cooked-Tweak-Common.html#v:viewAllTweak"},{"display_html":"setTweak :: (MonadTweak m, Is k A_Setter) => Optic' k is TxSkel a -> a -> m ()","name":"setTweak","module":"Cooked.Tweak.Common","link":"Cooked-Tweak-Common.html#v:setTweak"},{"display_html":"overTweak :: (MonadTweak m, Is k A_Setter) => Optic' k is TxSkel a -> (a -> a) -> m ()","name":"overTweak","module":"Cooked.Tweak.Common","link":"Cooked-Tweak-Common.html#v:overTweak"},{"display_html":"overMaybeTweak :: (MonadTweak m, Is k A_Traversal) => Optic' k is TxSkel a -> (a -> Maybe a) -> m [a]","name":"overMaybeTweak","module":"Cooked.Tweak.Common","link":"Cooked-Tweak-Common.html#v:overMaybeTweak"},{"display_html":"overMaybeSelectingTweak :: forall a m k is. (MonadTweak m, Is k A_Traversal) => Optic' k is TxSkel a -> (a -> Maybe a) -> (Integer -> Bool) -> m [a]","name":"overMaybeSelectingTweak","module":"Cooked.Tweak.Common","link":"Cooked-Tweak-Common.html#v:overMaybeSelectingTweak"},{"display_html":"selectP :: (a -> Bool) -> Prism' a a","name":"selectP","module":"Cooked.Tweak.Common","link":"Cooked-Tweak-Common.html#v:selectP"},{"display_html":"combineModsTweak :: (Eq is, Is k A_Traversal, MonadTweak m) => ([is] -> [[is]]) -> Optic' k (WithIx is) TxSkel x -> (is -> x -> m [(x, l)]) -> m [l]","name":"combineModsTweak","module":"Cooked.Tweak.Common","link":"Cooked-Tweak-Common.html#v:combineModsTweak"},{"display_html":"iviewTweak :: (MonadTweak m, Is k A_Getter) => Optic' k (WithIx is) TxSkel a -> m (is, a)","name":"iviewTweak","module":"Cooked.Tweak.Common","link":"Cooked-Tweak-Common.html#v:iviewTweak"},{"display_html":"getSignersTweak :: MonadTweak m => m [Wallet]","name":"getSignersTweak","module":"Cooked.Tweak.Signers","link":"Cooked-Tweak-Signers.html#v:getSignersTweak"},{"display_html":"modifySignersTweak :: MonadTweak m => ([Wallet] -> [Wallet]) -> m [Wallet]","name":"modifySignersTweak","module":"Cooked.Tweak.Signers","link":"Cooked-Tweak-Signers.html#v:modifySignersTweak"},{"display_html":"setSignersTweak :: MonadTweak m => [Wallet] -> m [Wallet]","name":"setSignersTweak","module":"Cooked.Tweak.Signers","link":"Cooked-Tweak-Signers.html#v:setSignersTweak"},{"display_html":"signersSatisfyTweak :: MonadTweak m => ([Wallet] -> Bool) -> m Bool","name":"signersSatisfyTweak","module":"Cooked.Tweak.Signers","link":"Cooked-Tweak-Signers.html#v:signersSatisfyTweak"},{"display_html":"isSignerTweak :: MonadTweak m => Wallet -> m Bool","name":"isSignerTweak","module":"Cooked.Tweak.Signers","link":"Cooked-Tweak-Signers.html#v:isSignerTweak"},{"display_html":"hasSignersTweak :: MonadTweak m => m Bool","name":"hasSignersTweak","module":"Cooked.Tweak.Signers","link":"Cooked-Tweak-Signers.html#v:hasSignersTweak"},{"display_html":"addFirstSignerTweak :: MonadTweak m => Wallet -> m [Wallet]","name":"addFirstSignerTweak","module":"Cooked.Tweak.Signers","link":"Cooked-Tweak-Signers.html#v:addFirstSignerTweak"},{"display_html":"addSignersTweak :: MonadTweak m => [Wallet] -> m [Wallet]","name":"addSignersTweak","module":"Cooked.Tweak.Signers","link":"Cooked-Tweak-Signers.html#v:addSignersTweak"},{"display_html":"addLastSignerTweak :: MonadTweak m => Wallet -> m [Wallet]","name":"addLastSignerTweak","module":"Cooked.Tweak.Signers","link":"Cooked-Tweak-Signers.html#v:addLastSignerTweak"},{"display_html":"removeSignersTweak :: MonadTweak m => [Wallet] -> m [Wallet]","name":"removeSignersTweak","module":"Cooked.Tweak.Signers","link":"Cooked-Tweak-Signers.html#v:removeSignersTweak"},{"display_html":"removeSignerTweak :: MonadTweak m => Wallet -> m [Wallet]","name":"removeSignerTweak","module":"Cooked.Tweak.Signers","link":"Cooked-Tweak-Signers.html#v:removeSignerTweak"},{"display_html":"replaceFirstSignerTweak :: MonadTweak m => Wallet -> m [Wallet]","name":"replaceFirstSignerTweak","module":"Cooked.Tweak.Signers","link":"Cooked-Tweak-Signers.html#v:replaceFirstSignerTweak"},{"display_html":"data PermutOutTweakMode
","name":"PermutOutTweakMode KeepIdentity OmitIdentity","module":"Cooked.Tweak.OutPermutations","link":"Cooked-Tweak-OutPermutations.html#t:PermutOutTweakMode"},{"display_html":"allOutPermutsTweak :: MonadTweak m => PermutOutTweakMode -> m ()","name":"allOutPermutsTweak","module":"Cooked.Tweak.OutPermutations","link":"Cooked-Tweak-OutPermutations.html#v:allOutPermutsTweak"},{"display_html":"singleOutPermutTweak :: MonadTweak m => Int -> m ()","name":"singleOutPermutTweak","module":"Cooked.Tweak.OutPermutations","link":"Cooked-Tweak-OutPermutations.html#v:singleOutPermutTweak"},{"display_html":"distinctPermutations :: Eq a => [a] -> [[a]]","name":"distinctPermutations","module":"Cooked.Tweak.OutPermutations","link":"Cooked-Tweak-OutPermutations.html#v:distinctPermutations"},{"display_html":"addLabelTweak :: (MonadTweak m, LabelConstrs x) => x -> m ()","name":"addLabelTweak","module":"Cooked.Tweak.Labels","link":"Cooked-Tweak-Labels.html#v:addLabelTweak"},{"display_html":"removeLabelTweak :: (MonadTweak m, LabelConstrs x) => x -> m ()","name":"removeLabelTweak","module":"Cooked.Tweak.Labels","link":"Cooked-Tweak-Labels.html#v:removeLabelTweak"},{"display_html":"hasLabelTweak :: (MonadTweak m, LabelConstrs x) => x -> m Bool","name":"hasLabelTweak","module":"Cooked.Tweak.Labels","link":"Cooked-Tweak-Labels.html#v:hasLabelTweak"},{"display_html":"tamperDatumTweak :: forall a m. (MonadTweak m, Show a, PrettyCooked a, ToData a, FromData a, Typeable a) => (a -> Maybe a) -> m [a]","name":"tamperDatumTweak","module":"Cooked.Tweak.TamperDatum","link":"Cooked-Tweak-TamperDatum.html#v:tamperDatumTweak"},{"display_html":"data TamperDatumLbl = TamperDatumLbl","name":"TamperDatumLbl TamperDatumLbl","module":"Cooked.Tweak.TamperDatum","link":"Cooked-Tweak-TamperDatum.html#t:TamperDatumLbl"},{"display_html":"malformDatumTweak :: forall a m. (MonadTweak m, ToData a, FromData a, Typeable a) => (a -> [BuiltinData]) -> m ()","name":"malformDatumTweak","module":"Cooked.Tweak.TamperDatum","link":"Cooked-Tweak-TamperDatum.html#v:malformDatumTweak"},{"display_html":"data MalformDatumLbl = MalformDatumLbl","name":"MalformDatumLbl MalformDatumLbl","module":"Cooked.Tweak.TamperDatum","link":"Cooked-Tweak-TamperDatum.html#t:MalformDatumLbl"},{"display_html":"ensureInputTweak :: MonadTweak m => TxOutRef -> TxSkelRedeemer -> m (Maybe (TxOutRef, TxSkelRedeemer))","name":"ensureInputTweak","module":"Cooked.Tweak.AddInputsAndOutputs","link":"Cooked-Tweak-AddInputsAndOutputs.html#v:ensureInputTweak"},{"display_html":"addInputTweak :: MonadTweak m => TxOutRef -> TxSkelRedeemer -> m ()","name":"addInputTweak","module":"Cooked.Tweak.AddInputsAndOutputs","link":"Cooked-Tweak-AddInputsAndOutputs.html#v:addInputTweak"},{"display_html":"removeInputTweak :: MonadTweak m => (TxOutRef -> TxSkelRedeemer -> Bool) -> m [(TxOutRef, TxSkelRedeemer)]","name":"removeInputTweak","module":"Cooked.Tweak.AddInputsAndOutputs","link":"Cooked-Tweak-AddInputsAndOutputs.html#v:removeInputTweak"},{"display_html":"ensureOutputTweak :: MonadTweak m => TxSkelOut -> m (Maybe TxSkelOut)","name":"ensureOutputTweak","module":"Cooked.Tweak.AddInputsAndOutputs","link":"Cooked-Tweak-AddInputsAndOutputs.html#v:ensureOutputTweak"},{"display_html":"addOutputTweak :: MonadTweak m => TxSkelOut -> m ()","name":"addOutputTweak","module":"Cooked.Tweak.AddInputsAndOutputs","link":"Cooked-Tweak-AddInputsAndOutputs.html#v:addOutputTweak"},{"display_html":"removeOutputTweak :: MonadTweak m => (TxSkelOut -> Bool) -> m [TxSkelOut]","name":"removeOutputTweak","module":"Cooked.Tweak.AddInputsAndOutputs","link":"Cooked-Tweak-AddInputsAndOutputs.html#v:removeOutputTweak"},{"display_html":"addMintTweak :: MonadTweak m => (Versioned MintingPolicy, MintsRedeemer, TokenName, Integer) -> m ()","name":"addMintTweak","module":"Cooked.Tweak.AddInputsAndOutputs","link":"Cooked-Tweak-AddInputsAndOutputs.html#v:addMintTweak"},{"display_html":"removeMintTweak :: MonadTweak m => ((Versioned MintingPolicy, MintsRedeemer, TokenName, Integer) -> Bool) -> m [(Versioned MintingPolicy, MintsRedeemer, TokenName, Integer)]","name":"removeMintTweak","module":"Cooked.Tweak.AddInputsAndOutputs","link":"Cooked-Tweak-AddInputsAndOutputs.html#v:removeMintTweak"},{"display_html":"runUtxoSearch :: Monad m => UtxoSearch m a -> m [(TxOutRef, a)]","name":"runUtxoSearch","module":"Cooked.MockChain.UtxoSearch","link":"Cooked-MockChain-UtxoSearch.html#v:runUtxoSearch"},{"display_html":"allUtxosSearch :: MonadBlockChain m => UtxoSearch m TxOut","name":"allUtxosSearch","module":"Cooked.MockChain.UtxoSearch","link":"Cooked-MockChain-UtxoSearch.html#v:allUtxosSearch"},{"display_html":"allUtxosLedgerSearch :: MonadBlockChain m => UtxoSearch m TxOut","name":"allUtxosLedgerSearch","module":"Cooked.MockChain.UtxoSearch","link":"Cooked-MockChain-UtxoSearch.html#v:allUtxosLedgerSearch"},{"display_html":"utxosAtSearch :: MonadBlockChainBalancing m => Address -> UtxoSearch m TxOut","name":"utxosAtSearch","module":"Cooked.MockChain.UtxoSearch","link":"Cooked-MockChain-UtxoSearch.html#v:utxosAtSearch"},{"display_html":"utxosAtLedgerSearch :: MonadBlockChainBalancing m => Address -> UtxoSearch m TxOut","name":"utxosAtLedgerSearch","module":"Cooked.MockChain.UtxoSearch","link":"Cooked-MockChain-UtxoSearch.html#v:utxosAtLedgerSearch"},{"display_html":"utxosFromCardanoTxSearch :: Monad m => CardanoTx -> UtxoSearch m TxOut","name":"utxosFromCardanoTxSearch","module":"Cooked.MockChain.UtxoSearch","link":"Cooked-MockChain-UtxoSearch.html#v:utxosFromCardanoTxSearch"},{"display_html":"txOutByRefSearch :: MonadBlockChainBalancing m => [TxOutRef] -> UtxoSearch m TxOut","name":"txOutByRefSearch","module":"Cooked.MockChain.UtxoSearch","link":"Cooked-MockChain-UtxoSearch.html#v:txOutByRefSearch"},{"display_html":"filterWith :: Monad m => UtxoSearch m a -> (a -> m (Maybe b)) -> UtxoSearch m b","name":"filterWith","module":"Cooked.MockChain.UtxoSearch","link":"Cooked-MockChain-UtxoSearch.html#v:filterWith"},{"display_html":"filterWithPure :: Monad m => UtxoSearch m a -> (a -> Maybe b) -> UtxoSearch m b","name":"filterWithPure","module":"Cooked.MockChain.UtxoSearch","link":"Cooked-MockChain-UtxoSearch.html#v:filterWithPure"},{"display_html":"filterWithOptic :: (Is k An_AffineFold, Monad m) => UtxoSearch m a -> Optic' k is a b -> UtxoSearch m b","name":"filterWithOptic","module":"Cooked.MockChain.UtxoSearch","link":"Cooked-MockChain-UtxoSearch.html#v:filterWithOptic"},{"display_html":"filterWithPred :: Monad m => UtxoSearch m a -> (a -> Bool) -> UtxoSearch m a","name":"filterWithPred","module":"Cooked.MockChain.UtxoSearch","link":"Cooked-MockChain-UtxoSearch.html#v:filterWithPred"},{"display_html":"balancedTxSkel :: MonadBlockChainBalancing m => TxSkel -> m (TxSkel, Fee, Set TxOutRef)","name":"balancedTxSkel","module":"Cooked.MockChain.Balancing","link":"Cooked-MockChain-Balancing.html#v:balancedTxSkel"},{"display_html":"balancedTx :: MonadBlockChainBalancing m => (TxSkel, Fee, Set TxOutRef) -> m (Tx BabbageEra)","name":"balancedTx","module":"Cooked.MockChain.Balancing","link":"Cooked-MockChain-Balancing.html#v:balancedTx"},{"display_html":"txSkelInputData :: MonadBlockChainBalancing m => TxSkel -> m (Map DatumHash Datum)","name":"txSkelInputData","module":"Cooked.MockChain.Balancing","link":"Cooked-MockChain-Balancing.html#v:txSkelInputData"},{"display_html":"mcstToUtxoState :: MockChainSt -> UtxoState","name":"mcstToUtxoState","module":"Cooked.MockChain.Direct","link":"Cooked-MockChain-Direct.html#v:mcstToUtxoState"},{"display_html":"data MockChainSt = MockChainSt {
}","name":"MockChainSt MockChainSt mcstCurrentSlot mcstValidators mcstDatums mcstIndex","module":"Cooked.MockChain.Direct","link":"Cooked-MockChain-Direct.html#t:MockChainSt"},{"display_html":"newtype MockChainEnv = MockChainEnv {
}","name":"MockChainEnv MockChainEnv mceParams","module":"Cooked.MockChain.Direct","link":"Cooked-MockChain-Direct.html#t:MockChainEnv"},{"display_html":"newtype MockChainT m a = MockChainT {
}","name":"MockChainT MockChainT unMockChain","module":"Cooked.MockChain.Direct","link":"Cooked-MockChain-Direct.html#t:MockChainT"},{"display_html":"type MockChain = MockChainT Identity","name":"MockChain","module":"Cooked.MockChain.Direct","link":"Cooked-MockChain-Direct.html#t:MockChain"},{"display_html":"combineMockChainT :: Monad m => (forall a. m a -> m a -> m a) -> MockChainT m x -> MockChainT m x -> MockChainT m x","name":"combineMockChainT","module":"Cooked.MockChain.Direct","link":"Cooked-MockChain-Direct.html#v:combineMockChainT"},{"display_html":"mapMockChainT :: (m (Either MockChainError (a, MockChainSt)) -> n (Either MockChainError (b, MockChainSt))) -> MockChainT m a -> MockChainT n b","name":"mapMockChainT","module":"Cooked.MockChain.Direct","link":"Cooked-MockChain-Direct.html#v:mapMockChainT"},{"display_html":"runMockChainTRaw :: Monad m => MockChainEnv -> MockChainSt -> MockChainT m a -> m (Either MockChainError (a, MockChainSt))","name":"runMockChainTRaw","module":"Cooked.MockChain.Direct","link":"Cooked-MockChain-Direct.html#v:runMockChainTRaw"},{"display_html":"runMockChainTFrom :: Monad m => InitialDistribution -> MockChainT m a -> m (Either MockChainError (a, UtxoState))","name":"runMockChainTFrom","module":"Cooked.MockChain.Direct","link":"Cooked-MockChain-Direct.html#v:runMockChainTFrom"},{"display_html":"runMockChainT :: Monad m => MockChainT m a -> m (Either MockChainError (a, UtxoState))","name":"runMockChainT","module":"Cooked.MockChain.Direct","link":"Cooked-MockChain-Direct.html#v:runMockChainT"},{"display_html":"runMockChainRaw :: MockChainEnv -> MockChainSt -> MockChain a -> Either MockChainError (a, MockChainSt)","name":"runMockChainRaw","module":"Cooked.MockChain.Direct","link":"Cooked-MockChain-Direct.html#v:runMockChainRaw"},{"display_html":"runMockChainFrom :: InitialDistribution -> MockChain a -> Either MockChainError (a, UtxoState)","name":"runMockChainFrom","module":"Cooked.MockChain.Direct","link":"Cooked-MockChain-Direct.html#v:runMockChainFrom"},{"display_html":"runMockChain :: MockChain a -> Either MockChainError (a, UtxoState)","name":"runMockChain","module":"Cooked.MockChain.Direct","link":"Cooked-MockChain-Direct.html#v:runMockChain"},{"display_html":"utxoState0 :: UtxoState","name":"utxoState0","module":"Cooked.MockChain.Direct","link":"Cooked-MockChain-Direct.html#v:utxoState0"},{"display_html":"mockChainSt0 :: MockChainSt","name":"mockChainSt0","module":"Cooked.MockChain.Direct","link":"Cooked-MockChain-Direct.html#v:mockChainSt0"},{"display_html":"mockChainSt0From :: InitialDistribution -> MockChainSt","name":"mockChainSt0From","module":"Cooked.MockChain.Direct","link":"Cooked-MockChain-Direct.html#v:mockChainSt0From"},{"display_html":"utxoIndex0From :: InitialDistribution -> UtxoIndex","name":"utxoIndex0From","module":"Cooked.MockChain.Direct","link":"Cooked-MockChain-Direct.html#v:utxoIndex0From"},{"display_html":"utxoIndex0 :: UtxoIndex","name":"utxoIndex0","module":"Cooked.MockChain.Direct","link":"Cooked-MockChain-Direct.html#v:utxoIndex0"},{"display_html":"getIndex :: UtxoIndex -> Map TxOutRef TxOut","name":"getIndex","module":"Cooked.MockChain.Direct","link":"Cooked-MockChain-Direct.html#v:getIndex"},{"display_html":"runTransactionValidation :: Monad m => Params -> Tx BabbageEra -> [RawModTx] -> Map DatumHash Datum -> Map DatumHash TxSkelOutDatum -> Map ValidatorHash (Versioned Validator) -> MockChainT m CardanoTx","name":"runTransactionValidation","module":"Cooked.MockChain.Direct","link":"Cooked-MockChain-Direct.html#v:runTransactionValidation"},{"display_html":"interpretAndRunWith :: (forall m. Monad m => MockChainT m a -> m res) -> StagedMockChain a -> [(res, MockChainLog)]","name":"interpretAndRunWith","module":"Cooked.MockChain.Staged","link":"Cooked-MockChain-Staged.html#v:interpretAndRunWith"},{"display_html":"interpretAndRun :: StagedMockChain a -> [(Either MockChainError (a, UtxoState), MockChainLog)]","name":"interpretAndRun","module":"Cooked.MockChain.Staged","link":"Cooked-MockChain-Staged.html#v:interpretAndRun"},{"display_html":"data MockChainLogEntry","name":"MockChainLogEntry MCLogSubmittedTxSkel MCLogNewTx MCLogFail","module":"Cooked.MockChain.Staged","link":"Cooked-MockChain-Staged.html#t:MockChainLogEntry"},{"display_html":"newtype MockChainLog = MockChainLog {}","name":"MockChainLog MockChainLog unMockChainLog","module":"Cooked.MockChain.Staged","link":"Cooked-MockChain-Staged.html#t:MockChainLog"},{"display_html":"type StagedMockChain = Staged MockChainOp","name":"StagedMockChain","module":"Cooked.MockChain.Staged","link":"Cooked-MockChain-Staged.html#t:StagedMockChain"},{"display_html":"runTweakFrom :: MockChainEnv -> MockChainSt -> Tweak InterpMockChain a -> TxSkel -> [Either MockChainError (a, TxSkel)]","name":"runTweakFrom","module":"Cooked.MockChain.Staged","link":"Cooked-MockChain-Staged.html#v:runTweakFrom"},{"display_html":"type MonadModalBlockChain m = (MonadBlockChain m, MonadModal m, Modification m ~ UntypedTweak InterpMockChain)","name":"MonadModalBlockChain","module":"Cooked.MockChain.Staged","link":"Cooked-MockChain-Staged.html#t:MonadModalBlockChain"},{"display_html":"somewhere :: MonadModalBlockChain m => Tweak InterpMockChain b -> m a -> m a","name":"somewhere","module":"Cooked.MockChain.Staged","link":"Cooked-MockChain-Staged.html#v:somewhere"},{"display_html":"runTweak :: Tweak InterpMockChain a -> TxSkel -> [Either MockChainError (a, TxSkel)]","name":"runTweak","module":"Cooked.MockChain.Staged","link":"Cooked-MockChain-Staged.html#v:runTweak"},{"display_html":"everywhere :: MonadModalBlockChain m => Tweak InterpMockChain b -> m a -> m a","name":"everywhere","module":"Cooked.MockChain.Staged","link":"Cooked-MockChain-Staged.html#v:everywhere"},{"display_html":"withTweak :: MonadModalBlockChain m => m x -> Tweak InterpMockChain a -> m x","name":"withTweak","module":"Cooked.MockChain.Staged","link":"Cooked-MockChain-Staged.html#v:withTweak"},{"display_html":"there :: MonadModalBlockChain m => Integer -> Tweak InterpMockChain b -> m a -> m a","name":"there","module":"Cooked.MockChain.Staged","link":"Cooked-MockChain-Staged.html#v:there"},{"display_html":"prettyTxSkel :: PrettyCookedOpts -> SkelContext -> TxSkel -> DocCooked","name":"prettyTxSkel","module":"Cooked.Pretty.Cooked","link":"Cooked-Pretty-Cooked.html#v:prettyTxSkel"},{"display_html":"prettyBalancingWallet :: PrettyCookedOpts -> Wallet -> DocCooked","name":"prettyBalancingWallet","module":"Cooked.Pretty.Cooked","link":"Cooked-Pretty-Cooked.html#v:prettyBalancingWallet"},{"display_html":"prettySigners :: PrettyCookedOpts -> TxOpts -> [Wallet] -> [DocCooked]","name":"prettySigners","module":"Cooked.Pretty.Cooked","link":"Cooked-Pretty-Cooked.html#v:prettySigners"},{"display_html":"prettyMints :: PrettyCookedOpts -> (Versioned MintingPolicy, MintsRedeemer, TokenName, Integer) -> DocCooked","name":"prettyMints","module":"Cooked.Pretty.Cooked","link":"Cooked-Pretty-Cooked.html#v:prettyMints"},{"display_html":"mPrettyTxOpts :: PrettyCookedOpts -> TxOpts -> Maybe DocCooked","name":"mPrettyTxOpts","module":"Cooked.Pretty.Cooked","link":"Cooked-Pretty-Cooked.html#v:mPrettyTxOpts"},{"display_html":"prettyTxSkelOut :: PrettyCookedOpts -> TxSkelOut -> DocCooked","name":"prettyTxSkelOut","module":"Cooked.Pretty.Cooked","link":"Cooked-Pretty-Cooked.html#v:prettyTxSkelOut"},{"display_html":"prettyTxSkelOutDatumMaybe :: PrettyCookedOpts -> TxSkelOutDatum -> Maybe DocCooked","name":"prettyTxSkelOutDatumMaybe","module":"Cooked.Pretty.Cooked","link":"Cooked-Pretty-Cooked.html#v:prettyTxSkelOutDatumMaybe"},{"display_html":"prettyTxSkelIn :: PrettyCookedOpts -> SkelContext -> (TxOutRef, TxSkelRedeemer) -> DocCooked","name":"prettyTxSkelIn","module":"Cooked.Pretty.Cooked","link":"Cooked-Pretty-Cooked.html#v:prettyTxSkelIn"},{"display_html":"prettyTxSkelInReference :: PrettyCookedOpts -> SkelContext -> TxOutRef -> Maybe DocCooked","name":"prettyTxSkelInReference","module":"Cooked.Pretty.Cooked","link":"Cooked-Pretty-Cooked.html#v:prettyTxSkelInReference"},{"display_html":"prettyAddressState :: PrettyCookedOpts -> Address -> UtxoPayloadSet -> DocCooked","name":"prettyAddressState","module":"Cooked.Pretty.Cooked","link":"Cooked-Pretty-Cooked.html#v:prettyAddressState"},{"display_html":"prettyPayloadGrouped :: PrettyCookedOpts -> [UtxoPayload] -> Maybe DocCooked","name":"prettyPayloadGrouped","module":"Cooked.Pretty.Cooked","link":"Cooked-Pretty-Cooked.html#v:prettyPayloadGrouped"},{"display_html":"prettyPayload :: PrettyCookedOpts -> Bool -> UtxoPayload -> Maybe DocCooked","name":"prettyPayload","module":"Cooked.Pretty.Cooked","link":"Cooked-Pretty-Cooked.html#v:prettyPayload"},{"display_html":"prettyReferenceScriptHash :: PrettyCookedOpts -> ScriptHash -> DocCooked","name":"prettyReferenceScriptHash","module":"Cooked.Pretty.Cooked","link":"Cooked-Pretty-Cooked.html#v:prettyReferenceScriptHash"},{"display_html":"module Cooked.Pretty.Options","name":"","module":"Cooked.Pretty","link":""},{"display_html":"module Cooked.Pretty.Cooked","name":"","module":"Cooked.Pretty","link":""},{"display_html":"module Cooked.Pretty.Common","name":"","module":"Cooked.Pretty","link":""},{"display_html":"module Cooked.Pretty.Class","name":"","module":"Cooked.Pretty","link":""},{"display_html":"class IsProp prop where
","name":"IsProp testFailureMsg testSuccess testFailure testDisjoin testConjoin testCounterexample","module":"Cooked.MockChain.Testing","link":"Cooked-MockChain-Testing.html#t:IsProp"},{"display_html":"testBool :: IsProp prop => Bool -> prop","name":"testBool","module":"Cooked.MockChain.Testing","link":"Cooked-MockChain-Testing.html#v:testBool"},{"display_html":"testAll :: IsProp prop => (a -> prop) -> [a] -> prop","name":"testAll","module":"Cooked.MockChain.Testing","link":"Cooked-MockChain-Testing.html#v:testAll"},{"display_html":"(.==.) :: (IsProp prop, Eq a) => a -> a -> prop","name":".==.","module":"Cooked.MockChain.Testing","link":"Cooked-MockChain-Testing.html#v:.-61--61-."},{"display_html":"(.&&.) :: IsProp prop => prop -> prop -> prop","name":".&&.","module":"Cooked.MockChain.Testing","link":"Cooked-MockChain-Testing.html#v:.-38--38-."},{"display_html":"(.||.) :: IsProp prop => prop -> prop -> prop","name":".||.","module":"Cooked.MockChain.Testing","link":"Cooked-MockChain-Testing.html#v:.-124--124-."},{"display_html":"testSucceeds :: IsProp prop => PrettyCookedOpts -> StagedMockChain a -> prop","name":"testSucceeds","module":"Cooked.MockChain.Testing","link":"Cooked-MockChain-Testing.html#v:testSucceeds"},{"display_html":"testFails :: (IsProp prop, Show a) => PrettyCookedOpts -> (MockChainError -> prop) -> StagedMockChain a -> prop","name":"testFails","module":"Cooked.MockChain.Testing","link":"Cooked-MockChain-Testing.html#v:testFails"},{"display_html":"testSucceedsFrom :: IsProp prop => PrettyCookedOpts -> InitialDistribution -> StagedMockChain a -> prop","name":"testSucceedsFrom","module":"Cooked.MockChain.Testing","link":"Cooked-MockChain-Testing.html#v:testSucceedsFrom"},{"display_html":"testSucceedsFrom' :: IsProp prop => PrettyCookedOpts -> (a -> UtxoState -> prop) -> InitialDistribution -> StagedMockChain a -> prop","name":"testSucceedsFrom'","module":"Cooked.MockChain.Testing","link":"Cooked-MockChain-Testing.html#v:testSucceedsFrom-39-"},{"display_html":"testFailsFrom :: (IsProp prop, Show a) => PrettyCookedOpts -> (MockChainError -> prop) -> InitialDistribution -> StagedMockChain a -> prop","name":"testFailsFrom","module":"Cooked.MockChain.Testing","link":"Cooked-MockChain-Testing.html#v:testFailsFrom"},{"display_html":"isCekEvaluationFailure :: IsProp prop => PrettyCookedOpts -> MockChainError -> prop","name":"isCekEvaluationFailure","module":"Cooked.MockChain.Testing","link":"Cooked-MockChain-Testing.html#v:isCekEvaluationFailure"},{"display_html":"isCekEvaluationFailureWithMsg :: IsProp prop => PrettyCookedOpts -> (String -> Bool) -> MockChainError -> prop","name":"isCekEvaluationFailureWithMsg","module":"Cooked.MockChain.Testing","link":"Cooked-MockChain-Testing.html#v:isCekEvaluationFailureWithMsg"},{"display_html":"testAllSatisfiesFrom :: forall prop a. IsProp prop => PrettyCookedOpts -> (Either MockChainError (a, UtxoState) -> prop) -> InitialDistribution -> StagedMockChain a -> prop","name":"testAllSatisfiesFrom","module":"Cooked.MockChain.Testing","link":"Cooked-MockChain-Testing.html#v:testAllSatisfiesFrom"},{"display_html":"testBinaryRelatedBy :: IsProp prop => PrettyCookedOpts -> (UtxoState -> UtxoState -> prop) -> InitialDistribution -> StagedMockChain a -> prop","name":"testBinaryRelatedBy","module":"Cooked.MockChain.Testing","link":"Cooked-MockChain-Testing.html#v:testBinaryRelatedBy"},{"display_html":"testOneEquivClass :: IsProp prop => PrettyCookedOpts -> (UtxoState -> UtxoState -> prop) -> InitialDistribution -> StagedMockChain a -> prop","name":"testOneEquivClass","module":"Cooked.MockChain.Testing","link":"Cooked-MockChain-Testing.html#v:testOneEquivClass"},{"display_html":"testSatisfiesFrom' :: ([(Either MockChainError (a, UtxoState), MockChainLog)] -> prop) -> InitialDistribution -> StagedMockChain a -> prop","name":"testSatisfiesFrom'","module":"Cooked.MockChain.Testing","link":"Cooked-MockChain-Testing.html#v:testSatisfiesFrom-39-"},{"display_html":"assertionToMaybe :: Assertion -> IO (Maybe HUnitFailure)","name":"assertionToMaybe","module":"Cooked.MockChain.Testing","link":"Cooked-MockChain-Testing.html#v:assertionToMaybe"},{"display_html":"forAll :: Show a => Gen a -> (a -> Property) -> Property","name":"forAll","module":"Cooked.MockChain.Testing","link":"Cooked-MockChain-Testing.html#v:forAll"},{"display_html":"utxoPayloadReferenceScript :: UtxoPayload -> Maybe ScriptHash","name":"utxoPayloadReferenceScript","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:utxoPayloadReferenceScript"},{"display_html":"utxoPayloadSkelOutDatum :: UtxoPayload -> TxSkelOutDatum","name":"utxoPayloadSkelOutDatum","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:utxoPayloadSkelOutDatum"},{"display_html":"utxoPayloadTxOutRef :: UtxoPayload -> TxOutRef","name":"utxoPayloadTxOutRef","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:utxoPayloadTxOutRef"},{"display_html":"utxoPayloadValue :: UtxoPayload -> Value","name":"utxoPayloadValue","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:utxoPayloadValue"},{"display_html":"utxoPayloadSet :: UtxoPayloadSet -> [UtxoPayload]","name":"utxoPayloadSet","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:utxoPayloadSet"},{"display_html":"data UtxoState","name":"UtxoState","module":"Cooked.MockChain","link":"Cooked-MockChain.html#t:UtxoState"},{"display_html":"holdsInState :: Address -> UtxoState -> Value","name":"holdsInState","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:holdsInState"},{"display_html":"newtype AsTrans t (m :: Type -> Type) a = AsTrans {
}","name":"AsTrans AsTrans getTrans","module":"Cooked.MockChain","link":"Cooked-MockChain.html#t:AsTrans"},{"display_html":"class MonadBlockChainWithoutValidation m => MonadBlockChain m where
","name":"MonadBlockChain validateTxSkel","module":"Cooked.MockChain","link":"Cooked-MockChain.html#t:MonadBlockChain"},{"display_html":"class MonadBlockChainBalancing m => MonadBlockChainWithoutValidation m where
","name":"MonadBlockChainWithoutValidation allUtxosLedger awaitSlot currentSlot","module":"Cooked.MockChain","link":"Cooked-MockChain.html#t:MonadBlockChainWithoutValidation"},{"display_html":"class (MonadFail m, MonadError MockChainError m) => MonadBlockChainBalancing m where
","name":"MonadBlockChainBalancing txOutByRefLedger validatorFromHash utxosAtLedger getParams datumFromHash","module":"Cooked.MockChain","link":"Cooked-MockChain.html#t:MonadBlockChainBalancing"},{"display_html":"data MCEUnbalanceableError
","name":"MCEUnbalanceableError MCEUnbalNotEnoughFunds MCEUnbalNotEnoughReturning","module":"Cooked.MockChain","link":"Cooked-MockChain.html#t:MCEUnbalanceableError"},{"display_html":"data MockChainError where
","name":"MockChainError OtherMockChainError FailWith MCEUnknownDatum MCEUnknownValidator MCEUnknownOutRefError MCECalcFee MCEGenerationError MCENoSuitableCollateral MCEValidationError MCEUnbalanceable","module":"Cooked.MockChain","link":"Cooked-MockChain.html#t:MockChainError"},{"display_html":"allUtxos :: MonadBlockChainWithoutValidation m => m [(TxOutRef, TxOut)]","name":"allUtxos","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:allUtxos"},{"display_html":"utxosAt :: MonadBlockChainBalancing m => Address -> m [(TxOutRef, TxOut)]","name":"utxosAt","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:utxosAt"},{"display_html":"txOutByRef :: MonadBlockChainBalancing m => TxOutRef -> m (Maybe TxOut)","name":"txOutByRef","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:txOutByRef"},{"display_html":"utxosFromCardanoTx :: CardanoTx -> [(TxOutRef, TxOut)]","name":"utxosFromCardanoTx","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:utxosFromCardanoTx"},{"display_html":"txOutV2FromLedger :: TxOut -> TxOut","name":"txOutV2FromLedger","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:txOutV2FromLedger"},{"display_html":"resolveDatum :: (IsAbstractOutput out, ToOutputDatum (DatumType out), MonadBlockChainBalancing m) => out -> m (Maybe (ConcreteOutput (OwnerType out) Datum (ValueType out) (ReferenceScriptType out)))","name":"resolveDatum","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:resolveDatum"},{"display_html":"resolveTypedDatum :: (IsAbstractOutput out, ToOutputDatum (DatumType out), MonadBlockChainBalancing m, FromData a) => out -> m (Maybe (ConcreteOutput (OwnerType out) a (ValueType out) (ReferenceScriptType out)))","name":"resolveTypedDatum","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:resolveTypedDatum"},{"display_html":"resolveValidator :: (IsAbstractOutput out, ToCredential (OwnerType out), MonadBlockChainBalancing m) => out -> m (Maybe (ConcreteOutput (Versioned Validator) (DatumType out) (ValueType out) (ReferenceScriptType out)))","name":"resolveValidator","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:resolveValidator"},{"display_html":"resolveReferenceScript :: (IsAbstractOutput out, ToScriptHash (ReferenceScriptType out), MonadBlockChainBalancing m) => out -> m (Maybe (ConcreteOutput (OwnerType out) (DatumType out) (ValueType out) (Versioned Validator)))","name":"resolveReferenceScript","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:resolveReferenceScript"},{"display_html":"outputDatumFromTxOutRef :: MonadBlockChainWithoutValidation m => TxOutRef -> m (Maybe OutputDatum)","name":"outputDatumFromTxOutRef","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:outputDatumFromTxOutRef"},{"display_html":"datumFromTxOutRef :: MonadBlockChainWithoutValidation m => TxOutRef -> m (Maybe Datum)","name":"datumFromTxOutRef","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:datumFromTxOutRef"},{"display_html":"typedDatumFromTxOutRef :: (FromData a, MonadBlockChainWithoutValidation m) => TxOutRef -> m (Maybe a)","name":"typedDatumFromTxOutRef","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:typedDatumFromTxOutRef"},{"display_html":"valueFromTxOutRef :: MonadBlockChainWithoutValidation m => TxOutRef -> m (Maybe Value)","name":"valueFromTxOutRef","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:valueFromTxOutRef"},{"display_html":"waitNSlots :: MonadBlockChainWithoutValidation m => Integer -> m Slot","name":"waitNSlots","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:waitNSlots"},{"display_html":"currentTime :: MonadBlockChainWithoutValidation m => m (POSIXTime, POSIXTime)","name":"currentTime","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:currentTime"},{"display_html":"slotToTimeInterval :: MonadBlockChainWithoutValidation m => Slot -> m (POSIXTime, POSIXTime)","name":"slotToTimeInterval","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:slotToTimeInterval"},{"display_html":"getEnclosingSlot :: MonadBlockChainWithoutValidation m => POSIXTime -> m Slot","name":"getEnclosingSlot","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:getEnclosingSlot"},{"display_html":"awaitEnclosingSlot :: MonadBlockChainWithoutValidation m => POSIXTime -> m Slot","name":"awaitEnclosingSlot","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:awaitEnclosingSlot"},{"display_html":"slotRangeBefore :: MonadBlockChainWithoutValidation m => POSIXTime -> m SlotRange","name":"slotRangeBefore","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:slotRangeBefore"},{"display_html":"slotRangeAfter :: MonadBlockChainWithoutValidation m => POSIXTime -> m SlotRange","name":"slotRangeAfter","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:slotRangeAfter"},{"display_html":"runUtxoSearch :: Monad m => UtxoSearch m a -> m [(TxOutRef, a)]","name":"runUtxoSearch","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:runUtxoSearch"},{"display_html":"allUtxosSearch :: MonadBlockChain m => UtxoSearch m TxOut","name":"allUtxosSearch","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:allUtxosSearch"},{"display_html":"allUtxosLedgerSearch :: MonadBlockChain m => UtxoSearch m TxOut","name":"allUtxosLedgerSearch","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:allUtxosLedgerSearch"},{"display_html":"utxosAtSearch :: MonadBlockChainBalancing m => Address -> UtxoSearch m TxOut","name":"utxosAtSearch","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:utxosAtSearch"},{"display_html":"utxosAtLedgerSearch :: MonadBlockChainBalancing m => Address -> UtxoSearch m TxOut","name":"utxosAtLedgerSearch","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:utxosAtLedgerSearch"},{"display_html":"utxosFromCardanoTxSearch :: Monad m => CardanoTx -> UtxoSearch m TxOut","name":"utxosFromCardanoTxSearch","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:utxosFromCardanoTxSearch"},{"display_html":"txOutByRefSearch :: MonadBlockChainBalancing m => [TxOutRef] -> UtxoSearch m TxOut","name":"txOutByRefSearch","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:txOutByRefSearch"},{"display_html":"filterWith :: Monad m => UtxoSearch m a -> (a -> m (Maybe b)) -> UtxoSearch m b","name":"filterWith","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:filterWith"},{"display_html":"filterWithPure :: Monad m => UtxoSearch m a -> (a -> Maybe b) -> UtxoSearch m b","name":"filterWithPure","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:filterWithPure"},{"display_html":"filterWithOptic :: (Is k An_AffineFold, Monad m) => UtxoSearch m a -> Optic' k is a b -> UtxoSearch m b","name":"filterWithOptic","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:filterWithOptic"},{"display_html":"filterWithPred :: Monad m => UtxoSearch m a -> (a -> Bool) -> UtxoSearch m a","name":"filterWithPred","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:filterWithPred"},{"display_html":"balancedTxSkel :: MonadBlockChainBalancing m => TxSkel -> m (TxSkel, Fee, Set TxOutRef)","name":"balancedTxSkel","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:balancedTxSkel"},{"display_html":"balancedTx :: MonadBlockChainBalancing m => (TxSkel, Fee, Set TxOutRef) -> m (Tx BabbageEra)","name":"balancedTx","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:balancedTx"},{"display_html":"txSkelInputData :: MonadBlockChainBalancing m => TxSkel -> m (Map DatumHash Datum)","name":"txSkelInputData","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:txSkelInputData"},{"display_html":"type MockChain = MockChainT Identity","name":"MockChain","module":"Cooked.MockChain","link":"Cooked-MockChain.html#t:MockChain"},{"display_html":"newtype MockChainT m a = MockChainT {
}","name":"MockChainT MockChainT unMockChain","module":"Cooked.MockChain","link":"Cooked-MockChain.html#t:MockChainT"},{"display_html":"newtype MockChainEnv = MockChainEnv {
}","name":"MockChainEnv MockChainEnv mceParams","module":"Cooked.MockChain","link":"Cooked-MockChain.html#t:MockChainEnv"},{"display_html":"data MockChainSt = MockChainSt {
}","name":"MockChainSt MockChainSt mcstCurrentSlot mcstValidators mcstIndex mcstDatums","module":"Cooked.MockChain","link":"Cooked-MockChain.html#t:MockChainSt"},{"display_html":"mcstToUtxoState :: MockChainSt -> UtxoState","name":"mcstToUtxoState","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:mcstToUtxoState"},{"display_html":"combineMockChainT :: Monad m => (forall a. m a -> m a -> m a) -> MockChainT m x -> MockChainT m x -> MockChainT m x","name":"combineMockChainT","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:combineMockChainT"},{"display_html":"mapMockChainT :: (m (Either MockChainError (a, MockChainSt)) -> n (Either MockChainError (b, MockChainSt))) -> MockChainT m a -> MockChainT n b","name":"mapMockChainT","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:mapMockChainT"},{"display_html":"runMockChainTRaw :: Monad m => MockChainEnv -> MockChainSt -> MockChainT m a -> m (Either MockChainError (a, MockChainSt))","name":"runMockChainTRaw","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:runMockChainTRaw"},{"display_html":"runMockChainTFrom :: Monad m => InitialDistribution -> MockChainT m a -> m (Either MockChainError (a, UtxoState))","name":"runMockChainTFrom","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:runMockChainTFrom"},{"display_html":"runMockChainT :: Monad m => MockChainT m a -> m (Either MockChainError (a, UtxoState))","name":"runMockChainT","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:runMockChainT"},{"display_html":"runMockChainRaw :: MockChainEnv -> MockChainSt -> MockChain a -> Either MockChainError (a, MockChainSt)","name":"runMockChainRaw","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:runMockChainRaw"},{"display_html":"runMockChainFrom :: InitialDistribution -> MockChain a -> Either MockChainError (a, UtxoState)","name":"runMockChainFrom","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:runMockChainFrom"},{"display_html":"runMockChain :: MockChain a -> Either MockChainError (a, UtxoState)","name":"runMockChain","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:runMockChain"},{"display_html":"utxoState0 :: UtxoState","name":"utxoState0","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:utxoState0"},{"display_html":"mockChainSt0 :: MockChainSt","name":"mockChainSt0","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:mockChainSt0"},{"display_html":"mockChainSt0From :: InitialDistribution -> MockChainSt","name":"mockChainSt0From","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:mockChainSt0From"},{"display_html":"utxoIndex0From :: InitialDistribution -> UtxoIndex","name":"utxoIndex0From","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:utxoIndex0From"},{"display_html":"utxoIndex0 :: UtxoIndex","name":"utxoIndex0","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:utxoIndex0"},{"display_html":"getIndex :: UtxoIndex -> Map TxOutRef TxOut","name":"getIndex","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:getIndex"},{"display_html":"runTransactionValidation :: Monad m => Params -> Tx BabbageEra -> [RawModTx] -> Map DatumHash Datum -> Map DatumHash TxSkelOutDatum -> Map ValidatorHash (Versioned Validator) -> MockChainT m CardanoTx","name":"runTransactionValidation","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:runTransactionValidation"},{"display_html":"type MonadModalBlockChain m = (MonadBlockChain m, MonadModal m, Modification m ~ UntypedTweak InterpMockChain)","name":"MonadModalBlockChain","module":"Cooked.MockChain","link":"Cooked-MockChain.html#t:MonadModalBlockChain"},{"display_html":"unMockChainLog :: MockChainLog -> [MockChainLogEntry]","name":"unMockChainLog","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:unMockChainLog"},{"display_html":"pattern MCLogFail :: String -> MockChainLogEntry","name":"MCLogFail","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:MCLogFail"},{"display_html":"pattern MCLogSubmittedTxSkel :: SkelContext -> TxSkel -> MockChainLogEntry","name":"MCLogSubmittedTxSkel","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:MCLogSubmittedTxSkel"},{"display_html":"pattern MCLogNewTx :: TxId -> MockChainLogEntry","name":"MCLogNewTx","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:MCLogNewTx"},{"display_html":"interpretAndRunWith :: (forall m. Monad m => MockChainT m a -> m res) -> StagedMockChain a -> [(res, MockChainLog)]","name":"interpretAndRunWith","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:interpretAndRunWith"},{"display_html":"interpretAndRun :: StagedMockChain a -> [(Either MockChainError (a, UtxoState), MockChainLog)]","name":"interpretAndRun","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:interpretAndRun"},{"display_html":"runTweak :: Tweak InterpMockChain a -> TxSkel -> [Either MockChainError (a, TxSkel)]","name":"runTweak","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:runTweak"},{"display_html":"runTweakFrom :: MockChainEnv -> MockChainSt -> Tweak InterpMockChain a -> TxSkel -> [Either MockChainError (a, TxSkel)]","name":"runTweakFrom","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:runTweakFrom"},{"display_html":"somewhere :: MonadModalBlockChain m => Tweak InterpMockChain b -> m a -> m a","name":"somewhere","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:somewhere"},{"display_html":"everywhere :: MonadModalBlockChain m => Tweak InterpMockChain b -> m a -> m a","name":"everywhere","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:everywhere"},{"display_html":"there :: MonadModalBlockChain m => Integer -> Tweak InterpMockChain b -> m a -> m a","name":"there","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:there"},{"display_html":"withTweak :: MonadModalBlockChain m => m x -> Tweak InterpMockChain a -> m x","name":"withTweak","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:withTweak"},{"display_html":"class IsProp prop where
","name":"IsProp testFailureMsg testSuccess testFailure testDisjoin testCounterexample testConjoin","module":"Cooked.MockChain","link":"Cooked-MockChain.html#t:IsProp"},{"display_html":"testBool :: IsProp prop => Bool -> prop","name":"testBool","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:testBool"},{"display_html":"testAll :: IsProp prop => (a -> prop) -> [a] -> prop","name":"testAll","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:testAll"},{"display_html":"(.==.) :: (IsProp prop, Eq a) => a -> a -> prop","name":".==.","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:.-61--61-."},{"display_html":"(.&&.) :: IsProp prop => prop -> prop -> prop","name":".&&.","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:.-38--38-."},{"display_html":"(.||.) :: IsProp prop => prop -> prop -> prop","name":".||.","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:.-124--124-."},{"display_html":"testSucceeds :: IsProp prop => PrettyCookedOpts -> StagedMockChain a -> prop","name":"testSucceeds","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:testSucceeds"},{"display_html":"testFails :: (IsProp prop, Show a) => PrettyCookedOpts -> (MockChainError -> prop) -> StagedMockChain a -> prop","name":"testFails","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:testFails"},{"display_html":"testSucceedsFrom :: IsProp prop => PrettyCookedOpts -> InitialDistribution -> StagedMockChain a -> prop","name":"testSucceedsFrom","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:testSucceedsFrom"},{"display_html":"testSucceedsFrom' :: IsProp prop => PrettyCookedOpts -> (a -> UtxoState -> prop) -> InitialDistribution -> StagedMockChain a -> prop","name":"testSucceedsFrom'","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:testSucceedsFrom-39-"},{"display_html":"testFailsFrom :: (IsProp prop, Show a) => PrettyCookedOpts -> (MockChainError -> prop) -> InitialDistribution -> StagedMockChain a -> prop","name":"testFailsFrom","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:testFailsFrom"},{"display_html":"isCekEvaluationFailure :: IsProp prop => PrettyCookedOpts -> MockChainError -> prop","name":"isCekEvaluationFailure","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:isCekEvaluationFailure"},{"display_html":"isCekEvaluationFailureWithMsg :: IsProp prop => PrettyCookedOpts -> (String -> Bool) -> MockChainError -> prop","name":"isCekEvaluationFailureWithMsg","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:isCekEvaluationFailureWithMsg"},{"display_html":"testAllSatisfiesFrom :: forall prop a. IsProp prop => PrettyCookedOpts -> (Either MockChainError (a, UtxoState) -> prop) -> InitialDistribution -> StagedMockChain a -> prop","name":"testAllSatisfiesFrom","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:testAllSatisfiesFrom"},{"display_html":"testBinaryRelatedBy :: IsProp prop => PrettyCookedOpts -> (UtxoState -> UtxoState -> prop) -> InitialDistribution -> StagedMockChain a -> prop","name":"testBinaryRelatedBy","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:testBinaryRelatedBy"},{"display_html":"testOneEquivClass :: IsProp prop => PrettyCookedOpts -> (UtxoState -> UtxoState -> prop) -> InitialDistribution -> StagedMockChain a -> prop","name":"testOneEquivClass","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:testOneEquivClass"},{"display_html":"testSatisfiesFrom' :: ([(Either MockChainError (a, UtxoState), MockChainLog)] -> prop) -> InitialDistribution -> StagedMockChain a -> prop","name":"testSatisfiesFrom'","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:testSatisfiesFrom-39-"},{"display_html":"assertionToMaybe :: Assertion -> IO (Maybe HUnitFailure)","name":"assertionToMaybe","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:assertionToMaybe"},{"display_html":"forAll :: Show a => Gen a -> (a -> Property) -> Property","name":"forAll","module":"Cooked.MockChain","link":"Cooked-MockChain.html#v:forAll"},{"display_html":"getValidityRangeTweak :: MonadTweak m => m SlotRange","name":"getValidityRangeTweak","module":"Cooked.Tweak.ValidityRange","link":"Cooked-Tweak-ValidityRange.html#v:getValidityRangeTweak"},{"display_html":"setValidityRangeTweak :: MonadTweak m => SlotRange -> m SlotRange","name":"setValidityRangeTweak","module":"Cooked.Tweak.ValidityRange","link":"Cooked-Tweak-ValidityRange.html#v:setValidityRangeTweak"},{"display_html":"setAlwaysValidRangeTweak :: MonadTweak m => m SlotRange","name":"setAlwaysValidRangeTweak","module":"Cooked.Tweak.ValidityRange","link":"Cooked-Tweak-ValidityRange.html#v:setAlwaysValidRangeTweak"},{"display_html":"validityRangeSatisfiesTweak :: MonadTweak m => (SlotRange -> Bool) -> m Bool","name":"validityRangeSatisfiesTweak","module":"Cooked.Tweak.ValidityRange","link":"Cooked-Tweak-ValidityRange.html#v:validityRangeSatisfiesTweak"},{"display_html":"isValidAtTweak :: MonadTweak m => Slot -> m Bool","name":"isValidAtTweak","module":"Cooked.Tweak.ValidityRange","link":"Cooked-Tweak-ValidityRange.html#v:isValidAtTweak"},{"display_html":"isValidNowTweak :: MonadTweak m => m Bool","name":"isValidNowTweak","module":"Cooked.Tweak.ValidityRange","link":"Cooked-Tweak-ValidityRange.html#v:isValidNowTweak"},{"display_html":"isValidDuringTweak :: MonadTweak m => SlotRange -> m Bool","name":"isValidDuringTweak","module":"Cooked.Tweak.ValidityRange","link":"Cooked-Tweak-ValidityRange.html#v:isValidDuringTweak"},{"display_html":"hasEmptyTimeRangeTweak :: MonadTweak m => m Bool","name":"hasEmptyTimeRangeTweak","module":"Cooked.Tweak.ValidityRange","link":"Cooked-Tweak-ValidityRange.html#v:hasEmptyTimeRangeTweak"},{"display_html":"hasFullTimeRangeTweak :: MonadTweak m => m Bool","name":"hasFullTimeRangeTweak","module":"Cooked.Tweak.ValidityRange","link":"Cooked-Tweak-ValidityRange.html#v:hasFullTimeRangeTweak"},{"display_html":"intersectValidityRangeTweak :: MonadTweak m => SlotRange -> m SlotRange","name":"intersectValidityRangeTweak","module":"Cooked.Tweak.ValidityRange","link":"Cooked-Tweak-ValidityRange.html#v:intersectValidityRangeTweak"},{"display_html":"centerAroundValidityRangeTweak :: MonadTweak m => Slot -> Integer -> m SlotRange","name":"centerAroundValidityRangeTweak","module":"Cooked.Tweak.ValidityRange","link":"Cooked-Tweak-ValidityRange.html#v:centerAroundValidityRangeTweak"},{"display_html":"makeValidityRangeSingletonTweak :: MonadTweak m => Slot -> m SlotRange","name":"makeValidityRangeSingletonTweak","module":"Cooked.Tweak.ValidityRange","link":"Cooked-Tweak-ValidityRange.html#v:makeValidityRangeSingletonTweak"},{"display_html":"makeValidityRangeNowTweak :: MonadTweak m => m SlotRange","name":"makeValidityRangeNowTweak","module":"Cooked.Tweak.ValidityRange","link":"Cooked-Tweak-ValidityRange.html#v:makeValidityRangeNowTweak"},{"display_html":"waitUntilValidTweak :: MonadTweak m => m Slot","name":"waitUntilValidTweak","module":"Cooked.Tweak.ValidityRange","link":"Cooked-Tweak-ValidityRange.html#v:waitUntilValidTweak"},{"display_html":"class (MonadPlus m, MonadBlockChainWithoutValidation m) => MonadTweak m where","name":"MonadTweak getTxSkel putTxSkel","module":"Cooked.Tweak","link":"Cooked-Tweak.html#t:MonadTweak"},{"display_html":"failingTweak :: MonadTweak m => m a","name":"failingTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:failingTweak"},{"display_html":"doNothingTweak :: MonadTweak m => m ()","name":"doNothingTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:doNothingTweak"},{"display_html":"viewTweak :: (MonadTweak m, Is k A_Getter) => Optic' k is TxSkel a -> m a","name":"viewTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:viewTweak"},{"display_html":"iviewTweak :: (MonadTweak m, Is k A_Getter) => Optic' k (WithIx is) TxSkel a -> m (is, a)","name":"iviewTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:iviewTweak"},{"display_html":"viewAllTweak :: (MonadTweak m, Is k A_Fold) => Optic' k is TxSkel a -> m [a]","name":"viewAllTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:viewAllTweak"},{"display_html":"setTweak :: (MonadTweak m, Is k A_Setter) => Optic' k is TxSkel a -> a -> m ()","name":"setTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:setTweak"},{"display_html":"overTweak :: (MonadTweak m, Is k A_Setter) => Optic' k is TxSkel a -> (a -> a) -> m ()","name":"overTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:overTweak"},{"display_html":"overMaybeTweak :: (MonadTweak m, Is k A_Traversal) => Optic' k is TxSkel a -> (a -> Maybe a) -> m [a]","name":"overMaybeTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:overMaybeTweak"},{"display_html":"overMaybeSelectingTweak :: forall a m k is. (MonadTweak m, Is k A_Traversal) => Optic' k is TxSkel a -> (a -> Maybe a) -> (Integer -> Bool) -> m [a]","name":"overMaybeSelectingTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:overMaybeSelectingTweak"},{"display_html":"combineModsTweak :: (Eq is, Is k A_Traversal, MonadTweak m) => ([is] -> [[is]]) -> Optic' k (WithIx is) TxSkel x -> (is -> x -> m [(x, l)]) -> m [l]","name":"combineModsTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:combineModsTweak"},{"display_html":"selectP :: (a -> Bool) -> Prism' a a","name":"selectP","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:selectP"},{"display_html":"getSignersTweak :: MonadTweak m => m [Wallet]","name":"getSignersTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:getSignersTweak"},{"display_html":"modifySignersTweak :: MonadTweak m => ([Wallet] -> [Wallet]) -> m [Wallet]","name":"modifySignersTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:modifySignersTweak"},{"display_html":"setSignersTweak :: MonadTweak m => [Wallet] -> m [Wallet]","name":"setSignersTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:setSignersTweak"},{"display_html":"signersSatisfyTweak :: MonadTweak m => ([Wallet] -> Bool) -> m Bool","name":"signersSatisfyTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:signersSatisfyTweak"},{"display_html":"isSignerTweak :: MonadTweak m => Wallet -> m Bool","name":"isSignerTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:isSignerTweak"},{"display_html":"hasSignersTweak :: MonadTweak m => m Bool","name":"hasSignersTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:hasSignersTweak"},{"display_html":"addFirstSignerTweak :: MonadTweak m => Wallet -> m [Wallet]","name":"addFirstSignerTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:addFirstSignerTweak"},{"display_html":"addSignersTweak :: MonadTweak m => [Wallet] -> m [Wallet]","name":"addSignersTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:addSignersTweak"},{"display_html":"addLastSignerTweak :: MonadTweak m => Wallet -> m [Wallet]","name":"addLastSignerTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:addLastSignerTweak"},{"display_html":"removeSignersTweak :: MonadTweak m => [Wallet] -> m [Wallet]","name":"removeSignersTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:removeSignersTweak"},{"display_html":"removeSignerTweak :: MonadTweak m => Wallet -> m [Wallet]","name":"removeSignerTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:removeSignerTweak"},{"display_html":"replaceFirstSignerTweak :: MonadTweak m => Wallet -> m [Wallet]","name":"replaceFirstSignerTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:replaceFirstSignerTweak"},{"display_html":"data PermutOutTweakMode
","name":"PermutOutTweakMode KeepIdentity OmitIdentity","module":"Cooked.Tweak","link":"Cooked-Tweak.html#t:PermutOutTweakMode"},{"display_html":"allOutPermutsTweak :: MonadTweak m => PermutOutTweakMode -> m ()","name":"allOutPermutsTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:allOutPermutsTweak"},{"display_html":"singleOutPermutTweak :: MonadTweak m => Int -> m ()","name":"singleOutPermutTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:singleOutPermutTweak"},{"display_html":"addLabelTweak :: (MonadTweak m, LabelConstrs x) => x -> m ()","name":"addLabelTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:addLabelTweak"},{"display_html":"removeLabelTweak :: (MonadTweak m, LabelConstrs x) => x -> m ()","name":"removeLabelTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:removeLabelTweak"},{"display_html":"hasLabelTweak :: (MonadTweak m, LabelConstrs x) => x -> m Bool","name":"hasLabelTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:hasLabelTweak"},{"display_html":"data MalformDatumLbl = MalformDatumLbl","name":"MalformDatumLbl MalformDatumLbl","module":"Cooked.Tweak","link":"Cooked-Tweak.html#t:MalformDatumLbl"},{"display_html":"data TamperDatumLbl = TamperDatumLbl","name":"TamperDatumLbl TamperDatumLbl","module":"Cooked.Tweak","link":"Cooked-Tweak.html#t:TamperDatumLbl"},{"display_html":"tamperDatumTweak :: forall a m. (MonadTweak m, Show a, PrettyCooked a, ToData a, FromData a, Typeable a) => (a -> Maybe a) -> m [a]","name":"tamperDatumTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:tamperDatumTweak"},{"display_html":"malformDatumTweak :: forall a m. (MonadTweak m, ToData a, FromData a, Typeable a) => (a -> [BuiltinData]) -> m ()","name":"malformDatumTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:malformDatumTweak"},{"display_html":"ensureInputTweak :: MonadTweak m => TxOutRef -> TxSkelRedeemer -> m (Maybe (TxOutRef, TxSkelRedeemer))","name":"ensureInputTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:ensureInputTweak"},{"display_html":"addInputTweak :: MonadTweak m => TxOutRef -> TxSkelRedeemer -> m ()","name":"addInputTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:addInputTweak"},{"display_html":"removeInputTweak :: MonadTweak m => (TxOutRef -> TxSkelRedeemer -> Bool) -> m [(TxOutRef, TxSkelRedeemer)]","name":"removeInputTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:removeInputTweak"},{"display_html":"ensureOutputTweak :: MonadTweak m => TxSkelOut -> m (Maybe TxSkelOut)","name":"ensureOutputTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:ensureOutputTweak"},{"display_html":"addOutputTweak :: MonadTweak m => TxSkelOut -> m ()","name":"addOutputTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:addOutputTweak"},{"display_html":"removeOutputTweak :: MonadTweak m => (TxSkelOut -> Bool) -> m [TxSkelOut]","name":"removeOutputTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:removeOutputTweak"},{"display_html":"addMintTweak :: MonadTweak m => (Versioned MintingPolicy, MintsRedeemer, TokenName, Integer) -> m ()","name":"addMintTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:addMintTweak"},{"display_html":"removeMintTweak :: MonadTweak m => ((Versioned MintingPolicy, MintsRedeemer, TokenName, Integer) -> Bool) -> m [(Versioned MintingPolicy, MintsRedeemer, TokenName, Integer)]","name":"removeMintTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:removeMintTweak"},{"display_html":"getValidityRangeTweak :: MonadTweak m => m SlotRange","name":"getValidityRangeTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:getValidityRangeTweak"},{"display_html":"setValidityRangeTweak :: MonadTweak m => SlotRange -> m SlotRange","name":"setValidityRangeTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:setValidityRangeTweak"},{"display_html":"setAlwaysValidRangeTweak :: MonadTweak m => m SlotRange","name":"setAlwaysValidRangeTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:setAlwaysValidRangeTweak"},{"display_html":"validityRangeSatisfiesTweak :: MonadTweak m => (SlotRange -> Bool) -> m Bool","name":"validityRangeSatisfiesTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:validityRangeSatisfiesTweak"},{"display_html":"isValidAtTweak :: MonadTweak m => Slot -> m Bool","name":"isValidAtTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:isValidAtTweak"},{"display_html":"isValidNowTweak :: MonadTweak m => m Bool","name":"isValidNowTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:isValidNowTweak"},{"display_html":"isValidDuringTweak :: MonadTweak m => SlotRange -> m Bool","name":"isValidDuringTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:isValidDuringTweak"},{"display_html":"hasEmptyTimeRangeTweak :: MonadTweak m => m Bool","name":"hasEmptyTimeRangeTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:hasEmptyTimeRangeTweak"},{"display_html":"hasFullTimeRangeTweak :: MonadTweak m => m Bool","name":"hasFullTimeRangeTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:hasFullTimeRangeTweak"},{"display_html":"intersectValidityRangeTweak :: MonadTweak m => SlotRange -> m SlotRange","name":"intersectValidityRangeTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:intersectValidityRangeTweak"},{"display_html":"centerAroundValidityRangeTweak :: MonadTweak m => Slot -> Integer -> m SlotRange","name":"centerAroundValidityRangeTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:centerAroundValidityRangeTweak"},{"display_html":"makeValidityRangeSingletonTweak :: MonadTweak m => Slot -> m SlotRange","name":"makeValidityRangeSingletonTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:makeValidityRangeSingletonTweak"},{"display_html":"makeValidityRangeNowTweak :: MonadTweak m => m SlotRange","name":"makeValidityRangeNowTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:makeValidityRangeNowTweak"},{"display_html":"waitUntilValidTweak :: MonadTweak m => m Slot","name":"waitUntilValidTweak","module":"Cooked.Tweak","link":"Cooked-Tweak.html#v:waitUntilValidTweak"},{"display_html":"redirectScriptOutputTweak :: (MonadTweak m, Is k A_Traversal, Show (DatumType a), ToData (DatumType a)) => Optic' k is TxSkel (ConcreteOutput (TypedValidator a) TxSkelOutDatum Value (Versioned Script)) -> (ConcreteOutput (TypedValidator a) TxSkelOutDatum Value (Versioned Script) -> Maybe (TypedValidator a)) -> (Integer -> Bool) -> m [ConcreteOutput (TypedValidator a) TxSkelOutDatum Value (Versioned Script)]","name":"redirectScriptOutputTweak","module":"Cooked.Attack.DatumHijacking","link":"Cooked-Attack-DatumHijacking.html#v:redirectScriptOutputTweak"},{"display_html":"datumHijackingAttack :: forall a m. (MonadTweak m, Show (DatumType a), PrettyCooked (DatumType a), ToData (DatumType a), Typeable (DatumType a), Typeable a) => (ConcreteOutput (TypedValidator a) TxSkelOutDatum Value (Versioned Script) -> Bool) -> (Integer -> Bool) -> m [ConcreteOutput (TypedValidator a) TxSkelOutDatum Value (Versioned Script)]","name":"datumHijackingAttack","module":"Cooked.Attack.DatumHijacking","link":"Cooked-Attack-DatumHijacking.html#v:datumHijackingAttack"},{"display_html":"newtype DatumHijackingLbl = DatumHijackingLbl Address","name":"DatumHijackingLbl DatumHijackingLbl","module":"Cooked.Attack.DatumHijacking","link":"Cooked-Attack-DatumHijacking.html#t:DatumHijackingLbl"},{"display_html":"datumHijackingTarget :: TypedValidator a","name":"datumHijackingTarget","module":"Cooked.Attack.DatumHijacking","link":"Cooked-Attack-DatumHijacking.html#v:datumHijackingTarget"},{"display_html":"dupTokenAttack :: MonadTweak m => (AssetClass -> Integer -> Integer) -> Wallet -> m Value","name":"dupTokenAttack","module":"Cooked.Attack.DupToken","link":"Cooked-Attack-DupToken.html#v:dupTokenAttack"},{"display_html":"data DupTokenLbl = DupTokenLbl","name":"DupTokenLbl DupTokenLbl","module":"Cooked.Attack.DupToken","link":"Cooked-Attack-DupToken.html#t:DupTokenLbl"},{"display_html":"type DoubleSatDelta = (Map TxOutRef TxSkelRedeemer, [TxSkelOut], TxSkelMints)","name":"DoubleSatDelta","module":"Cooked.Attack.DoubleSat","link":"Cooked-Attack-DoubleSat.html#t:DoubleSatDelta"},{"display_html":"data DoubleSatLbl = DoubleSatLbl","name":"DoubleSatLbl DoubleSatLbl","module":"Cooked.Attack.DoubleSat","link":"Cooked-Attack-DoubleSat.html#t:DoubleSatLbl"},{"display_html":"doubleSatAttack :: (MonadTweak m, Eq is, Is k A_Traversal) => ([is] -> [[is]]) -> Optic' k (WithIx is) TxSkel a -> (is -> a -> m [(a, DoubleSatDelta)]) -> Wallet -> m ()","name":"doubleSatAttack","module":"Cooked.Attack.DoubleSat","link":"Cooked-Attack-DoubleSat.html#v:doubleSatAttack"},{"display_html":"addTokenAttack :: MonadTweak m => (Versioned MintingPolicy -> [(TokenName, Integer)]) -> Wallet -> m Value","name":"addTokenAttack","module":"Cooked.Attack.AddToken","link":"Cooked-Attack-AddToken.html#v:addTokenAttack"},{"display_html":"newtype AddTokenLbl = AddTokenLbl TokenName","name":"AddTokenLbl AddTokenLbl","module":"Cooked.Attack.AddToken","link":"Cooked-Attack-AddToken.html#t:AddTokenLbl"},{"display_html":"module Cooked.Attack.DupToken","name":"","module":"Cooked.Attack","link":""},{"display_html":"module Cooked.Attack.DoubleSat","name":"","module":"Cooked.Attack","link":""},{"display_html":"module Cooked.Attack.DatumHijacking","name":"","module":"Cooked.Attack","link":""},{"display_html":"module Cooked.Attack.AddToken","name":"","module":"Cooked.Attack","link":""},{"display_html":"module Cooked.Wallet","name":"","module":"Cooked","link":""},{"display_html":"module Cooked.ValueUtils","name":"","module":"Cooked","link":""},{"display_html":"module Cooked.Tweak","name":"","module":"Cooked","link":""},{"display_html":"module Cooked.Skeleton","name":"","module":"Cooked","link":""},{"display_html":"module Cooked.ShowBS","name":"","module":"Cooked","link":""},{"display_html":"module Cooked.RawUPLC","name":"","module":"Cooked","link":""},{"display_html":"module Cooked.Pretty","name":"","module":"Cooked","link":""},{"display_html":"module Cooked.Output","name":"","module":"Cooked","link":""},{"display_html":"module Cooked.MockChain","name":"","module":"Cooked","link":""},{"display_html":"module Cooked.Currencies","name":"","module":"Cooked","link":""},{"display_html":"module Cooked.Attack","name":"","module":"Cooked","link":""},{"display_html":"class Monad m => MonadModal m where
","name":"MonadModal Modification modifyLtl","module":"Cooked","link":"Cooked.html#t:MonadModal"},{"display_html":"data Ltl a
","name":"Ltl LtlTruth LtlFalsity LtlAtom LtlOr LtlAnd LtlNext LtlUntil LtlRelease","module":"Cooked","link":"Cooked.html#t:Ltl"}]
\ No newline at end of file
diff --git a/src/Cooked.Attack.AddToken.html b/src/Cooked.Attack.AddToken.html
index 4bd89f6ea..a2516710e 100644
--- a/src/Cooked.Attack.AddToken.html
+++ b/src/Cooked.Attack.AddToken.html
@@ -17,8 +17,8 @@
--
-- This attack adds an 'AddTokenLbl' with the token name of the additional
-- minted token(s). It returns additional value minted.
-addTokenAttack ::
- MonadTweak m =>
+addTokenAttack ::
+ MonadTweak m =>
-- | For each policy that occurs in some 'Mints' constraint, return a list of
-- token names together with how many tokens with that name should be
-- minted.
@@ -33,14 +33,14 @@
(Pl.Versioned Pl.MintingPolicy -> [(Pl.TokenName, Integer)]) ->
-- | The wallet of the attacker. Any extra tokens will be paid to this wallet.
Wallet ->
- m Pl.Value
+ m Pl.Value
addTokenAttack :: (Versioned MintingPolicy -> [(TokenName, Integer)])
-> Wallet -> m Value
-addTokenAttack Versioned MintingPolicy -> [(TokenName, Integer)]
-extraTokens Wallet
-attacker = do
- TxSkelMints
-oldMints <- Optic' A_Lens NoIx TxSkel TxSkelMints -> m TxSkelMints
+addTokenAttack Versioned MintingPolicy -> [(TokenName, Integer)]
+extraTokens Wallet
+attacker = do
+ TxSkelMints
+oldMints <- Optic' A_Lens NoIx TxSkel TxSkelMints -> m TxSkelMints
forall (m :: * -> *) k (is :: IxList) a.
(MonadTweak m, Is k A_Getter) =>
Optic' k is TxSkel a -> m a
@@ -61,9 +61,9 @@
-> [m Value]
forall a b. (a -> b) -> [a] -> [b]
map
- ( \(Versioned MintingPolicy
-policy, (MintsRedeemer
-redeemer, NEMap TokenName (NonZero Integer)
+ ( \(Versioned MintingPolicy
+policy, (MintsRedeemer
+redeemer, NEMap TokenName (NonZero Integer)
_)) ->
[m Value] -> m Value
forall (t :: * -> *) (m :: * -> *) a.
@@ -76,32 +76,32 @@
-> [(TokenName, Integer)] -> [m Value]
forall a b. (a -> b) -> [a] -> [b]
map
- ( \(TokenName
-tName, Integer
-amount) ->
- let newMints :: TxSkelMints
-newMints = (Versioned MintingPolicy, MintsRedeemer, TokenName, Integer)
+ ( \(TokenName
+tName, Integer
+amount) ->
+ let newMints :: TxSkelMints
+newMints = (Versioned MintingPolicy, MintsRedeemer, TokenName, Integer)
-> TxSkelMints -> TxSkelMints
addToTxSkelMints (Versioned MintingPolicy
-policy, MintsRedeemer
-redeemer, TokenName
-tName, Integer
-amount) TxSkelMints
-oldMints
- increment :: Value
-increment =
+policy, MintsRedeemer
+redeemer, TokenName
+tName, Integer
+amount) TxSkelMints
+oldMints
+ increment :: Value
+increment =
TxSkelMints -> Value
txSkelMintsValue TxSkelMints
-newMints
+newMints
Value -> Value -> Value
forall a. Semigroup a => a -> a -> a
<> Value -> Value
forall a. AdditiveGroup a => a -> a
Pl.negate (TxSkelMints -> Value
txSkelMintsValue TxSkelMints
-oldMints)
+oldMints)
in if Value
-increment Value -> Value -> Bool
+increment Value -> Value -> Bool
`Pl.geq` Value
forall a. Monoid a => a
mempty
@@ -112,7 +112,7 @@
Optic' k is TxSkel a -> a -> m ()
setTweak Optic' A_Lens NoIx TxSkel TxSkelMints
txSkelMintsL TxSkelMints
-newMints
+newMints
TxSkelOut -> m ()
forall (m :: * -> *). MonadTweak m => TxSkelOut -> m ()
addOutputTweak (TxSkelOut -> m ()) -> TxSkelOut -> m ()
@@ -120,28 +120,28 @@
$ PubKeyHash -> Value -> TxSkelOut
paysPK (Wallet -> PubKeyHash
walletPKHash Wallet
-attacker) Value
-increment
+attacker) Value
+increment
Value -> m Value
forall (m :: * -> *) a. Monad m => a -> m a
return Value
-increment
+increment
else m Value
forall (m :: * -> *) a. MonadTweak m => m a
failingTweak
)
(Versioned MintingPolicy -> [(TokenName, Integer)]
-extraTokens Versioned MintingPolicy
-policy)
+extraTokens Versioned MintingPolicy
+policy)
)
(TxSkelMints
-> [(Versioned MintingPolicy,
(MintsRedeemer, NEMap TokenName (NonZero Integer)))]
forall k a. Map k a -> [(k, a)]
Map.toList TxSkelMints
-oldMints)
+oldMints)
-newtype AddTokenLbl = AddTokenLbl Pl.TokenName deriving (Int -> AddTokenLbl -> ShowS
+newtype AddTokenLbl = AddTokenLbl Pl.TokenName deriving (Int -> AddTokenLbl -> ShowS
[AddTokenLbl] -> ShowS
AddTokenLbl -> String
(Int -> AddTokenLbl -> ShowS)
@@ -156,7 +156,7 @@
$cshow :: AddTokenLbl -> String
showsPrec :: Int -> AddTokenLbl -> ShowS
$cshowsPrec :: Int -> AddTokenLbl -> ShowS
-Show, AddTokenLbl -> AddTokenLbl -> Bool
+Show, AddTokenLbl -> AddTokenLbl -> Bool
(AddTokenLbl -> AddTokenLbl -> Bool)
-> (AddTokenLbl -> AddTokenLbl -> Bool) -> Eq AddTokenLbl
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
diff --git a/src/Cooked.Attack.DatumHijacking.html b/src/Cooked.Attack.DatumHijacking.html
index 1d881db9e..d3a420ae1 100644
--- a/src/Cooked.Attack.DatumHijacking.html
+++ b/src/Cooked.Attack.DatumHijacking.html
@@ -35,23 +35,23 @@
--
-- Something like @txSkelOutsL % traversed % txSkelOutOwnerTypeP @(Pl.TypedValidator a)@
-- might be useful to construct the optics used by this tweak.
-redirectScriptOutputTweak ::
- ( MonadTweak m,
- Is k A_Traversal,
- Show (Pl.DatumType a),
- Pl.ToData (Pl.DatumType a)
+redirectScriptOutputTweak ::
+ ( MonadTweak m,
+ Is k A_Traversal,
+ Show (Pl.DatumType a),
+ Pl.ToData (Pl.DatumType a)
) =>
- Optic' k is TxSkel (ConcreteOutput (Pl.TypedValidator a) TxSkelOutDatum Pl.Value (Pl.Versioned Pl.Script)) ->
+ Optic' k is TxSkel (ConcreteOutput (Pl.TypedValidator a) TxSkelOutDatum Pl.Value (Pl.Versioned Pl.Script)) ->
-- | Return @Just@ the new validator, or @Nothing@ if you want to leave this
-- output unchanged.
- (ConcreteOutput (Pl.TypedValidator a) TxSkelOutDatum Pl.Value (Pl.Versioned Pl.Script) -> Maybe (Pl.TypedValidator a)) ->
+ (ConcreteOutput (Pl.TypedValidator a) TxSkelOutDatum Pl.Value (Pl.Versioned Pl.Script) -> Maybe (Pl.TypedValidator a)) ->
-- | The redirection described by the previous argument might apply to more
-- than one of the script outputs of the transaction. Use this predicate to
-- select which of the redirectable script outputs to actually redirect. We
-- count the redirectable script outputs from the left to the right, starting
-- with zero.
(Integer -> Bool) ->
- m [ConcreteOutput (Pl.TypedValidator a) TxSkelOutDatum Pl.Value (Pl.Versioned Pl.Script)]
+ m [ConcreteOutput (Pl.TypedValidator a) TxSkelOutDatum Pl.Value (Pl.Versioned Pl.Script)]
redirectScriptOutputTweak :: Optic'
k
is
@@ -64,16 +64,16 @@
-> (Integer -> Bool)
-> m [ConcreteOutput
(TypedValidator a) TxSkelOutDatum Value (Versioned Script)]
-redirectScriptOutputTweak Optic'
+redirectScriptOutputTweak Optic'
k
is
TxSkel
(ConcreteOutput
(TypedValidator a) TxSkelOutDatum Value (Versioned Script))
-optic ConcreteOutput
+optic ConcreteOutput
(TypedValidator a) TxSkelOutDatum Value (Versioned Script)
-> Maybe (TypedValidator a)
-change =
+change =
Optic'
k
is
@@ -99,23 +99,23 @@
TxSkel
(ConcreteOutput
(TypedValidator a) TxSkelOutDatum Value (Versioned Script))
-optic
- ( \ConcreteOutput
+optic
+ ( \ConcreteOutput
(TypedValidator a) TxSkelOutDatum Value (Versioned Script)
-output -> case ConcreteOutput
+output -> case ConcreteOutput
(TypedValidator a) TxSkelOutDatum Value (Versioned Script)
-> Maybe (TypedValidator a)
-change ConcreteOutput
+change ConcreteOutput
(TypedValidator a) TxSkelOutDatum Value (Versioned Script)
-output of
+output of
Maybe (TypedValidator a)
Nothing -> Maybe
(ConcreteOutput
(TypedValidator a) TxSkelOutDatum Value (Versioned Script))
forall a. Maybe a
Nothing
- Just TypedValidator a
-newValidator -> ConcreteOutput
+ Just TypedValidator a
+newValidator -> ConcreteOutput
(TypedValidator a) TxSkelOutDatum Value (Versioned Script)
-> Maybe
(ConcreteOutput
@@ -134,7 +134,7 @@
forall a b. (a -> b) -> a -> b
$ ConcreteOutput
(TypedValidator a) TxSkelOutDatum Value (Versioned Script)
-output ConcreteOutput
+output ConcreteOutput
(TypedValidator a) TxSkelOutDatum Value (Versioned Script)
-> (ConcreteOutput
(TypedValidator a) TxSkelOutDatum Value (Versioned Script)
@@ -171,7 +171,7 @@
Is k A_Setter =>
Optic k is s t a b -> b -> s -> t
.~ TypedValidator a
-newValidator
+newValidator
)
-- | A datum hijacking attack, simplified: This attack tries to substitute a
@@ -189,36 +189,36 @@
-- they occurred on the original transaction. If no output is redirected, this
-- attack fails.
datumHijackingAttack ::
- forall a m.
- ( MonadTweak m,
- Show (Pl.DatumType a),
- PrettyCooked (Pl.DatumType a),
- Pl.ToData (Pl.DatumType a),
- Typeable (Pl.DatumType a),
- Typeable a
+ forall a m.
+ ( MonadTweak m,
+ Show (Pl.DatumType a),
+ PrettyCooked (Pl.DatumType a),
+ Pl.ToData (Pl.DatumType a),
+ Typeable (Pl.DatumType a),
+ Typeable a
) =>
-- | Predicate to select outputs to steal, depending on the intended
-- recipient, the datum, and the value.
- (ConcreteOutput (Pl.TypedValidator a) TxSkelOutDatum Pl.Value (Pl.Versioned Pl.Script) -> Bool) ->
+ (ConcreteOutput (Pl.TypedValidator a) TxSkelOutDatum Pl.Value (Pl.Versioned Pl.Script) -> Bool) ->
-- | The selection predicate may match more than one output. Use this
-- predicate to restrict to the i-th of the outputs (counting from the left,
-- starting at zero) chosen by the selection predicate with this predicate.
(Integer -> Bool) ->
- m [ConcreteOutput (Pl.TypedValidator a) TxSkelOutDatum Pl.Value (Pl.Versioned Pl.Script)]
+ m [ConcreteOutput (Pl.TypedValidator a) TxSkelOutDatum Pl.Value (Pl.Versioned Pl.Script)]
datumHijackingAttack :: (ConcreteOutput
(TypedValidator a) TxSkelOutDatum Value (Versioned Script)
-> Bool)
-> (Integer -> Bool)
-> m [ConcreteOutput
(TypedValidator a) TxSkelOutDatum Value (Versioned Script)]
-datumHijackingAttack ConcreteOutput
+datumHijackingAttack ConcreteOutput
(TypedValidator a) TxSkelOutDatum Value (Versioned Script)
-> Bool
-change Integer -> Bool
-select = do
- [ConcreteOutput
+change Integer -> Bool
+select = do
+ [ConcreteOutput
(TypedValidator a) TxSkelOutDatum Value (Versioned Script)]
-redirected <-
+redirected <-
Optic'
A_Traversal
NoIx
@@ -298,22 +298,22 @@
Prism'
TxSkelOut
(ConcreteOutput ownerType TxSkelOutDatum Value (Versioned Script))
-txSkelOutOwnerTypeP @(Pl.TypedValidator a))
- (\ConcreteOutput
+txSkelOutOwnerTypeP @(Pl.TypedValidator a))
+ (\ConcreteOutput
(TypedValidator a) TxSkelOutDatum Value (Versioned Script)
-output -> if ConcreteOutput
+output -> if ConcreteOutput
(TypedValidator a) TxSkelOutDatum Value (Versioned Script)
-> Bool
-change ConcreteOutput
+change ConcreteOutput
(TypedValidator a) TxSkelOutDatum Value (Versioned Script)
-output then TypedValidator a -> Maybe (TypedValidator a)
+output then TypedValidator a -> Maybe (TypedValidator a)
forall a. a -> Maybe a
Just TypedValidator a
-thief else Maybe (TypedValidator a)
+thief else Maybe (TypedValidator a)
forall a. Maybe a
Nothing)
Integer -> Bool
-select
+select
Bool -> m ()
forall (f :: * -> *). Alternative f => Bool -> f ()
guard (Bool -> m ()) -> (Bool -> Bool) -> Bool -> m ()
@@ -327,7 +327,7 @@
forall (t :: * -> *) a. Foldable t => t a -> Bool
null [ConcreteOutput
(TypedValidator a) TxSkelOutDatum Value (Versioned Script)]
-redirected
+redirected
DatumHijackingLbl -> m ()
forall (m :: * -> *) x. (MonadTweak m, LabelConstrs x) => x -> m ()
addLabelTweak (DatumHijackingLbl -> m ()) -> DatumHijackingLbl -> m ()
@@ -338,7 +338,7 @@
$ TypedValidator a -> Address
forall a. TypedValidator a -> Address
Pl.validatorAddress TypedValidator a
-thief
+thief
[ConcreteOutput
(TypedValidator a) TxSkelOutDatum Value (Versioned Script)]
-> m [ConcreteOutput
@@ -346,15 +346,15 @@
forall (m :: * -> *) a. Monad m => a -> m a
return [ConcreteOutput
(TypedValidator a) TxSkelOutDatum Value (Versioned Script)]
-redirected
+redirected
where
- thief :: TypedValidator a
-thief = TypedValidator a
+ thief :: TypedValidator a
+thief = TypedValidator a
forall a. TypedValidator a
-datumHijackingTarget @a
+datumHijackingTarget @a
newtype DatumHijackingLbl = DatumHijackingLbl Pl.Address
- deriving (Int -> DatumHijackingLbl -> ShowS
+ deriving (Int -> DatumHijackingLbl -> ShowS
[DatumHijackingLbl] -> ShowS
DatumHijackingLbl -> String
(Int -> DatumHijackingLbl -> ShowS)
@@ -369,7 +369,7 @@
$cshow :: DatumHijackingLbl -> String
showsPrec :: Int -> DatumHijackingLbl -> ShowS
$cshowsPrec :: Int -> DatumHijackingLbl -> ShowS
-Show, DatumHijackingLbl -> DatumHijackingLbl -> Bool
+Show, DatumHijackingLbl -> DatumHijackingLbl -> Bool
(DatumHijackingLbl -> DatumHijackingLbl -> Bool)
-> (DatumHijackingLbl -> DatumHijackingLbl -> Bool)
-> Eq DatumHijackingLbl
@@ -378,7 +378,7 @@
$c/= :: DatumHijackingLbl -> DatumHijackingLbl -> Bool
== :: DatumHijackingLbl -> DatumHijackingLbl -> Bool
$c== :: DatumHijackingLbl -> DatumHijackingLbl -> Bool
-Eq, Eq DatumHijackingLbl
+Eq, Eq DatumHijackingLbl
Eq DatumHijackingLbl
-> (DatumHijackingLbl -> DatumHijackingLbl -> Ordering)
-> (DatumHijackingLbl -> DatumHijackingLbl -> Bool)
@@ -421,7 +421,7 @@
-- | The trivial validator that always succeds; this is a sufficient target for
-- the datum hijacking attack since we only want to show feasibility of the
-- attack.
-datumHijackingTarget :: Pl.TypedValidator a
+datumHijackingTarget :: Pl.TypedValidator a
datumHijackingTarget :: TypedValidator a
datumHijackingTarget = Program NamedDeBruijn DefaultUni DefaultFun () -> TypedValidator a
forall a.
@@ -437,9 +437,9 @@
CompiledCodeIn uni fun a -> Program NamedDeBruijn uni fun ()
Pl.getPlc $$(Pl.compile [||tgt||]))
where
- tgt :: Pl.BuiltinData -> Pl.BuiltinData -> Pl.BuiltinData -> ()
- tgt :: BuiltinData -> BuiltinData -> BuiltinData -> ()
-tgt BuiltinData
+ tgt :: Pl.BuiltinData -> Pl.BuiltinData -> Pl.BuiltinData -> ()
+ tgt :: BuiltinData -> BuiltinData -> BuiltinData -> ()
+tgt BuiltinData
_ BuiltinData
_ BuiltinData
_ = ()
diff --git a/src/Cooked.Attack.DoubleSat.html b/src/Cooked.Attack.DoubleSat.html
index 9a86f4b86..78329fb0c 100644
--- a/src/Cooked.Attack.DoubleSat.html
+++ b/src/Cooked.Attack.DoubleSat.html
@@ -49,35 +49,35 @@
-- attack.
type DoubleSatDelta = (Map Pl.TxOutRef TxSkelRedeemer, [TxSkelOut], TxSkelMints)
-instance {-# OVERLAPPING #-} Semigroup DoubleSatDelta where
- (Map TxOutRef TxSkelRedeemer
-i, [TxSkelOut]
-o, TxSkelMints
-m) <> :: DoubleSatDelta -> DoubleSatDelta -> DoubleSatDelta
-<> (Map TxOutRef TxSkelRedeemer
-i', [TxSkelOut]
-o', TxSkelMints
-m') =
+instance {-# OVERLAPPING #-} Semigroup DoubleSatDelta where
+ (Map TxOutRef TxSkelRedeemer
+i, [TxSkelOut]
+o, TxSkelMints
+m) <> :: DoubleSatDelta -> DoubleSatDelta -> DoubleSatDelta
+<> (Map TxOutRef TxSkelRedeemer
+i', [TxSkelOut]
+o', TxSkelMints
+m') =
( Map TxOutRef TxSkelRedeemer
-i Map TxOutRef TxSkelRedeemer
+i Map TxOutRef TxSkelRedeemer
-> Map TxOutRef TxSkelRedeemer -> Map TxOutRef TxSkelRedeemer
forall a. Semigroup a => a -> a -> a
<> Map TxOutRef TxSkelRedeemer
-i', -- this is left-biased union
+i', -- this is left-biased union
[TxSkelOut]
-o [TxSkelOut] -> [TxSkelOut] -> [TxSkelOut]
+o [TxSkelOut] -> [TxSkelOut] -> [TxSkelOut]
forall a. [a] -> [a] -> [a]
++ [TxSkelOut]
-o',
+o',
TxSkelMints
-m TxSkelMints -> TxSkelMints -> TxSkelMints
+m TxSkelMints -> TxSkelMints -> TxSkelMints
forall a. Semigroup a => a -> a -> a
<> TxSkelMints
-m' -- see the 'Semigroup' instance of 'TxSkelMints'
+m' -- see the 'Semigroup' instance of 'TxSkelMints'
)
-instance {-# OVERLAPPING #-} Monoid DoubleSatDelta where
- mempty :: DoubleSatDelta
+instance {-# OVERLAPPING #-} Monoid DoubleSatDelta where
+ mempty :: DoubleSatDelta
mempty = (Map TxOutRef TxSkelRedeemer
forall k a. Map k a
Map.empty, [], TxSkelMints
@@ -92,11 +92,11 @@
-- involved are fooled by what's already present on the transaction. Any extra
-- value contained in new inputs to the transaction is then paid to the
-- attacker.
-doubleSatAttack ::
- (MonadTweak m, Eq is, Is k A_Traversal) =>
+doubleSatAttack ::
+ (MonadTweak m, Eq is, Is k A_Traversal) =>
-- | how to combine modifications from caused by different foci. See the
-- comment at 'combineModsTweak', which uses the same logic.
- ([is] -> [[is]]) ->
+ ([is] -> [[is]]) ->
-- | Each focus of this optic is a potential reason to add some extra
-- constraints.
--
@@ -104,7 +104,7 @@
-- validators of type @t@ with the following traversal:
--
-- > txSkelOutsL % itaversed % txSkelOutputToTypedValidatorP @t
- Optic' k (WithIx is) TxSkel a ->
+ Optic' k (WithIx is) TxSkel a ->
-- | How to change each focus, and which inputs, outputs, and mints to add,
-- for each of the foci. There might be different options for each focus,
-- that's why the return value is a list.
@@ -129,25 +129,25 @@
-- 'UtxoState' argument.
--
-- ###################################
- (is -> a -> m [(a, DoubleSatDelta)]) ->
+ (is -> a -> m [(a, DoubleSatDelta)]) ->
-- | The wallet of the attacker, where any surplus is paid to.
--
-- In the example, the extra value in the added 'spendsScript' constraints
-- will be paid to the attacker.
Wallet ->
- m ()
+ m ()
doubleSatAttack :: ([is] -> [[is]])
-> Optic' k (WithIx is) TxSkel a
-> (is -> a -> m [(a, DoubleSatDelta)])
-> Wallet
-> m ()
-doubleSatAttack [is] -> [[is]]
-groupings Optic' k (WithIx is) TxSkel a
-optic is -> a -> m [(a, DoubleSatDelta)]
-change Wallet
-attacker = do
- [DoubleSatDelta]
-deltas <- ([is] -> [[is]])
+doubleSatAttack [is] -> [[is]]
+groupings Optic' k (WithIx is) TxSkel a
+optic is -> a -> m [(a, DoubleSatDelta)]
+change Wallet
+attacker = do
+ [DoubleSatDelta]
+deltas <- ([is] -> [[is]])
-> Optic' k (WithIx is) TxSkel a
-> (is -> a -> m [(a, DoubleSatDelta)])
-> m [DoubleSatDelta]
@@ -158,24 +158,24 @@
-> (is -> x -> m [(x, l)])
-> m [l]
combineModsTweak [is] -> [[is]]
-groupings Optic' k (WithIx is) TxSkel a
-optic is -> a -> m [(a, DoubleSatDelta)]
-change
- let delta :: DoubleSatDelta
-delta = [DoubleSatDelta] -> DoubleSatDelta
-joinDoubleSatDeltas [DoubleSatDelta]
-deltas
+groupings Optic' k (WithIx is) TxSkel a
+optic is -> a -> m [(a, DoubleSatDelta)]
+change
+ let delta :: DoubleSatDelta
+delta = [DoubleSatDelta] -> DoubleSatDelta
+joinDoubleSatDeltas [DoubleSatDelta]
+deltas
DoubleSatDelta -> m ()
forall (m :: * -> *). MonadTweak m => DoubleSatDelta -> m ()
-addDoubleSatDeltaTweak DoubleSatDelta
-delta
- Value
-addedValue <- DoubleSatDelta -> m Value
+addDoubleSatDeltaTweak DoubleSatDelta
+delta
+ Value
+addedValue <- DoubleSatDelta -> m Value
forall (m :: * -> *). MonadTweak m => DoubleSatDelta -> m Value
-deltaBalance DoubleSatDelta
-delta
+deltaBalance DoubleSatDelta
+delta
if Value
-addedValue Value -> Value -> Bool
+addedValue Value -> Value -> Bool
`Pl.gt` Value
forall a. Monoid a => a
mempty
@@ -186,8 +186,8 @@
$ PubKeyHash -> Value -> TxSkelOut
paysPK (Wallet -> PubKeyHash
walletPKHash Wallet
-attacker) Value
-addedValue
+attacker) Value
+addedValue
else m ()
forall (m :: * -> *) a. MonadTweak m => m a
failingTweak
@@ -197,14 +197,14 @@
DoubleSatLbl
where
-- for each triple of additional inputs, outputs, and mints, calculate its balance
- deltaBalance :: MonadTweak m => DoubleSatDelta -> m Pl.Value
- deltaBalance :: DoubleSatDelta -> m Value
-deltaBalance (Map TxOutRef TxSkelRedeemer
-inputs, [TxSkelOut]
-outputs, TxSkelMints
-mints) = do
- Value
-inValue <- ((TxOutRef, TxOut) -> Value) -> [(TxOutRef, TxOut)] -> Value
+ deltaBalance :: MonadTweak m => DoubleSatDelta -> m Pl.Value
+ deltaBalance :: DoubleSatDelta -> m Value
+deltaBalance (Map TxOutRef TxSkelRedeemer
+inputs, [TxSkelOut]
+outputs, TxSkelMints
+mints) = do
+ Value
+inValue <- ((TxOutRef, TxOut) -> Value) -> [(TxOutRef, TxOut)] -> Value
forall (t :: * -> *) m a.
(Foldable t, Monoid m) =>
(a -> m) -> t a -> m
@@ -228,7 +228,7 @@
`elem` Map TxOutRef TxSkelRedeemer -> [TxOutRef]
forall k a. Map k a -> [k]
Map.keys Map TxOutRef TxSkelRedeemer
-inputs) (TxOutRef -> Bool)
+inputs) (TxOutRef -> Bool)
-> ((TxOutRef, TxOut) -> TxOutRef) -> (TxOutRef, TxOut) -> Bool
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (TxOutRef, TxOut) -> TxOutRef
@@ -245,18 +245,18 @@
return (Value -> m Value) -> Value -> m Value
forall a b. (a -> b) -> a -> b
$ Value
-inValue Value -> Value -> Value
+inValue Value -> Value -> Value
forall a. Semigroup a => a -> a -> a
<> Value -> Value
forall a. AdditiveGroup a => a -> a
Pl.negate Value
-outValue Value -> Value -> Value
+outValue Value -> Value -> Value
forall a. Semigroup a => a -> a -> a
<> Value
-mintValue
+mintValue
where
- outValue :: Value
-outValue = Optic' A_Traversal '[] [TxSkelOut] Value -> [TxSkelOut] -> Value
+ outValue :: Value
+outValue = Optic' A_Traversal '[] [TxSkelOut] Value -> [TxSkelOut] -> Value
forall k a (is :: IxList) s.
(Is k A_Fold, Monoid a) =>
Optic' k is s a -> s -> a
@@ -273,19 +273,19 @@
Optic k is s t u v -> Optic l js u v a b -> Optic m ks s t a b
% Optic A_Lens '[] TxSkelOut TxSkelOut Value Value
txSkelOutValueL) [TxSkelOut]
-outputs
- mintValue :: Value
-mintValue = TxSkelMints -> Value
+outputs
+ mintValue :: Value
+mintValue = TxSkelMints -> Value
txSkelMintsValue TxSkelMints
-mints
+mints
-- Helper tweak to add a 'DoubleSatDelta' to a transaction
- addDoubleSatDeltaTweak :: MonadTweak m => DoubleSatDelta -> m ()
- addDoubleSatDeltaTweak :: DoubleSatDelta -> m ()
-addDoubleSatDeltaTweak (Map TxOutRef TxSkelRedeemer
-ins, [TxSkelOut]
-outs, TxSkelMints
-mints) =
+ addDoubleSatDeltaTweak :: MonadTweak m => DoubleSatDelta -> m ()
+ addDoubleSatDeltaTweak :: DoubleSatDelta -> m ()
+addDoubleSatDeltaTweak (Map TxOutRef TxSkelRedeemer
+ins, [TxSkelOut]
+outs, TxSkelMints
+mints) =
((TxOutRef, TxSkelRedeemer) -> m ())
-> [(TxOutRef, TxSkelRedeemer)] -> m ()
forall (t :: * -> *) (m :: * -> *) a b.
@@ -301,7 +301,7 @@
addInputTweak) (Map TxOutRef TxSkelRedeemer -> [(TxOutRef, TxSkelRedeemer)]
forall k a. Map k a -> [(k, a)]
Map.toList Map TxOutRef TxSkelRedeemer
-ins)
+ins)
m () -> m () -> m ()
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> (TxSkelOut -> m ()) -> [TxSkelOut] -> m ()
@@ -311,7 +311,7 @@
mapM_ TxSkelOut -> m ()
forall (m :: * -> *). MonadTweak m => TxSkelOut -> m ()
addOutputTweak [TxSkelOut]
-outs
+outs
m () -> m () -> m ()
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> ((Versioned MintingPolicy, MintsRedeemer, TokenName, Integer)
@@ -330,18 +330,18 @@
addMintTweak (TxSkelMints
-> [(Versioned MintingPolicy, MintsRedeemer, TokenName, Integer)]
txSkelMintsToList TxSkelMints
-mints)
+mints)
-- Join a list of 'DoubleSatDelta's into one 'DoubleSatDelta' that specifies
-- eveything that is contained in the input.
- joinDoubleSatDeltas :: [DoubleSatDelta] -> DoubleSatDelta
- joinDoubleSatDeltas :: [DoubleSatDelta] -> DoubleSatDelta
-joinDoubleSatDeltas = [DoubleSatDelta] -> DoubleSatDelta
+ joinDoubleSatDeltas :: [DoubleSatDelta] -> DoubleSatDelta
+ joinDoubleSatDeltas :: [DoubleSatDelta] -> DoubleSatDelta
+joinDoubleSatDeltas = [DoubleSatDelta] -> DoubleSatDelta
forall a. Monoid a => [a] -> a
mconcat
data DoubleSatLbl = DoubleSatLbl
- deriving (DoubleSatLbl -> DoubleSatLbl -> Bool
+ deriving (DoubleSatLbl -> DoubleSatLbl -> Bool
(DoubleSatLbl -> DoubleSatLbl -> Bool)
-> (DoubleSatLbl -> DoubleSatLbl -> Bool) -> Eq DoubleSatLbl
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
@@ -349,7 +349,7 @@
$c/= :: DoubleSatLbl -> DoubleSatLbl -> Bool
== :: DoubleSatLbl -> DoubleSatLbl -> Bool
$c== :: DoubleSatLbl -> DoubleSatLbl -> Bool
-Eq, Int -> DoubleSatLbl -> ShowS
+Eq, Int -> DoubleSatLbl -> ShowS
[DoubleSatLbl] -> ShowS
DoubleSatLbl -> String
(Int -> DoubleSatLbl -> ShowS)
@@ -364,7 +364,7 @@
$cshow :: DoubleSatLbl -> String
showsPrec :: Int -> DoubleSatLbl -> ShowS
$cshowsPrec :: Int -> DoubleSatLbl -> ShowS
-Show, Eq DoubleSatLbl
+Show, Eq DoubleSatLbl
Eq DoubleSatLbl
-> (DoubleSatLbl -> DoubleSatLbl -> Ordering)
-> (DoubleSatLbl -> DoubleSatLbl -> Bool)
diff --git a/src/Cooked.Attack.DupToken.html b/src/Cooked.Attack.DupToken.html
index 34bc5a168..fa8db6969 100644
--- a/src/Cooked.Attack.DupToken.html
+++ b/src/Cooked.Attack.DupToken.html
@@ -17,8 +17,8 @@
-- given recipient wallet. This adds a 'DupTokenLbl' to the labels of the
-- transaction using 'addLabel'. Returns the 'Value' by which the minted value
-- was increased.
-dupTokenAttack ::
- MonadTweak m =>
+dupTokenAttack ::
+ MonadTweak m =>
-- | A function describing how the amount of tokens specified by a 'Mints'
-- constraint should be changed, depending on the asset class and the amount
-- specified by the constraint. The given function @f@ should probably satisfy
@@ -30,15 +30,15 @@
-- modified transaction but were not minted by the original transaction are
-- paid to this wallet.
Wallet ->
- m Pl.Value
+ m Pl.Value
dupTokenAttack :: (AssetClass -> Integer -> Integer) -> Wallet -> m Value
-dupTokenAttack AssetClass -> Integer -> Integer
-change Wallet
-attacker = do
- Value
-totalIncrement <- m Value
+dupTokenAttack AssetClass -> Integer -> Integer
+change Wallet
+attacker = do
+ Value
+totalIncrement <- m Value
forall (m :: * -> *). MonadTweak m => m Value
-changeMintAmountsTweak
+changeMintAmountsTweak
TxSkelOut -> m ()
forall (m :: * -> *). MonadTweak m => TxSkelOut -> m ()
addOutputTweak (TxSkelOut -> m ()) -> TxSkelOut -> m ()
@@ -46,8 +46,8 @@
$ PubKeyHash -> Value -> TxSkelOut
paysPK (Wallet -> PubKeyHash
walletPKHash Wallet
-attacker) Value
-totalIncrement
+attacker) Value
+totalIncrement
DupTokenLbl -> m ()
forall (m :: * -> *) x. (MonadTweak m, LabelConstrs x) => x -> m ()
addLabelTweak DupTokenLbl
@@ -55,13 +55,13 @@
Value -> m Value
forall (m :: * -> *) a. Monad m => a -> m a
return Value
-totalIncrement
+totalIncrement
where
- changeMintAmountsTweak :: MonadTweak m => m Pl.Value
- changeMintAmountsTweak :: m Value
-changeMintAmountsTweak = do
- [(Versioned MintingPolicy, MintsRedeemer, TokenName, Integer)]
-oldMintsList <- Optic'
+ changeMintAmountsTweak :: MonadTweak m => m Pl.Value
+ changeMintAmountsTweak :: m Value
+changeMintAmountsTweak = do
+ [(Versioned MintingPolicy, MintsRedeemer, TokenName, Integer)]
+oldMintsList <- Optic'
A_Getter
'[]
TxSkel
@@ -115,98 +115,98 @@
to TxSkelMints
-> [(Versioned MintingPolicy, MintsRedeemer, TokenName, Integer)]
txSkelMintsToList
- let newMintsList :: [(Versioned MintingPolicy, MintsRedeemer, TokenName, Integer)]
-newMintsList =
+ let newMintsList :: [(Versioned MintingPolicy, MintsRedeemer, TokenName, Integer)]
+newMintsList =
((Versioned MintingPolicy, MintsRedeemer, TokenName, Integer)
-> (Versioned MintingPolicy, MintsRedeemer, TokenName, Integer))
-> [(Versioned MintingPolicy, MintsRedeemer, TokenName, Integer)]
-> [(Versioned MintingPolicy, MintsRedeemer, TokenName, Integer)]
forall a b. (a -> b) -> [a] -> [b]
map
- ( \(Pl.Versioned MintingPolicy
-policy Language
-version, MintsRedeemer
-redeemer, TokenName
-tName, Integer
-oldAmount) ->
- let ac :: AssetClass
-ac = CurrencySymbol -> TokenName -> AssetClass
+ ( \(Pl.Versioned MintingPolicy
+policy Language
+version, MintsRedeemer
+redeemer, TokenName
+tName, Integer
+oldAmount) ->
+ let ac :: AssetClass
+ac = CurrencySymbol -> TokenName -> AssetClass
Pl.assetClass (MintingPolicyHash -> CurrencySymbol
Pl.mpsSymbol (MintingPolicyHash -> CurrencySymbol)
-> MintingPolicyHash -> CurrencySymbol
forall a b. (a -> b) -> a -> b
$ MintingPolicy -> MintingPolicyHash
Pl.mintingPolicyHash MintingPolicy
-policy) TokenName
-tName
- newAmount :: Integer
-newAmount = AssetClass -> Integer -> Integer
-change AssetClass
-ac Integer
-oldAmount
+policy) TokenName
+tName
+ newAmount :: Integer
+newAmount = AssetClass -> Integer -> Integer
+change AssetClass
+ac Integer
+oldAmount
in (MintingPolicy -> Language -> Versioned MintingPolicy
forall script. script -> Language -> Versioned script
Pl.Versioned MintingPolicy
-policy Language
-version, MintsRedeemer
-redeemer, TokenName
-tName, Integer -> Integer -> Integer
+policy Language
+version, MintsRedeemer
+redeemer, TokenName
+tName, Integer -> Integer -> Integer
forall a. Ord a => a -> a -> a
max Integer
-newAmount Integer
-oldAmount)
+newAmount Integer
+oldAmount)
)
[(Versioned MintingPolicy, MintsRedeemer, TokenName, Integer)]
-oldMintsList
+oldMintsList
Bool -> m ()
forall (f :: * -> *). Alternative f => Bool -> f ()
guard (Bool -> m ()) -> Bool -> m ()
forall a b. (a -> b) -> a -> b
$ [(Versioned MintingPolicy, MintsRedeemer, TokenName, Integer)]
-newMintsList [(Versioned MintingPolicy, MintsRedeemer, TokenName, Integer)]
+newMintsList [(Versioned MintingPolicy, MintsRedeemer, TokenName, Integer)]
-> [(Versioned MintingPolicy, MintsRedeemer, TokenName, Integer)]
-> Bool
forall a. Eq a => a -> a -> Bool
/= [(Versioned MintingPolicy, MintsRedeemer, TokenName, Integer)]
-oldMintsList
- let newMints :: TxSkelMints
-newMints = [(Versioned MintingPolicy, MintsRedeemer, TokenName, Integer)]
+oldMintsList
+ let newMints :: TxSkelMints
+newMints = [(Versioned MintingPolicy, MintsRedeemer, TokenName, Integer)]
-> TxSkelMints
txSkelMintsFromList [(Versioned MintingPolicy, MintsRedeemer, TokenName, Integer)]
-newMintsList
- newValue :: Value
-newValue = TxSkelMints -> Value
+newMintsList
+ newValue :: Value
+newValue = TxSkelMints -> Value
txSkelMintsValue TxSkelMints
-newMints
- oldValue :: Value
-oldValue = TxSkelMints -> Value
+newMints
+ oldValue :: Value
+oldValue = TxSkelMints -> Value
txSkelMintsValue (TxSkelMints -> Value) -> TxSkelMints -> Value
forall a b. (a -> b) -> a -> b
$ [(Versioned MintingPolicy, MintsRedeemer, TokenName, Integer)]
-> TxSkelMints
txSkelMintsFromList [(Versioned MintingPolicy, MintsRedeemer, TokenName, Integer)]
-oldMintsList
+oldMintsList
Lens' TxSkel TxSkelMints -> TxSkelMints -> m ()
forall (m :: * -> *) k (is :: IxList) a.
(MonadTweak m, Is k A_Setter) =>
Optic' k is TxSkel a -> a -> m ()
setTweak Lens' TxSkel TxSkelMints
txSkelMintsL TxSkelMints
-newMints
+newMints
Value -> m Value
forall (m :: * -> *) a. Monad m => a -> m a
return (Value -> m Value) -> Value -> m Value
forall a b. (a -> b) -> a -> b
$ Value
-newValue Value -> Value -> Value
+newValue Value -> Value -> Value
forall a. Semigroup a => a -> a -> a
<> Value -> Value
forall a. AdditiveGroup a => a -> a
Pl.negate Value
-oldValue
+oldValue
data DupTokenLbl = DupTokenLbl
- deriving (DupTokenLbl -> DupTokenLbl -> Bool
+ deriving (DupTokenLbl -> DupTokenLbl -> Bool
(DupTokenLbl -> DupTokenLbl -> Bool)
-> (DupTokenLbl -> DupTokenLbl -> Bool) -> Eq DupTokenLbl
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
@@ -214,7 +214,7 @@
$c/= :: DupTokenLbl -> DupTokenLbl -> Bool
== :: DupTokenLbl -> DupTokenLbl -> Bool
$c== :: DupTokenLbl -> DupTokenLbl -> Bool
-Eq, Int -> DupTokenLbl -> ShowS
+Eq, Int -> DupTokenLbl -> ShowS
[DupTokenLbl] -> ShowS
DupTokenLbl -> String
(Int -> DupTokenLbl -> ShowS)
@@ -229,7 +229,7 @@
$cshow :: DupTokenLbl -> String
showsPrec :: Int -> DupTokenLbl -> ShowS
$cshowsPrec :: Int -> DupTokenLbl -> ShowS
-Show, Eq DupTokenLbl
+Show, Eq DupTokenLbl
Eq DupTokenLbl
-> (DupTokenLbl -> DupTokenLbl -> Ordering)
-> (DupTokenLbl -> DupTokenLbl -> Bool)
diff --git a/src/Cooked.Ltl.html b/src/Cooked.Ltl.html
index 4fbb2b6ba..d086827ee 100644
--- a/src/Cooked.Ltl.html
+++ b/src/Cooked.Ltl.html
@@ -29,33 +29,33 @@
-- apply modifications. Since it does not make (obvious) sense to talk of a
-- negated modification or of one modification (possibly in the future) to
-- imply another modification, implication and negation are absent.
-data Ltl a
+data Ltl a
= -- | The "do nothing" modification that never fails
LtlTruth
| -- | The modification that never applies (i.e. always fails)
LtlFalsity
| -- | The modification that applies a given atomic modification at the current time step
- LtlAtom a
+ LtlAtom a
| -- | Disjunction will be interpreted in an "intuitionistic" way, i.e. as
-- branching into the "timeline" where the left disjunct holds and the one
-- where the right disjunct holds. In that sense, it is an exclusive or,
-- as it does not introduce the branch where both disjuncts hold.
- LtlOr (Ltl a) (Ltl a)
+ LtlOr (Ltl a) (Ltl a)
| -- | Conjunction will be interpreted as "apply both
-- modifications". Attention: The "apply both" operation will be
-- user-defined for atomic modifications, so that conjunction may for
-- example fail to be commutative if the operation on atomic modification is
-- not commutative.
- LtlAnd (Ltl a) (Ltl a)
+ LtlAnd (Ltl a) (Ltl a)
| -- | Assert that the given formula holds at the next time step.
- LtlNext (Ltl a)
+ LtlNext (Ltl a)
| -- | Assert that the first formula holds at least until the second one begins
-- to hold, which must happen eventually. The formulas
-- > a `LtlUntil` b
-- and
-- > b `LtlOr` (a `LtlAnd` LtlNext (a `LtlUntil` b))
-- are equivalent.
- LtlUntil (Ltl a) (Ltl a)
+ LtlUntil (Ltl a) (Ltl a)
| -- | Assert that the second formula has to be true up to and including the
-- point when the first one becomes true; if that never happens, the second
-- formula has to remain true forever. View this as dual to 'LtlUntil'. The
@@ -64,8 +64,8 @@
-- and
-- > b `LtlAnd` (a `LtlOr` LtlNext (a `LtlRelease` b))
-- are equivalent.
- LtlRelease (Ltl a) (Ltl a)
- deriving (Int -> Ltl a -> ShowS
+ LtlRelease (Ltl a) (Ltl a)
+ deriving (Int -> Ltl a -> ShowS
[Ltl a] -> ShowS
Ltl a -> String
(Int -> Ltl a -> ShowS)
@@ -102,7 +102,7 @@
-- <> b@ as the modification that first applies @b@ and then @a@. Attention:
-- Since we use '<>' to define conjunction, if '<>' is not commutative,
-- conjunction will also fail to be commutative!
-nowLater :: Monoid a => Ltl a -> [(a, Ltl a)]
+nowLater :: Monoid a => Ltl a -> [(a, Ltl a)]
nowLater :: Ltl a -> [(a, Ltl a)]
nowLater Ltl a
LtlTruth = [(a
@@ -112,100 +112,100 @@
LtlTruth)]
nowLater Ltl a
LtlFalsity = []
-nowLater (LtlAtom a
-g) = [(a
-g, Ltl a
+nowLater (LtlAtom a
+g) = [(a
+g, Ltl a
forall a. Ltl a
LtlTruth)]
-nowLater (Ltl a
-a `LtlOr` Ltl a
-b) = Ltl a -> [(a, Ltl a)]
+nowLater (Ltl a
+a `LtlOr` Ltl a
+b) = Ltl a -> [(a, Ltl a)]
forall a. Monoid a => Ltl a -> [(a, Ltl a)]
nowLater Ltl a
-a [(a, Ltl a)] -> [(a, Ltl a)] -> [(a, Ltl a)]
+a [(a, Ltl a)] -> [(a, Ltl a)] -> [(a, Ltl a)]
forall a. [a] -> [a] -> [a]
++ Ltl a -> [(a, Ltl a)]
forall a. Monoid a => Ltl a -> [(a, Ltl a)]
nowLater Ltl a
-b
-nowLater (Ltl a
-a `LtlAnd` Ltl a
-b) =
+b
+nowLater (Ltl a
+a `LtlAnd` Ltl a
+b) =
[ (a
-f a -> a -> a
+f a -> a -> a
forall a. Semigroup a => a -> a -> a
<> a
-g, Ltl a -> Ltl a
+g, Ltl a -> Ltl a
forall a. Ltl a -> Ltl a
ltlSimpl (Ltl a -> Ltl a) -> Ltl a -> Ltl a
forall a b. (a -> b) -> a -> b
$ Ltl a
-c Ltl a -> Ltl a -> Ltl a
+c Ltl a -> Ltl a -> Ltl a
forall a. Ltl a -> Ltl a -> Ltl a
`LtlAnd` Ltl a
-d)
- | (a
-f, Ltl a
-c) <- Ltl a -> [(a, Ltl a)]
+d)
+ | (a
+f, Ltl a
+c) <- Ltl a -> [(a, Ltl a)]
forall a. Monoid a => Ltl a -> [(a, Ltl a)]
nowLater Ltl a
-a,
- (a
-g, Ltl a
-d) <- Ltl a -> [(a, Ltl a)]
+a,
+ (a
+g, Ltl a
+d) <- Ltl a -> [(a, Ltl a)]
forall a. Monoid a => Ltl a -> [(a, Ltl a)]
nowLater Ltl a
-b
+b
]
-nowLater (LtlNext Ltl a
-a) = [(a
+nowLater (LtlNext Ltl a
+a) = [(a
forall a. Monoid a => a
mempty, Ltl a
-a)]
-nowLater (Ltl a
-a `LtlUntil` Ltl a
-b) =
+a)]
+nowLater (Ltl a
+a `LtlUntil` Ltl a
+b) =
Ltl a -> [(a, Ltl a)]
forall a. Monoid a => Ltl a -> [(a, Ltl a)]
nowLater (Ltl a -> [(a, Ltl a)]) -> Ltl a -> [(a, Ltl a)]
forall a b. (a -> b) -> a -> b
$ Ltl a
-b Ltl a -> Ltl a -> Ltl a
+b Ltl a -> Ltl a -> Ltl a
forall a. Ltl a -> Ltl a -> Ltl a
`LtlOr` (Ltl a
-a Ltl a -> Ltl a -> Ltl a
+a Ltl a -> Ltl a -> Ltl a
forall a. Ltl a -> Ltl a -> Ltl a
`LtlAnd` Ltl a -> Ltl a
forall a. Ltl a -> Ltl a
LtlNext (Ltl a
-a Ltl a -> Ltl a -> Ltl a
+a Ltl a -> Ltl a -> Ltl a
forall a. Ltl a -> Ltl a -> Ltl a
`LtlUntil` Ltl a
-b))
-nowLater (Ltl a
-a `LtlRelease` Ltl a
-b) =
+b))
+nowLater (Ltl a
+a `LtlRelease` Ltl a
+b) =
Ltl a -> [(a, Ltl a)]
forall a. Monoid a => Ltl a -> [(a, Ltl a)]
nowLater (Ltl a -> [(a, Ltl a)]) -> Ltl a -> [(a, Ltl a)]
forall a b. (a -> b) -> a -> b
$ Ltl a
-b Ltl a -> Ltl a -> Ltl a
+b Ltl a -> Ltl a -> Ltl a
forall a. Ltl a -> Ltl a -> Ltl a
`LtlAnd` (Ltl a
-a Ltl a -> Ltl a -> Ltl a
+a Ltl a -> Ltl a -> Ltl a
forall a. Ltl a -> Ltl a -> Ltl a
`LtlOr` Ltl a -> Ltl a
forall a. Ltl a -> Ltl a
LtlNext (Ltl a
-a Ltl a -> Ltl a -> Ltl a
+a Ltl a -> Ltl a -> Ltl a
forall a. Ltl a -> Ltl a -> Ltl a
`LtlRelease` Ltl a
-b))
+b))
-- | If there are no more steps and the next step should satisfy the given
-- formula: Are we finished, i.e. was the initial formula satisfied by now?
-finished :: Ltl a -> Bool
+finished :: Ltl a -> Bool
finished :: Ltl a -> Bool
finished Ltl a
LtlTruth = Bool
@@ -216,26 +216,26 @@
finished (LtlAtom a
_) = Bool
False
-finished (Ltl a
-a `LtlAnd` Ltl a
-b) = Ltl a -> Bool
+finished (Ltl a
+a `LtlAnd` Ltl a
+b) = Ltl a -> Bool
forall a. Ltl a -> Bool
finished Ltl a
-a Bool -> Bool -> Bool
+a Bool -> Bool -> Bool
&& Ltl a -> Bool
forall a. Ltl a -> Bool
finished Ltl a
-b
-finished (Ltl a
-a `LtlOr` Ltl a
-b) = Ltl a -> Bool
+b
+finished (Ltl a
+a `LtlOr` Ltl a
+b) = Ltl a -> Bool
forall a. Ltl a -> Bool
finished Ltl a
-a Bool -> Bool -> Bool
+a Bool -> Bool -> Bool
|| Ltl a -> Bool
forall a. Ltl a -> Bool
finished Ltl a
-b
+b
finished (LtlNext Ltl a
_) = Bool
False
@@ -254,11 +254,11 @@
-- then the third and so on. We'd still like to compute a list of @(doNow,
-- doLater)@ pairs as in 'nowLater', only that the @doLater@ should again be a
-- list of formulas.
-nowLaterList :: Monoid a => [Ltl a] -> [(a, [Ltl a])]
+nowLaterList :: Monoid a => [Ltl a] -> [(a, [Ltl a])]
nowLaterList :: [Ltl a] -> [(a, [Ltl a])]
nowLaterList = [[(a, Ltl a)]] -> [(a, [Ltl a])]
forall a a. Monoid a => [[(a, a)]] -> [(a, [a])]
-joinNowLaters ([[(a, Ltl a)]] -> [(a, [Ltl a])])
+joinNowLaters ([[(a, Ltl a)]] -> [(a, [Ltl a])])
-> ([Ltl a] -> [[(a, Ltl a)]]) -> [Ltl a] -> [(a, [Ltl a])]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Ltl a -> [(a, Ltl a)]) -> [Ltl a] -> [[(a, Ltl a)]]
@@ -267,31 +267,31 @@
forall a. Monoid a => Ltl a -> [(a, Ltl a)]
nowLater
where
- joinNowLaters :: [[(a, a)]] -> [(a, [a])]
-joinNowLaters [] = [(a
+ joinNowLaters :: [[(a, a)]] -> [(a, [a])]
+joinNowLaters [] = [(a
forall a. Monoid a => a
mempty, [])]
- joinNowLaters ([(a, a)]
-l : [[(a, a)]]
-ls) =
+ joinNowLaters ([(a, a)]
+l : [[(a, a)]]
+ls) =
[ (a
-g a -> a -> a
+g a -> a -> a
forall a. Semigroup a => a -> a -> a
<> a
-f, a
-c a -> [a] -> [a]
+f, a
+c a -> [a] -> [a]
forall a. a -> [a] -> [a]
: [a]
-cs)
- | (a
-f, a
-c) <- [(a, a)]
-l,
- (a
-g, [a]
-cs) <- [[(a, a)]] -> [(a, [a])]
-joinNowLaters [[(a, a)]]
-ls
+cs)
+ | (a
+f, a
+c) <- [(a, a)]
+l,
+ (a
+g, [a]
+cs) <- [[(a, a)]] -> [(a, [a])]
+joinNowLaters [[(a, a)]]
+ls
]
-- | Straightforward simplification procedure for LTL formulas. This function
@@ -299,111 +299,111 @@
-- and recursively applies this knowledge; it does not do anything "fancy" like
-- computing a normal form and is only used to keep the formulas 'nowLater'
-- generates from growing too wildly.
-ltlSimpl :: Ltl a -> Ltl a
+ltlSimpl :: Ltl a -> Ltl a
ltlSimpl :: Ltl a -> Ltl a
-ltlSimpl Ltl a
-expr =
- let (Ltl a
-expr', Bool
-progress) = Ltl a -> (Ltl a, Bool)
+ltlSimpl Ltl a
+expr =
+ let (Ltl a
+expr', Bool
+progress) = Ltl a -> (Ltl a, Bool)
forall a. Ltl a -> (Ltl a, Bool)
-simpl Ltl a
-expr
+simpl Ltl a
+expr
in if Bool
-progress then Ltl a
-expr' else Ltl a
-expr
+progress then Ltl a
+expr' else Ltl a
+expr
where
- simpl :: Ltl a -> (Ltl a, Bool)
- simpl :: Ltl a -> (Ltl a, Bool)
-simpl (LtlAnd Ltl a
-a Ltl a
-b) = Ltl a -> Ltl a -> (Ltl a, Bool)
+ simpl :: Ltl a -> (Ltl a, Bool)
+ simpl :: Ltl a -> (Ltl a, Bool)
+simpl (LtlAnd Ltl a
+a Ltl a
+b) = Ltl a -> Ltl a -> (Ltl a, Bool)
forall a. Ltl a -> Ltl a -> (Ltl a, Bool)
-simplAnd Ltl a
-a Ltl a
-b
- simpl (LtlOr Ltl a
-a Ltl a
-b) = Ltl a -> Ltl a -> (Ltl a, Bool)
+simplAnd Ltl a
+a Ltl a
+b
+ simpl (LtlOr Ltl a
+a Ltl a
+b) = Ltl a -> Ltl a -> (Ltl a, Bool)
forall a. Ltl a -> Ltl a -> (Ltl a, Bool)
-simplOr Ltl a
-a Ltl a
-b
- simpl (LtlNext Ltl a
-a) =
- let (Ltl a
-a', Bool
-pa) = Ltl a -> (Ltl a, Bool)
+simplOr Ltl a
+a Ltl a
+b
+ simpl (LtlNext Ltl a
+a) =
+ let (Ltl a
+a', Bool
+pa) = Ltl a -> (Ltl a, Bool)
forall a. Ltl a -> (Ltl a, Bool)
-simpl Ltl a
-a
+simpl Ltl a
+a
in if Bool
-pa
+pa
then (Ltl a -> Ltl a
forall a. Ltl a -> Ltl a
LtlNext Ltl a
-a', Bool
+a', Bool
True)
else (Ltl a -> Ltl a
forall a. Ltl a -> Ltl a
LtlNext Ltl a
-a, Bool
+a, Bool
False)
- simpl (LtlUntil Ltl a
-a Ltl a
-b) = (Ltl a -> Ltl a -> Ltl a) -> Ltl a -> Ltl a -> (Ltl a, Bool)
+ simpl (LtlUntil Ltl a
+a Ltl a
+b) = (Ltl a -> Ltl a -> Ltl a) -> Ltl a -> Ltl a -> (Ltl a, Bool)
forall a.
(Ltl a -> Ltl a -> Ltl a) -> Ltl a -> Ltl a -> (Ltl a, Bool)
-recurse2 Ltl a -> Ltl a -> Ltl a
+recurse2 Ltl a -> Ltl a -> Ltl a
forall a. Ltl a -> Ltl a -> Ltl a
LtlUntil Ltl a
-a Ltl a
-b
- simpl (LtlRelease Ltl a
-a Ltl a
-b) = (Ltl a -> Ltl a -> Ltl a) -> Ltl a -> Ltl a -> (Ltl a, Bool)
+a Ltl a
+b
+ simpl (LtlRelease Ltl a
+a Ltl a
+b) = (Ltl a -> Ltl a -> Ltl a) -> Ltl a -> Ltl a -> (Ltl a, Bool)
forall a.
(Ltl a -> Ltl a -> Ltl a) -> Ltl a -> Ltl a -> (Ltl a, Bool)
-recurse2 Ltl a -> Ltl a -> Ltl a
+recurse2 Ltl a -> Ltl a -> Ltl a
forall a. Ltl a -> Ltl a -> Ltl a
LtlRelease Ltl a
-a Ltl a
-b
- simpl Ltl a
-x = (Ltl a
-x, Bool
+a Ltl a
+b
+ simpl Ltl a
+x = (Ltl a
+x, Bool
False)
- simplAnd :: Ltl a -> Ltl a -> (Ltl a, Bool)
- simplAnd :: Ltl a -> Ltl a -> (Ltl a, Bool)
-simplAnd Ltl a
-a Ltl a
-b =
- let (Ltl a
-a', Bool
-pa) = Ltl a -> (Ltl a, Bool)
+ simplAnd :: Ltl a -> Ltl a -> (Ltl a, Bool)
+ simplAnd :: Ltl a -> Ltl a -> (Ltl a, Bool)
+simplAnd Ltl a
+a Ltl a
+b =
+ let (Ltl a
+a', Bool
+pa) = Ltl a -> (Ltl a, Bool)
forall a. Ltl a -> (Ltl a, Bool)
-simpl Ltl a
-a
- (Ltl a
-b', Bool
-pb) = Ltl a -> (Ltl a, Bool)
+simpl Ltl a
+a
+ (Ltl a
+b', Bool
+pb) = Ltl a -> (Ltl a, Bool)
forall a. Ltl a -> (Ltl a, Bool)
-simpl Ltl a
-b
+simpl Ltl a
+b
in case (Ltl a
-a', Ltl a
-b') of
+a', Ltl a
+b') of
(Ltl a
LtlTruth, Ltl a
_) -> (Ltl a
-b', Bool
+b', Bool
True)
(Ltl a
_, Ltl a
LtlTruth) -> (Ltl a
-a', Bool
+a', Bool
True)
(Ltl a
LtlFalsity, Ltl a
@@ -419,40 +419,40 @@
True)
(Ltl a, Ltl a)
_ -> if Bool
-pa Bool -> Bool -> Bool
+pa Bool -> Bool -> Bool
|| Bool
-pb then (Ltl a -> Ltl a -> Ltl a
+pb then (Ltl a -> Ltl a -> Ltl a
forall a. Ltl a -> Ltl a -> Ltl a
LtlAnd Ltl a
-a' Ltl a
-b', Bool
+a' Ltl a
+b', Bool
True) else (Ltl a -> Ltl a -> Ltl a
forall a. Ltl a -> Ltl a -> Ltl a
LtlAnd Ltl a
-a Ltl a
-b, Bool
+a Ltl a
+b, Bool
False)
- simplOr :: Ltl a -> Ltl a -> (Ltl a, Bool)
- simplOr :: Ltl a -> Ltl a -> (Ltl a, Bool)
-simplOr Ltl a
-a Ltl a
-b =
- let (Ltl a
-a', Bool
-pa) = Ltl a -> (Ltl a, Bool)
+ simplOr :: Ltl a -> Ltl a -> (Ltl a, Bool)
+ simplOr :: Ltl a -> Ltl a -> (Ltl a, Bool)
+simplOr Ltl a
+a Ltl a
+b =
+ let (Ltl a
+a', Bool
+pa) = Ltl a -> (Ltl a, Bool)
forall a. Ltl a -> (Ltl a, Bool)
-simpl Ltl a
-a
- (Ltl a
-b', Bool
-pb) = Ltl a -> (Ltl a, Bool)
+simpl Ltl a
+a
+ (Ltl a
+b', Bool
+pb) = Ltl a -> (Ltl a, Bool)
forall a. Ltl a -> (Ltl a, Bool)
-simpl Ltl a
-b
+simpl Ltl a
+b
in case (Ltl a
-a', Ltl a
-b') of
+a', Ltl a
+b') of
(Ltl a
LtlTruth, Ltl a
_) -> (Ltl a
@@ -468,64 +468,64 @@
(Ltl a
LtlFalsity, Ltl a
_) -> (Ltl a
-b', Bool
+b', Bool
True)
(Ltl a
_, Ltl a
LtlFalsity) -> (Ltl a
-a', Bool
+a', Bool
True)
(Ltl a, Ltl a)
_ -> if Bool
-pa Bool -> Bool -> Bool
+pa Bool -> Bool -> Bool
|| Bool
-pb then (Ltl a -> Ltl a -> Ltl a
+pb then (Ltl a -> Ltl a -> Ltl a
forall a. Ltl a -> Ltl a -> Ltl a
LtlOr Ltl a
-a' Ltl a
-b', Bool
+a' Ltl a
+b', Bool
True) else (Ltl a -> Ltl a -> Ltl a
forall a. Ltl a -> Ltl a -> Ltl a
LtlOr Ltl a
-a Ltl a
-b, Bool
+a Ltl a
+b, Bool
False)
- recurse2 ::
- (Ltl a -> Ltl a -> Ltl a) ->
- Ltl a ->
- Ltl a ->
- (Ltl a, Bool)
- recurse2 :: (Ltl a -> Ltl a -> Ltl a) -> Ltl a -> Ltl a -> (Ltl a, Bool)
-recurse2 Ltl a -> Ltl a -> Ltl a
-f Ltl a
-a Ltl a
-b =
- let (Ltl a
-a', Bool
-pa) = Ltl a -> (Ltl a, Bool)
+ recurse2 ::
+ (Ltl a -> Ltl a -> Ltl a) ->
+ Ltl a ->
+ Ltl a ->
+ (Ltl a, Bool)
+ recurse2 :: (Ltl a -> Ltl a -> Ltl a) -> Ltl a -> Ltl a -> (Ltl a, Bool)
+recurse2 Ltl a -> Ltl a -> Ltl a
+f Ltl a
+a Ltl a
+b =
+ let (Ltl a
+a', Bool
+pa) = Ltl a -> (Ltl a, Bool)
forall a. Ltl a -> (Ltl a, Bool)
-simpl Ltl a
-a
- (Ltl a
-b', Bool
-pb) = Ltl a -> (Ltl a, Bool)
+simpl Ltl a
+a
+ (Ltl a
+b', Bool
+pb) = Ltl a -> (Ltl a, Bool)
forall a. Ltl a -> (Ltl a, Bool)
-simpl Ltl a
-b
+simpl Ltl a
+b
in if Bool
-pa Bool -> Bool -> Bool
+pa Bool -> Bool -> Bool
|| Bool
-pb
+pb
then (Ltl a -> Ltl a -> Ltl a
-f Ltl a
-a' Ltl a
-b', Bool
+f Ltl a
+a' Ltl a
+b', Bool
True)
else (Ltl a -> Ltl a -> Ltl a
-f Ltl a
-a Ltl a
-b, Bool
+f Ltl a
+a Ltl a
+b, Bool
False)
-- * An AST for "reified computations"
@@ -539,81 +539,81 @@
-- * every step can be modified by a @modification@.
-- | Operations for computations that can be modified using LTL formulas.
-data LtlOp (modification :: *) (builtin :: * -> *) :: * -> * where
+data LtlOp (modification :: *) (builtin :: * -> *) :: * -> * where
-- | The operation that introduces a new LTL formula that should be used to
-- modify the following computations. Think of this operation as coming
-- between time steps and adding a new formula to be applied before all of the
-- formulas that should already be applied to the next time step.
- StartLtl :: Ltl modification -> LtlOp modification builtin ()
+ StartLtl :: Ltl modification -> LtlOp modification builtin ()
-- | The operation that removes the last LTL formula that was introduced. If
-- the formula is not yet 'finished', the current time line will fail.
- StopLtl :: LtlOp modification builtin ()
- Builtin :: builtin a -> LtlOp modification builtin a
+ StopLtl :: LtlOp modification builtin ()
+ Builtin :: builtin a -> LtlOp modification builtin a
-- | The freer monad on @op@. We think of this as the AST of a computation with
-- operations of types @op a@.
-data Staged (op :: * -> *) :: * -> * where
- Return :: a -> Staged op a
- Instr :: op a -> (a -> Staged op b) -> Staged op b
+data Staged (op :: * -> *) :: * -> * where
+ Return :: a -> Staged op a
+ Instr :: op a -> (a -> Staged op b) -> Staged op b
-instance Functor (Staged op) where
- fmap :: (a -> b) -> Staged op a -> Staged op b
-fmap a -> b
-f (Return a
-x) = b -> Staged op b
+instance Functor (Staged op) where
+ fmap :: (a -> b) -> Staged op a -> Staged op b
+fmap a -> b
+f (Return a
+x) = b -> Staged op b
forall a (op :: * -> *). a -> Staged op a
Return (b -> Staged op b) -> b -> Staged op b
forall a b. (a -> b) -> a -> b
$ a -> b
-f a
-x
- fmap a -> b
-f (Instr op a
-op a -> Staged op a
-cont) = op a -> (a -> Staged op b) -> Staged op b
+f a
+x
+ fmap a -> b
+f (Instr op a
+op a -> Staged op a
+cont) = op a -> (a -> Staged op b) -> Staged op b
forall (op :: * -> *) a b.
op a -> (a -> Staged op b) -> Staged op b
Instr op a
-op ((a -> b) -> Staged op a -> Staged op b
+op ((a -> b) -> Staged op a -> Staged op b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap a -> b
-f (Staged op a -> Staged op b)
+f (Staged op a -> Staged op b)
-> (a -> Staged op a) -> a -> Staged op b
forall b c a. (b -> c) -> (a -> b) -> a -> c
. a -> Staged op a
-cont)
+cont)
-instance Applicative (Staged op) where
- pure :: a -> Staged op a
+instance Applicative (Staged op) where
+ pure :: a -> Staged op a
pure = a -> Staged op a
forall a (op :: * -> *). a -> Staged op a
Return
- <*> :: Staged op (a -> b) -> Staged op a -> Staged op b
+ <*> :: Staged op (a -> b) -> Staged op a -> Staged op b
(<*>) = Staged op (a -> b) -> Staged op a -> Staged op b
forall (m :: * -> *) a b. Monad m => m (a -> b) -> m a -> m b
ap
-instance Monad (Staged op) where
- (Return a
-x) >>= :: Staged op a -> (a -> Staged op b) -> Staged op b
->>= a -> Staged op b
-f = a -> Staged op b
-f a
-x
- (Instr op a
-i a -> Staged op a
-m) >>= a -> Staged op b
-f = op a -> (a -> Staged op b) -> Staged op b
+instance Monad (Staged op) where
+ (Return a
+x) >>= :: Staged op a -> (a -> Staged op b) -> Staged op b
+>>= a -> Staged op b
+f = a -> Staged op b
+f a
+x
+ (Instr op a
+i a -> Staged op a
+m) >>= a -> Staged op b
+f = op a -> (a -> Staged op b) -> Staged op b
forall (op :: * -> *) a b.
op a -> (a -> Staged op b) -> Staged op b
Instr op a
-i (a -> Staged op a
-m (a -> Staged op a) -> (a -> Staged op b) -> a -> Staged op b
+i (a -> Staged op a
+m (a -> Staged op a) -> (a -> Staged op b) -> a -> Staged op b
forall (m :: * -> *) a b c.
Monad m =>
(a -> m b) -> (b -> m c) -> a -> m c
>=> a -> Staged op b
-f)
+f)
-- * Interpreting the AST
@@ -640,25 +640,25 @@
-- (But to write this, @modification@ has to be a 'Monoid' to make
-- 'nowLaterList' work!) Look at the tests for this module and at
-- "Cooked.MockChain.Monad.Staged" for examples of how to use this type class.
-class MonadPlus m => InterpLtl modification builtin m where
- interpBuiltin :: builtin a -> StateT [Ltl modification] m a
+class MonadPlus m => InterpLtl modification builtin m where
+ interpBuiltin :: builtin a -> StateT [Ltl modification] m a
-- | Interpret a 'Staged' computation into a suitable domain, using the function
-- 'interpBuiltin' to interpret the builtins.
-interpLtl ::
- (InterpLtl modification builtin m) =>
- Staged (LtlOp modification builtin) a ->
- StateT [Ltl modification] m a
+interpLtl ::
+ (InterpLtl modification builtin m) =>
+ Staged (LtlOp modification builtin) a ->
+ StateT [Ltl modification] m a
interpLtl :: Staged (LtlOp modification builtin) a
-> StateT [Ltl modification] m a
-interpLtl (Return a
-a) = a -> StateT [Ltl modification] m a
+interpLtl (Return a
+a) = a -> StateT [Ltl modification] m a
forall (m :: * -> *) a. Monad m => a -> m a
return a
-a
-interpLtl (Instr (StartLtl Ltl modification
-x) a -> Staged (LtlOp modification builtin) a
-f) = StateT [Ltl modification] m [Ltl modification]
+a
+interpLtl (Instr (StartLtl Ltl modification
+x) a -> Staged (LtlOp modification builtin) a
+f) = StateT [Ltl modification] m [Ltl modification]
forall s (m :: * -> *). MonadState s m => m s
get StateT [Ltl modification] m [Ltl modification]
-> ([Ltl modification] -> StateT [Ltl modification] m ())
@@ -672,7 +672,7 @@
-> StateT [Ltl modification] m ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Ltl modification
-x Ltl modification -> [Ltl modification] -> [Ltl modification]
+x Ltl modification -> [Ltl modification] -> [Ltl modification]
forall a. a -> [a] -> [a]
:) StateT [Ltl modification] m ()
-> (() -> StateT [Ltl modification] m a)
@@ -691,32 +691,32 @@
-> StateT [Ltl modification] m a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. a -> Staged (LtlOp modification builtin) a
-f
+f
interpLtl (Instr LtlOp modification builtin a
-StopLtl a -> Staged (LtlOp modification builtin) a
-f) = do
- [Ltl modification]
-xs <- StateT [Ltl modification] m [Ltl modification]
+StopLtl a -> Staged (LtlOp modification builtin) a
+f) = do
+ [Ltl modification]
+xs <- StateT [Ltl modification] m [Ltl modification]
forall s (m :: * -> *). MonadState s m => m s
get
case [Ltl modification]
-xs of
+xs of
[] -> String -> StateT [Ltl modification] m a
forall a. HasCallStack => String -> a
error String
"You called 'StopLtl' before 'StartLtl'. This is only possible if you're using internals."
- Ltl modification
-x : [Ltl modification]
-rest ->
+ Ltl modification
+x : [Ltl modification]
+rest ->
if Ltl modification -> Bool
forall a. Ltl a -> Bool
finished Ltl modification
-x
+x
then do
[Ltl modification] -> StateT [Ltl modification] m ()
forall s (m :: * -> *). MonadState s m => s -> m ()
put [Ltl modification]
-rest
+rest
Staged (LtlOp modification builtin) a
-> StateT [Ltl modification] m a
forall modification (builtin :: * -> *) (m :: * -> *) a.
@@ -729,18 +729,18 @@
-> StateT [Ltl modification] m a
forall a b. (a -> b) -> a -> b
$ a -> Staged (LtlOp modification builtin) a
-f ()
+f ()
else StateT [Ltl modification] m a
forall (m :: * -> *) a. MonadPlus m => m a
mzero
-interpLtl (Instr (Builtin builtin a
-b) a -> Staged (LtlOp modification builtin) a
-f) = builtin a -> StateT [Ltl modification] m a
+interpLtl (Instr (Builtin builtin a
+b) a -> Staged (LtlOp modification builtin) a
+f) = builtin a -> StateT [Ltl modification] m a
forall modification (builtin :: * -> *) (m :: * -> *) a.
InterpLtl modification builtin m =>
builtin a -> StateT [Ltl modification] m a
interpBuiltin builtin a
-b StateT [Ltl modification] m a
+b StateT [Ltl modification] m a
-> (a -> StateT [Ltl modification] m a)
-> StateT [Ltl modification] m a
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
@@ -757,32 +757,32 @@
-> StateT [Ltl modification] m a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. a -> Staged (LtlOp modification builtin) a
-f
+f
-- | Interpret a 'Staged' computation into a suitable domain, using the function
-- 'interpBuiltin' to interpret the builtins. At the end of the computation,
-- prune branches that still have un'finished' modifications applied to
-- them. See the discussion on the regression test case for PRs 110 and 131 in
-- 'StagedSpec.hs' for a discussion on why this function has to exist.
-interpLtlAndPruneUnfinished ::
- (InterpLtl modification builtin m) =>
- Staged (LtlOp modification builtin) a ->
- StateT [Ltl modification] m a
+interpLtlAndPruneUnfinished ::
+ (InterpLtl modification builtin m) =>
+ Staged (LtlOp modification builtin) a ->
+ StateT [Ltl modification] m a
interpLtlAndPruneUnfinished :: Staged (LtlOp modification builtin) a
-> StateT [Ltl modification] m a
-interpLtlAndPruneUnfinished Staged (LtlOp modification builtin) a
-f = do
- a
-res <- Staged (LtlOp modification builtin) a
+interpLtlAndPruneUnfinished Staged (LtlOp modification builtin) a
+f = do
+ a
+res <- Staged (LtlOp modification builtin) a
-> StateT [Ltl modification] m a
forall modification (builtin :: * -> *) (m :: * -> *) a.
InterpLtl modification builtin m =>
Staged (LtlOp modification builtin) a
-> StateT [Ltl modification] m a
interpLtl Staged (LtlOp modification builtin) a
-f
- [Ltl modification]
-mods <- StateT [Ltl modification] m [Ltl modification]
+f
+ [Ltl modification]
+mods <- StateT [Ltl modification] m [Ltl modification]
forall s (m :: * -> *). MonadState s m => m s
get
if (Ltl modification -> Bool) -> [Ltl modification] -> Bool
@@ -790,10 +790,10 @@
all Ltl modification -> Bool
forall a. Ltl a -> Bool
finished [Ltl modification]
-mods then a -> StateT [Ltl modification] m a
+mods then a -> StateT [Ltl modification] m a
forall (m :: * -> *) a. Monad m => a -> m a
return a
-res else StateT [Ltl modification] m a
+res else StateT [Ltl modification] m a
forall (m :: * -> *) a. MonadPlus m => m a
mzero
@@ -806,18 +806,18 @@
-- LTL modifications beside the method above.
-- | Monads that allow modificaitons with LTL formulas.
-class Monad m => MonadModal m where
- type Modification m :: Type
- modifyLtl :: Ltl (Modification m) -> m a -> m a
+class Monad m => MonadModal m where
+ type Modification m :: Type
+ modifyLtl :: Ltl (Modification m) -> m a -> m a
-instance MonadModal (Staged (LtlOp modification builtin)) where
- type Modification (Staged (LtlOp modification builtin)) = modification
- modifyLtl :: Ltl (Modification (Staged (LtlOp modification builtin)))
+instance MonadModal (Staged (LtlOp modification builtin)) where
+ type Modification (Staged (LtlOp modification builtin)) = modification
+ modifyLtl :: Ltl (Modification (Staged (LtlOp modification builtin)))
-> Staged (LtlOp modification builtin) a
-> Staged (LtlOp modification builtin) a
-modifyLtl Ltl (Modification (Staged (LtlOp modification builtin)))
-x Staged (LtlOp modification builtin) a
-tr = LtlOp modification builtin ()
+modifyLtl Ltl (Modification (Staged (LtlOp modification builtin)))
+x Staged (LtlOp modification builtin) a
+tr = LtlOp modification builtin ()
-> (() -> Staged (LtlOp modification builtin) ())
-> Staged (LtlOp modification builtin) ()
forall (op :: * -> *) a b.
@@ -827,19 +827,19 @@
Ltl modification -> LtlOp modification builtin ()
StartLtl Ltl modification
Ltl (Modification (Staged (LtlOp modification builtin)))
-x) () -> Staged (LtlOp modification builtin) ()
+x) () -> Staged (LtlOp modification builtin) ()
forall a (op :: * -> *). a -> Staged op a
Return Staged (LtlOp modification builtin) ()
-> Staged (LtlOp modification builtin) a
-> Staged (LtlOp modification builtin) a
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Staged (LtlOp modification builtin) a
-tr Staged (LtlOp modification builtin) a
+tr Staged (LtlOp modification builtin) a
-> (a -> Staged (LtlOp modification builtin) a)
-> Staged (LtlOp modification builtin) a
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
->>= \a
-res -> LtlOp modification builtin ()
+>>= \a
+res -> LtlOp modification builtin ()
-> (() -> Staged (LtlOp modification builtin) ())
-> Staged (LtlOp modification builtin) ()
forall (op :: * -> *) a b.
@@ -856,5 +856,5 @@
>> a -> Staged (LtlOp modification builtin) a
forall (m :: * -> *) a. Monad m => a -> m a
return a
-res
+res
\ No newline at end of file
diff --git a/src/Cooked.MockChain.Balancing.html b/src/Cooked.MockChain.Balancing.html
index a51196c61..608e27d13 100644
--- a/src/Cooked.MockChain.Balancing.html
+++ b/src/Cooked.MockChain.Balancing.html
@@ -42,12 +42,12 @@
import qualified Plutus.V2.Ledger.Api as PV2
import qualified PlutusTx.Numeric as Pl
-balancedTxSkel :: MonadBlockChainBalancing m => TxSkel -> m (TxSkel, Fee, Set PV2.TxOutRef)
+balancedTxSkel :: MonadBlockChainBalancing m => TxSkel -> m (TxSkel, Fee, Set PV2.TxOutRef)
balancedTxSkel :: TxSkel -> m (TxSkel, Fee, Set TxOutRef)
-balancedTxSkel TxSkel
-skelUnbal = do
- let balancingWallet :: Wallet
-balancingWallet =
+balancedTxSkel TxSkel
+skelUnbal = do
+ let balancingWallet :: Wallet
+balancingWallet =
case TxOpts -> BalancingWallet
txOptBalanceWallet (TxOpts -> BalancingWallet)
-> (TxSkel -> TxOpts) -> TxSkel -> BalancingWallet
@@ -56,28 +56,28 @@
txSkelOpts (TxSkel -> BalancingWallet) -> TxSkel -> BalancingWallet
forall a b. (a -> b) -> a -> b
$ TxSkel
-skelUnbal of
+skelUnbal of
BalancingWallet
BalanceWithFirstSigner -> case TxSkel -> [Wallet]
txSkelSigners TxSkel
-skelUnbal of
+skelUnbal of
[] -> [Char] -> Wallet
forall a. HasCallStack => [Char] -> a
error [Char]
"Can't select balancing wallet: There has to be at least one wallet in txSkelSigners"
- Wallet
-bw : [Wallet]
+ Wallet
+bw : [Wallet]
_ -> Wallet
-bw
- BalanceWith Wallet
-bWallet -> Wallet
-bWallet
- let collateralWallet :: Wallet
-collateralWallet = Wallet
-balancingWallet
- (TxSkel
-skel, Fee
-fee) <-
+bw
+ BalanceWith Wallet
+bWallet -> Wallet
+bWallet
+ let collateralWallet :: Wallet
+collateralWallet = Wallet
+balancingWallet
+ (TxSkel
+skel, Fee
+fee) <-
if TxOpts -> Bool
txOptBalance (TxOpts -> Bool) -> (TxSkel -> TxOpts) -> TxSkel -> Bool
forall b c a. (b -> c) -> (a -> b) -> a -> c
@@ -85,7 +85,7 @@
txSkelOpts (TxSkel -> Bool) -> TxSkel -> Bool
forall a b. (a -> b) -> a -> b
$ TxSkel
-skelUnbal
+skelUnbal
then
Wallet -> TxSkel -> m (TxSkel, Fee)
forall (m :: * -> *).
@@ -93,39 +93,39 @@
Wallet -> TxSkel -> m (TxSkel, Fee)
setFeeAndBalance
Wallet
-balancingWallet
+balancingWallet
TxSkel
-skelUnbal
+skelUnbal
else (TxSkel, Fee) -> m (TxSkel, Fee)
forall (m :: * -> *) a. Monad m => a -> m a
return (TxSkel
-skelUnbal, Integer -> Fee
+skelUnbal, Integer -> Fee
Fee Integer
0)
- Set TxOutRef
-collateralInputs <- Wallet -> m (Set TxOutRef)
+ Set TxOutRef
+collateralInputs <- Wallet -> m (Set TxOutRef)
forall (m :: * -> *).
MonadBlockChainBalancing m =>
Wallet -> m (Set TxOutRef)
calcCollateral Wallet
-collateralWallet -- TODO: Why is it OK to balance first and then add collateral?
+collateralWallet -- TODO: Why is it OK to balance first and then add collateral?
(TxSkel, Fee, Set TxOutRef) -> m (TxSkel, Fee, Set TxOutRef)
forall (m :: * -> *) a. Monad m => a -> m a
return (TxSkel
-skel, Fee
-fee, Set TxOutRef
-collateralInputs)
+skel, Fee
+fee, Set TxOutRef
+collateralInputs)
-- | Take the output of 'balancedTxSkel' and turn it into an actual Cardano
-- transaction.
-balancedTx :: MonadBlockChainBalancing m => (TxSkel, Fee, Set PV2.TxOutRef) -> m (C.Tx C.BabbageEra)
+balancedTx :: MonadBlockChainBalancing m => (TxSkel, Fee, Set PV2.TxOutRef) -> m (C.Tx C.BabbageEra)
balancedTx :: (TxSkel, Fee, Set TxOutRef) -> m (Tx BabbageEra)
-balancedTx (TxSkel
-skel, Fee
-fee, Set TxOutRef
-collateralInputs) = do
- Params
-params <- Maybe EmulatorParamsModification -> Params -> Params
+balancedTx (TxSkel
+skel, Fee
+fee, Set TxOutRef
+collateralInputs) = do
+ Params
+params <- Maybe EmulatorParamsModification -> Params -> Params
applyEmulatorParamsModification (TxOpts -> Maybe EmulatorParamsModification
txOptEmulatorParamsModification (TxOpts -> Maybe EmulatorParamsModification)
-> (TxSkel -> TxOpts) -> TxSkel -> Maybe EmulatorParamsModification
@@ -135,36 +135,36 @@
-> TxSkel -> Maybe EmulatorParamsModification
forall a b. (a -> b) -> a -> b
$ TxSkel
-skel) (Params -> Params) -> m Params -> m Params
+skel) (Params -> Params) -> m Params -> m Params
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> m Params
forall (m :: * -> *). MonadBlockChainBalancing m => m Params
getParams
- Map DatumHash Datum
-consumedData <- TxSkel -> m (Map DatumHash Datum)
+ Map DatumHash Datum
+consumedData <- TxSkel -> m (Map DatumHash Datum)
forall (m :: * -> *).
MonadBlockChainBalancing m =>
TxSkel -> m (Map DatumHash Datum)
txSkelInputData TxSkel
-skel
- Map TxOutRef TxOut
-consumedOrReferencedTxOuts <- do
- Map TxOutRef TxOut
-ins <- TxSkel -> m (Map TxOutRef TxOut)
+skel
+ Map TxOutRef TxOut
+consumedOrReferencedTxOuts <- do
+ Map TxOutRef TxOut
+ins <- TxSkel -> m (Map TxOutRef TxOut)
forall (m :: * -> *).
MonadBlockChainBalancing m =>
TxSkel -> m (Map TxOutRef TxOut)
txSkelInputUtxosPV2 TxSkel
-skel
- Map TxOutRef TxOut
-insRef <- TxSkel -> m (Map TxOutRef TxOut)
+skel
+ Map TxOutRef TxOut
+insRef <- TxSkel -> m (Map TxOutRef TxOut)
forall (m :: * -> *).
MonadBlockChainBalancing m =>
TxSkel -> m (Map TxOutRef TxOut)
txSkelReferenceInputUtxosPV2 TxSkel
-skel
- Map TxOutRef TxOut
-insCollateral <-
+skel
+ Map TxOutRef TxOut
+insCollateral <-
[(TxOutRef, TxOut)] -> Map TxOutRef TxOut
forall k a. Ord k => [(k, a)] -> Map k a
Map.fromList
@@ -177,17 +177,17 @@
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM
- ( \TxOutRef
-oref -> do
- Maybe TxOut
-mTxOut <- TxOutRef -> m (Maybe TxOut)
+ ( \TxOutRef
+oref -> do
+ Maybe TxOut
+mTxOut <- TxOutRef -> m (Maybe TxOut)
forall (m :: * -> *).
MonadBlockChainBalancing m =>
TxOutRef -> m (Maybe TxOut)
txOutByRef TxOutRef
-oref
+oref
case Maybe TxOut
-mTxOut of
+mTxOut of
Maybe TxOut
Nothing -> MockChainError -> m (TxOutRef, TxOut)
forall e (m :: * -> *) a. MonadError e m => e -> m a
@@ -198,37 +198,37 @@
forall err. (Show err, Eq err) => err -> MockChainError
OtherMockChainError [Char]
"unkown collateral input TxOutRef"
- Just TxOut
-txOut -> (TxOutRef, TxOut) -> m (TxOutRef, TxOut)
+ Just TxOut
+txOut -> (TxOutRef, TxOut) -> m (TxOutRef, TxOut)
forall (m :: * -> *) a. Monad m => a -> m a
return (TxOutRef
-oref, TxOut
-txOut)
+oref, TxOut
+txOut)
)
(Set TxOutRef -> [TxOutRef]
forall a. Set a -> [a]
Set.toList Set TxOutRef
-collateralInputs)
+collateralInputs)
Map TxOutRef TxOut -> m (Map TxOutRef TxOut)
forall (m :: * -> *) a. Monad m => a -> m a
return (Map TxOutRef TxOut -> m (Map TxOutRef TxOut))
-> Map TxOutRef TxOut -> m (Map TxOutRef TxOut)
forall a b. (a -> b) -> a -> b
$ Map TxOutRef TxOut
-ins Map TxOutRef TxOut -> Map TxOutRef TxOut -> Map TxOutRef TxOut
+ins Map TxOutRef TxOut -> Map TxOutRef TxOut -> Map TxOutRef TxOut
forall a. Semigroup a => a -> a -> a
<> Map TxOutRef TxOut
-insRef Map TxOutRef TxOut -> Map TxOutRef TxOut -> Map TxOutRef TxOut
+insRef Map TxOutRef TxOut -> Map TxOutRef TxOut -> Map TxOutRef TxOut
forall a. Semigroup a => a -> a -> a
<> Map TxOutRef TxOut
-insCollateral
- Map ValidatorHash (Versioned Validator)
-consumedValidators <- TxSkel -> m (Map ValidatorHash (Versioned Validator))
+insCollateral
+ Map ValidatorHash (Versioned Validator)
+consumedValidators <- TxSkel -> m (Map ValidatorHash (Versioned Validator))
forall (m :: * -> *).
MonadBlockChainBalancing m =>
TxSkel -> m (Map ValidatorHash (Versioned Validator))
txSkelInputValidators TxSkel
-skel
+skel
case GenTxParams
-> Params
-> Map DatumHash Datum
@@ -240,16 +240,16 @@
forall a. Default a => a
def {gtpCollateralIns :: Set TxOutRef
gtpCollateralIns = Set TxOutRef
-collateralInputs, gtpFee :: Fee
+collateralInputs, gtpFee :: Fee
gtpFee = Fee
-fee} Params
-params Map DatumHash Datum
-consumedData Map TxOutRef TxOut
-consumedOrReferencedTxOuts Map ValidatorHash (Versioned Validator)
-consumedValidators TxSkel
-skel of
- Left GenerateTxError
-err -> MockChainError -> m (Tx BabbageEra)
+fee} Params
+params Map DatumHash Datum
+consumedData Map TxOutRef TxOut
+consumedOrReferencedTxOuts Map ValidatorHash (Versioned Validator)
+consumedValidators TxSkel
+skel of
+ Left GenerateTxError
+err -> MockChainError -> m (Tx BabbageEra)
forall e (m :: * -> *) a. MonadError e m => e -> m a
throwError (MockChainError -> m (Tx BabbageEra))
-> (GenerateTxError -> MockChainError)
@@ -261,22 +261,22 @@
-> GenerateTxError -> m (Tx BabbageEra)
forall a b. (a -> b) -> a -> b
$ GenerateTxError
-err
- Right Tx BabbageEra
-tx -> Tx BabbageEra -> m (Tx BabbageEra)
+err
+ Right Tx BabbageEra
+tx -> Tx BabbageEra -> m (Tx BabbageEra)
forall (m :: * -> *) a. Monad m => a -> m a
return Tx BabbageEra
-tx
+tx
-- | Ensure that the transaction outputs have the necessary minimum amount of
-- Ada on them. This will only be applied if the 'txOptEnsureMinAda' is set to
-- @True@.
-ensureTxSkelOutsMinAda :: MonadBlockChainBalancing m => TxSkel -> m TxSkel
+ensureTxSkelOutsMinAda :: MonadBlockChainBalancing m => TxSkel -> m TxSkel
ensureTxSkelOutsMinAda :: TxSkel -> m TxSkel
-ensureTxSkelOutsMinAda TxSkel
-skel = do
- Params
-theParams <- Maybe EmulatorParamsModification -> Params -> Params
+ensureTxSkelOutsMinAda TxSkel
+skel = do
+ Params
+theParams <- Maybe EmulatorParamsModification -> Params -> Params
applyEmulatorParamsModification (TxOpts -> Maybe EmulatorParamsModification
txOptEmulatorParamsModification (TxOpts -> Maybe EmulatorParamsModification)
-> (TxSkel -> TxOpts) -> TxSkel -> Maybe EmulatorParamsModification
@@ -286,7 +286,7 @@
-> TxSkel -> Maybe EmulatorParamsModification
forall a b. (a -> b) -> a -> b
$ TxSkel
-skel) (Params -> Params) -> m Params -> m Params
+skel) (Params -> Params) -> m Params -> m Params
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> m Params
forall (m :: * -> *). MonadBlockChainBalancing m => m Params
@@ -297,32 +297,32 @@
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM (Params -> TxSkelOut -> Either GenerateTxError TxSkelOut
-ensureTxSkelOutHasMinAda Params
-theParams) ([TxSkelOut] -> Either GenerateTxError [TxSkelOut])
+ensureTxSkelOutHasMinAda Params
+theParams) ([TxSkelOut] -> Either GenerateTxError [TxSkelOut])
-> [TxSkelOut] -> Either GenerateTxError [TxSkelOut]
forall a b. (a -> b) -> a -> b
$ TxSkel
-skel TxSkel -> Optic' A_Lens NoIx TxSkel [TxSkelOut] -> [TxSkelOut]
+skel TxSkel -> Optic' A_Lens NoIx TxSkel [TxSkelOut] -> [TxSkelOut]
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. Optic' A_Lens NoIx TxSkel [TxSkelOut]
txSkelOutsL of
- Left GenerateTxError
-err -> MockChainError -> m TxSkel
+ Left GenerateTxError
+err -> MockChainError -> m TxSkel
forall e (m :: * -> *) a. MonadError e m => e -> m a
throwError (MockChainError -> m TxSkel) -> MockChainError -> m TxSkel
forall a b. (a -> b) -> a -> b
$ GenerateTxError -> MockChainError
MCEGenerationError GenerateTxError
-err
- Right [TxSkelOut]
-newTxSkelOuts -> TxSkel -> m TxSkel
+err
+ Right [TxSkelOut]
+newTxSkelOuts -> TxSkel -> m TxSkel
forall (m :: * -> *) a. Monad m => a -> m a
return (TxSkel -> m TxSkel) -> TxSkel -> m TxSkel
forall a b. (a -> b) -> a -> b
$ TxSkel
-skel TxSkel -> (TxSkel -> TxSkel) -> TxSkel
+skel TxSkel -> (TxSkel -> TxSkel) -> TxSkel
forall a b. a -> (a -> b) -> b
& Optic' A_Lens NoIx TxSkel [TxSkelOut]
txSkelOutsL Optic' A_Lens NoIx TxSkel [TxSkelOut]
@@ -331,23 +331,23 @@
Is k A_Setter =>
Optic k is s t a b -> b -> s -> t
.~ [TxSkelOut]
-newTxSkelOuts
+newTxSkelOuts
where
- ensureTxSkelOutHasMinAda :: Emulator.Params -> TxSkelOut -> Either GenerateTxError TxSkelOut
- ensureTxSkelOutHasMinAda :: Params -> TxSkelOut -> Either GenerateTxError TxSkelOut
-ensureTxSkelOutHasMinAda Params
-theParams txSkelOut :: TxSkelOut
-txSkelOut@(Pays o
-output) = do
- TxOut CtxTx BabbageEra
-cardanoTxOut <- Params
+ ensureTxSkelOutHasMinAda :: Emulator.Params -> TxSkelOut -> Either GenerateTxError TxSkelOut
+ ensureTxSkelOutHasMinAda :: Params -> TxSkelOut -> Either GenerateTxError TxSkelOut
+ensureTxSkelOutHasMinAda Params
+theParams txSkelOut :: TxSkelOut
+txSkelOut@(Pays o
+output) = do
+ TxOut CtxTx BabbageEra
+cardanoTxOut <- Params
-> TxSkelOut -> Either GenerateTxError (TxOut CtxTx BabbageEra)
txSkelOutToCardanoTxOut Params
-theParams TxSkelOut
-txSkelOut
- let Pl.Lovelace Integer
-oldAda = o
-output o -> Optic' A_Lens NoIx o Ada -> Ada
+theParams TxSkelOut
+txSkelOut
+ let Pl.Lovelace Integer
+oldAda = o
+output o -> Optic' A_Lens NoIx o Ada -> Ada
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
@@ -362,14 +362,14 @@
Optic k is s t u v -> Optic l js u v a b -> Optic m ks s t a b
% Optic A_Lens NoIx Value Value Ada Ada
adaL
- CardanoLedger.Coin Integer
-requiredAda =
+ CardanoLedger.Coin Integer
+requiredAda =
PParams (BabbageEra StandardCrypto)
-> TxOut (BabbageEra StandardCrypto) -> Coin
forall era. CLI era => PParams era -> TxOut era -> Coin
CardanoLedger.evaluateMinLovelaceOutput (Params -> PParams
Emulator.emulatorPParams Params
-theParams)
+theParams)
(TxOut (BabbageEra StandardCrypto) -> Coin)
-> (TxOut CtxTx BabbageEra -> TxOut (BabbageEra StandardCrypto))
-> TxOut CtxTx BabbageEra
@@ -393,9 +393,9 @@
(TxOut CtxTx BabbageEra -> Coin) -> TxOut CtxTx BabbageEra -> Coin
forall a b. (a -> b) -> a -> b
$ TxOut CtxTx BabbageEra
-cardanoTxOut
- updatedTxSkelOut :: TxSkelOut
-updatedTxSkelOut = o -> TxSkelOut
+cardanoTxOut
+ updatedTxSkelOut :: TxSkelOut
+updatedTxSkelOut = o -> TxSkelOut
forall o.
(Show o, Typeable o, IsTxInfoOutput o,
IsTxSkelOutAllowedOwner (OwnerType o), Typeable (OwnerType o),
@@ -407,7 +407,7 @@
Pays (o -> TxSkelOut) -> o -> TxSkelOut
forall a b. (a -> b) -> a -> b
$ o
-output o -> (o -> o) -> o
+output o -> (o -> o) -> o
forall a b. a -> (a -> b) -> b
& Optic A_Lens NoIx o o Value Value
forall o. IsAbstractOutput o => Lens' o (ValueType o)
@@ -427,8 +427,8 @@
Pl.Lovelace (Integer -> Integer -> Integer
forall a. Ord a => a -> a -> a
max Integer
-oldAda Integer
-requiredAda)
+oldAda Integer
+requiredAda)
-- The following iterative approach to calculate the minimum Ada amount
-- of a TxOut is necessary, because the additional value might make the
-- TxOut heavier.
@@ -436,20 +436,20 @@
-- It is inspired by
-- https://github.com/input-output-hk/plutus-apps/blob/8706e6c7c525b4973a7b6d2ed7c9d0ef9cd4ef46/plutus-ledger/src/Ledger/Index.hs#L124
if Integer
-oldAda Integer -> Integer -> Bool
+oldAda Integer -> Integer -> Bool
forall a. Ord a => a -> a -> Bool
< Integer
-requiredAda
+requiredAda
then Params -> TxSkelOut -> Either GenerateTxError TxSkelOut
-ensureTxSkelOutHasMinAda Params
-theParams TxSkelOut
-updatedTxSkelOut
+ensureTxSkelOutHasMinAda Params
+theParams TxSkelOut
+updatedTxSkelOut
else TxSkelOut -> Either GenerateTxError TxSkelOut
forall (m :: * -> *) a. Monad m => a -> m a
return TxSkelOut
-txSkelOut
+txSkelOut
-txSkelInputUtxosPV2 :: MonadBlockChainBalancing m => TxSkel -> m (Map PV2.TxOutRef PV2.TxOut)
+txSkelInputUtxosPV2 :: MonadBlockChainBalancing m => TxSkel -> m (Map PV2.TxOutRef PV2.TxOut)
txSkelInputUtxosPV2 :: TxSkel -> m (Map TxOutRef TxOut)
txSkelInputUtxosPV2 = [TxOutRef] -> m (Map TxOutRef TxOut)
forall (m :: * -> *).
@@ -466,7 +466,7 @@
. TxSkel -> Map TxOutRef TxSkelRedeemer
txSkelIns
-txSkelInputUtxos :: MonadBlockChainBalancing m => TxSkel -> m (Map PV2.TxOutRef Ledger.TxOut)
+txSkelInputUtxos :: MonadBlockChainBalancing m => TxSkel -> m (Map PV2.TxOutRef Ledger.TxOut)
txSkelInputUtxos :: TxSkel -> m (Map TxOutRef TxOut)
txSkelInputUtxos = [TxOutRef] -> m (Map TxOutRef TxOut)
forall (m :: * -> *).
@@ -483,10 +483,10 @@
. TxSkel -> Map TxOutRef TxSkelRedeemer
txSkelIns
-txSkelReferenceInputUtxosPV2 :: MonadBlockChainBalancing m => TxSkel -> m (Map PV2.TxOutRef PV2.TxOut)
+txSkelReferenceInputUtxosPV2 :: MonadBlockChainBalancing m => TxSkel -> m (Map PV2.TxOutRef PV2.TxOut)
txSkelReferenceInputUtxosPV2 :: TxSkel -> m (Map TxOutRef TxOut)
-txSkelReferenceInputUtxosPV2 TxSkel
-skel = (TxOut -> TxOut) -> Map TxOutRef TxOut -> Map TxOutRef TxOut
+txSkelReferenceInputUtxosPV2 TxSkel
+skel = (TxOut -> TxOut) -> Map TxOutRef TxOut -> Map TxOutRef TxOut
forall a b k. (a -> b) -> Map k a -> Map k b
Map.map TxOut -> TxOut
txOutV2FromLedger (Map TxOutRef TxOut -> Map TxOutRef TxOut)
@@ -497,12 +497,12 @@
MonadBlockChainBalancing m =>
TxSkel -> m (Map TxOutRef TxOut)
txSkelReferenceInputUtxos TxSkel
-skel
+skel
-txSkelReferenceInputUtxos :: MonadBlockChainBalancing m => TxSkel -> m (Map PV2.TxOutRef Ledger.TxOut)
+txSkelReferenceInputUtxos :: MonadBlockChainBalancing m => TxSkel -> m (Map PV2.TxOutRef Ledger.TxOut)
txSkelReferenceInputUtxos :: TxSkel -> m (Map TxOutRef TxOut)
-txSkelReferenceInputUtxos TxSkel
-skel =
+txSkelReferenceInputUtxos TxSkel
+skel =
[TxOutRef] -> m (Map TxOutRef TxOut)
forall (m :: * -> *).
MonadBlockChainBalancing m =>
@@ -516,12 +516,12 @@
forall a b. (a -> Maybe b) -> [a] -> [b]
mapMaybe
( \case
- TxSkelRedeemerForReferencedScript TxOutRef
-oref redeemer
+ TxSkelRedeemerForReferencedScript TxOutRef
+oref redeemer
_ -> TxOutRef -> Maybe TxOutRef
forall a. a -> Maybe a
Just TxOutRef
-oref
+oref
TxSkelRedeemer
_ -> Maybe TxOutRef
forall a. Maybe a
@@ -534,7 +534,7 @@
forall a b. (a -> b) -> a -> b
$ TxSkel -> Map TxOutRef TxSkelRedeemer
txSkelIns TxSkel
-skel)
+skel)
[TxOutRef] -> [TxOutRef] -> [TxOutRef]
forall a. [a] -> [a] -> [a]
++ (Set TxOutRef -> [TxOutRef]
@@ -546,15 +546,15 @@
txSkelInsReference (TxSkel -> [TxOutRef]) -> TxSkel -> [TxOutRef]
forall a b. (a -> b) -> a -> b
$ TxSkel
-skel)
+skel)
-- | All validators which protect transaction inputs
-txSkelInputValidators :: MonadBlockChainBalancing m => TxSkel -> m (Map PV2.ValidatorHash (Pl.Versioned PV2.Validator))
+txSkelInputValidators :: MonadBlockChainBalancing m => TxSkel -> m (Map PV2.ValidatorHash (Pl.Versioned PV2.Validator))
txSkelInputValidators :: TxSkel -> m (Map ValidatorHash (Versioned Validator))
-txSkelInputValidators TxSkel
-skel = do
- [(TxOutRef, TxOut)]
-utxos <- Map TxOutRef TxOut -> [(TxOutRef, TxOut)]
+txSkelInputValidators TxSkel
+skel = do
+ [(TxOutRef, TxOut)]
+utxos <- Map TxOutRef TxOut -> [(TxOutRef, TxOut)]
forall k a. Map k a -> [(k, a)]
Map.toList (Map TxOutRef TxOut -> [(TxOutRef, TxOut)])
-> m (Map TxOutRef TxOut) -> m [(TxOutRef, TxOut)]
@@ -572,9 +572,9 @@
txSkelIns (TxSkel -> [TxOutRef]) -> TxSkel -> [TxOutRef]
forall a b. (a -> b) -> a -> b
$ TxSkel
-skel)
- [Maybe (ValidatorHash, Versioned Validator)]
-mValidators <-
+skel)
+ [Maybe (ValidatorHash, Versioned Validator)]
+mValidators <-
((TxOutRef, TxOut)
-> m (Maybe (ValidatorHash, Versioned Validator)))
-> [(TxOutRef, TxOut)]
@@ -583,26 +583,26 @@
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM
- ( \(TxOutRef
-_oref, TxOut
-out) -> case TxOut -> Address
+ ( \(TxOutRef
+_oref, TxOut
+out) -> case TxOut -> Address
forall o.
(IsAbstractOutput o, ToCredential (OwnerType o)) =>
o -> Address
outputAddress TxOut
-out of
- PV2.Address (PV2.ScriptCredential ValidatorHash
-valHash) Maybe StakingCredential
+out of
+ PV2.Address (PV2.ScriptCredential ValidatorHash
+valHash) Maybe StakingCredential
_ -> do
- Maybe (Versioned Validator)
-mVal <- ValidatorHash -> m (Maybe (Versioned Validator))
+ Maybe (Versioned Validator)
+mVal <- ValidatorHash -> m (Maybe (Versioned Validator))
forall (m :: * -> *).
MonadBlockChainBalancing m =>
ValidatorHash -> m (Maybe (Versioned Validator))
validatorFromHash ValidatorHash
-valHash
+valHash
case Maybe (Versioned Validator)
-mVal of
+mVal of
Maybe (Versioned Validator)
Nothing ->
MockChainError -> m (Maybe (ValidatorHash, Versioned Validator))
@@ -616,9 +616,9 @@
[Char]
"txSkelInputValidators: unkown validator hash on transaction input"
ValidatorHash
-valHash
- Just Versioned Validator
-val -> Maybe (ValidatorHash, Versioned Validator)
+valHash
+ Just Versioned Validator
+val -> Maybe (ValidatorHash, Versioned Validator)
-> m (Maybe (ValidatorHash, Versioned Validator))
forall (m :: * -> *) a. Monad m => a -> m a
return (Maybe (ValidatorHash, Versioned Validator)
@@ -630,8 +630,8 @@
-> Maybe (ValidatorHash, Versioned Validator)
forall a. a -> Maybe a
Just (ValidatorHash
-valHash, Versioned Validator
-val)
+valHash, Versioned Validator
+val)
Address
_ -> Maybe (ValidatorHash, Versioned Validator)
-> m (Maybe (ValidatorHash, Versioned Validator))
@@ -641,7 +641,7 @@
Nothing
)
[(TxOutRef, TxOut)]
-utxos
+utxos
Map ValidatorHash (Versioned Validator)
-> m (Map ValidatorHash (Versioned Validator))
forall (m :: * -> *) a. Monad m => a -> m a
@@ -671,15 +671,15 @@
-> m (Map ValidatorHash (Versioned Validator))
forall a b. (a -> b) -> a -> b
$ [Maybe (ValidatorHash, Versioned Validator)]
-mValidators
+mValidators
-- Go through all of the 'PV2.TxOutRef's in the list and look them up in the
-- state of the blockchain. If any 'PV2.TxOutRef' can't be resolved, throw an
-- error.
-lookupUtxosPV2 :: MonadBlockChainBalancing m => [PV2.TxOutRef] -> m (Map PV2.TxOutRef PV2.TxOut)
+lookupUtxosPV2 :: MonadBlockChainBalancing m => [PV2.TxOutRef] -> m (Map PV2.TxOutRef PV2.TxOut)
lookupUtxosPV2 :: [TxOutRef] -> m (Map TxOutRef TxOut)
-lookupUtxosPV2 [TxOutRef]
-outRefs = (TxOut -> TxOut) -> Map TxOutRef TxOut -> Map TxOutRef TxOut
+lookupUtxosPV2 [TxOutRef]
+outRefs = (TxOut -> TxOut) -> Map TxOutRef TxOut -> Map TxOutRef TxOut
forall a b k. (a -> b) -> Map k a -> Map k b
Map.map TxOut -> TxOut
txOutV2FromLedger (Map TxOutRef TxOut -> Map TxOutRef TxOut)
@@ -690,12 +690,12 @@
MonadBlockChainBalancing m =>
[TxOutRef] -> m (Map TxOutRef TxOut)
lookupUtxos [TxOutRef]
-outRefs
+outRefs
-lookupUtxos :: MonadBlockChainBalancing m => [PV2.TxOutRef] -> m (Map PV2.TxOutRef Ledger.TxOut)
+lookupUtxos :: MonadBlockChainBalancing m => [PV2.TxOutRef] -> m (Map PV2.TxOutRef Ledger.TxOut)
lookupUtxos :: [TxOutRef] -> m (Map TxOutRef TxOut)
-lookupUtxos [TxOutRef]
-outRefs = do
+lookupUtxos [TxOutRef]
+outRefs = do
[(TxOutRef, TxOut)] -> Map TxOutRef TxOut
forall k a. Ord k => [(k, a)] -> Map k a
Map.fromList
@@ -708,18 +708,18 @@
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM
- ( \TxOutRef
-oRef -> do
- Maybe TxOut
-mOut <- TxOutRef -> m (Maybe TxOut)
+ ( \TxOutRef
+oRef -> do
+ Maybe TxOut
+mOut <- TxOutRef -> m (Maybe TxOut)
forall (m :: * -> *).
MonadBlockChainBalancing m =>
TxOutRef -> m (Maybe TxOut)
txOutByRefLedger TxOutRef
-oRef
- TxOut
-out <- case Maybe TxOut
-mOut of
+oRef
+ TxOut
+out <- case Maybe TxOut
+mOut of
Maybe TxOut
Nothing ->
MockChainError -> m TxOut
@@ -732,34 +732,34 @@
[Char]
"lookupUtxos: unknown TxOutRef"
TxOutRef
-oRef
- Just TxOut
-out -> TxOut -> m TxOut
+oRef
+ Just TxOut
+out -> TxOut -> m TxOut
forall (m :: * -> *) a. Monad m => a -> m a
return TxOut
-out
+out
(TxOutRef, TxOut) -> m (TxOutRef, TxOut)
forall (m :: * -> *) a. Monad m => a -> m a
return (TxOutRef
-oRef, TxOut
-out)
+oRef, TxOut
+out)
)
[TxOutRef]
-outRefs
+outRefs
-- | look up the UTxOs the transaction consumes, and sum the value contained in
-- them.
-txSkelInputValue :: MonadBlockChainBalancing m => TxSkel -> m PV2.Value
+txSkelInputValue :: MonadBlockChainBalancing m => TxSkel -> m PV2.Value
txSkelInputValue :: TxSkel -> m Value
-txSkelInputValue TxSkel
-skel = do
- Map TxOutRef TxOut
-txSkelInputs <- TxSkel -> m (Map TxOutRef TxOut)
+txSkelInputValue TxSkel
+skel = do
+ Map TxOutRef TxOut
+txSkelInputs <- TxSkel -> m (Map TxOutRef TxOut)
forall (m :: * -> *).
MonadBlockChainBalancing m =>
TxSkel -> m (Map TxOutRef TxOut)
txSkelInputUtxos TxSkel
-skel
+skel
Value -> m Value
forall (m :: * -> *) a. Monad m => a -> m a
return (Value -> m Value) -> Value -> m Value
@@ -773,15 +773,15 @@
forall b c a. (b -> c) -> (a -> b) -> a -> c
. TxOut -> TxOut
txOutV2FromLedger) Map TxOutRef TxOut
-txSkelInputs
+txSkelInputs
-- | Look up the data on UTxOs the transaction consumes.
-txSkelInputData :: MonadBlockChainBalancing m => TxSkel -> m (Map PV2.DatumHash PV2.Datum)
+txSkelInputData :: MonadBlockChainBalancing m => TxSkel -> m (Map PV2.DatumHash PV2.Datum)
txSkelInputData :: TxSkel -> m (Map DatumHash Datum)
-txSkelInputData TxSkel
-skel = do
- [TxOut]
-txSkelInputs <- Map TxOutRef TxOut -> [TxOut]
+txSkelInputData TxSkel
+skel = do
+ [TxOut]
+txSkelInputs <- Map TxOutRef TxOut -> [TxOut]
forall k a. Map k a -> [a]
Map.elems (Map TxOutRef TxOut -> [TxOut])
-> m (Map TxOutRef TxOut) -> m [TxOut]
@@ -791,19 +791,19 @@
MonadBlockChainBalancing m =>
TxSkel -> m (Map TxOutRef TxOut)
txSkelInputUtxosPV2 TxSkel
-skel
- [Maybe (DatumHash, Datum)]
-mDatums <-
+skel
+ [Maybe (DatumHash, Datum)]
+mDatums <-
(TxOut -> m (Maybe (DatumHash, Datum)))
-> [TxOut] -> m [Maybe (DatumHash, Datum)]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM
- ( \TxOut
-output ->
+ ( \TxOut
+output ->
case TxOut
-output TxOut -> Optic' A_Lens NoIx TxOut OutputDatum -> OutputDatum
+output TxOut -> Optic' A_Lens NoIx TxOut OutputDatum -> OutputDatum
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
@@ -816,12 +816,12 @@
return Maybe (DatumHash, Datum)
forall a. Maybe a
Nothing
- PV2.OutputDatum Datum
-datum ->
- let dHash :: DatumHash
-dHash = Datum -> DatumHash
+ PV2.OutputDatum Datum
+datum ->
+ let dHash :: DatumHash
+dHash = Datum -> DatumHash
Pl.datumHash Datum
-datum
+datum
in (DatumHash, Datum) -> Maybe (DatumHash, Datum)
forall a. a -> Maybe a
Just ((DatumHash, Datum) -> Maybe (DatumHash, Datum))
@@ -830,17 +830,17 @@
-> Maybe (DatumHash, Datum)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (DatumHash
-dHash,) (Datum -> Maybe (DatumHash, Datum))
+dHash,) (Datum -> Maybe (DatumHash, Datum))
-> m Datum -> m (Maybe (DatumHash, Datum))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> DatumHash -> m Datum
forall (m :: * -> *).
MonadBlockChainBalancing m =>
DatumHash -> m Datum
-datumFromHashWithError DatumHash
-dHash
- PV2.OutputDatumHash DatumHash
-dHash ->
+datumFromHashWithError DatumHash
+dHash
+ PV2.OutputDatumHash DatumHash
+dHash ->
(DatumHash, Datum) -> Maybe (DatumHash, Datum)
forall a. a -> Maybe a
Just ((DatumHash, Datum) -> Maybe (DatumHash, Datum))
@@ -849,18 +849,18 @@
-> Maybe (DatumHash, Datum)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (DatumHash
-dHash,) (Datum -> Maybe (DatumHash, Datum))
+dHash,) (Datum -> Maybe (DatumHash, Datum))
-> m Datum -> m (Maybe (DatumHash, Datum))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> DatumHash -> m Datum
forall (m :: * -> *).
MonadBlockChainBalancing m =>
DatumHash -> m Datum
-datumFromHashWithError DatumHash
-dHash
+datumFromHashWithError DatumHash
+dHash
)
[TxOut]
-txSkelInputs
+txSkelInputs
Map DatumHash Datum -> m (Map DatumHash Datum)
forall (m :: * -> *) a. Monad m => a -> m a
return (Map DatumHash Datum -> m (Map DatumHash Datum))
@@ -881,21 +881,21 @@
-> [Maybe (DatumHash, Datum)] -> m (Map DatumHash Datum)
forall a b. (a -> b) -> a -> b
$ [Maybe (DatumHash, Datum)]
-mDatums
+mDatums
where
- datumFromHashWithError :: MonadBlockChainBalancing m => Pl.DatumHash -> m PV2.Datum
- datumFromHashWithError :: DatumHash -> m Datum
-datumFromHashWithError DatumHash
-dHash = do
- Maybe Datum
-mDatum <- DatumHash -> m (Maybe Datum)
+ datumFromHashWithError :: MonadBlockChainBalancing m => Pl.DatumHash -> m PV2.Datum
+ datumFromHashWithError :: DatumHash -> m Datum
+datumFromHashWithError DatumHash
+dHash = do
+ Maybe Datum
+mDatum <- DatumHash -> m (Maybe Datum)
forall (m :: * -> *).
MonadBlockChainBalancing m =>
DatumHash -> m (Maybe Datum)
datumFromHash DatumHash
-dHash
+dHash
case Maybe Datum
-mDatum of
+mDatum of
Maybe Datum
Nothing ->
MockChainError -> m Datum
@@ -908,20 +908,20 @@
[Char]
"txSkelInputData: Transaction input with un-resolvable datum hash"
DatumHash
-dHash
- Just Datum
-datum -> Datum -> m Datum
+dHash
+ Just Datum
+datum -> Datum -> m Datum
forall (m :: * -> *) a. Monad m => a -> m a
return Datum
-datum
+datum
getEmulatorUTxO ::
Map PV2.TxOutRef Ledger.TxOut ->
Either Ledger.ToCardanoError (Emulator.UTxO Emulator.EmulatorEra)
getEmulatorUTxO :: Map TxOutRef TxOut
-> Either ToCardanoError (UTxO (BabbageEra StandardCrypto))
-getEmulatorUTxO Map TxOutRef TxOut
-m =
+getEmulatorUTxO Map TxOutRef TxOut
+m =
([(TxIn, TxOut CtxUTxO BabbageEra)]
-> UTxO (BabbageEra StandardCrypto))
-> Either ToCardanoError [(TxIn, TxOut CtxUTxO BabbageEra)]
@@ -957,9 +957,9 @@
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
-mapM (\(TxOutRef
-k, TxOut
-v) -> (,) (TxIn
+mapM (\(TxOutRef
+k, TxOut
+v) -> (,) (TxIn
-> TxOut CtxUTxO BabbageEra -> (TxIn, TxOut CtxUTxO BabbageEra))
-> Either ToCardanoError TxIn
-> Either
@@ -968,7 +968,7 @@
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> TxOutRef -> Either ToCardanoError TxIn
Ledger.toCardanoTxIn TxOutRef
-k Either
+k Either
ToCardanoError
(TxOut CtxUTxO BabbageEra -> (TxIn, TxOut CtxUTxO BabbageEra))
-> Either ToCardanoError (TxOut CtxUTxO BabbageEra)
@@ -979,7 +979,7 @@
forall (f :: * -> *) a. Applicative f => a -> f a
pure (TxOut -> TxOut CtxUTxO BabbageEra
Ledger.toCtxUTxOTxOut TxOut
-v)) ([(TxOutRef, TxOut)]
+v)) ([(TxOutRef, TxOut)]
-> Either ToCardanoError [(TxIn, TxOut CtxUTxO BabbageEra)])
-> [(TxOutRef, TxOut)]
-> Either ToCardanoError [(TxIn, TxOut CtxUTxO BabbageEra)]
@@ -988,7 +988,7 @@
Map TxOutRef TxOut -> [(TxOutRef, TxOut)]
forall k a. Map k a -> [(k, a)]
Map.toList Map TxOutRef TxOut
-m
+m
-- ensuring that the equation
--
@@ -1003,14 +1003,14 @@
--
-- This function also adjusts the transaction outputs to contain at least the
-- minimum Ada amount, if the 'txOptEnsureMinAda option is @True@.
-setFeeAndBalance :: MonadBlockChainBalancing m => Wallet -> TxSkel -> m (TxSkel, Fee)
+setFeeAndBalance :: MonadBlockChainBalancing m => Wallet -> TxSkel -> m (TxSkel, Fee)
setFeeAndBalance :: Wallet -> TxSkel -> m (TxSkel, Fee)
-setFeeAndBalance Wallet
-balanceWallet TxSkel
-skel0 = do
+setFeeAndBalance Wallet
+balanceWallet TxSkel
+skel0 = do
-- do the min Ada adjustment if it's requested
- TxSkel
-skel <-
+ TxSkel
+skel <-
if TxOpts -> Bool
txOptEnsureMinAda (TxOpts -> Bool) -> (TxSkel -> TxOpts) -> TxSkel -> Bool
forall b c a. (b -> c) -> (a -> b) -> a -> c
@@ -1018,33 +1018,33 @@
txSkelOpts (TxSkel -> Bool) -> TxSkel -> Bool
forall a b. (a -> b) -> a -> b
$ TxSkel
-skel0
+skel0
then TxSkel -> m TxSkel
forall (m :: * -> *).
MonadBlockChainBalancing m =>
TxSkel -> m TxSkel
ensureTxSkelOutsMinAda TxSkel
-skel0
+skel0
else TxSkel -> m TxSkel
forall (m :: * -> *) a. Monad m => a -> m a
return TxSkel
-skel0
+skel0
-- Candidate UTxOs to spend for balancing
- Map TxOutRef TxOut
-balancePKUtxos <-
+ Map TxOutRef TxOut
+balancePKUtxos <-
[(TxOutRef, TxOut)] -> Map TxOutRef TxOut
forall k a. Ord k => [(k, a)] -> Map k a
Map.fromList
([(TxOutRef, TxOut)] -> Map TxOutRef TxOut)
-> m [(TxOutRef, TxOut)] -> m (Map TxOutRef TxOut)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
-<$> let balanceWalletAddress :: Address
-balanceWalletAddress = Wallet -> Address
+<$> let balanceWalletAddress :: Address
+balanceWalletAddress = Wallet -> Address
walletAddress Wallet
-balanceWallet
- noDatumPredicate :: TxOut -> Bool
-noDatumPredicate = (\case OutputDatum
+balanceWallet
+ noDatumPredicate :: TxOut -> Bool
+noDatumPredicate = (\case OutputDatum
PV2.NoOutputDatum -> Bool
True; OutputDatum
_ -> Bool
@@ -1066,14 +1066,14 @@
txSkelOpts (TxSkel -> BalancingUtxos) -> TxSkel -> BalancingUtxos
forall a b. (a -> b) -> a -> b
$ TxSkel
-skel0 of
+skel0 of
BalancingUtxos
BalancingUtxosAll -> Address -> m [(TxOutRef, TxOut)]
forall (m :: * -> *).
MonadBlockChainBalancing m =>
Address -> m [(TxOutRef, TxOut)]
utxosAtLedger Address
-balanceWalletAddress
+balanceWalletAddress
BalancingUtxos
BalancingUtxosDatumless -> UtxoSearch m TxOut -> m [(TxOutRef, TxOut)]
forall (m :: * -> *) a.
@@ -1084,20 +1084,20 @@
MonadBlockChainBalancing m =>
Address -> UtxoSearch m TxOut
utxosAtLedgerSearch Address
-balanceWalletAddress UtxoSearch m TxOut -> (TxOut -> Bool) -> UtxoSearch m TxOut
+balanceWalletAddress UtxoSearch m TxOut -> (TxOut -> Bool) -> UtxoSearch m TxOut
forall (m :: * -> *) a.
Monad m =>
UtxoSearch m a -> (a -> Bool) -> UtxoSearch m a
`filterWithPred` TxOut -> Bool
-noDatumPredicate)
- BalancingUtxosAllowlist [TxOutRef]
-txOutRefs -> ((TxOutRef, TxOut) -> Bool)
+noDatumPredicate)
+ BalancingUtxosAllowlist [TxOutRef]
+txOutRefs -> ((TxOutRef, TxOut) -> Bool)
-> [(TxOutRef, TxOut)] -> [(TxOutRef, TxOut)]
forall a. (a -> Bool) -> [a] -> [a]
filter ((TxOutRef -> [TxOutRef] -> Bool
forall (t :: * -> *) a. (Foldable t, Eq a) => a -> t a -> Bool
`elem` [TxOutRef]
-txOutRefs) (TxOutRef -> Bool)
+txOutRefs) (TxOutRef -> Bool)
-> ((TxOutRef, TxOut) -> TxOutRef) -> (TxOutRef, TxOut) -> Bool
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (TxOutRef, TxOut) -> TxOutRef
@@ -1110,9 +1110,9 @@
MonadBlockChainBalancing m =>
Address -> m [(TxOutRef, TxOut)]
utxosAtLedger Address
-balanceWalletAddress
- BalancingUtxosBlocklist [TxOutRef]
-txOutRefs -> ((TxOutRef, TxOut) -> Bool)
+balanceWalletAddress
+ BalancingUtxosBlocklist [TxOutRef]
+txOutRefs -> ((TxOutRef, TxOut) -> Bool)
-> [(TxOutRef, TxOut)] -> [(TxOutRef, TxOut)]
forall a. (a -> Bool) -> [a] -> [a]
filter (Bool -> Bool
@@ -1122,7 +1122,7 @@
. (TxOutRef -> [TxOutRef] -> Bool
forall (t :: * -> *) a. (Foldable t, Eq a) => a -> t a -> Bool
`elem` [TxOutRef]
-txOutRefs) (TxOutRef -> Bool)
+txOutRefs) (TxOutRef -> Bool)
-> ((TxOutRef, TxOut) -> TxOutRef) -> (TxOutRef, TxOut) -> Bool
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (TxOutRef, TxOut) -> TxOutRef
@@ -1135,26 +1135,26 @@
MonadBlockChainBalancing m =>
Address -> m [(TxOutRef, TxOut)]
utxosAtLedger Address
-balanceWalletAddress
+balanceWalletAddress
-- all UTxOs that the txSkel consumes.
- Map TxOutRef TxOut
-txSkelUtxos <- TxSkel -> m (Map TxOutRef TxOut)
+ Map TxOutRef TxOut
+txSkelUtxos <- TxSkel -> m (Map TxOutRef TxOut)
forall (m :: * -> *).
MonadBlockChainBalancing m =>
TxSkel -> m (Map TxOutRef TxOut)
txSkelInputUtxos TxSkel
-skel
+skel
-- all UTxOs that the txSkel references.
- Map TxOutRef TxOut
-txSkelReferencedUtxos <- TxSkel -> m (Map TxOutRef TxOut)
+ Map TxOutRef TxOut
+txSkelReferencedUtxos <- TxSkel -> m (Map TxOutRef TxOut)
forall (m :: * -> *).
MonadBlockChainBalancing m =>
TxSkel -> m (Map TxOutRef TxOut)
txSkelReferenceInputUtxos TxSkel
-skel
- let index :: Either ToCardanoError (UTxO (BabbageEra StandardCrypto))
-index = Map TxOutRef TxOut
+skel
+ let index :: Either ToCardanoError (UTxO (BabbageEra StandardCrypto))
+index = Map TxOutRef TxOut
-> Either ToCardanoError (UTxO (BabbageEra StandardCrypto))
getEmulatorUTxO (Map TxOutRef TxOut
-> Either ToCardanoError (UTxO (BabbageEra StandardCrypto)))
@@ -1162,17 +1162,17 @@
-> Either ToCardanoError (UTxO (BabbageEra StandardCrypto))
forall a b. (a -> b) -> a -> b
$ Map TxOutRef TxOut
-txSkelReferencedUtxos Map TxOutRef TxOut -> Map TxOutRef TxOut -> Map TxOutRef TxOut
+txSkelReferencedUtxos Map TxOutRef TxOut -> Map TxOutRef TxOut -> Map TxOutRef TxOut
forall a. Semigroup a => a -> a -> a
<> Map TxOutRef TxOut
-txSkelUtxos Map TxOutRef TxOut -> Map TxOutRef TxOut -> Map TxOutRef TxOut
+txSkelUtxos Map TxOutRef TxOut -> Map TxOutRef TxOut -> Map TxOutRef TxOut
forall a. Semigroup a => a -> a -> a
<> Map TxOutRef TxOut
-balancePKUtxos
+balancePKUtxos
case Either ToCardanoError (UTxO (BabbageEra StandardCrypto))
-index of
- Left ToCardanoError
-err -> MockChainError -> m (TxSkel, Fee)
+index of
+ Left ToCardanoError
+err -> MockChainError -> m (TxSkel, Fee)
forall e (m :: * -> *) a. MonadError e m => e -> m a
throwError (MockChainError -> m (TxSkel, Fee))
-> MockChainError -> m (TxSkel, Fee)
@@ -1186,16 +1186,16 @@
++ ToCardanoError -> [Char]
forall a. Show a => a -> [Char]
show ToCardanoError
-err
- Right UTxO (BabbageEra StandardCrypto)
-cUtxoIndex -> do
+err
+ Right UTxO (BabbageEra StandardCrypto)
+cUtxoIndex -> do
-- We start with a high startingFee, but theres a chance that 'w' doesn't have enough funds
-- so we'll see an unbalanceable error; in that case, we switch to the minimum fee and try again.
-- That feels very much like a hack, and it is. Maybe we should witch to starting with a small
-- fee and then increasing, but that might require more iterations until its settled.
-- For now, let's keep it just like the folks from plutus-apps did it.
- let startingFee :: Fee
-startingFee = Integer -> Fee
+ let startingFee :: Fee
+startingFee = Integer -> Fee
Fee Integer
3000000
Int
@@ -1210,11 +1210,11 @@
-> UTxO (BabbageEra StandardCrypto)
-> TxSkel
-> m (TxSkel, Fee)
-calcFee Int
+calcFee Int
5 Fee
-startingFee UTxO (BabbageEra StandardCrypto)
-cUtxoIndex TxSkel
-skel
+startingFee UTxO (BabbageEra StandardCrypto)
+cUtxoIndex TxSkel
+skel
m (TxSkel, Fee)
-> (MockChainError -> m (TxSkel, Fee)) -> m (TxSkel, Fee)
forall e (m :: * -> *) a.
@@ -1230,8 +1230,8 @@
-- since we work on "TxSkel". However, for now, the
-- implementation of "Pl.minFee" is a constant of 10 lovelace.
-- https://github.com/input-output-hk/plutus-apps/blob/d4255f05477fd8477ee9673e850ebb9ebb8c9657/plutus-ledger/src/Ledger/Index.hs#L116
- let minFee :: Fee
-minFee = Integer -> Fee
+ let minFee :: Fee
+minFee = Integer -> Fee
Fee Integer
10 -- forall tx. Pl.minFee tx = 10 lovelace
in Int
@@ -1246,88 +1246,88 @@
-> UTxO (BabbageEra StandardCrypto)
-> TxSkel
-> m (TxSkel, Fee)
-calcFee Int
+calcFee Int
5 Fee
-minFee UTxO (BabbageEra StandardCrypto)
-cUtxoIndex TxSkel
-skel
+minFee UTxO (BabbageEra StandardCrypto)
+cUtxoIndex TxSkel
+skel
-- Impossible to generate the Cardano transaction at all
- MockChainError
-e -> MockChainError -> m (TxSkel, Fee)
+ MockChainError
+e -> MockChainError -> m (TxSkel, Fee)
forall e (m :: * -> *) a. MonadError e m => e -> m a
throwError MockChainError
-e
+e
where
-- Inspired by https://github.com/input-output-hk/plutus-apps/blob/d4255f05477fd8477ee9673e850ebb9ebb8c9657/plutus-contract/src/Wallet/Emulator/Wallet.hs#L329
- calcFee ::
- MonadBlockChainBalancing m =>
+ calcFee ::
+ MonadBlockChainBalancing m =>
Int ->
Fee ->
Emulator.UTxO Emulator.EmulatorEra ->
TxSkel ->
- m (TxSkel, Fee)
- calcFee :: Int
+ m (TxSkel, Fee)
+ calcFee :: Int
-> Fee
-> UTxO (BabbageEra StandardCrypto)
-> TxSkel
-> m (TxSkel, Fee)
-calcFee Int
-n Fee
-fee UTxO (BabbageEra StandardCrypto)
-cUtxoIndex TxSkel
-skel = do
- TxSkel
-attemptedSkel <- Wallet -> TxSkel -> Fee -> m TxSkel
+calcFee Int
+n Fee
+fee UTxO (BabbageEra StandardCrypto)
+cUtxoIndex TxSkel
+skel = do
+ TxSkel
+attemptedSkel <- Wallet -> TxSkel -> Fee -> m TxSkel
forall (m :: * -> *).
MonadBlockChainBalancing m =>
Wallet -> TxSkel -> Fee -> m TxSkel
balanceTxFromAux Wallet
-balanceWallet TxSkel
-skel Fee
-fee
- Map DatumHash Datum
-managedData <- TxSkel -> m (Map DatumHash Datum)
+balanceWallet TxSkel
+skel Fee
+fee
+ Map DatumHash Datum
+managedData <- TxSkel -> m (Map DatumHash Datum)
forall (m :: * -> *).
MonadBlockChainBalancing m =>
TxSkel -> m (Map DatumHash Datum)
txSkelInputData TxSkel
-skel
- Map TxOutRef TxOut
-managedTxOuts <- do
- Map TxOutRef TxOut
-ins <- TxSkel -> m (Map TxOutRef TxOut)
+skel
+ Map TxOutRef TxOut
+managedTxOuts <- do
+ Map TxOutRef TxOut
+ins <- TxSkel -> m (Map TxOutRef TxOut)
forall (m :: * -> *).
MonadBlockChainBalancing m =>
TxSkel -> m (Map TxOutRef TxOut)
txSkelInputUtxosPV2 TxSkel
-skel
- Map TxOutRef TxOut
-insRef <- TxSkel -> m (Map TxOutRef TxOut)
+skel
+ Map TxOutRef TxOut
+insRef <- TxSkel -> m (Map TxOutRef TxOut)
forall (m :: * -> *).
MonadBlockChainBalancing m =>
TxSkel -> m (Map TxOutRef TxOut)
txSkelReferenceInputUtxosPV2 TxSkel
-skel
+skel
Map TxOutRef TxOut -> m (Map TxOutRef TxOut)
forall (m :: * -> *) a. Monad m => a -> m a
return (Map TxOutRef TxOut -> m (Map TxOutRef TxOut))
-> Map TxOutRef TxOut -> m (Map TxOutRef TxOut)
forall a b. (a -> b) -> a -> b
$ Map TxOutRef TxOut
-ins Map TxOutRef TxOut -> Map TxOutRef TxOut -> Map TxOutRef TxOut
+ins Map TxOutRef TxOut -> Map TxOutRef TxOut -> Map TxOutRef TxOut
forall a. Semigroup a => a -> a -> a
<> Map TxOutRef TxOut
-insRef
- Map ValidatorHash (Versioned Validator)
-managedValidators <- TxSkel -> m (Map ValidatorHash (Versioned Validator))
+insRef
+ Map ValidatorHash (Versioned Validator)
+managedValidators <- TxSkel -> m (Map ValidatorHash (Versioned Validator))
forall (m :: * -> *).
MonadBlockChainBalancing m =>
TxSkel -> m (Map ValidatorHash (Versioned Validator))
txSkelInputValidators TxSkel
-skel
- Params
-theParams <- Maybe EmulatorParamsModification -> Params -> Params
+skel
+ Params
+theParams <- Maybe EmulatorParamsModification -> Params -> Params
applyEmulatorParamsModification (TxOpts -> Maybe EmulatorParamsModification
txOptEmulatorParamsModification (TxOpts -> Maybe EmulatorParamsModification)
-> (TxSkel -> TxOpts) -> TxSkel -> Maybe EmulatorParamsModification
@@ -1337,7 +1337,7 @@
-> TxSkel -> Maybe EmulatorParamsModification
forall a b. (a -> b) -> a -> b
$ TxSkel
-skel) (Params -> Params) -> m Params -> m Params
+skel) (Params -> Params) -> m Params -> m Params
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> m Params
forall (m :: * -> *). MonadBlockChainBalancing m => m Params
@@ -1351,45 +1351,45 @@
-> Fee
-> Either MockChainError Fee
estimateTxSkelFee Params
-theParams UTxO (BabbageEra StandardCrypto)
-cUtxoIndex Map DatumHash Datum
-managedData Map TxOutRef TxOut
-managedTxOuts Map ValidatorHash (Versioned Validator)
-managedValidators TxSkel
-attemptedSkel Fee
-fee of
+theParams UTxO (BabbageEra StandardCrypto)
+cUtxoIndex Map DatumHash Datum
+managedData Map TxOutRef TxOut
+managedTxOuts Map ValidatorHash (Versioned Validator)
+managedValidators TxSkel
+attemptedSkel Fee
+fee of
-- necessary to capture script failure for failed cases
- Left err :: MockChainError
-err@MCEValidationError {} -> MockChainError -> m (TxSkel, Fee)
+ Left err :: MockChainError
+err@MCEValidationError {} -> MockChainError -> m (TxSkel, Fee)
forall e (m :: * -> *) a. MonadError e m => e -> m a
throwError MockChainError
-err
- Left MockChainError
-err -> MockChainError -> m (TxSkel, Fee)
+err
+ Left MockChainError
+err -> MockChainError -> m (TxSkel, Fee)
forall e (m :: * -> *) a. MonadError e m => e -> m a
throwError (MockChainError -> m (TxSkel, Fee))
-> MockChainError -> m (TxSkel, Fee)
forall a b. (a -> b) -> a -> b
$ MockChainError -> MockChainError
MCECalcFee MockChainError
-err
- Right Fee
-newFee
+err
+ Right Fee
+newFee
| Fee
-newFee Fee -> Fee -> Bool
+newFee Fee -> Fee -> Bool
forall a. Eq a => a -> a -> Bool
== Fee
-fee -> do
+fee -> do
-- Debug.Trace.traceM "Reached fixpoint:"
-- Debug.Trace.traceM $ "- fee = " <> show fee
-- Debug.Trace.traceM $ "- skeleton = " <> show (attemptedSkel {_txSkelFee = fee})
(TxSkel, Fee) -> m (TxSkel, Fee)
forall (f :: * -> *) a. Applicative f => a -> f a
pure (TxSkel
-attemptedSkel, Fee
-fee) -- reached fixpoint
+attemptedSkel, Fee
+fee) -- reached fixpoint
| Int
-n Int -> Int -> Bool
+n Int -> Int -> Bool
forall a. Eq a => a -> a -> Bool
== Int
0 -> do
@@ -1397,11 +1397,11 @@
(TxSkel, Fee) -> m (TxSkel, Fee)
forall (f :: * -> *) a. Applicative f => a -> f a
pure (TxSkel
-attemptedSkel, Fee -> Fee -> Fee
+attemptedSkel, Fee -> Fee -> Fee
forall a. Ord a => a -> a -> a
max Fee
-newFee Fee
-fee) -- maximum number of iterations
+newFee Fee
+fee) -- maximum number of iterations
| Bool
otherwise -> do
-- Debug.Trace.traceM $ "New iteration: newfee = " <> show newFee
@@ -1417,14 +1417,14 @@
-> UTxO (BabbageEra StandardCrypto)
-> TxSkel
-> m (TxSkel, Fee)
-calcFee (Int
-n Int -> Int -> Int
+calcFee (Int
+n Int -> Int -> Int
forall a. Num a => a -> a -> a
- Int
1) Fee
-newFee UTxO (BabbageEra StandardCrypto)
-cUtxoIndex TxSkel
-skel
+newFee UTxO (BabbageEra StandardCrypto)
+cUtxoIndex TxSkel
+skel
-- | This funcion is essentially a copy of
-- https://github.com/input-output-hk/plutus-apps/blob/d4255f05477fd8477ee9673e850ebb9ebb8c9657/plutus-ledger/src/Ledger/Fee.hs#L19
@@ -1445,16 +1445,16 @@
-> TxSkel
-> Fee
-> Either MockChainError Fee
-estimateTxSkelFee Params
-params UTxO (BabbageEra StandardCrypto)
-cUtxoIndex Map DatumHash Datum
-managedData Map TxOutRef TxOut
-managedTxOuts Map ValidatorHash (Versioned Validator)
-managedValidators TxSkel
-skel Fee
-fee = do
- TxBodyContent BuildTx BabbageEra
-txBodyContent <-
+estimateTxSkelFee Params
+params UTxO (BabbageEra StandardCrypto)
+cUtxoIndex Map DatumHash Datum
+managedData Map TxOutRef TxOut
+managedTxOuts Map ValidatorHash (Versioned Validator)
+managedValidators TxSkel
+skel Fee
+fee = do
+ TxBodyContent BuildTx BabbageEra
+txBodyContent <-
(GenerateTxError -> MockChainError)
-> Either GenerateTxError (TxBodyContent BuildTx BabbageEra)
-> Either MockChainError (TxBodyContent BuildTx BabbageEra)
@@ -1479,19 +1479,19 @@
forall a. Default a => a
def {gtpFee :: Fee
gtpFee = Fee
-fee} Params
-params Map DatumHash Datum
-managedData Map TxOutRef TxOut
-managedTxOuts Map ValidatorHash (Versioned Validator)
-managedValidators TxSkel
-skel
- let nkeys :: Word
-nkeys = TxBodyContent BuildTx BabbageEra -> Word
+fee} Params
+params Map DatumHash Datum
+managedData Map TxOutRef TxOut
+managedTxOuts Map ValidatorHash (Versioned Validator)
+managedValidators TxSkel
+skel
+ let nkeys :: Word
+nkeys = TxBodyContent BuildTx BabbageEra -> Word
forall era. TxBodyContent BuildTx era -> Word
C.estimateTransactionKeyWitnessCount TxBodyContent BuildTx BabbageEra
-txBodyContent
- TxBody BabbageEra
-txBody <-
+txBodyContent
+ TxBody BabbageEra
+txBody <-
(Either ValidationErrorInPhase ToCardanoError -> MockChainError)
-> Either
(Either ValidationErrorInPhase ToCardanoError) (TxBody BabbageEra)
@@ -1501,16 +1501,16 @@
a b c -> a (Either b d) (Either c d)
left
( \case
- Left ValidationErrorInPhase
-err -> ValidationErrorInPhase -> MockChainError
+ Left ValidationErrorInPhase
+err -> ValidationErrorInPhase -> MockChainError
MCEValidationError ValidationErrorInPhase
-err
- Right ToCardanoError
-err -> GenerateTxError -> MockChainError
+err
+ Right ToCardanoError
+err -> GenerateTxError -> MockChainError
MCEGenerationError ([Char] -> ToCardanoError -> GenerateTxError
ToCardanoError [Char]
"makeTransactionBody" ToCardanoError
-err)
+err)
)
(Either
(Either ValidationErrorInPhase ToCardanoError) (TxBody BabbageEra)
@@ -1525,37 +1525,37 @@
-> Either
(Either ValidationErrorInPhase ToCardanoError) (TxBody BabbageEra)
Emulator.makeTransactionBody Params
-params UTxO (BabbageEra StandardCrypto)
-cUtxoIndex (TxBodyContent BuildTx BabbageEra -> CardanoBuildTx
+params UTxO (BabbageEra StandardCrypto)
+cUtxoIndex (TxBodyContent BuildTx BabbageEra -> CardanoBuildTx
Ledger.CardanoBuildTx TxBodyContent BuildTx BabbageEra
-txBodyContent)
+txBodyContent)
case ProtocolParameters -> TxBody BabbageEra -> Word -> Word -> Lovelace
forall era.
IsShelleyBasedEra era =>
ProtocolParameters -> TxBody era -> Word -> Word -> Lovelace
C.evaluateTransactionFee (Params -> ProtocolParameters
Emulator.pProtocolParams Params
-params) TxBody BabbageEra
-txBody Word
-nkeys Word
+params) TxBody BabbageEra
+txBody Word
+nkeys Word
0 of
- C.Lovelace Integer
-fee -> Fee -> Either MockChainError Fee
+ C.Lovelace Integer
+fee -> Fee -> Either MockChainError Fee
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Fee -> Either MockChainError Fee)
-> Fee -> Either MockChainError Fee
forall a b. (a -> b) -> a -> b
$ Integer -> Fee
Fee Integer
-fee
+fee
-- | Calculates the collateral for a transaction
-calcCollateral :: MonadBlockChainBalancing m => Wallet -> m (Set PV2.TxOutRef)
+calcCollateral :: MonadBlockChainBalancing m => Wallet -> m (Set PV2.TxOutRef)
calcCollateral :: Wallet -> m (Set TxOutRef)
-calcCollateral Wallet
-w = do
- [(TxOutRef, ConcreteOutput Credential () Ada ScriptHash)]
-souts <-
+calcCollateral Wallet
+w = do
+ [(TxOutRef, ConcreteOutput Credential () Ada ScriptHash)]
+souts <-
UtxoSearch m (ConcreteOutput Credential () Ada ScriptHash)
-> m [(TxOutRef, ConcreteOutput Credential () Ada ScriptHash)]
forall (m :: * -> *) a.
@@ -1573,7 +1573,7 @@
Address -> UtxoSearch m TxOut
utxosAtSearch (Wallet -> Address
walletAddress Wallet
-w)
+w)
UtxoSearch m TxOut
-> (TxOut -> Maybe (ConcreteOutput Credential () Value ScriptHash))
-> UtxoSearch m (ConcreteOutput Credential () Value ScriptHash)
@@ -1615,7 +1615,7 @@
when ([(TxOutRef, ConcreteOutput Credential () Ada ScriptHash)] -> Bool
forall (t :: * -> *) a. Foldable t => t a -> Bool
null [(TxOutRef, ConcreteOutput Credential () Ada ScriptHash)]
-souts) (m () -> m ()) -> m () -> m ()
+souts) (m () -> m ()) -> m () -> m ()
forall a b. (a -> b) -> a -> b
$
MockChainError -> m ()
@@ -1645,22 +1645,22 @@
-> [TxOutRef]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [(TxOutRef, ConcreteOutput Credential () Ada ScriptHash)]
-souts)
+souts)
-balanceTxFromAux :: MonadBlockChainBalancing m => Wallet -> TxSkel -> Fee -> m TxSkel
+balanceTxFromAux :: MonadBlockChainBalancing m => Wallet -> TxSkel -> Fee -> m TxSkel
balanceTxFromAux :: Wallet -> TxSkel -> Fee -> m TxSkel
-balanceTxFromAux Wallet
-balanceWallet TxSkel
-txskel Fee
-fee = do
- bres :: BalanceTxRes
-bres@(BalanceTxRes {[(TxOutRef, TxOut)]
+balanceTxFromAux Wallet
+balanceWallet TxSkel
+txskel Fee
+fee = do
+ bres :: BalanceTxRes
+bres@(BalanceTxRes {[(TxOutRef, TxOut)]
newInputs :: BalanceTxRes -> [(TxOutRef, TxOut)]
newInputs :: [(TxOutRef, TxOut)]
-newInputs, Value
+newInputs, Value
returnValue :: BalanceTxRes -> Value
returnValue :: Value
-returnValue, [(TxOutRef, TxOut)]
+returnValue, [(TxOutRef, TxOut)]
availableUtxos :: BalanceTxRes -> [(TxOutRef, TxOut)]
availableUtxos :: [(TxOutRef, TxOut)]
availableUtxos}) <- Wallet -> TxSkel -> Fee -> m BalanceTxRes
@@ -1668,20 +1668,20 @@
MonadBlockChainBalancing m =>
Wallet -> TxSkel -> Fee -> m BalanceTxRes
calcBalanceTx Wallet
-balanceWallet TxSkel
-txskel Fee
-fee
+balanceWallet TxSkel
+txskel Fee
+fee
case PubKeyHash -> BalanceTxRes -> TxSkel -> Maybe TxSkel
applyBalanceTx (Wallet -> PubKeyHash
walletPKHash Wallet
-balanceWallet) BalanceTxRes
-bres TxSkel
-txskel of
- Just TxSkel
-txskel' -> TxSkel -> m TxSkel
+balanceWallet) BalanceTxRes
+bres TxSkel
+txskel of
+ Just TxSkel
+txskel' -> TxSkel -> m TxSkel
forall (m :: * -> *) a. Monad m => a -> m a
return TxSkel
-txskel'
+txskel'
Maybe TxSkel
Nothing ->
MockChainError -> m TxSkel
@@ -1695,21 +1695,21 @@
-> (Value, [TxOutRef]) -> Value -> MCEUnbalanceableError
MCEUnbalNotEnoughReturning
([(TxOutRef, TxOut)] -> (Value, [TxOutRef])
-valueAndRefs [(TxOutRef, TxOut)]
-newInputs)
+valueAndRefs [(TxOutRef, TxOut)]
+newInputs)
([(TxOutRef, TxOut)] -> (Value, [TxOutRef])
-valueAndRefs [(TxOutRef, TxOut)]
-availableUtxos)
+valueAndRefs [(TxOutRef, TxOut)]
+availableUtxos)
Value
-returnValue
+returnValue
)
TxSkel
-txskel
+txskel
where
- valueAndRefs :: [(PV2.TxOutRef, PV2.TxOut)] -> (PV2.Value, [PV2.TxOutRef])
- valueAndRefs :: [(TxOutRef, TxOut)] -> (Value, [TxOutRef])
-valueAndRefs [(TxOutRef, TxOut)]
-x = ([Value] -> Value
+ valueAndRefs :: [(PV2.TxOutRef, PV2.TxOut)] -> (PV2.Value, [PV2.TxOutRef])
+ valueAndRefs :: [(TxOutRef, TxOut)] -> (Value, [TxOutRef])
+valueAndRefs [(TxOutRef, TxOut)]
+x = ([Value] -> Value
forall a. Monoid a => [a] -> a
mconcat (TxOut -> Value
forall o. (IsAbstractOutput o, ToValue (ValueType o)) => o -> Value
@@ -1721,13 +1721,13 @@
snd ((TxOutRef, TxOut) -> Value) -> [(TxOutRef, TxOut)] -> [Value]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [(TxOutRef, TxOut)]
-x), (TxOutRef, TxOut) -> TxOutRef
+x), (TxOutRef, TxOut) -> TxOutRef
forall a b. (a, b) -> a
fst ((TxOutRef, TxOut) -> TxOutRef)
-> [(TxOutRef, TxOut)] -> [TxOutRef]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [(TxOutRef, TxOut)]
-x)
+x)
data BalanceTxRes = BalanceTxRes
{ -- | Inputs that need to be added in order to cover the value in the
@@ -1746,7 +1746,7 @@
BalanceTxRes -> [(TxOutRef, TxOut)]
availableUtxos :: [(PV2.TxOutRef, PV2.TxOut)]
}
- deriving (Int -> BalanceTxRes -> [Char] -> [Char]
+ deriving (Int -> BalanceTxRes -> [Char] -> [Char]
[BalanceTxRes] -> [Char] -> [Char]
BalanceTxRes -> [Char]
(Int -> BalanceTxRes -> [Char] -> [Char])
@@ -1767,14 +1767,14 @@
-- | Calculate the changes needed to balance a transaction with money from a
-- given wallet. Every transaction that is sent to the chain must be balanced,
-- that is: @inputs + mints == outputs + fee + burns@.
-calcBalanceTx :: MonadBlockChainBalancing m => Wallet -> TxSkel -> Fee -> m BalanceTxRes
+calcBalanceTx :: MonadBlockChainBalancing m => Wallet -> TxSkel -> Fee -> m BalanceTxRes
calcBalanceTx :: Wallet -> TxSkel -> Fee -> m BalanceTxRes
-calcBalanceTx Wallet
-balanceWallet TxSkel
-skel Fee
-fee = do
- Value
-inValue <- (Value -> Value -> Value
+calcBalanceTx Wallet
+balanceWallet TxSkel
+skel Fee
+fee = do
+ Value
+inValue <- (Value -> Value -> Value
forall a. Semigroup a => a -> a -> a
<> Value -> Value
positivePart (TxSkelMints -> Value
@@ -1782,50 +1782,50 @@
forall a b. (a -> b) -> a -> b
$ TxSkel -> TxSkelMints
txSkelMints TxSkel
-skel)) (Value -> Value) -> m Value -> m Value
+skel)) (Value -> Value) -> m Value -> m Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> TxSkel -> m Value
forall (m :: * -> *).
MonadBlockChainBalancing m =>
TxSkel -> m Value
txSkelInputValue TxSkel
-skel -- transaction inputs + minted value
- let outValue :: Value
-outValue = TxSkel -> Fee -> Value
+skel -- transaction inputs + minted value
+ let outValue :: Value
+outValue = TxSkel -> Fee -> Value
txSkelOutputValue TxSkel
-skel Fee
-fee -- transaction outputs + fee + burned value
- difference :: Value
-difference = Value
-outValue Value -> Value -> Value
+skel Fee
+fee -- transaction outputs + fee + burned value
+ difference :: Value
+difference = Value
+outValue Value -> Value -> Value
forall a. Semigroup a => a -> a -> a
<> Value -> Value
forall a. AdditiveGroup a => a -> a
Pl.negate Value
-inValue
+inValue
-- This is the value that must still be paid by 'balancePK' in order to
-- balance the transaction:
- missingValue :: Value
-missingValue = Value -> Value
+ missingValue :: Value
+missingValue = Value -> Value
positivePart Value
-difference
+difference
-- This will be paid to 'balancePK' in any case:
- initialExcess :: Value
-initialExcess = Value -> Value
+ initialExcess :: Value
+initialExcess = Value -> Value
negativePart Value
-difference
+difference
-- All TxOutRefs that the transaction consumes. We'll need them to make sure
-- that no additional UTxOs are chosen that are in fact already present on the
-- transaction.
- inputOrefs :: [TxOutRef]
-inputOrefs = Map TxOutRef TxSkelRedeemer -> [TxOutRef]
+ inputOrefs :: [TxOutRef]
+inputOrefs = Map TxOutRef TxSkelRedeemer -> [TxOutRef]
forall k a. Map k a -> [k]
Map.keys (Map TxOutRef TxSkelRedeemer -> [TxOutRef])
-> Map TxOutRef TxSkelRedeemer -> [TxOutRef]
forall a b. (a -> b) -> a -> b
$ TxSkel -> Map TxOutRef TxSkelRedeemer
txSkelIns TxSkel
-skel
+skel
-- Get all UTxOs that belong to the given wallet, and that are not yet being
-- consumed on the transaction.
--
@@ -1835,8 +1835,8 @@
-- therefore become less likely for the 'returnValue' to be less than the
-- minimum Ada amount required for each output. See this comment for context:
-- https://github.com/tweag/cooked-validators/issues/71#issuecomment-1016406041
- [(TxOutRef, TxOut)]
-candidateUtxos <-
+ [(TxOutRef, TxOut)]
+candidateUtxos <-
((TxOutRef, TxOut) -> (TxOutRef, TxOut) -> Ordering)
-> [(TxOutRef, TxOut)] -> [(TxOutRef, TxOut)]
forall a. (a -> a -> Ordering) -> [a] -> [a]
@@ -1873,7 +1873,7 @@
filter ((TxOutRef -> [TxOutRef] -> Bool
forall (t :: * -> *) a. (Foldable t, Eq a) => a -> t a -> Bool
`notElem` [TxOutRef]
-inputOrefs) (TxOutRef -> Bool)
+inputOrefs) (TxOutRef -> Bool)
-> ((TxOutRef, TxOut) -> TxOutRef) -> (TxOutRef, TxOut) -> Bool
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (TxOutRef, TxOut) -> TxOutRef
@@ -1888,13 +1888,13 @@
Address -> m [(TxOutRef, TxOut)]
utxosAt (Wallet -> Address
walletAddress Wallet
-balanceWallet)
+balanceWallet)
case [(TxOutRef, TxOut)]
-> [(TxOutRef, TxOut)] -> Value -> Value -> Maybe BalanceTxRes
-selectNewInputs [(TxOutRef, TxOut)]
-candidateUtxos [] Value
-initialExcess Value
-missingValue of
+selectNewInputs [(TxOutRef, TxOut)]
+candidateUtxos [] Value
+initialExcess Value
+missingValue of
Maybe BalanceTxRes
Nothing ->
MockChainError -> m BalanceTxRes
@@ -1907,29 +1907,29 @@
MCEUnbalanceable
(Wallet -> Value -> MCEUnbalanceableError
MCEUnbalNotEnoughFunds Wallet
-balanceWallet Value
-missingValue)
+balanceWallet Value
+missingValue)
TxSkel
-skel
- Just BalanceTxRes
-bTxRes -> BalanceTxRes -> m BalanceTxRes
+skel
+ Just BalanceTxRes
+bTxRes -> BalanceTxRes -> m BalanceTxRes
forall (m :: * -> *) a. Monad m => a -> m a
return BalanceTxRes
-bTxRes
+bTxRes
where
- selectNewInputs ::
+ selectNewInputs ::
[(PV2.TxOutRef, PV2.TxOut)] ->
[(PV2.TxOutRef, PV2.TxOut)] ->
PV2.Value ->
PV2.Value ->
Maybe BalanceTxRes
- selectNewInputs :: [(TxOutRef, TxOut)]
+ selectNewInputs :: [(TxOutRef, TxOut)]
-> [(TxOutRef, TxOut)] -> Value -> Value -> Maybe BalanceTxRes
-selectNewInputs [(TxOutRef, TxOut)]
-available [(TxOutRef, TxOut)]
-chosen Value
-excess Value
-missing =
+selectNewInputs [(TxOutRef, TxOut)]
+available [(TxOutRef, TxOut)]
+chosen Value
+excess Value
+missing =
case Optic' An_Iso NoIx Value [(AssetClass, Integer)]
-> Value -> [(AssetClass, Integer)]
forall k (is :: IxList) s a.
@@ -1937,7 +1937,7 @@
Optic' k is s a -> s -> a
view Optic' An_Iso NoIx Value [(AssetClass, Integer)]
flattenValueI Value
-missing of
+missing of
[] -> BalanceTxRes -> Maybe BalanceTxRes
forall a. a -> Maybe a
Just (BalanceTxRes -> Maybe BalanceTxRes)
@@ -1945,11 +1945,11 @@
forall a b. (a -> b) -> a -> b
$ [(TxOutRef, TxOut)] -> Value -> [(TxOutRef, TxOut)] -> BalanceTxRes
BalanceTxRes [(TxOutRef, TxOut)]
-chosen Value
-excess [(TxOutRef, TxOut)]
-available
- (AssetClass
-ac, Integer
+chosen Value
+excess [(TxOutRef, TxOut)]
+available
+ (AssetClass
+ac, Integer
_) : [(AssetClass, Integer)]
_ ->
-- Find the first UTxO belonging to the wallet that contains at least
@@ -1961,7 +1961,7 @@
findIndex ((Value -> Value -> Bool
`Pl.geq` AssetClass -> Integer -> Value
Pl.assetClassValue AssetClass
-ac Integer
+ac Integer
1) (Value -> Bool)
-> ((TxOutRef, TxOut) -> Value) -> (TxOutRef, TxOut) -> Bool
forall b c a. (b -> c) -> (a -> b) -> a -> c
@@ -1973,63 +1973,63 @@
. (TxOutRef, TxOut) -> TxOut
forall a b. (a, b) -> b
snd) [(TxOutRef, TxOut)]
-available of
+available of
Maybe Int
Nothing -> Maybe BalanceTxRes
forall a. Maybe a
Nothing -- The wallet owns nothing of the required asset class. We can't balance with this wallet.
- Just Int
-i ->
- let ([(TxOutRef, TxOut)]
-left, (TxOutRef, TxOut)
-theChosenUtxo : [(TxOutRef, TxOut)]
-right) = Int
+ Just Int
+i ->
+ let ([(TxOutRef, TxOut)]
+left, (TxOutRef, TxOut)
+theChosenUtxo : [(TxOutRef, TxOut)]
+right) = Int
-> [(TxOutRef, TxOut)]
-> ([(TxOutRef, TxOut)], [(TxOutRef, TxOut)])
forall a. Int -> [a] -> ([a], [a])
splitAt Int
-i [(TxOutRef, TxOut)]
-available
- available' :: [(TxOutRef, TxOut)]
-available' = [(TxOutRef, TxOut)]
-left [(TxOutRef, TxOut)] -> [(TxOutRef, TxOut)] -> [(TxOutRef, TxOut)]
+i [(TxOutRef, TxOut)]
+available
+ available' :: [(TxOutRef, TxOut)]
+available' = [(TxOutRef, TxOut)]
+left [(TxOutRef, TxOut)] -> [(TxOutRef, TxOut)] -> [(TxOutRef, TxOut)]
forall a. [a] -> [a] -> [a]
++ [(TxOutRef, TxOut)]
-right
- chosen' :: [(TxOutRef, TxOut)]
-chosen' = (TxOutRef, TxOut)
-theChosenUtxo (TxOutRef, TxOut) -> [(TxOutRef, TxOut)] -> [(TxOutRef, TxOut)]
+right
+ chosen' :: [(TxOutRef, TxOut)]
+chosen' = (TxOutRef, TxOut)
+theChosenUtxo (TxOutRef, TxOut) -> [(TxOutRef, TxOut)] -> [(TxOutRef, TxOut)]
forall a. a -> [a] -> [a]
: [(TxOutRef, TxOut)]
-chosen
- theChosenValue :: Value
-theChosenValue = TxOut -> Value
+chosen
+ theChosenValue :: Value
+theChosenValue = TxOut -> Value
forall o. (IsAbstractOutput o, ToValue (ValueType o)) => o -> Value
outputValue (TxOut -> Value) -> TxOut -> Value
forall a b. (a -> b) -> a -> b
$ (TxOutRef, TxOut) -> TxOut
forall a b. (a, b) -> b
snd (TxOutRef, TxOut)
-theChosenUtxo
- theChosenDifference :: Value
-theChosenDifference = Value
-missing Value -> Value -> Value
+theChosenUtxo
+ theChosenDifference :: Value
+theChosenDifference = Value
+missing Value -> Value -> Value
forall a. Semigroup a => a -> a -> a
<> Value -> Value
forall a. AdditiveGroup a => a -> a
Pl.negate Value
-theChosenValue
- excess' :: Value
-excess' = Value
-excess Value -> Value -> Value
+theChosenValue
+ excess' :: Value
+excess' = Value
+excess Value -> Value -> Value
forall a. Semigroup a => a -> a -> a
<> Value -> Value
negativePart Value
-theChosenDifference
- missing' :: Value
-missing' = Value -> Value
+theChosenDifference
+ missing' :: Value
+missing' = Value -> Value
positivePart Value
-theChosenDifference
+theChosenDifference
in -- A remark on why the following line should not lead to an
-- infinite recursion: The value described by @missing'@ is
-- strictly smaller than the value described by @missing@,
@@ -2037,11 +2037,11 @@
-- in @theChosenValue@.
[(TxOutRef, TxOut)]
-> [(TxOutRef, TxOut)] -> Value -> Value -> Maybe BalanceTxRes
-selectNewInputs [(TxOutRef, TxOut)]
-available' [(TxOutRef, TxOut)]
-chosen' Value
-excess' Value
-missing'
+selectNewInputs [(TxOutRef, TxOut)]
+available' [(TxOutRef, TxOut)]
+chosen' Value
+excess' Value
+missing'
-- | Once we calculated what is needed to balance a transaction @skel@, we still
-- need to apply those changes to @skel@. Because of the 'Pl.minAdaTxOut'
@@ -2055,12 +2055,12 @@
-- transaction.
applyBalanceTx :: PV2.PubKeyHash -> BalanceTxRes -> TxSkel -> Maybe TxSkel
applyBalanceTx :: PubKeyHash -> BalanceTxRes -> TxSkel -> Maybe TxSkel
-applyBalanceTx PubKeyHash
-balancePK (BalanceTxRes [(TxOutRef, TxOut)]
-newInputs Value
-returnValue [(TxOutRef, TxOut)]
-availableUtxos) TxSkel
-skel = do
+applyBalanceTx PubKeyHash
+balancePK (BalanceTxRes [(TxOutRef, TxOut)]
+newInputs Value
+returnValue [(TxOutRef, TxOut)]
+availableUtxos) TxSkel
+skel = do
-- Here we'll try a few things, in order, until one of them succeeds:
--
-- 1. If allowed by the balanceOutputPolicy, pick out the best possible output
@@ -2082,27 +2082,27 @@
-- In that case, we could forget about adding several additional inputs. If
-- one isn't enough, there's nothing we can do, no?
let -- All transaction outputs
- outs :: [TxSkelOut]
- outs :: [TxSkelOut]
-outs = TxSkel -> [TxSkelOut]
+ outs :: [TxSkelOut]
+ outs :: [TxSkelOut]
+outs = TxSkel -> [TxSkelOut]
txSkelOuts TxSkel
-skel
+skel
-- All transaction outputs that are ada-only, datum-free, and belong to
-- 'balancePK', together with the index of the corresponding 'TxSkelOut'
-- in 'outs'.
- candidateOutputsWithIndices :: [(Int, ConcreteOutput PV2.PubKeyHash () Pl.Ada PV2.ScriptHash)]
- candidateOutputsWithIndices :: [(Int, ConcreteOutput PubKeyHash () Ada ScriptHash)]
-candidateOutputsWithIndices =
+ candidateOutputsWithIndices :: [(Int, ConcreteOutput PV2.PubKeyHash () Pl.Ada PV2.ScriptHash)]
+ candidateOutputsWithIndices :: [(Int, ConcreteOutput PubKeyHash () Ada ScriptHash)]
+candidateOutputsWithIndices =
((Int, TxSkelOut)
-> Maybe (Int, ConcreteOutput PubKeyHash () Ada ScriptHash))
-> [(Int, TxSkelOut)]
-> [(Int, ConcreteOutput PubKeyHash () Ada ScriptHash)]
forall a b. (a -> Maybe b) -> [a] -> [b]
mapMaybe
- ( \(Int
-i, Pays o
-output) ->
+ ( \(Int
+i, Pays o
+output) ->
case ( PubKeyHash
-> o
-> Maybe
@@ -2119,7 +2119,7 @@
(ValueType output)
(ReferenceScriptType output))
isPKOutputFrom PubKeyHash
-balancePK
+balancePK
(o
-> Maybe
(ConcreteOutput
@@ -2207,20 +2207,20 @@
toOutputWithReferenceScriptHash
)
o
-output of
+output of
Maybe (ConcreteOutput PubKeyHash () Ada ScriptHash)
Nothing -> Maybe (Int, ConcreteOutput PubKeyHash () Ada ScriptHash)
forall a. Maybe a
Nothing
- Just ConcreteOutput PubKeyHash () Ada ScriptHash
-output' -> (Int, ConcreteOutput PubKeyHash () Ada ScriptHash)
+ Just ConcreteOutput PubKeyHash () Ada ScriptHash
+output' -> (Int, ConcreteOutput PubKeyHash () Ada ScriptHash)
-> Maybe (Int, ConcreteOutput PubKeyHash () Ada ScriptHash)
forall a. a -> Maybe a
Just (Int -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
-i, ConcreteOutput PubKeyHash () Ada ScriptHash
-output')
+i, ConcreteOutput PubKeyHash () Ada ScriptHash
+output')
)
([(Int, TxSkelOut)]
-> [(Int, ConcreteOutput PubKeyHash () Ada ScriptHash)])
@@ -2231,13 +2231,13 @@
forall a b. [a] -> [b] -> [(a, b)]
zip [Int
0 :: Int ..] [TxSkelOut]
-outs
+outs
-- The index of the "best possible transaction output", as described
-- above.
- mBestOutputIndex :: Maybe Int
- mBestOutputIndex :: Maybe Int
-mBestOutputIndex = case ((Int, ConcreteOutput PubKeyHash () Ada ScriptHash)
+ mBestOutputIndex :: Maybe Int
+ mBestOutputIndex :: Maybe Int
+mBestOutputIndex = case ((Int, ConcreteOutput PubKeyHash () Ada ScriptHash)
-> (Int, ConcreteOutput PubKeyHash () Ada ScriptHash) -> Ordering)
-> [(Int, ConcreteOutput PubKeyHash () Ada ScriptHash)]
-> [(Int, ConcreteOutput PubKeyHash () Ada ScriptHash)]
@@ -2277,57 +2277,57 @@
snd
)
[(Int, ConcreteOutput PubKeyHash () Ada ScriptHash)]
-candidateOutputsWithIndices of
+candidateOutputsWithIndices of
[] -> Maybe Int
forall a. Maybe a
Nothing
- (Int
-best, ConcreteOutput PubKeyHash () Ada ScriptHash
+ (Int
+best, ConcreteOutput PubKeyHash () Ada ScriptHash
_) : [(Int, ConcreteOutput PubKeyHash () Ada ScriptHash)]
_ -> Int -> Maybe Int
forall a. a -> Maybe a
Just Int
-best
+best
- ins :: Map TxOutRef TxSkelRedeemer
-ins = TxSkel -> Map TxOutRef TxSkelRedeemer
+ ins :: Map TxOutRef TxSkelRedeemer
+ins = TxSkel -> Map TxOutRef TxSkelRedeemer
txSkelIns TxSkel
-skel
- (Map TxOutRef TxSkelRedeemer
-newIns, [TxSkelOut]
-newOuts) <-
+skel
+ (Map TxOutRef TxSkelRedeemer
+newIns, [TxSkelOut]
+newOuts) <-
case Maybe Int
-mBestOutputIndex of
- Just Int
-i ->
- let ([TxSkelOut]
-left, TxSkelOut
-bestTxOut : [TxSkelOut]
-right) = Int -> [TxSkelOut] -> ([TxSkelOut], [TxSkelOut])
+mBestOutputIndex of
+ Just Int
+i ->
+ let ([TxSkelOut]
+left, TxSkelOut
+bestTxOut : [TxSkelOut]
+right) = Int -> [TxSkelOut] -> ([TxSkelOut], [TxSkelOut])
forall a. Int -> [a] -> ([a], [a])
splitAt Int
-i [TxSkelOut]
-outs
+i [TxSkelOut]
+outs
in case TxOpts -> BalanceOutputPolicy
txOptBalanceOutputPolicy (TxOpts -> BalanceOutputPolicy) -> TxOpts -> BalanceOutputPolicy
forall a b. (a -> b) -> a -> b
$ TxSkel -> TxOpts
txSkelOpts TxSkel
-skel of
+skel of
BalanceOutputPolicy
AdjustExistingOutput ->
- let bestTxOutValue :: Value
-bestTxOutValue = TxSkelOut -> Value
+ let bestTxOutValue :: Value
+bestTxOutValue = TxSkelOut -> Value
txSkelOutValue TxSkelOut
-bestTxOut
- adjustedValue :: Value
-adjustedValue = Value
-bestTxOutValue Value -> Value -> Value
+bestTxOut
+ adjustedValue :: Value
+adjustedValue = Value
+bestTxOutValue Value -> Value -> Value
forall a. Semigroup a => a -> a -> a
<> Value
-returnValue
+returnValue
in if Value
-adjustedValue Value -> Value -> Bool
+adjustedValue Value -> Value -> Bool
`Pl.geq` Ada -> Value
Pl.toValue Ada
Ledger.minAdaTxOutEstimated -- TODO make thid dependen on the atual TxOut
@@ -2337,7 +2337,7 @@
forall a. a -> Maybe a
Just -- (1)
( Map TxOutRef TxSkelRedeemer
-ins Map TxOutRef TxSkelRedeemer
+ins Map TxOutRef TxSkelRedeemer
-> Map TxOutRef TxSkelRedeemer -> Map TxOutRef TxSkelRedeemer
forall a. Semigroup a => a -> a -> a
<> (TxOutRef -> TxSkelRedeemer)
@@ -2356,12 +2356,12 @@
map (TxOutRef, TxOut) -> TxOutRef
forall a b. (a, b) -> a
fst [(TxOutRef, TxOut)]
-newInputs),
+newInputs),
[TxSkelOut]
-left [TxSkelOut] -> [TxSkelOut] -> [TxSkelOut]
+left [TxSkelOut] -> [TxSkelOut] -> [TxSkelOut]
forall a. [a] -> [a] -> [a]
++ (TxSkelOut
-bestTxOut TxSkelOut -> (TxSkelOut -> TxSkelOut) -> TxSkelOut
+bestTxOut TxSkelOut -> (TxSkelOut -> TxSkelOut) -> TxSkelOut
forall a b. a -> (a -> b) -> b
& Lens' TxSkelOut Value
txSkelOutValueL Lens' TxSkelOut Value -> Value -> TxSkelOut -> TxSkelOut
@@ -2369,57 +2369,57 @@
Is k A_Setter =>
Optic k is s t a b -> b -> s -> t
.~ Value
-adjustedValue) TxSkelOut -> [TxSkelOut] -> [TxSkelOut]
+adjustedValue) TxSkelOut -> [TxSkelOut] -> [TxSkelOut]
forall a. a -> [a] -> [a]
: [TxSkelOut]
-right
+right
)
else Map TxOutRef TxSkelRedeemer
-> [TxSkelOut]
-> [(TxOutRef, TxOut)]
-> Value
-> Maybe (Map TxOutRef TxSkelRedeemer, [TxSkelOut])
-tryAdditionalInputs Map TxOutRef TxSkelRedeemer
-ins [TxSkelOut]
-outs [(TxOutRef, TxOut)]
-availableUtxos Value
-returnValue
+tryAdditionalInputs Map TxOutRef TxSkelRedeemer
+ins [TxSkelOut]
+outs [(TxOutRef, TxOut)]
+availableUtxos Value
+returnValue
BalanceOutputPolicy
DontAdjustExistingOutput -> Map TxOutRef TxSkelRedeemer
-> [TxSkelOut] -> Maybe (Map TxOutRef TxSkelRedeemer, [TxSkelOut])
-tryAdditionalOutput Map TxOutRef TxSkelRedeemer
-ins [TxSkelOut]
-outs
+tryAdditionalOutput Map TxOutRef TxSkelRedeemer
+ins [TxSkelOut]
+outs
Maybe Int
Nothing ->
-- There's no "best possible transaction output" in the sense described
-- above.
Map TxOutRef TxSkelRedeemer
-> [TxSkelOut] -> Maybe (Map TxOutRef TxSkelRedeemer, [TxSkelOut])
-tryAdditionalOutput Map TxOutRef TxSkelRedeemer
-ins [TxSkelOut]
-outs
+tryAdditionalOutput Map TxOutRef TxSkelRedeemer
+ins [TxSkelOut]
+outs
TxSkel -> Maybe TxSkel
forall (m :: * -> *) a. Monad m => a -> m a
return TxSkel
-skel {txSkelIns :: Map TxOutRef TxSkelRedeemer
+skel {txSkelIns :: Map TxOutRef TxSkelRedeemer
txSkelIns = Map TxOutRef TxSkelRedeemer
-newIns, txSkelOuts :: [TxSkelOut]
+newIns, txSkelOuts :: [TxSkelOut]
txSkelOuts = [TxSkelOut]
-newOuts}
+newOuts}
where
- tryAdditionalOutput ::
+ tryAdditionalOutput ::
Map PV2.TxOutRef TxSkelRedeemer ->
[TxSkelOut] ->
Maybe (Map PV2.TxOutRef TxSkelRedeemer, [TxSkelOut])
- tryAdditionalOutput :: Map TxOutRef TxSkelRedeemer
+ tryAdditionalOutput :: Map TxOutRef TxSkelRedeemer
-> [TxSkelOut] -> Maybe (Map TxOutRef TxSkelRedeemer, [TxSkelOut])
-tryAdditionalOutput Map TxOutRef TxSkelRedeemer
-ins [TxSkelOut]
-outs =
+tryAdditionalOutput Map TxOutRef TxSkelRedeemer
+ins [TxSkelOut]
+outs =
if Value -> Ada
Pl.fromValue Value
-returnValue Ada -> Ada -> Bool
+returnValue Ada -> Ada -> Bool
forall a. Ord a => a -> a -> Bool
>= Ada
Ledger.minAdaTxOutEstimated -- TODO make thid dependen on the atual TxOut
@@ -2429,7 +2429,7 @@
forall a. a -> Maybe a
Just -- (2)
( Map TxOutRef TxSkelRedeemer
-ins Map TxOutRef TxSkelRedeemer
+ins Map TxOutRef TxSkelRedeemer
-> Map TxOutRef TxSkelRedeemer -> Map TxOutRef TxSkelRedeemer
forall a. Semigroup a => a -> a -> a
<> (TxOutRef -> TxSkelRedeemer)
@@ -2448,66 +2448,66 @@
map (TxOutRef, TxOut) -> TxOutRef
forall a b. (a, b) -> a
fst [(TxOutRef, TxOut)]
-newInputs),
+newInputs),
[TxSkelOut]
-outs [TxSkelOut] -> [TxSkelOut] -> [TxSkelOut]
+outs [TxSkelOut] -> [TxSkelOut] -> [TxSkelOut]
forall a. [a] -> [a] -> [a]
++ [PubKeyHash -> Value -> TxSkelOut
paysPK PubKeyHash
-balancePK Value
-returnValue]
+balancePK Value
+returnValue]
)
else Map TxOutRef TxSkelRedeemer
-> [TxSkelOut]
-> [(TxOutRef, TxOut)]
-> Value
-> Maybe (Map TxOutRef TxSkelRedeemer, [TxSkelOut])
-tryAdditionalInputs Map TxOutRef TxSkelRedeemer
-ins [TxSkelOut]
-outs [(TxOutRef, TxOut)]
-availableUtxos Value
-returnValue
+tryAdditionalInputs Map TxOutRef TxSkelRedeemer
+ins [TxSkelOut]
+outs [(TxOutRef, TxOut)]
+availableUtxos Value
+returnValue
- tryAdditionalInputs ::
+ tryAdditionalInputs ::
Map PV2.TxOutRef TxSkelRedeemer ->
[TxSkelOut] ->
[(PV2.TxOutRef, PV2.TxOut)] ->
Pl.Value ->
Maybe (Map PV2.TxOutRef TxSkelRedeemer, [TxSkelOut])
- tryAdditionalInputs :: Map TxOutRef TxSkelRedeemer
+ tryAdditionalInputs :: Map TxOutRef TxSkelRedeemer
-> [TxSkelOut]
-> [(TxOutRef, TxOut)]
-> Value
-> Maybe (Map TxOutRef TxSkelRedeemer, [TxSkelOut])
-tryAdditionalInputs Map TxOutRef TxSkelRedeemer
-ins [TxSkelOut]
-outs [(TxOutRef, TxOut)]
-available Value
-return =
+tryAdditionalInputs Map TxOutRef TxSkelRedeemer
+ins [TxSkelOut]
+outs [(TxOutRef, TxOut)]
+available Value
+return =
case [(TxOutRef, TxOut)]
-available of
+available of
[] -> Maybe (Map TxOutRef TxSkelRedeemer, [TxSkelOut])
forall a. Maybe a
Nothing
- (TxOutRef
-newTxOutRef, TxOut
-newTxOut) : [(TxOutRef, TxOut)]
-newAvailable ->
- let additionalValue :: Value
-additionalValue = TxOut -> Value
+ (TxOutRef
+newTxOutRef, TxOut
+newTxOut) : [(TxOutRef, TxOut)]
+newAvailable ->
+ let additionalValue :: Value
+additionalValue = TxOut -> Value
forall o. (IsAbstractOutput o, ToValue (ValueType o)) => o -> Value
outputValue TxOut
-newTxOut
- newReturn :: Value
-newReturn = Value
-additionalValue Value -> Value -> Value
+newTxOut
+ newReturn :: Value
+newReturn = Value
+additionalValue Value -> Value -> Value
forall a. Semigroup a => a -> a -> a
<> Value
-return
- newIns :: Map TxOutRef TxSkelRedeemer
-newIns =
+return
+ newIns :: Map TxOutRef TxSkelRedeemer
+newIns =
( Map TxOutRef TxSkelRedeemer
-ins
+ins
Map TxOutRef TxSkelRedeemer
-> Map TxOutRef TxSkelRedeemer -> Map TxOutRef TxSkelRedeemer
forall a. Semigroup a => a -> a -> a
@@ -2527,26 +2527,26 @@
map (TxOutRef, TxOut) -> TxOutRef
forall a b. (a, b) -> a
fst [(TxOutRef, TxOut)]
-newInputs)
+newInputs)
Map TxOutRef TxSkelRedeemer
-> Map TxOutRef TxSkelRedeemer -> Map TxOutRef TxSkelRedeemer
forall a. Semigroup a => a -> a -> a
<> TxOutRef -> TxSkelRedeemer -> Map TxOutRef TxSkelRedeemer
forall k a. k -> a -> Map k a
Map.singleton TxOutRef
-newTxOutRef TxSkelRedeemer
+newTxOutRef TxSkelRedeemer
TxSkelNoRedeemerForPK
)
- newOuts :: [TxSkelOut]
-newOuts = [TxSkelOut]
-outs [TxSkelOut] -> [TxSkelOut] -> [TxSkelOut]
+ newOuts :: [TxSkelOut]
+newOuts = [TxSkelOut]
+outs [TxSkelOut] -> [TxSkelOut] -> [TxSkelOut]
forall a. [a] -> [a] -> [a]
++ [PubKeyHash -> Value -> TxSkelOut
paysPK PubKeyHash
-balancePK Value
-newReturn]
+balancePK Value
+newReturn]
in if Value
-newReturn Value -> Value -> Bool
+newReturn Value -> Value -> Bool
`Pl.geq` Ada -> Value
Pl.toValue Ada
Ledger.minAdaTxOutEstimated -- TODO make thid dependen on the atual TxOut
@@ -2554,16 +2554,16 @@
-> Maybe (Map TxOutRef TxSkelRedeemer, [TxSkelOut])
forall a. a -> Maybe a
Just (Map TxOutRef TxSkelRedeemer
-newIns, [TxSkelOut]
-newOuts) -- (3)
+newIns, [TxSkelOut]
+newOuts) -- (3)
else Map TxOutRef TxSkelRedeemer
-> [TxSkelOut]
-> [(TxOutRef, TxOut)]
-> Value
-> Maybe (Map TxOutRef TxSkelRedeemer, [TxSkelOut])
-tryAdditionalInputs Map TxOutRef TxSkelRedeemer
-newIns [TxSkelOut]
-newOuts [(TxOutRef, TxOut)]
-newAvailable Value
-newReturn
+tryAdditionalInputs Map TxOutRef TxSkelRedeemer
+newIns [TxSkelOut]
+newOuts [(TxOutRef, TxOut)]
+newAvailable Value
+newReturn
\ No newline at end of file
diff --git a/src/Cooked.MockChain.BlockChain.html b/src/Cooked.MockChain.BlockChain.html
index 6bea82b38..8762f6427 100644
--- a/src/Cooked.MockChain.BlockChain.html
+++ b/src/Cooked.MockChain.BlockChain.html
@@ -84,7 +84,7 @@
MCEUnknownDatum :: String -> PV2.DatumHash -> MockChainError
-- | Used to provide 'MonadFail' instances.
FailWith :: String -> MockChainError
- OtherMockChainError :: (Show err, Eq err) => err -> MockChainError
+ OtherMockChainError :: (Show err, Eq err) => err -> MockChainError
data MCEUnbalanceableError
= -- | The balancing wallet misses some value to pay what is needed to balance
@@ -97,7 +97,7 @@
(PV2.Value, [PV2.TxOutRef]) -- What was spent
(PV2.Value, [PV2.TxOutRef]) -- What is left to spend
PV2.Value -- What cannot be given back
- deriving (Int -> MCEUnbalanceableError -> ShowS
+ deriving (Int -> MCEUnbalanceableError -> ShowS
[MCEUnbalanceableError] -> ShowS
MCEUnbalanceableError -> String
(Int -> MCEUnbalanceableError -> ShowS)
@@ -114,48 +114,48 @@
$cshowsPrec :: Int -> MCEUnbalanceableError -> ShowS
Show)
-deriving instance Show MockChainError
+deriving instance Show MockChainError
-instance Eq MockChainError where
- == :: MockChainError -> MockChainError -> Bool
+instance Eq MockChainError where
+ == :: MockChainError -> MockChainError -> Bool
(==) = MockChainError -> MockChainError -> Bool
forall a. HasCallStack => a
undefined
-- | Contains methods needed for balancing.
-class (MonadFail m, MonadError MockChainError m) => MonadBlockChainBalancing m where
+class (MonadFail m, MonadError MockChainError m) => MonadBlockChainBalancing m where
-- | Returns the parameters of the chain.
- getParams :: m Emulator.Params
+ getParams :: m Emulator.Params
-- | Returns a list of all UTxOs at a certain address.
- utxosAtLedger :: PV2.Address -> m [(PV2.TxOutRef, Ledger.TxOut)]
+ utxosAtLedger :: PV2.Address -> m [(PV2.TxOutRef, Ledger.TxOut)]
-- | Returns the datum with the given hash or 'Nothing' if there is none
- datumFromHash :: PV2.DatumHash -> m (Maybe PV2.Datum)
+ datumFromHash :: PV2.DatumHash -> m (Maybe PV2.Datum)
-- | Returns the full validator corresponding to hash, if that validator owns
-- something or if it is stored in the reference script field of some UTxO.
- validatorFromHash :: PV2.ValidatorHash -> m (Maybe (Pl.Versioned PV2.Validator))
+ validatorFromHash :: PV2.ValidatorHash -> m (Maybe (Pl.Versioned PV2.Validator))
-- | Returns an output given a reference to it
- txOutByRefLedger :: PV2.TxOutRef -> m (Maybe Ledger.TxOut)
+ txOutByRefLedger :: PV2.TxOutRef -> m (Maybe Ledger.TxOut)
-class MonadBlockChainBalancing m => MonadBlockChainWithoutValidation m where
+class MonadBlockChainBalancing m => MonadBlockChainWithoutValidation m where
-- | Returns a list of all currently known outputs.
- allUtxosLedger :: m [(PV2.TxOutRef, Ledger.TxOut)]
+ allUtxosLedger :: m [(PV2.TxOutRef, Ledger.TxOut)]
-- | Returns the current slot number
- currentSlot :: m Ledger.Slot
+ currentSlot :: m Ledger.Slot
-- | Waits until the current slot becomes greater or equal to the given slot,
-- and returns the current slot after waiting.
--
-- Note that it might not wait for anything if the current slot is large
-- enough.
- awaitSlot :: Ledger.Slot -> m Ledger.Slot
+ awaitSlot :: Ledger.Slot -> m Ledger.Slot
-- | The main abstraction of the blockchain.
-class MonadBlockChainWithoutValidation m => MonadBlockChain m where
+class MonadBlockChainWithoutValidation m => MonadBlockChain m where
-- | Generates, balances and validates a transaction from a skeleton.
-- It returns the validated transaction and updates the state of the
-- blockchain. In 'MockChainT', this means:
@@ -164,9 +164,9 @@
-- - deletes the consumed datums from 'mcstDatums'
-- - adds the produced datums to 'mcstDatums'
-- - adds the validators on outputs to the 'mcstValidators'.
- validateTxSkel :: TxSkel -> m Ledger.CardanoTx
+ validateTxSkel :: TxSkel -> m Ledger.CardanoTx
-allUtxos :: MonadBlockChainWithoutValidation m => m [(PV2.TxOutRef, PV2.TxOut)]
+allUtxos :: MonadBlockChainWithoutValidation m => m [(PV2.TxOutRef, PV2.TxOut)]
allUtxos :: m [(TxOutRef, TxOut)]
allUtxos = ((TxOutRef, TxOut) -> (TxOutRef, TxOut))
-> [(TxOutRef, TxOut)] -> [(TxOutRef, TxOut)]
@@ -185,10 +185,10 @@
m [(TxOutRef, TxOut)]
allUtxosLedger
-utxosAt :: MonadBlockChainBalancing m => PV2.Address -> m [(PV2.TxOutRef, PV2.TxOut)]
+utxosAt :: MonadBlockChainBalancing m => PV2.Address -> m [(PV2.TxOutRef, PV2.TxOut)]
utxosAt :: Address -> m [(TxOutRef, TxOut)]
-utxosAt Address
-address = ((TxOutRef, TxOut) -> (TxOutRef, TxOut))
+utxosAt Address
+address = ((TxOutRef, TxOut) -> (TxOutRef, TxOut))
-> [(TxOutRef, TxOut)] -> [(TxOutRef, TxOut)]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap ((TxOut -> TxOut) -> (TxOutRef, TxOut) -> (TxOutRef, TxOut)
@@ -204,12 +204,12 @@
MonadBlockChainBalancing m =>
Address -> m [(TxOutRef, TxOut)]
utxosAtLedger Address
-address
+address
-txOutByRef :: MonadBlockChainBalancing m => PV2.TxOutRef -> m (Maybe PV2.TxOut)
+txOutByRef :: MonadBlockChainBalancing m => PV2.TxOutRef -> m (Maybe PV2.TxOut)
txOutByRef :: TxOutRef -> m (Maybe TxOut)
-txOutByRef TxOutRef
-oref = (TxOut -> TxOut) -> Maybe TxOut -> Maybe TxOut
+txOutByRef TxOutRef
+oref = (TxOut -> TxOut) -> Maybe TxOut -> Maybe TxOut
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap TxOut -> TxOut
txOutV2FromLedger (Maybe TxOut -> Maybe TxOut) -> m (Maybe TxOut) -> m (Maybe TxOut)
@@ -219,7 +219,7 @@
MonadBlockChainBalancing m =>
TxOutRef -> m (Maybe TxOut)
txOutByRefLedger TxOutRef
-oref
+oref
-- | Retrieve the ordered list of outputs of the given "CardanoTx".
--
@@ -232,13 +232,13 @@
((TxOut, TxIn) -> (TxOutRef, TxOut))
-> [(TxOut, TxIn)] -> [(TxOutRef, TxOut)]
forall a b. (a -> b) -> [a] -> [b]
-map (\(TxOut
-txOut, TxIn
-txOutRef) -> (TxIn -> TxOutRef
+map (\(TxOut
+txOut, TxIn
+txOutRef) -> (TxIn -> TxOutRef
Ledger.fromCardanoTxIn TxIn
-txOutRef, TxOut -> TxOut
+txOutRef, TxOut -> TxOut
txOutV2FromLedger TxOut
-txOut)) ([(TxOut, TxIn)] -> [(TxOutRef, TxOut)])
+txOut)) ([(TxOut, TxIn)] -> [(TxOutRef, TxOut)])
-> (CardanoTx -> [(TxOut, TxIn)])
-> CardanoTx
-> [(TxOutRef, TxOut)]
@@ -260,36 +260,36 @@
-- that; if there's a datum hash, look the corresponding datum up (with
-- 'datumFromHash'), returning @Nothing@ if it can't be found; if there's no
-- datum or hash at all, return @Nothing@.
-resolveDatum ::
- ( IsAbstractOutput out,
- ToOutputDatum (DatumType out),
- MonadBlockChainBalancing m
+resolveDatum ::
+ ( IsAbstractOutput out,
+ ToOutputDatum (DatumType out),
+ MonadBlockChainBalancing m
) =>
- out ->
- m (Maybe (ConcreteOutput (OwnerType out) PV2.Datum (ValueType out) (ReferenceScriptType out)))
+ out ->
+ m (Maybe (ConcreteOutput (OwnerType out) PV2.Datum (ValueType out) (ReferenceScriptType out)))
resolveDatum :: out
-> m (Maybe
(ConcreteOutput
(OwnerType out) Datum (ValueType out) (ReferenceScriptType out)))
-resolveDatum out
-out =
+resolveDatum out
+out =
case out -> OutputDatum
forall o.
(IsAbstractOutput o, ToOutputDatum (DatumType o)) =>
o -> OutputDatum
outputOutputDatum out
-out of
- PV2.OutputDatumHash DatumHash
-datumHash -> do
- Maybe Datum
-mDatum <- DatumHash -> m (Maybe Datum)
+out of
+ PV2.OutputDatumHash DatumHash
+datumHash -> do
+ Maybe Datum
+mDatum <- DatumHash -> m (Maybe Datum)
forall (m :: * -> *).
MonadBlockChainBalancing m =>
DatumHash -> m (Maybe Datum)
datumFromHash DatumHash
-datumHash
+datumHash
case Maybe Datum
-mDatum of
+mDatum of
Maybe Datum
Nothing -> Maybe
(ConcreteOutput
@@ -303,8 +303,8 @@
(OwnerType out) Datum (ValueType out) (ReferenceScriptType out))
forall a. Maybe a
Nothing
- Just Datum
-datum ->
+ Just Datum
+datum ->
Maybe
(ConcreteOutput
(OwnerType out) Datum (ValueType out) (ReferenceScriptType out))
@@ -363,7 +363,7 @@
-> ConcreteOutput ownerType datumType valueType referenceScriptType
ConcreteOutput
(out
-out out -> Optic' A_Lens NoIx out (OwnerType out) -> OwnerType out
+out out -> Optic' A_Lens NoIx out (OwnerType out) -> OwnerType out
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
@@ -371,7 +371,7 @@
forall o. IsAbstractOutput o => Lens' o (OwnerType o)
outputOwnerL)
(out
-out out
+out out
-> Optic' A_Lens NoIx out (Maybe StakingCredential)
-> Maybe StakingCredential
forall k s (is :: IxList) a.
@@ -381,7 +381,7 @@
forall o. IsAbstractOutput o => Lens' o (Maybe StakingCredential)
outputStakingCredentialL)
(out
-out out -> Optic' A_Lens NoIx out (ValueType out) -> ValueType out
+out out -> Optic' A_Lens NoIx out (ValueType out) -> ValueType out
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
@@ -389,9 +389,9 @@
forall o. IsAbstractOutput o => Lens' o (ValueType o)
outputValueL)
Datum
-datum
+datum
(out
-out out
+out out
-> Optic' A_Lens NoIx out (Maybe (ReferenceScriptType out))
-> Maybe (ReferenceScriptType out)
forall k s (is :: IxList) a.
@@ -402,8 +402,8 @@
IsAbstractOutput o =>
Lens' o (Maybe (ReferenceScriptType o))
outputReferenceScriptL)
- PV2.OutputDatum Datum
-datum ->
+ PV2.OutputDatum Datum
+datum ->
Maybe
(ConcreteOutput
(OwnerType out) Datum (ValueType out) (ReferenceScriptType out))
@@ -462,7 +462,7 @@
-> ConcreteOutput ownerType datumType valueType referenceScriptType
ConcreteOutput
(out
-out out -> Optic' A_Lens NoIx out (OwnerType out) -> OwnerType out
+out out -> Optic' A_Lens NoIx out (OwnerType out) -> OwnerType out
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
@@ -470,7 +470,7 @@
forall o. IsAbstractOutput o => Lens' o (OwnerType o)
outputOwnerL)
(out
-out out
+out out
-> Optic' A_Lens NoIx out (Maybe StakingCredential)
-> Maybe StakingCredential
forall k s (is :: IxList) a.
@@ -480,7 +480,7 @@
forall o. IsAbstractOutput o => Lens' o (Maybe StakingCredential)
outputStakingCredentialL)
(out
-out out -> Optic' A_Lens NoIx out (ValueType out) -> ValueType out
+out out -> Optic' A_Lens NoIx out (ValueType out) -> ValueType out
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
@@ -488,9 +488,9 @@
forall o. IsAbstractOutput o => Lens' o (ValueType o)
outputValueL)
Datum
-datum
+datum
(out
-out out
+out out
-> Optic' A_Lens NoIx out (Maybe (ReferenceScriptType out))
-> Maybe (ReferenceScriptType out)
forall k s (is :: IxList) a.
@@ -517,24 +517,24 @@
-- | Like 'resolveDatum', but also tries to use 'fromBuiltinData' to extract a
-- datum of the suitable type.
-resolveTypedDatum ::
- ( IsAbstractOutput out,
- ToOutputDatum (DatumType out),
- MonadBlockChainBalancing m,
- PV2.FromData a
+resolveTypedDatum ::
+ ( IsAbstractOutput out,
+ ToOutputDatum (DatumType out),
+ MonadBlockChainBalancing m,
+ PV2.FromData a
) =>
- out ->
- m (Maybe (ConcreteOutput (OwnerType out) a (ValueType out) (ReferenceScriptType out)))
+ out ->
+ m (Maybe (ConcreteOutput (OwnerType out) a (ValueType out) (ReferenceScriptType out)))
resolveTypedDatum :: out
-> m (Maybe
(ConcreteOutput
(OwnerType out) a (ValueType out) (ReferenceScriptType out)))
-resolveTypedDatum out
-out = do
- Maybe
+resolveTypedDatum out
+out = do
+ Maybe
(ConcreteOutput
(OwnerType out) Datum (ValueType out) (ReferenceScriptType out))
-mOut <- out
+mOut <- out
-> m (Maybe
(ConcreteOutput
(OwnerType out) Datum (ValueType out) (ReferenceScriptType out)))
@@ -546,11 +546,11 @@
(ConcreteOutput
(OwnerType out) Datum (ValueType out) (ReferenceScriptType out)))
resolveDatum out
-out
+out
case Maybe
(ConcreteOutput
(OwnerType out) Datum (ValueType out) (ReferenceScriptType out))
-mOut of
+mOut of
Maybe
(ConcreteOutput
(OwnerType out) Datum (ValueType out) (ReferenceScriptType out))
@@ -566,9 +566,9 @@
(OwnerType out) a (ValueType out) (ReferenceScriptType out))
forall a. Maybe a
Nothing
- Just ConcreteOutput
+ Just ConcreteOutput
(OwnerType out) Datum (ValueType out) (ReferenceScriptType out)
-out' ->
+out' ->
Maybe
(ConcreteOutput
(OwnerType out) a (ValueType out) (ReferenceScriptType out))
@@ -625,7 +625,7 @@
forall a. a -> Maybe a
Just (ConcreteOutput
(OwnerType out) Datum (ValueType out) (ReferenceScriptType out)
-out' ConcreteOutput
+out' ConcreteOutput
(OwnerType out) Datum (ValueType out) (ReferenceScriptType out)
-> Optic'
A_Lens
@@ -664,7 +664,7 @@
forall a. a -> Maybe a
Just (ConcreteOutput
(OwnerType out) Datum (ValueType out) (ReferenceScriptType out)
-out' ConcreteOutput
+out' ConcreteOutput
(OwnerType out) Datum (ValueType out) (ReferenceScriptType out)
-> Optic'
A_Lens
@@ -701,7 +701,7 @@
forall a. a -> Maybe a
Just (ConcreteOutput
(OwnerType out) Datum (ValueType out) (ReferenceScriptType out)
-out' ConcreteOutput
+out' ConcreteOutput
(OwnerType out) Datum (ValueType out) (ReferenceScriptType out)
-> Optic'
A_Lens
@@ -732,10 +732,10 @@
-> ConcreteOutput
(OwnerType out) a (ValueType out) (ReferenceScriptType out))
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
-<*> (let PV2.Datum BuiltinData
-datum = ConcreteOutput
+<*> (let PV2.Datum BuiltinData
+datum = ConcreteOutput
(OwnerType out) Datum (ValueType out) (ReferenceScriptType out)
-out' ConcreteOutput
+out' ConcreteOutput
(OwnerType out) Datum (ValueType out) (ReferenceScriptType out)
-> Optic'
A_Lens
@@ -757,7 +757,7 @@
outputDatumL in BuiltinData -> Maybe a
forall a. FromData a => BuiltinData -> Maybe a
PV2.fromBuiltinData BuiltinData
-datum)
+datum)
Maybe
(Maybe (ReferenceScriptType out)
-> ConcreteOutput
@@ -772,7 +772,7 @@
forall a. a -> Maybe a
Just (ConcreteOutput
(OwnerType out) Datum (ValueType out) (ReferenceScriptType out)
-out' ConcreteOutput
+out' ConcreteOutput
(OwnerType out) Datum (ValueType out) (ReferenceScriptType out)
-> Optic'
A_Lens
@@ -798,13 +798,13 @@
-- | Try to resolve the validator that owns an output: If the output is owned by
-- a public key, or if the validator's hash is not known (i.e. if
-- 'validatorFromHash' returns @Nothing@) return @Nothing@.
-resolveValidator ::
- ( IsAbstractOutput out,
- ToCredential (OwnerType out),
- MonadBlockChainBalancing m
+resolveValidator ::
+ ( IsAbstractOutput out,
+ ToCredential (OwnerType out),
+ MonadBlockChainBalancing m
) =>
- out ->
- m (Maybe (ConcreteOutput (Pl.Versioned PV2.Validator) (DatumType out) (ValueType out) (ReferenceScriptType out)))
+ out ->
+ m (Maybe (ConcreteOutput (Pl.Versioned PV2.Validator) (DatumType out) (ValueType out) (ReferenceScriptType out)))
resolveValidator :: out
-> m (Maybe
(ConcreteOutput
@@ -812,12 +812,12 @@
(DatumType out)
(ValueType out)
(ReferenceScriptType out)))
-resolveValidator out
-out =
+resolveValidator out
+out =
case OwnerType out -> Credential
forall a. ToCredential a => a -> Credential
toCredential (out
-out out -> Optic' A_Lens NoIx out (OwnerType out) -> OwnerType out
+out out -> Optic' A_Lens NoIx out (OwnerType out) -> OwnerType out
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
@@ -846,17 +846,17 @@
(ReferenceScriptType out))
forall a. Maybe a
Nothing
- PV2.ScriptCredential ValidatorHash
-valHash -> do
- Maybe (Versioned Validator)
-mVal <- ValidatorHash -> m (Maybe (Versioned Validator))
+ PV2.ScriptCredential ValidatorHash
+valHash -> do
+ Maybe (Versioned Validator)
+mVal <- ValidatorHash -> m (Maybe (Versioned Validator))
forall (m :: * -> *).
MonadBlockChainBalancing m =>
ValidatorHash -> m (Maybe (Versioned Validator))
validatorFromHash ValidatorHash
-valHash
+valHash
case Maybe (Versioned Validator)
-mVal of
+mVal of
Maybe (Versioned Validator)
Nothing -> Maybe
(ConcreteOutput
@@ -879,8 +879,8 @@
(ReferenceScriptType out))
forall a. Maybe a
Nothing
- Just Versioned Validator
-val ->
+ Just Versioned Validator
+val ->
Maybe
(ConcreteOutput
(Versioned Validator)
@@ -984,9 +984,9 @@
-> ConcreteOutput ownerType datumType valueType referenceScriptType
ConcreteOutput
Versioned Validator
-val
+val
(out
-out out
+out out
-> Optic' A_Lens NoIx out (Maybe StakingCredential)
-> Maybe StakingCredential
forall k s (is :: IxList) a.
@@ -996,7 +996,7 @@
forall o. IsAbstractOutput o => Lens' o (Maybe StakingCredential)
outputStakingCredentialL)
(out
-out out -> Optic' A_Lens NoIx out (ValueType out) -> ValueType out
+out out -> Optic' A_Lens NoIx out (ValueType out) -> ValueType out
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
@@ -1004,7 +1004,7 @@
forall o. IsAbstractOutput o => Lens' o (ValueType o)
outputValueL)
(out
-out out -> Optic' A_Lens NoIx out (DatumType out) -> DatumType out
+out out -> Optic' A_Lens NoIx out (DatumType out) -> DatumType out
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
@@ -1012,7 +1012,7 @@
forall o. IsAbstractOutput o => Lens' o (DatumType o)
outputDatumL)
(out
-out out
+out out
-> Optic' A_Lens NoIx out (Maybe (ReferenceScriptType out))
-> Maybe (ReferenceScriptType out)
forall k s (is :: IxList) a.
@@ -1027,13 +1027,13 @@
-- | Try to resolve the reference script on an output: If the output has no
-- reference script, or if the reference script's hash is not known (i.e. if
-- 'validatorFromHash' returns @Nothing@), this function will return @Nothing@.
-resolveReferenceScript ::
- ( IsAbstractOutput out,
- ToScriptHash (ReferenceScriptType out),
- MonadBlockChainBalancing m
+resolveReferenceScript ::
+ ( IsAbstractOutput out,
+ ToScriptHash (ReferenceScriptType out),
+ MonadBlockChainBalancing m
) =>
- out ->
- m (Maybe (ConcreteOutput (OwnerType out) (DatumType out) (ValueType out) (Pl.Versioned PV2.Validator)))
+ out ->
+ m (Maybe (ConcreteOutput (OwnerType out) (DatumType out) (ValueType out) (Pl.Versioned PV2.Validator)))
resolveReferenceScript :: out
-> m (Maybe
(ConcreteOutput
@@ -1041,14 +1041,14 @@
(DatumType out)
(ValueType out)
(Versioned Validator)))
-resolveReferenceScript out
-out =
+resolveReferenceScript out
+out =
case out -> Maybe ScriptHash
forall o.
(IsAbstractOutput o, ToScriptHash (ReferenceScriptType o)) =>
o -> Maybe ScriptHash
outputReferenceScriptHash out
-out of
+out of
Maybe ScriptHash
Nothing -> Maybe
(ConcreteOutput
@@ -1071,18 +1071,18 @@
(Versioned Validator))
forall a. Maybe a
Nothing
- Just (PV2.ScriptHash BuiltinByteString
-hash) -> do
- Maybe (Versioned Validator)
-mVal <- ValidatorHash -> m (Maybe (Versioned Validator))
+ Just (PV2.ScriptHash BuiltinByteString
+hash) -> do
+ Maybe (Versioned Validator)
+mVal <- ValidatorHash -> m (Maybe (Versioned Validator))
forall (m :: * -> *).
MonadBlockChainBalancing m =>
ValidatorHash -> m (Maybe (Versioned Validator))
validatorFromHash (BuiltinByteString -> ValidatorHash
PV2.ValidatorHash BuiltinByteString
-hash)
+hash)
case Maybe (Versioned Validator)
-mVal of
+mVal of
Maybe (Versioned Validator)
Nothing -> Maybe
(ConcreteOutput
@@ -1105,8 +1105,8 @@
(Versioned Validator))
forall a. Maybe a
Nothing
- Just Versioned Validator
-val ->
+ Just Versioned Validator
+val ->
Maybe
(ConcreteOutput
(OwnerType out)
@@ -1210,7 +1210,7 @@
-> ConcreteOutput ownerType datumType valueType referenceScriptType
ConcreteOutput
(out
-out out -> Optic' A_Lens NoIx out (OwnerType out) -> OwnerType out
+out out -> Optic' A_Lens NoIx out (OwnerType out) -> OwnerType out
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
@@ -1218,7 +1218,7 @@
forall o. IsAbstractOutput o => Lens' o (OwnerType o)
outputOwnerL)
(out
-out out
+out out
-> Optic' A_Lens NoIx out (Maybe StakingCredential)
-> Maybe StakingCredential
forall k s (is :: IxList) a.
@@ -1228,7 +1228,7 @@
forall o. IsAbstractOutput o => Lens' o (Maybe StakingCredential)
outputStakingCredentialL)
(out
-out out -> Optic' A_Lens NoIx out (ValueType out) -> ValueType out
+out out -> Optic' A_Lens NoIx out (ValueType out) -> ValueType out
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
@@ -1236,7 +1236,7 @@
forall o. IsAbstractOutput o => Lens' o (ValueType o)
outputValueL)
(out
-out out -> Optic' A_Lens NoIx out (DatumType out) -> DatumType out
+out out -> Optic' A_Lens NoIx out (DatumType out) -> DatumType out
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
@@ -1246,29 +1246,29 @@
(Versioned Validator -> Maybe (Versioned Validator)
forall a. a -> Maybe a
Just Versioned Validator
-val)
+val)
-outputDatumFromTxOutRef :: MonadBlockChainWithoutValidation m => PV2.TxOutRef -> m (Maybe PV2.OutputDatum)
+outputDatumFromTxOutRef :: MonadBlockChainWithoutValidation m => PV2.TxOutRef -> m (Maybe PV2.OutputDatum)
outputDatumFromTxOutRef :: TxOutRef -> m (Maybe OutputDatum)
-outputDatumFromTxOutRef TxOutRef
-oref = do
- Maybe TxOut
-mOut <- TxOutRef -> m (Maybe TxOut)
+outputDatumFromTxOutRef TxOutRef
+oref = do
+ Maybe TxOut
+mOut <- TxOutRef -> m (Maybe TxOut)
forall (m :: * -> *).
MonadBlockChainBalancing m =>
TxOutRef -> m (Maybe TxOut)
txOutByRef TxOutRef
-oref
+oref
case Maybe TxOut
-mOut of
+mOut of
Maybe TxOut
Nothing -> Maybe OutputDatum -> m (Maybe OutputDatum)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe OutputDatum
forall a. Maybe a
Nothing
- Just TxOut
-out -> Maybe OutputDatum -> m (Maybe OutputDatum)
+ Just TxOut
+out -> Maybe OutputDatum -> m (Maybe OutputDatum)
forall (m :: * -> *) a. Monad m => a -> m a
return (Maybe OutputDatum -> m (Maybe OutputDatum))
-> (OutputDatum -> Maybe OutputDatum)
@@ -1285,21 +1285,21 @@
(IsAbstractOutput o, ToOutputDatum (DatumType o)) =>
o -> OutputDatum
outputOutputDatum TxOut
-out
+out
-datumFromTxOutRef :: MonadBlockChainWithoutValidation m => PV2.TxOutRef -> m (Maybe PV2.Datum)
+datumFromTxOutRef :: MonadBlockChainWithoutValidation m => PV2.TxOutRef -> m (Maybe PV2.Datum)
datumFromTxOutRef :: TxOutRef -> m (Maybe Datum)
-datumFromTxOutRef TxOutRef
-oref = do
- Maybe OutputDatum
-mOutputDatum <- TxOutRef -> m (Maybe OutputDatum)
+datumFromTxOutRef TxOutRef
+oref = do
+ Maybe OutputDatum
+mOutputDatum <- TxOutRef -> m (Maybe OutputDatum)
forall (m :: * -> *).
MonadBlockChainWithoutValidation m =>
TxOutRef -> m (Maybe OutputDatum)
outputDatumFromTxOutRef TxOutRef
-oref
+oref
case Maybe OutputDatum
-mOutputDatum of
+mOutputDatum of
Maybe OutputDatum
Nothing -> Maybe Datum -> m (Maybe Datum)
forall (m :: * -> *) a. Monad m => a -> m a
@@ -1312,35 +1312,35 @@
return Maybe Datum
forall a. Maybe a
Nothing
- Just (PV2.OutputDatum Datum
-datum) -> Maybe Datum -> m (Maybe Datum)
+ Just (PV2.OutputDatum Datum
+datum) -> Maybe Datum -> m (Maybe Datum)
forall (m :: * -> *) a. Monad m => a -> m a
return (Maybe Datum -> m (Maybe Datum)) -> Maybe Datum -> m (Maybe Datum)
forall a b. (a -> b) -> a -> b
$ Datum -> Maybe Datum
forall a. a -> Maybe a
Just Datum
-datum
- Just (PV2.OutputDatumHash DatumHash
-datumHash) -> do
- Maybe Datum
-mDatum <- DatumHash -> m (Maybe Datum)
+datum
+ Just (PV2.OutputDatumHash DatumHash
+datumHash) -> do
+ Maybe Datum
+mDatum <- DatumHash -> m (Maybe Datum)
forall (m :: * -> *).
MonadBlockChainBalancing m =>
DatumHash -> m (Maybe Datum)
datumFromHash DatumHash
-datumHash
+datumHash
case Maybe Datum
-mDatum of
- Just Datum
-datum -> Maybe Datum -> m (Maybe Datum)
+mDatum of
+ Just Datum
+datum -> Maybe Datum -> m (Maybe Datum)
forall (m :: * -> *) a. Monad m => a -> m a
return (Maybe Datum -> m (Maybe Datum)) -> Maybe Datum -> m (Maybe Datum)
forall a b. (a -> b) -> a -> b
$ Datum -> Maybe Datum
forall a. a -> Maybe a
Just Datum
-datum
+datum
Maybe Datum
Nothing -> Maybe Datum -> m (Maybe Datum)
forall (m :: * -> *) a. Monad m => a -> m a
@@ -1348,56 +1348,56 @@
forall a. Maybe a
Nothing
-typedDatumFromTxOutRef :: (PV2.FromData a, MonadBlockChainWithoutValidation m) => PV2.TxOutRef -> m (Maybe a)
+typedDatumFromTxOutRef :: (PV2.FromData a, MonadBlockChainWithoutValidation m) => PV2.TxOutRef -> m (Maybe a)
typedDatumFromTxOutRef :: TxOutRef -> m (Maybe a)
-typedDatumFromTxOutRef TxOutRef
-oref = do
- Maybe Datum
-mDatum <- TxOutRef -> m (Maybe Datum)
+typedDatumFromTxOutRef TxOutRef
+oref = do
+ Maybe Datum
+mDatum <- TxOutRef -> m (Maybe Datum)
forall (m :: * -> *).
MonadBlockChainWithoutValidation m =>
TxOutRef -> m (Maybe Datum)
datumFromTxOutRef TxOutRef
-oref
+oref
case Maybe Datum
-mDatum of
+mDatum of
Maybe Datum
Nothing -> Maybe a -> m (Maybe a)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe a
forall a. Maybe a
Nothing
- Just (PV2.Datum BuiltinData
-datum) -> Maybe a -> m (Maybe a)
+ Just (PV2.Datum BuiltinData
+datum) -> Maybe a -> m (Maybe a)
forall (m :: * -> *) a. Monad m => a -> m a
return (Maybe a -> m (Maybe a)) -> Maybe a -> m (Maybe a)
forall a b. (a -> b) -> a -> b
$ BuiltinData -> Maybe a
forall a. FromData a => BuiltinData -> Maybe a
PV2.fromBuiltinData BuiltinData
-datum
+datum
-valueFromTxOutRef :: MonadBlockChainWithoutValidation m => PV2.TxOutRef -> m (Maybe PV2.Value)
+valueFromTxOutRef :: MonadBlockChainWithoutValidation m => PV2.TxOutRef -> m (Maybe PV2.Value)
valueFromTxOutRef :: TxOutRef -> m (Maybe Value)
-valueFromTxOutRef TxOutRef
-oref = do
- Maybe TxOut
-mOut <- TxOutRef -> m (Maybe TxOut)
+valueFromTxOutRef TxOutRef
+oref = do
+ Maybe TxOut
+mOut <- TxOutRef -> m (Maybe TxOut)
forall (m :: * -> *).
MonadBlockChainBalancing m =>
TxOutRef -> m (Maybe TxOut)
txOutByRef TxOutRef
-oref
+oref
case Maybe TxOut
-mOut of
+mOut of
Maybe TxOut
Nothing -> Maybe Value -> m (Maybe Value)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Value
forall a. Maybe a
Nothing
- Just TxOut
-out -> Maybe Value -> m (Maybe Value)
+ Just TxOut
+out -> Maybe Value -> m (Maybe Value)
forall (m :: * -> *) a. Monad m => a -> m a
return (Maybe Value -> m (Maybe Value))
-> (Value -> Maybe Value) -> Value -> m (Maybe Value)
@@ -1409,7 +1409,7 @@
$ TxOut -> Value
forall o. (IsAbstractOutput o, ToValue (ValueType o)) => o -> Value
outputValue TxOut
-out
+out
-- ** Slot and Time Management
@@ -1423,12 +1423,12 @@
-- the docs on 'autoSlotIncrease' to be able to simulate sending transactions in parallel.
-- | Moves n slots fowards
-waitNSlots :: (MonadBlockChainWithoutValidation m) => Integer -> m Ledger.Slot
+waitNSlots :: (MonadBlockChainWithoutValidation m) => Integer -> m Ledger.Slot
waitNSlots :: Integer -> m Slot
-waitNSlots Integer
-n =
+waitNSlots Integer
+n =
if Integer
-n Integer -> Integer -> Bool
+n Integer -> Integer -> Bool
forall a. Ord a => a -> a -> Bool
< Integer
0
@@ -1451,10 +1451,10 @@
+ Integer -> Slot
forall a b. (Integral a, Num b) => a -> b
fromIntegral Integer
-n)
+n)
-- | Returns the closed ms interval corresponding to the current slot
-currentTime :: (MonadBlockChainWithoutValidation m) => m (PV2.POSIXTime, PV2.POSIXTime)
+currentTime :: (MonadBlockChainWithoutValidation m) => m (PV2.POSIXTime, PV2.POSIXTime)
currentTime :: m (POSIXTime, POSIXTime)
currentTime = Slot -> m (POSIXTime, POSIXTime)
forall (m :: * -> *).
@@ -1479,12 +1479,12 @@
-- and
--
-- > slotToTimeInterval n == (a, b) ==> getEnclosingSlot (a-1) == n-1 && getEnclosingSlot (b+1) == n+1
-slotToTimeInterval :: (MonadBlockChainWithoutValidation m) => Ledger.Slot -> m (PV2.POSIXTime, PV2.POSIXTime)
+slotToTimeInterval :: (MonadBlockChainWithoutValidation m) => Ledger.Slot -> m (PV2.POSIXTime, PV2.POSIXTime)
slotToTimeInterval :: Slot -> m (POSIXTime, POSIXTime)
-slotToTimeInterval Slot
-slot = do
- SlotConfig
-slotConfig <- Params -> SlotConfig
+slotToTimeInterval Slot
+slot = do
+ SlotConfig
+slotConfig <- Params -> SlotConfig
Emulator.pSlotConfig (Params -> SlotConfig) -> m Params -> m SlotConfig
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> m Params
@@ -1492,29 +1492,29 @@
getParams
case SlotConfig -> Slot -> POSIXTimeRange
Emulator.slotToPOSIXTimeRange SlotConfig
-slotConfig Slot
-slot of
+slotConfig Slot
+slot of
PV2.Interval
- (PV2.LowerBound (PV2.Finite POSIXTime
-l) Bool
-leftclosed)
- (PV2.UpperBound (PV2.Finite POSIXTime
-r) Bool
-rightclosed) ->
+ (PV2.LowerBound (PV2.Finite POSIXTime
+l) Bool
+leftclosed)
+ (PV2.UpperBound (PV2.Finite POSIXTime
+r) Bool
+rightclosed) ->
(POSIXTime, POSIXTime) -> m (POSIXTime, POSIXTime)
forall (m :: * -> *) a. Monad m => a -> m a
return
( if Bool
-leftclosed then POSIXTime
-l else POSIXTime
-l POSIXTime -> POSIXTime -> POSIXTime
+leftclosed then POSIXTime
+l else POSIXTime
+l POSIXTime -> POSIXTime -> POSIXTime
forall a. Num a => a -> a -> a
+ POSIXTime
1,
if Bool
-rightclosed then POSIXTime
-r else POSIXTime
-r POSIXTime -> POSIXTime -> POSIXTime
+rightclosed then POSIXTime
+r else POSIXTime
+r POSIXTime -> POSIXTime -> POSIXTime
forall a. Num a => a -> a -> a
- POSIXTime
1
@@ -1527,12 +1527,12 @@
-- | Return the slot that contains the given time. See 'slotToTimeInterval' for
-- some equational properties this function satisfies.
-getEnclosingSlot :: (MonadBlockChainWithoutValidation m) => PV2.POSIXTime -> m Ledger.Slot
+getEnclosingSlot :: (MonadBlockChainWithoutValidation m) => PV2.POSIXTime -> m Ledger.Slot
getEnclosingSlot :: POSIXTime -> m Slot
-getEnclosingSlot POSIXTime
-t = do
- SlotConfig
-slotConfig <- Params -> SlotConfig
+getEnclosingSlot POSIXTime
+t = do
+ SlotConfig
+slotConfig <- Params -> SlotConfig
Emulator.pSlotConfig (Params -> SlotConfig) -> m Params -> m SlotConfig
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> m Params
@@ -1544,12 +1544,12 @@
forall a b. (a -> b) -> a -> b
$ SlotConfig -> POSIXTime -> Slot
Emulator.posixTimeToEnclosingSlot SlotConfig
-slotConfig POSIXTime
-t
+slotConfig POSIXTime
+t
-- | Waits until the current slot becomes greater or equal to the slot containing the given POSIX time.
-- Note that that it might not wait for anything if the current slot is large enough.
-awaitEnclosingSlot :: (MonadBlockChainWithoutValidation m) => PV2.POSIXTime -> m Ledger.Slot
+awaitEnclosingSlot :: (MonadBlockChainWithoutValidation m) => PV2.POSIXTime -> m Ledger.Slot
awaitEnclosingSlot :: POSIXTime -> m Slot
awaitEnclosingSlot = Slot -> m Slot
forall (m :: * -> *).
@@ -1566,34 +1566,34 @@
getEnclosingSlot
-- | The infinite range of slots ending before or at the given POSIX time
-slotRangeBefore :: MonadBlockChainWithoutValidation m => PV2.POSIXTime -> m Ledger.SlotRange
+slotRangeBefore :: MonadBlockChainWithoutValidation m => PV2.POSIXTime -> m Ledger.SlotRange
slotRangeBefore :: POSIXTime -> m SlotRange
-slotRangeBefore POSIXTime
-t = do
- Slot
-n <- POSIXTime -> m Slot
+slotRangeBefore POSIXTime
+t = do
+ Slot
+n <- POSIXTime -> m Slot
forall (m :: * -> *).
MonadBlockChainWithoutValidation m =>
POSIXTime -> m Slot
getEnclosingSlot POSIXTime
-t
+t
(POSIXTime
-_, POSIXTime
-b) <- Slot -> m (POSIXTime, POSIXTime)
+_, POSIXTime
+b) <- Slot -> m (POSIXTime, POSIXTime)
forall (m :: * -> *).
MonadBlockChainWithoutValidation m =>
Slot -> m (POSIXTime, POSIXTime)
slotToTimeInterval Slot
-n
+n
-- If the given time @t@ happens to be the last millisecond of its slot, we
-- can include the whole slot. Otherwise, the only way to be sure that the
-- returned slot range contains no time after @t@ is to go to the preceding
-- slot.
if POSIXTime
-t POSIXTime -> POSIXTime -> Bool
+t POSIXTime -> POSIXTime -> Bool
forall a. Eq a => a -> a -> Bool
== POSIXTime
-b
+b
then SlotRange -> m SlotRange
forall (m :: * -> *) a. Monad m => a -> m a
return (SlotRange -> m SlotRange) -> SlotRange -> m SlotRange
@@ -1601,7 +1601,7 @@
$ Slot -> SlotRange
forall a. a -> Interval a
PV2.to Slot
-n
+n
else SlotRange -> m SlotRange
forall (m :: * -> *) a. Monad m => a -> m a
return (SlotRange -> m SlotRange) -> SlotRange -> m SlotRange
@@ -1609,36 +1609,36 @@
$ Slot -> SlotRange
forall a. a -> Interval a
PV2.to (Slot
-n Slot -> Slot -> Slot
+n Slot -> Slot -> Slot
forall a. Num a => a -> a -> a
- Slot
1)
-- | The infinite range of slots starting after or at the given POSIX time
-slotRangeAfter :: MonadBlockChainWithoutValidation m => PV2.POSIXTime -> m Ledger.SlotRange
+slotRangeAfter :: MonadBlockChainWithoutValidation m => PV2.POSIXTime -> m Ledger.SlotRange
slotRangeAfter :: POSIXTime -> m SlotRange
-slotRangeAfter POSIXTime
-t = do
- Slot
-n <- POSIXTime -> m Slot
+slotRangeAfter POSIXTime
+t = do
+ Slot
+n <- POSIXTime -> m Slot
forall (m :: * -> *).
MonadBlockChainWithoutValidation m =>
POSIXTime -> m Slot
getEnclosingSlot POSIXTime
-t
- (POSIXTime
-a, POSIXTime
+t
+ (POSIXTime
+a, POSIXTime
_) <- Slot -> m (POSIXTime, POSIXTime)
forall (m :: * -> *).
MonadBlockChainWithoutValidation m =>
Slot -> m (POSIXTime, POSIXTime)
slotToTimeInterval Slot
-n
+n
if POSIXTime
-t POSIXTime -> POSIXTime -> Bool
+t POSIXTime -> POSIXTime -> Bool
forall a. Eq a => a -> a -> Bool
== POSIXTime
-a
+a
then SlotRange -> m SlotRange
forall (m :: * -> *) a. Monad m => a -> m a
return (SlotRange -> m SlotRange) -> SlotRange -> m SlotRange
@@ -1646,7 +1646,7 @@
$ Slot -> SlotRange
forall a. a -> Interval a
PV2.from Slot
-n
+n
else SlotRange -> m SlotRange
forall (m :: * -> *) a. Monad m => a -> m a
return (SlotRange -> m SlotRange) -> SlotRange -> m SlotRange
@@ -1654,7 +1654,7 @@
$ Slot -> SlotRange
forall a. a -> Interval a
PV2.from (Slot
-n Slot -> Slot -> Slot
+n Slot -> Slot -> Slot
forall a. Num a => a -> a -> a
+ Slot
1)
@@ -1669,9 +1669,9 @@
-- > deriving via (AsTrans (ReaderT r) m) instance MonadBlockChain m => MonadBlockChain (ReaderT r m)
--
-- and avoid the boilerplate of defining all the methods of the class yourself.
-newtype AsTrans t (m :: Type -> Type) a = AsTrans {AsTrans t m a -> t m a
-getTrans :: t m a}
- deriving newtype (a -> AsTrans t m b -> AsTrans t m a
+newtype AsTrans t (m :: Type -> Type) a = AsTrans {AsTrans t m a -> t m a
+getTrans :: t m a}
+ deriving newtype (a -> AsTrans t m b -> AsTrans t m a
(a -> b) -> AsTrans t m a -> AsTrans t m b
(forall a b. (a -> b) -> AsTrans t m a -> AsTrans t m b)
-> (forall a b. a -> AsTrans t m b -> AsTrans t m a)
@@ -1695,7 +1695,7 @@
$cfmap :: forall (t :: (* -> *) -> * -> *) (m :: * -> *) a b.
Functor (t m) =>
(a -> b) -> AsTrans t m a -> AsTrans t m b
-Functor, Functor (AsTrans t m)
+Functor, Functor (AsTrans t m)
a -> AsTrans t m a
Functor (AsTrans t m)
-> (forall a. a -> AsTrans t m a)
@@ -1765,7 +1765,7 @@
$cp1Applicative :: forall (t :: (* -> *) -> * -> *) (m :: * -> *).
Applicative (t m) =>
Functor (AsTrans t m)
-Applicative, Applicative (AsTrans t m)
+Applicative, Applicative (AsTrans t m)
a -> AsTrans t m a
Applicative (AsTrans t m)
-> (forall a b.
@@ -1811,7 +1811,7 @@
$cp1Monad :: forall (t :: (* -> *) -> * -> *) (m :: * -> *).
Monad (t m) =>
Applicative (AsTrans t m)
-Monad, m a -> AsTrans t m a
+Monad, m a -> AsTrans t m a
(forall (m :: * -> *) a. Monad m => m a -> AsTrans t m a)
-> MonadTrans (AsTrans t)
forall (m :: * -> *) a. Monad m => m a -> AsTrans t m a
@@ -1824,7 +1824,7 @@
$clift :: forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> AsTrans t m a
-MonadTrans, MonadTrans (AsTrans t)
+MonadTrans, MonadTrans (AsTrans t)
m (StT (AsTrans t) a) -> AsTrans t m a
MonadTrans (AsTrans t)
-> (forall (m :: * -> *) a.
@@ -1868,8 +1868,8 @@
MonadTrans (AsTrans t)
MonadTransControl)
-instance (MonadTrans t, MonadFail m, Monad (t m)) => MonadFail (AsTrans t m) where
- fail :: String -> AsTrans t m a
+instance (MonadTrans t, MonadFail m, Monad (t m)) => MonadFail (AsTrans t m) where
+ fail :: String -> AsTrans t m a
fail = m a -> AsTrans t m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
@@ -1881,8 +1881,8 @@
forall (m :: * -> *) a. MonadFail m => String -> m a
fail
-instance (MonadTransControl t, MonadError MockChainError m, Monad (t m)) => MonadError MockChainError (AsTrans t m) where
- throwError :: MockChainError -> AsTrans t m a
+instance (MonadTransControl t, MonadError MockChainError m, Monad (t m)) => MonadError MockChainError (AsTrans t m) where
+ throwError :: MockChainError -> AsTrans t m a
throwError = m a -> AsTrans t m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
@@ -1893,30 +1893,30 @@
. MockChainError -> m a
forall e (m :: * -> *) a. MonadError e m => e -> m a
throwError
- catchError :: AsTrans t m a -> (MockChainError -> AsTrans t m a) -> AsTrans t m a
-catchError AsTrans t m a
-act MockChainError -> AsTrans t m a
-f = (Run (AsTrans t) -> m (StT t a)) -> AsTrans t m (StT t a)
+ catchError :: AsTrans t m a -> (MockChainError -> AsTrans t m a) -> AsTrans t m a
+catchError AsTrans t m a
+act MockChainError -> AsTrans t m a
+f = (Run (AsTrans t) -> m (StT t a)) -> AsTrans t m (StT t a)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTransControl t, Monad m) =>
(Run t -> m a) -> t m a
-liftWith (\Run (AsTrans t)
-run -> m (StT t a) -> (MockChainError -> m (StT t a)) -> m (StT t a)
+liftWith (\Run (AsTrans t)
+run -> m (StT t a) -> (MockChainError -> m (StT t a)) -> m (StT t a)
forall e (m :: * -> *) a.
MonadError e m =>
m a -> (e -> m a) -> m a
catchError (AsTrans t m a -> m (StT (AsTrans t) a)
Run (AsTrans t)
-run AsTrans t m a
-act) (AsTrans t m a -> m (StT t a)
+run AsTrans t m a
+act) (AsTrans t m a -> m (StT t a)
Run (AsTrans t)
-run (AsTrans t m a -> m (StT t a))
+run (AsTrans t m a -> m (StT t a))
-> (MockChainError -> AsTrans t m a)
-> MockChainError
-> m (StT t a)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. MockChainError -> AsTrans t m a
-f)) AsTrans t m (StT t a)
+f)) AsTrans t m (StT t a)
-> (StT t a -> AsTrans t m a) -> AsTrans t m a
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= m (StT t a) -> AsTrans t m a
@@ -1930,17 +1930,17 @@
forall (m :: * -> *) a. Monad m => a -> m a
return
-instance (MonadTrans t, MonadBlockChainBalancing m, Monad (t m), MonadError MockChainError (AsTrans t m)) => MonadBlockChainBalancing (AsTrans t m) where
- getParams :: AsTrans t m Params
-getParams = m Params -> AsTrans t m Params
+instance (MonadTrans t, MonadBlockChainBalancing m, Monad (t m), MonadError MockChainError (AsTrans t m)) => MonadBlockChainBalancing (AsTrans t m) where
+ getParams :: AsTrans t m Params
+getParams = m Params -> AsTrans t m Params
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift m Params
forall (m :: * -> *). MonadBlockChainBalancing m => m Params
getParams
- validatorFromHash :: ValidatorHash -> AsTrans t m (Maybe (Versioned Validator))
-validatorFromHash = m (Maybe (Versioned Validator))
+ validatorFromHash :: ValidatorHash -> AsTrans t m (Maybe (Versioned Validator))
+validatorFromHash = m (Maybe (Versioned Validator))
-> AsTrans t m (Maybe (Versioned Validator))
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
@@ -1956,8 +1956,8 @@
MonadBlockChainBalancing m =>
ValidatorHash -> m (Maybe (Versioned Validator))
validatorFromHash
- utxosAtLedger :: Address -> AsTrans t m [(TxOutRef, TxOut)]
-utxosAtLedger = m [(TxOutRef, TxOut)] -> AsTrans t m [(TxOutRef, TxOut)]
+ utxosAtLedger :: Address -> AsTrans t m [(TxOutRef, TxOut)]
+utxosAtLedger = m [(TxOutRef, TxOut)] -> AsTrans t m [(TxOutRef, TxOut)]
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
@@ -1971,8 +1971,8 @@
MonadBlockChainBalancing m =>
Address -> m [(TxOutRef, TxOut)]
utxosAtLedger
- txOutByRefLedger :: TxOutRef -> AsTrans t m (Maybe TxOut)
-txOutByRefLedger = m (Maybe TxOut) -> AsTrans t m (Maybe TxOut)
+ txOutByRefLedger :: TxOutRef -> AsTrans t m (Maybe TxOut)
+txOutByRefLedger = m (Maybe TxOut) -> AsTrans t m (Maybe TxOut)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
@@ -1986,8 +1986,8 @@
MonadBlockChainBalancing m =>
TxOutRef -> m (Maybe TxOut)
txOutByRefLedger
- datumFromHash :: DatumHash -> AsTrans t m (Maybe Datum)
-datumFromHash = m (Maybe Datum) -> AsTrans t m (Maybe Datum)
+ datumFromHash :: DatumHash -> AsTrans t m (Maybe Datum)
+datumFromHash = m (Maybe Datum) -> AsTrans t m (Maybe Datum)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
@@ -2002,9 +2002,9 @@
DatumHash -> m (Maybe Datum)
datumFromHash
-instance (MonadTrans t, MonadBlockChainWithoutValidation m, Monad (t m), MonadError MockChainError (AsTrans t m)) => MonadBlockChainWithoutValidation (AsTrans t m) where
- allUtxosLedger :: AsTrans t m [(TxOutRef, TxOut)]
-allUtxosLedger = m [(TxOutRef, TxOut)] -> AsTrans t m [(TxOutRef, TxOut)]
+instance (MonadTrans t, MonadBlockChainWithoutValidation m, Monad (t m), MonadError MockChainError (AsTrans t m)) => MonadBlockChainWithoutValidation (AsTrans t m) where
+ allUtxosLedger :: AsTrans t m [(TxOutRef, TxOut)]
+allUtxosLedger = m [(TxOutRef, TxOut)] -> AsTrans t m [(TxOutRef, TxOut)]
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
@@ -2013,16 +2013,16 @@
MonadBlockChainWithoutValidation m =>
m [(TxOutRef, TxOut)]
allUtxosLedger
- currentSlot :: AsTrans t m Slot
-currentSlot = m Slot -> AsTrans t m Slot
+ currentSlot :: AsTrans t m Slot
+currentSlot = m Slot -> AsTrans t m Slot
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift m Slot
forall (m :: * -> *). MonadBlockChainWithoutValidation m => m Slot
currentSlot
- awaitSlot :: Slot -> AsTrans t m Slot
-awaitSlot = m Slot -> AsTrans t m Slot
+ awaitSlot :: Slot -> AsTrans t m Slot
+awaitSlot = m Slot -> AsTrans t m Slot
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
@@ -2035,9 +2035,9 @@
Slot -> m Slot
awaitSlot
-instance (MonadTrans t, MonadBlockChain m, MonadBlockChainWithoutValidation (AsTrans t m)) => MonadBlockChain (AsTrans t m) where
- validateTxSkel :: TxSkel -> AsTrans t m CardanoTx
-validateTxSkel = m CardanoTx -> AsTrans t m CardanoTx
+instance (MonadTrans t, MonadBlockChain m, MonadBlockChainWithoutValidation (AsTrans t m)) => MonadBlockChain (AsTrans t m) where
+ validateTxSkel :: TxSkel -> AsTrans t m CardanoTx
+validateTxSkel = m CardanoTx -> AsTrans t m CardanoTx
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
@@ -2048,23 +2048,23 @@
forall (m :: * -> *). MonadBlockChain m => TxSkel -> m CardanoTx
validateTxSkel
-deriving via (AsTrans (WriterT w) m) instance (Monoid w, MonadBlockChainBalancing m) => MonadBlockChainBalancing (WriterT w m)
+deriving via (AsTrans (WriterT w) m) instance (Monoid w, MonadBlockChainBalancing m) => MonadBlockChainBalancing (WriterT w m)
-deriving via (AsTrans (WriterT w) m) instance (Monoid w, MonadBlockChainWithoutValidation m) => MonadBlockChainWithoutValidation (WriterT w m)
+deriving via (AsTrans (WriterT w) m) instance (Monoid w, MonadBlockChainWithoutValidation m) => MonadBlockChainWithoutValidation (WriterT w m)
-deriving via (AsTrans (WriterT w) m) instance (Monoid w, MonadBlockChain m) => MonadBlockChain (WriterT w m)
+deriving via (AsTrans (WriterT w) m) instance (Monoid w, MonadBlockChain m) => MonadBlockChain (WriterT w m)
-deriving via (AsTrans (ReaderT r) m) instance MonadBlockChainBalancing m => MonadBlockChainBalancing (ReaderT r m)
+deriving via (AsTrans (ReaderT r) m) instance MonadBlockChainBalancing m => MonadBlockChainBalancing (ReaderT r m)
-deriving via (AsTrans (ReaderT r) m) instance MonadBlockChainWithoutValidation m => MonadBlockChainWithoutValidation (ReaderT r m)
+deriving via (AsTrans (ReaderT r) m) instance MonadBlockChainWithoutValidation m => MonadBlockChainWithoutValidation (ReaderT r m)
-deriving via (AsTrans (ReaderT r) m) instance MonadBlockChain m => MonadBlockChain (ReaderT r m)
+deriving via (AsTrans (ReaderT r) m) instance MonadBlockChain m => MonadBlockChain (ReaderT r m)
-deriving via (AsTrans (StateT s) m) instance MonadBlockChainBalancing m => MonadBlockChainBalancing (StateT s m)
+deriving via (AsTrans (StateT s) m) instance MonadBlockChainBalancing m => MonadBlockChainBalancing (StateT s m)
-deriving via (AsTrans (StateT s) m) instance MonadBlockChainWithoutValidation m => MonadBlockChainWithoutValidation (StateT s m)
+deriving via (AsTrans (StateT s) m) instance MonadBlockChainWithoutValidation m => MonadBlockChainWithoutValidation (StateT s m)
-deriving via (AsTrans (StateT s) m) instance MonadBlockChain m => MonadBlockChain (StateT s m)
+deriving via (AsTrans (StateT s) m) instance MonadBlockChain m => MonadBlockChain (StateT s m)
-- 'ListT' has no 'MonadTransControl' instance, so the @deriving via ...@
-- machinery is unusable here. However, there is
@@ -2075,17 +2075,17 @@
-- 'MonadBlockChainWithoutValidation' and 'MonadBlockChain' instances for
-- 'ListT', instead of more black magic...
-instance MonadBlockChainBalancing m => MonadBlockChainBalancing (ListT m) where
- getParams :: ListT m Params
-getParams = m Params -> ListT m Params
+instance MonadBlockChainBalancing m => MonadBlockChainBalancing (ListT m) where
+ getParams :: ListT m Params
+getParams = m Params -> ListT m Params
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift m Params
forall (m :: * -> *). MonadBlockChainBalancing m => m Params
getParams
- validatorFromHash :: ValidatorHash -> ListT m (Maybe (Versioned Validator))
-validatorFromHash = m (Maybe (Versioned Validator))
+ validatorFromHash :: ValidatorHash -> ListT m (Maybe (Versioned Validator))
+validatorFromHash = m (Maybe (Versioned Validator))
-> ListT m (Maybe (Versioned Validator))
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
@@ -2101,8 +2101,8 @@
MonadBlockChainBalancing m =>
ValidatorHash -> m (Maybe (Versioned Validator))
validatorFromHash
- utxosAtLedger :: Address -> ListT m [(TxOutRef, TxOut)]
-utxosAtLedger = m [(TxOutRef, TxOut)] -> ListT m [(TxOutRef, TxOut)]
+ utxosAtLedger :: Address -> ListT m [(TxOutRef, TxOut)]
+utxosAtLedger = m [(TxOutRef, TxOut)] -> ListT m [(TxOutRef, TxOut)]
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
@@ -2116,8 +2116,8 @@
MonadBlockChainBalancing m =>
Address -> m [(TxOutRef, TxOut)]
utxosAtLedger
- txOutByRefLedger :: TxOutRef -> ListT m (Maybe TxOut)
-txOutByRefLedger = m (Maybe TxOut) -> ListT m (Maybe TxOut)
+ txOutByRefLedger :: TxOutRef -> ListT m (Maybe TxOut)
+txOutByRefLedger = m (Maybe TxOut) -> ListT m (Maybe TxOut)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
@@ -2131,8 +2131,8 @@
MonadBlockChainBalancing m =>
TxOutRef -> m (Maybe TxOut)
txOutByRefLedger
- datumFromHash :: DatumHash -> ListT m (Maybe Datum)
-datumFromHash = m (Maybe Datum) -> ListT m (Maybe Datum)
+ datumFromHash :: DatumHash -> ListT m (Maybe Datum)
+datumFromHash = m (Maybe Datum) -> ListT m (Maybe Datum)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
@@ -2147,9 +2147,9 @@
DatumHash -> m (Maybe Datum)
datumFromHash
-instance MonadBlockChainWithoutValidation m => MonadBlockChainWithoutValidation (ListT m) where
- allUtxosLedger :: ListT m [(TxOutRef, TxOut)]
-allUtxosLedger = m [(TxOutRef, TxOut)] -> ListT m [(TxOutRef, TxOut)]
+instance MonadBlockChainWithoutValidation m => MonadBlockChainWithoutValidation (ListT m) where
+ allUtxosLedger :: ListT m [(TxOutRef, TxOut)]
+allUtxosLedger = m [(TxOutRef, TxOut)] -> ListT m [(TxOutRef, TxOut)]
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
@@ -2158,16 +2158,16 @@
MonadBlockChainWithoutValidation m =>
m [(TxOutRef, TxOut)]
allUtxosLedger
- currentSlot :: ListT m Slot
-currentSlot = m Slot -> ListT m Slot
+ currentSlot :: ListT m Slot
+currentSlot = m Slot -> ListT m Slot
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift m Slot
forall (m :: * -> *). MonadBlockChainWithoutValidation m => m Slot
currentSlot
- awaitSlot :: Slot -> ListT m Slot
-awaitSlot = m Slot -> ListT m Slot
+ awaitSlot :: Slot -> ListT m Slot
+awaitSlot = m Slot -> ListT m Slot
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
@@ -2180,9 +2180,9 @@
Slot -> m Slot
awaitSlot
-instance MonadBlockChain m => MonadBlockChain (ListT m) where
- validateTxSkel :: TxSkel -> ListT m CardanoTx
-validateTxSkel = m CardanoTx -> ListT m CardanoTx
+instance MonadBlockChain m => MonadBlockChain (ListT m) where
+ validateTxSkel :: TxSkel -> ListT m CardanoTx
+validateTxSkel = m CardanoTx -> ListT m CardanoTx
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
diff --git a/src/Cooked.MockChain.Direct.html b/src/Cooked.MockChain.Direct.html
index 50c2d84c0..41ab3ae5f 100644
--- a/src/Cooked.MockChain.Direct.html
+++ b/src/Cooked.MockChain.Direct.html
@@ -60,10 +60,10 @@
mcstToUtxoState :: MockChainSt -> UtxoState
mcstToUtxoState :: MockChainSt -> UtxoState
-mcstToUtxoState MockChainSt {UtxoIndex
+mcstToUtxoState MockChainSt {UtxoIndex
mcstIndex :: MockChainSt -> UtxoIndex
mcstIndex :: UtxoIndex
-mcstIndex, Map DatumHash (TxSkelOutDatum, Integer)
+mcstIndex, Map DatumHash (TxSkelOutDatum, Integer)
mcstDatums :: MockChainSt -> Map DatumHash (TxSkelOutDatum, Integer)
mcstDatums :: Map DatumHash (TxSkelOutDatum, Integer)
mcstDatums} =
@@ -82,10 +82,10 @@
forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
-foldr (\(Address
-address, UtxoPayloadSet
-utxoValueSet) Map Address UtxoPayloadSet
-acc -> (UtxoPayloadSet -> UtxoPayloadSet -> UtxoPayloadSet)
+foldr (\(Address
+address, UtxoPayloadSet
+utxoValueSet) Map Address UtxoPayloadSet
+acc -> (UtxoPayloadSet -> UtxoPayloadSet -> UtxoPayloadSet)
-> Address
-> UtxoPayloadSet
-> Map Address UtxoPayloadSet
@@ -94,9 +94,9 @@
Map.insertWith UtxoPayloadSet -> UtxoPayloadSet -> UtxoPayloadSet
forall a. Semigroup a => a -> a -> a
(<>) Address
-address UtxoPayloadSet
-utxoValueSet Map Address UtxoPayloadSet
-acc) Map Address UtxoPayloadSet
+address UtxoPayloadSet
+utxoValueSet Map Address UtxoPayloadSet
+acc) Map Address UtxoPayloadSet
forall k a. Map k a
Map.empty
([(Address, UtxoPayloadSet)] -> Map Address UtxoPayloadSet)
@@ -108,7 +108,7 @@
-> [(TxOutRef, TxOut)] -> [(Address, UtxoPayloadSet)]
forall a b. (a -> Maybe b) -> [a] -> [b]
mapMaybe (TxOutRef, TxOut) -> Maybe (Address, UtxoPayloadSet)
-extractPayload
+extractPayload
([(TxOutRef, TxOut)] -> [(Address, UtxoPayloadSet)])
-> (UtxoIndex -> [(TxOutRef, TxOut)])
-> UtxoIndex
@@ -117,14 +117,14 @@
. ((TxIn, TxOut CtxUTxO BabbageEra) -> (TxOutRef, TxOut))
-> [(TxIn, TxOut CtxUTxO BabbageEra)] -> [(TxOutRef, TxOut)]
forall a b. (a -> b) -> [a] -> [b]
-map (\(TxIn
-k, TxOut CtxUTxO BabbageEra
-v) -> (TxIn -> TxOutRef
+map (\(TxIn
+k, TxOut CtxUTxO BabbageEra
+v) -> (TxIn -> TxOutRef
Ledger.fromCardanoTxIn TxIn
-k, TxOut CtxUTxO BabbageEra -> TxOut
+k, TxOut CtxUTxO BabbageEra -> TxOut
forall era. TxOut CtxUTxO era -> TxOut
Ledger.fromCardanoTxOutToPV2TxInfoTxOut' TxOut CtxUTxO BabbageEra
-v))
+v))
([(TxIn, TxOut CtxUTxO BabbageEra)] -> [(TxOutRef, TxOut)])
-> (UtxoIndex -> [(TxIn, TxOut CtxUTxO BabbageEra)])
-> UtxoIndex
@@ -146,41 +146,41 @@
(UtxoIndex -> UtxoState) -> UtxoIndex -> UtxoState
forall a b. (a -> b) -> a -> b
$ UtxoIndex
-mcstIndex
+mcstIndex
where
- extractPayload :: (Pl.TxOutRef, PV2.TxOut) -> Maybe (Pl.Address, UtxoPayloadSet)
- extractPayload :: (TxOutRef, TxOut) -> Maybe (Address, UtxoPayloadSet)
-extractPayload (TxOutRef
-txOutRef, out :: TxOut
-out@PV2.TxOut {Address
+ extractPayload :: (Pl.TxOutRef, PV2.TxOut) -> Maybe (Pl.Address, UtxoPayloadSet)
+ extractPayload :: (TxOutRef, TxOut) -> Maybe (Address, UtxoPayloadSet)
+extractPayload (TxOutRef
+txOutRef, out :: TxOut
+out@PV2.TxOut {Address
txOutAddress :: TxOut -> Address
txOutAddress :: Address
-PV2.txOutAddress, Value
+PV2.txOutAddress, Value
txOutValue :: TxOut -> Value
txOutValue :: Value
-PV2.txOutValue, OutputDatum
+PV2.txOutValue, OutputDatum
txOutDatum :: TxOut -> OutputDatum
txOutDatum :: OutputDatum
PV2.txOutDatum}) =
do
- let mRefScript :: Maybe ScriptHash
-mRefScript = TxOut -> Maybe ScriptHash
+ let mRefScript :: Maybe ScriptHash
+mRefScript = TxOut -> Maybe ScriptHash
forall o.
(IsAbstractOutput o, ToScriptHash (ReferenceScriptType o)) =>
o -> Maybe ScriptHash
outputReferenceScriptHash TxOut
-out
- TxSkelOutDatum
-txSkelOutDatum <-
+out
+ TxSkelOutDatum
+txSkelOutDatum <-
case OutputDatum
-txOutDatum of
+txOutDatum of
OutputDatum
Pl.NoOutputDatum -> TxSkelOutDatum -> Maybe TxSkelOutDatum
forall a. a -> Maybe a
Just TxSkelOutDatum
TxSkelOutNoDatum
- Pl.OutputDatum Datum
-datum -> (TxSkelOutDatum, Integer) -> TxSkelOutDatum
+ Pl.OutputDatum Datum
+datum -> (TxSkelOutDatum, Integer) -> TxSkelOutDatum
forall a b. (a, b) -> a
fst ((TxSkelOutDatum, Integer) -> TxSkelOutDatum)
-> Maybe (TxSkelOutDatum, Integer) -> Maybe TxSkelOutDatum
@@ -191,10 +191,10 @@
forall k a. Ord k => k -> Map k a -> Maybe a
Map.lookup (Datum -> DatumHash
Pl.datumHash Datum
-datum) Map DatumHash (TxSkelOutDatum, Integer)
-mcstDatums
- Pl.OutputDatumHash DatumHash
-hash -> (TxSkelOutDatum, Integer) -> TxSkelOutDatum
+datum) Map DatumHash (TxSkelOutDatum, Integer)
+mcstDatums
+ Pl.OutputDatumHash DatumHash
+hash -> (TxSkelOutDatum, Integer) -> TxSkelOutDatum
forall a b. (a, b) -> a
fst ((TxSkelOutDatum, Integer) -> TxSkelOutDatum)
-> Maybe (TxSkelOutDatum, Integer) -> Maybe TxSkelOutDatum
@@ -204,21 +204,21 @@
-> Maybe (TxSkelOutDatum, Integer)
forall k a. Ord k => k -> Map k a -> Maybe a
Map.lookup DatumHash
-hash Map DatumHash (TxSkelOutDatum, Integer)
-mcstDatums
+hash Map DatumHash (TxSkelOutDatum, Integer)
+mcstDatums
(Address, UtxoPayloadSet) -> Maybe (Address, UtxoPayloadSet)
forall (m :: * -> *) a. Monad m => a -> m a
return
( Address
-txOutAddress,
+txOutAddress,
[UtxoPayload] -> UtxoPayloadSet
UtxoPayloadSet [TxOutRef
-> Value -> TxSkelOutDatum -> Maybe ScriptHash -> UtxoPayload
UtxoPayload TxOutRef
-txOutRef Value
-txOutValue TxSkelOutDatum
-txSkelOutDatum Maybe ScriptHash
-mRefScript]
+txOutRef Value
+txOutValue TxSkelOutDatum
+txSkelOutDatum Maybe ScriptHash
+mRefScript]
)
-- | Slightly more concrete version of 'UtxoState', used to actually run the
@@ -237,7 +237,7 @@
MockChainSt -> Slot
mcstCurrentSlot :: Ledger.Slot
}
- deriving (Int -> MockChainSt -> ShowS
+ deriving (Int -> MockChainSt -> ShowS
[MockChainSt] -> ShowS
MockChainSt -> String
(Int -> MockChainSt -> ShowS)
@@ -254,54 +254,54 @@
$cshowsPrec :: Int -> MockChainSt -> ShowS
Show)
-instance Eq MockChainSt where
- (MockChainSt UtxoIndex
-index1 Map DatumHash (TxSkelOutDatum, Integer)
-datums1 Map ValidatorHash (Versioned Validator)
-validators1 Slot
-currentSlot1)
- == :: MockChainSt -> MockChainSt -> Bool
-== (MockChainSt UtxoIndex
-index2 Map DatumHash (TxSkelOutDatum, Integer)
-datums2 Map ValidatorHash (Versioned Validator)
-validators2 Slot
-currentSlot2) =
+instance Eq MockChainSt where
+ (MockChainSt UtxoIndex
+index1 Map DatumHash (TxSkelOutDatum, Integer)
+datums1 Map ValidatorHash (Versioned Validator)
+validators1 Slot
+currentSlot1)
+ == :: MockChainSt -> MockChainSt -> Bool
+== (MockChainSt UtxoIndex
+index2 Map DatumHash (TxSkelOutDatum, Integer)
+datums2 Map ValidatorHash (Versioned Validator)
+validators2 Slot
+currentSlot2) =
[Bool] -> Bool
forall (t :: * -> *). Foldable t => t Bool -> Bool
and
[ UtxoIndex
-index1 UtxoIndex -> UtxoIndex -> Bool
+index1 UtxoIndex -> UtxoIndex -> Bool
forall a. Eq a => a -> a -> Bool
== UtxoIndex
-index2,
+index2,
Map DatumHash (TxSkelOutDatum, Integer)
-datums1 Map DatumHash (TxSkelOutDatum, Integer)
+datums1 Map DatumHash (TxSkelOutDatum, Integer)
-> Map DatumHash (TxSkelOutDatum, Integer) -> Bool
forall a. Eq a => a -> a -> Bool
== Map DatumHash (TxSkelOutDatum, Integer)
-datums2,
+datums2,
Map ValidatorHash (Versioned Validator)
-validators1 Map ValidatorHash (Versioned Validator)
+validators1 Map ValidatorHash (Versioned Validator)
-> Map ValidatorHash (Versioned Validator) -> Bool
forall a. Eq a => a -> a -> Bool
== Map ValidatorHash (Versioned Validator)
-validators2,
+validators2,
Slot
-currentSlot1 Slot -> Slot -> Bool
+currentSlot1 Slot -> Slot -> Bool
forall a. Eq a => a -> a -> Bool
== Slot
-currentSlot2
+currentSlot2
]
instance Default Ledger.Slot where
- def :: Slot
+ def :: Slot
def = Integer -> Slot
Ledger.Slot Integer
0
newtype MockChainEnv = MockChainEnv {MockChainEnv -> Params
mceParams :: Emulator.Params}
- deriving (Int -> MockChainEnv -> ShowS
+ deriving (Int -> MockChainEnv -> ShowS
[MockChainEnv] -> ShowS
MockChainEnv -> String
(Int -> MockChainEnv -> ShowS)
@@ -319,18 +319,18 @@
Show)
instance Default MockChainEnv where
- def :: MockChainEnv
-def = Params -> MockChainEnv
+ def :: MockChainEnv
+def = Params -> MockChainEnv
MockChainEnv Params
forall a. Default a => a
def
-newtype MockChainT m a = MockChainT
+newtype MockChainT m a = MockChainT
{MockChainT m a
-> ReaderT
MockChainEnv (StateT MockChainSt (ExceptT MockChainError m)) a
-unMockChain :: ReaderT MockChainEnv (StateT MockChainSt (ExceptT MockChainError m)) a}
- deriving newtype (a -> MockChainT m b -> MockChainT m a
+unMockChain :: ReaderT MockChainEnv (StateT MockChainSt (ExceptT MockChainError m)) a}
+ deriving newtype (a -> MockChainT m b -> MockChainT m a
(a -> b) -> MockChainT m a -> MockChainT m b
(forall a b. (a -> b) -> MockChainT m a -> MockChainT m b)
-> (forall a b. a -> MockChainT m b -> MockChainT m a)
@@ -354,7 +354,7 @@
$cfmap :: forall (m :: * -> *) a b.
Functor m =>
(a -> b) -> MockChainT m a -> MockChainT m b
-Functor, Functor (MockChainT m)
+Functor, Functor (MockChainT m)
a -> MockChainT m a
Functor (MockChainT m)
-> (forall a. a -> MockChainT m a)
@@ -418,21 +418,21 @@
pure :: a -> MockChainT m a
$cpure :: forall (m :: * -> *) a. Monad m => a -> MockChainT m a
$cp1Applicative :: forall (m :: * -> *). Monad m => Functor (MockChainT m)
-Applicative, MonadState MockChainSt, MonadError MockChainError, MonadReader MockChainEnv)
+Applicative, MonadState MockChainSt, MonadError MockChainError, MonadReader MockChainEnv)
type MockChain = MockChainT Identity
-- | Custom monad instance made to increase the slot count automatically
-instance (Monad m) => Monad (MockChainT m) where
- return :: a -> MockChainT m a
+instance (Monad m) => Monad (MockChainT m) where
+ return :: a -> MockChainT m a
return = a -> MockChainT m a
forall (f :: * -> *) a. Applicative f => a -> f a
pure
- MockChainT ReaderT
+ MockChainT ReaderT
MockChainEnv (StateT MockChainSt (ExceptT MockChainError m)) a
-x >>= :: MockChainT m a -> (a -> MockChainT m b) -> MockChainT m b
->>= a -> MockChainT m b
-f = ReaderT
+x >>= :: MockChainT m a -> (a -> MockChainT m b) -> MockChainT m b
+>>= a -> MockChainT m b
+f = ReaderT
MockChainEnv (StateT MockChainSt (ExceptT MockChainError m)) b
-> MockChainT m b
forall (m :: * -> *) a.
@@ -448,7 +448,7 @@
forall a b. (a -> b) -> a -> b
$ ReaderT
MockChainEnv (StateT MockChainSt (ExceptT MockChainError m)) a
-x ReaderT
+x ReaderT
MockChainEnv (StateT MockChainSt (ExceptT MockChainError m)) a
-> (a
-> ReaderT
@@ -472,10 +472,10 @@
MockChainEnv (StateT MockChainSt (ExceptT MockChainError m)) b
forall b c a. (b -> c) -> (a -> b) -> a -> c
. a -> MockChainT m b
-f
+f
-instance (Monad m) => MonadFail (MockChainT m) where
- fail :: String -> MockChainT m a
+instance (Monad m) => MonadFail (MockChainT m) where
+ fail :: String -> MockChainT m a
fail = MockChainError -> MockChainT m a
forall e (m :: * -> *) a. MonadError e m => e -> m a
throwError (MockChainError -> MockChainT m a)
@@ -485,7 +485,7 @@
FailWith
instance MonadTrans MockChainT where
- lift :: m a -> MockChainT m a
+ lift :: m a -> MockChainT m a
lift = ReaderT
MockChainEnv (StateT MockChainSt (ExceptT MockChainError m)) a
-> MockChainT m a
@@ -533,8 +533,8 @@
m a -> t m a
lift
-instance (Monad m, Alternative m) => Alternative (MockChainT m) where
- empty :: MockChainT m a
+instance (Monad m, Alternative m) => Alternative (MockChainT m) where
+ empty :: MockChainT m a
empty = ReaderT
MockChainEnv (StateT MockChainSt (ExceptT MockChainError m)) a
-> MockChainT m a
@@ -593,7 +593,7 @@
ExceptT m (Either MockChainError (a, MockChainSt))
forall (f :: * -> *) a. Alternative f => f a
empty
- <|> :: MockChainT m a -> MockChainT m a -> MockChainT m a
+ <|> :: MockChainT m a -> MockChainT m a -> MockChainT m a
(<|>) = (forall a. m a -> m a -> m a)
-> MockChainT m a -> MockChainT m a -> MockChainT m a
forall (m :: * -> *) x.
@@ -604,18 +604,18 @@
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
(<|>)
-combineMockChainT ::
- (Monad m) =>
- (forall a. m a -> m a -> m a) ->
- MockChainT m x ->
- MockChainT m x ->
- MockChainT m x
+combineMockChainT ::
+ (Monad m) =>
+ (forall a. m a -> m a -> m a) ->
+ MockChainT m x ->
+ MockChainT m x ->
+ MockChainT m x
combineMockChainT :: (forall a. m a -> m a -> m a)
-> MockChainT m x -> MockChainT m x -> MockChainT m x
-combineMockChainT forall a. m a -> m a -> m a
-f MockChainT m x
-ma MockChainT m x
-mb = ReaderT
+combineMockChainT forall a. m a -> m a -> m a
+f MockChainT m x
+ma MockChainT m x
+mb = ReaderT
MockChainEnv (StateT MockChainSt (ExceptT MockChainError m)) x
-> MockChainT m x
forall (m :: * -> *) a.
@@ -642,8 +642,8 @@
-> ReaderT
MockChainEnv (StateT MockChainSt (ExceptT MockChainError m)) x
forall a b. (a -> b) -> a -> b
-$ \MockChainEnv
-r ->
+$ \MockChainEnv
+r ->
(MockChainSt -> ExceptT MockChainError m (x, MockChainSt))
-> StateT MockChainSt (ExceptT MockChainError m) x
forall s (m :: * -> *) a. (s -> m (a, s)) -> StateT s m a
@@ -652,10 +652,10 @@
-> (MockChainSt -> ExceptT MockChainError m (x, MockChainSt))
-> StateT MockChainSt (ExceptT MockChainError m) x
forall a b. (a -> b) -> a -> b
-$ \MockChainSt
-s ->
- let resA :: m (Either MockChainError (x, MockChainSt))
-resA = ExceptT MockChainError m (x, MockChainSt)
+$ \MockChainSt
+s ->
+ let resA :: m (Either MockChainError (x, MockChainSt))
+resA = ExceptT MockChainError m (x, MockChainSt)
-> m (Either MockChainError (x, MockChainSt))
forall e (m :: * -> *) a. ExceptT e m a -> m (Either e a)
runExceptT (ExceptT MockChainError m (x, MockChainSt)
@@ -678,11 +678,11 @@
-> ReaderT
MockChainEnv (StateT MockChainSt (ExceptT MockChainError m)) a
unMockChain MockChainT m x
-ma) MockChainEnv
-r) MockChainSt
-s
- resB :: m (Either MockChainError (x, MockChainSt))
-resB = ExceptT MockChainError m (x, MockChainSt)
+ma) MockChainEnv
+r) MockChainSt
+s
+ resB :: m (Either MockChainError (x, MockChainSt))
+resB = ExceptT MockChainError m (x, MockChainSt)
-> m (Either MockChainError (x, MockChainSt))
forall e (m :: * -> *) a. ExceptT e m a -> m (Either e a)
runExceptT (ExceptT MockChainError m (x, MockChainSt)
@@ -705,9 +705,9 @@
-> ReaderT
MockChainEnv (StateT MockChainSt (ExceptT MockChainError m)) a
unMockChain MockChainT m x
-mb) MockChainEnv
-r) MockChainSt
-s
+mb) MockChainEnv
+r) MockChainSt
+s
in m (Either MockChainError (x, MockChainSt))
-> ExceptT MockChainError m (x, MockChainSt)
forall e (m :: * -> *) a. m (Either e a) -> ExceptT e m a
@@ -720,20 +720,20 @@
-> m (Either MockChainError (x, MockChainSt))
-> m (Either MockChainError (x, MockChainSt))
forall a. m a -> m a -> m a
-f m (Either MockChainError (x, MockChainSt))
-resA m (Either MockChainError (x, MockChainSt))
-resB
+f m (Either MockChainError (x, MockChainSt))
+resA m (Either MockChainError (x, MockChainSt))
+resB
-mapMockChainT ::
- (m (Either MockChainError (a, MockChainSt)) -> n (Either MockChainError (b, MockChainSt))) ->
- MockChainT m a ->
- MockChainT n b
+mapMockChainT ::
+ (m (Either MockChainError (a, MockChainSt)) -> n (Either MockChainError (b, MockChainSt))) ->
+ MockChainT m a ->
+ MockChainT n b
mapMockChainT :: (m (Either MockChainError (a, MockChainSt))
-> n (Either MockChainError (b, MockChainSt)))
-> MockChainT m a -> MockChainT n b
-mapMockChainT m (Either MockChainError (a, MockChainSt))
+mapMockChainT m (Either MockChainError (a, MockChainSt))
-> n (Either MockChainError (b, MockChainSt))
-f = ReaderT
+f = ReaderT
MockChainEnv (StateT MockChainSt (ExceptT MockChainError n)) b
-> MockChainT n b
forall (m :: * -> *) a.
@@ -772,7 +772,7 @@
-> ExceptT e m a -> ExceptT e' n b
mapExceptT m (Either MockChainError (a, MockChainSt))
-> n (Either MockChainError (b, MockChainSt))
-f)) (ReaderT
+f)) (ReaderT
MockChainEnv (StateT MockChainSt (ExceptT MockChainError m)) a
-> ReaderT
MockChainEnv (StateT MockChainSt (ExceptT MockChainError n)) b)
@@ -794,19 +794,19 @@
-- | Executes a 'MockChainT' from some initial state and environment; does /not/
-- convert the 'MockChainSt' into a 'UtxoState'.
-runMockChainTRaw ::
- (Monad m) =>
+runMockChainTRaw ::
+ (Monad m) =>
MockChainEnv ->
MockChainSt ->
- MockChainT m a ->
- m (Either MockChainError (a, MockChainSt))
+ MockChainT m a ->
+ m (Either MockChainError (a, MockChainSt))
runMockChainTRaw :: MockChainEnv
-> MockChainSt
-> MockChainT m a
-> m (Either MockChainError (a, MockChainSt))
-runMockChainTRaw MockChainEnv
-e0 MockChainSt
-i0 =
+runMockChainTRaw MockChainEnv
+e0 MockChainSt
+i0 =
ExceptT MockChainError m (a, MockChainSt)
-> m (Either MockChainError (a, MockChainSt))
forall e (m :: * -> *) a. ExceptT e m a -> m (Either e a)
@@ -827,7 +827,7 @@
-> MockChainSt -> ExceptT MockChainError m (a, MockChainSt)
forall s (m :: * -> *) a. StateT s m a -> s -> m (a, s)
runStateT MockChainSt
-i0
+i0
(StateT MockChainSt (ExceptT MockChainError m) a
-> ExceptT MockChainError m (a, MockChainSt))
-> (MockChainT m a
@@ -848,7 +848,7 @@
-> MockChainEnv -> StateT MockChainSt (ExceptT MockChainError m) a
forall r (m :: * -> *) a. ReaderT r m a -> r -> m a
runReaderT MockChainEnv
-e0
+e0
(ReaderT
MockChainEnv (StateT MockChainSt (ExceptT MockChainError m)) a
-> StateT MockChainSt (ExceptT MockChainError m) a)
@@ -871,15 +871,15 @@
-- initial value distribution. Similar to 'runMockChainT', uses the default
-- environment. Returns a 'UtxoState' instead of a 'MockChainSt'. If you need
-- the later, use 'runMockChainTRaw'
-runMockChainTFrom ::
- (Monad m) =>
+runMockChainTFrom ::
+ (Monad m) =>
InitialDistribution ->
- MockChainT m a ->
- m (Either MockChainError (a, UtxoState))
+ MockChainT m a ->
+ m (Either MockChainError (a, UtxoState))
runMockChainTFrom :: InitialDistribution
-> MockChainT m a -> m (Either MockChainError (a, UtxoState))
-runMockChainTFrom InitialDistribution
-i0 =
+runMockChainTFrom InitialDistribution
+i0 =
(Either MockChainError (a, MockChainSt)
-> Either MockChainError (a, UtxoState))
-> m (Either MockChainError (a, MockChainSt))
@@ -921,12 +921,12 @@
forall a. Default a => a
def (InitialDistribution -> MockChainSt
mockChainSt0From InitialDistribution
-i0)
+i0)
-- | Executes a 'MockChainT' from the canonical initial state and environment.
-- The canonical environment uses the default 'SlotConfig' and
-- @Cooked.Wallet.wallet 1@ as the sole wallet signing transactions.
-runMockChainT :: (Monad m) => MockChainT m a -> m (Either MockChainError (a, UtxoState))
+runMockChainT :: (Monad m) => MockChainT m a -> m (Either MockChainError (a, UtxoState))
runMockChainT :: MockChainT m a -> m (Either MockChainError (a, UtxoState))
runMockChainT = InitialDistribution
-> MockChainT m a -> m (Either MockChainError (a, UtxoState))
@@ -939,14 +939,14 @@
def
-- | See 'runMockChainTRaw'
-runMockChainRaw :: MockChainEnv -> MockChainSt -> MockChain a -> Either MockChainError (a, MockChainSt)
+runMockChainRaw :: MockChainEnv -> MockChainSt -> MockChain a -> Either MockChainError (a, MockChainSt)
runMockChainRaw :: MockChainEnv
-> MockChainSt
-> MockChain a
-> Either MockChainError (a, MockChainSt)
-runMockChainRaw MockChainEnv
-e0 MockChainSt
-i0 = Identity (Either MockChainError (a, MockChainSt))
+runMockChainRaw MockChainEnv
+e0 MockChainSt
+i0 = Identity (Either MockChainError (a, MockChainSt))
-> Either MockChainError (a, MockChainSt)
forall a. Identity a -> a
runIdentity (Identity (Either MockChainError (a, MockChainSt))
@@ -967,16 +967,16 @@
-> MockChainT m a
-> m (Either MockChainError (a, MockChainSt))
runMockChainTRaw MockChainEnv
-e0 MockChainSt
-i0
+e0 MockChainSt
+i0
-- | See 'runMockChainTFrom'
-runMockChainFrom ::
- InitialDistribution -> MockChain a -> Either MockChainError (a, UtxoState)
+runMockChainFrom ::
+ InitialDistribution -> MockChain a -> Either MockChainError (a, UtxoState)
runMockChainFrom :: InitialDistribution
-> MockChain a -> Either MockChainError (a, UtxoState)
-runMockChainFrom InitialDistribution
-i0 = Identity (Either MockChainError (a, UtxoState))
+runMockChainFrom InitialDistribution
+i0 = Identity (Either MockChainError (a, UtxoState))
-> Either MockChainError (a, UtxoState)
forall a. Identity a -> a
runIdentity (Identity (Either MockChainError (a, UtxoState))
@@ -992,10 +992,10 @@
InitialDistribution
-> MockChainT m a -> m (Either MockChainError (a, UtxoState))
runMockChainTFrom InitialDistribution
-i0
+i0
-- | See 'runMockChainT'
-runMockChain :: MockChain a -> Either MockChainError (a, UtxoState)
+runMockChain :: MockChain a -> Either MockChainError (a, UtxoState)
runMockChain :: MockChain a -> Either MockChainError (a, UtxoState)
runMockChain = Identity (Either MockChainError (a, UtxoState))
-> Either MockChainError (a, UtxoState)
@@ -1038,15 +1038,15 @@
mockChainSt0From :: InitialDistribution -> MockChainSt
mockChainSt0From :: InitialDistribution -> MockChainSt
-mockChainSt0From InitialDistribution
-i0 = UtxoIndex
+mockChainSt0From InitialDistribution
+i0 = UtxoIndex
-> Map DatumHash (TxSkelOutDatum, Integer)
-> Map ValidatorHash (Versioned Validator)
-> Slot
-> MockChainSt
MockChainSt (InitialDistribution -> UtxoIndex
utxoIndex0From InitialDistribution
-i0) Map DatumHash (TxSkelOutDatum, Integer)
+i0) Map DatumHash (TxSkelOutDatum, Integer)
forall k a. Map k a
Map.empty Map ValidatorHash (Versioned Validator)
forall k a. Map k a
@@ -1055,40 +1055,40 @@
def
instance Default MockChainSt where
- def :: MockChainSt
-def = MockChainSt
+ def :: MockChainSt
+def = MockChainSt
mockChainSt0
utxoIndex0From :: InitialDistribution -> Ledger.UtxoIndex
utxoIndex0From :: InitialDistribution -> UtxoIndex
-utxoIndex0From InitialDistribution
-i0 = Blockchain -> UtxoIndex
+utxoIndex0From InitialDistribution
+i0 = Blockchain -> UtxoIndex
Ledger.initialise [[CardanoTx -> OnChainTx
Ledger.Valid (CardanoTx -> OnChainTx) -> CardanoTx -> OnChainTx
forall a b. (a -> b) -> a -> b
$ InitialDistribution -> CardanoTx
-initialTxFor InitialDistribution
-i0]]
+initialTxFor InitialDistribution
+i0]]
where
-- Bootstraps an initial transaction resulting in a state where wallets
-- possess UTxOs fitting a given 'InitialDistribution'
- initialTxFor :: InitialDistribution -> Ledger.CardanoTx
- initialTxFor :: InitialDistribution -> CardanoTx
-initialTxFor InitialDistribution
-initDist = Tx BabbageEra -> CardanoTx
+ initialTxFor :: InitialDistribution -> Ledger.CardanoTx
+ initialTxFor :: InitialDistribution -> CardanoTx
+initialTxFor InitialDistribution
+initDist = Tx BabbageEra -> CardanoTx
Ledger.CardanoEmulatorEraTx (Tx BabbageEra -> CardanoTx) -> Tx BabbageEra -> CardanoTx
forall a b. (a -> b) -> a -> b
$ TxBody BabbageEra -> [KeyWitness BabbageEra] -> Tx BabbageEra
forall era. TxBody era -> [KeyWitness era] -> Tx era
C.Tx TxBody BabbageEra
-body []
+body []
where
- body :: C.TxBody C.BabbageEra
- body :: TxBody BabbageEra
-body =
+ body :: C.TxBody C.BabbageEra
+ body :: TxBody BabbageEra
+body =
Either TxBodyError (TxBody BabbageEra) -> TxBody BabbageEra
forall e a. Show e => Either e a -> a
-fromRight' (Either TxBodyError (TxBody BabbageEra) -> TxBody BabbageEra)
+fromRight' (Either TxBodyError (TxBody BabbageEra) -> TxBody BabbageEra)
-> Either TxBodyError (TxBody BabbageEra) -> TxBody BabbageEra
forall a b. (a -> b) -> a -> b
$
@@ -1146,7 +1146,7 @@
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Either ToCardanoError Value -> Value
forall e a. Show e => Either e a -> a
-fromRight'
+fromRight'
(Either ToCardanoError Value -> Value)
-> (Value -> Either ToCardanoError Value) -> Value -> Value
forall b c a. (b -> c) -> (a -> b) -> a -> c
@@ -1167,44 +1167,44 @@
. (Wallet, [Value]) -> [Value]
forall a b. (a, b) -> b
snd) [(Wallet, [Value])]
-initDist'),
+initDist'),
txOuts :: [TxOut CtxTx BabbageEra]
C.txOuts = ((Wallet, [Value]) -> [TxOut CtxTx BabbageEra])
-> [(Wallet, [Value])] -> [TxOut CtxTx BabbageEra]
forall (t :: * -> *) a b. Foldable t => (a -> [b]) -> t a -> [b]
-concatMap (\(Wallet
-w, [Value]
-vs) -> (Value -> TxOut CtxTx BabbageEra)
+concatMap (\(Wallet
+w, [Value]
+vs) -> (Value -> TxOut CtxTx BabbageEra)
-> [Value] -> [TxOut CtxTx BabbageEra]
forall a b. (a -> b) -> [a] -> [b]
map (Wallet -> Value -> TxOut CtxTx BabbageEra
-initUtxosFor Wallet
-w) [Value]
-vs) [(Wallet, [Value])]
-initDist',
+initUtxosFor Wallet
+w) [Value]
+vs) [(Wallet, [Value])]
+initDist',
txIns :: TxIns BuildTx BabbageEra
C.txIns = [(NetworkId -> Hash GenesisUTxOKey -> TxIn
C.genesisUTxOPseudoTxIn NetworkId
-theNetworkId Hash GenesisUTxOKey
-genesisKeyHash, Witness WitCtxTxIn BabbageEra
+theNetworkId Hash GenesisUTxOKey
+genesisKeyHash, Witness WitCtxTxIn BabbageEra
-> BuildTxWith BuildTx (Witness WitCtxTxIn BabbageEra)
forall a. a -> BuildTxWith BuildTx a
C.BuildTxWith Witness WitCtxTxIn BabbageEra
forall era. Witness WitCtxTxIn era
-spendWit)]
+spendWit)]
}
- spendWit :: Witness WitCtxTxIn era
-spendWit = KeyWitnessInCtx WitCtxTxIn -> Witness WitCtxTxIn era
+ spendWit :: Witness WitCtxTxIn era
+spendWit = KeyWitnessInCtx WitCtxTxIn -> Witness WitCtxTxIn era
forall witctx era. KeyWitnessInCtx witctx -> Witness witctx era
C.KeyWitness KeyWitnessInCtx WitCtxTxIn
C.KeyWitnessForSpending
-- This has been taken from the Test.Cardano.Api.Genesis example transaction here:
-- https://github.com/input-output-hk/cardano-node/blob/543b267d75d3d448e1940f9ec04b42bd01bbb16b/cardano-api/test/Test/Cardano/Api/Genesis.hs#L60
- genesisKeyHash :: C.Hash C.GenesisUTxOKey
- genesisKeyHash :: Hash GenesisUTxOKey
-genesisKeyHash =
+ genesisKeyHash :: C.Hash C.GenesisUTxOKey
+ genesisKeyHash :: Hash GenesisUTxOKey
+genesisKeyHash =
KeyHash 'Payment StandardCrypto -> Hash GenesisUTxOKey
C.GenesisUTxOKeyHash (KeyHash 'Payment StandardCrypto -> Hash GenesisUTxOKey)
-> KeyHash 'Payment StandardCrypto -> Hash GenesisUTxOKey
@@ -1226,60 +1226,60 @@
Hash (ADDRHASH StandardCrypto) (VerKeyDSIGN (DSIGN StandardCrypto))
"23d51e91ae5adc7ae801e9de4cd54175fb7464ec2680b25686bbb194"
- initDist' :: [(Wallet, [Value])]
-initDist' = Map Wallet [Value] -> [(Wallet, [Value])]
+ initDist' :: [(Wallet, [Value])]
+initDist' = Map Wallet [Value] -> [(Wallet, [Value])]
forall k a. Map k a -> [(k, a)]
Map.toList (Map Wallet [Value] -> [(Wallet, [Value])])
-> Map Wallet [Value] -> [(Wallet, [Value])]
forall a b. (a -> b) -> a -> b
$ InitialDistribution -> Map Wallet [Value]
unInitialDistribution InitialDistribution
-initDist
+initDist
- initUtxosFor :: Wallet -> Value -> TxOut CtxTx BabbageEra
-initUtxosFor Wallet
-w Value
-v = Address -> Value -> Maybe () -> TxOut CtxTx BabbageEra
+ initUtxosFor :: Wallet -> Value -> TxOut CtxTx BabbageEra
+initUtxosFor Wallet
+w Value
+v = Address -> Value -> Maybe () -> TxOut CtxTx BabbageEra
forall a.
ToData a =>
Address -> Value -> Maybe a -> TxOut CtxTx BabbageEra
-txOut (Wallet -> Address
+txOut (Wallet -> Address
walletAddress Wallet
-w) Value
-v (Maybe ()
+w) Value
+v (Maybe ()
forall a. Maybe a
Nothing @())
- fromRight' :: Show e => Either e a -> a
- fromRight' :: Either e a -> a
-fromRight' Either e a
-x = case Either e a
-x of
- Left e
-err -> String -> a
+ fromRight' :: Show e => Either e a -> a
+ fromRight' :: Either e a -> a
+fromRight' Either e a
+x = case Either e a
+x of
+ Left e
+err -> String -> a
forall a. HasCallStack => String -> a
error (String -> a) -> String -> a
forall a b. (a -> b) -> a -> b
$ e -> String
forall a. Show a => a -> String
show e
-err
- Right a
-res -> a
-res
+err
+ Right a
+res -> a
+res
- txOut :: Address -> Value -> Maybe a -> TxOut CtxTx BabbageEra
-txOut Address
-addr Value
-value Maybe a
-datum = Address -> Value -> OutputDatum -> TxOut CtxTx BabbageEra
-toCardanoTxOut' Address
-addr Value
-value OutputDatum
-datum'
+ txOut :: Address -> Value -> Maybe a -> TxOut CtxTx BabbageEra
+txOut Address
+addr Value
+value Maybe a
+datum = Address -> Value -> OutputDatum -> TxOut CtxTx BabbageEra
+toCardanoTxOut' Address
+addr Value
+value OutputDatum
+datum'
where
- datum' :: OutputDatum
-datum' =
+ datum' :: OutputDatum
+datum' =
OutputDatum -> (a -> OutputDatum) -> Maybe a -> OutputDatum
forall b a. b -> (a -> b) -> Maybe a -> b
maybe
@@ -1302,22 +1302,22 @@
Pl.toBuiltinData
)
Maybe a
-datum
+datum
- toCardanoTxOut' ::
+ toCardanoTxOut' ::
Pl.Address ->
Pl.Value ->
PV2.OutputDatum ->
C.TxOut C.CtxTx C.BabbageEra
- toCardanoTxOut' :: Address -> Value -> OutputDatum -> TxOut CtxTx BabbageEra
-toCardanoTxOut' Address
-addr Value
-value OutputDatum
-datum =
+ toCardanoTxOut' :: Address -> Value -> OutputDatum -> TxOut CtxTx BabbageEra
+toCardanoTxOut' Address
+addr Value
+value OutputDatum
+datum =
Either ToCardanoError (TxOut CtxTx BabbageEra)
-> TxOut CtxTx BabbageEra
forall e a. Show e => Either e a -> a
-fromRight' (Either ToCardanoError (TxOut CtxTx BabbageEra)
+fromRight' (Either ToCardanoError (TxOut CtxTx BabbageEra)
-> TxOut CtxTx BabbageEra)
-> Either ToCardanoError (TxOut CtxTx BabbageEra)
-> TxOut CtxTx BabbageEra
@@ -1327,18 +1327,18 @@
-> TxOut -> Either ToCardanoError (TxOut CtxTx BabbageEra)
Ledger.toCardanoTxOut
NetworkId
-theNetworkId
+theNetworkId
(Address -> Value -> OutputDatum -> Maybe ScriptHash -> TxOut
PV2.TxOut Address
-addr Value
-value OutputDatum
-datum Maybe ScriptHash
+addr Value
+value OutputDatum
+datum Maybe ScriptHash
forall a. Maybe a
Nothing)
- theNetworkId :: C.NetworkId
- theNetworkId :: NetworkId
-theNetworkId = NetworkMagic -> NetworkId
+ theNetworkId :: C.NetworkId
+ theNetworkId :: NetworkId
+theNetworkId = NetworkMagic -> NetworkId
C.Testnet (NetworkMagic -> NetworkId) -> NetworkMagic -> NetworkId
forall a b. (a -> b) -> a -> b
$ Word32 -> NetworkMagic
@@ -1368,11 +1368,11 @@
. ((TxIn, TxOut CtxUTxO BabbageEra) -> (TxOutRef, TxOut))
-> [(TxIn, TxOut CtxUTxO BabbageEra)] -> [(TxOutRef, TxOut)]
forall a b. (a -> b) -> [a] -> [b]
-map (\(TxIn
-k, TxOut CtxUTxO BabbageEra
-v) -> (TxIn -> TxOutRef
+map (\(TxIn
+k, TxOut CtxUTxO BabbageEra
+v) -> (TxIn -> TxOutRef
Ledger.fromCardanoTxIn TxIn
-k, TxOut CtxTx BabbageEra -> TxOut
+k, TxOut CtxTx BabbageEra -> TxOut
Ledger.TxOut (TxOut CtxTx BabbageEra -> TxOut)
-> (TxOut CtxUTxO BabbageEra -> TxOut CtxTx BabbageEra)
-> TxOut CtxUTxO BabbageEra
@@ -1380,11 +1380,11 @@
forall b c a. (b -> c) -> (a -> b) -> a -> c
. TxOut CtxUTxO BabbageEra -> TxOut CtxTx BabbageEra
forall era. TxOut CtxUTxO era -> TxOut CtxTx era
-toCtxTxTxOut (TxOut CtxUTxO BabbageEra -> TxOut)
+toCtxTxTxOut (TxOut CtxUTxO BabbageEra -> TxOut)
-> TxOut CtxUTxO BabbageEra -> TxOut
forall a b. (a -> b) -> a -> b
$ TxOut CtxUTxO BabbageEra
-v))
+v))
([(TxIn, TxOut CtxUTxO BabbageEra)] -> [(TxOutRef, TxOut)])
-> (UtxoIndex -> [(TxIn, TxOut CtxUTxO BabbageEra)])
-> UtxoIndex
@@ -1407,40 +1407,40 @@
-- We need to convert a UTxO context TxOut to a Transaction context Tx out.
-- One could be forgiven for thinking this exists somewhere, but I couldn't find
-- it. It's this complicated because the datum type is indexed by the context.
- toCtxTxTxOut :: C.TxOut C.CtxUTxO era -> C.TxOut C.CtxTx era
- toCtxTxTxOut :: TxOut CtxUTxO era -> TxOut CtxTx era
-toCtxTxTxOut (C.TxOut AddressInEra era
-addr TxOutValue era
-val TxOutDatum CtxUTxO era
-d ReferenceScript era
-refS) =
- let dat :: TxOutDatum CtxTx era
-dat = case TxOutDatum CtxUTxO era
-d of
+ toCtxTxTxOut :: C.TxOut C.CtxUTxO era -> C.TxOut C.CtxTx era
+ toCtxTxTxOut :: TxOut CtxUTxO era -> TxOut CtxTx era
+toCtxTxTxOut (C.TxOut AddressInEra era
+addr TxOutValue era
+val TxOutDatum CtxUTxO era
+d ReferenceScript era
+refS) =
+ let dat :: TxOutDatum CtxTx era
+dat = case TxOutDatum CtxUTxO era
+d of
TxOutDatum CtxUTxO era
C.TxOutDatumNone -> TxOutDatum CtxTx era
forall ctx era. TxOutDatum ctx era
C.TxOutDatumNone
- C.TxOutDatumHash ScriptDataSupportedInEra era
-s Hash ScriptData
-h -> ScriptDataSupportedInEra era
+ C.TxOutDatumHash ScriptDataSupportedInEra era
+s Hash ScriptData
+h -> ScriptDataSupportedInEra era
-> Hash ScriptData -> TxOutDatum CtxTx era
forall era ctx.
ScriptDataSupportedInEra era
-> Hash ScriptData -> TxOutDatum ctx era
C.TxOutDatumHash ScriptDataSupportedInEra era
-s Hash ScriptData
-h
- C.TxOutDatumInline ReferenceTxInsScriptsInlineDatumsSupportedInEra era
-s ScriptData
-sd -> ReferenceTxInsScriptsInlineDatumsSupportedInEra era
+s Hash ScriptData
+h
+ C.TxOutDatumInline ReferenceTxInsScriptsInlineDatumsSupportedInEra era
+s ScriptData
+sd -> ReferenceTxInsScriptsInlineDatumsSupportedInEra era
-> ScriptData -> TxOutDatum CtxTx era
forall era ctx.
ReferenceTxInsScriptsInlineDatumsSupportedInEra era
-> ScriptData -> TxOutDatum ctx era
C.TxOutDatumInline ReferenceTxInsScriptsInlineDatumsSupportedInEra era
-s ScriptData
-sd
+s ScriptData
+sd
in AddressInEra era
-> TxOutValue era
-> TxOutDatum CtxTx era
@@ -1453,20 +1453,20 @@
-> ReferenceScript era
-> TxOut ctx era
C.TxOut AddressInEra era
-addr TxOutValue era
-val TxOutDatum CtxTx era
-dat ReferenceScript era
-refS
+addr TxOutValue era
+val TxOutDatum CtxTx era
+dat ReferenceScript era
+refS
-instance Monad m => MonadBlockChainBalancing (MockChainT m) where
- getParams :: MockChainT m Params
+instance Monad m => MonadBlockChainBalancing (MockChainT m) where
+ getParams :: MockChainT m Params
getParams = (MockChainEnv -> Params) -> MockChainT m Params
forall r (m :: * -> *) a. MonadReader r m => (r -> a) -> m a
asks MockChainEnv -> Params
mceParams
- validatorFromHash :: ValidatorHash -> MockChainT m (Maybe (Versioned Validator))
-validatorFromHash ValidatorHash
-valHash = (MockChainSt -> Maybe (Versioned Validator))
+ validatorFromHash :: ValidatorHash -> MockChainT m (Maybe (Versioned Validator))
+validatorFromHash ValidatorHash
+valHash = (MockChainSt -> Maybe (Versioned Validator))
-> MockChainT m (Maybe (Versioned Validator))
forall s (m :: * -> *) a. MonadState s m => (s -> a) -> m a
gets ((MockChainSt -> Maybe (Versioned Validator))
@@ -1479,7 +1479,7 @@
-> Maybe (Versioned Validator)
forall k a. Ord k => k -> Map k a -> Maybe a
Map.lookup ValidatorHash
-valHash (Map ValidatorHash (Versioned Validator)
+valHash (Map ValidatorHash (Versioned Validator)
-> Maybe (Versioned Validator))
-> (MockChainSt -> Map ValidatorHash (Versioned Validator))
-> MockChainSt
@@ -1487,9 +1487,9 @@
forall b c a. (b -> c) -> (a -> b) -> a -> c
. MockChainSt -> Map ValidatorHash (Versioned Validator)
mcstValidators
- txOutByRefLedger :: TxOutRef -> MockChainT m (Maybe TxOut)
-txOutByRefLedger TxOutRef
-outref = (MockChainSt -> Maybe TxOut) -> MockChainT m (Maybe TxOut)
+ txOutByRefLedger :: TxOutRef -> MockChainT m (Maybe TxOut)
+txOutByRefLedger TxOutRef
+outref = (MockChainSt -> Maybe TxOut) -> MockChainT m (Maybe TxOut)
forall s (m :: * -> *) a. MonadState s m => (s -> a) -> m a
gets ((MockChainSt -> Maybe TxOut) -> MockChainT m (Maybe TxOut))
-> (MockChainSt -> Maybe TxOut) -> MockChainT m (Maybe TxOut)
@@ -1497,7 +1497,7 @@
$ TxOutRef -> Map TxOutRef TxOut -> Maybe TxOut
forall k a. Ord k => k -> Map k a -> Maybe a
Map.lookup TxOutRef
-outref (Map TxOutRef TxOut -> Maybe TxOut)
+outref (Map TxOutRef TxOut -> Maybe TxOut)
-> (MockChainSt -> Map TxOutRef TxOut)
-> MockChainSt
-> Maybe TxOut
@@ -1508,9 +1508,9 @@
forall b c a. (b -> c) -> (a -> b) -> a -> c
. MockChainSt -> UtxoIndex
mcstIndex
- datumFromHash :: DatumHash -> MockChainT m (Maybe Datum)
-datumFromHash DatumHash
-datumHash = (TxSkelOutDatum -> Maybe Datum
+ datumFromHash :: DatumHash -> MockChainT m (Maybe Datum)
+datumFromHash DatumHash
+datumHash = (TxSkelOutDatum -> Maybe Datum
txSkelOutUntypedDatum (TxSkelOutDatum -> Maybe Datum)
-> (Map DatumHash (TxSkelOutDatum, Integer)
-> Maybe TxSkelOutDatum)
@@ -1541,7 +1541,7 @@
-> Maybe (TxSkelOutDatum, Integer)
forall k a. Ord k => k -> Map k a -> Maybe a
Map.lookup DatumHash
-datumHash) (Map DatumHash (TxSkelOutDatum, Integer) -> Maybe Datum)
+datumHash) (Map DatumHash (TxSkelOutDatum, Integer) -> Maybe Datum)
-> MockChainT m (Map DatumHash (TxSkelOutDatum, Integer))
-> MockChainT m (Maybe Datum)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
@@ -1550,13 +1550,13 @@
forall s (m :: * -> *) a. MonadState s m => (s -> a) -> m a
gets MockChainSt -> Map DatumHash (TxSkelOutDatum, Integer)
mcstDatums
- utxosAtLedger :: Address -> MockChainT m [(TxOutRef, TxOut)]
-utxosAtLedger Address
-addr = ((TxOutRef, TxOut) -> Bool)
+ utxosAtLedger :: Address -> MockChainT m [(TxOutRef, TxOut)]
+utxosAtLedger Address
+addr = ((TxOutRef, TxOut) -> Bool)
-> [(TxOutRef, TxOut)] -> [(TxOutRef, TxOut)]
forall a. (a -> Bool) -> [a] -> [a]
filter ((Address
-addr Address -> Address -> Bool
+addr Address -> Address -> Bool
forall a. Eq a => a -> a -> Bool
==) (Address -> Bool)
-> ((TxOutRef, TxOut) -> Address) -> (TxOutRef, TxOut) -> Bool
@@ -1584,9 +1584,9 @@
m [(TxOutRef, TxOut)]
allUtxosLedger
-instance Monad m => MonadBlockChainWithoutValidation (MockChainT m) where
- allUtxosLedger :: MockChainT m [(TxOutRef, TxOut)]
-allUtxosLedger = (MockChainSt -> [(TxOutRef, TxOut)])
+instance Monad m => MonadBlockChainWithoutValidation (MockChainT m) where
+ allUtxosLedger :: MockChainT m [(TxOutRef, TxOut)]
+allUtxosLedger = (MockChainSt -> [(TxOutRef, TxOut)])
-> MockChainT m [(TxOutRef, TxOut)]
forall s (m :: * -> *) a. MonadState s m => (s -> a) -> m a
gets ((MockChainSt -> [(TxOutRef, TxOut)])
@@ -1608,61 +1608,61 @@
. MockChainSt -> UtxoIndex
mcstIndex
- currentSlot :: MockChainT m Slot
+ currentSlot :: MockChainT m Slot
currentSlot = (MockChainSt -> Slot) -> MockChainT m Slot
forall s (m :: * -> *) a. MonadState s m => (s -> a) -> m a
gets MockChainSt -> Slot
mcstCurrentSlot
- awaitSlot :: Slot -> MockChainT m Slot
-awaitSlot Slot
-s = (MockChainSt -> MockChainSt) -> MockChainT m ()
+ awaitSlot :: Slot -> MockChainT m Slot
+awaitSlot Slot
+s = (MockChainSt -> MockChainSt) -> MockChainT m ()
forall s (m :: * -> *). MonadState s m => (s -> s) -> m ()
-modify' (\MockChainSt
-st -> MockChainSt
-st {mcstCurrentSlot :: Slot
+modify' (\MockChainSt
+st -> MockChainSt
+st {mcstCurrentSlot :: Slot
mcstCurrentSlot = Slot -> Slot -> Slot
forall a. Ord a => a -> a -> a
max Slot
-s (MockChainSt -> Slot
+s (MockChainSt -> Slot
mcstCurrentSlot MockChainSt
-st)}) MockChainT m () -> MockChainT m Slot -> MockChainT m Slot
+st)}) MockChainT m () -> MockChainT m Slot -> MockChainT m Slot
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> MockChainT m Slot
forall (m :: * -> *). MonadBlockChainWithoutValidation m => m Slot
currentSlot
-instance Monad m => MonadBlockChain (MockChainT m) where
- validateTxSkel :: TxSkel -> MockChainT m CardanoTx
-validateTxSkel TxSkel
-skelUnbal = do
- (TxSkel
-skel, Fee
-fee, Set TxOutRef
-collateralInputs) <- TxSkel -> MockChainT m (TxSkel, Fee, Set TxOutRef)
+instance Monad m => MonadBlockChain (MockChainT m) where
+ validateTxSkel :: TxSkel -> MockChainT m CardanoTx
+validateTxSkel TxSkel
+skelUnbal = do
+ (TxSkel
+skel, Fee
+fee, Set TxOutRef
+collateralInputs) <- TxSkel -> MockChainT m (TxSkel, Fee, Set TxOutRef)
forall (m :: * -> *).
MonadBlockChainBalancing m =>
TxSkel -> m (TxSkel, Fee, Set TxOutRef)
balancedTxSkel TxSkel
-skelUnbal
- Tx BabbageEra
-tx <- (TxSkel, Fee, Set TxOutRef) -> MockChainT m (Tx BabbageEra)
+skelUnbal
+ Tx BabbageEra
+tx <- (TxSkel, Fee, Set TxOutRef) -> MockChainT m (Tx BabbageEra)
forall (m :: * -> *).
MonadBlockChainBalancing m =>
(TxSkel, Fee, Set TxOutRef) -> m (Tx BabbageEra)
balancedTx (TxSkel
-skel, Fee
-fee, Set TxOutRef
-collateralInputs)
- Map DatumHash Datum
-consumedData <- TxSkel -> MockChainT m (Map DatumHash Datum)
+skel, Fee
+fee, Set TxOutRef
+collateralInputs)
+ Map DatumHash Datum
+consumedData <- TxSkel -> MockChainT m (Map DatumHash Datum)
forall (m :: * -> *).
MonadBlockChainBalancing m =>
TxSkel -> m (Map DatumHash Datum)
txSkelInputData TxSkel
-skel
- Params
-theParams <- Maybe EmulatorParamsModification -> Params -> Params
+skel
+ Params
+theParams <- Maybe EmulatorParamsModification -> Params -> Params
applyEmulatorParamsModification (TxOpts -> Maybe EmulatorParamsModification
txOptEmulatorParamsModification (TxOpts -> Maybe EmulatorParamsModification)
-> (TxSkel -> TxOpts) -> TxSkel -> Maybe EmulatorParamsModification
@@ -1672,13 +1672,13 @@
-> TxSkel -> Maybe EmulatorParamsModification
forall a b. (a -> b) -> a -> b
$ TxSkel
-skel) (Params -> Params) -> MockChainT m Params -> MockChainT m Params
+skel) (Params -> Params) -> MockChainT m Params -> MockChainT m Params
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> MockChainT m Params
forall (m :: * -> *). MonadBlockChainBalancing m => m Params
getParams
- CardanoTx
-someCardanoTx <-
+ CardanoTx
+someCardanoTx <-
Params
-> Tx BabbageEra
-> [RawModTx]
@@ -1697,29 +1697,29 @@
-> MockChainT m CardanoTx
runTransactionValidation
Params
-theParams
+theParams
Tx BabbageEra
-tx
+tx
(TxOpts -> [RawModTx]
txOptUnsafeModTx (TxOpts -> [RawModTx]) -> TxOpts -> [RawModTx]
forall a b. (a -> b) -> a -> b
$ TxSkel -> TxOpts
txSkelOpts TxSkel
-skel)
+skel)
Map DatumHash Datum
-consumedData
+consumedData
(TxSkel -> Map DatumHash TxSkelOutDatum
txSkelOutputData TxSkel
-skel)
+skel)
(TxSkel -> Map ValidatorHash (Versioned Validator)
txSkelOutValidators TxSkel
-skel Map ValidatorHash (Versioned Validator)
+skel Map ValidatorHash (Versioned Validator)
-> Map ValidatorHash (Versioned Validator)
-> Map ValidatorHash (Versioned Validator)
forall a. Semigroup a => a -> a -> a
<> TxSkel -> Map ValidatorHash (Versioned Validator)
txSkelOutReferenceScripts TxSkel
-skel)
+skel)
Bool -> MockChainT m () -> MockChainT m ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (TxOpts -> Bool
@@ -1727,28 +1727,28 @@
forall a b. (a -> b) -> a -> b
$ TxSkel -> TxOpts
txSkelOpts TxSkel
-skel) (MockChainT m () -> MockChainT m ())
+skel) (MockChainT m () -> MockChainT m ())
-> MockChainT m () -> MockChainT m ()
forall a b. (a -> b) -> a -> b
$
(MockChainSt -> MockChainSt) -> MockChainT m ()
forall s (m :: * -> *). MonadState s m => (s -> s) -> m ()
-modify' (\MockChainSt
-st -> MockChainSt
-st {mcstCurrentSlot :: Slot
+modify' (\MockChainSt
+st -> MockChainSt
+st {mcstCurrentSlot :: Slot
mcstCurrentSlot = MockChainSt -> Slot
mcstCurrentSlot MockChainSt
-st Slot -> Slot -> Slot
+st Slot -> Slot -> Slot
forall a. Num a => a -> a -> a
+ Slot
1})
CardanoTx -> MockChainT m CardanoTx
forall (m :: * -> *) a. Monad m => a -> m a
return CardanoTx
-someCardanoTx
+someCardanoTx
-runTransactionValidation ::
- Monad m =>
+runTransactionValidation ::
+ Monad m =>
-- | The emulator parameters to use. They might have been changed by the 'txOptEmulatorParamsModification'.
Emulator.Params ->
-- | The transaction to validate. It should already be balanced, and include
@@ -1764,7 +1764,7 @@
-- reference script field of transaction outputs. The 'MockChain' will
-- remember them.
Map Pl.ValidatorHash (Pl.Versioned Pl.Validator) ->
- MockChainT m Ledger.CardanoTx
+ MockChainT m Ledger.CardanoTx
runTransactionValidation :: Params
-> Tx BabbageEra
-> [RawModTx]
@@ -1772,58 +1772,58 @@
-> Map DatumHash TxSkelOutDatum
-> Map ValidatorHash (Versioned Validator)
-> MockChainT m CardanoTx
-runTransactionValidation Params
-theParams Tx BabbageEra
-cardanoTx [RawModTx]
-rawModTx Map DatumHash Datum
-consumedData Map DatumHash TxSkelOutDatum
-producedData Map ValidatorHash (Versioned Validator)
-outputValidators = do
- UtxoIndex
-utxoIndex <- (MockChainSt -> UtxoIndex) -> MockChainT m UtxoIndex
+runTransactionValidation Params
+theParams Tx BabbageEra
+cardanoTx [RawModTx]
+rawModTx Map DatumHash Datum
+consumedData Map DatumHash TxSkelOutDatum
+producedData Map ValidatorHash (Versioned Validator)
+outputValidators = do
+ UtxoIndex
+utxoIndex <- (MockChainSt -> UtxoIndex) -> MockChainT m UtxoIndex
forall s (m :: * -> *) a. MonadState s m => (s -> a) -> m a
gets MockChainSt -> UtxoIndex
mcstIndex
- Slot
-theSlot <- MockChainT m Slot
+ Slot
+theSlot <- MockChainT m Slot
forall (m :: * -> *). MonadBlockChainWithoutValidation m => m Slot
currentSlot
- let cardanoIndex :: CardanoLedger.UTxO Emulator.EmulatorEra
- cardanoIndex :: UTxO EmulatorEra
-cardanoIndex = UtxoIndex -> UTxO EmulatorEra
+ let cardanoIndex :: CardanoLedger.UTxO Emulator.EmulatorEra
+ cardanoIndex :: UTxO EmulatorEra
+cardanoIndex = UtxoIndex -> UTxO EmulatorEra
Ledger.fromPlutusIndex UtxoIndex
-utxoIndex
+utxoIndex
-- "Ledger.CardanoTx" is a plutus-apps type 'Tx BabbageEra' is a
-- cardano-api type with the information we need. This wraps the latter
-- inside the former.
- txWrapped :: Ledger.CardanoTx
- txWrapped :: CardanoTx
-txWrapped = Tx BabbageEra -> CardanoTx
+ txWrapped :: Ledger.CardanoTx
+ txWrapped :: CardanoTx
+txWrapped = Tx BabbageEra -> CardanoTx
Ledger.CardanoEmulatorEraTx Tx BabbageEra
-cardanoTx
+cardanoTx
- mValidationError :: Either Ledger.ValidationErrorInPhase Ledger.ValidationSuccess
- mValidationError :: Either ValidationErrorInPhase ValidationSuccess
-mValidationError = Params
+ mValidationError :: Either Ledger.ValidationErrorInPhase Ledger.ValidationSuccess
+ mValidationError :: Either ValidationErrorInPhase ValidationSuccess
+mValidationError = Params
-> Slot
-> UTxO EmulatorEra
-> CardanoTx
-> Either ValidationErrorInPhase ValidationSuccess
Emulator.validateCardanoTx Params
-theParams Slot
-theSlot UTxO EmulatorEra
-cardanoIndex CardanoTx
-txWrapped
+theParams Slot
+theSlot UTxO EmulatorEra
+cardanoIndex CardanoTx
+txWrapped
- newUtxoIndex :: Ledger.UtxoIndex
- newUtxoIndex :: UtxoIndex
-newUtxoIndex = case Either ValidationErrorInPhase ValidationSuccess
-mValidationError of
+ newUtxoIndex :: Ledger.UtxoIndex
+ newUtxoIndex :: UtxoIndex
+newUtxoIndex = case Either ValidationErrorInPhase ValidationSuccess
+mValidationError of
Left (ValidationPhase
Ledger.Phase1, ValidationError
_) -> UtxoIndex
-utxoIndex
+utxoIndex
Left (ValidationPhase
Ledger.Phase2, ValidationError
_) ->
@@ -1831,21 +1831,21 @@
-- the index
CardanoTx -> UtxoIndex -> UtxoIndex
Ledger.insertCollateral CardanoTx
-txWrapped UtxoIndex
-utxoIndex
+txWrapped UtxoIndex
+utxoIndex
Right ValidationSuccess
_ -> CardanoTx -> UtxoIndex -> UtxoIndex
Ledger.insert CardanoTx
-txWrapped UtxoIndex
-utxoIndex
+txWrapped UtxoIndex
+utxoIndex
case Either ValidationErrorInPhase ValidationSuccess
-mValidationError of
- Left ValidationErrorInPhase
-err -> MockChainError -> MockChainT m CardanoTx
+mValidationError of
+ Left ValidationErrorInPhase
+err -> MockChainError -> MockChainT m CardanoTx
forall e (m :: * -> *) a. MonadError e m => e -> m a
throwError (ValidationErrorInPhase -> MockChainError
MCEValidationError ValidationErrorInPhase
-err)
+err)
Right ValidationSuccess
_ -> do
-- Validation succeeded; now we update the UTxO index, the managed
@@ -1856,71 +1856,71 @@
(MockChainSt -> MockChainSt) -> MockChainT m ()
forall s (m :: * -> *). MonadState s m => (s -> s) -> m ()
modify'
- ( \MockChainSt
-st ->
+ ( \MockChainSt
+st ->
MockChainSt
-st
+st
{ mcstIndex :: UtxoIndex
mcstIndex = UtxoIndex
-newUtxoIndex,
+newUtxoIndex,
mcstDatums :: Map DatumHash (TxSkelOutDatum, Integer)
mcstDatums = (MockChainSt -> Map DatumHash (TxSkelOutDatum, Integer)
mcstDatums MockChainSt
-st Map DatumHash (TxSkelOutDatum, Integer)
+st Map DatumHash (TxSkelOutDatum, Integer)
-> Map DatumHash Datum -> Map DatumHash (TxSkelOutDatum, Integer)
forall a b.
Map DatumHash (a, Integer)
-> Map DatumHash b -> Map DatumHash (a, Integer)
-`removeMcstDatums` Map DatumHash Datum
-consumedData) Map DatumHash (TxSkelOutDatum, Integer)
+`removeMcstDatums` Map DatumHash Datum
+consumedData) Map DatumHash (TxSkelOutDatum, Integer)
-> Map DatumHash TxSkelOutDatum
-> Map DatumHash (TxSkelOutDatum, Integer)
forall k a a.
(Ord k, Num a) =>
Map k (a, a) -> Map k a -> Map k (a, a)
-`addMcstDatums` Map DatumHash TxSkelOutDatum
-producedData,
+`addMcstDatums` Map DatumHash TxSkelOutDatum
+producedData,
mcstValidators :: Map ValidatorHash (Versioned Validator)
mcstValidators = MockChainSt -> Map ValidatorHash (Versioned Validator)
mcstValidators MockChainSt
-st Map ValidatorHash (Versioned Validator)
+st Map ValidatorHash (Versioned Validator)
-> Map ValidatorHash (Versioned Validator)
-> Map ValidatorHash (Versioned Validator)
forall k a. Ord k => Map k a -> Map k a -> Map k a
`Map.union` Map ValidatorHash (Versioned Validator)
-outputValidators
+outputValidators
}
)
CardanoTx -> MockChainT m CardanoTx
forall (m :: * -> *) a. Monad m => a -> m a
return (Tx BabbageEra -> CardanoTx
Ledger.CardanoEmulatorEraTx Tx BabbageEra
-cardanoTx)
+cardanoTx)
where
- addMcstDatums :: Map k (a, a) -> Map k a -> Map k (a, a)
-addMcstDatums Map k (a, a)
-stored Map k a
-new = ((a, a) -> (a, a) -> (a, a))
+ addMcstDatums :: Map k (a, a) -> Map k a -> Map k (a, a)
+addMcstDatums Map k (a, a)
+stored Map k a
+new = ((a, a) -> (a, a) -> (a, a))
-> Map k (a, a) -> Map k (a, a) -> Map k (a, a)
forall k a. Ord k => (a -> a -> a) -> Map k a -> Map k a -> Map k a
-Map.unionWith (\(a
-d, a
-n1) (a
-_, a
-n2) -> (a
-d, a
-n1 a -> a -> a
+Map.unionWith (\(a
+d, a
+n1) (a
+_, a
+n2) -> (a
+d, a
+n1 a -> a -> a
forall a. Num a => a -> a -> a
+ a
-n2)) Map k (a, a)
-stored ((a -> (a, a)) -> Map k a -> Map k (a, a)
+n2)) Map k (a, a)
+stored ((a -> (a, a)) -> Map k a -> Map k (a, a)
forall a b k. (a -> b) -> Map k a -> Map k b
Map.map (,a
1) Map k a
-new)
- removeMcstDatums :: Map DatumHash (a, Integer)
+new)
+ removeMcstDatums :: Map DatumHash (a, Integer)
-> Map DatumHash b -> Map DatumHash (a, Integer)
-removeMcstDatums = ((a, Integer) -> b -> Maybe (a, Integer))
+removeMcstDatums = ((a, Integer) -> b -> Maybe (a, Integer))
-> Map DatumHash (a, Integer)
-> Map DatumHash b
-> Map DatumHash (a, Integer)
@@ -1936,11 +1936,11 @@
-> Map DatumHash b
-> Map DatumHash (a, Integer)
forall a b. (a -> b) -> a -> b
-$ \(a
-d, Integer
-n) b
+$ \(a
+d, Integer
+n) b
_ -> if Integer
-n Integer -> Integer -> Bool
+n Integer -> Integer -> Bool
forall a. Eq a => a -> a -> Bool
== Integer
1 then Maybe (a, Integer)
@@ -1948,8 +1948,8 @@
Nothing else (a, Integer) -> Maybe (a, Integer)
forall a. a -> Maybe a
Just (a
-d, Integer
-n Integer -> Integer -> Integer
+d, Integer
+n Integer -> Integer -> Integer
forall a. Num a => a -> a -> a
- Integer
1)
diff --git a/src/Cooked.MockChain.GenerateTx.html b/src/Cooked.MockChain.GenerateTx.html
index 69c707ee1..dd346b0d6 100644
--- a/src/Cooked.MockChain.GenerateTx.html
+++ b/src/Cooked.MockChain.GenerateTx.html
@@ -43,7 +43,7 @@
= ToCardanoError String Pl.ToCardanoError
| TxBodyError String C.TxBodyError
| GenerateTxErrorGeneral String
- deriving (Int -> GenerateTxError -> ShowS
+ deriving (Int -> GenerateTxError -> ShowS
[GenerateTxError] -> ShowS
GenerateTxError -> String
(Int -> GenerateTxError -> ShowS)
@@ -58,7 +58,7 @@
$cshow :: GenerateTxError -> String
showsPrec :: Int -> GenerateTxError -> ShowS
$cshowsPrec :: Int -> GenerateTxError -> ShowS
-Show, GenerateTxError -> GenerateTxError -> Bool
+Show, GenerateTxError -> GenerateTxError -> Bool
(GenerateTxError -> GenerateTxError -> Bool)
-> (GenerateTxError -> GenerateTxError -> Bool)
-> Eq GenerateTxError
@@ -84,7 +84,7 @@
}
instance Default GenTxParams where
- def :: GenTxParams
+ def :: GenTxParams
def = GenTxParams :: Set TxOutRef -> Fee -> GenTxParams
GenTxParams {gtpCollateralIns :: Set TxOutRef
gtpCollateralIns = Set TxOutRef
@@ -116,20 +116,20 @@
-> Map ValidatorHash (Versioned Validator)
-> TxSkel
-> Either GenerateTxError (TxBodyContent BuildTx BabbageEra)
-generateTxBodyContent GenTxParams {Set TxOutRef
+generateTxBodyContent GenTxParams {Set TxOutRef
Fee
gtpFee :: Fee
gtpCollateralIns :: Set TxOutRef
gtpFee :: GenTxParams -> Fee
gtpCollateralIns :: GenTxParams -> Set TxOutRef
-..} Params
-theParams Map DatumHash Datum
-managedData Map TxOutRef TxOut
-managedTxOuts Map ValidatorHash (Versioned Validator)
-managedValidators TxSkel
-skel = do
- [(TxIn, BuildTxWith BuildTx (Witness WitCtxTxIn BabbageEra))]
-txIns <- ((TxOutRef, TxSkelRedeemer)
+..} Params
+theParams Map DatumHash Datum
+managedData Map TxOutRef TxOut
+managedTxOuts Map ValidatorHash (Versioned Validator)
+managedValidators TxSkel
+skel = do
+ [(TxIn, BuildTxWith BuildTx (Witness WitCtxTxIn BabbageEra))]
+txIns <- ((TxOutRef, TxSkelRedeemer)
-> Either
GenerateTxError
(TxIn, BuildTxWith BuildTx (Witness WitCtxTxIn BabbageEra)))
@@ -144,7 +144,7 @@
-> Either
GenerateTxError
(TxIn, BuildTxWith BuildTx (Witness WitCtxTxIn BabbageEra))
-txSkelInToTxIn ([(TxOutRef, TxSkelRedeemer)]
+txSkelInToTxIn ([(TxOutRef, TxSkelRedeemer)]
-> Either
GenerateTxError
[(TxIn, BuildTxWith BuildTx (Witness WitCtxTxIn BabbageEra))])
@@ -157,12 +157,12 @@
forall k a. Map k a -> [(k, a)]
Map.toList (TxSkel -> Map TxOutRef TxSkelRedeemer
txSkelIns TxSkel
-skel)
- TxInsReference BuildTx BabbageEra
-txInsReference <-
+skel)
+ TxInsReference BuildTx BabbageEra
+txInsReference <-
[TxOutRef]
-> Either GenerateTxError (TxInsReference BuildTx BabbageEra)
-txOutRefsToTxInsReference ([TxOutRef]
+txOutRefsToTxInsReference ([TxOutRef]
-> Either GenerateTxError (TxInsReference BuildTx BabbageEra))
-> [TxOutRef]
-> Either GenerateTxError (TxInsReference BuildTx BabbageEra)
@@ -173,12 +173,12 @@
forall a b. (a -> Maybe b) -> [a] -> [b]
Maybe.mapMaybe
( \case
- TxSkelRedeemerForReferencedScript TxOutRef
-oref redeemer
+ TxSkelRedeemerForReferencedScript TxOutRef
+oref redeemer
_ -> TxOutRef -> Maybe TxOutRef
forall a. a -> Maybe a
Just TxOutRef
-oref
+oref
TxSkelRedeemer
_ -> Maybe TxOutRef
forall a. Maybe a
@@ -191,26 +191,26 @@
forall a b. (a -> b) -> a -> b
$ TxSkel -> Map TxOutRef TxSkelRedeemer
txSkelIns TxSkel
-skel)
+skel)
[TxOutRef] -> [TxOutRef] -> [TxOutRef]
forall a. [a] -> [a] -> [a]
++ Set TxOutRef -> [TxOutRef]
forall a. Set a -> [a]
Set.toList (TxSkel -> Set TxOutRef
txSkelInsReference TxSkel
-skel)
- TxInsCollateral BabbageEra
-txInsCollateral <- [TxOutRef] -> Either GenerateTxError (TxInsCollateral BabbageEra)
-txOutRefsToTxSkelInsCollateral ([TxOutRef] -> Either GenerateTxError (TxInsCollateral BabbageEra))
+skel)
+ TxInsCollateral BabbageEra
+txInsCollateral <- [TxOutRef] -> Either GenerateTxError (TxInsCollateral BabbageEra)
+txOutRefsToTxSkelInsCollateral ([TxOutRef] -> Either GenerateTxError (TxInsCollateral BabbageEra))
-> [TxOutRef]
-> Either GenerateTxError (TxInsCollateral BabbageEra)
forall a b. (a -> b) -> a -> b
$ Set TxOutRef -> [TxOutRef]
forall a. Set a -> [a]
Set.toList Set TxOutRef
-gtpCollateralIns
- [TxOut CtxTx BabbageEra]
-txOuts <- (TxSkelOut -> Either GenerateTxError (TxOut CtxTx BabbageEra))
+gtpCollateralIns
+ [TxOut CtxTx BabbageEra]
+txOuts <- (TxSkelOut -> Either GenerateTxError (TxOut CtxTx BabbageEra))
-> [TxSkelOut] -> Either GenerateTxError [TxOut CtxTx BabbageEra]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
@@ -218,14 +218,14 @@
mapM (Params
-> TxSkelOut -> Either GenerateTxError (TxOut CtxTx BabbageEra)
txSkelOutToCardanoTxOut Params
-theParams) ([TxSkelOut] -> Either GenerateTxError [TxOut CtxTx BabbageEra])
+theParams) ([TxSkelOut] -> Either GenerateTxError [TxOut CtxTx BabbageEra])
-> [TxSkelOut] -> Either GenerateTxError [TxOut CtxTx BabbageEra]
forall a b. (a -> b) -> a -> b
$ TxSkel -> [TxSkelOut]
txSkelOuts TxSkel
-skel
- (TxValidityLowerBound BabbageEra, TxValidityUpperBound BabbageEra)
-txValidityRange <-
+skel
+ (TxValidityLowerBound BabbageEra, TxValidityUpperBound BabbageEra)
+txValidityRange <-
(ToCardanoError -> GenerateTxError)
-> Either
ToCardanoError
@@ -271,28 +271,28 @@
forall a b. (a -> b) -> a -> b
$ TxSkel -> SlotRange
txSkelValidityRange TxSkel
-skel
- TxMintValue BuildTx BabbageEra
-txMintValue <- TxSkelMints
+skel
+ TxMintValue BuildTx BabbageEra
+txMintValue <- TxSkelMints
-> Either GenerateTxError (TxMintValue BuildTx BabbageEra)
-txSkelMintsToTxMintValue (TxSkelMints
+txSkelMintsToTxMintValue (TxSkelMints
-> Either GenerateTxError (TxMintValue BuildTx BabbageEra))
-> TxSkelMints
-> Either GenerateTxError (TxMintValue BuildTx BabbageEra)
forall a b. (a -> b) -> a -> b
$ TxSkel -> TxSkelMints
txSkelMints TxSkel
-skel
- TxExtraKeyWitnesses BabbageEra
-txExtraKeyWits <-
- let signers :: [Wallet]
-signers = TxSkel -> [Wallet]
+skel
+ TxExtraKeyWitnesses BabbageEra
+txExtraKeyWits <-
+ let signers :: [Wallet]
+signers = TxSkel -> [Wallet]
txSkelSigners TxSkel
-skel
+skel
in if [Wallet] -> Bool
forall (t :: * -> *) a. Foldable t => t a -> Bool
null [Wallet]
-signers
+signers
then GenerateTxError
-> Either GenerateTxError (TxExtraKeyWitnesses BabbageEra)
forall a b. a -> Either a b
@@ -347,9 +347,9 @@
. Wallet -> PubKeyHash
walletPKHash)
[Wallet]
-signers
- TxTotalCollateral BabbageEra
-txTotalCollateral <-
+signers
+ TxTotalCollateral BabbageEra
+txTotalCollateral <-
([Value] -> TxTotalCollateral BabbageEra)
-> Either GenerateTxError [Value]
-> Either GenerateTxError (TxTotalCollateral BabbageEra)
@@ -398,16 +398,16 @@
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM
- ( \TxOutRef
-txOutRef -> do
+ ( \TxOutRef
+txOutRef -> do
Pl.TxOut Address
-_ Value
-outValue OutputDatum
+_ Value
+outValue OutputDatum
_ Maybe ScriptHash
_ <-
GenerateTxError -> Maybe TxOut -> Either GenerateTxError TxOut
forall e a. e -> Maybe a -> Either e a
-throwOnNothing
+throwOnNothing
(String -> GenerateTxError
GenerateTxErrorGeneral (String -> GenerateTxError) -> String -> GenerateTxError
forall a b. (a -> b) -> a -> b
@@ -417,16 +417,16 @@
++ TxOutRef -> String
forall a. Show a => a -> String
show TxOutRef
-txOutRef)
+txOutRef)
(TxOutRef -> Map TxOutRef TxOut -> Maybe TxOut
forall k a. Ord k => k -> Map k a -> Maybe a
Map.lookup TxOutRef
-txOutRef Map TxOutRef TxOut
-managedTxOuts)
+txOutRef Map TxOutRef TxOut
+managedTxOuts)
Value -> Either GenerateTxError Value
forall a b. b -> Either a b
Right Value
-outValue
+outValue
)
([TxOutRef] -> Either GenerateTxError [Value])
-> [TxOutRef] -> Either GenerateTxError [Value]
@@ -434,7 +434,7 @@
$ Set TxOutRef -> [TxOutRef]
forall a. Set a -> [a]
Set.toList Set TxOutRef
-gtpCollateralIns
+gtpCollateralIns
)
TxBodyContent BuildTx BabbageEra
-> Either GenerateTxError (TxBodyContent BuildTx BabbageEra)
@@ -467,19 +467,19 @@
C.TxBodyContent
{ txIns :: [(TxIn, BuildTxWith BuildTx (Witness WitCtxTxIn BabbageEra))]
C.txIns = [(TxIn, BuildTxWith BuildTx (Witness WitCtxTxIn BabbageEra))]
-txIns,
+txIns,
txInsCollateral :: TxInsCollateral BabbageEra
C.txInsCollateral = TxInsCollateral BabbageEra
-txInsCollateral,
+txInsCollateral,
txInsReference :: TxInsReference BuildTx BabbageEra
C.txInsReference = TxInsReference BuildTx BabbageEra
-txInsReference,
+txInsReference,
txOuts :: [TxOut CtxTx BabbageEra]
C.txOuts = [TxOut CtxTx BabbageEra]
-txOuts,
+txOuts,
txTotalCollateral :: TxTotalCollateral BabbageEra
C.txTotalCollateral = TxTotalCollateral BabbageEra
-txTotalCollateral,
+txTotalCollateral,
-- WARN For now we are not dealing with return collateral
txReturnCollateral :: TxReturnCollateral CtxTx BabbageEra
C.txReturnCollateral = TxReturnCollateral CtxTx BabbageEra
@@ -496,10 +496,10 @@
forall a b. (a -> b) -> a -> b
$ Fee -> Integer
feeLovelace Fee
-gtpFee,
+gtpFee,
txValidityRange :: (TxValidityLowerBound BabbageEra, TxValidityUpperBound BabbageEra)
C.txValidityRange = (TxValidityLowerBound BabbageEra, TxValidityUpperBound BabbageEra)
-txValidityRange,
+txValidityRange,
txMetadata :: TxMetadataInEra BabbageEra
C.txMetadata = TxMetadataInEra BabbageEra
forall era. TxMetadataInEra era
@@ -509,10 +509,10 @@
forall era. TxAuxScripts era
C.TxAuxScriptsNone, -- That's what plutus-apps does as well
txExtraKeyWits :: TxExtraKeyWitnesses BabbageEra
-C.txExtraKeyWits = TxExtraKeyWitnesses BabbageEra
-txExtraKeyWits,
+C.txExtraKeyWits = TxExtraKeyWitnesses BabbageEra
+txExtraKeyWits,
txProtocolParams :: BuildTxWith BuildTx (Maybe ProtocolParameters)
-C.txProtocolParams = Maybe ProtocolParameters
+C.txProtocolParams = Maybe ProtocolParameters
-> BuildTxWith BuildTx (Maybe ProtocolParameters)
forall a. a -> BuildTxWith BuildTx a
C.BuildTxWith (Maybe ProtocolParameters
@@ -533,38 +533,38 @@
-> Params -> BuildTxWith BuildTx (Maybe ProtocolParameters)
forall a b. (a -> b) -> a -> b
$ Params
-theParams, -- That's what plutus-apps does as well
+theParams, -- That's what plutus-apps does as well
txWithdrawals :: TxWithdrawals BuildTx BabbageEra
-C.txWithdrawals = TxWithdrawals BuildTx BabbageEra
+C.txWithdrawals = TxWithdrawals BuildTx BabbageEra
forall build era. TxWithdrawals build era
C.TxWithdrawalsNone, -- That's what plutus-apps does as well
txCertificates :: TxCertificates BuildTx BabbageEra
-C.txCertificates = TxCertificates BuildTx BabbageEra
+C.txCertificates = TxCertificates BuildTx BabbageEra
forall build era. TxCertificates build era
C.TxCertificatesNone, -- That's what plutus-apps does as well
txUpdateProposal :: TxUpdateProposal BabbageEra
-C.txUpdateProposal = TxUpdateProposal BabbageEra
+C.txUpdateProposal = TxUpdateProposal BabbageEra
forall era. TxUpdateProposal era
C.TxUpdateProposalNone, -- That's what plutus-apps does as well
txMintValue :: TxMintValue BuildTx BabbageEra
-C.txMintValue = TxMintValue BuildTx BabbageEra
-txMintValue,
+C.txMintValue = TxMintValue BuildTx BabbageEra
+txMintValue,
txScriptValidity :: TxScriptValidity BabbageEra
-C.txScriptValidity = TxScriptValidity BabbageEra
+C.txScriptValidity = TxScriptValidity BabbageEra
forall era. TxScriptValidity era
C.TxScriptValidityNone -- That's what plutus-apps does as well
}
where
-- Helper function to throw errors.
- throwOnNothing :: e -> Maybe a -> Either e a
- throwOnNothing :: e -> Maybe a -> Either e a
-throwOnNothing e
-err = Either e a -> (a -> Either e a) -> Maybe a -> Either e a
+ throwOnNothing :: e -> Maybe a -> Either e a
+ throwOnNothing :: e -> Maybe a -> Either e a
+throwOnNothing e
+err = Either e a -> (a -> Either e a) -> Maybe a -> Either e a
forall b a. b -> (a -> b) -> Maybe a -> b
maybe (e -> Either e a
forall a b. a -> Either a b
Left e
-err) a -> Either e a
+err) a -> Either e a
forall a b. b -> Either a b
Right
@@ -572,7 +572,7 @@
-- 'TxSkelIn', into a 'C.TxIn', together with the appropriate witness. If
-- you add reference inputs, don't forget to also update the
-- 'txInsReference'!
- txSkelInToTxIn ::
+ txSkelInToTxIn ::
(Pl.TxOutRef, TxSkelRedeemer) ->
Either
GenerateTxError
@@ -581,18 +581,18 @@
C.BuildTx
(C.Witness C.WitCtxTxIn C.BabbageEra)
)
- txSkelInToTxIn :: (TxOutRef, TxSkelRedeemer)
+ txSkelInToTxIn :: (TxOutRef, TxSkelRedeemer)
-> Either
GenerateTxError
(TxIn, BuildTxWith BuildTx (Witness WitCtxTxIn BabbageEra))
-txSkelInToTxIn (TxOutRef
-txOutRef, TxSkelRedeemer
-txSkelRedeemer) = do
- Witness WitCtxTxIn BabbageEra
-witness <- TxSkelRedeemer
+txSkelInToTxIn (TxOutRef
+txOutRef, TxSkelRedeemer
+txSkelRedeemer) = do
+ Witness WitCtxTxIn BabbageEra
+witness <- TxSkelRedeemer
-> Either GenerateTxError (Witness WitCtxTxIn BabbageEra)
-mkWitness TxSkelRedeemer
-txSkelRedeemer
+mkWitness TxSkelRedeemer
+txSkelRedeemer
(ToCardanoError -> GenerateTxError)
-> (TxIn
-> (TxIn, BuildTxWith BuildTx (Witness WitCtxTxIn BabbageEra)))
@@ -611,7 +611,7 @@
-> BuildTxWith BuildTx (Witness WitCtxTxIn BabbageEra)
forall a. a -> BuildTxWith BuildTx a
C.BuildTxWith Witness WitCtxTxIn BabbageEra
-witness)
+witness)
(Either ToCardanoError TxIn
-> Either
GenerateTxError
@@ -623,59 +623,59 @@
forall a b. (a -> b) -> a -> b
$ TxOutRef -> Either ToCardanoError TxIn
Pl.toCardanoTxIn TxOutRef
-txOutRef
+txOutRef
where
- resolveScriptOutputOwnerAndDatum ::
+ resolveScriptOutputOwnerAndDatum ::
Either
GenerateTxError
( Pl.ValidatorHash,
Pl.Versioned Pl.Validator,
C.ScriptDatum C.WitCtxTxIn
)
- resolveScriptOutputOwnerAndDatum :: Either
+ resolveScriptOutputOwnerAndDatum :: Either
GenerateTxError
(ValidatorHash, Versioned Validator, ScriptDatum WitCtxTxIn)
-resolveScriptOutputOwnerAndDatum = do
- TxOut
-txOut <-
+resolveScriptOutputOwnerAndDatum = do
+ TxOut
+txOut <-
GenerateTxError -> Maybe TxOut -> Either GenerateTxError TxOut
forall e a. e -> Maybe a -> Either e a
-throwOnNothing
+throwOnNothing
(String -> GenerateTxError
GenerateTxErrorGeneral String
"txSkelInToTxIn: Unknown txOutRef")
(TxOutRef -> Map TxOutRef TxOut -> Maybe TxOut
forall k a. Ord k => k -> Map k a -> Maybe a
Map.lookup TxOutRef
-txOutRef Map TxOutRef TxOut
-managedTxOuts)
- ValidatorHash
-validatorHash <-
+txOutRef Map TxOutRef TxOut
+managedTxOuts)
+ ValidatorHash
+validatorHash <-
case TxOut -> Address
forall o.
(IsAbstractOutput o, ToCredential (OwnerType o)) =>
o -> Address
outputAddress TxOut
-txOut of
- (Pl.Address (Pl.ScriptCredential ValidatorHash
-validatorHash) Maybe StakingCredential
+txOut of
+ (Pl.Address (Pl.ScriptCredential ValidatorHash
+validatorHash) Maybe StakingCredential
_) -> ValidatorHash -> Either GenerateTxError ValidatorHash
forall a b. b -> Either a b
Right ValidatorHash
-validatorHash
+validatorHash
Address
_ -> GenerateTxError -> Either GenerateTxError ValidatorHash
forall a b. a -> Either a b
Left (String -> GenerateTxError
GenerateTxErrorGeneral String
"txSkelInToTxIn: Output is not a script output")
- Versioned Validator
-validator <-
+ Versioned Validator
+validator <-
GenerateTxError
-> Maybe (Versioned Validator)
-> Either GenerateTxError (Versioned Validator)
forall e a. e -> Maybe a -> Either e a
-throwOnNothing
+throwOnNothing
(String -> GenerateTxError
GenerateTxErrorGeneral String
"txSkelInToTxIn: Unknown validator")
@@ -684,35 +684,35 @@
-> Maybe (Versioned Validator)
forall k a. Ord k => k -> Map k a -> Maybe a
Map.lookup ValidatorHash
-validatorHash Map ValidatorHash (Versioned Validator)
-managedValidators)
- ScriptDatum WitCtxTxIn
-datum <-
+validatorHash Map ValidatorHash (Versioned Validator)
+managedValidators)
+ ScriptDatum WitCtxTxIn
+datum <-
case TxOut -> OutputDatum
forall o.
(IsAbstractOutput o, ToOutputDatum (DatumType o)) =>
o -> OutputDatum
outputOutputDatum TxOut
-txOut of
+txOut of
OutputDatum
Pl.NoOutputDatum -> GenerateTxError -> Either GenerateTxError (ScriptDatum WitCtxTxIn)
forall a b. a -> Either a b
Left (String -> GenerateTxError
GenerateTxErrorGeneral String
"txSkelInToTxIn: No datum found on script output")
- Pl.OutputDatum Datum
-_datum -> ScriptDatum WitCtxTxIn
+ Pl.OutputDatum Datum
+_datum -> ScriptDatum WitCtxTxIn
-> Either GenerateTxError (ScriptDatum WitCtxTxIn)
forall a b. b -> Either a b
Right ScriptDatum WitCtxTxIn
C.InlineScriptDatum
- Pl.OutputDatumHash DatumHash
-datumHash ->
+ Pl.OutputDatumHash DatumHash
+datumHash ->
GenerateTxError
-> Maybe (ScriptDatum WitCtxTxIn)
-> Either GenerateTxError (ScriptDatum WitCtxTxIn)
forall e a. e -> Maybe a -> Either e a
-throwOnNothing
+throwOnNothing
(String -> GenerateTxError
GenerateTxErrorGeneral String
"txSkelInToTxIn: Datum hash could not be resolved")
@@ -731,22 +731,22 @@
<$> DatumHash -> Map DatumHash Datum -> Maybe Datum
forall k a. Ord k => k -> Map k a -> Maybe a
Map.lookup DatumHash
-datumHash Map DatumHash Datum
-managedData)
+datumHash Map DatumHash Datum
+managedData)
(ValidatorHash, Versioned Validator, ScriptDatum WitCtxTxIn)
-> Either
GenerateTxError
(ValidatorHash, Versioned Validator, ScriptDatum WitCtxTxIn)
forall (m :: * -> *) a. Monad m => a -> m a
return (ValidatorHash
-validatorHash, Versioned Validator
-validator, ScriptDatum WitCtxTxIn
-datum)
+validatorHash, Versioned Validator
+validator, ScriptDatum WitCtxTxIn
+datum)
- mkWitness :: TxSkelRedeemer -> Either GenerateTxError (C.Witness C.WitCtxTxIn C.BabbageEra)
- mkWitness :: TxSkelRedeemer
+ mkWitness :: TxSkelRedeemer -> Either GenerateTxError (C.Witness C.WitCtxTxIn C.BabbageEra)
+ mkWitness :: TxSkelRedeemer
-> Either GenerateTxError (Witness WitCtxTxIn BabbageEra)
-mkWitness TxSkelRedeemer
+mkWitness TxSkelRedeemer
TxSkelNoRedeemerForPK = Witness WitCtxTxIn BabbageEra
-> Either GenerateTxError (Witness WitCtxTxIn BabbageEra)
forall a b. b -> Either a b
@@ -759,18 +759,18 @@
forall witctx era. KeyWitnessInCtx witctx -> Witness witctx era
C.KeyWitness KeyWitnessInCtx WitCtxTxIn
C.KeyWitnessForSpending
- mkWitness (TxSkelRedeemerForReferencedScript TxOutRef
-validatorOref redeemer
-redeemer) = do
- (ValidatorHash
-validatorHash, Versioned Validator
-validator, ScriptDatum WitCtxTxIn
-datum) <- Either
+ mkWitness (TxSkelRedeemerForReferencedScript TxOutRef
+validatorOref redeemer
+redeemer) = do
+ (ValidatorHash
+validatorHash, Versioned Validator
+validator, ScriptDatum WitCtxTxIn
+datum) <- Either
GenerateTxError
(ValidatorHash, Versioned Validator, ScriptDatum WitCtxTxIn)
-resolveScriptOutputOwnerAndDatum
- ScriptHash
-scriptHashAtOref <-
+resolveScriptOutputOwnerAndDatum
+ ScriptHash
+scriptHashAtOref <-
-- In our own MockChainT implementation, this error should never
-- been thrown, because we collect the 'managedTxOuts' using
-- (eventually) 'lookupUtxos', which will already fail on
@@ -778,7 +778,7 @@
GenerateTxError
-> Maybe ScriptHash -> Either GenerateTxError ScriptHash
forall e a. e -> Maybe a -> Either e a
-throwOnNothing
+throwOnNothing
(String -> GenerateTxError
GenerateTxErrorGeneral String
"txSkelInToTxIn: Can't resolve reference script outref. This might mean that you either never created or accidentally consumed the UTxO where the reference script is stored")
@@ -788,8 +788,8 @@
$ TxOutRef -> Map TxOutRef TxOut -> Maybe TxOut
forall k a. Ord k => k -> Map k a -> Maybe a
Map.lookup TxOutRef
-validatorOref Map TxOutRef TxOut
-managedTxOuts Maybe TxOut -> (TxOut -> Maybe ScriptHash) -> Maybe ScriptHash
+validatorOref Map TxOutRef TxOut
+managedTxOuts Maybe TxOut -> (TxOut -> Maybe ScriptHash) -> Maybe ScriptHash
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= (TxOut
-> Optic' A_Lens NoIx TxOut (Maybe ScriptHash) -> Maybe ScriptHash
@@ -804,12 +804,12 @@
Bool -> Either GenerateTxError () -> Either GenerateTxError ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (ScriptHash
-scriptHashAtOref ScriptHash -> ScriptHash -> Bool
+scriptHashAtOref ScriptHash -> ScriptHash -> Bool
forall a. Eq a => a -> a -> Bool
/= ValidatorHash -> ScriptHash
forall a. ToScriptHash a => a -> ScriptHash
toScriptHash ValidatorHash
-validatorHash) (Either GenerateTxError () -> Either GenerateTxError ())
+validatorHash) (Either GenerateTxError () -> Either GenerateTxError ())
-> Either GenerateTxError () -> Either GenerateTxError ()
forall a b. (a -> b) -> a -> b
$
@@ -822,8 +822,8 @@
String -> GenerateTxError
GenerateTxErrorGeneral String
"txSkelInToTxIn: Wrong reference script hash. Are you using the correct TxOutRef on your TxSkelRedeemerForReferencedScript?"
- TxIn
-validatorTxIn <-
+ TxIn
+validatorTxIn <-
(ToCardanoError -> GenerateTxError)
-> Either ToCardanoError TxIn -> Either GenerateTxError TxIn
forall (a :: * -> * -> *) b c d.
@@ -838,9 +838,9 @@
forall a b. (a -> b) -> a -> b
$ TxOutRef -> Either ToCardanoError TxIn
Pl.toCardanoTxIn TxOutRef
-validatorOref
- ScriptHash
-scriptHash <-
+validatorOref
+ ScriptHash
+scriptHash <-
(ToCardanoError -> GenerateTxError)
-> Either ToCardanoError ScriptHash
-> Either GenerateTxError ScriptHash
@@ -853,13 +853,13 @@
"txSkelInToTxIn: could not convert script hash of referenced script")
(ValidatorHash -> Either ToCardanoError ScriptHash
Pl.toCardanoScriptHash ValidatorHash
-validatorHash)
- let scriptWitnessBuilder :: ScriptDatum WitCtxTxIn
+validatorHash)
+ let scriptWitnessBuilder :: ScriptDatum WitCtxTxIn
-> ScriptData
-> ExecutionUnits
-> ScriptWitness WitCtxTxIn BabbageEra
-scriptWitnessBuilder = case Versioned Validator
-validator of
+scriptWitnessBuilder = case Versioned Validator
+validator of
Pl.Versioned Validator
_ Language
Pl.PlutusV1 ->
@@ -888,10 +888,10 @@
forall lang.
TxIn -> Maybe ScriptHash -> PlutusScriptOrReferenceInput lang
C.PReferenceScript TxIn
-validatorTxIn (ScriptHash -> Maybe ScriptHash
+validatorTxIn (ScriptHash -> Maybe ScriptHash
forall a. a -> Maybe a
Just ScriptHash
-scriptHash))
+scriptHash))
Pl.Versioned Validator
_ Language
Pl.PlutusV2 ->
@@ -920,10 +920,10 @@
forall lang.
TxIn -> Maybe ScriptHash -> PlutusScriptOrReferenceInput lang
C.PReferenceScript TxIn
-validatorTxIn (ScriptHash -> Maybe ScriptHash
+validatorTxIn (ScriptHash -> Maybe ScriptHash
forall a. a -> Maybe a
Just ScriptHash
-scriptHash))
+scriptHash))
Witness WitCtxTxIn BabbageEra
-> Either GenerateTxError (Witness WitCtxTxIn BabbageEra)
forall (m :: * -> *) a. Monad m => a -> m a
@@ -950,36 +950,36 @@
-> ScriptData
-> ExecutionUnits
-> ScriptWitness WitCtxTxIn BabbageEra
-scriptWitnessBuilder
+scriptWitnessBuilder
ScriptDatum WitCtxTxIn
-datum
+datum
(BuiltinData -> ScriptData
Pl.toCardanoScriptData (BuiltinData -> ScriptData) -> BuiltinData -> ScriptData
forall a b. (a -> b) -> a -> b
$ redeemer -> BuiltinData
forall a. ToData a => a -> BuiltinData
Pl.toBuiltinData redeemer
-redeemer)
+redeemer)
ExecutionUnits
Pl.zeroExecutionUnits -- We can't guess that yet, no?
- mkWitness (TxSkelRedeemerForScript redeemer
-redeemer) = do
- (ValidatorHash
-_validatorHash, Versioned Validator
-validator, ScriptDatum WitCtxTxIn
-datum) <- Either
+ mkWitness (TxSkelRedeemerForScript redeemer
+redeemer) = do
+ (ValidatorHash
+_validatorHash, Versioned Validator
+validator, ScriptDatum WitCtxTxIn
+datum) <- Either
GenerateTxError
(ValidatorHash, Versioned Validator, ScriptDatum WitCtxTxIn)
-resolveScriptOutputOwnerAndDatum
- ScriptDatum WitCtxTxIn
+resolveScriptOutputOwnerAndDatum
+ ScriptDatum WitCtxTxIn
-> ScriptData
-> ExecutionUnits
-> ScriptWitness WitCtxTxIn BabbageEra
-scriptWitnessBuilder <-
+scriptWitnessBuilder <-
case Versioned Validator
-validator of
- Pl.Versioned (Pl.Validator Script
-script) Language
+validator of
+ Pl.Versioned (Pl.Validator Script
+script) Language
Pl.PlutusV1 ->
(ToCardanoError -> GenerateTxError)
-> (PlutusScript PlutusScriptV1
@@ -1044,9 +1044,9 @@
forall lang. AsType lang -> AsType (PlutusScript lang)
C.AsPlutusScript AsType PlutusScriptV1
C.AsPlutusScriptV1) Script
-script)
- Pl.Versioned (Pl.Validator Script
-script) Language
+script)
+ Pl.Versioned (Pl.Validator Script
+script) Language
Pl.PlutusV2 ->
(ToCardanoError -> GenerateTxError)
-> (PlutusScript PlutusScriptV2
@@ -1111,7 +1111,7 @@
forall lang. AsType lang -> AsType (PlutusScript lang)
C.AsPlutusScript AsType PlutusScriptV2
C.AsPlutusScriptV2) Script
-script)
+script)
Witness WitCtxTxIn BabbageEra
-> Either GenerateTxError (Witness WitCtxTxIn BabbageEra)
forall (m :: * -> *) a. Monad m => a -> m a
@@ -1138,24 +1138,24 @@
-> ScriptData
-> ExecutionUnits
-> ScriptWitness WitCtxTxIn BabbageEra
-scriptWitnessBuilder
+scriptWitnessBuilder
ScriptDatum WitCtxTxIn
-datum
+datum
(BuiltinData -> ScriptData
Pl.toCardanoScriptData (BuiltinData -> ScriptData) -> BuiltinData -> ScriptData
forall a b. (a -> b) -> a -> b
$ redeemer -> BuiltinData
forall a. ToData a => a -> BuiltinData
Pl.toBuiltinData redeemer
-redeemer)
+redeemer)
ExecutionUnits
Pl.zeroExecutionUnits -- We can't guess that yet, no?
-- Convert a list of 'Pl.TxOutRef' into a 'C.TxInsReference'
- txOutRefsToTxInsReference :: [Pl.TxOutRef] -> Either GenerateTxError (C.TxInsReference C.BuildTx C.BabbageEra)
- txOutRefsToTxInsReference :: [TxOutRef]
+ txOutRefsToTxInsReference :: [Pl.TxOutRef] -> Either GenerateTxError (C.TxInsReference C.BuildTx C.BabbageEra)
+ txOutRefsToTxInsReference :: [TxOutRef]
-> Either GenerateTxError (TxInsReference BuildTx BabbageEra)
-txOutRefsToTxInsReference =
+txOutRefsToTxInsReference =
(ToCardanoError -> GenerateTxError)
-> ([TxIn] -> TxInsReference BuildTx BabbageEra)
-> Either ToCardanoError [TxIn]
@@ -1171,15 +1171,15 @@
[] -> TxInsReference BuildTx BabbageEra
forall build era. TxInsReference build era
C.TxInsReferenceNone
- [TxIn]
-txIns -> ReferenceTxInsScriptsInlineDatumsSupportedInEra BabbageEra
+ [TxIn]
+txIns -> ReferenceTxInsScriptsInlineDatumsSupportedInEra BabbageEra
-> [TxIn] -> TxInsReference BuildTx BabbageEra
forall era build.
ReferenceTxInsScriptsInlineDatumsSupportedInEra era
-> [TxIn] -> TxInsReference build era
C.TxInsReference ReferenceTxInsScriptsInlineDatumsSupportedInEra BabbageEra
C.ReferenceTxInsScriptsInlineDatumsInBabbageEra [TxIn]
-txIns
+txIns
)
(Either ToCardanoError [TxIn]
-> Either GenerateTxError (TxInsReference BuildTx BabbageEra))
@@ -1196,9 +1196,9 @@
Pl.toCardanoTxIn
-- Convert a list of 'Pl.TxOutRef' into a 'C.TxInsCollateral'
- txOutRefsToTxSkelInsCollateral :: [Pl.TxOutRef] -> Either GenerateTxError (C.TxInsCollateral C.BabbageEra)
- txOutRefsToTxSkelInsCollateral :: [TxOutRef] -> Either GenerateTxError (TxInsCollateral BabbageEra)
-txOutRefsToTxSkelInsCollateral =
+ txOutRefsToTxSkelInsCollateral :: [Pl.TxOutRef] -> Either GenerateTxError (C.TxInsCollateral C.BabbageEra)
+ txOutRefsToTxSkelInsCollateral :: [TxOutRef] -> Either GenerateTxError (TxInsCollateral BabbageEra)
+txOutRefsToTxSkelInsCollateral =
(ToCardanoError -> GenerateTxError)
-> Either ToCardanoError (TxInsCollateral BabbageEra)
-> Either GenerateTxError (TxInsCollateral BabbageEra)
@@ -1220,7 +1220,7 @@
-> Either ToCardanoError (TxInsCollateral BabbageEra)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap [TxIn] -> TxInsCollateral BabbageEra
-toTxInsCollateral
+toTxInsCollateral
(Either ToCardanoError [TxIn]
-> Either ToCardanoError (TxInsCollateral BabbageEra))
-> ([TxOutRef] -> Either ToCardanoError [TxIn])
@@ -1235,27 +1235,27 @@
mapM TxOutRef -> Either ToCardanoError TxIn
Pl.toCardanoTxIn
where
- toTxInsCollateral :: [TxIn] -> TxInsCollateral BabbageEra
-toTxInsCollateral [] = TxInsCollateral BabbageEra
+ toTxInsCollateral :: [TxIn] -> TxInsCollateral BabbageEra
+toTxInsCollateral [] = TxInsCollateral BabbageEra
forall era. TxInsCollateral era
C.TxInsCollateralNone
- toTxInsCollateral [TxIn]
-ins = CollateralSupportedInEra BabbageEra
+ toTxInsCollateral [TxIn]
+ins = CollateralSupportedInEra BabbageEra
-> [TxIn] -> TxInsCollateral BabbageEra
forall era.
CollateralSupportedInEra era -> [TxIn] -> TxInsCollateral era
C.TxInsCollateral CollateralSupportedInEra BabbageEra
C.CollateralInBabbageEra [TxIn]
-ins
+ins
-- Convert the 'TxSkelMints' into a 'TxMintValue'
- txSkelMintsToTxMintValue :: TxSkelMints -> Either GenerateTxError (C.TxMintValue C.BuildTx C.BabbageEra)
- txSkelMintsToTxMintValue :: TxSkelMints
+ txSkelMintsToTxMintValue :: TxSkelMints -> Either GenerateTxError (C.TxMintValue C.BuildTx C.BabbageEra)
+ txSkelMintsToTxMintValue :: TxSkelMints
-> Either GenerateTxError (TxMintValue BuildTx BabbageEra)
-txSkelMintsToTxMintValue TxSkelMints
-mints =
+txSkelMintsToTxMintValue TxSkelMints
+mints =
if TxSkelMints
-mints TxSkelMints -> TxSkelMints -> Bool
+mints TxSkelMints -> TxSkelMints -> Bool
forall a. Eq a => a -> a -> Bool
== TxSkelMints
forall k a. Map k a
@@ -1289,7 +1289,7 @@
-> TxMintValue BuildTx BabbageEra)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Either GenerateTxError Value
-mintVal Either
+mintVal Either
GenerateTxError
(BuildTxWith
BuildTx (Map PolicyId (ScriptWitness WitCtxMint BabbageEra))
@@ -1318,11 +1318,11 @@
<$> Either
GenerateTxError
(Map PolicyId (ScriptWitness WitCtxMint BabbageEra))
-witnessMap)
+witnessMap)
where
- mintVal :: Either GenerateTxError C.Value
- mintVal :: Either GenerateTxError Value
-mintVal =
+ mintVal :: Either GenerateTxError C.Value
+ mintVal :: Either GenerateTxError Value
+mintVal =
(ToCardanoError -> GenerateTxError)
-> Either ToCardanoError Value -> Either GenerateTxError Value
forall (a :: * -> * -> *) b c d.
@@ -1349,13 +1349,13 @@
-> TxSkelMints -> Either GenerateTxError Value
forall a b. (a -> b) -> a -> b
$ TxSkelMints
-mints
+mints
- witnessMap :: Either GenerateTxError (Map C.PolicyId (C.ScriptWitness C.WitCtxMint C.BabbageEra))
- witnessMap :: Either
+ witnessMap :: Either GenerateTxError (Map C.PolicyId (C.ScriptWitness C.WitCtxMint C.BabbageEra))
+ witnessMap :: Either
GenerateTxError
(Map PolicyId (ScriptWitness WitCtxMint BabbageEra))
-witnessMap =
+witnessMap =
([Map PolicyId (ScriptWitness WitCtxMint BabbageEra)]
-> Map PolicyId (ScriptWitness WitCtxMint BabbageEra))
-> Either
@@ -1396,11 +1396,11 @@
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM
- ( \(Versioned MintingPolicy
-policy, MintsRedeemer
-redeemer, TokenName
-_tName, Integer
-_amount) ->
+ ( \(Versioned MintingPolicy
+policy, MintsRedeemer
+redeemer, TokenName
+_tName, Integer
+_amount) ->
PolicyId
-> ScriptWitness WitCtxMint BabbageEra
-> Map PolicyId (ScriptWitness WitCtxMint BabbageEra)
@@ -1428,7 +1428,7 @@
(MintingPolicyHash -> Either ToCardanoError PolicyId
Pl.toCardanoPolicyId (Versioned MintingPolicy -> MintingPolicyHash
Pl.mintingPolicyHash Versioned MintingPolicy
-policy))
+policy))
Either
GenerateTxError
(ScriptWitness WitCtxMint BabbageEra
@@ -1441,9 +1441,9 @@
<*> Versioned MintingPolicy
-> MintsRedeemer
-> Either GenerateTxError (ScriptWitness WitCtxMint BabbageEra)
-mkMintWitness Versioned MintingPolicy
-policy MintsRedeemer
-redeemer
+mkMintWitness Versioned MintingPolicy
+policy MintsRedeemer
+redeemer
)
([(Versioned MintingPolicy, MintsRedeemer, TokenName, Integer)]
-> Either
@@ -1457,28 +1457,28 @@
$ TxSkelMints
-> [(Versioned MintingPolicy, MintsRedeemer, TokenName, Integer)]
txSkelMintsToList TxSkelMints
-mints
+mints
- mkMintWitness ::
+ mkMintWitness ::
Pl.Versioned Pl.MintingPolicy ->
MintsRedeemer ->
Either
GenerateTxError
(C.ScriptWitness C.WitCtxMint C.BabbageEra)
- mkMintWitness :: Versioned MintingPolicy
+ mkMintWitness :: Versioned MintingPolicy
-> MintsRedeemer
-> Either GenerateTxError (ScriptWitness WitCtxMint BabbageEra)
-mkMintWitness (Pl.Versioned (Pl.MintingPolicy Script
-script) Language
-version) MintsRedeemer
-redeemer = do
- ScriptDatum WitCtxMint
+mkMintWitness (Pl.Versioned (Pl.MintingPolicy Script
+script) Language
+version) MintsRedeemer
+redeemer = do
+ ScriptDatum WitCtxMint
-> ScriptData
-> ExecutionUnits
-> ScriptWitness WitCtxMint BabbageEra
-scriptWitnessBuilder <-
+scriptWitnessBuilder <-
case Language
-version of
+version of
Language
Pl.PlutusV1 ->
(ToCardanoError -> GenerateTxError)
@@ -1544,7 +1544,7 @@
forall lang. AsType lang -> AsType (PlutusScript lang)
C.AsPlutusScript AsType PlutusScriptV1
C.AsPlutusScriptV1) Script
-script)
+script)
Language
Pl.PlutusV2 ->
(ToCardanoError -> GenerateTxError)
@@ -1610,7 +1610,7 @@
forall lang. AsType lang -> AsType (PlutusScript lang)
C.AsPlutusScript AsType PlutusScriptV2
C.AsPlutusScriptV2) Script
-script)
+script)
ScriptWitness WitCtxMint BabbageEra
-> Either GenerateTxError (ScriptWitness WitCtxMint BabbageEra)
forall (m :: * -> *) a. Monad m => a -> m a
@@ -1624,11 +1624,11 @@
-> ScriptData
-> ExecutionUnits
-> ScriptWitness WitCtxMint BabbageEra
-scriptWitnessBuilder
+scriptWitnessBuilder
ScriptDatum WitCtxMint
C.NoScriptDatumForMint -- This seems to be the only well-typed option (?)
( case MintsRedeemer
-redeemer of
+redeemer of
MintsRedeemer
NoMintsRedeemer -> BuiltinData -> ScriptData
Pl.toCardanoScriptData (BuiltinData -> ScriptData) -> BuiltinData -> ScriptData
@@ -1636,14 +1636,14 @@
$ () -> BuiltinData
forall a. ToData a => a -> BuiltinData
Pl.toBuiltinData () -- This is also how plutus-apps is doing it: Using no redeemer means using '()' on-chain
- SomeMintsRedeemer redeemer
-red -> BuiltinData -> ScriptData
+ SomeMintsRedeemer redeemer
+red -> BuiltinData -> ScriptData
Pl.toCardanoScriptData (BuiltinData -> ScriptData) -> BuiltinData -> ScriptData
forall a b. (a -> b) -> a -> b
$ redeemer -> BuiltinData
forall a. ToData a => a -> BuiltinData
Pl.toBuiltinData redeemer
-red
+red
)
ExecutionUnits
Pl.zeroExecutionUnits -- This is what plutus-apps does as well, we can't know this yet, no?
@@ -1652,9 +1652,9 @@
txSkelOutToCardanoTxOut :: Pl.Params -> TxSkelOut -> Either GenerateTxError (C.TxOut C.CtxTx C.BabbageEra)
txSkelOutToCardanoTxOut :: Params
-> TxSkelOut -> Either GenerateTxError (TxOut CtxTx BabbageEra)
-txSkelOutToCardanoTxOut Params
-theParams (Pays o
-output) =
+txSkelOutToCardanoTxOut Params
+theParams (Pays o
+output) =
(ToCardanoError -> GenerateTxError)
-> Either ToCardanoError (TxOut CtxTx BabbageEra)
-> Either GenerateTxError (TxOut CtxTx BabbageEra)
@@ -1698,12 +1698,12 @@
-> Address -> Either ToCardanoError (AddressInEra BabbageEra)
Pl.toCardanoAddressInEra (Params -> NetworkId
Pl.pNetworkId Params
-theParams) (o -> Address
+theParams) (o -> Address
forall o.
(IsAbstractOutput o, ToCredential (OwnerType o)) =>
o -> Address
outputAddress o
-output)
+output)
Either
ToCardanoError
(TxOutValue BabbageEra
@@ -1725,7 +1725,7 @@
Pl.toCardanoValue (o -> Value
forall o. (IsAbstractOutput o, ToValue (ValueType o)) => o -> Value
outputValue o
-output))
+output))
Either
ToCardanoError
(TxOutDatum CtxTx BabbageEra
@@ -1736,7 +1736,7 @@
(ReferenceScript BabbageEra -> TxOut CtxTx BabbageEra)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> ( case o
-output o -> Optic' A_Lens NoIx o TxSkelOutDatum -> TxSkelOutDatum
+output o -> Optic' A_Lens NoIx o TxSkelOutDatum -> TxSkelOutDatum
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
@@ -1749,8 +1749,8 @@
forall a b. b -> Either a b
Right TxOutDatum CtxTx BabbageEra
Pl.toCardanoTxOutNoDatum
- TxSkelOutDatumHash a
-datum -> DatumHash -> Either ToCardanoError (TxOutDatum CtxTx BabbageEra)
+ TxSkelOutDatumHash a
+datum -> DatumHash -> Either ToCardanoError (TxOutDatum CtxTx BabbageEra)
forall ctx.
DatumHash -> Either ToCardanoError (TxOutDatum ctx BabbageEra)
Pl.toCardanoTxOutDatumHash (DatumHash -> Either ToCardanoError (TxOutDatum CtxTx BabbageEra))
@@ -1770,9 +1770,9 @@
-> a -> Either ToCardanoError (TxOutDatum CtxTx BabbageEra)
forall a b. (a -> b) -> a -> b
$ a
-datum
- TxSkelOutDatum a
-datum -> TxOutDatum CtxTx BabbageEra
+datum
+ TxSkelOutDatum a
+datum -> TxOutDatum CtxTx BabbageEra
-> Either ToCardanoError (TxOutDatum CtxTx BabbageEra)
forall a b. b -> Either a b
Right (TxOutDatum CtxTx BabbageEra
@@ -1794,9 +1794,9 @@
-> a -> Either ToCardanoError (TxOutDatum CtxTx BabbageEra)
forall a b. (a -> b) -> a -> b
$ a
-datum
- TxSkelOutInlineDatum a
-datum -> TxOutDatum CtxTx BabbageEra
+datum
+ TxSkelOutInlineDatum a
+datum -> TxOutDatum CtxTx BabbageEra
-> Either ToCardanoError (TxOutDatum CtxTx BabbageEra)
forall a b. b -> Either a b
Right (TxOutDatum CtxTx BabbageEra
@@ -1818,7 +1818,7 @@
-> a -> Either ToCardanoError (TxOutDatum CtxTx BabbageEra)
forall a b. (a -> b) -> a -> b
$ a
-datum
+datum
)
Either
ToCardanoError
@@ -1834,7 +1834,7 @@
-> Maybe (ReferenceScriptType o) -> Maybe (Versioned Script)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> o
-output o
+output o
-> Optic' A_Lens NoIx o (Maybe (ReferenceScriptType o))
-> Maybe (ReferenceScriptType o)
forall k s (is :: IxList) a.
@@ -1869,15 +1869,15 @@
-> Map ValidatorHash (Versioned Validator)
-> TxSkel
-> Either GenerateTxError (Tx BabbageEra)
-generateTx GenTxParams
-genTxParams Params
-params Map DatumHash Datum
-datums Map TxOutRef TxOut
-txOuts Map ValidatorHash (Versioned Validator)
-validators TxSkel
-skel = do
- TxBodyContent BuildTx BabbageEra
-txBodyContent <- GenTxParams
+generateTx GenTxParams
+genTxParams Params
+params Map DatumHash Datum
+datums Map TxOutRef TxOut
+txOuts Map ValidatorHash (Versioned Validator)
+validators TxSkel
+skel = do
+ TxBodyContent BuildTx BabbageEra
+txBodyContent <- GenTxParams
-> Params
-> Map DatumHash Datum
-> Map TxOutRef TxOut
@@ -1885,14 +1885,14 @@
-> TxSkel
-> Either GenerateTxError (TxBodyContent BuildTx BabbageEra)
generateTxBodyContent GenTxParams
-genTxParams Params
-params Map DatumHash Datum
-datums Map TxOutRef TxOut
-txOuts Map ValidatorHash (Versioned Validator)
-validators TxSkel
-skel
- Tx BabbageEra
-cardanoTxUnsigned <-
+genTxParams Params
+params Map DatumHash Datum
+datums Map TxOutRef TxOut
+txOuts Map ValidatorHash (Versioned Validator)
+validators TxSkel
+skel
+ Tx BabbageEra
+cardanoTxUnsigned <-
(TxBodyError -> GenerateTxError)
-> (TxBody BabbageEra -> Tx BabbageEra)
-> Either TxBodyError (TxBody BabbageEra)
@@ -1920,18 +1920,18 @@
IsCardanoEra era =>
TxBodyContent BuildTx era -> Either TxBodyError (TxBody era)
C.makeTransactionBody TxBodyContent BuildTx BabbageEra
-txBodyContent)
- let cardanoTxSigned :: Tx BabbageEra
-cardanoTxSigned = (Tx BabbageEra -> Wallet -> Tx BabbageEra)
+txBodyContent)
+ let cardanoTxSigned :: Tx BabbageEra
+cardanoTxSigned = (Tx BabbageEra -> Wallet -> Tx BabbageEra)
-> Tx BabbageEra -> [Wallet] -> Tx BabbageEra
forall (t :: * -> *) b a.
Foldable t =>
(b -> a -> b) -> b -> t a -> b
foldl' Tx BabbageEra -> Wallet -> Tx BabbageEra
-txAddSignature Tx BabbageEra
-cardanoTxUnsigned (TxSkel -> [Wallet]
+txAddSignature Tx BabbageEra
+cardanoTxUnsigned (TxSkel -> [Wallet]
txSkelSigners TxSkel
-skel)
+skel)
Tx BabbageEra -> Either GenerateTxError (Tx BabbageEra)
forall (m :: * -> *) a. Monad m => a -> m a
return (Tx BabbageEra -> Either GenerateTxError (Tx BabbageEra))
@@ -1946,30 +1946,30 @@
txSkelOpts (TxSkel -> [RawModTx]) -> TxSkel -> [RawModTx]
forall a b. (a -> b) -> a -> b
$ TxSkel
-skel) Tx BabbageEra
-cardanoTxSigned
+skel) Tx BabbageEra
+cardanoTxSigned
where
- txAddSignature :: C.Tx C.BabbageEra -> Wallet -> C.Tx C.BabbageEra
- txAddSignature :: Tx BabbageEra -> Wallet -> Tx BabbageEra
-txAddSignature Tx BabbageEra
-tx Wallet
-wal = case PrivateKey -> CardanoTx -> CardanoTx
+ txAddSignature :: C.Tx C.BabbageEra -> Wallet -> C.Tx C.BabbageEra
+ txAddSignature :: Tx BabbageEra -> Wallet -> Tx BabbageEra
+txAddSignature Tx BabbageEra
+tx Wallet
+wal = case PrivateKey -> CardanoTx -> CardanoTx
Ledger.addCardanoTxSignature
(Wallet -> PrivateKey
walletSK Wallet
-wal)
+wal)
(Tx BabbageEra -> EraInMode BabbageEra CardanoMode -> CardanoTx
forall era.
IsCardanoEra era =>
Tx era -> EraInMode era CardanoMode -> CardanoTx
Ledger.CardanoTx Tx BabbageEra
-tx EraInMode BabbageEra CardanoMode
+tx EraInMode BabbageEra CardanoMode
C.BabbageEraInCardanoMode) of
- Ledger.CardanoTx Tx era
-tx' EraInMode era CardanoMode
+ Ledger.CardanoTx Tx era
+tx' EraInMode era CardanoMode
C.BabbageEraInCardanoMode -> Tx era
Tx BabbageEra
-tx'
+tx'
-- Looking at the implementation of Ledger.addCardanoTxSignature:
-- It never changes the constructor used, so the above branch
-- will never happen
diff --git a/src/Cooked.MockChain.Staged.html b/src/Cooked.MockChain.Staged.html
index e09728ea1..63fd876a8 100644
--- a/src/Cooked.MockChain.Staged.html
+++ b/src/Cooked.MockChain.Staged.html
@@ -20,44 +20,45 @@
runTweak,
everywhere,
withTweak,
- )
-where
-
-import qualified Cardano.Node.Emulator as Emulator
-import Control.Applicative
-import Control.Arrow hiding ((<+>))
-import Control.Monad.Except
-import Control.Monad.Reader
-import Control.Monad.State
-import Control.Monad.Writer.Strict hiding (Alt)
-import Cooked.Ltl
-import Cooked.MockChain.BlockChain
-import Cooked.MockChain.Direct
-import Cooked.MockChain.UtxoState
-import Cooked.Skeleton
-import Cooked.Tweak.Common
-import Data.Default
-import qualified Data.Map as Map
-import qualified Ledger.Slot as Ledger
-import qualified Ledger.Tx as Ledger
-import qualified Ledger.Tx.CardanoAPI as Ledger
-import qualified Ledger.Typed.Scripts as Pl
-import qualified Plutus.V2.Ledger.Api as Pl
-
--- * Interpreting and running 'StagedMockChain'
-
--- | Interprets the staged mockchain then runs the resulting computation with a
--- custom function. This can be used, for example, to supply a custom
--- 'InitialDistribution' by providing 'runMockChainTFrom'.
-interpretAndRunWith ::
- (forall m. Monad m => MockChainT m a -> m res) ->
- StagedMockChain a ->
- [(res, MockChainLog)]
-interpretAndRunWith :: (forall (m :: * -> *). Monad m => MockChainT m a -> m res)
+ there,
+ )
+where
+
+import qualified Cardano.Node.Emulator as Emulator
+import Control.Applicative
+import Control.Arrow hiding ((<+>))
+import Control.Monad.Except
+import Control.Monad.Reader
+import Control.Monad.State
+import Control.Monad.Writer.Strict hiding (Alt)
+import Cooked.Ltl
+import Cooked.MockChain.BlockChain
+import Cooked.MockChain.Direct
+import Cooked.MockChain.UtxoState
+import Cooked.Skeleton
+import Cooked.Tweak.Common
+import Data.Default
+import qualified Data.Map as Map
+import qualified Ledger.Slot as Ledger
+import qualified Ledger.Tx as Ledger
+import qualified Ledger.Tx.CardanoAPI as Ledger
+import qualified Ledger.Typed.Scripts as Pl
+import qualified Plutus.V2.Ledger.Api as Pl
+
+-- * Interpreting and running 'StagedMockChain'
+
+-- | Interprets the staged mockchain then runs the resulting computation with a
+-- custom function. This can be used, for example, to supply a custom
+-- 'InitialDistribution' by providing 'runMockChainTFrom'.
+interpretAndRunWith ::
+ (forall m. Monad m => MockChainT m a -> m res) ->
+ StagedMockChain a ->
+ [(res, MockChainLog)]
+interpretAndRunWith :: (forall (m :: * -> *). Monad m => MockChainT m a -> m res)
-> StagedMockChain a -> [(res, MockChainLog)]
-interpretAndRunWith forall (m :: * -> *). Monad m => MockChainT m a -> m res
-f StagedMockChain a
-smc = WriterT MockChainLog [] res -> [(res, MockChainLog)]
+interpretAndRunWith forall (m :: * -> *). Monad m => MockChainT m a -> m res
+f StagedMockChain a
+smc = WriterT MockChainLog [] res -> [(res, MockChainLog)]
forall w (m :: * -> *) a. WriterT w m a -> m (a, w)
runWriterT (WriterT MockChainLog [] res -> [(res, MockChainLog)])
-> WriterT MockChainLog [] res -> [(res, MockChainLog)]
@@ -65,7 +66,7 @@
$ MockChainT (WriterT MockChainLog []) a
-> WriterT MockChainLog [] res
forall (m :: * -> *). Monad m => MockChainT m a -> m res
-f (MockChainT (WriterT MockChainLog []) a
+f (MockChainT (WriterT MockChainLog []) a
-> WriterT MockChainLog [] res)
-> MockChainT (WriterT MockChainLog []) a
-> WriterT MockChainLog [] res
@@ -73,12 +74,12 @@
$ StagedMockChain a -> MockChainT (WriterT MockChainLog []) a
forall a. StagedMockChain a -> InterpMockChain a
interpret StagedMockChain a
-smc
-
-interpretAndRun ::
- StagedMockChain a ->
- [(Either MockChainError (a, UtxoState), MockChainLog)]
-interpretAndRun :: StagedMockChain a
+smc
+
+interpretAndRun ::
+ StagedMockChain a ->
+ [(Either MockChainError (a, UtxoState), MockChainLog)]
+interpretAndRun :: StagedMockChain a
-> [(Either MockChainError (a, UtxoState), MockChainLog)]
interpretAndRun = (forall (m :: * -> *).
Monad m =>
@@ -95,48 +96,48 @@
Monad m =>
MockChainT m a -> m (Either MockChainError (a, UtxoState))
runMockChainT
-
-data MockChainLogEntry
- = MCLogSubmittedTxSkel SkelContext TxSkel
- | MCLogNewTx Pl.TxId
- | MCLogFail String
-
-newtype MockChainLog = MockChainLog {MockChainLog -> [MockChainLogEntry]
+
+data MockChainLogEntry
+ = MCLogSubmittedTxSkel SkelContext TxSkel
+ | MCLogNewTx Pl.TxId
+ | MCLogFail String
+
+newtype MockChainLog = MockChainLog {MockChainLog -> [MockChainLogEntry]
unMockChainLog :: [MockChainLogEntry]}
-
-instance Semigroup MockChainLog where
- MockChainLog [MockChainLogEntry]
-x <> :: MockChainLog -> MockChainLog -> MockChainLog
-<> MockChainLog [MockChainLogEntry]
-y = [MockChainLogEntry] -> MockChainLog
+
+instance Semigroup MockChainLog where
+ MockChainLog [MockChainLogEntry]
+x <> :: MockChainLog -> MockChainLog -> MockChainLog
+<> MockChainLog [MockChainLogEntry]
+y = [MockChainLogEntry] -> MockChainLog
MockChainLog ([MockChainLogEntry] -> MockChainLog)
-> [MockChainLogEntry] -> MockChainLog
forall a b. (a -> b) -> a -> b
$ [MockChainLogEntry]
-x [MockChainLogEntry] -> [MockChainLogEntry] -> [MockChainLogEntry]
+x [MockChainLogEntry] -> [MockChainLogEntry] -> [MockChainLogEntry]
forall a. Semigroup a => a -> a -> a
<> [MockChainLogEntry]
-y
-
-instance Monoid MockChainLog where
- mempty :: MockChainLog
+y
+
+instance Monoid MockChainLog where
+ mempty :: MockChainLog
mempty = [MockChainLogEntry] -> MockChainLog
MockChainLog []
-
--- | The semantic domain in which 'StagedMockChain' gets interpreted; see the
--- 'interpret' function for more.
-type InterpMockChain = MockChainT (WriterT MockChainLog [])
-
--- | The 'interpret' function gives semantics to our traces. One
--- 'StagedMockChain' computation yields a potential list of 'MockChainT'
--- computations, which emit a description of their operation. Recall a
--- 'MockChainT' is a state and except monad composed:
---
--- > MockChainT (WriterT TraceDescr []) a
--- > =~= st -> (WriterT TraceDescr []) (Either err (a, st))
--- > =~= st -> [(Either err (a, st) , TraceDescr)]
-interpret :: StagedMockChain a -> InterpMockChain a
-interpret :: StagedMockChain a -> InterpMockChain a
+
+-- | The semantic domain in which 'StagedMockChain' gets interpreted; see the
+-- 'interpret' function for more.
+type InterpMockChain = MockChainT (WriterT MockChainLog [])
+
+-- | The 'interpret' function gives semantics to our traces. One
+-- 'StagedMockChain' computation yields a potential list of 'MockChainT'
+-- computations, which emit a description of their operation. Recall a
+-- 'MockChainT' is a state and except monad composed:
+--
+-- > MockChainT (WriterT TraceDescr []) a
+-- > =~= st -> (WriterT TraceDescr []) (Either err (a, st))
+-- > =~= st -> [(Either err (a, st) , TraceDescr)]
+interpret :: StagedMockChain a -> InterpMockChain a
+interpret :: StagedMockChain a -> InterpMockChain a
interpret = (StateT [Ltl (UntypedTweak InterpMockChain)] InterpMockChain a
-> [Ltl (UntypedTweak InterpMockChain)] -> InterpMockChain a)
-> [Ltl (UntypedTweak InterpMockChain)]
@@ -160,40 +161,40 @@
Staged (LtlOp modification builtin) a
-> StateT [Ltl modification] m a
interpLtlAndPruneUnfinished
-
--- * 'StagedMockChain': An AST for 'MonadMockChain' computations
-
-data MockChainBuiltin a where
- -- methods of 'MonadBlockChain'
-
- GetParams :: MockChainBuiltin Emulator.Params
- ValidateTxSkel :: TxSkel -> MockChainBuiltin Ledger.CardanoTx
- TxOutByRefLedger :: Pl.TxOutRef -> MockChainBuiltin (Maybe Ledger.TxOut)
- GetCurrentSlot :: MockChainBuiltin Ledger.Slot
- AwaitSlot :: Ledger.Slot -> MockChainBuiltin Ledger.Slot
- DatumFromHash :: Pl.DatumHash -> MockChainBuiltin (Maybe Pl.Datum)
- AllUtxosLedger :: MockChainBuiltin [(Pl.TxOutRef, Ledger.TxOut)]
- UtxosAtLedger :: Pl.Address -> MockChainBuiltin [(Pl.TxOutRef, Ledger.TxOut)]
- ValidatorFromHash :: Pl.ValidatorHash -> MockChainBuiltin (Maybe (Pl.Versioned Pl.Validator))
- -- | The empty set of traces
- Empty :: MockChainBuiltin a
- -- | The union of two sets of traces
- Alt ::
- StagedMockChain a ->
- StagedMockChain a ->
- MockChainBuiltin a
- -- for the 'MonadFail' instance
- Fail :: String -> MockChainBuiltin a
- -- for the 'MonadError MockChainError' instance
- ThrowError :: MockChainError -> MockChainBuiltin a
- CatchError :: StagedMockChain a -> (MockChainError -> StagedMockChain a) -> MockChainBuiltin a
-
-type MockChainOp = LtlOp (UntypedTweak InterpMockChain) MockChainBuiltin
-
-type StagedMockChain = Staged MockChainOp
-
-instance Alternative StagedMockChain where
- empty :: StagedMockChain a
+
+-- * 'StagedMockChain': An AST for 'MonadMockChain' computations
+
+data MockChainBuiltin a where
+ -- methods of 'MonadBlockChain'
+
+ GetParams :: MockChainBuiltin Emulator.Params
+ ValidateTxSkel :: TxSkel -> MockChainBuiltin Ledger.CardanoTx
+ TxOutByRefLedger :: Pl.TxOutRef -> MockChainBuiltin (Maybe Ledger.TxOut)
+ GetCurrentSlot :: MockChainBuiltin Ledger.Slot
+ AwaitSlot :: Ledger.Slot -> MockChainBuiltin Ledger.Slot
+ DatumFromHash :: Pl.DatumHash -> MockChainBuiltin (Maybe Pl.Datum)
+ AllUtxosLedger :: MockChainBuiltin [(Pl.TxOutRef, Ledger.TxOut)]
+ UtxosAtLedger :: Pl.Address -> MockChainBuiltin [(Pl.TxOutRef, Ledger.TxOut)]
+ ValidatorFromHash :: Pl.ValidatorHash -> MockChainBuiltin (Maybe (Pl.Versioned Pl.Validator))
+ -- | The empty set of traces
+ Empty :: MockChainBuiltin a
+ -- | The union of two sets of traces
+ Alt ::
+ StagedMockChain a ->
+ StagedMockChain a ->
+ MockChainBuiltin a
+ -- for the 'MonadFail' instance
+ Fail :: String -> MockChainBuiltin a
+ -- for the 'MonadError MockChainError' instance
+ ThrowError :: MockChainError -> MockChainBuiltin a
+ CatchError :: StagedMockChain a -> (MockChainError -> StagedMockChain a) -> MockChainBuiltin a
+
+type MockChainOp = LtlOp (UntypedTweak InterpMockChain) MockChainBuiltin
+
+type StagedMockChain = Staged MockChainOp
+
+instance Alternative StagedMockChain where
+ empty :: StagedMockChain a
empty = LtlOp (UntypedTweak InterpMockChain) MockChainBuiltin a
-> (a -> StagedMockChain a) -> StagedMockChain a
forall (op :: * -> *) a b.
@@ -207,10 +208,10 @@
Empty) a -> StagedMockChain a
forall a (op :: * -> *). a -> Staged op a
Return
- StagedMockChain a
-a <|> :: StagedMockChain a -> StagedMockChain a -> StagedMockChain a
-<|> StagedMockChain a
-b = LtlOp (UntypedTweak InterpMockChain) MockChainBuiltin a
+ StagedMockChain a
+a <|> :: StagedMockChain a -> StagedMockChain a -> StagedMockChain a
+<|> StagedMockChain a
+b = LtlOp (UntypedTweak InterpMockChain) MockChainBuiltin a
-> (a -> StagedMockChain a) -> StagedMockChain a
forall (op :: * -> *) a b.
op a -> (a -> Staged op b) -> Staged op b
@@ -222,15 +223,15 @@
forall a.
StagedMockChain a -> StagedMockChain a -> MockChainBuiltin a
Alt StagedMockChain a
-a StagedMockChain a
-b)) a -> StagedMockChain a
+a StagedMockChain a
+b)) a -> StagedMockChain a
forall a (op :: * -> *). a -> Staged op a
Return
-
-instance MonadFail StagedMockChain where
- fail :: String -> StagedMockChain a
-fail String
-msg = LtlOp (UntypedTweak InterpMockChain) MockChainBuiltin a
+
+instance MonadFail StagedMockChain where
+ fail :: String -> StagedMockChain a
+fail String
+msg = LtlOp (UntypedTweak InterpMockChain) MockChainBuiltin a
-> (a -> StagedMockChain a) -> StagedMockChain a
forall (op :: * -> *) a b.
op a -> (a -> Staged op b) -> Staged op b
@@ -241,14 +242,14 @@
Builtin (String -> MockChainBuiltin a
forall a. String -> MockChainBuiltin a
Fail String
-msg)) a -> StagedMockChain a
+msg)) a -> StagedMockChain a
forall a (op :: * -> *). a -> Staged op a
Return
-
--- * 'InterpLtl' instance
-
-instance MonadPlus m => MonadPlus (MockChainT m) where
- mzero :: MockChainT m a
+
+-- * 'InterpLtl' instance
+
+instance MonadPlus m => MonadPlus (MockChainT m) where
+ mzero :: MockChainT m a
mzero = m a -> MockChainT m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
@@ -256,7 +257,7 @@
lift m a
forall (m :: * -> *) a. MonadPlus m => m a
mzero
- mplus :: MockChainT m a -> MockChainT m a -> MockChainT m a
+ mplus :: MockChainT m a -> MockChainT m a -> MockChainT m a
mplus = (forall a. m a -> m a -> m a)
-> MockChainT m a -> MockChainT m a -> MockChainT m a
forall (m :: * -> *) x.
@@ -266,9 +267,9 @@
combineMockChainT forall a. m a -> m a -> m a
forall (m :: * -> *) a. MonadPlus m => m a -> m a -> m a
mplus
-
-instance InterpLtl (UntypedTweak InterpMockChain) MockChainBuiltin InterpMockChain where
- interpBuiltin :: MockChainBuiltin a
+
+instance InterpLtl (UntypedTweak InterpMockChain) MockChainBuiltin InterpMockChain where
+ interpBuiltin :: MockChainBuiltin a
-> StateT [Ltl (UntypedTweak InterpMockChain)] InterpMockChain a
interpBuiltin MockChainBuiltin a
GetParams = InterpMockChain Params
@@ -288,15 +289,15 @@
forall r (m :: * -> *) a. MonadReader r m => (r -> a) -> m a
asks MockChainEnv -> Params
mceParams
- interpBuiltin (ValidateTxSkel TxSkel
-skel) =
- StateT
+ interpBuiltin (ValidateTxSkel TxSkel
+skel) =
+ StateT
[Ltl (UntypedTweak InterpMockChain)]
InterpMockChain
[Ltl (UntypedTweak InterpMockChain)]
forall s (m :: * -> *). MonadState s m => m s
get
- StateT
+ StateT
[Ltl (UntypedTweak InterpMockChain)]
InterpMockChain
[Ltl (UntypedTweak InterpMockChain)]
@@ -314,7 +315,7 @@
(Foldable t, MonadPlus m) =>
t (m a) -> m a
msum
- ([StateT
+ ([StateT
[Ltl (UntypedTweak InterpMockChain)] InterpMockChain CardanoTx]
-> StateT
[Ltl (UntypedTweak InterpMockChain)] InterpMockChain CardanoTx)
@@ -347,8 +348,8 @@
-> [Ltl (UntypedTweak InterpMockChain)]
-> StateT
[Ltl (UntypedTweak InterpMockChain)] InterpMockChain CardanoTx
-interpretAndTell)
- ([(UntypedTweak InterpMockChain,
+interpretAndTell)
+ ([(UntypedTweak InterpMockChain,
[Ltl (UntypedTweak InterpMockChain)])]
-> [StateT
[Ltl (UntypedTweak InterpMockChain)] InterpMockChain CardanoTx])
@@ -364,20 +365,20 @@
[Ltl (UntypedTweak InterpMockChain)])]
forall a. Monoid a => [Ltl a] -> [(a, [Ltl a])]
nowLaterList
- where
- interpretAndTell ::
- UntypedTweak InterpMockChain ->
- [Ltl (UntypedTweak InterpMockChain)] ->
- StateT [Ltl (UntypedTweak InterpMockChain)] InterpMockChain Ledger.CardanoTx
- interpretAndTell :: UntypedTweak InterpMockChain
+ where
+ interpretAndTell ::
+ UntypedTweak InterpMockChain ->
+ [Ltl (UntypedTweak InterpMockChain)] ->
+ StateT [Ltl (UntypedTweak InterpMockChain)] InterpMockChain Ledger.CardanoTx
+ interpretAndTell :: UntypedTweak InterpMockChain
-> [Ltl (UntypedTweak InterpMockChain)]
-> StateT
[Ltl (UntypedTweak InterpMockChain)] InterpMockChain CardanoTx
-interpretAndTell (UntypedTweak Tweak InterpMockChain a
-now) [Ltl (UntypedTweak InterpMockChain)]
-later = do
- MockChainSt
-mcst <- InterpMockChain MockChainSt
+interpretAndTell (UntypedTweak Tweak InterpMockChain a
+now) [Ltl (UntypedTweak InterpMockChain)]
+later = do
+ MockChainSt
+mcst <- InterpMockChain MockChainSt
-> StateT
[Ltl (UntypedTweak InterpMockChain)] InterpMockChain MockChainSt
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
@@ -386,8 +387,8 @@
lift InterpMockChain MockChainSt
forall s (m :: * -> *). MonadState s m => m s
get
- let managedTxOuts :: Map TxOutRef TxOut
-managedTxOuts = UtxoIndex -> Map TxOutRef TxOut
+ let managedTxOuts :: Map TxOutRef TxOut
+managedTxOuts = UtxoIndex -> Map TxOutRef TxOut
getIndex (UtxoIndex -> Map TxOutRef TxOut)
-> (MockChainSt -> UtxoIndex) -> MockChainSt -> Map TxOutRef TxOut
forall b c a. (b -> c) -> (a -> b) -> a -> c
@@ -396,14 +397,14 @@
-> MockChainSt -> Map TxOutRef TxOut
forall a b. (a -> b) -> a -> b
$ MockChainSt
-mcst
- managedDatums :: Map DatumHash (TxSkelOutDatum, Integer)
-managedDatums = MockChainSt -> Map DatumHash (TxSkelOutDatum, Integer)
+mcst
+ managedDatums :: Map DatumHash (TxSkelOutDatum, Integer)
+managedDatums = MockChainSt -> Map DatumHash (TxSkelOutDatum, Integer)
mcstDatums MockChainSt
-mcst
- (a
-_, TxSkel
-skel') <- InterpMockChain (a, TxSkel)
+mcst
+ (a
+_, TxSkel
+skel') <- InterpMockChain (a, TxSkel)
-> StateT
[Ltl (UntypedTweak InterpMockChain)] InterpMockChain (a, TxSkel)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
@@ -421,9 +422,9 @@
(MonadBlockChainWithoutValidation m, MonadPlus m) =>
Tweak m a -> TxSkel -> m (a, TxSkel)
runTweakInChain Tweak InterpMockChain a
-now TxSkel
-skel
- MockChainT (WriterT MockChainLog []) ()
+now TxSkel
+skel
+ MockChainT (WriterT MockChainLog []) ()
-> StateT [Ltl (UntypedTweak InterpMockChain)] InterpMockChain ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
@@ -434,7 +435,7 @@
-> StateT [Ltl (UntypedTweak InterpMockChain)] InterpMockChain ()
forall a b. (a -> b) -> a -> b
$
- WriterT MockChainLog [] ()
+ WriterT MockChainLog [] ()
-> MockChainT (WriterT MockChainLog []) ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
@@ -445,22 +446,22 @@
-> MockChainT (WriterT MockChainLog []) ()
forall a b. (a -> b) -> a -> b
$
- MockChainLog -> WriterT MockChainLog [] ()
+ MockChainLog -> WriterT MockChainLog [] ()
forall w (m :: * -> *). MonadWriter w m => w -> m ()
tell (MockChainLog -> WriterT MockChainLog [] ())
-> MockChainLog -> WriterT MockChainLog [] ()
forall a b. (a -> b) -> a -> b
$
- [MockChainLogEntry] -> MockChainLog
+ [MockChainLogEntry] -> MockChainLog
MockChainLog
- [ SkelContext -> TxSkel -> MockChainLogEntry
+ [ SkelContext -> TxSkel -> MockChainLogEntry
MCLogSubmittedTxSkel
- (Map TxOutRef TxOut -> Map DatumHash TxSkelOutDatum -> SkelContext
+ (Map TxOutRef TxOut -> Map DatumHash TxSkelOutDatum -> SkelContext
SkelContext (TxOut -> TxOut
txOutV2FromLedger (TxOut -> TxOut) -> Map TxOutRef TxOut -> Map TxOutRef TxOut
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Map TxOutRef TxOut
-managedTxOuts) (Map DatumHash TxSkelOutDatum -> SkelContext)
+managedTxOuts) (Map DatumHash TxSkelOutDatum -> SkelContext)
-> Map DatumHash TxSkelOutDatum -> SkelContext
forall a b. (a -> b) -> a -> b
$ ((TxSkelOutDatum, Integer) -> TxSkelOutDatum)
@@ -470,18 +471,18 @@
Map.map (TxSkelOutDatum, Integer) -> TxSkelOutDatum
forall a b. (a, b) -> a
fst Map DatumHash (TxSkelOutDatum, Integer)
-managedDatums)
- TxSkel
-skel'
- ]
- CardanoTx
-tx <- TxSkel
+managedDatums)
+ TxSkel
+skel'
+ ]
+ CardanoTx
+tx <- TxSkel
-> StateT
[Ltl (UntypedTweak InterpMockChain)] InterpMockChain CardanoTx
forall (m :: * -> *). MonadBlockChain m => TxSkel -> m CardanoTx
validateTxSkel TxSkel
-skel'
- MockChainT (WriterT MockChainLog []) ()
+skel'
+ MockChainT (WriterT MockChainLog []) ()
-> StateT [Ltl (UntypedTweak InterpMockChain)] InterpMockChain ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
@@ -492,7 +493,7 @@
-> StateT [Ltl (UntypedTweak InterpMockChain)] InterpMockChain ()
forall a b. (a -> b) -> a -> b
$
- WriterT MockChainLog [] ()
+ WriterT MockChainLog [] ()
-> MockChainT (WriterT MockChainLog []) ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
@@ -503,63 +504,63 @@
-> MockChainT (WriterT MockChainLog []) ()
forall a b. (a -> b) -> a -> b
$
- MockChainLog -> WriterT MockChainLog [] ()
+ MockChainLog -> WriterT MockChainLog [] ()
forall w (m :: * -> *). MonadWriter w m => w -> m ()
tell (MockChainLog -> WriterT MockChainLog [] ())
-> MockChainLog -> WriterT MockChainLog [] ()
forall a b. (a -> b) -> a -> b
$
- [MockChainLogEntry] -> MockChainLog
+ [MockChainLogEntry] -> MockChainLog
MockChainLog [TxId -> MockChainLogEntry
MCLogNewTx (TxId -> TxId
Ledger.fromCardanoTxId (TxId -> TxId) -> TxId -> TxId
forall a b. (a -> b) -> a -> b
$ CardanoTx -> TxId
Ledger.getCardanoTxId CardanoTx
-tx)]
- [Ltl (UntypedTweak InterpMockChain)]
+tx)]
+ [Ltl (UntypedTweak InterpMockChain)]
-> StateT [Ltl (UntypedTweak InterpMockChain)] InterpMockChain ()
forall s (m :: * -> *). MonadState s m => s -> m ()
put [Ltl (UntypedTweak InterpMockChain)]
-later
- CardanoTx
+later
+ CardanoTx
-> StateT
[Ltl (UntypedTweak InterpMockChain)] InterpMockChain CardanoTx
forall (m :: * -> *) a. Monad m => a -> m a
return CardanoTx
-tx
- interpBuiltin (TxOutByRefLedger TxOutRef
-o) = TxOutRef
+tx
+ interpBuiltin (TxOutByRefLedger TxOutRef
+o) = TxOutRef
-> StateT
[Ltl (UntypedTweak InterpMockChain)] InterpMockChain (Maybe TxOut)
forall (m :: * -> *).
MonadBlockChainBalancing m =>
TxOutRef -> m (Maybe TxOut)
txOutByRefLedger TxOutRef
-o
- interpBuiltin MockChainBuiltin a
+o
+ interpBuiltin MockChainBuiltin a
GetCurrentSlot = StateT [Ltl (UntypedTweak InterpMockChain)] InterpMockChain a
forall (m :: * -> *). MonadBlockChainWithoutValidation m => m Slot
currentSlot
- interpBuiltin (AwaitSlot Slot
-s) = Slot
+ interpBuiltin (AwaitSlot Slot
+s) = Slot
-> StateT [Ltl (UntypedTweak InterpMockChain)] InterpMockChain Slot
forall (m :: * -> *).
MonadBlockChainWithoutValidation m =>
Slot -> m Slot
awaitSlot Slot
-s
- interpBuiltin (DatumFromHash DatumHash
-h) = DatumHash
+s
+ interpBuiltin (DatumFromHash DatumHash
+h) = DatumHash
-> StateT
[Ltl (UntypedTweak InterpMockChain)] InterpMockChain (Maybe Datum)
forall (m :: * -> *).
MonadBlockChainBalancing m =>
DatumHash -> m (Maybe Datum)
datumFromHash DatumHash
-h
- interpBuiltin (ValidatorFromHash ValidatorHash
-h) = ValidatorHash
+h
+ interpBuiltin (ValidatorFromHash ValidatorHash
+h) = ValidatorHash
-> StateT
[Ltl (UntypedTweak InterpMockChain)]
InterpMockChain
@@ -568,15 +569,15 @@
MonadBlockChainBalancing m =>
ValidatorHash -> m (Maybe (Versioned Validator))
validatorFromHash ValidatorHash
-h
- interpBuiltin MockChainBuiltin a
+h
+ interpBuiltin MockChainBuiltin a
AllUtxosLedger = StateT [Ltl (UntypedTweak InterpMockChain)] InterpMockChain a
forall (m :: * -> *).
MonadBlockChainWithoutValidation m =>
m [(TxOutRef, TxOut)]
allUtxosLedger
- interpBuiltin (UtxosAtLedger Address
-address) = Address
+ interpBuiltin (UtxosAtLedger Address
+address) = Address
-> StateT
[Ltl (UntypedTweak InterpMockChain)]
InterpMockChain
@@ -585,21 +586,21 @@
MonadBlockChainBalancing m =>
Address -> m [(TxOutRef, TxOut)]
utxosAtLedger Address
-address
- interpBuiltin MockChainBuiltin a
+address
+ interpBuiltin MockChainBuiltin a
Empty = StateT [Ltl (UntypedTweak InterpMockChain)] InterpMockChain a
forall (m :: * -> *) a. MonadPlus m => m a
mzero
- interpBuiltin (Alt StagedMockChain a
-l StagedMockChain a
-r) = StagedMockChain a
+ interpBuiltin (Alt StagedMockChain a
+l StagedMockChain a
+r) = StagedMockChain a
-> StateT [Ltl (UntypedTweak InterpMockChain)] InterpMockChain a
forall modification (builtin :: * -> *) (m :: * -> *) a.
InterpLtl modification builtin m =>
Staged (LtlOp modification builtin) a
-> StateT [Ltl modification] m a
interpLtl StagedMockChain a
-l StateT [Ltl (UntypedTweak InterpMockChain)] InterpMockChain a
+l StateT [Ltl (UntypedTweak InterpMockChain)] InterpMockChain a
-> StateT [Ltl (UntypedTweak InterpMockChain)] InterpMockChain a
-> StateT [Ltl (UntypedTweak InterpMockChain)] InterpMockChain a
forall (m :: * -> *) a. MonadPlus m => m a -> m a -> m a
@@ -610,10 +611,10 @@
Staged (LtlOp modification builtin) a
-> StateT [Ltl modification] m a
interpLtl StagedMockChain a
-r
- interpBuiltin (Fail String
-msg) = do
- MockChainT (WriterT MockChainLog []) ()
+r
+ interpBuiltin (Fail String
+msg) = do
+ MockChainT (WriterT MockChainLog []) ()
-> StateT [Ltl (UntypedTweak InterpMockChain)] InterpMockChain ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
@@ -641,21 +642,21 @@
$ [MockChainLogEntry] -> MockChainLog
MockChainLog [String -> MockChainLogEntry
MCLogFail String
-msg]
- String
+msg]
+ String
-> StateT [Ltl (UntypedTweak InterpMockChain)] InterpMockChain a
forall (m :: * -> *) a. MonadFail m => String -> m a
fail String
-msg
- interpBuiltin (ThrowError MockChainError
-err) = MockChainError
+msg
+ interpBuiltin (ThrowError MockChainError
+err) = MockChainError
-> StateT [Ltl (UntypedTweak InterpMockChain)] InterpMockChain a
forall e (m :: * -> *) a. MonadError e m => e -> m a
throwError MockChainError
-err
- interpBuiltin (CatchError StagedMockChain a
-act MockChainError -> StagedMockChain a
-handler) = StateT [Ltl (UntypedTweak InterpMockChain)] InterpMockChain a
+err
+ interpBuiltin (CatchError StagedMockChain a
+act MockChainError -> StagedMockChain a
+handler) = StateT [Ltl (UntypedTweak InterpMockChain)] InterpMockChain a
-> (MockChainError
-> StateT [Ltl (UntypedTweak InterpMockChain)] InterpMockChain a)
-> StateT [Ltl (UntypedTweak InterpMockChain)] InterpMockChain a
@@ -669,7 +670,7 @@
Staged (LtlOp modification builtin) a
-> StateT [Ltl modification] m a
interpLtl StagedMockChain a
-act) (StagedMockChain a
+act) (StagedMockChain a
-> StateT [Ltl (UntypedTweak InterpMockChain)] InterpMockChain a
forall modification (builtin :: * -> *) (m :: * -> *) a.
InterpLtl modification builtin m =>
@@ -682,12 +683,12 @@
-> StateT [Ltl (UntypedTweak InterpMockChain)] InterpMockChain a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. MockChainError -> StagedMockChain a
-handler)
-
--- ** Helpers to run tweaks for use in tests for tweaks
-
-runTweak :: Tweak InterpMockChain a -> TxSkel -> [Either MockChainError (a, TxSkel)]
-runTweak :: Tweak InterpMockChain a
+handler)
+
+-- ** Helpers to run tweaks for use in tests for tweaks
+
+runTweak :: Tweak InterpMockChain a -> TxSkel -> [Either MockChainError (a, TxSkel)]
+runTweak :: Tweak InterpMockChain a
-> TxSkel -> [Either MockChainError (a, TxSkel)]
runTweak = MockChainEnv
-> MockChainSt
@@ -705,19 +706,19 @@
def MockChainSt
forall a. Default a => a
def
-
-runTweakFrom :: MockChainEnv -> MockChainSt -> Tweak InterpMockChain a -> TxSkel -> [Either MockChainError (a, TxSkel)]
-runTweakFrom :: MockChainEnv
+
+runTweakFrom :: MockChainEnv -> MockChainSt -> Tweak InterpMockChain a -> TxSkel -> [Either MockChainError (a, TxSkel)]
+runTweakFrom :: MockChainEnv
-> MockChainSt
-> Tweak InterpMockChain a
-> TxSkel
-> [Either MockChainError (a, TxSkel)]
-runTweakFrom MockChainEnv
-mcenv MockChainSt
-mcst Tweak InterpMockChain a
-tweak TxSkel
-skel =
- ((Either MockChainError ((a, TxSkel), MockChainSt), MockChainLog)
+runTweakFrom MockChainEnv
+mcenv MockChainSt
+mcst Tweak InterpMockChain a
+tweak TxSkel
+skel =
+ ((Either MockChainError ((a, TxSkel), MockChainSt), MockChainLog)
-> Either MockChainError (a, TxSkel))
-> [(Either MockChainError ((a, TxSkel), MockChainSt),
MockChainLog)]
@@ -743,7 +744,7 @@
-> Either MockChainError ((a, TxSkel), MockChainSt)
forall a b. (a, b) -> a
fst)
- ([(Either MockChainError ((a, TxSkel), MockChainSt), MockChainLog)]
+ ([(Either MockChainError ((a, TxSkel), MockChainSt), MockChainLog)]
-> [Either MockChainError (a, TxSkel)])
-> (MockChainT (WriterT MockChainLog []) (a, TxSkel)
-> [(Either MockChainError ((a, TxSkel), MockChainSt),
@@ -757,7 +758,7 @@
MockChainLog)]
forall w (m :: * -> *) a. WriterT w m a -> m (a, w)
runWriterT
- (WriterT
+ (WriterT
MockChainLog [] (Either MockChainError ((a, TxSkel), MockChainSt))
-> [(Either MockChainError ((a, TxSkel), MockChainSt),
MockChainLog)])
@@ -780,9 +781,9 @@
-> MockChainT m a
-> m (Either MockChainError (a, MockChainSt))
runMockChainTRaw MockChainEnv
-mcenv MockChainSt
-mcst
- (MockChainT (WriterT MockChainLog []) (a, TxSkel)
+mcenv MockChainSt
+mcst
+ (MockChainT (WriterT MockChainLog []) (a, TxSkel)
-> [Either MockChainError (a, TxSkel)])
-> MockChainT (WriterT MockChainLog []) (a, TxSkel)
-> [Either MockChainError (a, TxSkel)]
@@ -793,97 +794,175 @@
(MonadBlockChainWithoutValidation m, MonadPlus m) =>
Tweak m a -> TxSkel -> m (a, TxSkel)
runTweakInChain Tweak InterpMockChain a
-tweak TxSkel
-skel
-
--- ** Modalities
-
--- | A modal mock chain is a mock chain that allows us to use LTL modifications
--- with 'Tweak's
-type MonadModalBlockChain m = (MonadBlockChain m, MonadModal m, Modification m ~ UntypedTweak InterpMockChain)
-
--- | Apply a 'Tweak' to some transaction in the given Trace. The tweak must
--- apply at least once.
-somewhere :: MonadModalBlockChain m => Tweak InterpMockChain b -> m a -> m a
-somewhere :: Tweak InterpMockChain b -> m a -> m a
-somewhere Tweak InterpMockChain b
-x = Ltl (Modification m) -> m a -> m a
+tweak TxSkel
+skel
+
+-- ** Modalities
+
+-- | A modal mock chain is a mock chain that allows us to use LTL modifications
+-- with 'Tweak's
+type MonadModalBlockChain m = (MonadBlockChain m, MonadModal m, Modification m ~ UntypedTweak InterpMockChain)
+
+-- | Apply a 'Tweak' to some transaction in the given Trace. The tweak must
+-- apply at least once.
+somewhere :: MonadModalBlockChain m => Tweak InterpMockChain b -> m a -> m a
+somewhere :: Tweak InterpMockChain b -> m a -> m a
+somewhere = Ltl (UntypedTweak InterpMockChain) -> m a -> m a
forall (m :: * -> *) a.
MonadModal m =>
Ltl (Modification m) -> m a -> m a
-modifyLtl (Ltl (UntypedTweak InterpMockChain)
-forall a. Ltl a
-LtlTruth Ltl (UntypedTweak InterpMockChain)
+modifyLtl (Ltl (UntypedTweak InterpMockChain) -> m a -> m a)
+-> (Tweak InterpMockChain b -> Ltl (UntypedTweak InterpMockChain))
+-> Tweak InterpMockChain b
+-> m a
+-> m a
+forall b c a. (b -> c) -> (a -> b) -> a -> c
+. Ltl (UntypedTweak InterpMockChain)
-> Ltl (UntypedTweak InterpMockChain)
-> Ltl (UntypedTweak InterpMockChain)
forall a. Ltl a -> Ltl a -> Ltl a
-`LtlUntil` UntypedTweak InterpMockChain -> Ltl (UntypedTweak InterpMockChain)
+LtlUntil Ltl (UntypedTweak InterpMockChain)
+forall a. Ltl a
+LtlTruth (Ltl (UntypedTweak InterpMockChain)
+ -> Ltl (UntypedTweak InterpMockChain))
+-> (Tweak InterpMockChain b -> Ltl (UntypedTweak InterpMockChain))
+-> Tweak InterpMockChain b
+-> Ltl (UntypedTweak InterpMockChain)
+forall b c a. (b -> c) -> (a -> b) -> a -> c
+. UntypedTweak InterpMockChain -> Ltl (UntypedTweak InterpMockChain)
forall a. a -> Ltl a
-LtlAtom (Tweak InterpMockChain b -> UntypedTweak InterpMockChain
+LtlAtom (UntypedTweak InterpMockChain
+ -> Ltl (UntypedTweak InterpMockChain))
+-> (Tweak InterpMockChain b -> UntypedTweak InterpMockChain)
+-> Tweak InterpMockChain b
+-> Ltl (UntypedTweak InterpMockChain)
+forall b c a. (b -> c) -> (a -> b) -> a -> c
+. Tweak InterpMockChain b -> UntypedTweak InterpMockChain
forall (m :: * -> *) a. Tweak m a -> UntypedTweak m
-UntypedTweak Tweak InterpMockChain b
-x))
-
--- | Apply a 'Tweak' to every transaction in a given trace. This is also
--- successful if there are no transactions at all.
-everywhere :: MonadModalBlockChain m => Tweak InterpMockChain b -> m a -> m a
-everywhere :: Tweak InterpMockChain b -> m a -> m a
-everywhere Tweak InterpMockChain b
-x = Ltl (Modification m) -> m a -> m a
+UntypedTweak
+
+-- | Apply a 'Tweak' to every transaction in a given trace. This is also
+-- successful if there are no transactions at all.
+everywhere :: MonadModalBlockChain m => Tweak InterpMockChain b -> m a -> m a
+everywhere :: Tweak InterpMockChain b -> m a -> m a
+everywhere = Ltl (UntypedTweak InterpMockChain) -> m a -> m a
forall (m :: * -> *) a.
MonadModal m =>
Ltl (Modification m) -> m a -> m a
-modifyLtl (Ltl (UntypedTweak InterpMockChain)
-forall a. Ltl a
-LtlFalsity Ltl (UntypedTweak InterpMockChain)
+modifyLtl (Ltl (UntypedTweak InterpMockChain) -> m a -> m a)
+-> (Tweak InterpMockChain b -> Ltl (UntypedTweak InterpMockChain))
+-> Tweak InterpMockChain b
+-> m a
+-> m a
+forall b c a. (b -> c) -> (a -> b) -> a -> c
+. Ltl (UntypedTweak InterpMockChain)
-> Ltl (UntypedTweak InterpMockChain)
-> Ltl (UntypedTweak InterpMockChain)
forall a. Ltl a -> Ltl a -> Ltl a
-`LtlRelease` UntypedTweak InterpMockChain -> Ltl (UntypedTweak InterpMockChain)
+LtlRelease Ltl (UntypedTweak InterpMockChain)
+forall a. Ltl a
+LtlFalsity (Ltl (UntypedTweak InterpMockChain)
+ -> Ltl (UntypedTweak InterpMockChain))
+-> (Tweak InterpMockChain b -> Ltl (UntypedTweak InterpMockChain))
+-> Tweak InterpMockChain b
+-> Ltl (UntypedTweak InterpMockChain)
+forall b c a. (b -> c) -> (a -> b) -> a -> c
+. UntypedTweak InterpMockChain -> Ltl (UntypedTweak InterpMockChain)
forall a. a -> Ltl a
-LtlAtom (Tweak InterpMockChain b -> UntypedTweak InterpMockChain
+LtlAtom (UntypedTweak InterpMockChain
+ -> Ltl (UntypedTweak InterpMockChain))
+-> (Tweak InterpMockChain b -> UntypedTweak InterpMockChain)
+-> Tweak InterpMockChain b
+-> Ltl (UntypedTweak InterpMockChain)
+forall b c a. (b -> c) -> (a -> b) -> a -> c
+. Tweak InterpMockChain b -> UntypedTweak InterpMockChain
forall (m :: * -> *) a. Tweak m a -> UntypedTweak m
-UntypedTweak Tweak InterpMockChain b
-x))
-
--- | Apply a 'Tweak' to the next transaction in the given trace. The order of
--- arguments is reversed compared to 'somewhere' and 'everywhere', because that
--- enables an idiom like
---
--- > do ...
--- > endpoint arguments `withTweak` someModification
--- > ...
---
--- where @endpoint@ builds and validates a single transaction depending on the
--- given @arguments@. Then `withTweak` says "I want to modify the transaction
--- returned by this endpoint in the following way".
-withTweak :: MonadModalBlockChain m => m x -> Tweak InterpMockChain a -> m x
-withTweak :: m x -> Tweak InterpMockChain a -> m x
-withTweak m x
-trace Tweak InterpMockChain a
-tweak = Ltl (Modification m) -> m x -> m x
+UntypedTweak
+
+-- | Apply a 'Tweak' to the nth transaction in a given trace, 0 indexed.
+-- Only successful when this transaction exists and can be modified.
+there :: MonadModalBlockChain m => Integer -> Tweak InterpMockChain b -> m a -> m a
+there :: Integer -> Tweak InterpMockChain b -> m a -> m a
+there Integer
+n = Ltl (UntypedTweak InterpMockChain) -> m a -> m a
forall (m :: * -> *) a.
MonadModal m =>
Ltl (Modification m) -> m a -> m a
-modifyLtl (UntypedTweak InterpMockChain -> Ltl (UntypedTweak InterpMockChain)
+modifyLtl (Ltl (UntypedTweak InterpMockChain) -> m a -> m a)
+-> (Tweak InterpMockChain b -> Ltl (UntypedTweak InterpMockChain))
+-> Tweak InterpMockChain b
+-> m a
+-> m a
+forall b c a. (b -> c) -> (a -> b) -> a -> c
+. Integer
+-> Tweak InterpMockChain b -> Ltl (UntypedTweak InterpMockChain)
+forall t (m :: * -> *) a.
+(Eq t, Num t) =>
+t -> Tweak m a -> Ltl (UntypedTweak m)
+mkLtlFormula Integer
+n
+ where
+ mkLtlFormula :: t -> Tweak m a -> Ltl (UntypedTweak m)
+mkLtlFormula t
+x =
+ if t
+x t -> t -> Bool
+forall a. Eq a => a -> a -> Bool
+== t
+0
+ then UntypedTweak m -> Ltl (UntypedTweak m)
forall a. a -> Ltl a
-LtlAtom (UntypedTweak InterpMockChain
- -> Ltl (UntypedTweak InterpMockChain))
--> UntypedTweak InterpMockChain
--> Ltl (UntypedTweak InterpMockChain)
-forall a b. (a -> b) -> a -> b
-$ Tweak InterpMockChain a -> UntypedTweak InterpMockChain
+LtlAtom (UntypedTweak m -> Ltl (UntypedTweak m))
+-> (Tweak m a -> UntypedTweak m)
+-> Tweak m a
+-> Ltl (UntypedTweak m)
+forall b c a. (b -> c) -> (a -> b) -> a -> c
+. Tweak m a -> UntypedTweak m
forall (m :: * -> *) a. Tweak m a -> UntypedTweak m
-UntypedTweak Tweak InterpMockChain a
-tweak) m x
-trace
-
--- * 'MonadBlockChain' and 'MonadMockChain' instances
-
-singletonBuiltin :: builtin a -> Staged (LtlOp modification builtin) a
-singletonBuiltin :: builtin a -> Staged (LtlOp modification builtin) a
-singletonBuiltin builtin a
-b = LtlOp modification builtin a
+UntypedTweak
+ else Ltl (UntypedTweak m) -> Ltl (UntypedTweak m)
+forall a. Ltl a -> Ltl a
+LtlNext (Ltl (UntypedTweak m) -> Ltl (UntypedTweak m))
+-> (Tweak m a -> Ltl (UntypedTweak m))
+-> Tweak m a
+-> Ltl (UntypedTweak m)
+forall b c a. (b -> c) -> (a -> b) -> a -> c
+. t -> Tweak m a -> Ltl (UntypedTweak m)
+mkLtlFormula (t
+x t -> t -> t
+forall a. Num a => a -> a -> a
+- t
+1)
+
+-- | Apply a 'Tweak' to the next transaction in the given trace. The order of
+-- arguments is reversed compared to 'somewhere' and 'everywhere', because that
+-- enables an idiom like
+--
+-- > do ...
+-- > endpoint arguments `withTweak` someModification
+-- > ...
+--
+-- where @endpoint@ builds and validates a single transaction depending on the
+-- given @arguments@. Then `withTweak` says "I want to modify the transaction
+-- returned by this endpoint in the following way".
+withTweak :: MonadModalBlockChain m => m x -> Tweak InterpMockChain a -> m x
+withTweak :: m x -> Tweak InterpMockChain a -> m x
+withTweak = (Tweak InterpMockChain a -> m x -> m x)
+-> m x -> Tweak InterpMockChain a -> m x
+forall a b c. (a -> b -> c) -> b -> a -> c
+flip (Integer -> Tweak InterpMockChain a -> m x -> m x
+forall (m :: * -> *) b a.
+MonadModalBlockChain m =>
+Integer -> Tweak InterpMockChain b -> m a -> m a
+there Integer
+0)
+
+-- * 'MonadBlockChain' and 'MonadMockChain' instances
+
+singletonBuiltin :: builtin a -> Staged (LtlOp modification builtin) a
+singletonBuiltin :: builtin a -> Staged (LtlOp modification builtin) a
+singletonBuiltin builtin a
+b = LtlOp modification builtin a
-> (a -> Staged (LtlOp modification builtin) a)
-> Staged (LtlOp modification builtin) a
forall (op :: * -> *) a b.
@@ -892,13 +971,13 @@
forall (builtin :: * -> *) a modification.
builtin a -> LtlOp modification builtin a
Builtin builtin a
-b) a -> Staged (LtlOp modification builtin) a
+b) a -> Staged (LtlOp modification builtin) a
forall a (op :: * -> *). a -> Staged op a
Return
-
-instance MonadError MockChainError StagedMockChain where
- throwError :: MockChainError -> StagedMockChain a
-throwError = MockChainBuiltin a -> StagedMockChain a
+
+instance MonadError MockChainError StagedMockChain where
+ throwError :: MockChainError -> StagedMockChain a
+throwError = MockChainBuiltin a -> StagedMockChain a
forall (builtin :: * -> *) a modification.
builtin a -> Staged (LtlOp modification builtin) a
singletonBuiltin (MockChainBuiltin a -> StagedMockChain a)
@@ -909,11 +988,11 @@
. MockChainError -> MockChainBuiltin a
forall a. MockChainError -> MockChainBuiltin a
ThrowError
- catchError :: StagedMockChain a
+ catchError :: StagedMockChain a
-> (MockChainError -> StagedMockChain a) -> StagedMockChain a
-catchError StagedMockChain a
-act MockChainError -> StagedMockChain a
-handler = MockChainBuiltin a -> StagedMockChain a
+catchError StagedMockChain a
+act MockChainError -> StagedMockChain a
+handler = MockChainBuiltin a -> StagedMockChain a
forall (builtin :: * -> *) a modification.
builtin a -> Staged (LtlOp modification builtin) a
singletonBuiltin (MockChainBuiltin a -> StagedMockChain a)
@@ -925,18 +1004,18 @@
StagedMockChain a
-> (MockChainError -> StagedMockChain a) -> MockChainBuiltin a
CatchError StagedMockChain a
-act MockChainError -> StagedMockChain a
-handler
-
-instance MonadBlockChainBalancing StagedMockChain where
- getParams :: StagedMockChain Params
+act MockChainError -> StagedMockChain a
+handler
+
+instance MonadBlockChainBalancing StagedMockChain where
+ getParams :: StagedMockChain Params
getParams = MockChainBuiltin Params -> StagedMockChain Params
forall (builtin :: * -> *) a modification.
builtin a -> Staged (LtlOp modification builtin) a
singletonBuiltin MockChainBuiltin Params
GetParams
- datumFromHash :: DatumHash -> StagedMockChain (Maybe Datum)
-datumFromHash = MockChainBuiltin (Maybe Datum) -> StagedMockChain (Maybe Datum)
+ datumFromHash :: DatumHash -> StagedMockChain (Maybe Datum)
+datumFromHash = MockChainBuiltin (Maybe Datum) -> StagedMockChain (Maybe Datum)
forall (builtin :: * -> *) a modification.
builtin a -> Staged (LtlOp modification builtin) a
singletonBuiltin (MockChainBuiltin (Maybe Datum) -> StagedMockChain (Maybe Datum))
@@ -946,8 +1025,8 @@
forall b c a. (b -> c) -> (a -> b) -> a -> c
. DatumHash -> MockChainBuiltin (Maybe Datum)
DatumFromHash
- txOutByRefLedger :: TxOutRef -> StagedMockChain (Maybe TxOut)
-txOutByRefLedger = MockChainBuiltin (Maybe TxOut) -> StagedMockChain (Maybe TxOut)
+ txOutByRefLedger :: TxOutRef -> StagedMockChain (Maybe TxOut)
+txOutByRefLedger = MockChainBuiltin (Maybe TxOut) -> StagedMockChain (Maybe TxOut)
forall (builtin :: * -> *) a modification.
builtin a -> Staged (LtlOp modification builtin) a
singletonBuiltin (MockChainBuiltin (Maybe TxOut) -> StagedMockChain (Maybe TxOut))
@@ -957,8 +1036,8 @@
forall b c a. (b -> c) -> (a -> b) -> a -> c
. TxOutRef -> MockChainBuiltin (Maybe TxOut)
TxOutByRefLedger
- utxosAtLedger :: Address -> StagedMockChain [(TxOutRef, TxOut)]
-utxosAtLedger = MockChainBuiltin [(TxOutRef, TxOut)]
+ utxosAtLedger :: Address -> StagedMockChain [(TxOutRef, TxOut)]
+utxosAtLedger = MockChainBuiltin [(TxOutRef, TxOut)]
-> StagedMockChain [(TxOutRef, TxOut)]
forall (builtin :: * -> *) a modification.
builtin a -> Staged (LtlOp modification builtin) a
@@ -970,8 +1049,8 @@
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Address -> MockChainBuiltin [(TxOutRef, TxOut)]
UtxosAtLedger
- validatorFromHash :: ValidatorHash -> StagedMockChain (Maybe (Versioned Validator))
-validatorFromHash = MockChainBuiltin (Maybe (Versioned Validator))
+ validatorFromHash :: ValidatorHash -> StagedMockChain (Maybe (Versioned Validator))
+validatorFromHash = MockChainBuiltin (Maybe (Versioned Validator))
-> StagedMockChain (Maybe (Versioned Validator))
forall (builtin :: * -> *) a modification.
builtin a -> Staged (LtlOp modification builtin) a
@@ -984,23 +1063,23 @@
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ValidatorHash -> MockChainBuiltin (Maybe (Versioned Validator))
ValidatorFromHash
-
-instance MonadBlockChainWithoutValidation StagedMockChain where
- allUtxosLedger :: StagedMockChain [(TxOutRef, TxOut)]
-allUtxosLedger = MockChainBuiltin [(TxOutRef, TxOut)]
+
+instance MonadBlockChainWithoutValidation StagedMockChain where
+ allUtxosLedger :: StagedMockChain [(TxOutRef, TxOut)]
+allUtxosLedger = MockChainBuiltin [(TxOutRef, TxOut)]
-> StagedMockChain [(TxOutRef, TxOut)]
forall (builtin :: * -> *) a modification.
builtin a -> Staged (LtlOp modification builtin) a
singletonBuiltin MockChainBuiltin [(TxOutRef, TxOut)]
AllUtxosLedger
- currentSlot :: StagedMockChain Slot
-currentSlot = MockChainBuiltin Slot -> StagedMockChain Slot
+ currentSlot :: StagedMockChain Slot
+currentSlot = MockChainBuiltin Slot -> StagedMockChain Slot
forall (builtin :: * -> *) a modification.
builtin a -> Staged (LtlOp modification builtin) a
singletonBuiltin MockChainBuiltin Slot
GetCurrentSlot
- awaitSlot :: Slot -> StagedMockChain Slot
-awaitSlot = MockChainBuiltin Slot -> StagedMockChain Slot
+ awaitSlot :: Slot -> StagedMockChain Slot
+awaitSlot = MockChainBuiltin Slot -> StagedMockChain Slot
forall (builtin :: * -> *) a modification.
builtin a -> Staged (LtlOp modification builtin) a
singletonBuiltin (MockChainBuiltin Slot -> StagedMockChain Slot)
@@ -1008,10 +1087,10 @@
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Slot -> MockChainBuiltin Slot
AwaitSlot
-
-instance MonadBlockChain StagedMockChain where
- validateTxSkel :: TxSkel -> StagedMockChain CardanoTx
-validateTxSkel = MockChainBuiltin CardanoTx -> StagedMockChain CardanoTx
+
+instance MonadBlockChain StagedMockChain where
+ validateTxSkel :: TxSkel -> StagedMockChain CardanoTx
+validateTxSkel = MockChainBuiltin CardanoTx -> StagedMockChain CardanoTx
forall (builtin :: * -> *) a modification.
builtin a -> Staged (LtlOp modification builtin) a
singletonBuiltin (MockChainBuiltin CardanoTx -> StagedMockChain CardanoTx)
@@ -1021,4 +1100,4 @@
forall b c a. (b -> c) -> (a -> b) -> a -> c
. TxSkel -> MockChainBuiltin CardanoTx
ValidateTxSkel
-
\ No newline at end of file
+