Skip to content
This repository has been archived by the owner on Mar 28, 2023. It is now read-only.

keep-network/tbtc-dapp

Repository files navigation

tBTC dApp

This repository has been archived. tBTC v1 is no longer actively maintained and has been superseded by tBTC v2. tBTC v2 code is available in the keep-network/tbtc-v2 repository.

Development

Setup

The dApp requires a version of the tbtc.js library corresponding to the environment being tested on. Versions with version -pre* are for the Keep internal testnet and will not work with Ropsten. For Ropsten, look for versions of tbtc.js labeled -rc* instead. Clones of the`main` branch of this repository will by default use a -pre* version of the tbtc.js library; this version can be adjusted in the package.json file.

NOTE: The tbtc-dapp 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 NPM 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://

Run

npm start runs the app in the development mode.<br> Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits. You will also see any lint errors in the console.

Docker

To build a Docker image execute:

docker build . -t tbtc-dapp

To run the Docker image execute:

docker run -p 8080:80 tbtc-dapp

This will expose the app under http://localhost:8080.

Internal Testnet

To access the internal Keep testnet you need to be connected to it via VPN. Contracts with which the app is interacting are deployed under an address that depends on the current deployment; the latest tbtc.js version with prerelease id pre should point to the deployed version.

MetaMask

To use the internal testnet, a custom network must be added to MetaMask:

RPC URL

http://eth-tx-node.default.svc.cluster.local:8545

ChainID

1101