Skip to content

Commit

Permalink
move transaction_order to the types crate
Browse files Browse the repository at this point in the history
  • Loading branch information
itegulov committed Dec 18, 2024
1 parent 345c492 commit b096f94
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 9 deletions.
6 changes: 4 additions & 2 deletions crates/cli/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ use anvil_zksync_config::constants::{
use anvil_zksync_config::types::{
AccountGenerator, CacheConfig, CacheType, Genesis, SystemContractsOptions,
};
use anvil_zksync_config::{types::TransactionOrder, TestNodeConfig};
use anvil_zksync_types::{LogLevel, ShowCalls, ShowGasDetails, ShowStorageLogs, ShowVMDetails};
use anvil_zksync_config::TestNodeConfig;
use anvil_zksync_types::{
LogLevel, ShowCalls, ShowGasDetails, ShowStorageLogs, ShowVMDetails, TransactionOrder,
};
use clap::{arg, command, Parser, Subcommand};
use rand::{rngs::StdRng, SeedableRng};
use std::env;
Expand Down
4 changes: 3 additions & 1 deletion crates/config/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ use crate::constants::*;
use crate::types::*;
use crate::utils::{format_eth, format_gwei};
use alloy_signer_local::PrivateKeySigner;
use anvil_zksync_types::{LogLevel, ShowCalls, ShowGasDetails, ShowStorageLogs, ShowVMDetails};
use anvil_zksync_types::{
LogLevel, ShowCalls, ShowGasDetails, ShowStorageLogs, ShowVMDetails, TransactionOrder,
};
use colored::{Colorize, CustomColor};
use serde_json::{json, to_writer, Value};
use std::collections::HashMap;
Expand Down
7 changes: 5 additions & 2 deletions crates/core/src/node/in_memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ use anvil_zksync_config::constants::{
};
use anvil_zksync_config::types::{CacheConfig, Genesis, SystemContractsOptions};
use anvil_zksync_config::TestNodeConfig;
use anvil_zksync_types::{LogLevel, ShowCalls, ShowGasDetails, ShowStorageLogs, ShowVMDetails};
use anvil_zksync_types::{
LogLevel, ShowCalls, ShowGasDetails, ShowStorageLogs, ShowVMDetails, TransactionOrder,
};
use colored::Colorize;
use flate2::read::GzDecoder;
use flate2::write::GzEncoder;
Expand Down Expand Up @@ -2122,8 +2124,9 @@ mod tests {
DEFAULT_ESTIMATE_GAS_SCALE_FACTOR, DEFAULT_FAIR_PUBDATA_PRICE, DEFAULT_L2_GAS_PRICE,
TEST_NODE_NETWORK_ID,
};
use anvil_zksync_config::types::{SystemContractsOptions, TransactionOrder};
use anvil_zksync_config::types::SystemContractsOptions;
use anvil_zksync_config::TestNodeConfig;
use anvil_zksync_types::TransactionOrder;
use ethabi::{Token, Uint};
use zksync_types::{utils::deployed_address_create, K256PrivateKey, Nonce};

Expand Down
2 changes: 1 addition & 1 deletion crates/core/src/node/in_memory_ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ mod tests {
use crate::node::time::{ReadTime, TimestampManager};
use crate::node::InMemoryNode;
use crate::node::{BlockSealer, ImpersonationManager, InMemoryNodeInner, Snapshot, TxPool};
use anvil_zksync_config::types::TransactionOrder;
use anvil_zksync_types::TransactionOrder;
use std::str::FromStr;
use std::sync::{Arc, RwLock};
use zksync_multivm::interface::storage::ReadStorage;
Expand Down
4 changes: 2 additions & 2 deletions crates/core/src/node/pool.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::node::impersonate::ImpersonationManager;
use anvil_zksync_config::types::{TransactionOrder, TransactionPriority};
use anvil_zksync_types::{TransactionOrder, TransactionPriority};
use futures::channel::mpsc::{channel, Receiver, Sender};
use std::cmp::Ordering;
use std::collections::BTreeSet;
Expand Down Expand Up @@ -245,7 +245,7 @@ mod tests {
use crate::node::pool::TxBatch;
use crate::node::{ImpersonationManager, TxPool};
use crate::testing;
use anvil_zksync_config::types::TransactionOrder;
use anvil_zksync_types::TransactionOrder;
use test_case::test_case;
use zksync_types::{l2::L2Tx, U256};

Expand Down
2 changes: 1 addition & 1 deletion crates/core/src/node/sealer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ mod tests {
use crate::node::pool::TxBatch;
use crate::node::sealer::BlockSealerMode;
use crate::node::{BlockSealer, ImpersonationManager, TxPool};
use anvil_zksync_config::types::TransactionOrder;
use anvil_zksync_types::TransactionOrder;
use std::ptr;
use std::task::{Context, Poll, RawWaker, RawWakerVTable, Waker};
use std::time::Duration;
Expand Down
2 changes: 2 additions & 0 deletions crates/types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ pub mod api;
mod log;
mod serde_helpers;
mod show_details;
mod transaction_order;

pub use self::{
log::LogLevel,
serde_helpers::Numeric,
show_details::{ShowCalls, ShowGasDetails, ShowStorageLogs, ShowVMDetails},
transaction_order::{TransactionOrder, TransactionPriority},
};
File renamed without changes.

0 comments on commit b096f94

Please sign in to comment.