From 58b2611ae2e6fdaa46b56bcaf1517dd0d2176e09 Mon Sep 17 00:00:00 2001 From: Michalina Date: Thu, 8 Feb 2024 11:03:53 +0100 Subject: [PATCH] Require use of Node version >=18 We had a problem with deploying portal on Node 16. We're adding Node configuration required for successfull deploy of the portal. Also updating README. --- README.md | 36 +++++++++++++++++------------------- package.json | 7 +++++-- 2 files changed, 22 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 820ec04..b5f7538 100644 --- a/README.md +++ b/README.md @@ -1,33 +1,31 @@ -# Example Token Bridge UI · [![GitHub license](https://img.shields.io/badge/license-Apache2.0-blue.svg)](https://github.com/wormhole-foundation/example-token-bridge-ui/blob/main/LICENSE) ![Build](https://github.com/wormhole-foundation/example-token-bridge-ui/actions/workflows/build.yaml/badge.svg) +# Example Token Bridge UI -This app serves as a testnet and local devnet UI for the example token bridge contracts. +This repository is a fork of Wormhole's [example Token Bridge +UI](https://wormhole-foundation.github.io/example-token-bridge-ui/). Support for +Base Sepolia, Optimism Sepolia and Arbitrum Sepolia was added. -View at https://wormhole-foundation.github.io/example-token-bridge-ui/ +Deployed code can be used to attest/register tokens on L2 chains (when deloyed +locally, this can be done from http://localhost:3000/#/register) and to bridge +tokens between chains (http://localhost:3000/#/transfer). -## Install +## Local deploy: -```bash -npm ci -``` - -## Develop - -If using the node version specified in `.nvmrc`, run with +To deploy locally, execute: ```bash +nvm use 18 +npm ci npm start ``` -If on latest LTS (v18.16.0), run with +## Deploy using `serve`: -```bash -NODE_OPTIONS=--openssl-legacy-provider npm start -``` - -*Note: the above issue should be resolved after updating to the latest mui + react versions* - -## Build +To deploy using `serve` as a static server, execute: ```bash +nvm use 18 +npm ci npm run build +serve -s build -l 4000 ``` + diff --git a/package.json b/package.json index 5ee8aef..7300619 100644 --- a/package.json +++ b/package.json @@ -64,8 +64,8 @@ "use-debounce": "^7.0.0" }, "scripts": { - "start": "react-app-rewired start", - "build": "react-app-rewired --max_old_space_size=6144 build", + "start": "NODE_OPTIONS=--openssl-legacy-provider react-app-rewired start", + "build": "NODE_OPTIONS=--openssl-legacy-provider react-app-rewired --max_old_space_size=6144 build", "test": "react-app-rewired test", "eject": "react-scripts eject" }, @@ -125,5 +125,8 @@ "url": "^0.11.0", "util": "^0.12.4", "vm-browserify": "^1.1.2" + }, + "engines": { + "node": ">=16" } }