Coder Social home page Coder Social logo

bridge-ui's People

Contributors

dependabot[bot] avatar eezcjkr avatar iamonuwa avatar johannbarbie avatar stevenjnpearce avatar sunify avatar troggy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

bridge-ui's Issues

Token page

Let's create a token page, so we can see rich info about colors

Change "Register token" to capture proposals, rather then executing actual tx

We want LeapDAO to govern which tokens may be registered on the chain. That's why registerToken became a governable method just recently and thus should be executed via applyProposal only.

With this change the current "Register token" page should be changed to allow everyone to propose a token to add.

I suggest to start small and just put a link to Google Form (or Typeform) asking for token address and freetext description.

Delivery

  • change "Register token" page to contain a link to Typeform/Google Form
  • create Typeform/Google form asking for:
    • token address
    • link to the token contract code
    • description of the token/project behind
    • point of contract should we have additional questions
  • form should have an explainer text that:
    • adding token is not guaranteed
    • adding is done manually via governance proposal and thus delayed (bad UX by the way)
    • only ERC20/ERC721 tokens are supported. ERC721 tokens should be also supporting EIP165 (@eshavkun right?)
  • create spreadsheet to collect the answers from the form. Share it with the team in Slack (readonly access for everyone is enough)
  • push a message in Slack once someone fills the form (via Zapier/IFTTT or maybe native stuff. Ask @johannbarbie if not sure). Maybe worth creating a #testnet channel for this to funnel all the monitoring to.
  • once form is submitted, be gentle and explain that "we'll get back to you once done. But no guarantees". Suggest to follow us on Twitter or join Slack.Ideally redirect back to Bridge UI

Bounty setup

gardener: @troggy / 10%
worker: @johannbarbie / 75%
reviewer: @troggy / 15%

Add more detailed description for each type of proposal

Governance proposals are changes to the plasma contract that are held for 7 days before applied to the contract. They are displayed for all users to see on testnet and mainnet.

Add more detailed description for each type of proposal, so that it is easier to understand the consequence of the change

Scope

  • for each of the possible governance parameter change, show the human-friendly description (maybe hidden by default to reduce noise for power users) on how the parameter affects the network.
  • distinguish between different contract upgrade proposals (operator, exitHandler, bridge, swapRegistry). Again, use human-friendly description
  • show link to the contract code for contract upgrade proposals — maybe just a link to the repo for now until we have something like https://github.com/leapdao/network-governance/issues/17 implemented)
  • show link to the contract code for governance upgrade proposals
  • show basic token information (name, ticker, NFT or not, link to etherscan) for register token proposals

Bounty setup

gardener: @troggy / 10%
worker: ___ / 70%
reviewer: ___ / 20%

Replace main page

It should:

  • explain what is about
  • explain what you can do
  • contain some links (repos, website, join slack and so on)

Stacking UI can be moved to /stake

I got a Runtime Error

I got a Runtime Error, Please Help me.

