File tree 6 files changed +195
-381
lines changed
test/Test/Cardano/Api/Typed
6 files changed +195
-381
lines changed Original file line number Diff line number Diff line change @@ -185,27 +185,23 @@ genLovelace = Lovelace <$> Gen.integral (Range.linear 0 5000)
185
185
--
186
186
187
187
genScript :: ScriptLanguage lang -> Gen (Script lang )
188
- genScript ( SimpleScriptLanguage lang) =
189
- SimpleScript lang <$> genSimpleScript lang
188
+ genScript SimpleScriptLanguage =
189
+ SimpleScript <$> genSimpleScript
190
190
genScript (PlutusScriptLanguage lang) =
191
191
PlutusScript lang <$> genPlutusScript lang
192
192
193
- genSimpleScript :: SimpleScriptVersion lang -> Gen ( SimpleScript lang )
194
- genSimpleScript lang =
193
+ genSimpleScript :: Gen SimpleScript
194
+ genSimpleScript =
195
195
genTerm
196
196
where
197
197
genTerm = Gen. recursive Gen. choice nonRecursive recursive
198
198
199
199
-- Non-recursive generators
200
200
nonRecursive =
201
- (RequireSignature . verificationKeyHash <$>
202
- genVerificationKey AsPaymentKey )
203
-
204
- : [ RequireTimeBefore supported <$> genSlotNo
205
- | supported <- maybeToList (timeLocksSupported lang) ]
206
-
207
- ++ [ RequireTimeAfter supported <$> genSlotNo
208
- | supported <- maybeToList (timeLocksSupported lang) ]
201
+ [ RequireSignature . verificationKeyHash <$> genVerificationKey AsPaymentKey
202
+ , RequireTimeBefore <$> genSlotNo
203
+ , RequireTimeAfter <$> genSlotNo
204
+ ]
209
205
210
206
-- Recursive generators
211
207
recursive =
Original file line number Diff line number Diff line change @@ -337,18 +337,15 @@ module Cardano.Api (
337
337
-- | Both 'PaymentCredential's and 'StakeCredential's can use scripts.
338
338
339
339
-- ** Script languages
340
- SimpleScriptV1 ,
341
- SimpleScriptV2 ,
340
+ SimpleScript' ,
342
341
PlutusScriptV1 ,
343
342
PlutusScriptV2 ,
344
343
ScriptLanguage (.. ),
345
- SimpleScriptVersion (.. ),
346
344
PlutusScriptVersion (.. ),
347
345
AnyScriptLanguage (.. ),
348
346
AnyPlutusScriptVersion (.. ),
349
347
IsPlutusScriptLanguage (.. ),
350
348
IsScriptLanguage (.. ),
351
- IsSimpleScriptLanguage (.. ),
352
349
353
350
-- ** Scripts in a specific language
354
351
Script (.. ),
@@ -389,9 +386,6 @@ module Cardano.Api (
389
386
-- ** Simple scripts
390
387
-- | Making multi-signature and time-lock scripts.
391
388
SimpleScript (.. ),
392
- TimeLocksSupported (.. ),
393
- timeLocksSupported ,
394
- adjustSimpleScriptVersion ,
395
389
396
390
-- ** Plutus scripts
397
391
PlutusScript ,
You can’t perform that action at this time.
0 commit comments