Default from address in OpenZeppelin SDK?

Thanks for the detailed reply with a sample which I was able to adapt to my contracts. I followed your guide and everything worked as planned! I would not have otherwise known to use contracts-ethereum-package@2.2.3, so that was a big help.


One question I have is that it appears account 0 is used with oz send-tx by default. If I were deploying on a testnet, I would have to specify the --from (-f) argument. Is that correct?

1 Like

Hi @arosboro,

Good to hear that you were able to get your contracts working how you wanted.

OpenZeppelin CLI uses the default account for the selected network, using the networks configured in network.js.

You can view the accounts by calling oz accounts and selecting the network.

If you are connecting to a public testnet via Infura (e.g. Deploy your contracts to a public network documentation) then OpenZeppelin CLI would use the default account (the first account generated from the mnemonic) unless from was specified (and the @truffle/hdwallet-provider was configured to expose multiple accounts, see Deploy your contracts to a public network documentation on how to do this).


Regards @openzeppelin/contracts-ethereum-package there is a discussion on Planning the demise of OpenZeppelin Contracts' evil twin, would appreciate any input you had.

Hi @arosboro,

I wanted to check with you if the above answered your question?

As an aside, I moved this question to its own topic.
It is generally best to have one question per topic as it is easier for the community to answer and for those reading later with a similar problem it is easier to find the answer.