mahyarmoghadam / 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 integration tests

We use cypress for handling integration 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.

E2E Testing with Cypress + Hardhat

In order to run Cypress e2e tests locally, you must do the following:

  1. Define HARDHAT_INFURA_ID to your desired infura project ID in .env.
  2. Run the following:
docker compose -f hardhat-node.yml up

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.7%Language:Shell 0.4%Language:HTML 0.3%Language:CSS 0.1%