Files
openzeppelin-contracts/contracts/mocks/EtherReceiverMock.sol
Francisco Giordano 12ae430f0f Update docs
2022-01-23 19:05:53 -03:00

18 lines
319 B
Solidity

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