Skip to content

Commit a6d58b7

Browse files
committed
starting next
1 parent 8d991a3 commit a6d58b7

52 files changed

Lines changed: 1661 additions & 1883 deletions

Some content is hidden

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

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
push:
66
branches:
77
- main
8+
- next
89
workflow_dispatch:
910

1011
permissions:

.github/workflows/deploy.yml

Lines changed: 55 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@ name: Deploy to Vercel
22

33
on:
44
# On push to main, deploy to production unconditionally.
5+
# On push to next, deploy a non-prod build aliased to `next.<app>.aztec-labs.com`
6+
# so the v5 cycle has stable URLs alongside production.
57
push:
68
branches:
79
- main
10+
- next
811
# On PRs, deploy preview after CI passes. pull_request_target runs in the
912
# context of the base repo so it has access to secrets (needed for Vercel
1013
# deploys + PR comments) — we wait for the CI workflow on the PR head to
@@ -150,11 +153,32 @@ jobs:
150153
- name: Install Vercel CLI
151154
run: npm install --global vercel@latest
152155

156+
# Map the GitHub event → Vercel env slot. Hobby tier only ships three
157+
# slots, so we reuse them: main → production, next → preview,
158+
# PRs → development. `vercel build` has no "development" target, so for
159+
# PR pulls we rename the dropped .env.development.local to .env.preview.local
160+
# so the subsequent preview build picks it up.
161+
- name: Resolve Vercel environment slot
162+
run: |
163+
if [ "${{ github.event_name }}" == "push" ] && [ "${{ github.ref }}" == "refs/heads/main" ]; then
164+
echo "VERCEL_ENV_SLOT=production" >> "$GITHUB_ENV"
165+
elif [ "${{ github.event_name }}" == "workflow_dispatch" ] && [ "${{ inputs.production }}" == "true" ]; then
166+
echo "VERCEL_ENV_SLOT=production" >> "$GITHUB_ENV"
167+
elif [ "${{ github.event_name }}" == "push" ] && [ "${{ github.ref }}" == "refs/heads/next" ]; then
168+
echo "VERCEL_ENV_SLOT=preview" >> "$GITHUB_ENV"
169+
else
170+
echo "VERCEL_ENV_SLOT=development" >> "$GITHUB_ENV"
171+
fi
172+
153173
# ── Bridge deployment ──────────────────────────────────────────────
154174
- name: Pull Vercel Environment (Bridge)
155175
env:
156176
VERCEL_PROJECT_ID: ${{ secrets.BRIDGE_PROJECT_ID }}
157-
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} --cwd apps/bridge
177+
run: |
178+
vercel pull --yes --environment=$VERCEL_ENV_SLOT --token=${{ secrets.VERCEL_TOKEN }} --cwd apps/bridge
179+
if [ "$VERCEL_ENV_SLOT" = "development" ] && [ -f apps/bridge/.vercel/.env.development.local ]; then
180+
mv apps/bridge/.vercel/.env.development.local apps/bridge/.vercel/.env.preview.local
181+
fi
158182
159183
- name: Build and deploy Bridge
160184
id: deploy-bridge
@@ -170,11 +194,23 @@ jobs:
170194
fi
171195
echo "url=$DEPLOY_URL" >> $GITHUB_OUTPUT
172196
197+
# On push to `next`, point next.bridge.aztec-labs.com at the just-built
198+
# preview deployment. Main's production aliases are untouched.
199+
- name: Alias Bridge to next subdomain
200+
if: github.event_name == 'push' && github.ref == 'refs/heads/next'
201+
env:
202+
VERCEL_PROJECT_ID: ${{ secrets.BRIDGE_PROJECT_ID }}
203+
run: vercel alias set ${{ steps.deploy-bridge.outputs.url }} next.bridge.aztec-labs.com --token=${{ secrets.VERCEL_TOKEN }} --scope=${{ secrets.VERCEL_ORG_ID }}
204+
173205
# ── FPC Operator deployment ────────────────────────────────────────
174206
- name: Pull Vercel Environment (FPC Operator)
175207
env:
176208
VERCEL_PROJECT_ID: ${{ secrets.FPC_PROJECT_ID }}
177-
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} --cwd apps/fpc-operator
209+
run: |
210+
vercel pull --yes --environment=$VERCEL_ENV_SLOT --token=${{ secrets.VERCEL_TOKEN }} --cwd apps/fpc-operator
211+
if [ "$VERCEL_ENV_SLOT" = "development" ] && [ -f apps/fpc-operator/.vercel/.env.development.local ]; then
212+
mv apps/fpc-operator/.vercel/.env.development.local apps/fpc-operator/.vercel/.env.preview.local
213+
fi
178214
179215
- name: Build and deploy FPC Operator
180216
id: deploy-fpc
@@ -191,11 +227,21 @@ jobs:
191227
fi
192228
echo "url=$DEPLOY_URL" >> $GITHUB_OUTPUT
193229
230+
- name: Alias FPC Operator to next subdomain
231+
if: github.event_name == 'push' && github.ref == 'refs/heads/next'
232+
env:
233+
VERCEL_PROJECT_ID: ${{ secrets.FPC_PROJECT_ID }}
234+
run: vercel alias set ${{ steps.deploy-fpc.outputs.url }} next.fpc-operator.aztec-labs.com --token=${{ secrets.VERCEL_TOKEN }} --scope=${{ secrets.VERCEL_ORG_ID }}
235+
194236
# ── Swap deployment ────────────────────────────────────────────────
195237
- name: Pull Vercel Environment (Swap)
196238
env:
197239
VERCEL_PROJECT_ID: ${{ secrets.SWAP_PROJECT_ID }}
198-
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} --cwd apps/swap
240+
run: |
241+
vercel pull --yes --environment=$VERCEL_ENV_SLOT --token=${{ secrets.VERCEL_TOKEN }} --cwd apps/swap
242+
if [ "$VERCEL_ENV_SLOT" = "development" ] && [ -f apps/swap/.vercel/.env.development.local ]; then
243+
mv apps/swap/.vercel/.env.development.local apps/swap/.vercel/.env.preview.local
244+
fi
199245
200246
- name: Build and deploy Swap
201247
id: deploy-swap
@@ -212,6 +258,12 @@ jobs:
212258
fi
213259
echo "url=$DEPLOY_URL" >> $GITHUB_OUTPUT
214260
261+
- name: Alias Swap to next subdomain
262+
if: github.event_name == 'push' && github.ref == 'refs/heads/next'
263+
env:
264+
VERCEL_PROJECT_ID: ${{ secrets.SWAP_PROJECT_ID }}
265+
run: vercel alias set ${{ steps.deploy-swap.outputs.url }} next.swap.aztec-labs.com --token=${{ secrets.VERCEL_TOKEN }} --scope=${{ secrets.VERCEL_ORG_ID }}
266+
215267
# ── PR Comment ─────────────────────────────────────────────────────
216268
- name: Comment deployment URLs on PR
217269
if: github.event_name == 'pull_request_target'

