This project was bootstrapped with Create React App.
threshold-network
).local
network config in /solidity-v1/truffle-config.js
is correct for your chain.development
network config in hardhat.config.ts
is correct for your chain.local
network config in /solidity/truffle.js
is correct for your chain.development
network config in /solidity/truffle-config.js
is correct for your chain.development
network config in /hardhat.config.ts
is correct for your chain.yarn
yarn start:dev
Open http://localhost:3000 to view it in the browser.
Note: if you need re run T dapp and all necessary contracts are deployed use yarn start:dev -m
components
repoTo make sure the changes made in local depository of components
lib are implemented in T dapp you should recompile the lib using:
yarn add-components-lib
.env
file: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
yarn
yarn upgrade @threshold-network/solidity-contracts@goerli \
@keep-network/keep-core@1.8.1-goerli.0 \
@keep-network/keep-ecdsa@goerli \
@keep-network/tbtc@goerli \
@keep-network/coverage-pools@goerli
NOTE 1: We provide explicit version of the keep-core
package, because
using goerli
tag results in expected manifest
error - probably caused by bug
in Yarn: https://github.com/yarnpkg/yarn/issues/4731.
NOTE 2: The token-dashboard
package contains an indirect dependency to
@summa-tx/relay-sol@2.0.2
package, which downloads one of its sub-dependencies
via unathenticated git://
protocol. That protocol is no longer supported by
GitHub. This means that in certain situations installation of the package or
update of its dependencies using Yarn may result in The unauthenticated git protocol on port 9418 is no longer supported
error.
As a workaround, we advise changing Git configuration to use https://
protocol
instead of git://
by executing:
git config --global url."https://".insteadOf git://
yarn start
Open http://localhost:3000 to view it in the browser.
The following procedure allows to deploy T token dashboard to production:
releases/mainnet/<version>
. Release branch should never be merged to main
and creating a PR with a release branch is not required.
Dependencies and project version needs to be updated on the release branch.
All -dev
, -goerli
dependencies need to be updated to mainnet versions.
See this commit
for v1.0.0
release as a good example.preview.dashboard.threshold.network
under the directory named after the release branch. For example:
https://preview.dashboard.threshold.network/releases/mainnet/v1.0.0/index.html
.
A new version will be uploaded after each push to the release branch.dashboard.threshold.network
.Update package.json
to contain:
"@keep-network/coverage-pools": "goerli",
"@keep-network/ecdsa": "goerli",
"@keep-network/keep-core": "1.8.1-goerli.0",
"@keep-network/keep-ecdsa": "goerli",
"@keep-network/random-beacon": "goerli",
"@keep-network/tbtc": "goerli",
"@keep-network/tbtc-v2": "goerli",
"@keep-network/tbtc-v2.ts": "development",
"@threshold-network/components": "development",
"@threshold-network/solidity-contracts": "goerli",
Update .env
to contain:
REACT_APP_SUPPORTED_CHAIN_ID=5
REACT_APP_ETH_HOSTNAME_HTTP=https://goerli.infura.io/v3/<your API key here>
REACT_APP_ETH_HOSTNAME_WS=wss://goerli.infura.io/v3/<your API key here>
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_SENTRY_DSN=$SENTRY_DSN
REACT_APP_ELECTRUM_PROTOCOL=wss
REACT_APP_ELECTRUM_HOST=electrumx-server.test.tbtc.network
REACT_APP_ELECTRUM_PORT=8443
REACT_APP_MOCK_BITCOIN_CLIENT=false
REACT_APP_WALLET_CONNECT_PROJECT_ID=$WALLET_CONNECT_PROJECT_ID
Then build the docker container and run the dashboard:
docker build -t dashboard:latest .
docker run -p 3000:3000 -d dashboard