Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uma Voting CLI: More testing on mainnet/testnets and Metamask Provider #901

Closed
nicholaspai opened this issue Feb 10, 2020 · 3 comments
Closed
Assignees
Labels
bug Something isn't working
Milestone

Comments

@nicholaspai
Copy link
Member

nicholaspai commented Feb 10, 2020

Currently it works well and has been tested on localhost using provided web3 accounts, seems to break on Metamask when signing transactions

Reading from mainnet seems to work, but have not verified writing to mainnet

@nicholaspai nicholaspai added the bug Something isn't working label Feb 10, 2020
@nicholaspai nicholaspai self-assigned this Feb 10, 2020
@nicholaspai
Copy link
Member Author

@mrice32 @chrismaree

For example,

CLI currently breaks on mainnet because it cannot call() Voting.rounds(roundID) because the currently deployed contract does not have a public array rounds which we added in in #832 .

@nicholaspai nicholaspai added this to the Voting CLI milestone Feb 13, 2020
@nicholaspai
Copy link
Member Author

nicholaspai commented Feb 13, 2020

MetaMask connectivity bugs:

  • Handling Big Numbers:
    • The node-metamask npm package has one file RemoteMetaMaskProvider.js which I believe overwrites all of the web3 send calls. Basically every single web3 query or sendTransaction goes through this method, however this method as implemented fails in certain situations. For example, a call to web3.eth.getBalance(address) fails if the account has more than 1e21 ETH. This is very possible in a testing environment. This is because the method at some point fails to convert from the scientific notation of the number back into a string. This causes a bignumber error because you cannot pass in scientific notation into a big number.
  • Events: Metamask is having problems reading some events such as "PriceResolved" or "VoteRevealed" making retrieving rewards error-prone. Sometimes I've been able to read "VoteRevealed" events via web3.contract.getPastEvents but never have been able to read "PriceResolved". Perhaps related to this

@nicholaspai
Copy link
Member Author

Forked node-metamask and attempted to resolve the first issue in our forked repo

PR to node-metamask

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants