Skip to content

Commit a8e0cda

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

File tree

3 files changed

+1
-7
lines changed

3 files changed

+1
-7
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: 1 addition & 2 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,
@@ -327,7 +327,6 @@ genericPlutarchScript spec code =
327327
SCTransition -> transition
328328
-- FIXME: is this force good?
329329
SCComp -> pforce comp
330-
SCTxInfo -> pforgetData txInfo
331330
GetField @_ @y @_ @value valueDsl proxyLabel ->
332331
getRecordField
333332
(fieldNum @y proxyLabel)

0 commit comments

Comments
 (0)