Moved Escrows into an escrow subdirectory, improved docs. (#1430)

* Moved Escrows into an escrow subdirectory, improved docs.

* Fixed escrow mock.

* Fixed some more imports.

(cherry picked from commit f3df2dab3d)
This commit is contained in:
Nicolás Venturo
2018-10-17 17:22:25 -03:00
committed by Leo Arias
parent 88f48be287
commit c5a8680a9c
10 changed files with 35 additions and 24 deletions

View File

@ -0,0 +1,22 @@
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);
}
}