content: [workspace]
  members = [
      "benches/",
      "crates/anvil/",
      "crates/anvil/core/",
      "crates/anvil/rpc/",
      "crates/anvil/server/",
      "crates/cast/",
      "crates/cheatcodes/",
      "crates/cheatcodes/spec/",
      "crates/chisel/",
      "crates/cli/",
      "crates/common/",
      "crates/config/",
      "crates/debugger/",
      "crates/doc/",
      "crates/evm/core/",
      "crates/evm/coverage/",
      "crates/evm/evm/",
      "crates/evm/fuzz/",
      "crates/evm/traces/",
      "crates/fmt/",
      "crates/forge/",
      "crates/script-sequence/",
      "crates/macros/",
      "crates/test-utils/",
      "crates/lint/",
      "crates/strategy/zksync/",
  ]
  resolver = "2"
  
  [workspace.metadata]
  # NOTE(zk): track upstream version after each merge
  metadata.upstream_version = "1.3.5"
  
  [workspace.package]
  version = "0.0.30" # x-release-please-version
  edition = "2024"
  # Remember to update clippy.toml as well
  rust-version = "1.89"
  authors = ["Foundry Contributors"]
  license = "MIT OR Apache-2.0"
  homepage = "https://getfoundry.sh"
  repository = "https://github.com/foundry-rs/foundry"
  exclude = ["benches/", "tests/", "test-data/", "testdata/"]
  
  [workspace.lints.clippy]
  borrow_as_ptr = "warn"
  branches_sharing_code = "warn"
  clear_with_drain = "warn"
  cloned_instead_of_copied = "warn"
  collection_is_never_read = "warn"
  dbg-macro = "warn"
  explicit_iter_loop = "warn"
  manual-string-new = "warn"
  uninlined-format-args = "warn"
  use-self = "warn"
  redundant-clone = "warn"
  octal-escapes = "allow"
  result_large_err = "allow"
  
  [workspace.lints.rust]
  redundant_imports = "warn"
  redundant-lifetimes = "warn"
  rust-2018-idioms = "warn"
  unused-must-use = "warn"
  # unreachable-pub = "warn"
  
  [workspace.lints.rustdoc]
  all = "warn"
  
  # Speed up compilation time for dev builds by reducing emitted debug info.
  # NOTE: Debuggers may provide less useful information with this setting.
  # Uncomment this section if you're using a debugger.
  [profile.dev]
  # https://davidlattimore.github.io/posts/2024/02/04/speeding-up-the-rust-edit-build-run-cycle.html
  debug = "line-tables-only"
  split-debuginfo = "unpacked"
  
  [profile.release]
  opt-level = 3
  lto = "thin"
  debug = "none"
  strip = "debuginfo"
  panic = "abort"
  codegen-units = 16
  
  # Use the `--profile profiling` flag to show symbols in release mode.
  # e.g. `cargo build --profile profiling`
  [profile.profiling]
  inherits = "release"
  debug = "full"
  strip = "none"
  
  [profile.bench]
  inherits = "profiling"
  
  [profile.maxperf]
  inherits = "release"
  lto = "fat"
  codegen-units = 1
  
  # Speed up tests and dev build.
  [profile.dev.package]
  # Solc and artifacts.
  foundry-compilers-artifacts-solc.opt-level = 3
  foundry-compilers-core.opt-level = 3
  foundry-compilers.opt-level = 3
  serde_json.opt-level = 3
  serde.opt-level = 3
  
  foundry-solang-parser.opt-level = 3
  lalrpop-util.opt-level = 3
  
  solar-compiler.opt-level = 3
  solar-ast.opt-level = 3
  solar-data-structures.opt-level = 3
  solar-interface.opt-level = 3
  solar-parse.opt-level = 3
  solar-sema.opt-level = 3
  
  # EVM.
  alloy-dyn-abi.opt-level = 3
  alloy-json-abi.opt-level = 3
  alloy-primitives.opt-level = 3
  alloy-sol-type-parser.opt-level = 3
  alloy-sol-types.opt-level = 3
  hashbrown.opt-level = 3
  foldhash.opt-level = 3
  keccak.opt-level = 3
  revm.opt-level = 3
  revm-primitives.opt-level = 3
  revm-interpreter.opt-level = 3
  revm-precompile.opt-level = 3
  revm-database-interface.opt-level = 3
  revm-database.opt-level = 3
  revm-bytecode.opt-level = 3
  revm-state.opt-level = 3
  revm-context-interface.opt-level = 3
  revm-context.opt-level = 3
  revm-inspector.opt-level = 3
  ruint.opt-level = 3
  sha2.opt-level = 3
  sha3.opt-level = 3
  tiny-keccak.opt-level = 3
  bitvec.opt-level = 3
  
  # Fuzzing.
  proptest.opt-level = 3
  foundry-evm-fuzz.opt-level = 3
  
  # Forking.
  axum.opt-level = 3
  
  # Keystores.
  scrypt.opt-level = 3
  
  # Misc.
  rayon.opt-level = 3
  rayon-core.opt-level = 3
  regex.opt-level = 3
  regex-syntax.opt-level = 3
  regex-automata.opt-level = 3
  walkdir.opt-level = 3
  
  # zksync
  zksync_multivm.opt-level = 3
  
  # Override packages which aren't perf-sensitive for faster compilation speed and smaller binary size.
  [profile.release.package]
  alloy-sol-macro-expander.opt-level = "z"
  figment.opt-level = "z"
  foundry-compilers-artifacts-solc.opt-level = "z"
  foundry-config.opt-level = "z"
  html5ever.opt-level = "z"
  mdbook.opt-level = "z"
  prettyplease.opt-level = "z"
  protobuf.opt-level = "z"
  pulldown-cmark.opt-level = "z"
  syn-solidity.opt-level = "z"
  syn.opt-level = "z"
  trezor-client.opt-level = "z"
  
  [workspace.dependencies]
  anvil = { path = "crates/anvil" }
  cast = { path = "crates/cast" }
  chisel = { path = "crates/chisel" }
  forge = { path = "crates/forge" }
  
  forge-doc = { path = "crates/doc" }
  forge-fmt = { path = "crates/fmt" }
  forge-lint = { path = "crates/lint" }
  forge-verify = { path = "crates/verify" }
  forge-script = { path = "crates/script" }
  forge-sol-macro-gen = { path = "crates/sol-macro-gen" }
  forge-script-sequence = { path = "crates/script-sequence" }
  foundry-cheatcodes = { path = "crates/cheatcodes" }
  foundry-cheatcodes-spec = { path = "crates/cheatcodes/spec" }
  foundry-cheatcodes-common = { path = "crates/cheatcodes/common" }
  foundry-cli = { path = "crates/cli" }
  foundry-common = { path = "crates/common" }
  foundry-common-fmt = { path = "crates/common/fmt" }
  foundry-config = { path = "crates/config" }
  foundry-debugger = { path = "crates/debugger" }
  foundry-evm = { path = "crates/evm/evm" }
  foundry-evm-abi = { path = "crates/evm/abi" }
  foundry-evm-core = { path = "crates/evm/core" }
  foundry-evm-coverage = { path = "crates/evm/coverage" }
  foundry-evm-networks = { path = "crates/evm/networks" }
  foundry-evm-fuzz = { path = "crates/evm/fuzz" }
  foundry-evm-traces = { path = "crates/evm/traces" }
  foundry-macros = { path = "crates/macros" }
  foundry-test-utils = { path = "crates/test-utils" }
  foundry-wallets = { path = "crates/wallets" }
  foundry-linking = { path = "crates/linking" }
  foundry-zksync-core = { path = "crates/zksync/core" }
  foundry-zksync-compilers = { path = "crates/zksync/compilers" }
  foundry-zksync-inspectors = { path = "crates/zksync/inspectors" }
  foundry-strategy-zksync = { path = "crates/strategy/zksync" }
  
  # solc & compilation utilities
  foundry-block-explorers = { version = "0.22.0", default-features = false }
  foundry-compilers = { version = "0.19.1", default-features = false, features = [
      "rustls",
      "svm-solc",
  ] }
  foundry-fork-db = "0.18"
  solang-parser = { version = "=0.3.9", package = "foundry-solang-parser" }
  solar = { package = "solar-compiler", version = "=0.1.7", default-features = false }
  solar-data-structures = { version = "=0.1.7", default-features = false }
  solar-interface = { version = "=0.1.7", default-features = false }
  solar-parse = { version = "=0.1.7", default-features = false }
  solar-sema = { version = "=0.1.7", default-features = false }
  svm = { package = "svm-rs", version = "0.5", default-features = false, features = [
      "rustls",
  ] }
  
  ## alloy
  alloy-consensus = { version = "1.0.36", default-features = false }
  alloy-contract = { version = "1.0.36", default-features = false }
  alloy-eips = { version = "1.0.36", default-features = false }
  alloy-eip5792 = { version = "1.0.36", default-features = false }
  alloy-ens = { version = "1.0.36", default-features = false }
  alloy-genesis = { version = "1.0.36", default-features = false }
  alloy-json-rpc = { version = "1.0.36", default-features = false }
  alloy-network = { version = "1.0.36", default-features = false }
  alloy-provider = { version = "1.0.36", default-features = false }
  alloy-pubsub = { version = "1.0.36", default-features = false }
  alloy-rpc-client = { version = "1.0.36", default-features = false }
  alloy-rpc-types = { version = "1.0.36", default-features = true }
  alloy-rpc-types-beacon = { version = "1.0.36", default-features = true }
  alloy-serde = { version = "1.0.36", default-features = false }
  alloy-signer = { version = "1.0.36", default-features = false }
  alloy-signer-aws = { version = "1.0.36", default-features = false }
  alloy-signer-gcp = { version = "1.0.36", default-features = false }
  alloy-signer-ledger = { version = "1.0.36", default-features = false }
  alloy-signer-local = { version = "1.0.36", default-features = false }
  alloy-signer-trezor = { version = "1.0.36", default-features = false }
  alloy-transport = { version = "1.0.36", default-features = false }
  alloy-transport-http = { version = "1.0.36", default-features = false }
  alloy-transport-ipc = { version = "1.0.36", default-features = false }
  alloy-transport-ws = { version = "1.0.36", default-features = false }
  alloy-hardforks = { version = "0.3.2", default-features = false }
  alloy-op-hardforks = { version = "0.3.2", default-features = false }
  
  ## alloy-core
  alloy-dyn-abi = "1.3.1"
  alloy-json-abi = "1.3.0"
  alloy-primitives = { version = "1.3.1", features = [
      "getrandom",
      "rand",
      "map-fxhash",
      "map-foldhash",
  ] }
  alloy-sol-macro-expander = "1.3.1"
  alloy-sol-macro-input = "1.3.1"
  alloy-sol-types = "1.3.1"
  
  alloy-chains = "0.2"
  alloy-rlp = "0.3"
  alloy-zksync = { version = "1.0.11-alpha.1", git = "https://github.com/matter-labs/alloy-zksync", branch = "popzxc-1.0.0-alpha.2" }
  
  alloy-trie = "0.9"
  
  ## op-alloy
  op-alloy-consensus = "0.20.0"
  op-alloy-rpc-types = "0.20.0"
  op-alloy-flz = "0.13.1"
  
  ## revm
  revm = { version = "29.0.0", default-features = false }
  revm-inspectors = { version = "0.30.0", features = ["serde"] }
  op-revm = { version = "10.0.0", default-features = false }
  ## alloy-evm
  alloy-evm = "0.21.1"
  alloy-op-evm = "0.21.1"
  
  ## cli
  anstream = "0.6"
  anstyle = "1.0"
  dialoguer = { version = "0.12", default-features = false, features = [
      "password",
  ] }
  clap_complete = "4"
  clap_complete_nushell = "4"
  
  ## zksync
  anvil_zksync_core = { git = "https://github.com/matter-labs/anvil-zksync.git", rev = "a37ef3c85c8f89371954dab6350b3beb6a61a175", default-features = false }
  anvil_zksync_types = { git = "https://github.com/matter-labs/anvil-zksync.git", rev = "a37ef3c85c8f89371954dab6350b3beb6a61a175", default-features = false }
  anvil_zksync_config = { git = "https://github.com/matter-labs/anvil-zksync.git", rev = "a37ef3c85c8f89371954dab6350b3beb6a61a175", default-features = false }
  anvil_zksync_api_server = { git = "https://github.com/matter-labs/anvil-zksync.git", rev = "a37ef3c85c8f89371954dab6350b3beb6a61a175", default-features = false }
  anvil_zksync_common = { git = "https://github.com/matter-labs/anvil-zksync.git", rev = "a37ef3c85c8f89371954dab6350b3beb6a61a175", default-features = false }
  anvil_zksync_console = { git = "https://github.com/matter-labs/anvil-zksync.git", rev = "a37ef3c85c8f89371954dab6350b3beb6a61a175", default-features = false }
  anvil_zksync_traces = { git = "https://github.com/matter-labs/anvil-zksync.git", rev = "a37ef3c85c8f89371954dab6350b3beb6a61a175", default-features = false }
  anvil_zksync_l1_sidecar = { git = "https://github.com/matter-labs/anvil-zksync.git", rev = "a37ef3c85c8f89371954dab6350b3beb6a61a175", default-features = false }
  zksync_telemetry = { git = "https://github.com/matter-labs/zksync-telemetry.git", rev = "f6d8618d870a09467ff24ea32ef57e01af8f311e" }
  zksync_basic_types = { git = "https://github.com/matter-labs/zksync-era.git", rev = "core-v29.0.0" }
  zksync_types = { git = "https://github.com/matter-labs/zksync-era.git", rev = "core-v29.0.0" }
  zksync_vm_interface = { git = "https://github.com/matter-labs/zksync-era.git", rev = "core-v29.0.0" }
  zksync_multivm = { git = "https://github.com/matter-labs/zksync-era.git", rev = "core-v29.0.0" }
  zksync_utils = { git = "https://github.com/matter-labs/zksync-era.git", rev = "core-v29.0.0" }
  zksync_contracts = { git = "https://github.com/matter-labs/zksync-era.git", rev = "core-v29.0.0" }
  
  # macros
  proc-macro2 = "1.0"
  quote = "1.0"
  syn = "2.0"
  async-trait = "0.1"
  derive_more = { version = "2.0", features = ["full"] }
  thiserror = "2"
  
  # allocators
  mimalloc = "0.1"
  tikv-jemallocator = "0.6"
  
  # misc
  auto_impl = "1"
  bytes = "1.10"
  walkdir = "2"
  prettyplease = "0.2"
  base64 = "0.22"
  chrono = { version = "0.4", default-features = false, features = [
      "clock",
      "std",
  ] }
  axum = "0.8"
  ciborium = "0.2"
  color-eyre = "0.6"
  comfy-table = "7"
  dirs = "6"
  dunce = "1"
  evm-disassembler = "0.5"
  evmole = "0.8"
  eyre = "0.6"
  figment = "0.10"
  futures = { version = "0.3", default-features = false }
  hyper = "1.6"
  indicatif = "0.18"
  itertools = "0.14"
  jsonpath_lib = "0.3"
  k256 = "0.13"
  mesc = "0.3"
  memchr = "2.7"
  num-format = "0.4"
  parking_lot = "0.12"
  proptest = "1.7.0"
  rand = "0.9"
  rand_08 = { package = "rand", version = "0.8" }
  rand_chacha = "0.9.0"
  rayon = "1"
  regex = { version = "1", default-features = false }
  reqwest = { version = "0.12", default-features = false, features = [
      "rustls-tls",
      "rustls-tls-native-roots",
  ] }
  rustls = "0.23"
  semver = "1"
  serde = { version = "1.0", features = ["derive"] }
  serde_json = { version = "1.0", features = ["arbitrary_precision"] }
  serde_urlencoded = "0.7.1"
  similar-asserts = "1.7"
  soldeer-commands = "=0.8.0"
  soldeer-core = { version = "=0.8.0", features = ["serde"] }
  strum = "0.27"
  tempfile = "3.20"
  tokio = "1"
  toml = "0.9"
  toml_edit = "0.23"
  tower = "0.5"
  tower-http = "0.6"
  tracing = "0.1"
  tracing-subscriber = "0.3"
  url = "2"
  vergen = { version = "8", default-features = false }
  yansi = { version = "1.0", features = ["detect-tty", "detect-env"] }
  httptest = "0.16.3"
  path-slash = "0.2"
  jiff = { version = "0.2", default-features = false, features = ["std", "perf-inline"] }
  heck = "0.5"
  uuid = "1.17.0"
  flate2 = "1.1"
  
  ## Pinned dependencies. Enabled for the workspace in crates/test-utils.
  
  # testing
  snapbox = { version = "0.6", features = ["json", "regex", "term-svg"] }
  
  # Use unicode-rs which has a smaller binary size than the default ICU4X as the IDNA backend, used
  # by the `url` crate.
  # See the `idna_adapter` README.md for more details: https://docs.rs/crate/idna_adapter/latest
  idna_adapter = "=1.1.0"
  
  [patch.crates-io]
  vise = { git = "https://github.com/matter-labs/vise.git", rev = "51669f42f60c50b3a521662a4ecd71212a303299" }
  # https://github.com/rust-cli/rexpect/pull/106
  rexpect = { git = "https://github.com/rust-cli/rexpect", rev = "2ed0b1898d7edaf6a85bedbae71a01cc578958fc" }
  
  ## alloy-core
  # alloy-dyn-abi = { path = "../../alloy-rs/core/crates/dyn-abi" }
  # alloy-json-abi = { path = "../../alloy-rs/core/crates/json-abi" }
  # alloy-primitives = { path = "../../alloy-rs/core/crates/primitives" }
  # alloy-sol-macro = { path = "../../alloy-rs/core/crates/sol-macro" }
  # alloy-sol-macro-expander = { path = "../../alloy-rs/core/crates/sol-macro-expander" }
  # alloy-sol-macro-input = { path = "../../alloy-rs/core/crates/sol-macro-input" }
  # alloy-sol-type-parser = { path = "../../alloy-rs/core/crates/sol-type-parser" }
  # alloy-sol-types = { path = "../../alloy-rs/core/crates/sol-types" }
  # syn-solidity = { path = "../../alloy-rs/core/crates/syn-solidity" }
  
  ## alloy
  # alloy-consensus = { git = "https://github.com/alloy-rs/alloy", rev = "7fab7ee" }
  # alloy-contract = { git = "https://github.com/alloy-rs/alloy", rev = "7fab7ee" }
  # alloy-eips = { git = "https://github.com/alloy-rs/alloy", rev = "7fab7ee" }
  # alloy-ens = { git = "https://github.com/alloy-rs/alloy", rev = "7fab7ee" }
  # alloy-genesis = { git = "https://github.com/alloy-rs/alloy", rev = "7fab7ee" }
  # alloy-json-rpc = { git = "https://github.com/alloy-rs/alloy", rev = "7fab7ee" }
  # alloy-network = { git = "https://github.com/alloy-rs/alloy", rev = "7fab7ee" }
  # alloy-network-primitives = { git = "https://github.com/alloy-rs/alloy", rev = "7fab7ee" }
  # alloy-provider = { git = "https://github.com/alloy-rs/alloy", rev = "7fab7ee" }
  # alloy-pubsub = { git = "https://github.com/alloy-rs/alloy", rev = "7fab7ee" }
  # alloy-rpc-client = { git = "https://github.com/alloy-rs/alloy", rev = "7fab7ee" }
  # alloy-rpc-types = { git = "https://github.com/alloy-rs/alloy", rev = "7fab7ee" }
  # alloy-rpc-types-eth = { git = "https://github.com/alloy-rs/alloy", rev = "7fab7ee" }
  # alloy-rpc-types-trace = { git = "https://github.com/alloy-rs/alloy", rev = "7fab7ee" }
  # alloy-serde = { git = "https://github.com/alloy-rs/alloy", rev = "7fab7ee" }
  # alloy-signer = { git = "https://github.com/alloy-rs/alloy", rev = "7fab7ee" }
  # alloy-signer-aws = { git = "https://github.com/alloy-rs/alloy", rev = "7fab7ee" }
  # alloy-signer-gcp = { git = "https://github.com/alloy-rs/alloy", rev = "7fab7ee" }
  # alloy-signer-ledger = { git = "https://github.com/alloy-rs/alloy", rev = "7fab7ee" }
  # alloy-signer-local = { git = "https://github.com/alloy-rs/alloy", rev = "7fab7ee" }
  # alloy-signer-trezor = { git = "https://github.com/alloy-rs/alloy", rev = "7fab7ee" }
  # alloy-transport = { git = "https://github.com/alloy-rs/alloy", rev = "7fab7ee" }
  # alloy-transport-http = { git = "https://github.com/alloy-rs/alloy", rev = "7fab7ee" }
  # alloy-transport-ipc = { git = "https://github.com/alloy-rs/alloy", rev = "7fab7ee" }
  # alloy-transport-ws = { git = "https://github.com/alloy-rs/alloy", rev = "7fab7ee" }
  
  ## alloy-evm
  # alloy-evm = { git = "https://github.com/alloy-rs/evm.git", rev = "3c6cebb" }
  # alloy-op-evm = { git = "https://github.com/alloy-rs/evm.git", rev = "3c6cebb" }
  
  ## revm
  # revm = { git = "https://github.com/bluealloy/revm.git", rev = "d9cda3a" }
  # op-revm = { git = "https://github.com/bluealloy/revm.git", rev = "d9cda3a" }
  # revm-inspectors = { git = "https://github.com/zerosnacks/revm-inspectors.git", rev = "74e215d" }
  
  ## foundry
  # foundry-block-explorers = { git = "https://github.com/foundry-rs/block-explorers.git", rev = "f5b46b2" }
  # foundry-compilers = { git = "https://github.com/foundry-rs/compilers.git", rev = "e4a9b04" }
  # foundry-fork-db = { git = "https://github.com/foundry-rs/foundry-fork-db", rev = "eee6563" }
  
  # solar
  # solar = { package = "solar-compiler", git = "https://github.com/paradigmxyz/solar.git", branch = "main" }
  
  # NOTE(zk): The following patches are to handle sha2@0.10.9 update. Add addtitional patches here as needed in future.
  # The patches need to be only applied once per zk_evm version, and can be cherry-picked on the latest in-use release.
  # See https://github.com/Moonsong-Labs/zksync-protocol/commit/5b5ba7fe13d6df186dc476aec99e1ee6f9299bff
  zksync_vm2 = { git = "https://github.com/Moonsong-Labs/vm2", branch = "chore/upgrade-sha2-deps"}
  zk_evm_1_4_1 = { git = "https://github.com/Moonsong-Labs/zksync-protocol", package = "zk_evm", branch = "chore/upgrade-sha-deps-141"}
  zk_evm_1_5_1 = { git = "https://github.com/Moonsong-Labs/zksync-protocol", package = "zk_evm", branch = "chore/upgrade-sha-deps-1518"}
  zk_evm_1_5_2 = { git = "https://github.com/Moonsong-Labs/zksync-protocol", package = "zk_evm", branch = "sha2-v0.152.3"}
  