@@ -219,6 +219,14 @@ pub struct TxCommand {
219219 #[ arg( long, alias = "eth-router" ) ]
220220 pub ethereum_router : Option < Address > ,
221221
222+ /// Ethereum EIP-1559 fee increase percentage (from "medium").
223+ #[ arg( long, alias = "eth-eip1559-fee-increase-percentage" ) ]
224+ pub eip1559_fee_increase_percentage : Option < u64 > ,
225+
226+ /// Ethereum blob gas multiplier.
227+ #[ arg( long, alias = "eth-blob-gas-multiplier" ) ]
228+ pub blob_gas_multiplier : Option < u128 > ,
229+
222230 /// Sender address or public key to use. Must have a corresponding private key in the key store.
223231 #[ arg( long) ]
224232 pub sender : Option < Address > ,
@@ -248,6 +256,19 @@ impl TxCommand {
248256 . take ( )
249257 . or_else ( || params. ethereum . as_ref ( ) . and_then ( |p| p. ethereum_router ) ) ;
250258
259+ self . eip1559_fee_increase_percentage =
260+ self . eip1559_fee_increase_percentage . take ( ) . or_else ( || {
261+ params
262+ . ethereum
263+ . as_ref ( )
264+ . and_then ( |p| p. eip1559_fee_increase_percentage )
265+ } ) ;
266+
267+ self . blob_gas_multiplier = self
268+ . blob_gas_multiplier
269+ . take ( )
270+ . or_else ( || params. ethereum . as_ref ( ) . and_then ( |p| p. blob_gas_multiplier ) ) ;
271+
251272 self
252273 }
253274
@@ -277,14 +298,15 @@ impl TxCommand {
277298
278299 let sender = self . sender . ok_or_else ( || anyhow ! ( "missing `sender`" ) ) ?;
279300
280- // INCREASED_BLOB_GAS_MULTIPLIER (TODO: from config, default is increased)
281301 let ethereum = Ethereum :: new (
282302 & rpc,
283303 router_addr,
284304 signer. clone ( ) ,
285305 sender,
286- NO_EIP1559_FEE_INCREASE_PERCENTAGE ,
287- INCREASED_BLOB_GAS_MULTIPLIER ,
306+ self . eip1559_fee_increase_percentage
307+ . unwrap_or ( NO_EIP1559_FEE_INCREASE_PERCENTAGE ) ,
308+ self . blob_gas_multiplier
309+ . unwrap_or ( INCREASED_BLOB_GAS_MULTIPLIER ) ,
288310 )
289311 . await
290312 . with_context ( || "failed to create Ethereum client" ) ?;
0 commit comments