brokim@anonymous:~/workspace/leapdao/bridge-ui$ yarn start
yarn run v1.10.1
$ ./node_modules/.bin/webpack-dev-server --config webpack.config.dev.js
Starting type checking service...
Using 1 worker with 2048MB memory limit
ℹ 「wds」: Project is running at http://localhost:1234/
ℹ 「wds」: webpack output is served from /
ℹ 「wds」: 404s will fallback to /index.html
Type checking in progress...
⚠ 「wdm」: Hash: 535be0743da2710de64c
Version: webpack 4.27.1
Time: 35902ms
Built at: 2019. 01. 07. 오전 12:57:32
Asset Size Chunks Chunk Names
3f99887f903cf946744f9da9a982a961.png 14.7 KiB [emitted]
5af1ec187d63930a0998895a5df36b31.svg 1000 bytes [emitted]
7efbc71c1c0fb24892eb3df82f98cbce.png 833 bytes [emitted]
f5eac1518665bcf468ff23181ade4951.png 1.93 KiB [emitted]
index.535be0743da2710de64c.js 11.7 MiB main [emitted] main
index.html 1.49 KiB [emitted]
Entrypoint main = index.535be0743da2710de64c.js
[0] multi (webpack)-dev-server/client?http://localhost:1234 ./src/index.tsx 40 bytes {main} [built]
[./node_modules/antd/dist/antd.min.css] 455 bytes {main} [built]
[./node_modules/loglevel/lib/loglevel.js] 7.68 KiB {main} [built]
[./node_modules/mobx-react/index.module.js] 48.7 KiB {main} [built]
[./node_modules/react-dom/index.js] 1.33 KiB {main} [built]
[./node_modules/react-router-dom/es/index.js] 1010 bytes {main} [built]
[./node_modules/react-router/es/index.js] 723 bytes {main} [built]
[./node_modules/react/index.js] 190 bytes {main} [built]
[./node_modules/strip-ansi/index.js] 161 bytes {main} [built]
[./node_modules/url/url.js] 22.8 KiB {main} [built]
[./node_modules/webpack-dev-server/client/index.js?http://localhost:1234] (webpack)-dev-server/client?http://localhost:1234 7.78 KiB {main} [built]
[./node_modules/webpack-dev-server/client/overlay.js] (webpack)-dev-server/client/overlay.js 3.58 KiB {main} [built]
[./node_modules/webpack-dev-server/client/socket.js] (webpack)-dev-server/client/socket.js 1.05 KiB {main} [built]
[./node_modules/webpack/hot sync ^./log$] (webpack)/hot sync nonrecursive ^./log$ 170 bytes {main} [built]
[./src/index.tsx] 4.14 KiB {main} [built]
+ 1599 hidden modules

WARNING in EnvironmentPlugin - CONFIG environment variable is undefined.

You can pass an object with default values to suppress this warning.
See https://webpack.js.org/plugins/environment-plugin for example.

WARNING in EnvironmentPlugin - NETWORK_ID environment variable is undefined.

You can pass an object with default values to suppress this warning.
See https://webpack.js.org/plugins/environment-plugin for example.

WARNING in EnvironmentPlugin - PLASMA_NODE environment variable is undefined.

You can pass an object with default values to suppress this warning.
See https://webpack.js.org/plugins/environment-plugin for example.
Child html-webpack-plugin for "index.html":
Asset Size Chunks Chunk Names
3f99887f903cf946744f9da9a982a961.png 14.7 KiB [emitted]
7efbc71c1c0fb24892eb3df82f98cbce.png 833 bytes [emitted]
f5eac1518665bcf468ff23181ade4951.png 1.93 KiB [emitted]
+ 1 hidden asset
Entrypoint undefined = index.html
[./node_modules/html-webpack-plugin/lib/loader.js!./src/index.html] 2.27 KiB {0} [built]
[./node_modules/lodash/lodash.js] 527 KiB {0} [built]
[./node_modules/webpack/buildin/global.js] (webpack)/buildin/global.js 472 bytes {0} [built]
[./node_modules/webpack/buildin/module.js] (webpack)/buildin/module.js 497 bytes {0} [built]
[./src/apple-touch-icon.png] 82 bytes {0} [built]
[./src/config sync recursive ^././config.json$] ./src/config sync ^././config.json$ 186 bytes {0} [optional] [built]
[./src/config/env.js] 21 bytes {0} [not cacheable] [built]
[./src/config/index.ts] 703 bytes {0} [built]
[./src/config/testnet/config.json] 377 bytes {0} [optional] [built]
[./src/favicon-16x16.png] 82 bytes {0} [built]
[./src/favicon-32x32.png] 82 bytes {0} [built]
ℹ 「wdm」: Compiled with warnings.
ERROR in /home/brokim/workspace/leapdao/bridge-ui/node_modules/web3/types.d.ts(1,10):
TS2305: Module '"../@types/bn.js"' has no exported member 'BigNumber'.
ERROR in /home/brokim/workspace/leapdao/bridge-ui/node_modules/web3/types.d.ts(1,27):
TS2497: Module '"/home/brokim/workspace/leapdao/bridge-ui/node_modules/@types/bn.js/index"' resolves to a non-module entity and cannot be imported using this construct.
ERROR in /home/brokim/workspace/leapdao/bridge-ui/src/stores/contractStore.ts(55,7):
TS2322: Type 'import("/home/brokim/workspace/leapdao/bridge-ui/node_modules/web3/types").Contract' is not assignable to type 'import("/home/brokim/workspace/leapdao/bridge-ui/node_modules/@types/web3/eth/contract").default'.
Types of property 'methods' are incompatible.
Type '{ [fnName: string]: (...args: any[]) => import("/home/brokim/workspace/leapdao/bridge-ui/node_modules/web3/types").TransactionObject; }' is not assignable to type '{ [fnName: string]: (...args: any[]) => import("/home/brokim/workspace/leapdao/bridge-ui/node_modules/@types/web3/eth/types").TransactionObject; }'.
Index signatures are incompatible.
Type '(...args: any[]) => import("/home/brokim/workspace/leapdao/bridge-ui/node_modules/web3/types").TransactionObject' is not assignable to type '(...args: any[]) => import("/home/brokim/workspace/leapdao/bridge-ui/node_modules/@types/web3/eth/types").TransactionObject'.
Type 'import("/home/brokim/workspace/leapdao/bridge-ui/node_modules/web3/types").TransactionObject' is not assignable to type 'import("/home/brokim/workspace/leapdao/bridge-ui/node_modules/@types/web3/eth/types").TransactionObject'.
Types of property 'send' are incompatible.
Type '(tx?: import("/home/brokim/workspace/leapdao/bridge-ui/node_modules/web3/types").Tx) => import("/home/brokim/workspace/leapdao/bridge-ui/node_modules/web3/types").PromiEvent' is not assignable to type '(tx?: import("/home/brokim/workspace/leapdao/bridge-ui/node_modules/@types/web3/eth/types").Tx) => import("/home/brokim/workspace/leapdao/bridge-ui/node_modules/@types/web3/promiEvent").default'.
Type 'import("/home/brokim/workspace/leapdao/bridge-ui/node_modules/web3/types").PromiEvent' is not assignable to type 'import("/home/brokim/workspace/leapdao/bridge-ui/node_modules/@types/web3/promiEvent").default'.
Types of property 'once' are incompatible.
Type '{ (type: "transactionHash", handler: (receipt: string) => void): import("/home/brokim/workspace/leapdao/bridge-ui/node_modules/web3/types").PromiEvent; (type: "receipt", handler: (receipt: import("/home/brokim/workspace/leapdao/bridge-ui/node_modules/web3/types").TransactionReceipt) => void): import("/home/brok...' is not assignable to type '{ (type: "transactionHash", handler: (receipt: string) => void): import("/home/brokim/workspace/leapdao/bridge-ui/node_modules/@types/web3/promiEvent").default; (type: "receipt", handler: (receipt: import("/home/brokim/workspace/leapdao/bridge-ui/node_modules/@types/web3/types").TransactionReceipt) => void): im...'.
Types of parameters 'type' and 'type' are incompatible.
Type '"receipt"' is not assignable to type '"transactionHash"'.
ERROR in /home/brokim/workspace/leapdao/bridge-ui/src/stores/contractStore.ts(62,7):
TS2322: Type 'import("/home/brokim/workspace/leapdao/bridge-ui/node_modules/web3/types").Contract' is not assignable to type 'import("/home/brokim/workspace/leapdao/bridge-ui/node_modules/@types/web3/eth/contract").default'.
ERROR in /home/brokim/workspace/leapdao/bridge-ui/src/stores/contractStore.ts(68,5):
TS2322: Type 'import("/home/brokim/workspace/leapdao/bridge-ui/node_modules/web3/types").Contract' is not assignable to type 'import("/home/brokim/workspace/leapdao/bridge-ui/node_modules/@types/web3/eth/contract").default'.
ERROR in /home/brokim/workspace/leapdao/bridge-ui/src/stores/governanceContract.ts(8,31):
TS2307: Cannot find module 'web3/Eth/ABI'.
ERROR in /home/brokim/workspace/leapdao/bridge-ui/src/stores/token.ts(217,5):
TS2322: Type 'Promise<{ futureReceipt: PromiEvent; }>' is not assignable to type 'Promise'.
Type '{ futureReceipt: PromiEvent; }' is not assignable to type 'InflightTxReceipt'.
Types of property 'futureReceipt' are incompatible.
Type 'import("/home/brokim/workspace/leapdao/bridge-ui/node_modules/web3/types").PromiEvent<import("/home/brokim/workspace/leapdao/bridge-ui/node_modules/web3/types").TransactionReceipt>' is not assignable to type 'import("/home/brokim/workspace/leapdao/bridge-ui/node_modules/@types/web3/promiEvent").default<import("/home/brokim/workspace/leapdao/bridge-ui/node_modules/web3/types").TransactionReceipt>'.
Types of property 'once' are incompatible.
Type '{ (type: "transactionHash", handler: (receipt: string) => void): import("/home/brokim/workspace/leapdao/bridge-ui/node_modules/web3/types").PromiEvent<import("/home/brokim/workspace/leapdao/bridge-ui/node_modules/web3/types").TransactionReceipt>; (type: "receipt", handler: (receipt: import("/home/brokim/workspace/le...' is not assignable to type '{ (type: "transactionHash", handler: (receipt: string) => void): import("/home/brokim/workspace/leapdao/bridge-ui/node_modules/@types/web3/promiEvent").default<import("/home/brokim/workspace/leapdao/bridge-ui/node_modules/web3/types").TransactionReceipt>; (type: "receipt", handler: (receipt: import("/home/brokim/wor...'.
Types of parameters 'type' and 'type' are incompatible.
Type '"receipt"' is not assignable to type '"transactionHash"'.
ERROR in /home/brokim/workspace/leapdao/bridge-ui/src/utils/abis/bridge.ts(1,31):
TS2307: Cannot find module 'web3/Eth/ABI'.
ERROR in /home/brokim/workspace/leapdao/bridge-ui/src/utils/abis/exitHandler.ts(1,31):
TS2307: Cannot find module 'web3/Eth/ABI'.
ERROR in /home/brokim/workspace/leapdao/bridge-ui/src/utils/abis/operator.ts(1,31):
TS2307: Cannot find module 'web3/Eth/ABI'.
ERROR in /home/brokim/workspace/leapdao/bridge-ui/src/utils/abis/proxy.ts(1,31):
TS2307: Cannot find module 'web3/Eth/ABI'.
Version: typescript 3.2.2

Create a build script

Currently, we can only run dev mode, but should be able to build a dapp for deploy

Reduce bundle size

  • Replace react with preact for production build
  • Exclude unused modules from antd library
  • Replace parcel with webapck (seems parcel is not enough for such build)
  • ???

New name and structure

It was started like a staking UI, then like a UI for plasma bridge, but now there are a lot of stuff here:

  • Staking UI
  • Wallet
  • Block explorer
  • Token registration
  • Faucet
  • Status

and we want to add:

  • governance page (#60)
  • index page (#59)
  • ...

So, we probably should:

  1. rename thing;
  2. think about structure; maybe divide stuff by groups — staking + token reg + governance, wallet + faucet, block explorer + status
  3. or extract something from that app (i don't like it)

not able to create allowance

trying to deposit tokens on exits branch, i get this:

screen shot 2018-10-01 at 10 32 02 pm

it helped to changing token.js to this:

  private allowanceOrTokenId(valueOrTokenId: number) {
    if (this.isNft) return valueOrTokenId;

    return '0x' + new BigNumber(2 ** 255).toString(16);
  }

Update "Governance" page to support Veto and Confidence votes

Bounty :

Scope

Stakeholders should be able to see pending governance proposals and veto them.
Related: leapdao/leap-contracts#66
create a user interface (ideally in bridge) with the following abilities:

Deliverables

  • Userinterface

Gain for the project

  • Ability to govern chain updates.

Roles:

bounty gardener: @johannbarbie / 10%
bounty worker: open / 80%
bounty reviewer: open / 10%

setup UI for testnet

Delivery

Setup instance of the bridge UI for testnet:

  • should be served from testnet.leapdao.org
  • should be served from HTTPS. Blocked by leapdao/leap-node#114
  • should be configured to testnet leap node (#83)
  • should take governance contract address from the network, no hardcode (#84)
  • should show network's nodes on the Status page (ideally with #86)
  • should have home page with explanation/overview (#59)
  • should have social images and description so that link preview looks nice when shared (facebook, twitter, telegram)

Prerequisites

Requires (to be done separately): #76

Bounty setup

Value: 300 DAI

gardener: @troggy / 5%
worker: @troggy / 85%
reviewer: @johannbarbie / 10%

Show when it is the last chance to exit safely

Exits take time. In case governance proposal upgrades ExitHandler contract in a way which messes with the exits, it may be too late to exit even if proposal is not applied yet. Like this:

Timeline:

 <proposal created>-------------------------------<proposal applied>
                            <exit started>-------------------------------<exit finalized>

So we should display not only the time proposal becomes effective, but also the time left for safe exit. Safe exit = exit which will be finalized before the ExitHandler upgrade proposal applied.
This should consider the fact that it may take different time for different UTXOs to exit due to Plasma setup, somewhere in interval [exitDuration, exitDuration × 2] (ref) where exitDuration should be read from the ExitHandler contract.

Bounty

Scope

  • on a Governance page for each ExitHandler upgrade proposal show how much time remains for initiating safe exit
  • distinguish between different states (e.g. with color coding and easy to understand text hint):
    • safe — any exit will be finalized before ExitHandler upgrade proposal is applied (proposal applies after exitDuration × 2 seconds).
    • may not be safe — some exits MAY be finalized after ExitHandler upgrade proposal is applied (proposal applies in [exitDuration, exitDuration × 2])
    • not safe — any exit will be finalized after ExitHandler upgrade proposal is applied (proposal applies in less then exitDuration seconds)

Here not safe means that, depending on the nature of the ExitHandler upgrade, new contract logic MAY be used in the contract at the exit finalization time and thus potentially mess the exit. Probably not safe is a too strong wording here 🤔

Bounty setup

Size: XS as per bounty policy

gardener: @troggy / 10% — 20 DAI
worker: ___ / 80% — 160 DAI
reviewer: __ / 10% —20 DAI

Better UX for a buying slot/deposit

We need to send two transactions:

  1. approve on a token contract (to increase allowance)
  2. bet or deposit on bridge contract for buying slot and deposit respectively

Currently, we sending two tx in a row. So user confirming one tx and then MetaMask pops up again and asking to submit the second tx. It's a pretty bad UX.

Maybe we should increase allowance in separate form and show it like we showing the balance. If the user will try to buy a slot with stake > allowance we should disable submit button. Same for deposit

Show previous value for parameter changes

If proposal is to change some numeric parameter (e.g. epochLength), show the current value as well.
Like "Change epoch length from 1 to 3". Combined with #72 (out of scope here) it should be much easier for people to assess the change

Bounty

Scope

  • for each parameter change proposal show the current value as well
  • it should be (arguably) clear which is the current value and which is the new value

Bounty setup

Size: XS S

gardener: @troggy / 10%
worker: @troggy / 80%
reviewer: @johannbarbie / 10%

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.