Remove superfluous receive() function from Proxy.sol by Amxx · Pull Request #4434 · OpenZeppelin/openzeppelin-contracts (original) (raw)
The warning wasn't removed. It's just really hard to reproduce. I couldn't figure out the conditions until I found the warning in the Solidity repo12. The warning comes up when there is a payable fallback function along with other functions, but no receive function.
contract C { fallback() external payable { } function f() public pure { } }
contract A { function f() external pure {} } contract C is A { fallback() external payable { } }
The warning in both cases is:
This contract has a payable fallback function, but no receive ether function. Consider adding a receive ether function.
This probably used to happen in the transparent proxy because we had a fallback and additional functions (upgradeTo
, etc.), but this is no longer the case and should never be the case for us or users, for the reasons we do the manual dispatch and recommend the same.