Giter Club home page Giter Club logo

lockdrop-ui's Introduction

Plasm Network Genesis Lockdrop

Build Status

This repository contains smart contracts and DApp helper to make participation a bit easy.

Native tokens genesis distribution in Plasm Network carry out according to Lock events in Ethereum Lockdrop smart contract.

Audit

  1. By Quantstamp at 11 Feb 2020: audit report

Documentation

This project was bootstrapped with Create React App and Ionic Framework

Available Scripts

In the project directory, you can run:

yarn start

Runs the app in the development mode.

Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.

You will also see any lint errors in the console.

yarn test

Launches the test runner in the interactive watch mode.

See the section about running tests for more information.

yarn run build

Builds the app for production to the build folder.

It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.

Your app is ready to be deployed!

See the section about deployment for more information.

yarn run eject

Note: this is a one-way operation. Once you eject, you can’t go back!

If you aren’t satisfied with the build tool and configuration choices, you can eject at any time. This command will remove the single build dependency from your project.

Instead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except eject will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.

You don’t have to ever use eject. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.

Learn More

You can learn more in the Create React App documentation.

To learn React, check out the React documentation.

Code Splitting

This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting

Analyzing the Bundle Size

This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size

Making a Progressive Web App

This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app

Advanced Configuration

This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration

Deployment

This section has moved here: https://facebook.github.io/create-react-app/docs/deployment

yarn run build fails to minify

This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify

lockdrop-ui's People

Contributors

akru avatar bobo-k2 avatar dependabot[bot] avatar hoonsubin avatar msftgits avatar roy1210 avatar satellitex avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lockdrop-ui's Issues

Ethereum lockdrop contract instance refactor

Required Tasks

  • initiate smart contract instance via its address
  • allow different instances to be created depending on the network and lockdrop variant

Description

Currently, the Ethereum smart contract is initiated via the ABI, but this will limit the number of contracts it can handle.
Store the contract address in the data file and refactor the contract instance code to work with different contracts and allow it the change the instance depending on the network and the lock variant (1st, 2nd, 3rd)

Estimated dev time

1 day

Make Plasm address for no lockdorp user.

2020-05-22 20 00 21
Plasm address and ethereum public key cannot be validated by a user who is only an affiliate.

Required Tasks

The above can do it.

Description

Affiliate users and those who do not participate in Lockdorp will also be showing the results.

Estimated dev time

{How long this task will take to be resolved in approximate working days}

implement safe signature request

Currently, the lockdrop UI uses an unsafe signature request to obtain an account's public key. This does not work well with status.im or other mobile DApp browsers.

Estimated development time: 2 research days, 1 working day

Rework on the codebase for app optimization

Overview

Note: we may split this issue into multiple separate issues based on the Acceptance Criteria section for organizing the task.

What?

Refactor the Plasm Lockdrop UI codebase so that the code is easily readable and the overall app is optimized.

We need the following changes made to the Lockdrop UI:

Why?

We do not have any global state management components for the app. This makes the project very difficult to scale and performance is very bad as a static page web application. We should remove unused packages, improve the code structure by reducing prop drilling and make the code clean.

Acceptance Criteria

The criteria that must be met in order to consider this deliverable to be completed.

Estimated Duration

How long will it take for this ticket to be delivered? Please write the estimated duration (ex: 2 weeks) in three tires for satisfying everything mentioned in the 'Acceptance Criteria.'

  • Optimistic: 3 weeks
  • Average: 4 weeks
  • Pessimistic: 1.5 month

Optimize Ethereum block read time

Required Tasks

  • narrow searching blocks
  • optimize data collecting

Description

The current lockdrop UI searches for the entire chain and there are too much waste. The loading time for the ETH lockdrop page is too long so we should do something about it.

Estimated dev time

4 development days

View Ethereum public key.

Required Tasks

  • When click claim Plasm address, view plasm address with ethereum public key(options).

Description

The Ethereum public key is currently not visible in the UI. Can you change it to show this?
If you’re reluctant to ask the user to provide the Ethereum public key

It's needed for sending referral bonuses.

Estimated dev time

5/20

Error when run `sudo npm install` under `app` folder

I have clone the repo and run sudo npm install under app folder.
However terminal shows following error. Please advise.

Node: `v10.16.2`
React: `16.12.0`
➜  app git:(master) sudo npm install

> [email protected] preinstall /Users/nyanbu/Shoe/Programming/Plasm/ethereum-lockdrop/app/node_modules/scrypt
> node node-scrypt-preinstall.js

Error: Error: Command failed: ./configure
configure: error: in `/Users/nyanbu/Shoe/Programming/Plasm/ethereum-lockdrop/app/node_modules/scrypt/scrypt/scrypt-1.2.0':
configure: error: C compiler cannot create executables
See `config.log' for more details


