README and TODO
This commit is contained in:
parent
f35a993f77
commit
4715e44373
45
README.md
45
README.md
|
@ -1,28 +1,35 @@
|
|||
# Defi UI TODO
|
||||
# Defi UI
|
||||
|
||||
TODO
|
||||
Defi interface for Partisia Blockchain.
|
||||
|
||||
Demo for how to integrate PBC wallet into a web frontend or dApp.
|
||||
## Design and TODO
|
||||
|
||||
## Requirements
|
||||
Program Flow:
|
||||
|
||||
To be able to run the demo the following setup is required.
|
||||
- State Overview (Read-only):
|
||||
* [ ] Download list of swaps and tokens from Swap Router.
|
||||
* [ ] Download token contract state to determine contract types and basic info.
|
||||
* [ ] Download swap contract state to determine contract types.
|
||||
* [ ] Construct swap graph.
|
||||
* [ ] Continually download state of swap contracts, to ensure liquidity and pricing information is up to date.
|
||||
|
||||
- node.js version v.16.15.0 or newer.
|
||||
- Logging in:
|
||||
* [ ] User presses relevant login button.
|
||||
* [ ] User address is used to determine token balances.
|
||||
|
||||
## How to run?
|
||||
- Trading (Write!):
|
||||
* [ ] User selects tokens and amount to move between.
|
||||
* [ ] Compute shortest route; dijkstra's. (Can use one, or several weight algorithms: Liquidity, price, etc.)
|
||||
* [ ] Present route, fees, gas usage, etc.
|
||||
* [ ] User presses TRADE!
|
||||
* [ ] Sends transactions: _Approve to router_ and _route_ with the given route.
|
||||
* [ ] While transaction is underway, keep user informed about status.
|
||||
* [ ] Inform user of success or failure.
|
||||
* [ ] Refresh token balances.
|
||||
|
||||
First type check the Typescript using.
|
||||
## Disclaimer and Legalese
|
||||
|
||||
```shell
|
||||
npm ts
|
||||
```
|
||||
This is a personal project of me, Jmaa, and has nothing to do with either Partisia or Partisia Blockchain Foundation, with the exception of certain open source code which has an explicit AGPL license.
|
||||
|
||||
To run the example run
|
||||
|
||||
```shell
|
||||
npm install
|
||||
npm start
|
||||
```
|
||||
|
||||
and view the demo at localhost:8080
|
||||
The rest of the code is my own work, and is available using the MIT
|
||||
license.
|
||||
|
|
Loading…
Reference in New Issue
Block a user