Skip to content

Commit

Permalink
fix: add factory_deps to estimate_gas (#486)
Browse files Browse the repository at this point in the history
  • Loading branch information
nbaztec authored Jul 22, 2024
1 parent aeb30b1 commit d51c5ef
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions crates/script/src/broadcast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,17 @@ pub async fn send_transaction(
// Chains which use `eth_estimateGas` are being sent sequentially and require their
// gas to be re-estimated right before broadcasting.
if !is_fixed_gas_limit && estimate_via_rpc {
// manually add factory_deps to estimate_gas
if let Some(zk) = zk {
tx.other.insert(
"eip712Meta".into(),
serde_json::to_value(&Eip712Meta {
factory_deps: zk.factory_deps.clone(),
..Default::default()
})
.expect("failed serializing json"),
);
}
estimate_gas(&mut tx, &provider, estimate_multiplier).await?;
}

Expand Down

0 comments on commit d51c5ef

Please sign in to comment.