cooked-validators-4.0.0
Safe HaskellSafe-Inferred
LanguageHaskell2010

Cooked.MockChain.GenerateTx.Collateral

Synopsis

Documentation

data CollateralContext where Source #

Constructors

CollateralContext 

Fields

Instances

Instances details
Transform TxContext CollateralContext Source # 
Instance details

Defined in Cooked.MockChain.GenerateTx.Body

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