Skip to content

Commit

Permalink
Refine dotenv files
Browse files Browse the repository at this point in the history
Each file should mirror the `.env.example` file. They should differ only
in values.
  • Loading branch information
kpyszkowski committed Nov 21, 2023
1 parent f9f9f51 commit 0f4509f
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 15 deletions.
16 changes: 9 additions & 7 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
REACT_APP_SUPPORTED_CHAIN_ID=1337
REACT_APP_ETH_HOSTNAME_HTTP=http://localhost:8545
REACT_APP_ETH_HOSTNAME_WS=ws://localhost:8545
REACT_APP_MULTICALL_ADDRESS=$MULTICALL_ADDRESS
REACT_APP_SUPPORTED_CHAIN_ID=$CHAIN_ID
REACT_APP_ETH_HOSTNAME_HTTP=$ETH_HOSTNAME_HTTP
REACT_APP_ETH_HOSTNAME_WS=$ETH_HOSTNAME_WS
REACT_APP_DAPP_DEVELOPMENT_TESTNET_CONTRACTS=$DAPP_DEVELOPMENT_TESTNET_CONTRACTS
REACT_APP_MULTICALL_ADDRESS=$MULTICALL_ADDRESS

REACT_APP_FEATURE_FLAG_TBTC_V2=true
REACT_APP_FEATURE_FLAG_TBTC_V2_REDEMPTION=true
REACT_APP_FEATURE_FLAG_MULTI_APP_STAKING=true
REACT_APP_FEATURE_FLAG_FEEDBACK_MODULE=false
REACT_APP_FEATURE_FLAG_POSTHOG=false
REACT_APP_FEATURE_FLAG_SENTRY=$SENTRY_SUPPORT
REACT_APP_FEATURE_FLAG_LEDGER_LIVE=true
REACT_APP_FEATURE_FLAG_POSTHOG=$POSTHOG_SUPPORT
REACT_APP_POSTHOG_API_KEY=$POSTHOG_API_KEY
REACT_APP_POSTHOG_HOSTNAME_HTTP=$POSTHOG_HOSTNAME_HTTP
REACT_APP_FEATURE_FLAG_SENTRY=$SENTRY_SUPPORT
REACT_APP_SENTRY_DSN=$SENTRY_DSN

REACT_APP_ELECTRUM_PROTOCOL=$ELECTRUM_PROTOCOL
REACT_APP_ELECTRUM_HOST=$ELECTRUM_HOST
REACT_APP_ELECTRUM_PORT=$ELECTRUM_PORT
REACT_APP_MOCK_BITCOIN_CLIENT=true
REACT_APP_MOCK_BITCOIN_CLIENT=false

REACT_APP_WALLET_CONNECT_PROJECT_ID=$WALLET_CONNECT_PROJECT_ID
3 changes: 2 additions & 1 deletion .env.production
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@ REACT_APP_SUPPORTED_CHAIN_ID=$CHAIN_ID
REACT_APP_ETH_HOSTNAME_HTTP=$ETH_HOSTNAME_HTTP
REACT_APP_ETH_HOSTNAME_WS=$ETH_HOSTNAME_WS
REACT_APP_DAPP_DEVELOPMENT_TESTNET_CONTRACTS=$DAPP_DEVELOPMENT_TESTNET_CONTRACTS
REACT_APP_MULTICALL_ADDRESS=

REACT_APP_FEATURE_FLAG_TBTC_V2=true
REACT_APP_FEATURE_FLAG_TBTC_V2_REDEMPTION=true
REACT_APP_FEATURE_FLAG_MULTI_APP_STAKING=true
REACT_APP_FEATURE_FLAG_FEEDBACK_MODULE=false
REACT_APP_FEATURE_FLAG_LEDGER_LIVE=true
REACT_APP_FEATURE_FLAG_POSTHOG=$POSTHOG_SUPPORT
REACT_APP_POSTHOG_API_KEY=$POSTHOG_API_KEY
REACT_APP_POSTHOG_HOSTNAME_HTTP=$POSTHOG_HOSTNAME_HTTP
REACT_APP_FEATURE_FLAG_SENTRY=$SENTRY_SUPPORT
REACT_APP_FEATURE_FLAG_LEDGER_LIVE=true
REACT_APP_SENTRY_DSN=$SENTRY_DSN

