Skip to content
Permalink
Browse files

removing trailing whitespace

  • Loading branch information...
aupiff committed Sep 16, 2017
1 parent 1737555 commit 6d8bb497c854f4c9ddc8bf364072da1b1885cdf7
Showing with 125 additions and 125 deletions.
  1. +1 −1 .gitignore
  2. +1 −1 .solcover.js
  3. +1 −1 .soliumignore
  4. +8 −8 LICENSE
  5. +32 −32 audit/ZeppelinAudit.md
  6. +4 −4 contracts/crowdsale/Crowdsale.sol
  7. +2 −2 contracts/crowdsale/FinalizableCrowdsale.sol
  8. +1 −1 contracts/examples/SampleCrowdsale.sol
  9. +2 −2 contracts/lifecycle/Destructible.sol
  10. +3 −3 contracts/lifecycle/TokenDestructible.sol
  11. +1 −1 contracts/ownership/Contactable.sol
  12. +1 −1 contracts/ownership/HasNoContracts.sol
  13. +2 −2 contracts/ownership/NoOwner.sol
  14. +1 −1 contracts/ownership/Ownable.sol
  15. +2 −2 contracts/token/BasicToken.sol
  16. +4 −4 contracts/token/StandardToken.sol
  17. +1 −1 docs/Makefile
  18. +1 −1 docs/source/basictoken.rst
  19. +1 −1 docs/source/developer-resources.rst
  20. +5 −5 docs/source/index.rst
  21. +1 −1 docs/source/killable.rst
  22. +9 −9 docs/source/license.rst
  23. +1 −1 docs/source/migrations.rst
  24. +1 −1 docs/source/pausable.rst
  25. +1 −1 docs/source/safemath.rst
  26. +1 −1 docs/source/standardtoken.rst
  27. +1 −1 test/BasicToken.js
  28. +2 −2 test/Bounty.js
  29. +3 −3 test/BurnableToken.js
  30. +6 −6 test/Crowdsale.js
  31. +2 −2 test/LimitBalance.js
  32. +1 −1 test/MintableToken.js
  33. +1 −1 test/Ownable.js
  34. +3 −3 test/PausableToken.js
  35. +2 −2 test/PullPayment.js
  36. +1 −1 test/SampleCrowdsale.js
  37. +3 −3 test/StandardToken.js
  38. +1 −1 test/TokenDestructible.js
  39. +1 −1 test/helpers/BurnableTokenMock.sol
  40. +1 −1 test/helpers/CappedCrowdsaleImpl.sol
  41. +1 −1 test/helpers/FinalizableCrowdsaleImpl.sol
  42. +1 −1 test/helpers/RefundableCrowdsaleImpl.sol
  43. +2 −2 test/helpers/increaseTime.js
  44. +1 −1 test/helpers/timer.js
  45. +4 −4 truffle-config.js
@@ -6,4 +6,4 @@ build/
/coverage
coverage.json
allFiredEvents
scTopics
scTopics
@@ -2,4 +2,4 @@ module.exports = {
norpc: true,
testCommand: 'node --max-old-space-size=4096 ../node_modules/.bin/truffle test --network coverage',
skipFiles: ['lifecycle/Migrations.sol']
}
}
@@ -1 +1 @@
node_modules
node_modules
16 LICENSE
@@ -5,18 +5,18 @@ Copyright (c) 2016 Smart Contract Solutions, Inc.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Large diffs are not rendered by default.

@@ -4,11 +4,11 @@ import '../token/MintableToken.sol';
import '../math/SafeMath.sol';

