Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ quote_type = double
[*.md]
trim_trailing_whitespace = false
max_line_length = 80
indent_size = 2
indent_size = 2
10 changes: 9 additions & 1 deletion .github/workflows/ci-reactnative.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
name: React Native CI

permissions:
contents: read

on:
push:
paths:
- 'packages/contracts/**'
- 'packages/sdk-platforms/rust/**'
- 'packages/sdk-platforms/react-native/react-native-zksync-sso/**'
- '.github/workflows/ci-reactnative.yml'
pull_request:
paths:
- 'packages/contracts/**'
Expand Down
122 changes: 118 additions & 4 deletions .github/workflows/ci-rust.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
name: Rust CI
permissions:
contents: read

on:
push:
paths:
- 'packages/contracts/**'
- 'packages/sdk-platforms/rust/**'
- '.github/workflows/ci-rust.yml'
pull_request:
paths:
- 'packages/contracts/**'
Expand All @@ -9,7 +16,7 @@ on:

jobs:
rust-sdk:
name: Rust SDK - latest
name: Rust Legacy SDK
runs-on: ubuntu-latest
strategy:
matrix:
Expand Down Expand Up @@ -65,6 +72,7 @@ jobs:
- name: Run clippy
run: |
rustup component add clippy --toolchain stable
rustup component add --toolchain 1.90.0-x86_64-unknown-linux-gnu clippy
cargo clippy --all-targets -- -D warnings
working-directory: packages/sdk-platforms/rust/zksync-sso

Expand All @@ -84,6 +92,112 @@ jobs:
run: cargo test -- --test-threads=1
working-directory: packages/sdk-platforms/rust/zksync-sso

- name: Run integration tests
run: cargo test test_complete_zksync_sso_integration -- --ignored
working-directory: packages/sdk-platforms/rust/zksync-sso
# - name: Run integration tests
# run: cargo test test_complete_zksync_sso_integration -- --ignored
# working-directory: packages/sdk-platforms/rust/zksync-sso

rust-sdk-erc4337:
name: Rust 4337 SDK
runs-on: ubuntu-latest
strategy:
matrix:
config:
- debug
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Run sccache-cache
uses: mozilla-actions/sccache-action@v0.0.4

- name: Install Rust
run: |
rustup update stable && rustup default stable
rustup toolchain install nightly

- name: Run rustfmt
run: |
rustup component add rustfmt --toolchain nightly
cargo +nightly fmt --all -- --check
working-directory: packages/sdk-platforms/rust/zksync-sso-erc4337

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1.4.0

- name: Install dependencies
run: forge soldeer install
working-directory: packages/erc4337-contracts

- name: Install Node.js 22 via nvm
run: |
export NVM_DIR="$HOME/.nvm"
mkdir -p "$NVM_DIR"
curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
. "$NVM_DIR/nvm.sh"
nvm install 22
nvm use 22
node -v
# Expose Node.js bin dir to subsequent steps
echo "$(dirname $(nvm which 22))" >> $GITHUB_PATH

- name: Configure pnpm store dir
run: echo "PNPM_STORE_DIR=$HOME/.pnpm-store" >> $GITHUB_ENV

- name: Cache pnpm store
uses: actions/cache@v4
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('packages/erc4337-contracts/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Enable corepack and activate pnpm from contracts package.json
run: |
corepack enable
corepack prepare "$(node -p "require('./package.json').packageManager")" --activate
pnpm -v
working-directory: packages/erc4337-contracts

- name: Install dependencies
run: pnpm install --frozen-lockfile
working-directory: packages/erc4337-contracts

- name: Build ERC-4337 contracts
run: forge build
working-directory: packages/erc4337-contracts

- name: Verify ERC-4337 contract ABIs exist
run: |
set -euo pipefail
missing=()
files=(
"out/IERC7579Account.sol/IERC7579Account.json"
"out/SimpleAccountFactory.sol/SimpleAccountFactory.json"
"out/SimpleAccount.sol/SimpleAccount.json"
"out/EntryPoint.sol/EntryPoint.json"
)
for f in "${files[@]}"; do
if [ ! -f "$f" ]; then
missing+=("$f")
fi
done
if [ ${#missing[@]} -gt 0 ]; then
echo "Missing expected ABI JSON files:" >&2
for m in "${missing[@]}"; do echo " - $m" >&2; done
echo "\nAvailable JSON files under out/:" >&2
find out -maxdepth 2 -type f -name '*.json' | sort || true
exit 1
fi
working-directory: packages/erc4337-contracts

- name: Run clippy
run: |
rustup component add clippy --toolchain stable
rustup component add --toolchain 1.90.0-x86_64-unknown-linux-gnu clippy
cargo clippy --all-targets -- -D warnings
working-directory: packages/sdk-platforms/rust/zksync-sso-erc4337

- name: Run rust tests
run: cargo test
working-directory: packages/sdk-platforms/rust/zksync-sso-erc4337
8 changes: 8 additions & 0 deletions .github/workflows/ci-swift.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
name: Swift CI
permissions:
contents: read

on:
push:
paths:
- 'packages/contracts/**'
- 'packages/sdk-platforms/rust/**'
- 'packages/sdk-platforms/swift/**'
- '.github/workflows/ci-swift.yml'
pull_request:
paths:
- 'packages/contracts/**'
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ dist
# Rust
debug/
target/
Cargo.lock

# Swift
xcuserdata/
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
[submodule "packages/contracts"]
path = packages/contracts
url = git@github.com:matter-labs/zksync-sso-clave-contracts.git
[submodule "packages/erc4337-contracts"]
path = packages/erc4337-contracts
url = git@github.com:matter-labs/zksync-sso-contracts.git
[submodule "packages/circuits"]
path = packages/circuits
url = git@github.com:Moonsong-Labs/zksync-social-login-circuit.git
1 change: 1 addition & 0 deletions packages/erc4337-contracts
Submodule erc4337-contracts added at 507c2a
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"contracts": {
"accountFactory": "0x799b1252b0a05e17dadb23e19553611997e1aafe",
"passkey": "0x0a39934c490546ff547a102f378876e625c9610f",
"session": "0x031f5d8f86afe1d6011dc3f3e8d27e274fbceb13",
"accountPaymaster": "0xebc6385457c82f764b18d3e36a5ea18617340ac4",
"recovery": "0x6eddce98684947c563408198144e3c05823910eb"
"accountFactory": "0xd4a02efa0ccfc809a15a4cd6dcea07eec30240a6",
"passkey": "0x4a52137ba3b6e0fa06b263f08be0c4a0175ee798",
"session": "0x3835758b9d0f70907f41772d7a57c4b644a66b29",
"accountPaymaster": "0x70bc9a09ca80abe6a46f0af107fc0943d9d416f2",
"recovery": "0xceb8e0dab7b59fa699809f99cd1258bcfbf468bf"
},
"nodeUrl": "http://localhost:8011/",
"deployWallet": {
Expand Down
Loading
Loading