EtherReceiverMockUpgradeable.sol 840 B

123456789101112131415161718192021222324252627282930
  1. // SPDX-License-Identifier: MIT
  2. pragma solidity ^0.8.0;
  3. import "../proxy/utils/Initializable.sol";
  4. contract EtherReceiverMockUpgradeable is Initializable {
  5. function __EtherReceiverMock_init() internal onlyInitializing {
  6. }
  7. function __EtherReceiverMock_init_unchained() internal onlyInitializing {
  8. }
  9. bool private _acceptEther;
  10. function setAcceptEther(bool acceptEther) public {
  11. _acceptEther = acceptEther;
  12. }
  13. receive() external payable {
  14. if (!_acceptEther) {
  15. revert();
  16. }
  17. }
  18. /**
  19. * @dev This empty reserved space is put in place to allow future versions to add new
  20. * variables without shifting down storage in the inheritance chain.
  21. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
  22. */
  23. uint256[49] private __gap;
  24. }