Skip to content

Commit

Permalink
Feature/avalanche c chain (#3)
Browse files Browse the repository at this point in the history
* Update fallback-supported-chains.json

* Add files via upload

* Rename avax-token.svg to avalanche-icon.svg

* add production details

* update workdlows and scripts

---------

Co-authored-by: lukachi <lukachisama@gmail.com>
Co-authored-by: xxxvik-xakerxxx <wolfis_rain@protonmail.com>
  • Loading branch information
3 people authored Mar 13, 2024
1 parent fa0b116 commit 282f525
Show file tree
Hide file tree
Showing 16 changed files with 1,685 additions and 1,404 deletions.
4 changes: 2 additions & 2 deletions .env-development
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ VITE_WORLDCOIN_APP_ID=app_staging_bd301ed345395d5c4021e590a682ed3c

VITE_RARIMO_CORE_API_URL='https://worldcoin.relayer.mainnet-beta.rarimo.com'

VITE_QUERY_VERIFIER_CONTRACT_ADDRESS_SEPOLIA: '0x9109c4b08eE452D6145D9496F9542A13f48701E4'
VITE_VERIFIED_SBT_CONTRACT_ADDRESS_SEPOLIA: ''
VITE_QUERY_VERIFIER_CONTRACT_ADDRESS_SEPOLIA='0x9109c4b08eE452D6145D9496F9542A13f48701E4'
VITE_VERIFIED_SBT_CONTRACT_ADDRESS_SEPOLIA=''

VITE_DEFAULT_CHAIN='SEPOLIA'
11 changes: 11 additions & 0 deletions .env-production
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
VITE_PORT=8095
VITE_APP_NAME='WorldID'

VITE_WORLDCOIN_APP_ID=app_staging_bd301ed345395d5c4021e590a682ed3c

VITE_RARIMO_CORE_API_URL='https://worldcoin.relayer.rarimo.com'

VITE_QUERY_VERIFIER_CONTRACT_ADDRESS_AVALANCHE='0xFEb582Bc9a161380769aFaA56d84f8cf89783c8a'
VITE_VERIFIED_SBT_CONTRACT_ADDRESS_AVALANCHE=''

VITE_DEFAULT_CHAIN='AVALANCHE'
6 changes: 2 additions & 4 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
on:
workflow_dispatch:
branches:
- main
- legacy

jobs:
converge:
Expand Down Expand Up @@ -30,5 +27,6 @@ jobs:
echo $GITHUB_SHA
- name: Run Build
run: |
cp .env-development .env
. $(werf ci-env github --as-file)
werf export web --tag ghcr.io/$GITHUB_REPOSITORY:$GITHUB_SHA
werf export --dev web --tag ghcr.io/$GITHUB_REPOSITORY:$GITHUB_SHA
3 changes: 2 additions & 1 deletion .github/workflows/actions_onlymain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ jobs:
echo $GITHUB_SHA
- name: Run Build
run: |
cp .env-development .env
. $(werf ci-env github --as-file)
werf export web --tag ghcr.io/$GITHUB_REPOSITORY:$GITHUB_SHA
werf export --dev web --tag ghcr.io/$GITHUB_REPOSITORY:$GITHUB_SHA
deploy:
name: Deploy
Expand Down
20 changes: 19 additions & 1 deletion .github/workflows/tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'
- '[0-9]+.[0-9]+.[0-9]+-stable.[0-9]+'

jobs:
converge:
Expand Down Expand Up @@ -29,5 +30,22 @@ jobs:
echo $GITHUB_REF_NAME
- name: Run Build
run: |
cp .env-production .env
. $(werf ci-env github --as-file)
werf export web --tag ghcr.io/$GITHUB_REPOSITORY:$GITHUB_REF_NAME
werf export --dev web --tag ghcr.io/$GITHUB_REPOSITORY:$GITHUB_REF_NAME
deploy:
name: Deploy
needs: converge
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: ConfigCreate
run: |
mkdir ~/.kube/
echo "${{ secrets.K8SCONFIG_MAIN }}" | base64 -d > config
mv config ~/.kube/
kubectl set image deployment webclient template=ghcr.io/$GITHUB_REPOSITORY:$GITHUB_REF_NAME -n worldcoin
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ stats.html
.yarn
.yarnrc.yml

.env
.env.production
.env.development
.env.analyze
Expand Down
14 changes: 6 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@
"pre-push": "yarn rsc"
},
"scripts": {
"vite-dev-server": "vite",
"vite-build": "vite build",
"start": "dotenv -e .env.local yarn vite-dev-server",
"build": "dotenv -e .env.production yarn vite-build",
"analyze": "dotenv -e .env.analyze yarn vite-build",
"build": "dotenv -e .env vite build",
"start": "dotenv -e .env vite",
"analyze": "vite build --mode analyze",
"lint": "yarn lint:styles && yarn lint:scripts",
"lint:styles": "stylelint \"src/**/*.{css,sass,scss}\" --max-warnings=0",
"lint:scripts": "eslint \"{src,config}/**/*.{js,ts,jsx,tsx}\" --cache --fix --max-warnings=0",
Expand All @@ -20,9 +18,9 @@
"generate-ether-types": "typechain --target=ethers-v5 'abis/**/*.json' --out-dir src/types/contracts"
},
"dependencies": {
"@distributedlab/jac": "^0.2.0-rc.25",
"@distributedlab/tools": "^0.2.0-rc.25",
"@distributedlab/w3p": "^0.2.0-rc.25",
"@distributedlab/jac": "^1.0.0-rc.12",
"@distributedlab/tools": "^1.0.0-rc.12",
"@distributedlab/w3p": "^1.0.0-rc.12",
"@iden3/js-crypto": "1.0.0-beta.1",
"@iden3/js-iden3-core": "1.0.0-beta.2",
"@iden3/js-jsonld-merklization": "1.0.0-beta.14",
Expand Down
13 changes: 13 additions & 0 deletions src/assets/fallback-supported-chains.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
{
"AVALANCHE": {
"id": "43114",
"name": "Avalanche C-Chain",
"rpcUrl": "https://avax.meowrpc.com",
"explorerUrl": "https://snowtrace.io",
"token": {
"name": "AVAX",
"symbol": "AVAX",
"decimals": 18
},
"type": "EVM",
"icon": "avalanche"
},
"SEPOLIA": {
"id": "11155111",
"name": "Sepolia",
Expand Down
4 changes: 4 additions & 0 deletions src/assets/icons/avalanche-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export const RELAYER_RELAY_CHAIN_NAMES: Record<SUPPORTED_CHAINS, string> = {
MAINNET: 'Ethereum',
ARBITRUM: 'Arbitrum',
XDC: 'Xdc',
AVALANCHE: 'Avalanche',
}

export const config: {
Expand Down
1 change: 1 addition & 0 deletions src/enums/icon-names.enum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ export enum ICON_NAMES {
polygon = 'polygon',
ethereum = 'ethereum',
arbitrum = 'arbitrum',
avalanche = 'avalanche',

usersGroup4 = 'users-group-4',
robot = 'robot',
Expand Down
Loading

0 comments on commit 282f525

Please sign in to comment.