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
)
pull/1474/head
parent
88f48be287
commit
c5a8680a9c
@ -1,14 +1,19 @@ |
||||
pragma solidity ^0.4.24; |
||||
|
||||
import "../math/SafeMath.sol"; |
||||
import "../ownership/Secondary.sol"; |
||||
import "../../math/SafeMath.sol"; |
||||
import "../../ownership/Secondary.sol"; |
||||
|
||||
/** |
||||
/** |
||||
* @title Escrow |
||||
* @dev Base escrow contract, holds funds destinated to a payee until they |
||||
* withdraw them. The contract that uses the escrow as its payment method |
||||
* should be its primary, and provide public methods redirecting to the escrow's |
||||
* deposit and withdraw. |
||||
* @dev Base escrow contract, holds funds designated for a payee until they |
||||
* withdraw them. |
||||
* @dev Intended usage: This contract (and derived escrow contracts) should be a |
||||
* standalone contract, that only interacts with the contract that instantiated |
||||
* it. That way, it is guaranteed that all Ether will be handled according to |
||||
* the Escrow rules, and there is no need to check for payable functions or |
||||
* transfers in the inheritance tree. The contract that uses the escrow as its |
||||
* payment method should be its primary, and provide public methods redirecting |
||||
* to the escrow's deposit and withdraw. |
||||
*/ |
||||
contract Escrow is Secondary { |
||||
using SafeMath for uint256; |
@ -1,7 +1,7 @@ |
||||
const { shouldBehaveLikeEscrow } = require('./Escrow.behavior'); |
||||
|
||||
const shouldFail = require('../helpers/shouldFail'); |
||||
const { ether } = require('../helpers/ether'); |
||||
const shouldFail = require('../../helpers/shouldFail'); |
||||
const { ether } = require('../../helpers/ether'); |
||||
|
||||
const BigNumber = web3.BigNumber; |
||||
|
@ -1,7 +1,7 @@ |
||||
const expectEvent = require('../helpers/expectEvent'); |
||||
const shouldFail = require('../helpers/shouldFail'); |
||||
const { ethGetBalance } = require('../helpers/web3'); |
||||
const { ether } = require('../helpers/ether'); |
||||
const expectEvent = require('../../helpers/expectEvent'); |
||||
const shouldFail = require('../../helpers/shouldFail'); |
||||
const { ethGetBalance } = require('../../helpers/web3'); |
||||
const { ether } = require('../../helpers/ether'); |
||||
|
||||
const BigNumber = web3.BigNumber; |
||||
|
@ -1,8 +1,8 @@ |
||||
const shouldFail = require('../helpers/shouldFail'); |
||||
const expectEvent = require('../helpers/expectEvent'); |
||||
const { ethGetBalance } = require('../helpers/web3'); |
||||
const { ether } = require('../helpers/ether'); |
||||
const { ZERO_ADDRESS } = require('../helpers/constants'); |
||||
const shouldFail = require('../../helpers/shouldFail'); |
||||
const expectEvent = require('../../helpers/expectEvent'); |
||||
const { ethGetBalance } = require('../../helpers/web3'); |
||||
const { ether } = require('../../helpers/ether'); |
||||
const { ZERO_ADDRESS } = require('../../helpers/constants'); |
||||
|
||||
const BigNumber = web3.BigNumber; |
||||
|
Loading…
Reference in new issue