I want to share how I verified the zos smart contract source code on etherscan, I think have them verified helps a lot when I want to do a quick interaction with the contract, I personally used it a lot. So I went through a lot of trouble and digging around in order to do it, this is what I did:
I had to go into
node_modules folder and dig around to get the right contract source code and compiler version, when I entered the
node_modules/zos I end up in models/network/ProjectDeployer and I saw that they were still using the contracts from
zos-lib, that surprised me because the latest contracts are in
So I took a look to the version of the compiler used that is in the build files in
node_modules/zos-lib/build and flattened the contract source by using the truffle-flattener that I have as a global dependency in my system running
truffle-flattener contracts/application/App.sol > contracts/application/AppFalettened.sol
Once done all this I went to my App contract and verify it on etherscan, important note: The optimizer is not used.
Verified App contract https://ropsten.etherscan.io/address/0x7e5a2087cd5fcd00f93a88653c272fa7a92d5bee#code
Verified Package contract https://ropsten.etherscan.io/address/0x46ccb0c97193521055847bc9bb31271e84f521c2#code
Verified ImplementationDirectory contract https://ropsten.etherscan.io/address/0x89576483a621237cb9070196d91fb76f252dc236#code
Another thing that caught my attention is that in the zos.ropsten.json file the ImplemetationDirectory contract is referred as “provider” when in reality is a directory that can be sued with the ImplementationProvider interface, maybe it should be called directory instead of provider or implementation-directory in the .json files?
Also, now every smart contract deployed using zos that have the same code are now verified! So at least now every zos smart contract deployed on ropsten will have the read/write options enabled on etherscan