This is hydra bridge frontend app that uses hydra-bridge-backend api as source of data and hydra bridge smart contract to approve token spending.
This is POC/beta version with basic functionalities for bridging. Features that are covered:
- Connecting metamask wallet
- Approving hydra bridge smart contract to use tokens
- Showing available routes through hop and polygon bridges
- Bridging founds L1-L2 from ethereum mainnet to polygon, arbitrum, optimism and from goerli testnet to polygon mumbai testnet
Install NodeJS and Yarn node version 16.13.2.
Copy env.example
in .env
and populate missing variables.
REACT_APP_API_URL
is api that project uses, if you use localhost use http://localhost:3001/api
to get backend api, if not put here dev environment api
- use commands:
yarn dev
for launching app ongoerli
test networkyarn production
for launching app onmainnet
network
To display errors, run:
yarn lint
To apply possible fixes, run :
yarn lint:fix
Root folder contains:
.env.example
which is file example of.env
file.gitignore
contains all files and folders to ignore.nvmrc
file that contains nvm version of node that's used in projectpackage.json
npm configuration filetsconfig.json
file that configures typescript for projectwindow.d.ts
typescript definitions for window objectyarn.lock
file is main source of information about the current versions of dependencies in project
index.html
app entry pointmanifest.json
is a simple JSON file in our website that tells the browser about your website on user's mobile device or desktop.robots.txt
tells search engine crawlers which URLs the crawler can access on our site
App.tsx
that's component that contains main routes of appindex.css
that's basic css file for app entry pointindex.tsx
index.tsx
it's app entry pointreact-app-env.d.ts
typescipt definition for react-scriptsreportWebVitals.ts
web vitals performance functionroutes.ts
file that contains app routessetupTests.ts
file where tests can be written
- folder contains helpers for calling backend services
- folder contains all app assets
- folder contains common components and files that can be reused
- folder that contains all helpers that app uses like
fetchWrapper.ts
,requestHelper.ts
etc.
- folder that contains app modules like
Home
andPage404
- folder that contains
theme
folder,Fallback.tsx
file andShell.tsx
where all routes are initialised and child components are passed toLayout
component along withSuspense
component for fallback
To see the Styleguide run the command below :
yarn storybook
The styleguide use the port 6006