File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -88,6 +88,9 @@ class TransactionBuilder:
8888 execution_step_buffer : float = 0.2
8989 """Additional amount of execution step (in ratio) that will be added on top of estimation"""
9090
91+ fee_buffer : Optional [int ] = field (default = None )
92+ """Additional amount of fee (in lovelace) that will be added on top of estimation."""
93+
9194 ttl : Optional [int ] = field (default = None )
9295
9396 validity_start : Optional [int ] = field (default = None )
@@ -587,6 +590,9 @@ def _merge_changes(changes):
587590
588591 # With changes included, we can estimate the fee more precisely
589592 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
590596
591597 if change_address :
592598 self ._outputs = original_outputs
@@ -920,6 +926,8 @@ def _estimate_fee(self):
920926 plutus_execution_units .steps ,
921927 plutus_execution_units .mem ,
922928 )
929+ if self .fee_buffer is not None :
930+ estimated_fee += self .fee_buffer
923931
924932 return estimated_fee
925933
You can’t perform that action at this time.
0 commit comments