Skip to content

Commit

Permalink
Fix compilation errors
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonD3 committed Oct 23, 2023
1 parent 967beac commit b385461
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 45 deletions.
85 changes: 55 additions & 30 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ categories = ["cryptography"]
publish = false # We don't want to publish our binaries.

[dependencies]
zksync_basic_types = { git = "https://github.com/matter-labs/zksync-era.git", rev = "9557e3e3f6505c6e2ccbcd98242948e844baaf59" }
zksync_core = { git = "https://github.com/matter-labs/zksync-era.git", rev = "9557e3e3f6505c6e2ccbcd98242948e844baaf59" }
vm = { git = "https://github.com/matter-labs/zksync-era.git", rev = "9557e3e3f6505c6e2ccbcd98242948e844baaf59" }
zksync_contracts = { git = "https://github.com/matter-labs/zksync-era.git", rev = "9557e3e3f6505c6e2ccbcd98242948e844baaf59" }
zksync_types = { git = "https://github.com/matter-labs/zksync-era.git", rev = "9557e3e3f6505c6e2ccbcd98242948e844baaf59" }
zksync_utils = { git = "https://github.com/matter-labs/zksync-era.git", rev = "9557e3e3f6505c6e2ccbcd98242948e844baaf59" }
zksync_state = { git = "https://github.com/matter-labs/zksync-era.git", rev = "9557e3e3f6505c6e2ccbcd98242948e844baaf59" }
zksync_web3_decl = { git = "https://github.com/matter-labs/zksync-era.git", rev = "9557e3e3f6505c6e2ccbcd98242948e844baaf59" }
zksync_basic_types = { git = "https://github.com/matter-labs/zksync-era.git", rev = "5e7bc64b393ee529e0473b79569931c326118893" }
zksync_core = { git = "https://github.com/matter-labs/zksync-era.git", rev = "5e7bc64b393ee529e0473b79569931c326118893" }
vm = { git = "https://github.com/matter-labs/zksync-era.git", rev = "5e7bc64b393ee529e0473b79569931c326118893" }
zksync_contracts = { git = "https://github.com/matter-labs/zksync-era.git", rev = "5e7bc64b393ee529e0473b79569931c326118893" }
zksync_types = { git = "https://github.com/matter-labs/zksync-era.git", rev = "5e7bc64b393ee529e0473b79569931c326118893" }
zksync_utils = { git = "https://github.com/matter-labs/zksync-era.git", rev = "5e7bc64b393ee529e0473b79569931c326118893" }
zksync_state = { git = "https://github.com/matter-labs/zksync-era.git", rev = "5e7bc64b393ee529e0473b79569931c326118893" }
zksync_web3_decl = { git = "https://github.com/matter-labs/zksync-era.git", rev = "5e7bc64b393ee529e0473b79569931c326118893" }



Expand Down
8 changes: 3 additions & 5 deletions src/fork.rs
Original file line number Diff line number Diff line change
Expand Up @@ -382,11 +382,9 @@ impl ForkDetails<HttpForkSource> {
pub async fn from_network_tx(fork: &str, tx: H256, cache_config: CacheConfig) -> Self {
let (url, client) = Self::fork_to_url_and_client(fork);
let tx_details = client.get_transaction_by_hash(tx).await.unwrap().unwrap();
let overwrite_chain_id = Some(
L2ChainId::try_from(tx_details.chain_id.as_u64()).unwrap_or_else(|err| {
panic!("erroneous chain id {}: {:?}", tx_details.chain_id, err,)
}),
);
let overwrite_chain_id = Some(L2ChainId::try_from(tx_details.chain_id).unwrap_or_else(
|err| panic!("erroneous chain id {}: {:?}", tx_details.chain_id, err,),
));
let miniblock_number = MiniblockNumber(tx_details.block_number.unwrap().as_u32());
// We have to sync to the one-miniblock before the one where transaction is.
let l2_miniblock = miniblock_number.saturating_sub(1) as u64;
Expand Down
4 changes: 2 additions & 2 deletions src/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use crate::{
fork::{ForkDetails, ForkSource, ForkStorage},
formatter,
observability::Observability,
system_contracts::{self, Options, SystemContracts},
system_contracts::{self, SystemContracts},
utils::{
self, adjust_l1_gas_price_for_tx, bytecode_to_factory_dep, create_debug_output,
not_implemented, to_human_size, IntoBoxedFuture,
Expand Down Expand Up @@ -2137,7 +2137,7 @@ impl<S: Send + Sync + 'static + ForkSource + std::fmt::Debug> EthNamespaceT for
max_priority_fee_per_gas: Some(
info.tx.common_data.fee.max_priority_fee_per_gas,
),
chain_id: U256::from(chain_id),
chain_id,
l1_batch_number: Some(U64::from(info.batch_number as u64)),
l1_batch_tx_index: None,
})
Expand Down

0 comments on commit b385461

Please sign in to comment.