Skip to content

Commit

Permalink
feat: add tooling docs for hardhat and foundry (#15)
Browse files Browse the repository at this point in the history
# What 💻 
* Add doc sections for Hardhat and Foundry
  • Loading branch information
itsacoyote authored Apr 16, 2024
1 parent 89e025e commit c583f87
Show file tree
Hide file tree
Showing 27 changed files with 4,068 additions and 28 deletions.
28 changes: 28 additions & 0 deletions .vscode/snippets.code-snippets
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,38 @@
// ],
// "description": "Log output to console"
// }
"ZK Snippet": {
"scope": "markdown",
"prefix": "@zk",
"body": ["%%zk_$1%%$0"],
},
"External Link": {
"scope": "markdown",
"prefix": "@exlink",
"body": [":external-link{text=\"$1\" href=\"$2\"}$0"],
"description": "External link component",
},
"Callout": {
"scope": "markdown",
"prefix": "@callout",
"body": ["::callout{icon=\"$1\" color=\"$2\"}", "$0", "::"],
"description": "Callout component",
},
"AlertCallout": {
"scope": "markdown",
"prefix": "@alert",
"body": ["::callout{icon=\"i-heroicons-exclamation-triangle\" color=\"amber\"}", "$0", "::"],
"description": "Callout component",
},
"InfoCallout": {
"scope": "markdown",
"prefix": "@info",
"body": ["::callout{icon=\"i-heroicons-information-circle\" color=\"blue\"}", "$0", "::"],
"description": "Callout component",
},
"CodeGroup": {
"scope": "markdown",
"prefix": "@codegroup",
"body": ["::code-group", "", "```bash [yarn]", "", "```", "", "```bash [npm]", "", "```", "", "::"],
},
}
8 changes: 4 additions & 4 deletions content/40.tooling/00.zksync-block-explorers.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@ title: Block Explorers
description: Learn about the official and 3rd party resources for exploring the zkSync Era network.
---

The :external-link{text="zkSync Era Block Explorer" href="https://explorer.zksync.io/"}
The :external-link{text="zkSync Era Block Explorer" href="%%zk_mainnet_block_explorer_url%%"}
details comprehensive data about transactions, blocks, batches, wallets, tokens, and smart contracts on the zkSync Era network.

## Block Explorer API

We’ve developed the zkSync Era Block Explorer API for developers to access zkSync Era Block Explorer data directly via HTTP requests.

- :external-link{text="Mainnet Block Explorer API" href="https://block-explorer-api.mainnet.zksync.io/docs"}
- :external-link{text="Testnet Block Explorer API" href="https://block-explorer-api.sepolia.zksync.dev/docs"}
- :external-link{text="Mainnet Block Explorer API" href="%%zk_mainnet_block_explorer_url%%/docs"}
- :external-link{text="Testnet Block Explorer API" href="%%zk_testnet_block_explorer_url%%/docs"}

The API provides various endpoints for many use cases you might want in your app.
It is compatible with :external-link{text="Etherscan API" href="https://docs.etherscan.io/"},
which makes it easy to transition your existing apps to zkSync Era network.

Feel free to contribute and create issues and feature requests in :external-link{text="zkSync Era Block Explorer GitHub repo" href="https://github.com/matter-labs/block-explorer"}.
Feel free to contribute and create issues and feature requests in :external-link{text="zkSync Era Block Explorer GitHub repo" href="%%zk_git_repo_block-explorer%%"}.

## Other block explorers

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Overview
title: Getting Started
description: Learn how to use the powerful zkSync CLI tool for local development.
---

Expand Down Expand Up @@ -41,11 +41,11 @@ npm update -g zksync-cli

## Further Assistance

Need help? Join our :external-link{text="GitHub Discussions" href="https://github.com/zkSync-Community-Hub/zksync-developers/discussions/"}
Need help? Join our :external-link{text="GitHub Discussions" href="%%zk_git_repo_zksync-developers%%/discussions/"}
to ask questions, share your experiences, and connect with the zkSync community.

## Source Code

