Open MicaiahReid opened 2 years ago
The reason for this is that on the command line you can't provide a JavaScript array of accounts; you have to provide multiple account options, e.g., ganache --wallet.account "0xkey,balance" --wallet.account "0xkey,balance"
@davidmurdoch But ganache --wallet.account "0xkey,balance"
fails, it has to be --wallet.accounts
. So maybe the answer isn't to add the --accounts
alias but to change --wallet.accounts
to --wallet.account
(but that would be a breaking change so not ideal).
Ohhh, I get it now. Hmmm, yeah, the alias should exist in both locations.
Maybe we can update alias to --wallet.account
and keep --wallet.accounts
but show a warning when used. And after sometime deprecate it?
I am willing to create a PR to do this, or any other suggestion. Let me know.
@amandesai01 Thanks for offering! A PR would most definitely be welcome. We discussed and decided we want both the --accounts
and --wallet.account
aliases added. No warning necessary. Let us know if you need any help! A good starting point is the wallet-options.ts file.
@MicaiahReid can you elaborate? Do you want all options to do same thing? I mean --accounts
, --wallet.account
, --wallet.accounts
and --account
all have to do same thing?
@amandesai01 Yes, exactly. --account
, --accounts
, and --wallet.account
would all be aliases for --wallet.accounts
, so they'd all do the same thing.
@davidmurdoch in looking into this I also found that --accounts
is already an alias for --wallet.totalAccounts
😱. I think we should make --wallet.totalAccounts
only have the alias --totalAccounts
as part of this change..
We can't change --accounts
to not be an alias of --wallet.totalAccounts
unless we want to release a v8.0 :sob:
The --accounts
option is that way because that is what the option was in v6, and we designed v7 to have no breaking changes for command line use to make it easier to upgrade to, since there were already so many other breaking changes in the 7.0 release.
I see. Any thoughts on how we should proceed? Save this as an issue for an 8.0 release and use it to clean up all CLI options in general?
I guess we either need to save it for 8.0 and/or rename (with a backward compatible alias) --wallet.accounts
to something more explicit, like --wallet.initialAccounts
, with a top-level alias of --initialAccounts
? :-/
The option
--wallet.accounts
has alias--account
, but not--accounts
. This was confusing to me. Maybe I'm dumb. Maybe it would help our users to have both aliases.