Skip to content

Commit

Permalink
Fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ape-dev-cs committed May 15, 2023
1 parent a4376c3 commit 2705d79
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cli/src/cmd/forge/script/broadcast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,9 @@ impl ScriptArgs {
TypedTransaction::Eip1559(ref mut inner) => {
let eip1559_fees =
eip1559_fees.expect("Could not get eip1559 fee estimation.");
// TODO: Ensure max prio fee set by cheatcode is not higher than max fee per gas
inner.max_fee_per_gas = Some(eip1559_fees.0);
inner.max_priority_fee_per_gas = Some(eip1559_fees.1);
let prio_fee = tx_with_metadata.bundle_gas.expect("Max priority fee per gas must be set");
inner.max_fee_per_gas = Some(eip1559_fees.0.overflowing_add(prio_fee).0);
inner.max_priority_fee_per_gas = tx_with_metadata.bundle_gas;
}
}
}
Expand Down Expand Up @@ -210,7 +210,7 @@ impl ScriptArgs {
}

bundle = bundle.set_block(target_block.clone())
.set_simulation_block(target_block.clone())
.set_simulation_block(provider.get_block_number().await?)
.set_simulation_timestamp(0);

trace!(target: "script", "bundle: {:#?}", &bundle);
Expand Down

0 comments on commit 2705d79

Please sign in to comment.