Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: added some missing pages and update errors in zksync ethers v5 and v6 #64

Merged
merged 14 commits into from
Jul 3, 2024
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Getting Started
description: Explore zksync-ethers SDK version 6
description: Explore zksync-ethers SDK versions
tags: ["zksync", "sdks", "zksync Era SDK", "ethereum", "era network", "javascript", "v6"]
---

Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
title: Introduction
description: A guide to Web3 Provider objects for ZKsync integration
tags: ["zksync", "web3", "provider", "integration"]
---

A Web3Provider 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.

A Web3 Provider object allows applications to access underlying blockchain networks.

The [`zksync-ethers`](https://www.npmjs.com/package/zksync-ethers/v/5.0.0) library supports provider methods from
the [`ethers.js`](https://docs.ethers.io/v5/api/providers) library and adds extra functionality.

Two providers are available:

- [`Provider`](/sdk/js/ethers/api/v5/providers/web3provider): Functions
like [`ethers.providers.JsonRpcProvider`](https://docs.ethers.org/v5/api/providers/jsonrpc-provider/#JsonRpcProvider)
with added ZKsync-specific methods.
- [`Web3Provider`](/sdk/js/ethers/api/v5/providers/web3provider): Extends the ZKsync
Era [`Provider`](/sdk/js/ethers/api/v5/providers/provider) class for better compatibility with Web3 wallets.

::callout{icon="i-heroicons-light-bulb"}
Use the [`Web3Provider`](/sdk/js/ethers/api/v5/providers/web3provider) for browser integrations.
::

### `Provider`

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.

### `Web3Provider`

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.
Loading
Loading