File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -113,8 +113,12 @@ impl ScriptArgs {
113113 TypedTransaction :: Eip1559 ( ref mut inner) => {
114114 let eip1559_fees =
115115 eip1559_fees. expect ( "Could not get eip1559 fee estimation." ) ;
116+ if let Some ( priority_gas_price) = self . priority_gas_price {
117+ inner. max_priority_fee_per_gas = Some ( priority_gas_price) ;
118+ } else {
119+ inner. max_priority_fee_per_gas = Some ( eip1559_fees. 1 ) ;
120+ }
116121 inner. max_fee_per_gas = Some ( eip1559_fees. 0 ) ;
117- inner. max_priority_fee_per_gas = Some ( eip1559_fees. 1 ) ;
118122 }
119123 }
120124 }
Original file line number Diff line number Diff line change @@ -116,6 +116,15 @@ pub struct ScriptArgs {
116116 ) ]
117117 pub sig : String ,
118118
119+ /// Max priority fee per gas for EIP1559 transactions.
120+ #[ clap(
121+ long,
122+ env = "ETH_PRIORITY_GAS_PRICE" ,
123+ value_parser = parse_ether_value,
124+ value_name = "PRICE"
125+ ) ]
126+ pub priority_gas_price : Option < U256 > ,
127+
119128 /// Use legacy transactions instead of EIP1559 ones.
120129 ///
121130 /// This is auto-enabled for common networks without EIP1559.
You can’t perform that action at this time.
0 commit comments