0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Setting up the Uniswap interface repository for testnet

Posted at

English

I intended to reference the Uniswap interface repository, but encountered a bug where environment variables such as APPSFLYER and DATADOG were not found. I referred to the article below for guidance.
However, the article doesn't mention the error about DATADOG environment variables being not found, which caused an error in my environment.
This article adds information about that point.
https://www.sanghun.xyz/running-uniswap-frontend-locally-for-testnet-environment-en/

Commands

First, by entering these commands, I was able to successfully start the server in my case:

git clone https://github.com/Uniswap/interface
cd interface
git fetch --all --tags
git checkout tags/web/5.19.3
mkdir apps/web/src/utils/__generated__  # https://github.com/Uniswap/interface/issues/7631
# create .env.defaults file under project root.
# https://github.com/Uniswap/interface/issues/7678
cat <<EOL > .env.defaults
ALCHEMY_API_KEY='key'
AMPLITUDE_EXPERIMENTS_DEPLOYMENT_KEY='key'
APPSFLYER_API_KEY='key'
APPSFLYER_APP_ID="123"
DATADOG_CLIENT_TOKEN="key"
DATADOG_PROJECT_ID="123"
FIAT_ON_RAMP_API_URL='https://api.uniswap.org'
MOONPAY_API_KEY='key'
MOONPAY_API_URL='https://api.moonpay.com'
MOONPAY_WIDGET_API_URL='https://api.moonpay.com'
INFURA_PROJECT_ID="123"
ONESIGNAL_APP_ID="123"
QUICKNODE_BNB_RPC_URL='https://api.uniswap.org'
SENTRY_DSN='http://sentry.com'
SHAKE_CLIENT_ID="123"
SHAKE_CLIENT_SECRET="123"
SIMPLEHASH_API_KEY='key'
SIMPLEHASH_API_URL='https://api.simplehash.com'
STATSIG_PROXY_URL='https://api.statsig.com'
TEMP_SCANTASTIC_URL='https://api.uniswap.org'
TRADING_API_KEY='key'
TRADING_API_URL='https://api.uniswap.org'
UNISWAP_API_KEY='key'
UNISWAP_API_BASE_URL='https://api.uniswap.org'
UNISWAP_APP_URL='https://app.uniswap.org'
WALLETCONNECT_PROJECT_ID="123"
UNITAGS_API_URL='https://api.uniswap.org/unitags'
FIREBASE_APP_CHECK_DEBUG_TOKEN='token'
EOL
yarn
yarn web start

The added part is about DATADOG. It references config/jest-presets/jest/globals.js:

DATADOG_CLIENT_TOKEN="key"
DATADOG_PROJECT_ID="123"

For detailed explanations, please refer to the referenced article.
According to the author, version 5.19.3 should work, so I'm only creating .env.defaults and adding those environment variables.

日本語

Uniswapのinterfaceリポジトリを参考にしようと思いましたが、APPSFLYERやDATADOG等の環境変数が見つからないというバグに陥り、下記記事を参考にさせていただきました。
ただ、下記記事の場合DATADOGの環境変数がnot foundになるエラーについて言及されていないため、私の環境ではエラーになりました。
この記事ではその点について追記しています。

コマンド

まずはじめに、このコマンドを入力することで私の場合無事サーバーを立ち上げることができました。

git clone https://github.com/Uniswap/interface
cd interface
git fetch --all --tags
git checkout tags/web/5.19.3
mkdir apps/web/src/utils/__generated__  # https://github.com/Uniswap/interface/issues/7631
# create .env.defaults file under project root.
# https://github.com/Uniswap/interface/issues/7678
cat <<EOL > .env.defaults
ALCHEMY_API_KEY='key'
AMPLITUDE_EXPERIMENTS_DEPLOYMENT_KEY='key'
APPSFLYER_API_KEY='key'
APPSFLYER_APP_ID="123"
DATADOG_CLIENT_TOKEN="key"
DATADOG_PROJECT_ID="123"
FIAT_ON_RAMP_API_URL='https://api.uniswap.org'
MOONPAY_API_KEY='key'
MOONPAY_API_URL='https://api.moonpay.com'
MOONPAY_WIDGET_API_URL='https://api.moonpay.com'
INFURA_PROJECT_ID="123"
ONESIGNAL_APP_ID="123"
QUICKNODE_BNB_RPC_URL='https://api.uniswap.org'
SENTRY_DSN='http://sentry.com'
SHAKE_CLIENT_ID="123"
SHAKE_CLIENT_SECRET="123"
SIMPLEHASH_API_KEY='key'
SIMPLEHASH_API_URL='https://api.simplehash.com'
STATSIG_PROXY_URL='https://api.statsig.com'
TEMP_SCANTASTIC_URL='https://api.uniswap.org'
TRADING_API_KEY='key'
TRADING_API_URL='https://api.uniswap.org'
UNISWAP_API_KEY='key'
UNISWAP_API_BASE_URL='https://api.uniswap.org'
UNISWAP_APP_URL='https://app.uniswap.org'
WALLETCONNECT_PROJECT_ID="123"
UNITAGS_API_URL='https://api.uniswap.org/unitags'
FIREBASE_APP_CHECK_DEBUG_TOKEN='token'
EOL

yarn
yarn web start

追記した箇所はDATADOGについてです。
config/jest-presets/jest/globals.js を参考にしています。

DATADOG_CLIENT_TOKEN="key"
DATADOG_PROJECT_ID="123"

細かい解説は参考記事を参照して欲しいです。
筆者によると、バージョン5.19.3なら動くとのことなので、.env.defaultsを作成してその環境変数を加えているのみです。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?