Skip to content

Commit 05740fb

Browse files
committed
fix(protocol-ops): keep execute_one_bundle's signature for downstream crates
zksync-os-integration-tests links protocol_ops and calls the four-argument execute_one_bundle; the gas floor now lives on execute_one_bundle_with_gas_floor.
1 parent 3fe7292 commit 05740fb

3 files changed

Lines changed: 25 additions & 5 deletions

File tree

protocol-ops/src/commands/dev/execute_manifest.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use alloy::signers::local::PrivateKeySigner;
66
use anyhow::{bail, Context, Result};
77
use clap::Parser;
88

9-
use crate::commands::dev::execute_safe::{execute_one_bundle, parse_gwei};
9+
use crate::commands::dev::execute_safe::{execute_one_bundle_with_gas_floor, parse_gwei};
1010
use crate::common::{anvil::set_balance, logger, preflight::is_local_rpc, PrivateKey};
1111

1212
/// Apply every bundle listed in a `manifest.json` file, routing each one to the
@@ -179,7 +179,8 @@ pub async fn apply_manifest_from(
179179
})?;
180180
}
181181

182-
execute_one_bundle(&bundle_path, l1_rpc_url, key, None, gas_price_floor_wei).await?;
182+
execute_one_bundle_with_gas_floor(&bundle_path, l1_rpc_url, key, None, gas_price_floor_wei)
183+
.await?;
183184
}
184185

185186
logger::success("All bundles applied.");

protocol-ops/src/commands/dev/execute_safe.rs

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ pub struct DevExecuteSafeArgs {
150150
}
151151

152152
pub async fn run(args: DevExecuteSafeArgs) -> anyhow::Result<()> {
153-
execute_one_bundle(
153+
execute_one_bundle_with_gas_floor(
154154
&args.safe_file,
155155
&args.l1_rpc_url,
156156
args.private_key.expose(),
@@ -171,6 +171,25 @@ pub async fn execute_one_bundle(
171171
l1_rpc_url: &str,
172172
private_key: &str,
173173
out_path: Option<&Path>,
174+
) -> anyhow::Result<()> {
175+
execute_one_bundle_with_gas_floor(
176+
safe_file,
177+
l1_rpc_url,
178+
private_key,
179+
out_path,
180+
GAS_PRICE_FLOOR_WEI,
181+
)
182+
.await
183+
}
184+
185+
/// [`execute_one_bundle`] with an explicit gas price floor (wei). The
186+
/// four-argument form keeps the default so external crates that link
187+
/// `protocol_ops` (zksync-os-integration-tests' `zk-deployer`) keep compiling.
188+
pub async fn execute_one_bundle_with_gas_floor(
189+
safe_file: &Path,
190+
l1_rpc_url: &str,
191+
private_key: &str,
192+
out_path: Option<&Path>,
174193
gas_price_floor_wei: u128,
175194
) -> anyhow::Result<()> {
176195
logger::step(format!("Execute Safe file: {}", safe_file.display()));

protocol-ops/src/commands/ecosystem/broadcast.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ use clap::Parser;
2424
use serde::Deserialize;
2525

2626
use crate::commands::dev::execute_safe::{
27-
execute_one_bundle, execute_one_bundle_unlocked, parse_gwei,
27+
execute_one_bundle_unlocked, execute_one_bundle_with_gas_floor, parse_gwei,
2828
};
2929
use crate::common::logger;
3030

@@ -168,7 +168,7 @@ pub async fn run(args: UpgradeBroadcastArgs) -> anyhow::Result<()> {
168168
.with_context(|| format!("bundle #{} ({})", bundle.index, bundle.file))?;
169169
} else {
170170
let key = &key_map[&bundle.target];
171-
execute_one_bundle(
171+
execute_one_bundle_with_gas_floor(
172172
&bundle_path,
173173
&args.l1_rpc_url,
174174
key,

0 commit comments

Comments
 (0)