Files
openzeppelin-contracts/contracts/mocks/EtherReceiverMock.sol
Hadrien Croubois 00cbf5a236 Update pragma to 0.8.20 (#4489)
Co-authored-by: Francisco Giordano <fg@frang.io>
Co-authored-by: ernestognw <ernestognw@gmail.com>
2023-07-31 17:25:45 -03:00

18 lines
320 B
Solidity

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
contract EtherReceiverMock {
bool private _acceptEther;
function setAcceptEther(bool acceptEther) public {
_acceptEther = acceptEther;
}
receive() external payable {
if (!_acceptEther) {
revert();
}
}
}