Hi there, having designed a NonReceivable contract in our project, I thought maybe it could be made into the OZ repo as a basic abstract contract for future contracts that are not allowed to receive any Ethers.
// SPDX-License-Identifier: MIT
pragma solidity 0.8.4;
abstract contract NonReceivable {
error ReceiveDisabled();
error FallbackDisabled();
receive() external payable {
revert ReceiveDisabled();
}
fallback() external {
revert FallbackDisabled();
}
}
contract Test is NonReceivable {
}