From 00af8bda7ebc9e7b3f8f634da3e547101b566b24 Mon Sep 17 00:00:00 2001 From: Sabrina Ferguson Date: Thu, 18 Apr 2024 09:50:49 -0400 Subject: [PATCH] chore: edits --- .../20.hardhat/10.getting-started.md | 2 +- .../90.hardhat-zksync-verify-vyper.md | 2 +- .../60.test-and-debug/20.in-memory-node.md | 51 ++++++------------- content/60.test-and-debug/50.foundry.md | 2 +- content/70.api-reference/20.zks-rpc.md | 2 +- .../10.index.md | 4 +- .../20.contribution-guidelines.md | 4 +- content/_partials/_rich-wallets.md | 2 - content/_zksync.json | 1 + 9 files changed, 25 insertions(+), 45 deletions(-) diff --git a/content/40.tooling/20.hardhat/10.getting-started.md b/content/40.tooling/20.hardhat/10.getting-started.md index c69b3321..b3c5ed32 100644 --- a/content/40.tooling/20.hardhat/10.getting-started.md +++ b/content/40.tooling/20.hardhat/10.getting-started.md @@ -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 diff --git a/content/40.tooling/20.hardhat/90.hardhat-zksync-verify-vyper.md b/content/40.tooling/20.hardhat/90.hardhat-zksync-verify-vyper.md index 6de87aaa..c3696fa4 100644 --- a/content/40.tooling/20.hardhat/90.hardhat-zksync-verify-vyper.md +++ b/content/40.tooling/20.hardhat/90.hardhat-zksync-verify-vyper.md @@ -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"} diff --git a/content/60.test-and-debug/20.in-memory-node.md b/content/60.test-and-debug/20.in-memory-node.md index b217a656..64bba310 100644 --- a/content/60.test-and-debug/20.in-memory-node.md +++ b/content/60.test-and-debug/20.in-memory-node.md @@ -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 @@ -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` @@ -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: @@ -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"} - ```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) @@ -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`. - -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: @@ -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 ``` @@ -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 @@ -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`. - -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 @@ -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: { @@ -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"; diff --git a/content/60.test-and-debug/50.foundry.md b/content/60.test-and-debug/50.foundry.md index 3515ce81..f4ab1a43 100644 --- a/content/60.test-and-debug/50.foundry.md +++ b/content/60.test-and-debug/50.foundry.md @@ -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 diff --git a/content/70.api-reference/20.zks-rpc.md b/content/70.api-reference/20.zks-rpc.md index 7b26da6f..e0b6fead 100644 --- a/content/70.api-reference/20.zks-rpc.md +++ b/content/70.api-reference/20.zks-rpc.md @@ -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", diff --git a/content/90.contributing-to-documentation/10.index.md b/content/90.contributing-to-documentation/10.index.md index 15d8043c..0b666754 100644 --- a/content/90.contributing-to-documentation/10.index.md +++ b/content/90.contributing-to-documentation/10.index.md @@ -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). diff --git a/content/90.contributing-to-documentation/20.contribution-guidelines.md b/content/90.contributing-to-documentation/20.contribution-guidelines.md index b83f0426..e99cabb9 100644 --- a/content/90.contributing-to-documentation/20.contribution-guidelines.md +++ b/content/90.contributing-to-documentation/20.contribution-guidelines.md @@ -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"}. diff --git a/content/_partials/_rich-wallets.md b/content/_partials/_rich-wallets.md index 9c10e5ba..99fc2fff 100644 --- a/content/_partials/_rich-wallets.md +++ b/content/_partials/_rich-wallets.md @@ -3,8 +3,6 @@ title: Rich Wallets github: https://github.com/matter-labs/local-setup/blob/main/rich-wallets.json --- - - - **Address:** `0x36615Cf349d7F6344891B1e7CA7C72883F5dc049` **Private Key:** `0x7726827caac94a7f9e1b160f7ea819f172f7b6f9d2a97f992c38edeab82d4110` diff --git a/content/_zksync.json b/content/_zksync.json index ef77d8b2..6b1ca563 100644 --- a/content/_zksync.json +++ b/content/_zksync.json @@ -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"