# Overview

***

[Foundry ZKsync](https://github.com/matter-labs/foundry-zksync) is a specialized fork of [Foundry](https://github.com/foundry-rs/foundry), tailored for ZKsync.

It extends Foundry's capabilities for Ethereum app development to support ZKsync, allowing for the compilation, deployment, testing, and interaction with smart contracts on ZKsync.

This section covers everything from installation to migration, ensuring that you’re equipped to begin using Foundry ZKsync effectively and efficiently. For a more in-depth review of Foundry ZKsync please refer to the [Foundry ZKsync book on zksync.io](https://foundry-book.zksync.io/).

[Installation](/docs/tooling/foundary/installation.md)

Set up your development environment with Foundry and ZKsync, ensuring you're ready to start building and testing your projects.

***

[Getting Started](/docs/tooling/foundary/getting-started.md)

Dive into the basics with a simple project setup, including running tests and deploying contracts on ZKsync.

***

[Migration Guide](/docs/tooling/foundary/migration-guide.md)

Step-by-step guide to migrating your existing projects to ZKsync using Foundry.

***

[Testing](/docs/test-and-debug/foundry.md)

Learn best practices for testing your contracts with Foundry ZKsync

#### Status and Contribution <a href="#status-and-contribution" id="status-and-contribution"></a>

Foundry ZKsync is currently in its **alpha stage**, indicating ongoing development and potential for future enhancements. It is open-sourced, and contributions from the developer community are welcome. For more details and contributions, visit the [GitHub repository](https://github.com/matter-labs/foundry-zksync).

### Using Foundry with ZKsync <a href="#using-foundry-with-zksync" id="using-foundry-with-zksync"></a>

To work with ZKsync, you only need to make a few minor adjustments to your existing Foundry workflow. These changes ensure your smart contracts are fully compatible with ZKsync's zkEVM and reserved address space.

#### Differences <a href="#differences" id="differences"></a>

1. **Compilation**:
   * Contracts are compiled using both `solc` and `zksolc`. Foundry ZKsync manages this automatically, but you should ensure the correct compiler versions are specified in your configuration (`foundry.toml`).
2. **Reserved Addresses**:
   * ZKsync reserves addresses below `65536` for internal use. Ensure that any addresses you hardcode or use in tests are above this range.
   * You can configure fuzz testing to avoid generating reserved addresses using the `no_zksync_reserved_addresses` option.
3. **Fuzz Testing**:
   * Fuzz tests can be configured to respect ZKsync's reserved address range. You can use the `no_zksync_reserved_addresses = true` option in your test configuration to avoid manual filtering of invalid addresses.
4. **Running Tests on ZKsync**:
   * To target ZKsync in your tests, you can enable ZKsync-specific behaviors by adding `--zksync` to your `forge` commands or using `vm.zkVm(true)` in your test setup.

Foundry ZKsync simplifies developing and testing smart contracts on ZKsync with minimal changes to your workflow. With the installation and migration guides, you’ll be able to start building quickly while benefiting from ZKsync's scalability.

For more details or to get started, check out the [Installation Guide](/docs/tooling/foundary/installation.md) or dive into the [Getting Started](/docs/tooling/foundary/getting-started.md) section.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://validium.gitbook.io/docs/tooling/foundary/overview.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
