wormhole/lp_ui
Evan Gray 6c6661f621 js: make packages comply with ci rule 2022-10-20 17:11:13 -05:00
..
public lp_ui: hello world stack 2021-09-13 15:17:52 +00:00
src lp_ui: update examples and lp_ui for latest sdk 2021-11-22 22:13:06 -05:00
.gitignore lp_ui: hello world stack 2021-09-13 15:17:52 +00:00
README.md lp_ui: update docs 2022-06-04 16:15:42 -04:00
craco.config.js sdk for migration & progress on lp_ui 2021-09-13 15:17:56 +00:00
package-lock.json lp_ui: update docs 2022-06-04 16:15:42 -04:00
package.json js: make packages comply with ci rule 2022-10-20 17:11:13 -05:00
tsconfig.json lp_ui: hello world stack 2021-09-13 15:17:52 +00:00

README.md

Liquidity Provider UI

This UI can be used for creating and managing migration pools as defined by solana/migration and ethereum/contracts/bridge/utils/Migrator.sol

Quick Start

npm ci
REACT_APP_CLUSTER=mainnet npm start

Navigate to http://localhost:3000/

Create a new Ethereum pool

Please ensure your wallet is connected to the desired chain! These instructions are suitable for any EVM chain.

  1. Click "Create a New Ethereum Pool".
  2. Click "Connect" to connect your Metamask.
  3. Paste the address of the token you want users to migrate from in the "From Token" field. This is the 'old' token that users currently hold.
  4. Paste the address of the token you want users to migrate to in the "To Token" field. This is the 'new' token that users will receive when migrating.
  5. Click "Create".
  6. Confirm in your wallet.
  7. After the transaction is successful, be sure to note the address of the migration pool. This is required in order to manage the pool.

In order for users to be able to use this newly created pool, "To" tokens must be added to the pool.

Add liquidity to an existing Ethereum pool

Please ensure your wallet is connected to the desired chain! These instructions are suitable for any EVM chain.

  1. Click "Interact with an existing Ethereum Pool".
  2. Click "Connect" to connect your Metamask.
  3. Paste the address you received when creating the pool in the "Migrator Address" field.
  4. You should see the Pool Balances load.
  5. Under "Add Liquidity", type an amount in the "Amount to add" field.
  6. Click "Add Liquidity".
  7. Confirm in your wallet.
  8. After the transaction is successful, the Pool Balances and Connected Wallet Balances should refresh.

Create and manage Solana pools

  1. Click "Manage Solana Liquidity pools".
  2. Connect your wallet.
  3. Enter the From token and To token.

If a pool for those tokens has not been created, a "This pool has not been instantiated! Click here to create it." button will appear. Otherwise, the button will be disabled and read "This pool is instantiated."

Before you can add liquidity, you must create a Share SPL Token Account. Similarly, before redeeming shares, you must create a 'From' SPL Token Account.

Prerequisites

NodeJS v14+

Install

npm ci

Develop

npm start

Build for local tilt network

npm run build

Build for testnet

REACT_APP_CLUSTER=testnet npm run build

Build for mainnet

REACT_APP_CLUSTER=mainnet npm run build

Test Server

npx serve -s build