-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: update go documentation structure (#69)
* feat: update go documentation structure * fix: update links * fix: update links * fix: update url * fix: update types * fix: updated smartaccount * fix: update types * fix: update contracts description * chore: fix errors --------- Co-authored-by: danijelTxFusion <[email protected]>
- Loading branch information
1 parent
8c82292
commit 3926753
Showing
28 changed files
with
2,849 additions
and
2,650 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
title: Overview | ||
description: An introduction to `zksync2-go` | ||
tags: ["zksync", "zksync2-go", "ethereum", "layer-2", "zero-knowledge rollups", "go library", "blockchain scalability", "crypto transactions"] | ||
--- | ||
|
||
This guide will help you understand the fundamentals of `zksync2-go` and how to get started. | ||
|
||
## What is `zksync2-go`? | ||
`zksync2-go` is a Go library designed to interact with ZKsync, providing developers with the tools to integrate | ||
ZKsync functionality into their Go applications. It simplifies the development process, offering easy-to-use | ||
interfaces and comprehensive documentation. | ||
|
||
## Features of `zksync2-go` | ||
|
||
- **Scalability**: Leverages ZKsync's layer-2 technology to provide high transaction throughput. | ||
- **Cost Efficiency**: Reduces transaction fees compared to on-chain transactions. | ||
- **Security**: Ensures secure transactions through zero-knowledge proofs. | ||
- **Ease of Use**: Provides an intuitive API for seamless integration into Go applications. | ||
- **Interoperability**: Compatible with existing Ethereum tools and infrastructure. | ||
|
||
::callout{icon="i-heroicons-light-bulb"} | ||
To get started with `zksync2-go`, follow the [installation instructions](/sdk/go/introduction/installation) provided. | ||
:: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
--- | ||
title: Why zksync2-go | ||
description: Benefits and Advantages of using `zksync2-go` | ||
tags: ["zksync", "zksync2-go", "ethereum", "layer-2", "zero-knowledge rollups", "go library"] | ||
--- | ||
|
||
Choosing the right tools and libraries for your blockchain project is crucial. `zksync2-go` offers a robust and | ||
efficient solution for developers looking to leverage the benefits of ZKsync within their Go applications. | ||
|
||
## Key advantages of `zksync2-go` | ||
|
||
### 1. High performance and scalability | ||
|
||
- **Layer-2 scaling**: Using ZKsync's layer-2 technology, `zksync2-go` significantly increases transaction | ||
throughput, allowing your applications to handle more transactions per second. | ||
- **Reduced latency**: Transactions are processed off-chain and then batched together for on-chain validation, | ||
minimizing the delays associated with on-chain processing. | ||
|
||
### 2. Cost efficiency | ||
|
||
- **Lower fees**: Off-chain processing dramatically reduces transaction fees compared to traditional on-chain | ||
transactions, making it cost-effective for developers and users. | ||
- **Optimized resource usage**: Efficiently manages computational resources, reducing the overall cost of running | ||
blockchain applications. | ||
|
||
### 3. Security and reliability | ||
|
||
- **Zero-knowledge proofs**: Ensures transaction integrity and privacy through zero-knowledge proofs, providing high security. | ||
- **Trusted infrastructure**: Built on the reliable and proven ZKsync infrastructure, `zksync2-go` inherits its | ||
security features and robustness. | ||
|
||
### 4. Developer-friendly | ||
|
||
- **Easy integration**: Provides a straightforward API that simplifies the integration of ZKsync functionality into Go applications. | ||
- **Comprehensive documentation**: Offers detailed guides, examples, and API references to help developers start | ||
quickly and efficiently. | ||
- **Active Community and Support**: Benefit from an active community of developers and timely support from the | ||
maintainers of `zksync2-go`. | ||
|
||
### 5. Interoperability | ||
|
||
- **Ethereum Compatibility**: Fully compatible with existing Ethereum tools and infrastructure, ensuring seamless | ||
integration with other parts of the Ethereum ecosystem. | ||
- **Future-Proof**: Designed to stay up-to-date with the latest advancements in the ZKsync protocol and the broader | ||
blockchain landscape. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
title: Installation | ||
description: How to install and set up zksync2-go for your project. | ||
tags: ["zksync", "zksync2-go", "go", "sdk installation"] | ||
--- | ||
|
||
Follow the steps below to set up the SDK in your development environment. | ||
|
||
### Prerequisites | ||
|
||
- Go: >=1.17 ([installation guide](https://go.dev/dl/)) | ||
|
||
### Installation steps | ||
|
||
To install SDK for ZKsync Era, run the command below in your terminal. | ||
|
||
```shell | ||
go get github.com/zksync-sdk/zksync2-go | ||
``` | ||
|
||
This command will download and install the `zksync2-go` package and its dependencies into your Go workspace. | ||
|
||
### What next? | ||
|
||
After completing these steps, `zksync2-go` will be installed and ready to use in your Go projects. You can now proceed | ||
to integrate ZKsync functionalities into your applications by following the usage examples and API documentation. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
--- | ||
title: Introduction | ||
description: Overview of the Client component in the ZKsync Era | ||
tags: ["zksync", "client", "go", "sdk"] | ||
--- | ||
|
||
The `Client` is a critical component that enables interaction with the ZKsync Era. It serves as a wrapper around the | ||
ZKsync Era RPC API and supports `ethclient.Client` from the `geth` library, along with additional methods specific to | ||
ZKsync Era. | ||
|
||
::callout{icon="i-heroicons-information-circle" color="blue"} | ||
Since the `geth` library has the concept of a `Client`, not a `Provider`, the Go SDK for ZKsync Era also adopts the | ||
concept of a `Client`, as opposed to using a Provider like in other ZKsync Era SDKs. | ||
:: | ||
|
||
In code, the `Client` interface is composed of two main interfaces: | ||
|
||
### `EthereumClient` | ||
|
||
This interface provides Ethereum RPC methods on the ZKsync Era node, prefixed with `eth_`. It includes the same | ||
methods as `ethclient.Client` from the `geth` library, ensuring compatibility with existing Ethereum tools and | ||
workflows. Additionally, it has extra methods capable of handling EIP-712 transactions, which are essential for the | ||
unique features of the ZKsync Era. The `EthereumClient` interface is designed to be compatible with | ||
the `bind.ContractBackend` interface from `geth`, which enables support for smart contracts generated using | ||
the `abigen` tool. | ||
|
||
### `ZkSyncEraClient` | ||
|
||
This interface provides the API methods specific to ZKsync Era, prefixed with `zks_`. These methods facilitate the | ||
use of ZKsync Era’s unique features, such as account abstraction, custom fee systems, and other layer-2 | ||
functionalities. The `ZkSyncEraClient` interface ensures that developers can leverage all the capabilities of the | ||
ZKsync Era blockchain efficiently. | ||
|
||
::callout{icon="i-heroicons-light-bulb"} | ||
These interfaces are designed to make the SDK flexible and extensible. | ||
:: |
Oops, something went wrong.