Skip to content

Commit

Permalink
chore: update to staging
Browse files Browse the repository at this point in the history
  • Loading branch information
dutterbutter committed May 6, 2024
2 parents 68e91d6 + 0301283 commit 9ebadcc
Show file tree
Hide file tree
Showing 156 changed files with 2,571 additions and 659 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ assignees: ''

---

### 🐛 Bug Report for zkSync Docs
### 🐛 Bug Report for ZKsync Docs

#### 📝 Description

Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
blank_issues_enabled: true
contact_links:
- name: zksync-developers Discussion
url: https://github.com/zkSync-Community-Hub/zkync-developers/discussions
url: https://github.com/ZKsync-Community-Hub/zkync-developers/discussions
about: Please provide feedback, and ask questions here.
11 changes: 0 additions & 11 deletions .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,6 @@ jobs:
projectId: zksync-docs
channelId: live

# TODO: re-enable once we are closer to production deployment
# - name: Purge cf cache
# uses: nathanvaughn/actions-cloudflare-purge@db8c58f61ba4c3ec77229c8fa14ddebb3b59932f # v3.1.0
# with:
# cf_zone: ${{ secrets.CLOUDFLARE_ZONE }}
# cf_auth: ${{ secrets.CLOUDFLARE_AUTH_KEY }}
# hosts: |
# docs.zksync.io
# era.zksync.io
# v2-docs.zksync.io

# TODO: Implement reindex task tracking instead of blindly exiting on task submit
# - name: Trigger Algolia reindex
# run: |
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ZK Sync Docs

Welcome to the ZK Sync Docs repository. This project serves as the community hub for zkSync, providing comprehensive
documentation for developers. Whether you're a beginner looking to get started with zkSync or an experienced developer
Welcome to the ZK Sync Docs repository. This project serves as the community hub for ZKsync, providing comprehensive
documentation for developers. Whether you're a beginner looking to get started with ZKsync or an experienced developer
seeking advanced guides, you'll find the resources you need here.

## Tools used
Expand Down Expand Up @@ -62,9 +62,9 @@ bun run lint:eslint

## Contributions

