Skip to content

Commit

Permalink
fix(eth-sender): Correct ABI for get_verification_key (#445)
Browse files Browse the repository at this point in the history
## What ❔

Use correct contract ABI with `get_verification_key` function

## Why ❔

Fix eth-sender for pre-boojum

## Checklist

<!-- Check your PR fulfills the following items. -->
<!-- For draft PRs check the boxes as you complete them. -->

- [x] PR title corresponds to the body of PR (we generate changelog
entries from PRs).
- [ ] Tests for the changes have been added / updated.
- [ ] Documentation comments have been added / updated.
- [x] Code has been formatted via `zk fmt` and `zk lint`.
  • Loading branch information
perekopskiy authored Nov 8, 2023
1 parent 1e1e59f commit 8af0d85
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions core/lib/zksync_core/src/eth_sender/eth_tx_aggregator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use zksync_types::{
aggregated_operations::AggregatedOperation,
contracts::{Multicall3Call, Multicall3Result},
eth_sender::EthTx,
ethabi::Token,
ethabi::{Contract, Token},
protocol_version::{L1VerifierConfig, VerifierParams},
vk_transform::l1_vk_commitment,
web3::contract::{tokens::Tokenizable, Error, Options},
Expand Down Expand Up @@ -311,6 +311,15 @@ impl EthTxAggregator {
// New verifier returns the hash of the verification key
tracing::debug!("Calling get_verification_key");
if contracts_are_pre_boojum {
let abi = Contract {
functions: vec![(
self.functions.get_verification_key.name.clone(),
vec![self.functions.get_verification_key.clone()],
)]
.into_iter()
.collect(),
..Default::default()
};
let vk = eth_client
.call_contract_function(
&self.functions.get_verification_key.name,
Expand All @@ -319,7 +328,7 @@ impl EthTxAggregator {
Default::default(),
None,
verifier_address,
self.functions.verifier_contract.clone(),
abi,
)
.await?;
Ok(l1_vk_commitment(vk))
Expand Down

0 comments on commit 8af0d85

Please sign in to comment.