Skip to content

Commit

Permalink
chore: edits
Browse files Browse the repository at this point in the history
  • Loading branch information
itsacoyote committed Apr 18, 2024
1 parent f2b6d36 commit 00af8bd
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 45 deletions.
2 changes: 1 addition & 1 deletion content/40.tooling/20.hardhat/10.getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ To learn more about Hardhat itself, check out :external-link{text="the official
This tutorial shows you how to setup a zkSync Era Solidity project with Hardhat using the [zkSync CLI](/tooling/zksync-cli).

If you are using Vyper, check out the [Vyper plugin documentation](./hardhat-zksync-vyper)
or the [vyper-example](https://github.com/matter-labs/hardhat-zksync/tree/main/examples/vyper-example) in GitHub!
or the [vyper-example](%%zk_git_repo_hardhat-zksync%%/tree/main/examples/vyper-example) in GitHub!

## Prerequisites

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ On the other hand, we are working on removing this limitation
and we want to encourage you to give us your feedback on the plugin's functionalities, usability or possible improvements.
Please start or engage in the discussion about it
in our :external-link{text="Community Hub" href="%%zk_git_repo_zksync-developers%%/discussions"},
or open a Github issue in the :external-link{text="project's repository" href="https://github.com/matter-labs/hardhat-zksync/issues"}.
or open a Github issue in the :external-link{text="project's repository" href="%%zk_git_repo_hardhat-zksync%%/issues"}.
::

::callout{icon="i-heroicons-exclamation-triangle" color="amber"}
Expand Down
51 changes: 16 additions & 35 deletions content/60.test-and-debug/20.in-memory-node.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ It covers installation, network forking, transaction details viewing, replaying
::callout{icon="i-heroicons-information-circle-16-solid" color="amber"}
Please keep in mind that `era-test-node` is still in its **alpha** stage,
some features might not be fully supported yet and may not work as fully intended.
It is [open-sourced](https://github.com/matter-labs/era-test-node) and contributions are welcomed.
It is :external-link{text="open-sourced" href="%%zk_git_repo_era-test-node%%"} and contributions are welcomed.
::

## Understand the In-Memory Node
Expand All @@ -19,7 +19,7 @@ The In-Memory Node uses an in-memory database for storing state information and
In fork mode, it retrieves missing storage data from a remote source when not available locally.
Moreover it also uses the remote server (openchain) to resolve the ABI and topics to human readable names.

You can visit the `era-test-node` repository :external-link{text="to learn more" href="https://github.com/matter-labs/era-test-node"}.
You can visit the `era-test-node` repository :external-link{text="to learn more" href="%%zk_git_repo_era-test-node%%"}.

## Run actions with `zksync-cli`

Expand All @@ -30,7 +30,7 @@ Note: at the moment this method won't allow you to use additional features like

## Install and set up `era_test_node`

1. Download `era_test_node` from latest :external-link{text="Release" href="https://github.com/matter-labs/era-test-node/releases/latest"}.
1. Download `era_test_node` from latest :external-link{text="Release" href="%%zk_git_repo_era-test-node%%/releases/latest"}.

1. Extract the binary and mark as executable:

Expand Down Expand Up @@ -178,9 +178,8 @@ Here's an example of what you should expect to see when `show-calls` and `resolv
::drop-panel
::panel{label="Expected output"}

<!-- TODO: is it sepolia.era.zksync.dev? or testnet.era.zksync.dev -->
```sh
Creating fork from "https://sepolia.era.zksync.dev:443" L1 block: L1BatchNumber(4513) L2 block: 14945 with timestamp 1703064786, L1 gas price 61083275326 and protocol version: Some(Version19)
Creating fork from "%%zk_testnet_rpc_url%%:443" L1 block: L1BatchNumber(4513) L2 block: 14945 with timestamp 1703064786, L1 gas price 61083275326 and protocol version: Some(Version19)
Starting network with chain id: L2ChainId(300)
Running 1 transactions (one per batch)

Expand Down Expand Up @@ -241,8 +240,7 @@ Here's an example of what you should expect to see when `show-calls` and `resolv
## Send network calls

You can send network calls against a running `era_test_node`.
<!-- Why is there a LINK? Also is USDT still the proper code? -->
You can check the Sepolia testnet LINK balance or mainnet USDT using `curl` or :external-link{text="foundry-zksync" href="https://github.com/matter-labs/foundry-zksync"}.
You can check the Sepolia testnet balance of `LINK` or mainnet USDT using `curl` or :external-link{text="foundry-zksync" href="%%zk_git_repo_foundry-zksync%%"}.

Launch the local in-memory node:

Expand Down Expand Up @@ -280,14 +278,14 @@ Launch the local in-memory node:
```
::

- Use :external-link{text="foundry-zksync" href="https://github.com/matter-labs/foundry-zksync"}.
- Use :external-link{text="foundry-zksync" href="%%zk_git_repo_foundry-zksync%%"}.
Make sure to install and configure `foundry-zksync` before proceeding
(for installation instructions, please see :external-link{text="Foundry with zkSync Era" href="https://github.com/matter-labs/foundry-zksync/tree/main#foundry-with-zksync-era-v01"}):
(for installation instructions, please see :external-link{text="Foundry with zkSync Era" href="%%zk_git_repo_foundry-zksync%%?tab=readme-ov-file#-installation"}):

::code-group

```bash [foundry-zksync]
zkcast call 0xe1134444211593Cfda9fc9eCc7B43208615556E2 \
cast call 0xe1134444211593Cfda9fc9eCc7B43208615556E2 \
"name()(string)" \
--rpc-url http://localhost:8011
```
Expand All @@ -303,7 +301,7 @@ Launch the local in-memory node:
::code-group

```bash [foundry-zksync]
zkcast call 0x40609141Db628BeEE3BfAB8034Fc2D8278D0Cc78 \
cast call 0x40609141Db628BeEE3BfAB8034Fc2D8278D0Cc78 \
"balanceOf(address)(uint256)" \
0x40609141Db628BeEE3BfAB8034Fc2D8278D0Cc78 \
--rpc-url http://localhost:8011
Expand All @@ -320,36 +318,20 @@ Launch the local in-memory node:
## Deploy contracts

For the deployment of your contracts, you have the flexibility to choose between two preferred methods:
either by using Hardhat with the `hardhat-zksync-deploy` and `hardhat-zksync-solc` plugins, or via `foundry-zksync`.
either by using Hardhat with the `@matter-labs/hardhat-zksync` plugin, or via `foundry-zksync`.
The following example will detail the process using `foundry-zksync`.

<!-- TODO: is zkforge still a command? -->
Before proceeding, ensure that you've compiled your contracts using `zkforge zk-build`.
For instructions on how to do this, please refer to :external-link{text="Compile with zkforge-zk-build" href="https://github.com/matter-labs/foundry-zksync?tab=readme-ov-file#compiling-contracts"}.
::code-group
Before proceeding, ensure that you've compiled your contracts using `forge build --zksync`.
```bash [foundry-zksync]
zkforge zkc contracts/Greeter.sol:Greeter \
forge create zkc contracts/Greeter.sol:Greeter \
--constructor-args "ZkSync and Foundry" \
--private-key 7726827caac94a7f9e1b160f7ea819f172f7b6f9d2a97f992c38edeab82d4110 \
--rpc-url http://localhost:8011 \
--chain 260
```
```bash [expected output]
Deploying contract...
+-------------------------------------------------+
Contract successfully deployed to address: 0x0a40ecde17dc16c4001bf0e4f5d5ff1818219b3b
Transaction Hash: 0x9d59bea38ca6f3cef365c23f339547bcc8ce28abb8344999ffffa5fa62c9ff8e
Gas used: 2570407
Effective gas price: 500
Block Number: 8072361
+-------------------------------------------------+
--chain 260 \
--zksync
```
::
---
## Test bootloader and system contracts
Expand Down Expand Up @@ -425,8 +407,7 @@ Ensure `era_test_node` is running in another process before executing the test c
::
```typescript [hardhat.config.ts]
import "@matterlabs/hardhat-zksync-deploy";
import "@matterlabs/hardhat-zksync-solc";
import "@matterlabs/hardhat-zksync";
module.exports = {
zksolc: {
Expand Down Expand Up @@ -458,7 +439,7 @@ Construct a `test/main.test.ts` file with the following code:
import { expect } from "chai";
import { Wallet, Provider, Contract } from "zksync-ethers";
import * as hre from "hardhat";
import { Deployer } from "@matterlabs/hardhat-zksync-deploy";
import { Deployer } from "@matterlabs/hardhat-zksync";
const RICH_WALLET_PK = "0x7726827caac94a7f9e1b160f7ea819f172f7b6f9d2a97f992c38edeab82d4110";
Expand Down
2 changes: 1 addition & 1 deletion content/60.test-and-debug/50.foundry.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ For more detailed documentation related to Foundry testing please refer to the o

Cheatcodes allow you to change the block number, your identity, and more.
`foundry-zksync` supports the most common Foundry cheatcodes.
For an exhaustive list of supported cheatcodes refer to the :external-link{text="Supported Cheatcodes for Foundry-zksync" href="https://github.com/matter-labs/foundry-zksync/blob/main/SUPPORTED_CHEATCODES.md"}.
For an exhaustive list of supported cheatcodes refer to the :external-link{text="Supported Cheatcodes for Foundry-zksync" href="%%zk_git_repo_foundry-zksync%%/blob/main/SUPPORTED_CHEATCODES.md"}.

---
## Writing Tests
Expand Down
2 changes: 1 addition & 1 deletion content/70.api-reference/20.zks-rpc.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ None

```sh
curl --request POST \
--url https://sepolia.era.zksync.dev \
--url %%zk_testnet_rpc_url%% \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
Expand Down
4 changes: 2 additions & 2 deletions content/90.contributing-to-documentation/10.index.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ For minor edits, use the "Edit this page" link found on pages within the Table o
To suggest changes without directly editing, submit a GitHub issue via the "Share feedback" link,
also located in the Table of Contents sidebar.

The best way to contribute is by [forking the zkSync-docs repo](https://github.com/matter-labs/zksync-docs/fork),
The best way to contribute is by [forking the zkSync-docs repo](%%zk_git_repo_zksync-docs%%/fork),
making changes in a branch, and then submitting a PR.
To start, follow the README in the project repo and read the [Contribution Guidelines](/contributing-to-documentation/contribution-guidelines)
to familiarize yourself with the project structure and the documentation editing workflow.

### Write New Content

For the best experience in creating new content, [fork our zkSync-docs project](https://github.com/matter-labs/zksync-docs/fork)
For the best experience in creating new content, [fork our zkSync-docs project](%%zk_git_repo_zksync-docs%%/fork)
and set up a local project on your machine. If you are unfamiliar with the forking workflow, you can learn more about it
from [GitHub's articles on Forking](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/about-forks).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ description: Learn how to contribute to zkSync Docs

## Contribution workflow

To set up and run the project locally, consult the root [`README.md`](https://github.com/matter-labs/zksync-docs) file.
To set up and run the project locally, consult the root [`README.md`](%%zk_git_repo_zksync-docs%%) file.

### Tracking work

Start your work by creating an :external-link{text="issue" href="https://github.com/matter-labs/zksync-docs/issues"}
Start your work by creating an :external-link{text="issue" href="%%zk_git_repo_zksync-docs%%/issues"}
in the repo to prevent overlap and keep track of contributions.
Use the `[DOC]` tag for content edits or `[BUG]` for fixes.
Connect your PR to the created issue following the :external-link{text="GitHub guide on linking" href="https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue"}.
Expand Down
2 changes: 0 additions & 2 deletions content/_partials/_rich-wallets.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ title: Rich Wallets
github: https://github.com/matter-labs/local-setup/blob/main/rich-wallets.json
---

<!-- TODO: is this still up to date? -->

- **Address:** `0x36615Cf349d7F6344891B1e7CA7C72883F5dc049`

**Private Key:** `0x7726827caac94a7f9e1b160f7ea819f172f7b6f9d2a97f992c38edeab82d4110`
Expand Down
1 change: 1 addition & 0 deletions content/_zksync.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"zksync-cli": "https://github.com/matter-labs/zksync-cli",
"zksync-contract-templates": "https://github.com/matter-labs/zksync-contract-templates",
"zksync-developers": "https://github.com/zkSync-Community-Hub/zksync-developers",
"zksync-docs": "https://github.com/matter-labs/zksync-docs",
"zksync-frontend-templates": "https://github.com/matter-labs/zksync-frontend-templates",
"zksync-scripting-templates": "https://github.com/matter-labs/zksync-scripting-templates",
"zkvyper-bin": "https://github.com/matter-labs/zkvyper-bin"
Expand Down

0 comments on commit 00af8bd

Please sign in to comment.