Files
openzeppelin-contracts/contracts/mocks/EtherReceiverMock.sol
Nicolás Venturo 8d166f3e35 Transfer replacement (#1962)
* Add Address.sendEther

* Add documentation to sendEther

* Add changelog entry

* Rename sendEther to sendValue
2019-10-25 15:53:16 -03:00

16 lines
288 B
Solidity

pragma solidity ^0.5.0;
contract EtherReceiverMock {
bool private _acceptEther;
function setAcceptEther(bool acceptEther) public {
_acceptEther = acceptEther;
}
function () external payable {
if (!_acceptEther) {
revert();
}
}
}