Skip to content

Commit

Permalink
feat: added some missing pages and update errors in zksync ethers v5 …
Browse files Browse the repository at this point in the history
…and v6 (#64)

* feat: added some missing pages and update errors in zksync ethers

* chore: move eip712signer to a dedicated page

* chore: structure pages

* chore: update links

* chore: update intro

* chore: minor errors

* chore: minor update

* chore: minor changes

* chore: update description

* chore: fix error

* chore: fix error

* chore: fix error

* chore: fix errors

* chore: fix errors

---------

Co-authored-by: Danijel Radakovic <[email protected]>
Co-authored-by: danijelTxFusion <[email protected]>
  • Loading branch information
3 people authored and petarTxFusion committed Jul 8, 2024
1 parent 2c5fce8 commit 6c95468
Show file tree
Hide file tree
Showing 29 changed files with 2,435 additions and 732 deletions.
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,34 @@
---
title: Introduction
description: Provider objects for interacting with ZKsync.
tags: ["zksync", "ethereum", "zksync Era", "transactions", "provider"]
---

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`](https://www.npmjs.com/package/zksync-ethers/v/5.0.0) library supports providers 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

0 comments on commit 6c95468

Please sign in to comment.