Skip to content

Commit c712e18

Browse files
committed
Merge branch 'main' into erc7739-signatures
2 parents dbebe86 + 59a4c0c commit c712e18

File tree

230 files changed

+19416
-1566
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

230 files changed

+19416
-1566
lines changed

.cursor/mcp.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"mcpServers": {
3+
"nx-mcp": {
4+
"url": "http://localhost:9925/sse"
5+
}
6+
}
7+
}

.cursor/rules/nx-rules.mdc

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
description:
3+
globs:
4+
alwaysApply: true
5+
---
6+
7+
// This file is automatically generated by Nx Console
8+
9+
You are in an nx workspace using Nx 19.8.6 and pnpm as the package manager.
10+
11+
You have access to the Nx MCP server and the tools it provides. Use them. Follow these guidelines in order to best help the user:
12+
13+
# General Guidelines
14+
- When answering questions, use the nx_workspace tool first to gain an understanding of the workspace architecture
15+
- For questions around nx configuration, best practices or if you're unsure, use the nx_docs tool to get relevant, up-to-date docs!! Always use this instead of assuming things about nx configuration
16+
- If the user needs help with an Nx configuration or project graph error, use the 'nx_workspace' tool to get any errors
17+
- To help answer questions about the workspace structure or simply help with demonstrating how tasks depend on each other, use the 'nx_visualize_graph' tool
18+
19+
# Generation Guidelines
20+
If the user wants to generate something, use the following flow:
21+
22+
- learn about the nx workspace and any specifics the user needs by using the 'nx_workspace' tool and the 'nx_project_details' tool if applicable
23+
- get the available generators using the 'nx_generators' tool
24+
- decide which generator to use. If no generators seem relevant, check the 'nx_available_plugins' tool to see if the user could install a plugin to help them
25+
- get generator details using the 'nx_generator_schema' tool
26+
- you may use the 'nx_docs' tool to learn more about a specific generator or technology if you're unsure
27+
- decide which options to provide in order to best complete the user's request. Don't make any assumptions and keep the options minimalistic
28+
- open the generator UI using the 'nx_open_generate_ui' tool
29+
- wait for the user to finish the generator
30+
- read the generator log file using the 'nx_read_generator_log' tool
31+
- use the information provided in the log file to answer the user's question or continue with what they were doing
32+
33+
34+

.dockerignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.git
2+
node_modules
3+
**/node_modules
4+
**/*.zkey
5+
**/*.ptau
6+
packages/circuits/target
7+
.nx

.github/instructions/nx.instructions.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,4 @@ If the user wants to generate something, use the following flow:
2929
- use the information provided in the log file to answer the user's question or continue with what they were doing
3030

3131

32+

.github/workflows/ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@ jobs:
5353
working-directory: packages/contracts
5454

5555
- name: Build SDK
56-
run: pnpm nx build sdk
56+
run: |
57+
pnpm nx build sdk
58+
pnpm nx build connector-export
5759
5860
- name: Install zksync-foundry
5961
run: |

.github/workflows/deploy-package.yml

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,22 +51,48 @@ jobs:
5151
- name: Build the package
5252
run: pnpm nx build sdk
5353

54+
- name: Build the connector-export package
55+
run: pnpm nx build connector-export
56+
5457
- name: Prepare package.json
5558
working-directory: packages/sdk
5659
run: node prepare-package.mjs
5760
env:
5861
INPUT_VERSION: ${{ github.event.inputs.version }}
5962

63+
- name: Prepare connector-export package.json
64+
working-directory: packages/connector-export
65+
run: node prepare-package.mjs
66+
env:
67+
INPUT_VERSION: ${{ github.event.inputs.version }}
68+
6069
- name: Create .npmrc for NPM
6170
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPMJS_NPM_MATTERLABS_AUTOMATION_TOKEN }}" > ~/.npmrc
6271

63-
- name: Publish to NPM
72+
- name: Publish SDK to NPM
6473
working-directory: packages/sdk
6574
run: npm publish --access public
75+
76+
- name: Publish connector-export to NPM
77+
working-directory: packages/connector-export
78+
run: npm publish --access public
6679

