Copyright | (c) 2023 GYELD GMBH |
---|---|
License | Apache 2.0 |
Maintainer | [email protected] |
Stability | develop |
Safe Haskell | Safe-Inferred |
Language | GHC2021 |
Synopsis
- data FeeTrackerGame m a
- data FeeTracker m a
- ftgLift ∷ Functor m ⇒ m a → FeeTrackerGame m a
- ftLift ∷ Functor m ⇒ m a → FeeTracker m a
- withWalletBalancesCheckSimple ∷ GYTxGameMonad m ⇒ [(User, GYValue)] → FeeTrackerGame m a → m a
- withWalletBalancesCheckSimpleIgnoreMinDepFor ∷ GYTxGameMonad m ⇒ [(User, GYValue)] → Set User → FeeTrackerGame m a → m a
- withoutFeeTracking ∷ Monad m ⇒ FeeTracker m a → FeeTracker m a
Documentation
data FeeTrackerGame m a #
A wrapper around GYTxGameMonad
that uses FeeTracker
as its GYTxMonad
to track extra lovelaces per transaction.
Instances
data FeeTracker m a #
A wrapper around GYTxMonad
that "injects" code around transaction building and submitting to track fees.
Instances
ftgLift ∷ Functor m ⇒ m a → FeeTrackerGame m a #
Perform a special action supported by the specific wrapped monad instance by lifting it to FeeTrackerGame
.
ftLift ∷ Functor m ⇒ m a → FeeTracker m a #
Perform a special action supported by the specific wrapped monad instance by lifting it to FeeTracker
.
withWalletBalancesCheckSimple ∷ GYTxGameMonad m ⇒ [(User, GYValue)] → FeeTrackerGame m a → m a #
Computes a GYTxMonadClb
action, checking that the Wallet
balances
change according to the input list. This is a simplified version of withWalletBalancesCheck
where the input list need not consider lovelaces required for fees & to satisfy the min ada requirements as these are added automatically. It is therefore recommended to use this function over withWalletBalancesCheck
to avoid hardcoding the lovelaces required for fees & min ada constraints.
Notes:
* An empty list means no checks are performed.
* The GYValue
should be negative to check if the Wallet lost those funds.
withWalletBalancesCheckSimpleIgnoreMinDepFor ∷ GYTxGameMonad m ⇒ [(User, GYValue)] → Set User → FeeTrackerGame m a → m a #
Variant of withWalletBalancesCheckSimple
that only accounts for transaction fees and not minimum ada deposits.
withoutFeeTracking ∷ Monad m ⇒ FeeTracker m a → FeeTracker m a #
Run an action and ignore any tracked fees. Useful for building a tx body without the intent to submit it later. Thereby ignoring all the tracked fees from that txbody that won't actually take effect in the wallet (since it won't be submitted).