@@ -41,7 +41,8 @@ module Convex.MockChain(
41
41
applyTransaction ,
42
42
-- * Plutus scripts
43
43
PlutusWithContext (.. ),
44
- fullyAppliedScript ,
44
+ getFullyAppliedScript ,
45
+ getPlutusArgs ,
45
46
-- * Mockchain implementation
46
47
MockchainT (.. ),
47
48
Mockchain ,
@@ -169,8 +170,8 @@ import qualified UntypedPlutusCore as UPLC
169
170
{-| Apply the plutus script to all its arguments and return a plutus
170
171
program
171
172
-}
172
- fullyAppliedScript :: NodeParams C. ConwayEra -> PlutusWithContext StandardCrypto -> Either String (UPLC. Program UPLC. NamedDeBruijn UPLC. DefaultUni UPLC. DefaultFun () )
173
- fullyAppliedScript params pwc@ PlutusWithContext {pwcScript} = do
173
+ getFullyAppliedScript :: NodeParams C. ConwayEra -> PlutusWithContext StandardCrypto -> Either String (UPLC. Program UPLC. NamedDeBruijn UPLC. DefaultUni UPLC. DefaultFun () )
174
+ getFullyAppliedScript params pwc@ PlutusWithContext {pwcScript} = do
174
175
let plutus = either id Plutus.Language. plutusFromRunnable pwcScript
175
176
binScript = Plutus.Language. plutusBinary plutus
176
177
pv = Plutus. MajorProtocolVersion $ getVersion $ pvMajor (Defaults. protVer params)
@@ -190,7 +191,7 @@ getPlutusArgs pwc =
190
191
withRunnablePlutusWithContext
191
192
pwc
192
193
(const [] )
193
- plutusArgs
194
+ ( const plutusArgs)
194
195
195
196
withRunnablePlutusWithContext ::
196
197
PlutusWithContext c ->
@@ -206,8 +207,8 @@ withRunnablePlutusWithContext PlutusWithContext {pwcProtocolVersion, pwcScript,
206
207
Right pr -> f pr pwcArgs
207
208
Left err -> onError (PV3. CodecError err)
208
209
209
- plutusArgs :: forall l . Plutus.Language. PlutusLanguage l => Plutus.Language. PlutusRunnable l -> PlutusArgs l -> [PV3. Data ]
210
- plutusArgs _runnable args = case Plutus.Language. isLanguage @ l of
210
+ plutusArgs :: forall l . Plutus.Language. PlutusLanguage l => PlutusArgs l -> [PV3. Data ]
211
+ plutusArgs args = case Plutus.Language. isLanguage @ l of
211
212
Plutus.Language. SPlutusV1 -> getPlutusArgsV1 args
212
213
Plutus.Language. SPlutusV2 -> getPlutusArgsV2 args
213
214
Plutus.Language. SPlutusV3 -> getPlutusArgsV3 args
@@ -553,7 +554,7 @@ evalMockchain0T :: Functor m => InitialUTXOs -> MockchainT C.ConwayEra m a -> m
553
554
evalMockchain0T dist action = evalMockchainT action Defaults. nodeParams (initialStateFor Defaults. nodeParams dist)
554
555
555
556
execMockchainIO :: MockchainIO era a -> NodeParams era -> MockChainState era -> IO (MockChainState era )
556
- execMockchainIO action nps = execMockchainT action nps
557
+ execMockchainIO = execMockchainT
557
558
558
559
execMockchain0IO :: InitialUTXOs -> MockchainIO C. ConwayEra a -> IO (MockChainState C. ConwayEra )
559
560
execMockchain0IO dist action = execMockchainIO action Defaults. nodeParams (initialStateFor Defaults. nodeParams dist)
0 commit comments