The :external-link{text="zkSync CLI project" href="https://github.com/matter-labs/zksync-cli"}
The :external-link{text="zkSync CLI project" href="%%zk_git_repo_zksync-cli"}
is open-source and available on GitHub under the MIT License.
Feel free to contribute, report issues, or suggest new features to help us improve the tool for everyone.
10 changes: 9 additions & 1 deletion content/40.tooling/10.zksync-cli/01.troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Encountering issues with zkSync CLI? Here are some common problems and step-by-s
If you try to use the `zksync-cli` command and receive the `command not found` message, double check if you
have the package installed locally or were using the `npx zksync-cli` command.

---

## `unknown command` Error

If you encounter an `unknown command` error, follow these steps:
Expand Down Expand Up @@ -41,20 +43,26 @@ e. **Use the Latest Version**

- As a quick fix, or if the above steps don't resolve the issue, use `npx zksync-cli@latest [command]`, for example, `npx zksync-cli@latest dev start`.

---

## My version is outdated

If `zksync-cli` is not running the latest version:

- Refer to the [instructions for `unknown command` Error](/tooling/zksync-cli/troubleshooting#unknown-command-error)
above to check and update your zkSync CLI version.

---

## `command not found: npx` Error

If you receive a `command not found: npx` error, it means Node.js is not installed or not correctly set up on your system:

- Install Node.js from :external-link{text="the official website" href="https://nodejs.org/"}. This will also install `npm` and `npx`.
- After installation, restart your terminal and try running `npx zksync-cli` again.

---

## Other issues

For all other issues, we encourage you to seek help or report them in our :external-link{text="GitHub Discussions" href="https://github.com/zkSync-Community-Hub/zksync-developers/discussions/new?category=general&title=[zksync-cli]%20<Title>"}.
For all other issues, we encourage you to seek help or report them in our :external-link{text="GitHub Discussions" href="%%zk_git_repo_zksync-developers%%/discussions/new?category=general&title=[zksync-cli]%20<Title>"}.
2 changes: 1 addition & 1 deletion content/40.tooling/10.zksync-cli/10.zksync-cli-dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ If modules malfunction, e.g., failing to start:
1. Use `zksync-cli dev stop` to cease all operations.
2. Reinstall the problematic module with `zksync-cli dev clean [module name]`.
3. Restart with `zksync-cli dev start`. Check Docker container logs for detailed errors, accessible through Docker Desktop.
4. Persisting issues? Please report them in our :external-link{text="GitHub discussions" href="https://github.com/zkSync-Community-Hub/zksync-developers/discussions/new?category=general&title=[zksync-cli]%20<Title>"}.
4. Persisting issues? Please report them in our :external-link{text="GitHub discussions" href="%%zk_git_repo_zksync-developers%%/discussions/new?category=general&title=[zksync-cli]%20<Title>"}.
6 changes: 3 additions & 3 deletions content/40.tooling/10.zksync-cli/20.zksync-cli-create.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,21 @@ Ensure you have the following installed before you start:
Fast-track your UI development with our frontend templates, supporting popular frameworks like Vue, React, Next.js, Nuxt, and Vite.
Options include viem, ethers, web3modal, rainbowkit, and more, equipping you with the necessary tools for dApp development.

:external-link{text="zksync-frontend-templates repo" href="https://github.com/matter-labs/zksync-frontend-templates#readme"}
:external-link{text="zksync-frontend-templates repo" href="%%zk_git_repo_zksync-frontend-templates#readme"}

### Contracts

For smart contract development, choose from templates designed for quick deployment and testing, compatible with Solidity or Vyper.
Utilize tools like Hardhat to streamline your workflow.

:external-link{text="zksync-contract-templates repo" href="https://github.com/matter-labs/zksync-contract-templates#readme"}
:external-link{text="zksync-contract-templates repo" href="%%zk_git_repo_zksync-contract-templates%%#readme"}

### Scripting

Enhance your project with Node.js scripting templates for automated interactions and advanced zkSync operations.
Includes examples of wallet or contract interactions using viem, ethers, or web3.js.

:external-link{text="zksync-scripting-templates repo" href="https://github.com/matter-labs/zksync-scripting-templates#readme"}
:external-link{text="zksync-scripting-templates repo" href="%%zk_git_repo_zksync-scripting-templates%%#readme"}

## Using Templates

Expand Down
Loading

0 comments on commit c583f87

Please sign in to comment.