Applied change regarding the styling

pull/210/head
João Gabriel Carvalho 8 years ago committed by maurelian
parent b5d4120adb
commit 602c18b394
  1. 15
      contracts/Bounty.sol
  2. 16
      contracts/DayLimit.sol
  3. 4
      contracts/LimitBalance.sol
  4. 4
      contracts/lifecycle/Destructible.sol
  5. 2
      contracts/lifecycle/Migrations.sol
  6. 20
      contracts/lifecycle/TokenDestructible.sol

@ -5,7 +5,7 @@ import './payment/PullPayment.sol';
import './lifecycle/Destructible.sol'; import './lifecycle/Destructible.sol';
/* /**
* @title Bounty * @title Bounty
* @dev This bounty will pay out to a researcher if they break invariant logic of the contract. * @dev This bounty will pay out to a researcher if they break invariant logic of the contract.
*/ */
@ -15,7 +15,7 @@ contract Bounty is PullPayment, Destructible {
event TargetCreated(address createdAddress); event TargetCreated(address createdAddress);
/* /**
* @dev Function that allows the contract to recieve funds, if it hasn't been claimed. * @dev Function that allows the contract to recieve funds, if it hasn't been claimed.
*/ */
function() payable { function() payable {
@ -24,7 +24,7 @@ contract Bounty is PullPayment, Destructible {
} }
} }
/* /**
* @dev Create and deploy the target contract(extension of Target contract), and sets the msg.sender as a researcher * @dev Create and deploy the target contract(extension of Target contract), and sets the msg.sender as a researcher
* @return A target contract * @return A target contract
*/ */
@ -35,13 +35,13 @@ contract Bounty is PullPayment, Destructible {
return target; return target;
} }
/* /**
* @dev Internal function to deploy the target contract. * @dev Internal function to deploy the target contract.
* @return A target contract address * @return A target contract address
*/ */
function deployContract() internal returns(address); function deployContract() internal returns(address);
/* /**
* @dev Sends the contract funds to the researcher that proved the contract is broken. * @dev Sends the contract funds to the researcher that proved the contract is broken.
* @param Target contract * @param Target contract
*/ */
@ -61,14 +61,13 @@ contract Bounty is PullPayment, Destructible {
} }
/* /**
* @title Target * @title Target
*
* @dev Your main contract should inherit from this class and implement the checkInvariant method. * @dev Your main contract should inherit from this class and implement the checkInvariant method.
*/ */
contract Target { contract Target {
/* /**
* @dev Funtion tha should check everything your contract assumes to be true all the time. If this function returns false, it means your contract was broken in some way and is in an inconsistent state. This is what security researchers will try to acomplish when trying to get the bounty. * @dev Funtion tha should check everything your contract assumes to be true all the time. If this function returns false, it means your contract was broken in some way and is in an inconsistent state. This is what security researchers will try to acomplish when trying to get the bounty.
* @return A boolean that indicates if the contract is broken or not. * @return A boolean that indicates if the contract is broken or not.
*/ */

@ -1,6 +1,6 @@
pragma solidity ^0.4.8; pragma solidity ^0.4.8;
/* /**
* @title DayLimit * @title DayLimit
* @dev Base contract that enables methods to be protected by placing a linear limit (specifiable) on a particular resource per calendar day. Is multiowned to allow the limit to be altered * @dev Base contract that enables methods to be protected by placing a linear limit (specifiable) on a particular resource per calendar day. Is multiowned to allow the limit to be altered
*/ */
@ -10,7 +10,7 @@ contract DayLimit {
uint public spentToday; uint public spentToday;
uint public lastDay; uint public lastDay;
/* /**
* @dev Constructor that sets the passed value as a dailyLimit * @dev Constructor that sets the passed value as a dailyLimit
* @param _limit Uint to represent the daily limit. * @param _limit Uint to represent the daily limit.
*/ */
@ -19,7 +19,7 @@ contract DayLimit {
lastDay = today(); lastDay = today();
} }
/* /**
* @dev sets the daily limit. doesn't alter the amount already spent today * @dev sets the daily limit. doesn't alter the amount already spent today
* @param _newLimit Uint to represent the new limit. * @param _newLimit Uint to represent the new limit.
*/ */
@ -27,17 +27,17 @@ contract DayLimit {
dailyLimit = _newLimit; dailyLimit = _newLimit;
} }
/* /**
* @dev Resets the amount already spent today. * @dev Resets the amount already spent today.
*/ */
function _resetSpentToday() internal { function _resetSpentToday() internal {
spentToday = 0; spentToday = 0;
} }
/* /**
* @dev Checks to see if there is enough resource to spend today. If true, the resource is expended. * @dev Checks to see if there is enough resource to spend today. If true, the resource is expended.
* @param _value Uint representing the amout of resurce to spend. * @param _value Uint representing the amout of resurce to spend.
* @return Boolean. True if the resource was spended and false otherwise. * @return A boolean that is True if the resource was spended and false otherwise.
*/ */
function underLimit(uint _value) internal returns (bool) { function underLimit(uint _value) internal returns (bool) {
// reset the spend limit if we're on a different day to last time. // reset the spend limit if we're on a different day to last time.
@ -54,7 +54,7 @@ contract DayLimit {
return false; return false;
} }
/* /**
* @dev Private function to determine today index * @dev Private function to determine today index
* @return Uint of todays index. * @return Uint of todays index.
*/ */
@ -62,7 +62,7 @@ contract DayLimit {
return now / 1 days; return now / 1 days;
} }
/* /**
* @dev Simple modifier for daily limit. * @dev Simple modifier for daily limit.
*/ */
modifier limitedDaily(uint _value) { modifier limitedDaily(uint _value) {

@ -11,7 +11,7 @@ contract LimitBalance {
uint public limit; uint public limit;
/* /**
* @dev Constructor that sets the passed value as a limit * @dev Constructor that sets the passed value as a limit
* @param _limit Uint to represent the limit. * @param _limit Uint to represent the limit.
*/ */
@ -19,7 +19,7 @@ contract LimitBalance {
limit = _limit; limit = _limit;
} }
/* /**
* @dev Checks if limit was reached. Case true, it throws. * @dev Checks if limit was reached. Case true, it throws.
*/ */
modifier limitedPayable() { modifier limitedPayable() {

@ -4,13 +4,13 @@ pragma solidity ^0.4.8;
import "../ownership/Ownable.sol"; import "../ownership/Ownable.sol";
/* /**
* @title Destructible * @title Destructible
* @dev Base contract that can be destroyed by owner. All funds in contract will be sent to the owner. * @dev Base contract that can be destroyed by owner. All funds in contract will be sent to the owner.
*/ */
contract Destructible is Ownable { contract Destructible is Ownable {
/* /**
*@dev The destroy function transfer the current balance to the owner and terminate de lifecycle *@dev The destroy function transfer the current balance to the owner and terminate de lifecycle
*/ */
function destroy() onlyOwner { function destroy() onlyOwner {

@ -3,7 +3,7 @@ pragma solidity ^0.4.8;
import '../ownership/Ownable.sol'; import '../ownership/Ownable.sol';
/* /**
* @title Migrations * @title Migrations
* @dev This is a truffle contract, needed for truffle integration, not meant for use by Zeppelin users. * @dev This is a truffle contract, needed for truffle integration, not meant for use by Zeppelin users.
*/ */

@ -4,17 +4,19 @@ pragma solidity ^0.4.8;
import "../ownership/Ownable.sol"; import "../ownership/Ownable.sol";
import "../token/ERC20Basic.sol"; import "../token/ERC20Basic.sol";
/// @title TokenDestructible: /** @title TokenDestructible:
/// @author Remco Bloemen <remco@2π.com> * @author Remco Bloemen <remco@2π.com>
/// @dev Base contract that can be destroyed by owner. All funds in contract including * @dev Base contract that can be destroyed by owner. All funds in contract including
/// listed tokens will be sent to the owner * listed tokens will be sent to the owner
*/
contract TokenDestructible is Ownable { contract TokenDestructible is Ownable {
/// @notice Terminate contract and refund to owner /** @notice Terminate contract and refund to owner
/// @param tokens List of addresses of ERC20 or ERC20Basic token contracts to * @param tokens List of addresses of ERC20 or ERC20Basic token contracts to
// refund refund
/// @notice The called token contracts could try to re-enter this contract. * @notice The called token contracts could try to re-enter this contract.Only
// Only supply token contracts you supply token contracts you
*/
function destroy(address[] tokens) onlyOwner { function destroy(address[] tokens) onlyOwner {
// Transfer tokens to owner // Transfer tokens to owner

Loading…
Cancel
Save