* Updated code style to 4 spaces and 120 max characters per line. * Update contracts/token/ERC721/ERC721Pausable.sol Co-Authored-By: nventuro <nicolas.venturo@gmail.com> * Update contracts/token/ERC721/IERC721.sol Co-Authored-By: nventuro <nicolas.venturo@gmail.com>
23 lines
671 B
Solidity
23 lines
671 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.
|
|
* @dev Intended usage: See Escrow.sol. Same usage guidelines apply here.
|
|
*/
|
|
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);
|
|
}
|
|
}
|