6780
- name: Create .npmrc for GitHub Packages
68-
run: echo "@OWNER:registry=https://npm.pkg.github.com\n//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" > ~/.npmrc
81+
run: |
82+
echo "@matter-labs:registry=https://npm.pkg.github.com" > ~/.npmrc
83+
echo "@zksync-sso:registry=https://npm.pkg.github.com" >> ~/.npmrc
84+
echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" >> ~/.npmrc
6985
70-
- name: Publish to GitHub Packages
86+
- name: Publish SDK to GitHub Packages
7187
working-directory: packages/sdk
72-
run: npm publish --access public
88+
run: |
89+
# Update package name for GitHub Packages to be scoped to the organization
90+
npm pkg set name="@matter-labs/zksync-sso"
91+
npm publish --registry=https://npm.pkg.github.com
92+
93+
- name: Publish connector-export to GitHub Packages
94+
working-directory: packages/connector-export
95+
run: |
96+
# Update package name for GitHub Packages to be scoped to the organization
97+
npm pkg set name="@matter-labs/zksync-sso-connector-export"
98+
npm publish --registry=https://npm.pkg.github.com

.github/workflows/deploy-preview.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ jobs:
2020
- uses: actions/checkout@v4 # v4
2121
with:
2222
submodules: recursive
23+
fetch-depth: 0
2324

2425
- name: Setup pnpm
2526
uses: pnpm/action-setup@v4
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
name: Build and push Docker image
2+
permissions:
3+
contents: read
4+
on:
5+
push:
6+
branches:
7+
- main
8+
tags:
9+
- "*"
10+
pull_request:
11+
branches:
12+
- main
13+
14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
16+
cancel-in-progress: true
17+
18+
jobs:
19+
build-push-image:
20+
name: Build and push Docker image
21+
runs-on: [matterlabs-ci-runner]
22+
steps:
23+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
24+
with:
25+
submodules: recursive
26+
27+
- name: Set git SHA
28+
id: git_sha
29+
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
30+
31+
- name: Set Docker tag
32+
id: docker_tag
33+
run: |
34+
ts=$(date +%s%N | cut -b1-13)
35+
if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then
36+
echo "tag=${{ steps.git_sha.outputs.sha_short }}-${ts}" >> $GITHUB_OUTPUT
37+
elif [[ "${{ github.ref }}" == refs/tags/* ]]; then
38+
echo "tag=$(echo ${GITHUB_REF#refs/tags/})" >> $GITHUB_OUTPUT
39+
elif [[ "${{ github.event_name }}" == "pull_request" ]]; then
40+
echo "tag=none" >> $GITHUB_OUTPUT
41+
else
42+
echo "Unsupported event ${GITHUB_EVENT_NAME} or ref ${GITHUB_REF}, only refs/heads/, refs/tags/ and pull_request are supported."
43+
exit 1
44+
fi
45+
46+
- name: Set up Docker Buildx
47+
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.0
48+
49+
- name: Log in to Docker Hub
50+
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
51+
with:
52+
username: ${{ secrets.DOCKERHUB_USER }}
53+
password: ${{ secrets.DOCKERHUB_TOKEN }}
54+
55+
- name: Login to GAR
56+
run: |
57+
gcloud auth configure-docker us-docker.pkg.dev -q
58+
59+
- name: Build and push oidc-server image
60+
id: docker_build_oidc
61+
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
62+
with:
63+
context: .
64+
file: Dockerfile
65+
target: oidc-server
66+
push: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')) }}
67+
tags: |
68+
matterlabs/sso-oidc-salt:${{ steps.docker_tag.outputs.tag }}
69+
matterlabs/sso-oidc-salt:latest
70+
us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/sso-oidc-salt:${{ steps.docker_tag.outputs.tag }}
71+
us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/sso-oidc-salt:latest
72+
73+
- name: Build and push key-registry image
74+
id: docker_build_key_registry
75+
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
76+
with:
77+
context: .
78+
file: Dockerfile
79+
target: key-registry
80+
push: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')) }}
81+
tags: |
82+
matterlabs/sso-oidc-key-updater:${{ steps.docker_tag.outputs.tag }}
83+
matterlabs/sso-oidc-key-updater:latest
84+
us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/sso-oidc-key-updater:${{ steps.docker_tag.outputs.tag }}
85+
us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/sso-oidc-key-updater:latest
86+
87+
- name: Print image digest to summary
88+
run: |
89+
echo "OIDC Server Image tag: ${{ steps.docker_tag.outputs.tag }}" >> $GITHUB_STEP_SUMMARY
90+
echo "Key Registry Image tag: ${{ steps.docker_tag.outputs.tag }}" >> $GITHUB_STEP_SUMMARY

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,7 @@ xcuserdata/
4949
timeline.xctimeline
5050
playground.xcworkspace
5151
.build/
52-
out/
52+
out/
53+
54+
# IDEs
55+
.idea

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
[submodule "packages/contracts"]
22
path = packages/contracts
33
url = git@github.com:matter-labs/zksync-sso-clave-contracts.git
4+
[submodule "packages/circuits"]
5+
path = packages/circuits
6+
url = git@github.com:Moonsong-Labs/zksync-social-login-circuit.git

0 commit comments

Comments
 (0)