> [email protected] install /Users/nyanbu/Shoe/Programming/Plasm/ethereum-lockdrop/app/node_modules/scrypt
> node-gyp rebuild

gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/Users/nyanbu/Shoe/Programming/Plasm/ethereum-lockdrop/app/node_modules/scrypt/build'
gyp ERR! System Darwin 19.2.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/nyanbu/Shoe/Programming/Plasm/ethereum-lockdrop/app/node_modules/scrypt
gyp ERR! node -v v10.16.2
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN [email protected] requires a peer of [email protected] - 3 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of canvas@^2.5.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of bufferutil@^4.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of utf-8-validate@^5.0.2 but none is installed. You must install peer dependencies yourself.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/nyanbu/.npm/_logs/2020-01-02T15_36_54_898Z-debug.log

image

P.S: Another error about installing Drizzle will come up if the node version is latest version. (more than version 12, I guess...)

Lockdrop Issue - Unable to see PLM to claim

Describe the bug
Ethereum lockdrop worked and I can see my locks & the transaction hash has 84 confirmations
https://etherscan.io/tx/0x1c973fde5c4bc278f0ce6d78e3eaf4eacf4d8ce6b992ede86d7c35950e960aa5
The option to claim PLM is not appearing
There is a mix of "unexpected end of JSON input" & "Failed to Fetch"

To Reproduce
Steps to reproduce the behavior:
I don't know if you can I am using Chrome I am logged into both my Meta Mask & Polka WEB 3.0 extensions

Expected behavior
I expected to be able to claim my PLM

Screenshots
image
image

Desktop (please complete the following information):

  • OS: Win 10
  • Browser Chrome
  • Version 85.0.4183.121 (Official Build) (64-bit)

Additional context
Add any other context about the problem here.

0x6a80 invalid data received error from Ledger device with MetaMask

Describe the bug
Several users have reported that signing a lock transaction with Ledger from MetaMask gives them the TransportStatusError. Ledger device: Invalid data received (0x6a80) error and the transaction fails.

To Reproduce
Steps to reproduce the behavior:

  1. Open the Ethereum lockdrop page
  2. input data (duration, amount, introducer, etc.)
  3. Submit transaction
  4. See error

Expected behavior
The user should be able to sign the transaction from their ledger device without any issue.

Screenshots

IMG_0508

Desktop (please complete the following information):

  • OS: Windows, MacOS
  • Browser Chrome
  • Version [e.g. 22]

Additional context
Considering that some users were able to lock their token with Ledger without any problem, this may be due to compatibility issues with either the browser, MM extension, or Ledger firmware.
This error requires more samples before persuing further investigation.

Fix React Router showing 404 error for different pages

Required Tasks

  • read the related resources
  • fix react router bug so it can show pages with multiple directories
  • implement hash routers instead to make it a single-page web application or configure browser history

Description

As the title suggests, the lockdrop web application will show a 404 error when it tries to go to a different page. This is due to page directories not being found. One solution is to use hashed routing or changing some settings from the config file. I will need to research the optimal solution for future works.
read the following articles:
https://medium.com/@Dragonza/react-router-problem-with-gh-pages-c93a5e243819
https://levelup.gitconnected.com/deploying-a-create-react-app-with-routing-to-github-pages-f386b6ce84c2
facebook/create-react-app#1765

Estimated dev time

1 day

Audit Fixing.

Required Tasks

  • {task 1}
  • {task 2}
  • ...

Description

{Task description, special notes, Dependencies issue or PR, etc.}

Estimated dev time

{How long this task will take to be resolved in approximate working days}

Metamask request load reduction

Required Tasks

I have also checked the code now. A little major refurbishment is required. Summarize issues for specific solutions.
-[ ] Limit the number of data that getAllLockEvents takes. (Or set it to only your own.)
-[ ] Change your LockEvent to getPastEvent and filter.
-[ ] Change introducer related LockEvent to getPastEvent and filter.

Description

{Task description, special notes, Dependencies issue or PR, etc.}

Estimated dev time

{How long this task will take to be resolved in approximate working days}

Create 2nd Lockdrop landing page

Required Tasks

  • create a landing page that will allow users to access every lockdrop related pages

Description

Estimated dev time

around 2 working days

Remove testnet lockdrop page

Required Tasks

  • Remove all references to dusty and ropsten
  • Remove dusty eth lockdrop route
  • Comment out lock function and optimize the page to be a lockdrop result display-only app
  • Instead of using @plasm/types package, use hard-coded types

Description

