Skip to content

Commit

Permalink
Merge pull request #223 from gnosis/wonderland-issues
Browse files Browse the repository at this point in the history
Fix the Wonderland issues
  • Loading branch information
auryn-macmillan authored Aug 8, 2023
2 parents 5bb8109 + 18679e4 commit 0dfeac3
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 15 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/dev-cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,14 @@ on:
branches: master

env:
REACT_APP_ETHERSCAN_KEY: ${{ secrets.REACT_APP_ETHERSCAN_KEY }}
REACT_APP_INFURA_ID: ${{ secrets.REACT_APP_INFURA_ID }}
REACT_APP_ETHERSCAN_KEY: ${{ secrets.REACT_APP_ETHERSCAN_KEY }}
REACT_APP_GNOSISSCAN_KEY: ${{ secrets.REACT_APP_GNOSISSCAN_KEY }}
REACT_APP_POLYGONSCAN_KEY: ${{ secrets.REACT_APP_POLYGONSCAN_KEY }}
REACT_APP_BSCSCAN_KEY: ${{ secrets.REACT_APP_BSCSCAN_KEY }}
REACT_APP_OPTIMISTIC_ETHERSCAN_KEY: ${{ secrets.REACT_APP_OPTIMISTIC_ETHERSCAN_KEY }}
REACT_APP_ARBISCAN_KEY: ${{ secrets.REACT_APP_ARBISCAN_KEY }}
REACT_APP_SNOWTRACE_KEY: ${{ secrets.REACT_APP_SNOWTRACE_KEY }}
REACT_APP_MULTI_SEND_CONTRACT: "0xA238CBeb142c10Ef7Ad8442C6D1f9E89e07e7761"
REACT_APP_BACKEND_API_URL: "https://api.dev.zodiac.gnosisguild.org/api"

Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/prod-release-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,16 @@ on:
types: created

env:
REACT_APP_ETHERSCAN_KEY: ${{ secrets.REACT_APP_ETHERSCAN_KEY }}
REACT_APP_INFURA_ID: ${{ secrets.REACT_APP_INFURA_ID }}
REACT_APP_MULTI_SEND_CONTRACT: "0xA238CBeb142c10Ef7Ad8442C6D1f9E89e07e7761"
REACT_APP_BACKEND_API_URL: "https://api.zodiac.gnosisguild.org/api"
REACT_APP_ETHERSCAN_KEY: ${{ secrets.REACT_APP_ETHERSCAN_KEY }}
REACT_APP_GNOSISSCAN_KEY: ${{ secrets.REACT_APP_GNOSISSCAN_KEY }}
REACT_APP_POLYGONSCAN_KEY: ${{ secrets.REACT_APP_POLYGONSCAN_KEY }}
REACT_APP_BSCSCAN_KEY: ${{ secrets.REACT_APP_BSCSCAN_KEY }}
REACT_APP_OPTIMISTIC_ETHERSCAN_KEY: ${{ secrets.REACT_APP_OPTIMISTIC_ETHERSCAN_KEY }}
REACT_APP_ARBISCAN_KEY: ${{ secrets.REACT_APP_ARBISCAN_KEY }}
REACT_APP_SNOWTRACE_KEY: ${{ secrets.REACT_APP_SNOWTRACE_KEY }}

jobs:
deploy:
Expand Down
12 changes: 10 additions & 2 deletions packages/app/.env.sample
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
PORT=3000
HTTPS=true
REACT_APP_INFURA_ID=
REACT_APP_ETHERSCAN_KEY=
REACT_APP_MULTI_SEND_CONTRACT=0xA238CBeb142c10Ef7Ad8442C6D1f9E89e07e7761
REACT_APP_BACKEND_API_URL=http://localhost:3001/api
REACT_APP_BACKEND_API_URL=http://localhost:3001/api

# Blockchain explorers
REACT_APP_ETHERSCAN_KEY=
REACT_APP_GNOSISSCAN_KEY=
REACT_APP_POLYGONSCAN_KEY=
REACT_APP_BSCSCAN_KEY=
REACT_APP_OPTIMISTIC_ETHERSCAN_KEY=
REACT_APP_ARBISCAN_KEY=
REACT_APP_SNOWTRACE_KEY=
56 changes: 45 additions & 11 deletions packages/app/src/utils/explorers.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,40 @@
import { NETWORK } from "./networks"

const isDev = process.env.NODE_ENV === "development"
const REACT_APP_ETHERSCAN_KEY = process.env.REACT_APP_ETHERSCAN_KEY
if (!REACT_APP_ETHERSCAN_KEY) {
throw new Error("REACT_APP_ETHERSCAN_KEY is not set")
}

const REACT_APP_GNOSISSCAN_KEY = process.env.REACT_APP_GNOSISSCAN_KEY
if (!isDev && !REACT_APP_GNOSISSCAN_KEY) {
throw new Error("REACT_APP_GNOSISSCAN_KEY is not set")
}

const REACT_APP_POLYGONSCAN_KEY = process.env.REACT_APP_POLYGONSCAN_KEY
if (!isDev && !REACT_APP_POLYGONSCAN_KEY) {
throw new Error("REACT_APP_POLYGONSCAN_KEY is not set")
}

const REACT_APP_BSCSCAN_KEY = process.env.REACT_APP_BSCSCAN_KEY
if (!isDev && !REACT_APP_BSCSCAN_KEY) {
throw new Error("REACT_APP_BSCSCAN_KEY is not set")
}

