Skip to content

Commit

Permalink
Add MonadBlockchain instance for MonadLogIgnoreT
Browse files Browse the repository at this point in the history
  • Loading branch information
j-mueller committed Mar 20, 2024
1 parent bcd2d14 commit e2f79d9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/base/lib/Convex/Class.hs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ import Control.Monad.Trans.Except (ExceptT (..)
import Control.Monad.Trans.Except.Result (ResultT)
import Convex.Constants (ERA)
import Convex.MonadLog (MonadLog (..),
MonadLogIgnoreT (..),
logInfoS,
logWarnS)
import Convex.Utils (posixTimeToSlotUnsafe,
Expand Down Expand Up @@ -82,6 +83,8 @@ class Monad m => MonadBlockchain m where
-- Slot 0 is returned when at genesis.
networkId :: m NetworkId -- ^ Get the network id

deriving newtype instance MonadBlockchain m => MonadBlockchain (MonadLogIgnoreT m)

instance MonadBlockchain m => MonadBlockchain (ResultT m) where
sendTx = lift . sendTx
utxoByTxIn = lift . utxoByTxIn
Expand Down Expand Up @@ -143,6 +146,8 @@ class MonadBlockchain m => MonadMockchain m where
-}
resolveDatumHash :: Hash ScriptData -> m (Maybe ScriptData)

deriving newtype instance MonadMockchain m => MonadMockchain (MonadLogIgnoreT m)

instance MonadMockchain m => MonadMockchain (ResultT m) where
modifySlot = lift . modifySlot
modifyUtxo = lift . modifyUtxo
Expand Down

0 comments on commit e2f79d9

Please sign in to comment.