makerdao / mcd-cli

MCD Command-line interface
GNU Affero General Public License v3.0
18 stars 8 forks source link

MCD_VAT parameter null or not set #6

Closed liberuum closed 5 years ago

liberuum commented 5 years ago

When trying to call mcd frob --ilk=REP 10 0 I get /nix/store/i47jhsccsqvgriaqsw5qxb2c9jzqdgci-mcd-0.2.1/libexec/mcd/mcd-frobs: line 10: MCD_VAT: parameter null or not set

Using the kovan 0.2.1-rc.1 config

I fixed it by adding the $MCD_VAT address var in the terminal

desaperados commented 5 years ago

Yes - the error indicates that address config file is missing. Kovan deployment addresses are available by default though - you can have all of the kovan addresses loaded for you by passing the chain option:

mcd --chain=kovan --ilk=REP frob

Alternatively you can pass a path to custom config file:

mcd --config=path/to/addresses.json --ilk=REP frob
liberuum commented 5 years ago

Thanks. Maybe this info could be added to README.

desaperados commented 5 years ago

I've added some more verbose help output when --chain is not specified:

Please specify which mcd deployment you wish to target:
  For example, try running against the latest kovan
  deployment by settig the chain option:

  mcd --chain=kovan <command>

You could also try running against a remote testnet:
  List available testnets with: `mcd testnet chains'
  and then set the chain option to a testnet id:

  mcd --chain=12899149080555595289 <command>

You can also specify a path to a custom address config
file when runing against deployments on a local testnet:

  mcd --config=path/to/out.addresses.json <command>

For more options see `mcd help'.