const REACT_APP_OPTIMISTIC_ETHERSCAN_KEY = process.env.REACT_APP_OPTIMISTIC_ETHERSCAN_KEY
if (!isDev && !REACT_APP_OPTIMISTIC_ETHERSCAN_KEY) {
throw new Error("REACT_APP_OPTIMISTIC_ETHERSCAN_KEY is not set")
}

const REACT_APP_ARBISCAN_KEY = process.env.REACT_APP_ARBISCAN_KEY
if (!isDev && !REACT_APP_ARBISCAN_KEY) {
throw new Error("REACT_APP_ARBISCAN_KEY is not set")
}

const REACT_APP_SNOWTRACE_KEY = process.env.REACT_APP_SNOWTRACE_KEY
if (!isDev && !REACT_APP_SNOWTRACE_KEY) {
throw new Error("REACT_APP_SNOWTRACE_KEY is not set")
}

interface ExplorerData {
networkExplorerName: string
Expand Down Expand Up @@ -32,13 +66,13 @@ export const EXPLORERS_CONFIG: Record<NETWORK, ExplorerData> = {
explorerApiKey: REACT_APP_ETHERSCAN_KEY,
},
[NETWORK.GNOSIS_CHAIN]: {
networkExplorerName: "Blockscout",
networkExplorerUrl: "https://blockscout.com/xdai/mainnet",
networkExplorerApiUrl: "https://blockscout.com/xdai/mainnet/api",
networkExplorerName: "GnosisScan",
networkExplorerUrl: "https://gnosisscan.io",
networkExplorerApiUrl: "https://api.gnosisscan.io/api",
safeUrl: "https://app.safe.global/gno:",
safeTransactionApi: "https://safe-transaction-gnosis-chain.safe.global/",
verifyContractUrl:
"https://docs.blockscout.com/for-users/smart-contract-interaction/verifying-a-smart-contract",
verifyContractUrl: "https://gnosisscan.io/verifyContract",
explorerApiKey: REACT_APP_GNOSISSCAN_KEY,
},
[NETWORK.POLYGON]: {
networkExplorerName: "Polygonscan",
Expand All @@ -47,16 +81,16 @@ export const EXPLORERS_CONFIG: Record<NETWORK, ExplorerData> = {
safeUrl: "https://app.safe.global/matic:",
safeTransactionApi: "https://safe-transaction-polygon.safe.global/",
verifyContractUrl: "https://polygonscan.com/verifyContract",
explorerApiKey: REACT_APP_ETHERSCAN_KEY,
explorerApiKey: REACT_APP_POLYGONSCAN_KEY,
},
[NETWORK.BSC]: {
networkExplorerName: "Bscscan",
networkExplorerUrl: "https://bscscan.com/",
networkExplorerApiUrl: "https://bscscan.com/api",
networkExplorerApiUrl: "https://api.bscscan.com/api",
safeUrl: "https://app.safe.global/bsc:",
safeTransactionApi: "https://safe-transaction-bsc.safe.global/",
verifyContractUrl: "https://bscscan.com/verifyContract",
explorerApiKey: REACT_APP_ETHERSCAN_KEY,
explorerApiKey: REACT_APP_BSCSCAN_KEY,
},
[NETWORK.OPTIMISM]: {
networkExplorerName: "Optimism",
Expand All @@ -65,7 +99,7 @@ export const EXPLORERS_CONFIG: Record<NETWORK, ExplorerData> = {
safeTransactionApi: "https://safe-transaction-optimism.safe.global/",
safeUrl: "https://app.safe.global/oeth:",
verifyContractUrl: "https://optimistic.etherscan.io/verifyContract",
explorerApiKey: REACT_APP_ETHERSCAN_KEY,
explorerApiKey: REACT_APP_OPTIMISTIC_ETHERSCAN_KEY,
},
[NETWORK.ARBITRUM]: {
networkExplorerName: "Arbiscan",
Expand All @@ -74,7 +108,7 @@ export const EXPLORERS_CONFIG: Record<NETWORK, ExplorerData> = {
safeTransactionApi: "https://safe-transaction-arbitrum.safe.global/",
safeUrl: "https://app.safe.global/arb1:",
verifyContractUrl: "https://arbiscan.io/verifyContract",
explorerApiKey: REACT_APP_ETHERSCAN_KEY,
explorerApiKey: REACT_APP_ARBISCAN_KEY,
},
[NETWORK.AVALANCHE]: {
networkExplorerName: "Snowtrace",
Expand All @@ -83,7 +117,7 @@ export const EXPLORERS_CONFIG: Record<NETWORK, ExplorerData> = {
safeTransactionApi: "https://safe-transaction-avalanche.safe.global/",
safeUrl: "https://app.safe.global/avax:",
verifyContractUrl: "https://snowtrace.io/verifyContract",
explorerApiKey: REACT_APP_ETHERSCAN_KEY,
explorerApiKey: REACT_APP_SNOWTRACE_KEY,
},
}

Expand Down

1 comment on commit 0dfeac3

@vercel
Copy link

@vercel vercel bot commented on 0dfeac3 Aug 8, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

zodiac-safe-app-ui – ./packages/app

zodiac-safe-app-ui.vercel.app
zodiac-safe-app-ui-git-master-gnosis-guild.vercel.app
zodiac-safe-app-ui-gnosis-guild.vercel.app

Please sign in to comment.