6c6661f621 | ||
---|---|---|
.. | ||
public | ||
src | ||
.gitignore | ||
README.md | ||
craco.config.js | ||
package-lock.json | ||
package.json | ||
tsconfig.json |
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.
- Click "Create a New Ethereum Pool".
- Click "Connect" to connect your Metamask.
- 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.
- 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.
- Click "Create".
- Confirm in your wallet.
- 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.
- Click "Interact with an existing Ethereum Pool".
- Click "Connect" to connect your Metamask.
- Paste the address you received when creating the pool in the "Migrator Address" field.
- You should see the Pool Balances load.
- Under "Add Liquidity", type an amount in the "Amount to add" field.
- Click "Add Liquidity".
- Confirm in your wallet.
- After the transaction is successful, the Pool Balances and Connected Wallet Balances should refresh.
Create and manage Solana pools
- Click "Manage Solana Liquidity pools".
- Connect your wallet.
- 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