apps/bridge/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515
"@aztec-kit/common": "workspace:*",
1616
"@aztec-kit/contracts-ethereum": "workspace:*",
1717
"@aztec-kit/embedded-wallet": "workspace:*",
18-
"@aztec/aztec.js": "v4.3.0-rc.1",
19-
"@aztec/entrypoints": "v4.3.0-rc.1",
20-
"@aztec/foundation": "v4.3.0-rc.1",
21-
"@aztec/stdlib": "v4.3.0-rc.1",
22-
"@aztec/wallet-sdk": "v4.3.0-rc.1",
18+
"@aztec/aztec.js": "v5.0.0-nightly.20260518",
19+
"@aztec/entrypoints": "v5.0.0-nightly.20260518",
20+
"@aztec/foundation": "v5.0.0-nightly.20260518",
21+
"@aztec/stdlib": "v5.0.0-nightly.20260518",
22+
"@aztec/wallet-sdk": "v5.0.0-nightly.20260518",
2323
"@emotion/react": "^11.14.0",
2424
"@emotion/styled": "^11.14.0",
2525
"@mui/icons-material": "^6.3.1",
@@ -29,7 +29,7 @@
2929
"viem": "^2.23.0"
3030
},
3131
"devDependencies": {
32-
"@aztec/wallets": "v4.3.0-rc.1",
32+
"@aztec/wallets": "v5.0.0-nightly.20260518",
3333
"@types/react": "^19.0.6",
3434
"@types/react-dom": "^19.0.3",
3535
"@vitejs/plugin-react": "^6.0.1",

apps/bridge/src/config/networks/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export interface NetworkConfig {
1919
const modules = import.meta.glob<{ default: NetworkConfig }>("./*.json", { eager: true });
2020

2121
/** Preference order; unknown ids sort alphabetically at the end. */
22-
const PREFERRED_ORDER = ["local", "testnet"];
22+
const PREFERRED_ORDER = ["local", "nextnet", "testnet"];
2323

2424
const NETWORKS: NetworkConfig[] = Object.values(modules)
2525
.map((m) => m.default)
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"id": "nextnet",
3+
"name": "Aztec Nextnet (Sepolia)",
4+
"aztecNodeUrl": "https://aztec-nextnet.alexghr.me",
5+
"l1RpcUrl": "https://sepolia.drpc.org",
6+
"l1ChainId": 11155111
7+
}

apps/bridge/src/config/networks/testnet.json

Lines changed: 0 additions & 7 deletions
This file was deleted.

apps/fpc-operator/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Operator dashboard for deploying and running a [SubscriptionFPC](../../packages/
88
yarn workspace @aztec-kit/fpc-operator dev
99
```
1010

11-
Requires an Aztec node (local sandbox or testnet RPC).
11+
Requires an Aztec node (local sandbox or testnet/nextnet RPC).
1212

1313
## UI
1414

@@ -19,14 +19,14 @@ Requires an Aztec node (local sandbox or testnet RPC).
1919

2020
## Scripts
2121

22-
All run with `yarn workspace @aztec-kit/fpc-operator <name>`. Each accepts `--network local|testnet`.
22+
All run with `yarn workspace @aztec-kit/fpc-operator <name>`. Each accepts `--network local|testnet|nextnet`.
2323

2424
| Script | Purpose |
2525
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
2626
| `deploy-admin:<network>` | Deploy the FPC-admin schnorr account. Local: SponsoredFPC pays. Testnet: bridges FJ + claims in the deploy tx. |
2727
| `deploy-fpc:<network>` | Deploy the SubscriptionFPC contract, then bridge FJ to it so it can sponsor gas. Writes a gitignored backup JSON to `backups/<network>.fpc-admin.json`. |
2828

29-
Run via `yarn setup:local` / `yarn setup:testnet` at the repo root (orchestrates admins + contracts + FPC + sign_ups).
29+
Run via `yarn setup:local` / `yarn setup:testnet` / `yarn setup:nextnet` at the repo root (orchestrates admins + contracts + FPC + sign_ups).
3030

3131
## Env vars
3232

apps/fpc-operator/package.json

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,21 @@
1212
"preview": "vite preview",
1313
"deploy-admin:local": "node --experimental-transform-types scripts/deploy-admin.ts --network local",
1414
"deploy-admin:testnet": "node --experimental-transform-types scripts/deploy-admin.ts --network testnet",
15+
"deploy-admin:nextnet": "node --experimental-transform-types scripts/deploy-admin.ts --network nextnet",
1516
"deploy-fpc:local": "node --experimental-transform-types scripts/deploy-fpc.ts --network local",
16-
"deploy-fpc:testnet": "node --experimental-transform-types scripts/deploy-fpc.ts --network testnet"
17+
"deploy-fpc:testnet": "node --experimental-transform-types scripts/deploy-fpc.ts --network testnet",
18+
"deploy-fpc:nextnet": "node --experimental-transform-types scripts/deploy-fpc.ts --network nextnet"
1719
},
1820
"dependencies": {
1921
"@aztec-kit/common": "workspace:*",
2022
"@aztec-kit/contracts-aztec": "workspace:*",
2123
"@aztec-kit/embedded-wallet": "workspace:*",
22-
"@aztec/aztec.js": "v4.3.0-rc.1",
23-
"@aztec/entrypoints": "v4.3.0-rc.1",
24-
"@aztec/foundation": "v4.3.0-rc.1",
25-
"@aztec/l1-artifacts": "v4.3.0-rc.1",
26-
"@aztec/stdlib": "v4.3.0-rc.1",
27-
"@aztec/wallet-sdk": "v4.3.0-rc.1",
24+
"@aztec/aztec.js": "v5.0.0-nightly.20260518",
25+
"@aztec/entrypoints": "v5.0.0-nightly.20260518",
26+
"@aztec/foundation": "v5.0.0-nightly.20260518",
27+
"@aztec/l1-artifacts": "v5.0.0-nightly.20260518",
28+
"@aztec/stdlib": "v5.0.0-nightly.20260518",
29+
"@aztec/wallet-sdk": "v5.0.0-nightly.20260518",
2830
"@emotion/react": "^11.14.0",
2931
"@emotion/styled": "^11.14.0",
3032
"@mui/icons-material": "^6.3.1",
@@ -35,12 +37,12 @@
3537
"viem": "^2.23.0"
3638
},
3739
"devDependencies": {
38-
"@aztec/accounts": "v4.3.0-rc.1",
39-
"@aztec/aztec-node": "v4.3.0-rc.1",
40-
"@aztec/constants": "v4.3.0-rc.1",
41-
"@aztec/noir-contracts.js": "v4.3.0-rc.1",
42-
"@aztec/pxe": "v4.3.0-rc.1",
43-
"@aztec/wallets": "v4.3.0-rc.1",
40+
"@aztec/accounts": "v5.0.0-nightly.20260518",
41+
"@aztec/aztec-node": "v5.0.0-nightly.20260518",
42+
"@aztec/constants": "v5.0.0-nightly.20260518",
43+
"@aztec/noir-contracts.js": "v5.0.0-nightly.20260518",
44+
"@aztec/pxe": "v5.0.0-nightly.20260518",
45+
"@aztec/wallets": "v5.0.0-nightly.20260518",
4446
"@types/react": "^19.0.6",
4547
"@types/react-dom": "^19.0.3",
4648
"@vitejs/plugin-react": "^6.0.1",

apps/fpc-operator/scripts/deploy-fpc.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* it on L2 via the bridge.
44
*
55
* Expects:
6-
* --network <local|testnet>
6+
* --network <local|testnet|nextnet>
77
* FPC_ADMIN_SECRET — FPC admin secret (from `deploy-admin`).
88
* FPC_SECRET — FPC contract key secret. When provided AND the derived
99
* contract is already on-chain, deploy is skipped.

apps/fpc-operator/src/config/networks/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export interface NetworkConfig {
1919
const modules = import.meta.glob<{ default: NetworkConfig }>("./*.json", { eager: true });
2020

2121
/** Preference order; unknown ids sort alphabetically at the end. */
22-
const PREFERRED_ORDER = ["local", "testnet"];
22+
const PREFERRED_ORDER = ["local", "nextnet", "testnet"];
2323

2424
const NETWORKS: NetworkConfig[] = Object.values(modules)
2525
.map((m) => m.default)

0 commit comments

Comments
 (0)