Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
andreabedini committed Jun 27, 2022
1 parent 86e6008 commit 0db2e76
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 18 deletions.
17 changes: 4 additions & 13 deletions plutus-ledger/src/Ledger/Typed/Tx.hs
@@ -1,20 +1,11 @@
{-# LANGUAGE TypeApplications #-}
{-# OPTIONS_GHC -Wno-orphans #-}
{-# LANGUAGE NamedFieldPuns #-}

-- | Typed transaction inputs and outputs. This module defines typed versions
-- of various ledger types. The ultimate goal is to make sure that the script
-- types attached to inputs and outputs line up, to avoid type errors at
-- validation time.
module Ledger.Typed.Tx
( module Ledger.Typed.Tx
, module Plutus.Script.Utils.V1.Typed.Scripts
) where
{-# DEPRECATED "Use Plutus.Script.Utils.V1.Typed.Scripts instead" #-}
( module Plutus.Script.Utils.V1.Typed.Scripts,
)
where

import Control.Lens (preview)
import Control.Monad.Except (MonadError, throwError)
import Ledger.Tx (ChainIndexTxOut, TxIn (TxIn, txInRef, txInType), TxInType (ConsumeScriptAddress), TxOutRef,
_ScriptChainIndexTxOut)
import Plutus.Script.Utils.V1.Typed.Scripts
import PlutusTx (FromData, ToData)

8 changes: 5 additions & 3 deletions plutus-ledger/src/Ledger/Typed/TypeUtils.hs
@@ -1,5 +1,7 @@
module Ledger.Typed.TypeUtils {-# DEPRECATED "Use Plutus.Script.Utils.V1.Typed.TypeUtils instead" #-} (
module Plutus.Script.Utils.V1.Typed.TypeUtils
) where
module Ledger.Typed.TypeUtils
{-# DEPRECATED "Use Plutus.Script.Utils.V1.Typed.TypeUtils instead" #-}
( module Plutus.Script.Utils.V1.Typed.TypeUtils,
)
where

import Plutus.Script.Utils.V1.Typed.TypeUtils
Expand Up @@ -42,8 +42,7 @@ import Plutus.V1.Ledger.Api (Credential (PubKeyCredential, ScriptCredential), Da
Redeemer (Redeemer), StakeValidator, ToData (..),
TxOut (TxOut, txOutAddress, txOutDatumHash, txOutValue), TxOutRef, Validator, Value,
addressCredential)
import Plutus.V1.Ledger.Tx (TxIn (TxIn, txInRef, txInType),
TxInType (ConsumePublicKeyAddress, ConsumeScriptAddress, ConsumeSimpleScriptAddress))
import Plutus.V1.Ledger.Tx (TxIn (TxIn, txInType), TxInType (ConsumePublicKeyAddress, ConsumeScriptAddress))

{- Note [Scripts returning Bool]
It used to be that the signal for validation failure was a script being `error`. This is nice for
Expand Down

0 comments on commit 0db2e76

Please sign in to comment.