File tree 1 file changed +8
-0
lines changed
1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -88,6 +88,9 @@ class TransactionBuilder:
88
88
execution_step_buffer : float = 0.2
89
89
"""Additional amount of execution step (in ratio) that will be added on top of estimation"""
90
90
91
+ fee_buffer : Optional [int ] = field (default = None )
92
+ """Additional amount of fee (in lovelace) that will be added on top of estimation."""
93
+
91
94
ttl : Optional [int ] = field (default = None )
92
95
93
96
validity_start : Optional [int ] = field (default = None )
@@ -587,6 +590,9 @@ def _merge_changes(changes):
587
590
588
591
# With changes included, we can estimate the fee more precisely
589
592
self .fee = self ._estimate_fee ()
593
+ # Beyond this, the computed fee is not updated anymore so we can add the fee buffer
594
+ if self .fee_buffer is not None :
595
+ self .fee += self .fee_buffer
590
596
591
597
if change_address :
592
598
self ._outputs = original_outputs
@@ -920,6 +926,8 @@ def _estimate_fee(self):
920
926
plutus_execution_units .steps ,
921
927
plutus_execution_units .mem ,
922
928
)
929
+ if self .fee_buffer is not None :
930
+ estimated_fee += self .fee_buffer
923
931
924
932
return estimated_fee
925
933
You can’t perform that action at this time.
0 commit comments