atlas-cardano-0.6.2: Application backend for Plutus smart contracts on Cardano
Copyright(c) 2023 GYELD GMBH
LicenseApache 2.0
Maintainer[email protected]
Stabilitydevelop
Safe HaskellSafe-Inferred
LanguageGHC2021

GeniusYield.Test.FeeTracker

Description

 
Synopsis

Documentation

data FeeTrackerGame m a #

A wrapper around GYTxGameMonad that uses FeeTracker as its GYTxMonad to track extra lovelaces per transaction.

Instances

Instances details
MonadError GYTxMonadException m ⇒ MonadError GYTxMonadException (FeeTrackerGame m) # 
Instance details

Defined in GeniusYield.Test.FeeTracker

MonadRandom m ⇒ MonadRandom (FeeTrackerGame m) # 
Instance details

Defined in GeniusYield.Test.FeeTracker

Methods

getRandomRRandom a ⇒ (a, a) → FeeTrackerGame m a #

getRandomRandom a ⇒ FeeTrackerGame m a #

getRandomRsRandom a ⇒ (a, a) → FeeTrackerGame m [a] #

getRandomsRandom a ⇒ FeeTrackerGame m [a] #

GYTxGameMonad m ⇒ GYTxGameMonad (FeeTrackerGame m) # 
Instance details

Defined in GeniusYield.Test.FeeTracker

Associated Types

type TxMonadOf (FeeTrackerGame m) = (r ∷ TypeType) #

GYTxQueryMonad m ⇒ GYTxQueryMonad (FeeTrackerGame m) # 
Instance details

Defined in GeniusYield.Test.FeeTracker

Methods

networkIdFeeTrackerGame m GYNetworkId #

lookupDatumGYDatumHashFeeTrackerGame m (Maybe GYDatum) #

utxoAtTxOutRefGYTxOutRefFeeTrackerGame m (Maybe GYUTxO) #

utxoAtTxOutRefWithDatumGYTxOutRefFeeTrackerGame m (Maybe (GYUTxO, Maybe GYDatum)) #

utxosAtTxOutRefs ∷ [GYTxOutRef] → FeeTrackerGame m GYUTxOs #

utxosAtTxOutRefsWithDatums ∷ [GYTxOutRef] → FeeTrackerGame m [(GYUTxO, Maybe GYDatum)] #

utxosAtAddressGYAddressMaybe GYAssetClassFeeTrackerGame m GYUTxOs #

utxosAtAddressWithDatumsGYAddressMaybe GYAssetClassFeeTrackerGame m [(GYUTxO, Maybe GYDatum)] #

utxosAtAddresses ∷ [GYAddress] → FeeTrackerGame m GYUTxOs #

utxosAtAddressesWithDatums ∷ [GYAddress] → FeeTrackerGame m [(GYUTxO, Maybe GYDatum)] #

utxoRefsAtAddressGYAddressFeeTrackerGame m [GYTxOutRef] #

utxosAtPaymentCredentialGYPaymentCredentialMaybe GYAssetClassFeeTrackerGame m GYUTxOs #

utxosAtPaymentCredentialWithDatumsGYPaymentCredentialMaybe GYAssetClassFeeTrackerGame m [(GYUTxO, Maybe GYDatum)] #

utxosAtPaymentCredentials ∷ [GYPaymentCredential] → FeeTrackerGame m GYUTxOs #

utxosAtPaymentCredentialsWithDatums ∷ [GYPaymentCredential] → FeeTrackerGame m [(GYUTxO, Maybe GYDatum)] #

stakeAddressInfoGYStakeAddressFeeTrackerGame m (Maybe GYStakeAddressInfo) #

slotConfigFeeTrackerGame m GYSlotConfig #

slotOfCurrentBlockFeeTrackerGame m GYSlot #

logMsgGYLogNamespaceGYLogSeverityStringFeeTrackerGame m () #

