diff --git a/.gitignore b/.gitignore
index b512c09..f5d0806 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,10 @@
-node_modules
\ No newline at end of file
+node_modules
+
+.DS_Store
+.project
+.settings
+audit/test/testchain/geth
+audit/test/testchain/geth.ipc
+audit/test/testchain/history
+audit/test/contracts
+private
diff --git a/audit/README.md b/audit/README.md
new file mode 100644
index 0000000..d6e3e53
--- /dev/null
+++ b/audit/README.md
@@ -0,0 +1,182 @@
+# Oracles Network Presale Contract Audit
+
+## Summary
+
+[Oracles Network](https://oracles.org/) intends to run a presale commencing in Nov 2017.
+
+Bok Consulting Pty Ltd was commissioned to perform an audit on the Oracles Network's presale Ethereum smart contract.
+
+This audit has been conducted on Oracles Network's source code in commit
+[5bc4391](https://github.com/oraclesorg/oracles-presale/commit/5bc439115ecebb0a52cfe9305f00f89756c5a90a).
+
+No potential vulnerabilities have been identified in the presale contract.
+
+
+
+### Mainnet Addresses
+
+`TBA`
+
+
+
+### Presale Contract
+
+Ethers contributed by participants to the presale contract are immediately transferred to the presale wallet, reducing any risk of the loss
+of ethers in this bespoke smart contract.
+
+No tokens are generated for these contributions.
+
+
+
+
+
+## Table Of Contents
+
+* [Summary](#summary)
+* [Recommendations](#recommendations)
+* [Potential Vulnerabilities](#potential-vulnerabilities)
+* [Scope](#scope)
+* [Limitations](#limitations)
+* [Due Diligence](#due-diligence)
+* [Risks](#risks)
+* [Testing](#testing)
+* [Code Review](#code-review)
+
+
+
+
+
+## Recommendations
+
+* **LOW IMPORTANCE** Use the OpenZeppelin *Claimable* contract instead of the *Ownable* contract to provide more safety during the
+ ownership transfer process
+
+* **LOW IMPORTANCE** The variable `PresaleOracles.rate` is unused and can be removed
+
+* **LOW IMPORTANCE** Consider adding the logging of an event for each contribution, like `Contribution(address investor, uint investorAmount, uint investorTotal, uint totalAmount)`.
+ This data can then be easily extracted using a script, if there are many individual contributions
+
+* **LOW IMPORTANCE** `BasicToken` can be replaced with the `ERC20Basic` interface in `PresaleOracles.claimTokens(...)`, and the `BasicToken`
+ contract source code can be removed
+
+
+
+
+
+## Potential Vulnerabilities
+
+No potential vulnerabilities have been identified in the presale contract.
+
+
+
+
+
+## Scope
+
+This audit is into the technical aspects of the presale contract. The primary aim of this audit is to ensure that funds
+contributed to this contract is not easily attacked or stolen by third parties. The secondary aim of this audit is that
+ensure the coded algorithms work as expected. This audit does not guarantee that that the code is bugfree, but intends to
+highlight any areas of weaknesses.
+
+
+
+
+
+## Limitations
+
+This audit makes no statements or warranties about the viability of the Oracles Network's business proposition, the individuals
+involved in this business or the regulatory regime for the business model.
+
+
+
+
+
+## Due Diligence
+
+As always, potential participants in any crowdsale are encouraged to perform their due diligence on the business proposition
+before funding any crowdsales.
+
+Potential participants are also encouraged to only send their funds to the official crowdsale Ethereum address, published on
+the crowdsale beneficiary's official communication channel.
+
+Scammers have been publishing phishing address in the forums, twitter and other communication channels, and some go as far as
+duplicating crowdsale websites. Potential participants should NOT just click on any links received through these messages.
+Scammers have also hacked the crowdsale website to replace the crowdsale contract address with their scam address.
+
+Potential participants should also confirm that the verified source code on EtherScan.io for the published crowdsale address
+matches the audited source code, and that the deployment parameters are correctly set, including the constant parameters.
+
+
+
+
+
+## Risks
+
+* This presale contract has a low risk of having the ETH hacked or stolen, as any contributions by participants are immediately transferred
+ to the presale wallet.
+
+
+
+
+
+## Testing
+
+The following functions were tested using the script [test/01_test1.sh](test/01_test1.sh) with the summary results saved
+in [test/test1results.txt](test/test1results.txt) and the detailed output saved in [test/test1output.txt](test/test1output.txt):
+
+* [x] Deploy Presale contract
+* [x] Initialise contract
+* [x] Whitelist accounts
+* [x] Blacklist accounts
+* [x] Send contributions for whitelisted addresses and blacklisted address (expecting failure)
+
+
+
+
+
+## Code Review
+
+* [x] [code-review/PresaleOracles_flat.md](code-review/PresaleOracles_flat.md)
+ * [x] contract Ownable
+ * [x] contract ERC20Basic
+ * [x] contract BasicToken is ERC20Basic
+ * [x] contract PresaleOracles is Ownable
+
+
+
+The following warning messages are generated when using the Solidity compiler 0.4.18 and are of low importance, due to recent changes to the
+Solidity compiler version:
+
+```
+$ solc_0.4.18 PresaleOracles_flat.sol
+PresaleOracles_flat.sol:40:3: Warning: No visibility specified. Defaulting to "public".
+ function Ownable() {
+ ^
+Spanning multiple lines.
+PresaleOracles_flat.sol:4:3: Warning: Function state mutability can be restricted to pure
+ function mul(uint256 a, uint256 b) internal constant returns (uint256) {
+ ^
+Spanning multiple lines.
+PresaleOracles_flat.sol:10:3: Warning: Function state mutability can be restricted to pure
+ function div(uint256 a, uint256 b) internal constant returns (uint256) {
+ ^
+Spanning multiple lines.
+PresaleOracles_flat.sol:17:3: Warning: Function state mutability can be restricted to pure
+ function sub(uint256 a, uint256 b) internal constant returns (uint256) {
+ ^
+Spanning multiple lines.
+PresaleOracles_flat.sol:22:3: Warning: Function state mutability can be restricted to pure
+ function add(uint256 a, uint256 b) internal constant returns (uint256) {
+ ^
+Spanning multiple lines.
+PresaleOracles_flat.sol:127:5: Warning: Function state mutability can be restricted to pure
+ function Presale() public {
+ ^
+Spanning multiple lines.
+```
+
+
+
+
+
+(c) BokkyPooBah / Bok Consulting Pty Ltd for Oracles Network - Nov 15 2017. The MIT Licence.
\ No newline at end of file
diff --git a/audit/code-review/PresaleOracles_flat.md b/audit/code-review/PresaleOracles_flat.md
new file mode 100644
index 0000000..a2a4e89
--- /dev/null
+++ b/audit/code-review/PresaleOracles_flat.md
@@ -0,0 +1,321 @@
+# PresaleOracles_flat
+
+Source file [../../flat/PresaleOracles_flat.sol](../../flat/PresaleOracles_flat.sol).
+
+
+
+
+
+```javascript
+// BK Ok
+pragma solidity ^0.4.18;
+
+// BK Ok
+library SafeMath {
+ // BK Ok
+ function mul(uint256 a, uint256 b) internal constant returns (uint256) {
+ // BK Ok
+ uint256 c = a * b;
+ // BK Ok
+ assert(a == 0 || c / a == b);
+ // BK Ok
+ return c;
+ }
+
+ // BK Ok
+ function div(uint256 a, uint256 b) internal constant returns (uint256) {
+ // assert(b > 0); // Solidity automatically throws when dividing by 0
+ // BK Ok
+ uint256 c = a / b;
+ // assert(a == b * c + a % b); // There is no case in which this doesn't hold
+ // BK Ok
+ return c;
+ }
+
+ // BK Ok
+ function sub(uint256 a, uint256 b) internal constant returns (uint256) {
+ // BK Ok
+ assert(b <= a);
+ // BK Ok
+ return a - b;
+ }
+
+ // BK Ok
+ function add(uint256 a, uint256 b) internal constant returns (uint256) {
+ // BK Ok
+ uint256 c = a + b;
+ // BK Ok
+ assert(c >= a);
+ // BK Ok
+ return c;
+ }
+}
+
+// BK Ok
+contract Ownable {
+ // BK Ok
+ address public owner;
+
+
+ // BK Ok - Event
+ event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
+
+
+ /**
+ * @dev The Ownable constructor sets the original `owner` of the contract to the sender
+ * account.
+ */
+ // BK Ok - Constructor
+ function Ownable() {
+ // BK Ok
+ owner = msg.sender;
+ }
+
+
+ /**
+ * @dev Throws if called by any account other than the owner.
+ */
+ // BK Ok
+ modifier onlyOwner() {
+ // BK Ok
+ require(msg.sender == owner);
+ // BK Ok
+ _;
+ }
+
+
+ /**
+ * @dev Allows the current owner to transfer control of the contract to a newOwner.
+ * @param newOwner The address to transfer ownership to.
+ */
+ // BK Ok - Only owner can execute
+ function transferOwnership(address newOwner) onlyOwner public {
+ // BK Ok
+ require(newOwner != address(0));
+ // BK Ok - Log event
+ OwnershipTransferred(owner, newOwner);
+ // BK Ok
+ owner = newOwner;
+ }
+
+}
+
+// BK Ok
+contract ERC20Basic {
+ // BK Ok
+ uint256 public totalSupply;
+ // BK Ok
+ function balanceOf(address who) public constant returns (uint256);
+ // BK Ok
+ function transfer(address to, uint256 value) public returns (bool);
+ // BK Ok - Event
+ event Transfer(address indexed from, address indexed to, uint256 value);
+}
+
+// BK Ok
+contract BasicToken is ERC20Basic {
+ // BK Ok
+ using SafeMath for uint256;
+
+ // BK Ok
+ mapping(address => uint256) balances;
+
+ /**
+ * @dev transfer token for a specified address
+ * @param _to The address to transfer to.
+ * @param _value The amount to be transferred.
+ */
+ // BK Ok
+ function transfer(address _to, uint256 _value) public returns (bool) {
+ // BK Ok
+ require(_to != address(0));
+
+ // SafeMath.sub will throw if there is not enough balance.
+ // BK Ok
+ balances[msg.sender] = balances[msg.sender].sub(_value);
+ // BK Ok
+ balances[_to] = balances[_to].add(_value);
+ // BK Ok - Log event
+ Transfer(msg.sender, _to, _value);
+ // BK Ok
+ return true;
+ }
+
+ /**
+ * @dev Gets the balance of the specified address.
+ * @param _owner The address to query the the balance of.
+ * @return An uint256 representing the amount owned by the passed address.
+ */
+ // BK Ok - Constant function
+ function balanceOf(address _owner) public constant returns (uint256 balance) {
+ // BK Ok
+ return balances[_owner];
+ }
+
+}
+
+// BK Ok
+contract PresaleOracles is Ownable {
+/*
+ * PresaleOracles
+ * Simple Presale contract
+ * built by github.com/rstormsf Roman Storm
+ */
+ // BK Ok
+ using SafeMath for uint256;
+ // BK Next 6 Ok
+ uint256 public startTime;
+ uint256 public endTime;
+ uint256 public cap;
+ uint256 public rate;
+ uint256 public totalInvestedInWei;
+ uint256 public minimumContribution;
+ // BK Next 2 Ok
+ mapping(address => uint256) public investorBalances;
+ mapping(address => bool) public whitelist;
+ // BK Ok
+ uint256 public investorsLength;
+ // BK Ok
+ address public vault;
+ // BK Ok
+ bool public isInitialized = false;
+ // TESTED by Roman Storm
+ // BK Ok
+ function () public payable {
+ // BK Ok
+ buy();
+ }
+ //TESTED by Roman Storm
+ // BK Ok - Constructor
+ function Presale() public {
+ }
+ //TESTED by Roman Storm
+ // BK Ok - Only owner can execute
+ function initialize(uint256 _startTime, uint256 _endTime, uint256 _cap, uint256 _minimumContribution, address _vault) public onlyOwner {
+ // BK Ok
+ require(!isInitialized);
+ // BK Next 7 Ok
+ require(_startTime != 0);
+ require(_endTime != 0);
+ require(_endTime > _startTime);
+ require(_cap != 0);
+ require(_minimumContribution != 0);
+ require(_vault != 0x0);
+ require(_cap > _minimumContribution);
+ // BK Next 6 Ok
+ startTime = _startTime;
+ endTime = _endTime;
+ cap = _cap;
+ isInitialized = true;
+ minimumContribution = _minimumContribution;
+ vault = _vault;
+ }
+ //TESTED by Roman Storm
+ // BK Ok - Payable
+ function buy() public payable {
+ // BK Ok
+ require(whitelist[msg.sender]);
+ // BK Ok
+ require(isValidPurchase(msg.value));
+ // BK Ok
+ require(isInitialized);
+ // BK Ok
+ require(getTime() >= startTime && getTime() <= endTime);
+ // BK Ok
+ address investor = msg.sender;
+ // BK Ok
+ investorBalances[investor] += msg.value;
+ // BK Ok
+ totalInvestedInWei += msg.value;
+ // BK Ok
+ forwardFunds(msg.value);
+ }
+
+ //TESTED by Roman Storm
+ // BK Ok
+ function forwardFunds(uint256 _amount) internal {
+ // BK Ok
+ vault.transfer(_amount);
+ }
+ //TESTED by Roman Storm
+ // BK Ok - Only owner can execute
+ function claimTokens(address _token) public onlyOwner {
+ // BK Ok
+ if (_token == 0x0) {
+ // BK Ok
+ owner.transfer(this.balance);
+ // BK Ok
+ return;
+ }
+
+ // BK Ok
+ BasicToken token = BasicToken(_token);
+ // BK Ok
+ uint256 balance = token.balanceOf(this);
+ // BK Ok
+ token.transfer(owner, balance);
+ }
+
+ // BK Ok
+ function getTime() internal view returns(uint256) {
+ // BK Ok
+ return now;
+ }
+ //TESTED by Roman Storm
+ // BK Ok - Constant function
+ function isValidPurchase(uint256 _amount) public view returns(bool) {
+ // BK Ok
+ bool nonZero = _amount > 0;
+ // BK Ok
+ bool hasMinimumAmount = investorBalances[msg.sender].add(_amount) >= minimumContribution;
+ // BK Ok
+ bool withinCap = totalInvestedInWei.add(_amount) <= cap;
+ // BK Ok
+ return hasMinimumAmount && withinCap && nonZero;
+ }
+ //TESTED by Roman Storm
+ // BK Ok - Only owner can execute
+ function whitelistInvestor(address _newInvestor) public onlyOwner {
+ // BK Ok
+ if(!whitelist[_newInvestor]) {
+ // BK Ok
+ whitelist[_newInvestor] = true;
+ // BK Ok
+ investorsLength++;
+ }
+ }
+ //TESTED by Roman Storm
+ // BK Ok - Only owner can execute
+ function whitelistInvestors(address[] _investors) external onlyOwner {
+ // BK Ok
+ require(_investors.length <= 250);
+ // BK Ok
+ for(uint8 i=0; i<_investors.length;i++) {
+ // BK Ok
+ address newInvestor = _investors[i];
+ // BK Ok
+ if(!whitelist[newInvestor]) {
+ // BK Ok
+ whitelist[newInvestor] = true;
+ // BK Ok
+ investorsLength++;
+ }
+ }
+ }
+ // BK Ok - Only owner can execute
+ function blacklistInvestor(address _investor) public onlyOwner {
+ // BK Ok
+ if(whitelist[_investor]) {
+ // BK Ok
+ delete whitelist[_investor];
+ // BK Ok
+ if(investorsLength != 0) {
+ // BK Ok
+ investorsLength--;
+ }
+ }
+ }
+}
+
+
+```
diff --git a/audit/test/00_runGeth.sh b/audit/test/00_runGeth.sh
new file mode 100755
index 0000000..ad23589
--- /dev/null
+++ b/audit/test/00_runGeth.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+rm -f ./testchain/geth/chaindata/*
+
+geth --datadir ./testchain init genesis.json
+
+geth --datadir ./testchain --unlock 0 --password ./testpassword --rpc --rpccorsdomain '*' --rpcport 8646 --rpcapi "eth,net,web3,debug" --port 32323 --mine --minerthreads 1 --maxpeers 0 --targetgaslimit 994712388 console
+
diff --git a/audit/test/01_test1.sh b/audit/test/01_test1.sh
new file mode 100755
index 0000000..c7ec90c
--- /dev/null
+++ b/audit/test/01_test1.sh
@@ -0,0 +1,225 @@
+#!/bin/bash
+# ----------------------------------------------------------------------------------------------
+# Testing the smart contract
+#
+# Enjoy. (c) BokkyPooBah / Bok Consulting Pty Ltd 2017. The MIT Licence.
+# ----------------------------------------------------------------------------------------------
+
+MODE=${1:-test}
+
+GETHATTACHPOINT=`grep ^IPCFILE= settings.txt | sed "s/^.*=//"`
+PASSWORD=`grep ^PASSWORD= settings.txt | sed "s/^.*=//"`
+
+CONTRACTSDIR=`grep ^CONTRACTSDIR= settings.txt | sed "s/^.*=//"`
+
+SALESOL=`grep ^SALESOL= settings.txt | sed "s/^.*=//"`
+SALEJS=`grep ^SALEJS= settings.txt | sed "s/^.*=//"`
+
+DEPLOYMENTDATA=`grep ^DEPLOYMENTDATA= settings.txt | sed "s/^.*=//"`
+
+INCLUDEJS=`grep ^INCLUDEJS= settings.txt | sed "s/^.*=//"`
+TEST1OUTPUT=`grep ^TEST1OUTPUT= settings.txt | sed "s/^.*=//"`
+TEST1RESULTS=`grep ^TEST1RESULTS= settings.txt | sed "s/^.*=//"`
+
+CURRENTTIME=`date +%s`
+CURRENTTIMES=`date -r $CURRENTTIME -u`
+
+# Setting time to be a block representing one day
+BLOCKSINDAY=1
+
+if [ "$MODE" == "dev" ]; then
+ # Start time now
+ STARTTIME=`echo "$CURRENTTIME" | bc`
+else
+ # Start time 1m 10s in the future
+ STARTTIME=`echo "$CURRENTTIME+75" | bc`
+fi
+STARTTIME_S=`date -r $STARTTIME -u`
+ENDTIME=`echo "$CURRENTTIME+60*3" | bc`
+ENDTIME_S=`date -r $ENDTIME -u`
+
+printf "MODE = '$MODE'\n" | tee $TEST1OUTPUT
+printf "GETHATTACHPOINT = '$GETHATTACHPOINT'\n" | tee -a $TEST1OUTPUT
+printf "PASSWORD = '$PASSWORD'\n" | tee -a $TEST1OUTPUT
+
+printf "CONTRACTSDIR = '$CONTRACTSDIR'\n" | tee -a $TEST1OUTPUT
+
+printf "SALESOL = '$SALESOL'\n" | tee -a $TEST1OUTPUT
+printf "SALEJS = '$SALEJS'\n" | tee -a $TEST1OUTPUT
+
+printf "DEPLOYMENTDATA = '$DEPLOYMENTDATA'\n" | tee -a $TEST1OUTPUT
+printf "INCLUDEJS = '$INCLUDEJS'\n" | tee -a $TEST1OUTPUT
+printf "TEST1OUTPUT = '$TEST1OUTPUT'\n" | tee -a $TEST1OUTPUT
+printf "TEST1RESULTS = '$TEST1RESULTS'\n" | tee -a $TEST1OUTPUT
+printf "CURRENTTIME = '$CURRENTTIME' '$CURRENTTIMES'\n" | tee -a $TEST1OUTPUT
+printf "STARTTIME = '$STARTTIME' '$STARTTIME_S'\n" | tee -a $TEST1OUTPUT
+printf "ENDTIME = '$ENDTIME' '$ENDTIME_S'\n" | tee -a $TEST1OUTPUT
+
+# Make copy of SOL file and modify start and end times ---
+`cp $CONTRACTSDIR/$SALESOL $SALESOL`
+
+# --- Modify parameters ---
+#`perl -pi -e "s/timePassed \> months\(3\)/timePassed \> 0/" $DTHSOL`
+#`perl -pi -e "s/deadline \= 1499436000;.*$/deadline = $ENDTIME; \/\/ $ENDTIME_S/" $FUNFAIRSALETEMPSOL`
+#`perl -pi -e "s/\/\/\/ \@return total amount of tokens.*$/function overloadedTotalSupply() constant returns (uint256) \{ return totalSupply; \}/" $DAOCASINOICOTEMPSOL`
+#`perl -pi -e "s/BLOCKS_IN_DAY \= 5256;*$/BLOCKS_IN_DAY \= $BLOCKSINDAY;/" $DAOCASINOICOTEMPSOL`
+
+DIFFS1=`diff $CONTRACTSDIR/$SALESOL $SALESOL`
+echo "--- Differences $CONTRACTSDIR/$SALESOL $SALESOL ---" | tee -a $TEST1OUTPUT
+echo "$DIFFS1" | tee -a $TEST1OUTPUT
+
+solc_0.4.18 --version | tee -a $TEST1OUTPUT
+
+echo "var saleOutput=`solc_0.4.18 --optimize --combined-json abi,bin,interface $SALESOL`;" > $SALEJS
+
+geth --verbosity 3 attach $GETHATTACHPOINT << EOF | tee -a $TEST1OUTPUT
+loadScript("$SALEJS");
+loadScript("functions.js");
+
+var saleAbi = JSON.parse(saleOutput.contracts["$SALESOL:PresaleOracles"].abi);
+var saleBin = "0x" + saleOutput.contracts["$SALESOL:PresaleOracles"].bin;
+
+// console.log("DATA: saleAbi=" + JSON.stringify(saleAbi));
+// console.log("DATA: saleBin=" + saleBin);
+
+unlockAccounts("$PASSWORD");
+printBalances();
+console.log("RESULT: ");
+
+// -----------------------------------------------------------------------------
+var saleMessage = "Deploy Presale Contract";
+// -----------------------------------------------------------------------------
+console.log("RESULT: " + saleMessage);
+var saleContract = web3.eth.contract(saleAbi);
+var saleTx = null;
+var saleAddress = null;
+var sale = saleContract.new({from: contractOwnerAccount, data: saleBin, gas: 4000000},
+ function(e, contract) {
+ if (!e) {
+ if (!contract.address) {
+ saleTx = contract.transactionHash;
+ } else {
+ saleAddress = contract.address;
+ addAccount(saleAddress, "Presale");
+ addPresaleContractAddressAndAbi(saleAddress, saleAbi);
+ printTxData("saleAddress=" + saleAddress, saleTx);
+ }
+ }
+ }
+);
+while (txpool.status.pending > 0) {
+}
+printBalances();
+failIfTxStatusError(saleTx, saleMessage);
+printPresaleContractDetails();
+console.log("RESULT: ");
+
+
+// -----------------------------------------------------------------------------
+var initialiseSaleMessage = "Initialise Contribution";
+var startTime = $STARTTIME;
+var endTime = $ENDTIME;
+var cap = web3.toWei("10000", "ether");
+var minimumContribution = web3.toWei("0.1", "ether");
+// function initialize(uint256 _startTime, uint256 _endTime, uint256 _cap, uint256 _minimumContribution, address _vault) public onlyOwner
+// -----------------------------------------------------------------------------
+console.log("RESULT: " + initialiseSaleMessage);
+var initialiseSaleTx = sale.initialize(startTime, endTime, cap, minimumContribution, multisig, {from: contractOwnerAccount, gas: 2000000});
+while (txpool.status.pending > 0) {
+}
+printTxData("initialiseSaleTx", initialiseSaleTx);
+printBalances();
+failIfTxStatusError(initialiseSaleTx, initialiseSaleMessage);
+printPresaleContractDetails();
+console.log("RESULT: ");
+
+
+waitUntil("startTime", startTime, 0);
+
+
+// -----------------------------------------------------------------------------
+var whitelistMessage = "Whitelist";
+// -----------------------------------------------------------------------------
+console.log("RESULT: " + whitelistMessage);
+var whitelist_1Tx = sale.whitelistInvestor(account3, {from: contractOwnerAccount, gas: 2000000});
+var whitelist_2Tx = sale.whitelistInvestors([account4, account5, account7], {from: contractOwnerAccount, gas: 2000000});
+while (txpool.status.pending > 0) {
+}
+printTxData("whitelist_1Tx", whitelist_1Tx);
+printTxData("whitelist_2Tx", whitelist_2Tx);
+printBalances();
+failIfTxStatusError(whitelist_1Tx, whitelistMessage + " - whitelist(account3)");
+failIfTxStatusError(whitelist_2Tx, whitelistMessage + " - whitelist([account4, account5, account7])");
+printPresaleContractDetails();
+console.log("RESULT: ");
+
+
+// -----------------------------------------------------------------------------
+var blacklistMessage = "Blacklist";
+// -----------------------------------------------------------------------------
+console.log("RESULT: " + blacklistMessage);
+var blacklist_1Tx = sale.blacklistInvestor(account4, {from: contractOwnerAccount, gas: 2000000});
+while (txpool.status.pending > 0) {
+}
+printTxData("blacklist_1Tx", blacklist_1Tx);
+printBalances();
+failIfTxStatusError(blacklist_1Tx, blacklistMessage + " - blacklist(account4)");
+printPresaleContractDetails();
+console.log("RESULT: ");
+
+
+// -----------------------------------------------------------------------------
+var sendContribution1Message = "Send Contribution";
+// -----------------------------------------------------------------------------
+console.log("RESULT: " + sendContribution1Message);
+var sendContribution1_1Tx = eth.sendTransaction({from: account3, to: saleAddress, gas: 400000, value: web3.toWei("1000", "ether")});
+var sendContribution1_2Tx = eth.sendTransaction({from: account4, to: saleAddress, gas: 400000, value: web3.toWei("1000", "ether")});
+var sendContribution1_3Tx = eth.sendTransaction({from: account5, to: saleAddress, gas: 400000, value: web3.toWei("1000", "ether")});
+var sendContribution1_4Tx = eth.sendTransaction({from: account6, to: saleAddress, gas: 400000, value: web3.toWei("1000", "ether")});
+while (txpool.status.pending > 0) {
+}
+var sendContribution1_5Tx = eth.sendTransaction({from: account7, to: saleAddress, gas: 400000, value: web3.toWei("8000.00000000001", "ether")});
+while (txpool.status.pending > 0) {
+}
+var sendContribution1_6Tx = eth.sendTransaction({from: account7, to: saleAddress, gas: 400000, value: web3.toWei("7999", "ether")});
+while (txpool.status.pending > 0) {
+}
+printTxData("sendContribution1_1Tx", sendContribution1_1Tx);
+printTxData("sendContribution1_2Tx", sendContribution1_2Tx);
+printTxData("sendContribution1_3Tx", sendContribution1_3Tx);
+printTxData("sendContribution1_4Tx", sendContribution1_4Tx);
+printTxData("sendContribution1_5Tx", sendContribution1_5Tx);
+printTxData("sendContribution1_6Tx", sendContribution1_6Tx);
+printBalances();
+failIfTxStatusError(sendContribution1_1Tx, sendContribution1Message + " ac3 1000 ETH");
+passIfTxStatusError(sendContribution1_2Tx, sendContribution1Message + " ac4 1000 ETH - Expecting failure, not whitelisted");
+failIfTxStatusError(sendContribution1_3Tx, sendContribution1Message + " ac5 1000 ETH");
+passIfTxStatusError(sendContribution1_4Tx, sendContribution1Message + " ac6 1000 ETH - Expecting failure, not whitelisted");
+passIfTxStatusError(sendContribution1_5Tx, sendContribution1Message + " ac7 8000.00000000001 ETH - Expecting failure, amount will blow the cap");
+failIfTxStatusError(sendContribution1_6Tx, sendContribution1Message + " ac7 7999 ETH");
+printPresaleContractDetails();
+console.log("RESULT: ");
+
+
+waitUntil("endTime", endTime, 0);
+
+
+// -----------------------------------------------------------------------------
+var sendContribution2Message = "Send Contribution After End";
+// -----------------------------------------------------------------------------
+console.log("RESULT: " + sendContribution2Message);
+var sendContribution2_1Tx = eth.sendTransaction({from: account3, to: saleAddress, gas: 400000, value: web3.toWei("1", "ether")});
+while (txpool.status.pending > 0) {
+}
+printTxData("sendContribution2_1Tx", sendContribution2_1Tx);
+printBalances();
+passIfTxStatusError(sendContribution2_1Tx, sendContribution2Message + " ac3 1 ETH - Expecting failure, after end");
+printPresaleContractDetails();
+console.log("RESULT: ");
+
+
+EOF
+grep "DATA: " $TEST1OUTPUT | sed "s/DATA: //" > $DEPLOYMENTDATA
+cat $DEPLOYMENTDATA
+grep "RESULT: " $TEST1OUTPUT | sed "s/RESULT: //" > $TEST1RESULTS
+cat $TEST1RESULTS
diff --git a/audit/test/PresaleOracles_flat.js b/audit/test/PresaleOracles_flat.js
new file mode 100644
index 0000000..622baf3
--- /dev/null
+++ b/audit/test/PresaleOracles_flat.js
@@ -0,0 +1 @@
+var saleOutput={"contracts":{"PresaleOracles_flat.sol:BasicToken":{"abi":"[{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"balance\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"}]","bin":"6060604052341561000f57600080fd5b6102208061001e6000396000f3006060604052600436106100565763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166318160ddd811461005b57806370a0823114610080578063a9059cbb1461009f575b600080fd5b341561006657600080fd5b61006e6100d5565b60405190815260200160405180910390f35b341561008b57600080fd5b61006e600160a060020a03600435166100db565b34156100aa57600080fd5b6100c1600160a060020a03600435166024356100f6565b604051901515815260200160405180910390f35b60005481565b600160a060020a031660009081526001602052604090205490565b6000600160a060020a038316151561010d57600080fd5b600160a060020a033316600090815260016020526040902054610136908363ffffffff6101cc16565b600160a060020a03338116600090815260016020526040808220939093559085168152205461016b908363ffffffff6101de16565b600160a060020a0380851660008181526001602052604090819020939093559133909116907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a350600192915050565b6000828211156101d857fe5b50900390565b6000828201838110156101ed57fe5b93925050505600a165627a7a723058208e041ad4354c374fb71d24e6f0b3979d9380c1818dbcdf70bc117239a4531fe90029"},"PresaleOracles_flat.sol:ERC20Basic":{"abi":"[{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"who\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"}]","bin":""},"PresaleOracles_flat.sol:Ownable":{"abi":"[{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"}]","bin":"6060604052341561000f57600080fd5b60008054600160a060020a033316600160a060020a03199091161790556101768061003b6000396000f30060606040526004361061004b5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416638da5cb5b8114610050578063f2fde38b1461007f575b600080fd5b341561005b57600080fd5b6100636100a0565b604051600160a060020a03909116815260200160405180910390f35b341561008a57600080fd5b61009e600160a060020a03600435166100af565b005b600054600160a060020a031681565b60005433600160a060020a039081169116146100ca57600080fd5b600160a060020a03811615156100df57600080fd5b600054600160a060020a0380831691167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790555600a165627a7a7230582028d45d31b15c84659bb80e5bc654189cd13c0b20e039114f936790d7d2f517040029"},"PresaleOracles_flat.sol:PresaleOracles":{"abi":"[{\"constant\":true,\"inputs\":[],\"name\":\"rate\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"endTime\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"cap\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isInitialized\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"Presale\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_investors\",\"type\":\"address[]\"}],\"name\":\"whitelistInvestors\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"investorsLength\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"isValidPurchase\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"startTime\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"minimumContribution\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"whitelist\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"buy\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"investorBalances\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newInvestor\",\"type\":\"address\"}],\"name\":\"whitelistInvestor\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_startTime\",\"type\":\"uint256\"},{\"name\":\"_endTime\",\"type\":\"uint256\"},{\"name\":\"_cap\",\"type\":\"uint256\"},{\"name\":\"_minimumContribution\",\"type\":\"uint256\"},{\"name\":\"_vault\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_token\",\"type\":\"address\"}],\"name\":\"claimTokens\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalInvestedInWei\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"vault\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_investor\",\"type\":\"address\"}],\"name\":\"blacklistInvestor\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"}]","bin":"6060604052600a805460a060020a60ff021916905560008054600160a060020a033316600160a060020a03199091161790556109ec806100406000396000f3006060604052600436106101035763ffffffff60e060020a6000350416632c4e722e811461010d5780633197cbb614610132578063355274ea14610145578063392e53cd146101585780635036d6101461017f5780635613680a14610192578063594337a9146101b057806361e214d8146101c357806378e97925146101d95780638da5cb5b146101ec578063937e09b11461021b5780639b19251a1461022e578063a6f2ae3a14610103578063b29a61c11461024d578063c430bcda1461026c578063ccd652961461028b578063df8de3e7146102b6578063f117c924146102d5578063f2fde38b146102e8578063fbfa77cf14610307578063ffc1b0381461031a575b61010b610339565b005b341561011857600080fd5b6101206103f0565b60405190815260200160405180910390f35b341561013d57600080fd5b6101206103f6565b341561015057600080fd5b6101206103fc565b341561016357600080fd5b61016b610402565b604051901515815260200160405180910390f35b341561018a57600080fd5b61010b610412565b341561019d57600080fd5b61010b6004803560248101910135610414565b34156101bb57600080fd5b6101206104d1565b34156101ce57600080fd5b61016b6004356104d7565b34156101e457600080fd5b610120610549565b34156101f757600080fd5b6101ff61054f565b604051600160a060020a03909116815260200160405180910390f35b341561022657600080fd5b61012061055e565b341561023957600080fd5b61016b600160a060020a0360043516610564565b341561025857600080fd5b610120600160a060020a0360043516610579565b341561027757600080fd5b61010b600160a060020a036004351661058b565b341561029657600080fd5b61010b600435602435604435606435600160a060020a03608435166105f8565b34156102c157600080fd5b61010b600160a060020a03600435166106ea565b34156102e057600080fd5b610120610852565b34156102f357600080fd5b61010b600160a060020a0360043516610858565b341561031257600080fd5b6101ff6108f3565b341561032557600080fd5b61010b600160a060020a0360043516610902565b600160a060020a03331660009081526008602052604081205460ff16151561036057600080fd5b610369346104d7565b151561037457600080fd5b600a5460a060020a900460ff16151561038c57600080fd5b600154610397610973565b101580156103ae57506002546103ab610973565b11155b15156103b957600080fd5b5033600160a060020a038116600090815260076020526040902080543490810190915560058054820190556103ed90610977565b50565b60045481565b60025481565b60035481565b600a5460a060020a900460ff1681565b565b60008054819033600160a060020a0390811691161461043257600080fd5b60fa83111561044057600080fd5b600091505b60ff8216839010156104cb57838360ff841681811061046057fe5b60209081029290920135600160a060020a0316600081815260089093526040909220549192505060ff1615156104c057600160a060020a0381166000908152600860205260409020805460ff191660019081179091556009805490910190555b600190910190610445565b50505050565b60095481565b600654600160a060020a0333166000908152600760205260408120549091828411918391829161050d908763ffffffff6109aa16565b10159150600354610529866005546109aa90919063ffffffff16565b111590508180156105375750805b80156105405750825b95945050505050565b60015481565b600054600160a060020a031681565b60065481565b60086020526000908152604090205460ff1681565b60076020526000908152604090205481565b60005433600160a060020a039081169116146105a657600080fd5b600160a060020a03811660009081526008602052604090205460ff1615156103ed57600160a060020a03166000908152600860205260409020805460ff19166001908117909155600980549091019055565b60005433600160a060020a0390811691161461061357600080fd5b600a5460a060020a900460ff161561062a57600080fd5b84151561063657600080fd5b83151561064257600080fd5b84841161064e57600080fd5b82151561065a57600080fd5b81151561066657600080fd5b600160a060020a038116151561067b57600080fd5b81831161068757600080fd5b600194909455600292909255600355600a8054600692909255600160a060020a0390921673ffffffffffffffffffffffffffffffffffffffff1974ff00000000000000000000000000000000000000001990921660a060020a1791909116179055565b60008054819033600160a060020a0390811691161461070857600080fd5b600160a060020a038316151561075657600054600160a060020a039081169030163180156108fc0290604051600060405180830381858888f19350505050151561075157600080fd5b61084d565b82915081600160a060020a03166370a082313060006040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b15156107b057600080fd5b6102c65a03f115156107c157600080fd5b505050604051805160008054919350600160a060020a03808616935063a9059cbb92169084906040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b151561083157600080fd5b6102c65a03f1151561084257600080fd5b505050604051805150505b505050565b60055481565b60005433600160a060020a0390811691161461087357600080fd5b600160a060020a038116151561088857600080fd5b600054600160a060020a0380831691167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600a54600160a060020a031681565b60005433600160a060020a0390811691161461091d57600080fd5b600160a060020a03811660009081526008602052604090205460ff16156103ed57600160a060020a0381166000908152600860205260409020805460ff19169055600954156103ed576009805460001901905550565b4290565b600a54600160a060020a031681156108fc0282604051600060405180830381858888f1935050505015156103ed57600080fd5b6000828201838110156109b957fe5b93925050505600a165627a7a723058208653dd01ed9e066f91fb98733fc2b4a1319a4cd4929196ae4b891a3d506cfbd40029"},"PresaleOracles_flat.sol:SafeMath":{"abi":"[]","bin":"60606040523415600e57600080fd5b603580601b6000396000f3006060604052600080fd00a165627a7a7230582039e3bcdcfc88c49c4853afef8107f9293fa020ddfc8951a907de10a79214d1de0029"}},"version":"0.4.18+commit.9cf6e910.Darwin.appleclang"};
diff --git a/audit/test/PresaleOracles_flat.sol b/audit/test/PresaleOracles_flat.sol
new file mode 100644
index 0000000..99171e6
--- /dev/null
+++ b/audit/test/PresaleOracles_flat.sol
@@ -0,0 +1,211 @@
+pragma solidity ^0.4.18;
+
+library SafeMath {
+ function mul(uint256 a, uint256 b) internal constant returns (uint256) {
+ uint256 c = a * b;
+ assert(a == 0 || c / a == b);
+ return c;
+ }
+
+ function div(uint256 a, uint256 b) internal constant returns (uint256) {
+ // assert(b > 0); // Solidity automatically throws when dividing by 0
+ uint256 c = a / b;
+ // assert(a == b * c + a % b); // There is no case in which this doesn't hold
+ return c;
+ }
+
+ function sub(uint256 a, uint256 b) internal constant returns (uint256) {
+ assert(b <= a);
+ return a - b;
+ }
+
+ function add(uint256 a, uint256 b) internal constant returns (uint256) {
+ uint256 c = a + b;
+ assert(c >= a);
+ return c;
+ }
+}
+
+contract Ownable {
+ address public owner;
+
+
+ event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
+
+
+ /**
+ * @dev The Ownable constructor sets the original `owner` of the contract to the sender
+ * account.
+ */
+ function Ownable() {
+ owner = msg.sender;
+ }
+
+
+ /**
+ * @dev Throws if called by any account other than the owner.
+ */
+ modifier onlyOwner() {
+ require(msg.sender == owner);
+ _;
+ }
+
+
+ /**
+ * @dev Allows the current owner to transfer control of the contract to a newOwner.
+ * @param newOwner The address to transfer ownership to.
+ */
+ function transferOwnership(address newOwner) onlyOwner public {
+ require(newOwner != address(0));
+ OwnershipTransferred(owner, newOwner);
+ owner = newOwner;
+ }
+
+}
+
+contract ERC20Basic {
+ uint256 public totalSupply;
+ function balanceOf(address who) public constant returns (uint256);
+ function transfer(address to, uint256 value) public returns (bool);
+ event Transfer(address indexed from, address indexed to, uint256 value);
+}
+
+contract BasicToken is ERC20Basic {
+ using SafeMath for uint256;
+
+ mapping(address => uint256) balances;
+
+ /**
+ * @dev transfer token for a specified address
+ * @param _to The address to transfer to.
+ * @param _value The amount to be transferred.
+ */
+ function transfer(address _to, uint256 _value) public returns (bool) {
+ require(_to != address(0));
+
+ // SafeMath.sub will throw if there is not enough balance.
+ balances[msg.sender] = balances[msg.sender].sub(_value);
+ balances[_to] = balances[_to].add(_value);
+ Transfer(msg.sender, _to, _value);
+ return true;
+ }
+
+ /**
+ * @dev Gets the balance of the specified address.
+ * @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 constant returns (uint256 balance) {
+ return balances[_owner];
+ }
+
+}
+
+contract PresaleOracles is Ownable {
+/*
+ * PresaleOracles
+ * Simple Presale contract
+ * built by github.com/rstormsf Roman Storm
+ */
+ using SafeMath for uint256;
+ uint256 public startTime;
+ uint256 public endTime;
+ uint256 public cap;
+ uint256 public rate;
+ uint256 public totalInvestedInWei;
+ uint256 public minimumContribution;
+ mapping(address => uint256) public investorBalances;
+ mapping(address => bool) public whitelist;
+ uint256 public investorsLength;
+ address public vault;
+ bool public isInitialized = false;
+ // TESTED by Roman Storm
+ function () public payable {
+ buy();
+ }
+ //TESTED by Roman Storm
+ function Presale() public {
+ }
+ //TESTED by Roman Storm
+ function initialize(uint256 _startTime, uint256 _endTime, uint256 _cap, uint256 _minimumContribution, address _vault) public onlyOwner {
+ require(!isInitialized);
+ require(_startTime != 0);
+ require(_endTime != 0);
+ require(_endTime > _startTime);
+ require(_cap != 0);
+ require(_minimumContribution != 0);
+ require(_vault != 0x0);
+ require(_cap > _minimumContribution);
+ startTime = _startTime;
+ endTime = _endTime;
+ cap = _cap;
+ isInitialized = true;
+ minimumContribution = _minimumContribution;
+ vault = _vault;
+ }
+ //TESTED by Roman Storm
+ function buy() public payable {
+ require(whitelist[msg.sender]);
+ require(isValidPurchase(msg.value));
+ require(isInitialized);
+ require(getTime() >= startTime && getTime() <= endTime);
+ address investor = msg.sender;
+ investorBalances[investor] += msg.value;
+ totalInvestedInWei += msg.value;
+ forwardFunds(msg.value);
+ }
+
+ //TESTED by Roman Storm
+ function forwardFunds(uint256 _amount) internal {
+ vault.transfer(_amount);
+ }
+ //TESTED by Roman Storm
+ function claimTokens(address _token) public onlyOwner {
+ if (_token == 0x0) {
+ owner.transfer(this.balance);
+ return;
+ }
+
+ BasicToken token = BasicToken(_token);
+ uint256 balance = token.balanceOf(this);
+ token.transfer(owner, balance);
+ }
+
+ function getTime() internal view returns(uint256) {
+ return now;
+ }
+ //TESTED by Roman Storm
+ function isValidPurchase(uint256 _amount) public view returns(bool) {
+ bool nonZero = _amount > 0;
+ bool hasMinimumAmount = investorBalances[msg.sender].add(_amount) >= minimumContribution;
+ bool withinCap = totalInvestedInWei.add(_amount) <= cap;
+ return hasMinimumAmount && withinCap && nonZero;
+ }
+ //TESTED by Roman Storm
+ function whitelistInvestor(address _newInvestor) public onlyOwner {
+ if(!whitelist[_newInvestor]) {
+ whitelist[_newInvestor] = true;
+ investorsLength++;
+ }
+ }
+ //TESTED by Roman Storm
+ function whitelistInvestors(address[] _investors) external onlyOwner {
+ require(_investors.length <= 250);
+ for(uint8 i=0; i<_investors.length;i++) {
+ address newInvestor = _investors[i];
+ if(!whitelist[newInvestor]) {
+ whitelist[newInvestor] = true;
+ investorsLength++;
+ }
+ }
+ }
+ function blacklistInvestor(address _investor) public onlyOwner {
+ if(whitelist[_investor]) {
+ delete whitelist[_investor];
+ if(investorsLength != 0) {
+ investorsLength--;
+ }
+ }
+ }
+}
+
diff --git a/audit/test/README.md b/audit/test/README.md
new file mode 100644
index 0000000..71333a8
--- /dev/null
+++ b/audit/test/README.md
@@ -0,0 +1,57 @@
+# Contract - Testing
+
+
+
+
+
+# Table of contents
+
+* [Requirements](#requirements)
+* [Executing The Tests](#executing-the-tests)
+* [The Tests](#the-tests)
+* [Notes](#notes)
+
+
+
+
+
+# Requirements
+
+* The tests works on OS/X. Should work in Linux. May work in Windows with Cygwin
+* Geth/v1.7.2-stable-1db4ecdc/darwin-amd64/go1.9
+* Solc 0.4.18+commit.9cf6e910.Darwin.appleclang
+
+
+
+
+
+# Executing The Tests
+
+* Run `geth` in dev mode
+
+ ./00_runGeth.sh
+
+* Run the test in [01_test1.sh](01_test1.sh)
+
+ ./01_test1.sh
+
+* See [test1results.txt](test1results.txt) for the results and [test1output.txt](test1output.txt) for the full output.
+
+
+
+
+
+# Notes
+
+* The tests were conducted using bash shell scripts running Geth/v1.7.2-stable-1db4ecdc/darwin-amd64/go1.9 JavaScript commands
+* The smart contracts were compiled using Solidity 0.4.18+commit.9cf6e910.Darwin.appleclang
+* The test script can be found in [01_test1.sh](01_test1.sh)
+* The test results can be found in [test1results.txt](test1results.txt) with details in [test1output.txt](test1output.txt)
+* The test can be run on OS/X, should run on Linux and may run on Windows with Cygwin
+* The [genesis.json](genesis.json) allocates ethers to the test accounts, and specifies a high block gas limit to accommodate many transactions in the same block
+* The [00_runGeth.sh](00_runGeth.sh) scripts starts `geth` with the parameter `--targetgaslimit 994712388` to keep the high block gas limit
+* The reasons for using the test environment as listed above, instead of truffles/testrpc are:
+ * The test are conducted using the actual blockchain client software as is running on Mainnet and not just a mock environment like testrpc
+ * It is easy to change parameters like dates, addresses or blocknumbers using the Unix search/replace tools
+ * There have been issues in the part with version incompatibility between testrpc and solidity, i.e., version mismatches
+ * The intermediate and key results are all saved to later viewing
\ No newline at end of file
diff --git a/audit/test/deploymentData.txt b/audit/test/deploymentData.txt
new file mode 100644
index 0000000..e69de29
diff --git a/audit/test/functions.js b/audit/test/functions.js
new file mode 100644
index 0000000..8790eb2
--- /dev/null
+++ b/audit/test/functions.js
@@ -0,0 +1,384 @@
+// Jul 14 2017
+var ethPriceUSD = 205.452;
+
+// -----------------------------------------------------------------------------
+// Accounts
+// -----------------------------------------------------------------------------
+var accounts = [];
+var accountNames = {};
+
+addAccount(eth.accounts[0], "Account #0 - Miner");
+addAccount(eth.accounts[1], "Account #1 - Contract Owner");
+addAccount(eth.accounts[2], "Account #2 - Multisig");
+addAccount(eth.accounts[3], "Account #3");
+addAccount(eth.accounts[4], "Account #4");
+addAccount(eth.accounts[5], "Account #5");
+addAccount(eth.accounts[6], "Account #6");
+addAccount(eth.accounts[7], "Account #7");
+
+
+var minerAccount = eth.accounts[0];
+var contractOwnerAccount = eth.accounts[1];
+var multisig = eth.accounts[2];
+var account3 = eth.accounts[3];
+var account4 = eth.accounts[4];
+var account5 = eth.accounts[5];
+var account6 = eth.accounts[6];
+var account7 = eth.accounts[7];
+
+var baseBlock = eth.blockNumber;
+
+function unlockAccounts(password) {
+ for (var i = 0; i < eth.accounts.length; i++) {
+ personal.unlockAccount(eth.accounts[i], password, 100000);
+ }
+}
+
+function addAccount(account, accountName) {
+ accounts.push(account);
+ accountNames[account] = accountName;
+}
+
+
+// -----------------------------------------------------------------------------
+// Token Contract
+// -----------------------------------------------------------------------------
+var tokenContractAddress = null;
+var tokenContractAbi = null;
+
+function addTokenContractAddressAndAbi(address, tokenAbi) {
+ tokenContractAddress = address;
+ tokenContractAbi = tokenAbi;
+}
+
+
+// -----------------------------------------------------------------------------
+// Account ETH and token balances
+// -----------------------------------------------------------------------------
+function printBalances() {
+ var token = tokenContractAddress == null || tokenContractAbi == null ? null : web3.eth.contract(tokenContractAbi).at(tokenContractAddress);
+ var decimals = token == null ? 18 : token.decimals();
+ var i = 0;
+ var totalTokenBalance = new BigNumber(0);
+ console.log("RESULT: # Account EtherBalanceChange Token Name");
+ console.log("RESULT: -- ------------------------------------------ --------------------------- ------------------------------ ---------------------------");
+ accounts.forEach(function(e) {
+ var etherBalanceBaseBlock = eth.getBalance(e, baseBlock);
+ var etherBalance = web3.fromWei(eth.getBalance(e).minus(etherBalanceBaseBlock), "ether");
+ var tokenBalance = token == null ? new BigNumber(0) : token.balanceOf(e).shift(-decimals);
+ totalTokenBalance = totalTokenBalance.add(tokenBalance);
+ console.log("RESULT: " + pad2(i) + " " + e + " " + pad(etherBalance) + " " + padToken(tokenBalance, decimals) + " " + accountNames[e]);
+ i++;
+ });
+ console.log("RESULT: -- ------------------------------------------ --------------------------- ------------------------------ ---------------------------");
+ console.log("RESULT: " + padToken(totalTokenBalance, decimals) + " Total Token Balances");
+ console.log("RESULT: -- ------------------------------------------ --------------------------- ------------------------------ ---------------------------");
+ console.log("RESULT: ");
+}
+
+function pad2(s) {
+ var o = s.toFixed(0);
+ while (o.length < 2) {
+ o = " " + o;
+ }
+ return o;
+}
+
+function pad(s) {
+ var o = s.toFixed(18);
+ while (o.length < 27) {
+ o = " " + o;
+ }
+ return o;
+}
+
+function padToken(s, decimals) {
+ var o = s.toFixed(decimals);
+ var l = parseInt(decimals)+12;
+ while (o.length < l) {
+ o = " " + o;
+ }
+ return o;
+}
+
+
+// -----------------------------------------------------------------------------
+// Transaction status
+// -----------------------------------------------------------------------------
+function printTxData(name, txId) {
+ var tx = eth.getTransaction(txId);
+ var txReceipt = eth.getTransactionReceipt(txId);
+ var gasPrice = tx.gasPrice;
+ var gasCostETH = tx.gasPrice.mul(txReceipt.gasUsed).div(1e18);
+ var gasCostUSD = gasCostETH.mul(ethPriceUSD);
+ var block = eth.getBlock(txReceipt.blockNumber);
+ console.log("RESULT: " + name + " status=" + txReceipt.status + (txReceipt.status == 0 ? " Failure" : " Success") + " gas=" + tx.gas +
+ " gasUsed=" + txReceipt.gasUsed + " costETH=" + gasCostETH + " costUSD=" + gasCostUSD +
+ " @ ETH/USD=" + ethPriceUSD + " gasPrice=" + web3.fromWei(gasPrice, "gwei") + " gwei block=" +
+ txReceipt.blockNumber + " txIx=" + tx.transactionIndex + " txId=" + txId +
+ " @ " + block.timestamp + " " + new Date(block.timestamp * 1000).toUTCString());
+}
+
+function assertEtherBalance(account, expectedBalance) {
+ var etherBalance = web3.fromWei(eth.getBalance(account), "ether");
+ if (etherBalance == expectedBalance) {
+ console.log("RESULT: OK " + account + " has expected balance " + expectedBalance);
+ } else {
+ console.log("RESULT: FAILURE " + account + " has balance " + etherBalance + " <> expected " + expectedBalance);
+ }
+}
+
+function failIfTxStatusError(tx, msg) {
+ var status = eth.getTransactionReceipt(tx).status;
+ if (status == 0) {
+ console.log("RESULT: FAIL " + msg);
+ return 0;
+ } else {
+ console.log("RESULT: PASS " + msg);
+ return 1;
+ }
+}
+
+function passIfTxStatusError(tx, msg) {
+ var status = eth.getTransactionReceipt(tx).status;
+ if (status == 1) {
+ console.log("RESULT: FAIL " + msg);
+ return 0;
+ } else {
+ console.log("RESULT: PASS " + msg);
+ return 1;
+ }
+}
+
+function gasEqualsGasUsed(tx) {
+ var gas = eth.getTransaction(tx).gas;
+ var gasUsed = eth.getTransactionReceipt(tx).gasUsed;
+ return (gas == gasUsed);
+}
+
+function failIfGasEqualsGasUsed(tx, msg) {
+ var gas = eth.getTransaction(tx).gas;
+ var gasUsed = eth.getTransactionReceipt(tx).gasUsed;
+ if (gas == gasUsed) {
+ console.log("RESULT: FAIL " + msg);
+ return 0;
+ } else {
+ console.log("RESULT: PASS " + msg);
+ return 1;
+ }
+}
+
+function passIfGasEqualsGasUsed(tx, msg) {
+ var gas = eth.getTransaction(tx).gas;
+ var gasUsed = eth.getTransactionReceipt(tx).gasUsed;
+ if (gas == gasUsed) {
+ console.log("RESULT: PASS " + msg);
+ return 1;
+ } else {
+ console.log("RESULT: FAIL " + msg);
+ return 0;
+ }
+}
+
+function failIfGasEqualsGasUsedOrContractAddressNull(contractAddress, tx, msg) {
+ if (contractAddress == null) {
+ console.log("RESULT: FAIL " + msg);
+ return 0;
+ } else {
+ var gas = eth.getTransaction(tx).gas;
+ var gasUsed = eth.getTransactionReceipt(tx).gasUsed;
+ if (gas == gasUsed) {
+ console.log("RESULT: FAIL " + msg);
+ return 0;
+ } else {
+ console.log("RESULT: PASS " + msg);
+ return 1;
+ }
+ }
+}
+
+
+//-----------------------------------------------------------------------------
+// Wait until some unixTime + additional seconds
+//-----------------------------------------------------------------------------
+function waitUntil(message, unixTime, addSeconds) {
+ var t = parseInt(unixTime) + parseInt(addSeconds) + parseInt(1);
+ var time = new Date(t * 1000);
+ console.log("RESULT: Waiting until '" + message + "' at " + unixTime + "+" + addSeconds + "s =" + time + " now=" + new Date());
+ while ((new Date()).getTime() <= time.getTime()) {
+ }
+ console.log("RESULT: Waited until '" + message + "' at at " + unixTime + "+" + addSeconds + "s =" + time + " now=" + new Date());
+ console.log("RESULT: ");
+}
+
+
+//-----------------------------------------------------------------------------
+// Wait until some block
+//-----------------------------------------------------------------------------
+function waitUntilBlock(message, block, addBlocks) {
+ var b = parseInt(block) + parseInt(addBlocks);
+ console.log("RESULT: Waiting until '" + message + "' #" + block + "+" + addBlocks + " = #" + b + " currentBlock=" + eth.blockNumber);
+ while (eth.blockNumber <= b) {
+ }
+ console.log("RESULT: Waited until '" + message + "' #" + block + "+" + addBlocks + " = #" + b + " currentBlock=" + eth.blockNumber);
+ console.log("RESULT: ");
+}
+
+
+//-----------------------------------------------------------------------------
+// Crowdsale Contract
+//-----------------------------------------------------------------------------
+var presaleContractAddress = null;
+var presaleContractAbi = null;
+
+function addPresaleContractAddressAndAbi(address, abi) {
+ presaleContractAddress = address;
+ presaleContractAbi = abi;
+}
+
+var presaleFromBlock = 0;
+function printPresaleContractDetails() {
+ console.log("RESULT: presaleContractAddress=" + presaleContractAddress);
+ // console.log("RESULT: presaleContractAbi=" + JSON.stringify(presaleContractAbi));
+ if (presaleContractAddress != null && presaleContractAbi != null) {
+ var contract = eth.contract(presaleContractAbi).at(presaleContractAddress);
+ console.log("RESULT: presale.owner=" + contract.owner());
+ console.log("RESULT: presale.startTime=" + contract.startTime() + " " + new Date(contract.startTime() * 1000).toUTCString());
+ console.log("RESULT: presale.endTime=" + contract.endTime() + " " + new Date(contract.endTime() * 1000).toUTCString());
+ console.log("RESULT: presale.cap=" + contract.cap() + " " + contract.cap().shift(-18));
+ console.log("RESULT: presale.rate=" + contract.rate());
+ console.log("RESULT: presale.totalInvestedInWei=" + contract.totalInvestedInWei() + " " + contract.totalInvestedInWei().shift(-18));
+ console.log("RESULT: presale.minimumContribution=" + contract.minimumContribution() + " " + contract.minimumContribution().shift(-18));
+ console.log("RESULT: presale.investorsLength=" + contract.investorsLength());
+ console.log("RESULT: presale.vault=" + contract.vault());
+ console.log("RESULT: presale.isInitialized=" + contract.isInitialized());
+
+ var latestBlock = eth.blockNumber;
+ var i;
+
+// var newSaleEvents = contract.NewSale({}, { fromBlock: presaleFromBlock, toBlock: latestBlock });
+// i = 0;
+// newSaleEvents.watch(function (error, result) {
+// console.log("RESULT: NewSale " + i++ + " #" + result.blockNumber + ": " + JSON.stringify(result.args));
+// });
+// newSaleEvents.stopWatching();
+//
+// var initializedEvents = contract.Initialized({}, { fromBlock: presaleFromBlock, toBlock: latestBlock });
+// i = 0;
+// initializedEvents.watch(function (error, result) {
+// console.log("RESULT: Initialized " + i++ + " #" + result.blockNumber + ": " + JSON.stringify(result.args));
+// });
+// initializedEvents.stopWatching();
+//
+// var finalizedEvents = contract.Finalized({}, { fromBlock: presaleFromBlock, toBlock: latestBlock });
+// i = 0;
+// finalizedEvents.watch(function (error, result) {
+// console.log("RESULT: Finalized " + i++ + " #" + result.blockNumber + ": " + JSON.stringify(result.args));
+// });
+// finalizedEvents.stopWatching();
+
+ presaleFromBlock = parseInt(latestBlock) + 1;
+ }
+}
+
+
+////-----------------------------------------------------------------------------
+//// PlaceHolder Contract
+////-----------------------------------------------------------------------------
+//var placeHolderContractAddress = null;
+//var placeHolderContractAbi = null;
+//
+//function addPlaceHolderContractAddressAndAbi(address, abi) {
+// placeHolderContractAddress = address;
+// placeHolderContractAbi = abi;
+//}
+//
+//var placeHolderFromBlock = 0;
+//function printPlaceHolderContractDetails() {
+// console.log("RESULT: placeHolderContractAddress=" + placeHolderContractAddress);
+// // console.log("RESULT: placeHolderContractAbi=" + JSON.stringify(placeHolderContractAbi));
+// if (placeHolderContractAddress != null && placeHolderContractAbi != null) {
+// var contract = eth.contract(placeHolderContractAbi).at(placeHolderContractAddress);
+// console.log("RESULT: placeHolder.controller=" + contract.controller());
+// console.log("RESULT: placeHolder.transferable=" + contract.transferable());
+// var latestBlock = eth.blockNumber;
+// var i;
+//
+// var claimedTokensEvents = contract.ClaimedTokens({}, { fromBlock: placeHolderFromBlock, toBlock: latestBlock });
+// i = 0;
+// claimedTokensEvents.watch(function (error, result) {
+// console.log("RESULT: ClaimedTokens " + i++ + " #" + result.blockNumber + ": " + JSON.stringify(result.args));
+// });
+// claimedTokensEvents.stopWatching();
+//
+// placeHolderFromBlock = parseInt(latestBlock) + 1;
+// }
+//}
+//
+//
+////-----------------------------------------------------------------------------
+//// Token Contract
+////-----------------------------------------------------------------------------
+//var tokenFromBlock = 0;
+//function printTokenContractDetails() {
+// console.log("RESULT: tokenContractAddress=" + tokenContractAddress);
+// // console.log("RESULT: tokenContractAbi=" + JSON.stringify(tokenContractAbi));
+// if (tokenContractAddress != null && tokenContractAbi != null) {
+// var contract = eth.contract(tokenContractAbi).at(tokenContractAddress);
+// var decimals = contract.decimals();
+// console.log("RESULT: token.controller=" + contract.controller());
+// console.log("RESULT: token.symbol=" + contract.symbol());
+// console.log("RESULT: token.name=" + contract.name());
+// console.log("RESULT: token.decimals=" + decimals);
+// console.log("RESULT: token.totalSupply=" + contract.totalSupply().shift(-decimals));
+// console.log("RESULT: token.transfersEnabled=" + contract.transfersEnabled());
+// // console.log("RESULT: token.totalSupplyHistory=" + contract.totalSupplyHistory());
+//
+// var latestBlock = eth.blockNumber;
+// var i;
+//
+// /*
+// var totalSupplyHistoryLength = contract.totalSupplyHistoryLength();
+// for (i = 0; i < totalSupplyHistoryLength; i++) {
+// var e = contract.totalSupplyHistory(i);
+// console.log("RESULT: totalSupplyHistory(" + i + ") = " + e[0] + " => " + e[1].shift(-decimals));
+// }
+//
+// var balanceHistoryLength = contract.balanceHistoryLength(account3);
+// for (i = 0; i < balanceHistoryLength; i++) {
+// var e = contract.balanceHistory(account3, i);
+// console.log("RESULT: balanceHistory(" + account3 + ", " + i + ") = " + e[0] + " => " + e[1].shift(-decimals));
+// }
+//
+// var balanceHistoryLength = contract.balanceHistoryLength(account4);
+// for (i = 0; i < balanceHistoryLength; i++) {
+// var e = contract.balanceHistory(account4, i);
+// console.log("RESULT: balanceHistory(" + account4 + ", " + i + ") = " + e[0] + " => " + e[1].shift(-decimals));
+// }
+//
+// var balanceHistoryLength = contract.balanceHistoryLength(account5);
+// for (i = 0; i < balanceHistoryLength; i++) {
+// var e = contract.balanceHistory(account5, i);
+// console.log("RESULT: balanceHistory(" + account5 + ", " + i + ") = " + e[0] + " => " + e[1].shift(-decimals));
+// }
+// */
+//
+// var approvalEvents = contract.Approval({}, { fromBlock: tokenFromBlock, toBlock: latestBlock });
+// i = 0;
+// approvalEvents.watch(function (error, result) {
+// console.log("RESULT: Approval " + i++ + " #" + result.blockNumber + " _owner=" + result.args._owner + " _spender=" + result.args._spender + " _amount=" +
+// result.args._amount.shift(-decimals));
+// });
+// approvalEvents.stopWatching();
+//
+// var transferEvents = contract.Transfer({}, { fromBlock: tokenFromBlock, toBlock: latestBlock });
+// i = 0;
+// transferEvents.watch(function (error, result) {
+// console.log("RESULT: Transfer " + i++ + " #" + result.blockNumber + ": _from=" + result.args._from + " _to=" + result.args._to +
+// " _amount=" + result.args._amount.shift(-decimals));
+// });
+// transferEvents.stopWatching();
+//
+// tokenFromBlock = parseInt(latestBlock) + 1;
+// }
+//}
diff --git a/audit/test/genesis.json b/audit/test/genesis.json
new file mode 100644
index 0000000..b40fca1
--- /dev/null
+++ b/audit/test/genesis.json
@@ -0,0 +1,67 @@
+{
+ "config": {
+ "homesteadBlock": 1,
+ "byzantiumBlock": 2
+ },
+ "nonce": "0",
+ "difficulty": "0x400",
+ "mixhash": "0x00000000000000000000000000000000000000647572616c65787365646c6578",
+ "coinbase": "0x0000000000000000000000000000000000000000",
+ "timestamp": "0x00",
+ "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
+ "extraData": "0x",
+ "gasLimit": "0x3B4A1B44",
+ "alloc": {
+ "0xa00af22d07c87d96eeeb0ed583f8f6ac7812827e": {
+ "balance": "10000000000000000000000000"
+ },
+ "0xa11aae29840fbb5c86e6fd4cf809eba183aef433": {
+ "balance": "10000000000000000000000000"
+ },
+ "0xa22ab8a9d641ce77e06d98b7d7065d324d3d6976": {
+ "balance": "10000000000000000000000000"
+ },
+ "0xa33a6c312d9ad0e0f2e95541beed0cc081621fd0": {
+ "balance": "10000000000000000000000000"
+ },
+ "0xa44a08d3f6933c69212114bb66e2df1813651844": {
+ "balance": "10000000000000000000000000"
+ },
+ "0xa55a151eb00fded1634d27d1127b4be4627079ea": {
+ "balance": "10000000000000000000000000"
+ },
+ "0xa66a85ede0cbe03694aa9d9de0bb19c99ff55bd9": {
+ "balance": "10000000000000000000000000"
+ },
+ "0xa77a2b9d4b1c010a22a7c565dc418cef683dbcec": {
+ "balance": "10000000000000000000000000"
+ },
+ "0xa88a05d2b88283ce84c8325760b72a64591279a2": {
+ "balance": "10000000000000000000000000"
+ },
+ "0xa99a0ae3354c06b1459fd441a32a3f71005d7da0": {
+ "balance": "10000000000000000000000000"
+ },
+ "0xaaaa9de1e6c564446ebca0fd102d8bd92093c756": {
+ "balance": "10000000000000000000000000"
+ },
+ "0xabba43e7594e3b76afb157989e93c6621497fd4b": {
+ "balance": "10000000000000000000000000"
+ },
+ "0xacca534c9f62ab495bd986e002ddf0f054caae4f": {
+ "balance": "10000000000000000000000000"
+ },
+ "0xadda9b762a00ff12711113bfdc36958b73d7f915": {
+ "balance": "10000000000000000000000000"
+ },
+ "0xaeea63b5479b50f79583ec49dacdcf86ddeff392": {
+ "balance": "10000000000000000000000000"
+ },
+ "0xaffa4d3a80add8ce4018540e056dacb649589394": {
+ "balance": "10000000000000000000000000"
+ },
+ "0xbbbb34fa53a801b5f298744490a1596438bbbe50": {
+ "balance": "10000000000000000000000000"
+ }
+ }
+}
diff --git a/audit/test/settings.txt b/audit/test/settings.txt
new file mode 100644
index 0000000..346d45b
--- /dev/null
+++ b/audit/test/settings.txt
@@ -0,0 +1,13 @@
+IPCFILE=ipc:./testchain/geth.ipc
+PASSWORD=testtest
+
+CONTRACTSDIR=../../flat
+
+SALESOL=PresaleOracles_flat.sol
+SALEJS=PresaleOracles_flat.js
+
+DEPLOYMENTDATA=deploymentData.txt
+
+INCLUDEJS=./include.js
+TEST1OUTPUT=test1output.txt
+TEST1RESULTS=test1results.txt
\ No newline at end of file
diff --git a/audit/test/test1output.txt b/audit/test/test1output.txt
new file mode 100644
index 0000000..0279db7
--- /dev/null
+++ b/audit/test/test1output.txt
@@ -0,0 +1,488 @@
+MODE = 'test'
+GETHATTACHPOINT = 'ipc:./testchain/geth.ipc'
+PASSWORD = 'testtest'
+CONTRACTSDIR = '../../flat'
+SALESOL = 'PresaleOracles_flat.sol'
+SALEJS = 'PresaleOracles_flat.js'
+DEPLOYMENTDATA = 'deploymentData.txt'
+INCLUDEJS = './include.js'
+TEST1OUTPUT = 'test1output.txt'
+TEST1RESULTS = 'test1results.txt'
+CURRENTTIME = '1510716129' 'Wed 15 Nov 2017 03:22:09 UTC'
+STARTTIME = '1510716204' 'Wed 15 Nov 2017 03:23:24 UTC'
+ENDTIME = '1510716309' 'Wed 15 Nov 2017 03:25:09 UTC'
+--- Differences ../../flat/PresaleOracles_flat.sol PresaleOracles_flat.sol ---
+
+solc, the solidity compiler commandline interface
+Version: 0.4.18+commit.9cf6e910.Darwin.appleclang
+Welcome to the Geth JavaScript console!
+
+instance: Geth/v1.7.2-stable-1db4ecdc/darwin-amd64/go1.9
+coinbase: 0xa00af22d07c87d96eeeb0ed583f8f6ac7812827e
+at block: 2128 (Wed, 15 Nov 2017 14:21:46 AEDT)
+ datadir: /Users/bok/Projects/OraclesPresaleContractAudit/audit/test/testchain
+ modules: admin:1.0 debug:1.0 eth:1.0 miner:1.0 net:1.0 personal:1.0 rpc:1.0 txpool:1.0 web3:1.0
+
+>
+true
+>
+true
+>
+>
+undefined
+>
+undefined
+>
+>
+undefined
+>
+undefined
+>
+>
+undefined
+>
+RESULT: # Account EtherBalanceChange Token Name
+RESULT: -- ------------------------------------------ --------------------------- ------------------------------ ---------------------------
+RESULT: 0 0xa00af22d07c87d96eeeb0ed583f8f6ac7812827e 9.000000000000000000 0.000000000000000000 Account #0 - Miner
+RESULT: 1 0xa11aae29840fbb5c86e6fd4cf809eba183aef433 0.000000000000000000 0.000000000000000000 Account #1 - Contract Owner
+RESULT: 2 0xa22ab8a9d641ce77e06d98b7d7065d324d3d6976 0.000000000000000000 0.000000000000000000 Account #2 - Multisig
+RESULT: 3 0xa33a6c312d9ad0e0f2e95541beed0cc081621fd0 0.000000000000000000 0.000000000000000000 Account #3
+RESULT: 4 0xa44a08d3f6933c69212114bb66e2df1813651844 0.000000000000000000 0.000000000000000000 Account #4
+RESULT: 5 0xa55a151eb00fded1634d27d1127b4be4627079ea 0.000000000000000000 0.000000000000000000 Account #5
+RESULT: 6 0xa66a85ede0cbe03694aa9d9de0bb19c99ff55bd9 0.000000000000000000 0.000000000000000000 Account #6
+RESULT: 7 0xa77a2b9d4b1c010a22a7c565dc418cef683dbcec 0.000000000000000000 0.000000000000000000 Account #7
+RESULT: -- ------------------------------------------ --------------------------- ------------------------------ ---------------------------
+RESULT: 0.000000000000000000 Total Token Balances
+RESULT: -- ------------------------------------------ --------------------------- ------------------------------ ---------------------------
+RESULT:
+undefined
+>
+RESULT:
+undefined
+>
+>
+undefined
+>
+undefined
+>
+undefined
+>
+RESULT: Deploy Presale Contract
+undefined
+>
+undefined
+>
+undefined
+>
+undefined
+>
+...
+......
+.........
+............
+............
+............
+............
+............
+............
+............
+.........
+......
+...
+undefined
+>
+...
+undefined
+>
+RESULT: saleAddress=0x27daa9fe81944d721dc95e09f54c8bd3a90a5603 status=0x1 Success gas=4000000 gasUsed=757113 costETH=0.013628034 costUSD=2.799906841368 @ ETH/USD=205.452 gasPrice=18 gwei block=2133 txIx=0 txId=0x063fb179de23d9230534d59fd7f0a47631c7df13a7571f84ebba8eb80b2cac01 @ 1510716144 Wed, 15 Nov 2017 03:22:24 UTC
+RESULT: # Account EtherBalanceChange Token Name
+RESULT: -- ------------------------------------------ --------------------------- ------------------------------ ---------------------------
+RESULT: 0 0xa00af22d07c87d96eeeb0ed583f8f6ac7812827e 15.013628034000000000 0.000000000000000000 Account #0 - Miner
+RESULT: 1 0xa11aae29840fbb5c86e6fd4cf809eba183aef433 -0.013628034000000000 0.000000000000000000 Account #1 - Contract Owner
+RESULT: 2 0xa22ab8a9d641ce77e06d98b7d7065d324d3d6976 0.000000000000000000 0.000000000000000000 Account #2 - Multisig
+RESULT: 3 0xa33a6c312d9ad0e0f2e95541beed0cc081621fd0 0.000000000000000000 0.000000000000000000 Account #3
+RESULT: 4 0xa44a08d3f6933c69212114bb66e2df1813651844 0.000000000000000000 0.000000000000000000 Account #4
+RESULT: 5 0xa55a151eb00fded1634d27d1127b4be4627079ea 0.000000000000000000 0.000000000000000000 Account #5
+RESULT: 6 0xa66a85ede0cbe03694aa9d9de0bb19c99ff55bd9 0.000000000000000000 0.000000000000000000 Account #6
+RESULT: 7 0xa77a2b9d4b1c010a22a7c565dc418cef683dbcec 0.000000000000000000 0.000000000000000000 Account #7
+RESULT: 8 0x27daa9fe81944d721dc95e09f54c8bd3a90a5603 0.000000000000000000 0.000000000000000000 Presale
+RESULT: -- ------------------------------------------ --------------------------- ------------------------------ ---------------------------
+RESULT: 0.000000000000000000 Total Token Balances
+RESULT: -- ------------------------------------------ --------------------------- ------------------------------ ---------------------------
+RESULT:
+undefined
+>
+RESULT: PASS Deploy Presale Contract
+1
+>
+RESULT: presaleContractAddress=0x27daa9fe81944d721dc95e09f54c8bd3a90a5603
+RESULT: presale.owner=0xa11aae29840fbb5c86e6fd4cf809eba183aef433
+RESULT: presale.startTime=0 Thu, 01 Jan 1970 00:00:00 UTC
+RESULT: presale.endTime=0 Thu, 01 Jan 1970 00:00:00 UTC
+RESULT: presale.cap=0 0
+RESULT: presale.rate=0
+RESULT: presale.totalInvestedInWei=0 0
+RESULT: presale.minimumContribution=0 0
+RESULT: presale.investorsLength=0
+RESULT: presale.vault=0x0000000000000000000000000000000000000000
+RESULT: presale.isInitialized=false
+undefined
+>
+RESULT:
+undefined
+>
+>
+>
+undefined
+>
+undefined
+>
+undefined
+>
+undefined
+>
+undefined
+>
+undefined
+>
+undefined
+>
+undefined
+>
+RESULT: Initialise Contribution
+undefined
+>
+undefined
+>
+...
+undefined
+>
+RESULT: initialiseSaleTx status=0x1 Success gas=2000000 gasUsed=125772 costETH=0.002263896 costUSD=0.465121960992 @ ETH/USD=205.452 gasPrice=18 gwei block=2135 txIx=0 txId=0x2ec5170349e14c56ec7e71fc30b3b99deae5cb898d1ed13f5cf4bde82c083bc4 @ 1510716150 Wed, 15 Nov 2017 03:22:30 UTC
+undefined
+>
+RESULT: # Account EtherBalanceChange Token Name
+RESULT: -- ------------------------------------------ --------------------------- ------------------------------ ---------------------------
+RESULT: 0 0xa00af22d07c87d96eeeb0ed583f8f6ac7812827e 21.015891930000000000 0.000000000000000000 Account #0 - Miner
+RESULT: 1 0xa11aae29840fbb5c86e6fd4cf809eba183aef433 -0.015891930000000000 0.000000000000000000 Account #1 - Contract Owner
+RESULT: 2 0xa22ab8a9d641ce77e06d98b7d7065d324d3d6976 0.000000000000000000 0.000000000000000000 Account #2 - Multisig
+RESULT: 3 0xa33a6c312d9ad0e0f2e95541beed0cc081621fd0 0.000000000000000000 0.000000000000000000 Account #3
+RESULT: 4 0xa44a08d3f6933c69212114bb66e2df1813651844 0.000000000000000000 0.000000000000000000 Account #4
+RESULT: 5 0xa55a151eb00fded1634d27d1127b4be4627079ea 0.000000000000000000 0.000000000000000000 Account #5
+RESULT: 6 0xa66a85ede0cbe03694aa9d9de0bb19c99ff55bd9 0.000000000000000000 0.000000000000000000 Account #6
+RESULT: 7 0xa77a2b9d4b1c010a22a7c565dc418cef683dbcec 0.000000000000000000 0.000000000000000000 Account #7
+RESULT: 8 0x27daa9fe81944d721dc95e09f54c8bd3a90a5603 0.000000000000000000 0.000000000000000000 Presale
+RESULT: -- ------------------------------------------ --------------------------- ------------------------------ ---------------------------
+RESULT: 0.000000000000000000 Total Token Balances
+RESULT: -- ------------------------------------------ --------------------------- ------------------------------ ---------------------------
+RESULT:
+undefined
+>
+RESULT: PASS Initialise Contribution
+1
+>
+RESULT: presaleContractAddress=0x27daa9fe81944d721dc95e09f54c8bd3a90a5603
+RESULT: presale.owner=0xa11aae29840fbb5c86e6fd4cf809eba183aef433
+RESULT: presale.startTime=1510716204 Wed, 15 Nov 2017 03:23:24 UTC
+RESULT: presale.endTime=1510716309 Wed, 15 Nov 2017 03:25:09 UTC
+RESULT: presale.cap=1e+22 10000
+RESULT: presale.rate=0
+RESULT: presale.totalInvestedInWei=0 0
+RESULT: presale.minimumContribution=100000000000000000 0.1
+RESULT: presale.investorsLength=0
+RESULT: presale.vault=0xa22ab8a9d641ce77e06d98b7d7065d324d3d6976
+RESULT: presale.isInitialized=true
+undefined
+>
+RESULT:
+undefined
+>
+>
+>
+RESULT: Waiting until 'startTime' at 1510716204+0s =Wed, 15 Nov 2017 14:23:25 AEDT now=Wed, 15 Nov 2017 14:22:32 AEDT
+RESULT: Waited until 'startTime' at at 1510716204+0s =Wed, 15 Nov 2017 14:23:25 AEDT now=Wed, 15 Nov 2017 14:23:25 AEDT
+RESULT:
+undefined
+>
+>
+>
+undefined
+>
+undefined
+>
+undefined
+>
+RESULT: Whitelist
+undefined
+>
+undefined
+>
+undefined
+>
+...
+undefined
+>
+RESULT: whitelist_1Tx status=0x1 Success gas=2000000 gasUsed=63730 costETH=0.00114714 costUSD=0.23568220728 @ ETH/USD=205.452 gasPrice=18 gwei block=2152 txIx=0 txId=0xef451151539135a7c5d460664b8caf90b632a4c9f9817d5b23a20ee61aebb365 @ 1510716208 Wed, 15 Nov 2017 03:23:28 UTC
+undefined
+>
+RESULT: whitelist_2Tx status=0x1 Success gas=2000000 gasUsed=103108 costETH=0.001855944 costUSD=0.381307406688 @ ETH/USD=205.452 gasPrice=18 gwei block=2152 txIx=1 txId=0x993fa0ff6eff5d53ecd4163246b12855ef4e61b0de971e242805d90b305d76ca @ 1510716208 Wed, 15 Nov 2017 03:23:28 UTC
+undefined
+>
+RESULT: # Account EtherBalanceChange Token Name
+RESULT: -- ------------------------------------------ --------------------------- ------------------------------ ---------------------------
+RESULT: 0 0xa00af22d07c87d96eeeb0ed583f8f6ac7812827e 72.018895014000000000 0.000000000000000000 Account #0 - Miner
+RESULT: 1 0xa11aae29840fbb5c86e6fd4cf809eba183aef433 -0.018895014000000000 0.000000000000000000 Account #1 - Contract Owner
+RESULT: 2 0xa22ab8a9d641ce77e06d98b7d7065d324d3d6976 0.000000000000000000 0.000000000000000000 Account #2 - Multisig
+RESULT: 3 0xa33a6c312d9ad0e0f2e95541beed0cc081621fd0 0.000000000000000000 0.000000000000000000 Account #3
+RESULT: 4 0xa44a08d3f6933c69212114bb66e2df1813651844 0.000000000000000000 0.000000000000000000 Account #4
+RESULT: 5 0xa55a151eb00fded1634d27d1127b4be4627079ea 0.000000000000000000 0.000000000000000000 Account #5
+RESULT: 6 0xa66a85ede0cbe03694aa9d9de0bb19c99ff55bd9 0.000000000000000000 0.000000000000000000 Account #6
+RESULT: 7 0xa77a2b9d4b1c010a22a7c565dc418cef683dbcec 0.000000000000000000 0.000000000000000000 Account #7
+RESULT: 8 0x27daa9fe81944d721dc95e09f54c8bd3a90a5603 0.000000000000000000 0.000000000000000000 Presale
+RESULT: -- ------------------------------------------ --------------------------- ------------------------------ ---------------------------
+RESULT: 0.000000000000000000 Total Token Balances
+RESULT: -- ------------------------------------------ --------------------------- ------------------------------ ---------------------------
+RESULT:
+undefined
+>
+RESULT: PASS Whitelist - whitelist(account3)
+1
+>
+RESULT: PASS Whitelist - whitelist([account4, account5, account7])
+1
+>
+RESULT: presaleContractAddress=0x27daa9fe81944d721dc95e09f54c8bd3a90a5603
+RESULT: presale.owner=0xa11aae29840fbb5c86e6fd4cf809eba183aef433
+RESULT: presale.startTime=1510716204 Wed, 15 Nov 2017 03:23:24 UTC
+RESULT: presale.endTime=1510716309 Wed, 15 Nov 2017 03:25:09 UTC
+RESULT: presale.cap=1e+22 10000
+RESULT: presale.rate=0
+RESULT: presale.totalInvestedInWei=0 0
+RESULT: presale.minimumContribution=100000000000000000 0.1
+RESULT: presale.investorsLength=4
+RESULT: presale.vault=0xa22ab8a9d641ce77e06d98b7d7065d324d3d6976
+RESULT: presale.isInitialized=true
+undefined
+>
+RESULT:
+undefined
+>
+>
+>
+undefined
+>
+undefined
+>
+undefined
+>
+RESULT: Whitelist
+undefined
+>
+undefined
+>
+...
+undefined
+>
+RESULT: blacklist_1Tx status=0x1 Success gas=2000000 gasUsed=18918 costETH=0.000340524 costUSD=0.069961336848 @ ETH/USD=205.452 gasPrice=18 gwei block=2154 txIx=0 txId=0x8cc0e9a1106853db415c2a375259d86715e4792a39a90ea2dc0aca2d6092f278 @ 1510716218 Wed, 15 Nov 2017 03:23:38 UTC
+undefined
+>
+RESULT: # Account EtherBalanceChange Token Name
+RESULT: -- ------------------------------------------ --------------------------- ------------------------------ ---------------------------
+RESULT: 0 0xa00af22d07c87d96eeeb0ed583f8f6ac7812827e 78.019235538000000000 0.000000000000000000 Account #0 - Miner
+RESULT: 1 0xa11aae29840fbb5c86e6fd4cf809eba183aef433 -0.019235538000000000 0.000000000000000000 Account #1 - Contract Owner
+RESULT: 2 0xa22ab8a9d641ce77e06d98b7d7065d324d3d6976 0.000000000000000000 0.000000000000000000 Account #2 - Multisig
+RESULT: 3 0xa33a6c312d9ad0e0f2e95541beed0cc081621fd0 0.000000000000000000 0.000000000000000000 Account #3
+RESULT: 4 0xa44a08d3f6933c69212114bb66e2df1813651844 0.000000000000000000 0.000000000000000000 Account #4
+RESULT: 5 0xa55a151eb00fded1634d27d1127b4be4627079ea 0.000000000000000000 0.000000000000000000 Account #5
+RESULT: 6 0xa66a85ede0cbe03694aa9d9de0bb19c99ff55bd9 0.000000000000000000 0.000000000000000000 Account #6
+RESULT: 7 0xa77a2b9d4b1c010a22a7c565dc418cef683dbcec 0.000000000000000000 0.000000000000000000 Account #7
+RESULT: 8 0x27daa9fe81944d721dc95e09f54c8bd3a90a5603 0.000000000000000000 0.000000000000000000 Presale
+RESULT: -- ------------------------------------------ --------------------------- ------------------------------ ---------------------------
+RESULT: 0.000000000000000000 Total Token Balances
+RESULT: -- ------------------------------------------ --------------------------- ------------------------------ ---------------------------
+RESULT:
+undefined
+>
+RESULT: PASS Whitelist - blacklist(account4)
+1
+>
+RESULT: presaleContractAddress=0x27daa9fe81944d721dc95e09f54c8bd3a90a5603
+RESULT: presale.owner=0xa11aae29840fbb5c86e6fd4cf809eba183aef433
+RESULT: presale.startTime=1510716204 Wed, 15 Nov 2017 03:23:24 UTC
+RESULT: presale.endTime=1510716309 Wed, 15 Nov 2017 03:25:09 UTC
+RESULT: presale.cap=1e+22 10000
+RESULT: presale.rate=0
+RESULT: presale.totalInvestedInWei=0 0
+RESULT: presale.minimumContribution=100000000000000000 0.1
+RESULT: presale.investorsLength=3
+RESULT: presale.vault=0xa22ab8a9d641ce77e06d98b7d7065d324d3d6976
+RESULT: presale.isInitialized=true
+undefined
+>
+RESULT:
+undefined
+>
+>
+>
+undefined
+>
+undefined
+>
+undefined
+>
+RESULT: Send Contribution
+undefined
+>
+undefined
+>
+undefined
+>
+undefined
+>
+undefined
+>
+...
+undefined
+>
+undefined
+>
+...
+undefined
+>
+undefined
+>
+...
+undefined
+>
+RESULT: sendContribution1_1Tx status=0x1 Success gas=400000 gasUsed=69426 costETH=0.001249668 costUSD=0.256746789936 @ ETH/USD=205.452 gasPrice=18 gwei block=2156 txIx=0 txId=0x49f88ad156306136ef25ffb3124e6c78fd8afd33e0d087269780353fc79b09fe @ 1510716233 Wed, 15 Nov 2017 03:23:53 UTC
+undefined
+>
+RESULT: sendContribution1_2Tx status=0x0 Failure gas=400000 gasUsed=21242 costETH=0.000382356 costUSD=0.078555804912 @ ETH/USD=205.452 gasPrice=18 gwei block=2156 txIx=3 txId=0x90e0839e8b92d86e4dd85b27113f9d779e9254bddcf533336be60948e9649314 @ 1510716233 Wed, 15 Nov 2017 03:23:53 UTC
+undefined
+>
+RESULT: sendContribution1_3Tx status=0x1 Success gas=400000 gasUsed=54426 costETH=0.000979668 costUSD=0.201274749936 @ ETH/USD=205.452 gasPrice=18 gwei block=2156 txIx=2 txId=0x04ca56fc7fbc1318280a02b345cd582975ab17447cbc24881d7a561d08c90309 @ 1510716233 Wed, 15 Nov 2017 03:23:53 UTC
+undefined
+>
+RESULT: sendContribution1_4Tx status=0x0 Failure gas=400000 gasUsed=21242 costETH=0.000382356 costUSD=0.078555804912 @ ETH/USD=205.452 gasPrice=18 gwei block=2156 txIx=1 txId=0xbe9b0968e3eab1b6f6512bb6038ee787487906789527ed56e86a8d7db4d0b492 @ 1510716233 Wed, 15 Nov 2017 03:23:53 UTC
+undefined
+>
+RESULT: sendContribution1_5Tx status=0x0 Failure gas=400000 gasUsed=21897 costETH=0.000394146 costUSD=0.080978083992 @ ETH/USD=205.452 gasPrice=18 gwei block=2158 txIx=0 txId=0x3d14b2a96d3aa595a53492978e3cb8184e1a99b6d1f75888a88cd7a61b074012 @ 1510716235 Wed, 15 Nov 2017 03:23:55 UTC
+undefined
+>
+RESULT: sendContribution1_6Tx status=0x1 Success gas=400000 gasUsed=54426 costETH=0.000979668 costUSD=0.201274749936 @ ETH/USD=205.452 gasPrice=18 gwei block=2160 txIx=0 txId=0xb3f169a86a02a724594ba063586974359c7854036b5c670b81de30620d4bf83b @ 1510716238 Wed, 15 Nov 2017 03:23:58 UTC
+undefined
+>
+RESULT: # Account EtherBalanceChange Token Name
+RESULT: -- ------------------------------------------ --------------------------- ------------------------------ ---------------------------
+RESULT: 0 0xa00af22d07c87d96eeeb0ed583f8f6ac7812827e 96.023603400000000000 0.000000000000000000 Account #0 - Miner
+RESULT: 1 0xa11aae29840fbb5c86e6fd4cf809eba183aef433 -0.019235538000000000 0.000000000000000000 Account #1 - Contract Owner
+RESULT: 2 0xa22ab8a9d641ce77e06d98b7d7065d324d3d6976 9999.000000000000000000 0.000000000000000000 Account #2 - Multisig
+RESULT: 3 0xa33a6c312d9ad0e0f2e95541beed0cc081621fd0 -1000.001249668000000000 0.000000000000000000 Account #3
+RESULT: 4 0xa44a08d3f6933c69212114bb66e2df1813651844 -0.000382356000000000 0.000000000000000000 Account #4
+RESULT: 5 0xa55a151eb00fded1634d27d1127b4be4627079ea -1000.000979668000000000 0.000000000000000000 Account #5
+RESULT: 6 0xa66a85ede0cbe03694aa9d9de0bb19c99ff55bd9 -0.000382356000000000 0.000000000000000000 Account #6
+RESULT: 7 0xa77a2b9d4b1c010a22a7c565dc418cef683dbcec -7999.001373814000000000 0.000000000000000000 Account #7
+RESULT: 8 0x27daa9fe81944d721dc95e09f54c8bd3a90a5603 0.000000000000000000 0.000000000000000000 Presale
+RESULT: -- ------------------------------------------ --------------------------- ------------------------------ ---------------------------
+RESULT: 0.000000000000000000 Total Token Balances
+RESULT: -- ------------------------------------------ --------------------------- ------------------------------ ---------------------------
+RESULT:
+undefined
+>
+RESULT: PASS Send Contribution ac3 1000 ETH
+1
+>
+RESULT: PASS Send Contribution ac4 1000 ETH - Expecting failure, not whitelisted
+1
+>
+RESULT: PASS Send Contribution ac5 1000 ETH
+1
+>
+RESULT: PASS Send Contribution ac6 1000 ETH - Expecting failure, not whitelisted
+1
+>
+RESULT: PASS Send Contribution ac7 8000.00000000001 ETH - Expecting failure, amount will blow the cap
+1
+>
+RESULT: PASS Send Contribution ac7 7999 ETH
+1
+>
+RESULT: presaleContractAddress=0x27daa9fe81944d721dc95e09f54c8bd3a90a5603
+RESULT: presale.owner=0xa11aae29840fbb5c86e6fd4cf809eba183aef433
+RESULT: presale.startTime=1510716204 Wed, 15 Nov 2017 03:23:24 UTC
+RESULT: presale.endTime=1510716309 Wed, 15 Nov 2017 03:25:09 UTC
+RESULT: presale.cap=1e+22 10000
+RESULT: presale.rate=0
+RESULT: presale.totalInvestedInWei=9.999e+21 9999
+RESULT: presale.minimumContribution=100000000000000000 0.1
+RESULT: presale.investorsLength=3
+RESULT: presale.vault=0xa22ab8a9d641ce77e06d98b7d7065d324d3d6976
+RESULT: presale.isInitialized=true
+undefined
+>
+RESULT:
+undefined
+>
+>
+>
+RESULT: Waiting until 'endTime' at 1510716309+0s =Wed, 15 Nov 2017 14:25:10 AEDT now=Wed, 15 Nov 2017 14:24:01 AEDT
+RESULT: Waited until 'endTime' at at 1510716309+0s =Wed, 15 Nov 2017 14:25:10 AEDT now=Wed, 15 Nov 2017 14:25:10 AEDT
+RESULT:
+undefined
+>
+>
+>
+undefined
+>
+undefined
+>
+undefined
+>
+RESULT: Send Contribution After End
+undefined
+>
+undefined
+>
+...
+undefined
+>
+RESULT: sendContribution2_1Tx status=0x0 Failure gas=400000 gasUsed=22233 costETH=0.000400194 costUSD=0.082220657688 @ ETH/USD=205.452 gasPrice=18 gwei block=2179 txIx=0 txId=0xa780705a34d4373217e350cc62d3d7b225ab1ef67db7e551f66416aea8858082 @ 1510716310 Wed, 15 Nov 2017 03:25:10 UTC
+undefined
+>
+RESULT: # Account EtherBalanceChange Token Name
+RESULT: -- ------------------------------------------ --------------------------- ------------------------------ ---------------------------
+RESULT: 0 0xa00af22d07c87d96eeeb0ed583f8f6ac7812827e 153.024003594000000000 0.000000000000000000 Account #0 - Miner
+RESULT: 1 0xa11aae29840fbb5c86e6fd4cf809eba183aef433 -0.019235538000000000 0.000000000000000000 Account #1 - Contract Owner
+RESULT: 2 0xa22ab8a9d641ce77e06d98b7d7065d324d3d6976 9999.000000000000000000 0.000000000000000000 Account #2 - Multisig
+RESULT: 3 0xa33a6c312d9ad0e0f2e95541beed0cc081621fd0 -1000.001649862000000000 0.000000000000000000 Account #3
+RESULT: 4 0xa44a08d3f6933c69212114bb66e2df1813651844 -0.000382356000000000 0.000000000000000000 Account #4
+RESULT: 5 0xa55a151eb00fded1634d27d1127b4be4627079ea -1000.000979668000000000 0.000000000000000000 Account #5
+RESULT: 6 0xa66a85ede0cbe03694aa9d9de0bb19c99ff55bd9 -0.000382356000000000 0.000000000000000000 Account #6
+RESULT: 7 0xa77a2b9d4b1c010a22a7c565dc418cef683dbcec -7999.001373814000000000 0.000000000000000000 Account #7
+RESULT: 8 0x27daa9fe81944d721dc95e09f54c8bd3a90a5603 0.000000000000000000 0.000000000000000000 Presale
+RESULT: -- ------------------------------------------ --------------------------- ------------------------------ ---------------------------
+RESULT: 0.000000000000000000 Total Token Balances
+RESULT: -- ------------------------------------------ --------------------------- ------------------------------ ---------------------------
+RESULT:
+undefined
+>
+RESULT: PASS Send Contribution After End ac3 1 ETH - Expecting failure, after end
+1
+>
+RESULT: presaleContractAddress=0x27daa9fe81944d721dc95e09f54c8bd3a90a5603
+RESULT: presale.owner=0xa11aae29840fbb5c86e6fd4cf809eba183aef433
+RESULT: presale.startTime=1510716204 Wed, 15 Nov 2017 03:23:24 UTC
+RESULT: presale.endTime=1510716309 Wed, 15 Nov 2017 03:25:09 UTC
+RESULT: presale.cap=1e+22 10000
+RESULT: presale.rate=0
+RESULT: presale.totalInvestedInWei=9.999e+21 9999
+RESULT: presale.minimumContribution=100000000000000000 0.1
+RESULT: presale.investorsLength=3
+RESULT: presale.vault=0xa22ab8a9d641ce77e06d98b7d7065d324d3d6976
+RESULT: presale.isInitialized=true
+undefined
+>
+RESULT:
+undefined
+>
+>
+>
diff --git a/audit/test/test1results.txt b/audit/test/test1results.txt
new file mode 100644
index 0000000..3ccc94b
--- /dev/null
+++ b/audit/test/test1results.txt
@@ -0,0 +1,213 @@
+ # Account EtherBalanceChange Token Name
+-- ------------------------------------------ --------------------------- ------------------------------ ---------------------------
+ 0 0xa00af22d07c87d96eeeb0ed583f8f6ac7812827e 9.000000000000000000 0.000000000000000000 Account #0 - Miner
+ 1 0xa11aae29840fbb5c86e6fd4cf809eba183aef433 0.000000000000000000 0.000000000000000000 Account #1 - Contract Owner
+ 2 0xa22ab8a9d641ce77e06d98b7d7065d324d3d6976 0.000000000000000000 0.000000000000000000 Account #2 - Multisig
+ 3 0xa33a6c312d9ad0e0f2e95541beed0cc081621fd0 0.000000000000000000 0.000000000000000000 Account #3
+ 4 0xa44a08d3f6933c69212114bb66e2df1813651844 0.000000000000000000 0.000000000000000000 Account #4
+ 5 0xa55a151eb00fded1634d27d1127b4be4627079ea 0.000000000000000000 0.000000000000000000 Account #5
+ 6 0xa66a85ede0cbe03694aa9d9de0bb19c99ff55bd9 0.000000000000000000 0.000000000000000000 Account #6
+ 7 0xa77a2b9d4b1c010a22a7c565dc418cef683dbcec 0.000000000000000000 0.000000000000000000 Account #7
+-- ------------------------------------------ --------------------------- ------------------------------ ---------------------------
+ 0.000000000000000000 Total Token Balances
+-- ------------------------------------------ --------------------------- ------------------------------ ---------------------------
+
+
+Deploy Presale Contract
+saleAddress=0x27daa9fe81944d721dc95e09f54c8bd3a90a5603 status=0x1 Success gas=4000000 gasUsed=757113 costETH=0.013628034 costUSD=2.799906841368 @ ETH/USD=205.452 gasPrice=18 gwei block=2133 txIx=0 txId=0x063fb179de23d9230534d59fd7f0a47631c7df13a7571f84ebba8eb80b2cac01 @ 1510716144 Wed, 15 Nov 2017 03:22:24 UTC
+ # Account EtherBalanceChange Token Name
+-- ------------------------------------------ --------------------------- ------------------------------ ---------------------------
+ 0 0xa00af22d07c87d96eeeb0ed583f8f6ac7812827e 15.013628034000000000 0.000000000000000000 Account #0 - Miner
+ 1 0xa11aae29840fbb5c86e6fd4cf809eba183aef433 -0.013628034000000000 0.000000000000000000 Account #1 - Contract Owner
+ 2 0xa22ab8a9d641ce77e06d98b7d7065d324d3d6976 0.000000000000000000 0.000000000000000000 Account #2 - Multisig
+ 3 0xa33a6c312d9ad0e0f2e95541beed0cc081621fd0 0.000000000000000000 0.000000000000000000 Account #3
+ 4 0xa44a08d3f6933c69212114bb66e2df1813651844 0.000000000000000000 0.000000000000000000 Account #4
+ 5 0xa55a151eb00fded1634d27d1127b4be4627079ea 0.000000000000000000 0.000000000000000000 Account #5
+ 6 0xa66a85ede0cbe03694aa9d9de0bb19c99ff55bd9 0.000000000000000000 0.000000000000000000 Account #6
+ 7 0xa77a2b9d4b1c010a22a7c565dc418cef683dbcec 0.000000000000000000 0.000000000000000000 Account #7
+ 8 0x27daa9fe81944d721dc95e09f54c8bd3a90a5603 0.000000000000000000 0.000000000000000000 Presale
+-- ------------------------------------------ --------------------------- ------------------------------ ---------------------------
+ 0.000000000000000000 Total Token Balances
+-- ------------------------------------------ --------------------------- ------------------------------ ---------------------------
+
+PASS Deploy Presale Contract
+presaleContractAddress=0x27daa9fe81944d721dc95e09f54c8bd3a90a5603
+presale.owner=0xa11aae29840fbb5c86e6fd4cf809eba183aef433
+presale.startTime=0 Thu, 01 Jan 1970 00:00:00 UTC
+presale.endTime=0 Thu, 01 Jan 1970 00:00:00 UTC
+presale.cap=0 0
+presale.rate=0
+presale.totalInvestedInWei=0 0
+presale.minimumContribution=0 0
+presale.investorsLength=0
+presale.vault=0x0000000000000000000000000000000000000000
+presale.isInitialized=false
+
+Initialise Contribution
+initialiseSaleTx status=0x1 Success gas=2000000 gasUsed=125772 costETH=0.002263896 costUSD=0.465121960992 @ ETH/USD=205.452 gasPrice=18 gwei block=2135 txIx=0 txId=0x2ec5170349e14c56ec7e71fc30b3b99deae5cb898d1ed13f5cf4bde82c083bc4 @ 1510716150 Wed, 15 Nov 2017 03:22:30 UTC
+ # Account EtherBalanceChange Token Name
+-- ------------------------------------------ --------------------------- ------------------------------ ---------------------------
+ 0 0xa00af22d07c87d96eeeb0ed583f8f6ac7812827e 21.015891930000000000 0.000000000000000000 Account #0 - Miner
+ 1 0xa11aae29840fbb5c86e6fd4cf809eba183aef433 -0.015891930000000000 0.000000000000000000 Account #1 - Contract Owner
+ 2 0xa22ab8a9d641ce77e06d98b7d7065d324d3d6976 0.000000000000000000 0.000000000000000000 Account #2 - Multisig
+ 3 0xa33a6c312d9ad0e0f2e95541beed0cc081621fd0 0.000000000000000000 0.000000000000000000 Account #3
+ 4 0xa44a08d3f6933c69212114bb66e2df1813651844 0.000000000000000000 0.000000000000000000 Account #4
+ 5 0xa55a151eb00fded1634d27d1127b4be4627079ea 0.000000000000000000 0.000000000000000000 Account #5
+ 6 0xa66a85ede0cbe03694aa9d9de0bb19c99ff55bd9 0.000000000000000000 0.000000000000000000 Account #6
+ 7 0xa77a2b9d4b1c010a22a7c565dc418cef683dbcec 0.000000000000000000 0.000000000000000000 Account #7
+ 8 0x27daa9fe81944d721dc95e09f54c8bd3a90a5603 0.000000000000000000 0.000000000000000000 Presale
+-- ------------------------------------------ --------------------------- ------------------------------ ---------------------------
+ 0.000000000000000000 Total Token Balances
+-- ------------------------------------------ --------------------------- ------------------------------ ---------------------------
+
+PASS Initialise Contribution
+presaleContractAddress=0x27daa9fe81944d721dc95e09f54c8bd3a90a5603
+presale.owner=0xa11aae29840fbb5c86e6fd4cf809eba183aef433
+presale.startTime=1510716204 Wed, 15 Nov 2017 03:23:24 UTC
+presale.endTime=1510716309 Wed, 15 Nov 2017 03:25:09 UTC
+presale.cap=1e+22 10000
+presale.rate=0
+presale.totalInvestedInWei=0 0
+presale.minimumContribution=100000000000000000 0.1
+presale.investorsLength=0
+presale.vault=0xa22ab8a9d641ce77e06d98b7d7065d324d3d6976
+presale.isInitialized=true
+
+Waiting until 'startTime' at 1510716204+0s =Wed, 15 Nov 2017 14:23:25 AEDT now=Wed, 15 Nov 2017 14:22:32 AEDT
+Waited until 'startTime' at at 1510716204+0s =Wed, 15 Nov 2017 14:23:25 AEDT now=Wed, 15 Nov 2017 14:23:25 AEDT
+
+Whitelist
+whitelist_1Tx status=0x1 Success gas=2000000 gasUsed=63730 costETH=0.00114714 costUSD=0.23568220728 @ ETH/USD=205.452 gasPrice=18 gwei block=2152 txIx=0 txId=0xef451151539135a7c5d460664b8caf90b632a4c9f9817d5b23a20ee61aebb365 @ 1510716208 Wed, 15 Nov 2017 03:23:28 UTC
+whitelist_2Tx status=0x1 Success gas=2000000 gasUsed=103108 costETH=0.001855944 costUSD=0.381307406688 @ ETH/USD=205.452 gasPrice=18 gwei block=2152 txIx=1 txId=0x993fa0ff6eff5d53ecd4163246b12855ef4e61b0de971e242805d90b305d76ca @ 1510716208 Wed, 15 Nov 2017 03:23:28 UTC
+ # Account EtherBalanceChange Token Name
+-- ------------------------------------------ --------------------------- ------------------------------ ---------------------------
+ 0 0xa00af22d07c87d96eeeb0ed583f8f6ac7812827e 72.018895014000000000 0.000000000000000000 Account #0 - Miner
+ 1 0xa11aae29840fbb5c86e6fd4cf809eba183aef433 -0.018895014000000000 0.000000000000000000 Account #1 - Contract Owner
+ 2 0xa22ab8a9d641ce77e06d98b7d7065d324d3d6976 0.000000000000000000 0.000000000000000000 Account #2 - Multisig
+ 3 0xa33a6c312d9ad0e0f2e95541beed0cc081621fd0 0.000000000000000000 0.000000000000000000 Account #3
+ 4 0xa44a08d3f6933c69212114bb66e2df1813651844 0.000000000000000000 0.000000000000000000 Account #4
+ 5 0xa55a151eb00fded1634d27d1127b4be4627079ea 0.000000000000000000 0.000000000000000000 Account #5
+ 6 0xa66a85ede0cbe03694aa9d9de0bb19c99ff55bd9 0.000000000000000000 0.000000000000000000 Account #6
+ 7 0xa77a2b9d4b1c010a22a7c565dc418cef683dbcec 0.000000000000000000 0.000000000000000000 Account #7
+ 8 0x27daa9fe81944d721dc95e09f54c8bd3a90a5603 0.000000000000000000 0.000000000000000000 Presale
+-- ------------------------------------------ --------------------------- ------------------------------ ---------------------------
+ 0.000000000000000000 Total Token Balances
+-- ------------------------------------------ --------------------------- ------------------------------ ---------------------------
+
+PASS Whitelist - whitelist(account3)
+PASS Whitelist - whitelist([account4, account5, account7])
+presaleContractAddress=0x27daa9fe81944d721dc95e09f54c8bd3a90a5603
+presale.owner=0xa11aae29840fbb5c86e6fd4cf809eba183aef433
+presale.startTime=1510716204 Wed, 15 Nov 2017 03:23:24 UTC
+presale.endTime=1510716309 Wed, 15 Nov 2017 03:25:09 UTC
+presale.cap=1e+22 10000
+presale.rate=0
+presale.totalInvestedInWei=0 0
+presale.minimumContribution=100000000000000000 0.1
+presale.investorsLength=4
+presale.vault=0xa22ab8a9d641ce77e06d98b7d7065d324d3d6976
+presale.isInitialized=true
+
+Whitelist
+blacklist_1Tx status=0x1 Success gas=2000000 gasUsed=18918 costETH=0.000340524 costUSD=0.069961336848 @ ETH/USD=205.452 gasPrice=18 gwei block=2154 txIx=0 txId=0x8cc0e9a1106853db415c2a375259d86715e4792a39a90ea2dc0aca2d6092f278 @ 1510716218 Wed, 15 Nov 2017 03:23:38 UTC
+ # Account EtherBalanceChange Token Name
+-- ------------------------------------------ --------------------------- ------------------------------ ---------------------------
+ 0 0xa00af22d07c87d96eeeb0ed583f8f6ac7812827e 78.019235538000000000 0.000000000000000000 Account #0 - Miner
+ 1 0xa11aae29840fbb5c86e6fd4cf809eba183aef433 -0.019235538000000000 0.000000000000000000 Account #1 - Contract Owner
+ 2 0xa22ab8a9d641ce77e06d98b7d7065d324d3d6976 0.000000000000000000 0.000000000000000000 Account #2 - Multisig
+ 3 0xa33a6c312d9ad0e0f2e95541beed0cc081621fd0 0.000000000000000000 0.000000000000000000 Account #3
+ 4 0xa44a08d3f6933c69212114bb66e2df1813651844 0.000000000000000000 0.000000000000000000 Account #4
+ 5 0xa55a151eb00fded1634d27d1127b4be4627079ea 0.000000000000000000 0.000000000000000000 Account #5
+ 6 0xa66a85ede0cbe03694aa9d9de0bb19c99ff55bd9 0.000000000000000000 0.000000000000000000 Account #6
+ 7 0xa77a2b9d4b1c010a22a7c565dc418cef683dbcec 0.000000000000000000 0.000000000000000000 Account #7
+ 8 0x27daa9fe81944d721dc95e09f54c8bd3a90a5603 0.000000000000000000 0.000000000000000000 Presale
+-- ------------------------------------------ --------------------------- ------------------------------ ---------------------------
+ 0.000000000000000000 Total Token Balances
+-- ------------------------------------------ --------------------------- ------------------------------ ---------------------------
+
+PASS Whitelist - blacklist(account4)
+presaleContractAddress=0x27daa9fe81944d721dc95e09f54c8bd3a90a5603
+presale.owner=0xa11aae29840fbb5c86e6fd4cf809eba183aef433
+presale.startTime=1510716204 Wed, 15 Nov 2017 03:23:24 UTC
+presale.endTime=1510716309 Wed, 15 Nov 2017 03:25:09 UTC
+presale.cap=1e+22 10000
+presale.rate=0
+presale.totalInvestedInWei=0 0
+presale.minimumContribution=100000000000000000 0.1
+presale.investorsLength=3
+presale.vault=0xa22ab8a9d641ce77e06d98b7d7065d324d3d6976
+presale.isInitialized=true
+
+Send Contribution
+sendContribution1_1Tx status=0x1 Success gas=400000 gasUsed=69426 costETH=0.001249668 costUSD=0.256746789936 @ ETH/USD=205.452 gasPrice=18 gwei block=2156 txIx=0 txId=0x49f88ad156306136ef25ffb3124e6c78fd8afd33e0d087269780353fc79b09fe @ 1510716233 Wed, 15 Nov 2017 03:23:53 UTC
+sendContribution1_2Tx status=0x0 Failure gas=400000 gasUsed=21242 costETH=0.000382356 costUSD=0.078555804912 @ ETH/USD=205.452 gasPrice=18 gwei block=2156 txIx=3 txId=0x90e0839e8b92d86e4dd85b27113f9d779e9254bddcf533336be60948e9649314 @ 1510716233 Wed, 15 Nov 2017 03:23:53 UTC
+sendContribution1_3Tx status=0x1 Success gas=400000 gasUsed=54426 costETH=0.000979668 costUSD=0.201274749936 @ ETH/USD=205.452 gasPrice=18 gwei block=2156 txIx=2 txId=0x04ca56fc7fbc1318280a02b345cd582975ab17447cbc24881d7a561d08c90309 @ 1510716233 Wed, 15 Nov 2017 03:23:53 UTC
+sendContribution1_4Tx status=0x0 Failure gas=400000 gasUsed=21242 costETH=0.000382356 costUSD=0.078555804912 @ ETH/USD=205.452 gasPrice=18 gwei block=2156 txIx=1 txId=0xbe9b0968e3eab1b6f6512bb6038ee787487906789527ed56e86a8d7db4d0b492 @ 1510716233 Wed, 15 Nov 2017 03:23:53 UTC
+sendContribution1_5Tx status=0x0 Failure gas=400000 gasUsed=21897 costETH=0.000394146 costUSD=0.080978083992 @ ETH/USD=205.452 gasPrice=18 gwei block=2158 txIx=0 txId=0x3d14b2a96d3aa595a53492978e3cb8184e1a99b6d1f75888a88cd7a61b074012 @ 1510716235 Wed, 15 Nov 2017 03:23:55 UTC
+sendContribution1_6Tx status=0x1 Success gas=400000 gasUsed=54426 costETH=0.000979668 costUSD=0.201274749936 @ ETH/USD=205.452 gasPrice=18 gwei block=2160 txIx=0 txId=0xb3f169a86a02a724594ba063586974359c7854036b5c670b81de30620d4bf83b @ 1510716238 Wed, 15 Nov 2017 03:23:58 UTC
+ # Account EtherBalanceChange Token Name
+-- ------------------------------------------ --------------------------- ------------------------------ ---------------------------
+ 0 0xa00af22d07c87d96eeeb0ed583f8f6ac7812827e 96.023603400000000000 0.000000000000000000 Account #0 - Miner
+ 1 0xa11aae29840fbb5c86e6fd4cf809eba183aef433 -0.019235538000000000 0.000000000000000000 Account #1 - Contract Owner
+ 2 0xa22ab8a9d641ce77e06d98b7d7065d324d3d6976 9999.000000000000000000 0.000000000000000000 Account #2 - Multisig
+ 3 0xa33a6c312d9ad0e0f2e95541beed0cc081621fd0 -1000.001249668000000000 0.000000000000000000 Account #3
+ 4 0xa44a08d3f6933c69212114bb66e2df1813651844 -0.000382356000000000 0.000000000000000000 Account #4
+ 5 0xa55a151eb00fded1634d27d1127b4be4627079ea -1000.000979668000000000 0.000000000000000000 Account #5
+ 6 0xa66a85ede0cbe03694aa9d9de0bb19c99ff55bd9 -0.000382356000000000 0.000000000000000000 Account #6
+ 7 0xa77a2b9d4b1c010a22a7c565dc418cef683dbcec -7999.001373814000000000 0.000000000000000000 Account #7
+ 8 0x27daa9fe81944d721dc95e09f54c8bd3a90a5603 0.000000000000000000 0.000000000000000000 Presale
+-- ------------------------------------------ --------------------------- ------------------------------ ---------------------------
+ 0.000000000000000000 Total Token Balances
+-- ------------------------------------------ --------------------------- ------------------------------ ---------------------------
+
+PASS Send Contribution ac3 1000 ETH
+PASS Send Contribution ac4 1000 ETH - Expecting failure, not whitelisted
+PASS Send Contribution ac5 1000 ETH
+PASS Send Contribution ac6 1000 ETH - Expecting failure, not whitelisted
+PASS Send Contribution ac7 8000.00000000001 ETH - Expecting failure, amount will blow the cap
+PASS Send Contribution ac7 7999 ETH
+presaleContractAddress=0x27daa9fe81944d721dc95e09f54c8bd3a90a5603
+presale.owner=0xa11aae29840fbb5c86e6fd4cf809eba183aef433
+presale.startTime=1510716204 Wed, 15 Nov 2017 03:23:24 UTC
+presale.endTime=1510716309 Wed, 15 Nov 2017 03:25:09 UTC
+presale.cap=1e+22 10000
+presale.rate=0
+presale.totalInvestedInWei=9.999e+21 9999
+presale.minimumContribution=100000000000000000 0.1
+presale.investorsLength=3
+presale.vault=0xa22ab8a9d641ce77e06d98b7d7065d324d3d6976
+presale.isInitialized=true
+
+Waiting until 'endTime' at 1510716309+0s =Wed, 15 Nov 2017 14:25:10 AEDT now=Wed, 15 Nov 2017 14:24:01 AEDT
+Waited until 'endTime' at at 1510716309+0s =Wed, 15 Nov 2017 14:25:10 AEDT now=Wed, 15 Nov 2017 14:25:10 AEDT
+
+Send Contribution After End
+sendContribution2_1Tx status=0x0 Failure gas=400000 gasUsed=22233 costETH=0.000400194 costUSD=0.082220657688 @ ETH/USD=205.452 gasPrice=18 gwei block=2179 txIx=0 txId=0xa780705a34d4373217e350cc62d3d7b225ab1ef67db7e551f66416aea8858082 @ 1510716310 Wed, 15 Nov 2017 03:25:10 UTC
+ # Account EtherBalanceChange Token Name
+-- ------------------------------------------ --------------------------- ------------------------------ ---------------------------
+ 0 0xa00af22d07c87d96eeeb0ed583f8f6ac7812827e 153.024003594000000000 0.000000000000000000 Account #0 - Miner
+ 1 0xa11aae29840fbb5c86e6fd4cf809eba183aef433 -0.019235538000000000 0.000000000000000000 Account #1 - Contract Owner
+ 2 0xa22ab8a9d641ce77e06d98b7d7065d324d3d6976 9999.000000000000000000 0.000000000000000000 Account #2 - Multisig
+ 3 0xa33a6c312d9ad0e0f2e95541beed0cc081621fd0 -1000.001649862000000000 0.000000000000000000 Account #3
+ 4 0xa44a08d3f6933c69212114bb66e2df1813651844 -0.000382356000000000 0.000000000000000000 Account #4
+ 5 0xa55a151eb00fded1634d27d1127b4be4627079ea -1000.000979668000000000 0.000000000000000000 Account #5
+ 6 0xa66a85ede0cbe03694aa9d9de0bb19c99ff55bd9 -0.000382356000000000 0.000000000000000000 Account #6
+ 7 0xa77a2b9d4b1c010a22a7c565dc418cef683dbcec -7999.001373814000000000 0.000000000000000000 Account #7
+ 8 0x27daa9fe81944d721dc95e09f54c8bd3a90a5603 0.000000000000000000 0.000000000000000000 Presale
+-- ------------------------------------------ --------------------------- ------------------------------ ---------------------------
+ 0.000000000000000000 Total Token Balances
+-- ------------------------------------------ --------------------------- ------------------------------ ---------------------------
+
+PASS Send Contribution After End ac3 1 ETH - Expecting failure, after end
+presaleContractAddress=0x27daa9fe81944d721dc95e09f54c8bd3a90a5603
+presale.owner=0xa11aae29840fbb5c86e6fd4cf809eba183aef433
+presale.startTime=1510716204 Wed, 15 Nov 2017 03:23:24 UTC
+presale.endTime=1510716309 Wed, 15 Nov 2017 03:25:09 UTC
+presale.cap=1e+22 10000
+presale.rate=0
+presale.totalInvestedInWei=9.999e+21 9999
+presale.minimumContribution=100000000000000000 0.1
+presale.investorsLength=3
+presale.vault=0xa22ab8a9d641ce77e06d98b7d7065d324d3d6976
+presale.isInitialized=true
+
diff --git a/audit/test/testchain/keystore/UTC--2017-05-20T02-37-30.360937280Z--a00af22d07c87d96eeeb0ed583f8f6ac7812827e b/audit/test/testchain/keystore/UTC--2017-05-20T02-37-30.360937280Z--a00af22d07c87d96eeeb0ed583f8f6ac7812827e
new file mode 100644
index 0000000..668e5fa
--- /dev/null
+++ b/audit/test/testchain/keystore/UTC--2017-05-20T02-37-30.360937280Z--a00af22d07c87d96eeeb0ed583f8f6ac7812827e
@@ -0,0 +1 @@
+{"address":"a00af22d07c87d96eeeb0ed583f8f6ac7812827e","crypto":{"cipher":"aes-128-ctr","ciphertext":"beaef6b3628c1acf80877369d1dacdfb7f2faeab7d3f42a4de23260a804e0888","cipherparams":{"iv":"80a37ffc267761f99c868a66bb9c1db7"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"807a4ca34e14b5916400fbe53c3c1c6ce862b16dffb6bd4efa53ea582f88a6e1"},"mac":"d51a3264971d95448048670d83f76a5d070eaaafceb4cbb83434d1f9d2d0bdcc"},"id":"e3f0faf2-6ec2-4f29-a14e-c48d2d751b94","version":3}
\ No newline at end of file
diff --git a/audit/test/testchain/keystore/UTC--2017-05-20T02-37-58.104082316Z--a11aae29840fbb5c86e6fd4cf809eba183aef433 b/audit/test/testchain/keystore/UTC--2017-05-20T02-37-58.104082316Z--a11aae29840fbb5c86e6fd4cf809eba183aef433
new file mode 100644
index 0000000..fc7f1e3
--- /dev/null
+++ b/audit/test/testchain/keystore/UTC--2017-05-20T02-37-58.104082316Z--a11aae29840fbb5c86e6fd4cf809eba183aef433
@@ -0,0 +1 @@
+{"address":"a11aae29840fbb5c86e6fd4cf809eba183aef433","crypto":{"cipher":"aes-128-ctr","ciphertext":"3f764510b47491063a67abf19f2d169e18292174000f9d31a7e66f6e0f09fdf0","cipherparams":{"iv":"49642a5e48f18cc96eb5d710c1f4edd4"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"c7c9cb821a91da4571397d6c9dacb879059038d82b80048599f59c4825816367"},"mac":"7e829480c58972bb4403b332a1bdf3e8ed05d80b817a3c4126673e377bd87255"},"id":"f1b73a4b-8229-4c3b-8844-f59f398087b0","version":3}
\ No newline at end of file
diff --git a/audit/test/testchain/keystore/UTC--2017-05-20T02-38-21.169063367Z--a22ab8a9d641ce77e06d98b7d7065d324d3d6976 b/audit/test/testchain/keystore/UTC--2017-05-20T02-38-21.169063367Z--a22ab8a9d641ce77e06d98b7d7065d324d3d6976
new file mode 100644
index 0000000..4c3faa3
--- /dev/null
+++ b/audit/test/testchain/keystore/UTC--2017-05-20T02-38-21.169063367Z--a22ab8a9d641ce77e06d98b7d7065d324d3d6976
@@ -0,0 +1 @@
+{"address":"a22ab8a9d641ce77e06d98b7d7065d324d3d6976","crypto":{"cipher":"aes-128-ctr","ciphertext":"16c725aff83d80ec865546cf647e9c19fd0a203d5095c6b9fbf4bfd4e80defc1","cipherparams":{"iv":"2b683eed143011528c8e4b6ccccdf2a9"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"4895b93d546ac49b1dbb5bbde462b0a7ee6edca1c7548ddcc3abbc332a1c9ea6"},"mac":"88d98792f510c7db3f3339352c3a368634bf67bfcfc7c724d4f855a09daac9b4"},"id":"baa6c875-74cf-4c02-ace7-c8c6aa32765f","version":3}
\ No newline at end of file
diff --git a/audit/test/testchain/keystore/UTC--2017-05-20T02-38-41.707647638Z--a33a6c312d9ad0e0f2e95541beed0cc081621fd0 b/audit/test/testchain/keystore/UTC--2017-05-20T02-38-41.707647638Z--a33a6c312d9ad0e0f2e95541beed0cc081621fd0
new file mode 100644
index 0000000..f63d7e4
--- /dev/null
+++ b/audit/test/testchain/keystore/UTC--2017-05-20T02-38-41.707647638Z--a33a6c312d9ad0e0f2e95541beed0cc081621fd0
@@ -0,0 +1 @@
+{"address":"a33a6c312d9ad0e0f2e95541beed0cc081621fd0","crypto":{"cipher":"aes-128-ctr","ciphertext":"1178ff5250ac5d55af191d0d01d19ee66ec650004bca969b3518571073435197","cipherparams":{"iv":"a785a27c1ea95e8bcdf13c4d4fb130a5"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"87ab24da9fc7f4420fba7d57eb684f07cd2b18882360dc9d8cdde5b8312a551c"},"mac":"aeef485337dc9062f94249a83e61ec0a96c811efddf5d61ec69f74f920e265b0"},"id":"7ab0d4a9-c6b5-426f-9445-1604929628c2","version":3}
\ No newline at end of file
diff --git a/audit/test/testchain/keystore/UTC--2017-05-20T02-39-04.584040707Z--a44a08d3f6933c69212114bb66e2df1813651844 b/audit/test/testchain/keystore/UTC--2017-05-20T02-39-04.584040707Z--a44a08d3f6933c69212114bb66e2df1813651844
new file mode 100644
index 0000000..4181c61
--- /dev/null
+++ b/audit/test/testchain/keystore/UTC--2017-05-20T02-39-04.584040707Z--a44a08d3f6933c69212114bb66e2df1813651844
@@ -0,0 +1 @@
+{"address":"a44a08d3f6933c69212114bb66e2df1813651844","crypto":{"cipher":"aes-128-ctr","ciphertext":"b8a8948cf419bde53ff3de97af0907fb10d5de7f945bf29ae08fd22b62b69c7a","cipherparams":{"iv":"9e6cb5ec4c4a27a3650e2b6521f49ca4"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"500e2951d0c3dc0d8499ced102b96e101e70228a13fd950f2900534feffc04b6"},"mac":"c2e95a9e9fbe604f0e779bc776070dfc65527e20d473aef83a9d1078b8dc840a"},"id":"356880ad-1c9d-4bd1-92ce-48de1a668c8f","version":3}
\ No newline at end of file
diff --git a/audit/test/testchain/keystore/UTC--2017-05-20T02-42-01.013666678Z--a55a151eb00fded1634d27d1127b4be4627079ea b/audit/test/testchain/keystore/UTC--2017-05-20T02-42-01.013666678Z--a55a151eb00fded1634d27d1127b4be4627079ea
new file mode 100644
index 0000000..768e7c8
--- /dev/null
+++ b/audit/test/testchain/keystore/UTC--2017-05-20T02-42-01.013666678Z--a55a151eb00fded1634d27d1127b4be4627079ea
@@ -0,0 +1 @@
+{"address":"a55a151eb00fded1634d27d1127b4be4627079ea","crypto":{"cipher":"aes-128-ctr","ciphertext":"9fc73c394da6d80a9154f3b85b62685d9798306008d6298fe838183e0ddbd37e","cipherparams":{"iv":"43de6ac066de8bc6a6890c764c3f3b59"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"ce145ac99bc65b15a1284a1daa4ec852334277cfd67063b9f656098837cb52f1"},"mac":"79e641b1e9b9d8e0ee19b63c54bbad9a17efcdcc26ae0aa46154cd2c37c52ed8"},"id":"47bfbb81-5b55-4cf4-9289-80e2fe0fbd9c","version":3}
\ No newline at end of file
diff --git a/audit/test/testchain/keystore/UTC--2017-05-20T02-42-37.426191216Z--a66a85ede0cbe03694aa9d9de0bb19c99ff55bd9 b/audit/test/testchain/keystore/UTC--2017-05-20T02-42-37.426191216Z--a66a85ede0cbe03694aa9d9de0bb19c99ff55bd9
new file mode 100644
index 0000000..f794199
--- /dev/null
+++ b/audit/test/testchain/keystore/UTC--2017-05-20T02-42-37.426191216Z--a66a85ede0cbe03694aa9d9de0bb19c99ff55bd9
@@ -0,0 +1 @@
+{"address":"a66a85ede0cbe03694aa9d9de0bb19c99ff55bd9","crypto":{"cipher":"aes-128-ctr","ciphertext":"eb554404102ed496717838cbfbd6130d374abf0729f4f4e3f1e4ca3f128dbf88","cipherparams":{"iv":"b6ba2e970b40c9f679d25e1568614e92"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"530bf5db5d6ea5e0b3a6ef6fbe20040584bba9820ed99c2f8ff7935b9f75e760"},"mac":"acd41fff725d190b7e2d722180f637c5c57c0b923642bf9dca3b601ae4c9e2a2"},"id":"396c5807-24e8-4a78-a76e-5dfcd0e2dfe4","version":3}
\ No newline at end of file
diff --git a/audit/test/testchain/keystore/UTC--2017-05-20T02-42-58.899396047Z--a77a2b9d4b1c010a22a7c565dc418cef683dbcec b/audit/test/testchain/keystore/UTC--2017-05-20T02-42-58.899396047Z--a77a2b9d4b1c010a22a7c565dc418cef683dbcec
new file mode 100644
index 0000000..b408cbb
--- /dev/null
+++ b/audit/test/testchain/keystore/UTC--2017-05-20T02-42-58.899396047Z--a77a2b9d4b1c010a22a7c565dc418cef683dbcec
@@ -0,0 +1 @@
+{"address":"a77a2b9d4b1c010a22a7c565dc418cef683dbcec","crypto":{"cipher":"aes-128-ctr","ciphertext":"47a7bded5ad5be47b4926df495839157e106efeb07297e544324de67484a4634","cipherparams":{"iv":"f4c6ca1d4e20e4bc301c125f55215559"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"c2fe20e92bfb4de1b3687884a5377563b39ce434e0825dbd6f50ad62ec60f77b"},"mac":"048deb6bb3fbf078b55f1242fcdfd6b7ca240b89df6789c88b3295b2da0743d4"},"id":"46a2e757-d4e9-40ba-aec4-6640d7b74347","version":3}
\ No newline at end of file
diff --git a/audit/test/testchain/keystore/UTC--2017-05-20T02-47-09.150580614Z--a88a05d2b88283ce84c8325760b72a64591279a2 b/audit/test/testchain/keystore/UTC--2017-05-20T02-47-09.150580614Z--a88a05d2b88283ce84c8325760b72a64591279a2
new file mode 100644
index 0000000..4d9077d
--- /dev/null
+++ b/audit/test/testchain/keystore/UTC--2017-05-20T02-47-09.150580614Z--a88a05d2b88283ce84c8325760b72a64591279a2
@@ -0,0 +1 @@
+{"address":"a88a05d2b88283ce84c8325760b72a64591279a2","crypto":{"cipher":"aes-128-ctr","ciphertext":"13eaaf2bc741112428b479e577ca6d31d94fe1dbf757ae4cf6489f82ea3d9d2e","cipherparams":{"iv":"00a52fd7e30c9b10e0d3a9be02e6efa5"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"86edf79626c1eed5ea7570bfa3fb964a219ea19e74aeabec53631922dd283474"},"mac":"3fc1ea0270c373fbd7c505f97e6f6de7e7df54aa9f84b1746aad298664b78d59"},"id":"5083b6d1-3059-457f-bdae-6a413a222428","version":3}
\ No newline at end of file
diff --git a/audit/test/testchain/keystore/UTC--2017-05-20T02-47-34.770098207Z--a99a0ae3354c06b1459fd441a32a3f71005d7da0 b/audit/test/testchain/keystore/UTC--2017-05-20T02-47-34.770098207Z--a99a0ae3354c06b1459fd441a32a3f71005d7da0
new file mode 100644
index 0000000..b0472bc
--- /dev/null
+++ b/audit/test/testchain/keystore/UTC--2017-05-20T02-47-34.770098207Z--a99a0ae3354c06b1459fd441a32a3f71005d7da0
@@ -0,0 +1 @@
+{"address":"a99a0ae3354c06b1459fd441a32a3f71005d7da0","crypto":{"cipher":"aes-128-ctr","ciphertext":"44b634314e512dcb94d89df97489d763de2d40de303c9dbf05b73808cf5fc251","cipherparams":{"iv":"dba264a6e7ae77499d724beed1cd3e17"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"d89197404b33e64bb02f1cbddf7d2236fbddac047681b0744eedd26a5a07a1b1"},"mac":"1b9c130c652bb02f47313a24efe15363a69761a81afb0eff6baec6dce3a4db6d"},"id":"47cc9299-fea0-46c6-88e8-452fb714ca4c","version":3}
\ No newline at end of file
diff --git a/audit/test/testchain/keystore/UTC--2017-05-20T02-58-17.400859858Z--aaaa9de1e6c564446ebca0fd102d8bd92093c756 b/audit/test/testchain/keystore/UTC--2017-05-20T02-58-17.400859858Z--aaaa9de1e6c564446ebca0fd102d8bd92093c756
new file mode 100644
index 0000000..4545f81
--- /dev/null
+++ b/audit/test/testchain/keystore/UTC--2017-05-20T02-58-17.400859858Z--aaaa9de1e6c564446ebca0fd102d8bd92093c756
@@ -0,0 +1 @@
+{"address":"aaaa9de1e6c564446ebca0fd102d8bd92093c756","crypto":{"cipher":"aes-128-ctr","ciphertext":"2aa64a851aac3841c67f9108b8c69db08b458691ddfa6ee8c463eb3e4516a6f4","cipherparams":{"iv":"2f8362a6189ba7f73659fb9ea2fe186f"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"30cd1ce601b8925b46fb4d64fdb1d04d97efc8ba38788b285940cf0189ae6ea7"},"mac":"b49a521a1281ecba5e70a5f121e4472c80e669a0ab27b417023ab89178f4bfc7"},"id":"9ae73070-0b07-472c-bfe5-e07cbe66f289","version":3}
\ No newline at end of file
diff --git a/audit/test/testchain/keystore/UTC--2017-05-20T02-58-35.122799190Z--abba43e7594e3b76afb157989e93c6621497fd4b b/audit/test/testchain/keystore/UTC--2017-05-20T02-58-35.122799190Z--abba43e7594e3b76afb157989e93c6621497fd4b
new file mode 100644
index 0000000..e925cd1
--- /dev/null
+++ b/audit/test/testchain/keystore/UTC--2017-05-20T02-58-35.122799190Z--abba43e7594e3b76afb157989e93c6621497fd4b
@@ -0,0 +1 @@
+{"address":"abba43e7594e3b76afb157989e93c6621497fd4b","crypto":{"cipher":"aes-128-ctr","ciphertext":"18d4959c00b52dbeb67a78956e60667fb37c82f8b26f8991a2b53386fd5819d8","cipherparams":{"iv":"3dfd2e5245fe28ad8572ddad27e869d9"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"518e58f54d75f20171611129dc7d04a94e5f56324964904d2c393409de8284ee"},"mac":"149669967b7f3cf6cacb395e57e0b8d48e11fa58f557c044cf9aea6c82a9a60f"},"id":"be47d6a6-f747-4741-bdfd-33182d2f674d","version":3}
\ No newline at end of file
diff --git a/audit/test/testchain/keystore/UTC--2017-05-20T02-58-51.178332229Z--acca534c9f62ab495bd986e002ddf0f054caae4f b/audit/test/testchain/keystore/UTC--2017-05-20T02-58-51.178332229Z--acca534c9f62ab495bd986e002ddf0f054caae4f
new file mode 100644
index 0000000..78a40c4
--- /dev/null
+++ b/audit/test/testchain/keystore/UTC--2017-05-20T02-58-51.178332229Z--acca534c9f62ab495bd986e002ddf0f054caae4f
@@ -0,0 +1 @@
+{"address":"acca534c9f62ab495bd986e002ddf0f054caae4f","crypto":{"cipher":"aes-128-ctr","ciphertext":"b240ff5186c18714ff791124bd15a755adc371b7967e619e892f4af96e7bdba1","cipherparams":{"iv":"52da035b0fec4ca386cbd03b03ccad0d"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"6de8376d2b00d63704cc6fceda260f276c878c28dfde8d7bd090f22238aa7304"},"mac":"f4b1409d40bdb0dc593f8d0303abd59ca4739185aa0cce2b09645de37c7b86a2"},"id":"3cae58b4-bdd3-43ee-929c-b1eff57e10ad","version":3}
\ No newline at end of file
diff --git a/audit/test/testchain/keystore/UTC--2017-05-20T02-59-14.034178720Z--adda9b762a00ff12711113bfdc36958b73d7f915 b/audit/test/testchain/keystore/UTC--2017-05-20T02-59-14.034178720Z--adda9b762a00ff12711113bfdc36958b73d7f915
new file mode 100644
index 0000000..c5741ce
--- /dev/null
+++ b/audit/test/testchain/keystore/UTC--2017-05-20T02-59-14.034178720Z--adda9b762a00ff12711113bfdc36958b73d7f915
@@ -0,0 +1 @@
+{"address":"adda9b762a00ff12711113bfdc36958b73d7f915","crypto":{"cipher":"aes-128-ctr","ciphertext":"477bfaef18a1c182af1c6bd05579f1aed334b218bb52d2349dec39b8894af897","cipherparams":{"iv":"78e45d798cacecff6c6899c283b57b0d"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"f76550251e7b02fbe099f9996681b17dfe0d318559080778308be7983b7d43cf"},"mac":"dcb9c3e48e4ce95fc3eac9a75661fb3071c01a1c23ee70eb273b24f30ee2810b"},"id":"b6b3a3ab-35fe-48aa-a74a-681a08cfea36","version":3}
\ No newline at end of file
diff --git a/audit/test/testchain/keystore/UTC--2017-05-20T02-59-33.471449656Z--aeea63b5479b50f79583ec49dacdcf86ddeff392 b/audit/test/testchain/keystore/UTC--2017-05-20T02-59-33.471449656Z--aeea63b5479b50f79583ec49dacdcf86ddeff392
new file mode 100644
index 0000000..d9b38b6
--- /dev/null
+++ b/audit/test/testchain/keystore/UTC--2017-05-20T02-59-33.471449656Z--aeea63b5479b50f79583ec49dacdcf86ddeff392
@@ -0,0 +1 @@
+{"address":"aeea63b5479b50f79583ec49dacdcf86ddeff392","crypto":{"cipher":"aes-128-ctr","ciphertext":"89ffb39f14534c36902a6c2b4b8cb22074b0a0910d81fb794f1c2b3811719991","cipherparams":{"iv":"1e3ac8bc6fa20515b8d62fee8053b777"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"183ceaf9806607298919b141012c589ba5b4a8c98015505e3b008fa5b3b09e68"},"mac":"5f08180c70ab20ec9c6d69ca933f025987ceb095c5f3997a40256843ed44d3bf"},"id":"b6dcecff-9bbb-40c5-bcea-501e3d610c7b","version":3}
\ No newline at end of file
diff --git a/audit/test/testchain/keystore/UTC--2017-05-20T02-59-51.697690594Z--affa4d3a80add8ce4018540e056dacb649589394 b/audit/test/testchain/keystore/UTC--2017-05-20T02-59-51.697690594Z--affa4d3a80add8ce4018540e056dacb649589394
new file mode 100644
index 0000000..e2e40a2
--- /dev/null
+++ b/audit/test/testchain/keystore/UTC--2017-05-20T02-59-51.697690594Z--affa4d3a80add8ce4018540e056dacb649589394
@@ -0,0 +1 @@
+{"address":"affa4d3a80add8ce4018540e056dacb649589394","crypto":{"cipher":"aes-128-ctr","ciphertext":"72b01c60d2a2fc2c3665375ef270733913cb6abbbc9a678888e6341e54dd1f72","cipherparams":{"iv":"4ef77b53a633b0300208001698ec8b40"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"a214816a6067f9d4b4835ccec8d9a685b14133861d14c32d2f9fd08ac9c59ec7"},"mac":"aeffd474ce26ee99e49938e0360e7e94728c5bfc2ec498baab7eae45b923ca1f"},"id":"8af80842-e108-4256-b33f-9fa5fb5f6de5","version":3}
\ No newline at end of file
diff --git a/audit/test/testchain/keystore/UTC--2017-06-19T11-23-24.451455213Z--bbbb34fa53a801b5f298744490a1596438bbbe50 b/audit/test/testchain/keystore/UTC--2017-06-19T11-23-24.451455213Z--bbbb34fa53a801b5f298744490a1596438bbbe50
new file mode 100644
index 0000000..80b9e2f
--- /dev/null
+++ b/audit/test/testchain/keystore/UTC--2017-06-19T11-23-24.451455213Z--bbbb34fa53a801b5f298744490a1596438bbbe50
@@ -0,0 +1 @@
+{"address":"bbbb34fa53a801b5f298744490a1596438bbbe50","crypto":{"cipher":"aes-128-ctr","ciphertext":"e0c451ce3787c50d965e82682d48d0c0515ef65809dfae49cf970a3a19995248","cipherparams":{"iv":"2e3945b92834f1e83a5038a4b7453b19"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"402f5bbe8ae477647c75abb80a7c9cb2d073be19e89442723847c3b959c96f7e"},"mac":"f294136b60656f7ec37151b54f4c78328c05e149b65d855e32d96feaf8c46718"},"id":"30c3bd74-9469-4075-8319-cb4aaee801ab","version":3}
\ No newline at end of file
diff --git a/audit/test/testpassword b/audit/test/testpassword
new file mode 100644
index 0000000..5b3b4a7
--- /dev/null
+++ b/audit/test/testpassword
@@ -0,0 +1 @@
+testtest