SPDX verification issue with OpenZeppelin CLI

I’m trying to verify an upgrade contract with oz verify (on ropsten etherscan) with version 2.8.2
It fails with an error unable to verify
When I tried to verify the implementation contract manually etherscan reported on “multiple spdx”
after i’ve removed the SPDX from my own contract code manual verification passed
i’m guessing your verify flattener code should take that into consideration

1 Like

Hi @sirpy,

Welcome to the community :wave:.

I am sorry that you had this issue. With the introduction of SPDX Licence identifiers I recommend not flattening files for verification. Instead we should verify our contracts as multifile contracts. Otherwise we run the risk of removing licenses from contracts as part of the flattenging process.

The easiest way to do this currently is with the Buidler Etherscan plugin:

As an aside, if you are deploying upgradeable contracts, you may want to look at the OpenZeppelin Upgrades Plugins that we recently released for Truffle and Buidler. These allow you to easily deploy upgradeable contracts with either Truffle or Buidler. https://docs.openzeppelin.com/upgrades-plugins/1.x/