diff --git a/contracts/LiquidPledgingBase.sol b/contracts/LiquidPledgingBase.sol index e0775ad..2164b71 100644 --- a/contracts/LiquidPledgingBase.sol +++ b/contracts/LiquidPledgingBase.sol @@ -19,8 +19,8 @@ pragma solidity ^0.4.11; import "./ILiquidPledgingPlugin.sol"; -/// @dev This is declares a few functions from `Vault` so that the -/// `LiquidPledgingBase` contract can interface with the `Vault` contract +/// @dev `Vault` serves as an interface to allow the `LiquidPledgingBase` +/// contract to interface with a `Vault` contract contract Vault { function authorizePayment(bytes32 _ref, address _dest, uint _amount); function () payable; diff --git a/contracts/LiquidPledgingMock.sol b/contracts/LiquidPledgingMock.sol index baa03a3..3c8524b 100644 --- a/contracts/LiquidPledgingMock.sol +++ b/contracts/LiquidPledgingMock.sol @@ -1,20 +1,47 @@ pragma solidity ^0.4.11; +/* + Copyright 2017, Jordi Baylina + Contributor: AdriĆ  Massanet + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ import "./LiquidPledging.sol"; -// @dev LiquidPledgingMock mocks current block number +/// @dev `LiquidPledgingMock` allows for mocking up +/// a `LiquidPledging` contract with the added ability +/// to manipulate the block time for testing purposes. contract LiquidPledgingMock is LiquidPledging { uint public mock_time; + /// @dev `LiquidPledgingMock` creates a standard `LiquidPledging` + /// instance and sets the mocked time to the current blocktime. function LiquidPledgingMock(address _vault) LiquidPledging(_vault) { mock_time = now; } + /// @dev `getTime` is a basic getter function for + /// the mock_time parameter function getTime() internal returns (uint) { return mock_time; } + /// @dev `setMockedTime` is a basic setter function for + /// the mock_time parameter + /// @param _t This is the value to which the mocked time + /// will be set. function setMockedTime(uint _t) { mock_time = _t; }