Skip to content

Commit

Permalink
Merge branch 'main' into fix/xchain
Browse files Browse the repository at this point in the history
  • Loading branch information
uF4No authored Jul 22, 2024
2 parents cb3d5ee + 34ad66e commit 8de08ae
Show file tree
Hide file tree
Showing 73 changed files with 412 additions and 336 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ body:
id: terms
attributes:
label: Code of Conduct
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/zkSync-Community-Hub/community-code/blob/main/CODE_OF_CONDUCT.md).
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/ZKsync-Community-Hub/community-code/blob/main/CODE_OF_CONDUCT.md).
options:
- label: I agree to follow this project's Code of Conduct
required: true
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: If you have any questions or need help beyond this project, please visit our Discussions page for zksync developers.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ body:
id: terms
attributes:
label: Code of Conduct
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/zkSync-Community-Hub/community-code/blob/main/CODE_OF_CONDUCT.md).
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/ZKsync-Community-Hub/community-code/blob/main/CODE_OF_CONDUCT.md).
options:
- label: I agree to follow this project's Code of Conduct
required: true
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/new_guide_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ body:
id: terms
attributes:
label: Code of Conduct
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/zkSync-Community-Hub/community-code/blob/main/CODE_OF_CONDUCT.md).
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/ZKsync-Community-Hub/community-code/blob/main/CODE_OF_CONDUCT.md).
options:
- label: I agree to follow this project's Code of Conduct
required: true
6 changes: 3 additions & 3 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<!--
Thank you for contributing to the zkSync Code Community!
Thank you for contributing to the ZKsync Code Community!
Before submitting the PR, please make sure you do the following:
- Read the [Contributing Guide](https://github.com/zkSync-Community-Hub/community-code/blob/main/CONTRIBUTING.md).
- Understand our [Code of Conduct](https://github.com/zkSync-Community-Hub/community-code/blob/main/CODE_OF_CONDUCT.md)
- Read the [Contributing Guide](https://github.com/ZKsync-Community-Hub/community-code/blob/main/CONTRIBUTING.md).
- Understand our [Code of Conduct](https://github.com/ZKsync-Community-Hub/community-code/blob/main/CODE_OF_CONDUCT.md)
-->

Expand Down
59 changes: 59 additions & 0 deletions .github/workflows/check-pr-title.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: check 📓

on:
pull_request_target:
types:
- opened
- edited
- synchronize

jobs:
main:
name: validate PR title
runs-on: ubuntu-latest
permissions:
pull-requests: write
statuses: write
contents: read
steps:
- uses: amannn/action-semantic-pull-request@v5.5.2
id: lint_pr_title
env:
GITHUB_TOKEN: ${{ github.token }}
with:
types: |
fix
feat
docs
ci
chore
requireScope: false
wip: true

- uses: marocchino/sticky-pull-request-comment@v2.9.0
# When the previous steps fails, the workflow would stop. By adding this
# condition you can continue the execution with the populated error message.
if: always() && (steps.lint_pr_title.outputs.error_message != null)
with:
header: pr-title-lint-error
GITHUB_TOKEN: ${{ github.token }}
message: |
Hey there and thank you for opening this pull request! 👋🏼
We require pull request titles to follow the [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/) and it looks like your proposed title needs to be adjusted.
If your PR is still a work in progress, please prefix the title with "[WIP]".
Details:
```
${{ steps.lint_pr_title.outputs.error_message }}
```
# Delete a previous comment when the issue has been resolved
- if: ${{ steps.lint_pr_title.outputs.error_message == null }}
uses: marocchino/sticky-pull-request-comment@v2.9.0
with:
header: pr-title-lint-error
GITHUB_TOKEN: ${{ github.token }}
delete: true
1 change: 0 additions & 1 deletion .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ jobs:
with:
repoToken: "${{ secrets.GITHUB_TOKEN }}"
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_COMMUNITY_COOKBOOK_59807 }}"
target: prod
projectId: community-cookbook-59807
channelId: live

Expand Down
2 changes: 1 addition & 1 deletion .lintstagedrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
- prettier --list-different
- eslint
'*.md':
- cspell check
- cspell lint --file
- markdownlint-cli2
'*.{json,yml}':
- prettier --list-different
13 changes: 12 additions & 1 deletion .releaserc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,18 @@
"addReleases": "top",
"npmPublish": false,
"plugins": [
"@semantic-release/commit-analyzer",
[
"@semantic-release/commit-analyzer",
{
"preset": "angular",
"releaseRules": [
{
"type": "docs",
"release": "minor"
}
]
}
],
"@semantic-release/release-notes-generator",
"@semantic-release/github"
]
Expand Down
10 changes: 9 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,13 @@
},
"editor.tabCompletion": "onlySnippets"
},
"eslint.experimental.useFlatConfig": true
"eslint.experimental.useFlatConfig": true,
"workbench.colorCustomizations": {
"statusBar.background": "#8257a6",
"statusBar.foreground": "#e7e7e7",
"statusBarItem.hoverBackground": "#9b78b8",
"statusBarItem.remoteBackground": "#8257a6",
"statusBarItem.remoteForeground": "#e7e7e7"
},
"peacock.color": "#8257a6"
}
16 changes: 8 additions & 8 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,27 @@ Version: 1.1
Apache 2.0 license, derived from the Apache Foundation Code of Conduct.
Also, CC BY-SA 3.0 derived from the Mozilla Community Participation Guidelines.

Our goal is to cultivate a safe, friendly, and inclusive space that benefits all participants in the zkSync ecosystem.
Our goal is to cultivate a safe, friendly, and inclusive space that benefits all participants in the ZKsync ecosystem.
This Code of Conduct outlines our shared values and expectations to help ensure that the community remains a positive and enriching environment for everyone.

## When and how to use this Code of Conduct

This is your guide for engaging as a participant in the zkSync ecosystem.
It applies to all physical and digital spaces related to zkSync.
This is your guide for engaging as a participant in the ZKsync ecosystem.
It applies to all physical and digital spaces related to ZKsync.

## Expected behaviors

**Be ethical**:
We endeavor to enrich the zkSync ecosystem, while not infringing on the rights and wellbeing of others.
We also endeavor to enrich ourselves without causing harm to the zkSync community.
We endeavor to enrich the ZKsync ecosystem, while not infringing on the rights and wellbeing of others.
We also endeavor to enrich ourselves without causing harm to the ZKsync community.
We do not encourage tax evasion, promoting information leaks, speculating on tokens or token prices, or otherwise breaking the law.

**Be kind and respectful**:
Treat everyone with kindness, empathy, and respect.
We all come from different backgrounds, perspectives and experiences,
so let's celebrate our differences and foster a culture of openness and understanding.
We may have strong feelings about other layer 1 and layer 2 blockchains,
but that is no reason to disparage, defame, or slander any competitor to zkSync or what other chains are doing.
but that is no reason to disparage, defame, or slander any competitor to ZKsync or what other chains are doing.
Feel free to compare metrics and features, but keep to the facts and be respectful of all the builders in web3
trying to advance freedom through blockchain technology!

Expand All @@ -50,7 +50,7 @@ We encourage questions, and redirect them to the appropriate channel if we do no
Communication is key.
Use clear and considerate language in your interactions.
We aim to create a welcoming environment for users of all ages, so please avoid excessive profanity or explicit content.
Remember that zkSync community members are a diverse bunch.
Remember that ZKsync community members are a diverse bunch.
English is our primary working language, but to help others where English is not their first language,
be succinct and avoid acronyms where possible.

Expand All @@ -76,7 +76,7 @@ This includes, but is not limited to:
- Advocating for, or encouraging, any of the above behavior.

**Have fun and connect**:
Finally, remember that ZK Squad and the zkSync community is a place to connect, learn, and enjoy.
Finally, remember that ZK Squad and the ZKsync community is a place to connect, learn, and enjoy.
Participate in a manner that encourages positive interactions and enhances the experiences of all.

## Managing violations
Expand Down
12 changes: 6 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# How to Contribute Guides to Community Code

We are always glad for new contributions from community members to spread the zkSync knowledge!
We are always glad for new contributions from community members to spread the ZKsync knowledge!
If you are interested in adding a new guide to the Community Code, this is the section for you.
If you are looking to contribute project changes like fixing bugs, please checkout the [Readme](README.md).

## Fork the project

