Module

Contract.BalanceTxConstraints

A module that defines several balancer constraints that can be used to adjust the behaviour of the balancer.

Re-exports from Ctl.Internal.BalanceTx.Constraints

#BalancerConfig

newtype BalancerConfig

Constructors

Instances

#BalanceTxConstraintsBuilder

#mustUseUtxosAtAddresses

mustUseUtxosAtAddresses :: Array Address -> BalancerConstraints

Tells the balancer to use UTxO's at given addresses. If this constraint is not set, then the default addresses owned by the wallet are used.

NOTE: Setting mustUseUtxosAtAddresses or mustUseUtxosAtAddress does NOT have any effect on which address will be used as a change address.

#mustUseUtxosAtAddress

mustUseUtxosAtAddress :: Address -> BalancerConstraints

Tells the balancer to use UTxO's at a given address. If this constraint is not set, then the default addresses owned by the wallet are used.

NOTE: Setting mustUseUtxosAtAddresses or mustUseUtxosAtAddress does NOT have any effect on which address will be used as a change address.

#mustUseCollateralUtxos

mustUseCollateralUtxos :: UtxoMap -> BalancerConstraints

Tells the balancer to select from the provided UTxO set when choosing collateral UTxOs, instead of UTxOs provided by the browser wallet.

#mustUseCoinSelectionStrategy

mustUseCoinSelectionStrategy :: SelectionStrategy -> BalancerConstraints

Tells the balancer to use the given strategy for coin selection.

#mustUseAdditionalUtxos

mustUseAdditionalUtxos :: UtxoMap -> BalancerConstraints

Tells the balancer to use the provided UTxO set when evaluating script execution units (sets additionalUtxoSet of Ogmios EvaluateTx). Note that you need to use unspentOutputs lookup to make these UTxO's spendable by the transaction (see Examples.TxChaining for reference).

#mustSendChangeWithDatum

mustSendChangeWithDatum :: OutputDatum -> BalancerConstraints

Tells the balancer to include the datum in each change UTxO. Useful when balancing a transactions for script owned UTxOs.

#mustSendChangeToAddress

mustSendChangeToAddress :: Address -> BalancerConstraints

Tells the balancer to send all generated change to a given address. If this constraint is not set, then the default change address owned by the wallet is used.

NOTE: Setting mustUseUtxosAtAddresses or mustUseUtxosAtAddress does NOT have any effect on which address will be used as a change address.

#mustNotSpendUtxosWithOutRefs

mustNotSpendUtxosWithOutRefs :: Set TransactionInput -> BalancerConstraints

Tells the balancer not to spend UTxO's with the specified output references.

#mustNotSpendUtxoWithOutRef

mustNotSpendUtxoWithOutRef :: TransactionInput -> BalancerConstraints

Tells the balancer not to spend a UTxO with the specified output reference.

#mustGenChangeOutsWithMaxTokenQuantity

mustGenChangeOutsWithMaxTokenQuantity :: BigInt -> BalancerConstraints

Tells the balancer to split change outputs and equipartition change Value between them if the total change Value contains token quantities exceeding the specified upper bound. (See Cardano.Types.Value.equipartitionValueWithTokenQuantityUpperBound)

Modules