Skip to content

Commit

Permalink
Merge branch 'jrigada-pass-down-gas-values-for-script' into jrigada-f…
Browse files Browse the repository at this point in the history
…eat-zk-gas-per-pubdata-flag
  • Loading branch information
Jrigada authored Jan 17, 2025
2 parents 918760f + f7ac02f commit 3d3773c
Showing 1 changed file with 4 additions and 19 deletions.
23 changes: 4 additions & 19 deletions crates/forge/tests/it/zk/gas.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,10 @@ forgetest_async!(zk_script_execution_with_gas_price_specified_by_user, |prj, cmd
let private_key = get_rich_wallet_key();

// Create script args with gas price parameters
let script_args = vec![
"--zk-startup",
"./script/Gas.s.sol",
"--private-key",
&private_key,
"--chain",
"260",
"--rpc-url",
url.as_str(),
"--slow",
"-vvvvv",
"--broadcast",
"--with-gas-price",
"370000037",
"--priority-gas-price",
"123123",
];
let script_args =
create_script_args(&private_key, url.as_str(), "--with-gas-price", "370000037");
let mut script_args = script_args.into_iter().collect::<Vec<_>>();
script_args.extend_from_slice(&["--priority-gas-price", "123123"]);

// Execute script and verify success
cmd.arg("script").args(&script_args);
Expand Down Expand Up @@ -105,7 +92,6 @@ forgetest_async!(zk_script_execution_with_gas_per_pubdata, |prj, cmd| {
assert!(stdout.contains("ONCHAIN EXECUTION COMPLETE & SUCCESSFUL"));
});

// Helper function to get rich wallet private key
fn get_rich_wallet_key() -> String {
ZkSyncNode::rich_wallets()
.next()
Expand All @@ -114,7 +100,6 @@ fn get_rich_wallet_key() -> String {
.to_owned()
}

// Helper function to create script arguments
fn create_script_args<'a>(
private_key: &'a str,
url: &'a str,
Expand Down

0 comments on commit 3d3773c

Please sign in to comment.