cooked-validators
Safe HaskellSafe-Inferred
LanguageHaskell2010

Cooked.MockChain.GenerateTx.Collateral

Synopsis

Documentation

toCollateralTriplet :: MonadBlockChainBalancing m => Integer -> Maybe (Set TxOutRef, Wallet) -> m (TxInsCollateral ConwayEra, TxTotalCollateral ConwayEra, TxReturnCollateral CtxTx ConwayEra) Source #

Computes the collateral triplet from the fees and the collateral inputs in the context. What we call a collateral triplet is composed of: * The set of collateral inputs * The total collateral paid by the transaction in case of phase 2 failure * An output returning excess collateral value when collaterals are used These quantity should satisfy the equation (in terms of their values): collateral inputs = total collateral + return collateral