@@ -158,7 +158,7 @@ class TransactionBuilder:
158
158
_withdrawal_script_to_redeemers : List [Tuple [ScriptType , Optional [Redeemer ]]] = (
159
159
field (init = False , default_factory = lambda : [])
160
160
)
161
-
161
+
162
162
_certificate_script_to_redeemers : List [Tuple [ScriptType , Optional [Redeemer ]]] = (
163
163
field (init = False , default_factory = lambda : [])
164
164
)
@@ -396,7 +396,8 @@ def add_certificate_script(
396
396
redeemer : Optional [Redeemer ] = None ,
397
397
) -> TransactionBuilder :
398
398
"""Add a certificate script along with its redeemer to this transaction.
399
- WARNING: The order of operations matters. The index of the redeemer will be set to the index of the last certificate added.
399
+ WARNING: The order of operations matters.
400
+ The index of the redeemer will be set to the index of the last certificate added.
400
401
401
402
Args:
402
403
script (Union[UTxO, PlutusV1Script, PlutusV2Script, PlutusV3Script]): A plutus script.
@@ -411,9 +412,10 @@ def add_certificate_script(
411
412
f"Expect the redeemer tag's type to be { RedeemerTag .CERTIFICATE } , "
412
413
f"but got { redeemer .tag } instead."
413
414
)
414
- assert (
415
- self .certificates is not None and len (self .certificates ) >= 1
416
- ), "self.certificates is None. redeemer.index needs to be set to the index of the corresponding certificate (defaulting to the last certificate) however no certificates could be found"
415
+ assert self .certificates is not None and len (self .certificates ) >= 1 , (
416
+ "self.certificates is None. redeemer.index needs to be set to the index of the corresponding"
417
+ "certificate (defaulting to the last certificate) however no certificates could be found"
418
+ )
417
419
redeemer .index = len (self .certificates ) - 1
418
420
redeemer .tag = RedeemerTag .CERTIFICATE
419
421
self ._consolidate_redeemer (redeemer )
@@ -516,7 +518,7 @@ def all_scripts(self) -> List[ScriptType]:
516
518
517
519
for s , _ in self ._withdrawal_script_to_redeemers :
518
520
scripts [script_hash (s )] = s
519
-
521
+
520
522
for s , _ in self ._certificate_script_to_redeemers :
521
523
scripts [script_hash (s )] = s
522
524
0 commit comments