We welcome contributions from the community to zkSync Docs.
We welcome contributions from the community to ZKsync Docs.
If you're looking for ideas on where to start with contributing, check out the [Contribution Overview](./content/90.contributing-to-documentation/10.index.md).
To learn more on how to follow best practices when contributing to zkSync Docs,
To learn more on how to follow best practices when contributing to ZKsync Docs,
refer to the [Contribution Guidelines](./content/90.contributing-to-documentation/20.contribution-guidelines.md).
If you are writing new content to add to the docs, the [Documentation Styleguide](./content/90.contributing-to-documentation/30.documentation-styleguide.md)
can provide additional guidance.
14 changes: 7 additions & 7 deletions app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export default defineAppConfig({
},
},
seo: {
siteName: 'zkSync Docs',
siteName: 'ZKsync Docs',
},
header: {
logo: {
Expand All @@ -62,8 +62,8 @@ export default defineAppConfig({
icon: 'i-simple-icons-github',
to: 'https://github.com/matter-labs/zksync-docs',
target: '_blank',
'aria-label': 'zkSync Docs on GitHub',
title: 'zkSync Docs on GitHub',
'aria-label': 'ZKsync Docs on GitHub',
title: 'ZKsync Docs on GitHub',
},
],
},
Expand All @@ -81,19 +81,19 @@ export default defineAppConfig({
icon: 'i-simple-icons-x',
to: 'https://x.com/zksync',
target: '_blank',
'aria-label': 'zkSync on X',
'aria-label': 'ZKsync on X',
},
{
icon: 'i-simple-icons-github',
to: 'https://github.com/matter-labs',
target: '_blank',
'aria-label': 'zkSync on GitHub',
'aria-label': 'ZKsync on GitHub',
},
{
icon: 'i-simple-icons-discord',
to: 'https://join.zksync.dev/',
target: '_blank',
'aria-label': 'zkSync on Discord',
'aria-label': 'ZKsync on Discord',
},
],
},
Expand All @@ -113,7 +113,7 @@ export default defineAppConfig({
{
icon: 'i-heroicons-user-group-20-solid',
label: 'Developer Forum',
to: 'https://github.com/zkSync-Community-Hub/zkync-developers/discussions',
to: 'https://github.com/ZKsync-Community-Hub/zkync-developers/discussions',
target: '_blank',
},
],
Expand Down
19 changes: 14 additions & 5 deletions app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ useHead({
{
name: 'keywords',
content:
'Documentation, Developers, Era, zkSync, ZK Stack, Matter Labs, rollup, ZK rollup, zero confirmation, ZKP, zero-knowledge proofs, Ethereum, crypto, blockchain, permissionless, L2, secure payments, scalable',
'Documentation, Developers, Era, ZKsync, ZK Stack, Matter Labs, rollup, ZK rollup, zero confirmation, ZKP, zero-knowledge proofs, Ethereum, crypto, blockchain, permissionless, L2, secure payments, scalable',
},
{
name: 'description',
content:
'zkSync Docs bring you all information you need about our protocol, APIs, SDKs, ZK Stack, and hyperchains. Start with our guides and tutorials, or go deep into our architecture and protocol specification.',
'ZKsync Docs bring you all information you need about our protocol, APIs, SDKs, ZK Stack, and hyperchains. Start with our guides and tutorials, or go deep into our architecture and protocol specification.',
},
{ name: 'author', content: 'https://matter-labs.io' },
],
Expand All @@ -38,14 +38,14 @@ useSeoMeta({
ogSiteName: seo?.siteName,
ogUrl: 'https://docs.zksync.io/',
ogImage: 'https://docs.zksync.io/social-card.png',
ogImageAlt: 'zkSync — Accelerating the mass adoption of crypto for personal sovereignty.',
ogImageAlt: 'ZKsync — Accelerating the mass adoption of crypto for personal sovereignty.',
ogDescription:
'zkSync Docs bring you all information you need about our protocol, APIs, SDKs, ZK Stack, and hyperchains. Start with our guides and tutorials, or go deep into our architecture and protocol specification.',
'ZKsync Docs bring you all information you need about our protocol, APIs, SDKs, ZK Stack, and hyperchains. Start with our guides and tutorials, or go deep into our architecture and protocol specification.',
twitterImage: 'https://docs.zksync.io/social-card.png',
twitterCard: 'summary_large_image',
twitterSite: '@zksync',
twitterCreator: '@the_matter_labs',
twitterImageAlt: 'zkSync — Accelerating the mass adoption of crypto for personal sovereignty.',
twitterImageAlt: 'ZKsync — Accelerating the mass adoption of crypto for personal sovereignty.',
});
provide('navigation', navigation);
Expand All @@ -67,6 +67,15 @@ const links = computed(() => {
to: '/external-node',
active: route.path.startsWith('/external-node'),
},
{
label: 'Ecosystem',
to: '/ecosystem',
active: route.path.startsWith('/ecosystem'),
},
{
label: 'Cookbook',
to: 'https://community-cookbook-staging.web.app/',
},
];
});
</script>
Expand Down
68 changes: 68 additions & 0 deletions assets/custom-icons.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
export const customIcons = {
custom: {
icons: {
'metamask-logo': {
body: `<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 204.8 192.4" style="enable-background:new 0 0 204.8 192.4;" xml:space="preserve">
<style type="text/css">
.st0{display:none;}
.st1{fill:#F5841F;}
.st2{fill:#E27625;}
.st3{fill:#D7C1B3;}
.st4{fill:#2F343B;}
.st5{fill:#CC6228;}
.st6{fill:#C0AD9E;}
.st7{fill:#763E1A;}
</style>
<g id="bg_x28_do_not_export_x29_" class="st0">
</g>
<g id="MM_Head_background__x28_Do_not_edit_x29_">
<g>
<path class="st1" d="M167.4,96.1l6.9-8.1l-3-2.2l4.8-4.4l-3.7-2.8l4.8-3.6l-3.1-2.4l5-24.4l-7.6-22.6 M171.5,25.6l-48.8,18.1l0,0
l0,0H82l0,0L33.2,25.6l0.3,0.2l-0.3-0.2l-7.6,22.6l5.1,24.4L27.5,75l4.9,3.6l-3.7,2.8l4.8,4.4l-3,2.2l6.9,8.1l-10.5,32.4h0l0,0
l9.7,33.1l34.1-9.4l0-0.1l0,0.1l0,0l0,0l0,0v0l0,0l0,0l0,0l6.6,5.4l13.5,9.2h23.1l13.5-9.2l6.6-5.4l0,0v0l0,0l0,0l34.2,9.4
l9.8-33.1l0,0h0l-10.6-32.4 M70.7,152.1L70.7,152.1L70.7,152.1"/>
</g>
</g>
<g id="Logos">
<g>
<polygon class="st2" points="171.5,25.6 111.6,69.7 122.7,43.7 "/>
<polygon class="st2" points="33.2,25.6 92.6,70.1 82,43.7 "/>
<polygon class="st2" points="150,127.9 134,152.1 168.2,161.5 178,128.4 "/>
<polygon class="st2" points="26.9,128.4 36.6,161.5 70.7,152.1 54.8,127.9 "/>
<polygon class="st2" points="68.9,86.9 59.4,101.2 93.2,102.7 92.1,66.5 "/>
<polygon class="st2" points="135.9,86.9 112.3,66.1 111.6,102.7 145.4,101.2 "/>
<polygon class="st2" points="70.7,152.1 91.2,142.3 73.5,128.7 "/>
<polygon class="st2" points="113.6,142.3 134,152.1 131.2,128.7 "/>
<polygon class="st3" points="134,152.1 113.6,142.3 115.3,155.5 115.1,161.1 "/>
<polygon class="st3" points="70.7,152.1 89.7,161.1 89.6,155.5 91.2,142.3 "/>
<polygon class="st4" points="90,119.9 73.1,115 85.1,109.5 "/>
<polygon class="st4" points="114.7,119.9 119.7,109.5 131.7,115 "/>
<polygon class="st5" points="70.7,152.1 73.7,127.9 54.8,128.4 "/>
<polygon class="st5" points="131.1,127.9 134,152.1 150,128.4 "/>
<polygon class="st5" points="145.4,101.2 111.6,102.7 114.7,119.9 119.7,109.5 131.7,115 "/>
<polygon class="st5" points="73.1,115 85.1,109.5 90,119.9 93.2,102.7 59.4,101.2 "/>
<polygon class="st2" points="59.4,101.2 73.5,128.7 73.1,115 "/>
<polygon class="st2" points="131.7,115 131.2,128.7 145.4,101.2 "/>
<polygon class="st2" points="93.2,102.7 90,119.9 94,140.3 94.9,113.5 "/>
<polygon class="st2" points="111.6,102.7 109.9,113.4 110.7,140.3 114.7,119.9 "/>
<polygon class="st1" points="114.7,119.9 110.7,140.3 113.6,142.3 131.2,128.7 131.7,115 "/>
<polygon class="st1" points="73.1,115 73.5,128.7 91.2,142.3 94,140.3 90,119.9 "/>
<polygon class="st6" points="115.1,161.1 115.3,155.5 113.7,154.2 91,154.2 89.6,155.5 89.7,161.1 70.7,152.1 77.3,157.5
90.8,166.8 113.9,166.8 127.4,157.5 134,152.1 "/>
<polygon class="st4" points="113.6,142.3 110.7,140.3 94,140.3 91.2,142.3 89.6,155.5 91,154.2 113.7,154.2 115.3,155.5 "/>
<polygon class="st7" points="174.1,72.6 179.1,48.2 171.5,25.6 113.6,68.2 135.9,86.9 167.4,96.1 174.3,88 171.3,85.8 176.1,81.5
172.4,78.6 177.2,75 "/>
<polygon class="st7" points="25.6,48.2 30.7,72.6 27.5,75 32.3,78.7 28.6,81.5 33.4,85.8 30.4,88 37.4,96.1 68.9,86.9 91.2,68.2
33.2,25.6 "/>
<polygon class="st1" points="167.4,96.1 135.9,86.9 145.4,101.2 131.2,128.7 150,128.4 178,128.4 "/>
<polygon class="st1" points="68.9,86.9 37.4,96.1 26.9,128.4 54.8,128.4 73.5,128.7 59.4,101.2 "/>
<polygon class="st1" points="111.6,102.7 113.6,68.2 122.7,43.7 82,43.7 91.2,68.2 93.2,102.7 94,113.5 94,140.3 110.7,140.3
110.8,113.5 "/>
</g>
</g>
</svg>`,
},
},
},
};
48 changes: 48 additions & 0 deletions components/content/NetworkAdder.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<script setup lang="ts">
const props = defineProps({
network: { type: String, required: true },
});
const chainName = props.network === 'mainnet' ? 'ZKsync Era Mainnet' : 'ZKsync Sepolia Testnet';
function addNetwork() {
const config = {
mainnet: {
chainId: '0x144',
rpcUrls: ['https://mainnet.era.zksync.io'],
blockExplorerUrls: ['https://explorer.zksync.io/'],
},
testnet: {
chainId: '0x12c',
rpcUrls: ['https://sepolia.era.zksync.dev'],
blockExplorerUrls: ['https://sepolia.explorer.zksync.dev/'],
},
}[props.network];
window.ethereum.request({
method: 'wallet_addEthereumChain',
params: [
{
chainId: config.chainId,
chainName: chainName,
nativeCurrency: { name: 'Ethereum', symbol: 'ETH', decimals: 18 },
iconUrls: ['https://docs.zksync.io/favicon-32x32.png'],
rpcUrls: config.rpcUrls,
blockExplorerUrls: config.blockExplorerUrls,
},
],
});
}
</script>

