Hi!
I am trying to test deployment through a proxy.
My contract does not have any delegate calls, neither selfdestruct.
However, after
upgrades.deployProxy(MyContract)
I'm getting an error that I can remove using { unsafeAllow: ['delegatecall'] }
However, something tells me there is unsafe stuff happening here.
Error: Contract `MyContract` is not upgrade safe
@openzeppelin/contracts/utils/Address.sol:185: Use of delegatecall is not allowed
https://zpl.in/upgrades/error-002
at Object.assertUpgradeSafe (node_modules/@openzeppelin/upgrades-core/src/validate/query.ts:17:11)
at Object.deployImpl (node_modules/@openzeppelin/hardhat-upgrades/src/utils/deploy-impl.ts:31:3)
at async Proxy.deployProxy (node_modules/@openzeppelin/hardhat-upgrades/src/deploy-proxy.ts:57:18)
at async Context.<anonymous> (test/proxies/MyContract.proxy.spec.ts:33:21)
My contract is Initializable, OwnableUpgradeable, ERC20Upgradeable and uses SafeERC20 for IERC20.
Other than that, it does not use delegate call nor selfdestruct can somebody help me figure out why is my contract identified as unsafe?