Skip to content

Commit d3c479a

Browse files
author
euonymos
committed
chore: remove broken CTxInfo
1 parent 0b866c9 commit d3c479a

File tree

3 files changed

+2
-9
lines changed

3 files changed

+2
-9
lines changed

src/Cardano/CEM/DSL.hs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ import Plutarch.Prelude (
2424
)
2525
import PlutusLedgerApi.V1 (PubKeyHash)
2626
import PlutusLedgerApi.V2 (ToData (..), Value)
27-
import PlutusLedgerApi.V2.Contexts (TxInfo)
2827
import PlutusTx qualified
2928
import Prelude
3029

@@ -39,8 +38,6 @@ data CVar
3938
CTransition
4039
| -- | Optional custom computation, see 'transitionComp'
4140
CComp
42-
| -- | Plutus transaction context FIXME: how do we use it? Only debugging?
43-
CTxInfo
4441
deriving stock (Show)
4542

4643
genSingletons [''CVar]
@@ -51,7 +48,6 @@ type family CVarType (cvar :: CVar) script where
5148
CVarType CState script = State script
5249
CVarType CTransition script = Transition script
5350
CVarType CComp script = TransitionComp script
54-
CVarType CTxInfo script = TxInfo
5551

5652
{- | During the initial stage of compilation DSL Values
5753
move from unresolved state where they are represented

src/Cardano/CEM/OffChain.hs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,6 @@ compileDsl datum@(params, state) transition dsl = case dsl of
385385
SCComp -> case transitionComp @script of
386386
Just go -> Right $ go params state transition
387387
Nothing -> error "Unreachable"
388-
SCTxInfo -> raiseOnchainErrorMessage ("TxInfo reference" :: String)
389388
IsOnChain -> Right False
390389
GetField @label @datatype @_ @value recordDsl _ -> do
391390
recordValue <- recur recordDsl

src/Cardano/CEM/OnChain.hs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import Cardano.CEM.DSL (
1717
ConstraintDSL (..),
1818
RecordLabel (MkRecordLabel),
1919
RecordSetter ((::=)),
20-
SCVar (SCComp, SCParams, SCState, SCTransition, SCTxInfo),
20+
SCVar (SCComp, SCParams, SCState, SCTransition),
2121
SameScriptArg (MkSameScriptArg),
2222
TxConstraint (
2323
Error,
@@ -29,7 +29,7 @@ import Cardano.CEM.DSL (
2929
TxFan
3030
),
3131
TxFanFilter (SameScript, UserAddress),
32-
TxFanKind (In, InRef, Out),
32+
UtxoKind (In, InRef, Out),
3333
)
3434
import Data.Map qualified as Map
3535
import Data.Singletons (Proxy (..), SingI (sing))
@@ -71,7 +71,6 @@ import Plutarch.Builtin (
7171
pasConstr,
7272
pconstrBuiltin,
7373
pdata,
74-
pforgetData,
7574
pfromData,
7675
pfstBuiltin,
7776
psndBuiltin,
@@ -327,7 +326,6 @@ genericPlutarchScript spec code =
327326
SCTransition -> transition
328327
-- FIXME: is this force good?
329328
SCComp -> pforce comp
330-
SCTxInfo -> pforgetData txInfo
331329
GetField @_ @y @_ @value valueDsl proxyLabel ->
332330
getRecordField
333331
(fieldNum @y proxyLabel)

0 commit comments

Comments
 (0)