Skip to content

[ETCM-202] Provide Mantis command-line interface#746

Merged
mmrozek merged 7 commits intodevelopfrom
etcm-202-mantis-cli
Oct 21, 2020
Merged

[ETCM-202] Provide Mantis command-line interface#746
mmrozek merged 7 commits intodevelopfrom
etcm-202-mantis-cli

Conversation

@mmrozek
Copy link
Copy Markdown
Contributor

@mmrozek mmrozek commented Oct 20, 2020

Description

CLI to mantis. Options:

  • generating a new private key
  • deriving address from private key
  • generating allocs from private keys or addresses

@mmrozek mmrozek requested review from a user, kapke and mirkoAlic October 20, 2020 08:21
Copy link
Copy Markdown

@ghost ghost left a comment

Choose a reason for hiding this comment

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

  • Please update the README too
  • Other than that LGTM

val generatePrivateKeyCommand = "generate-private-key"
val deriveAddressCommand = "derive-address"
val generateAllocsCommand = "generate-allocs"
val useAddressesFlag = "useAddresses"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why not replace it with either --address=<address> or --key=<key (or in plural)? In that way it would be a bit easier and always clear what is passed without reaching for bool flags

val mallet = "mallet"
val faucet = "faucet"
val ecKeyGen = "eckeygen"
val cli = "mantis-cli"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why not just cli if not separate launcher is created?

@mmrozek mmrozek force-pushed the etcm-202-mantis-cli branch from e32f446 to ed84de0 Compare October 21, 2020 07:05
@mmrozek mmrozek force-pushed the etcm-202-mantis-cli branch from 3892874 to 659e94f Compare October 21, 2020 07:50
@mmrozek mmrozek force-pushed the etcm-202-mantis-cli branch from 659e94f to 8f5e412 Compare October 21, 2020 08:16

object Fixture {

def argument(name: String, value: Option[Any] = None): String = s"--$name${value.fold("")(v => s"=${v.toString}")}"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

very minor in current state - that Any there, it's fine now, but I'd consider using just String instead so any conversion needs to happen explicitly

Copy link
Copy Markdown
Contributor

@kapke kapke left a comment

Choose a reason for hiding this comment

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

LGTM!

@mmrozek mmrozek merged commit 6566015 into develop Oct 21, 2020
@mmrozek mmrozek deleted the etcm-202-mantis-cli branch October 21, 2020 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants