From e1514e98afb8b667dcc1c55b519d1158bfeeb860 Mon Sep 17 00:00:00 2001 From: Nabarun Date: Thu, 8 May 2025 10:49:59 +0000 Subject: [PATCH] Add env for zenithd RPC URL (#30) Part of https://www.notion.so/Stage0-onboarding-flow-1e4a6b22d47280aba3b5da3ed1154ff5 Reviewed-on: https://git.vdb.to/LaconicNetwork/laconic-wallet-web/pulls/30 Co-authored-by: Nabarun Co-committed-by: Nabarun --- .env.example | 2 ++ src/utils/constants.ts | 6 +++--- .../compose/docker-compose-laconic-wallet-web.yml | 1 + stack/stack-orchestrator/config/app/run.sh | 2 ++ stack/stack-orchestrator/stack/laconic-wallet-web/README.md | 5 ++++- 5 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.env.example b/.env.example index 2e44075..7171052 100644 --- a/.env.example +++ b/.env.example @@ -5,5 +5,7 @@ REACT_APP_DEFAULT_GAS_PRICE=0.025 REACT_APP_GAS_ADJUSTMENT=2 REACT_APP_LACONICD_RPC_URL=https://laconicd-sapo.laconic.com +REACT_APP_ZENITHD_RPC_URL= + # Example: https://example-url-1.com,https://example-url-2.com REACT_APP_ALLOWED_URLS= diff --git a/src/utils/constants.ts b/src/utils/constants.ts index 959cb85..eacb04c 100644 --- a/src/utils/constants.ts +++ b/src/utils/constants.ts @@ -19,10 +19,10 @@ export const DEFAULT_NETWORKS: NetworksFormData[] = [ isDefault: true, }, { - chainId: 'zenith-testnet', - networkName: 'zenithd testnet', + chainId: 'zenith-testnet-stage0', + networkName: 'zenithd stage 0 testnet', namespace: COSMOS, - rpcUrl: 'https://zenith-node-rpc.com', + rpcUrl: process.env.REACT_APP_ZENITHD_RPC_URL || '', blockExplorerUrl: '', nativeDenom: 'znt', addressPrefix: 'zenith', diff --git a/stack/stack-orchestrator/compose/docker-compose-laconic-wallet-web.yml b/stack/stack-orchestrator/compose/docker-compose-laconic-wallet-web.yml index 0b62679..b253f2c 100644 --- a/stack/stack-orchestrator/compose/docker-compose-laconic-wallet-web.yml +++ b/stack/stack-orchestrator/compose/docker-compose-laconic-wallet-web.yml @@ -10,6 +10,7 @@ services: CERC_DEFAULT_GAS_PRICE: ${CERC_DEFAULT_GAS_PRICE:-0.025} CERC_GAS_ADJUSTMENT: ${CERC_GAS_ADJUSTMENT:-2} CERC_LACONICD_RPC_URL: ${CERC_LACONICD_RPC_URL:-https://laconicd.laconic.com} + CERC_ZENITHD_RPC_URL: ${CERC_ZENITHD_RPC_URL} CERC_ALLOWED_URLS: ${CERC_ALLOWED_URLS} command: ["bash", "/scripts/run.sh"] volumes: diff --git a/stack/stack-orchestrator/config/app/run.sh b/stack/stack-orchestrator/config/app/run.sh index 084f89b..a5c3ed1 100755 --- a/stack/stack-orchestrator/config/app/run.sh +++ b/stack/stack-orchestrator/config/app/run.sh @@ -10,6 +10,7 @@ echo "WALLET_CONNECT_ID: ${WALLET_CONNECT_ID}" echo "CERC_DEFAULT_GAS_PRICE: ${CERC_DEFAULT_GAS_PRICE}" echo "CERC_GAS_ADJUSTMENT: ${CERC_GAS_ADJUSTMENT}" echo "CERC_LACONICD_RPC_URL: ${CERC_LACONICD_RPC_URL}" +echo "CERC_ZENITHD_RPC_URL: ${CERC_ZENITHD_RPC_URL}" echo "CERC_ALLOWED_URLS: ${CERC_ALLOWED_URLS}" # Build with required env @@ -17,6 +18,7 @@ REACT_APP_WALLET_CONNECT_PROJECT_ID=$WALLET_CONNECT_ID \ REACT_APP_DEFAULT_GAS_PRICE=$CERC_DEFAULT_GAS_PRICE \ REACT_APP_GAS_ADJUSTMENT=$CERC_GAS_ADJUSTMENT \ REACT_APP_LACONICD_RPC_URL=$CERC_LACONICD_RPC_URL \ +REACT_APP_ZENITHD_RPC_URL=$CERC_ZENITHD_RPC_URL \ REACT_APP_ALLOWED_URLS=$CERC_ALLOWED_URLS \ yarn build diff --git a/stack/stack-orchestrator/stack/laconic-wallet-web/README.md b/stack/stack-orchestrator/stack/laconic-wallet-web/README.md index f28151e..4bf8d47 100644 --- a/stack/stack-orchestrator/stack/laconic-wallet-web/README.md +++ b/stack/stack-orchestrator/stack/laconic-wallet-web/README.md @@ -7,7 +7,7 @@ Instructions for running the `laconic-wallet-web` using [laconic-so](https://git * Clone the stack repo: ```bash - laconic-so fetch-stack git.vdb.to/cerc-io/laconic-wallet-web + laconic-so fetch-stack git.vdb.to/LaconicNetwork/laconic-wallet-web ``` * Build the container image: @@ -66,6 +66,9 @@ Instructions for running the `laconic-wallet-web` using [laconic-so](https://git # RPC endpoint of laconicd node (default: https://laconicd.laconic.com) CERC_LACONICD_RPC_URL= + + # RPC endpoint of zenithd node + CERC_ZENITHD_RPC_URL= ``` ## Start the deployment