Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
151 changes: 91 additions & 60 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,63 +129,94 @@ jobs:
path: packages/auth-server/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 contracts
# run: pnpm build
# working-directory: packages/contracts

# - name: Deploy contracts
# run: pnpm run deploy --file ../auth-server/stores/local-node.json
# working-directory: packages/contracts

# - name: Build SDK
# run: pnpm nx build sdk

# - 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
# TODO: Consider sharing CI infrastructure between demo-app and nft-quest
# Currently duplicated for test isolation and independence
e2e-nft-quest:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
defaults:
run:
working-directory: ./
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
submodules: recursive

- 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 Foundry for Anvil and ERC-4337 contract deployment
- name: Install foundry
uses: foundry-rs/foundry-toolchain@v1.5.0

# Start Anvil for ERC-4337 (standard EVM on port 8545)
- name: Start Anvil
run: |
pnpm run anvil &
echo "Waiting for Anvil to be ready..."
timeout 30 bash -c 'until cast client --rpc-url http://localhost:8545 > /dev/null 2>&1; do sleep 1; done'
echo "Anvil is ready!"
working-directory: packages/erc4337-contracts

# Install dependencies for repo
- name: Install dependencies
run: pnpm install -r --frozen-lockfile

# Install and build ERC-4337 contracts
- name: Install ERC-4337 contract dependencies
run: forge soldeer install
working-directory: packages/erc4337-contracts

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

# Build ERC-4337 SDK packages
- name: Build ERC-4337 related packages
run: |
pnpm nx build web-sdk
pnpm nx build sdk-4337
pnpm nx build:erc4337 demo-app

# Deploy MSA Factory and infrastructure (nft-quest will read from contracts-anvil.json)
- name: Deploy Demo-App ERC-4337 contracts
continue-on-error: true
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using 'continue-on-error: true' for the MSA factory deployment step is risky. If this deployment fails silently, subsequent steps that depend on the deployed contracts (like NFT contract deployment at line 209) will fail with unclear error messages. Consider removing this flag or adding explicit validation after this step to check that the deployment succeeded and required contract addresses are available.

Suggested change
continue-on-error: true

Copilot uses AI. Check for mistakes.
run: pnpm nx deploy-msa-factory demo-app

# Start Alto bundler with CORS proxy
- name: Start Alto bundler with CORS proxy
run: |
pnpm run bundler:with-proxy &
BUNDLER_PID=$!
echo "BUNDLER_PID=$BUNDLER_PID" >> $GITHUB_ENV
echo "Waiting for bundler to be ready on port 4337..."
timeout 60 bash -c 'until curl -s http://localhost:4337 > /dev/null 2>&1; do sleep 1; done'
echo "Bundler is ready!"
working-directory: packages/erc4337-contracts

# Deploy NFT Quest contracts (reads MSA infrastructure from contracts-anvil.json)
- 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
1 change: 1 addition & 0 deletions examples/nft-quest-contracts/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ cache
artifacts-zk
cache-zk
deployments-zk
typechain-types

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
Expand Down
74 changes: 0 additions & 74 deletions examples/nft-quest-contracts/contracts/NFTQuestPaymaster.sol

This file was deleted.

2 changes: 1 addition & 1 deletion examples/nft-quest-contracts/contracts/ZeekNFTQuest.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ contract ZeekNFTQuest is ERC721, Ownable {
uint256 private _tokenIds;
string private _baseTokenURI;

constructor(string memory baseTokenURI) ERC721("NFT Quest Zeek", "ZEEK") {
constructor(string memory baseTokenURI) ERC721("NFT Quest Zeek", "ZEEK") Ownable(msg.sender) {
_baseTokenURI = baseTokenURI;
}

Expand Down
53 changes: 0 additions & 53 deletions examples/nft-quest-contracts/deploy/deploy.ts

This file was deleted.

8 changes: 8 additions & 0 deletions examples/nft-quest-contracts/foundry.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[profile.default]
src = "contracts"
out = "out"
libs = ["node_modules"]
solc_version = "0.8.20"
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Solidity version specified in foundry.toml (0.8.20) does not match the contract pragma (^0.8.0). This mismatch can lead to inconsistent compilation results. Consider updating foundry.toml to use solc_version = "0.8.17" to match the project's hardhat.config files and maintain consistency.

Suggested change
solc_version = "0.8.20"
solc_version = "0.8.17"

Copilot uses AI. Check for mistakes.
evm_version = "london"
optimizer = true
optimizer_runs = 200
40 changes: 6 additions & 34 deletions examples/nft-quest-contracts/hardhat.config.ts
Original file line number Diff line number Diff line change
@@ -1,46 +1,18 @@
import "@matterlabs/hardhat-zksync";
import "@nomicfoundation/hardhat-toolbox";

import { HardhatUserConfig } from "hardhat/config";

const config: HardhatUserConfig = {
defaultNetwork: "zkSyncSepoliaTestnet",
solidity: "0.8.17",
networks: {
zkSyncSepoliaTestnet: {
url: "https://sepolia.era.zksync.dev",
ethNetwork: "sepolia",
zksync: true,
verifyURL: "https://explorer.sepolia.era.zksync.dev/contract_verification",
},
zkSyncMainnet: {
url: "https://mainnet.era.zksync.io",
ethNetwork: "mainnet",
zksync: true,
verifyURL: "https://zksync2-mainnet-explorer.zksync.io/contract_verification",
},
dockerizedNode: {
url: "http://localhost:3050",
ethNetwork: "http://localhost:8545",
zksync: true,
},
inMemoryNode: {
url: "http://127.0.0.1:8011",
ethNetwork: "localhost", // in-memory node doesn't support eth node; removing this line will cause an error
zksync: true,
localhost: {
url: "http://127.0.0.1:8545",
chainId: 1337,
},
hardhat: {
zksync: true,
chainId: 1337,
},
},
zksolc: {
version: "latest",
settings: {
// find all available options in the official documentation
// https://docs.zksync.io/build/tooling/hardhat/hardhat-zksync-solc#configuration
},
},
solidity: {
version: "0.8.17",
},
};

export default config;
8 changes: 3 additions & 5 deletions examples/nft-quest-contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@
"license": "MIT",
"repository": "https://github.com/matter-labs/zksync-acount-sdk.git",
"devDependencies": {
"@matterlabs/hardhat-zksync": "^1.1.0",
"@matterlabs/zksync-contracts": "^0.6.1",
"@openzeppelin/contracts": "^4.9.2",
"@nomicfoundation/hardhat-toolbox": "^4.0.0",
"@openzeppelin/contracts": "^5.4.0",
"@nomicfoundation/hardhat-verify": "^2.0.9",
"@types/chai": "^4.3.16",
"@types/mocha": "^10.0.7",
Expand All @@ -18,7 +17,6 @@
"hardhat": "^2.22.7",
"mocha": "^10.7.0",
"ts-node": "^10.9.2",
"typescript": "^5.5.4",
"zksync-ethers": "^6.15.0"
"typescript": "^5.5.4"
}
}
Loading
Loading