How to pass arguments to "zos create --init" properly?

Hi @itinance

I suggest you look to upgrade to ZeppelinOS 2.4, the new interactive commands are awesome.

Using ZeppelinOS 2.4 I was able to quickly and easily deploy and initialize the token contract.

The new interactive commands walk you through the initialization, and you get to choose the appropriate initialize function.

$ npx zos create
✓ Compiled contracts with solc 0.5.10 (commit.5a6ea5b1)
? Pick a contract to instantiate Token
? Pick a network development
✓ Added contract Token
✓ Contract Token deployed
All contracts have been deployed
? Do you want to call a function on the instance after creating it? Yes
? Select which function * initialize(minter: address, pausers: address[])
? minter (address): 0x90f8bf6a479f320ead074411a4b0e7944ea8c9c1
? pausers (address[]): [0x90f8bf6a479f320ead074411a4b0e7944ea8c9c1,0xffcf8fdee72ac11b5c542428b35eef5769c409f0]
✓ Setting everything up to create contract instances
✓ Instance created at 0x26b4AFb60d6C903165150C6F0AA14F8016bE4aec
0x26b4AFb60d6C903165150C6F0AA14F8016bE4aec

Once the instance is deployed and initialized, you can manually test it, e.g. by checking that the second address provided in the pauser array isPauser

$ npx zos call
? Pick a network development
? Pick an instance Token at 0x26b4AFb60d6C903165150C6F0AA14F8016bE4aec
? Select which function isPauser(account: address)
? account (address): 0xffcf8fdee72ac11b5c542428b35eef5769c409f0
✓ Method 'isPauser(address)' returned: true
true

Regards the decimals error, there are three initializer functions. When you were attempting to initialize, the second initialize taking two strings and a uint8 decimals parameter was shown in your error.

To initialize via the command line you need to specify the fully qualified function name.

  * initialize(sender: address)
  * initialize(name: string, symbol: string, decimals: uint8)
  * initialize(minter: address, pausers: address[])

In this case it is "initialize(minter: address, pausers: address[])"

npx zos create SimpleToken --network development --init "initialize(minter: address, pausers: address[])" --args 0x90f8bf6a479f320ead074411a4b0e7944ea8c9c1,[0x90f8bf6a479f320ead074411a4b0e7944ea8c9c1,0xffcf8fdee72ac11b5c542428b35eef5769c409f0]

As an aside, ganache-cli doesn't display addresses with checksums, I created an issue for this https://github.com/trufflesuite/ganache-cli/issues/657 and someone has done a Pull Request already.