From 6b1173b4424fbbff4999405e855e3e0c3b0ddf36 Mon Sep 17 00:00:00 2001 From: Roman Storm Date: Thu, 9 Nov 2017 18:16:40 -0800 Subject: [PATCH] init --- .gitignore | 1 + .travis.yml | 28 + build/contracts/BasicToken.json | 1177 +++++++ build/contracts/ERC20Basic.json | 474 +++ build/contracts/Migrations.json | 827 +++++ build/contracts/Ownable.json | 841 +++++ build/contracts/Presale.json | 4675 +++++++++++++++++++++++++ build/contracts/PresaleOracles.json | 5027 +++++++++++++++++++++++++++ build/contracts/SafeMath.json | 1323 +++++++ contracts/Migrations.sol | 23 + contracts/PresaleOracles.sol | 97 + migrations/1_initial_migration.js | 5 + migrations/2_deploy_presale.js | 10 + package-lock.json | 724 ++++ package.json | 19 + test/PresaleOraclesMock.sol | 24 + test/presale.js | 246 ++ truffle-config.js | 4 + truffle.js | 11 + 19 files changed, 15536 insertions(+) create mode 100644 .gitignore create mode 100644 .travis.yml create mode 100644 build/contracts/BasicToken.json create mode 100644 build/contracts/ERC20Basic.json create mode 100644 build/contracts/Migrations.json create mode 100644 build/contracts/Ownable.json create mode 100644 build/contracts/Presale.json create mode 100644 build/contracts/PresaleOracles.json create mode 100644 build/contracts/SafeMath.json create mode 100644 contracts/Migrations.sol create mode 100644 contracts/PresaleOracles.sol create mode 100644 migrations/1_initial_migration.js create mode 100644 migrations/2_deploy_presale.js create mode 100644 package-lock.json create mode 100644 package.json create mode 100644 test/PresaleOraclesMock.sol create mode 100644 test/presale.js create mode 100644 truffle-config.js create mode 100644 truffle.js diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b512c09 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +node_modules \ No newline at end of file diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..4ea007f --- /dev/null +++ b/.travis.yml @@ -0,0 +1,28 @@ +dist: trusty +sudo: required +group: beta +language: node_js +node_js: + - "8" +cache: + yarn: true +env: + - + - SOLIDITY_COVERAGE=true +matrix: + fast_finish: true + allow_failures: + - env: SOLIDITY_COVERAGE=true +script: + - yarn test + +deploy: + provider: pages + local_dir: mochawesome-report + target_branch: gh-pages + email: travis@ci.com + name: Deployment Bot + skip_cleanup: true + github_token: $GITHUB_TOKEN # Set in travis-ci.org dashboard + on: + branch: master \ No newline at end of file diff --git a/build/contracts/BasicToken.json b/build/contracts/BasicToken.json new file mode 100644 index 0000000..5721ece --- /dev/null +++ b/build/contracts/BasicToken.json @@ -0,0 +1,1177 @@ +{ + "contractName": "BasicToken", + "abi": [ + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "name": "balance", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_to", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "from", + "type": "address" + }, + { + "indexed": true, + "name": "to", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + } + ], + "bytecode": "0x6060604052341561000f57600080fd5b6103b48061001e6000396000f300606060405260043610610057576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806318160ddd1461005c57806370a0823114610085578063a9059cbb146100d2575b600080fd5b341561006757600080fd5b61006f61012c565b6040518082815260200191505060405180910390f35b341561009057600080fd5b6100bc600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610132565b6040518082815260200191505060405180910390f35b34156100dd57600080fd5b610112600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190505061017b565b604051808215151515815260200191505060405180910390f35b60005481565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141515156101b857600080fd5b61020a82600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461035190919063ffffffff16565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061029f82600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461036a90919063ffffffff16565b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b600082821115151561035f57fe5b818303905092915050565b600080828401905083811015151561037e57fe5b80915050929150505600a165627a7a72305820383b9ea9655e746cbd35cb3ea988d9cd4ad1664a04e1caab93f22393991555600029", + "deployedBytecode": "0x606060405260043610610057576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806318160ddd1461005c57806370a0823114610085578063a9059cbb146100d2575b600080fd5b341561006757600080fd5b61006f61012c565b6040518082815260200191505060405180910390f35b341561009057600080fd5b6100bc600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610132565b6040518082815260200191505060405180910390f35b34156100dd57600080fd5b610112600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190505061017b565b604051808215151515815260200191505060405180910390f35b60005481565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141515156101b857600080fd5b61020a82600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461035190919063ffffffff16565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061029f82600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461036a90919063ffffffff16565b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b600082821115151561035f57fe5b818303905092915050565b600080828401905083811015151561037e57fe5b80915050929150505600a165627a7a72305820383b9ea9655e746cbd35cb3ea988d9cd4ad1664a04e1caab93f22393991555600029", + "sourceMap": "177:910:3:-;;;;;;;;;;;;;;;;;", + "deployedSourceMap": "177:910:3:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;179:26:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;973:111:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;437:334;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;179:26:4;;;;:::o;973:111:3:-;1033:15;1063:8;:16;1072:6;1063:16;;;;;;;;;;;;;;;;1056:23;;973:111;;;:::o;437:334::-;500:4;535:1;520:17;;:3;:17;;;;512:26;;;;;;;;631:32;656:6;631:8;:20;640:10;631:20;;;;;;;;;;;;;;;;:24;;:32;;;;:::i;:::-;608:8;:20;617:10;608:20;;;;;;;;;;;;;;;:55;;;;685:25;703:6;685:8;:13;694:3;685:13;;;;;;;;;;;;;;;;:17;;:25;;;;:::i;:::-;669:8;:13;678:3;669:13;;;;;;;;;;;;;;;:41;;;;737:3;716:33;;725:10;716:33;;;742:6;716:33;;;;;;;;;;;;;;;;;;762:4;755:11;;437:334;;;;:::o;562:114:1:-;624:7;651:1;646;:6;;639:14;;;;;;670:1;666;:5;659:12;;562:114;;;;:::o;680:133::-;742:7;757:9;773:1;769;:5;757:17;;792:1;787;:6;;780:14;;;;;;807:1;800:8;;680:133;;;;;:::o", + "source": "pragma solidity ^0.4.11;\n\n\nimport './ERC20Basic.sol';\nimport '../math/SafeMath.sol';\n\n\n/**\n * @title Basic token\n * @dev Basic version of StandardToken, with no allowances.\n */\ncontract BasicToken is ERC20Basic {\n using SafeMath for uint256;\n\n mapping(address => uint256) balances;\n\n /**\n * @dev transfer token for a specified address\n * @param _to The address to transfer to.\n * @param _value The amount to be transferred.\n */\n function transfer(address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n\n // SafeMath.sub will throw if there is not enough balance.\n balances[msg.sender] = balances[msg.sender].sub(_value);\n balances[_to] = balances[_to].add(_value);\n Transfer(msg.sender, _to, _value);\n return true;\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param _owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address _owner) public constant returns (uint256 balance) {\n return balances[_owner];\n }\n\n}\n", + "sourcePath": "zeppelin-solidity/contracts/token/BasicToken.sol", + "ast": { + "attributes": { + "absolutePath": "zeppelin-solidity/contracts/token/BasicToken.sol", + "exportedSymbols": { + "BasicToken": [ + 565 + ] + } + }, + "children": [ + { + "attributes": { + "literals": [ + "solidity", + "^", + "0.4", + ".11" + ] + }, + "id": 490, + "name": "PragmaDirective", + "src": "0:24:3" + }, + { + "attributes": { + "SourceUnit": 595, + "absolutePath": "zeppelin-solidity/contracts/token/ERC20Basic.sol", + "file": "./ERC20Basic.sol", + "scope": 566, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 491, + "name": "ImportDirective", + "src": "27:26:3" + }, + { + "attributes": { + "SourceUnit": 433, + "absolutePath": "zeppelin-solidity/contracts/math/SafeMath.sol", + "file": "../math/SafeMath.sol", + "scope": 566, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 492, + "name": "ImportDirective", + "src": "54:30:3" + }, + { + "attributes": { + "contractDependencies": [ + 594 + ], + "contractKind": "contract", + "documentation": "@title Basic token\n@dev Basic version of StandardToken, with no allowances.", + "fullyImplemented": true, + "linearizedBaseContracts": [ + 565, + 594 + ], + "name": "BasicToken", + "scope": 566 + }, + "children": [ + { + "attributes": { + "arguments": [ + null + ] + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "ERC20Basic", + "referencedDeclaration": 594, + "type": "contract ERC20Basic" + }, + "id": 493, + "name": "UserDefinedTypeName", + "src": "200:10:3" + } + ], + "id": 494, + "name": "InheritanceSpecifier", + "src": "200:10:3" + }, + { + "children": [ + { + "attributes": { + "contractScope": null, + "name": "SafeMath", + "referencedDeclaration": 432, + "type": "library SafeMath" + }, + "id": 495, + "name": "UserDefinedTypeName", + "src": "221:8:3" + }, + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 496, + "name": "ElementaryTypeName", + "src": "234:7:3" + } + ], + "id": 497, + "name": "UsingForDirective", + "src": "215:27:3" + }, + { + "attributes": { + "constant": false, + "name": "balances", + "scope": 565, + "stateVariable": true, + "storageLocation": "default", + "type": "mapping(address => uint256)", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "type": "mapping(address => uint256)" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 498, + "name": "ElementaryTypeName", + "src": "254:7:3" + }, + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 499, + "name": "ElementaryTypeName", + "src": "265:7:3" + } + ], + "id": 500, + "name": "Mapping", + "src": "246:27:3" + } + ], + "id": 501, + "name": "VariableDeclaration", + "src": "246:36:3" + }, + { + "attributes": { + "constant": false, + "implemented": true, + "isConstructor": false, + "modifiers": [ + null + ], + "name": "transfer", + "payable": false, + "scope": 565, + "stateMutability": "nonpayable", + "superFunction": 585, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "_to", + "scope": 552, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 502, + "name": "ElementaryTypeName", + "src": "455:7:3" + } + ], + "id": 503, + "name": "VariableDeclaration", + "src": "455:11:3" + }, + { + "attributes": { + "constant": false, + "name": "_value", + "scope": 552, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 504, + "name": "ElementaryTypeName", + "src": "468:7:3" + } + ], + "id": 505, + "name": "VariableDeclaration", + "src": "468:14:3" + } + ], + "id": 506, + "name": "ParameterList", + "src": "454:29:3" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 552, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 507, + "name": "ElementaryTypeName", + "src": "500:4:3" + } + ], + "id": 508, + "name": "VariableDeclaration", + "src": "500:4:3" + } + ], + "id": 509, + "name": "ParameterList", + "src": "499:6:3" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 609, + "type": "function (bool) pure", + "value": "require" + }, + "id": 510, + "name": "Identifier", + "src": "512:7:3" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 503, + "type": "address", + "value": "_to" + }, + "id": 511, + "name": "Identifier", + "src": "520:3:3" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": true, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 512, + "name": "ElementaryTypeNameExpression", + "src": "527:7:3" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 513, + "name": "Literal", + "src": "535:1:3" + } + ], + "id": 514, + "name": "FunctionCall", + "src": "527:10:3" + } + ], + "id": 515, + "name": "BinaryOperation", + "src": "520:17:3" + } + ], + "id": 516, + "name": "FunctionCall", + "src": "512:26:3" + } + ], + "id": 517, + "name": "ExpressionStatement", + "src": "512:26:3" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 501, + "type": "mapping(address => uint256)", + "value": "balances" + }, + "id": 518, + "name": "Identifier", + "src": "608:8:3" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 606, + "type": "msg", + "value": "msg" + }, + "id": 519, + "name": "Identifier", + "src": "617:3:3" + } + ], + "id": 520, + "name": "MemberAccess", + "src": "617:10:3" + } + ], + "id": 521, + "name": "IndexAccess", + "src": "608:20:3" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sub", + "referencedDeclaration": 407, + "type": "function (uint256,uint256) view returns (uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 501, + "type": "mapping(address => uint256)", + "value": "balances" + }, + "id": 522, + "name": "Identifier", + "src": "631:8:3" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 606, + "type": "msg", + "value": "msg" + }, + "id": 523, + "name": "Identifier", + "src": "640:3:3" + } + ], + "id": 524, + "name": "MemberAccess", + "src": "640:10:3" + } + ], + "id": 525, + "name": "IndexAccess", + "src": "631:20:3" + } + ], + "id": 526, + "name": "MemberAccess", + "src": "631:24:3" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 505, + "type": "uint256", + "value": "_value" + }, + "id": 527, + "name": "Identifier", + "src": "656:6:3" + } + ], + "id": 528, + "name": "FunctionCall", + "src": "631:32:3" + } + ], + "id": 529, + "name": "Assignment", + "src": "608:55:3" + } + ], + "id": 530, + "name": "ExpressionStatement", + "src": "608:55:3" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 501, + "type": "mapping(address => uint256)", + "value": "balances" + }, + "id": 531, + "name": "Identifier", + "src": "669:8:3" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 503, + "type": "address", + "value": "_to" + }, + "id": 532, + "name": "Identifier", + "src": "678:3:3" + } + ], + "id": 533, + "name": "IndexAccess", + "src": "669:13:3" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "add", + "referencedDeclaration": 431, + "type": "function (uint256,uint256) view returns (uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 501, + "type": "mapping(address => uint256)", + "value": "balances" + }, + "id": 534, + "name": "Identifier", + "src": "685:8:3" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 503, + "type": "address", + "value": "_to" + }, + "id": 535, + "name": "Identifier", + "src": "694:3:3" + } + ], + "id": 536, + "name": "IndexAccess", + "src": "685:13:3" + } + ], + "id": 537, + "name": "MemberAccess", + "src": "685:17:3" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 505, + "type": "uint256", + "value": "_value" + }, + "id": 538, + "name": "Identifier", + "src": "703:6:3" + } + ], + "id": 539, + "name": "FunctionCall", + "src": "685:25:3" + } + ], + "id": 540, + "name": "Assignment", + "src": "669:41:3" + } + ], + "id": 541, + "name": "ExpressionStatement", + "src": "669:41:3" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 593, + "type": "function (address,address,uint256)", + "value": "Transfer" + }, + "id": 542, + "name": "Identifier", + "src": "716:8:3" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 606, + "type": "msg", + "value": "msg" + }, + "id": 543, + "name": "Identifier", + "src": "725:3:3" + } + ], + "id": 544, + "name": "MemberAccess", + "src": "725:10:3" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 503, + "type": "address", + "value": "_to" + }, + "id": 545, + "name": "Identifier", + "src": "737:3:3" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 505, + "type": "uint256", + "value": "_value" + }, + "id": 546, + "name": "Identifier", + "src": "742:6:3" + } + ], + "id": 547, + "name": "FunctionCall", + "src": "716:33:3" + } + ], + "id": 548, + "name": "ExpressionStatement", + "src": "716:33:3" + }, + { + "attributes": { + "functionReturnParameters": 509 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "hexvalue": "74727565", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "bool", + "type": "bool", + "value": "true" + }, + "id": 549, + "name": "Literal", + "src": "762:4:3" + } + ], + "id": 550, + "name": "Return", + "src": "755:11:3" + } + ], + "id": 551, + "name": "Block", + "src": "506:265:3" + } + ], + "id": 552, + "name": "FunctionDefinition", + "src": "437:334:3" + }, + { + "attributes": { + "constant": true, + "implemented": true, + "isConstructor": false, + "modifiers": [ + null + ], + "name": "balanceOf", + "payable": false, + "scope": 565, + "stateMutability": "view", + "superFunction": 576, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "_owner", + "scope": 564, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 553, + "name": "ElementaryTypeName", + "src": "992:7:3" + } + ], + "id": 554, + "name": "VariableDeclaration", + "src": "992:14:3" + } + ], + "id": 555, + "name": "ParameterList", + "src": "991:16:3" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "balance", + "scope": 564, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 556, + "name": "ElementaryTypeName", + "src": "1033:7:3" + } + ], + "id": 557, + "name": "VariableDeclaration", + "src": "1033:15:3" + } + ], + "id": 558, + "name": "ParameterList", + "src": "1032:17:3" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 558 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 501, + "type": "mapping(address => uint256)", + "value": "balances" + }, + "id": 559, + "name": "Identifier", + "src": "1063:8:3" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 554, + "type": "address", + "value": "_owner" + }, + "id": 560, + "name": "Identifier", + "src": "1072:6:3" + } + ], + "id": 561, + "name": "IndexAccess", + "src": "1063:16:3" + } + ], + "id": 562, + "name": "Return", + "src": "1056:23:3" + } + ], + "id": 563, + "name": "Block", + "src": "1050:34:3" + } + ], + "id": 564, + "name": "FunctionDefinition", + "src": "973:111:3" + } + ], + "id": 565, + "name": "ContractDefinition", + "src": "177:910:3" + } + ], + "id": 566, + "name": "SourceUnit", + "src": "0:1088:3" + }, + "compiler": { + "name": "solc", + "version": "0.4.18+commit.9cf6e910.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "1.0.1", + "updatedAt": "2017-11-10T02:14:36.627Z" +} \ No newline at end of file diff --git a/build/contracts/ERC20Basic.json b/build/contracts/ERC20Basic.json new file mode 100644 index 0000000..9782098 --- /dev/null +++ b/build/contracts/ERC20Basic.json @@ -0,0 +1,474 @@ +{ + "contractName": "ERC20Basic", + "abi": [ + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "who", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "to", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "from", + "type": "address" + }, + { + "indexed": true, + "name": "to", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "sourceMap": "", + "deployedSourceMap": "", + "source": "pragma solidity ^0.4.11;\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n uint256 public totalSupply;\n function balanceOf(address who) public constant returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n", + "sourcePath": "zeppelin-solidity/contracts/token/ERC20Basic.sol", + "ast": { + "attributes": { + "absolutePath": "zeppelin-solidity/contracts/token/ERC20Basic.sol", + "exportedSymbols": { + "ERC20Basic": [ + 594 + ] + } + }, + "children": [ + { + "attributes": { + "literals": [ + "solidity", + "^", + "0.4", + ".11" + ] + }, + "id": 567, + "name": "PragmaDirective", + "src": "0:24:4" + }, + { + "attributes": { + "baseContracts": [ + null + ], + "contractDependencies": [ + null + ], + "contractKind": "contract", + "documentation": "@title ERC20Basic\n@dev Simpler version of ERC20 interface\n@dev see https://github.com/ethereum/EIPs/issues/179", + "fullyImplemented": false, + "linearizedBaseContracts": [ + 594 + ], + "name": "ERC20Basic", + "scope": 595 + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "totalSupply", + "scope": 594, + "stateVariable": true, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 568, + "name": "ElementaryTypeName", + "src": "179:7:4" + } + ], + "id": 569, + "name": "VariableDeclaration", + "src": "179:26:4" + }, + { + "attributes": { + "body": null, + "constant": true, + "implemented": false, + "isConstructor": false, + "modifiers": [ + null + ], + "name": "balanceOf", + "payable": false, + "scope": 594, + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "who", + "scope": 576, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 570, + "name": "ElementaryTypeName", + "src": "228:7:4" + } + ], + "id": 571, + "name": "VariableDeclaration", + "src": "228:11:4" + } + ], + "id": 572, + "name": "ParameterList", + "src": "227:13:4" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 576, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 573, + "name": "ElementaryTypeName", + "src": "266:7:4" + } + ], + "id": 574, + "name": "VariableDeclaration", + "src": "266:7:4" + } + ], + "id": 575, + "name": "ParameterList", + "src": "265:9:4" + } + ], + "id": 576, + "name": "FunctionDefinition", + "src": "209:66:4" + }, + { + "attributes": { + "body": null, + "constant": false, + "implemented": false, + "isConstructor": false, + "modifiers": [ + null + ], + "name": "transfer", + "payable": false, + "scope": 594, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "to", + "scope": 585, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 577, + "name": "ElementaryTypeName", + "src": "296:7:4" + } + ], + "id": 578, + "name": "VariableDeclaration", + "src": "296:10:4" + }, + { + "attributes": { + "constant": false, + "name": "value", + "scope": 585, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 579, + "name": "ElementaryTypeName", + "src": "308:7:4" + } + ], + "id": 580, + "name": "VariableDeclaration", + "src": "308:13:4" + } + ], + "id": 581, + "name": "ParameterList", + "src": "295:27:4" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 585, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 582, + "name": "ElementaryTypeName", + "src": "339:4:4" + } + ], + "id": 583, + "name": "VariableDeclaration", + "src": "339:4:4" + } + ], + "id": 584, + "name": "ParameterList", + "src": "338:6:4" + } + ], + "id": 585, + "name": "FunctionDefinition", + "src": "278:67:4" + }, + { + "attributes": { + "anonymous": false, + "name": "Transfer" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "indexed": true, + "name": "from", + "scope": 593, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 586, + "name": "ElementaryTypeName", + "src": "363:7:4" + } + ], + "id": 587, + "name": "VariableDeclaration", + "src": "363:20:4" + }, + { + "attributes": { + "constant": false, + "indexed": true, + "name": "to", + "scope": 593, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 588, + "name": "ElementaryTypeName", + "src": "385:7:4" + } + ], + "id": 589, + "name": "VariableDeclaration", + "src": "385:18:4" + }, + { + "attributes": { + "constant": false, + "indexed": false, + "name": "value", + "scope": 593, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 590, + "name": "ElementaryTypeName", + "src": "405:7:4" + } + ], + "id": 591, + "name": "VariableDeclaration", + "src": "405:13:4" + } + ], + "id": 592, + "name": "ParameterList", + "src": "362:57:4" + } + ], + "id": 593, + "name": "EventDefinition", + "src": "348:72:4" + } + ], + "id": 594, + "name": "ContractDefinition", + "src": "155:267:4" + } + ], + "id": 595, + "name": "SourceUnit", + "src": "0:423:4" + }, + "compiler": { + "name": "solc", + "version": "0.4.18+commit.9cf6e910.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "1.0.1", + "updatedAt": "2017-11-10T02:14:36.625Z" +} \ No newline at end of file diff --git a/build/contracts/Migrations.json b/build/contracts/Migrations.json new file mode 100644 index 0000000..ab3d77b --- /dev/null +++ b/build/contracts/Migrations.json @@ -0,0 +1,827 @@ +{ + "contractName": "Migrations", + "abi": [ + { + "constant": false, + "inputs": [ + { + "name": "new_address", + "type": "address" + } + ], + "name": "upgrade", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "last_completed_migration", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "owner", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "completed", + "type": "uint256" + } + ], + "name": "setCompleted", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + } + ], + "bytecode": "0x6060604052341561000f57600080fd5b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506102db8061005e6000396000f300606060405260043610610062576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630900f01014610067578063445df0ac146100a05780638da5cb5b146100c9578063fdacd5761461011e575b600080fd5b341561007257600080fd5b61009e600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610141565b005b34156100ab57600080fd5b6100b3610224565b6040518082815260200191505060405180910390f35b34156100d457600080fd5b6100dc61022a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561012957600080fd5b61013f600480803590602001909190505061024f565b005b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610220578190508073ffffffffffffffffffffffffffffffffffffffff1663fdacd5766001546040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b151561020b57600080fd5b6102c65a03f1151561021c57600080fd5b5050505b5050565b60015481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156102ac57806001819055505b505600a165627a7a723058200e88e6afa11a5d184f5f572f2a22c9ab2618d36ef3827f6d1a2ccad4e539d0590029", + "deployedBytecode": "0x606060405260043610610062576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630900f01014610067578063445df0ac146100a05780638da5cb5b146100c9578063fdacd5761461011e575b600080fd5b341561007257600080fd5b61009e600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610141565b005b34156100ab57600080fd5b6100b3610224565b6040518082815260200191505060405180910390f35b34156100d457600080fd5b6100dc61022a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561012957600080fd5b61013f600480803590602001909190505061024f565b005b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610220578190508073ffffffffffffffffffffffffffffffffffffffff1663fdacd5766001546040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b151561020b57600080fd5b6102c65a03f1151561021c57600080fd5b5050505b5050565b60015481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156102ac57806001819055505b505600a165627a7a723058200e88e6afa11a5d184f5f572f2a22c9ab2618d36ef3827f6d1a2ccad4e539d0590029", + "sourceMap": "26:488:0:-;;;178:58;;;;;;;;221:10;213:5;;:18;;;;;;;;;;;;;;;;;;26:488;;;;;;", + "deployedSourceMap": "26:488:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;347:165;;;;;;;;;;;;;;;;;;;;;;;;;;;;74:36;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;50:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;240:103;;;;;;;;;;;;;;;;;;;;;;;;;;347:165;409:19;161:5;;;;;;;;;;;147:19;;:10;:19;;;143:26;;;442:11;409:45;;460:8;:21;;;482:24;;460:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;143:26;347:165;;:::o;74:36::-;;;;:::o;50:20::-;;;;;;;;;;;;;:::o;240:103::-;161:5;;;;;;;;;;;147:19;;:10;:19;;;143:26;;;329:9;302:24;:36;;;;143:26;240:103;:::o", + "source": "pragma solidity ^0.4.17;\n\ncontract Migrations {\n address public owner;\n uint public last_completed_migration;\n\n modifier restricted() {\n if (msg.sender == owner) _;\n }\n\n function Migrations() public {\n owner = msg.sender;\n }\n\n function setCompleted(uint completed) public restricted {\n last_completed_migration = completed;\n }\n\n function upgrade(address new_address) public restricted {\n Migrations upgraded = Migrations(new_address);\n upgraded.setCompleted(last_completed_migration);\n }\n}\n", + "sourcePath": "/Users/rstorm/repos/presale-oracles/contracts/Migrations.sol", + "ast": { + "attributes": { + "absolutePath": "/Users/rstorm/repos/presale-oracles/contracts/Migrations.sol", + "exportedSymbols": { + "Migrations": [ + 56 + ] + } + }, + "children": [ + { + "attributes": { + "literals": [ + "solidity", + "^", + "0.4", + ".17" + ] + }, + "id": 1, + "name": "PragmaDirective", + "src": "0:24:0" + }, + { + "attributes": { + "baseContracts": [ + null + ], + "contractDependencies": [ + null + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "linearizedBaseContracts": [ + 56 + ], + "name": "Migrations", + "scope": 57 + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "owner", + "scope": 56, + "stateVariable": true, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 2, + "name": "ElementaryTypeName", + "src": "50:7:0" + } + ], + "id": 3, + "name": "VariableDeclaration", + "src": "50:20:0" + }, + { + "attributes": { + "constant": false, + "name": "last_completed_migration", + "scope": 56, + "stateVariable": true, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 4, + "name": "ElementaryTypeName", + "src": "74:4:0" + } + ], + "id": 5, + "name": "VariableDeclaration", + "src": "74:36:0" + }, + { + "attributes": { + "name": "restricted", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 6, + "name": "ParameterList", + "src": "134:2:0" + }, + { + "children": [ + { + "attributes": { + "falseBody": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "==", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 642, + "type": "msg", + "value": "msg" + }, + "id": 7, + "name": "Identifier", + "src": "147:3:0" + } + ], + "id": 8, + "name": "MemberAccess", + "src": "147:10:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3, + "type": "address", + "value": "owner" + }, + "id": 9, + "name": "Identifier", + "src": "161:5:0" + } + ], + "id": 10, + "name": "BinaryOperation", + "src": "147:19:0" + }, + { + "id": 11, + "name": "PlaceholderStatement", + "src": "168:1:0" + } + ], + "id": 12, + "name": "IfStatement", + "src": "143:26:0" + } + ], + "id": 13, + "name": "Block", + "src": "137:37:0" + } + ], + "id": 14, + "name": "ModifierDefinition", + "src": "115:59:0" + }, + { + "attributes": { + "constant": false, + "implemented": true, + "isConstructor": true, + "modifiers": [ + null + ], + "name": "Migrations", + "payable": false, + "scope": 56, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 15, + "name": "ParameterList", + "src": "197:2:0" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 16, + "name": "ParameterList", + "src": "207:0:0" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3, + "type": "address", + "value": "owner" + }, + "id": 17, + "name": "Identifier", + "src": "213:5:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 642, + "type": "msg", + "value": "msg" + }, + "id": 18, + "name": "Identifier", + "src": "221:3:0" + } + ], + "id": 19, + "name": "MemberAccess", + "src": "221:10:0" + } + ], + "id": 20, + "name": "Assignment", + "src": "213:18:0" + } + ], + "id": 21, + "name": "ExpressionStatement", + "src": "213:18:0" + } + ], + "id": 22, + "name": "Block", + "src": "207:29:0" + } + ], + "id": 23, + "name": "FunctionDefinition", + "src": "178:58:0" + }, + { + "attributes": { + "constant": false, + "implemented": true, + "isConstructor": false, + "name": "setCompleted", + "payable": false, + "scope": 56, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "completed", + "scope": 35, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 24, + "name": "ElementaryTypeName", + "src": "262:4:0" + } + ], + "id": 25, + "name": "VariableDeclaration", + "src": "262:14:0" + } + ], + "id": 26, + "name": "ParameterList", + "src": "261:16:0" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 29, + "name": "ParameterList", + "src": "296:0:0" + }, + { + "attributes": { + "arguments": [ + null + ] + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 14, + "type": "modifier ()", + "value": "restricted" + }, + "id": 27, + "name": "Identifier", + "src": "285:10:0" + } + ], + "id": 28, + "name": "ModifierInvocation", + "src": "285:10:0" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5, + "type": "uint256", + "value": "last_completed_migration" + }, + "id": 30, + "name": "Identifier", + "src": "302:24:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 25, + "type": "uint256", + "value": "completed" + }, + "id": 31, + "name": "Identifier", + "src": "329:9:0" + } + ], + "id": 32, + "name": "Assignment", + "src": "302:36:0" + } + ], + "id": 33, + "name": "ExpressionStatement", + "src": "302:36:0" + } + ], + "id": 34, + "name": "Block", + "src": "296:47:0" + } + ], + "id": 35, + "name": "FunctionDefinition", + "src": "240:103:0" + }, + { + "attributes": { + "constant": false, + "implemented": true, + "isConstructor": false, + "name": "upgrade", + "payable": false, + "scope": 56, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "new_address", + "scope": 55, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 36, + "name": "ElementaryTypeName", + "src": "364:7:0" + } + ], + "id": 37, + "name": "VariableDeclaration", + "src": "364:19:0" + } + ], + "id": 38, + "name": "ParameterList", + "src": "363:21:0" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 41, + "name": "ParameterList", + "src": "403:0:0" + }, + { + "attributes": { + "arguments": [ + null + ] + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 14, + "type": "modifier ()", + "value": "restricted" + }, + "id": 39, + "name": "Identifier", + "src": "392:10:0" + } + ], + "id": 40, + "name": "ModifierInvocation", + "src": "392:10:0" + }, + { + "children": [ + { + "attributes": { + "assignments": [ + 43 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "upgraded", + "scope": 55, + "stateVariable": false, + "storageLocation": "default", + "type": "contract Migrations", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "Migrations", + "referencedDeclaration": 56, + "type": "contract Migrations" + }, + "id": 42, + "name": "UserDefinedTypeName", + "src": "409:10:0" + } + ], + "id": 43, + "name": "VariableDeclaration", + "src": "409:19:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "contract Migrations", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 56, + "type": "type(contract Migrations)", + "value": "Migrations" + }, + "id": 44, + "name": "Identifier", + "src": "431:10:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 37, + "type": "address", + "value": "new_address" + }, + "id": 45, + "name": "Identifier", + "src": "442:11:0" + } + ], + "id": 46, + "name": "FunctionCall", + "src": "431:23:0" + } + ], + "id": 47, + "name": "VariableDeclarationStatement", + "src": "409:45:0" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "setCompleted", + "referencedDeclaration": 35, + "type": "function (uint256) external" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 43, + "type": "contract Migrations", + "value": "upgraded" + }, + "id": 48, + "name": "Identifier", + "src": "460:8:0" + } + ], + "id": 50, + "name": "MemberAccess", + "src": "460:21:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5, + "type": "uint256", + "value": "last_completed_migration" + }, + "id": 51, + "name": "Identifier", + "src": "482:24:0" + } + ], + "id": 52, + "name": "FunctionCall", + "src": "460:47:0" + } + ], + "id": 53, + "name": "ExpressionStatement", + "src": "460:47:0" + } + ], + "id": 54, + "name": "Block", + "src": "403:109:0" + } + ], + "id": 55, + "name": "FunctionDefinition", + "src": "347:165:0" + } + ], + "id": 56, + "name": "ContractDefinition", + "src": "26:488:0" + } + ], + "id": 57, + "name": "SourceUnit", + "src": "0:515:0" + }, + "compiler": { + "name": "solc", + "version": "0.4.18+commit.9cf6e910.Emscripten.clang" + }, + "networks": { + "321": { + "events": {}, + "links": {}, + "address": "0xc4c7497fbe1a886841a195a5d622cd60053c1376" + } + }, + "schemaVersion": "1.0.1", + "updatedAt": "2017-11-10T02:14:36.866Z" +} \ No newline at end of file diff --git a/build/contracts/Ownable.json b/build/contracts/Ownable.json new file mode 100644 index 0000000..c717629 --- /dev/null +++ b/build/contracts/Ownable.json @@ -0,0 +1,841 @@ +{ + "contractName": "Ownable", + "abi": [ + { + "constant": true, + "inputs": [], + "name": "owner", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + } + ], + "bytecode": "0x6060604052341561000f57600080fd5b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506102858061005e6000396000f30060606040526004361061004c576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680638da5cb5b14610051578063f2fde38b146100a6575b600080fd5b341561005c57600080fd5b6100646100df565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156100b157600080fd5b6100dd600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610104565b005b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561015f57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561019b57600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505600a165627a7a7230582014dad562cecef1a4eb92770ceb2274c070c776ee00510869af5dd070d40bda9a0029", + "deployedBytecode": "0x60606040526004361061004c576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680638da5cb5b14610051578063f2fde38b146100a6575b600080fd5b341561005c57600080fd5b6100646100df565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156100b157600080fd5b6100dd600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610104565b005b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561015f57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561019b57600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505600a165627a7a7230582014dad562cecef1a4eb92770ceb2274c070c776ee00510869af5dd070d40bda9a0029", + "sourceMap": "217:782:2:-;;;469:48;;;;;;;;502:10;494:5;;:18;;;;;;;;;;;;;;;;;;217:782;;;;;;", + "deployedSourceMap": "217:782:2:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;238:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;827:169;;;;;;;;;;;;;;;;;;;;;;;;;;;;238:20;;;;;;;;;;;;;:::o;827:169::-;647:5;;;;;;;;;;;633:19;;:10;:19;;;625:28;;;;;;;;923:1;903:22;;:8;:22;;;;895:31;;;;;;;;960:8;932:37;;953:5;;;;;;;;;;;932:37;;;;;;;;;;;;983:8;975:5;;:16;;;;;;;;;;;;;;;;;;827:169;:::o", + "source": "pragma solidity ^0.4.11;\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() {\n owner = msg.sender;\n }\n\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) onlyOwner public {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n", + "sourcePath": "zeppelin-solidity/contracts/ownership/Ownable.sol", + "ast": { + "attributes": { + "absolutePath": "zeppelin-solidity/contracts/ownership/Ownable.sol", + "exportedSymbols": { + "Ownable": [ + 488 + ] + } + }, + "children": [ + { + "attributes": { + "literals": [ + "solidity", + "^", + "0.4", + ".11" + ] + }, + "id": 434, + "name": "PragmaDirective", + "src": "0:24:2" + }, + { + "attributes": { + "baseContracts": [ + null + ], + "contractDependencies": [ + null + ], + "contractKind": "contract", + "documentation": "@title Ownable\n@dev The Ownable contract has an owner address, and provides basic authorization control\nfunctions, this simplifies the implementation of \"user permissions\".", + "fullyImplemented": true, + "linearizedBaseContracts": [ + 488 + ], + "name": "Ownable", + "scope": 489 + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "owner", + "scope": 488, + "stateVariable": true, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 435, + "name": "ElementaryTypeName", + "src": "238:7:2" + } + ], + "id": 436, + "name": "VariableDeclaration", + "src": "238:20:2" + }, + { + "attributes": { + "anonymous": false, + "name": "OwnershipTransferred" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "indexed": true, + "name": "previousOwner", + "scope": 442, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 437, + "name": "ElementaryTypeName", + "src": "291:7:2" + } + ], + "id": 438, + "name": "VariableDeclaration", + "src": "291:29:2" + }, + { + "attributes": { + "constant": false, + "indexed": true, + "name": "newOwner", + "scope": 442, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 439, + "name": "ElementaryTypeName", + "src": "322:7:2" + } + ], + "id": 440, + "name": "VariableDeclaration", + "src": "322:24:2" + } + ], + "id": 441, + "name": "ParameterList", + "src": "290:57:2" + } + ], + "id": 442, + "name": "EventDefinition", + "src": "264:84:2" + }, + { + "attributes": { + "constant": false, + "implemented": true, + "isConstructor": true, + "modifiers": [ + null + ], + "name": "Ownable", + "payable": false, + "scope": 488, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 443, + "name": "ParameterList", + "src": "485:2:2" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 444, + "name": "ParameterList", + "src": "488:0:2" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 436, + "type": "address", + "value": "owner" + }, + "id": 445, + "name": "Identifier", + "src": "494:5:2" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 606, + "type": "msg", + "value": "msg" + }, + "id": 446, + "name": "Identifier", + "src": "502:3:2" + } + ], + "id": 447, + "name": "MemberAccess", + "src": "502:10:2" + } + ], + "id": 448, + "name": "Assignment", + "src": "494:18:2" + } + ], + "id": 449, + "name": "ExpressionStatement", + "src": "494:18:2" + } + ], + "id": 450, + "name": "Block", + "src": "488:29:2" + } + ], + "id": 451, + "name": "FunctionDefinition", + "src": "469:48:2" + }, + { + "attributes": { + "name": "onlyOwner", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 452, + "name": "ParameterList", + "src": "616:2:2" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 609, + "type": "function (bool) pure", + "value": "require" + }, + "id": 453, + "name": "Identifier", + "src": "625:7:2" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "==", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 606, + "type": "msg", + "value": "msg" + }, + "id": 454, + "name": "Identifier", + "src": "633:3:2" + } + ], + "id": 455, + "name": "MemberAccess", + "src": "633:10:2" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 436, + "type": "address", + "value": "owner" + }, + "id": 456, + "name": "Identifier", + "src": "647:5:2" + } + ], + "id": 457, + "name": "BinaryOperation", + "src": "633:19:2" + } + ], + "id": 458, + "name": "FunctionCall", + "src": "625:28:2" + } + ], + "id": 459, + "name": "ExpressionStatement", + "src": "625:28:2" + }, + { + "id": 460, + "name": "PlaceholderStatement", + "src": "659:1:2" + } + ], + "id": 461, + "name": "Block", + "src": "619:46:2" + } + ], + "id": 462, + "name": "ModifierDefinition", + "src": "598:67:2" + }, + { + "attributes": { + "constant": false, + "implemented": true, + "isConstructor": false, + "name": "transferOwnership", + "payable": false, + "scope": 488, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "newOwner", + "scope": 487, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 463, + "name": "ElementaryTypeName", + "src": "854:7:2" + } + ], + "id": 464, + "name": "VariableDeclaration", + "src": "854:16:2" + } + ], + "id": 465, + "name": "ParameterList", + "src": "853:18:2" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 468, + "name": "ParameterList", + "src": "889:0:2" + }, + { + "attributes": { + "arguments": [ + null + ] + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 462, + "type": "modifier ()", + "value": "onlyOwner" + }, + "id": 466, + "name": "Identifier", + "src": "872:9:2" + } + ], + "id": 467, + "name": "ModifierInvocation", + "src": "872:9:2" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 609, + "type": "function (bool) pure", + "value": "require" + }, + "id": 469, + "name": "Identifier", + "src": "895:7:2" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 464, + "type": "address", + "value": "newOwner" + }, + "id": 470, + "name": "Identifier", + "src": "903:8:2" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": true, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 471, + "name": "ElementaryTypeNameExpression", + "src": "915:7:2" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 472, + "name": "Literal", + "src": "923:1:2" + } + ], + "id": 473, + "name": "FunctionCall", + "src": "915:10:2" + } + ], + "id": 474, + "name": "BinaryOperation", + "src": "903:22:2" + } + ], + "id": 475, + "name": "FunctionCall", + "src": "895:31:2" + } + ], + "id": 476, + "name": "ExpressionStatement", + "src": "895:31:2" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 442, + "type": "function (address,address)", + "value": "OwnershipTransferred" + }, + "id": 477, + "name": "Identifier", + "src": "932:20:2" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 436, + "type": "address", + "value": "owner" + }, + "id": 478, + "name": "Identifier", + "src": "953:5:2" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 464, + "type": "address", + "value": "newOwner" + }, + "id": 479, + "name": "Identifier", + "src": "960:8:2" + } + ], + "id": 480, + "name": "FunctionCall", + "src": "932:37:2" + } + ], + "id": 481, + "name": "ExpressionStatement", + "src": "932:37:2" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 436, + "type": "address", + "value": "owner" + }, + "id": 482, + "name": "Identifier", + "src": "975:5:2" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 464, + "type": "address", + "value": "newOwner" + }, + "id": 483, + "name": "Identifier", + "src": "983:8:2" + } + ], + "id": 484, + "name": "Assignment", + "src": "975:16:2" + } + ], + "id": 485, + "name": "ExpressionStatement", + "src": "975:16:2" + } + ], + "id": 486, + "name": "Block", + "src": "889:107:2" + } + ], + "id": 487, + "name": "FunctionDefinition", + "src": "827:169:2" + } + ], + "id": 488, + "name": "ContractDefinition", + "src": "217:782:2" + } + ], + "id": 489, + "name": "SourceUnit", + "src": "0:1000:2" + }, + "compiler": { + "name": "solc", + "version": "0.4.18+commit.9cf6e910.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "1.0.1", + "updatedAt": "2017-11-10T02:14:36.615Z" +} \ No newline at end of file diff --git a/build/contracts/Presale.json b/build/contracts/Presale.json new file mode 100644 index 0000000..708f42a --- /dev/null +++ b/build/contracts/Presale.json @@ -0,0 +1,4675 @@ +{ + "contractName": "Presale", + "abi": [ + { + "constant": false, + "inputs": [ + { + "name": "_startTime", + "type": "uint256" + }, + { + "name": "_endTime", + "type": "uint256" + }, + { + "name": "_cap", + "type": "uint256" + }, + { + "name": "_vault", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "rate", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "endTime", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "cap", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "isInitialized", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_investors", + "type": "address[]" + } + ], + "name": "whitelistInvestors", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "investorsLength", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "startTime", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "owner", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "address" + } + ], + "name": "whitelist", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "buy", + "outputs": [], + "payable": true, + "stateMutability": "payable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "address" + } + ], + "name": "investorBalances", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_newInvestor", + "type": "address" + } + ], + "name": "whitelistInvestor", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_token", + "type": "address" + } + ], + "name": "claimTokens", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "totalInvestedInWei", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "vault", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_investor", + "type": "address" + } + ], + "name": "blacklistInvestor", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "payable": true, + "stateMutability": "payable", + "type": "fallback" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + } + ], + "bytecode": "0x60606040526000600560006101000a81548160ff021916908315150217905550341561002a57600080fd5b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061105b806100796000396000f3006060604052600436106100fc576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680631f8d519d146101065780632c4e722e1461015a5780633197cbb614610183578063355274ea146101ac578063392e53cd146101d55780635613680a14610202578063594337a91461025c57806378e97925146102855780638da5cb5b146102ae5780639b19251a14610303578063a6f2ae3a14610354578063b29a61c11461035e578063c430bcda146103ab578063df8de3e7146103e4578063f117c9241461041d578063f2fde38b14610446578063fbfa77cf1461047f578063ffc1b038146104d4575b61010461050d565b005b341561011157600080fd5b610158600480803590602001909190803590602001909190803590602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610631565b005b341561016557600080fd5b61016d610775565b6040518082815260200191505060405180910390f35b341561018e57600080fd5b61019661077b565b6040518082815260200191505060405180910390f35b34156101b757600080fd5b6101bf610781565b6040518082815260200191505060405180910390f35b34156101e057600080fd5b6101e8610787565b604051808215151515815260200191505060405180910390f35b341561020d57600080fd5b61025a60048080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509190505061079a565b005b341561026757600080fd5b61026f610907565b6040518082815260200191505060405180910390f35b341561029057600080fd5b61029861090d565b6040518082815260200191505060405180910390f35b34156102b957600080fd5b6102c1610913565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561030e57600080fd5b61033a600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610938565b604051808215151515815260200191505060405180910390f35b61035c61050d565b005b341561036957600080fd5b610395600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610958565b6040518082815260200191505060405180910390f35b34156103b657600080fd5b6103e2600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610970565b005b34156103ef57600080fd5b61041b600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610a8c565b005b341561042857600080fd5b610430610d37565b6040518082815260200191505060405180910390f35b341561045157600080fd5b61047d600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610d3d565b005b341561048a57600080fd5b610492610e92565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156104df57600080fd5b61050b600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610eb8565b005b6000600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151561056757600080fd5b60003411151561057657600080fd5b600560009054906101000a900460ff16151561059157600080fd5b60015442101580156105a557506002544211155b15156105b057600080fd5b6003543460065401111515156105c557600080fd5b33905034600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055503460066000828254019250508190555061062e34610fcb565b50565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561068c57600080fd5b600560009054906101000a900460ff161515156106a857600080fd5b600084141515156106b857600080fd5b600083141515156106c857600080fd5b600082141515156106d857600080fd5b60008173ffffffffffffffffffffffffffffffffffffffff16141515156106fe57600080fd5b8360018190555082600281905550816003819055506001600560006101000a81548160ff02191690831515021790555080600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050565b60045481565b60025481565b60035481565b600560009054906101000a900460ff1681565b6000806000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156107f857600080fd5b60fa83511115151561080957600080fd5b600091505b82518260ff16101561090257828260ff1681518110151561082b57fe5b906020019060200201519050600860008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615156108f5576001600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506009600081548092919060010191905055505b818060010192505061080e565b505050565b60095481565b60015481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60086020528060005260406000206000915054906101000a900460ff1681565b60076020528060005260406000206000915090505481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156109cb57600080fd5b600860008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515610a89576001600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506009600081548092919060010191905055505b50565b6000806000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610aea57600080fd5b60008373ffffffffffffffffffffffffffffffffffffffff161415610b86576000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc3073ffffffffffffffffffffffffffffffffffffffff16319081150290604051600060405180830381858888f193505050501515610b8157600080fd5b610d32565b8291508173ffffffffffffffffffffffffffffffffffffffff166370a08231306000604051602001526040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b1515610c2c57600080fd5b6102c65a03f11515610c3d57600080fd5b5050506040518051905090508173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1515610d1557600080fd5b6102c65a03f11515610d2657600080fd5b50505060405180519050505b505050565b60065481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610d9857600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515610dd457600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610f1357600080fd5b600860008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615610fc857600860008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81549060ff0219169055600960008154809291906001900391905055505b50565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050151561102c57600080fd5b505600a165627a7a72305820a479bf0ec5b6baeb67334cf7f2433e91673f12d8e3f817e09f8b1af72a9352290029", + "deployedBytecode": "0x6060604052600436106100fc576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680631f8d519d146101065780632c4e722e1461015a5780633197cbb614610183578063355274ea146101ac578063392e53cd146101d55780635613680a14610202578063594337a91461025c57806378e97925146102855780638da5cb5b146102ae5780639b19251a14610303578063a6f2ae3a14610354578063b29a61c11461035e578063c430bcda146103ab578063df8de3e7146103e4578063f117c9241461041d578063f2fde38b14610446578063fbfa77cf1461047f578063ffc1b038146104d4575b61010461050d565b005b341561011157600080fd5b610158600480803590602001909190803590602001909190803590602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610631565b005b341561016557600080fd5b61016d610775565b6040518082815260200191505060405180910390f35b341561018e57600080fd5b61019661077b565b6040518082815260200191505060405180910390f35b34156101b757600080fd5b6101bf610781565b6040518082815260200191505060405180910390f35b34156101e057600080fd5b6101e8610787565b604051808215151515815260200191505060405180910390f35b341561020d57600080fd5b61025a60048080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509190505061079a565b005b341561026757600080fd5b61026f610907565b6040518082815260200191505060405180910390f35b341561029057600080fd5b61029861090d565b6040518082815260200191505060405180910390f35b34156102b957600080fd5b6102c1610913565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561030e57600080fd5b61033a600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610938565b604051808215151515815260200191505060405180910390f35b61035c61050d565b005b341561036957600080fd5b610395600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610958565b6040518082815260200191505060405180910390f35b34156103b657600080fd5b6103e2600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610970565b005b34156103ef57600080fd5b61041b600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610a8c565b005b341561042857600080fd5b610430610d37565b6040518082815260200191505060405180910390f35b341561045157600080fd5b61047d600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610d3d565b005b341561048a57600080fd5b610492610e92565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156104df57600080fd5b61050b600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610eb8565b005b6000600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151561056757600080fd5b60003411151561057657600080fd5b600560009054906101000a900460ff16151561059157600080fd5b60015442101580156105a557506002544211155b15156105b057600080fd5b6003543460065401111515156105c557600080fd5b33905034600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055503460066000828254019250508190555061062e34610fcb565b50565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561068c57600080fd5b600560009054906101000a900460ff161515156106a857600080fd5b600084141515156106b857600080fd5b600083141515156106c857600080fd5b600082141515156106d857600080fd5b60008173ffffffffffffffffffffffffffffffffffffffff16141515156106fe57600080fd5b8360018190555082600281905550816003819055506001600560006101000a81548160ff02191690831515021790555080600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050565b60045481565b60025481565b60035481565b600560009054906101000a900460ff1681565b6000806000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156107f857600080fd5b60fa83511115151561080957600080fd5b600091505b82518260ff16101561090257828260ff1681518110151561082b57fe5b906020019060200201519050600860008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615156108f5576001600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506009600081548092919060010191905055505b818060010192505061080e565b505050565b60095481565b60015481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60086020528060005260406000206000915054906101000a900460ff1681565b60076020528060005260406000206000915090505481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156109cb57600080fd5b600860008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515610a89576001600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506009600081548092919060010191905055505b50565b6000806000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610aea57600080fd5b60008373ffffffffffffffffffffffffffffffffffffffff161415610b86576000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc3073ffffffffffffffffffffffffffffffffffffffff16319081150290604051600060405180830381858888f193505050501515610b8157600080fd5b610d32565b8291508173ffffffffffffffffffffffffffffffffffffffff166370a08231306000604051602001526040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b1515610c2c57600080fd5b6102c65a03f11515610c3d57600080fd5b5050506040518051905090508173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1515610d1557600080fd5b6102c65a03f11515610d2657600080fd5b50505060405180519050505b505050565b60065481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610d9857600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515610dd457600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610f1357600080fd5b600860008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615610fc857600860008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81549060ff0219169055600960008154809291906001900391905055505b50565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050151561102c57600080fd5b505600a165627a7a72305820a479bf0ec5b6baeb67334cf7f2433e91673f12d8e3f817e09f8b1af72a9352290029", + "sourceMap": "202:2501:1:-;;;371:5;343:33;;;;;;;;;;;;;;;;;;;;651;;;;;;;;502:10:3;494:5;;:18;;;;;;;;;;;;;;;;;;202:2501:1;;;;;;", + "deployedSourceMap": "202:2501:1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;629:5;:3;:5::i;:::-;202:2501;694:405;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;318:19;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;266:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;294:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;343:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2145:364;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;525:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;236:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;238:20:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;478:41:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1109:412;;;;;;421:51;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1943:197;;;;;;;;;;;;;;;;;;;;;;;;;;;;1634:303;;;;;;;;;;;;;;;;;;;;;;;;;;;;382:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;827:169:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;561:20:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2514:187;;;;;;;;;;;;;;;;;;;;;;;;;;;;1109:412;1362:16;1157:9;:21;1167:10;1157:21;;;;;;;;;;;;;;;;;;;;;;;;;1149:30;;;;;;;;1209:1;1197:9;:13;1189:22;;;;;;;;1229:13;;;;;;;;;;;1221:22;;;;;;;;1268:9;;1261:3;:16;;:34;;;;;1288:7;;1281:3;:14;;1261:34;1253:43;;;;;;;;1348:3;;1335:9;1314:18;;:30;:37;;1306:46;;;;;;;;1381:10;1362:29;;1431:9;1401:16;:26;1418:8;1401:26;;;;;;;;;;;;;;;;:39;;;;;;;;;;;1472:9;1450:18;;:31;;;;;;;;;;;1491:23;1504:9;1491:12;:23::i;:::-;1109:412;:::o;694:405::-;647:5:3;;;;;;;;;;;633:19;;:10;:19;;;625:28;;;;;;;;818:13:1;;;;;;;;;;;817:14;809:23;;;;;;;;864:1;850:10;:15;;842:24;;;;;;;;896:1;884:8;:13;;876:22;;;;;;;;924:1;916:4;:9;;908:18;;;;;;;;954:3;944:6;:13;;;;936:22;;;;;;;;980:10;968:9;:22;;;;1010:8;1000:7;:18;;;;1034:4;1028:3;:10;;;;1064:4;1048:13;;:20;;;;;;;;;;;;;;;;;;1086:6;1078:5;;:14;;;;;;;;;;;;;;;;;;694:405;;;;:::o;318:19::-;;;;:::o;266:22::-;;;;:::o;294:18::-;;;;:::o;343:33::-;;;;;;;;;;;;;:::o;2145:364::-;2269:7;2319:19;647:5:3;;;;;;;;;;;633:19;;:10;:19;;;625:28;;;;;;;;2251:3:1;2230:10;:17;:24;;2222:33;;;;;;;;2277:1;2269:9;;2265:238;2282:10;:17;2280:1;:19;;;2265:238;;;2341:10;2352:1;2341:13;;;;;;;;;;;;;;;;;;;;2319:35;;2372:9;:22;2382:11;2372:22;;;;;;;;;;;;;;;;;;;;;;;;;2371:23;2368:125;;;2439:4;2414:9;:22;2424:11;2414:22;;;;;;;;;;;;;;;;:29;;;;;;;;;;;;;;;;;;2461:15;;:17;;;;;;;;;;;;;2368:125;2300:3;;;;;;;2265:238;;;2145:364;;;:::o;525:30::-;;;;:::o;236:24::-;;;;:::o;238:20:3:-;;;;;;;;;;;;;:::o;478:41:1:-;;;;;;;;;;;;;;;;;;;;;;:::o;421:51::-;;;;;;;;;;;;;;;;;:::o;1943:197::-;647:5:3;;;;;;;;;;;633:19;;:10;:19;;;625:28;;;;;;;;2023:9:1;:23;2033:12;2023:23;;;;;;;;;;;;;;;;;;;;;;;;;2022:24;2019:115;;;2088:4;2062:9;:23;2072:12;2062:23;;;;;;;;;;;;;;;;:30;;;;;;;;;;;;;;;;;;2106:15;;:17;;;;;;;;;;;;;2019:115;1943:197;:::o;1634:303::-;1804:16;1851:15;647:5:3;;;;;;;;;;;633:19;;:10;:19;;;625:28;;;;;;;;1712:3:1;1702:6;:13;;;1698:92;;;1731:5;;;;;;;;;;;:14;;:28;1746:4;:12;;;1731:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1773:7;;1698:92;1834:6;1804:37;;1869:5;:15;;;1885:4;1869:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1851:39;;1900:5;:14;;;1915:5;;;;;;;;;;;1922:7;1900:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;659:1:3;1634:303:1;;;:::o;382:33::-;;;;:::o;827:169:3:-;647:5;;;;;;;;;;;633:19;;:10;:19;;;625:28;;;;;;;;923:1;903:22;;:8;:22;;;;895:31;;;;;;;;960:8;932:37;;953:5;;;;;;;;;;;932:37;;;;;;;;;;;;983:8;975:5;;:16;;;;;;;;;;;;;;;;;;827:169;:::o;561:20:1:-;;;;;;;;;;;;;:::o;2514:187::-;647:5:3;;;;;;;;;;;633:19;;:10;:19;;;625:28;;;;;;;;2590:9:1;:20;2600:9;2590:20;;;;;;;;;;;;;;;;;;;;;;;;;2587:108;;;2633:9;:20;2643:9;2633:20;;;;;;;;;;;;;;;;2626:27;;;;;;;;;;;2667:15;;:17;;;;;;;;;;;;;;2587:108;2514:187;:::o;1536:88::-;1594:5;;;;;;;;;;;:14;;:23;1609:7;1594:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1536:88;:::o", + "source": "import \"zeppelin-solidity/contracts/math/SafeMath.sol\";\nimport \"zeppelin-solidity/contracts/token/BasicToken.sol\";\nimport \"zeppelin-solidity/contracts/ownership/Ownable.sol\";\n\npragma solidity ^0.4.17;\n\ncontract Presale is Ownable {\n uint256 public startTime;\n uint256 public endTime;\n uint256 public cap;\n uint256 public rate;\n bool public isInitialized = false;\n uint256 public totalInvestedInWei;\n mapping(address => uint256) public investorBalances;\n mapping(address => bool) public whitelist;\n uint256 public investorsLength;\n address public vault;\n \n function () public payable {\n buy();\n }\n \n function Presale() public {\n }\n \n function initialize(uint256 _startTime, uint256 _endTime, uint256 _cap, address _vault) public onlyOwner {\n require(!isInitialized);\n require(_startTime != 0);\n require(_endTime != 0);\n require(_cap != 0);\n require(_vault != 0x0);\n startTime = _startTime;\n endTime = _endTime;\n cap = _cap;\n isInitialized = true;\n vault = _vault;\n }\n \n function buy() public payable {\n require(whitelist[msg.sender]);\n require(msg.value > 0);\n require(isInitialized);\n require(now >= startTime && now <= endTime);\n require(totalInvestedInWei + msg.value <= cap);\n address investor = msg.sender;\n investorBalances[investor] += msg.value;\n totalInvestedInWei += msg.value;\n forwardFunds(msg.value);\n }\n \n \n function forwardFunds(uint256 _amount) internal {\n owner.transfer(_amount);\n }\n \n function claimTokens(address _token) public onlyOwner {\n if (_token == 0x0) {\n owner.transfer(this.balance);\n return;\n }\n \n BasicToken token = BasicToken(_token);\n uint256 balance = token.balanceOf(this);\n token.transfer(owner, balance);\n }\n\n function whitelistInvestor(address _newInvestor) public onlyOwner {\n if(!whitelist[_newInvestor]) {\n whitelist[_newInvestor] = true;\n investorsLength++;\n }\n }\n function whitelistInvestors(address[] _investors) public onlyOwner {\n require(_investors.length <= 250);\n for(uint8 i=0; i<_investors.length;i++) {\n address newInvestor = _investors[i];\n if(!whitelist[newInvestor]) {\n whitelist[newInvestor] = true;\n investorsLength++;\n }\n }\n }\n function blacklistInvestor(address _investor) public onlyOwner {\n if(whitelist[_investor]) {\n delete whitelist[_investor];\n investorsLength--;\n }\n }\n}", + "sourcePath": "/Users/rstorm/repos/presale-oracles/contracts/PresaleOracles.sol", + "ast": { + "attributes": { + "absolutePath": "/Users/rstorm/repos/presale-oracles/contracts/PresaleOracles.sol", + "exportedSymbols": { + "Presale": [ + 373 + ] + } + }, + "children": [ + { + "attributes": { + "SourceUnit": 469, + "absolutePath": "zeppelin-solidity/contracts/math/SafeMath.sol", + "file": "zeppelin-solidity/contracts/math/SafeMath.sol", + "scope": 374, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 58, + "name": "ImportDirective", + "src": "0:55:1" + }, + { + "attributes": { + "SourceUnit": 602, + "absolutePath": "zeppelin-solidity/contracts/token/BasicToken.sol", + "file": "zeppelin-solidity/contracts/token/BasicToken.sol", + "scope": 374, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 59, + "name": "ImportDirective", + "src": "56:58:1" + }, + { + "attributes": { + "SourceUnit": 525, + "absolutePath": "zeppelin-solidity/contracts/ownership/Ownable.sol", + "file": "zeppelin-solidity/contracts/ownership/Ownable.sol", + "scope": 374, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 60, + "name": "ImportDirective", + "src": "115:59:1" + }, + { + "attributes": { + "literals": [ + "solidity", + "^", + "0.4", + ".17" + ] + }, + "id": 61, + "name": "PragmaDirective", + "src": "176:24:1" + }, + { + "attributes": { + "contractDependencies": [ + 524 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "linearizedBaseContracts": [ + 373, + 524 + ], + "name": "Presale", + "scope": 374 + }, + "children": [ + { + "attributes": { + "arguments": [ + null + ] + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "Ownable", + "referencedDeclaration": 524, + "type": "contract Ownable" + }, + "id": 62, + "name": "UserDefinedTypeName", + "src": "222:7:1" + } + ], + "id": 63, + "name": "InheritanceSpecifier", + "src": "222:7:1" + }, + { + "attributes": { + "constant": false, + "name": "startTime", + "scope": 373, + "stateVariable": true, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 64, + "name": "ElementaryTypeName", + "src": "236:7:1" + } + ], + "id": 65, + "name": "VariableDeclaration", + "src": "236:24:1" + }, + { + "attributes": { + "constant": false, + "name": "endTime", + "scope": 373, + "stateVariable": true, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 66, + "name": "ElementaryTypeName", + "src": "266:7:1" + } + ], + "id": 67, + "name": "VariableDeclaration", + "src": "266:22:1" + }, + { + "attributes": { + "constant": false, + "name": "cap", + "scope": 373, + "stateVariable": true, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 68, + "name": "ElementaryTypeName", + "src": "294:7:1" + } + ], + "id": 69, + "name": "VariableDeclaration", + "src": "294:18:1" + }, + { + "attributes": { + "constant": false, + "name": "rate", + "scope": 373, + "stateVariable": true, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 70, + "name": "ElementaryTypeName", + "src": "318:7:1" + } + ], + "id": 71, + "name": "VariableDeclaration", + "src": "318:19:1" + }, + { + "attributes": { + "constant": false, + "name": "isInitialized", + "scope": 373, + "stateVariable": true, + "storageLocation": "default", + "type": "bool", + "visibility": "public" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 72, + "name": "ElementaryTypeName", + "src": "343:4:1" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "66616c7365", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "bool", + "type": "bool", + "value": "false" + }, + "id": 73, + "name": "Literal", + "src": "371:5:1" + } + ], + "id": 74, + "name": "VariableDeclaration", + "src": "343:33:1" + }, + { + "attributes": { + "constant": false, + "name": "totalInvestedInWei", + "scope": 373, + "stateVariable": true, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 75, + "name": "ElementaryTypeName", + "src": "382:7:1" + } + ], + "id": 76, + "name": "VariableDeclaration", + "src": "382:33:1" + }, + { + "attributes": { + "constant": false, + "name": "investorBalances", + "scope": 373, + "stateVariable": true, + "storageLocation": "default", + "type": "mapping(address => uint256)", + "value": null, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "type": "mapping(address => uint256)" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 77, + "name": "ElementaryTypeName", + "src": "429:7:1" + }, + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 78, + "name": "ElementaryTypeName", + "src": "440:7:1" + } + ], + "id": 79, + "name": "Mapping", + "src": "421:27:1" + } + ], + "id": 80, + "name": "VariableDeclaration", + "src": "421:51:1" + }, + { + "attributes": { + "constant": false, + "name": "whitelist", + "scope": 373, + "stateVariable": true, + "storageLocation": "default", + "type": "mapping(address => bool)", + "value": null, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "type": "mapping(address => bool)" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 81, + "name": "ElementaryTypeName", + "src": "486:7:1" + }, + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 82, + "name": "ElementaryTypeName", + "src": "497:4:1" + } + ], + "id": 83, + "name": "Mapping", + "src": "478:24:1" + } + ], + "id": 84, + "name": "VariableDeclaration", + "src": "478:41:1" + }, + { + "attributes": { + "constant": false, + "name": "investorsLength", + "scope": 373, + "stateVariable": true, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 85, + "name": "ElementaryTypeName", + "src": "525:7:1" + } + ], + "id": 86, + "name": "VariableDeclaration", + "src": "525:30:1" + }, + { + "attributes": { + "constant": false, + "name": "vault", + "scope": 373, + "stateVariable": true, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 87, + "name": "ElementaryTypeName", + "src": "561:7:1" + } + ], + "id": 88, + "name": "VariableDeclaration", + "src": "561:20:1" + }, + { + "attributes": { + "constant": false, + "implemented": true, + "isConstructor": false, + "modifiers": [ + null + ], + "name": "", + "payable": true, + "scope": 373, + "stateMutability": "payable", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 89, + "name": "ParameterList", + "src": "601:2:1" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 90, + "name": "ParameterList", + "src": "619:0:1" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "arguments": [ + null + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + null + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 225, + "type": "function ()", + "value": "buy" + }, + "id": 91, + "name": "Identifier", + "src": "629:3:1" + } + ], + "id": 92, + "name": "FunctionCall", + "src": "629:5:1" + } + ], + "id": 93, + "name": "ExpressionStatement", + "src": "629:5:1" + } + ], + "id": 94, + "name": "Block", + "src": "619:22:1" + } + ], + "id": 95, + "name": "FunctionDefinition", + "src": "592:49:1" + }, + { + "attributes": { + "constant": false, + "implemented": true, + "isConstructor": true, + "modifiers": [ + null + ], + "name": "Presale", + "payable": false, + "scope": 373, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 96, + "name": "ParameterList", + "src": "667:2:1" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 97, + "name": "ParameterList", + "src": "677:0:1" + }, + { + "attributes": { + "statements": [ + null + ] + }, + "children": [], + "id": 98, + "name": "Block", + "src": "677:7:1" + } + ], + "id": 99, + "name": "FunctionDefinition", + "src": "651:33:1" + }, + { + "attributes": { + "constant": false, + "implemented": true, + "isConstructor": false, + "name": "initialize", + "payable": false, + "scope": 373, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "_startTime", + "scope": 162, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 100, + "name": "ElementaryTypeName", + "src": "714:7:1" + } + ], + "id": 101, + "name": "VariableDeclaration", + "src": "714:18:1" + }, + { + "attributes": { + "constant": false, + "name": "_endTime", + "scope": 162, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 102, + "name": "ElementaryTypeName", + "src": "734:7:1" + } + ], + "id": 103, + "name": "VariableDeclaration", + "src": "734:16:1" + }, + { + "attributes": { + "constant": false, + "name": "_cap", + "scope": 162, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 104, + "name": "ElementaryTypeName", + "src": "752:7:1" + } + ], + "id": 105, + "name": "VariableDeclaration", + "src": "752:12:1" + }, + { + "attributes": { + "constant": false, + "name": "_vault", + "scope": 162, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 106, + "name": "ElementaryTypeName", + "src": "766:7:1" + } + ], + "id": 107, + "name": "VariableDeclaration", + "src": "766:14:1" + } + ], + "id": 108, + "name": "ParameterList", + "src": "713:68:1" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 111, + "name": "ParameterList", + "src": "799:0:1" + }, + { + "attributes": { + "arguments": [ + null + ] + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 498, + "type": "modifier ()", + "value": "onlyOwner" + }, + "id": 109, + "name": "Identifier", + "src": "789:9:1" + } + ], + "id": 110, + "name": "ModifierInvocation", + "src": "789:9:1" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 645, + "type": "function (bool) pure", + "value": "require" + }, + "id": 112, + "name": "Identifier", + "src": "809:7:1" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!", + "prefix": true, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 74, + "type": "bool", + "value": "isInitialized" + }, + "id": 113, + "name": "Identifier", + "src": "818:13:1" + } + ], + "id": 114, + "name": "UnaryOperation", + "src": "817:14:1" + } + ], + "id": 115, + "name": "FunctionCall", + "src": "809:23:1" + } + ], + "id": 116, + "name": "ExpressionStatement", + "src": "809:23:1" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 645, + "type": "function (bool) pure", + "value": "require" + }, + "id": 117, + "name": "Identifier", + "src": "842:7:1" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 101, + "type": "uint256", + "value": "_startTime" + }, + "id": 118, + "name": "Identifier", + "src": "850:10:1" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 119, + "name": "Literal", + "src": "864:1:1" + } + ], + "id": 120, + "name": "BinaryOperation", + "src": "850:15:1" + } + ], + "id": 121, + "name": "FunctionCall", + "src": "842:24:1" + } + ], + "id": 122, + "name": "ExpressionStatement", + "src": "842:24:1" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 645, + "type": "function (bool) pure", + "value": "require" + }, + "id": 123, + "name": "Identifier", + "src": "876:7:1" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 103, + "type": "uint256", + "value": "_endTime" + }, + "id": 124, + "name": "Identifier", + "src": "884:8:1" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 125, + "name": "Literal", + "src": "896:1:1" + } + ], + "id": 126, + "name": "BinaryOperation", + "src": "884:13:1" + } + ], + "id": 127, + "name": "FunctionCall", + "src": "876:22:1" + } + ], + "id": 128, + "name": "ExpressionStatement", + "src": "876:22:1" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 645, + "type": "function (bool) pure", + "value": "require" + }, + "id": 129, + "name": "Identifier", + "src": "908:7:1" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 105, + "type": "uint256", + "value": "_cap" + }, + "id": 130, + "name": "Identifier", + "src": "916:4:1" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 131, + "name": "Literal", + "src": "924:1:1" + } + ], + "id": 132, + "name": "BinaryOperation", + "src": "916:9:1" + } + ], + "id": 133, + "name": "FunctionCall", + "src": "908:18:1" + } + ], + "id": 134, + "name": "ExpressionStatement", + "src": "908:18:1" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 645, + "type": "function (bool) pure", + "value": "require" + }, + "id": 135, + "name": "Identifier", + "src": "936:7:1" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 107, + "type": "address", + "value": "_vault" + }, + "id": 136, + "name": "Identifier", + "src": "944:6:1" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "307830", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0x0" + }, + "id": 137, + "name": "Literal", + "src": "954:3:1" + } + ], + "id": 138, + "name": "BinaryOperation", + "src": "944:13:1" + } + ], + "id": 139, + "name": "FunctionCall", + "src": "936:22:1" + } + ], + "id": 140, + "name": "ExpressionStatement", + "src": "936:22:1" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 65, + "type": "uint256", + "value": "startTime" + }, + "id": 141, + "name": "Identifier", + "src": "968:9:1" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 101, + "type": "uint256", + "value": "_startTime" + }, + "id": 142, + "name": "Identifier", + "src": "980:10:1" + } + ], + "id": 143, + "name": "Assignment", + "src": "968:22:1" + } + ], + "id": 144, + "name": "ExpressionStatement", + "src": "968:22:1" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 67, + "type": "uint256", + "value": "endTime" + }, + "id": 145, + "name": "Identifier", + "src": "1000:7:1" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 103, + "type": "uint256", + "value": "_endTime" + }, + "id": 146, + "name": "Identifier", + "src": "1010:8:1" + } + ], + "id": 147, + "name": "Assignment", + "src": "1000:18:1" + } + ], + "id": 148, + "name": "ExpressionStatement", + "src": "1000:18:1" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 69, + "type": "uint256", + "value": "cap" + }, + "id": 149, + "name": "Identifier", + "src": "1028:3:1" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 105, + "type": "uint256", + "value": "_cap" + }, + "id": 150, + "name": "Identifier", + "src": "1034:4:1" + } + ], + "id": 151, + "name": "Assignment", + "src": "1028:10:1" + } + ], + "id": 152, + "name": "ExpressionStatement", + "src": "1028:10:1" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 74, + "type": "bool", + "value": "isInitialized" + }, + "id": 153, + "name": "Identifier", + "src": "1048:13:1" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "74727565", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "bool", + "type": "bool", + "value": "true" + }, + "id": 154, + "name": "Literal", + "src": "1064:4:1" + } + ], + "id": 155, + "name": "Assignment", + "src": "1048:20:1" + } + ], + "id": 156, + "name": "ExpressionStatement", + "src": "1048:20:1" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 88, + "type": "address", + "value": "vault" + }, + "id": 157, + "name": "Identifier", + "src": "1078:5:1" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 107, + "type": "address", + "value": "_vault" + }, + "id": 158, + "name": "Identifier", + "src": "1086:6:1" + } + ], + "id": 159, + "name": "Assignment", + "src": "1078:14:1" + } + ], + "id": 160, + "name": "ExpressionStatement", + "src": "1078:14:1" + } + ], + "id": 161, + "name": "Block", + "src": "799:300:1" + } + ], + "id": 162, + "name": "FunctionDefinition", + "src": "694:405:1" + }, + { + "attributes": { + "constant": false, + "implemented": true, + "isConstructor": false, + "modifiers": [ + null + ], + "name": "buy", + "payable": true, + "scope": 373, + "stateMutability": "payable", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 163, + "name": "ParameterList", + "src": "1121:2:1" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 164, + "name": "ParameterList", + "src": "1139:0:1" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 645, + "type": "function (bool) pure", + "value": "require" + }, + "id": 165, + "name": "Identifier", + "src": "1149:7:1" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 84, + "type": "mapping(address => bool)", + "value": "whitelist" + }, + "id": 166, + "name": "Identifier", + "src": "1157:9:1" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 642, + "type": "msg", + "value": "msg" + }, + "id": 167, + "name": "Identifier", + "src": "1167:3:1" + } + ], + "id": 168, + "name": "MemberAccess", + "src": "1167:10:1" + } + ], + "id": 169, + "name": "IndexAccess", + "src": "1157:21:1" + } + ], + "id": 170, + "name": "FunctionCall", + "src": "1149:30:1" + } + ], + "id": 171, + "name": "ExpressionStatement", + "src": "1149:30:1" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 645, + "type": "function (bool) pure", + "value": "require" + }, + "id": 172, + "name": "Identifier", + "src": "1189:7:1" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": ">", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "value", + "referencedDeclaration": null, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 642, + "type": "msg", + "value": "msg" + }, + "id": 173, + "name": "Identifier", + "src": "1197:3:1" + } + ], + "id": 174, + "name": "MemberAccess", + "src": "1197:9:1" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 175, + "name": "Literal", + "src": "1209:1:1" + } + ], + "id": 176, + "name": "BinaryOperation", + "src": "1197:13:1" + } + ], + "id": 177, + "name": "FunctionCall", + "src": "1189:22:1" + } + ], + "id": 178, + "name": "ExpressionStatement", + "src": "1189:22:1" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 645, + "type": "function (bool) pure", + "value": "require" + }, + "id": 179, + "name": "Identifier", + "src": "1221:7:1" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 74, + "type": "bool", + "value": "isInitialized" + }, + "id": 180, + "name": "Identifier", + "src": "1229:13:1" + } + ], + "id": 181, + "name": "FunctionCall", + "src": "1221:22:1" + } + ], + "id": 182, + "name": "ExpressionStatement", + "src": "1221:22:1" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 645, + "type": "function (bool) pure", + "value": "require" + }, + "id": 183, + "name": "Identifier", + "src": "1253:7:1" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "&&", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": ">=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 644, + "type": "uint256", + "value": "now" + }, + "id": 184, + "name": "Identifier", + "src": "1261:3:1" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 65, + "type": "uint256", + "value": "startTime" + }, + "id": 185, + "name": "Identifier", + "src": "1268:9:1" + } + ], + "id": 186, + "name": "BinaryOperation", + "src": "1261:16:1" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "<=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 644, + "type": "uint256", + "value": "now" + }, + "id": 187, + "name": "Identifier", + "src": "1281:3:1" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 67, + "type": "uint256", + "value": "endTime" + }, + "id": 188, + "name": "Identifier", + "src": "1288:7:1" + } + ], + "id": 189, + "name": "BinaryOperation", + "src": "1281:14:1" + } + ], + "id": 190, + "name": "BinaryOperation", + "src": "1261:34:1" + } + ], + "id": 191, + "name": "FunctionCall", + "src": "1253:43:1" + } + ], + "id": 192, + "name": "ExpressionStatement", + "src": "1253:43:1" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 645, + "type": "function (bool) pure", + "value": "require" + }, + "id": 193, + "name": "Identifier", + "src": "1306:7:1" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "<=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "+", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 76, + "type": "uint256", + "value": "totalInvestedInWei" + }, + "id": 194, + "name": "Identifier", + "src": "1314:18:1" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "value", + "referencedDeclaration": null, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 642, + "type": "msg", + "value": "msg" + }, + "id": 195, + "name": "Identifier", + "src": "1335:3:1" + } + ], + "id": 196, + "name": "MemberAccess", + "src": "1335:9:1" + } + ], + "id": 197, + "name": "BinaryOperation", + "src": "1314:30:1" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 69, + "type": "uint256", + "value": "cap" + }, + "id": 198, + "name": "Identifier", + "src": "1348:3:1" + } + ], + "id": 199, + "name": "BinaryOperation", + "src": "1314:37:1" + } + ], + "id": 200, + "name": "FunctionCall", + "src": "1306:46:1" + } + ], + "id": 201, + "name": "ExpressionStatement", + "src": "1306:46:1" + }, + { + "attributes": { + "assignments": [ + 203 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "investor", + "scope": 225, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 202, + "name": "ElementaryTypeName", + "src": "1362:7:1" + } + ], + "id": 203, + "name": "VariableDeclaration", + "src": "1362:16:1" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 642, + "type": "msg", + "value": "msg" + }, + "id": 204, + "name": "Identifier", + "src": "1381:3:1" + } + ], + "id": 205, + "name": "MemberAccess", + "src": "1381:10:1" + } + ], + "id": 206, + "name": "VariableDeclarationStatement", + "src": "1362:29:1" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "+=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 80, + "type": "mapping(address => uint256)", + "value": "investorBalances" + }, + "id": 207, + "name": "Identifier", + "src": "1401:16:1" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 203, + "type": "address", + "value": "investor" + }, + "id": 208, + "name": "Identifier", + "src": "1418:8:1" + } + ], + "id": 209, + "name": "IndexAccess", + "src": "1401:26:1" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "value", + "referencedDeclaration": null, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 642, + "type": "msg", + "value": "msg" + }, + "id": 210, + "name": "Identifier", + "src": "1431:3:1" + } + ], + "id": 211, + "name": "MemberAccess", + "src": "1431:9:1" + } + ], + "id": 212, + "name": "Assignment", + "src": "1401:39:1" + } + ], + "id": 213, + "name": "ExpressionStatement", + "src": "1401:39:1" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "+=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 76, + "type": "uint256", + "value": "totalInvestedInWei" + }, + "id": 214, + "name": "Identifier", + "src": "1450:18:1" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "value", + "referencedDeclaration": null, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 642, + "type": "msg", + "value": "msg" + }, + "id": 215, + "name": "Identifier", + "src": "1472:3:1" + } + ], + "id": 216, + "name": "MemberAccess", + "src": "1472:9:1" + } + ], + "id": 217, + "name": "Assignment", + "src": "1450:31:1" + } + ], + "id": 218, + "name": "ExpressionStatement", + "src": "1450:31:1" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 237, + "type": "function (uint256)", + "value": "forwardFunds" + }, + "id": 219, + "name": "Identifier", + "src": "1491:12:1" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "value", + "referencedDeclaration": null, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 642, + "type": "msg", + "value": "msg" + }, + "id": 220, + "name": "Identifier", + "src": "1504:3:1" + } + ], + "id": 221, + "name": "MemberAccess", + "src": "1504:9:1" + } + ], + "id": 222, + "name": "FunctionCall", + "src": "1491:23:1" + } + ], + "id": 223, + "name": "ExpressionStatement", + "src": "1491:23:1" + } + ], + "id": 224, + "name": "Block", + "src": "1139:382:1" + } + ], + "id": 225, + "name": "FunctionDefinition", + "src": "1109:412:1" + }, + { + "attributes": { + "constant": false, + "implemented": true, + "isConstructor": false, + "modifiers": [ + null + ], + "name": "forwardFunds", + "payable": false, + "scope": 373, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "_amount", + "scope": 237, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 226, + "name": "ElementaryTypeName", + "src": "1558:7:1" + } + ], + "id": 227, + "name": "VariableDeclaration", + "src": "1558:15:1" + } + ], + "id": 228, + "name": "ParameterList", + "src": "1557:17:1" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 229, + "name": "ParameterList", + "src": "1584:0:1" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "transfer", + "referencedDeclaration": null, + "type": "function (uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 472, + "type": "address", + "value": "owner" + }, + "id": 230, + "name": "Identifier", + "src": "1594:5:1" + } + ], + "id": 232, + "name": "MemberAccess", + "src": "1594:14:1" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 227, + "type": "uint256", + "value": "_amount" + }, + "id": 233, + "name": "Identifier", + "src": "1609:7:1" + } + ], + "id": 234, + "name": "FunctionCall", + "src": "1594:23:1" + } + ], + "id": 235, + "name": "ExpressionStatement", + "src": "1594:23:1" + } + ], + "id": 236, + "name": "Block", + "src": "1584:40:1" + } + ], + "id": 237, + "name": "FunctionDefinition", + "src": "1536:88:1" + }, + { + "attributes": { + "constant": false, + "implemented": true, + "isConstructor": false, + "name": "claimTokens", + "payable": false, + "scope": 373, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "_token", + "scope": 278, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 238, + "name": "ElementaryTypeName", + "src": "1655:7:1" + } + ], + "id": 239, + "name": "VariableDeclaration", + "src": "1655:14:1" + } + ], + "id": 240, + "name": "ParameterList", + "src": "1654:16:1" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 243, + "name": "ParameterList", + "src": "1688:0:1" + }, + { + "attributes": { + "arguments": [ + null + ] + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 498, + "type": "modifier ()", + "value": "onlyOwner" + }, + "id": 241, + "name": "Identifier", + "src": "1678:9:1" + } + ], + "id": 242, + "name": "ModifierInvocation", + "src": "1678:9:1" + }, + { + "children": [ + { + "attributes": { + "falseBody": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "==", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 239, + "type": "address", + "value": "_token" + }, + "id": 244, + "name": "Identifier", + "src": "1702:6:1" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "307830", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0x0" + }, + "id": 245, + "name": "Literal", + "src": "1712:3:1" + } + ], + "id": 246, + "name": "BinaryOperation", + "src": "1702:13:1" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "transfer", + "referencedDeclaration": null, + "type": "function (uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 472, + "type": "address", + "value": "owner" + }, + "id": 247, + "name": "Identifier", + "src": "1731:5:1" + } + ], + "id": 249, + "name": "MemberAccess", + "src": "1731:14:1" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "balance", + "referencedDeclaration": null, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 663, + "type": "contract Presale", + "value": "this" + }, + "id": 250, + "name": "Identifier", + "src": "1746:4:1" + } + ], + "id": 251, + "name": "MemberAccess", + "src": "1746:12:1" + } + ], + "id": 252, + "name": "FunctionCall", + "src": "1731:28:1" + } + ], + "id": 253, + "name": "ExpressionStatement", + "src": "1731:28:1" + }, + { + "attributes": { + "expression": null, + "functionReturnParameters": 243 + }, + "id": 254, + "name": "Return", + "src": "1773:7:1" + } + ], + "id": 255, + "name": "Block", + "src": "1717:73:1" + } + ], + "id": 256, + "name": "IfStatement", + "src": "1698:92:1" + }, + { + "attributes": { + "assignments": [ + 258 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "token", + "scope": 278, + "stateVariable": false, + "storageLocation": "default", + "type": "contract BasicToken", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "BasicToken", + "referencedDeclaration": 601, + "type": "contract BasicToken" + }, + "id": 257, + "name": "UserDefinedTypeName", + "src": "1804:10:1" + } + ], + "id": 258, + "name": "VariableDeclaration", + "src": "1804:16:1" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "contract BasicToken", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 601, + "type": "type(contract BasicToken)", + "value": "BasicToken" + }, + "id": 259, + "name": "Identifier", + "src": "1823:10:1" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 239, + "type": "address", + "value": "_token" + }, + "id": 260, + "name": "Identifier", + "src": "1834:6:1" + } + ], + "id": 261, + "name": "FunctionCall", + "src": "1823:18:1" + } + ], + "id": 262, + "name": "VariableDeclarationStatement", + "src": "1804:37:1" + }, + { + "attributes": { + "assignments": [ + 264 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "balance", + "scope": 278, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 263, + "name": "ElementaryTypeName", + "src": "1851:7:1" + } + ], + "id": 264, + "name": "VariableDeclaration", + "src": "1851:15:1" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Presale_$373", + "typeString": "contract Presale" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "balanceOf", + "referencedDeclaration": 600, + "type": "function (address) view external returns (uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 258, + "type": "contract BasicToken", + "value": "token" + }, + "id": 265, + "name": "Identifier", + "src": "1869:5:1" + } + ], + "id": 266, + "name": "MemberAccess", + "src": "1869:15:1" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 663, + "type": "contract Presale", + "value": "this" + }, + "id": 267, + "name": "Identifier", + "src": "1885:4:1" + } + ], + "id": 268, + "name": "FunctionCall", + "src": "1869:21:1" + } + ], + "id": 269, + "name": "VariableDeclarationStatement", + "src": "1851:39:1" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "bool", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "transfer", + "referencedDeclaration": 588, + "type": "function (address,uint256) external returns (bool)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 258, + "type": "contract BasicToken", + "value": "token" + }, + "id": 270, + "name": "Identifier", + "src": "1900:5:1" + } + ], + "id": 272, + "name": "MemberAccess", + "src": "1900:14:1" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 472, + "type": "address", + "value": "owner" + }, + "id": 273, + "name": "Identifier", + "src": "1915:5:1" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 264, + "type": "uint256", + "value": "balance" + }, + "id": 274, + "name": "Identifier", + "src": "1922:7:1" + } + ], + "id": 275, + "name": "FunctionCall", + "src": "1900:30:1" + } + ], + "id": 276, + "name": "ExpressionStatement", + "src": "1900:30:1" + } + ], + "id": 277, + "name": "Block", + "src": "1688:249:1" + } + ], + "id": 278, + "name": "FunctionDefinition", + "src": "1634:303:1" + }, + { + "attributes": { + "constant": false, + "implemented": true, + "isConstructor": false, + "name": "whitelistInvestor", + "payable": false, + "scope": 373, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "_newInvestor", + "scope": 301, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 279, + "name": "ElementaryTypeName", + "src": "1970:7:1" + } + ], + "id": 280, + "name": "VariableDeclaration", + "src": "1970:20:1" + } + ], + "id": 281, + "name": "ParameterList", + "src": "1969:22:1" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 284, + "name": "ParameterList", + "src": "2009:0:1" + }, + { + "attributes": { + "arguments": [ + null + ] + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 498, + "type": "modifier ()", + "value": "onlyOwner" + }, + "id": 282, + "name": "Identifier", + "src": "1999:9:1" + } + ], + "id": 283, + "name": "ModifierInvocation", + "src": "1999:9:1" + }, + { + "children": [ + { + "attributes": { + "falseBody": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!", + "prefix": true, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 84, + "type": "mapping(address => bool)", + "value": "whitelist" + }, + "id": 285, + "name": "Identifier", + "src": "2023:9:1" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 280, + "type": "address", + "value": "_newInvestor" + }, + "id": 286, + "name": "Identifier", + "src": "2033:12:1" + } + ], + "id": 287, + "name": "IndexAccess", + "src": "2023:23:1" + } + ], + "id": 288, + "name": "UnaryOperation", + "src": "2022:24:1" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 84, + "type": "mapping(address => bool)", + "value": "whitelist" + }, + "id": 289, + "name": "Identifier", + "src": "2062:9:1" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 280, + "type": "address", + "value": "_newInvestor" + }, + "id": 290, + "name": "Identifier", + "src": "2072:12:1" + } + ], + "id": 291, + "name": "IndexAccess", + "src": "2062:23:1" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "74727565", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "bool", + "type": "bool", + "value": "true" + }, + "id": 292, + "name": "Literal", + "src": "2088:4:1" + } + ], + "id": 293, + "name": "Assignment", + "src": "2062:30:1" + } + ], + "id": 294, + "name": "ExpressionStatement", + "src": "2062:30:1" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "++", + "prefix": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 86, + "type": "uint256", + "value": "investorsLength" + }, + "id": 295, + "name": "Identifier", + "src": "2106:15:1" + } + ], + "id": 296, + "name": "UnaryOperation", + "src": "2106:17:1" + } + ], + "id": 297, + "name": "ExpressionStatement", + "src": "2106:17:1" + } + ], + "id": 298, + "name": "Block", + "src": "2048:86:1" + } + ], + "id": 299, + "name": "IfStatement", + "src": "2019:115:1" + } + ], + "id": 300, + "name": "Block", + "src": "2009:131:1" + } + ], + "id": 301, + "name": "FunctionDefinition", + "src": "1943:197:1" + }, + { + "attributes": { + "constant": false, + "implemented": true, + "isConstructor": false, + "name": "whitelistInvestors", + "payable": false, + "scope": 373, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "_investors", + "scope": 351, + "stateVariable": false, + "storageLocation": "default", + "type": "address[] memory", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "length": null, + "type": "address[] storage pointer" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 302, + "name": "ElementaryTypeName", + "src": "2173:7:1" + } + ], + "id": 303, + "name": "ArrayTypeName", + "src": "2173:9:1" + } + ], + "id": 304, + "name": "VariableDeclaration", + "src": "2173:20:1" + } + ], + "id": 305, + "name": "ParameterList", + "src": "2172:22:1" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 308, + "name": "ParameterList", + "src": "2212:0:1" + }, + { + "attributes": { + "arguments": [ + null + ] + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 498, + "type": "modifier ()", + "value": "onlyOwner" + }, + "id": 306, + "name": "Identifier", + "src": "2202:9:1" + } + ], + "id": 307, + "name": "ModifierInvocation", + "src": "2202:9:1" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 645, + "type": "function (bool) pure", + "value": "require" + }, + "id": 309, + "name": "Identifier", + "src": "2222:7:1" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "<=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "length", + "referencedDeclaration": null, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 304, + "type": "address[] memory", + "value": "_investors" + }, + "id": 310, + "name": "Identifier", + "src": "2230:10:1" + } + ], + "id": 311, + "name": "MemberAccess", + "src": "2230:17:1" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "323530", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 250", + "value": "250" + }, + "id": 312, + "name": "Literal", + "src": "2251:3:1" + } + ], + "id": 313, + "name": "BinaryOperation", + "src": "2230:24:1" + } + ], + "id": 314, + "name": "FunctionCall", + "src": "2222:33:1" + } + ], + "id": 315, + "name": "ExpressionStatement", + "src": "2222:33:1" + }, + { + "children": [ + { + "attributes": { + "assignments": [ + 317 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "i", + "scope": 351, + "stateVariable": false, + "storageLocation": "default", + "type": "uint8", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint8", + "type": "uint8" + }, + "id": 316, + "name": "ElementaryTypeName", + "src": "2269:5:1" + } + ], + "id": 317, + "name": "VariableDeclaration", + "src": "2269:7:1" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 318, + "name": "Literal", + "src": "2277:1:1" + } + ], + "id": 319, + "name": "VariableDeclarationStatement", + "src": "2269:9:1" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "<", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 317, + "type": "uint8", + "value": "i" + }, + "id": 320, + "name": "Identifier", + "src": "2280:1:1" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "length", + "referencedDeclaration": null, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 304, + "type": "address[] memory", + "value": "_investors" + }, + "id": 321, + "name": "Identifier", + "src": "2282:10:1" + } + ], + "id": 322, + "name": "MemberAccess", + "src": "2282:17:1" + } + ], + "id": 323, + "name": "BinaryOperation", + "src": "2280:19:1" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "++", + "prefix": false, + "type": "uint8" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 317, + "type": "uint8", + "value": "i" + }, + "id": 324, + "name": "Identifier", + "src": "2300:1:1" + } + ], + "id": 325, + "name": "UnaryOperation", + "src": "2300:3:1" + } + ], + "id": 326, + "name": "ExpressionStatement", + "src": "2300:3:1" + }, + { + "children": [ + { + "attributes": { + "assignments": [ + 328 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "newInvestor", + "scope": 351, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 327, + "name": "ElementaryTypeName", + "src": "2319:7:1" + } + ], + "id": 328, + "name": "VariableDeclaration", + "src": "2319:19:1" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 304, + "type": "address[] memory", + "value": "_investors" + }, + "id": 329, + "name": "Identifier", + "src": "2341:10:1" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 317, + "type": "uint8", + "value": "i" + }, + "id": 330, + "name": "Identifier", + "src": "2352:1:1" + } + ], + "id": 331, + "name": "IndexAccess", + "src": "2341:13:1" + } + ], + "id": 332, + "name": "VariableDeclarationStatement", + "src": "2319:35:1" + }, + { + "attributes": { + "falseBody": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!", + "prefix": true, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 84, + "type": "mapping(address => bool)", + "value": "whitelist" + }, + "id": 333, + "name": "Identifier", + "src": "2372:9:1" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 328, + "type": "address", + "value": "newInvestor" + }, + "id": 334, + "name": "Identifier", + "src": "2382:11:1" + } + ], + "id": 335, + "name": "IndexAccess", + "src": "2372:22:1" + } + ], + "id": 336, + "name": "UnaryOperation", + "src": "2371:23:1" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 84, + "type": "mapping(address => bool)", + "value": "whitelist" + }, + "id": 337, + "name": "Identifier", + "src": "2414:9:1" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 328, + "type": "address", + "value": "newInvestor" + }, + "id": 338, + "name": "Identifier", + "src": "2424:11:1" + } + ], + "id": 339, + "name": "IndexAccess", + "src": "2414:22:1" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "74727565", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "bool", + "type": "bool", + "value": "true" + }, + "id": 340, + "name": "Literal", + "src": "2439:4:1" + } + ], + "id": 341, + "name": "Assignment", + "src": "2414:29:1" + } + ], + "id": 342, + "name": "ExpressionStatement", + "src": "2414:29:1" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "++", + "prefix": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 86, + "type": "uint256", + "value": "investorsLength" + }, + "id": 343, + "name": "Identifier", + "src": "2461:15:1" + } + ], + "id": 344, + "name": "UnaryOperation", + "src": "2461:17:1" + } + ], + "id": 345, + "name": "ExpressionStatement", + "src": "2461:17:1" + } + ], + "id": 346, + "name": "Block", + "src": "2396:97:1" + } + ], + "id": 347, + "name": "IfStatement", + "src": "2368:125:1" + } + ], + "id": 348, + "name": "Block", + "src": "2305:198:1" + } + ], + "id": 349, + "name": "ForStatement", + "src": "2265:238:1" + } + ], + "id": 350, + "name": "Block", + "src": "2212:297:1" + } + ], + "id": 351, + "name": "FunctionDefinition", + "src": "2145:364:1" + }, + { + "attributes": { + "constant": false, + "implemented": true, + "isConstructor": false, + "name": "blacklistInvestor", + "payable": false, + "scope": 373, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "_investor", + "scope": 372, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 352, + "name": "ElementaryTypeName", + "src": "2541:7:1" + } + ], + "id": 353, + "name": "VariableDeclaration", + "src": "2541:17:1" + } + ], + "id": 354, + "name": "ParameterList", + "src": "2540:19:1" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 357, + "name": "ParameterList", + "src": "2577:0:1" + }, + { + "attributes": { + "arguments": [ + null + ] + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 498, + "type": "modifier ()", + "value": "onlyOwner" + }, + "id": 355, + "name": "Identifier", + "src": "2567:9:1" + } + ], + "id": 356, + "name": "ModifierInvocation", + "src": "2567:9:1" + }, + { + "children": [ + { + "attributes": { + "falseBody": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 84, + "type": "mapping(address => bool)", + "value": "whitelist" + }, + "id": 358, + "name": "Identifier", + "src": "2590:9:1" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 353, + "type": "address", + "value": "_investor" + }, + "id": 359, + "name": "Identifier", + "src": "2600:9:1" + } + ], + "id": 360, + "name": "IndexAccess", + "src": "2590:20:1" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "delete", + "prefix": true, + "type": "tuple()" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 84, + "type": "mapping(address => bool)", + "value": "whitelist" + }, + "id": 361, + "name": "Identifier", + "src": "2633:9:1" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 353, + "type": "address", + "value": "_investor" + }, + "id": 362, + "name": "Identifier", + "src": "2643:9:1" + } + ], + "id": 363, + "name": "IndexAccess", + "src": "2633:20:1" + } + ], + "id": 364, + "name": "UnaryOperation", + "src": "2626:27:1" + } + ], + "id": 365, + "name": "ExpressionStatement", + "src": "2626:27:1" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "--", + "prefix": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 86, + "type": "uint256", + "value": "investorsLength" + }, + "id": 366, + "name": "Identifier", + "src": "2667:15:1" + } + ], + "id": 367, + "name": "UnaryOperation", + "src": "2667:17:1" + } + ], + "id": 368, + "name": "ExpressionStatement", + "src": "2667:17:1" + } + ], + "id": 369, + "name": "Block", + "src": "2612:83:1" + } + ], + "id": 370, + "name": "IfStatement", + "src": "2587:108:1" + } + ], + "id": 371, + "name": "Block", + "src": "2577:124:1" + } + ], + "id": 372, + "name": "FunctionDefinition", + "src": "2514:187:1" + } + ], + "id": 373, + "name": "ContractDefinition", + "src": "202:2501:1" + } + ], + "id": 374, + "name": "SourceUnit", + "src": "0:2703:1" + }, + "compiler": { + "name": "solc", + "version": "0.4.18+commit.9cf6e910.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "1.0.1", + "updatedAt": "2017-11-10T01:08:29.866Z" +} \ No newline at end of file diff --git a/build/contracts/PresaleOracles.json b/build/contracts/PresaleOracles.json new file mode 100644 index 0000000..f0768f7 --- /dev/null +++ b/build/contracts/PresaleOracles.json @@ -0,0 +1,5027 @@ +{ + "contractName": "PresaleOracles", + "abi": [ + { + "constant": false, + "inputs": [ + { + "name": "_startTime", + "type": "uint256" + }, + { + "name": "_endTime", + "type": "uint256" + }, + { + "name": "_cap", + "type": "uint256" + }, + { + "name": "_vault", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "rate", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "endTime", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "cap", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "isInitialized", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "Presale", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_investors", + "type": "address[]" + } + ], + "name": "whitelistInvestors", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "investorsLength", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "startTime", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "owner", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "address" + } + ], + "name": "whitelist", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "buy", + "outputs": [], + "payable": true, + "stateMutability": "payable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "address" + } + ], + "name": "investorBalances", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_newInvestor", + "type": "address" + } + ], + "name": "whitelistInvestor", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_token", + "type": "address" + } + ], + "name": "claimTokens", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "totalInvestedInWei", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "vault", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_investor", + "type": "address" + } + ], + "name": "blacklistInvestor", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "payable": true, + "stateMutability": "payable", + "type": "fallback" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + } + ], + "bytecode": "0x60606040526000600560006101000a81548160ff021916908315150217905550336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061109b8061006e6000396000f300606060405260043610610107576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680631f8d519d146101115780632c4e722e146101655780633197cbb61461018e578063355274ea146101b7578063392e53cd146101e05780635036d6101461020d5780635613680a14610222578063594337a91461025057806378e97925146102795780638da5cb5b146102a25780639b19251a146102f7578063a6f2ae3a14610348578063b29a61c114610352578063c430bcda1461039f578063df8de3e7146103d8578063f117c92414610411578063f2fde38b1461043a578063fbfa77cf14610473578063ffc1b038146104c8575b61010f610501565b005b341561011c57600080fd5b610163600480803590602001909190803590602001909190803590602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610633565b005b341561017057600080fd5b610178610785565b6040518082815260200191505060405180910390f35b341561019957600080fd5b6101a161078b565b6040518082815260200191505060405180910390f35b34156101c257600080fd5b6101ca610791565b6040518082815260200191505060405180910390f35b34156101eb57600080fd5b6101f3610797565b604051808215151515815260200191505060405180910390f35b341561021857600080fd5b6102206107aa565b005b341561022d57600080fd5b61024e600480803590602001908201803590602001919091929050506107ac565b005b341561025b57600080fd5b610263610931565b6040518082815260200191505060405180910390f35b341561028457600080fd5b61028c610937565b6040518082815260200191505060405180910390f35b34156102ad57600080fd5b6102b561093d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561030257600080fd5b61032e600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610962565b604051808215151515815260200191505060405180910390f35b610350610501565b005b341561035d57600080fd5b610389600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610982565b6040518082815260200191505060405180910390f35b34156103aa57600080fd5b6103d6600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061099a565b005b34156103e357600080fd5b61040f600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610ab6565b005b341561041c57600080fd5b610424610d61565b6040518082815260200191505060405180910390f35b341561044557600080fd5b610471600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610d67565b005b341561047e57600080fd5b610486610ebc565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156104d357600080fd5b6104ff600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610ee2565b005b6000600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151561055b57600080fd5b60003411151561056a57600080fd5b600560009054906101000a900460ff16151561058557600080fd5b600154610590611002565b101580156105a757506002546105a4611002565b11155b15156105b257600080fd5b6003543460065401111515156105c757600080fd5b33905034600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550346006600082825401925050819055506106303461100a565b50565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561068e57600080fd5b600560009054906101000a900460ff161515156106aa57600080fd5b600084141515156106ba57600080fd5b600083141515156106ca57600080fd5b83831115156106d857600080fd5b600082141515156106e857600080fd5b60008173ffffffffffffffffffffffffffffffffffffffff161415151561070e57600080fd5b8360018190555082600281905550816003819055506001600560006101000a81548160ff02191690831515021790555080600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050565b60045481565b60025481565b60035481565b600560009054906101000a900460ff1681565b565b6000806000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561080a57600080fd5b60fa848490501115151561081d57600080fd5b600091505b838390508260ff16101561092b5783838360ff16818110151561084157fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff169050600860008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151561091e576001600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506009600081548092919060010191905055505b8180600101925050610822565b50505050565b60095481565b60015481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60086020528060005260406000206000915054906101000a900460ff1681565b60076020528060005260406000206000915090505481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156109f557600080fd5b600860008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515610ab3576001600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506009600081548092919060010191905055505b50565b6000806000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610b1457600080fd5b60008373ffffffffffffffffffffffffffffffffffffffff161415610bb0576000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc3073ffffffffffffffffffffffffffffffffffffffff16319081150290604051600060405180830381858888f193505050501515610bab57600080fd5b610d5c565b8291508173ffffffffffffffffffffffffffffffffffffffff166370a08231306000604051602001526040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b1515610c5657600080fd5b6102c65a03f11515610c6757600080fd5b5050506040518051905090508173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1515610d3f57600080fd5b6102c65a03f11515610d5057600080fd5b50505060405180519050505b505050565b60065481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610dc257600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515610dfe57600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610f3d57600080fd5b600860008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615610fff57600860008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81549060ff02191690556000600954141515610ffe57600960008154809291906001900391905055505b5b50565b600042905090565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050151561106c57600080fd5b505600a165627a7a7230582073d9da4a2102e1983e2851a9b281c01532e74e535c7e0864a331b97301f5f20c0029", + "deployedBytecode": "0x606060405260043610610107576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680631f8d519d146101115780632c4e722e146101655780633197cbb61461018e578063355274ea146101b7578063392e53cd146101e05780635036d6101461020d5780635613680a14610222578063594337a91461025057806378e97925146102795780638da5cb5b146102a25780639b19251a146102f7578063a6f2ae3a14610348578063b29a61c114610352578063c430bcda1461039f578063df8de3e7146103d8578063f117c92414610411578063f2fde38b1461043a578063fbfa77cf14610473578063ffc1b038146104c8575b61010f610501565b005b341561011c57600080fd5b610163600480803590602001909190803590602001909190803590602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610633565b005b341561017057600080fd5b610178610785565b6040518082815260200191505060405180910390f35b341561019957600080fd5b6101a161078b565b6040518082815260200191505060405180910390f35b34156101c257600080fd5b6101ca610791565b6040518082815260200191505060405180910390f35b34156101eb57600080fd5b6101f3610797565b604051808215151515815260200191505060405180910390f35b341561021857600080fd5b6102206107aa565b005b341561022d57600080fd5b61024e600480803590602001908201803590602001919091929050506107ac565b005b341561025b57600080fd5b610263610931565b6040518082815260200191505060405180910390f35b341561028457600080fd5b61028c610937565b6040518082815260200191505060405180910390f35b34156102ad57600080fd5b6102b561093d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561030257600080fd5b61032e600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610962565b604051808215151515815260200191505060405180910390f35b610350610501565b005b341561035d57600080fd5b610389600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610982565b6040518082815260200191505060405180910390f35b34156103aa57600080fd5b6103d6600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061099a565b005b34156103e357600080fd5b61040f600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610ab6565b005b341561041c57600080fd5b610424610d61565b6040518082815260200191505060405180910390f35b341561044557600080fd5b610471600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610d67565b005b341561047e57600080fd5b610486610ebc565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156104d357600080fd5b6104ff600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610ee2565b005b6000600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151561055b57600080fd5b60003411151561056a57600080fd5b600560009054906101000a900460ff16151561058557600080fd5b600154610590611002565b101580156105a757506002546105a4611002565b11155b15156105b257600080fd5b6003543460065401111515156105c757600080fd5b33905034600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550346006600082825401925050819055506106303461100a565b50565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561068e57600080fd5b600560009054906101000a900460ff161515156106aa57600080fd5b600084141515156106ba57600080fd5b600083141515156106ca57600080fd5b83831115156106d857600080fd5b600082141515156106e857600080fd5b60008173ffffffffffffffffffffffffffffffffffffffff161415151561070e57600080fd5b8360018190555082600281905550816003819055506001600560006101000a81548160ff02191690831515021790555080600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050565b60045481565b60025481565b60035481565b600560009054906101000a900460ff1681565b565b6000806000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561080a57600080fd5b60fa848490501115151561081d57600080fd5b600091505b838390508260ff16101561092b5783838360ff16818110151561084157fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff169050600860008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151561091e576001600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506009600081548092919060010191905055505b8180600101925050610822565b50505050565b60095481565b60015481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60086020528060005260406000206000915054906101000a900460ff1681565b60076020528060005260406000206000915090505481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156109f557600080fd5b600860008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515610ab3576001600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506009600081548092919060010191905055505b50565b6000806000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610b1457600080fd5b60008373ffffffffffffffffffffffffffffffffffffffff161415610bb0576000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc3073ffffffffffffffffffffffffffffffffffffffff16319081150290604051600060405180830381858888f193505050501515610bab57600080fd5b610d5c565b8291508173ffffffffffffffffffffffffffffffffffffffff166370a08231306000604051602001526040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b1515610c5657600080fd5b6102c65a03f11515610c6757600080fd5b5050506040518051905090508173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1515610d3f57600080fd5b6102c65a03f11515610d5057600080fd5b50505060405180519050505b505050565b60065481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610dc257600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515610dfe57600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610f3d57600080fd5b600860008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615610fff57600860008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81549060ff02191690556000600954141515610ffe57600960008154809291906001900391905055505b5b50565b600042905090565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050151561106c57600080fd5b505600a165627a7a7230582073d9da4a2102e1983e2851a9b281c01532e74e535c7e0864a331b97301f5f20c0029", + "sourceMap": "202:2818:0:-;;;378:5;350:33;;;;;;;;;;;;;;;;;;;;502:10:2;494:5;;:18;;;;;;;;;;;;;;;;;;202:2818:0;;;;;;", + "deployedSourceMap": "202:2818:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;660:5;:3;:5::i;:::-;202:2818;771:445;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;325:19;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;273:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;301:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;350:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;705;;;;;;;;;;;;;;2320:366;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;532:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;243:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;238:20:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;485:41:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1249:424;;;;;;428:51;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2118:197;;;;;;;;;;;;;;;;;;;;;;;;;;;;1809:303;;;;;;;;;;;;;;;;;;;;;;;;;;;;389:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;827:169:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;568:20:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2691:244;;;;;;;;;;;;;;;;;;;;;;;;;;;;1249:424;1514:16;1297:9;:21;1307:10;1297:21;;;;;;;;;;;;;;;;;;;;;;;;;1289:30;;;;;;;;1349:1;1337:9;:13;1329:22;;;;;;;;1369:13;;;;;;;;;;;1361:22;;;;;;;;1414:9;;1401;:7;:9::i;:::-;:22;;:46;;;;;1440:7;;1427:9;:7;:9::i;:::-;:20;;1401:46;1393:55;;;;;;;;1500:3;;1487:9;1466:18;;:30;:37;;1458:46;;;;;;;;1533:10;1514:29;;1583:9;1553:16;:26;1570:8;1553:26;;;;;;;;;;;;;;;;:39;;;;;;;;;;;1624:9;1602:18;;:31;;;;;;;;;;;1643:23;1656:9;1643:12;:23::i;:::-;1249:424;:::o;771:445::-;647:5:2;;;;;;;;;;;633:19;;:10;:19;;;625:28;;;;;;;;895:13:0;;;;;;;;;;;894:14;886:23;;;;;;;;941:1;927:10;:15;;919:24;;;;;;;;973:1;961:8;:13;;953:22;;;;;;;;1004:10;993:8;:21;985:30;;;;;;;;1041:1;1033:4;:9;;1025:18;;;;;;;;1071:3;1061:6;:13;;;;1053:22;;;;;;;;1097:10;1085:9;:22;;;;1127:8;1117:7;:18;;;;1151:4;1145:3;:10;;;;1181:4;1165:13;;:20;;;;;;;;;;;;;;;;;;1203:6;1195:5;;:14;;;;;;;;;;;;;;;;;;771:445;;;;:::o;325:19::-;;;;:::o;273:22::-;;;;:::o;301:18::-;;;;:::o;350:33::-;;;;;;;;;;;;;:::o;705:::-;:::o;2320:366::-;2446:7;2496:19;647:5:2;;;;;;;;;;;633:19;;:10;:19;;;625:28;;;;;;;;2428:3:0;2407:10;;:17;;:24;;2399:33;;;;;;;;2454:1;2446:9;;2442:238;2459:10;;:17;;2457:1;:19;;;2442:238;;;2518:10;;2529:1;2518:13;;;;;;;;;;;;;;;;;;;2496:35;;2549:9;:22;2559:11;2549:22;;;;;;;;;;;;;;;;;;;;;;;;;2548:23;2545:125;;;2616:4;2591:9;:22;2601:11;2591:22;;;;;;;;;;;;;;;;:29;;;;;;;;;;;;;;;;;;2638:15;;:17;;;;;;;;;;;;;2545:125;2477:3;;;;;;;2442:238;;;2320:366;;;;:::o;532:30::-;;;;:::o;243:24::-;;;;:::o;238:20:2:-;;;;;;;;;;;;;:::o;485:41:0:-;;;;;;;;;;;;;;;;;;;;;;:::o;428:51::-;;;;;;;;;;;;;;;;;:::o;2118:197::-;647:5:2;;;;;;;;;;;633:19;;:10;:19;;;625:28;;;;;;;;2198:9:0;:23;2208:12;2198:23;;;;;;;;;;;;;;;;;;;;;;;;;2197:24;2194:115;;;2263:4;2237:9;:23;2247:12;2237:23;;;;;;;;;;;;;;;;:30;;;;;;;;;;;;;;;;;;2281:15;;:17;;;;;;;;;;;;;2194:115;2118:197;:::o;1809:303::-;1979:16;2026:15;647:5:2;;;;;;;;;;;633:19;;:10;:19;;;625:28;;;;;;;;1887:3:0;1877:6;:13;;;1873:92;;;1906:5;;;;;;;;;;;:14;;:28;1921:4;:12;;;1906:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1948:7;;1873:92;2009:6;1979:37;;2044:5;:15;;;2060:4;2044:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2026:39;;2075:5;:14;;;2090:5;;;;;;;;;;;2097:7;2075:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;659:1:2;1809:303:0;;;:::o;389:33::-;;;;:::o;827:169:2:-;647:5;;;;;;;;;;;633:19;;:10;:19;;;625:28;;;;;;;;923:1;903:22;;:8;:22;;;;895:31;;;;;;;;960:8;932:37;;953:5;;;;;;;;;;;932:37;;;;;;;;;;;;983:8;975:5;;:16;;;;;;;;;;;;;;;;;;827:169;:::o;568:20:0:-;;;;;;;;;;;;;:::o;2691:244::-;647:5:2;;;;;;;;;;;633:19;;:10;:19;;;625:28;;;;;;;;2767:9:0;:20;2777:9;2767:20;;;;;;;;;;;;;;;;;;;;;;;;;2764:165;;;2810:9;:20;2820:9;2810:20;;;;;;;;;;;;;;;;2803:27;;;;;;;;;;;2866:1;2847:15;;:20;;2844:75;;;2887:15;;:17;;;;;;;;;;;;;;2844:75;2764:165;2691:244;:::o;2941:77::-;2982:7;3008:3;3001:10;;2941:77;:::o;1711:88::-;1769:5;;;;;;;;;;;:14;;:23;1784:7;1769:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1711:88;:::o", + "source": "import \"zeppelin-solidity/contracts/math/SafeMath.sol\";\nimport \"zeppelin-solidity/contracts/token/BasicToken.sol\";\nimport \"zeppelin-solidity/contracts/ownership/Ownable.sol\";\n\npragma solidity ^0.4.17;\n\ncontract PresaleOracles is Ownable {\n uint256 public startTime;\n uint256 public endTime;\n uint256 public cap;\n uint256 public rate;\n bool public isInitialized = false;\n uint256 public totalInvestedInWei;\n mapping(address => uint256) public investorBalances;\n mapping(address => bool) public whitelist;\n uint256 public investorsLength;\n address public vault;\n // TESTED by Roman Storm\n function () public payable {\n buy();\n }\n //TESTED by Roman Storm\n function Presale() public {\n }\n //TESTED by Roman Storm\n function initialize(uint256 _startTime, uint256 _endTime, uint256 _cap, address _vault) public onlyOwner {\n require(!isInitialized);\n require(_startTime != 0);\n require(_endTime != 0);\n require(_endTime > _startTime);\n require(_cap != 0);\n require(_vault != 0x0);\n startTime = _startTime;\n endTime = _endTime;\n cap = _cap;\n isInitialized = true;\n vault = _vault;\n }\n //TESTED by Roman Storm\n function buy() public payable {\n require(whitelist[msg.sender]);\n require(msg.value > 0);\n require(isInitialized);\n require(getTime() >= startTime && getTime() <= endTime);\n require(totalInvestedInWei + msg.value <= cap);\n address investor = msg.sender;\n investorBalances[investor] += msg.value;\n totalInvestedInWei += msg.value;\n forwardFunds(msg.value);\n }\n \n //TESTED by Roman Storm\n function forwardFunds(uint256 _amount) internal {\n vault.transfer(_amount);\n }\n \n function claimTokens(address _token) public onlyOwner {\n if (_token == 0x0) {\n owner.transfer(this.balance);\n return;\n }\n \n BasicToken token = BasicToken(_token);\n uint256 balance = token.balanceOf(this);\n token.transfer(owner, balance);\n }\n\n function whitelistInvestor(address _newInvestor) public onlyOwner {\n if(!whitelist[_newInvestor]) {\n whitelist[_newInvestor] = true;\n investorsLength++;\n }\n }\n function whitelistInvestors(address[] _investors) external onlyOwner {\n require(_investors.length <= 250);\n for(uint8 i=0; i<_investors.length;i++) {\n address newInvestor = _investors[i];\n if(!whitelist[newInvestor]) {\n whitelist[newInvestor] = true;\n investorsLength++;\n }\n }\n }\n function blacklistInvestor(address _investor) public onlyOwner {\n if(whitelist[_investor]) {\n delete whitelist[_investor];\n if(investorsLength != 0) {\n investorsLength--;\n }\n }\n }\n\n function getTime() internal view returns(uint256) {\n return now;\n }\n}", + "sourcePath": "/Users/rstorm/repos/presale-oracles/contracts/PresaleOracles.sol", + "ast": { + "attributes": { + "absolutePath": "/Users/rstorm/repos/presale-oracles/contracts/PresaleOracles.sol", + "exportedSymbols": { + "PresaleOracles": [ + 337 + ] + } + }, + "children": [ + { + "attributes": { + "SourceUnit": 433, + "absolutePath": "zeppelin-solidity/contracts/math/SafeMath.sol", + "file": "zeppelin-solidity/contracts/math/SafeMath.sol", + "scope": 338, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 1, + "name": "ImportDirective", + "src": "0:55:0" + }, + { + "attributes": { + "SourceUnit": 566, + "absolutePath": "zeppelin-solidity/contracts/token/BasicToken.sol", + "file": "zeppelin-solidity/contracts/token/BasicToken.sol", + "scope": 338, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 2, + "name": "ImportDirective", + "src": "56:58:0" + }, + { + "attributes": { + "SourceUnit": 489, + "absolutePath": "zeppelin-solidity/contracts/ownership/Ownable.sol", + "file": "zeppelin-solidity/contracts/ownership/Ownable.sol", + "scope": 338, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 3, + "name": "ImportDirective", + "src": "115:59:0" + }, + { + "attributes": { + "literals": [ + "solidity", + "^", + "0.4", + ".17" + ] + }, + "id": 4, + "name": "PragmaDirective", + "src": "176:24:0" + }, + { + "attributes": { + "contractDependencies": [ + 488 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "linearizedBaseContracts": [ + 337, + 488 + ], + "name": "PresaleOracles", + "scope": 338 + }, + "children": [ + { + "attributes": { + "arguments": [ + null + ] + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "Ownable", + "referencedDeclaration": 488, + "type": "contract Ownable" + }, + "id": 5, + "name": "UserDefinedTypeName", + "src": "229:7:0" + } + ], + "id": 6, + "name": "InheritanceSpecifier", + "src": "229:7:0" + }, + { + "attributes": { + "constant": false, + "name": "startTime", + "scope": 337, + "stateVariable": true, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 7, + "name": "ElementaryTypeName", + "src": "243:7:0" + } + ], + "id": 8, + "name": "VariableDeclaration", + "src": "243:24:0" + }, + { + "attributes": { + "constant": false, + "name": "endTime", + "scope": 337, + "stateVariable": true, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 9, + "name": "ElementaryTypeName", + "src": "273:7:0" + } + ], + "id": 10, + "name": "VariableDeclaration", + "src": "273:22:0" + }, + { + "attributes": { + "constant": false, + "name": "cap", + "scope": 337, + "stateVariable": true, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 11, + "name": "ElementaryTypeName", + "src": "301:7:0" + } + ], + "id": 12, + "name": "VariableDeclaration", + "src": "301:18:0" + }, + { + "attributes": { + "constant": false, + "name": "rate", + "scope": 337, + "stateVariable": true, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 13, + "name": "ElementaryTypeName", + "src": "325:7:0" + } + ], + "id": 14, + "name": "VariableDeclaration", + "src": "325:19:0" + }, + { + "attributes": { + "constant": false, + "name": "isInitialized", + "scope": 337, + "stateVariable": true, + "storageLocation": "default", + "type": "bool", + "visibility": "public" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 15, + "name": "ElementaryTypeName", + "src": "350:4:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "66616c7365", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "bool", + "type": "bool", + "value": "false" + }, + "id": 16, + "name": "Literal", + "src": "378:5:0" + } + ], + "id": 17, + "name": "VariableDeclaration", + "src": "350:33:0" + }, + { + "attributes": { + "constant": false, + "name": "totalInvestedInWei", + "scope": 337, + "stateVariable": true, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 18, + "name": "ElementaryTypeName", + "src": "389:7:0" + } + ], + "id": 19, + "name": "VariableDeclaration", + "src": "389:33:0" + }, + { + "attributes": { + "constant": false, + "name": "investorBalances", + "scope": 337, + "stateVariable": true, + "storageLocation": "default", + "type": "mapping(address => uint256)", + "value": null, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "type": "mapping(address => uint256)" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 20, + "name": "ElementaryTypeName", + "src": "436:7:0" + }, + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 21, + "name": "ElementaryTypeName", + "src": "447:7:0" + } + ], + "id": 22, + "name": "Mapping", + "src": "428:27:0" + } + ], + "id": 23, + "name": "VariableDeclaration", + "src": "428:51:0" + }, + { + "attributes": { + "constant": false, + "name": "whitelist", + "scope": 337, + "stateVariable": true, + "storageLocation": "default", + "type": "mapping(address => bool)", + "value": null, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "type": "mapping(address => bool)" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 24, + "name": "ElementaryTypeName", + "src": "493:7:0" + }, + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 25, + "name": "ElementaryTypeName", + "src": "504:4:0" + } + ], + "id": 26, + "name": "Mapping", + "src": "485:24:0" + } + ], + "id": 27, + "name": "VariableDeclaration", + "src": "485:41:0" + }, + { + "attributes": { + "constant": false, + "name": "investorsLength", + "scope": 337, + "stateVariable": true, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 28, + "name": "ElementaryTypeName", + "src": "532:7:0" + } + ], + "id": 29, + "name": "VariableDeclaration", + "src": "532:30:0" + }, + { + "attributes": { + "constant": false, + "name": "vault", + "scope": 337, + "stateVariable": true, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 30, + "name": "ElementaryTypeName", + "src": "568:7:0" + } + ], + "id": 31, + "name": "VariableDeclaration", + "src": "568:20:0" + }, + { + "attributes": { + "constant": false, + "implemented": true, + "isConstructor": false, + "modifiers": [ + null + ], + "name": "", + "payable": true, + "scope": 337, + "stateMutability": "payable", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 32, + "name": "ParameterList", + "src": "632:2:0" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 33, + "name": "ParameterList", + "src": "650:0:0" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "arguments": [ + null + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + null + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 176, + "type": "function ()", + "value": "buy" + }, + "id": 34, + "name": "Identifier", + "src": "660:3:0" + } + ], + "id": 35, + "name": "FunctionCall", + "src": "660:5:0" + } + ], + "id": 36, + "name": "ExpressionStatement", + "src": "660:5:0" + } + ], + "id": 37, + "name": "Block", + "src": "650:22:0" + } + ], + "id": 38, + "name": "FunctionDefinition", + "src": "623:49:0" + }, + { + "attributes": { + "constant": false, + "implemented": true, + "isConstructor": false, + "modifiers": [ + null + ], + "name": "Presale", + "payable": false, + "scope": 337, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 39, + "name": "ParameterList", + "src": "721:2:0" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 40, + "name": "ParameterList", + "src": "731:0:0" + }, + { + "attributes": { + "statements": [ + null + ] + }, + "children": [], + "id": 41, + "name": "Block", + "src": "731:7:0" + } + ], + "id": 42, + "name": "FunctionDefinition", + "src": "705:33:0" + }, + { + "attributes": { + "constant": false, + "implemented": true, + "isConstructor": false, + "name": "initialize", + "payable": false, + "scope": 337, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "_startTime", + "scope": 111, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 43, + "name": "ElementaryTypeName", + "src": "791:7:0" + } + ], + "id": 44, + "name": "VariableDeclaration", + "src": "791:18:0" + }, + { + "attributes": { + "constant": false, + "name": "_endTime", + "scope": 111, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 45, + "name": "ElementaryTypeName", + "src": "811:7:0" + } + ], + "id": 46, + "name": "VariableDeclaration", + "src": "811:16:0" + }, + { + "attributes": { + "constant": false, + "name": "_cap", + "scope": 111, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 47, + "name": "ElementaryTypeName", + "src": "829:7:0" + } + ], + "id": 48, + "name": "VariableDeclaration", + "src": "829:12:0" + }, + { + "attributes": { + "constant": false, + "name": "_vault", + "scope": 111, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 49, + "name": "ElementaryTypeName", + "src": "843:7:0" + } + ], + "id": 50, + "name": "VariableDeclaration", + "src": "843:14:0" + } + ], + "id": 51, + "name": "ParameterList", + "src": "790:68:0" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 54, + "name": "ParameterList", + "src": "876:0:0" + }, + { + "attributes": { + "arguments": [ + null + ] + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 462, + "type": "modifier ()", + "value": "onlyOwner" + }, + "id": 52, + "name": "Identifier", + "src": "866:9:0" + } + ], + "id": 53, + "name": "ModifierInvocation", + "src": "866:9:0" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 609, + "type": "function (bool) pure", + "value": "require" + }, + "id": 55, + "name": "Identifier", + "src": "886:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!", + "prefix": true, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 17, + "type": "bool", + "value": "isInitialized" + }, + "id": 56, + "name": "Identifier", + "src": "895:13:0" + } + ], + "id": 57, + "name": "UnaryOperation", + "src": "894:14:0" + } + ], + "id": 58, + "name": "FunctionCall", + "src": "886:23:0" + } + ], + "id": 59, + "name": "ExpressionStatement", + "src": "886:23:0" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 609, + "type": "function (bool) pure", + "value": "require" + }, + "id": 60, + "name": "Identifier", + "src": "919:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 44, + "type": "uint256", + "value": "_startTime" + }, + "id": 61, + "name": "Identifier", + "src": "927:10:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 62, + "name": "Literal", + "src": "941:1:0" + } + ], + "id": 63, + "name": "BinaryOperation", + "src": "927:15:0" + } + ], + "id": 64, + "name": "FunctionCall", + "src": "919:24:0" + } + ], + "id": 65, + "name": "ExpressionStatement", + "src": "919:24:0" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 609, + "type": "function (bool) pure", + "value": "require" + }, + "id": 66, + "name": "Identifier", + "src": "953:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 46, + "type": "uint256", + "value": "_endTime" + }, + "id": 67, + "name": "Identifier", + "src": "961:8:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 68, + "name": "Literal", + "src": "973:1:0" + } + ], + "id": 69, + "name": "BinaryOperation", + "src": "961:13:0" + } + ], + "id": 70, + "name": "FunctionCall", + "src": "953:22:0" + } + ], + "id": 71, + "name": "ExpressionStatement", + "src": "953:22:0" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 609, + "type": "function (bool) pure", + "value": "require" + }, + "id": 72, + "name": "Identifier", + "src": "985:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": ">", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 46, + "type": "uint256", + "value": "_endTime" + }, + "id": 73, + "name": "Identifier", + "src": "993:8:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "uint256", + "value": "_startTime", + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 44 + }, + "id": 74, + "name": "Identifier", + "src": "1004:10:0" + } + ], + "id": 75, + "name": "BinaryOperation", + "src": "993:21:0" + } + ], + "id": 76, + "name": "FunctionCall", + "src": "985:30:0" + } + ], + "id": 77, + "name": "ExpressionStatement", + "src": "985:30:0" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 609, + "type": "function (bool) pure", + "value": "require" + }, + "id": 78, + "name": "Identifier", + "src": "1025:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 48, + "type": "uint256", + "value": "_cap" + }, + "id": 79, + "name": "Identifier", + "src": "1033:4:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 80, + "name": "Literal", + "src": "1041:1:0" + } + ], + "id": 81, + "name": "BinaryOperation", + "src": "1033:9:0" + } + ], + "id": 82, + "name": "FunctionCall", + "src": "1025:18:0" + } + ], + "id": 83, + "name": "ExpressionStatement", + "src": "1025:18:0" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "tuple()", + "isStructConstructorCall": false, + "names": [ + null + ], + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 609, + "type": "function (bool) pure", + "value": "require" + }, + "id": 84, + "name": "Identifier", + "src": "1053:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 44, + "type": "bool", + "value": "_startTime", + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=" + }, + "id": 87, + "name": "BinaryOperation", + "src": "1061:13:0", + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 50, + "type": "address", + "value": "_vault" + }, + "id": 85, + "name": "Identifier", + "src": "1061:6:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "307830", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0x0" + }, + "id": 86, + "name": "Literal", + "src": "1071:3:0" + } + ] + } + ], + "id": 88, + "name": "FunctionCall", + "src": "1053:22:0" + } + ], + "id": 89, + "name": "ExpressionStatement", + "src": "1053:22:0" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 8, + "type": "uint256", + "value": "startTime" + }, + "id": 90, + "name": "Identifier", + "src": "1085:9:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 44, + "type": "uint256", + "value": "_startTime" + }, + "id": 91, + "name": "Identifier", + "src": "1097:10:0" + } + ], + "id": 92, + "name": "Assignment", + "src": "1085:22:0" + } + ], + "id": 93, + "name": "ExpressionStatement", + "src": "1085:22:0" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 10, + "type": "uint256", + "value": "endTime" + }, + "id": 94, + "name": "Identifier", + "src": "1117:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 46, + "type": "uint256", + "value": "_endTime" + }, + "id": 95, + "name": "Identifier", + "src": "1127:8:0" + } + ], + "id": 96, + "name": "Assignment", + "src": "1117:18:0" + } + ], + "id": 97, + "name": "ExpressionStatement", + "src": "1117:18:0" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 12, + "type": "uint256", + "value": "cap" + }, + "id": 98, + "name": "Identifier", + "src": "1145:3:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "74727565", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "bool", + "type": "uint256", + "value": "_cap", + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 48 + }, + "id": 99, + "name": "Identifier", + "src": "1151:4:0" + } + ], + "id": 100, + "name": "Assignment", + "src": "1145:10:0" + } + ], + "id": 101, + "name": "ExpressionStatement", + "src": "1145:10:0" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 17, + "type": "bool", + "value": "isInitialized" + }, + "id": 102, + "name": "Identifier", + "src": "1165:13:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 50, + "type": "bool", + "value": "true", + "hexvalue": "74727565", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "bool" + }, + "id": 103, + "name": "Literal", + "src": "1181:4:0" + } + ], + "id": 104, + "name": "Assignment", + "src": "1165:20:0" + } + ], + "id": 105, + "name": "ExpressionStatement", + "src": "1165:20:0" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 31, + "type": "address", + "value": "vault" + }, + "id": 106, + "name": "Identifier", + "src": "1195:5:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 50, + "type": "address", + "value": "_vault" + }, + "id": 107, + "name": "Identifier", + "src": "1203:6:0" + } + ], + "id": 108, + "name": "Assignment", + "src": "1195:14:0" + } + ], + "id": 109, + "name": "ExpressionStatement", + "src": "1195:14:0" + } + ], + "id": 110, + "name": "Block", + "src": "876:340:0" + } + ], + "id": 111, + "name": "FunctionDefinition", + "src": "771:445:0" + }, + { + "attributes": { + "constant": false, + "implemented": true, + "isConstructor": false, + "modifiers": [ + null + ], + "name": "buy", + "payable": true, + "scope": 337, + "stateMutability": "payable", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 112, + "name": "ParameterList", + "src": "1261:2:0" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 113, + "name": "ParameterList", + "src": "1279:0:0" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 609, + "type": "function (bool) pure", + "value": "require" + }, + "id": 114, + "name": "Identifier", + "src": "1289:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 27, + "type": "mapping(address => bool)", + "value": "whitelist" + }, + "id": 115, + "name": "Identifier", + "src": "1297:9:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 606, + "type": "msg", + "value": "msg" + }, + "id": 116, + "name": "Identifier", + "src": "1307:3:0" + } + ], + "id": 117, + "name": "MemberAccess", + "src": "1307:10:0" + } + ], + "id": 118, + "name": "IndexAccess", + "src": "1297:21:0" + } + ], + "id": 119, + "name": "FunctionCall", + "src": "1289:30:0" + } + ], + "id": 120, + "name": "ExpressionStatement", + "src": "1289:30:0" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 609, + "type": "function (bool) pure", + "value": "require" + }, + "id": 121, + "name": "Identifier", + "src": "1329:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": ">", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "value", + "referencedDeclaration": null, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 606, + "type": "msg", + "value": "msg" + }, + "id": 122, + "name": "Identifier", + "src": "1337:3:0" + } + ], + "id": 123, + "name": "MemberAccess", + "src": "1337:9:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 124, + "name": "Literal", + "src": "1349:1:0" + } + ], + "id": 125, + "name": "BinaryOperation", + "src": "1337:13:0" + } + ], + "id": 126, + "name": "FunctionCall", + "src": "1329:22:0" + } + ], + "id": 127, + "name": "ExpressionStatement", + "src": "1329:22:0" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 609, + "type": "function (bool) pure", + "value": "require" + }, + "id": 128, + "name": "Identifier", + "src": "1361:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 17, + "type": "bool", + "value": "isInitialized" + }, + "id": 129, + "name": "Identifier", + "src": "1369:13:0" + } + ], + "id": 130, + "name": "FunctionCall", + "src": "1361:22:0" + } + ], + "id": 131, + "name": "ExpressionStatement", + "src": "1361:22:0" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 609, + "type": "function (bool) pure", + "value": "require" + }, + "id": 132, + "name": "Identifier", + "src": "1393:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "&&", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": ">=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 587, + "type": "uint256", + "value": "now", + "arguments": [ + null + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type_conversion": false + }, + "id": 134, + "name": "FunctionCall", + "src": "1401:9:0", + "children": [ + { + "attributes": { + "argumentTypes": [ + null + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 336, + "type": "function () view returns (uint256)", + "value": "getTime" + }, + "id": 133, + "name": "Identifier", + "src": "1401:7:0" + } + ] + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 8, + "type": "uint256", + "value": "startTime" + }, + "id": 135, + "name": "Identifier", + "src": "1414:9:0" + } + ], + "id": 136, + "name": "BinaryOperation", + "src": "1401:22:0" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "<=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 587, + "type": "uint256", + "value": "now", + "arguments": [ + null + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type_conversion": false + }, + "id": 138, + "name": "FunctionCall", + "src": "1427:9:0", + "children": [ + { + "attributes": { + "argumentTypes": [ + null + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 336, + "type": "function () view returns (uint256)", + "value": "getTime" + }, + "id": 137, + "name": "Identifier", + "src": "1427:7:0" + } + ] + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 10, + "type": "uint256", + "value": "endTime" + }, + "id": 139, + "name": "Identifier", + "src": "1440:7:0" + } + ], + "id": 140, + "name": "BinaryOperation", + "src": "1427:20:0" + } + ], + "id": 141, + "name": "BinaryOperation", + "src": "1401:46:0" + } + ], + "id": 142, + "name": "FunctionCall", + "src": "1393:55:0" + } + ], + "id": 143, + "name": "ExpressionStatement", + "src": "1393:55:0" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 609, + "type": "function (bool) pure", + "value": "require" + }, + "id": 144, + "name": "Identifier", + "src": "1458:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "<=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "+", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 19, + "type": "uint256", + "value": "totalInvestedInWei" + }, + "id": 145, + "name": "Identifier", + "src": "1466:18:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "value", + "referencedDeclaration": null, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 606, + "type": "msg", + "value": "msg" + }, + "id": 146, + "name": "Identifier", + "src": "1487:3:0" + } + ], + "id": 147, + "name": "MemberAccess", + "src": "1487:9:0" + } + ], + "id": 148, + "name": "BinaryOperation", + "src": "1466:30:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 12, + "type": "uint256", + "value": "cap" + }, + "id": 149, + "name": "Identifier", + "src": "1500:3:0" + } + ], + "id": 150, + "name": "BinaryOperation", + "src": "1466:37:0" + } + ], + "id": 151, + "name": "FunctionCall", + "src": "1458:46:0" + } + ], + "id": 152, + "name": "ExpressionStatement", + "src": "1458:46:0" + }, + { + "attributes": { + "assignments": [ + 154 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "investor", + "scope": 176, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 153, + "name": "ElementaryTypeName", + "src": "1514:7:0" + } + ], + "id": 154, + "name": "VariableDeclaration", + "src": "1514:16:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 606, + "type": "msg", + "value": "msg" + }, + "id": 155, + "name": "Identifier", + "src": "1533:3:0" + } + ], + "id": 156, + "name": "MemberAccess", + "src": "1533:10:0" + } + ], + "id": 157, + "name": "VariableDeclarationStatement", + "src": "1514:29:0" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "+=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 23, + "type": "mapping(address => uint256)", + "value": "investorBalances" + }, + "id": 158, + "name": "Identifier", + "src": "1553:16:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 154, + "type": "address", + "value": "investor" + }, + "id": 159, + "name": "Identifier", + "src": "1570:8:0" + } + ], + "id": 160, + "name": "IndexAccess", + "src": "1553:26:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "value", + "referencedDeclaration": null, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 606, + "type": "msg", + "value": "msg" + }, + "id": 161, + "name": "Identifier", + "src": "1583:3:0" + } + ], + "id": 162, + "name": "MemberAccess", + "src": "1583:9:0" + } + ], + "id": 163, + "name": "Assignment", + "src": "1553:39:0" + } + ], + "id": 164, + "name": "ExpressionStatement", + "src": "1553:39:0" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "+=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 19, + "type": "uint256", + "value": "totalInvestedInWei" + }, + "id": 165, + "name": "Identifier", + "src": "1602:18:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "value", + "referencedDeclaration": null, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 606, + "type": "msg", + "value": "msg" + }, + "id": 166, + "name": "Identifier", + "src": "1624:3:0" + } + ], + "id": 167, + "name": "MemberAccess", + "src": "1624:9:0" + } + ], + "id": 168, + "name": "Assignment", + "src": "1602:31:0" + } + ], + "id": 169, + "name": "ExpressionStatement", + "src": "1602:31:0" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 188, + "type": "function (uint256)", + "value": "forwardFunds" + }, + "id": 170, + "name": "Identifier", + "src": "1643:12:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "value", + "referencedDeclaration": null, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 606, + "type": "msg", + "value": "msg" + }, + "id": 171, + "name": "Identifier", + "src": "1656:3:0" + } + ], + "id": 172, + "name": "MemberAccess", + "src": "1656:9:0" + } + ], + "id": 173, + "name": "FunctionCall", + "src": "1643:23:0" + } + ], + "id": 174, + "name": "ExpressionStatement", + "src": "1643:23:0" + } + ], + "id": 175, + "name": "Block", + "src": "1279:394:0" + } + ], + "id": 176, + "name": "FunctionDefinition", + "src": "1249:424:0" + }, + { + "attributes": { + "constant": false, + "implemented": true, + "isConstructor": false, + "modifiers": [ + null + ], + "name": "forwardFunds", + "payable": false, + "scope": 337, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "_amount", + "scope": 188, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 177, + "name": "ElementaryTypeName", + "src": "1733:7:0" + } + ], + "id": 178, + "name": "VariableDeclaration", + "src": "1733:15:0" + } + ], + "id": 179, + "name": "ParameterList", + "src": "1732:17:0" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 180, + "name": "ParameterList", + "src": "1759:0:0" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "transfer", + "referencedDeclaration": null, + "type": "function (uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 31, + "type": "address", + "value": "vault" + }, + "id": 181, + "name": "Identifier", + "src": "1769:5:0" + } + ], + "id": 183, + "name": "MemberAccess", + "src": "1769:14:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 178, + "type": "uint256", + "value": "_amount" + }, + "id": 184, + "name": "Identifier", + "src": "1784:7:0" + } + ], + "id": 185, + "name": "FunctionCall", + "src": "1769:23:0" + } + ], + "id": 186, + "name": "ExpressionStatement", + "src": "1769:23:0" + } + ], + "id": 187, + "name": "Block", + "src": "1759:40:0" + } + ], + "id": 188, + "name": "FunctionDefinition", + "src": "1711:88:0" + }, + { + "attributes": { + "constant": false, + "implemented": true, + "isConstructor": false, + "name": "claimTokens", + "payable": false, + "scope": 337, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "_token", + "scope": 229, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 189, + "name": "ElementaryTypeName", + "src": "1830:7:0" + } + ], + "id": 190, + "name": "VariableDeclaration", + "src": "1830:14:0" + } + ], + "id": 191, + "name": "ParameterList", + "src": "1829:16:0" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 194, + "name": "ParameterList", + "src": "1863:0:0" + }, + { + "attributes": { + "arguments": [ + null + ] + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 462, + "type": "modifier ()", + "value": "onlyOwner" + }, + "id": 192, + "name": "Identifier", + "src": "1853:9:0" + } + ], + "id": 193, + "name": "ModifierInvocation", + "src": "1853:9:0" + }, + { + "children": [ + { + "attributes": { + "falseBody": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "==", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 190, + "type": "address", + "value": "_token" + }, + "id": 195, + "name": "Identifier", + "src": "1877:6:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "307830", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0x0" + }, + "id": 196, + "name": "Literal", + "src": "1887:3:0" + } + ], + "id": 197, + "name": "BinaryOperation", + "src": "1877:13:0" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "transfer", + "referencedDeclaration": null, + "type": "function (uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 436, + "type": "address", + "value": "owner" + }, + "id": 198, + "name": "Identifier", + "src": "1906:5:0" + } + ], + "id": 200, + "name": "MemberAccess", + "src": "1906:14:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "balance", + "referencedDeclaration": null, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 625, + "type": "contract PresaleOracles", + "value": "this" + }, + "id": 201, + "name": "Identifier", + "src": "1921:4:0" + } + ], + "id": 202, + "name": "MemberAccess", + "src": "1921:12:0" + } + ], + "id": 203, + "name": "FunctionCall", + "src": "1906:28:0" + } + ], + "id": 204, + "name": "ExpressionStatement", + "src": "1906:28:0" + }, + { + "attributes": { + "expression": null, + "functionReturnParameters": 194 + }, + "id": 205, + "name": "Return", + "src": "1948:7:0" + } + ], + "id": 206, + "name": "Block", + "src": "1892:73:0" + } + ], + "id": 207, + "name": "IfStatement", + "src": "1873:92:0" + }, + { + "attributes": { + "assignments": [ + 209 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "token", + "scope": 229, + "stateVariable": false, + "storageLocation": "default", + "type": "contract BasicToken", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "BasicToken", + "referencedDeclaration": 565, + "type": "contract BasicToken" + }, + "id": 208, + "name": "UserDefinedTypeName", + "src": "1979:10:0" + } + ], + "id": 209, + "name": "VariableDeclaration", + "src": "1979:16:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "contract BasicToken", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 565, + "type": "type(contract BasicToken)", + "value": "BasicToken" + }, + "id": 210, + "name": "Identifier", + "src": "1998:10:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 190, + "type": "address", + "value": "_token" + }, + "id": 211, + "name": "Identifier", + "src": "2009:6:0" + } + ], + "id": 212, + "name": "FunctionCall", + "src": "1998:18:0" + } + ], + "id": 213, + "name": "VariableDeclarationStatement", + "src": "1979:37:0" + }, + { + "attributes": { + "assignments": [ + 215 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "balance", + "scope": 229, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 214, + "name": "ElementaryTypeName", + "src": "2026:7:0" + } + ], + "id": 215, + "name": "VariableDeclaration", + "src": "2026:15:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_PresaleOracles_$337", + "typeString": "contract PresaleOracles" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "balanceOf", + "referencedDeclaration": 564, + "type": "function (address) view external returns (uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 209, + "type": "contract BasicToken", + "value": "token" + }, + "id": 216, + "name": "Identifier", + "src": "2044:5:0" + } + ], + "id": 217, + "name": "MemberAccess", + "src": "2044:15:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 625, + "type": "contract PresaleOracles", + "value": "this" + }, + "id": 218, + "name": "Identifier", + "src": "2060:4:0" + } + ], + "id": 219, + "name": "FunctionCall", + "src": "2044:21:0" + } + ], + "id": 220, + "name": "VariableDeclarationStatement", + "src": "2026:39:0" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "bool", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "transfer", + "referencedDeclaration": 552, + "type": "function (address,uint256) external returns (bool)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 209, + "type": "contract BasicToken", + "value": "token" + }, + "id": 221, + "name": "Identifier", + "src": "2075:5:0" + } + ], + "id": 223, + "name": "MemberAccess", + "src": "2075:14:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 436, + "type": "address", + "value": "owner" + }, + "id": 224, + "name": "Identifier", + "src": "2090:5:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 215, + "type": "uint256", + "value": "balance" + }, + "id": 225, + "name": "Identifier", + "src": "2097:7:0" + } + ], + "id": 226, + "name": "FunctionCall", + "src": "2075:30:0" + } + ], + "id": 227, + "name": "ExpressionStatement", + "src": "2075:30:0" + } + ], + "id": 228, + "name": "Block", + "src": "1863:249:0" + } + ], + "id": 229, + "name": "FunctionDefinition", + "src": "1809:303:0" + }, + { + "attributes": { + "constant": false, + "implemented": true, + "isConstructor": false, + "name": "whitelistInvestor", + "payable": false, + "scope": 337, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "_newInvestor", + "scope": 252, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 230, + "name": "ElementaryTypeName", + "src": "2145:7:0" + } + ], + "id": 231, + "name": "VariableDeclaration", + "src": "2145:20:0" + } + ], + "id": 232, + "name": "ParameterList", + "src": "2144:22:0" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 235, + "name": "ParameterList", + "src": "2184:0:0" + }, + { + "attributes": { + "arguments": [ + null + ] + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 462, + "type": "modifier ()", + "value": "onlyOwner" + }, + "id": 233, + "name": "Identifier", + "src": "2174:9:0" + } + ], + "id": 234, + "name": "ModifierInvocation", + "src": "2174:9:0" + }, + { + "children": [ + { + "attributes": { + "falseBody": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!", + "prefix": true, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 27, + "type": "mapping(address => bool)", + "value": "whitelist" + }, + "id": 236, + "name": "Identifier", + "src": "2198:9:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 231, + "type": "address", + "value": "_newInvestor" + }, + "id": 237, + "name": "Identifier", + "src": "2208:12:0" + } + ], + "id": 238, + "name": "IndexAccess", + "src": "2198:23:0" + } + ], + "id": 239, + "name": "UnaryOperation", + "src": "2197:24:0" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 27, + "type": "mapping(address => bool)", + "value": "whitelist" + }, + "id": 240, + "name": "Identifier", + "src": "2237:9:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 231, + "type": "address", + "value": "_newInvestor" + }, + "id": 241, + "name": "Identifier", + "src": "2247:12:0" + } + ], + "id": 242, + "name": "IndexAccess", + "src": "2237:23:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "74727565", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "bool", + "type": "bool", + "value": "true" + }, + "id": 243, + "name": "Literal", + "src": "2263:4:0" + } + ], + "id": 244, + "name": "Assignment", + "src": "2237:30:0" + } + ], + "id": 245, + "name": "ExpressionStatement", + "src": "2237:30:0" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "++", + "prefix": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 29, + "type": "uint256", + "value": "investorsLength" + }, + "id": 246, + "name": "Identifier", + "src": "2281:15:0" + } + ], + "id": 247, + "name": "UnaryOperation", + "src": "2281:17:0" + } + ], + "id": 248, + "name": "ExpressionStatement", + "src": "2281:17:0" + } + ], + "id": 249, + "name": "Block", + "src": "2223:86:0" + } + ], + "id": 250, + "name": "IfStatement", + "src": "2194:115:0" + } + ], + "id": 251, + "name": "Block", + "src": "2184:131:0" + } + ], + "id": 252, + "name": "FunctionDefinition", + "src": "2118:197:0" + }, + { + "attributes": { + "constant": false, + "implemented": true, + "isConstructor": false, + "name": "whitelistInvestors", + "payable": false, + "scope": 337, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "_investors", + "scope": 302, + "stateVariable": false, + "storageLocation": "default", + "type": "address[] calldata", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "length": null, + "type": "address[] storage pointer" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 253, + "name": "ElementaryTypeName", + "src": "2348:7:0" + } + ], + "id": 254, + "name": "ArrayTypeName", + "src": "2348:9:0" + } + ], + "id": 255, + "name": "VariableDeclaration", + "src": "2348:20:0" + } + ], + "id": 256, + "name": "ParameterList", + "src": "2347:22:0" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 259, + "name": "ParameterList", + "src": "2389:0:0" + }, + { + "attributes": { + "arguments": [ + null + ] + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 462, + "type": "modifier ()", + "value": "onlyOwner" + }, + "id": 257, + "name": "Identifier", + "src": "2379:9:0" + } + ], + "id": 258, + "name": "ModifierInvocation", + "src": "2379:9:0" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 609, + "type": "function (bool) pure", + "value": "require" + }, + "id": 260, + "name": "Identifier", + "src": "2399:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "<=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "length", + "referencedDeclaration": null, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 255, + "type": "address[] calldata", + "value": "_investors" + }, + "id": 261, + "name": "Identifier", + "src": "2407:10:0" + } + ], + "id": 262, + "name": "MemberAccess", + "src": "2407:17:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "323530", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 250", + "value": "250" + }, + "id": 263, + "name": "Literal", + "src": "2428:3:0" + } + ], + "id": 264, + "name": "BinaryOperation", + "src": "2407:24:0" + } + ], + "id": 265, + "name": "FunctionCall", + "src": "2399:33:0" + } + ], + "id": 266, + "name": "ExpressionStatement", + "src": "2399:33:0" + }, + { + "children": [ + { + "attributes": { + "assignments": [ + 268 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "i", + "scope": 302, + "stateVariable": false, + "storageLocation": "default", + "type": "uint8", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint8", + "type": "uint8" + }, + "id": 267, + "name": "ElementaryTypeName", + "src": "2446:5:0" + } + ], + "id": 268, + "name": "VariableDeclaration", + "src": "2446:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 269, + "name": "Literal", + "src": "2454:1:0" + } + ], + "id": 270, + "name": "VariableDeclarationStatement", + "src": "2446:9:0" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "<", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 268, + "type": "uint8", + "value": "i" + }, + "id": 271, + "name": "Identifier", + "src": "2457:1:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "length", + "referencedDeclaration": null, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 255, + "type": "address[] calldata", + "value": "_investors" + }, + "id": 272, + "name": "Identifier", + "src": "2459:10:0" + } + ], + "id": 273, + "name": "MemberAccess", + "src": "2459:17:0" + } + ], + "id": 274, + "name": "BinaryOperation", + "src": "2457:19:0" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "++", + "prefix": false, + "type": "uint8" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 268, + "type": "uint8", + "value": "i" + }, + "id": 275, + "name": "Identifier", + "src": "2477:1:0" + } + ], + "id": 276, + "name": "UnaryOperation", + "src": "2477:3:0" + } + ], + "id": 277, + "name": "ExpressionStatement", + "src": "2477:3:0" + }, + { + "children": [ + { + "attributes": { + "assignments": [ + 279 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "newInvestor", + "scope": 302, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 278, + "name": "ElementaryTypeName", + "src": "2496:7:0" + } + ], + "id": 279, + "name": "VariableDeclaration", + "src": "2496:19:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 255, + "type": "address[] calldata", + "value": "_investors" + }, + "id": 280, + "name": "Identifier", + "src": "2518:10:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 268, + "type": "uint8", + "value": "i" + }, + "id": 281, + "name": "Identifier", + "src": "2529:1:0" + } + ], + "id": 282, + "name": "IndexAccess", + "src": "2518:13:0" + } + ], + "id": 283, + "name": "VariableDeclarationStatement", + "src": "2496:35:0" + }, + { + "attributes": { + "falseBody": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!", + "prefix": true, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 27, + "type": "mapping(address => bool)", + "value": "whitelist" + }, + "id": 284, + "name": "Identifier", + "src": "2549:9:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 279, + "type": "address", + "value": "newInvestor" + }, + "id": 285, + "name": "Identifier", + "src": "2559:11:0" + } + ], + "id": 286, + "name": "IndexAccess", + "src": "2549:22:0" + } + ], + "id": 287, + "name": "UnaryOperation", + "src": "2548:23:0" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 27, + "type": "mapping(address => bool)", + "value": "whitelist" + }, + "id": 288, + "name": "Identifier", + "src": "2591:9:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 279, + "type": "address", + "value": "newInvestor" + }, + "id": 289, + "name": "Identifier", + "src": "2601:11:0" + } + ], + "id": 290, + "name": "IndexAccess", + "src": "2591:22:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "74727565", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "bool", + "type": "bool", + "value": "true" + }, + "id": 291, + "name": "Literal", + "src": "2616:4:0" + } + ], + "id": 292, + "name": "Assignment", + "src": "2591:29:0" + } + ], + "id": 293, + "name": "ExpressionStatement", + "src": "2591:29:0" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "++", + "prefix": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 29, + "type": "uint256", + "value": "investorsLength" + }, + "id": 294, + "name": "Identifier", + "src": "2638:15:0" + } + ], + "id": 295, + "name": "UnaryOperation", + "src": "2638:17:0" + } + ], + "id": 296, + "name": "ExpressionStatement", + "src": "2638:17:0" + } + ], + "id": 297, + "name": "Block", + "src": "2573:97:0" + } + ], + "id": 298, + "name": "IfStatement", + "src": "2545:125:0" + } + ], + "id": 299, + "name": "Block", + "src": "2482:198:0" + } + ], + "id": 300, + "name": "ForStatement", + "src": "2442:238:0" + } + ], + "id": 301, + "name": "Block", + "src": "2389:297:0" + } + ], + "id": 302, + "name": "FunctionDefinition", + "src": "2320:366:0" + }, + { + "attributes": { + "constant": false, + "implemented": true, + "isConstructor": false, + "name": "blacklistInvestor", + "payable": false, + "scope": 337, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "_investor", + "scope": 328, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 303, + "name": "ElementaryTypeName", + "src": "2718:7:0" + } + ], + "id": 304, + "name": "VariableDeclaration", + "src": "2718:17:0" + } + ], + "id": 305, + "name": "ParameterList", + "src": "2717:19:0" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 308, + "name": "ParameterList", + "src": "2754:0:0" + }, + { + "attributes": { + "arguments": [ + null + ] + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 462, + "type": "modifier ()", + "value": "onlyOwner" + }, + "id": 306, + "name": "Identifier", + "src": "2744:9:0" + } + ], + "id": 307, + "name": "ModifierInvocation", + "src": "2744:9:0" + }, + { + "children": [ + { + "attributes": { + "falseBody": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 27, + "type": "mapping(address => bool)", + "value": "whitelist" + }, + "id": 309, + "name": "Identifier", + "src": "2767:9:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 304, + "type": "address", + "value": "_investor" + }, + "id": 310, + "name": "Identifier", + "src": "2777:9:0" + } + ], + "id": 311, + "name": "IndexAccess", + "src": "2767:20:0" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "delete", + "prefix": true, + "type": "tuple()" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 27, + "type": "mapping(address => bool)", + "value": "whitelist" + }, + "id": 312, + "name": "Identifier", + "src": "2810:9:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 304, + "type": "address", + "value": "_investor" + }, + "id": 313, + "name": "Identifier", + "src": "2820:9:0" + } + ], + "id": 314, + "name": "IndexAccess", + "src": "2810:20:0" + } + ], + "id": 315, + "name": "UnaryOperation", + "src": "2803:27:0" + } + ], + "id": 316, + "name": "ExpressionStatement", + "src": "2803:27:0" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "prefix": false, + "type": "bool", + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 29, + "type": "uint256", + "value": "investorsLength" + }, + "id": 317, + "name": "Identifier", + "src": "2847:15:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 318, + "name": "Literal", + "src": "2866:1:0" + } + ], + "id": 319, + "name": "BinaryOperation", + "src": "2847:20:0" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "--", + "prefix": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 29, + "type": "uint256", + "value": "investorsLength" + }, + "id": 320, + "name": "Identifier", + "src": "2887:15:0" + } + ], + "id": 321, + "name": "UnaryOperation", + "src": "2887:17:0" + } + ], + "id": 322, + "name": "ExpressionStatement", + "src": "2887:17:0" + } + ], + "id": 323, + "name": "Block", + "src": "2869:50:0" + } + ], + "id": 324, + "name": "IfStatement", + "src": "2844:75:0", + "attributes": { + "falseBody": null + } + } + ], + "id": 325, + "name": "Block", + "src": "2789:140:0" + } + ], + "id": 326, + "name": "IfStatement", + "src": "2764:165:0" + } + ], + "id": 327, + "name": "Block", + "src": "2754:181:0" + } + ], + "id": 328, + "name": "FunctionDefinition", + "src": "2691:244:0" + }, + { + "attributes": { + "constant": true, + "implemented": true, + "isConstructor": false, + "modifiers": [ + null + ], + "name": "getTime", + "payable": false, + "scope": 337, + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 329, + "name": "ParameterList", + "src": "2957:2:0" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 336, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 330, + "name": "ElementaryTypeName", + "src": "2982:7:0" + } + ], + "id": 331, + "name": "VariableDeclaration", + "src": "2982:7:0" + } + ], + "id": 332, + "name": "ParameterList", + "src": "2981:9:0" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 332 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 608, + "type": "uint256", + "value": "now" + }, + "id": 333, + "name": "Identifier", + "src": "3008:3:0" + } + ], + "id": 334, + "name": "Return", + "src": "3001:10:0" + } + ], + "id": 335, + "name": "Block", + "src": "2991:27:0" + } + ], + "id": 336, + "name": "FunctionDefinition", + "src": "2941:77:0" + } + ], + "id": 337, + "name": "ContractDefinition", + "src": "202:2818:0" + } + ], + "id": 338, + "name": "SourceUnit", + "src": "0:3020:0" + }, + "compiler": { + "name": "solc", + "version": "0.4.18+commit.9cf6e910.Emscripten.clang" + }, + "networks": { + "321": { + "events": {}, + "links": {}, + "address": "0x69bd17ead2202072ae4a117b036305a94ccf2e06" + } + }, + "schemaVersion": "1.0.1", + "updatedAt": "2017-11-10T02:14:36.871Z" +} \ No newline at end of file diff --git a/build/contracts/SafeMath.json b/build/contracts/SafeMath.json new file mode 100644 index 0000000..4b7034e --- /dev/null +++ b/build/contracts/SafeMath.json @@ -0,0 +1,1323 @@ +{ + "contractName": "SafeMath", + "abi": [], + "bytecode": "0x60606040523415600e57600080fd5b603580601b6000396000f3006060604052600080fd00a165627a7a72305820ade971e1217d2b46e53509269e46ac252cbe23c158328da3d9e4cd0a7f16e8da0029", + "deployedBytecode": "0x6060604052600080fd00a165627a7a72305820ade971e1217d2b46e53509269e46ac252cbe23c158328da3d9e4cd0a7f16e8da0029", + "sourceMap": "117:698:1:-;;;;;;;;;;;;;;;;;", + "deployedSourceMap": "117:698:1:-;;;;;", + "source": "pragma solidity ^0.4.11;\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n function mul(uint256 a, uint256 b) internal constant returns (uint256) {\n uint256 c = a * b;\n assert(a == 0 || c / a == b);\n return c;\n }\n\n function div(uint256 a, uint256 b) internal constant returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n function sub(uint256 a, uint256 b) internal constant returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n function add(uint256 a, uint256 b) internal constant returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n", + "sourcePath": "zeppelin-solidity/contracts/math/SafeMath.sol", + "ast": { + "attributes": { + "absolutePath": "zeppelin-solidity/contracts/math/SafeMath.sol", + "exportedSymbols": { + "SafeMath": [ + 432 + ] + } + }, + "children": [ + { + "attributes": { + "literals": [ + "solidity", + "^", + "0.4", + ".11" + ] + }, + "id": 339, + "name": "PragmaDirective", + "src": "0:24:1" + }, + { + "attributes": { + "baseContracts": [ + null + ], + "contractDependencies": [ + null + ], + "contractKind": "library", + "documentation": "@title SafeMath\n@dev Math operations with safety checks that throw on error", + "fullyImplemented": true, + "linearizedBaseContracts": [ + 432 + ], + "name": "SafeMath", + "scope": 433 + }, + "children": [ + { + "attributes": { + "constant": true, + "implemented": true, + "isConstructor": false, + "modifiers": [ + null + ], + "name": "mul", + "payable": false, + "scope": 432, + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "a", + "scope": 369, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 340, + "name": "ElementaryTypeName", + "src": "151:7:1" + } + ], + "id": 341, + "name": "VariableDeclaration", + "src": "151:9:1" + }, + { + "attributes": { + "constant": false, + "name": "b", + "scope": 369, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 342, + "name": "ElementaryTypeName", + "src": "162:7:1" + } + ], + "id": 343, + "name": "VariableDeclaration", + "src": "162:9:1" + } + ], + "id": 344, + "name": "ParameterList", + "src": "150:22:1" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 369, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 345, + "name": "ElementaryTypeName", + "src": "200:7:1" + } + ], + "id": 346, + "name": "VariableDeclaration", + "src": "200:7:1" + } + ], + "id": 347, + "name": "ParameterList", + "src": "199:9:1" + }, + { + "children": [ + { + "attributes": { + "assignments": [ + 349 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "c", + "scope": 369, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 348, + "name": "ElementaryTypeName", + "src": "215:7:1" + } + ], + "id": 349, + "name": "VariableDeclaration", + "src": "215:9:1" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "*", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 341, + "type": "uint256", + "value": "a" + }, + "id": 350, + "name": "Identifier", + "src": "227:1:1" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 343, + "type": "uint256", + "value": "b" + }, + "id": 351, + "name": "Identifier", + "src": "231:1:1" + } + ], + "id": 352, + "name": "BinaryOperation", + "src": "227:5:1" + } + ], + "id": 353, + "name": "VariableDeclarationStatement", + "src": "215:17:1" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 597, + "type": "function (bool) pure", + "value": "assert" + }, + "id": 354, + "name": "Identifier", + "src": "238:6:1" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "||", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "==", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 341, + "type": "uint256", + "value": "a" + }, + "id": 355, + "name": "Identifier", + "src": "245:1:1" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 356, + "name": "Literal", + "src": "250:1:1" + } + ], + "id": 357, + "name": "BinaryOperation", + "src": "245:6:1" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "==", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "/", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 349, + "type": "uint256", + "value": "c" + }, + "id": 358, + "name": "Identifier", + "src": "255:1:1" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 341, + "type": "uint256", + "value": "a" + }, + "id": 359, + "name": "Identifier", + "src": "259:1:1" + } + ], + "id": 360, + "name": "BinaryOperation", + "src": "255:5:1" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 343, + "type": "uint256", + "value": "b" + }, + "id": 361, + "name": "Identifier", + "src": "264:1:1" + } + ], + "id": 362, + "name": "BinaryOperation", + "src": "255:10:1" + } + ], + "id": 363, + "name": "BinaryOperation", + "src": "245:20:1" + } + ], + "id": 364, + "name": "FunctionCall", + "src": "238:28:1" + } + ], + "id": 365, + "name": "ExpressionStatement", + "src": "238:28:1" + }, + { + "attributes": { + "functionReturnParameters": 347 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 349, + "type": "uint256", + "value": "c" + }, + "id": 366, + "name": "Identifier", + "src": "279:1:1" + } + ], + "id": 367, + "name": "Return", + "src": "272:8:1" + } + ], + "id": 368, + "name": "Block", + "src": "209:76:1" + } + ], + "id": 369, + "name": "FunctionDefinition", + "src": "138:147:1" + }, + { + "attributes": { + "constant": true, + "implemented": true, + "isConstructor": false, + "modifiers": [ + null + ], + "name": "div", + "payable": false, + "scope": 432, + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "a", + "scope": 387, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 370, + "name": "ElementaryTypeName", + "src": "302:7:1" + } + ], + "id": 371, + "name": "VariableDeclaration", + "src": "302:9:1" + }, + { + "attributes": { + "constant": false, + "name": "b", + "scope": 387, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 372, + "name": "ElementaryTypeName", + "src": "313:7:1" + } + ], + "id": 373, + "name": "VariableDeclaration", + "src": "313:9:1" + } + ], + "id": 374, + "name": "ParameterList", + "src": "301:22:1" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 387, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 375, + "name": "ElementaryTypeName", + "src": "351:7:1" + } + ], + "id": 376, + "name": "VariableDeclaration", + "src": "351:7:1" + } + ], + "id": 377, + "name": "ParameterList", + "src": "350:9:1" + }, + { + "children": [ + { + "attributes": { + "assignments": [ + 379 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "c", + "scope": 387, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 378, + "name": "ElementaryTypeName", + "src": "440:7:1" + } + ], + "id": 379, + "name": "VariableDeclaration", + "src": "440:9:1" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "/", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 371, + "type": "uint256", + "value": "a" + }, + "id": 380, + "name": "Identifier", + "src": "452:1:1" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 373, + "type": "uint256", + "value": "b" + }, + "id": 381, + "name": "Identifier", + "src": "456:1:1" + } + ], + "id": 382, + "name": "BinaryOperation", + "src": "452:5:1" + } + ], + "id": 383, + "name": "VariableDeclarationStatement", + "src": "440:17:1" + }, + { + "attributes": { + "functionReturnParameters": 377 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 379, + "type": "uint256", + "value": "c" + }, + "id": 384, + "name": "Identifier", + "src": "552:1:1" + } + ], + "id": 385, + "name": "Return", + "src": "545:8:1" + } + ], + "id": 386, + "name": "Block", + "src": "360:198:1" + } + ], + "id": 387, + "name": "FunctionDefinition", + "src": "289:269:1" + }, + { + "attributes": { + "constant": true, + "implemented": true, + "isConstructor": false, + "modifiers": [ + null + ], + "name": "sub", + "payable": false, + "scope": 432, + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "a", + "scope": 407, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 388, + "name": "ElementaryTypeName", + "src": "575:7:1" + } + ], + "id": 389, + "name": "VariableDeclaration", + "src": "575:9:1" + }, + { + "attributes": { + "constant": false, + "name": "b", + "scope": 407, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 390, + "name": "ElementaryTypeName", + "src": "586:7:1" + } + ], + "id": 391, + "name": "VariableDeclaration", + "src": "586:9:1" + } + ], + "id": 392, + "name": "ParameterList", + "src": "574:22:1" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 407, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 393, + "name": "ElementaryTypeName", + "src": "624:7:1" + } + ], + "id": 394, + "name": "VariableDeclaration", + "src": "624:7:1" + } + ], + "id": 395, + "name": "ParameterList", + "src": "623:9:1" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 597, + "type": "function (bool) pure", + "value": "assert" + }, + "id": 396, + "name": "Identifier", + "src": "639:6:1" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "<=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 391, + "type": "uint256", + "value": "b" + }, + "id": 397, + "name": "Identifier", + "src": "646:1:1" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 389, + "type": "uint256", + "value": "a" + }, + "id": 398, + "name": "Identifier", + "src": "651:1:1" + } + ], + "id": 399, + "name": "BinaryOperation", + "src": "646:6:1" + } + ], + "id": 400, + "name": "FunctionCall", + "src": "639:14:1" + } + ], + "id": 401, + "name": "ExpressionStatement", + "src": "639:14:1" + }, + { + "attributes": { + "functionReturnParameters": 395 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "-", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 389, + "type": "uint256", + "value": "a" + }, + "id": 402, + "name": "Identifier", + "src": "666:1:1" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 391, + "type": "uint256", + "value": "b" + }, + "id": 403, + "name": "Identifier", + "src": "670:1:1" + } + ], + "id": 404, + "name": "BinaryOperation", + "src": "666:5:1" + } + ], + "id": 405, + "name": "Return", + "src": "659:12:1" + } + ], + "id": 406, + "name": "Block", + "src": "633:43:1" + } + ], + "id": 407, + "name": "FunctionDefinition", + "src": "562:114:1" + }, + { + "attributes": { + "constant": true, + "implemented": true, + "isConstructor": false, + "modifiers": [ + null + ], + "name": "add", + "payable": false, + "scope": 432, + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "a", + "scope": 431, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 408, + "name": "ElementaryTypeName", + "src": "693:7:1" + } + ], + "id": 409, + "name": "VariableDeclaration", + "src": "693:9:1" + }, + { + "attributes": { + "constant": false, + "name": "b", + "scope": 431, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 410, + "name": "ElementaryTypeName", + "src": "704:7:1" + } + ], + "id": 411, + "name": "VariableDeclaration", + "src": "704:9:1" + } + ], + "id": 412, + "name": "ParameterList", + "src": "692:22:1" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 431, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 413, + "name": "ElementaryTypeName", + "src": "742:7:1" + } + ], + "id": 414, + "name": "VariableDeclaration", + "src": "742:7:1" + } + ], + "id": 415, + "name": "ParameterList", + "src": "741:9:1" + }, + { + "children": [ + { + "attributes": { + "assignments": [ + 417 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "c", + "scope": 431, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 416, + "name": "ElementaryTypeName", + "src": "757:7:1" + } + ], + "id": 417, + "name": "VariableDeclaration", + "src": "757:9:1" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "+", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 409, + "type": "uint256", + "value": "a" + }, + "id": 418, + "name": "Identifier", + "src": "769:1:1" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 411, + "type": "uint256", + "value": "b" + }, + "id": 419, + "name": "Identifier", + "src": "773:1:1" + } + ], + "id": 420, + "name": "BinaryOperation", + "src": "769:5:1" + } + ], + "id": 421, + "name": "VariableDeclarationStatement", + "src": "757:17:1" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 597, + "type": "function (bool) pure", + "value": "assert" + }, + "id": 422, + "name": "Identifier", + "src": "780:6:1" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": ">=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 417, + "type": "uint256", + "value": "c" + }, + "id": 423, + "name": "Identifier", + "src": "787:1:1" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 409, + "type": "uint256", + "value": "a" + }, + "id": 424, + "name": "Identifier", + "src": "792:1:1" + } + ], + "id": 425, + "name": "BinaryOperation", + "src": "787:6:1" + } + ], + "id": 426, + "name": "FunctionCall", + "src": "780:14:1" + } + ], + "id": 427, + "name": "ExpressionStatement", + "src": "780:14:1" + }, + { + "attributes": { + "functionReturnParameters": 415 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 417, + "type": "uint256", + "value": "c" + }, + "id": 428, + "name": "Identifier", + "src": "807:1:1" + } + ], + "id": 429, + "name": "Return", + "src": "800:8:1" + } + ], + "id": 430, + "name": "Block", + "src": "751:62:1" + } + ], + "id": 431, + "name": "FunctionDefinition", + "src": "680:133:1" + } + ], + "id": 432, + "name": "ContractDefinition", + "src": "117:698:1" + } + ], + "id": 433, + "name": "SourceUnit", + "src": "0:816:1" + }, + "compiler": { + "name": "solc", + "version": "0.4.18+commit.9cf6e910.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "1.0.1", + "updatedAt": "2017-11-10T02:14:36.614Z" +} \ No newline at end of file diff --git a/contracts/Migrations.sol b/contracts/Migrations.sol new file mode 100644 index 0000000..f170cb4 --- /dev/null +++ b/contracts/Migrations.sol @@ -0,0 +1,23 @@ +pragma solidity ^0.4.17; + +contract Migrations { + address public owner; + uint public last_completed_migration; + + modifier restricted() { + if (msg.sender == owner) _; + } + + function Migrations() public { + owner = msg.sender; + } + + function setCompleted(uint completed) public restricted { + last_completed_migration = completed; + } + + function upgrade(address new_address) public restricted { + Migrations upgraded = Migrations(new_address); + upgraded.setCompleted(last_completed_migration); + } +} diff --git a/contracts/PresaleOracles.sol b/contracts/PresaleOracles.sol new file mode 100644 index 0000000..3c5cd75 --- /dev/null +++ b/contracts/PresaleOracles.sol @@ -0,0 +1,97 @@ +// Build and Tested by Roman Storm rstormsf@gmail.com +import "zeppelin-solidity/contracts/math/SafeMath.sol"; +import "zeppelin-solidity/contracts/token/BasicToken.sol"; +import "zeppelin-solidity/contracts/ownership/Ownable.sol"; + +pragma solidity ^0.4.17; + +contract PresaleOracles is Ownable { + uint256 public startTime; + uint256 public endTime; + uint256 public cap; + uint256 public rate; + bool public isInitialized = false; + uint256 public totalInvestedInWei; + mapping(address => uint256) public investorBalances; + mapping(address => bool) public whitelist; + uint256 public investorsLength; + address public vault; + // 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, address _vault) public onlyOwner { + require(!isInitialized); + require(_startTime != 0); + require(_endTime != 0); + require(_endTime > _startTime); + require(_cap != 0); + require(_vault != 0x0); + startTime = _startTime; + endTime = _endTime; + cap = _cap; + isInitialized = true; + vault = _vault; + } + //TESTED by Roman Storm + function buy() public payable { + require(whitelist[msg.sender]); + require(msg.value > 0); + require(isInitialized); + require(getTime() >= startTime && getTime() <= endTime); + require(totalInvestedInWei + msg.value <= cap); + 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); + } + + 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 whitelistInvestor(address _newInvestor) public onlyOwner { + if(!whitelist[_newInvestor]) { + whitelist[_newInvestor] = true; + investorsLength++; + } + } + 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--; + } + } + } + + function getTime() internal view returns(uint256) { + return now; + } +} \ No newline at end of file diff --git a/migrations/1_initial_migration.js b/migrations/1_initial_migration.js new file mode 100644 index 0000000..4d5f3f9 --- /dev/null +++ b/migrations/1_initial_migration.js @@ -0,0 +1,5 @@ +var Migrations = artifacts.require("./Migrations.sol"); + +module.exports = function(deployer) { + deployer.deploy(Migrations); +}; diff --git a/migrations/2_deploy_presale.js b/migrations/2_deploy_presale.js new file mode 100644 index 0000000..3a9a6c9 --- /dev/null +++ b/migrations/2_deploy_presale.js @@ -0,0 +1,10 @@ +var PresaleOracles = artifacts.require("./PresaleOracles.sol"); + +module.exports = function(deployer, network) { + if(network !== 'development'){ + deployer.deploy(PresaleOracles).then(async ()=> { + let presale = await PresaleOracles.deployed(); + console.log(presale.address); + }) + } +}; diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..0aef2c7 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,724 @@ +{ + "name": "presale-oracles", + "version": "1.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + }, + "assertion-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.0.2.tgz", + "integrity": "sha1-E8pRXYYgbaC6xm6DTdOX2HWBCUw=" + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + }, + "brace-expansion": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", + "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=", + "requires": { + "balanced-match": "1.0.0", + "concat-map": "0.0.1" + } + }, + "browser-stdout": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.0.tgz", + "integrity": "sha1-81HTKWnTL6XXpVZxVCY9korjvR8=" + }, + "builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=" + }, + "camelcase": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", + "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=" + }, + "chai": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.1.2.tgz", + "integrity": "sha1-D2RYS6ZC8PKs4oBiefTwbKI61zw=", + "requires": { + "assertion-error": "1.0.2", + "check-error": "1.0.2", + "deep-eql": "3.0.1", + "get-func-name": "2.0.0", + "pathval": "1.1.0", + "type-detect": "4.0.5" + } + }, + "chai-as-promised": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/chai-as-promised/-/chai-as-promised-7.1.1.tgz", + "integrity": "sha512-azL6xMoi+uxu6z4rhWQ1jbdUhOMhis2PvscD/xjLqNMkv3BPPp2JyyuTHOrf9BOosGpNQ11v6BKv/g57RXbiaA==", + "requires": { + "check-error": "1.0.2" + } + }, + "chai-bignumber": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/chai-bignumber/-/chai-bignumber-2.0.2.tgz", + "integrity": "sha512-BIdRNjRaoRj4bMsZLKbIZPMNKqmwnzNiyxqBYDSs6dFOCs9w8OHPuUE8e1bH60i1IhOzT0NjLtCD+lKEWB1KTQ==" + }, + "check-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", + "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=" + }, + "cliui": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "requires": { + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wrap-ansi": "2.1.0" + } + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" + }, + "commander": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.9.0.tgz", + "integrity": "sha1-nJkJQXbhIkDLItbFFGCYQA/g99Q=", + "requires": { + "graceful-readlink": "1.0.1" + } + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "debug": { + "version": "2.6.8", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz", + "integrity": "sha1-5zFTHKLt4n0YgiJCfaF4IdaP9Pw=", + "requires": { + "ms": "2.0.0" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" + }, + "deep-eql": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", + "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", + "requires": { + "type-detect": "4.0.5" + } + }, + "diff": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.2.0.tgz", + "integrity": "sha1-yc45Okt8vQsFinJck98pkCeGj/k=" + }, + "error-ex": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz", + "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=", + "requires": { + "is-arrayish": "0.2.1" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" + }, + "find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "requires": { + "path-exists": "2.1.0", + "pinkie-promise": "2.0.1" + } + }, + "fs-extra": { + "version": "0.30.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz", + "integrity": "sha1-8jP/zAjU2n1DLapEl3aYnbHfk/A=", + "requires": { + "graceful-fs": "4.1.11", + "jsonfile": "2.4.0", + "klaw": "1.3.1", + "path-is-absolute": "1.0.1", + "rimraf": "2.6.2" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "get-caller-file": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.2.tgz", + "integrity": "sha1-9wLmMSfn4jHBYKgMFVSstw1QR+U=" + }, + "get-func-name": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", + "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=" + }, + "glob": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.1.tgz", + "integrity": "sha1-gFIR3wT6rxxjo2ADBs31reULLsg=", + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" + }, + "graceful-readlink": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz", + "integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU=" + }, + "growl": { + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.9.2.tgz", + "integrity": "sha1-Dqd0NxXbjY3ixe3hd14bRayFwC8=" + }, + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=" + }, + "he": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz", + "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=" + }, + "hosted-git-info": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.5.0.tgz", + "integrity": "sha512-pNgbURSuab90KbTqvRPsseaTxOJCZBD0a7t+haSN33piP9cCM4l0CqdzAif2hUqm716UovKB2ROmiabGAKVXyg==" + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "1.4.0", + "wrappy": "1.0.2" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, + "invert-kv": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=" + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" + }, + "is-builtin-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", + "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", + "requires": { + "builtin-modules": "1.1.1" + } + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "requires": { + "number-is-nan": "1.0.1" + } + }, + "is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=" + }, + "json3": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/json3/-/json3-3.3.2.tgz", + "integrity": "sha1-PAQ0dD35Pi9cQq7nsZvLSDV19OE=" + }, + "jsonfile": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", + "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=", + "requires": { + "graceful-fs": "4.1.11" + } + }, + "klaw": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz", + "integrity": "sha1-QIhDO0azsbolnXh4XY6W9zugJDk=", + "requires": { + "graceful-fs": "4.1.11" + } + }, + "lcid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "requires": { + "invert-kv": "1.0.0" + } + }, + "load-json-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "requires": { + "graceful-fs": "4.1.11", + "parse-json": "2.2.0", + "pify": "2.3.0", + "pinkie-promise": "2.0.1", + "strip-bom": "2.0.0" + } + }, + "lodash._baseassign": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz", + "integrity": "sha1-jDigmVAPIVrQnlnxci/QxSv+Ck4=", + "requires": { + "lodash._basecopy": "3.0.1", + "lodash.keys": "3.1.2" + } + }, + "lodash._basecopy": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz", + "integrity": "sha1-jaDmqHbPNEwK2KVIghEd08XHyjY=" + }, + "lodash._basecreate": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash._basecreate/-/lodash._basecreate-3.0.3.tgz", + "integrity": "sha1-G8ZhYU2qf8MRt9A78WgGoCE8+CE=" + }, + "lodash._getnative": { + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz", + "integrity": "sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=" + }, + "lodash._isiterateecall": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz", + "integrity": "sha1-UgOte6Ql+uhCRg5pbbnPPmqsBXw=" + }, + "lodash.assign": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.2.0.tgz", + "integrity": "sha1-DZnzzNem0mHRm9rrkkUAXShYCOc=" + }, + "lodash.create": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/lodash.create/-/lodash.create-3.1.1.tgz", + "integrity": "sha1-1/KEnw29p+BGgruM1yqwIkYd6+c=", + "requires": { + "lodash._baseassign": "3.2.0", + "lodash._basecreate": "3.0.3", + "lodash._isiterateecall": "3.0.9" + } + }, + "lodash.isarguments": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz", + "integrity": "sha1-L1c9hcaiQon/AGY7SRwdM4/zRYo=" + }, + "lodash.isarray": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz", + "integrity": "sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U=" + }, + "lodash.keys": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz", + "integrity": "sha1-TbwEcrFWvlCgsoaFXRvQsMZWCYo=", + "requires": { + "lodash._getnative": "3.9.1", + "lodash.isarguments": "3.1.0", + "lodash.isarray": "3.0.4" + } + }, + "memorystream": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", + "integrity": "sha1-htcJCzDORV1j+64S3aUaR93K+bI=" + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "1.1.8" + } + }, + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "requires": { + "minimist": "0.0.8" + } + }, + "mocha": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-3.5.3.tgz", + "integrity": "sha512-/6na001MJWEtYxHOV1WLfsmR4YIynkUEhBwzsb+fk2qmQ3iqsi258l/Q2MWHJMImAcNpZ8DEdYAK72NHoIQ9Eg==", + "requires": { + "browser-stdout": "1.3.0", + "commander": "2.9.0", + "debug": "2.6.8", + "diff": "3.2.0", + "escape-string-regexp": "1.0.5", + "glob": "7.1.1", + "growl": "1.9.2", + "he": "1.1.1", + "json3": "3.3.2", + "lodash.create": "3.1.1", + "mkdirp": "0.5.1", + "supports-color": "3.1.2" + } + }, + "moment": { + "version": "2.19.1", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.19.1.tgz", + "integrity": "sha1-VtoaLRy/AdOLfhr8McELz6GSkWc=" + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "normalize-package-data": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", + "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", + "requires": { + "hosted-git-info": "2.5.0", + "is-builtin-module": "1.0.0", + "semver": "5.4.1", + "validate-npm-package-license": "3.0.1" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1.0.2" + } + }, + "original-require": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/original-require/-/original-require-1.0.1.tgz", + "integrity": "sha1-DxMEcVhM0zURxew4yNWSE/msXiA=" + }, + "os-locale": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", + "requires": { + "lcid": "1.0.0" + } + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "requires": { + "error-ex": "1.3.1" + } + }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "requires": { + "pinkie-promise": "2.0.1" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + }, + "path-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "requires": { + "graceful-fs": "4.1.11", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" + } + }, + "pathval": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.0.tgz", + "integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=" + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=" + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "requires": { + "pinkie": "2.0.4" + } + }, + "read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "requires": { + "load-json-file": "1.1.0", + "normalize-package-data": "2.4.0", + "path-type": "1.1.0" + } + }, + "read-pkg-up": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "requires": { + "find-up": "1.1.2", + "read-pkg": "1.1.0" + } + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" + }, + "require-from-string": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-1.2.1.tgz", + "integrity": "sha1-UpyczvJzgK3+yaL5ZbZJu+5jZBg=" + }, + "require-main-filename": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", + "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=" + }, + "rimraf": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "requires": { + "glob": "7.1.1" + } + }, + "semver": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", + "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==" + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" + }, + "solc": { + "version": "0.4.18", + "resolved": "https://registry.npmjs.org/solc/-/solc-0.4.18.tgz", + "integrity": "sha512-Kq+O3PNF9Pfq7fB+lDYAuoqRdghLmZyfngsg0h1Hj38NKAeVHeGPOGeZasn5KqdPeCzbMFvaGyTySxzGv6aXCg==", + "requires": { + "fs-extra": "0.30.0", + "memorystream": "0.3.1", + "require-from-string": "1.2.1", + "semver": "5.4.1", + "yargs": "4.8.1" + } + }, + "spdx-correct": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz", + "integrity": "sha1-SzBz2TP/UfORLwOsVRlJikFQ20A=", + "requires": { + "spdx-license-ids": "1.2.2" + } + }, + "spdx-expression-parse": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz", + "integrity": "sha1-m98vIOH0DtRH++JzJmGR/O1RYmw=" + }, + "spdx-license-ids": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz", + "integrity": "sha1-yd96NCRZSt5r0RkA1ZZpbcBrrFc=" + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "requires": { + "ansi-regex": "2.1.1" + } + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "requires": { + "is-utf8": "0.2.1" + } + }, + "supports-color": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.1.2.tgz", + "integrity": "sha1-cqJiiU2dQIuVbKBf83su2KbiotU=", + "requires": { + "has-flag": "1.0.0" + } + }, + "truffle": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/truffle/-/truffle-4.0.1.tgz", + "integrity": "sha512-PybO+GMq3AvsfCWfEx4sbuaJlDL19iR8Ff20cO0TtP599N5JbMLlhwlffvVInPgFjP+F11vjSOYj3hT8fONs5A==", + "requires": { + "mocha": "3.5.3", + "original-require": "1.0.1", + "solc": "0.4.18" + } + }, + "type-detect": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.5.tgz", + "integrity": "sha512-N9IvkQslUGYGC24RkJk1ba99foK6TkwC2FHAEBlQFBP0RxQZS8ZpJuAZcwiY/w9ZJHFQb1aOXBI60OdxhTrwEQ==" + }, + "validate-npm-package-license": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz", + "integrity": "sha1-KAS6vnEq0zeUWaz74kdGqywwP7w=", + "requires": { + "spdx-correct": "1.0.2", + "spdx-expression-parse": "1.0.4" + } + }, + "which-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", + "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=" + }, + "window-size": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.2.0.tgz", + "integrity": "sha1-tDFbtCFKPXBY6+7okuE/ok2YsHU=" + }, + "wrap-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "requires": { + "string-width": "1.0.2", + "strip-ansi": "3.0.1" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "y18n": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=" + }, + "yargs": { + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-4.8.1.tgz", + "integrity": "sha1-wMQpJMpKqmsObaFznfshZDn53cA=", + "requires": { + "cliui": "3.2.0", + "decamelize": "1.2.0", + "get-caller-file": "1.0.2", + "lodash.assign": "4.2.0", + "os-locale": "1.4.0", + "read-pkg-up": "1.0.1", + "require-directory": "2.1.1", + "require-main-filename": "1.0.1", + "set-blocking": "2.0.0", + "string-width": "1.0.2", + "which-module": "1.0.0", + "window-size": "0.2.0", + "y18n": "3.2.1", + "yargs-parser": "2.4.1" + } + }, + "yargs-parser": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-2.4.1.tgz", + "integrity": "sha1-hVaN488VD/SfpRgl8DqMiA3cxcQ=", + "requires": { + "camelcase": "3.0.0", + "lodash.assign": "4.2.0" + } + }, + "zeppelin-solidity": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/zeppelin-solidity/-/zeppelin-solidity-1.3.0.tgz", + "integrity": "sha512-q+WyqvQjE5gpKgXrhD8LBh0Njg7GI/zs4lKX14y0j7ISJIxe68hihSjaMU05V0M0qAbxgRC43AFTt7CxNsO8nQ==" + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..fec2fde --- /dev/null +++ b/package.json @@ -0,0 +1,19 @@ +{ + "name": "presale-oracles", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "Roman Storm", + "license": "MIT", + "dependencies": { + "chai": "^4.1.2", + "chai-as-promised": "^7.1.1", + "chai-bignumber": "^2.0.2", + "moment": "^2.19.1", + "truffle": "^4.0.1", + "zeppelin-solidity": "^1.3.0" + } +} diff --git a/test/PresaleOraclesMock.sol b/test/PresaleOraclesMock.sol new file mode 100644 index 0000000..4522658 --- /dev/null +++ b/test/PresaleOraclesMock.sol @@ -0,0 +1,24 @@ +pragma solidity ^0.4.17; + +import '../contracts/PresaleOracles.sol'; + + +contract PresaleOraclesMock is PresaleOracles { + uint256 mockTime = 0; + function PresaleOraclesMock() public + PresaleOracles() + { + } + // Debug method to redefine current time + function setTime(uint256 _time) public { + mockTime = _time; + } + + function getTime() internal view returns (uint256) { + if (mockTime != 0) { + return mockTime; + } else { + return now; + } + } +} \ No newline at end of file diff --git a/test/presale.js b/test/presale.js new file mode 100644 index 0000000..6912019 --- /dev/null +++ b/test/presale.js @@ -0,0 +1,246 @@ +const PresaleOracles = artifacts.require("PresaleOraclesMock.sol"); +const BigNumber = web3.BigNumber; +require('chai') +.use(require('chai-as-promised')) +.use(require('chai-bignumber')(web3.BigNumber)) +.should(); + +const moment = require('moment'); + +const ETHER = new web3.BigNumber(10).toPower(18); + +function getTime() { + return Math.floor(Date.now() / 1000); +} + +function latestTime() { + return web3.eth.getBlock('latest').timestamp; +} + +let PRESALE_START_DATE, PRESALE_END_DATE; +contract('Presale', function(accounts) { + let presaleContract; + + beforeEach(async () => { + presaleContract = await PresaleOracles.new(); + }); + + it('constructor should set owner', async () => { + accounts[0].should.be.equal( + await presaleContract.owner() + ); + }); + it('can not buy if not initialized', async () => { + await presaleContract.sendTransaction({amount: ETHER}) + .should.be.rejectedWith('invalid opcode'); + }) + + describe('#initilize', async () => { + + beforeEach(() => { + PRESALE_START_DATE = moment('2017-12-11T16:00:00Z').unix(); + PRESALE_END_DATE = moment('2017-12-18T16:00:00Z').unix(); + }) + it('rejects if not sent by owner', async () => { + await presaleContract.initialize(PRESALE_START_DATE, PRESALE_END_DATE, ETHER, accounts[1], {from: accounts[1]}) + .should.be.rejectedWith('invalid opcode'); + }) + it('sets values', async () => { + await presaleContract.initialize(PRESALE_START_DATE, PRESALE_END_DATE, ETHER, accounts[1], {from: accounts[0]}) + true.should.be.equal( + await presaleContract.isInitialized() + ) + PRESALE_START_DATE.should.be.bignumber.equal( + await presaleContract.startTime() + ) + PRESALE_END_DATE.should.be.bignumber.equal( + await presaleContract.endTime() + ) + ETHER.should.be.bignumber.equal( + await presaleContract.cap() + ) + accounts[1].should.be.equal( + await presaleContract.vault() + ) + }) + it('cannot initialize twice', async () => { + // require(!isInitialized); + await presaleContract.initialize(PRESALE_START_DATE, PRESALE_END_DATE, ETHER, accounts[1], {from: accounts[0]}) + await presaleContract.initialize(PRESALE_START_DATE, PRESALE_END_DATE, ETHER, accounts[1], {from: accounts[0]}) + .should.be.rejectedWith('invalid opcode'); + }) + it('startTime cannot be 0', async () => { + // require(_startTime != 0); + await presaleContract.initialize(0, PRESALE_END_DATE, ETHER, accounts[1], {from: accounts[1]}) + .should.be.rejectedWith('invalid opcode'); + }) + it('endTime cannot be 0', async () => { + // require(_endTime != 0); + await presaleContract.initialize(PRESALE_START_DATE, 0, ETHER, accounts[1], {from: accounts[1]}) + .should.be.rejectedWith('invalid opcode'); + }) + it('endTime cannot be less than startTime', async () => { + // require(_endTime > _startTime); + await presaleContract.initialize(PRESALE_END_DATE, PRESALE_START_DATE, ETHER, accounts[1], {from: accounts[1]}) + .should.be.rejectedWith('invalid opcode'); + }) + it('cap cannot be 0', async () => { + // require(_cap != 0); + await presaleContract.initialize(PRESALE_START_DATE, PRESALE_END_DATE, 0, accounts[1], {from: accounts[1]}) + .should.be.rejectedWith('invalid opcode'); + }) + it('vault cannot be 0x0', async () => { + // require(_vault != 0x0); + await presaleContract.initialize(PRESALE_START_DATE, PRESALE_END_DATE, ETHER, '0x0', {from: accounts[1]}) + .should.be.rejectedWith('invalid opcode'); + }) + }) + + describe('#buy', async () => { + + beforeEach(async () => { + PRESALE_START_DATE = moment('2017-12-11T16:00:00Z').unix(); + PRESALE_END_DATE = moment('2017-12-18T16:00:00Z').unix(); + await presaleContract.initialize(PRESALE_START_DATE, PRESALE_END_DATE, ETHER.mul(2), accounts[1], {from: accounts[0]}) + }) + it('cannot buy if not whitelisted', async () => { + // require(whitelist[msg.sender]); + await presaleContract.sendTransaction({amount: ETHER}) + .should.be.rejectedWith('invalid opcode'); + }) + it('cannot buy if not value is 0', async () => { + // require(msg.value > 0); + await presaleContract.setTime(PRESALE_START_DATE); + await presaleContract.whitelistInvestor(accounts[0]); + await presaleContract.sendTransaction({value: 0}) + .should.be.rejectedWith('invalid opcode'); + }) + + it('can not buy if not initialized', async () => { + // require(isInitialized); + await presaleContract.sendTransaction({amount: ETHER}) + .should.be.rejectedWith('invalid opcode'); + }) + + it('can not buy if time is not within startTime&endTime', async ()=> { + // require(now >= startTime && now <= endTime); + await presaleContract.setTime(PRESALE_START_DATE - 1); + await presaleContract.whitelistInvestor(accounts[0]); + await presaleContract.sendTransaction({value: ETHER}) + .should.be.rejectedWith('invalid opcode'); + await presaleContract.setTime(PRESALE_END_DATE + 1); + await presaleContract.sendTransaction({value: ETHER}) + .should.be.rejectedWith('invalid opcode'); + }) + + it('can not buy more than cap', async () => { + // require(totalInvestedInWei + msg.value <= cap); + await presaleContract.setTime(PRESALE_START_DATE); + await presaleContract.whitelistInvestor(accounts[0]); + await presaleContract.sendTransaction({value: ETHER.mul(2) + 1}) + .should.be.rejectedWith('invalid opcode'); + }) + + it('happy path', async () => { + // investorBalances[investor] += msg.value; + // totalInvestedInWei += msg.value; + // forwardFunds(msg.value); + const vault = accounts[1]; + const preVaultBalance = await web3.eth.getBalance(vault); + await presaleContract.setTime(PRESALE_START_DATE); + await presaleContract.whitelistInvestor(accounts[0]); + await presaleContract.sendTransaction({value: ETHER}); + ETHER.should.be.bignumber.equal( + await presaleContract.investorBalances(accounts[0]) + ) + ETHER.should.be.bignumber.equal( + await presaleContract.totalInvestedInWei() + ) + preVaultBalance.add(ETHER).should.be.bignumber.equal( + await web3.eth.getBalance(vault) + ) + await presaleContract.sendTransaction({value: ETHER}); + + ETHER.mul(2).should.be.bignumber.equal( + await presaleContract.investorBalances(accounts[0]) + ) + ETHER.mul(2).should.be.bignumber.equal( + await presaleContract.totalInvestedInWei() + ) + preVaultBalance.add(ETHER.mul(2)).should.be.bignumber.equal( + await web3.eth.getBalance(vault) + ) + }) + }) + + describe('#whitelistInvestor', async ()=>{ + it('cannot by called by non-owner', async ()=> { + await presaleContract.whitelistInvestor(accounts[0], {from: accounts[1]}) + .should.be.rejectedWith('invalid opcode'); + }) + it('whitelists an investor', async ()=> { + '0'.should.be.bignumber.equal( + await presaleContract.investorsLength() + ) + false.should.be.equal( + await presaleContract.whitelist(accounts[0]) + ) + await presaleContract.whitelistInvestor(accounts[0]); + true.should.be.equal( + await presaleContract.whitelist(accounts[0]) + ) + '1'.should.be.bignumber.equal( + await presaleContract.investorsLength() + ) + }) + }) + describe('#whitelistInvestors', async ()=>{ + it('cannot by called by non-owner', async ()=> { + await presaleContract.whitelistInvestors([accounts[0]], {from: accounts[1]}) + .should.be.rejectedWith('invalid opcode'); + }) + it('whitelists investors', async ()=> { + '0'.should.be.bignumber.equal( + await presaleContract.investorsLength() + ) + false.should.be.equal( + await presaleContract.whitelist(accounts[0]) + ) + await presaleContract.whitelistInvestors([accounts[0], accounts[1], accounts[2]]); + true.should.be.equal( + await presaleContract.whitelist(accounts[2]) + ) + '3'.should.be.bignumber.equal( + await presaleContract.investorsLength() + ) + }) + }) + describe('#blacklistInvestor', async ()=>{ + it('cannot by called by non-owner', async ()=> { + await presaleContract.blacklistInvestor(accounts[0], {from: accounts[1]}) + .should.be.rejectedWith('invalid opcode'); + }) + it('blacklist an investors', async ()=> { + '0'.should.be.bignumber.equal( + await presaleContract.investorsLength() + ) + false.should.be.equal( + await presaleContract.whitelist(accounts[0]) + ) + await presaleContract.whitelistInvestors([accounts[0], accounts[1], accounts[2]]); + true.should.be.equal( + await presaleContract.whitelist(accounts[0]) + ) + '3'.should.be.bignumber.equal( + await presaleContract.investorsLength() + ) + await presaleContract.blacklistInvestor(accounts[0]); + false.should.be.equal( + await presaleContract.whitelist(accounts[0]) + ) + '2'.should.be.bignumber.equal( + await presaleContract.investorsLength() + ) + }) + }) +}); \ No newline at end of file diff --git a/truffle-config.js b/truffle-config.js new file mode 100644 index 0000000..a6330d6 --- /dev/null +++ b/truffle-config.js @@ -0,0 +1,4 @@ +module.exports = { + // See + // to customize your Truffle configuration! +}; diff --git a/truffle.js b/truffle.js new file mode 100644 index 0000000..1a56d12 --- /dev/null +++ b/truffle.js @@ -0,0 +1,11 @@ +module.exports = { + // See + // to customize your Truffle configuration! + networks: { + development: { + host: "localhost", + port: 8545, + network_id: "*" // Match any network id + } + } +};