Provider objects for interacting with ZKsync.

A Provider interacts with the blockchain network, allowing applications to send transactions, query data, and listen to events. Providers bridge the application and blockchain, ensuring smooth communication.

The zksync-ethers library supports providers from the ethers.js library and adds extra functionality.

Two providers are available:

Use the Web3Provider for browser integrations.


The Provider class in the zksync-ethers library extends the ethers.providers.JsonRpcProvider with additional ZKsync-specific methods. This lets users access advanced ZKsync features using the familiar ethers.js interface.


The Web3Provider class extends the ZKsync Era Provider class for better compatibility with Web3 wallets, making it ideal for browser-based integrations. This provider ensures seamless interaction with wallet extensions like MetaMask, allowing users to manage accounts and sign transactions directly from the browser.

Made with ❤️ by the ZKsync Community