# L1 contracts interface

To interact with zkSync from L1, you need the interface of its canonical bridge. There are two main ways to import it to your codebase:

  • By importing it from the @matterlabs/zksync-contracts npm package. (preferred)
  • By downloading the contracts from the repo (opens new window).

The guide on interacting with the zkSync canonical bridge with examples in both Solidity and zksync-web3 SDK can be found here.

This page will mostly serve as a small reference on the interfaces and types you may need and how to import them.

# @matterlabs/zksync-contracts reference

  • @matterlabs/zksync-contracts/contracts/interfaces/IZkSync.sol is the file where the zkSync L1 contract interface IZkSync is located. Particular interest is in the IBridge functionality. Its implementation can be found here (opens new window).
- `@matterlabs/zksync-contracts/libraries/Operations.sol` is the file where the `Operations` library with all the user types in the bridge is stored. Its implementation can be found [here](https://github.com/matter-labs/v2-testnet-contracts/blob/main/libraries/Operations.sol).

-->

The code in the repository may contain some of the configuration constants. These are placeholder values taken from the development environment. You should use the library only for the interfaces and types it provides.

Last Updated: 9/12/2022, 12:16:32 PM