Udit-takkar / frontend-v2

Web UI for V2 of Across

Home Page:frontend-v2-uma.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Across v2 frontend

Web UI for V2 of the Across Protocol.

Development

Local setup

Clone this repository, install deps and create an .env.local file by running:

yarn
cp .env.example .env.local

Adjust values in the created .env.local accordingly.

Start dev server

Start the frontend with a dev server by running:

yarn start

Build production bundle

yarn build

Run unit tests

yarn test

Run e2e tests

Our e2e tests rely on a local hardhat node that forks mainnet. First, set the env var HARDHAT_INFURA_ID in your .env file and make sure to run such a node before starting the tests:

yarn hardhat:node

We use cypress for handling e2e tests. To run the tests locally, first make sure to have a local dev sever running:

yarn start

If you want to start the cypress UI run:

yarn cypress:open

If you want to run the tests from the CLI, run:

yarn cypress:run

Per default cypress expects the frontend running on http://localhost:3000. To change that run:

CYPRESS_BASE_URL=http://localhost:3333 yarn cypress:run

Important CSS values

Z-index

Navbar - 1000 Toast - 99999 Modal - 99998

Contributing

Have a look at CONTRIBUTING to get more information on contributions and best practices.

Pull Data from Amplitude

The src/ampli directory can be refreshed with new tracking data by running the following steps:

  1. Run yarn ampli login to log in to Amplitude
  2. Run yarn ampli pull web
    1. If Amplitude requests to create a new project, let it generate a ampli.json file.

About

Web UI for V2 of Across

frontend-v2-uma.vercel.app

License:GNU Affero General Public License v3.0


Languages

Language:TypeScript 98.5%Language:JavaScript 0.6%Language:MDX 0.6%Language:HTML 0.3%Language:CSS 0.0%Language:Shell 0.0%