add 2 lines between top level definitions
@@ -1,7 +1,6 @@
pragma solidity ^0.4.0;
-
import './Ownable.sol';
@@ -1,4 +1,13 @@
pragma solidity ^0.4.4;
+
+/**
+ * LimitBalance
+ * Simple contract to limit the balance of child contract.
+ * Note this doesn't prevent other contracts to send funds
+ * by using selfdestruct(address);
+ * See: https://github.com/ConsenSys/smart-contract-best-practices#remember-that-ether-can-be-forcibly-sent-to-an-account
+ */
contract LimitBalance {
uint public limit;
@@ -1,6 +1,9 @@
contract Migrations is Ownable {
uint public lastCompletedMigration;
@@ -1,8 +1,10 @@
import '../PullPayment.sol';
-// UNSAFE CODE, DO NOT USE!
+// UNSAFE CODE, DO NOT USE!
contract BadArrayUse is PullPayment {
address[] employees;
@@ -1,6 +1,7 @@
contract BadFailEarly {
uint constant DEFAULT_SALARY = 50000;
contract BadPushPayments {
address highestBidder;
contract GoodArrayUse is PullPayment {
mapping(address => uint) bonuses;
@@ -1,5 +1,6 @@
contract GoodFailEarly {
@@ -1,4 +1,6 @@
contract GoodPullPayments {
uint highestBid;
/*
* Proof of Existence example contract
* see https://medium.com/zeppelin-blog/the-hitchhikers-guide-to-smart-contracts-in-ethereum-848f08001f05
@@ -1,7 +1,9 @@
contract PullPaymentBid is PullPayment {
address public highestBidder;
uint public highestBid;
import '../Stoppable.sol';
contract StoppableBid is Stoppable, PullPayment {
import '../token/BasicToken.sol';
// mock class using BasicToken
contract BasicTokenMock is BasicToken {
import '../LimitBalance.sol';
// mock class using LimitBalance
contract LimitBalanceMock is LimitBalance(1000) {
// mock class using PullPayment
contract PullPaymentMock is PullPayment {
import '../SafeMath.sol';
contract SafeMathMock is SafeMath {
uint public result;
import '../token/StandardToken.sol';
// mock class using StandardToken
contract StandardTokenMock is StandardToken {
// mock class using Stoppable
contract StoppableMock is Stoppable {
bool public drasticMeasureTaken;
@@ -1,10 +1,12 @@
import './ERC20.sol';
/**
- * ERC20 token
+ * Standard ERC20 token
*
* https://github.com/ethereum/EIPs/issues/20
* Based on code by FirstBlood: