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

Various improvements to the CLI, allow voters to revote for a group #1840

Merged
merged 24 commits into from
Nov 25, 2019

Conversation

asaj
Copy link
Contributor

@asaj asaj commented Nov 23, 2019

Description

Miscellaneous CLI improvements:

  • Use toFixed rather than toString. The latter can format large numbers in exponential notation, causing transactions to fail to send
  • Print BigNumbers as string rather than BigNumber objects
  • Make transfer commands consistent with the rest of the CLI
  • Checks in election:vote, lockedgold:lock
  • Fix validation of key lengths
  • Fix validatorgroup:member examples
  • Infer ECDSA key when registering validator

Fix bug in Election.sol that prevented voting twice for the same group, add unit test.

Tested

Ran a ganache chain with yarn test:livechain and ran CLI commands against it

Other changes

  • Make devchain command names consistent

Related issues

Copy link
Contributor

@lucasege lucasege left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, only small nitpicks

packages/cli/src/utils/helpers.ts Show resolved Hide resolved
packages/cli/src/commands/lockedgold/lock.ts Outdated Show resolved Hide resolved
@asaj asaj self-assigned this Nov 23, 2019
@codecov
Copy link

codecov bot commented Nov 23, 2019

Codecov Report

Merging #1840 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #1840    +/-   ##
=======================================
  Coverage    74.2%   74.2%            
=======================================
  Files         278     278            
  Lines        7653    7653            
  Branches      956     672   -284     
=======================================
  Hits         5679    5679            
  Misses       1857    1857            
  Partials      117     117
Flag Coverage Δ
#mobile 74.2% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e0eca3b...6ea9a6d. Read the comment docs.

@asaj asaj added the automerge Have PR merge automatically when checks pass label Nov 23, 2019
@asaj asaj removed the automerge Have PR merge automatically when checks pass label Nov 24, 2019
@asaj asaj added the automerge Have PR merge automatically when checks pass label Nov 25, 2019
@celo-ci-bot-user celo-ci-bot-user merged commit c16631b into master Nov 25, 2019
@celo-ci-bot-user celo-ci-bot-user deleted the asaj/cli branch November 25, 2019 06:12
@asaj asaj restored the asaj/cli branch November 25, 2019 06:59
aaronmgdr added a commit that referenced this pull request Nov 26, 2019
* master: (61 commits)
  [Wallet] Handle `/v/<code` deep links for phone verifications (#1776)
  Patch tslint auto fix for macOS Catalina until tslint#6.x is out (#1802)
  Fix typos (#1855)
  Update documentation sidebar (#1861)
  [Wallet] Update forno dev documentation (#1818)
  [Docs] Correct typo
  Validator UX docs for baklava network (#1688) (#1849)
  Various improvements to the CLI, allow voters to revote for a group (#1840)
  Serialize to hex string (#1848)
  Update faucet to pull from the reserve when possible (#1844)
  Fix elect validators migration, deploy integration (#1847)
  Configurable genesis balances (#1838)
  Deploy new version of Celostats and minnor change from celo-blockchain (#1714)
  Make default node URL consistent in celocli (#1805)
  Onboarding feedback (#1811)
  return at least true, when the function is returning bool (#1825)
  Minor Contractkit changes (#1819)
  Point end-to-end tests back to master (#1824)
  Update migration config to correct protocol parameters (#1822)
  Update with new istanbul lookback window size flag (#1820)
  ...

# Conflicts:
#	yarn.lock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Have PR merge automatically when checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CLI prints validator score as BigNumber
3 participants