diff --git a/build/contracts/PresaleOracles.json b/build/contracts/PresaleOracles.json index 1fe9b7c..eb3236e 100644 --- a/build/contracts/PresaleOracles.json +++ b/build/contracts/PresaleOracles.json @@ -1,20 +1,6 @@ { "contractName": "PresaleOracles", "abi": [ - { - "constant": true, - "inputs": [], - "name": "rate", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": true, "inputs": [], @@ -57,6 +43,20 @@ "stateMutability": "view", "type": "function" }, + { + "constant": false, + "inputs": [], + "name": "claimOwnership", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [], @@ -263,6 +263,25 @@ { "constant": true, "inputs": [], + "name": "pendingOwner", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "newOwner", + "type": "address" + } + ], "name": "totalInvestedInWei", "outputs": [ { @@ -283,14 +302,24 @@ } ], "name": "transferOwnership", - "outputs": [], + "outputs": [ + { + "name": "", + "type": "address" + } + ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, - "inputs": [], + "inputs": [ + { + "name": "_investor", + "type": "address" + } + ], "name": "vault", "outputs": [ { @@ -303,6 +332,9 @@ "type": "function" }, { + "payable": false, + "stateMutability": "nonpayable", + "type": "function", "constant": false, "inputs": [ { @@ -311,15 +343,53 @@ } ], "name": "blacklistInvestor", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "outputs": [] }, { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "fallback", "payable": true, - "stateMutability": "payable", - "type": "fallback" + "stateMutability": "payable" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "investor", + "type": "address" + }, + { + "indexed": false, + "name": "investorAmount", + "type": "uint256" + }, + { + "indexed": false, + "name": "investorTotal", + "type": "uint256" + }, + { + "indexed": false, + "name": "totalAmount", + "type": "uint256" + } + ], + "name": "Contribution", + "type": "event" }, { "anonymous": false, @@ -339,66 +409,66 @@ "type": "event" } ], - "bytecode": "0x60606040526000600a60146101000a81548160ff021916908315150217905550336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506111f68061006e6000396000f30060606040526004361061011d576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680632c4e722e146101275780633197cbb614610150578063355274ea14610179578063392e53cd146101a25780635036d610146101cf5780635613680a146101e4578063594337a91461021257806361e214d81461023b57806378e97925146102765780638da5cb5b1461029f578063937e09b1146102f45780639b19251a1461031d578063a6f2ae3a1461036e578063b29a61c114610378578063c430bcda146103c5578063ccd65296146103fe578063df8de3e71461045b578063f117c92414610494578063f2fde38b146104bd578063fbfa77cf146104f6578063ffc1b0381461054b575b610125610584565b005b341561013257600080fd5b61013a6106a6565b6040518082815260200191505060405180910390f35b341561015b57600080fd5b6101636106ac565b6040518082815260200191505060405180910390f35b341561018457600080fd5b61018c6106b2565b6040518082815260200191505060405180910390f35b34156101ad57600080fd5b6101b56106b8565b604051808215151515815260200191505060405180910390f35b34156101da57600080fd5b6101e26106cb565b005b34156101ef57600080fd5b610210600480803590602001908201803590602001919091929050506106cd565b005b341561021d57600080fd5b610225610852565b6040518082815260200191505060405180910390f35b341561024657600080fd5b61025c6004808035906020019091905050610858565b604051808215151515815260200191505060405180910390f35b341561028157600080fd5b6102896108f6565b6040518082815260200191505060405180910390f35b34156102aa57600080fd5b6102b26108fc565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156102ff57600080fd5b610307610921565b6040518082815260200191505060405180910390f35b341561032857600080fd5b610354600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610927565b604051808215151515815260200191505060405180910390f35b610376610584565b005b341561038357600080fd5b6103af600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610947565b6040518082815260200191505060405180910390f35b34156103d057600080fd5b6103fc600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061095f565b005b341561040957600080fd5b610459600480803590602001909190803590602001909190803590602001909190803590602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610a7b565b005b341561046657600080fd5b610492600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610bf3565b005b341561049f57600080fd5b6104a7610e9e565b6040518082815260200191505060405180910390f35b34156104c857600080fd5b6104f4600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610ea4565b005b341561050157600080fd5b610509610ff9565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561055657600080fd5b610582600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061101f565b005b6000600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615156105de57600080fd5b6105e734610858565b15156105f257600080fd5b600a60149054906101000a900460ff16151561060d57600080fd5b60015461061861113f565b1015801561062f575060025461062c61113f565b11155b151561063a57600080fd5b33905034600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550346005600082825401925050819055506106a334611147565b50565b60045481565b60025481565b60035481565b600a60149054906101000a900460ff1681565b565b6000806000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561072b57600080fd5b60fa848490501115151561073e57600080fd5b600091505b838390508260ff16101561084c5783838360ff16818110151561076257fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff169050600860008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151561083f576001600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506009600081548092919060010191905055505b8180600101925050610743565b50505050565b60095481565b6000806000806000851192506006546108b986600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546111ac90919063ffffffff16565b101591506003546108d5866005546111ac90919063ffffffff16565b111590508180156108e35750805b80156108ec5750825b9350505050919050565b60015481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60065481565b60086020528060005260406000206000915054906101000a900460ff1681565b60076020528060005260406000206000915090505481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156109ba57600080fd5b600860008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515610a78576001600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506009600081548092919060010191905055505b50565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610ad657600080fd5b600a60149054906101000a900460ff16151515610af257600080fd5b60008514151515610b0257600080fd5b60008414151515610b1257600080fd5b8484111515610b2057600080fd5b60008314151515610b3057600080fd5b60008214151515610b4057600080fd5b60008173ffffffffffffffffffffffffffffffffffffffff1614151515610b6657600080fd5b8183111515610b7457600080fd5b8460018190555083600281905550826003819055506001600a60146101000a81548160ff0219169083151502179055508160068190555080600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050505050565b6000806000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610c5157600080fd5b60008373ffffffffffffffffffffffffffffffffffffffff161415610ced576000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc3073ffffffffffffffffffffffffffffffffffffffff16319081150290604051600060405180830381858888f193505050501515610ce857600080fd5b610e99565b8291508173ffffffffffffffffffffffffffffffffffffffff166370a08231306000604051602001526040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b1515610d9357600080fd5b6102c65a03f11515610da457600080fd5b5050506040518051905090508173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1515610e7c57600080fd5b6102c65a03f11515610e8d57600080fd5b50505060405180519050505b505050565b60055481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610eff57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515610f3b57600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561107a57600080fd5b600860008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161561113c57600860008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81549060ff0219169055600060095414151561113b57600960008154809291906001900391905055505b5b50565b600042905090565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f1935050505015156111a957600080fd5b50565b60008082840190508381101515156111c057fe5b80915050929150505600a165627a7a72305820dd173f86620fd63c5ee305ad2a6beaed4e5b13067268ce41d050675e03de9c230029", - "deployedBytecode": "0x60606040526004361061011d576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680632c4e722e146101275780633197cbb614610150578063355274ea14610179578063392e53cd146101a25780635036d610146101cf5780635613680a146101e4578063594337a91461021257806361e214d81461023b57806378e97925146102765780638da5cb5b1461029f578063937e09b1146102f45780639b19251a1461031d578063a6f2ae3a1461036e578063b29a61c114610378578063c430bcda146103c5578063ccd65296146103fe578063df8de3e71461045b578063f117c92414610494578063f2fde38b146104bd578063fbfa77cf146104f6578063ffc1b0381461054b575b610125610584565b005b341561013257600080fd5b61013a6106a6565b6040518082815260200191505060405180910390f35b341561015b57600080fd5b6101636106ac565b6040518082815260200191505060405180910390f35b341561018457600080fd5b61018c6106b2565b6040518082815260200191505060405180910390f35b34156101ad57600080fd5b6101b56106b8565b604051808215151515815260200191505060405180910390f35b34156101da57600080fd5b6101e26106cb565b005b34156101ef57600080fd5b610210600480803590602001908201803590602001919091929050506106cd565b005b341561021d57600080fd5b610225610852565b6040518082815260200191505060405180910390f35b341561024657600080fd5b61025c6004808035906020019091905050610858565b604051808215151515815260200191505060405180910390f35b341561028157600080fd5b6102896108f6565b6040518082815260200191505060405180910390f35b34156102aa57600080fd5b6102b26108fc565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156102ff57600080fd5b610307610921565b6040518082815260200191505060405180910390f35b341561032857600080fd5b610354600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610927565b604051808215151515815260200191505060405180910390f35b610376610584565b005b341561038357600080fd5b6103af600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610947565b6040518082815260200191505060405180910390f35b34156103d057600080fd5b6103fc600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061095f565b005b341561040957600080fd5b610459600480803590602001909190803590602001909190803590602001909190803590602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610a7b565b005b341561046657600080fd5b610492600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610bf3565b005b341561049f57600080fd5b6104a7610e9e565b6040518082815260200191505060405180910390f35b34156104c857600080fd5b6104f4600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610ea4565b005b341561050157600080fd5b610509610ff9565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561055657600080fd5b610582600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061101f565b005b6000600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615156105de57600080fd5b6105e734610858565b15156105f257600080fd5b600a60149054906101000a900460ff16151561060d57600080fd5b60015461061861113f565b1015801561062f575060025461062c61113f565b11155b151561063a57600080fd5b33905034600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550346005600082825401925050819055506106a334611147565b50565b60045481565b60025481565b60035481565b600a60149054906101000a900460ff1681565b565b6000806000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561072b57600080fd5b60fa848490501115151561073e57600080fd5b600091505b838390508260ff16101561084c5783838360ff16818110151561076257fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff169050600860008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151561083f576001600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506009600081548092919060010191905055505b8180600101925050610743565b50505050565b60095481565b6000806000806000851192506006546108b986600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546111ac90919063ffffffff16565b101591506003546108d5866005546111ac90919063ffffffff16565b111590508180156108e35750805b80156108ec5750825b9350505050919050565b60015481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60065481565b60086020528060005260406000206000915054906101000a900460ff1681565b60076020528060005260406000206000915090505481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156109ba57600080fd5b600860008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515610a78576001600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506009600081548092919060010191905055505b50565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610ad657600080fd5b600a60149054906101000a900460ff16151515610af257600080fd5b60008514151515610b0257600080fd5b60008414151515610b1257600080fd5b8484111515610b2057600080fd5b60008314151515610b3057600080fd5b60008214151515610b4057600080fd5b60008173ffffffffffffffffffffffffffffffffffffffff1614151515610b6657600080fd5b8183111515610b7457600080fd5b8460018190555083600281905550826003819055506001600a60146101000a81548160ff0219169083151502179055508160068190555080600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050505050565b6000806000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610c5157600080fd5b60008373ffffffffffffffffffffffffffffffffffffffff161415610ced576000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc3073ffffffffffffffffffffffffffffffffffffffff16319081150290604051600060405180830381858888f193505050501515610ce857600080fd5b610e99565b8291508173ffffffffffffffffffffffffffffffffffffffff166370a08231306000604051602001526040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b1515610d9357600080fd5b6102c65a03f11515610da457600080fd5b5050506040518051905090508173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1515610e7c57600080fd5b6102c65a03f11515610e8d57600080fd5b50505060405180519050505b505050565b60055481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610eff57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515610f3b57600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561107a57600080fd5b600860008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161561113c57600860008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81549060ff0219169055600060095414151561113b57600960008154809291906001900391905055505b5b50565b600042905090565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f1935050505015156111a957600080fd5b50565b60008082840190508381101515156111c057fe5b80915050929150505600a165627a7a72305820dd173f86620fd63c5ee305ad2a6beaed4e5b13067268ce41d050675e03de9c230029", - "sourceMap": "202:3557:1:-;;;751:5;723:33;;;;;;;;;;;;;;;;;;;;502:10:3;494:5;;:18;;;;;;;;;;;;;;;;;;202:3557:1;;;;;;", - "deployedSourceMap": "202:3557:1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;828:5;:3;:5::i;:::-;202:3557;453:19;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;401:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;429:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;723:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;873;;;;;;;;;;;;;;3142:366;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;661:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2548:331;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;371:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;238:20:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;517:34:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;614:41;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1589:381;;;;;;557:51;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2912:197;;;;;;;;;;;;;;;;;;;;;;;;;;;;939:617;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2129:303;;;;;;;;;;;;;;;;;;;;;;;;;;;;478:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;827:169:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;697:20:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3513:244;;;;;;;;;;;;;;;;;;;;;;;;;;;;1589:381;1811:16;1637:9;:21;1647:10;1637:21;;;;;;;;;;;;;;;;;;;;;;;;;1629:30;;;;;;;;1677:26;1693:9;1677:15;:26::i;:::-;1669:35;;;;;;;;1722:13;;;;;;;;;;;1714:22;;;;;;;;1767:9;;1754;:7;:9::i;:::-;:22;;:46;;;;;1793:7;;1780:9;:7;:9::i;:::-;:20;;1754:46;1746:55;;;;;;;;1830:10;1811:29;;1880:9;1850:16;:26;1867:8;1850:26;;;;;;;;;;;;;;;;:39;;;;;;;;;;;1921:9;1899:18;;:31;;;;;;;;;;;1940:23;1953:9;1940:12;:23::i;:::-;1589:381;:::o;453:19::-;;;;:::o;401:22::-;;;;:::o;429:18::-;;;;:::o;723:33::-;;;;;;;;;;;;;:::o;873:::-;:::o;3142:366::-;3268:7;3318:19;647:5:3;;;;;;;;;;;633:19;;:10;:19;;;625:28;;;;;;;;3250:3:1;3229:10;;:17;;:24;;3221:33;;;;;;;;3276:1;3268:9;;3264:238;3281:10;;:17;;3279:1;:19;;;3264:238;;;3340:10;;3351:1;3340:13;;;;;;;;;;;;;;;;;;;3318:35;;3371:9;:22;3381:11;3371:22;;;;;;;;;;;;;;;;;;;;;;;;;3370:23;3367:125;;;3438:4;3413:9;:22;3423:11;3413:22;;;;;;;;;;;;;;;;:29;;;;;;;;;;;;;;;;;;3460:15;;:17;;;;;;;;;;;;;3367:125;3299:3;;;;;;;3264:238;;;3142:366;;;;:::o;661:30::-;;;;:::o;2548:331::-;2610:4;2626:12;2662:21;2760:14;2651:1;2641:7;:11;2626:26;;2731:19;;2686:41;2719:7;2686:16;:28;2703:10;2686:28;;;;;;;;;;;;;;;;:32;;:41;;;;:::i;:::-;:64;;2662:88;;2812:3;;2777:31;2800:7;2777:18;;:22;;:31;;;;:::i;:::-;:38;;2760:55;;2832:16;:29;;;;;2852:9;2832:29;:40;;;;;2865:7;2832:40;2825:47;;2548:331;;;;;;:::o;371:24::-;;;;:::o;238:20:3:-;;;;;;;;;;;;;:::o;517:34:1:-;;;;:::o;614:41::-;;;;;;;;;;;;;;;;;;;;;;:::o;557:51::-;;;;;;;;;;;;;;;;;:::o;2912:197::-;647:5:3;;;;;;;;;;;633:19;;:10;:19;;;625:28;;;;;;;;2992:9:1;:23;3002:12;2992:23;;;;;;;;;;;;;;;;;;;;;;;;;2991:24;2988:115;;;3057:4;3031:9;:23;3041:12;3031:23;;;;;;;;;;;;;;;;:30;;;;;;;;;;;;;;;;;;3075:15;;:17;;;;;;;;;;;;;2988:115;2912:197;:::o;939:617::-;647:5:3;;;;;;;;;;;633:19;;:10;:19;;;625:28;;;;;;;;1093:13:1;;;;;;;;;;;1092:14;1084:23;;;;;;;;1139:1;1125:10;:15;;1117:24;;;;;;;;1171:1;1159:8;:13;;1151:22;;;;;;;;1202:10;1191:8;:21;1183:30;;;;;;;;1239:1;1231:4;:9;;1223:18;;;;;;;;1283:1;1259:20;:25;;1251:34;;;;;;;;1313:3;1303:6;:13;;;;1295:22;;;;;;;;1342:20;1335:4;:27;1327:36;;;;;;;;1385:10;1373:9;:22;;;;1415:8;1405:7;:18;;;;1439:4;1433:3;:10;;;;1469:4;1453:13;;:20;;;;;;;;;;;;;;;;;;1505;1483:19;:42;;;;1543:6;1535:5;;:14;;;;;;;;;;;;;;;;;;939:617;;;;;:::o;2129:303::-;2299:16;2346:15;647:5:3;;;;;;;;;;;633:19;;:10;:19;;;625:28;;;;;;;;2207:3:1;2197:6;:13;;;2193:92;;;2226:5;;;;;;;;;;;:14;;:28;2241:4;:12;;;2226:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2268:7;;2193:92;2329:6;2299:37;;2364:5;:15;;;2380:4;2364:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2346:39;;2395:5;:14;;;2410:5;;;;;;;;;;;2417:7;2395:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;659:1:3;2129:303:1;;;:::o;478: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;697:20:1:-;;;;;;;;;;;;;:::o;3513:244::-;647:5:3;;;;;;;;;;;633:19;;:10;:19;;;625:28;;;;;;;;3589:9:1;:20;3599:9;3589:20;;;;;;;;;;;;;;;;;;;;;;;;;3586:165;;;3632:9;:20;3642:9;3632:20;;;;;;;;;;;;;;;;3625:27;;;;;;;;;;;3688:1;3669:15;;:20;;3666:75;;;3709:15;;:17;;;;;;;;;;;;;;3666:75;3586:165;3513:244;:::o;2438:77::-;2479:7;2505:3;2498:10;;2438:77;:::o;2008:88::-;2066:5;;;;;;;;;;;:14;;:23;2081:7;2066:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2008:88;:::o;680:133:2:-;742:7;757:9;773:1;769;:5;757:17;;792:1;787;:6;;780:14;;;;;;807:1;800:8;;680:133;;;;;:::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/*\n * PresaleOracles\n * Simple Presale contract\n * built by github.com/rstormsf Roman Storm\n */\n using SafeMath for uint256;\n uint256 public startTime;\n uint256 public endTime;\n uint256 public cap;\n uint256 public rate;\n uint256 public totalInvestedInWei;\n uint256 public minimumContribution;\n mapping(address => uint256) public investorBalances;\n mapping(address => bool) public whitelist;\n uint256 public investorsLength;\n address public vault;\n bool public isInitialized = false;\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, uint256 _minimumContribution, 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(_minimumContribution != 0);\n require(_vault != 0x0);\n require(_cap > _minimumContribution);\n startTime = _startTime;\n endTime = _endTime;\n cap = _cap;\n isInitialized = true;\n minimumContribution = _minimumContribution;\n vault = _vault;\n }\n //TESTED by Roman Storm\n function buy() public payable {\n require(whitelist[msg.sender]);\n require(isValidPurchase(msg.value));\n require(isInitialized);\n require(getTime() >= startTime && getTime() <= endTime);\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 //TESTED by Roman Storm\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 getTime() internal view returns(uint256) {\n return now;\n }\n //TESTED by Roman Storm\n function isValidPurchase(uint256 _amount) public view returns(bool) {\n bool nonZero = _amount > 0;\n bool hasMinimumAmount = investorBalances[msg.sender].add(_amount) >= minimumContribution;\n bool withinCap = totalInvestedInWei.add(_amount) <= cap;\n return hasMinimumAmount && withinCap && nonZero;\n }\n //TESTED by Roman Storm\n function whitelistInvestor(address _newInvestor) public onlyOwner {\n if(!whitelist[_newInvestor]) {\n whitelist[_newInvestor] = true;\n investorsLength++;\n }\n }\n //TESTED by Roman Storm\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}", + "bytecode": "0x60606040526000600a60146101000a81548160ff021916908315150217905550336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506113ea8061006e6000396000f300606060405260043610610128576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680633197cbb614610132578063355274ea1461015b578063392e53cd146101845780634e71e0c8146101b15780635036d610146101c65780635613680a146101db578063594337a91461020957806361e214d81461023257806378e979251461026d5780638da5cb5b14610296578063937e09b1146102eb5780639b19251a14610314578063a6f2ae3a14610365578063b29a61c11461036f578063c430bcda146103bc578063ccd65296146103f5578063df8de3e714610452578063e30c39781461048b578063f117c924146104e0578063f2fde38b14610509578063fbfa77cf14610542578063ffc1b03814610597575b6101306105d0565b005b341561013d57600080fd5b610145610791565b6040518082815260200191505060405180910390f35b341561016657600080fd5b61016e610797565b6040518082815260200191505060405180910390f35b341561018f57600080fd5b61019761079d565b604051808215151515815260200191505060405180910390f35b34156101bc57600080fd5b6101c46107b0565b005b34156101d157600080fd5b6101d961094f565b005b34156101e657600080fd5b61020760048080359060200190820180359060200191909192905050610951565b005b341561021457600080fd5b61021c610ad6565b6040518082815260200191505060405180910390f35b341561023d57600080fd5b6102536004808035906020019091905050610adc565b604051808215151515815260200191505060405180910390f35b341561027857600080fd5b610280610b7a565b6040518082815260200191505060405180910390f35b34156102a157600080fd5b6102a9610b80565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156102f657600080fd5b6102fe610ba5565b6040518082815260200191505060405180910390f35b341561031f57600080fd5b61034b600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610bab565b604051808215151515815260200191505060405180910390f35b61036d6105d0565b005b341561037a57600080fd5b6103a6600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610bcb565b6040518082815260200191505060405180910390f35b34156103c757600080fd5b6103f3600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610be3565b005b341561040057600080fd5b610450600480803590602001909190803590602001909190803590602001909190803590602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610cff565b005b341561045d57600080fd5b610489600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610e77565b005b341561049657600080fd5b61049e611122565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156104eb57600080fd5b6104f3611148565b6040518082815260200191505060405180910390f35b341561051457600080fd5b610540600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061114e565b005b341561054d57600080fd5b6105556111ed565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156105a257600080fd5b6105ce600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611213565b005b6000600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151561062a57600080fd5b61063334610adc565b151561063e57600080fd5b600a60149054906101000a900460ff16151561065957600080fd5b600254610664611333565b1015801561067b5750600354610678611333565b11155b151561068657600080fd5b33905034600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550346005600082825401925050819055506106ef3461133b565b3373ffffffffffffffffffffffffffffffffffffffff167f460eb5f4fd2327fac159ebd2dfcf744a60eed1a83dd95367e1811f166396748e34600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205460055460405180848152602001838152602001828152602001935050505060405180910390a250565b60035481565b60045481565b600a60149054906101000a900460ff1681565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561080c57600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b565b6000806000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156109af57600080fd5b60fa84849050111515156109c257600080fd5b600091505b838390508260ff161015610ad05783838360ff1681811015156109e657fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff169050600860008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515610ac3576001600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506009600081548092919060010191905055505b81806001019250506109c7565b50505050565b60095481565b600080600080600085119250600654610b3d86600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546113a090919063ffffffff16565b10159150600454610b59866005546113a090919063ffffffff16565b11159050818015610b675750805b8015610b705750825b9350505050919050565b60025481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60065481565b60086020528060005260406000206000915054906101000a900460ff1681565b60076020528060005260406000206000915090505481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610c3e57600080fd5b600860008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515610cfc576001600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506009600081548092919060010191905055505b50565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610d5a57600080fd5b600a60149054906101000a900460ff16151515610d7657600080fd5b60008514151515610d8657600080fd5b60008414151515610d9657600080fd5b8484111515610da457600080fd5b60008314151515610db457600080fd5b60008214151515610dc457600080fd5b60008173ffffffffffffffffffffffffffffffffffffffff1614151515610dea57600080fd5b8183111515610df857600080fd5b8460028190555083600381905550826004819055506001600a60146101000a81548160ff0219169083151502179055508160068190555080600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050505050565b6000806000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610ed557600080fd5b60008373ffffffffffffffffffffffffffffffffffffffff161415610f71576000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc3073ffffffffffffffffffffffffffffffffffffffff16319081150290604051600060405180830381858888f193505050501515610f6c57600080fd5b61111d565b8291508173ffffffffffffffffffffffffffffffffffffffff166370a08231306000604051602001526040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b151561101757600080fd5b6102c65a03f1151561102857600080fd5b5050506040518051905090508173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b151561110057600080fd5b6102c65a03f1151561111157600080fd5b50505060405180519050505b505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60055481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156111a957600080fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561126e57600080fd5b600860008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161561133057600860008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81549060ff0219169055600060095414151561132f57600960008154809291906001900391905055505b5b50565b600042905090565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050151561139d57600080fd5b50565b60008082840190508381101515156113b457fe5b80915050929150505600a165627a7a7230582091b2492dfa1daa588032e8857f4fc80acbd84ca307e27de34793cdc6fa85706f0029", + "deployedBytecode": "0x606060405260043610610128576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680633197cbb614610132578063355274ea1461015b578063392e53cd146101845780634e71e0c8146101b15780635036d610146101c65780635613680a146101db578063594337a91461020957806361e214d81461023257806378e979251461026d5780638da5cb5b14610296578063937e09b1146102eb5780639b19251a14610314578063a6f2ae3a14610365578063b29a61c11461036f578063c430bcda146103bc578063ccd65296146103f5578063df8de3e714610452578063e30c39781461048b578063f117c924146104e0578063f2fde38b14610509578063fbfa77cf14610542578063ffc1b03814610597575b6101306105d0565b005b341561013d57600080fd5b610145610791565b6040518082815260200191505060405180910390f35b341561016657600080fd5b61016e610797565b6040518082815260200191505060405180910390f35b341561018f57600080fd5b61019761079d565b604051808215151515815260200191505060405180910390f35b34156101bc57600080fd5b6101c46107b0565b005b34156101d157600080fd5b6101d961094f565b005b34156101e657600080fd5b61020760048080359060200190820180359060200191909192905050610951565b005b341561021457600080fd5b61021c610ad6565b6040518082815260200191505060405180910390f35b341561023d57600080fd5b6102536004808035906020019091905050610adc565b604051808215151515815260200191505060405180910390f35b341561027857600080fd5b610280610b7a565b6040518082815260200191505060405180910390f35b34156102a157600080fd5b6102a9610b80565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156102f657600080fd5b6102fe610ba5565b6040518082815260200191505060405180910390f35b341561031f57600080fd5b61034b600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610bab565b604051808215151515815260200191505060405180910390f35b61036d6105d0565b005b341561037a57600080fd5b6103a6600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610bcb565b6040518082815260200191505060405180910390f35b34156103c757600080fd5b6103f3600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610be3565b005b341561040057600080fd5b610450600480803590602001909190803590602001909190803590602001909190803590602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610cff565b005b341561045d57600080fd5b610489600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610e77565b005b341561049657600080fd5b61049e611122565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156104eb57600080fd5b6104f3611148565b6040518082815260200191505060405180910390f35b341561051457600080fd5b610540600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061114e565b005b341561054d57600080fd5b6105556111ed565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156105a257600080fd5b6105ce600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611213565b005b6000600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151561062a57600080fd5b61063334610adc565b151561063e57600080fd5b600a60149054906101000a900460ff16151561065957600080fd5b600254610664611333565b1015801561067b5750600354610678611333565b11155b151561068657600080fd5b33905034600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550346005600082825401925050819055506106ef3461133b565b3373ffffffffffffffffffffffffffffffffffffffff167f460eb5f4fd2327fac159ebd2dfcf744a60eed1a83dd95367e1811f166396748e34600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205460055460405180848152602001838152602001828152602001935050505060405180910390a250565b60035481565b60045481565b600a60149054906101000a900460ff1681565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561080c57600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b565b6000806000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156109af57600080fd5b60fa84849050111515156109c257600080fd5b600091505b838390508260ff161015610ad05783838360ff1681811015156109e657fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff169050600860008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515610ac3576001600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506009600081548092919060010191905055505b81806001019250506109c7565b50505050565b60095481565b600080600080600085119250600654610b3d86600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546113a090919063ffffffff16565b10159150600454610b59866005546113a090919063ffffffff16565b11159050818015610b675750805b8015610b705750825b9350505050919050565b60025481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60065481565b60086020528060005260406000206000915054906101000a900460ff1681565b60076020528060005260406000206000915090505481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610c3e57600080fd5b600860008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515610cfc576001600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506009600081548092919060010191905055505b50565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610d5a57600080fd5b600a60149054906101000a900460ff16151515610d7657600080fd5b60008514151515610d8657600080fd5b60008414151515610d9657600080fd5b8484111515610da457600080fd5b60008314151515610db457600080fd5b60008214151515610dc457600080fd5b60008173ffffffffffffffffffffffffffffffffffffffff1614151515610dea57600080fd5b8183111515610df857600080fd5b8460028190555083600381905550826004819055506001600a60146101000a81548160ff0219169083151502179055508160068190555080600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050505050565b6000806000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610ed557600080fd5b60008373ffffffffffffffffffffffffffffffffffffffff161415610f71576000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc3073ffffffffffffffffffffffffffffffffffffffff16319081150290604051600060405180830381858888f193505050501515610f6c57600080fd5b61111d565b8291508173ffffffffffffffffffffffffffffffffffffffff166370a08231306000604051602001526040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b151561101757600080fd5b6102c65a03f1151561102857600080fd5b5050506040518051905090508173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b151561110057600080fd5b6102c65a03f1151561111157600080fd5b50505060405180519050505b505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60055481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156111a957600080fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561126e57600080fd5b600860008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161561133057600860008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81549060ff0219169055600060095414151561132f57600960008154809291906001900391905055505b5b50565b600042905090565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050151561139d57600080fd5b50565b60008082840190508381101515156113b457fe5b80915050929150505600a165627a7a7230582091b2492dfa1daa588032e8857f4fc80acbd84ca307e27de34793cdc6fa85706f0029", + "sourceMap": "204:3745:0:-;;;730:5;702:33;;;;;;;;;;;;;;;;;;;;502:10:3;494:5;;:18;;;;;;;;;;;;;;;;;;204:3745:0;;;;;;", + "deployedSourceMap": "204:3745:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;807:5;:3;:5::i;:::-;204:3745;405:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;433:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;702:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;781:152:2;;;;;;;;;;;;;;852:33:0;;;;;;;;;;;;;;3332:366;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;640:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2738:331;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;375:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;238:20:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;496:34:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;593:41;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1686:474;;;;;;536:51;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3102:197;;;;;;;;;;;;;;;;;;;;;;;;;;;;918:617;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2319:303;;;;;;;;;;;;;;;;;;;;;;;;;;;;253:27:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;457:33:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;601:96:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;676:20:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3703:244;;;;;;;;;;;;;;;;;;;;;;;;;;;;1686:474;1908:16;1734:9;:21;1744:10;1734:21;;;;;;;;;;;;;;;;;;;;;;;;;1726:30;;;;;;;;1774:26;1790:9;1774:15;:26::i;:::-;1766:35;;;;;;;;1819:13;;;;;;;;;;;1811:22;;;;;;;;1864:9;;1851;:7;:9::i;:::-;:22;;:46;;;;;1890:7;;1877:9;:7;:9::i;:::-;:20;;1851:46;1843:55;;;;;;;;1927:10;1908:29;;1977:9;1947:16;:26;1964:8;1947:26;;;;;;;;;;;;;;;;:39;;;;;;;;;;;2018:9;1996:18;;:31;;;;;;;;;;;2037:23;2050:9;2037:12;:23::i;:::-;2083:10;2070:83;;;2095:9;2106:16;:26;2123:8;2106:26;;;;;;;;;;;;;;;;2134:18;;2070:83;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1686:474;:::o;405:22::-;;;;:::o;433:18::-;;;;:::o;702:33::-;;;;;;;;;;;;;:::o;781:152:2:-;433:12;;;;;;;;;;;419:26;;:10;:26;;;411:35;;;;;;;;865:12;;;;;;;;;;;837:41;;858:5;;;;;;;;;;;837:41;;;;;;;;;;;;892:12;;;;;;;;;;;884:5;;:20;;;;;;;;;;;;;;;;;;925:3;910:12;;:18;;;;;;;;;;;;;;;;;;781:152::o;852:33:0:-;:::o;3332:366::-;3458:7;3508:19;647:5:3;;;;;;;;;;;633:19;;:10;:19;;;625:28;;;;;;;;3440:3:0;3419:10;;:17;;:24;;3411:33;;;;;;;;3466:1;3458:9;;3454:238;3471:10;;:17;;3469:1;:19;;;3454:238;;;3530:10;;3541:1;3530:13;;;;;;;;;;;;;;;;;;;3508:35;;3561:9;:22;3571:11;3561:22;;;;;;;;;;;;;;;;;;;;;;;;;3560:23;3557:125;;;3628:4;3603:9;:22;3613:11;3603:22;;;;;;;;;;;;;;;;:29;;;;;;;;;;;;;;;;;;3650:15;;:17;;;;;;;;;;;;;3557:125;3489:3;;;;;;;3454:238;;;3332:366;;;;:::o;640:30::-;;;;:::o;2738:331::-;2800:4;2816:12;2852:21;2950:14;2841:1;2831:7;:11;2816:26;;2921:19;;2876:41;2909:7;2876:16;:28;2893:10;2876:28;;;;;;;;;;;;;;;;:32;;:41;;;;:::i;:::-;:64;;2852:88;;3002:3;;2967:31;2990:7;2967:18;;:22;;:31;;;;:::i;:::-;:38;;2950:55;;3022:16;:29;;;;;3042:9;3022:29;:40;;;;;3055:7;3022:40;3015:47;;2738:331;;;;;;:::o;375:24::-;;;;:::o;238:20:3:-;;;;;;;;;;;;;:::o;496:34:0:-;;;;:::o;593:41::-;;;;;;;;;;;;;;;;;;;;;;:::o;536:51::-;;;;;;;;;;;;;;;;;:::o;3102:197::-;647:5:3;;;;;;;;;;;633:19;;:10;:19;;;625:28;;;;;;;;3182:9:0;:23;3192:12;3182:23;;;;;;;;;;;;;;;;;;;;;;;;;3181:24;3178:115;;;3247:4;3221:9;:23;3231:12;3221:23;;;;;;;;;;;;;;;;:30;;;;;;;;;;;;;;;;;;3265:15;;:17;;;;;;;;;;;;;3178:115;3102:197;:::o;918:617::-;647:5:3;;;;;;;;;;;633:19;;:10;:19;;;625:28;;;;;;;;1072:13:0;;;;;;;;;;;1071:14;1063:23;;;;;;;;1118:1;1104:10;:15;;1096:24;;;;;;;;1150:1;1138:8;:13;;1130:22;;;;;;;;1181:10;1170:8;:21;1162:30;;;;;;;;1218:1;1210:4;:9;;1202:18;;;;;;;;1262:1;1238:20;:25;;1230:34;;;;;;;;1292:3;1282:6;:13;;;;1274:22;;;;;;;;1321:20;1314:4;:27;1306:36;;;;;;;;1364:10;1352:9;:22;;;;1394:8;1384:7;:18;;;;1418:4;1412:3;:10;;;;1448:4;1432:13;;:20;;;;;;;;;;;;;;;;;;1484;1462:19;:42;;;;1522:6;1514:5;;:14;;;;;;;;;;;;;;;;;;918:617;;;;;:::o;2319:303::-;2489:16;2536:15;647:5:3;;;;;;;;;;;633:19;;:10;:19;;;625:28;;;;;;;;2397:3:0;2387:6;:13;;;2383:92;;;2416:5;;;;;;;;;;;:14;;:28;2431:4;:12;;;2416:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2458:7;;2383:92;2519:6;2489:37;;2554:5;:15;;;2570:4;2554:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2536:39;;2585:5;:14;;;2600:5;;;;;;;;;;;2607:7;2585:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;659:1:3;2319:303:0;;;:::o;253:27:2:-;;;;;;;;;;;;;:::o;457:33:0:-;;;;:::o;601:96:2:-;647:5:3;;;;;;;;;;;633:19;;:10;:19;;;625:28;;;;;;;;684:8:2;669:12;;:23;;;;;;;;;;;;;;;;;;601:96;:::o;676:20:0:-;;;;;;;;;;;;;:::o;3703:244::-;647:5:3;;;;;;;;;;;633:19;;:10;:19;;;625:28;;;;;;;;3779:9:0;:20;3789:9;3779:20;;;;;;;;;;;;;;;;;;;;;;;;;3776:165;;;3822:9;:20;3832:9;3822:20;;;;;;;;;;;;;;;;3815:27;;;;;;;;;;;3878:1;3859:15;;:20;;3856:75;;;3899:15;;:17;;;;;;;;;;;;;;3856:75;3776:165;3703:244;:::o;2628:77::-;2669:7;2695:3;2688:10;;2628:77;:::o;2198:88::-;2256:5;;;;;;;;;;;:14;;:23;2271:7;2256:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2198:88;:::o;680:133:1:-;742:7;757:9;773:1;769;:5;757:17;;792:1;787;:6;;780:14;;;;;;807:1;800:8;;680:133;;;;;:::o", + "source": "import \"zeppelin-solidity/contracts/math/SafeMath.sol\";\nimport \"zeppelin-solidity/contracts/token/ERC20Basic.sol\";\nimport \"zeppelin-solidity/contracts/ownership/Claimable.sol\";\n\npragma solidity ^0.4.18;\n\ncontract PresaleOracles is Claimable {\n/*\n * PresaleOracles\n * Simple Presale contract\n * built by github.com/rstormsf Roman Storm\n */\n using SafeMath for uint256;\n uint256 public startTime;\n uint256 public endTime;\n uint256 public cap;\n uint256 public totalInvestedInWei;\n uint256 public minimumContribution;\n mapping(address => uint256) public investorBalances;\n mapping(address => bool) public whitelist;\n uint256 public investorsLength;\n address public vault;\n bool public isInitialized = false;\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, uint256 _minimumContribution, 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(_minimumContribution != 0);\n require(_vault != 0x0);\n require(_cap > _minimumContribution);\n startTime = _startTime;\n endTime = _endTime;\n cap = _cap;\n isInitialized = true;\n minimumContribution = _minimumContribution;\n vault = _vault;\n }\n //TESTED by Roman Storm\n event Contribution(address indexed investor, uint256 investorAmount, uint256 investorTotal, uint256 totalAmount);\n function buy() public payable {\n require(whitelist[msg.sender]);\n require(isValidPurchase(msg.value));\n require(isInitialized);\n require(getTime() >= startTime && getTime() <= endTime);\n address investor = msg.sender;\n investorBalances[investor] += msg.value;\n totalInvestedInWei += msg.value;\n forwardFunds(msg.value);\n Contribution(msg.sender, msg.value, investorBalances[investor], totalInvestedInWei);\n }\n \n //TESTED by Roman Storm\n function forwardFunds(uint256 _amount) internal {\n vault.transfer(_amount);\n }\n //TESTED by Roman Storm\n function claimTokens(address _token) public onlyOwner {\n if (_token == 0x0) {\n owner.transfer(this.balance);\n return;\n }\n \n ERC20Basic token = ERC20Basic(_token);\n uint256 balance = token.balanceOf(this);\n token.transfer(owner, balance);\n }\n\n function getTime() internal view returns(uint256) {\n return now;\n }\n //TESTED by Roman Storm\n function isValidPurchase(uint256 _amount) public view returns(bool) {\n bool nonZero = _amount > 0;\n bool hasMinimumAmount = investorBalances[msg.sender].add(_amount) >= minimumContribution;\n bool withinCap = totalInvestedInWei.add(_amount) <= cap;\n return hasMinimumAmount && withinCap && nonZero;\n }\n //TESTED by Roman Storm\n function whitelistInvestor(address _newInvestor) public onlyOwner {\n if(!whitelist[_newInvestor]) {\n whitelist[_newInvestor] = true;\n investorsLength++;\n }\n }\n //TESTED by Roman Storm\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}", "sourcePath": "/Users/rstorm/repos/presale-oracles/contracts/PresaleOracles.sol", "ast": { "attributes": { "absolutePath": "/Users/rstorm/repos/presale-oracles/contracts/PresaleOracles.sol", "exportedSymbols": { "PresaleOracles": [ - 449 + 411 ] } }, "children": [ { "attributes": { - "SourceUnit": 545, + "SourceUnit": 507, "absolutePath": "zeppelin-solidity/contracts/math/SafeMath.sol", "file": "zeppelin-solidity/contracts/math/SafeMath.sol", - "scope": 450, + "scope": 412, "symbolAliases": [ null ], "unitAlias": "" }, - "id": 58, + "id": 1, "name": "ImportDirective", - "src": "0:55:1" + "src": "0:55:0" }, { "attributes": { - "SourceUnit": 678, - "absolutePath": "zeppelin-solidity/contracts/token/BasicToken.sol", - "file": "zeppelin-solidity/contracts/token/BasicToken.sol", - "scope": 450, + "SourceUnit": 642, + "absolutePath": "zeppelin-solidity/contracts/token/ERC20Basic.sol", + "file": "zeppelin-solidity/contracts/token/ERC20Basic.sol", + "scope": 412, "symbolAliases": [ null ], "unitAlias": "" }, - "id": 59, + "id": 2, "name": "ImportDirective", - "src": "56:58:1" + "src": "56:58:0" }, { "attributes": { - "SourceUnit": 601, - "absolutePath": "zeppelin-solidity/contracts/ownership/Ownable.sol", - "file": "zeppelin-solidity/contracts/ownership/Ownable.sol", - "scope": 450, + "SourceUnit": 557, + "absolutePath": "zeppelin-solidity/contracts/ownership/Claimable.sol", + "file": "zeppelin-solidity/contracts/ownership/Claimable.sol", + "scope": 412, "symbolAliases": [ null ], "unitAlias": "" }, - "id": 60, + "id": 3, "name": "ImportDirective", - "src": "115:59:1" + "src": "115:61:0" }, { "attributes": { @@ -406,27 +476,29 @@ "solidity", "^", "0.4", - ".17" + ".18" ] }, - "id": 61, + "id": 4, "name": "PragmaDirective", - "src": "176:24:1" + "src": "178:24:0" }, { "attributes": { "contractDependencies": [ - 600 + 556, + 612 ], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "linearizedBaseContracts": [ - 449, - 600 + 411, + 556, + 612 ], "name": "PresaleOracles", - "scope": 450 + "scope": 412 }, "children": [ { @@ -439,18 +511,18 @@ { "attributes": { "contractScope": null, - "name": "Ownable", - "referencedDeclaration": 600, - "type": "contract Ownable" + "name": "Claimable", + "referencedDeclaration": 556, + "type": "contract Claimable" }, - "id": 62, + "id": 5, "name": "UserDefinedTypeName", - "src": "229:7:1" + "src": "231:9:0" } ], - "id": 63, + "id": 6, "name": "InheritanceSpecifier", - "src": "229:7:1" + "src": "231:9:0" }, { "children": [ @@ -458,32 +530,32 @@ "attributes": { "contractScope": null, "name": "SafeMath", - "referencedDeclaration": 544, + "referencedDeclaration": 506, "type": "library SafeMath" }, - "id": 64, + "id": 7, "name": "UserDefinedTypeName", - "src": "345:8:1" + "src": "349:8:0" }, { "attributes": { "name": "uint256", "type": "uint256" }, - "id": 65, + "id": 8, "name": "ElementaryTypeName", - "src": "358:7:1" + "src": "362:7:0" } ], - "id": 66, + "id": 9, "name": "UsingForDirective", - "src": "339:27:1" + "src": "343:27:0" }, { "attributes": { "constant": false, "name": "startTime", - "scope": 449, + "scope": 411, "stateVariable": true, "storageLocation": "default", "type": "uint256", @@ -496,20 +568,20 @@ "name": "uint256", "type": "uint256" }, - "id": 67, + "id": 10, "name": "ElementaryTypeName", - "src": "371:7:1" + "src": "375:7:0" } ], - "id": 68, + "id": 11, "name": "VariableDeclaration", - "src": "371:24:1" + "src": "375:24:0" }, { "attributes": { "constant": false, "name": "endTime", - "scope": 449, + "scope": 411, "stateVariable": true, "storageLocation": "default", "type": "uint256", @@ -522,20 +594,20 @@ "name": "uint256", "type": "uint256" }, - "id": 69, + "id": 12, "name": "ElementaryTypeName", - "src": "401:7:1" + "src": "405:7:0" } ], - "id": 70, + "id": 13, "name": "VariableDeclaration", - "src": "401:22:1" + "src": "405:22:0" }, { "attributes": { "constant": false, "name": "cap", - "scope": 449, + "scope": 411, "stateVariable": true, "storageLocation": "default", "type": "uint256", @@ -548,46 +620,20 @@ "name": "uint256", "type": "uint256" }, - "id": 71, + "id": 14, "name": "ElementaryTypeName", - "src": "429:7:1" + "src": "433:7:0" } ], - "id": 72, + "id": 15, "name": "VariableDeclaration", - "src": "429:18:1" - }, - { - "attributes": { - "constant": false, - "name": "rate", - "scope": 449, - "stateVariable": true, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "public" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 73, - "name": "ElementaryTypeName", - "src": "453:7:1" - } - ], - "id": 74, - "name": "VariableDeclaration", - "src": "453:19:1" + "src": "433:18:0" }, { "attributes": { "constant": false, "name": "totalInvestedInWei", - "scope": 449, + "scope": 411, "stateVariable": true, "storageLocation": "default", "type": "uint256", @@ -600,20 +646,20 @@ "name": "uint256", "type": "uint256" }, - "id": 75, + "id": 16, "name": "ElementaryTypeName", - "src": "478:7:1" + "src": "457:7:0" } ], - "id": 76, + "id": 17, "name": "VariableDeclaration", - "src": "478:33:1" + "src": "457:33:0" }, { "attributes": { "constant": false, "name": "minimumContribution", - "scope": 449, + "scope": 411, "stateVariable": true, "storageLocation": "default", "type": "uint256", @@ -626,20 +672,20 @@ "name": "uint256", "type": "uint256" }, - "id": 77, + "id": 18, "name": "ElementaryTypeName", - "src": "517:7:1" + "src": "496:7:0" } ], - "id": 78, + "id": 19, "name": "VariableDeclaration", - "src": "517:34:1" + "src": "496:34:0" }, { "attributes": { "constant": false, "name": "investorBalances", - "scope": 449, + "scope": 411, "stateVariable": true, "storageLocation": "default", "type": "mapping(address => uint256)", @@ -649,42 +695,43 @@ "children": [ { "attributes": { + "name": "uint256", "type": "mapping(address => uint256)" }, + "id": 22, + "name": "Mapping", + "src": "536:27:0", "children": [ { "attributes": { "name": "address", "type": "address" }, - "id": 79, + "id": 20, "name": "ElementaryTypeName", - "src": "565:7:1" + "src": "544:7:0" }, { "attributes": { "name": "uint256", "type": "uint256" }, - "id": 80, + "id": 21, "name": "ElementaryTypeName", - "src": "576:7:1" + "src": "555:7:0" } - ], - "id": 81, - "name": "Mapping", - "src": "557:27:1" + ] } ], - "id": 82, + "id": 23, "name": "VariableDeclaration", - "src": "557:51:1" + "src": "536:51:0" }, { "attributes": { "constant": false, "name": "whitelist", - "scope": 449, + "scope": 411, "stateVariable": true, "storageLocation": "default", "type": "mapping(address => bool)", @@ -696,6 +743,52 @@ "attributes": { "type": "mapping(address => bool)" }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 24, + "name": "ElementaryTypeName", + "src": "601:7:0" + }, + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 25, + "name": "ElementaryTypeName", + "src": "612:4:0" + } + ], + "id": 26, + "name": "Mapping", + "src": "593:24:0" + } + ], + "id": 27, + "name": "VariableDeclaration", + "src": "593:41:0" + }, + { + "attributes": { + "constant": false, + "name": "investorsLength", + "scope": 411, + "stateVariable": true, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "type": "uint256", + "name": "uint256" + }, "children": [ { "attributes": { @@ -716,46 +809,20 @@ "src": "633:4:1" } ], - "id": 85, - "name": "Mapping", - "src": "614:24:1" - } - ], - "id": 86, - "name": "VariableDeclaration", - "src": "614:41:1" - }, - { - "attributes": { - "constant": false, - "name": "investorsLength", - "scope": 449, - "stateVariable": true, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "public" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 87, + "id": 28, "name": "ElementaryTypeName", - "src": "661:7:1" + "src": "640:7:0" } ], - "id": 88, + "id": 29, "name": "VariableDeclaration", - "src": "661:30:1" + "src": "640:30:0" }, { "attributes": { "constant": false, "name": "vault", - "scope": 449, + "scope": 411, "stateVariable": true, "storageLocation": "default", "type": "address", @@ -768,23 +835,24 @@ "name": "address", "type": "address" }, - "id": 89, + "id": 30, "name": "ElementaryTypeName", - "src": "697:7:1" + "src": "676:7:0" } ], - "id": 90, + "id": 31, "name": "VariableDeclaration", - "src": "697:20:1" + "src": "676:20:0" }, { "attributes": { "constant": false, "name": "isInitialized", - "scope": 449, + "scope": 411, "stateVariable": true, "storageLocation": "default", "type": "bool", + "value": null, "visibility": "public" }, "children": [ @@ -793,9 +861,9 @@ "name": "bool", "type": "bool" }, - "id": 91, + "id": 32, "name": "ElementaryTypeName", - "src": "723:4:1" + "src": "702:4:0" }, { "attributes": { @@ -810,14 +878,125 @@ "type": "bool", "value": "false" }, - "id": 92, + "id": 33, "name": "Literal", - "src": "751:5:1" + "src": "730:5:0" } ], - "id": 93, + "id": 34, "name": "VariableDeclaration", - "src": "723:33:1" + "src": "702:33:0" + }, + { + "attributes": { + "constant": false, + "name": "", + "scope": 411, + "stateVariable": true, + "storageLocation": "default", + "type": "bool", + "visibility": "public", + "implemented": true, + "isConstructor": false, + "modifiers": [ + null + ], + "payable": true, + "stateMutability": "payable", + "superFunction": null + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool", + "parameters": [ + null + ] + }, + "id": 35, + "name": "ParameterList", + "src": "779:2:0", + "children": [] + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "66616c7365", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "bool", + "type": "bool", + "value": "false", + "parameters": [ + null + ] + }, + "id": 36, + "name": "ParameterList", + "src": "797:0:0", + "children": [] + }, + { + "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": 209, + "type": "function ()", + "value": "buy" + }, + "id": 37, + "name": "Identifier", + "src": "807:3:0" + } + ], + "id": 38, + "name": "FunctionCall", + "src": "807:5:0" + } + ], + "id": 39, + "name": "ExpressionStatement", + "src": "807:5:0" + } + ], + "id": 40, + "name": "Block", + "src": "797:22:0" + } + ], + "id": 41, + "name": "FunctionDefinition", + "src": "770:49:0" }, { "attributes": { @@ -827,10 +1006,10 @@ "modifiers": [ null ], - "name": "", - "payable": true, - "scope": 449, - "stateMutability": "payable", + "name": "Presale", + "payable": false, + "scope": 411, + "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, @@ -842,9 +1021,9 @@ ] }, "children": [], - "id": 94, + "id": 42, "name": "ParameterList", - "src": "800:2:1" + "src": "868:2:0" }, { "attributes": { @@ -853,9 +1032,9 @@ ] }, "children": [], - "id": 95, + "id": 43, "name": "ParameterList", - "src": "818:0:1" + "src": "878:0:0" }, { "children": [ @@ -906,14 +1085,19 @@ "src": "828:5:1" } ], - "id": 99, + "id": 44, "name": "Block", - "src": "818:22:1" + "src": "878:7:0", + "attributes": { + "statements": [ + null + ] + } } ], - "id": 100, + "id": 45, "name": "FunctionDefinition", - "src": "791:49:1" + "src": "852:33:0" }, { "attributes": { @@ -923,9 +1107,9 @@ "modifiers": [ null ], - "name": "Presale", + "name": "initialize", "payable": false, - "scope": 449, + "scope": 411, "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" @@ -937,10 +1121,141 @@ null ] }, - "children": [], - "id": 101, + "children": [ + { + "attributes": { + "constant": false, + "name": "_startTime", + "scope": 132, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 46, + "name": "ElementaryTypeName", + "src": "938:7:0" + } + ], + "id": 47, + "name": "VariableDeclaration", + "src": "938:18:0" + }, + { + "attributes": { + "constant": false, + "name": "_endTime", + "scope": 132, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 48, + "name": "ElementaryTypeName", + "src": "958:7:0" + } + ], + "id": 49, + "name": "VariableDeclaration", + "src": "958:16:0" + }, + { + "attributes": { + "constant": false, + "name": "_cap", + "scope": 132, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 50, + "name": "ElementaryTypeName", + "src": "976:7:0" + } + ], + "id": 51, + "name": "VariableDeclaration", + "src": "976:12:0" + }, + { + "attributes": { + "constant": false, + "name": "_minimumContribution", + "scope": 132, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 52, + "name": "ElementaryTypeName", + "src": "990:7:0" + } + ], + "id": 53, + "name": "VariableDeclaration", + "src": "990:28:0" + }, + { + "attributes": { + "constant": false, + "name": "_vault", + "scope": 132, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 54, + "name": "ElementaryTypeName", + "src": "1020:7:0" + } + ], + "id": 55, + "name": "VariableDeclaration", + "src": "1020:14:0" + } + ], + "id": 56, "name": "ParameterList", - "src": "889:2:1" + "src": "937:98:0" }, { "attributes": { @@ -949,37 +1264,1122 @@ ] }, "children": [], - "id": 102, + "id": 59, "name": "ParameterList", - "src": "899:0:1" + "src": "1053:0:0" }, { "attributes": { "statements": [ null + ], + "arguments": [ + null ] }, - "children": [], - "id": 103, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 586, + "type": "modifier ()", + "value": "onlyOwner" + }, + "id": 57, + "name": "Identifier", + "src": "1043:9:0" + } + ], + "id": 58, + "name": "ModifierInvocation", + "src": "1043: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": 656, + "type": "function (bool) pure", + "value": "require" + }, + "id": 60, + "name": "Identifier", + "src": "1063: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": 34, + "type": "bool", + "value": "isInitialized" + }, + "id": 61, + "name": "Identifier", + "src": "1072:13:0" + } + ], + "id": 62, + "name": "UnaryOperation", + "src": "1071:14:0" + } + ], + "id": 63, + "name": "FunctionCall", + "src": "1063:23:0" + } + ], + "id": 64, + "name": "ExpressionStatement", + "src": "1063: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": 656, + "type": "function (bool) pure", + "value": "require" + }, + "id": 65, + "name": "Identifier", + "src": "1096: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": 47, + "type": "uint256", + "value": "_startTime" + }, + "id": 66, + "name": "Identifier", + "src": "1104: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": 67, + "name": "Literal", + "src": "1118:1:0" + } + ], + "id": 68, + "name": "BinaryOperation", + "src": "1104:15:0" + } + ], + "id": 69, + "name": "FunctionCall", + "src": "1096:24:0" + } + ], + "id": 70, + "name": "ExpressionStatement", + "src": "1096: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": 656, + "type": "function (bool) pure", + "value": "require" + }, + "id": 71, + "name": "Identifier", + "src": "1130: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": 49, + "type": "uint256", + "value": "_endTime" + }, + "id": 72, + "name": "Identifier", + "src": "1138: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": 73, + "name": "Literal", + "src": "1150:1:0" + } + ], + "id": 74, + "name": "BinaryOperation", + "src": "1138:13:0" + } + ], + "id": 75, + "name": "FunctionCall", + "src": "1130:22:0" + } + ], + "id": 76, + "name": "ExpressionStatement", + "src": "1130: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": 656, + "type": "function (bool) pure", + "value": "require" + }, + "id": 77, + "name": "Identifier", + "src": "1162: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": 49, + "type": "uint256", + "value": "_endTime" + }, + "id": 78, + "name": "Identifier", + "src": "1170:8:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 47, + "type": "uint256", + "value": "_startTime" + }, + "id": 79, + "name": "Identifier", + "src": "1181:10:0" + } + ], + "id": 80, + "name": "BinaryOperation", + "src": "1170:21:0" + } + ], + "id": 81, + "name": "FunctionCall", + "src": "1162:30:0" + } + ], + "id": 82, + "name": "ExpressionStatement", + "src": "1162: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": 656, + "type": "function (bool) pure", + "value": "require" + }, + "id": 83, + "name": "Identifier", + "src": "1202: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": 51, + "type": "uint256", + "value": "_cap" + }, + "id": 84, + "name": "Identifier", + "src": "1210: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": 85, + "name": "Literal", + "src": "1218:1:0" + } + ], + "id": 86, + "name": "BinaryOperation", + "src": "1210:9:0" + } + ], + "id": 87, + "name": "FunctionCall", + "src": "1202:18:0" + } + ], + "id": 88, + "name": "ExpressionStatement", + "src": "1202:18: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": 656, + "type": "function (bool) pure", + "value": "require" + }, + "id": 89, + "name": "Identifier", + "src": "1230: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": 53, + "type": "uint256", + "value": "_minimumContribution" + }, + "id": 90, + "name": "Identifier", + "src": "1238:20: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": 91, + "name": "Literal", + "src": "1262:1:0" + } + ], + "id": 92, + "name": "BinaryOperation", + "src": "1238:25:0" + } + ], + "id": 93, + "name": "FunctionCall", + "src": "1230:34:0" + } + ], + "id": 94, + "name": "ExpressionStatement", + "src": "1230:34: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": 656, + "type": "function (bool) pure", + "value": "require" + }, + "id": 95, + "name": "Identifier", + "src": "1274:7:0" + }, + { + "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": 55, + "type": "address", + "value": "_vault" + }, + "id": 96, + "name": "Identifier", + "src": "1282: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": 97, + "name": "Literal", + "src": "1292:3:0" + } + ], + "id": 98, + "name": "BinaryOperation", + "src": "1282:13:0" + } + ], + "id": 99, + "name": "FunctionCall", + "src": "1274:22:0" + } + ], + "id": 100, + "name": "ExpressionStatement", + "src": "1274: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": 656, + "type": "function (bool) pure", + "value": "require" + }, + "id": 101, + "name": "Identifier", + "src": "1306: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": 51, + "type": "uint256", + "value": "_cap" + }, + "id": 102, + "name": "Identifier", + "src": "1314:4:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 53, + "type": "uint256", + "value": "_minimumContribution" + }, + "id": 103, + "name": "Identifier", + "src": "1321:20:0" + } + ], + "id": 104, + "name": "BinaryOperation", + "src": "1314:27:0" + } + ], + "id": 105, + "name": "FunctionCall", + "src": "1306:36:0" + } + ], + "id": 106, + "name": "ExpressionStatement", + "src": "1306:36:0" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 11, + "type": "uint256", + "value": "startTime" + }, + "id": 107, + "name": "Identifier", + "src": "1352:9:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 47, + "type": "uint256", + "value": "_startTime" + }, + "id": 108, + "name": "Identifier", + "src": "1364:10:0" + } + ], + "id": 109, + "name": "Assignment", + "src": "1352:22:0" + } + ], + "id": 110, + "name": "ExpressionStatement", + "src": "1352:22:0" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 13, + "type": "uint256", + "value": "endTime" + }, + "id": 111, + "name": "Identifier", + "src": "1384:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 49, + "type": "uint256", + "value": "_endTime" + }, + "id": 112, + "name": "Identifier", + "src": "1394:8:0" + } + ], + "id": 113, + "name": "Assignment", + "src": "1384:18:0" + } + ], + "id": 114, + "name": "ExpressionStatement", + "src": "1384:18:0" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 15, + "type": "uint256", + "value": "cap" + }, + "id": 115, + "name": "Identifier", + "src": "1412:3:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 51, + "type": "uint256", + "value": "_cap" + }, + "id": 116, + "name": "Identifier", + "src": "1418:4:0" + } + ], + "id": 117, + "name": "Assignment", + "src": "1412:10:0" + } + ], + "id": 118, + "name": "ExpressionStatement", + "src": "1412:10:0" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 34, + "type": "bool", + "value": "isInitialized" + }, + "id": 119, + "name": "Identifier", + "src": "1432:13:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "74727565", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "bool", + "type": "bool", + "value": "true" + }, + "id": 120, + "name": "Literal", + "src": "1448:4:0" + } + ], + "id": 121, + "name": "Assignment", + "src": "1432:20:0" + } + ], + "id": 122, + "name": "ExpressionStatement", + "src": "1432:20: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": "minimumContribution" + }, + "id": 123, + "name": "Identifier", + "src": "1462:19:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 53, + "type": "uint256", + "value": "_minimumContribution" + }, + "id": 124, + "name": "Identifier", + "src": "1484:20:0" + } + ], + "id": 125, + "name": "Assignment", + "src": "1462:42:0" + } + ], + "id": 126, + "name": "ExpressionStatement", + "src": "1462:42: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": 127, + "name": "Identifier", + "src": "1514:5:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 55, + "type": "address", + "value": "_vault" + }, + "id": 128, + "name": "Identifier", + "src": "1522:6:0" + } + ], + "id": 129, + "name": "Assignment", + "src": "1514:14:0" + } + ], + "id": 130, + "name": "ExpressionStatement", + "src": "1514:14:0" + } + ], + "id": 131, "name": "Block", - "src": "899:7:1" + "src": "1053:482:0" } ], - "id": 104, + "id": 132, "name": "FunctionDefinition", - "src": "873:33:1" + "src": "918:617:0" }, { "attributes": { "constant": false, "implemented": true, "isConstructor": false, - "name": "initialize", + "name": "Contribution", "payable": false, "scope": 449, "stateMutability": "nonpayable", "superFunction": null, - "visibility": "public" + "visibility": "public", + "anonymous": false }, "children": [ { @@ -987,39 +2387,41 @@ { "attributes": { "constant": false, - "name": "_startTime", - "scope": 191, + "name": "investor", + "scope": 142, "stateVariable": false, "storageLocation": "default", - "type": "uint256", + "type": "address", "value": null, - "visibility": "internal" + "visibility": "internal", + "indexed": true }, "children": [ { "attributes": { - "name": "uint256", - "type": "uint256" + "name": "address", + "type": "address" }, - "id": 105, + "id": 133, "name": "ElementaryTypeName", - "src": "959:7:1" + "src": "1587:7:0" } ], - "id": 106, + "id": 134, "name": "VariableDeclaration", - "src": "959:18:1" + "src": "1587:24:0" }, { "attributes": { "constant": false, - "name": "_endTime", - "scope": 191, + "name": "investorAmount", + "scope": 142, "stateVariable": false, "storageLocation": "default", "type": "uint256", "value": null, - "visibility": "internal" + "visibility": "internal", + "indexed": false }, "children": [ { @@ -1027,25 +2429,26 @@ "name": "uint256", "type": "uint256" }, - "id": 107, + "id": 135, "name": "ElementaryTypeName", - "src": "979:7:1" + "src": "1613:7:0" } ], - "id": 108, + "id": 136, "name": "VariableDeclaration", - "src": "979:16:1" + "src": "1613:22:0" }, { "attributes": { "constant": false, - "name": "_cap", - "scope": 191, + "name": "investorTotal", + "scope": 142, "stateVariable": false, "storageLocation": "default", "type": "uint256", "value": null, - "visibility": "internal" + "visibility": "internal", + "indexed": false }, "children": [ { @@ -1053,25 +2456,26 @@ "name": "uint256", "type": "uint256" }, - "id": 109, + "id": 137, "name": "ElementaryTypeName", - "src": "997:7:1" + "src": "1637:7:0" } ], - "id": 110, + "id": 138, "name": "VariableDeclaration", - "src": "997:12:1" + "src": "1637:21:0" }, { "attributes": { "constant": false, - "name": "_minimumContribution", - "scope": 191, + "name": "totalAmount", + "scope": 142, "stateVariable": false, "storageLocation": "default", "type": "uint256", "value": null, - "visibility": "internal" + "visibility": "internal", + "indexed": false }, "children": [ { @@ -1079,14 +2483,14 @@ "name": "uint256", "type": "uint256" }, - "id": 111, + "id": 139, "name": "ElementaryTypeName", - "src": "1011:7:1" + "src": "1660:7:0" } ], - "id": 112, + "id": 140, "name": "VariableDeclaration", - "src": "1011:28:1" + "src": "1660:19:0" }, { "attributes": { @@ -1115,9 +2519,9 @@ "src": "1041:14:1" } ], - "id": 115, + "id": 141, "name": "ParameterList", - "src": "958:98:1" + "src": "1586:94:0" }, { "attributes": { @@ -2223,9 +3627,9 @@ "src": "1074:482:1" } ], - "id": 191, - "name": "FunctionDefinition", - "src": "939:617:1" + "id": 142, + "name": "EventDefinition", + "src": "1568:113:0" }, { "attributes": { @@ -2237,7 +3641,7 @@ ], "name": "buy", "payable": true, - "scope": 449, + "scope": 411, "stateMutability": "payable", "superFunction": null, "visibility": "public" @@ -2250,9 +3654,9 @@ ] }, "children": [], - "id": 192, + "id": 143, "name": "ParameterList", - "src": "1601:2:1" + "src": "1698:2:0" }, { "attributes": { @@ -2261,9 +3665,9 @@ ] }, "children": [], - "id": 193, + "id": 144, "name": "ParameterList", - "src": "1619:0:1" + "src": "1716:0:0" }, { "children": [ @@ -2295,13 +3699,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 721, + "referencedDeclaration": 656, "type": "function (bool) pure", "value": "require" }, - "id": 194, + "id": 145, "name": "Identifier", - "src": "1629:7:1" + "src": "1726:7:0" }, { "attributes": { @@ -2319,13 +3723,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 86, + "referencedDeclaration": 27, "type": "mapping(address => bool)", "value": "whitelist" }, - "id": 195, + "id": 146, "name": "Identifier", - "src": "1637:9:1" + "src": "1734:9:0" }, { "attributes": { @@ -2345,33 +3749,33 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 718, + "referencedDeclaration": 653, "type": "msg", "value": "msg" }, - "id": 196, + "id": 147, "name": "Identifier", - "src": "1647:3:1" + "src": "1744:3:0" } ], - "id": 197, + "id": 148, "name": "MemberAccess", - "src": "1647:10:1" + "src": "1744:10:0" } ], - "id": 198, + "id": 149, "name": "IndexAccess", - "src": "1637:21:1" + "src": "1734:21:0" } ], - "id": 199, + "id": 150, "name": "FunctionCall", - "src": "1629:30:1" + "src": "1726:30:0" } ], - "id": 200, + "id": 151, "name": "ExpressionStatement", - "src": "1629:30:1" + "src": "1726:30:0" }, { "children": [ @@ -2401,13 +3805,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 721, + "referencedDeclaration": 656, "type": "function (bool) pure", "value": "require" }, - "id": 201, + "id": 152, "name": "Identifier", - "src": "1669:7:1" + "src": "1766:7:0" }, { "attributes": { @@ -2435,13 +3839,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 349, + "referencedDeclaration": 311, "type": "function (uint256) view returns (bool)", "value": "isValidPurchase" }, - "id": 202, + "id": 153, "name": "Identifier", - "src": "1677:15:1" + "src": "1774:15:0" }, { "attributes": { @@ -2461,33 +3865,33 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 718, + "referencedDeclaration": 653, "type": "msg", "value": "msg" }, - "id": 203, + "id": 154, "name": "Identifier", - "src": "1693:3:1" + "src": "1790:3:0" } ], - "id": 204, + "id": 155, "name": "MemberAccess", - "src": "1693:9:1" + "src": "1790:9:0" } ], - "id": 205, + "id": 156, "name": "FunctionCall", - "src": "1677:26:1" + "src": "1774:26:0" } ], - "id": 206, + "id": 157, "name": "FunctionCall", - "src": "1669:35:1" + "src": "1766:35:0" } ], - "id": 207, + "id": 158, "name": "ExpressionStatement", - "src": "1669:35:1" + "src": "1766:35:0" }, { "children": [ @@ -2517,13 +3921,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 721, + "referencedDeclaration": 656, "type": "function (bool) pure", "value": "require" }, - "id": 208, + "id": 159, "name": "Identifier", - "src": "1714:7:1" + "src": "1811:7:0" }, { "attributes": { @@ -2531,23 +3935,23 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 93, + "referencedDeclaration": 34, "type": "bool", "value": "isInitialized" }, - "id": 209, + "id": 160, "name": "Identifier", - "src": "1722:13:1" + "src": "1819:13:0" } ], - "id": 210, + "id": 161, "name": "FunctionCall", - "src": "1714:22:1" + "src": "1811:22:0" } ], - "id": 211, + "id": 162, "name": "ExpressionStatement", - "src": "1714:22:1" + "src": "1811:22:0" }, { "children": [ @@ -2577,13 +3981,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 721, + "referencedDeclaration": 656, "type": "function (bool) pure", "value": "require" }, - "id": 212, + "id": 163, "name": "Identifier", - "src": "1746:7:1" + "src": "1843:7:0" }, { "attributes": { @@ -2641,18 +4045,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 308, + "referencedDeclaration": 270, "type": "function () view returns (uint256)", "value": "getTime" }, - "id": 213, + "id": 164, "name": "Identifier", - "src": "1754:7:1" + "src": "1851:7:0" } ], - "id": 214, + "id": 165, "name": "FunctionCall", - "src": "1754:9:1" + "src": "1851:9:0" }, { "attributes": { @@ -2660,18 +4064,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 68, + "referencedDeclaration": 11, "type": "uint256", "value": "startTime" }, - "id": 215, + "id": 166, "name": "Identifier", - "src": "1767:9:1" + "src": "1864:9:0" } ], - "id": 216, + "id": 167, "name": "BinaryOperation", - "src": "1754:22:1" + "src": "1851:22:0" }, { "attributes": { @@ -2714,18 +4118,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 308, + "referencedDeclaration": 270, "type": "function () view returns (uint256)", "value": "getTime" }, - "id": 217, + "id": 168, "name": "Identifier", - "src": "1780:7:1" + "src": "1877:7:0" } ], - "id": 218, + "id": 169, "name": "FunctionCall", - "src": "1780:9:1" + "src": "1877:9:0" }, { "attributes": { @@ -2733,38 +4137,38 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 70, + "referencedDeclaration": 13, "type": "uint256", "value": "endTime" }, - "id": 219, + "id": 170, "name": "Identifier", - "src": "1793:7:1" + "src": "1890:7:0" } ], - "id": 220, + "id": 171, "name": "BinaryOperation", - "src": "1780:20:1" + "src": "1877:20:0" } ], - "id": 221, + "id": 172, "name": "BinaryOperation", - "src": "1754:46:1" + "src": "1851:46:0" } ], - "id": 222, + "id": 173, "name": "FunctionCall", - "src": "1746:55:1" + "src": "1843:55:0" } ], - "id": 223, + "id": 174, "name": "ExpressionStatement", - "src": "1746:55:1" + "src": "1843:55:0" }, { "attributes": { "assignments": [ - 225 + 176 ] }, "children": [ @@ -2772,7 +4176,7 @@ "attributes": { "constant": false, "name": "investor", - "scope": 247, + "scope": 209, "stateVariable": false, "storageLocation": "default", "type": "address", @@ -2785,14 +4189,14 @@ "name": "address", "type": "address" }, - "id": 224, + "id": 175, "name": "ElementaryTypeName", - "src": "1811:7:1" + "src": "1908:7:0" } ], - "id": 225, + "id": 176, "name": "VariableDeclaration", - "src": "1811:16:1" + "src": "1908:16:0" }, { "attributes": { @@ -2812,23 +4216,23 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 718, + "referencedDeclaration": 653, "type": "msg", "value": "msg" }, - "id": 226, + "id": 177, "name": "Identifier", - "src": "1830:3:1" + "src": "1927:3:0" } ], - "id": 227, + "id": 178, "name": "MemberAccess", - "src": "1830:10:1" + "src": "1927:10:0" } ], - "id": 228, + "id": 179, "name": "VariableDeclarationStatement", - "src": "1811:29:1" + "src": "1908:29:0" }, { "children": [ @@ -2859,13 +4263,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 82, + "referencedDeclaration": 23, "type": "mapping(address => uint256)", "value": "investorBalances" }, - "id": 229, + "id": 180, "name": "Identifier", - "src": "1850:16:1" + "src": "1947:16:0" }, { "attributes": { @@ -2873,18 +4277,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 225, + "referencedDeclaration": 176, "type": "address", "value": "investor" }, - "id": 230, + "id": 181, "name": "Identifier", - "src": "1867:8:1" + "src": "1964:8:0" } ], - "id": 231, + "id": 182, "name": "IndexAccess", - "src": "1850:26:1" + "src": "1947:26:0" }, { "attributes": { @@ -2904,28 +4308,28 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 718, + "referencedDeclaration": 653, "type": "msg", "value": "msg" }, - "id": 232, + "id": 183, "name": "Identifier", - "src": "1880:3:1" + "src": "1977:3:0" } ], - "id": 233, + "id": 184, "name": "MemberAccess", - "src": "1880:9:1" + "src": "1977:9:0" } ], - "id": 234, + "id": 185, "name": "Assignment", - "src": "1850:39:1" + "src": "1947:39:0" } ], - "id": 235, + "id": 186, "name": "ExpressionStatement", - "src": "1850:39:1" + "src": "1947:39:0" }, { "children": [ @@ -2946,13 +4350,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 76, + "referencedDeclaration": 17, "type": "uint256", "value": "totalInvestedInWei" }, - "id": 236, + "id": 187, "name": "Identifier", - "src": "1899:18:1" + "src": "1996:18:0" }, { "attributes": { @@ -2972,28 +4376,28 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 718, + "referencedDeclaration": 653, "type": "msg", "value": "msg" }, - "id": 237, + "id": 188, "name": "Identifier", - "src": "1921:3:1" + "src": "2018:3:0" } ], - "id": 238, + "id": 189, "name": "MemberAccess", - "src": "1921:9:1" + "src": "2018:9:0" } ], - "id": 239, + "id": 190, "name": "Assignment", - "src": "1899:31:1" + "src": "1996:31:0" } ], - "id": 240, + "id": 191, "name": "ExpressionStatement", - "src": "1899:31:1" + "src": "1996:31:0" }, { "children": [ @@ -3023,13 +4427,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 259, + "referencedDeclaration": 221, "type": "function (uint256)", "value": "forwardFunds" }, - "id": 241, + "id": 192, "name": "Identifier", - "src": "1940:12:1" + "src": "2037:12:0" }, { "attributes": { @@ -3049,38 +4453,215 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 718, + "referencedDeclaration": 653, "type": "msg", "value": "msg" }, - "id": 242, + "id": 193, "name": "Identifier", - "src": "1953:3:1" + "src": "2050:3:0" } ], - "id": 243, + "id": 194, "name": "MemberAccess", - "src": "1953:9:1" + "src": "2050:9:0" } ], - "id": 244, + "id": 195, "name": "FunctionCall", - "src": "1940:23:1" + "src": "2037:23:0" } ], - "id": 245, + "id": 196, "name": "ExpressionStatement", - "src": "1940:23:1" + "src": "2037: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_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 142, + "type": "function (address,uint256,uint256,uint256)", + "value": "Contribution" + }, + "id": 197, + "name": "Identifier", + "src": "2070:12: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": 653, + "type": "msg", + "value": "msg" + }, + "id": 198, + "name": "Identifier", + "src": "2083:3:0" + } + ], + "id": 199, + "name": "MemberAccess", + "src": "2083:10: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": 653, + "type": "msg", + "value": "msg" + }, + "id": 200, + "name": "Identifier", + "src": "2095:3:0" + } + ], + "id": 201, + "name": "MemberAccess", + "src": "2095:9:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 23, + "type": "mapping(address => uint256)", + "value": "investorBalances" + }, + "id": 202, + "name": "Identifier", + "src": "2106:16:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 176, + "type": "address", + "value": "investor" + }, + "id": 203, + "name": "Identifier", + "src": "2123:8:0" + } + ], + "id": 204, + "name": "IndexAccess", + "src": "2106:26:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 17, + "type": "uint256", + "value": "totalInvestedInWei" + }, + "id": 205, + "name": "Identifier", + "src": "2134:18:0" + } + ], + "id": 206, + "name": "FunctionCall", + "src": "2070:83:0" + } + ], + "id": 207, + "name": "ExpressionStatement", + "src": "2070:83:0" } ], - "id": 246, + "id": 208, "name": "Block", - "src": "1619:351:1" + "src": "1716:444:0" } ], - "id": 247, + "id": 209, "name": "FunctionDefinition", - "src": "1589:381:1" + "src": "1686:474:0" }, { "attributes": { @@ -3092,7 +4673,7 @@ ], "name": "forwardFunds", "payable": false, - "scope": 449, + "scope": 411, "stateMutability": "nonpayable", "superFunction": null, "visibility": "internal" @@ -3104,7 +4685,7 @@ "attributes": { "constant": false, "name": "_amount", - "scope": 259, + "scope": 221, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -3117,19 +4698,19 @@ "name": "uint256", "type": "uint256" }, - "id": 248, + "id": 210, "name": "ElementaryTypeName", - "src": "2030:7:1" + "src": "2220:7:0" } ], - "id": 249, + "id": 211, "name": "VariableDeclaration", - "src": "2030:15:1" + "src": "2220:15:0" } ], - "id": 250, + "id": 212, "name": "ParameterList", - "src": "2029:17:1" + "src": "2219:17:0" }, { "attributes": { @@ -3138,9 +4719,9 @@ ] }, "children": [], - "id": 251, + "id": 213, "name": "ParameterList", - "src": "2056:0:1" + "src": "2246:0:0" }, { "children": [ @@ -3184,18 +4765,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 90, + "referencedDeclaration": 31, "type": "address", "value": "vault" }, - "id": 252, + "id": 214, "name": "Identifier", - "src": "2066:5:1" + "src": "2256:5:0" } ], - "id": 254, + "id": 216, "name": "MemberAccess", - "src": "2066:14:1" + "src": "2256:14:0" }, { "attributes": { @@ -3203,33 +4784,33 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 249, + "referencedDeclaration": 211, "type": "uint256", "value": "_amount" }, - "id": 255, + "id": 217, "name": "Identifier", - "src": "2081:7:1" + "src": "2271:7:0" } ], - "id": 256, + "id": 218, "name": "FunctionCall", - "src": "2066:23:1" + "src": "2256:23:0" } ], - "id": 257, + "id": 219, "name": "ExpressionStatement", - "src": "2066:23:1" + "src": "2256:23:0" } ], - "id": 258, + "id": 220, "name": "Block", - "src": "2056:40:1" + "src": "2246:40:0" } ], - "id": 259, + "id": 221, "name": "FunctionDefinition", - "src": "2008:88:1" + "src": "2198:88:0" }, { "attributes": { @@ -3238,7 +4819,7 @@ "isConstructor": false, "name": "claimTokens", "payable": false, - "scope": 449, + "scope": 411, "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" @@ -3250,7 +4831,7 @@ "attributes": { "constant": false, "name": "_token", - "scope": 300, + "scope": 262, "stateVariable": false, "storageLocation": "default", "type": "address", @@ -3263,19 +4844,19 @@ "name": "address", "type": "address" }, - "id": 260, + "id": 222, "name": "ElementaryTypeName", - "src": "2150:7:1" + "src": "2340:7:0" } ], - "id": 261, + "id": 223, "name": "VariableDeclaration", - "src": "2150:14:1" + "src": "2340:14:0" } ], - "id": 262, + "id": 224, "name": "ParameterList", - "src": "2149:16:1" + "src": "2339:16:0" }, { "attributes": { @@ -3284,9 +4865,9 @@ ] }, "children": [], - "id": 265, + "id": 227, "name": "ParameterList", - "src": "2183:0:1" + "src": "2373:0:0" }, { "attributes": { @@ -3301,18 +4882,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 574, + "referencedDeclaration": 586, "type": "modifier ()", "value": "onlyOwner" }, - "id": 263, + "id": 225, "name": "Identifier", - "src": "2173:9:1" + "src": "2363:9:0" } ], - "id": 264, + "id": 226, "name": "ModifierInvocation", - "src": "2173:9:1" + "src": "2363:9:0" }, { "children": [ @@ -3342,13 +4923,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 261, + "referencedDeclaration": 223, "type": "address", "value": "_token" }, - "id": 266, + "id": 228, "name": "Identifier", - "src": "2197:6:1" + "src": "2387:6:0" }, { "attributes": { @@ -3363,14 +4944,14 @@ "type": "int_const 0", "value": "0x0" }, - "id": 267, + "id": 229, "name": "Literal", - "src": "2207:3:1" + "src": "2397:3:0" } ], - "id": 268, + "id": 230, "name": "BinaryOperation", - "src": "2197:13:1" + "src": "2387:13:0" }, { "children": [ @@ -3414,18 +4995,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 548, + "referencedDeclaration": 560, "type": "address", "value": "owner" }, - "id": 269, + "id": 231, "name": "Identifier", - "src": "2226:5:1" + "src": "2416:5:0" } ], - "id": 271, + "id": 233, "name": "MemberAccess", - "src": "2226:14:1" + "src": "2416:14:0" }, { "attributes": { @@ -3445,52 +5026,52 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 739, + "referencedDeclaration": 672, "type": "contract PresaleOracles", "value": "this" }, - "id": 272, + "id": 234, "name": "Identifier", - "src": "2241:4:1" + "src": "2431:4:0" } ], - "id": 273, + "id": 235, "name": "MemberAccess", - "src": "2241:12:1" + "src": "2431:12:0" } ], - "id": 274, + "id": 236, "name": "FunctionCall", - "src": "2226:28:1" + "src": "2416:28:0" } ], - "id": 275, + "id": 237, "name": "ExpressionStatement", - "src": "2226:28:1" + "src": "2416:28:0" }, { "attributes": { "expression": null, - "functionReturnParameters": 265 + "functionReturnParameters": 227 }, - "id": 276, + "id": 238, "name": "Return", - "src": "2268:7:1" + "src": "2458:7:0" } ], - "id": 277, + "id": 239, "name": "Block", - "src": "2212:73:1" + "src": "2402:73:0" } ], - "id": 278, + "id": 240, "name": "IfStatement", - "src": "2193:92:1" + "src": "2383:92:0" }, { "attributes": { "assignments": [ - 280 + 242 ] }, "children": [ @@ -3498,10 +5079,10 @@ "attributes": { "constant": false, "name": "token", - "scope": 300, + "scope": 262, "stateVariable": false, "storageLocation": "default", - "type": "contract BasicToken", + "type": "contract ERC20Basic", "value": null, "visibility": "internal" }, @@ -3509,18 +5090,18 @@ { "attributes": { "contractScope": null, - "name": "BasicToken", - "referencedDeclaration": 677, - "type": "contract BasicToken" + "name": "ERC20Basic", + "referencedDeclaration": 641, + "type": "contract ERC20Basic" }, - "id": 279, + "id": 241, "name": "UserDefinedTypeName", - "src": "2299:10:1" + "src": "2489:10:0" } ], - "id": 280, + "id": 242, "name": "VariableDeclaration", - "src": "2299:16:1" + "src": "2489:16:0" }, { "attributes": { @@ -3533,7 +5114,7 @@ "names": [ null ], - "type": "contract BasicToken", + "type": "contract ERC20Basic", "type_conversion": true }, "children": [ @@ -3548,13 +5129,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 677, - "type": "type(contract BasicToken)", - "value": "BasicToken" + "referencedDeclaration": 641, + "type": "type(contract ERC20Basic)", + "value": "ERC20Basic" }, - "id": 281, + "id": 243, "name": "Identifier", - "src": "2318:10:1" + "src": "2508:10:0" }, { "attributes": { @@ -3562,28 +5143,28 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 261, + "referencedDeclaration": 223, "type": "address", "value": "_token" }, - "id": 282, + "id": 244, "name": "Identifier", - "src": "2329:6:1" + "src": "2519:6:0" } ], - "id": 283, + "id": 245, "name": "FunctionCall", - "src": "2318:18:1" + "src": "2508:18:0" } ], - "id": 284, + "id": 246, "name": "VariableDeclarationStatement", - "src": "2299:37:1" + "src": "2489:37:0" }, { "attributes": { "assignments": [ - 286 + 248 ] }, "children": [ @@ -3591,7 +5172,7 @@ "attributes": { "constant": false, "name": "balance", - "scope": 300, + "scope": 262, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -3604,14 +5185,14 @@ "name": "uint256", "type": "uint256" }, - "id": 285, + "id": 247, "name": "ElementaryTypeName", - "src": "2346:7:1" + "src": "2536:7:0" } ], - "id": 286, + "id": 248, "name": "VariableDeclaration", - "src": "2346:15:1" + "src": "2536:15:0" }, { "attributes": { @@ -3632,7 +5213,7 @@ "attributes": { "argumentTypes": [ { - "typeIdentifier": "t_contract$_PresaleOracles_$449", + "typeIdentifier": "t_contract$_PresaleOracles_$411", "typeString": "contract PresaleOracles" } ], @@ -3641,7 +5222,7 @@ "isPure": false, "lValueRequested": false, "member_name": "balanceOf", - "referencedDeclaration": 676, + "referencedDeclaration": 623, "type": "function (address) view external returns (uint256)" }, "children": [ @@ -3651,18 +5232,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 280, - "type": "contract BasicToken", + "referencedDeclaration": 242, + "type": "contract ERC20Basic", "value": "token" }, - "id": 287, + "id": 249, "name": "Identifier", - "src": "2364:5:1" + "src": "2554:5:0" } ], - "id": 288, + "id": 250, "name": "MemberAccess", - "src": "2364:15:1" + "src": "2554:15:0" }, { "attributes": { @@ -3670,23 +5251,23 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 739, + "referencedDeclaration": 672, "type": "contract PresaleOracles", "value": "this" }, - "id": 289, + "id": 251, "name": "Identifier", - "src": "2380:4:1" + "src": "2570:4:0" } ], - "id": 290, + "id": 252, "name": "FunctionCall", - "src": "2364:21:1" + "src": "2554:21:0" } ], - "id": 291, + "id": 253, "name": "VariableDeclarationStatement", - "src": "2346:39:1" + "src": "2536:39:0" }, { "children": [ @@ -3722,7 +5303,7 @@ "isPure": false, "lValueRequested": false, "member_name": "transfer", - "referencedDeclaration": 664, + "referencedDeclaration": 632, "type": "function (address,uint256) external returns (bool)" }, "children": [ @@ -3732,18 +5313,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 280, - "type": "contract BasicToken", + "referencedDeclaration": 242, + "type": "contract ERC20Basic", "value": "token" }, - "id": 292, + "id": 254, "name": "Identifier", - "src": "2395:5:1" + "src": "2585:5:0" } ], - "id": 294, + "id": 256, "name": "MemberAccess", - "src": "2395:14:1" + "src": "2585:14:0" }, { "attributes": { @@ -3751,13 +5332,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 548, + "referencedDeclaration": 560, "type": "address", "value": "owner" }, - "id": 295, + "id": 257, "name": "Identifier", - "src": "2410:5:1" + "src": "2600:5:0" }, { "attributes": { @@ -3765,33 +5346,33 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 286, + "referencedDeclaration": 248, "type": "uint256", "value": "balance" }, - "id": 296, + "id": 258, "name": "Identifier", - "src": "2417:7:1" + "src": "2607:7:0" } ], - "id": 297, + "id": 259, "name": "FunctionCall", - "src": "2395:30:1" + "src": "2585:30:0" } ], - "id": 298, + "id": 260, "name": "ExpressionStatement", - "src": "2395:30:1" + "src": "2585:30:0" } ], - "id": 299, + "id": 261, "name": "Block", - "src": "2183:249:1" + "src": "2373:249:0" } ], - "id": 300, + "id": 262, "name": "FunctionDefinition", - "src": "2129:303:1" + "src": "2319:303:0" }, { "attributes": { @@ -3803,7 +5384,7 @@ ], "name": "getTime", "payable": false, - "scope": 449, + "scope": 411, "stateMutability": "view", "superFunction": null, "visibility": "internal" @@ -3816,9 +5397,9 @@ ] }, "children": [], - "id": 301, + "id": 263, "name": "ParameterList", - "src": "2454:2:1" + "src": "2644:2:0" }, { "children": [ @@ -3826,7 +5407,7 @@ "attributes": { "constant": false, "name": "", - "scope": 308, + "scope": 270, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -3839,25 +5420,25 @@ "name": "uint256", "type": "uint256" }, - "id": 302, + "id": 264, "name": "ElementaryTypeName", - "src": "2479:7:1" + "src": "2669:7:0" } ], - "id": 303, + "id": 265, "name": "VariableDeclaration", - "src": "2479:7:1" + "src": "2669:7:0" } ], - "id": 304, + "id": 266, "name": "ParameterList", - "src": "2478:9:1" + "src": "2668:9:0" }, { "children": [ { "attributes": { - "functionReturnParameters": 304 + "functionReturnParameters": 266 }, "children": [ { @@ -3866,28 +5447,28 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 720, + "referencedDeclaration": 655, "type": "uint256", "value": "now" }, - "id": 305, + "id": 267, "name": "Identifier", - "src": "2505:3:1" + "src": "2695:3:0" } ], - "id": 306, + "id": 268, "name": "Return", - "src": "2498:10:1" + "src": "2688:10:0" } ], - "id": 307, + "id": 269, "name": "Block", - "src": "2488:27:1" + "src": "2678:27:0" } ], - "id": 308, + "id": 270, "name": "FunctionDefinition", - "src": "2438:77:1" + "src": "2628:77:0" }, { "attributes": { @@ -3899,7 +5480,7 @@ ], "name": "isValidPurchase", "payable": false, - "scope": 449, + "scope": 411, "stateMutability": "view", "superFunction": null, "visibility": "public" @@ -3911,7 +5492,7 @@ "attributes": { "constant": false, "name": "_amount", - "scope": 349, + "scope": 311, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -3924,19 +5505,19 @@ "name": "uint256", "type": "uint256" }, - "id": 309, + "id": 271, "name": "ElementaryTypeName", - "src": "2573:7:1" + "src": "2763:7:0" } ], - "id": 310, + "id": 272, "name": "VariableDeclaration", - "src": "2573:15:1" + "src": "2763:15:0" } ], - "id": 311, + "id": 273, "name": "ParameterList", - "src": "2572:17:1" + "src": "2762:17:0" }, { "children": [ @@ -3944,7 +5525,7 @@ "attributes": { "constant": false, "name": "", - "scope": 349, + "scope": 311, "stateVariable": false, "storageLocation": "default", "type": "bool", @@ -3957,26 +5538,26 @@ "name": "bool", "type": "bool" }, - "id": 312, + "id": 274, "name": "ElementaryTypeName", - "src": "2610:4:1" + "src": "2800:4:0" } ], - "id": 313, + "id": 275, "name": "VariableDeclaration", - "src": "2610:4:1" + "src": "2800:4:0" } ], - "id": 314, + "id": 276, "name": "ParameterList", - "src": "2609:6:1" + "src": "2799:6:0" }, { "children": [ { "attributes": { "assignments": [ - 316 + 278 ] }, "children": [ @@ -3984,7 +5565,7 @@ "attributes": { "constant": false, "name": "nonZero", - "scope": 349, + "scope": 311, "stateVariable": false, "storageLocation": "default", "type": "bool", @@ -3997,14 +5578,14 @@ "name": "bool", "type": "bool" }, - "id": 315, + "id": 277, "name": "ElementaryTypeName", - "src": "2626:4:1" + "src": "2816:4:0" } ], - "id": 316, + "id": 278, "name": "VariableDeclaration", - "src": "2626:12:1" + "src": "2816:12:0" }, { "attributes": { @@ -4027,13 +5608,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 310, + "referencedDeclaration": 272, "type": "uint256", "value": "_amount" }, - "id": 317, + "id": 279, "name": "Identifier", - "src": "2641:7:1" + "src": "2831:7:0" }, { "attributes": { @@ -4048,24 +5629,24 @@ "type": "int_const 0", "value": "0" }, - "id": 318, + "id": 280, "name": "Literal", - "src": "2651:1:1" + "src": "2841:1:0" } ], - "id": 319, + "id": 281, "name": "BinaryOperation", - "src": "2641:11:1" + "src": "2831:11:0" } ], - "id": 320, + "id": 282, "name": "VariableDeclarationStatement", - "src": "2626:26:1" + "src": "2816:26:0" }, { "attributes": { "assignments": [ - 322 + 284 ] }, "children": [ @@ -4073,7 +5654,7 @@ "attributes": { "constant": false, "name": "hasMinimumAmount", - "scope": 349, + "scope": 311, "stateVariable": false, "storageLocation": "default", "type": "bool", @@ -4086,14 +5667,14 @@ "name": "bool", "type": "bool" }, - "id": 321, + "id": 283, "name": "ElementaryTypeName", - "src": "2662:4:1" + "src": "2852:4:0" } ], - "id": 322, + "id": 284, "name": "VariableDeclaration", - "src": "2662:21:1" + "src": "2852:21:0" }, { "attributes": { @@ -4138,7 +5719,7 @@ "isPure": false, "lValueRequested": false, "member_name": "add", - "referencedDeclaration": 543, + "referencedDeclaration": 505, "type": "function (uint256,uint256) view returns (uint256)" }, "children": [ @@ -4158,13 +5739,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 82, + "referencedDeclaration": 23, "type": "mapping(address => uint256)", "value": "investorBalances" }, - "id": 323, + "id": 285, "name": "Identifier", - "src": "2686:16:1" + "src": "2876:16:0" }, { "attributes": { @@ -4184,28 +5765,28 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 718, + "referencedDeclaration": 653, "type": "msg", "value": "msg" }, - "id": 324, + "id": 286, "name": "Identifier", - "src": "2703:3:1" + "src": "2893:3:0" } ], - "id": 325, + "id": 287, "name": "MemberAccess", - "src": "2703:10:1" + "src": "2893:10:0" } ], - "id": 326, + "id": 288, "name": "IndexAccess", - "src": "2686:28:1" + "src": "2876:28:0" } ], - "id": 327, + "id": 289, "name": "MemberAccess", - "src": "2686:32:1" + "src": "2876:32:0" }, { "attributes": { @@ -4213,18 +5794,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 310, + "referencedDeclaration": 272, "type": "uint256", "value": "_amount" }, - "id": 328, + "id": 290, "name": "Identifier", - "src": "2719:7:1" + "src": "2909:7:0" } ], - "id": 329, + "id": 291, "name": "FunctionCall", - "src": "2686:41:1" + "src": "2876:41:0" }, { "attributes": { @@ -4232,28 +5813,28 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 78, + "referencedDeclaration": 19, "type": "uint256", "value": "minimumContribution" }, - "id": 330, + "id": 292, "name": "Identifier", - "src": "2731:19:1" + "src": "2921:19:0" } ], - "id": 331, + "id": 293, "name": "BinaryOperation", - "src": "2686:64:1" + "src": "2876:64:0" } ], - "id": 332, + "id": 294, "name": "VariableDeclarationStatement", - "src": "2662:88:1" + "src": "2852:88:0" }, { "attributes": { "assignments": [ - 334 + 296 ] }, "children": [ @@ -4261,7 +5842,7 @@ "attributes": { "constant": false, "name": "withinCap", - "scope": 349, + "scope": 311, "stateVariable": false, "storageLocation": "default", "type": "bool", @@ -4274,14 +5855,14 @@ "name": "bool", "type": "bool" }, - "id": 333, + "id": 295, "name": "ElementaryTypeName", - "src": "2760:4:1" + "src": "2950:4:0" } ], - "id": 334, + "id": 296, "name": "VariableDeclaration", - "src": "2760:14:1" + "src": "2950:14:0" }, { "attributes": { @@ -4326,7 +5907,7 @@ "isPure": false, "lValueRequested": false, "member_name": "add", - "referencedDeclaration": 543, + "referencedDeclaration": 505, "type": "function (uint256,uint256) view returns (uint256)" }, "children": [ @@ -4336,18 +5917,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 76, + "referencedDeclaration": 17, "type": "uint256", "value": "totalInvestedInWei" }, - "id": 335, + "id": 297, "name": "Identifier", - "src": "2777:18:1" + "src": "2967:18:0" } ], - "id": 336, + "id": 298, "name": "MemberAccess", - "src": "2777:22:1" + "src": "2967:22:0" }, { "attributes": { @@ -4355,18 +5936,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 310, + "referencedDeclaration": 272, "type": "uint256", "value": "_amount" }, - "id": 337, + "id": 299, "name": "Identifier", - "src": "2800:7:1" + "src": "2990:7:0" } ], - "id": 338, + "id": 300, "name": "FunctionCall", - "src": "2777:31:1" + "src": "2967:31:0" }, { "attributes": { @@ -4374,27 +5955,27 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 72, + "referencedDeclaration": 15, "type": "uint256", "value": "cap" }, - "id": 339, + "id": 301, "name": "Identifier", - "src": "2812:3:1" + "src": "3002:3:0" } ], - "id": 340, + "id": 302, "name": "BinaryOperation", - "src": "2777:38:1" + "src": "2967:38:0" } ], - "id": 341, + "id": 303, "name": "VariableDeclarationStatement", - "src": "2760:55:1" + "src": "2950:55:0" }, { "attributes": { - "functionReturnParameters": 314 + "functionReturnParameters": 276 }, "children": [ { @@ -4433,13 +6014,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 322, + "referencedDeclaration": 284, "type": "bool", "value": "hasMinimumAmount" }, - "id": 342, + "id": 304, "name": "Identifier", - "src": "2832:16:1" + "src": "3022:16:0" }, { "attributes": { @@ -4447,18 +6028,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 334, + "referencedDeclaration": 296, "type": "bool", "value": "withinCap" }, - "id": 343, + "id": 305, "name": "Identifier", - "src": "2852:9:1" + "src": "3042:9:0" } ], - "id": 344, + "id": 306, "name": "BinaryOperation", - "src": "2832:29:1" + "src": "3022:29:0" }, { "attributes": { @@ -4466,33 +6047,33 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 316, + "referencedDeclaration": 278, "type": "bool", "value": "nonZero" }, - "id": 345, + "id": 307, "name": "Identifier", - "src": "2865:7:1" + "src": "3055:7:0" } ], - "id": 346, + "id": 308, "name": "BinaryOperation", - "src": "2832:40:1" + "src": "3022:40:0" } ], - "id": 347, + "id": 309, "name": "Return", - "src": "2825:47:1" + "src": "3015:47:0" } ], - "id": 348, + "id": 310, "name": "Block", - "src": "2616:263:1" + "src": "2806:263:0" } ], - "id": 349, + "id": 311, "name": "FunctionDefinition", - "src": "2548:331:1" + "src": "2738:331:0" }, { "attributes": { @@ -4501,7 +6082,7 @@ "isConstructor": false, "name": "whitelistInvestor", "payable": false, - "scope": 449, + "scope": 411, "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" @@ -4513,7 +6094,7 @@ "attributes": { "constant": false, "name": "_newInvestor", - "scope": 372, + "scope": 334, "stateVariable": false, "storageLocation": "default", "type": "address", @@ -4526,19 +6107,19 @@ "name": "address", "type": "address" }, - "id": 350, + "id": 312, "name": "ElementaryTypeName", - "src": "2939:7:1" + "src": "3129:7:0" } ], - "id": 351, + "id": 313, "name": "VariableDeclaration", - "src": "2939:20:1" + "src": "3129:20:0" } ], - "id": 352, + "id": 314, "name": "ParameterList", - "src": "2938:22:1" + "src": "3128:22:0" }, { "attributes": { @@ -4547,9 +6128,9 @@ ] }, "children": [], - "id": 355, + "id": 317, "name": "ParameterList", - "src": "2978:0:1" + "src": "3168:0:0" }, { "attributes": { @@ -4564,18 +6145,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 574, + "referencedDeclaration": 586, "type": "modifier ()", "value": "onlyOwner" }, - "id": 353, + "id": 315, "name": "Identifier", - "src": "2968:9:1" + "src": "3158:9:0" } ], - "id": 354, + "id": 316, "name": "ModifierInvocation", - "src": "2968:9:1" + "src": "3158:9:0" }, { "children": [ @@ -4612,13 +6193,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 86, + "referencedDeclaration": 27, "type": "mapping(address => bool)", "value": "whitelist" }, - "id": 356, + "id": 318, "name": "Identifier", - "src": "2992:9:1" + "src": "3182:9:0" }, { "attributes": { @@ -4626,23 +6207,23 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 351, + "referencedDeclaration": 313, "type": "address", "value": "_newInvestor" }, - "id": 357, + "id": 319, "name": "Identifier", - "src": "3002:12:1" + "src": "3192:12:0" } ], - "id": 358, + "id": 320, "name": "IndexAccess", - "src": "2992:23:1" + "src": "3182:23:0" } ], - "id": 359, + "id": 321, "name": "UnaryOperation", - "src": "2991:24:1" + "src": "3181:24:0" }, { "children": [ @@ -4675,13 +6256,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 86, + "referencedDeclaration": 27, "type": "mapping(address => bool)", "value": "whitelist" }, - "id": 360, + "id": 322, "name": "Identifier", - "src": "3031:9:1" + "src": "3221:9:0" }, { "attributes": { @@ -4689,18 +6270,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 351, + "referencedDeclaration": 313, "type": "address", "value": "_newInvestor" }, - "id": 361, + "id": 323, "name": "Identifier", - "src": "3041:12:1" + "src": "3231:12:0" } ], - "id": 362, + "id": 324, "name": "IndexAccess", - "src": "3031:23:1" + "src": "3221:23:0" }, { "attributes": { @@ -4715,19 +6296,19 @@ "type": "bool", "value": "true" }, - "id": 363, + "id": 325, "name": "Literal", - "src": "3057:4:1" + "src": "3247:4:0" } ], - "id": 364, + "id": 326, "name": "Assignment", - "src": "3031:30:1" + "src": "3221:30:0" } ], - "id": 365, + "id": 327, "name": "ExpressionStatement", - "src": "3031:30:1" + "src": "3221:30:0" }, { "children": [ @@ -4749,43 +6330,43 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 88, + "referencedDeclaration": 29, "type": "uint256", "value": "investorsLength" }, - "id": 366, + "id": 328, "name": "Identifier", - "src": "3075:15:1" + "src": "3265:15:0" } ], - "id": 367, + "id": 329, "name": "UnaryOperation", - "src": "3075:17:1" + "src": "3265:17:0" } ], - "id": 368, + "id": 330, "name": "ExpressionStatement", - "src": "3075:17:1" + "src": "3265:17:0" } ], - "id": 369, + "id": 331, "name": "Block", - "src": "3017:86:1" + "src": "3207:86:0" } ], - "id": 370, + "id": 332, "name": "IfStatement", - "src": "2988:115:1" + "src": "3178:115:0" } ], - "id": 371, + "id": 333, "name": "Block", - "src": "2978:131:1" + "src": "3168:131:0" } ], - "id": 372, + "id": 334, "name": "FunctionDefinition", - "src": "2912:197:1" + "src": "3102:197:0" }, { "attributes": { @@ -4794,7 +6375,7 @@ "isConstructor": false, "name": "whitelistInvestors", "payable": false, - "scope": 449, + "scope": 411, "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" @@ -4806,7 +6387,7 @@ "attributes": { "constant": false, "name": "_investors", - "scope": 422, + "scope": 384, "stateVariable": false, "storageLocation": "default", "type": "address[] calldata", @@ -4825,24 +6406,24 @@ "name": "address", "type": "address" }, - "id": 373, + "id": 335, "name": "ElementaryTypeName", - "src": "3170:7:1" + "src": "3360:7:0" } ], - "id": 374, + "id": 336, "name": "ArrayTypeName", - "src": "3170:9:1" + "src": "3360:9:0" } ], - "id": 375, + "id": 337, "name": "VariableDeclaration", - "src": "3170:20:1" + "src": "3360:20:0" } ], - "id": 376, + "id": 338, "name": "ParameterList", - "src": "3169:22:1" + "src": "3359:22:0" }, { "attributes": { @@ -4851,9 +6432,9 @@ ] }, "children": [], - "id": 379, + "id": 341, "name": "ParameterList", - "src": "3211:0:1" + "src": "3401:0:0" }, { "attributes": { @@ -4868,18 +6449,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 574, + "referencedDeclaration": 586, "type": "modifier ()", "value": "onlyOwner" }, - "id": 377, + "id": 339, "name": "Identifier", - "src": "3201:9:1" + "src": "3391:9:0" } ], - "id": 378, + "id": 340, "name": "ModifierInvocation", - "src": "3201:9:1" + "src": "3391:9:0" }, { "children": [ @@ -4911,13 +6492,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 721, + "referencedDeclaration": 656, "type": "function (bool) pure", "value": "require" }, - "id": 380, + "id": 342, "name": "Identifier", - "src": "3221:7:1" + "src": "3411:7:0" }, { "attributes": { @@ -4952,18 +6533,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 375, + "referencedDeclaration": 337, "type": "address[] calldata", "value": "_investors" }, - "id": 381, + "id": 343, "name": "Identifier", - "src": "3229:10:1" + "src": "3419:10:0" } ], - "id": 382, + "id": 344, "name": "MemberAccess", - "src": "3229:17:1" + "src": "3419:17:0" }, { "attributes": { @@ -4978,31 +6559,31 @@ "type": "int_const 250", "value": "250" }, - "id": 383, + "id": 345, "name": "Literal", - "src": "3250:3:1" + "src": "3440:3:0" } ], - "id": 384, + "id": 346, "name": "BinaryOperation", - "src": "3229:24:1" + "src": "3419:24:0" } ], - "id": 385, + "id": 347, "name": "FunctionCall", - "src": "3221:33:1" + "src": "3411:33:0" } ], - "id": 386, + "id": 348, "name": "ExpressionStatement", - "src": "3221:33:1" + "src": "3411:33:0" }, { "children": [ { "attributes": { "assignments": [ - 388 + 350 ] }, "children": [ @@ -5010,7 +6591,7 @@ "attributes": { "constant": false, "name": "i", - "scope": 422, + "scope": 384, "stateVariable": false, "storageLocation": "default", "type": "uint8", @@ -5023,14 +6604,14 @@ "name": "uint8", "type": "uint8" }, - "id": 387, + "id": 349, "name": "ElementaryTypeName", - "src": "3268:5:1" + "src": "3458:5:0" } ], - "id": 388, + "id": 350, "name": "VariableDeclaration", - "src": "3268:7:1" + "src": "3458:7:0" }, { "attributes": { @@ -5045,14 +6626,14 @@ "type": "int_const 0", "value": "0" }, - "id": 389, + "id": 351, "name": "Literal", - "src": "3276:1:1" + "src": "3466:1:0" } ], - "id": 390, + "id": 352, "name": "VariableDeclarationStatement", - "src": "3268:9:1" + "src": "3458:9:0" }, { "attributes": { @@ -5075,13 +6656,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 388, + "referencedDeclaration": 350, "type": "uint8", "value": "i" }, - "id": 391, + "id": 353, "name": "Identifier", - "src": "3279:1:1" + "src": "3469:1:0" }, { "attributes": { @@ -5101,23 +6682,23 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 375, + "referencedDeclaration": 337, "type": "address[] calldata", "value": "_investors" }, - "id": 392, + "id": 354, "name": "Identifier", - "src": "3281:10:1" + "src": "3471:10:0" } ], - "id": 393, + "id": 355, "name": "MemberAccess", - "src": "3281:17:1" + "src": "3471:17:0" } ], - "id": 394, + "id": 356, "name": "BinaryOperation", - "src": "3279:19:1" + "src": "3469:19:0" }, { "children": [ @@ -5139,30 +6720,30 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 388, + "referencedDeclaration": 350, "type": "uint8", "value": "i" }, - "id": 395, + "id": 357, "name": "Identifier", - "src": "3299:1:1" + "src": "3489:1:0" } ], - "id": 396, + "id": 358, "name": "UnaryOperation", - "src": "3299:3:1" + "src": "3489:3:0" } ], - "id": 397, + "id": 359, "name": "ExpressionStatement", - "src": "3299:3:1" + "src": "3489:3:0" }, { "children": [ { "attributes": { "assignments": [ - 399 + 361 ] }, "children": [ @@ -5170,7 +6751,7 @@ "attributes": { "constant": false, "name": "newInvestor", - "scope": 422, + "scope": 384, "stateVariable": false, "storageLocation": "default", "type": "address", @@ -5183,14 +6764,14 @@ "name": "address", "type": "address" }, - "id": 398, + "id": 360, "name": "ElementaryTypeName", - "src": "3318:7:1" + "src": "3508:7:0" } ], - "id": 399, + "id": 361, "name": "VariableDeclaration", - "src": "3318:19:1" + "src": "3508:19:0" }, { "attributes": { @@ -5208,13 +6789,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 375, + "referencedDeclaration": 337, "type": "address[] calldata", "value": "_investors" }, - "id": 400, + "id": 362, "name": "Identifier", - "src": "3340:10:1" + "src": "3530:10:0" }, { "attributes": { @@ -5222,23 +6803,23 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 388, + "referencedDeclaration": 350, "type": "uint8", "value": "i" }, - "id": 401, + "id": 363, "name": "Identifier", - "src": "3351:1:1" + "src": "3541:1:0" } ], - "id": 402, + "id": 364, "name": "IndexAccess", - "src": "3340:13:1" + "src": "3530:13:0" } ], - "id": 403, + "id": 365, "name": "VariableDeclarationStatement", - "src": "3318:35:1" + "src": "3508:35:0" }, { "attributes": { @@ -5273,13 +6854,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 86, + "referencedDeclaration": 27, "type": "mapping(address => bool)", "value": "whitelist" }, - "id": 404, + "id": 366, "name": "Identifier", - "src": "3371:9:1" + "src": "3561:9:0" }, { "attributes": { @@ -5287,23 +6868,23 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 399, + "referencedDeclaration": 361, "type": "address", "value": "newInvestor" }, - "id": 405, + "id": 367, "name": "Identifier", - "src": "3381:11:1" + "src": "3571:11:0" } ], - "id": 406, + "id": 368, "name": "IndexAccess", - "src": "3371:22:1" + "src": "3561:22:0" } ], - "id": 407, + "id": 369, "name": "UnaryOperation", - "src": "3370:23:1" + "src": "3560:23:0" }, { "children": [ @@ -5336,13 +6917,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 86, + "referencedDeclaration": 27, "type": "mapping(address => bool)", "value": "whitelist" }, - "id": 408, + "id": 370, "name": "Identifier", - "src": "3413:9:1" + "src": "3603:9:0" }, { "attributes": { @@ -5350,18 +6931,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 399, + "referencedDeclaration": 361, "type": "address", "value": "newInvestor" }, - "id": 409, + "id": 371, "name": "Identifier", - "src": "3423:11:1" + "src": "3613:11:0" } ], - "id": 410, + "id": 372, "name": "IndexAccess", - "src": "3413:22:1" + "src": "3603:22:0" }, { "attributes": { @@ -5376,19 +6957,19 @@ "type": "bool", "value": "true" }, - "id": 411, + "id": 373, "name": "Literal", - "src": "3438:4:1" + "src": "3628:4:0" } ], - "id": 412, + "id": 374, "name": "Assignment", - "src": "3413:29:1" + "src": "3603:29:0" } ], - "id": 413, + "id": 375, "name": "ExpressionStatement", - "src": "3413:29:1" + "src": "3603:29:0" }, { "children": [ @@ -5410,53 +6991,53 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 88, + "referencedDeclaration": 29, "type": "uint256", "value": "investorsLength" }, - "id": 414, + "id": 376, "name": "Identifier", - "src": "3460:15:1" + "src": "3650:15:0" } ], - "id": 415, + "id": 377, "name": "UnaryOperation", - "src": "3460:17:1" + "src": "3650:17:0" } ], - "id": 416, + "id": 378, "name": "ExpressionStatement", - "src": "3460:17:1" + "src": "3650:17:0" } ], - "id": 417, + "id": 379, "name": "Block", - "src": "3395:97:1" + "src": "3585:97:0" } ], - "id": 418, + "id": 380, "name": "IfStatement", - "src": "3367:125:1" + "src": "3557:125:0" } ], - "id": 419, + "id": 381, "name": "Block", - "src": "3304:198:1" + "src": "3494:198:0" } ], - "id": 420, + "id": 382, "name": "ForStatement", - "src": "3264:238:1" + "src": "3454:238:0" } ], - "id": 421, + "id": 383, "name": "Block", - "src": "3211:297:1" + "src": "3401:297:0" } ], - "id": 422, + "id": 384, "name": "FunctionDefinition", - "src": "3142:366:1" + "src": "3332:366:0" }, { "attributes": { @@ -5465,7 +7046,7 @@ "isConstructor": false, "name": "blacklistInvestor", "payable": false, - "scope": 449, + "scope": 411, "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" @@ -5477,7 +7058,7 @@ "attributes": { "constant": false, "name": "_investor", - "scope": 448, + "scope": 410, "stateVariable": false, "storageLocation": "default", "type": "address", @@ -5490,19 +7071,19 @@ "name": "address", "type": "address" }, - "id": 423, + "id": 385, "name": "ElementaryTypeName", - "src": "3540:7:1" + "src": "3730:7:0" } ], - "id": 424, + "id": 386, "name": "VariableDeclaration", - "src": "3540:17:1" + "src": "3730:17:0" } ], - "id": 425, + "id": 387, "name": "ParameterList", - "src": "3539:19:1" + "src": "3729:19:0" }, { "attributes": { @@ -5511,9 +7092,9 @@ ] }, "children": [], - "id": 428, + "id": 390, "name": "ParameterList", - "src": "3576:0:1" + "src": "3766:0:0" }, { "attributes": { @@ -5528,18 +7109,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 574, + "referencedDeclaration": 586, "type": "modifier ()", "value": "onlyOwner" }, - "id": 426, + "id": 388, "name": "Identifier", - "src": "3566:9:1" + "src": "3756:9:0" } ], - "id": 427, + "id": 389, "name": "ModifierInvocation", - "src": "3566:9:1" + "src": "3756:9:0" }, { "children": [ @@ -5564,13 +7145,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 86, + "referencedDeclaration": 27, "type": "mapping(address => bool)", "value": "whitelist" }, - "id": 429, + "id": 391, "name": "Identifier", - "src": "3589:9:1" + "src": "3779:9:0" }, { "attributes": { @@ -5578,18 +7159,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 424, + "referencedDeclaration": 386, "type": "address", "value": "_investor" }, - "id": 430, + "id": 392, "name": "Identifier", - "src": "3599:9:1" + "src": "3789:9:0" } ], - "id": 431, + "id": 393, "name": "IndexAccess", - "src": "3589:20:1" + "src": "3779:20:0" }, { "children": [ @@ -5623,13 +7204,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 86, + "referencedDeclaration": 27, "type": "mapping(address => bool)", "value": "whitelist" }, - "id": 432, + "id": 394, "name": "Identifier", - "src": "3632:9:1" + "src": "3822:9:0" }, { "attributes": { @@ -5637,28 +7218,28 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 424, + "referencedDeclaration": 386, "type": "address", "value": "_investor" }, - "id": 433, + "id": 395, "name": "Identifier", - "src": "3642:9:1" + "src": "3832:9:0" } ], - "id": 434, + "id": 396, "name": "IndexAccess", - "src": "3632:20:1" + "src": "3822:20:0" } ], - "id": 435, + "id": 397, "name": "UnaryOperation", - "src": "3625:27:1" + "src": "3815:27:0" } ], - "id": 436, + "id": 398, "name": "ExpressionStatement", - "src": "3625:27:1" + "src": "3815:27:0" }, { "attributes": { @@ -5686,13 +7267,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 88, + "referencedDeclaration": 29, "type": "uint256", "value": "investorsLength" }, - "id": 437, + "id": 399, "name": "Identifier", - "src": "3669:15:1" + "src": "3859:15:0" }, { "attributes": { @@ -5707,14 +7288,14 @@ "type": "int_const 0", "value": "0" }, - "id": 438, + "id": 400, "name": "Literal", - "src": "3688:1:1" + "src": "3878:1:0" } ], - "id": 439, + "id": 401, "name": "BinaryOperation", - "src": "3669:20:1" + "src": "3859:20:0" }, { "children": [ @@ -5738,63 +7319,63 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 88, + "referencedDeclaration": 29, "type": "uint256", "value": "investorsLength" }, - "id": 440, + "id": 402, "name": "Identifier", - "src": "3709:15:1" + "src": "3899:15:0" } ], - "id": 441, + "id": 403, "name": "UnaryOperation", - "src": "3709:17:1" + "src": "3899:17:0" } ], - "id": 442, + "id": 404, "name": "ExpressionStatement", - "src": "3709:17:1" + "src": "3899:17:0" } ], - "id": 443, + "id": 405, "name": "Block", - "src": "3691:50:1" + "src": "3881:50:0" } ], - "id": 444, + "id": 406, "name": "IfStatement", - "src": "3666:75:1" + "src": "3856:75:0" } ], - "id": 445, + "id": 407, "name": "Block", - "src": "3611:140:1" + "src": "3801:140:0" } ], - "id": 446, + "id": 408, "name": "IfStatement", - "src": "3586:165:1" + "src": "3776:165:0" } ], - "id": 447, + "id": 409, "name": "Block", - "src": "3576:181:1" + "src": "3766:181:0" } ], - "id": 448, + "id": 410, "name": "FunctionDefinition", - "src": "3513:244:1" + "src": "3703:244:0" } ], - "id": 449, + "id": 411, "name": "ContractDefinition", - "src": "202:3557:1" + "src": "204:3745:0" } ], - "id": 450, + "id": 412, "name": "SourceUnit", - "src": "0:3759:1" + "src": "0:3949:0" }, "compiler": { "name": "solc", @@ -5802,5 +7383,5 @@ }, "networks": {}, "schemaVersion": "1.0.1", - "updatedAt": "2017-11-12T02:35:24.158Z" + "updatedAt": "2017-11-15T06:13:42.801Z" } \ No newline at end of file diff --git a/contracts/PresaleOracles.sol b/contracts/PresaleOracles.sol index f00feff..52e168c 100644 --- a/contracts/PresaleOracles.sol +++ b/contracts/PresaleOracles.sol @@ -1,8 +1,8 @@ import "zeppelin-solidity/contracts/math/SafeMath.sol"; -import "zeppelin-solidity/contracts/token/BasicToken.sol"; +import "zeppelin-solidity/contracts/token/ERC20Basic.sol"; import "zeppelin-solidity/contracts/ownership/Claimable.sol"; -pragma solidity ^0.4.17; +pragma solidity ^0.4.18; contract PresaleOracles is Claimable { /* @@ -14,7 +14,6 @@ contract PresaleOracles is Claimable { uint256 public startTime; uint256 public endTime; uint256 public cap; - uint256 public rate; uint256 public totalInvestedInWei; uint256 public minimumContribution; mapping(address => uint256) public investorBalances; @@ -47,6 +46,7 @@ contract PresaleOracles is Claimable { vault = _vault; } //TESTED by Roman Storm + event Contribution(address indexed investor, uint256 investorAmount, uint256 investorTotal, uint256 totalAmount); function buy() public payable { require(whitelist[msg.sender]); require(isValidPurchase(msg.value)); @@ -56,6 +56,7 @@ contract PresaleOracles is Claimable { investorBalances[investor] += msg.value; totalInvestedInWei += msg.value; forwardFunds(msg.value); + Contribution(msg.sender, msg.value, investorBalances[investor], totalInvestedInWei); } //TESTED by Roman Storm @@ -69,7 +70,7 @@ contract PresaleOracles is Claimable { return; } - BasicToken token = BasicToken(_token); + ERC20Basic token = ERC20Basic(_token); uint256 balance = token.balanceOf(this); token.transfer(owner, balance); } diff --git a/flat/PresaleOracles_flat.sol b/flat/PresaleOracles_flat.sol index a49d20b..3a759c1 100644 --- a/flat/PresaleOracles_flat.sol +++ b/flat/PresaleOracles_flat.sol @@ -99,37 +99,6 @@ contract ERC20Basic { event Transfer(address indexed from, address indexed to, uint256 value); } -contract BasicToken is ERC20Basic { - using SafeMath for uint256; - - mapping(address => uint256) balances; - - /** - * @dev transfer token for a specified address - * @param _to The address to transfer to. - * @param _value The amount to be transferred. - */ - function transfer(address _to, uint256 _value) public returns (bool) { - require(_to != address(0)); - - // SafeMath.sub will throw if there is not enough balance. - balances[msg.sender] = balances[msg.sender].sub(_value); - balances[_to] = balances[_to].add(_value); - Transfer(msg.sender, _to, _value); - return true; - } - - /** - * @dev Gets the balance of the specified address. - * @param _owner The address to query the the balance of. - * @return An uint256 representing the amount owned by the passed address. - */ - function balanceOf(address _owner) public constant returns (uint256 balance) { - return balances[_owner]; - } - -} - contract PresaleOracles is Claimable { /* * PresaleOracles @@ -140,7 +109,6 @@ contract PresaleOracles is Claimable { uint256 public startTime; uint256 public endTime; uint256 public cap; - uint256 public rate; uint256 public totalInvestedInWei; uint256 public minimumContribution; mapping(address => uint256) public investorBalances; @@ -173,6 +141,7 @@ contract PresaleOracles is Claimable { vault = _vault; } //TESTED by Roman Storm + event Contribution(address indexed investor, uint256 investorAmount, uint256 investorTotal, uint256 totalAmount); function buy() public payable { require(whitelist[msg.sender]); require(isValidPurchase(msg.value)); @@ -182,6 +151,7 @@ contract PresaleOracles is Claimable { investorBalances[investor] += msg.value; totalInvestedInWei += msg.value; forwardFunds(msg.value); + Contribution(msg.sender, msg.value, investorBalances[investor], totalInvestedInWei); } //TESTED by Roman Storm @@ -195,7 +165,7 @@ contract PresaleOracles is Claimable { return; } - BasicToken token = BasicToken(_token); + ERC20Basic token = ERC20Basic(_token); uint256 balance = token.balanceOf(this); token.transfer(owner, balance); }