Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data CollateralContext where
- CollateralContext :: {..} -> CollateralContext
- type CollateralGen a = TxGen CollateralContext a
- toCollateralTriplet :: CollateralGen (TxInsCollateral ConwayEra, TxTotalCollateral ConwayEra, TxReturnCollateral CtxTx ConwayEra)
Documentation
data CollateralContext where Source #
CollateralContext | |
|
Instances
type CollateralGen a = TxGen CollateralContext a Source #
toCollateralTriplet :: CollateralGen (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