REACT_APP_ELECTRUM_PROTOCOL=$ELECTRUM_PROTOCOL
Expand Down
21 changes: 21 additions & 0 deletions .env.test
Original file line number Diff line number Diff line change
@@ -1,2 +1,23 @@
REACT_APP_SUPPORTED_CHAIN_ID=1337
REACT_APP_ETH_HOSTNAME_HTTP=$ETH_HOSTNAME_HTTP
REACT_APP_ETH_HOSTNAME_WS=$ETH_HOSTNAME_WS
REACT_APP_DAPP_DEVELOPMENT_TESTNET_CONTRACTS=$DAPP_DEVELOPMENT_TESTNET_CONTRACTS
REACT_APP_MULTICALL_ADDRESS=0x086813525A7dC7dafFf015Cdf03896Fd276eab60

REACT_APP_FEATURE_FLAG_TBTC_V2=true
REACT_APP_FEATURE_FLAG_TBTC_V2_REDEMPTION=true
REACT_APP_FEATURE_FLAG_MULTI_APP_STAKING=true
REACT_APP_FEATURE_FLAG_FEEDBACK_MODULE=false
REACT_APP_FEATURE_FLAG_LEDGER_LIVE=true
REACT_APP_FEATURE_FLAG_POSTHOG=$POSTHOG_SUPPORT
REACT_APP_POSTHOG_API_KEY=$POSTHOG_API_KEY
REACT_APP_POSTHOG_HOSTNAME_HTTP=$POSTHOG_HOSTNAME_HTTP
REACT_APP_FEATURE_FLAG_SENTRY=$SENTRY_SUPPORT
REACT_APP_SENTRY_DSN=$SENTRY_DSN

REACT_APP_ELECTRUM_PROTOCOL=$ELECTRUM_PROTOCOL
REACT_APP_ELECTRUM_HOST=$ELECTRUM_HOST
REACT_APP_ELECTRUM_PORT=$ELECTRUM_PORT
REACT_APP_MOCK_BITCOIN_CLIENT=false

REACT_APP_WALLET_CONNECT_PROJECT_ID=$WALLET_CONNECT_PROJECT_ID
11 changes: 4 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,16 @@ To make sure the changes made in local depository of `components` lib are implem

`yarn add-components-lib`

# Run T dapp against the Görli network
# Run T dapp against the Testnet network

## Update the `.env` file:
## Create local copy of the `.env` file:

Copy the `.env.example` file, rename it to the `.env` and apply the following changes:

```
REACT_APP_SUPPORTED_CHAIN_ID=5
REACT_APP_ETH_HOSTNAME_HTTP=<your http ETH hostname- eg. Infura>
REACT_APP_ETH_HOSTNAME_WS=<your ws ETH hostname- eg. Infura>
// We can skip this env variable- the dapp uses the correct address
// of Multicall contract for Görli under the hood.
REACT_APP_MULTICALL_ADDRESS=$MULTICALL_ADDRESS
```

## Setup
Expand All @@ -62,12 +61,10 @@ REACT_APP_MULTICALL_ADDRESS=$MULTICALL_ADDRESS

```
yarn upgrade @keep-network/coverage-pools@goerli \
@keep-network/ecdsa@goerli \
@keep-network/keep-core@goerli \
@keep-network/keep-ecdsa@goerli \
@keep-network/random-beacon@goerli \
@keep-network/tbtc@goerli \
@keep-network/tbtc-v2@goerli \
@keep-network/tbtc-v2.ts@goerli \
@threshold-network/coverage-pools@npm:@keep-network/coverage-pools@goerli \
@threshold-network/solidity-contracts@goerli
Expand Down

0 comments on commit 0f4509f

Please sign in to comment.