waitUntilSlotGYSlotFeeTrackerGame m GYSlot #

waitForNextBlockFeeTrackerGame m GYSlot #

GYTxSpecialQueryMonad m ⇒ GYTxSpecialQueryMonad (FeeTrackerGame m) # 
Instance details

Defined in GeniusYield.Test.FeeTracker

Monad m ⇒ Applicative (FeeTrackerGame m) # 
Instance details

Defined in GeniusYield.Test.FeeTracker

Methods

pure ∷ a → FeeTrackerGame m a #

(<*>)FeeTrackerGame m (a → b) → FeeTrackerGame m a → FeeTrackerGame m b #

liftA2 ∷ (a → b → c) → FeeTrackerGame m a → FeeTrackerGame m b → FeeTrackerGame m c #

(*>)FeeTrackerGame m a → FeeTrackerGame m b → FeeTrackerGame m b #

(<*)FeeTrackerGame m a → FeeTrackerGame m b → FeeTrackerGame m a #

Functor m ⇒ Functor (FeeTrackerGame m) # 
Instance details

Defined in GeniusYield.Test.FeeTracker

Methods

fmap ∷ (a → b) → FeeTrackerGame m a → FeeTrackerGame m b #

(<$) ∷ a → FeeTrackerGame m b → FeeTrackerGame m a #

Monad m ⇒ Monad (FeeTrackerGame m) # 
Instance details

Defined in GeniusYield.Test.FeeTracker

Methods

(>>=)FeeTrackerGame m a → (a → FeeTrackerGame m b) → FeeTrackerGame m b #

(>>)FeeTrackerGame m a → FeeTrackerGame m b → FeeTrackerGame m b #

return ∷ a → FeeTrackerGame m a #

type TxMonadOf (FeeTrackerGame m) # 
Instance details

Defined in GeniusYield.Test.FeeTracker

data FeeTracker m a #

A wrapper around GYTxMonad that "injects" code around transaction building and submitting to track fees.

Instances

Instances details
MonadError GYTxMonadException m ⇒ MonadError GYTxMonadException (FeeTracker m) # 
Instance details

Defined in GeniusYield.Test.FeeTracker

MonadRandom m ⇒ MonadRandom (FeeTracker m) # 
Instance details

Defined in GeniusYield.Test.FeeTracker

Methods

getRandomRRandom a ⇒ (a, a) → FeeTracker m a #

getRandomRandom a ⇒ FeeTracker m a #

getRandomRsRandom a ⇒ (a, a) → FeeTracker m [a] #

getRandomsRandom a ⇒ FeeTracker m [a] #

GYTxBuilderMonad m ⇒ GYTxBuilderMonad (FeeTracker m) #

Override transaction building code of the inner monad to track extra lovelace per transaction.

Instance details

Defined in GeniusYield.Test.FeeTracker

Associated Types

type TxBuilderStrategy (FeeTracker m) #

GYTxMonad m ⇒ GYTxMonad (FeeTracker m) # 
Instance details

Defined in GeniusYield.Test.FeeTracker

GYTxQueryMonad m ⇒ GYTxQueryMonad (FeeTracker m) # 
Instance details

Defined in GeniusYield.Test.FeeTracker

Methods

networkIdFeeTracker m GYNetworkId #

lookupDatumGYDatumHashFeeTracker m (Maybe GYDatum) #

utxoAtTxOutRefGYTxOutRefFeeTracker m (Maybe GYUTxO) #

utxoAtTxOutRefWithDatumGYTxOutRefFeeTracker m (Maybe (GYUTxO, Maybe GYDatum)) #

utxosAtTxOutRefs ∷ [GYTxOutRef] → FeeTracker m GYUTxOs #

utxosAtTxOutRefsWithDatums ∷ [GYTxOutRef] → FeeTracker m [(GYUTxO, Maybe GYDatum)] #

utxosAtAddressGYAddressMaybe GYAssetClassFeeTracker m GYUTxOs #