<template>
<UButton
type="button"
icon="i-custom-metamask-logo"
size="xl"
:variant="chainName === 'ZKsync Era Mainnet' ? 'solid' : 'soft'"
@click="addNetwork"
>
Add {{ chainName }}
</UButton>
</template>
2 changes: 1 addition & 1 deletion components/content/ProseA.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<UIcon
v-if="isExternalLink"
name="i-heroicons-arrow-up-right-20-solid"
class="absolute -right-2.5 top-0.5 h-3 w-3 text-xs font-light"
class="absolute -ml-[2px] mt-[4px] h-3 w-3 text-xs font-light"
/>
</NuxtLink>
</template>
Expand Down
73 changes: 73 additions & 0 deletions content/00.build/00.zksync-101/1.zksync-overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
---
title: ZKsync overview
description: A quick overview of what is ZKsync
---

## What is ZKsync?

**ZKsync Era** is a Layer 2 **[ZK
rollup](https://docs.zksync.io/build/developer-reference/rollups.html#what-are-zk-rollups)**, a trustless protocol that
uses cryptographic validity proofs to provide scalable and low-cost transactions on Ethereum. In ZKsync Era, computation
is performed off-chain and most data is stored off-chain as well. Transactions are bundled into batches before
generating a validity proof. As all validity proofs are proven on the Ethereum mainchain, users enjoy the same security
level as in Ethereum.

ZKsync Era is made to look and feel like Ethereum, but with a higher throughput and lower fees. Just like on Ethereum,
smart contracts are written in Solidity/Vyper and can be called using the same clients as the other EVM-compatible
chains.

You don't need to register a separate private key before using it; ZKsync supports existing Ethereum wallets out of the
box.

## Main features
:check-icon Mainnet-like security with zero reliance on 3rd parties.

:check-icon Permissionless EVM-compatible smart contracts.

:check-icon Preserving key EVM features, such as smart contract composability.

:check-icon Standard Web3 API.

:check-icon State updates via transaction outputs (also known as state diffs) which provides significant cost savings
over transaction inputs.

:check-icon Native account abstraction with improvements over EIP4337 (implemented in Ethereum and other rollups).

You can find [more information about ZKsync Era in l2beat](https://l2beat.com/scaling/projects/zksync-era#stage).

## Developer experience

ZKsync Era was built to provide a similar developer experience as Ethereum.

:check-icon Smart contracts can be written in Solidity or Vyper.

:check-icon Most contracts work out of the box so migrating projects is seamless.

:check-icon Smart contracts are compiled with custom compilers: **[zksolc and
zkvyper](https://docs.zksync.io/zk-stack/components/compiler/toolchain/overview.html)**.

:check-icon Use existing frameworks
like **[Hardhat](https://docs.zksync.io/build/tooling/hardhat/getting-started.html),** libraries like Ethers, Viem, or
web3.js, and tools like theGraph, Thirdweb, or Chainlink.

:check-icon Web3 API compatibility enables support of most developer tools.

:check-icon Different **[tools for testing and debugging
locally](https://docs.zksync.io/build/test-and-debug/getting-started.html)**.

## User experience

Interacting with applications built on ZKsync Era is seamless, cheap and fast.

- Transactions have instant confirmations and fast finality on L1.
- Transaction fees are extremely low (see [average transaction costs
here](https://www.growthepie.xyz/fundamentals/transaction-costs)).
- Transaction fees can be conveniently paid with ERC20 tokens (e.g. USDC) thanks to **[native account abstraction and
paymasters](https://docs.zksync.io/build/developer-reference/account-abstraction.html)**.
- Support for existing Ethereum-based wallets like Metamask, TrustWallet, Zerion or Rabby.

## Get started

- Follow [this guide to add the ZKsync network to your wallet](connect-zksync).
- Get [testnet funds from one of the faucets](/ecosystem/network-faucets)
- Deploy your first smart contract to ZKsync Era in the **[quickstart](quickstart)**.
Loading

0 comments on commit 9ebadcc

Please sign in to comment.