protofire / eth-cli

CLI swiss army knife for Ethereum developers
https://www.npmjs.com/package/eth-cli
MIT License
239 stars 40 forks source link

Adding an account with parameters is not possible #142

Closed Agupane closed 3 years ago

Agupane commented 3 years ago

Description

If trying to add an eth account with parameters: name and addressOrPk it always returns the error:

 ›   Warning: You have to specify an address or private key
 ›   Error: EEXIT: 1

example:

eth address:add name="xDai Mainnet" addressOrPk="0x0dc0dfD22C6Beab74672EADE5F9Be5234AAa43cC" 

But if the account is added without those parameters it works:

eth address:add xDaiMainnet 0x0dc0dfD22C6Beab74672EADE5F9Be5234AAa43cC 

Response:

{
  "address": "0x0dc0dfD22C6Beab74672EADE5F9Be5234AAa43cC"
}
fvictorio commented 3 years ago

I'm not sure I understand this issue.

There is no such thing as named parameters in shell applications, at least that I'm aware of :confused: I mean, it's technically possible, but I've never seen it done.

You could have an interface that is --name=xDaiMainnet, but the address:add command uses positional arguments instead. It's just the way it is right now :man_shrugging:

Agupane commented 3 years ago

Ok in that case it's okey :) feel free to close the issue