-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: remove existing files we are going to import our existing one instead * Initial commit * feat: SDK without contracts This squashes the history of the repo into a single commit so it can be exported as a patch to a new repo. * fix: add contracts as submodule Getting pnpm working locally is problematic, but in CI it seems fine? * fix: pull submodules and update to latest contracts Still doesn't build locally * fix: update modules this is tough for deps * fix: tests work locally * fix: try fix ci workflow * fix: missing build contracts step --------- Co-authored-by: zksync-admin-bot2 <[email protected]> Co-authored-by: Lyova Potyomkin <[email protected]>
- Loading branch information
1 parent
d84c3a5
commit 3b1728f
Showing
393 changed files
with
46,474 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
root = true | ||
|
||
[*] | ||
indent_size = 2 | ||
indent_style = space | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
quote_type = double | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
max_line_length = 80 | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"targets": { | ||
"zksync-auth-server-staging": { | ||
"hosting": { | ||
"zksync-auth-server-staging": [ | ||
"zksync-auth-server-staging" | ||
] | ||
} | ||
}, | ||
"stake-demo-app": { | ||
"hosting": { | ||
"stake-demo-app": [ | ||
"stake-demo-app" | ||
] | ||
} | ||
}, | ||
"nft-quest-testnet": { | ||
"hosting": { | ||
"nft-quest-testnet": [ | ||
"nft-quest-testnet" | ||
] | ||
} | ||
} | ||
}, | ||
"etags": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: Bug report | ||
description: File a bug report to help us improve | ||
title: "[Bug]: " | ||
labels: ["bug"] | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
Thanks for taking the time to fill out this bug report! Please fill out as much as you can, the more details the better we can help to resolve the issue. | ||
- type: dropdown | ||
id: project | ||
attributes: | ||
label: 🧰 Project | ||
description: Which project is this bug related to? | ||
options: | ||
- Contracts | ||
- Auth Server | ||
- SDK | ||
- Examples | ||
default: 0 | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: description | ||
attributes: | ||
label: 📝 Description | ||
description: A clear and concise description of what the bug is. | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: steps | ||
attributes: | ||
label: 🔄 Reproduction steps | ||
description: Steps to reproduce the behavior. | ||
- type: textarea | ||
id: expected | ||
attributes: | ||
label: 🤔 Expected behavior | ||
description: What did you expect to happen. | ||
- type: textarea | ||
id: actual | ||
attributes: | ||
label: 😯 Actual behavior | ||
description: What actually happened. | ||
- type: textarea | ||
id: environment | ||
attributes: | ||
label: 🖥 Environment | ||
description: Please provide relevant details about the environment you experienced the bug in. | ||
- type: textarea | ||
id: additional | ||
attributes: | ||
label: 📋 Additional context | ||
description: Add any other context about the problem here. If applicable, add screenshots to help explain. | ||
- type: textarea | ||
id: logs | ||
attributes: | ||
label: 📎 Logs | ||
description: If applicable, add logs to help explain the problem. | ||
render: shell |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Feature request | ||
description: Suggest an idea for this project | ||
title: "[Request]: " | ||
labels: ["enhancement"] | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
Thanks for taking the time to fill out this feature request! Please fill out as much as you can, the more details the better we can help to implement the feature. | ||
- type: textarea | ||
id: description | ||
attributes: | ||
label: 📝 Description | ||
description: A clear and concise description of what the feature is. | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: rationale | ||
attributes: | ||
label: 🤔 Rationale | ||
description: Why do you think this feature is important and how will it benefit the project? | ||
- type: textarea | ||
id: additional | ||
attributes: | ||
label: 📋 Additional context | ||
description: Add any other context or information about the feature request here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Description | ||
|
||
|
||
|
||
## Additional context |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,169 @@ | ||
name: CI | ||
|
||
on: | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
e2e-demo-app: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ./ | ||
steps: | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | ||
with: | ||
submodules: recursive | ||
|
||
# Start node | ||
- name: Era Test Node Action | ||
uses: dutterbutter/era-test-node-action@36ffd2eefd46dc16e7e2a8e1715124400ec0a3ba # v1 | ||
|
||
- name: Setup pnpm | ||
uses: pnpm/action-setup@v4 | ||
with: | ||
version: 9.11.0 | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4 | ||
with: | ||
node-version: lts/Iron | ||
cache: pnpm | ||
|
||
# Install dependencies for repo | ||
- name: Install dependencies | ||
run: pnpm install -r --frozen-lockfile | ||
|
||
# Install dependencies for the submodule | ||
- name: Install contract dependencies | ||
run: pnpm install -r --frozen-lockfile | ||
working-directory: packages/contracts | ||
|
||
- name: Build SDK | ||
run: pnpm nx build sdk | ||
|
||
- name: Build contracts | ||
run: pnpm build | ||
working-directory: packages/contracts | ||
|
||
- name: Deploy contracts | ||
run: pnpm run deploy | ||
working-directory: packages/contracts | ||
|
||
# Run E2E tests | ||
- name: Install Playwright Chromium Browser | ||
run: pnpm exec playwright install chromium | ||
working-directory: examples/demo-app | ||
- name: Run e2e tests | ||
run: pnpm nx e2e demo-app | ||
- uses: actions/upload-artifact@v4 | ||
if: ${{ !cancelled() }} | ||
with: | ||
name: demo-app-playwright-report | ||
path: examples/demo-app/playwright-report/ | ||
retention-days: 3 | ||
|
||
|
||
e2e-nft-quest: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ./ | ||
steps: | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | ||
with: | ||
submodules: recursive | ||
|
||
# Start node | ||
- name: Era Test Node Action | ||
uses: dutterbutter/era-test-node-action@36ffd2eefd46dc16e7e2a8e1715124400ec0a3ba # v1 | ||
|
||
- name: Setup pnpm | ||
uses: pnpm/action-setup@v4 | ||
with: | ||
version: 9.11.0 | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4 | ||
with: | ||
node-version: lts/Iron | ||
cache: pnpm | ||
|
||
# Install dependencies for repo | ||
- name: Install dependencies | ||
run: pnpm install -r --frozen-lockfile | ||
|
||
# Install dependencies for the submodule | ||
- name: Install contract dependencies | ||
run: pnpm install -r --frozen-lockfile | ||
working-directory: packages/contracts | ||
|
||
- name: Build SDK | ||
run: pnpm nx build sdk | ||
|
||
- name: Build contracts | ||
run: pnpm build | ||
working-directory: packages/contracts | ||
|
||
- name: Deploy contracts | ||
run: pnpm run deploy | ||
working-directory: packages/contracts | ||
|
||
- name: Deploy NFT contracts | ||
run: pnpm nx deploy:local nft-quest-contracts | ||
|
||
# Run E2E tests | ||
- name: Install Playwright Chromium Browser | ||
run: pnpm exec playwright install chromium | ||
working-directory: examples/nft-quest | ||
- name: Run e2e tests | ||
run: pnpm nx e2e nft-quest | ||
- uses: actions/upload-artifact@v4 | ||
if: ${{ !cancelled() }} | ||
with: | ||
name: nft-quest-playwright-report | ||
path: examples/nft-quest/playwright-report/ | ||
retention-days: 3 | ||
|
||
|
||
contracts: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ./ | ||
steps: | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | ||
with: | ||
submodules: recursive | ||
|
||
# Start node | ||
- name: Era Test Node Action | ||
uses: dutterbutter/era-test-node-action@36ffd2eefd46dc16e7e2a8e1715124400ec0a3ba # v1 | ||
|
||
# Setup pnpm | ||
- name: Setup pnpm | ||
uses: pnpm/action-setup@v4 | ||
with: | ||
version: 9.11.0 | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4 | ||
with: | ||
node-version: lts/Iron | ||
cache: pnpm | ||
|
||
# Install dependencies for the submodule | ||
- name: Install contract dependencies | ||
run: pnpm install -r --frozen-lockfile | ||
working-directory: packages/contracts | ||
|
||
# Build contracts and generate types | ||
- name: Build contracts | ||
run: pnpm build | ||
working-directory: packages/contracts | ||
|
||
# Run contract tests | ||
- name: Run contract test | ||
run: pnpm test | ||
working-directory: packages/contracts | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: "Deploy Auth Server Testnet" | ||
on: | ||
push: | ||
branches: [ "main" ] | ||
paths: | ||
- "packages/auth-server/**" | ||
- "packages/sdk/**" | ||
workflow_dispatch: | ||
|
||
env: | ||
HUSKY: 0 | ||
CI: true | ||
|
||
jobs: | ||
build_and_preview: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 # v4 | ||
|
||
- name: Setup pnpm | ||
uses: pnpm/action-setup@v4 | ||
with: | ||
version: 9.11.0 | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: lts/Iron | ||
cache: 'pnpm' | ||
|
||
- name: Install dependencies | ||
run: pnpm install -r --frozen-lockfile | ||
|
||
- name: Build apps | ||
env: | ||
NUXT_PUBLIC_DEFAULT_CHAIN_ID: 300 | ||
run: pnpm nx build auth-server | ||
|
||
- name: Deploy firebase hosting | ||
uses: matter-labs/action-hosting-deploy@main | ||
with: | ||
repoToken: '${{ secrets.GITHUB_TOKEN }}' | ||
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_AUTH_SERVER_STAGING }}" | ||
projectId: zksync-auth-server-staging | ||
target: zksync-auth-server-staging | ||
channelId: live |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: "Deploy NFT Quest Testnet" | ||
on: | ||
push: | ||
branches: [ "main" ] | ||
paths: | ||
- "examples/nft-quest/**" | ||
- "packages/sdk/**" | ||
workflow_dispatch: | ||
|
||
env: | ||
HUSKY: 0 | ||
CI: true | ||
|
||
jobs: | ||
build_and_preview: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 # v4 | ||
|
||
- name: Setup pnpm | ||
uses: pnpm/action-setup@v4 | ||
with: | ||
version: 9.11.0 | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: lts/Iron | ||
cache: 'pnpm' | ||
|
||
- name: Install dependencies | ||
run: pnpm install -r --frozen-lockfile | ||
|
||
- name: Build apps | ||
run: pnpm nx build nft-quest | ||
|
||
- name: Deploy firebase hosting | ||
uses: matter-labs/action-hosting-deploy@main | ||
with: | ||
repoToken: '${{ secrets.GITHUB_TOKEN }}' | ||
firebaseServiceAccount: "${{ secrets.FIREBASE_NFT_QUEST_TESTNET }}" | ||
projectId: nft-quest-testnet | ||
target: nft-quest-testnet | ||
channelId: live |
Oops, something went wrong.