Hi @abcoathup, I’m getting this error too when dealing with both upgradable and non upgradable contracts in the same truffle project. Is this supported now?
I’m using
OpenZeppelin Contracts Ethereum Package from v3 the contracts have an UpgradeSafe suffix. If possible I would use those, otherwise you could have a clash where your contracts are importing a contract with the same name from OpenZeppelin Contracts and OpenZeppelin Contracts Ethereum Package so you might need to have them in separate projects.
Unfortunately I need that specific version because I’m using Solidity 0.5.16 and Contracts Ethereum Package v3 supports only Solidity 0.6.x.
In the end I was able to achieve what I wanted directly using the @openzeppelin/upgrades package in my migration file using ProxyAdmin project which should be the same used by npx oz deploy from what I understood
@abcoathup would you recommend using the UpgradeSafe versions even on non-upgradeable contracts in the same project just to avoid those clashes, and scrap @openzeppelin/contracts altogether?
I would recommend using OpenZeppelin Contracts for regular contracts and OpenZeppelin Contracts Ethereum Package for upgradeable contracts as we want to initialize our contracts in the same transaction that they are deployed. This is easily done with constructors. With upgradeable contracts we can do this as part of deploying and setting up the proxy.
Though each use case is different, so I will answer your specific question in the topic you created.