Make a [fork of the project](https://github.com/zkSync-Community-Hub/community-code/fork) and create your branches from the default `main` branch.
Make a [fork of the project](https://github.com/ZKsync-Community-Hub/community-code/fork) and create your branches from the default `main` branch.

If your PR is still a work in progress, consider putting it into a [Draft status](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/changing-the-stage-of-a-pull-request#converting-a-pull-request-to-a-draft).
Once your PR is ready for review, switch it back to an active PR request
Expand All @@ -24,7 +24,7 @@ and you can use components available from [Nuxt UI](https://ui.nuxt.com/componen
### Create a new section for your guide

We have a template tutorial folder you can start from!
You can copy the `/content/tutorials/_new-tutorial-template` to make setting up a new tutorial easy.
You can copy the `tutorial-template` from `/template` to make setting up a new tutorial easy.

Your new guide should have its own folder under `/content/tutorials`. The minimum files your directory should have are
the `_dir.yml` and a `10.index.md`.
Expand Down Expand Up @@ -73,7 +73,7 @@ In markdown, the syntax changes to the following:
You can refer to the Nuxt Content documentation on [Vue Components](https://content.nuxt.com/usage/markdown#vue-components)
to learn further how to customize and use vue components in markdown.
We have additional custom components aside from Nuxt UI that you can use.
You can discover these in our [zkSync Docs Contribution Styleguide](https://docs.zksync.io/build/contributing-to-documentation/documentation-styleguide#markdown-and-vue).
You can discover these in our [ZKsync Docs Contribution Styleguide](https://docs.zksync.io/build/contributing-to-documentation/documentation-styleguide#markdown-and-vue).

## 💈 Writing styleguide

Expand All @@ -82,12 +82,12 @@ This means our readers may be non-native English speakers.
To help everyone learn and grow with our Community Code,
we adhere to industry best practices to ensure inclusivity.

Check out and read through our [zkSync Docs Contribution Styleguide](https://docs.zksync.io/build/contributing-to-documentation/documentation-styleguide#writing-style)
Check out and read through our [ZKsync Docs Contribution Styleguide](https://docs.zksync.io/build/contributing-to-documentation/documentation-styleguide#writing-style)
to learn how to best write your guide for our community.

## 📥 Submitting your guide

Please [submit a PR of your branch to main on GitHub](https://github.com/zkSync-Community-Hub/community-code/compare).
Please [submit a PR of your branch to main on GitHub](https://github.com/ZKsync-Community-Hub/community-code/compare).
Provide a clear description of what you're contributing.

## 📜 Commit conventions
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
[![Contributions Welcome](https://img.shields.io/badge/contributions-welcome-orange)](CONTRIBUTING.md)
[![X (formerly Twitter) Follow](https://badgen.net/badge/twitter/@zksyncDevs/1DA1F2?icon&label)](https://x.com/zksyncDevs)

Welcome to the zkSync Community Code repository. This project serves as the community hub for zkSync, providing comprehensive
Welcome to the ZKsync Community Code repository. This project serves as the community hub for ZKsync, providing comprehensive
documentation for developers written by developers.
Whether you're a beginner looking to get started with zkSync or an experienced developer
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.

## 🚀 Quick Start
Expand Down Expand Up @@ -92,8 +92,8 @@ Check out our [Contributing guide](CONTRIBUTING.md) to learn how to add your own
## 👪 Join the community

If you haven't already, join our community!
We have [GitHub Discussions](https://github.com/zkSync-Community-Hub/zksync-developers/discussions)
We have [GitHub Discussions](https://github.com/ZKsync-Community-Hub/zksync-developers/discussions)
for developers to ask questions and share their work.
We also have a [Discord server](https://join.zksync.dev/) for real-time conversations with the team and community.

Be sure to [follow us on Twitter](https://x.com/zkSyncDevs) to keep up to date with announcements from the zkSync dev team.
Be sure to [follow us on Twitter](https://x.com/ZKsyncDevs) to keep up to date with announcements from the ZKsync dev team.
10 changes: 5 additions & 5 deletions SUPPORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,22 @@ We have multiple channels available for you to request help.

If you are in need of help with submitting your guide to the Community Code,
first read through the [Contributing doc](CONTRIBUTING.md) to see if it may help answer some questions.
If the answer is not found, submit an [issue in GitHub](https://github.com/zkSync-Community-Hub/community-code/issues).
If the answer is not found, submit an [issue in GitHub](https://github.com/ZKsync-Community-Hub/community-code/issues).

We also have resources available on the [zksync-developers Discussions](https://github.com/zkSync-Community-Hub/zksync-developers/discussions)
We also have resources available on the [zksync-developers Discussions](https://github.com/ZKsync-Community-Hub/zksync-developers/discussions)
where you can submit a question. We also have a [Discord community](https://join.zksync.dev/)
that may help with any troubleshooting, check out the `🖥│dev-general` channel.

If you have questions related to any of our zkSync tools,
If you have questions related to any of our ZKsync tools,
we recommend that you submit an Issue related to that project.
You can find the list of our open-source repositories in the
[Contribution Track](https://docs.zksync.io/build/resources/contribution-track)
on our zkSync Docs site.
on our ZKsync Docs site.

## 🪲 Submit a bug report for a guide

Are you going through a guide in our Code Community and came across a bug?
Perhaps the versions are out of date or a particular tool is broken when trying to run a project.
Submit an [issue in GitHub](https://github.com/zkSync-Community-Hub/community-code/issues) using our Issue form
Submit an [issue in GitHub](https://github.com/ZKsync-Community-Hub/community-code/issues) using our Issue form
or submit it directly from the Guide you're working from! In the left sidebar on the site, there is a link at the bottom
for "Submit an issue" which will set up a pre-filled Issue form for the particular guide you're on.
4 changes: 2 additions & 2 deletions app.config.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
export default defineAppConfig({
seo: {
siteName: 'zkSync Community Code',
siteName: 'ZKsync Community Code',
},
header: {
links: [
{
icon: 'i-simple-icons-github',
to: 'https://github.com/zkSync-Community-Hub/community-code',
to: 'https://github.com/ZKsync-Community-Hub/community-code',
target: '_blank',
'aria-label': 'Community Code on GitHub',
title: 'Community Code on GitHub',
Expand Down
10 changes: 5 additions & 5 deletions app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@ useHead({
useSeoMeta({
titleTemplate: `%s - ${seo?.siteName}`,
ogSiteName: seo?.siteName,
ogUrl: 'https://code.zksync.io/',
ogUrl: 'https://code.zksync.io',
description:
'Build together with the zkSync Community. Learn how to build amazing smart contracts and dApps on zkSync Era.',
'Build together with the ZKsync Community. Learn how to build amazing smart contracts and dApps on ZKsync Era.',
ogDescription:
'Build together with the zkSync Community. Learn how to build amazing smart contracts and dApps on zkSync Era.',
'Build together with the ZKsync Community. Learn how to build amazing smart contracts and dApps on ZKsync Era.',
twitterTitle: `%s`,
twitterDescription:
'Build together with the zkSync Community. Learn how to build amazing smart contracts and dApps on zkSync Era.',
'Build together with the ZKsync Community. Learn how to build amazing smart contracts and dApps on ZKsync Era.',
twitterCard: 'summary_large_image',
twitterSite: '@zksync',
twitterCreator: '@zkSyncDevs',
twitterCreator: '@ZKsyncDevs',
twitterImageAlt: 'Hyperscaling Ethereum with ZK tech.',
});
Expand Down
Binary file modified bun.lockb
Binary file not shown.
6 changes: 3 additions & 3 deletions content/_partials/_callout-zksync-cli.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
title: Callout zkSync CLI
title: Callout ZKsync CLI
---

::callout{icon="i-heroicons-light-bulb"}
Skip the hassle for test ETH by using `zksync-cli` for local testing.
Simply execute `npx zksync-cli dev start` to initialize a local zkSync development environment,
which includes local Ethereum and zkSync nodes.
Simply execute `npx zksync-cli dev start` to initialize a local ZKsync development environment,
which includes local Ethereum and ZKsync nodes.
This method allows you to test contracts without requesting external testnet funds.
Explore more in the [zksync-cli documentation](https://docs.zksync.io/build/tooling/zksync-cli).
::
4 changes: 2 additions & 2 deletions content/index.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
title: 'zkSync Community Code'
title: 'ZKsync Community Code'
features:
title: 'Community Contributed Guides for zkSync'
title: 'Community Contributed Guides for ZKsync'
links:
- label: 'Explore community guides'
trailingIcon: 'i-heroicons-arrow-right-20-solid'
Expand Down
1 change: 1 addition & 0 deletions content/tutorials/cross-chain-governance/10.index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ This tutorial shows you how to implement communication between L1 and L2 with th
- A **Governance** Solidity smart contract is deployed on layer 1. This contract has a function that sends a transaction
to ZKsync Era layer 2.
- A **Counter** Solidity smart contract is deployed on ZKsync Era layer 2. This contract stores a number that is incremented

by calling the `increment` method. The `Governance` contract on layer 1 calls this function.

## Prerequisites
Expand Down
2 changes: 2 additions & 0 deletions content/tutorials/cross-chain-governance/20.L2-contract.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: L2 counter contract
description: Deploy a contract in ZKsync Era that has a counter.

---

## L2 Counter
Expand All @@ -16,6 +17,7 @@ Now that we have an address for the L1 governance contract, we can build, deploy
2. For the purposes of this tutorial, we don't need the example smart contracts and deployment script files generated by `zksync-cli`.
Run the following commands to remove them:
```sh
rm -rf ./contracts/*
rm -rf ./deploy/*
Expand Down
Loading

0 comments on commit 8de08ae

Please sign in to comment.