openzeppelin-sdk icon indicating copy to clipboard operation
openzeppelin-sdk copied to clipboard

CLI does not offer network selection if a contract name is used

Open crazyrabbitLTC opened this issue 6 years ago • 4 comments

Clean install of the [email protected].

npx zos push

returns:

 dennison@Dennisons-MBP  ~/Documents/zostest  npx zos push User
- Nothing to compile, all contracts are up to date.
- A network name must be provided to execute the requested action.

I would have expected a prompt to select my network choice.

crazyrabbitLTC avatar Jun 13 '19 22:06 crazyrabbitLTC

The problem seems to be that you are specifying a contract name to a command that doesn't receive any arguments :-). From npx zos push --help:

Usage: push --network <network> [options]

deploys your project to the specified <network>

Options:
  --skip-compile             skips contract compilation
  -d, --deploy-dependencies  deploys dependencies to the network if there is no existing deployment
  --reset                    redeploys all contracts (not only the ones that changed)
  -f, --force                ignores validation errors and deploys contracts
  --deploy-proxy-admin       eagerly deploys the project's proxy admin (if not deployed yet on the provided network)
  --deploy-proxy-factory     eagerly deploys the project's proxy factory (if not deployed yet on the provided network)
  -n, --network <network>    network to be used
  -f, --from <from>          specify transaction sender address
  --timeout <timeout>        timeout in seconds for each blockchain transaction (defaults to 600s)
  --no-interactive           force to run the command in non-interactive mode
  -h, --help                 output usage information

This seems to be a recurring issue though. It's not a bug itself, but a DX problem.

jbcarpanelli avatar Jun 13 '19 23:06 jbcarpanelli

Lowering prio as we are making push a less frequent command.

spalladino avatar Jun 14 '19 19:06 spalladino

@spalladino same thing is for oz call

leonprou avatar May 01 '20 18:05 leonprou

Removing the low-prio tag then. Thanks for the report, @leonprou!

spalladino avatar May 04 '20 22:05 spalladino