Files
openzeppelin-contracts/contracts/payment/ConditionalEscrow.sol
Francisco Giordano 9b37104655 Turn off blank-lines Solium rule (#1284)
* turn off blank-lines rule

* remove triple newlines
2018-09-19 19:59:13 -03:00

22 lines
573 B
Solidity

pragma solidity ^0.4.24;
import "./Escrow.sol";
/**
* @title ConditionalEscrow
* @dev Base abstract escrow to only allow withdrawal if a condition is met.
*/
contract ConditionalEscrow is Escrow {
/**
* @dev Returns whether an address is allowed to withdraw their funds. To be
* implemented by derived contracts.
* @param payee The destination address of the funds.
*/
function withdrawalAllowed(address payee) public view returns (bool);
function withdraw(address payee) public {
require(withdrawalAllowed(payee));
super.withdraw(payee);
}
}