Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion cli/src/cmd/forge/script/broadcast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,12 @@ impl ScriptArgs {
TypedTransaction::Eip1559(ref mut inner) => {
let eip1559_fees =
eip1559_fees.expect("Could not get eip1559 fee estimation.");
if let Some(priority_gas_price) = self.priority_gas_price {
inner.max_priority_fee_per_gas = Some(priority_gas_price);
} else {
inner.max_priority_fee_per_gas = Some(eip1559_fees.1);
}
inner.max_fee_per_gas = Some(eip1559_fees.0);
inner.max_priority_fee_per_gas = Some(eip1559_fees.1);
}
}
}
Expand Down
9 changes: 9 additions & 0 deletions cli/src/cmd/forge/script/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,15 @@ pub struct ScriptArgs {
)]
pub sig: String,

/// Max priority fee per gas for EIP1559 transactions.
#[clap(
long,
env = "ETH_PRIORITY_GAS_PRICE",
value_parser = parse_ether_value,
value_name = "PRICE"
)]
pub priority_gas_price: Option<U256>,

/// Use legacy transactions instead of EIP1559 ones.
///
/// This is auto-enabled for common networks without EIP1559.
Expand Down