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