From ce8a19c2484e3a86c06cede25dc18829e81932bf Mon Sep 17 00:00:00 2001 From: Jack Hamer Date: Wed, 27 Mar 2024 18:37:32 +0200 Subject: [PATCH 1/4] fix: replace goerli with sepolia --- .firebaserc | 4 ++-- .github/workflows/deploy-preview.yml | 2 +- .github/workflows/deploy-prod.yml | 10 +++++----- .github/workflows/deploy-staging.yml | 4 ++-- README.md | 6 +++--- cli-process-env.sh | 2 +- environments/.env.goerli | 5 ++--- environments/.env.mainnet | 1 - firebase.json | 2 +- nuxt.config.ts | 2 +- package.json | 8 ++++---- src/plugins/build.ts | 4 ++-- src/static/ilol48zhg7zypovk.html | 2 +- src/types/index.d.ts | 2 +- yarn.lock | 17 ++++++++++++++++- 15 files changed, 42 insertions(+), 29 deletions(-) diff --git a/.firebaserc b/.firebaserc index c08902f..9c1e796 100644 --- a/.firebaserc +++ b/.firebaserc @@ -8,8 +8,8 @@ "prod-mainnet": [ "zsync-dapp-checkout" ], - "prod-goerli": [ - "goerli-checkout-zksync" + "prod-sepolia": [ + "sepolia-checkout-zksync-lite" ], "staging": [ "staging-checkout-v1-zksync" diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml index 22141a8..8f16c3c 100644 --- a/.github/workflows/deploy-preview.yml +++ b/.github/workflows/deploy-preview.yml @@ -26,7 +26,7 @@ jobs: yarn lint --max-warnings 0 - name: "Build: dapp" - run: yarn run ci:build:goerli + run: yarn run ci:build:sepolia - name: "Setup node@18" uses: actions/setup-node@v2 diff --git a/.github/workflows/deploy-prod.yml b/.github/workflows/deploy-prod.yml index 38308a2..9505765 100644 --- a/.github/workflows/deploy-prod.yml +++ b/.github/workflows/deploy-prod.yml @@ -9,9 +9,9 @@ name: "Deploy production" default: "main" preview_env: type: string - description: "Test on goerli or mainnet" + description: "Test on sepolia or mainnet" required: true - default: "goerli" + default: "sepolia" jobs: build_and_preview: if: ${{ github.event.repository.full_name == github.repository }} @@ -102,8 +102,8 @@ jobs: with: node-version: 16 - - name: "Build goerli" - run: yarn run ci:build:goerli + - name: "Build sepolia" + run: yarn run ci:build:sepolia - name: "Setup node@18" uses: actions/setup-node@v2 @@ -114,6 +114,6 @@ jobs: with: repoToken: "${{ secrets.GITHUB_TOKEN }}" firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_ZSYNC_DAPP_CHECKOUT_PROD }}" - target: "prod-goerli" + target: "prod-sepolia" projectId: zsync-dapp-checkout channelID: live diff --git a/.github/workflows/deploy-staging.yml b/.github/workflows/deploy-staging.yml index f2d947d..781cfd6 100644 --- a/.github/workflows/deploy-staging.yml +++ b/.github/workflows/deploy-staging.yml @@ -26,8 +26,8 @@ jobs: run: | yarn lint --max-warnings 0 - - name: "Deploy target: goerli" - run: yarn run ci:build:goerli + - name: "Deploy target: sepolia" + run: yarn run ci:build:sepolia - name: "Setup node@18" uses: actions/setup-node@v2 diff --git a/README.md b/README.md index 8ffebed..ac37b66 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Resource targets for the zkCheckout are: ### Available Hosts * [```prod-mainnet```](https://checkout.zksync.io) -* [```prod-goerli```](https://checkout-goerli.zksync.io) +* [```prod-sepolia```](https://checkout-sepolia.zksync.io) * [```staging```](https://staging-checkout-v1.zksync.dev/link) ## Initial Setup / Static version generation @@ -23,11 +23,11 @@ Resource targets for the zkCheckout are: # install dependencies $ sh cli-dev.sh ci -# Populate .env file as of goerli connection && serve with hot reload at localhost:3000 +# Populate .env file as of sepolia connection && serve with hot reload at localhost:3000 $ yarn dev # static version generation -$ yarn ci:build:goerli +$ yarn ci:build:sepolia # afterward you'll have prepared distributive in /public folder # generate static for the mainnet release diff --git a/cli-process-env.sh b/cli-process-env.sh index fa6eb71..b95f426 100644 --- a/cli-process-env.sh +++ b/cli-process-env.sh @@ -13,7 +13,7 @@ Blue="\033[0;34m" # Blue BBlue="\033[1;34m" # Bold Blue if [ -z $NETWORK ]; then - NETWORK="goerli" + NETWORK="sepolia" fi if [ -z $ENV_VALUE ]; then diff --git a/environments/.env.goerli b/environments/.env.goerli index b643277..25913b9 100644 --- a/environments/.env.goerli +++ b/environments/.env.goerli @@ -15,12 +15,11 @@ APP_INFURA_API_KEY=f60769ea380544dfa0d2c28bdf869a38 APP_ONBOARDING_APP_ID=c4b83f7e-9bea-40d8-ad61-539f800863ee APP_FORTMATIC=pk_test_6CCD7EB1D7A9D0DB APP_PORTIS=68099bdc-3de9-4adc-ace0-e4664c1e77b4 -APP_CURRENT_NETWORK=goerli -ZK_NETWORK="goerli" +APP_CURRENT_NETWORK=sepolia +ZK_NETWORK="sepolia" UNS_KEY=356a3eb3-d413-490a-94ac-4c9bb312ff49 RAMP_MAINNET_HOST_API_KEY=j3b3oszn2vsr4qkz4att67zrucm6m6yjpfvxvtyy -RAMP_GOERLI_HOST_API_KEY=pcrtzve8ax7vjamoct77ombequtqhuxbc8wdknwg RAMP_SEPOLIA_HOST_API_KEY=85quy9gjwceh3rnca2nffo6wq67q776u6rjkyajf diff --git a/environments/.env.mainnet b/environments/.env.mainnet index 7fffb4a..689901d 100644 --- a/environments/.env.mainnet +++ b/environments/.env.mainnet @@ -21,6 +21,5 @@ ZK_NETWORK="mainnet" UNS_KEY=356a3eb3-d413-490a-94ac-4c9bb312ff49 RAMP_MAINNET_HOST_API_KEY=j3b3oszn2vsr4qkz4att67zrucm6m6yjpfvxvtyy -RAMP_GOERLI_HOST_API_KEY=pcrtzve8ax7vjamoct77ombequtqhuxbc8wdknwg RAMP_SEPOLIA_HOST_API_KEY=85quy9gjwceh3rnca2nffo6wq67q776u6rjkyajf diff --git a/firebase.json b/firebase.json index 51f8dcf..f7f4c03 100644 --- a/firebase.json +++ b/firebase.json @@ -39,7 +39,7 @@ ] }, { - "target": "prod-goerli", + "target": "prod-sepolia", "public": "public", "ignore": [ "firebase.json", diff --git a/nuxt.config.ts b/nuxt.config.ts index 0e327ce..2464119 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -272,7 +272,7 @@ const config: NuxtConfig = { anonymize_ip: true, // anonymize IP send_page_view: isProduction, // might be necessary to avoid duplicated page track on page reload linker: { - domains: ["checkout.zksync.io", "checkout-goerli.zksync.io", "web.app"], + domains: ["checkout.zksync.io", "checkout-sepolia.zksync.io", "web.app"], }, }, debug: isDebugEnabled, // enable to track in dev mode diff --git a/package.json b/package.json index db708ea..91613bb 100644 --- a/package.json +++ b/package.json @@ -101,7 +101,7 @@ "vue": "^2.6.12", "vue-custom-scrollbar": "^1.4.0", "vue-js-popover": "^1.2.1", - "zksync": "^0.13.1", + "zksync": "0.13.0", "zksync-checkout": "latest", "zksync-checkout-internal": "latest" }, @@ -121,15 +121,15 @@ "*.{md,vue}": "yarn lint:spell-check" }, "scripts": { - "local": "yarn ci:env 'goerli' 'dev' 1 1", + "local": "yarn ci:env 'sepolia' 'dev' 1 1", "dev": "yarn local && nuxt", "generate": "nuxt generate ", "start": "yarn local && nuxt start", "build": "yarn local && nuxt build", "ci:build:mainnet": "yarn ci:prepare:mainnet && yarn generate --fail-on-error", - "ci:build:goerli": "yarn ci:prepare:goerli && yarn generate --fail-on-error", + "ci:build:sepolia": "yarn ci:prepare:sepolia && yarn generate --fail-on-error", "ci:env": "sh cli-process-env.sh", - "ci:prepare:goerli": "yarn ci:env 'goerli' 'prod' 1", + "ci:prepare:sepolia": "yarn ci:env 'sepolia' 'prod' 1", "ci:prepare:mainnet": "yarn ci:env 'mainnet' 'prod' 1", "format:prettier": "prettier --config .prettierrc --ignore-path .prettierignore --write ./src/**/*.{ts,vue,js,scss,css}", "lint:spell-check": "cspell src/**/*.{ts,vue,js} README.md", diff --git a/src/plugins/build.ts b/src/plugins/build.ts index f8dbd07..96840cc 100644 --- a/src/plugins/build.ts +++ b/src/plugins/build.ts @@ -66,8 +66,8 @@ export const rampConfig: ZKIRampConfig = { url: undefined, // default hostApiKey: process.env.RAMP_MAINNET_HOST_API_KEY as string, }, - goerli: { + sepolia: { url: undefined, - hostApiKey: process.env.RAMP_GOERLI_HOST_API_KEY as string, + hostApiKey: process.env.RAMP_SEPOLIA_HOST_API_KEY as string, }, }; diff --git a/src/static/ilol48zhg7zypovk.html b/src/static/ilol48zhg7zypovk.html index 936a4b1..a5f6324 100644 --- a/src/static/ilol48zhg7zypovk.html +++ b/src/static/ilol48zhg7zypovk.html @@ -93,7 +93,7 @@

Initiate and launch the checkout for testing purposes

- +