cooked-validators
Safe HaskellSafe-Inferred
LanguageHaskell2010

Cooked.MockChain.MinAda

Description

This module provides functions to ensure skeleton outputs contain enough ada to satisfy the minimum ada constraint.

Synopsis

Documentation

toTxSkelOutWithMinAda :: MonadBlockChainBalancing m => TxSkelOut -> m TxSkelOut Source #

This transforms an output into another output which contains the minimal required ada. If the previous quantity of ADA was sufficient, it remains unchanged. This can require a few iterations to converge, as the added ADA will increase the size of the UTXO which in turn might need more ADA.

toTxSkelWithMinAda :: MonadBlockChainBalancing m => TxSkel -> m TxSkel Source #

This goes through all the TxSkelOuts of the given skeleton and updates their ada value when requested by the user and required by the protocol parameters.

getTxSkelOutMinAda :: MonadBlockChainBalancing m => TxSkelOut -> m Integer Source #

Compute the required minimal ADA for a given output