Merge branch 'master' of github.com:bokkypoobah/OraclesPresaleContractAudit

This commit is contained in:
Roman Storm 2017-11-14 22:20:14 -08:00
commit 565e090b0a
32 changed files with 2198 additions and 1 deletions

11
.gitignore vendored
View File

@ -1 +1,10 @@
node_modules
node_modules
.DS_Store
.project
.settings
audit/test/testchain/geth
audit/test/testchain/geth.ipc
audit/test/testchain/history
audit/test/contracts
private

182
audit/README.md Normal file
View File

@ -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.
<br />
### Mainnet Addresses
`TBA`
<br />
### 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.
<br />
<hr />
## 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)
<br />
<hr />
## 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
<br />
<hr />
## Potential Vulnerabilities
No potential vulnerabilities have been identified in the presale contract.
<br />
<hr />
## 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.
<br />
<hr />
## 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.
<br />
<hr />
## 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.
<br />
<hr />
## 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.
<br />
<hr />
## 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)
<br />
<hr />
## 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
<br />
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.
```
<br />
<br />
(c) BokkyPooBah / Bok Consulting Pty Ltd for Oracles Network - Nov 15 2017. The MIT Licence.

View File

@ -0,0 +1,321 @@
# PresaleOracles_flat
Source file [../../flat/PresaleOracles_flat.sol](../../flat/PresaleOracles_flat.sol).
<br />
<hr />
```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--;
}
}
}
}
```

8
audit/test/00_runGeth.sh Executable file
View File

@ -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

225
audit/test/01_test1.sh Executable file
View File

@ -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

File diff suppressed because one or more lines are too long

View File

@ -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--;
}
}
}
}

57
audit/test/README.md Normal file
View File

@ -0,0 +1,57 @@
# Contract - Testing
<br />
<hr />
# Table of contents
* [Requirements](#requirements)
* [Executing The Tests](#executing-the-tests)
* [The Tests](#the-tests)
* [Notes](#notes)
<br />
<hr />
# 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
<br />
<hr />
# 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.
<br />
<hr />
# 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

View File

384
audit/test/functions.js Normal file
View File

@ -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;
// }
//}

67
audit/test/genesis.json Normal file
View File

@ -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"
}
}
}

13
audit/test/settings.txt Normal file
View File

@ -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

488
audit/test/test1output.txt Normal file
View File

@ -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
>
>
>

213
audit/test/test1results.txt Normal file
View File

@ -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

View File

@ -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}

View File

@ -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}

View File

@ -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}

View File

@ -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}

View File

@ -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}

View File

@ -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}

View File

@ -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}

View File

@ -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}

View File

@ -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}

View File

@ -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}

View File

@ -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}

View File

@ -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}

View File

@ -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}

View File

@ -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}

View File

@ -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}

View File

@ -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}

View File

@ -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}

1
audit/test/testpassword Normal file
View File

@ -0,0 +1 @@
testtest