The latest version of Dusty has removed the lockdrop module and will no longer be needed. So to keep the page light and functional, we should remove all references to Dusty, refactor the mainnet lockdrop pages. Essentially, we want to optimize the lockdrop UI so that it can display the current user's locks and allow them to send unlock transactions to the contract.

Plasm network runtime should only need these types to run

{
        AccountInfo: 'AccountInfoWithRefCount',
        AuthorityId: 'AccountId',
        AuthorityVote: 'u32',
        Claim: {
          amount: 'u128',
          approve: 'BTreeSet<AuthorityId>',
          complete: 'bool',
          decline: 'BTreeSet<AuthorityId>',
          params: 'Lockdrop'
        },
        ClaimId: 'H256',
        ClaimVote: {
          approve: 'bool',
          authority: 'u16',
          claim_id: 'ClaimId'
        },
        DollarRate: 'u128',
        Keys: 'SessionKeys2',
        Lockdrop: {
          duration: 'u64',
          public_key: '[u8; 33]',
          transaction_hash: 'H256',
          type: 'u8',
          value: 'u128'
        },
        PredicateHash: 'H256',
        RefCount: 'u8',
        TickerRate: {
          authority: 'u16',
          btc: 'u128',
          eth: 'u128'
        }
      }

Lockdropped at 2nd eth lockdrop. Can't see PLM in my wallet.

image

image

Hello. I participated in 2nd eth lockdrop, and successfully received PLM tokens at that time. Until today I did nothing. Today I re-opened my Plasm wallet and can't see my tokens. I need help to solve this.


Claim ID: 0x6ed8b3f5dc1abed21b28f66f2c30004f6613759c2aa343570a482fb587bd0352
Sending to WPDRwyMdzZrroQPni3bZfqzTzeJPZyc85Ba8pR8M17uERpM

Create Bitcoin Lockdrop Page

Required Tasks

  • create Bitcoin lockdrop page layout
  • create Bitcoin lockdrop helpers and middleware
  • implement lock result page

Description

The page structure will be simple since bitcoin data from the bitcoin lockdrop will most likely be read via a fetch API call.
But implementing the helpers can take a while as I have to start from scratch

Estimated dev time

one working week

Infinite loop loading on final step of claim procedure

I noticed this issue in the claim phase of ETH Dusty Lockdrop, in particular on last phase: after clicking on "V" button. The loading circle starts an infinity loop without any result.
I made a new one transaction for lockdrop and it works very well, but the old transaction is in infinity loop.

Can not read 1st Lockdorp

photo_2020-09-08 12 46 00

Chrome からFirst lock dropにアクセスしようとしたところ、このような表示が現れページが進みません。
ディスコードの方でも似たような議論があったようなのでブラウザの履歴やキャッシュをクリアしてみましたが改善しないため、こちらにてご報告いたします。

When I try to access the First lock drop from Chrome, the above message appears and the page does not proceed.
There seems to be a similar discussion in Discord, so I tried clearing the history and cache of the browser, but since it does not improve, I will report here.

Claim complete flag handling

Description

Lockdrop UI ignore claim.complete field and propose user to request a claim again.

image

Fix

Check complete flag and don't do anything if claim finish.

Amount field validation

Description

The amount field should pass only [0-9] and . symbols, currently , also passed but raise Missing input error that confuses users.

1 page please

Currently, these are 2 lockdrop pages. Can we make it 1 page?

Create 2nd ETH lockdrop page

Required Tasks

  • add another contract instance with the 2nd lockdrop contract
  • separate data sources from the 1st lockdrop and create a 2nd lockdrop data file
  • duplicate ETH lockdrop page from the first one
  • create a separate tab to switch between 1st and 2nd lockdrop results/application

Description

The overall page structure will be similar to that of the 1st lockdrop page, but it will be using different data (ex: different deadline and contract instance).

Estimated dev time

around one working week

Having Issues with the lockdrop

Hey there
can you guys plz help me out with the Claimed Lockdrop was Declines and i cant claim my PLD.And my ETH is still lock im going to attach Picture to see if that could help me show you what im talking about
Pla

Locked Token Not Founded

Describe the bug
A community member locked ETH but the locked ETH isn't reflected on the page like below

Screen Shot 2020-09-07 at 18 49 46

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'The lockdrop page'
  2. Click on 'Unlock token''
  3. See error

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Fix eth pubkey to plasm address mismatch bug

Required Tasks

  • add encryption unit tests
  • add unit testing for efficient work
  • find the reason as to why this bug is happening!

Description

There is a glitch where the plasm address generated from the lockdrop participant's public key does not match the one on Plasm chain. This glitch is most likely caused due to a minor issue within the cryptographic pipeline.

Estimated dev time

two research days and 6 hours of work

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.