Remove trailing whitespace in all contract files.

This commit is contained in:
Daniel Kirchner
2018-08-01 21:57:12 +02:00
parent 1f832e068b
commit 8781990ff3
43 changed files with 792 additions and 792 deletions
+5 -5
View File
@@ -25,7 +25,7 @@ contract Bounty is PullPayment, Destructible {
}
/**
* @dev Create and deploy the target contract (extension of Target contract), and sets the
* @dev Create and deploy the target contract (extension of Target contract), and sets the
* msg.sender as a researcher
* @return A target contract
*/
@@ -69,10 +69,10 @@ contract Bounty is PullPayment, Destructible {
contract Target {
/**
* @dev Checks all values a contract assumes to be true all the time. If this function returns
* false, the contract is broken in some way and is in an inconsistent state.
* In order to win the bounty, security researchers will try to cause this broken state.
* @return True if all invariant values are correct, false otherwise.
* @dev Checks all values a contract assumes to be true all the time. If this function returns
* false, the contract is broken in some way and is in an inconsistent state.
* In order to win the bounty, security researchers will try to cause this broken state.
* @return True if all invariant values are correct, false otherwise.
*/
function checkInvariant() public returns(bool);
}
@@ -12,7 +12,7 @@ contract LimitBalance {
uint256 public limit;
/**
* @dev Constructor that sets the passed value as a limit.
* @dev Constructor that sets the passed value as a limit.
* @param _limit uint256 to represent the limit.
*/
constructor(uint256 _limit) public {
@@ -9,7 +9,7 @@ pragma solidity ^0.4.11;
contract ReentrancyGuard {
/**
* @dev We use a single lock for the whole contract.
* @dev We use a single lock for the whole contract.
*/
bool private rentrancy_lock = false;
@@ -24,7 +24,7 @@ contract FinalizableCrowdsale is Crowdsale, Ownable {
finalization();
emit Finalized();
isFinalized = true;
}
@@ -13,7 +13,7 @@ contract Destructible is Ownable {
constructor() public payable { }
/**
* @dev Transfers the current balance to the owner and terminates the contract.
* @dev Transfers the current balance to the owner and terminates the contract.
*/
function destroy() public onlyOwner {
selfdestruct(owner);
@@ -4,7 +4,7 @@ pragma solidity ^0.4.11;
import "../ownership/Ownable.sol";
import "../token/ERC20Basic.sol";
/**
/**
* @title TokenDestructible:
* @author Remco Bloemen <remco@2π.com>
* @dev Base contract that can be destroyed by owner. All funds in contract including
@@ -14,7 +14,7 @@ contract TokenDestructible is Ownable {
constructor() public payable { }
/**
/**
* @notice Terminate contract and refund to owner
* @param tokens List of addresses of ERC20 or ERC20Basic token contracts to
refund.
@@ -6,14 +6,14 @@ import './Ownable.sol';
/**
* @title Claimable
* @dev Extension for the Ownable contract, where the ownership needs to be claimed.
* @dev Extension for the Ownable contract, where the ownership needs to be claimed.
* This allows the new owner to accept the transfer.
*/
contract Claimable is Ownable {
address public pendingOwner;
/**
* @dev Modifier throws if called by any account other than the pendingOwner.
* @dev Modifier throws if called by any account other than the pendingOwner.
*/
modifier onlyPendingOwner() {
if (msg.sender != pendingOwner) {
@@ -23,8 +23,8 @@ contract Claimable is Ownable {
}
/**
* @dev Allows the current owner to set the pendingOwner address.
* @param newOwner The address to transfer ownership to.
* @dev Allows the current owner to set the pendingOwner address.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) public onlyOwner {
pendingOwner = newOwner;
@@ -4,7 +4,7 @@ import './Ownable.sol';
/**
* @title Contactable token
* @dev Basic version of a contactable contract, allowing the owner to provide a string with their
* @dev Basic version of a contactable contract, allowing the owner to provide a string with their
* contact information.
*/
contract Contactable is Ownable{
@@ -15,10 +15,10 @@ contract DelayedClaimable is Claimable {
uint256 public start;
/**
* @dev Used to specify the time period during which a pending
* owner can claim ownership.
* @dev Used to specify the time period during which a pending
* owner can claim ownership.
* @param _start The earliest time ownership can be claimed.
* @param _end The latest time ownership can be claimed.
* @param _end The latest time ownership can be claimed.
*/
function setLimits(uint256 _start, uint256 _end) public onlyOwner {
if (_start > _end)
@@ -29,8 +29,8 @@ contract DelayedClaimable is Claimable {
/**
* @dev Allows the pendingOwner address to finalize the transfer, as long as it is called within
* the specified start and end time.
* @dev Allows the pendingOwner address to finalize the transfer, as long as it is called within
* the specified start and end time.
*/
function claimOwnership() public onlyPendingOwner {
if ((block.number > end) || (block.number < start))
@@ -2,7 +2,7 @@ pragma solidity ^0.4.11;
import "./Ownable.sol";
/**
/**
* @title Contracts that should not own Contracts
* @author Remco Bloemen <remco@2π.com>
* @dev Should contracts (anything Ownable) end up being owned by this contract, it allows the owner
@@ -2,7 +2,7 @@ pragma solidity ^0.4.11;
import "./Ownable.sol";
/**
/**
* @title Contracts that should not own Ether
* @author Remco Bloemen <remco@2π.com>
* @dev This tries to block incoming ether to prevent accidental loss of Ether. Should Ether end up
@@ -16,9 +16,9 @@ contract HasNoEther is Ownable {
/**
* @dev Constructor that rejects incoming Ether
* @dev The `payable` flag is added so we can access `msg.value` without compiler warning. If we
* leave out payable, then Solidity will allow inheriting contracts to implement a payable
* constructor. By doing it this way we prevent a payable constructor from working. Alternatively
* @dev The `payable` flag is added so we can access `msg.value` without compiler warning. If we
* leave out payable, then Solidity will allow inheriting contracts to implement a payable
* constructor. By doing it this way we prevent a payable constructor from working. Alternatively
* we could use assembly to access msg.value.
*/
constructor() public payable {
@@ -3,7 +3,7 @@ pragma solidity ^0.4.11;
import "./Ownable.sol";
import "../token/ERC20Basic.sol";
/**
/**
* @title Contracts that should not own Tokens
* @author Remco Bloemen <remco@2π.com>
* @dev This blocks incoming ERC23 tokens to prevent accidental loss of tokens.
@@ -12,7 +12,7 @@ import "../token/ERC20Basic.sol";
*/
contract HasNoTokens is Ownable {
/**
/**
* @dev Reject all ERC23 compatible tokens
* @param from_ address The address that is transferring the tokens
* @param value_ uint256 the amount of the specified token
@@ -4,10 +4,10 @@ import "./HasNoEther.sol";
import "./HasNoTokens.sol";
import "./HasNoContracts.sol";
/**
/**
* @title Base contract for contracts that should not own things.
* @author Remco Bloemen <remco@2π.com>
* @dev Solves a class of errors where a contract accidentally becomes owner of Ether, Tokens or
* @dev Solves a class of errors where a contract accidentally becomes owner of Ether, Tokens or
* Owned contracts. See respective base contracts for details.
*/
contract NoOwner is HasNoEther, HasNoTokens, HasNoContracts {
@@ -3,14 +3,14 @@ pragma solidity ^0.4.11;
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
/**
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
@@ -20,7 +20,7 @@ contract Ownable {
/**
* @dev Throws if called by any account other than the owner.
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
if (msg.sender != owner) {
@@ -32,7 +32,7 @@ contract Ownable {
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) public onlyOwner {
if (newOwner != address(0)) {
@@ -3,7 +3,7 @@ pragma solidity ^0.4.11;
/**
* @title Shareable
* @dev inheritable "property" contract that enables methods to be protected by requiring the
* @dev inheritable "property" contract that enables methods to be protected by requiring the
* acquiescence of either a single, or, crucially, each of a number of, designated owners.
* @dev Usage: use modifiers onlyowner (just own owned) or onlymanyowners(hash), whereby the same hash must be provided by some number (specified in constructor) of the set of owners (specified in the constructor) before the interior is executed.
*/
@@ -41,9 +41,9 @@ contract Shareable {
}
_;
}
/**
* @dev Modifier for multisig functions.
/**
* @dev Modifier for multisig functions.
* @param _operation The operation must have an intrinsic hash in order that later attempts can be
* realised as the same underlying operation and thus count as confirmations.
*/
@@ -53,8 +53,8 @@ contract Shareable {
}
}
/**
* @dev Constructor is given the number of sigs required to do protected "onlymanyowners"
/**
* @dev Constructor is given the number of sigs required to do protected "onlymanyowners"
* transactions as well as the selection of addresses capable of confirming them.
* @param _owners A list of owners.
* @param _required The amount required for a transaction to be approved.
@@ -7,7 +7,7 @@ import '../math/SafeMath.sol';
/**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
* @dev Basic version of StandardToken, with no allowances.
*/
contract BasicToken is ERC20Basic {
using SafeMath for uint256;
@@ -27,7 +27,7 @@ contract BasicToken is ERC20Basic {
/**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/
function balanceOf(address _owner) public view returns (uint256 balance) {
@@ -4,11 +4,11 @@ import "./ERC20.sol";
/**
* @title LimitedTransferToken
* @dev LimitedTransferToken defines the generic interface and the implementation to limit token
* transferability for different events. It is intended to be used as a base class for other token
* contracts.
* @dev LimitedTransferToken defines the generic interface and the implementation to limit token
* transferability for different events. It is intended to be used as a base class for other token
* contracts.
* LimitedTransferToken has been designed to allow for different limiting factors,
* this can be achieved by recursively calling super.transferableTokens() until the base class is
* this can be achieved by recursively calling super.transferableTokens() until the base class is
* hit. For example:
* function transferableTokens(address holder, uint64 time) view public returns (uint256) {
* return min256(unlockedTokens, super.transferableTokens(holder, time));
@@ -48,7 +48,7 @@ contract LimitedTransferToken is ERC20 {
/**
* @dev Default transferable tokens function returns all tokens for a holder (no limit).
* @dev Overwriting transferableTokens(address holder, uint64 time) is the way to provide the
* @dev Overwriting transferableTokens(address holder, uint64 time) is the way to provide the
* specific logic for limiting token transferability for a holder over time.
*/
function transferableTokens(address holder, uint64 time) view public returns (uint256) {
@@ -6,7 +6,7 @@ import "./StandardToken.sol";
/**
* @title SimpleToken
* @dev Very simple ERC20 Token example, where all tokens are pre-assigned to the creator.
* @dev Very simple ERC20 Token example, where all tokens are pre-assigned to the creator.
* Note they can later distribute these tokens as they wish using `transfer` and other
* `StandardToken` functions.
*/
@@ -18,7 +18,7 @@ contract SimpleToken is StandardToken {
uint256 public INITIAL_SUPPLY = 10000;
/**
* @dev Constructor that gives msg.sender all of existing tokens.
* @dev Constructor that gives msg.sender all of existing tokens.
*/
constructor() public {
totalSupply = INITIAL_SUPPLY;
@@ -5,11 +5,11 @@ import './ERC20Basic.sol';
/**
* @title TokenTimelock
* @dev TokenTimelock is a token holder contract that will allow a
* @dev TokenTimelock is a token holder contract that will allow a
* beneficiary to extract the tokens after a given release time
*/
contract TokenTimelock {
// ERC20 basic token contract being held
ERC20Basic token;
@@ -226,7 +226,7 @@ contract VestedToken is StandardToken, LimitedTransferToken {
* @dev Calculate the amount of non vested tokens at a specific time.
* @param grant TokenGrant The grant to be checked.
* @param time uint64 The time to be checked
* @return An uint256 representing the amount of non vested tokens of a specific grant on the
* @return An uint256 representing the amount of non vested tokens of a specific grant on the
* passed time frame.
*/
function nonVestedTokens(TokenGrant memory grant, uint64 time) private view returns (uint256) {