Transfer replacement (#1962)
* Add Address.sendEther * Add documentation to sendEther * Add changelog entry * Rename sendEther to sendValue
This commit is contained in:
15
contracts/mocks/EtherReceiverMock.sol
Normal file
15
contracts/mocks/EtherReceiverMock.sol
Normal file
@ -0,0 +1,15 @@
|
||||
pragma solidity ^0.5.0;
|
||||
|
||||
contract EtherReceiverMock {
|
||||
bool private _acceptEther;
|
||||
|
||||
function setAcceptEther(bool acceptEther) public {
|
||||
_acceptEther = acceptEther;
|
||||
}
|
||||
|
||||
function () external payable {
|
||||
if (!_acceptEther) {
|
||||
revert();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user