/**
* @title Crowdsale
* @title Crowdsale
* @dev Crowdsale is a base contract for managing a token crowdsale.
* Crowdsales have a start and end timestamps, where investors can make
* token purchases and the crowdsale will assign them tokens based
* on a token per ETH rate. Funds collected are forwarded to a wallet
* on a token per ETH rate. Funds collected are forwarded to a wallet
* as they arrive.
*/
contract Crowdsale {
@@ -36,7 +36,7 @@ contract Crowdsale {
* @param beneficiary who got the tokens
* @param value weis paid for purchase
* @param amount amount of tokens purchased
*/
*/
event TokenPurchase(address indexed purchaser, address indexed beneficiary, uint256 value, uint256 amount);


@@ -53,7 +53,7 @@ contract Crowdsale {
wallet = _wallet;
}

// creates the token to be sold.
// creates the token to be sold.
// override this method to have crowdsale of a specific mintable token.
function createTokenContract() internal returns (MintableToken) {
return new MintableToken();
@@ -7,7 +7,7 @@ import './Crowdsale.sol';
/**
* @title FinalizableCrowdsale
* @dev Extension of Crowsdale where an owner can do extra work
* after finishing.
* after finishing.
*/
contract FinalizableCrowdsale is Crowdsale, Ownable {
using SafeMath for uint256;
@@ -26,7 +26,7 @@ contract FinalizableCrowdsale is Crowdsale, Ownable {

finalization();
Finalized();

isFinalized = true;
}

@@ -45,4 +45,4 @@ contract SampleCrowdsale is CappedCrowdsale, RefundableCrowdsale {
return new SampleCrowdsaleToken();
}

}
}
@@ -10,10 +10,10 @@ import "../ownership/Ownable.sol";
*/
contract Destructible is Ownable {

function Destructible() payable { }
function Destructible() 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() onlyOwner {
selfdestruct(owner);
@@ -4,17 +4,17 @@ 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
* listed tokens will be sent to the owner.
*/
contract TokenDestructible is Ownable {

function TokenDestructible() payable { }
function TokenDestructible() payable { }

/**
/**
* @notice Terminate contract and refund to owner
* @param tokens List of addresses of ERC20 or ERC20Basic token contracts to
refund.
@@ -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{
@@ -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
@@ -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 {
@@ -36,7 +36,7 @@ contract Ownable {
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) onlyOwner {
require(newOwner != address(0));
require(newOwner != address(0));
OwnershipTransferred(owner, newOwner);
owner = newOwner;
}
@@ -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;
@@ -31,7 +31,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) constant returns (uint256 balance) {
@@ -65,21 +65,21 @@ contract StandardToken is ERC20, BasicToken {
function allowance(address _owner, address _spender) constant returns (uint256 remaining) {
return allowed[_owner][_spender];
}

/**
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
*/
function increaseApproval (address _spender, uint _addedValue)
function increaseApproval (address _spender, uint _addedValue)
returns (bool success) {
allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);
Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
return true;
}

function decreaseApproval (address _spender, uint _subtractedValue)
function decreaseApproval (address _spender, uint _subtractedValue)
returns (bool success) {
uint oldValue = allowed[msg.sender][_spender];
if (_subtractedValue > oldValue) {
@@ -17,4 +17,4 @@ help:
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@@ -9,4 +9,4 @@ Returns the token balance of the passed address.

function transfer(address _to, uint _value) returns (bool success)
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
Transfers tokens from sender's account. Amount must not be greater than sender's balance.
Transfers tokens from sender's account. Amount must not be greater than sender's balance.
@@ -9,4 +9,4 @@ Interested in contributing to Zeppelin?

* Framework proposal and roadmap: https://medium.com/zeppelin-blog/zeppelin-framework-proposal-and-development-roadmap-fdfa9a3a32ab#.iain47pak
* Issue tracker: https://github.com/OpenZeppelin/zeppelin-solidity/issues
* Contribution guidelines: https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/CONTRIBUTING.md
* Contribution guidelines: https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/CONTRIBUTING.md
@@ -6,14 +6,14 @@
Welcome to Zeppelin-Solidity
=============================================

Zeppelin is a library for writing secure Smart Contracts on Ethereum.
Zeppelin is a library for writing secure Smart Contracts on Ethereum.

With Zeppelin, you can build distributed applications, protocols and organizations:

* using :doc:`contract-security-patterns`
* in the `Solidity language <https://solidity.readthedocs.io/en/develop/>`_.

The code is open-source, and `available on github <https://github.com/OpenZeppelin/zeppelin-solidity>`_.
The code is open-source, and `available on github <https://github.com/OpenZeppelin/zeppelin-solidity>`_.

.. toctree::
:maxdepth: 2
@@ -24,7 +24,7 @@ The code is open-source, and `available on github <https://github.com/OpenZeppel
.. toctree::
:maxdepth: 2
:caption: Smart Contracts

ownable
Pausable
destructible
@@ -41,7 +41,7 @@ The code is open-source, and `available on github <https://github.com/OpenZeppel
.. toctree::
:maxdepth: 2
:caption: Developer Resources

contract-security-patterns
developer-resources
license
license
@@ -13,4 +13,4 @@ Destroys the contract and sends funds back to the owner.
destroyAndSend(address _recipient) onlyOwner
"""""""""""""""""""

Destroys the contract and sends funds back to the _recepient.
Destroys the contract and sends funds back to the _recepient.
@@ -6,18 +6,18 @@ Copyright (c) 2016 Smart Contract Solutions, Inc.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -13,4 +13,4 @@ Creates a new instance of the contract at the passed address.
setCompleted(uint completed) onlyOwner**
""""""""""""""""""""""""""""""""""""""""

Sets the last time that a migration was completed.
Sets the last time that a migration was completed.
@@ -24,4 +24,4 @@ Only runs if pause mechanism is activated.
unpause() onlyOwner whenPaused returns (bool)
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

Deactivates the pause mechanism.
Deactivates the pause mechanism.
@@ -21,4 +21,4 @@ Checks that b is not greater than a before subtracting.
add(uint256 a, uint256 b) internal returns (uint256)
"""""""""""""""""""""""""""""""""""""""""""""""""

Checks that the result is greater than both a and b.
Checks that the result is greater than both a and b.
@@ -23,4 +23,4 @@ Transfers tokens from an account that the sender is approved to transfer from. A

function transfer(address _to, uint _value) returns (bool success)
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
Transfers tokens from sender's account. Amount must not be greater than sender's balance.
Transfers tokens from sender's account. Amount must not be greater than sender's balance.
@@ -29,7 +29,7 @@ contract('BasicToken', function(accounts) {
assert.fail('should have thrown before');
} catch(error) {
assertJump(error);
}
}
});

it('should throw an error when trying to transfer to 0x0', async function() {
@@ -15,7 +15,7 @@ function awaitEvent(event, handler) {
function wrappedHandler(...args) {
Promise.resolve(handler(...args)).then(resolve).catch(reject);
}

event.watch(wrappedHandler);
});
}
@@ -90,7 +90,7 @@ contract('Bounty', function(accounts) {
let reward = web3.toWei(1, 'ether');
let bounty = await InsecureTargetBounty.new();
let event = bounty.TargetCreated({});

let watcher = async function(err, result) {
event.stopWatching();
if (err) { throw err; }
@@ -12,7 +12,7 @@ require('chai')
const expect = require('chai').expect

contract('BurnableToken', function (accounts) {
let token
let token
let expectedTokenSupply = new BigNumber(999)

beforeEach(async function () {
@@ -34,6 +34,6 @@ contract('BurnableToken', function (accounts) {

it('cannot burn more tokens than your balance', async function () {
await token.burn(2000, { from: accounts[0] })
.should.be.rejectedWith(EVMThrow)
.should.be.rejectedWith(EVMThrow)
})
})
})

0 comments on commit 6d8bb49

Please sign in to comment.
You can’t perform that action at this time.