utxosAtAddressWithDatumsGYAddressMaybe GYAssetClassFeeTracker m [(GYUTxO, Maybe GYDatum)] #

utxosAtAddresses ∷ [GYAddress] → FeeTracker m GYUTxOs #

utxosAtAddressesWithDatums ∷ [GYAddress] → FeeTracker m [(GYUTxO, Maybe GYDatum)] #

utxoRefsAtAddressGYAddressFeeTracker m [GYTxOutRef] #

utxosAtPaymentCredentialGYPaymentCredentialMaybe GYAssetClassFeeTracker m GYUTxOs #

utxosAtPaymentCredentialWithDatumsGYPaymentCredentialMaybe GYAssetClassFeeTracker m [(GYUTxO, Maybe GYDatum)] #

utxosAtPaymentCredentials ∷ [GYPaymentCredential] → FeeTracker m GYUTxOs #

utxosAtPaymentCredentialsWithDatums ∷ [GYPaymentCredential] → FeeTracker m [(GYUTxO, Maybe GYDatum)] #

stakeAddressInfoGYStakeAddressFeeTracker m (Maybe GYStakeAddressInfo) #

slotConfigFeeTracker m GYSlotConfig #

slotOfCurrentBlockFeeTracker m GYSlot #

logMsgGYLogNamespaceGYLogSeverityStringFeeTracker m () #

waitUntilSlotGYSlotFeeTracker m GYSlot #

waitForNextBlockFeeTracker m GYSlot #

GYTxSpecialQueryMonad m ⇒ GYTxSpecialQueryMonad (FeeTracker m) # 
Instance details

Defined in GeniusYield.Test.FeeTracker

GYTxUserQueryMonad m ⇒ GYTxUserQueryMonad (FeeTracker m) # 
Instance details

Defined in GeniusYield.Test.FeeTracker

Monad m ⇒ Applicative (FeeTracker m) # 
Instance details

Defined in GeniusYield.Test.FeeTracker

Methods

pure ∷ a → FeeTracker m a #

(<*>)FeeTracker m (a → b) → FeeTracker m a → FeeTracker m b #

liftA2 ∷ (a → b → c) → FeeTracker m a → FeeTracker m b → FeeTracker m c #

(*>)FeeTracker m a → FeeTracker m b → FeeTracker m b #

(<*)FeeTracker m a → FeeTracker m b → FeeTracker m a #

Functor m ⇒ Functor (FeeTracker m) # 
Instance details

Defined in GeniusYield.Test.FeeTracker

Methods

fmap ∷ (a → b) → FeeTracker m a → FeeTracker m b #

(<$) ∷ a → FeeTracker m b → FeeTracker m a #

Monad m ⇒ Monad (FeeTracker m) # 
Instance details

Defined in GeniusYield.Test.FeeTracker

Methods

(>>=)FeeTracker m a → (a → FeeTracker m b) → FeeTracker m b #

(>>)FeeTracker m a → FeeTracker m b → FeeTracker m b #

return ∷ a → FeeTracker m a #

type TxBuilderStrategy (FeeTracker m) # 
Instance details

Defined in GeniusYield.Test.FeeTracker

ftgLiftFunctor m ⇒ m a → FeeTrackerGame m a #

Perform a special action supported by the specific wrapped monad instance by lifting it to FeeTrackerGame.

ftLiftFunctor m ⇒ m a → FeeTracker m a #

Perform a special action supported by the specific wrapped monad instance by lifting it to FeeTracker.

withWalletBalancesCheckSimpleGYTxGameMonad 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.

withWalletBalancesCheckSimpleIgnoreMinDepForGYTxGameMonad m ⇒ [(User, GYValue)] → Set UserFeeTrackerGame m a → m a #

Variant of withWalletBalancesCheckSimple that only accounts for transaction fees and not minimum ada deposits.

withoutFeeTrackingMonad 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).