diff --git a/.storybook/config.js b/.storybook/config.js index d7f5ee9..030ae93 100755 --- a/.storybook/config.js +++ b/.storybook/config.js @@ -1,10 +1,10 @@ import React from 'react' import { configure, addDecorator } from '@storybook/react' import { host } from 'storybook-host' -import { combineReducers, applyMiddleware, createStore } from 'redux' +import { combineReducers, createStore } from 'redux' import { Provider } from 'react-redux' import { MemoryRouter } from 'react-router-dom' -import ReduxToastr, { reducer as toastr } from 'react-redux-toastr' +import { reducer as toastr } from 'react-redux-toastr' import GlobalComponents from '../src/bootstrap/global-components' @@ -19,13 +19,7 @@ addDecorator( ) // Integration Wrapper -const store = createStore( - combineReducers({ toastr }), - applyMiddleware(store => next => action => { - console.log(action) - return next(action) - }) -) +const store = createStore(combineReducers({ toastr })) addDecorator(story => (
diff --git a/netlify.toml b/netlify.toml new file mode 100644 index 0000000..1f9ffa0 --- /dev/null +++ b/netlify.toml @@ -0,0 +1,2 @@ +[context.production.environment] + REACT_APP_BRANCH = "master" diff --git a/package.json b/package.json index 0e42b93..5090429 100755 --- a/package.json +++ b/package.json @@ -28,6 +28,7 @@ "build:analyze": "source-map-explorer build/static/js/main.*" }, "jest": { + "snapshotSerializers": ["enzyme-to-json/serializer"], "collectCoverageFrom": [ "src/**/*.js", "!src/*.js", @@ -46,9 +47,11 @@ "@storybook/addons": "^3.3.10", "@storybook/react": "^3.3.10", "@storybook/storybook-deployer": "^2.2.0", + "colors": "^1.2.4", "coveralls": "^3.0.0", "enzyme": "^3.3.0", "enzyme-adapter-react-16": "^1.1.1", + "enzyme-to-json": "^3.3.3", "esdoc": "^1.0.4", "esdoc-ecmascript-proposal-plugin": "^1.0.0", "esdoc-standard-plugin": "^1.0.0", @@ -60,6 +63,7 @@ "node-sass-chokidar": "^0.0.3", "npm-run-all": "^4.1.2", "prettier": "^1.10.2", + "prompt": "^1.0.0", "prop-types": "^15.6.0", "react-test-renderer": "^16.2.0", "redux-immutable-state-invariant": "^2.1.0", @@ -72,14 +76,17 @@ "dependencies": { "create-redux-form": "^0.1.2", "ethjs": "^0.3.3", + "ethjs-account": "^0.1.4", "history": "^4.7.2", "lessdux": "^0.7.0", "normalize.css": "^7.0.0", + "qrcode": "^1.2.0", "react": "^16.2.0", "react-addons-css-transition-group": "^15.6.2", "react-blockies": "^1.2.2", "react-dom": "^16.2.0", "react-helmet": "^5.2.0", + "react-joyride": "^1.11.4", "react-minimal-pie-chart": "^3.0.1", "react-redux": "^5.0.6", "react-redux-toastr": "^7.2.3", diff --git a/public/_redirects b/public/_redirects new file mode 100644 index 0000000..ad37e2c --- /dev/null +++ b/public/_redirects @@ -0,0 +1 @@ +/* /index.html 200 diff --git a/public/index.html b/public/index.html index d8eade3..c1e26c7 100755 --- a/public/index.html +++ b/public/index.html @@ -21,6 +21,7 @@ Learn how to configure a non-root public URL by running `npm run build`. --> Open IICO + diff --git a/src/assets/contracts/IICO.json b/src/assets/contracts/IICO.json index 64c93e3..8666fe8 100644 --- a/src/assets/contracts/IICO.json +++ b/src/assets/contracts/IICO.json @@ -1,6 +1,20 @@ { - "contractName": "IICO", + "contractName": "LevelWhitelistedIICO", "abi": [ + { + "constant": false, + "inputs": [ + { + "name": "_maxIt", + "type": "uint256" + } + ], + "name": "finalize", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], @@ -15,6 +29,20 @@ "stateMutability": "view", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "name": "_token", + "type": "address" + } + ], + "name": "setToken", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], @@ -66,6 +94,53 @@ "stateMutability": "view", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "whitelister", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "address" + } + ], + "name": "baseWhitelist", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_bidID", + "type": "uint256" + } + ], + "name": "withdraw", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], @@ -127,7 +202,7 @@ "type": "uint256" }, { - "name": "maxVal", + "name": "maxValuation", "type": "uint256" }, { @@ -155,6 +230,36 @@ "stateMutability": "view", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "valuationAndCutOff", + "outputs": [ + { + "name": "valuation", + "type": "uint256" + }, + { + "name": "virtualValuation", + "type": "uint256" + }, + { + "name": "currentCutOffBidID", + "type": "uint256" + }, + { + "name": "currentCutOffBidmaxValuation", + "type": "uint256" + }, + { + "name": "currentCutOffBidContrib", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": true, "inputs": [], @@ -183,6 +288,39 @@ "stateMutability": "view", "type": "function" }, + { + "constant": true, + "inputs": [ + { + "name": "_contributor", + "type": "address" + } + ], + "name": "totalContrib", + "outputs": [ + { + "name": "contribution", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "bonus", + "outputs": [ + { + "name": "b", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": true, "inputs": [], @@ -211,6 +349,20 @@ "stateMutability": "view", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "maximumBaseContribution", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": true, "inputs": [], @@ -225,6 +377,80 @@ "stateMutability": "view", "type": "function" }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "address" + } + ], + "name": "reinforcedWhitelist", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_maxValuation", + "type": "uint256" + }, + { + "name": "_nextStart", + "type": "uint256" + } + ], + "name": "search", + "outputs": [ + { + "name": "nextInsert", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_maxValuation", + "type": "uint256" + }, + { + "name": "_next", + "type": "uint256" + } + ], + "name": "searchAndBid", + "outputs": [], + "payable": true, + "stateMutability": "payable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_bidID", + "type": "uint256" + } + ], + "name": "redeem", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], @@ -292,6 +518,10 @@ { "name": "_beneficiary", "type": "address" + }, + { + "name": "_maximumBaseContribution", + "type": "uint256" } ], "payable": false, @@ -304,24 +534,32 @@ "type": "fallback" }, { - "constant": false, + "anonymous": false, "inputs": [ { - "name": "_token", + "indexed": true, + "name": "contributor", "type": "address" + }, + { + "indexed": true, + "name": "bidID", + "type": "uint256" + }, + { + "indexed": true, + "name": "time", + "type": "uint256" } ], - "name": "setToken", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "name": "BidSubmitted", + "type": "event" }, { "constant": false, "inputs": [ { - "name": "_maxVal", + "name": "_maxValuation", "type": "uint256" }, { @@ -339,29 +577,25 @@ "constant": false, "inputs": [ { - "name": "_maxVal", - "type": "uint256" - }, - { - "name": "_next", - "type": "uint256" + "name": "_whitelister", + "type": "address" } ], - "name": "searchAndBid", + "name": "setWhitelister", "outputs": [], - "payable": true, - "stateMutability": "payable", + "payable": false, + "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { - "name": "_bidID", - "type": "uint256" + "name": "_buyersToWhitelist", + "type": "address[]" } ], - "name": "withdraw", + "name": "addBaseWhitelist", "outputs": [], "payable": false, "stateMutability": "nonpayable", @@ -371,11 +605,11 @@ "constant": false, "inputs": [ { - "name": "_maxIt", - "type": "uint256" + "name": "_buyersToWhitelist", + "type": "address[]" } ], - "name": "finalize", + "name": "addReinforcedWhitelist", "outputs": [], "payable": false, "stateMutability": "nonpayable", @@ -385,174 +619,122 @@ "constant": false, "inputs": [ { - "name": "_bidID", - "type": "uint256" + "name": "_buyersToRemove", + "type": "address[]" } ], - "name": "redeem", + "name": "removeBaseWhitelist", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, + "constant": false, "inputs": [ { - "name": "_maxVal", - "type": "uint256" - }, - { - "name": "_nextStart", - "type": "uint256" - } - ], - "name": "search", - "outputs": [ - { - "name": "nextInsert", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "bonus", - "outputs": [ - { - "name": "b", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_contributor", - "type": "address" - } - ], - "name": "totalContrib", - "outputs": [ - { - "name": "contribution", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "valuationAndCutOff", - "outputs": [ - { - "name": "valuation", - "type": "uint256" - }, - { - "name": "virtualValuation", - "type": "uint256" - }, - { - "name": "cutOffBidID", - "type": "uint256" - }, - { - "name": "cutOffBidMaxVal", - "type": "uint256" - }, - { - "name": "cutOffBidContrib", - "type": "uint256" + "name": "_buyersToRemove", + "type": "address[]" } ], + "name": "removeReinforcedWhitelist", + "outputs": [], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" } ], "bytecode": - "0x606060405260006004557fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600d55341561003857600080fd5b60405160c080611bad83398101604052808051906020019091908051906020019091908051906020019091908051906020019091908051906020019091908051906020019091905050336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508560058190555084600554016006819055508360065401600781905550826007540160088190555081600b8190555080600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610100604051908101604052807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81526020017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8152602001600081526020016000815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff1681526020016000151581526020016000151581525060026000808152602001908152602001600020600082015181600001556020820151816001015560408201518160020155606082015181600301556080820151816004015560a08201518160050160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060c08201518160050160146101000a81548160ff02191690831515021790555060e08201518160050160156101000a81548160ff0219169083151502179055509050506101006040519081016040528060008152602001600081526020017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81526020016000815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff16815260200160001515815260200160001515815250600260007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8152602001908152602001600020600082015181600001556020820151816001015560408201518160020155606082015181600301556080820151816004015560a08201518160050160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060c08201518160050160146101000a81548160ff02191690831515021790555060e08201518160050160156101000a81548160ff0219169083151502179055509050505050505050506117928061041b6000396000f300606060405260043610610154576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806305261aea1461033457806312aef8c314610357578063144fa6d714610380578063152713b3146103b95780631ae9fe6a146103e25780631def6bad1461040b5780632e1a7d4d146104615780633197cbb61461048457806334f732e8146104ad57806338af3eed146104d65780634423c5f11461052b57806347ab58ec146105c757806354c5b6961461060c57806357f196fa146106355780635e7c85b11461065e57806375b4d78c146106ab57806378e97925146106d45780638da5cb5b146106fd578063b3f05b9714610752578063b821da1b1461077f578063c68ee9cd146107a0578063ce160edd146107e0578063db006a7514610801578063dc382cbf14610824578063f0d6cc701461084d578063fc0c546a14610876575b600080341415801561016857506005544210155b8015610175575060085442105b156101c9576101c47ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6108cb565b610331565b6000341480156101e55750600c60009054906101000a900460ff165b1561033057600090505b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208054905081101561032f5760026000600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208381548110151561028957fe5b906000526020600020900154815260200190815260200160002060050160159054906101000a900460ff16151561031f5761031a600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208281548110151561030957fe5b906000526020600020900154610b05565b610324565b600080fd5b8060010190506101ef565b5b5b50005b341561033f57600080fd5b6103556004808035906020019091905050610d5d565b005b341561036257600080fd5b61036a610f91565b6040518082815260200191505060405180910390f35b341561038b57600080fd5b6103b7600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610f97565b005b34156103c457600080fd5b6103cc611156565b6040518082815260200191505060405180910390f35b34156103ed57600080fd5b6103f561115c565b6040518082815260200191505060405180910390f35b341561041657600080fd5b61044b600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050611162565b6040518082815260200191505060405180910390f35b341561046c57600080fd5b6104826004808035906020019091905050611193565b005b341561048f57600080fd5b610497611309565b6040518082815260200191505060405180910390f35b34156104b857600080fd5b6104c061130f565b6040518082815260200191505060405180910390f35b34156104e157600080fd5b6104e9611315565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561053657600080fd5b61054c600480803590602001909190505061133b565b604051808981526020018881526020018781526020018681526020018581526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183151515158152602001821515151581526020019850505050505050505060405180910390f35b34156105d257600080fd5b6105da6113bd565b604051808681526020018581526020018481526020018381526020018281526020019550505050505060405180910390f35b341561061757600080fd5b61061f6114d9565b6040518082815260200191505060405180910390f35b341561064057600080fd5b6106486114df565b6040518082815260200191505060405180910390f35b341561066957600080fd5b610695600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506114e5565b6040518082815260200191505060405180910390f35b34156106b657600080fd5b6106be6115ba565b6040518082815260200191505060405180910390f35b34156106df57600080fd5b6106e7611603565b6040518082815260200191505060405180910390f35b341561070857600080fd5b610710611609565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561075d57600080fd5b61076561162e565b604051808215151515815260200191505060405180910390f35b61079e60048080359060200190919080359060200190919050506108cb565b005b34156107ab57600080fd5b6107ca6004808035906020019091908035906020019091905050611641565b6040518082815260200191505060405180910390f35b6107ff60048080359060200190919080359060200190919050506116cc565b005b341561080c57600080fd5b6108226004808035906020019091905050610b05565b005b341561082f57600080fd5b6108376116e3565b6040518082815260200191505060405180910390f35b341561085857600080fd5b6108606116e9565b6040518082815260200191505060405180910390f35b341561088157600080fd5b6108896116ef565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b600080600060026000858152602001908152602001600020925082600001549150600260008381526020019081526020016000209050806002015485101580156109185750826002015485105b151561092357600080fd5b6005544210158015610936575060085442105b151561094157600080fd5b6004600081546001019190508190555060045481600101819055506004548360000181905550610100604051908101604052808381526020018581526020018681526020013481526020016109946115ba565b81526020013373ffffffffffffffffffffffffffffffffffffffff16815260200160001515815260200160001515815250600260006004548152602001908152602001600020600082015181600001556020820151816001015560408201518160020155606082015181600301556080820151816004015560a08201518160050160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060c08201518160050160146101000a81548160ff02191690831515021790555060e08201518160050160156101000a81548160ff021916908315150217905550905050600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208054806001018281610ae79190611715565b91600052602060002090016000600454909190915055505050505050565b60008060026000848152602001908152602001600020915060026000600d5481526020019081526020016000209050600c60009054906101000a900460ff161515610b4f57600080fd5b8160050160159054906101000a900460ff16151515610b6d57600080fd5b60018260050160156101000a81548160ff021916908315150217905550806002015482600201541180610bb5575080600201548260020154148015610bb45750600d548310155b5b15610cef57600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8360050160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600f54633b9aca008660040154876003015402811515610c3957fe5b04866003015401600a5402811515610c4d57fe5b046040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1515610cd257600080fd5b5af11515610cdf57600080fd5b5050506040518051905050610d58565b8160050160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc83600301549081150290604051600060405180830381858888f193505050501515610d5757600080fd5b5b505050565b6000806000806000806008544210151515610d7757600080fd5b600c60009054906101000a900460ff16151515610d9357600080fd5b600d549550600e549450600f549350600092505b8683108015610dc35750600c60009054906101000a900460ff16155b15610f73576002600087815260200190815260200160002091508160020154858360030154011015610e2857816003015485019450633b9aca008260040154836003015402811515610e1157fe5b048260030154018401935081600001549550610f68565b6001600c60006101000a81548160ff0219169083151502179055508482600201541015610e56576000610e5e565b848260020154035b905081600301548110610e75578160030154610e77565b805b90508160050160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc828460030154039081150290604051600060405180830381858888f1935050505050808260030181905550816003015485019450633b9aca008260040154836003015402811515610f0457fe5b0482600301540184019350600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc869081150290604051600060405180830381858888f19350505050505b826001019250610da7565b85600d8190555084600e8190555083600f8190555050505050505050565b600a5481565b3373ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515610ff257600080fd5b6000600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561103957600080fd5b80600960006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b151561113657600080fd5b5af1151561114357600080fd5b50505060405180519050600a8190555050565b600f5481565b600d5481565b60036020528160005260406000208181548110151561117d57fe5b9060005260206000209001600091509150505481565b6000806002600084815260200190815260200160002091508160050160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561120957600080fd5b6007544210151561121957600080fd5b8160050160149054906101000a900460ff1615151561123757600080fd5b60018260050160146101000a81548160ff021916908315150217905550600654421061127e5760065460075403426007540383600301540281151561127857fe5b04611284565b81600301545b90508160030154811115151561129657fe5b80826003016000828254039250508190555060038260040160008282548115156112bc57fe5b04925050819055503373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050151561130457600080fd5b505050565b60085481565b60075481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60026020528060005260406000206000915090508060000154908060010154908060020154908060030154908060040154908060050160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060050160149054906101000a900460ff16908060050160159054906101000a900460ff16905088565b6000806000806000806000600260007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81526020019081526020016000206000015491505b6000821415156114b457600260008381526020019081526020016000209050806002015487826003015401101561146c57806003015487019650633b9aca00816004015482600301540281151561145557fe5b0481600301540186019550806000015491506114af565b868160020154101561147f576000611487565b868160020154035b92508287019650633b9aca00816004015484028115156114a357fe5b048301860195506114b4565b611402565b6002600083815260200190815260200160002060020154935081945050509091929394565b600b5481565b60045481565b600080600090505b600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805490508110156115b45760026000600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208381548110151561158757fe5b906000526020600020900154815260200190815260200160002060030154820191508060010190506114ed565b50919050565b60006006544210156115d057600b549050611600565b6008544211156115e35760009050611600565b600654600854034260085403600b54028115156115fc57fe5b0490505b90565b60055481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600c60009054906101000a900460ff1681565b6000806000806000808694505b8315156116be5760026000868152602001908152602001600020925082600001549150600260008381526020019081526020016000209050806002015488101561169a578194506116b9565b8260020154881015156116b357826001015494506116b8565b600193505b5b61164e565b849550505050505092915050565b6116df826116da8484611641565b6108cb565b5050565b600e5481565b60065481565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b81548183558181151161173c5781836000526020600020918201910161173b9190611741565b5b505050565b61176391905b8082111561175f576000816000905550600101611747565b5090565b905600a165627a7a723058204082ef6f060db6e35fe459ce50c6791bc6b3ca063e951fa52ede3370b2c8da510029", + "0x608060405260006004557fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600d5534801561003957600080fd5b5060405160e0806125be83398101806040528101908080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190505050868686868686336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508560058190555084600554016006819055508360065401600781905550826007540160088190555081600b8190555080600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610100604051908101604052807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81526020017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8152602001600081526020016000815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff1681526020016000151581526020016000151581525060026000808152602001908152602001600020600082015181600001556020820151816001015560408201518160020155606082015181600301556080820151816004015560a08201518160050160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060c08201518160050160146101000a81548160ff02191690831515021790555060e08201518160050160156101000a81548160ff0219169083151502179055509050506101006040519081016040528060008152602001600081526020017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81526020016000815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff16815260200160001515815260200160001515815250600260007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8152602001908152602001600020600082015181600001556020820151816001015560408201518160020155606082015181600301556080820151816004015560a08201518160050160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060c08201518160050160146101000a81548160ff02191690831515021790555060e08201518160050160156101000a81548160ff0219169083151502179055509050505050505050508060108190555050505050505050612178806104466000396000f3006080604052600436106101b7576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806305261aea14610395578063106c6441146103c257806312aef8c314610428578063144fa6d714610453578063152713b3146104965780631552cb04146104c15780631ae9fe6a146105275780631def6bad1461055257806322758a4a146105b35780632c2f93d51461060a5780632e1a7d4d146106655780633197cbb61461069257806334f732e8146106bd57806338af3eed146106e85780634423c5f11461073f57806347ab58ec146107e557806354c5b6961461082c57806357f196fa146108575780635e7c85b11461088257806375b4d78c146108d957806378e979251461090457806380999b711461092f5780638da5cb5b14610995578063b196aabb146109ec578063b3f05b9714610a17578063b821da1b14610a46578063c1f6004514610a70578063c68ee9cd14610acb578063ce160edd14610b16578063db006a7514610b40578063dc382cbf14610b6d578063f0d6cc7014610b98578063f98f5b9214610bc3578063fc0c546a14610c06578063ffbd26ce14610c5d575b60008034141580156101cb57506005544210155b80156101d8575060085442105b1561022c576102277ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff610cc3565b610392565b6000341480156102485750600c60009054906101000a900460ff165b1561038c57600090505b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805490508110156103875760026000600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020838154811015156102ec57fe5b9060005260206000200154815260200190815260200160002060050160159054906101000a900460ff16151561037c5761037b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208281548110151561036b57fe5b9060005260206000200154610d95565b5b806001019050610252565b610391565b600080fd5b5b50005b3480156103a157600080fd5b506103c060048036038101908080359060200190929190505050611023565b005b3480156103ce57600080fd5b5061042660048036038101908080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509192919290505050611257565b005b34801561043457600080fd5b5061043d611341565b6040518082815260200191505060405180910390f35b34801561045f57600080fd5b50610494600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611347565b005b3480156104a257600080fd5b506104ab611541565b6040518082815260200191505060405180910390f35b3480156104cd57600080fd5b5061052560048036038101908080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509192919290505050611547565b005b34801561053357600080fd5b5061053c611631565b6040518082815260200191505060405180910390f35b34801561055e57600080fd5b5061059d600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611637565b6040518082815260200191505060405180910390f35b3480156105bf57600080fd5b506105c8611667565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561061657600080fd5b5061064b600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061168d565b604051808215151515815260200191505060405180910390f35b34801561067157600080fd5b50610690600480360381019080803590602001909291905050506116ad565b005b34801561069e57600080fd5b506106a761182a565b6040518082815260200191505060405180910390f35b3480156106c957600080fd5b506106d2611830565b6040518082815260200191505060405180910390f35b3480156106f457600080fd5b506106fd611836565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561074b57600080fd5b5061076a6004803603810190808035906020019092919050505061185c565b604051808981526020018881526020018781526020018681526020018581526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183151515158152602001821515151581526020019850505050505050505060405180910390f35b3480156107f157600080fd5b506107fa6118de565b604051808681526020018581526020018481526020018381526020018281526020019550505050505060405180910390f35b34801561083857600080fd5b506108416119f4565b6040518082815260200191505060405180910390f35b34801561086357600080fd5b5061086c6119fa565b6040518082815260200191505060405180910390f35b34801561088e57600080fd5b506108c3600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611a00565b6040518082815260200191505060405180910390f35b3480156108e557600080fd5b506108ee611ad4565b6040518082815260200191505060405180910390f35b34801561091057600080fd5b50610919611b1d565b6040518082815260200191505060405180910390f35b34801561093b57600080fd5b5061099360048036038101908080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509192919290505050611b23565b005b3480156109a157600080fd5b506109aa611c0d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156109f857600080fd5b50610a01611c32565b6040518082815260200191505060405180910390f35b348015610a2357600080fd5b50610a2c611c38565b604051808215151515815260200191505060405180910390f35b610a6e6004803603810190808035906020019092919080359060200190929190505050610cc3565b005b348015610a7c57600080fd5b50610ab1600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611c4b565b604051808215151515815260200191505060405180910390f35b348015610ad757600080fd5b50610b006004803603810190808035906020019092919080359060200190929190505050611c6b565b6040518082815260200191505060405180910390f35b610b3e6004803603810190808035906020019092919080359060200190929190505050611cf6565b005b348015610b4c57600080fd5b50610b6b60048036038101908080359060200190929190505050610d95565b005b348015610b7957600080fd5b50610b82611d0d565b6040518082815260200191505060405180910390f35b348015610ba457600080fd5b50610bad611d13565b6040518082815260200191505060405180910390f35b348015610bcf57600080fd5b50610c04600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611d19565b005b348015610c1257600080fd5b50610c1b611db8565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b348015610c6957600080fd5b50610cc160048036038101908080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509192919290505050611dde565b005b601260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680610d7c5750601160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff168015610d7b5750601054610d7633611a00565b340111155b5b1515610d8757600080fd5b610d918282611ec8565b5050565b60008060026000848152602001908152602001600020915060026000600d5481526020019081526020016000209050600c60009054906101000a900460ff161515610ddf57600080fd5b8160050160159054906101000a900460ff16151515610dfd57600080fd5b60018260050160156101000a81548160ff021916908315150217905550806002015482600201541180610e45575080600201548260020154148015610e445750600d548310155b5b15610fae57600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8360050160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600f54633b9aca008660040154876003015402811515610ec957fe5b04866003015401600a5402811515610edd57fe5b046040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015610f6357600080fd5b505af1158015610f77573d6000803e3d6000fd5b505050506040513d6020811015610f8d57600080fd5b81019080805190602001909291905050501515610fa957600080fd5b61101e565b8160050160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc83600301549081150290604051600060405180830381858888f1935050505015801561101c573d6000803e3d6000fd5b505b505050565b600080600080600080600854421015151561103d57600080fd5b600c60009054906101000a900460ff1615151561105957600080fd5b600d549550600e549450600f549350600092505b86831080156110895750600c60009054906101000a900460ff16155b156112395760026000878152602001908152602001600020915081600201548583600301540110156110ee57816003015485019450633b9aca0082600401548360030154028115156110d757fe5b04826003015401840193508160000154955061122e565b6001600c60006101000a81548160ff021916908315150217905550848260020154101561111c576000611124565b848260020154035b90508160030154811061113b57816003015461113d565b805b90508160050160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc828460030154039081150290604051600060405180830381858888f1935050505050808260030181905550816003015485019450633b9aca0082600401548360030154028115156111ca57fe5b0482600301540184019350600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc869081150290604051600060405180830381858888f19350505050505b82600101925061106d565b85600d8190555084600e8190555083600f8190555050505050505050565b60003373ffffffffffffffffffffffffffffffffffffffff16601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415156112b557600080fd5b600090505b815181101561133d5760006012600084848151811015156112d757fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508060010190506112ba565b5050565b600a5481565b3373ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415156113a257600080fd5b600073ffffffffffffffffffffffffffffffffffffffff16600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415156113ff57600080fd5b80600960006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b1580156114fd57600080fd5b505af1158015611511573d6000803e3d6000fd5b505050506040513d602081101561152757600080fd5b8101908080519060200190929190505050600a8190555050565b600f5481565b60003373ffffffffffffffffffffffffffffffffffffffff16601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415156115a557600080fd5b600090505b815181101561162d5760016011600084848151811015156115c757fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508060010190506115aa565b5050565b600d5481565b60036020528160005260406000208181548110151561165257fe5b90600052602060002001600091509150505481565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60116020528060005260406000206000915054906101000a900460ff1681565b6000806002600084815260200190815260200160002091508160050160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561172357600080fd5b6007544210151561173357600080fd5b8160050160149054906101000a900460ff1615151561175157600080fd5b60018260050160146101000a81548160ff02191690831515021790555060065442106117985760065460075403426007540383600301540281151561179257fe5b0461179e565b81600301545b9050816003015481111515156117b057fe5b808260030160008282540392505081905550600360028360040154028115156117d557fe5b0482600401819055503373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015611824573d6000803e3d6000fd5b50505050565b60085481565b60075481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60026020528060005260406000206000915090508060000154908060010154908060020154908060030154908060040154908060050160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060050160149054906101000a900460ff16908060050160159054906101000a900460ff16905088565b600080600080600080600260007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81526020019081526020016000206000015493505b6000841415156119d357600260008581526020019081526020016000209050806002015486826003015401101561198b57806003015486019550633b9aca00816004015482600301540281151561197457fe5b0481600301540185019450806000015493506119ce565b858160020154101561199e5760006119a6565b858160020154035b91508186019550633b9aca00816004015483028115156119c257fe5b048201850194506119d3565b611921565b60026000858152602001908152602001600020600201549250509091929394565b600b5481565b60045481565b600080600090505b600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002080549050811015611ace5760026000600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002083815481101515611aa257fe5b906000526020600020015481526020019081526020016000206003015482019150806001019050611a08565b50919050565b6000600654421015611aea57600b549050611b1a565b600854421115611afd5760009050611b1a565b600654600854034260085403600b5402811515611b1657fe5b0490505b90565b60055481565b60003373ffffffffffffffffffffffffffffffffffffffff16601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515611b8157600080fd5b600090505b8151811015611c09576000601160008484815181101515611ba357fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550806001019050611b86565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60105481565b600c60009054906101000a900460ff1681565b60126020528060005260406000206000915054906101000a900460ff1681565b6000806000806000808694505b831515611ce857600260008681526020019081526020016000209250826000015491506002600083815260200190815260200160002090508060020154881015611cc457819450611ce3565b826002015488101515611cdd5782600101549450611ce2565b600193505b5b611c78565b849550505050505092915050565b611d0982611d048484611c6b565b610cc3565b5050565b600e5481565b60065481565b3373ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515611d7457600080fd5b80601360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60003373ffffffffffffffffffffffffffffffffffffffff16601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515611e3c57600080fd5b600090505b8151811015611ec4576001601260008484815181101515611e5e57fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550806001019050611e41565b5050565b60008060006002600085815260200190815260200160002092508260000154915060026000838152602001908152602001600020905080600201548510158015611f155750826002015485105b1515611f2057600080fd5b6005544210158015611f33575060085442105b1515611f3e57600080fd5b600460008154600101919050819055506004548160010181905550600454836000018190555061010060405190810160405280838152602001858152602001868152602001348152602001611f91611ad4565b81526020013373ffffffffffffffffffffffffffffffffffffffff16815260200160001515815260200160001515815250600260006004548152602001908152602001600020600082015181600001556020820151816001015560408201518160020155606082015181600301556080820151816004015560a08201518160050160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060c08201518160050160146101000a81548160ff02191690831515021790555060e08201518160050160156101000a81548160ff021916908315150217905550905050600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206004549080600181540180825580915050906001820390600052602060002001600090919290919091505550426004543373ffffffffffffffffffffffffffffffffffffffff167f84bee513033536a8de8a8260e2674a4a3eebd61ddce74615fdeca8a1499f5efe60405160405180910390a450505050505600a165627a7a723058209b75b5ade48a4afa0f78664588e214b100b8244c723e132ad0318b7e8c026ee90029", "deployedBytecode": - "0x606060405260043610610154576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806305261aea1461033457806312aef8c314610357578063144fa6d714610380578063152713b3146103b95780631ae9fe6a146103e25780631def6bad1461040b5780632e1a7d4d146104615780633197cbb61461048457806334f732e8146104ad57806338af3eed146104d65780634423c5f11461052b57806347ab58ec146105c757806354c5b6961461060c57806357f196fa146106355780635e7c85b11461065e57806375b4d78c146106ab57806378e97925146106d45780638da5cb5b146106fd578063b3f05b9714610752578063b821da1b1461077f578063c68ee9cd146107a0578063ce160edd146107e0578063db006a7514610801578063dc382cbf14610824578063f0d6cc701461084d578063fc0c546a14610876575b600080341415801561016857506005544210155b8015610175575060085442105b156101c9576101c47ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6108cb565b610331565b6000341480156101e55750600c60009054906101000a900460ff165b1561033057600090505b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208054905081101561032f5760026000600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208381548110151561028957fe5b906000526020600020900154815260200190815260200160002060050160159054906101000a900460ff16151561031f5761031a600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208281548110151561030957fe5b906000526020600020900154610b05565b610324565b600080fd5b8060010190506101ef565b5b5b50005b341561033f57600080fd5b6103556004808035906020019091905050610d5d565b005b341561036257600080fd5b61036a610f91565b6040518082815260200191505060405180910390f35b341561038b57600080fd5b6103b7600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610f97565b005b34156103c457600080fd5b6103cc611156565b6040518082815260200191505060405180910390f35b34156103ed57600080fd5b6103f561115c565b6040518082815260200191505060405180910390f35b341561041657600080fd5b61044b600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050611162565b6040518082815260200191505060405180910390f35b341561046c57600080fd5b6104826004808035906020019091905050611193565b005b341561048f57600080fd5b610497611309565b6040518082815260200191505060405180910390f35b34156104b857600080fd5b6104c061130f565b6040518082815260200191505060405180910390f35b34156104e157600080fd5b6104e9611315565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561053657600080fd5b61054c600480803590602001909190505061133b565b604051808981526020018881526020018781526020018681526020018581526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183151515158152602001821515151581526020019850505050505050505060405180910390f35b34156105d257600080fd5b6105da6113bd565b604051808681526020018581526020018481526020018381526020018281526020019550505050505060405180910390f35b341561061757600080fd5b61061f6114d9565b6040518082815260200191505060405180910390f35b341561064057600080fd5b6106486114df565b6040518082815260200191505060405180910390f35b341561066957600080fd5b610695600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506114e5565b6040518082815260200191505060405180910390f35b34156106b657600080fd5b6106be6115ba565b6040518082815260200191505060405180910390f35b34156106df57600080fd5b6106e7611603565b6040518082815260200191505060405180910390f35b341561070857600080fd5b610710611609565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561075d57600080fd5b61076561162e565b604051808215151515815260200191505060405180910390f35b61079e60048080359060200190919080359060200190919050506108cb565b005b34156107ab57600080fd5b6107ca6004808035906020019091908035906020019091905050611641565b6040518082815260200191505060405180910390f35b6107ff60048080359060200190919080359060200190919050506116cc565b005b341561080c57600080fd5b6108226004808035906020019091905050610b05565b005b341561082f57600080fd5b6108376116e3565b6040518082815260200191505060405180910390f35b341561085857600080fd5b6108606116e9565b6040518082815260200191505060405180910390f35b341561088157600080fd5b6108896116ef565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b600080600060026000858152602001908152602001600020925082600001549150600260008381526020019081526020016000209050806002015485101580156109185750826002015485105b151561092357600080fd5b6005544210158015610936575060085442105b151561094157600080fd5b6004600081546001019190508190555060045481600101819055506004548360000181905550610100604051908101604052808381526020018581526020018681526020013481526020016109946115ba565b81526020013373ffffffffffffffffffffffffffffffffffffffff16815260200160001515815260200160001515815250600260006004548152602001908152602001600020600082015181600001556020820151816001015560408201518160020155606082015181600301556080820151816004015560a08201518160050160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060c08201518160050160146101000a81548160ff02191690831515021790555060e08201518160050160156101000a81548160ff021916908315150217905550905050600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208054806001018281610ae79190611715565b91600052602060002090016000600454909190915055505050505050565b60008060026000848152602001908152602001600020915060026000600d5481526020019081526020016000209050600c60009054906101000a900460ff161515610b4f57600080fd5b8160050160159054906101000a900460ff16151515610b6d57600080fd5b60018260050160156101000a81548160ff021916908315150217905550806002015482600201541180610bb5575080600201548260020154148015610bb45750600d548310155b5b15610cef57600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8360050160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600f54633b9aca008660040154876003015402811515610c3957fe5b04866003015401600a5402811515610c4d57fe5b046040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1515610cd257600080fd5b5af11515610cdf57600080fd5b5050506040518051905050610d58565b8160050160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc83600301549081150290604051600060405180830381858888f193505050501515610d5757600080fd5b5b505050565b6000806000806000806008544210151515610d7757600080fd5b600c60009054906101000a900460ff16151515610d9357600080fd5b600d549550600e549450600f549350600092505b8683108015610dc35750600c60009054906101000a900460ff16155b15610f73576002600087815260200190815260200160002091508160020154858360030154011015610e2857816003015485019450633b9aca008260040154836003015402811515610e1157fe5b048260030154018401935081600001549550610f68565b6001600c60006101000a81548160ff0219169083151502179055508482600201541015610e56576000610e5e565b848260020154035b905081600301548110610e75578160030154610e77565b805b90508160050160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc828460030154039081150290604051600060405180830381858888f1935050505050808260030181905550816003015485019450633b9aca008260040154836003015402811515610f0457fe5b0482600301540184019350600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc869081150290604051600060405180830381858888f19350505050505b826001019250610da7565b85600d8190555084600e8190555083600f8190555050505050505050565b600a5481565b3373ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515610ff257600080fd5b6000600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561103957600080fd5b80600960006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b151561113657600080fd5b5af1151561114357600080fd5b50505060405180519050600a8190555050565b600f5481565b600d5481565b60036020528160005260406000208181548110151561117d57fe5b9060005260206000209001600091509150505481565b6000806002600084815260200190815260200160002091508160050160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561120957600080fd5b6007544210151561121957600080fd5b8160050160149054906101000a900460ff1615151561123757600080fd5b60018260050160146101000a81548160ff021916908315150217905550600654421061127e5760065460075403426007540383600301540281151561127857fe5b04611284565b81600301545b90508160030154811115151561129657fe5b80826003016000828254039250508190555060038260040160008282548115156112bc57fe5b04925050819055503373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050151561130457600080fd5b505050565b60085481565b60075481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60026020528060005260406000206000915090508060000154908060010154908060020154908060030154908060040154908060050160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060050160149054906101000a900460ff16908060050160159054906101000a900460ff16905088565b6000806000806000806000600260007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81526020019081526020016000206000015491505b6000821415156114b457600260008381526020019081526020016000209050806002015487826003015401101561146c57806003015487019650633b9aca00816004015482600301540281151561145557fe5b0481600301540186019550806000015491506114af565b868160020154101561147f576000611487565b868160020154035b92508287019650633b9aca00816004015484028115156114a357fe5b048301860195506114b4565b611402565b6002600083815260200190815260200160002060020154935081945050509091929394565b600b5481565b60045481565b600080600090505b600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805490508110156115b45760026000600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208381548110151561158757fe5b906000526020600020900154815260200190815260200160002060030154820191508060010190506114ed565b50919050565b60006006544210156115d057600b549050611600565b6008544211156115e35760009050611600565b600654600854034260085403600b54028115156115fc57fe5b0490505b90565b60055481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600c60009054906101000a900460ff1681565b6000806000806000808694505b8315156116be5760026000868152602001908152602001600020925082600001549150600260008381526020019081526020016000209050806002015488101561169a578194506116b9565b8260020154881015156116b357826001015494506116b8565b600193505b5b61164e565b849550505050505092915050565b6116df826116da8484611641565b6108cb565b5050565b600e5481565b60065481565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b81548183558181151161173c5781836000526020600020918201910161173b9190611741565b5b505050565b61176391905b8082111561175f576000816000905550600101611747565b5090565b905600a165627a7a723058204082ef6f060db6e35fe459ce50c6791bc6b3ca063e951fa52ede3370b2c8da510029", + "0x6080604052600436106101b7576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806305261aea14610395578063106c6441146103c257806312aef8c314610428578063144fa6d714610453578063152713b3146104965780631552cb04146104c15780631ae9fe6a146105275780631def6bad1461055257806322758a4a146105b35780632c2f93d51461060a5780632e1a7d4d146106655780633197cbb61461069257806334f732e8146106bd57806338af3eed146106e85780634423c5f11461073f57806347ab58ec146107e557806354c5b6961461082c57806357f196fa146108575780635e7c85b11461088257806375b4d78c146108d957806378e979251461090457806380999b711461092f5780638da5cb5b14610995578063b196aabb146109ec578063b3f05b9714610a17578063b821da1b14610a46578063c1f6004514610a70578063c68ee9cd14610acb578063ce160edd14610b16578063db006a7514610b40578063dc382cbf14610b6d578063f0d6cc7014610b98578063f98f5b9214610bc3578063fc0c546a14610c06578063ffbd26ce14610c5d575b60008034141580156101cb57506005544210155b80156101d8575060085442105b1561022c576102277ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff610cc3565b610392565b6000341480156102485750600c60009054906101000a900460ff165b1561038c57600090505b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805490508110156103875760026000600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020838154811015156102ec57fe5b9060005260206000200154815260200190815260200160002060050160159054906101000a900460ff16151561037c5761037b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208281548110151561036b57fe5b9060005260206000200154610d95565b5b806001019050610252565b610391565b600080fd5b5b50005b3480156103a157600080fd5b506103c060048036038101908080359060200190929190505050611023565b005b3480156103ce57600080fd5b5061042660048036038101908080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509192919290505050611257565b005b34801561043457600080fd5b5061043d611341565b6040518082815260200191505060405180910390f35b34801561045f57600080fd5b50610494600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611347565b005b3480156104a257600080fd5b506104ab611541565b6040518082815260200191505060405180910390f35b3480156104cd57600080fd5b5061052560048036038101908080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509192919290505050611547565b005b34801561053357600080fd5b5061053c611631565b6040518082815260200191505060405180910390f35b34801561055e57600080fd5b5061059d600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611637565b6040518082815260200191505060405180910390f35b3480156105bf57600080fd5b506105c8611667565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561061657600080fd5b5061064b600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061168d565b604051808215151515815260200191505060405180910390f35b34801561067157600080fd5b50610690600480360381019080803590602001909291905050506116ad565b005b34801561069e57600080fd5b506106a761182a565b6040518082815260200191505060405180910390f35b3480156106c957600080fd5b506106d2611830565b6040518082815260200191505060405180910390f35b3480156106f457600080fd5b506106fd611836565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561074b57600080fd5b5061076a6004803603810190808035906020019092919050505061185c565b604051808981526020018881526020018781526020018681526020018581526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183151515158152602001821515151581526020019850505050505050505060405180910390f35b3480156107f157600080fd5b506107fa6118de565b604051808681526020018581526020018481526020018381526020018281526020019550505050505060405180910390f35b34801561083857600080fd5b506108416119f4565b6040518082815260200191505060405180910390f35b34801561086357600080fd5b5061086c6119fa565b6040518082815260200191505060405180910390f35b34801561088e57600080fd5b506108c3600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611a00565b6040518082815260200191505060405180910390f35b3480156108e557600080fd5b506108ee611ad4565b6040518082815260200191505060405180910390f35b34801561091057600080fd5b50610919611b1d565b6040518082815260200191505060405180910390f35b34801561093b57600080fd5b5061099360048036038101908080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509192919290505050611b23565b005b3480156109a157600080fd5b506109aa611c0d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156109f857600080fd5b50610a01611c32565b6040518082815260200191505060405180910390f35b348015610a2357600080fd5b50610a2c611c38565b604051808215151515815260200191505060405180910390f35b610a6e6004803603810190808035906020019092919080359060200190929190505050610cc3565b005b348015610a7c57600080fd5b50610ab1600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611c4b565b604051808215151515815260200191505060405180910390f35b348015610ad757600080fd5b50610b006004803603810190808035906020019092919080359060200190929190505050611c6b565b6040518082815260200191505060405180910390f35b610b3e6004803603810190808035906020019092919080359060200190929190505050611cf6565b005b348015610b4c57600080fd5b50610b6b60048036038101908080359060200190929190505050610d95565b005b348015610b7957600080fd5b50610b82611d0d565b6040518082815260200191505060405180910390f35b348015610ba457600080fd5b50610bad611d13565b6040518082815260200191505060405180910390f35b348015610bcf57600080fd5b50610c04600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611d19565b005b348015610c1257600080fd5b50610c1b611db8565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b348015610c6957600080fd5b50610cc160048036038101908080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509192919290505050611dde565b005b601260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680610d7c5750601160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff168015610d7b5750601054610d7633611a00565b340111155b5b1515610d8757600080fd5b610d918282611ec8565b5050565b60008060026000848152602001908152602001600020915060026000600d5481526020019081526020016000209050600c60009054906101000a900460ff161515610ddf57600080fd5b8160050160159054906101000a900460ff16151515610dfd57600080fd5b60018260050160156101000a81548160ff021916908315150217905550806002015482600201541180610e45575080600201548260020154148015610e445750600d548310155b5b15610fae57600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8360050160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600f54633b9aca008660040154876003015402811515610ec957fe5b04866003015401600a5402811515610edd57fe5b046040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015610f6357600080fd5b505af1158015610f77573d6000803e3d6000fd5b505050506040513d6020811015610f8d57600080fd5b81019080805190602001909291905050501515610fa957600080fd5b61101e565b8160050160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc83600301549081150290604051600060405180830381858888f1935050505015801561101c573d6000803e3d6000fd5b505b505050565b600080600080600080600854421015151561103d57600080fd5b600c60009054906101000a900460ff1615151561105957600080fd5b600d549550600e549450600f549350600092505b86831080156110895750600c60009054906101000a900460ff16155b156112395760026000878152602001908152602001600020915081600201548583600301540110156110ee57816003015485019450633b9aca0082600401548360030154028115156110d757fe5b04826003015401840193508160000154955061122e565b6001600c60006101000a81548160ff021916908315150217905550848260020154101561111c576000611124565b848260020154035b90508160030154811061113b57816003015461113d565b805b90508160050160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc828460030154039081150290604051600060405180830381858888f1935050505050808260030181905550816003015485019450633b9aca0082600401548360030154028115156111ca57fe5b0482600301540184019350600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc869081150290604051600060405180830381858888f19350505050505b82600101925061106d565b85600d8190555084600e8190555083600f8190555050505050505050565b60003373ffffffffffffffffffffffffffffffffffffffff16601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415156112b557600080fd5b600090505b815181101561133d5760006012600084848151811015156112d757fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508060010190506112ba565b5050565b600a5481565b3373ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415156113a257600080fd5b600073ffffffffffffffffffffffffffffffffffffffff16600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415156113ff57600080fd5b80600960006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b1580156114fd57600080fd5b505af1158015611511573d6000803e3d6000fd5b505050506040513d602081101561152757600080fd5b8101908080519060200190929190505050600a8190555050565b600f5481565b60003373ffffffffffffffffffffffffffffffffffffffff16601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415156115a557600080fd5b600090505b815181101561162d5760016011600084848151811015156115c757fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508060010190506115aa565b5050565b600d5481565b60036020528160005260406000208181548110151561165257fe5b90600052602060002001600091509150505481565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60116020528060005260406000206000915054906101000a900460ff1681565b6000806002600084815260200190815260200160002091508160050160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561172357600080fd5b6007544210151561173357600080fd5b8160050160149054906101000a900460ff1615151561175157600080fd5b60018260050160146101000a81548160ff02191690831515021790555060065442106117985760065460075403426007540383600301540281151561179257fe5b0461179e565b81600301545b9050816003015481111515156117b057fe5b808260030160008282540392505081905550600360028360040154028115156117d557fe5b0482600401819055503373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015611824573d6000803e3d6000fd5b50505050565b60085481565b60075481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60026020528060005260406000206000915090508060000154908060010154908060020154908060030154908060040154908060050160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060050160149054906101000a900460ff16908060050160159054906101000a900460ff16905088565b600080600080600080600260007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81526020019081526020016000206000015493505b6000841415156119d357600260008581526020019081526020016000209050806002015486826003015401101561198b57806003015486019550633b9aca00816004015482600301540281151561197457fe5b0481600301540185019450806000015493506119ce565b858160020154101561199e5760006119a6565b858160020154035b91508186019550633b9aca00816004015483028115156119c257fe5b048201850194506119d3565b611921565b60026000858152602001908152602001600020600201549250509091929394565b600b5481565b60045481565b600080600090505b600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002080549050811015611ace5760026000600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002083815481101515611aa257fe5b906000526020600020015481526020019081526020016000206003015482019150806001019050611a08565b50919050565b6000600654421015611aea57600b549050611b1a565b600854421115611afd5760009050611b1a565b600654600854034260085403600b5402811515611b1657fe5b0490505b90565b60055481565b60003373ffffffffffffffffffffffffffffffffffffffff16601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515611b8157600080fd5b600090505b8151811015611c09576000601160008484815181101515611ba357fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550806001019050611b86565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60105481565b600c60009054906101000a900460ff1681565b60126020528060005260406000206000915054906101000a900460ff1681565b6000806000806000808694505b831515611ce857600260008681526020019081526020016000209250826000015491506002600083815260200190815260200160002090508060020154881015611cc457819450611ce3565b826002015488101515611cdd5782600101549450611ce2565b600193505b5b611c78565b849550505050505092915050565b611d0982611d048484611c6b565b610cc3565b5050565b600e5481565b60065481565b3373ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515611d7457600080fd5b80601360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60003373ffffffffffffffffffffffffffffffffffffffff16601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515611e3c57600080fd5b600090505b8151811015611ec4576001601260008484815181101515611e5e57fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550806001019050611e41565b5050565b60008060006002600085815260200190815260200160002092508260000154915060026000838152602001908152602001600020905080600201548510158015611f155750826002015485105b1515611f2057600080fd5b6005544210158015611f33575060085442105b1515611f3e57600080fd5b600460008154600101919050819055506004548160010181905550600454836000018190555061010060405190810160405280838152602001858152602001868152602001348152602001611f91611ad4565b81526020013373ffffffffffffffffffffffffffffffffffffffff16815260200160001515815260200160001515815250600260006004548152602001908152602001600020600082015181600001556020820151816001015560408201518160020155606082015181600301556080820151816004015560a08201518160050160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060c08201518160050160146101000a81548160ff02191690831515021790555060e08201518160050160156101000a81548160ff021916908315150217905550905050600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206004549080600181540180825580915050906001820390600052602060002001600090919290919091505550426004543373ffffffffffffffffffffffffffffffffffffffff167f84bee513033536a8de8a8260e2674a4a3eebd61ddce74615fdeca8a1499f5efe60405160405180910390a450505050505600a165627a7a723058209b75b5ade48a4afa0f78664588e214b100b8244c723e132ad0318b7e8c026ee90029", "sourceMap": - "1999:18091:0:-;;;3870:1;3846:25;;2359:2;4940:30;;6133:1049;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6311:10;6303:5;;:18;;;;;;;;;;;;;;;;;;6343:10;6331:9;:22;;;;6394:16;6382:9;;:28;6363:16;:47;;;;6460:24;6441:16;;:43;6420:18;:64;;;;6525:23;6504:18;;:44;6494:7;:54;;;;6569:9;6558:8;:20;;;;6602:12;6588:11;;:26;;;;;;;;;;;;;;;;;;6704:224;;;;;;;;;2359:2;6704:224;;;;2359:2;6704:224;;;;2231:1;6704:224;;;;6805:1;6704:224;;;;6827:1;6704:224;;;;6855:3;6704:224;;;;;;6883:5;6704:224;;;;;;6912:5;6704:224;;;;;6691:4;:10;2231:1;6691:10;;;;;;;;;;;:237;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6951:224;;;;;;;;;2231:1;6951:224;;;;2231:1;6951:224;;;;2359:2;6951:224;;;;7052:1;6951:224;;;;7074:1;6951:224;;;;7102:3;6951:224;;;;;;7130:5;6951:224;;;;;;7159:5;6951:224;;;;;6938:4;:10;2359:2;6938:10;;;;;;;;;;;:237;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6133:1049;;;;;;1999:18091;;;;;;", + "401:4350:1:-;;;3894:1:0;3870:25;;2365:2;4964:30;;1800:378:1;8:9:-1;5:2;;;30:1;27;20:12;5:2;1800:378:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2005:10;2016:16;2033:24;2058:23;2082:9;2092:12;6481:10:0;6473:5;;:18;;;;;;;;;;;;;;;;;;6513:10;6501:9;:22;;;;6564:16;6552:9;;:28;6533:16;:47;;;;6630:24;6611:16;;:43;6590:18;:64;;;;6695:23;6674:18;;:44;6664:7;:54;;;;6739:9;6728:8;:20;;;;6772:12;6758:11;;:26;;;;;;;;;;;;;;;;;;6874:237;;;;;;;;;2365:2;6874:237;;;;2365:2;6874:237;;;;2231:1;6874:237;;;;6981:1;6874:237;;;;7003:1;6874:237;;;;7039:1;6874:237;;;;;;7066:5;6874:237;;;;;;7095:5;6874:237;;;;;6861:4;:10;2231:1;6861:10;;;;;;;;;;;:250;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7134:237;;;;;;;;;2231:1;7134:237;;;;2231:1;7134:237;;;;2365:2;7134:237;;;;7241:1;7134:237;;;;7263:1;7134:237;;;;7299:1;7134:237;;;;;;7326:5;7134:237;;;;;;7355:5;7134:237;;;;;7121:4;:10;2365:2;7121:10;;;;;;;;;;;:250;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6303:1075;;;;;;2147:24:1;2123:23;:48;;;;1800:378;;;;;;;401:4350;;;;;;", "deployedSourceMap": - "1999:18091:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;15521:6;15238:1;15225:9;:14;;:34;;;;;15250:9;;15243:3;:16;;15225:34;:51;;;;;15269:7;;15263:3;:13;15225:51;15221:615;;;15350:25;2486:2;2359;15350:9;:25::i;:::-;15221:615;;;15407:1;15394:9;:14;:27;;;;;15412:9;;;;;;;;;;;15394:27;15390:446;;;15530:1;15521:10;;15516:320;15537:17;:29;15555:10;15537:29;;;;;;;;;;;;;;;:36;;;;15533:1;:40;15516:320;;;15601:4;:38;15606:17;:29;15624:10;15606:29;;;;;;;;;;;;;;;15636:1;15606:32;;;;;;;;;;;;;;;;;;;15601:38;;;;;;;;;;;:47;;;;;;;;;;;;15600:48;15596:240;;;15670:40;15677:17;:29;15695:10;15677:29;;;;;;;;;;;;;;;15707:1;15677:32;;;;;;;;;;;;;;;;;;;15670:6;:40::i;:::-;15596:240;;;15828:8;;;15596:240;15575:3;;;;;15516:320;;;15390:446;15221:615;15184:659;1999:18091;11753:2286;;;;;;;;;;;;;;;;;;;;;;;;;;4372:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7344:168;;;;;;;;;;;;;;;;;;;;;;;;;;;;5123:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4940:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3744:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10408:851;;;;;;;;;;;;;;;;;;;;;;;;;;4225:19;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4108:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2114:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3684:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;18840:1248;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4464:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3846:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;18407:247;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;17518:415;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3951:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2046:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4790:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8112:1065;;;;;;;;;;;;;;;;;;;;;;;;;;16401:847;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9993:121;;;;;;;;;;;;;;;;;;;;;;;;;;14284:698;;;;;;;;;;;;;;;;;;;;;;;;;;5042:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4024:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4296:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8112:1065;8182:19;8225:9;8259:19;8204:4;:11;8209:5;8204:11;;;;;;;;;;;8182:33;;8237:7;:12;;;8225:24;;8281:4;:10;8286:4;8281:10;;;;;;;;;;;8259:32;;8320:7;:14;;;8309:7;:25;;:53;;;;;8348:7;:14;;;8338:7;:24;8309:53;8301:62;;;;;;;;8480:9;;8473:3;:16;;:33;;;;;8499:7;;8493:3;:13;8473:33;8465:42;;;;;;;;8559:9;;8557:11;;;;;;;;;;;8702:9;;8687:7;:12;;:24;;;;8736:9;;8721:7;:12;;:24;;;;8801:249;;;;;;;;;8825:4;8801:249;;;;8849:5;8801:249;;;;8876:7;8801:249;;;;8906:9;8801:249;;;;8936:7;:5;:7::i;:::-;8801:249;;;;8970:10;8801:249;;;;;;9005:5;8801:249;;;;;;9034:5;8801:249;;;;;8783:4;:15;8788:9;;8783:15;;;;;;;;;;;:267;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9125:17;:29;9143:10;9125:29;;;;;;;;;;;;;;;:45;;;;;;;;;;;:::i;:::-;;;;;;;;;;9160:9;;9125:45;;;;;;;8112:1065;;;;;:::o;14284:698::-;14330:15;14370:21;14348:4;:12;14353:6;14348:12;;;;;;;;;;;14330:30;;14394:4;:17;14399:11;;14394:17;;;;;;;;;;;14370:41;;14429:9;;;;;;;;;;;14421:18;;;;;;;;14458:3;:12;;;;;;;;;;;;14457:13;14449:22;;;;;;;;14495:4;14482:3;:12;;;:17;;;;;;;;;;;;;;;;;;14526:9;:16;;;14513:3;:10;;;:29;:90;;;;14561:9;:16;;;14547:3;:10;;;:30;:55;;;;;14591:11;;14581:6;:21;;14547:55;14513:90;14509:466;;;14656:5;;;;;;;;;;;:14;;;14671:3;:15;;;;;;;;;;;;14766:25;;4669:3;14735;:9;;;14721:3;:11;;;:23;14720:41;;;;;;;;14706:3;:11;;;:55;14689:13;;:73;14688:103;;;;;;;;14656:136;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;14509:466;;;14938:3;:15;;;;;;;;;;;;:24;;:37;14963:3;:11;;;14938:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;14509:466;14284:698;;;:::o;11753:2286::-;11981:21;12026:28;12085:35;12234:7;12294:15;12813:18;11816:7;;11809:3;:14;;11801:23;;;;;;;;11843:9;;;;;;;;;;;11842:10;11834:19;;;;;;;;12005:11;;11981:35;;12057:18;;12026:49;;12123:25;;12085:63;;12244:1;12234:11;;12229:1614;12252:6;12247:2;:11;:25;;;;;12263:9;;;;;;;;;;;12262:10;12247:25;12229:1614;;;12312:4;:22;12317:16;12312:22;;;;;;;;;;;12294:40;;12390:3;:10;;;12364:23;12352:3;:11;;;:35;:48;12348:1485;;;12491:3;:11;;;12457:45;;;;4669:3;12583;:9;;;12569:3;:11;;;:23;12568:41;;;;;;;;12554:3;:11;;;:55;12520:89;;;;12646:3;:8;;;12627:27;;12348:1485;;;12791:4;12779:9;;:16;;;;;;;;;;;;;;;;;;12848:23;12834:3;:10;;;:37;;:80;;12913:1;12834:80;;;12887:23;12874:3;:10;;;:36;12834:80;12813:101;;13077:3;:11;;;13061:13;:27;:57;;13107:3;:11;;;13061:57;;;13091:13;13061:57;13045:73;;13296:3;:15;;;;;;;;;;;;:20;;:47;13329:13;13317:3;:11;;;:25;13296:47;;;;;;;;;;;;;;;;;;;;;;;;13476:13;13462:3;:11;;:27;;;;13568:3;:11;;;13541:38;;;;4669:3;13660;:9;;;13646:3;:11;;;:23;13645:41;;;;;;;;13631:3;:11;;;:55;13597:89;;;;13704:11;;;;;;;;;;;:16;;:41;13721:23;13704:41;;;;;;;;;;;;;;;;;;;;;;;;12348:1485;12274:4;;;;;12229:1614;;;13894:16;13880:11;:30;;;;13941:23;13920:18;:44;;;;14002:30;13974:25;:58;;;;11753:2286;;;;;;;:::o;4372:25::-;;;;:::o;7344:168::-;5271:10;5262:19;;:5;;;;;;;;;;;:19;;;5254:28;;;;;;;;7429:3;7419:5;;;;;;;;;;;7411:21;;;7403:30;;;;;;;;7452:6;7444:5;;:14;;;;;;;;;;;;;;;;;;7484:5;;;;;;;;;;;:15;;;7500:4;7484:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7468:13;:37;;;;7344:168;:::o;5123:37::-;;;;:::o;4940:30::-;;;;:::o;3744:52::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;10408:851::-;10456:15;10810:11;10474:4;:12;10479:6;10474:12;;;;;;;;;;;10456:30;;10518:3;:15;;;;;;;;;;;;10504:29;;:10;:29;;;10496:38;;;;;;;;10558:18;;10552:3;:24;10544:33;;;;;;;;10596:3;:13;;;;;;;;;;;;10595:14;10587:23;;;;;;;;10637:4;10621:3;:13;;;:20;;;;;;;;;;;;;;;;;;10831:16;;10825:3;:22;10824:125;;10932:16;;10911:18;;:37;10902:3;10881:18;;:24;10866:3;:11;;;:40;10865:84;;;;;;;;10824:125;;;10851:3;:11;;;10824:125;10810:139;;10976:3;:11;;;10966:6;:21;;10959:29;;;;;;11158:6;11143:3;:11;;;:21;;;;;;;;;;;11187:1;11174:3;:9;;;:14;;;;;;;;;;;;;;;;;;11225:10;:19;;:27;11245:6;11225:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10408:851;;;:::o;4225:19::-;;;;:::o;4108:30::-;;;;:::o;2114:26::-;;;;;;;;;;;;;:::o;3684:33::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;18840:1248::-;18891:14;18907:21;18930:16;18948:20;18970:21;19003;19160:15;19027:4;:10;2359:2;19027:10;;;;;;;;;;;:15;;;19003:39;;19113:871;2231:1;19120:16;:24;;19113:871;;;19178:4;:22;19183:16;19178:22;;;;;;;;;;;19160:40;;19244:3;:10;;;19232:9;19218:3;:11;;;:23;:36;19214:760;;;19324:3;:11;;;19311:24;;;;4669:3;19402;:9;;;19388:3;:11;;;:23;19387:41;;;;;;;;19373:3;:11;;;:55;19353:75;;;;19465:3;:8;;;19446:27;;19214:760;;;19635:9;19621:3;:10;;;:23;;:52;;19672:1;19621:52;;;19660:9;19647:3;:10;;;:22;19621:52;19602:71;;19817:16;19804:29;;;;4669:3;19910;:9;;;19891:16;:28;19890:46;;;;;;;;19871:16;:65;19851:85;;;;19954:5;;19214:760;19113:871;;;20012:4;:22;20017:16;20012:22;;;;;;;;;;;:29;;;19994:47;;20065:16;20051:30;;18840:1248;;;;;;;:::o;4464:20::-;;;;:::o;3846:25::-;;;;:::o;18407:247::-;18476:17;18510:6;18519:1;18510:10;;18505:142;18526:17;:31;18544:12;18526:31;;;;;;;;;;;;;;;:38;;;;18522:1;:42;18505:142;;;18599:4;:40;18604:17;:31;18622:12;18604:31;;;;;;;;;;;;;;;18636:1;18604:34;;;;;;;;;;;;;;;;;;;18599:40;;;;;;;;;;;:48;;;18583:64;;;;18566:3;;;;;18505:142;;;18407:247;;;;:::o;17518:415::-;17559:6;17587:16;;17581:3;:22;17577:349;;;17639:8;;17632:15;;;;17577:349;17672:7;;17666:3;:13;17662:264;;;17734:1;17727:8;;;;17662:264;17909:16;;17899:7;;:26;17890:3;17880:7;;:13;17868:8;;:26;17867:59;;;;;;;;17860:66;;17518:415;;:::o;3951:21::-;;;;:::o;2046:20::-;;;;;;;;;;;;;:::o;4790:21::-;;;;;;;;;;;;;:::o;16401:847::-;16472:15;16499:9;16531:10;16623:19;16669:9;16707:19;16511:10;16499:22;;16552:668;16559:5;16558:6;16552:668;;;16645:4;:10;16650:4;16645:10;;;;;;;;;;;16623:32;;16681:7;:12;;;16669:24;;16729:4;:10;16734:4;16729:10;;;;;;;;;;;16707:32;;16768:7;:14;;;16758:7;:24;16754:455;;;16846:4;16839:11;;16754:455;;;16884:7;:14;;;16873:7;:25;;16869:340;;;17086:7;:12;;;17079:19;;16869:340;;;17205:4;17197:12;;16869:340;16754:455;16552:668;;;17237:4;17230:11;;16401:847;;;;;;;;;:::o;9993:121::-;10066:41;10076:7;10085:21;10092:7;10100:5;10085:6;:21::i;:::-;10066:9;:41::i;:::-;9993:121;;:::o;5042:30::-;;;;:::o;4024:28::-;;;;:::o;4296:18::-;;;;;;;;;;;;;:::o;1999:18091::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o", + "401:4350:1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;16195:6:0;15906:1;15893:9;:14;;:34;;;;;15918:9;;15911:3;:16;;15893:34;:51;;;;;15937:7;;15931:3;:13;15893:51;15889:649;;;16024:25;2498:2;2365;16024:9;:25::i;:::-;15889:649;;;16081:1;16068:9;:14;:27;;;;;16086:9;;;;;;;;;;;16068:27;16064:474;;;16204:1;16195:10;;16190:223;16211:17;:29;16229:10;16211:29;;;;;;;;;;;;;;;:36;;;;16207:1;:40;16190:223;;;16289:4;:38;16294:17;:29;16312:10;16294:29;;;;;;;;;;;;;;;16324:1;16294:32;;;;;;;;;;;;;;;;;;16289:38;;;;;;;;;;;:47;;;;;;;;;;;;16288:48;16284:114;;;16358:40;16365:17;:29;16383:10;16365:29;;;;;;;;;;;;;;;16395:1;16365:32;;;;;;;;;;;;;;;;;;16358:6;:40::i;:::-;16284:114;16249:3;;;;;16190:223;;;16064:474;;;16530:8;;;16064:474;15889:649;15852:693;401:4350:1;12174:2310:0;;8:9:-1;5:2;;;30:1;27;20:12;5:2;12174:2310:0;;;;;;;;;;;;;;;;;;;;;;;;;;4546:202:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4546:202:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4396:25:0;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4396:25:0;;;;;;;;;;;;;;;;;;;;;;;7540:218;;8:9:-1;5:2;;;30:1;27;20:12;5:2;7540:218:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;5147:37;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5147:37:0;;;;;;;;;;;;;;;;;;;;;;;3535:195:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3535:195:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4964:30:0;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4964:30:0;;;;;;;;;;;;;;;;;;;;;;;3768:52;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3768:52:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;739:26:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;739:26:1;;;;;;;;;;;;;;;;;;;;;;;;;;;491:46;;8:9:-1;5:2;;;30:1;27;20:12;5:2;491:46:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10810:870:0;;8:9:-1;5:2;;;30:1;27;20:12;5:2;10810:870:0;;;;;;;;;;;;;;;;;;;;;;;;;;4249:19;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4249:19:0;;;;;;;;;;;;;;;;;;;;;;;4132:30;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4132:30:0;;;;;;;;;;;;;;;;;;;;;;;2114:26;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2114:26:0;;;;;;;;;;;;;;;;;;;;;;;;;;;3708:33;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3708:33:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;19752:1311;;8:9:-1;5:2;;;30:1;27;20:12;5:2;19752:1311:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4488:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4488:20:0;;;;;;;;;;;;;;;;;;;;;;;3870:25;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3870:25:0;;;;;;;;;;;;;;;;;;;;;;;19140:243;;8:9:-1;5:2;;;30:1;27;20:12;5:2;19140:243:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;18255:411;;8:9:-1;5:2;;;30:1;27;20:12;5:2;18255:411:0;;;;;;;;;;;;;;;;;;;;;;;3975:21;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3975:21:0;;;;;;;;;;;;;;;;;;;;;;;4212:190:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4212:190:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2046:20:0;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2046:20:0;;;;;;;;;;;;;;;;;;;;;;;;;;;450:35:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;450:35:1;;;;;;;;;;;;;;;;;;;;;;;4814:21:0;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4814:21:0;;;;;;;;;;;;;;;;;;;;;;;;;;;2788:415:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;604:52;;8:9:-1;5:2;;;30:1;27;20:12;5:2;604:52:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;17106:879:0;;8:9:-1;5:2;;;30:1;27;20:12;5:2;17106:879:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10377:139;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;14729:731;;8:9:-1;5:2;;;30:1;27;20:12;5:2;14729:731:0;;;;;;;;;;;;;;;;;;;;;;;;;;5066:30;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5066:30:0;;;;;;;;;;;;;;;;;;;;;;;4048:28;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4048:28:0;;;;;;;;;;;;;;;;;;;;;;;3300:104:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3300:104:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;4320:18:0;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4320:18:0;;;;;;;;;;;;;;;;;;;;;;;;;;;3867:207:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3867:207:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2788:415;2872:19;:31;2892:10;2872:31;;;;;;;;;;;;;;;;;;;;;;;;;:131;;;;2908:13;:25;2922:10;2908:25;;;;;;;;;;;;;;;;;;;;;;;;;:94;;;;;2978:23;;2950:24;2963:10;2950:12;:24::i;:::-;2938:9;:36;:63;;2908:94;2872:131;2864:140;;;;;;;;3160:36;3176:13;3190:5;3160:15;:36::i;:::-;2788:415;;:::o;14729:731:0:-;14775:15;14815:21;14793:4;:12;14798:6;14793:12;;;;;;;;;;;14775:30;;14839:4;:17;14844:11;;14839:17;;;;;;;;;;;14815:41;;14874:9;;;;;;;;;;;14866:18;;;;;;;;14903:3;:12;;;;;;;;;;;;14902:13;14894:22;;;;;;;;14940:4;14927:3;:12;;;:17;;;;;;;;;;;;;;;;;;14977:9;:22;;;14958:3;:16;;;:41;:114;;;;15024:9;:22;;;15004:3;:16;;;:42;:67;;;;;15060:11;;15050:6;:21;;15004:67;14958:114;14954:499;;;15133:5;;;;;;;;;;;:14;;;15148:3;:15;;;;;;;;;;;;15243:25;;4693:3;15212;:9;;;15198:3;:11;;;:23;15197:41;;;;;;;;15183:3;:11;;;:55;15166:13;;:73;15165:103;;;;;;;;15133:136;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;15133:136:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;15133:136:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;15133:136:0;;;;;;;;;;;;;;;;15125:145;;;;;;;;14954:499;;;15416:3;:15;;;;;;;;;;;;:24;;:37;15441:3;:11;;;15416:37;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;15416:37:0;14954:499;14729:731;;;:::o;12174:2310::-;12402:21;12447:28;12506:35;12655:7;12715:15;13240:18;12237:7;;12230:3;:14;;12222:23;;;;;;;;12264:9;;;;;;;;;;;12263:10;12255:19;;;;;;;;12426:11;;12402:35;;12478:18;;12447:49;;12544:25;;12506:63;;12665:1;12655:11;;12650:1638;12673:6;12668:2;:11;:25;;;;;12684:9;;;;;;;;;;;12683:10;12668:25;12650:1638;;;12733:4;:22;12738:16;12733:22;;;;;;;;;;;12715:40;;12811:3;:16;;;12785:23;12773:3;:11;;;:35;:54;12769:1509;;;12918:3;:11;;;12884:45;;;;4693:3;13010;:9;;;12996:3;:11;;;:23;12995:41;;;;;;;;12981:3;:11;;;:55;12947:89;;;;13073:3;:8;;;13054:27;;12769:1509;;;13218:4;13206:9;;:16;;;;;;;;;;;;;;;;;;13281:23;13261:3;:16;;;:43;;:92;;13352:1;13261:92;;;13326:23;13307:3;:16;;;:42;13261:92;13240:113;;13522:3;:11;;;13506:13;:27;:57;;13552:3;:11;;;13506:57;;;13536:13;13506:57;13490:73;;13741:3;:15;;;;;;;;;;;;:20;;:47;13774:13;13762:3;:11;;;:25;13741:47;;;;;;;;;;;;;;;;;;;;;;;;13921:13;13907:3;:11;;:27;;;;14013:3;:11;;;13986:38;;;;4693:3;14105;:9;;;14091:3;:11;;;:23;14090:41;;;;;;;;14076:3;:11;;;:55;14042:89;;;;14149:11;;;;;;;;;;;:16;;:41;14166:23;14149:41;;;;;;;;;;;;;;;;;;;;;;;;12769:1509;12695:4;;;;;12650:1638;;;14339:16;14325:11;:30;;;;14386:23;14365:18;:44;;;;14447:30;14419:25;:58;;;;12174:2310;;;;;;;:::o;4546:202:1:-;4645:6;889:10;874:25;;:11;;;;;;;;;;;:25;;;866:34;;;;;;;;4652:1;4645:8;;4641:100;4656:15;:22;4654:1;:24;4641:100;;;4736:5;4696:19;:39;4716:15;4732:1;4716:18;;;;;;;;;;;;;;;;;;4696:39;;;;;;;;;;;;;;;;:45;;;;;;;;;;;;;;;;;;4679:3;;;;;4641:100;;;4546:202;;:::o;4396:25:0:-;;;;:::o;7540:218::-;5441:10;5432:19;;:5;;;;;;;;;;;:19;;;5424:28;;;;;;;;7633:1;7607:28;;7615:5;;;;;;;;;;;7607:28;;;7599:37;;;;;;;;7698:6;7690:5;;:14;;;;;;;;;;;;;;;;;;7730:5;;;;;;;;;;;:15;;;7746:4;7730:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;7730:21:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;7730:21:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;7730:21:0;;;;;;;;;;;;;;;;7714:13;:37;;;;7540:218;:::o;5147:37::-;;;;:::o;3535:195:1:-;3628:6;889:10;874:25;;:11;;;;;;;;;;;:25;;;866:34;;;;;;;;3635:1;3628:8;;3624:99;3639:18;:25;3637:1;:27;3624:99;;;3719:4;3682:13;:36;3696:18;3715:1;3696:21;;;;;;;;;;;;;;;;;;3682:36;;;;;;;;;;;;;;;;:41;;;;;;;;;;;;;;;;;;3665:3;;;;;3624:99;;;3535:195;;:::o;4964:30:0:-;;;;:::o;3768:52::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;739:26:1:-;;;;;;;;;;;;;:::o;491:46::-;;;;;;;;;;;;;;;;;;;;;;:::o;10810:870:0:-;10858:15;11212:11;10876:4;:12;10881:6;10876:12;;;;;;;;;;;10858:30;;10920:3;:15;;;;;;;;;;;;10906:29;;:10;:29;;;10898:38;;;;;;;;10960:18;;10954:3;:24;10946:33;;;;;;;;10998:3;:13;;;;;;;;;;;;10997:14;10989:23;;;;;;;;11039:4;11023:3;:13;;;:20;;;;;;;;;;;;;;;;;;11233:16;;11227:3;:22;11226:125;;11334:16;;11313:18;;:37;11304:3;11283:18;;:24;11268:3;:11;;;:40;11267:84;;;;;;;;11226:125;;;11253:3;:11;;;11226:125;11212:139;;11378:3;:11;;;11368:6;:21;;11361:29;;;;;;11560:6;11545:3;:11;;;:21;;;;;;;;;;;11606:1;11601;11589:3;:9;;;:13;11588:19;;;;;;;;11576:3;:9;;:31;;;;11646:10;:19;;:27;11666:6;11646:27;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;11646:27:0;10810:870;;;:::o;4249:19::-;;;;:::o;4132:30::-;;;;:::o;2114:26::-;;;;;;;;;;;;;:::o;3708:33::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;19752:1311::-;19803:14;19819:21;19842:23;19867:33;19902:28;20098:15;19963:4;:10;2365:2;19963:10;;;;;;;;;;;:15;;;19942:36;;20049:929;2231:1;20056:18;:26;;20049:929;;;20116:4;:24;20121:18;20116:24;;;;;;;;;;;20098:42;;20184:3;:16;;;20172:9;20158:3;:11;;;:23;:42;20154:814;;;20270:3;:11;;;20257:24;;;;4693:3;20348;:9;;;20334:3;:11;;;:23;20333:41;;;;;;;;20319:3;:11;;;:55;20299:75;;;;20413:3;:8;;;20392:29;;20154:814;;;20596:9;20576:3;:16;;;:29;;:64;;20639:1;20576:64;;;20627:9;20608:3;:16;;;:28;20576:64;20550:90;;20790:23;20777:36;;;;4693:3;20904;:9;;;20878:23;:35;20877:53;;;;;;;;20851:23;:79;20831:99;;;;20948:5;;20154:814;20049:929;;;21019:4;:24;21024:18;21019:24;;;;;;;;;;;:37;;;20988:68;;19752:1311;;;;;;:::o;4488:20::-;;;;:::o;3870:25::-;;;;:::o;19140:243::-;19205:17;19239:6;19248:1;19239:10;;19234:142;19255:17;:31;19273:12;19255:31;;;;;;;;;;;;;;;:38;;;;19251:1;:42;19234:142;;;19328:4;:40;19333:17;:31;19351:12;19333:31;;;;;;;;;;;;;;;19365:1;19333:34;;;;;;;;;;;;;;;;;;19328:40;;;;;;;;;;;:48;;;19312:64;;;;19295:3;;;;;19234:142;;;19140:243;;;;:::o;18255:411::-;18292:6;18320:16;;18314:3;:22;18310:349;;;18372:8;;18365:15;;;;18310:349;18405:7;;18399:3;:13;18395:264;;;18467:1;18460:8;;;;18395:264;18642:16;;18632:7;;:26;18623:3;18613:7;;:13;18601:8;;:26;18600:59;;;;;;;;18593:66;;18255:411;;:::o;3975:21::-;;;;:::o;4212:190:1:-;4305:6;889:10;874:25;;:11;;;;;;;;;;;:25;;;866:34;;;;;;;;4312:1;4305:8;;4301:94;4316:15;:22;4314:1;:24;4301:94;;;4390:5;4356:13;:33;4370:15;4386:1;4370:18;;;;;;;;;;;;;;;;;;4356:33;;;;;;;;;;;;;;;;:39;;;;;;;;;;;;;;;;;;4339:3;;;;;4301:94;;;4212:190;;:::o;2046:20:0:-;;;;;;;;;;;;;:::o;450:35:1:-;;;;:::o;4814:21:0:-;;;;;;;;;;;;;:::o;604:52:1:-;;;;;;;;;;;;;;;;;;;;;;:::o;17106:879:0:-;17179:15;17206:9;17238:10;17330:19;17376:9;17414:19;17218:10;17206:22;;17259:698;17266:5;17265:6;17259:698;;;17352:4;:10;17357:4;17352:10;;;;;;;;;;;17330:32;;17388:7;:12;;;17376:24;;17436:4;:10;17441:4;17436:10;;;;;;;;;;;17414:32;;17481:7;:20;;;17465:13;:36;17461:485;;;17565:4;17558:11;;17461:485;;;17609:7;:20;;;17592:13;:37;;17588:358;;;17823:7;:12;;;17816:19;;17588:358;;;17942:4;17934:12;;17588:358;17461:485;17259:698;;;17974:4;17967:11;;17106:879;;;;;;;;;:::o;10377:139::-;10456:53;10466:13;10481:27;10488:13;10502:5;10481:6;:27::i;:::-;10456:9;:53::i;:::-;10377:139;;:::o;5066:30::-;;;;:::o;4048:28::-;;;;:::o;3300:104:1:-;5441:10:0;5432:19;;:5;;;;;;;;;;;:19;;;5424:28;;;;;;;;3385:12:1;3373:11;;:24;;;;;;;;;;;;;;;;;;3300:104;:::o;4320:18:0:-;;;;;;;;;;;;;:::o;3867:207:1:-;3966:6;889:10;874:25;;:11;;;;;;;;;;;:25;;;866:34;;;;;;;;3973:1;3966:8;;3962:105;3977:18;:25;3975:1;:27;3962:105;;;4063:4;4020:19;:42;4040:18;4059:1;4040:21;;;;;;;;;;;;;;;;;;4020:42;;;;;;;;;;;;;;;;:47;;;;;;;;;;;;;;;;;;4003:3;;;;;3962:105;;;3867:207;;:::o;8364:1191:0:-;8440:19;8483:9;8517:19;8462:4;:11;8467:5;8462:11;;;;;;;;;;;8440:33;;8495:7;:12;;;8483:24;;8539:4;:10;8544:4;8539:10;;;;;;;;;;;8517:32;;8584:7;:20;;;8567:13;:37;;:77;;;;;8624:7;:20;;;8608:13;:36;8567:77;8559:86;;;;;;;;8768:9;;8761:3;:16;;:33;;;;;8787:7;;8781:3;:13;8761:33;8753:42;;;;;;;;8847:9;;8845:11;;;;;;;;;;;8990:9;;8975:7;:12;;:24;;;;9024:9;;9009:7;:12;;:24;;;;9089:261;;;;;;;;;9113:4;9089:261;;;;9137:5;9089:261;;;;9170:13;9089:261;;;;9206:9;9089:261;;;;9236:7;:5;:7::i;:::-;9089:261;;;;9270:10;9089:261;;;;;;9305:5;9089:261;;;;;;9334:5;9089:261;;;;;9071:4;:15;9076:9;;9071:15;;;;;;;;;;;:279;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9425:17;:29;9443:10;9425:29;;;;;;;;;;;;;;;9460:9;;9425:45;;39:1:-1;33:3;27:10;23:18;57:10;52:3;45:23;79:10;72:17;;0:93;9425:45:0;;;;;;;;;;;;;;;;;;;;;;9544:3;9533:9;;9521:10;9508:40;;;;;;;;;;;;8364:1191;;;;;:::o", "source": - "/** @title Interactive Coin Offering\n * @author Clément Lesaege - \n */\n\npragma solidity ^0.4.18;\n\nimport \"zeppelin-solidity/contracts/token/ERC20/ERC20.sol\";\n\n/** @title Interactive Coin Offering\n * This contract implements the Interactive Coin Offering token sale as described in this paper:\n * https://people.cs.uchicago.edu/~teutsch/papers/ico.pdf\n * Implementation details and modifications compared to the paper:\n * -A fixed amount of tokens is sold. This allows more flexibility for the distribution of the remaining tokens (rounds, team tokens which can be preallocated, non-initial sell of some cryptographic assets).\n * -The valuation pointer is only moved when the sale is over. This greatly reduces the amount of write operations and code complexity. However, at least one party must make one or multiple calls to finalize the sale.\n * -Buckets are not used as they are not required and increase code complexity.\n * -The bid submitter must provide the insertion spot. A search of the insertion spot is still done in the contract just in case the one provided was wrong or other bids were added between when the TX got signed and executed, but giving the search starting point greatly lowers gas consumption.\n * -Automatic withdrawals are only possible at the end of the sale. This decreases code complexity and possible interactions between different parts of the code.\n * -We put a full bonus, free withdrawal period at the beginning. This allows everyone to have a chance to place bids with full bonus and avoids clogging the network just after the sale starts. Note that at this moment, no information can be taken for granted as parties can withdraw freely.\n * -Calling the fallback function while sending ETH places a bid with an infinite maximum valuation. This allows buyers who want to buy no matter the price not need to use a specific interface and just send ETH. Without ETH, a call to the fallback function redeems the bids of the caller.\n */\ncontract IICO {\n\n /* *** General *** */\n address public owner; // The one setting up the contract.\n address public beneficiary; // The address which will get the funds.\n\n /* *** Bid *** */\n uint constant HEAD = 0; // Minimum value used for both the maxVal and bidID of the head of the linked list.\n uint constant TAIL = uint(-1); // Maximum value used for both the maxVal and bidID of the tail of the linked list.\n uint constant INFINITY = uint(-2); // A value so high that a bid using it is guaranteed to succeed. Still lower than TAIL to be placed before TAIL.\n // A bid to buy tokens as long as the personal maximum valuation is not exceeded.\n // Bids are in a sorted doubly linked list.\n // They are sorted in ascending order by (maxVal,bidID) where bidID is the ID and key of the bid in the mapping.\n // The list contains two artificial bids HEAD and TAIL having respectively the minimum and maximum bidID and maxVal.\n struct Bid {\n /* *** Linked List Members *** */\n uint prev; // bidID of the previous element.\n uint next; // bidID of the next element.\n /* *** Bid Members *** */\n uint maxVal; // Maximum valuation in wei beyond which the contributor prefers refund.\n uint contrib; // Contribution in wei.\n uint bonus; // The numerator of the bonus that will be divided by BONUS_DIVISOR.\n address contributor; // The contributor who placed the bid.\n bool withdrawn; // True if the bid has been withdrawn.\n bool redeemed; // True if the ETH or tokens have been redeemed.\n }\n mapping (uint => Bid) public bids; // Map bidID to bid.\n mapping (address => uint[]) public contributorBidIDs; // Map contributor to a list of its bid ID.\n uint public lastBidID = 0; // The last bidID not accounting TAIL.\n\n /* *** Sale parameters *** */\n uint public startTime; // When the sale starts.\n uint public endFullBonusTime; // When the full bonus period ends.\n uint public withdrawalLockTime; // When the contributors can't withdraw their bids manually anymore.\n uint public endTime; // When the sale ends.\n ERC20 public token; // The token which is sold.\n uint public tokensForSale; // The amount of tokens which will be sold.\n uint public maxBonus; // The maximum bonus. Will be normalized by BONUS_DIVISOR. For example for a 20% bonus, _maxBonus must be 0.2 * BONUS_DIVISOR.\n uint constant BONUS_DIVISOR = 1E9; // The quantity we need to divide by to normalize the bonus.\n\n /* *** Finalization variables *** */\n bool public finalized; // True when the cutting bid has been found. The following variables are final only after finalized==true.\n uint public cutOffBidID = TAIL; // The first accepted bid. All bids after it are accepted.\n uint public sumAcceptedContrib; // The sum of accepted contributions.\n uint public sumAcceptedVirtualContrib; // The sum of virtual (taking into account bonuses) contributions.\n\n modifier onlyOwner{ require(owner == msg.sender); _; }\n\n /* *** Functions Modifying the state *** */\n\n /** @dev Constructor. First contract set up (tokens will also need to be transferred to the contract and then setToken needs to be called to finish the setup).\n * @param _startTime Time the sale will start in seconds since the Unix Epoch.\n * @param _fullBonusLength Amount of seconds the sale lasts in the full bonus period.\n * @param _partialWithdrawalLength Amount of seconds the sale lasts in the partial withdrawal period.\n * @param _withdrawalLockUpLength Amount of seconds the sale lasts in the withdrawal lockup period.\n * @param _maxBonus The maximum bonus. Will be normalized by BONUS_DIVISOR. For example for a 20% bonus, _maxBonus must be 0.2 * BONUS_DIVISOR.\n * @param _beneficiary The party which will get the funds of the token sale.\n */\n function IICO(uint _startTime, uint _fullBonusLength, uint _partialWithdrawalLength, uint _withdrawalLockUpLength, uint _maxBonus, address _beneficiary) public {\n owner = msg.sender;\n startTime = _startTime;\n endFullBonusTime = startTime + _fullBonusLength;\n withdrawalLockTime = endFullBonusTime + _partialWithdrawalLength;\n endTime = withdrawalLockTime + _withdrawalLockUpLength;\n maxBonus = _maxBonus;\n beneficiary = _beneficiary;\n\n // Add the virtual bids. This simplifies other functions.\n bids[HEAD] = Bid({\n prev: TAIL,\n next: TAIL,\n maxVal: HEAD,\n contrib: 0,\n bonus: 0,\n contributor: 0x0,\n withdrawn: false,\n redeemed: false\n });\n bids[TAIL] = Bid({\n prev: HEAD,\n next: HEAD,\n maxVal: TAIL,\n contrib: 0,\n bonus: 0,\n contributor: 0x0,\n withdrawn: false,\n redeemed: false\n });\n }\n\n /** @dev Set the token. Must only be called after the IICO contract receives the tokens to be sold.\n * @param _token The token to be sold.\n */\n function setToken(ERC20 _token) public onlyOwner {\n require(address(token) == 0x0);\n\n token = _token;\n tokensForSale = token.balanceOf(this);\n }\n\n /** @dev Submit a bid. The caller must give the exact position the bid must be inserted into in the list.\n * In practice, use searchAndBid to avoid the position being incorrect due to a new bid being inserted and changing the position the bid must be inserted at.\n * @param _maxVal The maximum valuation given by the contributor. If the amount raised is higher, the bid is cancelled and the contributor refunded because it prefers a refund instead of this level of dilution. To buy no matter what, use INFINITY.\n * @param _next The bidID of the next bid in the list.\n */\n function submitBid(uint _maxVal, uint _next) public payable {\n Bid storage nextBid = bids[_next];\n uint prev = nextBid.prev;\n Bid storage prevBid = bids[prev];\n require(_maxVal >= prevBid.maxVal && _maxVal < nextBid.maxVal); // The new bid maxVal is higher than the previous one and strictly lower than the next one.\n require(now >= startTime && now < endTime); // Check that the bids are still open.\n\n ++lastBidID; // Increment the lastBidID. It will be the new bid's ID.\n // Update the pointers of neighboring bids.\n prevBid.next = lastBidID;\n nextBid.prev = lastBidID;\n\n // Insert the bid.\n bids[lastBidID] = Bid({\n prev: prev,\n next: _next,\n maxVal: _maxVal,\n contrib: msg.value,\n bonus: bonus(),\n contributor: msg.sender,\n withdrawn: false,\n redeemed: false\n });\n\n // Add the bid to the list of bids by this contributor.\n contributorBidIDs[msg.sender].push(lastBidID);\n }\n\n\n /** @dev Search for the correct insertion spot and submit a bid.\n * This function is O(n), where n is the amount of bids between the initial search position and the insertion position.\n * The UI must first call search to find the best point to start the search so it consumes the least amount of gas possible.\n * Using this function instead of calling submitBid directly prevents it from failing in the case where new bids are added before the transaction is executed.\n * @param _maxVal The maximum valuation given by the contributor. If the amount raised is higher, the bid is cancelled and the contributor refunded because it prefers a refund instead of this level of dilution. To buy no matter what, use INFINITY.\n * @param _next The bidID of the next bid in the list.\n */\n function searchAndBid(uint _maxVal, uint _next) public payable {\n submitBid(_maxVal, search(_maxVal,_next));\n }\n\n /** @dev Withdraw a bid. Can only be called before the end of the withdrawal lock period.\n * Withdrawing a bid divides its bonus by 3.\n * For retrieving ETH after an automatic withdrawal, use the redeem function.\n * @param _bidID The ID of the bid to withdraw.\n */\n function withdraw(uint _bidID) public {\n Bid storage bid = bids[_bidID];\n require(msg.sender == bid.contributor);\n require(now < withdrawalLockTime);\n require(!bid.withdrawn);\n\n bid.withdrawn = true;\n\n // Before endFullBonusTime, everything is refunded. Otherwise, an amount decreasing linearly from endFullBonusTime to withdrawalLockTime is refunded.\n uint refund = (now < endFullBonusTime) ? bid.contrib : (bid.contrib * (withdrawalLockTime - now)) / (withdrawalLockTime - endFullBonusTime);\n assert(refund <= bid.contrib); // Make sure that we don't refund more than the contribution. Would a bug arise, we prefer blocking withdrawal than letting someone steal money.\n bid.contrib -= refund;\n bid.bonus /= 3; // Divide the bonus by 3.\n\n msg.sender.transfer(refund);\n }\n\n /** @dev Finalize by finding the cut-off bid.\n * Since the amount of bids is not bounded, this function may have to be called multiple times.\n * The function is O(min(n,_maxIt)) where n is the amount of bids. In total it will perform O(n) computations, possibly in multiple calls.\n * Each call only has a O(1) storage write operations.\n * @param _maxIt The maximum amount of bids to go through. This value must be set in order to not exceed the gas limit.\n */\n function finalize(uint _maxIt) public {\n require(now >= endTime);\n require(!finalized);\n\n // Make local copies of the finalization variables in order to avoid modifying storage in order to save gas.\n uint localCutOffBidID = cutOffBidID;\n uint localSumAcceptedContrib = sumAcceptedContrib;\n uint localSumAcceptedVirtualContrib = sumAcceptedVirtualContrib;\n\n // Search for the cut-off bid while adding the contributions.\n for (uint it = 0; it < _maxIt && !finalized; ++it) {\n Bid storage bid = bids[localCutOffBidID];\n if (bid.contrib+localSumAcceptedContrib < bid.maxVal) { // We haven't found the cut-off yet.\n localSumAcceptedContrib += bid.contrib;\n localSumAcceptedVirtualContrib += bid.contrib + (bid.contrib * bid.bonus) / BONUS_DIVISOR;\n localCutOffBidID = bid.prev; // Go to the previous bid.\n } else { // We found the cut-off. This bid will be taken partially.\n finalized = true;\n uint contribCutOff = bid.maxVal >= localSumAcceptedContrib ? bid.maxVal - localSumAcceptedContrib : 0; // The amount of the contribution of the cut-off bid that can stay in the sale without spilling over the maxVal.\n contribCutOff = contribCutOff < bid.contrib ? contribCutOff : bid.contrib; // The amount that stays in the sale should not be more than the original contribution. This line is not required but it is added as an extra security measure.\n bid.contributor.send(bid.contrib-contribCutOff); // Send the non-accepted part. Use send in order to not block if the contributor's fallback reverts.\n bid.contrib = contribCutOff; // Update the contribution value.\n localSumAcceptedContrib += bid.contrib;\n localSumAcceptedVirtualContrib += bid.contrib + (bid.contrib * bid.bonus) / BONUS_DIVISOR;\n beneficiary.send(localSumAcceptedContrib); // Use send in order to not block if the contributor's fallback reverts.\n }\n }\n\n // Update storage.\n cutOffBidID = localCutOffBidID;\n sumAcceptedContrib = localSumAcceptedContrib;\n sumAcceptedVirtualContrib = localSumAcceptedVirtualContrib;\n }\n\n /** @dev Redeem a bid. If the bid is accepted, send the tokens, otherwise refund the ETH.\n * Note that anyone can call this function, not only the party which made the bid.\n * @param _bidID ID of the bid to withdraw.\n */\n function redeem(uint _bidID) public {\n Bid storage bid = bids[_bidID];\n Bid storage cutOffBid = bids[cutOffBidID];\n require(finalized);\n require(!bid.redeemed);\n\n bid.redeemed=true;\n if (bid.maxVal > cutOffBid.maxVal || (bid.maxVal == cutOffBid.maxVal && _bidID >= cutOffBidID)) // Give tokens if the bid is accepted.\n token.transfer(bid.contributor, (tokensForSale * (bid.contrib + (bid.contrib * bid.bonus) / BONUS_DIVISOR)) / sumAcceptedVirtualContrib);\n else // Reimburse ETH otherwise.\n bid.contributor.transfer(bid.contrib);\n }\n\n /** @dev Fallback. Make a bid if ETH are sent. Redeem all the bids of the contributor otherwise.\n * This allows users to bid and get their tokens back using only send operations.\n */\n function () public payable {\n if (msg.value != 0 && now >= startTime && now < endTime) // Make a bid with an infinite maxVal if some ETH was sent.\n submitBid(INFINITY, TAIL);\n else if (msg.value == 0 && finalized) // Else, redeem all the non redeemed bids if no ETH was sent.\n for (uint i = 0; i < contributorBidIDs[msg.sender].length; ++i)\n if (!bids[contributorBidIDs[msg.sender][i]].redeemed)\n redeem(contributorBidIDs[msg.sender][i]);\n else // Otherwise, no actions are possible.\n revert();\n }\n\n /* *** Constant and View *** */\n\n /** @dev Search for the correct insertion spot of a bid.\n * This function is O(n), where n is the amount of bids between the initial search position and the insertion position.\n * @param _maxVal The maximum valuation given by the contributor. Or INFINITY if no maximum valuation is given.\n * @param _nextStart The bidID of the next bid from the initial position to start the search from.\n * @return nextInsert The bidID of the next bid from the position the bid must be inserted at.\n */\n function search(uint _maxVal, uint _nextStart) constant public returns(uint nextInsert) {\n uint next = _nextStart;\n bool found;\n\n while(!found) { // While we aren't at the insertion point.\n Bid storage nextBid = bids[next];\n uint prev = nextBid.prev;\n Bid storage prevBid = bids[prev];\n\n if (_maxVal < prevBid.maxVal) // It should be inserted before.\n next = prev;\n else if (_maxVal >= nextBid.maxVal) // It should be inserted after. The second value we sort by is bidID. Those are increasing, thus if the next bid is of the same maxVal, we should insert after it.\n next = nextBid.next;\n else // We found the insertion point.\n found = true;\n }\n\n return next;\n }\n\n /** @dev Return the current bonus. The bonus only changes in 1/BONUS_DIVISOR increments.\n * @return b The bonus expressed in 1/BONUS_DIVISOR. Will be normalized by BONUS_DIVISOR. For example for a 20% bonus, _maxBonus must be 0.2 * BONUS_DIVISOR.\n */\n function bonus() public constant returns(uint b) {\n if (now < endFullBonusTime) // Full bonus.\n return maxBonus;\n else if (now > endTime) // Assume no bonus after end.\n return 0;\n else // Compute the bonus decreasing linearly from endFullBonusTime to endTime.\n return (maxBonus * (endTime - now)) / (endTime - endFullBonusTime);\n }\n\n /** @dev Get the total contribution of an address.\n * This can be used for a KYC threshold.\n * This function is O(n) where n is the amount of bids made by the contributor.\n * This means that the contributor can make totalContrib(contributor) revert due to an out of gas error on purpose.\n * @param _contributor The contributor whose contribution will be returned.\n * @return contribution The total contribution of the contributor.\n */\n function totalContrib(address _contributor) public constant returns (uint contribution) {\n for (uint i = 0; i < contributorBidIDs[_contributor].length; ++i)\n contribution += bids[contributorBidIDs[_contributor][i]].contrib;\n }\n\n /* *** Interface Views *** */\n\n /**\n * @dev Get the current valuation and cut off bid's details.\n * @return The current valuation and cut off bid's details.\n */\n function valuationAndCutOff() public view returns (uint valuation, uint virtualValuation, uint cutOffBidID, uint cutOffBidMaxVal, uint cutOffBidContrib) {\n uint localCutOffBidID = bids[TAIL].prev;\n\n // Loop over all bids or until cut off bid is found\n while (localCutOffBidID != HEAD) {\n Bid storage bid = bids[localCutOffBidID];\n if (bid.contrib + valuation < bid.maxVal) { // We haven't found the cut-off yet.\n valuation += bid.contrib;\n virtualValuation += bid.contrib + (bid.contrib * bid.bonus) / BONUS_DIVISOR;\n localCutOffBidID = bid.prev; // Go to the previous bid.\n } else { // We found the cut-off bid. This bid will be taken partially.\n cutOffBidContrib = bid.maxVal >= valuation ? bid.maxVal - valuation : 0; // The amount of the contribution of the cut-off bid that can stay in the sale without spilling over the maxVal.\n valuation += cutOffBidContrib;\n virtualValuation += cutOffBidContrib + (cutOffBidContrib * bid.bonus) / BONUS_DIVISOR;\n break;\n }\n }\n\n cutOffBidMaxVal = bids[localCutOffBidID].maxVal;\n cutOffBidID = localCutOffBidID;\n }\n}\n", + "/** @title Level Whitelisted Interactive Coin Offering\n * @author Clément Lesaege - \n */\n\npragma solidity ^0.4.23;\n\nimport \"./IICO.sol\";\n\n/** @title Level Whitelisted Interactive Coin Offering\n * This contract implements an Interactive Coin Offering with two whitelists:\n * - The base one, with limited contribution.\n * - The reinforced one, with unlimited contribution.\n */\ncontract LevelWhitelistedIICO is IICO {\n \n uint public maximumBaseContribution;\n mapping (address => bool) public baseWhitelist; // True if in the base whitelist (has a contribution limit).\n mapping (address => bool) public reinforcedWhitelist; // True if in the reinforced whitelist (does not have a contribution limit).\n address public whitelister; // The party which can add or remove people from the whitelist.\n \n modifier onlyWhitelister{ require(whitelister == msg.sender); _; }\n \n /** @dev Constructor. First contract set up (tokens will also need to be transferred to the contract and then setToken needs to be called to finish the setup).\n * @param _startTime Time the sale will start in seconds since the Unix Epoch.\n * @param _fullBonusLength Amount of seconds the sale lasts in the full bonus period.\n * @param _partialWithdrawalLength Amount of seconds the sale lasts in the partial withdrawal period.\n * @param _withdrawalLockUpLength Amount of seconds the sale lasts in the withdrawal lockup period.\n * @param _maxBonus The maximum bonus. Will be normalized by BONUS_DIVISOR. For example for a 20% bonus, _maxBonus must be 0.2 * BONUS_DIVISOR.\n * @param _beneficiary The party which will get the funds of the token sale.\n * @param _maximumBaseContribution The maximum contribution for buyers on the base list.\n */\n function LevelWhitelistedIICO(uint _startTime, uint _fullBonusLength, uint _partialWithdrawalLength, uint _withdrawalLockUpLength, uint _maxBonus, address _beneficiary, uint _maximumBaseContribution) IICO(_startTime,_fullBonusLength,_partialWithdrawalLength,_withdrawalLockUpLength,_maxBonus,_beneficiary) public {\n maximumBaseContribution=_maximumBaseContribution;\n }\n \n /** @dev Submit a bid. The caller must give the exact position the bid must be inserted into in the list.\n * In practice, use searchAndBid to avoid the position being incorrect due to a new bid being inserted and changing the position the bid must be inserted at.\n * @param _maxValuation The maximum valuation given by the contributor. If the amount raised is higher, the bid is cancelled and the contributor refunded because it prefers a refund instead of this level of dilution. To buy no matter what, use INFINITY.\n * @param _next The bidID of the next bid in the list.\n */\n function submitBid(uint _maxValuation, uint _next) public payable {\n require(reinforcedWhitelist[msg.sender] || (baseWhitelist[msg.sender] && (msg.value + totalContrib(msg.sender) <= maximumBaseContribution))); // Check if the buyer is in the reinforced whitelist or if it is on the base one and this would not make its total contribution exceed the limit.\n super.submitBid(_maxValuation,_next);\n }\n \n /** @dev Set the whitelister.\n * @param _whitelister The whitelister.\n */\n function setWhitelister(address _whitelister) public onlyOwner {\n whitelister=_whitelister;\n }\n \n /** @dev Add buyers to the base whitelist.\n * @param _buyersToWhitelist Buyers to add to the whitelist.\n */\n function addBaseWhitelist(address[] _buyersToWhitelist) public onlyWhitelister {\n for(uint i=0;i<_buyersToWhitelist.length;++i)\n baseWhitelist[_buyersToWhitelist[i]]=true;\n }\n \n /** @dev Add buyers to the reinforced whitelist.\n * @param _buyersToWhitelist Buyers to add to the whitelist.\n */\n function addReinforcedWhitelist(address[] _buyersToWhitelist) public onlyWhitelister {\n for(uint i=0;i<_buyersToWhitelist.length;++i)\n reinforcedWhitelist[_buyersToWhitelist[i]]=true;\n }\n \n /** @dev Remove buyers from the base whitelist.\n * @param _buyersToRemove Buyers to remove from the whitelist.\n */\n function removeBaseWhitelist(address[] _buyersToRemove) public onlyWhitelister {\n for(uint i=0;i<_buyersToRemove.length;++i)\n baseWhitelist[_buyersToRemove[i]]=false;\n }\n \n /** @dev Remove buyers from the reinforced whitelist.\n * @param _buyersToRemove Buyers to remove from the whitelist.\n */\n function removeReinforcedWhitelist(address[] _buyersToRemove) public onlyWhitelister {\n for(uint i=0;i<_buyersToRemove.length;++i)\n reinforcedWhitelist[_buyersToRemove[i]]=false;\n }\n\n}\n", "sourcePath": - "/Users/epiqueras/Work/kleros/openiico-contract/contracts/IICO.sol", + "/Users/epiqueras/Work/kleros/openiico-contract/contracts/LevelWhitelistedIICO.sol", "ast": { "absolutePath": - "/Users/epiqueras/Work/kleros/openiico-contract/contracts/IICO.sol", + "/Users/epiqueras/Work/kleros/openiico-contract/contracts/LevelWhitelistedIICO.sol", "exportedSymbols": { - "IICO": [939] + "LevelWhitelistedIICO": [1190] }, - "id": 940, + "id": 1191, "nodeType": "SourceUnit", "nodes": [ { - "id": 1, - "literals": ["solidity", "^", "0.4", ".18"], + "id": 966, + "literals": ["solidity", "^", "0.4", ".23"], "nodeType": "PragmaDirective", - "src": "95:24:0" + "src": "113:24:1" }, { - "absolutePath": "zeppelin-solidity/contracts/token/ERC20/ERC20.sol", - "file": "zeppelin-solidity/contracts/token/ERC20/ERC20.sol", - "id": 2, + "absolutePath": + "/Users/epiqueras/Work/kleros/openiico-contract/contracts/IICO.sol", + "file": "./IICO.sol", + "id": 967, "nodeType": "ImportDirective", - "scope": 940, - "sourceUnit": 983, - "src": "121:59:0", + "scope": 1191, + "sourceUnit": 965, + "src": "139:20:1", "symbolAliases": [], "unitAlias": "" }, { - "baseContracts": [], - "contractDependencies": [], + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 968, + "name": "IICO", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 964, + "src": "434:4:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IICO_$964", + "typeString": "contract IICO" + } + }, + "id": 969, + "nodeType": "InheritanceSpecifier", + "src": "434:4:1" + } + ], + "contractDependencies": [964], "contractKind": "contract", "documentation": - "@title Interactive Coin Offering\n This contract implements the Interactive Coin Offering token sale as described in this paper:\n https://people.cs.uchicago.edu/~teutsch/papers/ico.pdf\n Implementation details and modifications compared to the paper:\n -A fixed amount of tokens is sold. This allows more flexibility for the distribution of the remaining tokens (rounds, team tokens which can be preallocated, non-initial sell of some cryptographic assets).\n -The valuation pointer is only moved when the sale is over. This greatly reduces the amount of write operations and code complexity. However, at least one party must make one or multiple calls to finalize the sale.\n -Buckets are not used as they are not required and increase code complexity.\n -The bid submitter must provide the insertion spot. A search of the insertion spot is still done in the contract just in case the one provided was wrong or other bids were added between when the TX got signed and executed, but giving the search starting point greatly lowers gas consumption.\n -Automatic withdrawals are only possible at the end of the sale. This decreases code complexity and possible interactions between different parts of the code.\n -We put a full bonus, free withdrawal period at the beginning. This allows everyone to have a chance to place bids with full bonus and avoids clogging the network just after the sale starts. Note that at this moment, no information can be taken for granted as parties can withdraw freely.\n -Calling the fallback function while sending ETH places a bid with an infinite maximum valuation. This allows buyers who want to buy no matter the price not need to use a specific interface and just send ETH. Without ETH, a call to the fallback function redeems the bids of the caller.", + "@title Level Whitelisted Interactive Coin Offering\n This contract implements an Interactive Coin Offering with two whitelists:\n - The base one, with limited contribution.\n - The reinforced one, with unlimited contribution.", "fullyImplemented": true, - "id": 939, - "linearizedBaseContracts": [939], - "name": "IICO", + "id": 1190, + "linearizedBaseContracts": [1190, 964], + "name": "LevelWhitelistedIICO", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, - "id": 4, - "name": "owner", + "id": 971, + "name": "maximumBaseContribution", "nodeType": "VariableDeclaration", - "scope": 939, - "src": "2046:20:0", + "scope": 1190, + "src": "450:35:1", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, "typeName": { - "id": 3, - "name": "address", + "id": 970, + "name": "uint", "nodeType": "ElementaryTypeName", - "src": "2046:7:0", + "src": "450:4:1", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, "value": null, @@ -560,983 +742,618 @@ }, { "constant": false, - "id": 6, - "name": "beneficiary", + "id": 975, + "name": "baseWhitelist", "nodeType": "VariableDeclaration", - "scope": 939, - "src": "2114:26:0", + "scope": 1190, + "src": "491:46:1", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" }, "typeName": { - "id": 5, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2114:7:0", + "id": 974, + "keyType": { + "id": 972, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "500:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "491:25:1", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + }, + "valueType": { + "id": 973, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "511:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } } }, "value": null, "visibility": "public" }, { - "constant": true, - "id": 9, - "name": "HEAD", + "constant": false, + "id": 979, + "name": "reinforcedWhitelist", "nodeType": "VariableDeclaration", - "scope": 939, - "src": "2210:22:0", + "scope": 1190, + "src": "604:52:1", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" }, "typeName": { - "id": 7, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2210:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30", - "id": 8, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2231:1:0", - "subdenomination": null, + "id": 978, + "keyType": { + "id": 976, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "613:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "604:25:1", "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" }, - "value": "0" + "valueType": { + "id": 977, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "624:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } }, - "visibility": "internal" + "value": null, + "visibility": "public" }, { - "constant": true, - "id": 15, - "name": "TAIL", + "constant": false, + "id": 981, + "name": "whitelister", "nodeType": "VariableDeclaration", - "scope": 939, - "src": "2333:29:0", + "scope": 1190, + "src": "739:26:1", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_address", + "typeString": "address" }, "typeName": { - "id": 10, - "name": "uint", + "id": 980, + "name": "address", "nodeType": "ElementaryTypeName", - "src": "2333:4:0", + "src": "739:7:1", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_address", + "typeString": "address" } }, - "value": { - "argumentTypes": null, - "arguments": [ + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 991, + "nodeType": "Block", + "src": "864:42:1", + "statements": [ { - "argumentTypes": null, - "id": 13, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "-", - "prefix": true, - "src": "2359:2:0", - "subExpression": { + "expression": { "argumentTypes": null, - "hexValue": "31", - "id": 12, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 987, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 984, + "name": "whitelister", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 981, + "src": "874:11:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 985, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1929, + "src": "889:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 986, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "889:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "874:25:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 983, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [1932, 1933], + "referencedDeclaration": 1932, + "src": "866:7:1", + "typeDescriptions": { + "typeIdentifier": + "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 988, "isConstant": false, "isLValue": false, - "isPure": true, - "kind": "number", + "isPure": false, + "kind": "functionCall", "lValueRequested": false, - "nodeType": "Literal", - "src": "2360:1:0", - "subdenomination": null, + "names": [], + "nodeType": "FunctionCall", + "src": "866:34:1", "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } }, - "typeDescriptions": { - "typeIdentifier": "t_rational_-1_by_1", - "typeString": "int_const -1" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_-1_by_1", - "typeString": "int_const -1" - } - ], - "id": 11, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2354:4:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" + "id": 989, + "nodeType": "ExpressionStatement", + "src": "866:34:1" }, - "typeName": "uint" - }, - "id": 14, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2354:8:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": true, - "id": 21, - "name": "INFINITY", - "nodeType": "VariableDeclaration", - "scope": 939, - "src": "2456:33:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + { + "id": 990, + "nodeType": "PlaceholderStatement", + "src": "902:1:1" + } + ] }, - "typeName": { - "id": 16, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2456:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } + "documentation": null, + "id": 992, + "name": "onlyWhitelister", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 982, + "nodeType": "ParameterList", + "parameters": [], + "src": "864:0:1" }, - "value": { - "argumentTypes": null, - "arguments": [ + "src": "840:66:1", + "visibility": "internal" + }, + { + "body": { + "id": 1021, + "nodeType": "Block", + "src": "2113:65:1", + "statements": [ { - "argumentTypes": null, - "id": 19, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "-", - "prefix": true, - "src": "2486:2:0", - "subExpression": { + "expression": { "argumentTypes": null, - "hexValue": "32", - "id": 18, + "id": 1019, "isConstant": false, "isLValue": false, - "isPure": true, - "kind": "number", + "isPure": false, "lValueRequested": false, - "nodeType": "Literal", - "src": "2487:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" + "leftHandSide": { + "argumentTypes": null, + "id": 1017, + "name": "maximumBaseContribution", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 971, + "src": "2123:23:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1018, + "name": "_maximumBaseContribution", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1006, + "src": "2147:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } }, - "value": "2" + "src": "2123:48:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } }, - "typeDescriptions": { - "typeIdentifier": "t_rational_-2_by_1", - "typeString": "int_const -2" - } + "id": 1020, + "nodeType": "ExpressionStatement", + "src": "2123:48:1" } - ], - "expression": { - "argumentTypes": [ + ] + }, + "documentation": + "@dev Constructor. First contract set up (tokens will also need to be transferred to the contract and then setToken needs to be called to finish the setup).\n @param _startTime Time the sale will start in seconds since the Unix Epoch.\n @param _fullBonusLength Amount of seconds the sale lasts in the full bonus period.\n @param _partialWithdrawalLength Amount of seconds the sale lasts in the partial withdrawal period.\n @param _withdrawalLockUpLength Amount of seconds the sale lasts in the withdrawal lockup period.\n @param _maxBonus The maximum bonus. Will be normalized by BONUS_DIVISOR. For example for a 20% bonus, _maxBonus must be 0.2 * BONUS_DIVISOR.\n @param _beneficiary The party which will get the funds of the token sale.\n @param _maximumBaseContribution The maximum contribution for buyers on the base list.", + "id": 1022, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 1009, + "name": "_startTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 994, + "src": "2005:10:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1010, + "name": "_fullBonusLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 996, + "src": "2016:16:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1011, + "name": "_partialWithdrawalLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 998, + "src": "2033:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1012, + "name": "_withdrawalLockUpLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1000, + "src": "2058:23:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1013, + "name": "_maxBonus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1002, + "src": "2082:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, { - "typeIdentifier": "t_rational_-2_by_1", - "typeString": "int_const -2" + "argumentTypes": null, + "id": 1014, + "name": "_beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1004, + "src": "2092:12:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } } ], - "id": 17, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2481:4:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" + "id": 1015, + "modifierName": { + "argumentTypes": null, + "id": 1008, + "name": "IICO", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 964, + "src": "2000:4:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IICO_$964_$", + "typeString": "type(contract IICO)" + } }, - "typeName": "uint" - }, - "id": 20, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2481:8:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "nodeType": "ModifierInvocation", + "src": "2000:105:1" } - }, - "visibility": "internal" - }, - { - "canonicalName": "IICO.Bid", - "id": 38, - "members": [ - { - "constant": false, - "id": 23, - "name": "prev", - "nodeType": "VariableDeclaration", - "scope": 38, - "src": "3043:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 22, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3043:4:0", + ], + "name": "LevelWhitelistedIICO", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1007, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 994, + "name": "_startTime", + "nodeType": "VariableDeclaration", + "scope": 1022, + "src": "1830:15:1", + "stateVariable": false, + "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 25, - "name": "next", - "nodeType": "VariableDeclaration", - "scope": 38, - "src": "3107:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + }, + "typeName": { + "id": 993, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1830:4:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" }, - "typeName": { - "id": 24, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3107:4:0", + { + "constant": false, + "id": 996, + "name": "_fullBonusLength", + "nodeType": "VariableDeclaration", + "scope": 1022, + "src": "1847:21:1", + "stateVariable": false, + "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 27, - "name": "maxVal", - "nodeType": "VariableDeclaration", - "scope": 38, - "src": "3209:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + }, + "typeName": { + "id": 995, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1847:4:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" }, - "typeName": { - "id": 26, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3209:4:0", + { + "constant": false, + "id": 998, + "name": "_partialWithdrawalLength", + "nodeType": "VariableDeclaration", + "scope": 1022, + "src": "1870:29:1", + "stateVariable": false, + "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 29, - "name": "contrib", - "nodeType": "VariableDeclaration", - "scope": 38, - "src": "3312:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + }, + "typeName": { + "id": 997, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1870:4:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" }, - "typeName": { - "id": 28, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3312:4:0", + { + "constant": false, + "id": 1000, + "name": "_withdrawalLockUpLength", + "nodeType": "VariableDeclaration", + "scope": 1022, + "src": "1901:28:1", + "stateVariable": false, + "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 31, - "name": "bonus", - "nodeType": "VariableDeclaration", - "scope": 38, - "src": "3366:10:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + }, + "typeName": { + "id": 999, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1901:4:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" }, - "typeName": { - "id": 30, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3366:4:0", + { + "constant": false, + "id": 1002, + "name": "_maxBonus", + "nodeType": "VariableDeclaration", + "scope": 1022, + "src": "1931:14:1", + "stateVariable": false, + "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 33, - "name": "contributor", - "nodeType": "VariableDeclaration", - "scope": 38, - "src": "3465:19:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + }, + "typeName": { + "id": 1001, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1931:4:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" }, - "typeName": { - "id": 32, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3465:7:0", + { + "constant": false, + "id": 1004, + "name": "_beneficiary", + "nodeType": "VariableDeclaration", + "scope": 1022, + "src": "1947:20:1", + "stateVariable": false, + "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 35, - "name": "withdrawn", - "nodeType": "VariableDeclaration", - "scope": 38, - "src": "3534:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 34, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "3534:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 37, - "name": "redeemed", - "nodeType": "VariableDeclaration", - "scope": 38, - "src": "3603:13:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 36, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "3603:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } + }, + "typeName": { + "id": 1003, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1947:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" }, - "value": null, - "visibility": "internal" - } - ], - "name": "Bid", - "nodeType": "StructDefinition", - "scope": 939, - "src": "2980:699:0", - "visibility": "public" - }, - { - "constant": false, - "id": 42, - "name": "bids", - "nodeType": "VariableDeclaration", - "scope": 939, - "src": "3684:33:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": - "t_mapping$_t_uint256_$_t_struct$_Bid_$38_storage_$", - "typeString": "mapping(uint256 => struct IICO.Bid storage ref)" - }, - "typeName": { - "id": 41, - "keyType": { - "id": 39, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3693:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Mapping", - "src": "3684:21:0", - "typeDescriptions": { - "typeIdentifier": - "t_mapping$_t_uint256_$_t_struct$_Bid_$38_storage_$", - "typeString": "mapping(uint256 => struct IICO.Bid storage ref)" - }, - "valueType": { - "contractScope": null, - "id": 40, - "name": "Bid", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 38, - "src": "3701:3:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 47, - "name": "contributorBidIDs", - "nodeType": "VariableDeclaration", - "scope": 939, - "src": "3744:52:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": - "t_mapping$_t_address_$_t_array$_t_uint256_$dyn_storage_$", - "typeString": "mapping(address => uint256[] storage ref)" - }, - "typeName": { - "id": 46, - "keyType": { - "id": 43, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3753:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "3744:27:0", - "typeDescriptions": { - "typeIdentifier": - "t_mapping$_t_address_$_t_array$_t_uint256_$dyn_storage_$", - "typeString": "mapping(address => uint256[] storage ref)" - }, - "valueType": { - "baseType": { - "id": 44, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3764:4:0", + { + "constant": false, + "id": 1006, + "name": "_maximumBaseContribution", + "nodeType": "VariableDeclaration", + "scope": 1022, + "src": "1969:29:1", + "stateVariable": false, + "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" - } - }, - "id": 45, - "length": null, - "nodeType": "ArrayTypeName", - "src": "3764:6:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[] storage pointer" + }, + "typeName": { + "id": 1005, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1969:4:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 50, - "name": "lastBidID", - "nodeType": "VariableDeclaration", - "scope": 939, - "src": "3846:25:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 48, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3846:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30", - "id": 49, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3870:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 52, - "name": "startTime", - "nodeType": "VariableDeclaration", - "scope": 939, - "src": "3951:21:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 51, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3951:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 54, - "name": "endFullBonusTime", - "nodeType": "VariableDeclaration", - "scope": 939, - "src": "4024:28:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 53, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "4024:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 56, - "name": "withdrawalLockTime", - "nodeType": "VariableDeclaration", - "scope": 939, - "src": "4108:30:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 55, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "4108:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 58, - "name": "endTime", - "nodeType": "VariableDeclaration", - "scope": 939, - "src": "4225:19:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 57, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "4225:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 60, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 939, - "src": "4296:18:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$982", - "typeString": "contract ERC20" - }, - "typeName": { - "contractScope": null, - "id": 59, - "name": "ERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 982, - "src": "4296:5:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$982", - "typeString": "contract ERC20" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 62, - "name": "tokensForSale", - "nodeType": "VariableDeclaration", - "scope": 939, - "src": "4372:25:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + ], + "src": "1829:170:1" }, - "typeName": { - "id": 61, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "4372:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } + "payable": false, + "returnParameters": { + "id": 1016, + "nodeType": "ParameterList", + "parameters": [], + "src": "2113:0:1" }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 64, - "name": "maxBonus", - "nodeType": "VariableDeclaration", - "scope": 939, - "src": "4464:20:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 63, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "4464:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": true, - "id": 67, - "name": "BONUS_DIVISOR", - "nodeType": "VariableDeclaration", - "scope": 939, - "src": "4639:33:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 65, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "4639:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "314539", - "id": 66, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4669:3:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000_by_1", - "typeString": "int_const 1000000000" - }, - "value": "1E9" - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 69, - "name": "finalized", - "nodeType": "VariableDeclaration", - "scope": 939, - "src": "4790:21:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 68, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "4790:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 72, - "name": "cutOffBidID", - "nodeType": "VariableDeclaration", - "scope": 939, - "src": "4940:30:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 70, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "4940:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "id": 71, - "name": "TAIL", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15, - "src": "4966:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "public" - }, - { - "constant": false, - "id": 74, - "name": "sumAcceptedContrib", - "nodeType": "VariableDeclaration", - "scope": 939, - "src": "5042:30:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 73, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5042:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 76, - "name": "sumAcceptedVirtualContrib", - "nodeType": "VariableDeclaration", - "scope": 939, - "src": "5123:37:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 75, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5123:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, + "scope": 1190, + "src": "1800:378:1", + "stateMutability": "nonpayable", + "superFunction": null, "visibility": "public" }, { "body": { - "id": 86, + "id": 1060, "nodeType": "Block", - "src": "5252:36:0", + "src": "2854:349:1", "statements": [ { "expression": { @@ -1545,532 +1362,569 @@ { "argumentTypes": null, "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_bool", + "typeString": "bool" }, - "id": 82, + "id": 1050, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 79, - "name": "owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "5262:5:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { + "baseExpression": { "argumentTypes": null, - "id": 80, - "name": "msg", + "id": 1030, + "name": "reinforcedWhitelist", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1027, - "src": "5271:3:0", + "referencedDeclaration": 979, + "src": "2872:19:1", "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" + "typeIdentifier": + "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 1033, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1031, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1929, + "src": "2892:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1032, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2892:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" } }, - "id": 81, "isConstant": false, - "isLValue": false, + "isLValue": true, "isPure": false, "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5271:10:0", + "nodeType": "IndexAccess", + "src": "2872:31:1", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_bool", + "typeString": "bool" } }, - "src": "5262:19:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 78, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1030, - "src": "5254:7:0", - "typeDescriptions": { - "typeIdentifier": - "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 83, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5254:28:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 84, - "nodeType": "ExpressionStatement", - "src": "5254:28:0" - }, - { - "id": 85, - "nodeType": "PlaceholderStatement", - "src": "5284:1:0" - } - ] - }, - "documentation": null, - "id": 87, - "name": "onlyOwner", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 77, - "nodeType": "ParameterList", - "parameters": [], - "src": "5252:0:0" - }, - "src": "5234:54:0", - "visibility": "internal" - }, - { - "body": { - "id": 167, - "nodeType": "Block", - "src": "6293:889:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 105, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 102, - "name": "owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "6303:5:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 103, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1027, - "src": "6311:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 104, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6311:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "6303:18:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 106, - "nodeType": "ExpressionStatement", - "src": "6303:18:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 109, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 107, - "name": "startTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 52, - "src": "6331:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1048, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1034, + "name": "baseWhitelist", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 975, + "src": "2908:13:1", + "typeDescriptions": { + "typeIdentifier": + "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 1037, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1035, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1929, + "src": "2922:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1036, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2922:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2908:25:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1046, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1044, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1038, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1929, + "src": "2938:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1039, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2938:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1041, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1929, + "src": "2963:3:1", + "typeDescriptions": { + "typeIdentifier": + "t_magic_message", + "typeString": "msg" + } + }, + "id": 1042, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2963:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1040, + "name": "totalContrib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 860, + "src": "2950:12:1", + "typeDescriptions": { + "typeIdentifier": + "t_function_internal_view$_t_address_$returns$_t_uint256_$", + "typeString": + "function (address) view returns (uint256)" + } + }, + "id": 1043, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2950:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2938:36:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 1045, + "name": "maximumBaseContribution", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 971, + "src": "2978:23:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2938:63:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 1047, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "2937:65:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "2908:94:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 1049, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "2907:96:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "2872:131:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 108, - "name": "_startTime", + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1029, + "name": "require", "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 89, - "src": "6343:10:0", + "overloadedDeclarations": [1932, 1933], + "referencedDeclaration": 1932, + "src": "2864:7:1", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": + "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" } }, - "src": "6331:22:0", + "id": 1051, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2864:140:1", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" } }, - "id": 110, + "id": 1052, "nodeType": "ExpressionStatement", - "src": "6331:22:0" + "src": "2864:140:1" }, { "expression": { "argumentTypes": null, - "id": 115, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 111, - "name": "endFullBonusTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 54, - "src": "6363:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 114, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { + "arguments": [ + { "argumentTypes": null, - "id": 112, - "name": "startTime", + "id": 1056, + "name": "_maxValuation", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 52, - "src": "6382:9:0", + "referencedDeclaration": 1024, + "src": "3176:13:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { + { "argumentTypes": null, - "id": 113, - "name": "_fullBonusLength", + "id": 1057, + "name": "_next", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 91, - "src": "6394:16:0", + "referencedDeclaration": 1026, + "src": "3190:5:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } - }, - "src": "6382:28:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6363:47:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 116, - "nodeType": "ExpressionStatement", - "src": "6363:47:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 121, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 117, - "name": "withdrawalLockTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 56, - "src": "6420:18:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 120, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 118, - "name": "endFullBonusTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 54, - "src": "6441:16:0", - "typeDescriptions": { + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { "typeIdentifier": "t_uint256", "typeString": "uint256" } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { + ], + "expression": { "argumentTypes": null, - "id": 119, - "name": "_partialWithdrawalLength", + "id": 1053, + "name": "super", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 93, - "src": "6460:24:0", + "referencedDeclaration": 1949, + "src": "3160:5:1", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": + "t_super$_LevelWhitelistedIICO_$1190", + "typeString": "contract super LevelWhitelistedIICO" } }, - "src": "6441:43:0", + "id": 1055, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "submitBid", + "nodeType": "MemberAccess", + "referencedDeclaration": 304, + "src": "3160:15:1", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": + "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" } }, - "src": "6420:64:0", + "id": 1058, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3160:36:1", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" } }, - "id": 122, + "id": 1059, "nodeType": "ExpressionStatement", - "src": "6420:64:0" - }, + "src": "3160:36:1" + } + ] + }, + "documentation": + "@dev Submit a bid. The caller must give the exact position the bid must be inserted into in the list.\n In practice, use searchAndBid to avoid the position being incorrect due to a new bid being inserted and changing the position the bid must be inserted at.\n @param _maxValuation The maximum valuation given by the contributor. If the amount raised is higher, the bid is cancelled and the contributor refunded because it prefers a refund instead of this level of dilution. To buy no matter what, use INFINITY.\n @param _next The bidID of the next bid in the list.", + "id": 1061, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "submitBid", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1027, + "nodeType": "ParameterList", + "parameters": [ { - "expression": { - "argumentTypes": null, - "id": 127, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 123, - "name": "endTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 58, - "src": "6494:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 126, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 124, - "name": "withdrawalLockTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 56, - "src": "6504:18:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 125, - "name": "_withdrawalLockUpLength", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 95, - "src": "6525:23:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6504:44:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6494:54:0", + "constant": false, + "id": 1024, + "name": "_maxValuation", + "nodeType": "VariableDeclaration", + "scope": 1061, + "src": "2807:18:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1023, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2807:4:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 128, - "nodeType": "ExpressionStatement", - "src": "6494:54:0" + "value": null, + "visibility": "internal" }, { - "expression": { - "argumentTypes": null, - "id": 131, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 129, - "name": "maxBonus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 64, - "src": "6558:8:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 130, - "name": "_maxBonus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 97, - "src": "6569:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6558:20:0", + "constant": false, + "id": 1026, + "name": "_next", + "nodeType": "VariableDeclaration", + "scope": 1061, + "src": "2827:10:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1025, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2827:4:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 132, - "nodeType": "ExpressionStatement", - "src": "6558:20:0" - }, + "value": null, + "visibility": "internal" + } + ], + "src": "2806:32:1" + }, + "payable": true, + "returnParameters": { + "id": 1028, + "nodeType": "ParameterList", + "parameters": [], + "src": "2854:0:1" + }, + "scope": 1190, + "src": "2788:415:1", + "stateMutability": "payable", + "superFunction": 304, + "visibility": "public" + }, + { + "body": { + "id": 1072, + "nodeType": "Block", + "src": "3363:41:1", + "statements": [ { "expression": { "argumentTypes": null, - "id": 135, + "id": 1070, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 133, - "name": "beneficiary", + "id": 1068, + "name": "whitelister", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "6588:11:0", + "referencedDeclaration": 981, + "src": "3373:11:1", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2080,2084 +1934,1771 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 134, - "name": "_beneficiary", + "id": 1069, + "name": "_whitelister", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 99, - "src": "6602:12:0", + "referencedDeclaration": 1063, + "src": "3385:12:1", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "src": "6588:26:0", + "src": "3373:24:1", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "id": 136, + "id": 1071, "nodeType": "ExpressionStatement", - "src": "6588:26:0" + "src": "3373:24:1" + } + ] + }, + "documentation": + "@dev Set the whitelister.\n @param _whitelister The whitelister.", + "id": 1073, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 1066, + "modifierName": { + "argumentTypes": null, + "id": 1065, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 95, + "src": "3353:9:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } }, + "nodeType": "ModifierInvocation", + "src": "3353:9:1" + } + ], + "name": "setWhitelister", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1064, + "nodeType": "ParameterList", + "parameters": [ { - "expression": { - "argumentTypes": null, - "id": 150, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 137, - "name": "bids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 42, - "src": "6691:4:0", - "typeDescriptions": { - "typeIdentifier": - "t_mapping$_t_uint256_$_t_struct$_Bid_$38_storage_$", - "typeString": - "mapping(uint256 => struct IICO.Bid storage ref)" - } - }, - "id": 139, - "indexExpression": { - "argumentTypes": null, - "id": 138, - "name": "HEAD", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9, - "src": "6696:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, + "constant": false, + "id": 1063, + "name": "_whitelister", + "nodeType": "VariableDeclaration", + "scope": 1073, + "src": "3324:20:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1062, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3324:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3323:22:1" + }, + "payable": false, + "returnParameters": { + "id": 1067, + "nodeType": "ParameterList", + "parameters": [], + "src": "3363:0:1" + }, + "scope": 1190, + "src": "3300:104:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1101, + "nodeType": "Block", + "src": "3614:116:1", + "statements": [ + { + "body": { + "expression": { + "argumentTypes": null, + "id": 1098, "isConstant": false, - "isLValue": true, + "isLValue": false, "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "6691:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage", - "typeString": "struct IICO.Bid storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 141, - "name": "TAIL", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15, - "src": "6728:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 142, - "name": "TAIL", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15, - "src": "6752:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { "argumentTypes": null, - "id": 143, - "name": "HEAD", + "id": 1092, + "name": "baseWhitelist", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 9, - "src": "6778:4:0", + "referencedDeclaration": 975, + "src": "3682:13:1", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" } }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 144, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6805:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { + "id": 1096, + "indexExpression": { "argumentTypes": null, - "hexValue": "30", - "id": 145, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6827:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" + "baseExpression": { + "argumentTypes": null, + "id": 1093, + "name": "_buyersToWhitelist", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1076, + "src": "3696:18:1", + "typeDescriptions": { + "typeIdentifier": + "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } }, - "value": "0" - }, - { - "argumentTypes": null, - "hexValue": "307830", - "id": 146, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6855:3:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" + "id": 1095, + "indexExpression": { + "argumentTypes": null, + "id": 1094, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1082, + "src": "3715:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } }, - "value": "0x0" - }, - { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 147, "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", + "isLValue": true, + "isPure": false, "lValueRequested": false, - "nodeType": "Literal", - "src": "6883:5:0", - "subdenomination": null, + "nodeType": "IndexAccess", + "src": "3696:21:1", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" + "typeIdentifier": "t_address", + "typeString": "address" + } }, - { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 148, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6912:5:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3682:36:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" } - ], - "expression": { + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { "argumentTypes": null, - "id": 140, - "name": "Bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 38, - "src": "6704:3:0", + "hexValue": "74727565", + "id": 1097, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3719:4:1", + "subdenomination": null, "typeDescriptions": { - "typeIdentifier": - "t_type$_t_struct$_Bid_$38_storage_ptr_$", - "typeString": "type(struct IICO.Bid storage pointer)" - } + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" }, - "id": 149, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "structConstructorCall", - "lValueRequested": false, - "names": [ - "prev", - "next", - "maxVal", - "contrib", - "bonus", - "contributor", - "withdrawn", - "redeemed" - ], - "nodeType": "FunctionCall", - "src": "6704:224:0", + "src": "3682:41:1", "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_memory", - "typeString": "struct IICO.Bid memory" + "typeIdentifier": "t_bool", + "typeString": "bool" } }, - "src": "6691:237:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage", - "typeString": "struct IICO.Bid storage ref" - } + "id": 1099, + "nodeType": "ExpressionStatement", + "src": "3682:41:1" }, - "id": 151, - "nodeType": "ExpressionStatement", - "src": "6691:237:0" - }, - { - "expression": { + "condition": { "argumentTypes": null, - "id": 165, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1088, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "leftHandSide": { + "leftExpression": { + "argumentTypes": null, + "id": 1085, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1082, + "src": "3637:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { "argumentTypes": null, - "baseExpression": { + "expression": { "argumentTypes": null, - "id": 152, - "name": "bids", + "id": 1086, + "name": "_buyersToWhitelist", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 42, - "src": "6938:4:0", + "referencedDeclaration": 1076, + "src": "3639:18:1", "typeDescriptions": { "typeIdentifier": - "t_mapping$_t_uint256_$_t_struct$_Bid_$38_storage_$", - "typeString": - "mapping(uint256 => struct IICO.Bid storage ref)" - } - }, - "id": 154, - "indexExpression": { - "argumentTypes": null, - "id": 153, - "name": "TAIL", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15, - "src": "6943:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" } }, + "id": 1087, "isConstant": false, - "isLValue": true, + "isLValue": false, "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "6938:10:0", + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3639:25:1", "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage", - "typeString": "struct IICO.Bid storage ref" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 156, - "name": "HEAD", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9, - "src": "6975:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } + "src": "3637:27:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1100, + "initializationExpression": { + "assignments": [1082], + "declarations": [ + { + "constant": false, + "id": 1082, + "name": "i", + "nodeType": "VariableDeclaration", + "scope": 1102, + "src": "3628:6:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, - { - "argumentTypes": null, - "id": 157, - "name": "HEAD", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9, - "src": "6999:4:0", + "typeName": { + "id": 1081, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3628:4:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - { - "argumentTypes": null, - "id": 158, - "name": "TAIL", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15, - "src": "7025:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 159, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7052:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 160, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7074:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "hexValue": "307830", - "id": 161, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7102:3:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 162, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7130:5:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 163, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7159:5:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - } - ], - "expression": { + "value": null, + "visibility": "internal" + } + ], + "id": 1084, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 1083, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3635:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "3628:8:1" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 1090, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": true, + "src": "3665:3:1", + "subExpression": { "argumentTypes": null, - "id": 155, - "name": "Bid", + "id": 1089, + "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 38, - "src": "6951:3:0", + "referencedDeclaration": 1082, + "src": "3667:1:1", "typeDescriptions": { - "typeIdentifier": - "t_type$_t_struct$_Bid_$38_storage_ptr_$", - "typeString": "type(struct IICO.Bid storage pointer)" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "id": 164, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "structConstructorCall", - "lValueRequested": false, - "names": [ - "prev", - "next", - "maxVal", - "contrib", - "bonus", - "contributor", - "withdrawn", - "redeemed" - ], - "nodeType": "FunctionCall", - "src": "6951:224:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_memory", - "typeString": "struct IICO.Bid memory" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "src": "6938:237:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage", - "typeString": "struct IICO.Bid storage ref" - } + "id": 1091, + "nodeType": "ExpressionStatement", + "src": "3665:3:1" }, - "id": 166, - "nodeType": "ExpressionStatement", - "src": "6938:237:0" + "nodeType": "ForStatement", + "src": "3624:99:1" } ] }, "documentation": - "@dev Constructor. First contract set up (tokens will also need to be transferred to the contract and then setToken needs to be called to finish the setup).\n @param _startTime Time the sale will start in seconds since the Unix Epoch.\n @param _fullBonusLength Amount of seconds the sale lasts in the full bonus period.\n @param _partialWithdrawalLength Amount of seconds the sale lasts in the partial withdrawal period.\n @param _withdrawalLockUpLength Amount of seconds the sale lasts in the withdrawal lockup period.\n @param _maxBonus The maximum bonus. Will be normalized by BONUS_DIVISOR. For example for a 20% bonus, _maxBonus must be 0.2 * BONUS_DIVISOR.\n @param _beneficiary The party which will get the funds of the token sale.", - "id": 168, + "@dev Add buyers to the base whitelist.\n @param _buyersToWhitelist Buyers to add to the whitelist.", + "id": 1102, "implemented": true, - "isConstructor": true, + "isConstructor": false, "isDeclaredConst": false, - "modifiers": [], - "name": "IICO", + "modifiers": [ + { + "arguments": null, + "id": 1079, + "modifierName": { + "argumentTypes": null, + "id": 1078, + "name": "onlyWhitelister", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 992, + "src": "3598:15:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "3598:15:1" + } + ], + "name": "addBaseWhitelist", "nodeType": "FunctionDefinition", "parameters": { - "id": 100, + "id": 1077, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 89, - "name": "_startTime", - "nodeType": "VariableDeclaration", - "scope": 168, - "src": "6147:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 88, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6147:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 91, - "name": "_fullBonusLength", - "nodeType": "VariableDeclaration", - "scope": 168, - "src": "6164:21:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 90, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6164:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 93, - "name": "_partialWithdrawalLength", - "nodeType": "VariableDeclaration", - "scope": 168, - "src": "6187:29:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 92, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6187:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 95, - "name": "_withdrawalLockUpLength", - "nodeType": "VariableDeclaration", - "scope": 168, - "src": "6218:28:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 94, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6218:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 97, - "name": "_maxBonus", - "nodeType": "VariableDeclaration", - "scope": 168, - "src": "6248:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 96, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6248:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 99, - "name": "_beneficiary", + "id": 1076, + "name": "_buyersToWhitelist", "nodeType": "VariableDeclaration", - "scope": 168, - "src": "6264:20:0", + "scope": 1102, + "src": "3561:28:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" }, "typeName": { - "id": 98, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6264:7:0", + "baseType": { + "id": 1074, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3561:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1075, + "length": null, + "nodeType": "ArrayTypeName", + "src": "3561:9:1", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" } }, "value": null, "visibility": "internal" } ], - "src": "6146:139:0" + "src": "3560:30:1" }, "payable": false, "returnParameters": { - "id": 101, + "id": 1080, "nodeType": "ParameterList", "parameters": [], - "src": "6293:0:0" + "src": "3614:0:1" }, - "scope": 939, - "src": "6133:1049:0", + "scope": 1190, + "src": "3535:195:1", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { - "id": 194, + "id": 1130, "nodeType": "Block", - "src": "7393:119:0", + "src": "3952:122:1", "statements": [ { - "expression": { - "argumentTypes": null, - "arguments": [ - { + "body": { + "expression": { + "argumentTypes": null, + "id": 1127, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 180, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { + "baseExpression": { "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 177, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 60, - "src": "7419:5:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$982", - "typeString": "contract ERC20" - } + "id": 1121, + "name": "reinforcedWhitelist", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 979, + "src": "4020:19:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 1125, + "indexExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1122, + "name": "_buyersToWhitelist", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1105, + "src": "4040:18:1", + "typeDescriptions": { + "typeIdentifier": + "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_ERC20_$982", - "typeString": "contract ERC20" - } - ], - "id": 176, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "7411:7:0", + }, + "id": 1124, + "indexExpression": { + "argumentTypes": null, + "id": 1123, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1111, + "src": "4059:1:1", "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } }, - "id": 178, "isConstant": false, - "isLValue": false, + "isLValue": true, "isPure": false, - "kind": "typeConversion", "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7411:14:0", + "nodeType": "IndexAccess", + "src": "4040:21:1", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 179, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7429:3:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "7411:21:0", + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4020:42:1", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } - } - ], - "expression": { - "argumentTypes": [ - { + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1126, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4063:4:1", + "subdenomination": null, + "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" - } - ], - "id": 175, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1030, - "src": "7403:7:0", + }, + "value": "true" + }, + "src": "4020:47:1", "typeDescriptions": { - "typeIdentifier": - "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" + "typeIdentifier": "t_bool", + "typeString": "bool" } }, - "id": 181, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7403:30:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } + "id": 1128, + "nodeType": "ExpressionStatement", + "src": "4020:47:1" }, - "id": 182, - "nodeType": "ExpressionStatement", - "src": "7403:30:0" - }, - { - "expression": { + "condition": { "argumentTypes": null, - "id": 185, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 183, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 60, - "src": "7444:5:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$982", - "typeString": "contract ERC20" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 184, - "name": "_token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 170, - "src": "7452:6:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$982", - "typeString": "contract ERC20" - } + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, - "src": "7444:14:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$982", - "typeString": "contract ERC20" - } - }, - "id": 186, - "nodeType": "ExpressionStatement", - "src": "7444:14:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 192, + "id": 1117, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "leftHandSide": { + "leftExpression": { "argumentTypes": null, - "id": 187, - "name": "tokensForSale", + "id": 1114, + "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 62, - "src": "7468:13:0", + "referencedDeclaration": 1111, + "src": "3975:1:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 190, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1042, - "src": "7500:4:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IICO_$939", - "typeString": "contract IICO" - } - } - ], "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IICO_$939", - "typeString": "contract IICO" - } - ], - "expression": { - "argumentTypes": null, - "id": 188, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 60, - "src": "7484:5:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$982", - "typeString": "contract ERC20" - } - }, - "id": 189, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balanceOf", - "nodeType": "MemberAccess", - "referencedDeclaration": 996, - "src": "7484:15:0", + "argumentTypes": null, + "id": 1115, + "name": "_buyersToWhitelist", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1105, + "src": "3977:18:1", "typeDescriptions": { "typeIdentifier": - "t_function_external_view$_t_address_$returns$_t_uint256_$", - "typeString": - "function (address) view external returns (uint256)" + "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" } }, - "id": 191, + "id": 1116, "isConstant": false, "isLValue": false, "isPure": false, - "kind": "functionCall", "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7484:21:0", + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3977:25:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "7468:37:0", + "src": "3975:27:1", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_bool", + "typeString": "bool" } }, - "id": 193, - "nodeType": "ExpressionStatement", - "src": "7468:37:0" + "id": 1129, + "initializationExpression": { + "assignments": [1111], + "declarations": [ + { + "constant": false, + "id": 1111, + "name": "i", + "nodeType": "VariableDeclaration", + "scope": 1131, + "src": "3966:6:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1110, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3966:4:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1113, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 1112, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3973:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "3966:8:1" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 1119, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": true, + "src": "4003:3:1", + "subExpression": { + "argumentTypes": null, + "id": 1118, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1111, + "src": "4005:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1120, + "nodeType": "ExpressionStatement", + "src": "4003:3:1" + }, + "nodeType": "ForStatement", + "src": "3962:105:1" } ] }, "documentation": - "@dev Set the token. Must only be called after the IICO contract receives the tokens to be sold.\n @param _token The token to be sold.", - "id": 195, + "@dev Add buyers to the reinforced whitelist.\n @param _buyersToWhitelist Buyers to add to the whitelist.", + "id": 1131, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [ { - "arguments": [], - "id": 173, + "arguments": null, + "id": 1108, "modifierName": { "argumentTypes": null, - "id": 172, - "name": "onlyOwner", + "id": 1107, + "name": "onlyWhitelister", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 87, - "src": "7383:9:0", + "referencedDeclaration": 992, + "src": "3936:15:1", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", - "src": "7383:9:0" + "src": "3936:15:1" } ], - "name": "setToken", + "name": "addReinforcedWhitelist", "nodeType": "FunctionDefinition", "parameters": { - "id": 171, + "id": 1106, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 170, - "name": "_token", + "id": 1105, + "name": "_buyersToWhitelist", "nodeType": "VariableDeclaration", - "scope": 195, - "src": "7362:12:0", + "scope": 1131, + "src": "3899:28:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$982", - "typeString": "contract ERC20" + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" }, "typeName": { - "contractScope": null, - "id": 169, - "name": "ERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 982, - "src": "7362:5:0", + "baseType": { + "id": 1103, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3899:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1104, + "length": null, + "nodeType": "ArrayTypeName", + "src": "3899:9:1", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$982", - "typeString": "contract ERC20" + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" } }, "value": null, "visibility": "internal" } ], - "src": "7361:14:0" + "src": "3898:30:1" }, "payable": false, "returnParameters": { - "id": 174, + "id": 1109, "nodeType": "ParameterList", "parameters": [], - "src": "7393:0:0" + "src": "3952:0:1" }, - "scope": 939, - "src": "7344:168:0", + "scope": 1190, + "src": "3867:207:1", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { - "id": 282, + "id": 1159, "nodeType": "Block", - "src": "8172:1005:0", + "src": "4291:111:1", "statements": [ { - "assignments": [203], - "declarations": [ - { - "constant": false, - "id": 203, - "name": "nextBid", - "nodeType": "VariableDeclaration", - "scope": 283, - "src": "8182:19:0", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - }, - "typeName": { - "contractScope": null, - "id": 202, - "name": "Bid", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 38, - "src": "8182:3:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 207, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 204, - "name": "bids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 42, - "src": "8204:4:0", - "typeDescriptions": { - "typeIdentifier": - "t_mapping$_t_uint256_$_t_struct$_Bid_$38_storage_$", - "typeString": - "mapping(uint256 => struct IICO.Bid storage ref)" - } - }, - "id": 206, - "indexExpression": { + "body": { + "expression": { "argumentTypes": null, - "id": 205, - "name": "_next", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 199, - "src": "8209:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8204:11:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage", - "typeString": "struct IICO.Bid storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "8182:33:0" - }, - { - "assignments": [209], - "declarations": [ - { - "constant": false, - "id": 209, - "name": "prev", - "nodeType": "VariableDeclaration", - "scope": 283, - "src": "8225:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 208, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "8225:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 212, - "initialValue": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 210, - "name": "nextBid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 203, - "src": "8237:7:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - } - }, - "id": 211, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "prev", - "nodeType": "MemberAccess", - "referencedDeclaration": 23, - "src": "8237:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "8225:24:0" - }, - { - "assignments": [214], - "declarations": [ - { - "constant": false, - "id": 214, - "name": "prevBid", - "nodeType": "VariableDeclaration", - "scope": 283, - "src": "8259:19:0", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - }, - "typeName": { - "contractScope": null, - "id": 213, - "name": "Bid", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 38, - "src": "8259:3:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 218, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 215, - "name": "bids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 42, - "src": "8281:4:0", - "typeDescriptions": { - "typeIdentifier": - "t_mapping$_t_uint256_$_t_struct$_Bid_$38_storage_$", - "typeString": - "mapping(uint256 => struct IICO.Bid storage ref)" - } - }, - "id": 217, - "indexExpression": { - "argumentTypes": null, - "id": 216, - "name": "prev", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 209, - "src": "8286:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8281:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage", - "typeString": "struct IICO.Bid storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "8259:32:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { + "id": 1156, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 228, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { + "baseExpression": { "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 223, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 220, - "name": "_maxVal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 197, - "src": "8309:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 221, - "name": "prevBid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 214, - "src": "8320:7:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - } - }, - "id": 222, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "maxVal", - "nodeType": "MemberAccess", - "referencedDeclaration": 27, - "src": "8320:14:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8309:25:0", + "id": 1150, + "name": "baseWhitelist", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 975, + "src": "4356:13:1", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" } }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { + "id": 1154, + "indexExpression": { "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 227, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { + "baseExpression": { "argumentTypes": null, - "id": 224, - "name": "_maxVal", + "id": 1151, + "name": "_buyersToRemove", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 197, - "src": "8338:7:0", + "referencedDeclaration": 1134, + "src": "4370:15:1", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": + "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" } }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { + "id": 1153, + "indexExpression": { "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 225, - "name": "nextBid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 203, - "src": "8348:7:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - } - }, - "id": 226, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "maxVal", - "nodeType": "MemberAccess", - "referencedDeclaration": 27, - "src": "8348:14:0", + "id": 1152, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1140, + "src": "4386:1:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "8338:24:0", + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4370:18:1", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_address", + "typeString": "address" } }, - "src": "8309:53:0", + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4356:33:1", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } - } - ], - "expression": { - "argumentTypes": [ - { + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 1155, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4390:5:1", + "subdenomination": null, + "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" - } - ], - "id": 219, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1030, - "src": "8301:7:0", + }, + "value": "false" + }, + "src": "4356:39:1", "typeDescriptions": { - "typeIdentifier": - "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" + "typeIdentifier": "t_bool", + "typeString": "bool" } }, - "id": 229, + "id": 1157, + "nodeType": "ExpressionStatement", + "src": "4356:39:1" + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1146, "isConstant": false, "isLValue": false, "isPure": false, - "kind": "functionCall", "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8301:62:0", + "leftExpression": { + "argumentTypes": null, + "id": 1143, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1140, + "src": "4314:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1144, + "name": "_buyersToRemove", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1134, + "src": "4316:15:1", + "typeDescriptions": { + "typeIdentifier": + "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 1145, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4316:22:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4314:24:1", "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" + "typeIdentifier": "t_bool", + "typeString": "bool" } }, - "id": 230, - "nodeType": "ExpressionStatement", - "src": "8301:62:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ + "id": 1158, + "initializationExpression": { + "assignments": [1140], + "declarations": [ { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "constant": false, + "id": 1140, + "name": "i", + "nodeType": "VariableDeclaration", + "scope": 1160, + "src": "4305:6:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, - "id": 238, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { + "typeName": { + "id": 1139, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4305:4:1", + "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" - }, - "id": 234, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 232, - "name": "now", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1029, - "src": "8473:3:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 233, - "name": "startTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 52, - "src": "8480:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8473:16:0", + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1142, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 1141, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4312:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "4305:8:1" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 1148, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": true, + "src": "4339:3:1", + "subExpression": { + "argumentTypes": null, + "id": 1147, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1140, + "src": "4341:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1149, + "nodeType": "ExpressionStatement", + "src": "4339:3:1" + }, + "nodeType": "ForStatement", + "src": "4301:94:1" + } + ] + }, + "documentation": + "@dev Remove buyers from the base whitelist.\n @param _buyersToRemove Buyers to remove from the whitelist.", + "id": 1160, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 1137, + "modifierName": { + "argumentTypes": null, + "id": 1136, + "name": "onlyWhitelister", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 992, + "src": "4275:15:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "4275:15:1" + } + ], + "name": "removeBaseWhitelist", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1135, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1134, + "name": "_buyersToRemove", + "nodeType": "VariableDeclaration", + "scope": 1160, + "src": "4241:25:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 1132, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4241:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1133, + "length": null, + "nodeType": "ArrayTypeName", + "src": "4241:9:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4240:27:1" + }, + "payable": false, + "returnParameters": { + "id": 1138, + "nodeType": "ParameterList", + "parameters": [], + "src": "4291:0:1" + }, + "scope": 1190, + "src": "4212:190:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1188, + "nodeType": "Block", + "src": "4631:117:1", + "statements": [ + { + "body": { + "expression": { + "argumentTypes": null, + "id": 1185, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1179, + "name": "reinforcedWhitelist", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 979, + "src": "4696:19:1", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" } }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { + "id": 1183, + "indexExpression": { "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 237, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { + "baseExpression": { "argumentTypes": null, - "id": 235, - "name": "now", + "id": 1180, + "name": "_buyersToRemove", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1029, - "src": "8493:3:0", + "referencedDeclaration": 1163, + "src": "4716:15:1", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": + "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" } }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { + "id": 1182, + "indexExpression": { "argumentTypes": null, - "id": 236, - "name": "endTime", + "id": 1181, + "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 58, - "src": "8499:7:0", + "referencedDeclaration": 1169, + "src": "4732:1:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "8493:13:0", + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4716:18:1", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_address", + "typeString": "address" } }, - "src": "8473:33:0", + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4696:39:1", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } - } - ], - "expression": { - "argumentTypes": [ - { + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 1184, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4736:5:1", + "subdenomination": null, + "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" - } - ], - "id": 231, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1030, - "src": "8465:7:0", + }, + "value": "false" + }, + "src": "4696:45:1", "typeDescriptions": { - "typeIdentifier": - "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" + "typeIdentifier": "t_bool", + "typeString": "bool" } }, - "id": 239, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8465:42:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } + "id": 1186, + "nodeType": "ExpressionStatement", + "src": "4696:45:1" }, - "id": 240, - "nodeType": "ExpressionStatement", - "src": "8465:42:0" - }, - { - "expression": { + "condition": { "argumentTypes": null, - "id": 242, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1175, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": true, - "src": "8557:11:0", - "subExpression": { + "leftExpression": { "argumentTypes": null, - "id": 241, - "name": "lastBidID", + "id": 1172, + "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50, - "src": "8559:9:0", + "referencedDeclaration": 1169, + "src": "4654:1:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 243, - "nodeType": "ExpressionStatement", - "src": "8557:11:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 248, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 244, - "name": "prevBid", + "id": 1173, + "name": "_buyersToRemove", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 214, - "src": "8687:7:0", + "referencedDeclaration": 1163, + "src": "4656:15:1", "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" + "typeIdentifier": + "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" } }, - "id": 246, + "id": 1174, "isConstant": false, - "isLValue": true, + "isLValue": false, "isPure": false, - "lValueRequested": true, - "memberName": "next", + "lValueRequested": false, + "memberName": "length", "nodeType": "MemberAccess", - "referencedDeclaration": 25, - "src": "8687:12:0", + "referencedDeclaration": null, + "src": "4656:22:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { + "src": "4654:24:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1187, + "initializationExpression": { + "assignments": [1169], + "declarations": [ + { + "constant": false, + "id": 1169, + "name": "i", + "nodeType": "VariableDeclaration", + "scope": 1189, + "src": "4645:6:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1168, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4645:4:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1171, + "initialValue": { "argumentTypes": null, - "id": 247, - "name": "lastBidID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 50, - "src": "8702:9:0", + "hexValue": "30", + "id": 1170, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4652:1:1", + "subdenomination": null, "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" }, - "src": "8687:24:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } + "nodeType": "VariableDeclarationStatement", + "src": "4645:8:1" }, - "id": 249, - "nodeType": "ExpressionStatement", - "src": "8687:24:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 254, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { + "loopExpression": { + "expression": { "argumentTypes": null, - "expression": { + "id": 1177, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": true, + "src": "4679:3:1", + "subExpression": { "argumentTypes": null, - "id": 250, - "name": "nextBid", + "id": 1176, + "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 203, - "src": "8721:7:0", + "referencedDeclaration": 1169, + "src": "4681:1:1", "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "id": 252, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "prev", - "nodeType": "MemberAccess", - "referencedDeclaration": 23, - "src": "8721:12:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 253, - "name": "lastBidID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 50, - "src": "8736:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8721:24:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } + "id": 1178, + "nodeType": "ExpressionStatement", + "src": "4679:3:1" }, - "id": 255, - "nodeType": "ExpressionStatement", - "src": "8721:24:0" + "nodeType": "ForStatement", + "src": "4641:100:1" + } + ] + }, + "documentation": + "@dev Remove buyers from the reinforced whitelist.\n @param _buyersToRemove Buyers to remove from the whitelist.", + "id": 1189, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 1166, + "modifierName": { + "argumentTypes": null, + "id": 1165, + "name": "onlyWhitelister", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 992, + "src": "4615:15:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } }, + "nodeType": "ModifierInvocation", + "src": "4615:15:1" + } + ], + "name": "removeReinforcedWhitelist", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1164, + "nodeType": "ParameterList", + "parameters": [ { - "expression": { - "argumentTypes": null, - "id": 272, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 256, - "name": "bids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 42, - "src": "8783:4:0", - "typeDescriptions": { - "typeIdentifier": - "t_mapping$_t_uint256_$_t_struct$_Bid_$38_storage_$", - "typeString": - "mapping(uint256 => struct IICO.Bid storage ref)" - } - }, - "id": 258, - "indexExpression": { - "argumentTypes": null, - "id": 257, - "name": "lastBidID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 50, - "src": "8788:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "8783:15:0", + "constant": false, + "id": 1163, + "name": "_buyersToRemove", + "nodeType": "VariableDeclaration", + "scope": 1189, + "src": "4581:25:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 1161, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4581:7:1", "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage", - "typeString": "struct IICO.Bid storage ref" + "typeIdentifier": "t_address", + "typeString": "address" } }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 260, - "name": "prev", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 209, - "src": "8825:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 261, - "name": "_next", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 199, - "src": "8849:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 262, - "name": "_maxVal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 197, - "src": "8876:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 263, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1027, - "src": "8906:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 264, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8906:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 265, - "name": "bonus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 798, - "src": "8936:5:0", - "typeDescriptions": { - "typeIdentifier": - "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 266, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8936:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 267, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1027, - "src": "8970:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 268, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8970:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 269, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9005:5:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 270, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9034:5:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - } - ], - "expression": { - "argumentTypes": null, - "id": 259, - "name": "Bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 38, - "src": "8801:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_type$_t_struct$_Bid_$38_storage_ptr_$", - "typeString": "type(struct IICO.Bid storage pointer)" - } - }, - "id": 271, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "structConstructorCall", - "lValueRequested": false, - "names": [ - "prev", - "next", - "maxVal", - "contrib", - "bonus", - "contributor", - "withdrawn", - "redeemed" - ], - "nodeType": "FunctionCall", - "src": "8801:249:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_memory", - "typeString": "struct IICO.Bid memory" - } - }, - "src": "8783:267:0", + "id": 1162, + "length": null, + "nodeType": "ArrayTypeName", + "src": "4581:9:1", "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage", - "typeString": "struct IICO.Bid storage ref" + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" } }, - "id": 273, - "nodeType": "ExpressionStatement", - "src": "8783:267:0" - }, + "value": null, + "visibility": "internal" + } + ], + "src": "4580:27:1" + }, + "payable": false, + "returnParameters": { + "id": 1167, + "nodeType": "ParameterList", + "parameters": [], + "src": "4631:0:1" + }, + "scope": 1190, + "src": "4546:202:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 1191, + "src": "401:4350:1" + } + ], + "src": "113:4639:1" + }, + "legacyAST": { + "absolutePath": + "/Users/epiqueras/Work/kleros/openiico-contract/contracts/LevelWhitelistedIICO.sol", + "exportedSymbols": { + "LevelWhitelistedIICO": [1190] + }, + "id": 1191, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 966, + "literals": ["solidity", "^", "0.4", ".23"], + "nodeType": "PragmaDirective", + "src": "113:24:1" + }, + { + "absolutePath": + "/Users/epiqueras/Work/kleros/openiico-contract/contracts/IICO.sol", + "file": "./IICO.sol", + "id": 967, + "nodeType": "ImportDirective", + "scope": 1191, + "sourceUnit": 965, + "src": "139:20:1", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 968, + "name": "IICO", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 964, + "src": "434:4:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IICO_$964", + "typeString": "contract IICO" + } + }, + "id": 969, + "nodeType": "InheritanceSpecifier", + "src": "434:4:1" + } + ], + "contractDependencies": [964], + "contractKind": "contract", + "documentation": + "@title Level Whitelisted Interactive Coin Offering\n This contract implements an Interactive Coin Offering with two whitelists:\n - The base one, with limited contribution.\n - The reinforced one, with unlimited contribution.", + "fullyImplemented": true, + "id": 1190, + "linearizedBaseContracts": [1190, 964], + "name": "LevelWhitelistedIICO", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 971, + "name": "maximumBaseContribution", + "nodeType": "VariableDeclaration", + "scope": 1190, + "src": "450:35:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 970, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "450:4:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 975, + "name": "baseWhitelist", + "nodeType": "VariableDeclaration", + "scope": 1190, + "src": "491:46:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + }, + "typeName": { + "id": 974, + "keyType": { + "id": 972, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "500:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "491:25:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + }, + "valueType": { + "id": 973, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "511:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 979, + "name": "reinforcedWhitelist", + "nodeType": "VariableDeclaration", + "scope": 1190, + "src": "604:52:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + }, + "typeName": { + "id": 978, + "keyType": { + "id": 976, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "613:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "604:25:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + }, + "valueType": { + "id": 977, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "624:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 981, + "name": "whitelister", + "nodeType": "VariableDeclaration", + "scope": 1190, + "src": "739:26:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 980, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "739:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 991, + "nodeType": "Block", + "src": "864:42:1", + "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, - "id": 279, - "name": "lastBidID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 50, - "src": "9160:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 987, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { "argumentTypes": null, - "id": 274, - "name": "contributorBidIDs", + "id": 984, + "name": "whitelister", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 47, - "src": "9125:17:0", + "referencedDeclaration": 981, + "src": "874:11:1", "typeDescriptions": { - "typeIdentifier": - "t_mapping$_t_address_$_t_array$_t_uint256_$dyn_storage_$", - "typeString": - "mapping(address => uint256[] storage ref)" + "typeIdentifier": "t_address", + "typeString": "address" } }, - "id": 277, - "indexExpression": { + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 275, + "id": 985, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1027, - "src": "9143:3:0", + "referencedDeclaration": 1929, + "src": "889:3:1", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 276, + "id": 986, "isConstant": false, "isLValue": false, "isPure": false, @@ -4165,294 +3706,249 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "9143:10:0", + "src": "889:10:1", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "9125:29:0", + "src": "874:25:1", "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage", - "typeString": "uint256[] storage ref" + "typeIdentifier": "t_bool", + "typeString": "bool" } - }, - "id": 278, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "push", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9125:34:0", - "typeDescriptions": { - "typeIdentifier": - "t_function_arraypush_nonpayable$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256) returns (uint256)" } - }, - "id": 280, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 983, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [1932, 1933], + "referencedDeclaration": 1932, + "src": "866:7:1", + "typeDescriptions": { + "typeIdentifier": + "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 988, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "9125:45:0", + "src": "866:34:1", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" } }, - "id": 281, + "id": 989, "nodeType": "ExpressionStatement", - "src": "9125:45:0" - } - ] - }, - "documentation": - "@dev Submit a bid. The caller must give the exact position the bid must be inserted into in the list.\n In practice, use searchAndBid to avoid the position being incorrect due to a new bid being inserted and changing the position the bid must be inserted at.\n @param _maxVal The maximum valuation given by the contributor. If the amount raised is higher, the bid is cancelled and the contributor refunded because it prefers a refund instead of this level of dilution. To buy no matter what, use INFINITY.\n @param _next The bidID of the next bid in the list.", - "id": 283, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "submitBid", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 200, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 197, - "name": "_maxVal", - "nodeType": "VariableDeclaration", - "scope": 283, - "src": "8131:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 196, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "8131:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" + "src": "866:34:1" }, { - "constant": false, - "id": 199, - "name": "_next", - "nodeType": "VariableDeclaration", - "scope": 283, - "src": "8145:10:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 198, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "8145:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" + "id": 990, + "nodeType": "PlaceholderStatement", + "src": "902:1:1" } - ], - "src": "8130:26:0" + ] }, - "payable": true, - "returnParameters": { - "id": 201, + "documentation": null, + "id": 992, + "name": "onlyWhitelister", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 982, "nodeType": "ParameterList", "parameters": [], - "src": "8172:0:0" + "src": "864:0:1" }, - "scope": 939, - "src": "8112:1065:0", - "stateMutability": "payable", - "superFunction": null, - "visibility": "public" + "src": "840:66:1", + "visibility": "internal" }, { "body": { - "id": 298, + "id": 1021, "nodeType": "Block", - "src": "10056:58:0", + "src": "2113:65:1", "statements": [ { "expression": { "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 291, - "name": "_maxVal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 285, - "src": "10076:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 293, - "name": "_maxVal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 285, - "src": "10092:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 294, - "name": "_next", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 287, - "src": "10100:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 292, - "name": "search", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 767, - "src": "10085:6:0", - "typeDescriptions": { - "typeIdentifier": - "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": - "function (uint256,uint256) view returns (uint256)" - } - }, - "id": 295, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10085:21:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } + "id": 1019, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1017, + "name": "maximumBaseContribution", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 971, + "src": "2123:23:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 290, - "name": "submitBid", + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1018, + "name": "_maximumBaseContribution", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 283, - "src": "10066:9:0", + "referencedDeclaration": 1006, + "src": "2147:24:1", "typeDescriptions": { - "typeIdentifier": - "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (uint256,uint256)" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "id": 296, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10066:41:0", + "src": "2123:48:1", "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "id": 297, + "id": 1020, "nodeType": "ExpressionStatement", - "src": "10066:41:0" + "src": "2123:48:1" } ] }, "documentation": - "@dev Search for the correct insertion spot and submit a bid.\n This function is O(n), where n is the amount of bids between the initial search position and the insertion position.\n The UI must first call search to find the best point to start the search so it consumes the least amount of gas possible.\n Using this function instead of calling submitBid directly prevents it from failing in the case where new bids are added before the transaction is executed.\n @param _maxVal The maximum valuation given by the contributor. If the amount raised is higher, the bid is cancelled and the contributor refunded because it prefers a refund instead of this level of dilution. To buy no matter what, use INFINITY.\n @param _next The bidID of the next bid in the list.", - "id": 299, + "@dev Constructor. First contract set up (tokens will also need to be transferred to the contract and then setToken needs to be called to finish the setup).\n @param _startTime Time the sale will start in seconds since the Unix Epoch.\n @param _fullBonusLength Amount of seconds the sale lasts in the full bonus period.\n @param _partialWithdrawalLength Amount of seconds the sale lasts in the partial withdrawal period.\n @param _withdrawalLockUpLength Amount of seconds the sale lasts in the withdrawal lockup period.\n @param _maxBonus The maximum bonus. Will be normalized by BONUS_DIVISOR. For example for a 20% bonus, _maxBonus must be 0.2 * BONUS_DIVISOR.\n @param _beneficiary The party which will get the funds of the token sale.\n @param _maximumBaseContribution The maximum contribution for buyers on the base list.", + "id": 1022, "implemented": true, - "isConstructor": false, + "isConstructor": true, "isDeclaredConst": false, - "modifiers": [], - "name": "searchAndBid", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 1009, + "name": "_startTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 994, + "src": "2005:10:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1010, + "name": "_fullBonusLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 996, + "src": "2016:16:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1011, + "name": "_partialWithdrawalLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 998, + "src": "2033:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1012, + "name": "_withdrawalLockUpLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1000, + "src": "2058:23:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1013, + "name": "_maxBonus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1002, + "src": "2082:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1014, + "name": "_beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1004, + "src": "2092:12:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 1015, + "modifierName": { + "argumentTypes": null, + "id": 1008, + "name": "IICO", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 964, + "src": "2000:4:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IICO_$964_$", + "typeString": "type(contract IICO)" + } + }, + "nodeType": "ModifierInvocation", + "src": "2000:105:1" + } + ], + "name": "LevelWhitelistedIICO", "nodeType": "FunctionDefinition", "parameters": { - "id": 288, + "id": 1007, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 285, - "name": "_maxVal", + "id": 994, + "name": "_startTime", "nodeType": "VariableDeclaration", - "scope": 299, - "src": "10015:12:0", + "scope": 1022, + "src": "1830:15:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4460,10 +3956,10 @@ "typeString": "uint256" }, "typeName": { - "id": 284, + "id": 993, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "10015:4:0", + "src": "1830:4:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4474,11 +3970,11 @@ }, { "constant": false, - "id": 287, - "name": "_next", + "id": 996, + "name": "_fullBonusLength", "nodeType": "VariableDeclaration", - "scope": 299, - "src": "10029:10:0", + "scope": 1022, + "src": "1847:21:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4486,10 +3982,10 @@ "typeString": "uint256" }, "typeName": { - "id": 286, + "id": 995, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "10029:4:0", + "src": "1847:4:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4497,107 +3993,159 @@ }, "value": null, "visibility": "internal" - } + }, + { + "constant": false, + "id": 998, + "name": "_partialWithdrawalLength", + "nodeType": "VariableDeclaration", + "scope": 1022, + "src": "1870:29:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 997, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1870:4:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1000, + "name": "_withdrawalLockUpLength", + "nodeType": "VariableDeclaration", + "scope": 1022, + "src": "1901:28:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 999, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1901:4:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1002, + "name": "_maxBonus", + "nodeType": "VariableDeclaration", + "scope": 1022, + "src": "1931:14:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1001, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1931:4:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1004, + "name": "_beneficiary", + "nodeType": "VariableDeclaration", + "scope": 1022, + "src": "1947:20:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1003, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1947:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1006, + "name": "_maximumBaseContribution", + "nodeType": "VariableDeclaration", + "scope": 1022, + "src": "1969:29:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1005, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1969:4:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } ], - "src": "10014:26:0" + "src": "1829:170:1" }, - "payable": true, + "payable": false, "returnParameters": { - "id": 289, + "id": 1016, "nodeType": "ParameterList", "parameters": [], - "src": "10056:0:0" + "src": "2113:0:1" }, - "scope": 939, - "src": "9993:121:0", - "stateMutability": "payable", + "scope": 1190, + "src": "1800:378:1", + "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { - "id": 386, + "id": 1060, "nodeType": "Block", - "src": "10446:813:0", + "src": "2854:349:1", "statements": [ - { - "assignments": [305], - "declarations": [ - { - "constant": false, - "id": 305, - "name": "bid", - "nodeType": "VariableDeclaration", - "scope": 387, - "src": "10456:15:0", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - }, - "typeName": { - "contractScope": null, - "id": 304, - "name": "Bid", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 38, - "src": "10456:3:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 309, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 306, - "name": "bids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 42, - "src": "10474:4:0", - "typeDescriptions": { - "typeIdentifier": - "t_mapping$_t_uint256_$_t_struct$_Bid_$38_storage_$", - "typeString": - "mapping(uint256 => struct IICO.Bid storage ref)" - } - }, - "id": 308, - "indexExpression": { - "argumentTypes": null, - "id": 307, - "name": "_bidID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 301, - "src": "10479:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10474:12:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage", - "typeString": "struct IICO.Bid storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "10456:30:0" - }, { "expression": { "argumentTypes": null, @@ -4605,165 +4153,335 @@ { "argumentTypes": null, "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_bool", + "typeString": "bool" }, - "id": 315, + "id": 1050, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "expression": { + "baseExpression": { "argumentTypes": null, - "id": 311, - "name": "msg", + "id": 1030, + "name": "reinforcedWhitelist", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1027, - "src": "10504:3:0", + "referencedDeclaration": 979, + "src": "2872:19:1", "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" + "typeIdentifier": + "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" } }, - "id": 312, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10504:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { + "id": 1033, + "indexExpression": { "argumentTypes": null, - "id": 313, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 305, - "src": "10518:3:0", + "expression": { + "argumentTypes": null, + "id": 1031, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1929, + "src": "2892:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1032, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2892:10:1", "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" + "typeIdentifier": "t_address", + "typeString": "address" } }, - "id": 314, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberName": "contributor", - "nodeType": "MemberAccess", - "referencedDeclaration": 33, - "src": "10518:15:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "10504:29:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 310, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1030, - "src": "10496:7:0", - "typeDescriptions": { - "typeIdentifier": - "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 316, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10496:38:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 317, - "nodeType": "ExpressionStatement", - "src": "10496:38:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 321, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 319, - "name": "now", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1029, - "src": "10552:3:0", + "nodeType": "IndexAccess", + "src": "2872:31:1", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_bool", + "typeString": "bool" } }, "nodeType": "BinaryOperation", - "operator": "<", + "operator": "||", "rightExpression": { "argumentTypes": null, - "id": 320, - "name": "withdrawalLockTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 56, - "src": "10558:18:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10552:24:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1048, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1034, + "name": "baseWhitelist", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 975, + "src": "2908:13:1", + "typeDescriptions": { + "typeIdentifier": + "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 1037, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1035, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1929, + "src": "2922:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1036, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2922:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2908:25:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1046, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1044, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1038, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1929, + "src": "2938:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1039, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2938:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1041, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1929, + "src": "2963:3:1", + "typeDescriptions": { + "typeIdentifier": + "t_magic_message", + "typeString": "msg" + } + }, + "id": 1042, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2963:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1040, + "name": "totalContrib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 860, + "src": "2950:12:1", + "typeDescriptions": { + "typeIdentifier": + "t_function_internal_view$_t_address_$returns$_t_uint256_$", + "typeString": + "function (address) view returns (uint256)" + } + }, + "id": 1043, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2950:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2938:36:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 1045, + "name": "maximumBaseContribution", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 971, + "src": "2978:23:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2938:63:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 1047, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "2937:65:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "2908:94:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 1049, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "2907:96:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "2872:131:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" } } ], @@ -4774,19 +4492,19 @@ "typeString": "bool" } ], - "id": 318, + "id": 1029, "name": "require", "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1030, - "src": "10544:7:0", + "overloadedDeclarations": [1932, 1933], + "referencedDeclaration": 1932, + "src": "2864:7:1", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, - "id": 322, + "id": 1051, "isConstant": false, "isLValue": false, "isPure": false, @@ -4794,15 +4512,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "10544:33:0", + "src": "2864:140:1", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 323, + "id": 1052, "nodeType": "ExpressionStatement", - "src": "10544:33:0" + "src": "2864:140:1" }, { "expression": { @@ -4810,70 +4528,72 @@ "arguments": [ { "argumentTypes": null, - "id": 327, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "10595:14:0", - "subExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 325, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 305, - "src": "10596:3:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - } - }, - "id": 326, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "withdrawn", - "nodeType": "MemberAccess", - "referencedDeclaration": 35, - "src": "10596:13:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, + "id": 1056, + "name": "_maxValuation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1024, + "src": "3176:13:1", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1057, + "name": "_next", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1026, + "src": "3190:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" } ], - "id": 324, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1030, - "src": "10587:7:0", + "expression": { + "argumentTypes": null, + "id": 1053, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1949, + "src": "3160:5:1", + "typeDescriptions": { + "typeIdentifier": + "t_super$_LevelWhitelistedIICO_$1190", + "typeString": "contract super LevelWhitelistedIICO" + } + }, + "id": 1055, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "submitBid", + "nodeType": "MemberAccess", + "referencedDeclaration": 304, + "src": "3160:15:1", "typeDescriptions": { "typeIdentifier": - "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" + "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" } }, - "id": 328, + "id": 1058, "isConstant": false, "isLValue": false, "isPure": false, @@ -4881,1179 +4601,988 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "10587:23:0", + "src": "3160:36:1", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 329, + "id": 1059, "nodeType": "ExpressionStatement", - "src": "10587:23:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 334, - "isConstant": false, - "isLValue": false, + "src": "3160:36:1" + } + ] + }, + "documentation": + "@dev Submit a bid. The caller must give the exact position the bid must be inserted into in the list.\n In practice, use searchAndBid to avoid the position being incorrect due to a new bid being inserted and changing the position the bid must be inserted at.\n @param _maxValuation The maximum valuation given by the contributor. If the amount raised is higher, the bid is cancelled and the contributor refunded because it prefers a refund instead of this level of dilution. To buy no matter what, use INFINITY.\n @param _next The bidID of the next bid in the list.", + "id": 1061, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "submitBid", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1027, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1024, + "name": "_maxValuation", + "nodeType": "VariableDeclaration", + "scope": 1061, + "src": "2807:18:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1023, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2807:4:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1026, + "name": "_next", + "nodeType": "VariableDeclaration", + "scope": 1061, + "src": "2827:10:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1025, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2827:4:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2806:32:1" + }, + "payable": true, + "returnParameters": { + "id": 1028, + "nodeType": "ParameterList", + "parameters": [], + "src": "2854:0:1" + }, + "scope": 1190, + "src": "2788:415:1", + "stateMutability": "payable", + "superFunction": 304, + "visibility": "public" + }, + { + "body": { + "id": 1072, + "nodeType": "Block", + "src": "3363:41:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1070, + "isConstant": false, + "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 330, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 305, - "src": "10621:3:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - } - }, - "id": 332, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "withdrawn", - "nodeType": "MemberAccess", - "referencedDeclaration": 35, - "src": "10621:13:0", + "id": 1068, + "name": "whitelister", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 981, + "src": "3373:11:1", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_address", + "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, - "hexValue": "74727565", - "id": 333, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10637:4:0", - "subdenomination": null, + "id": 1069, + "name": "_whitelister", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1063, + "src": "3385:12:1", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" + "typeIdentifier": "t_address", + "typeString": "address" + } }, - "src": "10621:20:0", + "src": "3373:24:1", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_address", + "typeString": "address" } }, - "id": 335, + "id": 1071, "nodeType": "ExpressionStatement", - "src": "10621:20:0" + "src": "3373:24:1" + } + ] + }, + "documentation": + "@dev Set the whitelister.\n @param _whitelister The whitelister.", + "id": 1073, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 1066, + "modifierName": { + "argumentTypes": null, + "id": 1065, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 95, + "src": "3353:9:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } }, + "nodeType": "ModifierInvocation", + "src": "3353:9:1" + } + ], + "name": "setWhitelister", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1064, + "nodeType": "ParameterList", + "parameters": [ { - "assignments": [337], - "declarations": [ - { - "constant": false, - "id": 337, - "name": "refund", - "nodeType": "VariableDeclaration", - "scope": 387, - "src": "10810:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 336, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "10810:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" + "constant": false, + "id": 1063, + "name": "_whitelister", + "nodeType": "VariableDeclaration", + "scope": 1073, + "src": "3324:20:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1062, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3324:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" } - ], - "id": 358, - "initialValue": { - "argumentTypes": null, - "condition": { + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3323:22:1" + }, + "payable": false, + "returnParameters": { + "id": 1067, + "nodeType": "ParameterList", + "parameters": [], + "src": "3363:0:1" + }, + "scope": 1190, + "src": "3300:104:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1101, + "nodeType": "Block", + "src": "3614:116:1", + "statements": [ + { + "body": { + "expression": { "argumentTypes": null, - "components": [ - { + "id": 1098, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 340, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { + "id": 1092, + "name": "baseWhitelist", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 975, + "src": "3682:13:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 1096, + "indexExpression": { + "argumentTypes": null, + "baseExpression": { "argumentTypes": null, - "id": 338, - "name": "now", + "id": 1093, + "name": "_buyersToWhitelist", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1029, - "src": "10825:3:0", + "referencedDeclaration": 1076, + "src": "3696:18:1", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": + "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" } }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { + "id": 1095, + "indexExpression": { "argumentTypes": null, - "id": 339, - "name": "endFullBonusTime", + "id": 1094, + "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 54, - "src": "10831:16:0", + "referencedDeclaration": 1082, + "src": "3715:1:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "10825:22:0", + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3696:21:1", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_address", + "typeString": "address" } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3682:36:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" } - ], - "id": 341, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "10824:24:0", + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1097, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3719:4:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "3682:41:1", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "falseExpression": { + "id": 1099, + "nodeType": "ExpressionStatement", + "src": "3682:41:1" + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1088, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 356, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 350, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 344, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 305, - "src": "10866:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": - "struct IICO.Bid storage pointer" - } - }, - "id": 345, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "contrib", - "nodeType": "MemberAccess", - "referencedDeclaration": 29, - "src": "10866:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 348, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 346, - "name": "withdrawalLockTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 56, - "src": "10881:18:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 347, - "name": "now", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1029, - "src": "10902:3:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10881:24:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 349, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "10880:26:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10866:40:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 351, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "10865:42:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 354, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 352, - "name": "withdrawalLockTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 56, - "src": "10911:18:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 353, - "name": "endFullBonusTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 54, - "src": "10932:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10911:37:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 355, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "10910:39:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10865:84:0", + "id": 1085, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1082, + "src": "3637:1:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 357, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "10824:125:0", - "trueExpression": { + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 342, - "name": "bid", + "id": 1086, + "name": "_buyersToWhitelist", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 305, - "src": "10851:3:0", + "referencedDeclaration": 1076, + "src": "3639:18:1", "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" + "typeIdentifier": + "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" } }, - "id": 343, + "id": 1087, "isConstant": false, - "isLValue": true, + "isLValue": false, "isPure": false, "lValueRequested": false, - "memberName": "contrib", + "memberName": "length", "nodeType": "MemberAccess", - "referencedDeclaration": 29, - "src": "10851:11:0", + "referencedDeclaration": null, + "src": "3639:25:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, + "src": "3637:27:1", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_bool", + "typeString": "bool" } }, - "nodeType": "VariableDeclarationStatement", - "src": "10810:139:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ + "id": 1100, + "initializationExpression": { + "assignments": [1082], + "declarations": [ { - "argumentTypes": null, - "commonType": { + "constant": false, + "id": 1082, + "name": "i", + "nodeType": "VariableDeclaration", + "scope": 1102, + "src": "3628:6:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 363, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 360, - "name": "refund", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 337, - "src": "10966:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 361, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 305, - "src": "10976:3:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - } - }, - "id": 362, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "contrib", - "nodeType": "MemberAccess", - "referencedDeclaration": 29, - "src": "10976:11:0", + "typeName": { + "id": 1081, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3628:4:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "10966:21:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } + "value": null, + "visibility": "internal" } ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 359, - "name": "assert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1017, - "src": "10959:6:0", + "id": 1084, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 1083, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3635:1:1", + "subdenomination": null, "typeDescriptions": { - "typeIdentifier": - "t_function_assert_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" }, - "id": 364, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10959:29:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } + "nodeType": "VariableDeclarationStatement", + "src": "3628:8:1" }, - "id": 365, - "nodeType": "ExpressionStatement", - "src": "10959:29:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 370, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { + "loopExpression": { + "expression": { "argumentTypes": null, - "expression": { + "id": 1090, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": true, + "src": "3665:3:1", + "subExpression": { "argumentTypes": null, - "id": 366, - "name": "bid", + "id": 1089, + "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 305, - "src": "11143:3:0", + "referencedDeclaration": 1082, + "src": "3667:1:1", "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "id": 368, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "contrib", - "nodeType": "MemberAccess", - "referencedDeclaration": 29, - "src": "11143:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "-=", - "rightHandSide": { - "argumentTypes": null, - "id": 369, - "name": "refund", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 337, - "src": "11158:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "11143:21:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 371, - "nodeType": "ExpressionStatement", - "src": "11143:21:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 376, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 372, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 305, - "src": "11174:3:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - } - }, - "id": 374, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "bonus", - "nodeType": "MemberAccess", - "referencedDeclaration": 31, - "src": "11174:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "/=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "33", - "id": 375, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11187:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_3_by_1", - "typeString": "int_const 3" - }, - "value": "3" - }, - "src": "11174:14:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 377, - "nodeType": "ExpressionStatement", - "src": "11174:14:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 383, - "name": "refund", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 337, - "src": "11245:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 378, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1027, - "src": "11225:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 381, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "11225:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 382, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transfer", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "11225:19:0", - "typeDescriptions": { - "typeIdentifier": - "t_function_transfer_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 384, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11225:27:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } + "id": 1091, + "nodeType": "ExpressionStatement", + "src": "3665:3:1" }, - "id": 385, - "nodeType": "ExpressionStatement", - "src": "11225:27:0" + "nodeType": "ForStatement", + "src": "3624:99:1" } ] }, "documentation": - "@dev Withdraw a bid. Can only be called before the end of the withdrawal lock period.\n Withdrawing a bid divides its bonus by 3.\n For retrieving ETH after an automatic withdrawal, use the redeem function.\n @param _bidID The ID of the bid to withdraw.", - "id": 387, + "@dev Add buyers to the base whitelist.\n @param _buyersToWhitelist Buyers to add to the whitelist.", + "id": 1102, "implemented": true, "isConstructor": false, "isDeclaredConst": false, - "modifiers": [], - "name": "withdraw", + "modifiers": [ + { + "arguments": null, + "id": 1079, + "modifierName": { + "argumentTypes": null, + "id": 1078, + "name": "onlyWhitelister", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 992, + "src": "3598:15:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "3598:15:1" + } + ], + "name": "addBaseWhitelist", "nodeType": "FunctionDefinition", "parameters": { - "id": 302, + "id": 1077, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 301, - "name": "_bidID", + "id": 1076, + "name": "_buyersToWhitelist", "nodeType": "VariableDeclaration", - "scope": 387, - "src": "10426:11:0", + "scope": 1102, + "src": "3561:28:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" }, "typeName": { - "id": 300, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "10426:4:0", + "baseType": { + "id": 1074, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3561:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1075, + "length": null, + "nodeType": "ArrayTypeName", + "src": "3561:9:1", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" } }, "value": null, "visibility": "internal" } ], - "src": "10425:13:0" + "src": "3560:30:1" }, "payable": false, "returnParameters": { - "id": 303, + "id": 1080, "nodeType": "ParameterList", "parameters": [], - "src": "10446:0:0" + "src": "3614:0:1" }, - "scope": 939, - "src": "10408:851:0", + "scope": 1190, + "src": "3535:195:1", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { - "id": 552, + "id": 1130, "nodeType": "Block", - "src": "11791:2248:0", + "src": "3952:122:1", "statements": [ { - "expression": { - "argumentTypes": null, - "arguments": [ - { + "body": { + "expression": { + "argumentTypes": null, + "id": 1127, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 395, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { + "baseExpression": { "argumentTypes": null, - "id": 393, - "name": "now", + "id": 1121, + "name": "reinforcedWhitelist", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1029, - "src": "11809:3:0", + "referencedDeclaration": 979, + "src": "4020:19:1", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" } }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { + "id": 1125, + "indexExpression": { "argumentTypes": null, - "id": 394, - "name": "endTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 58, - "src": "11816:7:0", + "baseExpression": { + "argumentTypes": null, + "id": 1122, + "name": "_buyersToWhitelist", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1105, + "src": "4040:18:1", + "typeDescriptions": { + "typeIdentifier": + "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 1124, + "indexExpression": { + "argumentTypes": null, + "id": 1123, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1111, + "src": "4059:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4040:21:1", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_address", + "typeString": "address" } }, - "src": "11809:14:0", + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4020:42:1", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } - } - ], - "expression": { - "argumentTypes": [ - { + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1126, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4063:4:1", + "subdenomination": null, + "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" - } - ], - "id": 392, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1030, - "src": "11801:7:0", + }, + "value": "true" + }, + "src": "4020:47:1", "typeDescriptions": { - "typeIdentifier": - "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" + "typeIdentifier": "t_bool", + "typeString": "bool" } }, - "id": 396, + "id": 1128, + "nodeType": "ExpressionStatement", + "src": "4020:47:1" + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1117, "isConstant": false, "isLValue": false, "isPure": false, - "kind": "functionCall", "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11801:23:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 397, - "nodeType": "ExpressionStatement", - "src": "11801:23:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 400, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "11842:10:0", - "subExpression": { - "argumentTypes": null, - "id": 399, - "name": "finalized", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 69, - "src": "11843:9:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 398, - "name": "require", + "leftExpression": { + "argumentTypes": null, + "id": 1114, + "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1030, - "src": "11834:7:0", - "typeDescriptions": { - "typeIdentifier": - "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 401, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11834:19:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 402, - "nodeType": "ExpressionStatement", - "src": "11834:19:0" - }, - { - "assignments": [404], - "declarations": [ - { - "constant": false, - "id": 404, - "name": "localCutOffBidID", - "nodeType": "VariableDeclaration", - "scope": 553, - "src": "11981:21:0", - "stateVariable": false, - "storageLocation": "default", + "referencedDeclaration": 1111, + "src": "3975:1:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" - }, - "typeName": { - "id": 403, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "11981:4:0", + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1115, + "name": "_buyersToWhitelist", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1105, + "src": "3977:18:1", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": + "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" } }, - "value": null, - "visibility": "internal" - } - ], - "id": 406, - "initialValue": { - "argumentTypes": null, - "id": 405, - "name": "cutOffBidID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 72, - "src": "12005:11:0", + "id": 1116, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3977:25:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3975:27:1", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_bool", + "typeString": "bool" } }, - "nodeType": "VariableDeclarationStatement", - "src": "11981:35:0" - }, - { - "assignments": [408], - "declarations": [ - { - "constant": false, - "id": 408, - "name": "localSumAcceptedContrib", - "nodeType": "VariableDeclaration", - "scope": 553, - "src": "12026:28:0", - "stateVariable": false, - "storageLocation": "default", + "id": 1129, + "initializationExpression": { + "assignments": [1111], + "declarations": [ + { + "constant": false, + "id": 1111, + "name": "i", + "nodeType": "VariableDeclaration", + "scope": 1131, + "src": "3966:6:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1110, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3966:4:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1113, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 1112, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3973:1:1", + "subdenomination": null, "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" }, - "typeName": { - "id": 407, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "12026:4:0", + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "3966:8:1" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 1119, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": true, + "src": "4003:3:1", + "subExpression": { + "argumentTypes": null, + "id": 1118, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1111, + "src": "4005:1:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, - "visibility": "internal" - } - ], - "id": 410, - "initialValue": { - "argumentTypes": null, - "id": 409, - "name": "sumAcceptedContrib", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 74, - "src": "12057:18:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1120, + "nodeType": "ExpressionStatement", + "src": "4003:3:1" }, - "nodeType": "VariableDeclarationStatement", - "src": "12026:49:0" + "nodeType": "ForStatement", + "src": "3962:105:1" + } + ] + }, + "documentation": + "@dev Add buyers to the reinforced whitelist.\n @param _buyersToWhitelist Buyers to add to the whitelist.", + "id": 1131, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 1108, + "modifierName": { + "argumentTypes": null, + "id": 1107, + "name": "onlyWhitelister", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 992, + "src": "3936:15:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } }, + "nodeType": "ModifierInvocation", + "src": "3936:15:1" + } + ], + "name": "addReinforcedWhitelist", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1106, + "nodeType": "ParameterList", + "parameters": [ { - "assignments": [412], - "declarations": [ - { - "constant": false, - "id": 412, - "name": "localSumAcceptedVirtualContrib", - "nodeType": "VariableDeclaration", - "scope": 553, - "src": "12085:35:0", - "stateVariable": false, - "storageLocation": "default", + "constant": false, + "id": 1105, + "name": "_buyersToWhitelist", + "nodeType": "VariableDeclaration", + "scope": 1131, + "src": "3899:28:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 1103, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3899:7:1", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 411, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "12085:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 414, - "initialValue": { - "argumentTypes": null, - "id": 413, - "name": "sumAcceptedVirtualContrib", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 76, - "src": "12123:25:0", + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1104, + "length": null, + "nodeType": "ArrayTypeName", + "src": "3899:9:1", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" } }, - "nodeType": "VariableDeclarationStatement", - "src": "12085:63:0" - }, + "value": null, + "visibility": "internal" + } + ], + "src": "3898:30:1" + }, + "payable": false, + "returnParameters": { + "id": 1109, + "nodeType": "ParameterList", + "parameters": [], + "src": "3952:0:1" + }, + "scope": 1190, + "src": "3867:207:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1159, + "nodeType": "Block", + "src": "4291:111:1", + "statements": [ { "body": { - "id": 538, - "nodeType": "Block", - "src": "12280:1563:0", - "statements": [ - { - "assignments": [429], - "declarations": [ - { - "constant": false, - "id": 429, - "name": "bid", - "nodeType": "VariableDeclaration", - "scope": 553, - "src": "12294:15:0", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - }, - "typeName": { - "contractScope": null, - "id": 428, - "name": "Bid", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 38, - "src": "12294:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - } - }, - "value": null, - "visibility": "internal" + "expression": { + "argumentTypes": null, + "id": 1156, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1150, + "name": "baseWhitelist", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 975, + "src": "4356:13:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" } - ], - "id": 433, - "initialValue": { + }, + "id": 1154, + "indexExpression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 430, - "name": "bids", + "id": 1151, + "name": "_buyersToRemove", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 42, - "src": "12312:4:0", + "referencedDeclaration": 1134, + "src": "4370:15:1", "typeDescriptions": { "typeIdentifier": - "t_mapping$_t_uint256_$_t_struct$_Bid_$38_storage_$", - "typeString": - "mapping(uint256 => struct IICO.Bid storage ref)" + "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" } }, - "id": 432, + "id": 1153, "indexExpression": { "argumentTypes": null, - "id": 431, - "name": "localCutOffBidID", + "id": 1152, + "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 404, - "src": "12317:16:0", + "referencedDeclaration": 1140, + "src": "4386:1:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6064,19077 +5593,52 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "12312:22:0", + "src": "4370:18:1", "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage", - "typeString": "struct IICO.Bid storage ref" + "typeIdentifier": "t_address", + "typeString": "address" } - }, - "nodeType": "VariableDeclarationStatement", - "src": "12294:40:0" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 440, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 437, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 434, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 429, - "src": "12352:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": - "struct IICO.Bid storage pointer" - } - }, - "id": 435, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "contrib", - "nodeType": "MemberAccess", - "referencedDeclaration": 29, - "src": "12352:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 436, - "name": "localSumAcceptedContrib", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 408, - "src": "12364:23:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12352:35:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 438, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 429, - "src": "12390:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - } - }, - "id": 439, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "maxVal", - "nodeType": "MemberAccess", - "referencedDeclaration": 27, - "src": "12390:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12352:48:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 536, - "nodeType": "Block", - "src": "12702:1131:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 468, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 466, - "name": "finalized", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 69, - "src": "12779:9:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 467, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12791:4:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "12779:16:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 469, - "nodeType": "ExpressionStatement", - "src": "12779:16:0" - }, - { - "assignments": [471], - "declarations": [ - { - "constant": false, - "id": 471, - "name": "contribCutOff", - "nodeType": "VariableDeclaration", - "scope": 553, - "src": "12813:18:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 470, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "12813:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 482, - "initialValue": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 475, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 472, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 429, - "src": "12834:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": - "struct IICO.Bid storage pointer" - } - }, - "id": 473, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "maxVal", - "nodeType": "MemberAccess", - "referencedDeclaration": 27, - "src": "12834:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 474, - "name": "localSumAcceptedContrib", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 408, - "src": "12848:23:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12834:37:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 480, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12913:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "id": 481, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "12834:80:0", - "trueExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 479, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 476, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 429, - "src": "12874:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": - "struct IICO.Bid storage pointer" - } - }, - "id": 477, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "maxVal", - "nodeType": "MemberAccess", - "referencedDeclaration": 27, - "src": "12874:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 478, - "name": "localSumAcceptedContrib", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 408, - "src": "12887:23:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12874:36:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "12813:101:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 492, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 483, - "name": "contribCutOff", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 471, - "src": "13045:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 487, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 484, - "name": "contribCutOff", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 471, - "src": "13061:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 485, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 429, - "src": "13077:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": - "struct IICO.Bid storage pointer" - } - }, - "id": 486, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "contrib", - "nodeType": "MemberAccess", - "referencedDeclaration": 29, - "src": "13077:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "13061:27:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 489, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 429, - "src": "13107:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": - "struct IICO.Bid storage pointer" - } - }, - "id": 490, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "contrib", - "nodeType": "MemberAccess", - "referencedDeclaration": 29, - "src": "13107:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 491, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "13061:57:0", - "trueExpression": { - "argumentTypes": null, - "id": 488, - "name": "contribCutOff", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 471, - "src": "13091:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "13045:73:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 493, - "nodeType": "ExpressionStatement", - "src": "13045:73:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 502, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 499, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 429, - "src": "13317:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": - "struct IICO.Bid storage pointer" - } - }, - "id": 500, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "contrib", - "nodeType": "MemberAccess", - "referencedDeclaration": 29, - "src": "13317:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 501, - "name": "contribCutOff", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 471, - "src": "13329:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "13317:25:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 494, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 429, - "src": "13296:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": - "struct IICO.Bid storage pointer" - } - }, - "id": 497, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "contributor", - "nodeType": "MemberAccess", - "referencedDeclaration": 33, - "src": "13296:15:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 498, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "send", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "13296:20:0", - "typeDescriptions": { - "typeIdentifier": - "t_function_send_nonpayable$_t_uint256_$returns$_t_bool_$", - "typeString": - "function (uint256) returns (bool)" - } - }, - "id": 503, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13296:47:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 504, - "nodeType": "ExpressionStatement", - "src": "13296:47:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 509, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 505, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 429, - "src": "13462:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": - "struct IICO.Bid storage pointer" - } - }, - "id": 507, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "contrib", - "nodeType": "MemberAccess", - "referencedDeclaration": 29, - "src": "13462:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 508, - "name": "contribCutOff", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 471, - "src": "13476:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "13462:27:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 510, - "nodeType": "ExpressionStatement", - "src": "13462:27:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 514, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 511, - "name": "localSumAcceptedContrib", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 408, - "src": "13541:23:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 512, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 429, - "src": "13568:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": - "struct IICO.Bid storage pointer" - } - }, - "id": 513, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "contrib", - "nodeType": "MemberAccess", - "referencedDeclaration": 29, - "src": "13568:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "13541:38:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 515, - "nodeType": "ExpressionStatement", - "src": "13541:38:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 528, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 516, - "name": "localSumAcceptedVirtualContrib", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 412, - "src": "13597:30:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 527, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 517, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 429, - "src": "13631:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": - "struct IICO.Bid storage pointer" - } - }, - "id": 518, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "contrib", - "nodeType": "MemberAccess", - "referencedDeclaration": 29, - "src": "13631:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 526, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 523, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 519, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 429, - "src": "13646:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": - "struct IICO.Bid storage pointer" - } - }, - "id": 520, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "contrib", - "nodeType": "MemberAccess", - "referencedDeclaration": 29, - "src": "13646:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 521, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 429, - "src": "13660:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": - "struct IICO.Bid storage pointer" - } - }, - "id": 522, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "bonus", - "nodeType": "MemberAccess", - "referencedDeclaration": 31, - "src": "13660:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "13646:23:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 524, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "13645:25:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 525, - "name": "BONUS_DIVISOR", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 67, - "src": "13673:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "13645:41:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "13631:55:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "13597:89:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 529, - "nodeType": "ExpressionStatement", - "src": "13597:89:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 533, - "name": "localSumAcceptedContrib", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 408, - "src": "13721:23:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 530, - "name": "beneficiary", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "13704:11:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 532, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "send", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "13704:16:0", - "typeDescriptions": { - "typeIdentifier": - "t_function_send_nonpayable$_t_uint256_$returns$_t_bool_$", - "typeString": - "function (uint256) returns (bool)" - } - }, - "id": 534, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13704:41:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 535, - "nodeType": "ExpressionStatement", - "src": "13704:41:0" - } - ] - }, - "id": 537, - "nodeType": "IfStatement", - "src": "12348:1485:0", - "trueBody": { - "id": 465, - "nodeType": "Block", - "src": "12402:294:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 444, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 441, - "name": "localSumAcceptedContrib", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 408, - "src": "12457:23:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 442, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 429, - "src": "12491:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": - "struct IICO.Bid storage pointer" - } - }, - "id": 443, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "contrib", - "nodeType": "MemberAccess", - "referencedDeclaration": 29, - "src": "12491:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12457:45:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 445, - "nodeType": "ExpressionStatement", - "src": "12457:45:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 458, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 446, - "name": "localSumAcceptedVirtualContrib", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 412, - "src": "12520:30:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 457, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 447, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 429, - "src": "12554:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": - "struct IICO.Bid storage pointer" - } - }, - "id": 448, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "contrib", - "nodeType": "MemberAccess", - "referencedDeclaration": 29, - "src": "12554:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 456, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 453, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 449, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 429, - "src": "12569:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": - "struct IICO.Bid storage pointer" - } - }, - "id": 450, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "contrib", - "nodeType": "MemberAccess", - "referencedDeclaration": 29, - "src": "12569:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 451, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 429, - "src": "12583:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": - "struct IICO.Bid storage pointer" - } - }, - "id": 452, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "bonus", - "nodeType": "MemberAccess", - "referencedDeclaration": 31, - "src": "12583:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12569:23:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 454, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "12568:25:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 455, - "name": "BONUS_DIVISOR", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 67, - "src": "12596:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12568:41:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12554:55:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12520:89:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 459, - "nodeType": "ExpressionStatement", - "src": "12520:89:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 463, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 460, - "name": "localCutOffBidID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 404, - "src": "12627:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 461, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 429, - "src": "12646:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": - "struct IICO.Bid storage pointer" - } - }, - "id": 462, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "prev", - "nodeType": "MemberAccess", - "referencedDeclaration": 23, - "src": "12646:8:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12627:27:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 464, - "nodeType": "ExpressionStatement", - "src": "12627:27:0" - } - ] - } - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 424, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 421, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 419, - "name": "it", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 416, - "src": "12247:2:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 420, - "name": "_maxIt", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 389, - "src": "12252:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12247:11:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "id": 423, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "12262:10:0", - "subExpression": { - "argumentTypes": null, - "id": 422, - "name": "finalized", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 69, - "src": "12263:9:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "12247:25:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 539, - "initializationExpression": { - "assignments": [416], - "declarations": [ - { - "constant": false, - "id": 416, - "name": "it", - "nodeType": "VariableDeclaration", - "scope": 553, - "src": "12234:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 415, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "12234:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 418, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 417, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12244:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "12234:11:0" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 426, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": true, - "src": "12274:4:0", - "subExpression": { - "argumentTypes": null, - "id": 425, - "name": "it", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 416, - "src": "12276:2:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 427, - "nodeType": "ExpressionStatement", - "src": "12274:4:0" - }, - "nodeType": "ForStatement", - "src": "12229:1614:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 542, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 540, - "name": "cutOffBidID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 72, - "src": "13880:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 541, - "name": "localCutOffBidID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 404, - "src": "13894:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "13880:30:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 543, - "nodeType": "ExpressionStatement", - "src": "13880:30:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 546, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 544, - "name": "sumAcceptedContrib", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 74, - "src": "13920:18:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 545, - "name": "localSumAcceptedContrib", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 408, - "src": "13941:23:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "13920:44:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 547, - "nodeType": "ExpressionStatement", - "src": "13920:44:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 550, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 548, - "name": "sumAcceptedVirtualContrib", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 76, - "src": "13974:25:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 549, - "name": "localSumAcceptedVirtualContrib", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 412, - "src": "14002:30:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "13974:58:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 551, - "nodeType": "ExpressionStatement", - "src": "13974:58:0" - } - ] - }, - "documentation": - "@dev Finalize by finding the cut-off bid.\n Since the amount of bids is not bounded, this function may have to be called multiple times.\n The function is O(min(n,_maxIt)) where n is the amount of bids. In total it will perform O(n) computations, possibly in multiple calls.\n Each call only has a O(1) storage write operations.\n @param _maxIt The maximum amount of bids to go through. This value must be set in order to not exceed the gas limit.", - "id": 553, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "finalize", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 390, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 389, - "name": "_maxIt", - "nodeType": "VariableDeclaration", - "scope": 553, - "src": "11771:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 388, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "11771:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11770:13:0" - }, - "payable": false, - "returnParameters": { - "id": 391, - "nodeType": "ParameterList", - "parameters": [], - "src": "11791:0:0" - }, - "scope": 939, - "src": "11753:2286:0", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 636, - "nodeType": "Block", - "src": "14320:662:0", - "statements": [ - { - "assignments": [559], - "declarations": [ - { - "constant": false, - "id": 559, - "name": "bid", - "nodeType": "VariableDeclaration", - "scope": 637, - "src": "14330:15:0", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - }, - "typeName": { - "contractScope": null, - "id": 558, - "name": "Bid", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 38, - "src": "14330:3:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 563, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 560, - "name": "bids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 42, - "src": "14348:4:0", - "typeDescriptions": { - "typeIdentifier": - "t_mapping$_t_uint256_$_t_struct$_Bid_$38_storage_$", - "typeString": - "mapping(uint256 => struct IICO.Bid storage ref)" - } - }, - "id": 562, - "indexExpression": { - "argumentTypes": null, - "id": 561, - "name": "_bidID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 555, - "src": "14353:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "14348:12:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage", - "typeString": "struct IICO.Bid storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "14330:30:0" - }, - { - "assignments": [565], - "declarations": [ - { - "constant": false, - "id": 565, - "name": "cutOffBid", - "nodeType": "VariableDeclaration", - "scope": 637, - "src": "14370:21:0", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - }, - "typeName": { - "contractScope": null, - "id": 564, - "name": "Bid", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 38, - "src": "14370:3:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 569, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 566, - "name": "bids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 42, - "src": "14394:4:0", - "typeDescriptions": { - "typeIdentifier": - "t_mapping$_t_uint256_$_t_struct$_Bid_$38_storage_$", - "typeString": - "mapping(uint256 => struct IICO.Bid storage ref)" - } - }, - "id": 568, - "indexExpression": { - "argumentTypes": null, - "id": 567, - "name": "cutOffBidID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 72, - "src": "14399:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "14394:17:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage", - "typeString": "struct IICO.Bid storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "14370:41:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 571, - "name": "finalized", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 69, - "src": "14429:9:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 570, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1030, - "src": "14421:7:0", - "typeDescriptions": { - "typeIdentifier": - "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 572, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14421:18:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 573, - "nodeType": "ExpressionStatement", - "src": "14421:18:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 577, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "14457:13:0", - "subExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 575, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 559, - "src": "14458:3:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - } - }, - "id": 576, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "redeemed", - "nodeType": "MemberAccess", - "referencedDeclaration": 37, - "src": "14458:12:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 574, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1030, - "src": "14449:7:0", - "typeDescriptions": { - "typeIdentifier": - "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 578, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14449:22:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 579, - "nodeType": "ExpressionStatement", - "src": "14449:22:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 584, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 580, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 559, - "src": "14482:3:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - } - }, - "id": 582, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "redeemed", - "nodeType": "MemberAccess", - "referencedDeclaration": 37, - "src": "14482:12:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 583, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14495:4:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "14482:17:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 585, - "nodeType": "ExpressionStatement", - "src": "14482:17:0" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 601, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 590, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 586, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 559, - "src": "14513:3:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - } - }, - "id": 587, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "maxVal", - "nodeType": "MemberAccess", - "referencedDeclaration": 27, - "src": "14513:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 588, - "name": "cutOffBid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 565, - "src": "14526:9:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - } - }, - "id": 589, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "maxVal", - "nodeType": "MemberAccess", - "referencedDeclaration": 27, - "src": "14526:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "14513:29:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 599, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 595, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 591, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 559, - "src": "14547:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": - "struct IICO.Bid storage pointer" - } - }, - "id": 592, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "maxVal", - "nodeType": "MemberAccess", - "referencedDeclaration": 27, - "src": "14547:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 593, - "name": "cutOffBid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 565, - "src": "14561:9:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": - "struct IICO.Bid storage pointer" - } - }, - "id": 594, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "maxVal", - "nodeType": "MemberAccess", - "referencedDeclaration": 27, - "src": "14561:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "14547:30:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 598, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 596, - "name": "_bidID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 555, - "src": "14581:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 597, - "name": "cutOffBidID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 72, - "src": "14591:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "14581:21:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "14547:55:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 600, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "14546:57:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "14513:90:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 631, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 559, - "src": "14963:3:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - } - }, - "id": 632, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "contrib", - "nodeType": "MemberAccess", - "referencedDeclaration": 29, - "src": "14963:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 626, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 559, - "src": "14938:3:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - } - }, - "id": 629, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "contributor", - "nodeType": "MemberAccess", - "referencedDeclaration": 33, - "src": "14938:15:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 630, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transfer", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "14938:24:0", - "typeDescriptions": { - "typeIdentifier": - "t_function_transfer_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 633, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14938:37:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 634, - "nodeType": "ExpressionStatement", - "src": "14938:37:0" - }, - "id": 635, - "nodeType": "IfStatement", - "src": "14509:466:0", - "trueBody": { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 605, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 559, - "src": "14671:3:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - } - }, - "id": 606, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "contributor", - "nodeType": "MemberAccess", - "referencedDeclaration": 33, - "src": "14671:15:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 623, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 620, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 607, - "name": "tokensForSale", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 62, - "src": "14689:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 618, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 608, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 559, - "src": "14706:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": - "struct IICO.Bid storage pointer" - } - }, - "id": 609, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "contrib", - "nodeType": "MemberAccess", - "referencedDeclaration": 29, - "src": "14706:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 617, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 614, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 610, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 559, - "src": "14721:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": - "struct IICO.Bid storage pointer" - } - }, - "id": 611, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "contrib", - "nodeType": "MemberAccess", - "referencedDeclaration": 29, - "src": "14721:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 612, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 559, - "src": "14735:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": - "struct IICO.Bid storage pointer" - } - }, - "id": 613, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "bonus", - "nodeType": "MemberAccess", - "referencedDeclaration": 31, - "src": "14735:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "14721:23:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 615, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "14720:25:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 616, - "name": "BONUS_DIVISOR", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 67, - "src": "14748:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "14720:41:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "14706:55:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 619, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "14705:57:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "14689:73:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 621, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "14688:75:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 622, - "name": "sumAcceptedVirtualContrib", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 76, - "src": "14766:25:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "14688:103:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 602, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 60, - "src": "14656:5:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$982", - "typeString": "contract ERC20" - } - }, - "id": 604, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 1005, - "src": "14656:14:0", - "typeDescriptions": { - "typeIdentifier": - "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": - "function (address,uint256) external returns (bool)" - } - }, - "id": 624, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14656:136:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 625, - "nodeType": "ExpressionStatement", - "src": "14656:136:0" - } - } - ] - }, - "documentation": - "@dev Redeem a bid. If the bid is accepted, send the tokens, otherwise refund the ETH.\n Note that anyone can call this function, not only the party which made the bid.\n @param _bidID ID of the bid to withdraw.", - "id": 637, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "redeem", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 556, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 555, - "name": "_bidID", - "nodeType": "VariableDeclaration", - "scope": 637, - "src": "14300:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 554, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "14300:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14299:13:0" - }, - "payable": false, - "returnParameters": { - "id": 557, - "nodeType": "ParameterList", - "parameters": [], - "src": "14320:0:0" - }, - "scope": 939, - "src": "14284:698:0", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 703, - "nodeType": "Block", - "src": "15211:632:0", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 651, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 647, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 643, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 640, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1027, - "src": "15225:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 641, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15225:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 642, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15238:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "15225:14:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 646, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 644, - "name": "now", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1029, - "src": "15243:3:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 645, - "name": "startTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 52, - "src": "15250:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "15243:16:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "15225:34:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 650, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 648, - "name": "now", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1029, - "src": "15263:3:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 649, - "name": "endTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 58, - "src": "15269:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "15263:13:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "15225:51:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 662, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 660, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 657, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1027, - "src": "15394:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 658, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15394:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 659, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15407:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "15394:14:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "id": 661, - "name": "finalized", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 69, - "src": "15412:9:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "15394:27:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 701, - "nodeType": "IfStatement", - "src": "15390:446:0", - "trueBody": { - "body": { - "condition": { - "argumentTypes": null, - "id": 686, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "15600:48:0", - "subExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 677, - "name": "bids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 42, - "src": "15601:4:0", - "typeDescriptions": { - "typeIdentifier": - "t_mapping$_t_uint256_$_t_struct$_Bid_$38_storage_$", - "typeString": - "mapping(uint256 => struct IICO.Bid storage ref)" - } - }, - "id": 684, - "indexExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 678, - "name": "contributorBidIDs", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 47, - "src": "15606:17:0", - "typeDescriptions": { - "typeIdentifier": - "t_mapping$_t_address_$_t_array$_t_uint256_$dyn_storage_$", - "typeString": - "mapping(address => uint256[] storage ref)" - } - }, - "id": 681, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 679, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1027, - "src": "15624:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 680, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15624:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "15606:29:0", - "typeDescriptions": { - "typeIdentifier": - "t_array$_t_uint256_$dyn_storage", - "typeString": "uint256[] storage ref" - } - }, - "id": 683, - "indexExpression": { - "argumentTypes": null, - "id": 682, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 664, - "src": "15636:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "15606:32:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "15601:38:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage", - "typeString": "struct IICO.Bid storage ref" - } - }, - "id": 685, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "redeemed", - "nodeType": "MemberAccess", - "referencedDeclaration": 37, - "src": "15601:47:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 696, - "name": "revert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1031, - "src": "15828:6:0", - "typeDescriptions": { - "typeIdentifier": - "t_function_revert_pure$__$returns$__$", - "typeString": "function () pure" - } - }, - "id": 697, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15828:8:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 698, - "nodeType": "ExpressionStatement", - "src": "15828:8:0" - }, - "id": 699, - "nodeType": "IfStatement", - "src": "15596:240:0", - "trueBody": { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 688, - "name": "contributorBidIDs", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 47, - "src": "15677:17:0", - "typeDescriptions": { - "typeIdentifier": - "t_mapping$_t_address_$_t_array$_t_uint256_$dyn_storage_$", - "typeString": - "mapping(address => uint256[] storage ref)" - } - }, - "id": 691, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 689, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1027, - "src": "15695:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 690, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15695:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "15677:29:0", - "typeDescriptions": { - "typeIdentifier": - "t_array$_t_uint256_$dyn_storage", - "typeString": "uint256[] storage ref" - } - }, - "id": 693, - "indexExpression": { - "argumentTypes": null, - "id": 692, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 664, - "src": "15707:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "15677:32:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 687, - "name": "redeem", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 637, - "src": "15670:6:0", - "typeDescriptions": { - "typeIdentifier": - "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 694, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15670:40:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 695, - "nodeType": "ExpressionStatement", - "src": "15670:40:0" - } - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 673, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 667, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 664, - "src": "15533:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 668, - "name": "contributorBidIDs", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 47, - "src": "15537:17:0", - "typeDescriptions": { - "typeIdentifier": - "t_mapping$_t_address_$_t_array$_t_uint256_$dyn_storage_$", - "typeString": - "mapping(address => uint256[] storage ref)" - } - }, - "id": 671, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 669, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1027, - "src": "15555:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 670, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15555:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "15537:29:0", - "typeDescriptions": { - "typeIdentifier": - "t_array$_t_uint256_$dyn_storage", - "typeString": "uint256[] storage ref" - } - }, - "id": 672, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15537:36:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "15533:40:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 700, - "initializationExpression": { - "assignments": [664], - "declarations": [ - { - "constant": false, - "id": 664, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 704, - "src": "15521:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 663, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "15521:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 666, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 665, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15530:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "15521:10:0" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 675, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": true, - "src": "15575:3:0", - "subExpression": { - "argumentTypes": null, - "id": 674, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 664, - "src": "15577:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 676, - "nodeType": "ExpressionStatement", - "src": "15575:3:0" - }, - "nodeType": "ForStatement", - "src": "15516:320:0" - } - }, - "id": 702, - "nodeType": "IfStatement", - "src": "15221:615:0", - "trueBody": { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 653, - "name": "INFINITY", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 21, - "src": "15360:8:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 654, - "name": "TAIL", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15, - "src": "15370:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 652, - "name": "submitBid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 283, - "src": "15350:9:0", - "typeDescriptions": { - "typeIdentifier": - "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (uint256,uint256)" - } - }, - "id": 655, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15350:25:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 656, - "nodeType": "ExpressionStatement", - "src": "15350:25:0" - } - } - ] - }, - "documentation": - "@dev Fallback. Make a bid if ETH are sent. Redeem all the bids of the contributor otherwise.\n This allows users to bid and get their tokens back using only send operations.", - "id": 704, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 638, - "nodeType": "ParameterList", - "parameters": [], - "src": "15193:2:0" - }, - "payable": true, - "returnParameters": { - "id": 639, - "nodeType": "ParameterList", - "parameters": [], - "src": "15211:0:0" - }, - "scope": 939, - "src": "15184:659:0", - "stateMutability": "payable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 766, - "nodeType": "Block", - "src": "16489:759:0", - "statements": [ - { - "assignments": [714], - "declarations": [ - { - "constant": false, - "id": 714, - "name": "next", - "nodeType": "VariableDeclaration", - "scope": 767, - "src": "16499:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 713, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "16499:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 716, - "initialValue": { - "argumentTypes": null, - "id": 715, - "name": "_nextStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 708, - "src": "16511:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "16499:22:0" - }, - { - "assignments": [], - "declarations": [ - { - "constant": false, - "id": 718, - "name": "found", - "nodeType": "VariableDeclaration", - "scope": 767, - "src": "16531:10:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 717, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "16531:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 719, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "16531:10:0" - }, - { - "body": { - "id": 762, - "nodeType": "Block", - "src": "16566:654:0", - "statements": [ - { - "assignments": [723], - "declarations": [ - { - "constant": false, - "id": 723, - "name": "nextBid", - "nodeType": "VariableDeclaration", - "scope": 767, - "src": "16623:19:0", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - }, - "typeName": { - "contractScope": null, - "id": 722, - "name": "Bid", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 38, - "src": "16623:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 727, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 724, - "name": "bids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 42, - "src": "16645:4:0", - "typeDescriptions": { - "typeIdentifier": - "t_mapping$_t_uint256_$_t_struct$_Bid_$38_storage_$", - "typeString": - "mapping(uint256 => struct IICO.Bid storage ref)" - } - }, - "id": 726, - "indexExpression": { - "argumentTypes": null, - "id": 725, - "name": "next", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 714, - "src": "16650:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "16645:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage", - "typeString": "struct IICO.Bid storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "16623:32:0" - }, - { - "assignments": [729], - "declarations": [ - { - "constant": false, - "id": 729, - "name": "prev", - "nodeType": "VariableDeclaration", - "scope": 767, - "src": "16669:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 728, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "16669:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 732, - "initialValue": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 730, - "name": "nextBid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 723, - "src": "16681:7:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - } - }, - "id": 731, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "prev", - "nodeType": "MemberAccess", - "referencedDeclaration": 23, - "src": "16681:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "16669:24:0" - }, - { - "assignments": [734], - "declarations": [ - { - "constant": false, - "id": 734, - "name": "prevBid", - "nodeType": "VariableDeclaration", - "scope": 767, - "src": "16707:19:0", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - }, - "typeName": { - "contractScope": null, - "id": 733, - "name": "Bid", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 38, - "src": "16707:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 738, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 735, - "name": "bids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 42, - "src": "16729:4:0", - "typeDescriptions": { - "typeIdentifier": - "t_mapping$_t_uint256_$_t_struct$_Bid_$38_storage_$", - "typeString": - "mapping(uint256 => struct IICO.Bid storage ref)" - } - }, - "id": 737, - "indexExpression": { - "argumentTypes": null, - "id": 736, - "name": "prev", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 729, - "src": "16734:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "16729:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage", - "typeString": "struct IICO.Bid storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "16707:32:0" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 742, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 739, - "name": "_maxVal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 706, - "src": "16758:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 740, - "name": "prevBid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 734, - "src": "16768:7:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - } - }, - "id": 741, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "maxVal", - "nodeType": "MemberAccess", - "referencedDeclaration": 27, - "src": "16768:14:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16758:24:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 750, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 747, - "name": "_maxVal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 706, - "src": "16873:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 748, - "name": "nextBid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 723, - "src": "16884:7:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": - "struct IICO.Bid storage pointer" - } - }, - "id": 749, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "maxVal", - "nodeType": "MemberAccess", - "referencedDeclaration": 27, - "src": "16884:14:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16873:25:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "expression": { - "argumentTypes": null, - "id": 758, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 756, - "name": "found", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 718, - "src": "17197:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 757, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17205:4:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "17197:12:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 759, - "nodeType": "ExpressionStatement", - "src": "17197:12:0" - }, - "id": 760, - "nodeType": "IfStatement", - "src": "16869:340:0", - "trueBody": { - "expression": { - "argumentTypes": null, - "id": 754, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 751, - "name": "next", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 714, - "src": "17079:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 752, - "name": "nextBid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 723, - "src": "17086:7:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": - "struct IICO.Bid storage pointer" - } - }, - "id": 753, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "next", - "nodeType": "MemberAccess", - "referencedDeclaration": 25, - "src": "17086:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "17079:19:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 755, - "nodeType": "ExpressionStatement", - "src": "17079:19:0" - } - }, - "id": 761, - "nodeType": "IfStatement", - "src": "16754:455:0", - "trueBody": { - "expression": { - "argumentTypes": null, - "id": 745, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 743, - "name": "next", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 714, - "src": "16839:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 744, - "name": "prev", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 729, - "src": "16846:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16839:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 746, - "nodeType": "ExpressionStatement", - "src": "16839:11:0" - } - } - ] - }, - "condition": { - "argumentTypes": null, - "id": 721, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "16558:6:0", - "subExpression": { - "argumentTypes": null, - "id": 720, - "name": "found", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 718, - "src": "16559:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 763, - "nodeType": "WhileStatement", - "src": "16552:668:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 764, - "name": "next", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 714, - "src": "17237:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 712, - "id": 765, - "nodeType": "Return", - "src": "17230:11:0" - } - ] - }, - "documentation": - "@dev Search for the correct insertion spot of a bid.\n This function is O(n), where n is the amount of bids between the initial search position and the insertion position.\n @param _maxVal The maximum valuation given by the contributor. Or INFINITY if no maximum valuation is given.\n @param _nextStart The bidID of the next bid from the initial position to start the search from.\n @return nextInsert The bidID of the next bid from the position the bid must be inserted at.", - "id": 767, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "search", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 709, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 706, - "name": "_maxVal", - "nodeType": "VariableDeclaration", - "scope": 767, - "src": "16417:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 705, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "16417:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 708, - "name": "_nextStart", - "nodeType": "VariableDeclaration", - "scope": 767, - "src": "16431:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 707, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "16431:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16416:31:0" - }, - "payable": false, - "returnParameters": { - "id": 712, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 711, - "name": "nextInsert", - "nodeType": "VariableDeclaration", - "scope": 767, - "src": "16472:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 710, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "16472:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16471:17:0" - }, - "scope": 939, - "src": "16401:847:0", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 797, - "nodeType": "Block", - "src": "17567:366:0", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 774, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 772, - "name": "now", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1029, - "src": "17581:3:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 773, - "name": "endFullBonusTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 54, - "src": "17587:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "17581:22:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 779, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 777, - "name": "now", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1029, - "src": "17666:3:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 778, - "name": "endTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 58, - "src": "17672:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "17666:13:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 793, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 787, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 782, - "name": "maxBonus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 64, - "src": "17868:8:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 785, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 783, - "name": "endTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 58, - "src": "17880:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 784, - "name": "now", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1029, - "src": "17890:3:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "17880:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 786, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "17879:15:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "17868:26:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 788, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "17867:28:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 791, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 789, - "name": "endTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 58, - "src": "17899:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 790, - "name": "endFullBonusTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 54, - "src": "17909:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "17899:26:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 792, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "17898:28:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "17867:59:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 771, - "id": 794, - "nodeType": "Return", - "src": "17860:66:0" - }, - "id": 795, - "nodeType": "IfStatement", - "src": "17662:264:0", - "trueBody": { - "expression": { - "argumentTypes": null, - "hexValue": "30", - "id": 780, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17734:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "functionReturnParameters": 771, - "id": 781, - "nodeType": "Return", - "src": "17727:8:0" - } - }, - "id": 796, - "nodeType": "IfStatement", - "src": "17577:349:0", - "trueBody": { - "expression": { - "argumentTypes": null, - "id": 775, - "name": "maxBonus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 64, - "src": "17639:8:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 771, - "id": 776, - "nodeType": "Return", - "src": "17632:15:0" - } - } - ] - }, - "documentation": - "@dev Return the current bonus. The bonus only changes in 1/BONUS_DIVISOR increments.\n @return b The bonus expressed in 1/BONUS_DIVISOR. Will be normalized by BONUS_DIVISOR. For example for a 20% bonus, _maxBonus must be 0.2 * BONUS_DIVISOR.", - "id": 798, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "bonus", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 768, - "nodeType": "ParameterList", - "parameters": [], - "src": "17532:2:0" - }, - "payable": false, - "returnParameters": { - "id": 771, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 770, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 798, - "src": "17559:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 769, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "17559:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17558:8:0" - }, - "scope": 939, - "src": "17518:415:0", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 830, - "nodeType": "Block", - "src": "18495:159:0", - "statements": [ - { - "body": { - "expression": { - "argumentTypes": null, - "id": 827, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 818, - "name": "contribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 803, - "src": "18583:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 819, - "name": "bids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 42, - "src": "18599:4:0", - "typeDescriptions": { - "typeIdentifier": - "t_mapping$_t_uint256_$_t_struct$_Bid_$38_storage_$", - "typeString": - "mapping(uint256 => struct IICO.Bid storage ref)" - } - }, - "id": 825, - "indexExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 820, - "name": "contributorBidIDs", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 47, - "src": "18604:17:0", - "typeDescriptions": { - "typeIdentifier": - "t_mapping$_t_address_$_t_array$_t_uint256_$dyn_storage_$", - "typeString": - "mapping(address => uint256[] storage ref)" - } - }, - "id": 822, - "indexExpression": { - "argumentTypes": null, - "id": 821, - "name": "_contributor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 800, - "src": "18622:12:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "18604:31:0", - "typeDescriptions": { - "typeIdentifier": - "t_array$_t_uint256_$dyn_storage", - "typeString": "uint256[] storage ref" - } - }, - "id": 824, - "indexExpression": { - "argumentTypes": null, - "id": 823, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 806, - "src": "18636:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "18604:34:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "18599:40:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage", - "typeString": "struct IICO.Bid storage ref" - } - }, - "id": 826, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "contrib", - "nodeType": "MemberAccess", - "referencedDeclaration": 29, - "src": "18599:48:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "18583:64:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 828, - "nodeType": "ExpressionStatement", - "src": "18583:64:0" - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 814, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 809, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 806, - "src": "18522:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 810, - "name": "contributorBidIDs", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 47, - "src": "18526:17:0", - "typeDescriptions": { - "typeIdentifier": - "t_mapping$_t_address_$_t_array$_t_uint256_$dyn_storage_$", - "typeString": - "mapping(address => uint256[] storage ref)" - } - }, - "id": 812, - "indexExpression": { - "argumentTypes": null, - "id": 811, - "name": "_contributor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 800, - "src": "18544:12:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "18526:31:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage", - "typeString": "uint256[] storage ref" - } - }, - "id": 813, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18526:38:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "18522:42:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 829, - "initializationExpression": { - "assignments": [806], - "declarations": [ - { - "constant": false, - "id": 806, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 831, - "src": "18510:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 805, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "18510:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 808, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 807, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18519:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "18510:10:0" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 816, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": true, - "src": "18566:3:0", - "subExpression": { - "argumentTypes": null, - "id": 815, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 806, - "src": "18568:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 817, - "nodeType": "ExpressionStatement", - "src": "18566:3:0" - }, - "nodeType": "ForStatement", - "src": "18505:142:0" - } - ] - }, - "documentation": - "@dev Get the total contribution of an address.\n This can be used for a KYC threshold.\n This function is O(n) where n is the amount of bids made by the contributor.\n This means that the contributor can make totalContrib(contributor) revert due to an out of gas error on purpose.\n @param _contributor The contributor whose contribution will be returned.\n @return contribution The total contribution of the contributor.", - "id": 831, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "totalContrib", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 801, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 800, - "name": "_contributor", - "nodeType": "VariableDeclaration", - "scope": 831, - "src": "18429:20:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 799, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18429:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18428:22:0" - }, - "payable": false, - "returnParameters": { - "id": 804, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 803, - "name": "contribution", - "nodeType": "VariableDeclaration", - "scope": 831, - "src": "18476:17:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 802, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "18476:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18475:19:0" - }, - "scope": 939, - "src": "18407:247:0", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 937, - "nodeType": "Block", - "src": "18993:1095:0", - "statements": [ - { - "assignments": [845], - "declarations": [ - { - "constant": false, - "id": 845, - "name": "localCutOffBidID", - "nodeType": "VariableDeclaration", - "scope": 938, - "src": "19003:21:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 844, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "19003:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 850, - "initialValue": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 846, - "name": "bids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 42, - "src": "19027:4:0", - "typeDescriptions": { - "typeIdentifier": - "t_mapping$_t_uint256_$_t_struct$_Bid_$38_storage_$", - "typeString": - "mapping(uint256 => struct IICO.Bid storage ref)" - } - }, - "id": 848, - "indexExpression": { - "argumentTypes": null, - "id": 847, - "name": "TAIL", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15, - "src": "19032:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "19027:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage", - "typeString": "struct IICO.Bid storage ref" - } - }, - "id": 849, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "prev", - "nodeType": "MemberAccess", - "referencedDeclaration": 23, - "src": "19027:15:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "19003:39:0" - }, - { - "body": { - "id": 924, - "nodeType": "Block", - "src": "19146:838:0", - "statements": [ - { - "assignments": [855], - "declarations": [ - { - "constant": false, - "id": 855, - "name": "bid", - "nodeType": "VariableDeclaration", - "scope": 938, - "src": "19160:15:0", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - }, - "typeName": { - "contractScope": null, - "id": 854, - "name": "Bid", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 38, - "src": "19160:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 859, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 856, - "name": "bids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 42, - "src": "19178:4:0", - "typeDescriptions": { - "typeIdentifier": - "t_mapping$_t_uint256_$_t_struct$_Bid_$38_storage_$", - "typeString": - "mapping(uint256 => struct IICO.Bid storage ref)" - } - }, - "id": 858, - "indexExpression": { - "argumentTypes": null, - "id": 857, - "name": "localCutOffBidID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 845, - "src": "19183:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "19178:22:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage", - "typeString": "struct IICO.Bid storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "19160:40:0" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 866, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 863, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 860, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 855, - "src": "19218:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": - "struct IICO.Bid storage pointer" - } - }, - "id": 861, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "contrib", - "nodeType": "MemberAccess", - "referencedDeclaration": 29, - "src": "19218:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 862, - "name": "valuation", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 834, - "src": "19232:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "19218:23:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 864, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 855, - "src": "19244:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - } - }, - "id": 865, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "maxVal", - "nodeType": "MemberAccess", - "referencedDeclaration": 27, - "src": "19244:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "19218:36:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 922, - "nodeType": "Block", - "src": "19521:453:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 903, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 892, - "name": "cutOffBidContrib", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 842, - "src": "19602:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 896, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 893, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 855, - "src": "19621:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": - "struct IICO.Bid storage pointer" - } - }, - "id": 894, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "maxVal", - "nodeType": "MemberAccess", - "referencedDeclaration": 27, - "src": "19621:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 895, - "name": "valuation", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 834, - "src": "19635:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "19621:23:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 901, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19672:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "id": 902, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "19621:52:0", - "trueExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 900, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 897, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 855, - "src": "19647:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": - "struct IICO.Bid storage pointer" - } - }, - "id": 898, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "maxVal", - "nodeType": "MemberAccess", - "referencedDeclaration": 27, - "src": "19647:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 899, - "name": "valuation", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 834, - "src": "19660:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "19647:22:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "19602:71:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 904, - "nodeType": "ExpressionStatement", - "src": "19602:71:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 907, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 905, - "name": "valuation", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 834, - "src": "19804:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "id": 906, - "name": "cutOffBidContrib", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 842, - "src": "19817:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "19804:29:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 908, - "nodeType": "ExpressionStatement", - "src": "19804:29:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 919, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 909, - "name": "virtualValuation", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 836, - "src": "19851:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 918, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 910, - "name": "cutOffBidContrib", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 842, - "src": "19871:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 917, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 914, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 911, - "name": "cutOffBidContrib", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 842, - "src": "19891:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 912, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 855, - "src": "19910:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": - "struct IICO.Bid storage pointer" - } - }, - "id": 913, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "bonus", - "nodeType": "MemberAccess", - "referencedDeclaration": 31, - "src": "19910:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "19891:28:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 915, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "19890:30:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 916, - "name": "BONUS_DIVISOR", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 67, - "src": "19923:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "19890:46:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "19871:65:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "19851:85:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 920, - "nodeType": "ExpressionStatement", - "src": "19851:85:0" - }, - { - "id": 921, - "nodeType": "Break", - "src": "19954:5:0" - } - ] - }, - "id": 923, - "nodeType": "IfStatement", - "src": "19214:760:0", - "trueBody": { - "id": 891, - "nodeType": "Block", - "src": "19256:259:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 870, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 867, - "name": "valuation", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 834, - "src": "19311:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 868, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 855, - "src": "19324:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": - "struct IICO.Bid storage pointer" - } - }, - "id": 869, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "contrib", - "nodeType": "MemberAccess", - "referencedDeclaration": 29, - "src": "19324:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "19311:24:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 871, - "nodeType": "ExpressionStatement", - "src": "19311:24:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 884, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 872, - "name": "virtualValuation", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 836, - "src": "19353:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 883, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 873, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 855, - "src": "19373:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": - "struct IICO.Bid storage pointer" - } - }, - "id": 874, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "contrib", - "nodeType": "MemberAccess", - "referencedDeclaration": 29, - "src": "19373:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 882, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 879, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 875, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 855, - "src": "19388:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": - "struct IICO.Bid storage pointer" - } - }, - "id": 876, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "contrib", - "nodeType": "MemberAccess", - "referencedDeclaration": 29, - "src": "19388:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 877, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 855, - "src": "19402:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": - "struct IICO.Bid storage pointer" - } - }, - "id": 878, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "bonus", - "nodeType": "MemberAccess", - "referencedDeclaration": 31, - "src": "19402:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "19388:23:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 880, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "19387:25:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 881, - "name": "BONUS_DIVISOR", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 67, - "src": "19415:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "19387:41:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "19373:55:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "19353:75:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 885, - "nodeType": "ExpressionStatement", - "src": "19353:75:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 889, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 886, - "name": "localCutOffBidID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 845, - "src": "19446:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 887, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 855, - "src": "19465:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": - "struct IICO.Bid storage pointer" - } - }, - "id": 888, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "prev", - "nodeType": "MemberAccess", - "referencedDeclaration": 23, - "src": "19465:8:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "19446:27:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 890, - "nodeType": "ExpressionStatement", - "src": "19446:27:0" - } - ] - } - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 853, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 851, - "name": "localCutOffBidID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 845, - "src": "19120:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 852, - "name": "HEAD", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9, - "src": "19140:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "19120:24:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 925, - "nodeType": "WhileStatement", - "src": "19113:871:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 931, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 926, - "name": "cutOffBidMaxVal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 840, - "src": "19994:15:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 927, - "name": "bids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 42, - "src": "20012:4:0", - "typeDescriptions": { - "typeIdentifier": - "t_mapping$_t_uint256_$_t_struct$_Bid_$38_storage_$", - "typeString": - "mapping(uint256 => struct IICO.Bid storage ref)" - } - }, - "id": 929, - "indexExpression": { - "argumentTypes": null, - "id": 928, - "name": "localCutOffBidID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 845, - "src": "20017:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "20012:22:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage", - "typeString": "struct IICO.Bid storage ref" - } - }, - "id": 930, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "maxVal", - "nodeType": "MemberAccess", - "referencedDeclaration": 27, - "src": "20012:29:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "19994:47:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 932, - "nodeType": "ExpressionStatement", - "src": "19994:47:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 935, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 933, - "name": "cutOffBidID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 838, - "src": "20051:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 934, - "name": "localCutOffBidID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 845, - "src": "20065:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "20051:30:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 936, - "nodeType": "ExpressionStatement", - "src": "20051:30:0" - } - ] - }, - "documentation": - "@dev Get the current valuation and cut off bid's details.\n@return The current valuation and cut off bid's details.", - "id": 938, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "valuationAndCutOff", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 832, - "nodeType": "ParameterList", - "parameters": [], - "src": "18867:2:0" - }, - "payable": false, - "returnParameters": { - "id": 843, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 834, - "name": "valuation", - "nodeType": "VariableDeclaration", - "scope": 938, - "src": "18891:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 833, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "18891:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 836, - "name": "virtualValuation", - "nodeType": "VariableDeclaration", - "scope": 938, - "src": "18907:21:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 835, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "18907:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 838, - "name": "cutOffBidID", - "nodeType": "VariableDeclaration", - "scope": 938, - "src": "18930:16:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 837, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "18930:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 840, - "name": "cutOffBidMaxVal", - "nodeType": "VariableDeclaration", - "scope": 938, - "src": "18948:20:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 839, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "18948:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 842, - "name": "cutOffBidContrib", - "nodeType": "VariableDeclaration", - "scope": 938, - "src": "18970:21:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 841, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "18970:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18890:102:0" - }, - "scope": 939, - "src": "18840:1248:0", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 940, - "src": "1999:18091:0" - } - ], - "src": "95:19996:0" - }, - "legacyAST": { - "absolutePath": - "/Users/epiqueras/Work/kleros/openiico-contract/contracts/IICO.sol", - "exportedSymbols": { - "IICO": [939] - }, - "id": 940, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 1, - "literals": ["solidity", "^", "0.4", ".18"], - "nodeType": "PragmaDirective", - "src": "95:24:0" - }, - { - "absolutePath": "zeppelin-solidity/contracts/token/ERC20/ERC20.sol", - "file": "zeppelin-solidity/contracts/token/ERC20/ERC20.sol", - "id": 2, - "nodeType": "ImportDirective", - "scope": 940, - "sourceUnit": 983, - "src": "121:59:0", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": - "@title Interactive Coin Offering\n This contract implements the Interactive Coin Offering token sale as described in this paper:\n https://people.cs.uchicago.edu/~teutsch/papers/ico.pdf\n Implementation details and modifications compared to the paper:\n -A fixed amount of tokens is sold. This allows more flexibility for the distribution of the remaining tokens (rounds, team tokens which can be preallocated, non-initial sell of some cryptographic assets).\n -The valuation pointer is only moved when the sale is over. This greatly reduces the amount of write operations and code complexity. However, at least one party must make one or multiple calls to finalize the sale.\n -Buckets are not used as they are not required and increase code complexity.\n -The bid submitter must provide the insertion spot. A search of the insertion spot is still done in the contract just in case the one provided was wrong or other bids were added between when the TX got signed and executed, but giving the search starting point greatly lowers gas consumption.\n -Automatic withdrawals are only possible at the end of the sale. This decreases code complexity and possible interactions between different parts of the code.\n -We put a full bonus, free withdrawal period at the beginning. This allows everyone to have a chance to place bids with full bonus and avoids clogging the network just after the sale starts. Note that at this moment, no information can be taken for granted as parties can withdraw freely.\n -Calling the fallback function while sending ETH places a bid with an infinite maximum valuation. This allows buyers who want to buy no matter the price not need to use a specific interface and just send ETH. Without ETH, a call to the fallback function redeems the bids of the caller.", - "fullyImplemented": true, - "id": 939, - "linearizedBaseContracts": [939], - "name": "IICO", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 4, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 939, - "src": "2046:20:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2046:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 6, - "name": "beneficiary", - "nodeType": "VariableDeclaration", - "scope": 939, - "src": "2114:26:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2114:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": true, - "id": 9, - "name": "HEAD", - "nodeType": "VariableDeclaration", - "scope": 939, - "src": "2210:22:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2210:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30", - "id": 8, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2231:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "visibility": "internal" - }, - { - "constant": true, - "id": 15, - "name": "TAIL", - "nodeType": "VariableDeclaration", - "scope": 939, - "src": "2333:29:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2333:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "-", - "prefix": true, - "src": "2359:2:0", - "subExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 12, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2360:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "typeDescriptions": { - "typeIdentifier": "t_rational_-1_by_1", - "typeString": "int_const -1" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_-1_by_1", - "typeString": "int_const -1" - } - ], - "id": 11, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2354:4:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": "uint" - }, - "id": 14, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2354:8:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": true, - "id": 21, - "name": "INFINITY", - "nodeType": "VariableDeclaration", - "scope": 939, - "src": "2456:33:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 16, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2456:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 19, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "-", - "prefix": true, - "src": "2486:2:0", - "subExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 18, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2487:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "typeDescriptions": { - "typeIdentifier": "t_rational_-2_by_1", - "typeString": "int_const -2" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_-2_by_1", - "typeString": "int_const -2" - } - ], - "id": 17, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2481:4:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": "uint" - }, - "id": 20, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2481:8:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "canonicalName": "IICO.Bid", - "id": 38, - "members": [ - { - "constant": false, - "id": 23, - "name": "prev", - "nodeType": "VariableDeclaration", - "scope": 38, - "src": "3043:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 22, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3043:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 25, - "name": "next", - "nodeType": "VariableDeclaration", - "scope": 38, - "src": "3107:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 24, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3107:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 27, - "name": "maxVal", - "nodeType": "VariableDeclaration", - "scope": 38, - "src": "3209:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 26, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3209:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 29, - "name": "contrib", - "nodeType": "VariableDeclaration", - "scope": 38, - "src": "3312:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 28, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3312:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 31, - "name": "bonus", - "nodeType": "VariableDeclaration", - "scope": 38, - "src": "3366:10:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 30, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3366:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 33, - "name": "contributor", - "nodeType": "VariableDeclaration", - "scope": 38, - "src": "3465:19:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 32, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3465:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 35, - "name": "withdrawn", - "nodeType": "VariableDeclaration", - "scope": 38, - "src": "3534:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 34, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "3534:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 37, - "name": "redeemed", - "nodeType": "VariableDeclaration", - "scope": 38, - "src": "3603:13:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 36, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "3603:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "name": "Bid", - "nodeType": "StructDefinition", - "scope": 939, - "src": "2980:699:0", - "visibility": "public" - }, - { - "constant": false, - "id": 42, - "name": "bids", - "nodeType": "VariableDeclaration", - "scope": 939, - "src": "3684:33:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": - "t_mapping$_t_uint256_$_t_struct$_Bid_$38_storage_$", - "typeString": "mapping(uint256 => struct IICO.Bid storage ref)" - }, - "typeName": { - "id": 41, - "keyType": { - "id": 39, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3693:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Mapping", - "src": "3684:21:0", - "typeDescriptions": { - "typeIdentifier": - "t_mapping$_t_uint256_$_t_struct$_Bid_$38_storage_$", - "typeString": "mapping(uint256 => struct IICO.Bid storage ref)" - }, - "valueType": { - "contractScope": null, - "id": 40, - "name": "Bid", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 38, - "src": "3701:3:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 47, - "name": "contributorBidIDs", - "nodeType": "VariableDeclaration", - "scope": 939, - "src": "3744:52:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": - "t_mapping$_t_address_$_t_array$_t_uint256_$dyn_storage_$", - "typeString": "mapping(address => uint256[] storage ref)" - }, - "typeName": { - "id": 46, - "keyType": { - "id": 43, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3753:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "3744:27:0", - "typeDescriptions": { - "typeIdentifier": - "t_mapping$_t_address_$_t_array$_t_uint256_$dyn_storage_$", - "typeString": "mapping(address => uint256[] storage ref)" - }, - "valueType": { - "baseType": { - "id": 44, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3764:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 45, - "length": null, - "nodeType": "ArrayTypeName", - "src": "3764:6:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[] storage pointer" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 50, - "name": "lastBidID", - "nodeType": "VariableDeclaration", - "scope": 939, - "src": "3846:25:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 48, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3846:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30", - "id": 49, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3870:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 52, - "name": "startTime", - "nodeType": "VariableDeclaration", - "scope": 939, - "src": "3951:21:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 51, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3951:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 54, - "name": "endFullBonusTime", - "nodeType": "VariableDeclaration", - "scope": 939, - "src": "4024:28:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 53, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "4024:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 56, - "name": "withdrawalLockTime", - "nodeType": "VariableDeclaration", - "scope": 939, - "src": "4108:30:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 55, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "4108:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 58, - "name": "endTime", - "nodeType": "VariableDeclaration", - "scope": 939, - "src": "4225:19:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 57, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "4225:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 60, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 939, - "src": "4296:18:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$982", - "typeString": "contract ERC20" - }, - "typeName": { - "contractScope": null, - "id": 59, - "name": "ERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 982, - "src": "4296:5:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$982", - "typeString": "contract ERC20" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 62, - "name": "tokensForSale", - "nodeType": "VariableDeclaration", - "scope": 939, - "src": "4372:25:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 61, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "4372:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 64, - "name": "maxBonus", - "nodeType": "VariableDeclaration", - "scope": 939, - "src": "4464:20:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 63, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "4464:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": true, - "id": 67, - "name": "BONUS_DIVISOR", - "nodeType": "VariableDeclaration", - "scope": 939, - "src": "4639:33:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 65, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "4639:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "314539", - "id": 66, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4669:3:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000_by_1", - "typeString": "int_const 1000000000" - }, - "value": "1E9" - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 69, - "name": "finalized", - "nodeType": "VariableDeclaration", - "scope": 939, - "src": "4790:21:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 68, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "4790:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 72, - "name": "cutOffBidID", - "nodeType": "VariableDeclaration", - "scope": 939, - "src": "4940:30:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 70, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "4940:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "id": 71, - "name": "TAIL", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15, - "src": "4966:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "public" - }, - { - "constant": false, - "id": 74, - "name": "sumAcceptedContrib", - "nodeType": "VariableDeclaration", - "scope": 939, - "src": "5042:30:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 73, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5042:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 76, - "name": "sumAcceptedVirtualContrib", - "nodeType": "VariableDeclaration", - "scope": 939, - "src": "5123:37:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 75, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5123:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "body": { - "id": 86, - "nodeType": "Block", - "src": "5252:36:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 82, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 79, - "name": "owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "5262:5:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 80, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1027, - "src": "5271:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 81, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5271:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "5262:19:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 78, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1030, - "src": "5254:7:0", - "typeDescriptions": { - "typeIdentifier": - "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 83, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5254:28:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 84, - "nodeType": "ExpressionStatement", - "src": "5254:28:0" - }, - { - "id": 85, - "nodeType": "PlaceholderStatement", - "src": "5284:1:0" - } - ] - }, - "documentation": null, - "id": 87, - "name": "onlyOwner", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 77, - "nodeType": "ParameterList", - "parameters": [], - "src": "5252:0:0" - }, - "src": "5234:54:0", - "visibility": "internal" - }, - { - "body": { - "id": 167, - "nodeType": "Block", - "src": "6293:889:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 105, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 102, - "name": "owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "6303:5:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 103, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1027, - "src": "6311:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 104, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6311:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "6303:18:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 106, - "nodeType": "ExpressionStatement", - "src": "6303:18:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 109, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 107, - "name": "startTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 52, - "src": "6331:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 108, - "name": "_startTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 89, - "src": "6343:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6331:22:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 110, - "nodeType": "ExpressionStatement", - "src": "6331:22:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 115, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 111, - "name": "endFullBonusTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 54, - "src": "6363:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 114, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 112, - "name": "startTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 52, - "src": "6382:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 113, - "name": "_fullBonusLength", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 91, - "src": "6394:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6382:28:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6363:47:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 116, - "nodeType": "ExpressionStatement", - "src": "6363:47:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 121, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 117, - "name": "withdrawalLockTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 56, - "src": "6420:18:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 120, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 118, - "name": "endFullBonusTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 54, - "src": "6441:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 119, - "name": "_partialWithdrawalLength", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 93, - "src": "6460:24:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6441:43:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6420:64:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 122, - "nodeType": "ExpressionStatement", - "src": "6420:64:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 127, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 123, - "name": "endTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 58, - "src": "6494:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 126, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 124, - "name": "withdrawalLockTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 56, - "src": "6504:18:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 125, - "name": "_withdrawalLockUpLength", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 95, - "src": "6525:23:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6504:44:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6494:54:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 128, - "nodeType": "ExpressionStatement", - "src": "6494:54:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 131, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 129, - "name": "maxBonus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 64, - "src": "6558:8:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 130, - "name": "_maxBonus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 97, - "src": "6569:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6558:20:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 132, - "nodeType": "ExpressionStatement", - "src": "6558:20:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 135, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 133, - "name": "beneficiary", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "6588:11:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 134, - "name": "_beneficiary", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 99, - "src": "6602:12:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "6588:26:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 136, - "nodeType": "ExpressionStatement", - "src": "6588:26:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 150, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 137, - "name": "bids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 42, - "src": "6691:4:0", - "typeDescriptions": { - "typeIdentifier": - "t_mapping$_t_uint256_$_t_struct$_Bid_$38_storage_$", - "typeString": - "mapping(uint256 => struct IICO.Bid storage ref)" - } - }, - "id": 139, - "indexExpression": { - "argumentTypes": null, - "id": 138, - "name": "HEAD", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9, - "src": "6696:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "6691:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage", - "typeString": "struct IICO.Bid storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 141, - "name": "TAIL", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15, - "src": "6728:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 142, - "name": "TAIL", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15, - "src": "6752:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 143, - "name": "HEAD", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9, - "src": "6778:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 144, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6805:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 145, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6827:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "hexValue": "307830", - "id": 146, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6855:3:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 147, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6883:5:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 148, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6912:5:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - } - ], - "expression": { - "argumentTypes": null, - "id": 140, - "name": "Bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 38, - "src": "6704:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_type$_t_struct$_Bid_$38_storage_ptr_$", - "typeString": "type(struct IICO.Bid storage pointer)" - } - }, - "id": 149, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "structConstructorCall", - "lValueRequested": false, - "names": [ - "prev", - "next", - "maxVal", - "contrib", - "bonus", - "contributor", - "withdrawn", - "redeemed" - ], - "nodeType": "FunctionCall", - "src": "6704:224:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_memory", - "typeString": "struct IICO.Bid memory" - } - }, - "src": "6691:237:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage", - "typeString": "struct IICO.Bid storage ref" - } - }, - "id": 151, - "nodeType": "ExpressionStatement", - "src": "6691:237:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 165, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 152, - "name": "bids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 42, - "src": "6938:4:0", - "typeDescriptions": { - "typeIdentifier": - "t_mapping$_t_uint256_$_t_struct$_Bid_$38_storage_$", - "typeString": - "mapping(uint256 => struct IICO.Bid storage ref)" - } - }, - "id": 154, - "indexExpression": { - "argumentTypes": null, - "id": 153, - "name": "TAIL", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15, - "src": "6943:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "6938:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage", - "typeString": "struct IICO.Bid storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 156, - "name": "HEAD", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9, - "src": "6975:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 157, - "name": "HEAD", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9, - "src": "6999:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 158, - "name": "TAIL", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15, - "src": "7025:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 159, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7052:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 160, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7074:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "hexValue": "307830", - "id": 161, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7102:3:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 162, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7130:5:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 163, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7159:5:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - } - ], - "expression": { - "argumentTypes": null, - "id": 155, - "name": "Bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 38, - "src": "6951:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_type$_t_struct$_Bid_$38_storage_ptr_$", - "typeString": "type(struct IICO.Bid storage pointer)" - } - }, - "id": 164, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "structConstructorCall", - "lValueRequested": false, - "names": [ - "prev", - "next", - "maxVal", - "contrib", - "bonus", - "contributor", - "withdrawn", - "redeemed" - ], - "nodeType": "FunctionCall", - "src": "6951:224:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_memory", - "typeString": "struct IICO.Bid memory" - } - }, - "src": "6938:237:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage", - "typeString": "struct IICO.Bid storage ref" - } - }, - "id": 166, - "nodeType": "ExpressionStatement", - "src": "6938:237:0" - } - ] - }, - "documentation": - "@dev Constructor. First contract set up (tokens will also need to be transferred to the contract and then setToken needs to be called to finish the setup).\n @param _startTime Time the sale will start in seconds since the Unix Epoch.\n @param _fullBonusLength Amount of seconds the sale lasts in the full bonus period.\n @param _partialWithdrawalLength Amount of seconds the sale lasts in the partial withdrawal period.\n @param _withdrawalLockUpLength Amount of seconds the sale lasts in the withdrawal lockup period.\n @param _maxBonus The maximum bonus. Will be normalized by BONUS_DIVISOR. For example for a 20% bonus, _maxBonus must be 0.2 * BONUS_DIVISOR.\n @param _beneficiary The party which will get the funds of the token sale.", - "id": 168, - "implemented": true, - "isConstructor": true, - "isDeclaredConst": false, - "modifiers": [], - "name": "IICO", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 100, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 89, - "name": "_startTime", - "nodeType": "VariableDeclaration", - "scope": 168, - "src": "6147:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 88, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6147:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 91, - "name": "_fullBonusLength", - "nodeType": "VariableDeclaration", - "scope": 168, - "src": "6164:21:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 90, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6164:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 93, - "name": "_partialWithdrawalLength", - "nodeType": "VariableDeclaration", - "scope": 168, - "src": "6187:29:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 92, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6187:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 95, - "name": "_withdrawalLockUpLength", - "nodeType": "VariableDeclaration", - "scope": 168, - "src": "6218:28:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 94, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6218:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 97, - "name": "_maxBonus", - "nodeType": "VariableDeclaration", - "scope": 168, - "src": "6248:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 96, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6248:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 99, - "name": "_beneficiary", - "nodeType": "VariableDeclaration", - "scope": 168, - "src": "6264:20:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 98, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6264:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6146:139:0" - }, - "payable": false, - "returnParameters": { - "id": 101, - "nodeType": "ParameterList", - "parameters": [], - "src": "6293:0:0" - }, - "scope": 939, - "src": "6133:1049:0", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 194, - "nodeType": "Block", - "src": "7393:119:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 180, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 177, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 60, - "src": "7419:5:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$982", - "typeString": "contract ERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_ERC20_$982", - "typeString": "contract ERC20" - } - ], - "id": 176, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "7411:7:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 178, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7411:14:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 179, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7429:3:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "7411:21:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 175, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1030, - "src": "7403:7:0", - "typeDescriptions": { - "typeIdentifier": - "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 181, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7403:30:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 182, - "nodeType": "ExpressionStatement", - "src": "7403:30:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 185, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 183, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 60, - "src": "7444:5:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$982", - "typeString": "contract ERC20" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 184, - "name": "_token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 170, - "src": "7452:6:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$982", - "typeString": "contract ERC20" - } - }, - "src": "7444:14:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$982", - "typeString": "contract ERC20" - } - }, - "id": 186, - "nodeType": "ExpressionStatement", - "src": "7444:14:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 192, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 187, - "name": "tokensForSale", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 62, - "src": "7468:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 190, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1042, - "src": "7500:4:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IICO_$939", - "typeString": "contract IICO" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IICO_$939", - "typeString": "contract IICO" - } - ], - "expression": { - "argumentTypes": null, - "id": 188, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 60, - "src": "7484:5:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$982", - "typeString": "contract ERC20" - } - }, - "id": 189, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balanceOf", - "nodeType": "MemberAccess", - "referencedDeclaration": 996, - "src": "7484:15:0", - "typeDescriptions": { - "typeIdentifier": - "t_function_external_view$_t_address_$returns$_t_uint256_$", - "typeString": - "function (address) view external returns (uint256)" - } - }, - "id": 191, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7484:21:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7468:37:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 193, - "nodeType": "ExpressionStatement", - "src": "7468:37:0" - } - ] - }, - "documentation": - "@dev Set the token. Must only be called after the IICO contract receives the tokens to be sold.\n @param _token The token to be sold.", - "id": 195, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [ - { - "arguments": [], - "id": 173, - "modifierName": { - "argumentTypes": null, - "id": 172, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 87, - "src": "7383:9:0", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "7383:9:0" - } - ], - "name": "setToken", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 171, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 170, - "name": "_token", - "nodeType": "VariableDeclaration", - "scope": 195, - "src": "7362:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$982", - "typeString": "contract ERC20" - }, - "typeName": { - "contractScope": null, - "id": 169, - "name": "ERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 982, - "src": "7362:5:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$982", - "typeString": "contract ERC20" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7361:14:0" - }, - "payable": false, - "returnParameters": { - "id": 174, - "nodeType": "ParameterList", - "parameters": [], - "src": "7393:0:0" - }, - "scope": 939, - "src": "7344:168:0", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 282, - "nodeType": "Block", - "src": "8172:1005:0", - "statements": [ - { - "assignments": [203], - "declarations": [ - { - "constant": false, - "id": 203, - "name": "nextBid", - "nodeType": "VariableDeclaration", - "scope": 283, - "src": "8182:19:0", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - }, - "typeName": { - "contractScope": null, - "id": 202, - "name": "Bid", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 38, - "src": "8182:3:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 207, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 204, - "name": "bids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 42, - "src": "8204:4:0", - "typeDescriptions": { - "typeIdentifier": - "t_mapping$_t_uint256_$_t_struct$_Bid_$38_storage_$", - "typeString": - "mapping(uint256 => struct IICO.Bid storage ref)" - } - }, - "id": 206, - "indexExpression": { - "argumentTypes": null, - "id": 205, - "name": "_next", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 199, - "src": "8209:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8204:11:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage", - "typeString": "struct IICO.Bid storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "8182:33:0" - }, - { - "assignments": [209], - "declarations": [ - { - "constant": false, - "id": 209, - "name": "prev", - "nodeType": "VariableDeclaration", - "scope": 283, - "src": "8225:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 208, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "8225:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 212, - "initialValue": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 210, - "name": "nextBid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 203, - "src": "8237:7:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - } - }, - "id": 211, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "prev", - "nodeType": "MemberAccess", - "referencedDeclaration": 23, - "src": "8237:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "8225:24:0" - }, - { - "assignments": [214], - "declarations": [ - { - "constant": false, - "id": 214, - "name": "prevBid", - "nodeType": "VariableDeclaration", - "scope": 283, - "src": "8259:19:0", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - }, - "typeName": { - "contractScope": null, - "id": 213, - "name": "Bid", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 38, - "src": "8259:3:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 218, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 215, - "name": "bids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 42, - "src": "8281:4:0", - "typeDescriptions": { - "typeIdentifier": - "t_mapping$_t_uint256_$_t_struct$_Bid_$38_storage_$", - "typeString": - "mapping(uint256 => struct IICO.Bid storage ref)" - } - }, - "id": 217, - "indexExpression": { - "argumentTypes": null, - "id": 216, - "name": "prev", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 209, - "src": "8286:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8281:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage", - "typeString": "struct IICO.Bid storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "8259:32:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 228, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 223, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 220, - "name": "_maxVal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 197, - "src": "8309:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 221, - "name": "prevBid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 214, - "src": "8320:7:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - } - }, - "id": 222, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "maxVal", - "nodeType": "MemberAccess", - "referencedDeclaration": 27, - "src": "8320:14:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8309:25:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 227, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 224, - "name": "_maxVal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 197, - "src": "8338:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 225, - "name": "nextBid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 203, - "src": "8348:7:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - } - }, - "id": 226, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "maxVal", - "nodeType": "MemberAccess", - "referencedDeclaration": 27, - "src": "8348:14:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8338:24:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "8309:53:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 219, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1030, - "src": "8301:7:0", - "typeDescriptions": { - "typeIdentifier": - "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 229, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8301:62:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 230, - "nodeType": "ExpressionStatement", - "src": "8301:62:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 238, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 234, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 232, - "name": "now", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1029, - "src": "8473:3:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 233, - "name": "startTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 52, - "src": "8480:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8473:16:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 237, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 235, - "name": "now", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1029, - "src": "8493:3:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 236, - "name": "endTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 58, - "src": "8499:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8493:13:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "8473:33:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 231, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1030, - "src": "8465:7:0", - "typeDescriptions": { - "typeIdentifier": - "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 239, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8465:42:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 240, - "nodeType": "ExpressionStatement", - "src": "8465:42:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 242, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": true, - "src": "8557:11:0", - "subExpression": { - "argumentTypes": null, - "id": 241, - "name": "lastBidID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 50, - "src": "8559:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 243, - "nodeType": "ExpressionStatement", - "src": "8557:11:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 248, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 244, - "name": "prevBid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 214, - "src": "8687:7:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - } - }, - "id": 246, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "next", - "nodeType": "MemberAccess", - "referencedDeclaration": 25, - "src": "8687:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 247, - "name": "lastBidID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 50, - "src": "8702:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8687:24:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 249, - "nodeType": "ExpressionStatement", - "src": "8687:24:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 254, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 250, - "name": "nextBid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 203, - "src": "8721:7:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - } - }, - "id": 252, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "prev", - "nodeType": "MemberAccess", - "referencedDeclaration": 23, - "src": "8721:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 253, - "name": "lastBidID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 50, - "src": "8736:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8721:24:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 255, - "nodeType": "ExpressionStatement", - "src": "8721:24:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 272, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 256, - "name": "bids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 42, - "src": "8783:4:0", - "typeDescriptions": { - "typeIdentifier": - "t_mapping$_t_uint256_$_t_struct$_Bid_$38_storage_$", - "typeString": - "mapping(uint256 => struct IICO.Bid storage ref)" - } - }, - "id": 258, - "indexExpression": { - "argumentTypes": null, - "id": 257, - "name": "lastBidID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 50, - "src": "8788:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "8783:15:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage", - "typeString": "struct IICO.Bid storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 260, - "name": "prev", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 209, - "src": "8825:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 261, - "name": "_next", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 199, - "src": "8849:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 262, - "name": "_maxVal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 197, - "src": "8876:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 263, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1027, - "src": "8906:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 264, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8906:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 265, - "name": "bonus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 798, - "src": "8936:5:0", - "typeDescriptions": { - "typeIdentifier": - "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 266, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8936:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 267, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1027, - "src": "8970:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 268, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8970:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 269, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9005:5:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 270, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9034:5:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - } - ], - "expression": { - "argumentTypes": null, - "id": 259, - "name": "Bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 38, - "src": "8801:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_type$_t_struct$_Bid_$38_storage_ptr_$", - "typeString": "type(struct IICO.Bid storage pointer)" - } - }, - "id": 271, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "structConstructorCall", - "lValueRequested": false, - "names": [ - "prev", - "next", - "maxVal", - "contrib", - "bonus", - "contributor", - "withdrawn", - "redeemed" - ], - "nodeType": "FunctionCall", - "src": "8801:249:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_memory", - "typeString": "struct IICO.Bid memory" - } - }, - "src": "8783:267:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage", - "typeString": "struct IICO.Bid storage ref" - } - }, - "id": 273, - "nodeType": "ExpressionStatement", - "src": "8783:267:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 279, - "name": "lastBidID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 50, - "src": "9160:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 274, - "name": "contributorBidIDs", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 47, - "src": "9125:17:0", - "typeDescriptions": { - "typeIdentifier": - "t_mapping$_t_address_$_t_array$_t_uint256_$dyn_storage_$", - "typeString": - "mapping(address => uint256[] storage ref)" - } - }, - "id": 277, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 275, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1027, - "src": "9143:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 276, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9143:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "9125:29:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage", - "typeString": "uint256[] storage ref" - } - }, - "id": 278, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "push", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9125:34:0", - "typeDescriptions": { - "typeIdentifier": - "t_function_arraypush_nonpayable$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256) returns (uint256)" - } - }, - "id": 280, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9125:45:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 281, - "nodeType": "ExpressionStatement", - "src": "9125:45:0" - } - ] - }, - "documentation": - "@dev Submit a bid. The caller must give the exact position the bid must be inserted into in the list.\n In practice, use searchAndBid to avoid the position being incorrect due to a new bid being inserted and changing the position the bid must be inserted at.\n @param _maxVal The maximum valuation given by the contributor. If the amount raised is higher, the bid is cancelled and the contributor refunded because it prefers a refund instead of this level of dilution. To buy no matter what, use INFINITY.\n @param _next The bidID of the next bid in the list.", - "id": 283, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "submitBid", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 200, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 197, - "name": "_maxVal", - "nodeType": "VariableDeclaration", - "scope": 283, - "src": "8131:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 196, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "8131:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 199, - "name": "_next", - "nodeType": "VariableDeclaration", - "scope": 283, - "src": "8145:10:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 198, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "8145:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8130:26:0" - }, - "payable": true, - "returnParameters": { - "id": 201, - "nodeType": "ParameterList", - "parameters": [], - "src": "8172:0:0" - }, - "scope": 939, - "src": "8112:1065:0", - "stateMutability": "payable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 298, - "nodeType": "Block", - "src": "10056:58:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 291, - "name": "_maxVal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 285, - "src": "10076:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 293, - "name": "_maxVal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 285, - "src": "10092:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 294, - "name": "_next", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 287, - "src": "10100:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 292, - "name": "search", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 767, - "src": "10085:6:0", - "typeDescriptions": { - "typeIdentifier": - "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": - "function (uint256,uint256) view returns (uint256)" - } - }, - "id": 295, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10085:21:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 290, - "name": "submitBid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 283, - "src": "10066:9:0", - "typeDescriptions": { - "typeIdentifier": - "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (uint256,uint256)" - } - }, - "id": 296, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10066:41:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 297, - "nodeType": "ExpressionStatement", - "src": "10066:41:0" - } - ] - }, - "documentation": - "@dev Search for the correct insertion spot and submit a bid.\n This function is O(n), where n is the amount of bids between the initial search position and the insertion position.\n The UI must first call search to find the best point to start the search so it consumes the least amount of gas possible.\n Using this function instead of calling submitBid directly prevents it from failing in the case where new bids are added before the transaction is executed.\n @param _maxVal The maximum valuation given by the contributor. If the amount raised is higher, the bid is cancelled and the contributor refunded because it prefers a refund instead of this level of dilution. To buy no matter what, use INFINITY.\n @param _next The bidID of the next bid in the list.", - "id": 299, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "searchAndBid", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 288, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 285, - "name": "_maxVal", - "nodeType": "VariableDeclaration", - "scope": 299, - "src": "10015:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 284, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "10015:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 287, - "name": "_next", - "nodeType": "VariableDeclaration", - "scope": 299, - "src": "10029:10:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 286, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "10029:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10014:26:0" - }, - "payable": true, - "returnParameters": { - "id": 289, - "nodeType": "ParameterList", - "parameters": [], - "src": "10056:0:0" - }, - "scope": 939, - "src": "9993:121:0", - "stateMutability": "payable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 386, - "nodeType": "Block", - "src": "10446:813:0", - "statements": [ - { - "assignments": [305], - "declarations": [ - { - "constant": false, - "id": 305, - "name": "bid", - "nodeType": "VariableDeclaration", - "scope": 387, - "src": "10456:15:0", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - }, - "typeName": { - "contractScope": null, - "id": 304, - "name": "Bid", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 38, - "src": "10456:3:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 309, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 306, - "name": "bids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 42, - "src": "10474:4:0", - "typeDescriptions": { - "typeIdentifier": - "t_mapping$_t_uint256_$_t_struct$_Bid_$38_storage_$", - "typeString": - "mapping(uint256 => struct IICO.Bid storage ref)" - } - }, - "id": 308, - "indexExpression": { - "argumentTypes": null, - "id": 307, - "name": "_bidID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 301, - "src": "10479:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10474:12:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage", - "typeString": "struct IICO.Bid storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "10456:30:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 315, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 311, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1027, - "src": "10504:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 312, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10504:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 313, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 305, - "src": "10518:3:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - } - }, - "id": 314, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "contributor", - "nodeType": "MemberAccess", - "referencedDeclaration": 33, - "src": "10518:15:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "10504:29:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 310, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1030, - "src": "10496:7:0", - "typeDescriptions": { - "typeIdentifier": - "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 316, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10496:38:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 317, - "nodeType": "ExpressionStatement", - "src": "10496:38:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 321, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 319, - "name": "now", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1029, - "src": "10552:3:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 320, - "name": "withdrawalLockTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 56, - "src": "10558:18:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10552:24:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 318, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1030, - "src": "10544:7:0", - "typeDescriptions": { - "typeIdentifier": - "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 322, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10544:33:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 323, - "nodeType": "ExpressionStatement", - "src": "10544:33:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 327, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "10595:14:0", - "subExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 325, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 305, - "src": "10596:3:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - } - }, - "id": 326, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "withdrawn", - "nodeType": "MemberAccess", - "referencedDeclaration": 35, - "src": "10596:13:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 324, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1030, - "src": "10587:7:0", - "typeDescriptions": { - "typeIdentifier": - "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 328, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10587:23:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 329, - "nodeType": "ExpressionStatement", - "src": "10587:23:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 334, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 330, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 305, - "src": "10621:3:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - } - }, - "id": 332, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "withdrawn", - "nodeType": "MemberAccess", - "referencedDeclaration": 35, - "src": "10621:13:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 333, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10637:4:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "10621:20:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 335, - "nodeType": "ExpressionStatement", - "src": "10621:20:0" - }, - { - "assignments": [337], - "declarations": [ - { - "constant": false, - "id": 337, - "name": "refund", - "nodeType": "VariableDeclaration", - "scope": 387, - "src": "10810:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 336, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "10810:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 358, - "initialValue": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 340, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 338, - "name": "now", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1029, - "src": "10825:3:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 339, - "name": "endFullBonusTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 54, - "src": "10831:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10825:22:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 341, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "10824:24:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 356, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 350, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 344, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 305, - "src": "10866:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": - "struct IICO.Bid storage pointer" - } - }, - "id": 345, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "contrib", - "nodeType": "MemberAccess", - "referencedDeclaration": 29, - "src": "10866:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 348, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 346, - "name": "withdrawalLockTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 56, - "src": "10881:18:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 347, - "name": "now", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1029, - "src": "10902:3:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10881:24:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 349, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "10880:26:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10866:40:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 351, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "10865:42:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 354, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 352, - "name": "withdrawalLockTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 56, - "src": "10911:18:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 353, - "name": "endFullBonusTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 54, - "src": "10932:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10911:37:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 355, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "10910:39:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10865:84:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 357, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "10824:125:0", - "trueExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 342, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 305, - "src": "10851:3:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - } - }, - "id": 343, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "contrib", - "nodeType": "MemberAccess", - "referencedDeclaration": 29, - "src": "10851:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "10810:139:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 363, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 360, - "name": "refund", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 337, - "src": "10966:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 361, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 305, - "src": "10976:3:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - } - }, - "id": 362, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "contrib", - "nodeType": "MemberAccess", - "referencedDeclaration": 29, - "src": "10976:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10966:21:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 359, - "name": "assert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1017, - "src": "10959:6:0", - "typeDescriptions": { - "typeIdentifier": - "t_function_assert_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 364, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10959:29:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 365, - "nodeType": "ExpressionStatement", - "src": "10959:29:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 370, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 366, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 305, - "src": "11143:3:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - } - }, - "id": 368, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "contrib", - "nodeType": "MemberAccess", - "referencedDeclaration": 29, - "src": "11143:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "-=", - "rightHandSide": { - "argumentTypes": null, - "id": 369, - "name": "refund", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 337, - "src": "11158:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "11143:21:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 371, - "nodeType": "ExpressionStatement", - "src": "11143:21:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 376, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 372, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 305, - "src": "11174:3:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - } - }, - "id": 374, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "bonus", - "nodeType": "MemberAccess", - "referencedDeclaration": 31, - "src": "11174:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "/=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "33", - "id": 375, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11187:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_3_by_1", - "typeString": "int_const 3" - }, - "value": "3" - }, - "src": "11174:14:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 377, - "nodeType": "ExpressionStatement", - "src": "11174:14:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 383, - "name": "refund", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 337, - "src": "11245:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 378, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1027, - "src": "11225:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 381, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "11225:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 382, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transfer", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "11225:19:0", - "typeDescriptions": { - "typeIdentifier": - "t_function_transfer_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 384, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11225:27:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 385, - "nodeType": "ExpressionStatement", - "src": "11225:27:0" - } - ] - }, - "documentation": - "@dev Withdraw a bid. Can only be called before the end of the withdrawal lock period.\n Withdrawing a bid divides its bonus by 3.\n For retrieving ETH after an automatic withdrawal, use the redeem function.\n @param _bidID The ID of the bid to withdraw.", - "id": 387, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 302, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 301, - "name": "_bidID", - "nodeType": "VariableDeclaration", - "scope": 387, - "src": "10426:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 300, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "10426:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10425:13:0" - }, - "payable": false, - "returnParameters": { - "id": 303, - "nodeType": "ParameterList", - "parameters": [], - "src": "10446:0:0" - }, - "scope": 939, - "src": "10408:851:0", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 552, - "nodeType": "Block", - "src": "11791:2248:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 395, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 393, - "name": "now", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1029, - "src": "11809:3:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 394, - "name": "endTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 58, - "src": "11816:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "11809:14:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 392, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1030, - "src": "11801:7:0", - "typeDescriptions": { - "typeIdentifier": - "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 396, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11801:23:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 397, - "nodeType": "ExpressionStatement", - "src": "11801:23:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 400, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "11842:10:0", - "subExpression": { - "argumentTypes": null, - "id": 399, - "name": "finalized", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 69, - "src": "11843:9:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 398, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1030, - "src": "11834:7:0", - "typeDescriptions": { - "typeIdentifier": - "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 401, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11834:19:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 402, - "nodeType": "ExpressionStatement", - "src": "11834:19:0" - }, - { - "assignments": [404], - "declarations": [ - { - "constant": false, - "id": 404, - "name": "localCutOffBidID", - "nodeType": "VariableDeclaration", - "scope": 553, - "src": "11981:21:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 403, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "11981:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 406, - "initialValue": { - "argumentTypes": null, - "id": 405, - "name": "cutOffBidID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 72, - "src": "12005:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "11981:35:0" - }, - { - "assignments": [408], - "declarations": [ - { - "constant": false, - "id": 408, - "name": "localSumAcceptedContrib", - "nodeType": "VariableDeclaration", - "scope": 553, - "src": "12026:28:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 407, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "12026:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 410, - "initialValue": { - "argumentTypes": null, - "id": 409, - "name": "sumAcceptedContrib", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 74, - "src": "12057:18:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "12026:49:0" - }, - { - "assignments": [412], - "declarations": [ - { - "constant": false, - "id": 412, - "name": "localSumAcceptedVirtualContrib", - "nodeType": "VariableDeclaration", - "scope": 553, - "src": "12085:35:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 411, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "12085:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 414, - "initialValue": { - "argumentTypes": null, - "id": 413, - "name": "sumAcceptedVirtualContrib", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 76, - "src": "12123:25:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "12085:63:0" - }, - { - "body": { - "id": 538, - "nodeType": "Block", - "src": "12280:1563:0", - "statements": [ - { - "assignments": [429], - "declarations": [ - { - "constant": false, - "id": 429, - "name": "bid", - "nodeType": "VariableDeclaration", - "scope": 553, - "src": "12294:15:0", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - }, - "typeName": { - "contractScope": null, - "id": 428, - "name": "Bid", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 38, - "src": "12294:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 433, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 430, - "name": "bids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 42, - "src": "12312:4:0", - "typeDescriptions": { - "typeIdentifier": - "t_mapping$_t_uint256_$_t_struct$_Bid_$38_storage_$", - "typeString": - "mapping(uint256 => struct IICO.Bid storage ref)" - } - }, - "id": 432, - "indexExpression": { - "argumentTypes": null, - "id": 431, - "name": "localCutOffBidID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 404, - "src": "12317:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "12312:22:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage", - "typeString": "struct IICO.Bid storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "12294:40:0" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 440, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 437, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 434, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 429, - "src": "12352:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": - "struct IICO.Bid storage pointer" - } - }, - "id": 435, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "contrib", - "nodeType": "MemberAccess", - "referencedDeclaration": 29, - "src": "12352:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 436, - "name": "localSumAcceptedContrib", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 408, - "src": "12364:23:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12352:35:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 438, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 429, - "src": "12390:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - } - }, - "id": 439, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "maxVal", - "nodeType": "MemberAccess", - "referencedDeclaration": 27, - "src": "12390:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12352:48:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 536, - "nodeType": "Block", - "src": "12702:1131:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 468, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 466, - "name": "finalized", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 69, - "src": "12779:9:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 467, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12791:4:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "12779:16:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 469, - "nodeType": "ExpressionStatement", - "src": "12779:16:0" - }, - { - "assignments": [471], - "declarations": [ - { - "constant": false, - "id": 471, - "name": "contribCutOff", - "nodeType": "VariableDeclaration", - "scope": 553, - "src": "12813:18:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 470, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "12813:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 482, - "initialValue": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 475, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 472, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 429, - "src": "12834:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": - "struct IICO.Bid storage pointer" - } - }, - "id": 473, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "maxVal", - "nodeType": "MemberAccess", - "referencedDeclaration": 27, - "src": "12834:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 474, - "name": "localSumAcceptedContrib", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 408, - "src": "12848:23:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12834:37:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 480, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12913:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "id": 481, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "12834:80:0", - "trueExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 479, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 476, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 429, - "src": "12874:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": - "struct IICO.Bid storage pointer" - } - }, - "id": 477, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "maxVal", - "nodeType": "MemberAccess", - "referencedDeclaration": 27, - "src": "12874:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 478, - "name": "localSumAcceptedContrib", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 408, - "src": "12887:23:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12874:36:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "12813:101:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 492, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 483, - "name": "contribCutOff", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 471, - "src": "13045:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 487, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 484, - "name": "contribCutOff", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 471, - "src": "13061:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 485, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 429, - "src": "13077:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": - "struct IICO.Bid storage pointer" - } - }, - "id": 486, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "contrib", - "nodeType": "MemberAccess", - "referencedDeclaration": 29, - "src": "13077:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "13061:27:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 489, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 429, - "src": "13107:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": - "struct IICO.Bid storage pointer" - } - }, - "id": 490, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "contrib", - "nodeType": "MemberAccess", - "referencedDeclaration": 29, - "src": "13107:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 491, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "13061:57:0", - "trueExpression": { - "argumentTypes": null, - "id": 488, - "name": "contribCutOff", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 471, - "src": "13091:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "13045:73:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 493, - "nodeType": "ExpressionStatement", - "src": "13045:73:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 502, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 499, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 429, - "src": "13317:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": - "struct IICO.Bid storage pointer" - } - }, - "id": 500, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "contrib", - "nodeType": "MemberAccess", - "referencedDeclaration": 29, - "src": "13317:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 501, - "name": "contribCutOff", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 471, - "src": "13329:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "13317:25:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 494, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 429, - "src": "13296:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": - "struct IICO.Bid storage pointer" - } - }, - "id": 497, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "contributor", - "nodeType": "MemberAccess", - "referencedDeclaration": 33, - "src": "13296:15:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 498, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "send", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "13296:20:0", - "typeDescriptions": { - "typeIdentifier": - "t_function_send_nonpayable$_t_uint256_$returns$_t_bool_$", - "typeString": - "function (uint256) returns (bool)" - } - }, - "id": 503, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13296:47:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 504, - "nodeType": "ExpressionStatement", - "src": "13296:47:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 509, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 505, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 429, - "src": "13462:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": - "struct IICO.Bid storage pointer" - } - }, - "id": 507, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "contrib", - "nodeType": "MemberAccess", - "referencedDeclaration": 29, - "src": "13462:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 508, - "name": "contribCutOff", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 471, - "src": "13476:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "13462:27:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 510, - "nodeType": "ExpressionStatement", - "src": "13462:27:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 514, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 511, - "name": "localSumAcceptedContrib", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 408, - "src": "13541:23:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 512, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 429, - "src": "13568:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": - "struct IICO.Bid storage pointer" - } - }, - "id": 513, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "contrib", - "nodeType": "MemberAccess", - "referencedDeclaration": 29, - "src": "13568:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "13541:38:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 515, - "nodeType": "ExpressionStatement", - "src": "13541:38:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 528, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 516, - "name": "localSumAcceptedVirtualContrib", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 412, - "src": "13597:30:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 527, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 517, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 429, - "src": "13631:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": - "struct IICO.Bid storage pointer" - } - }, - "id": 518, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "contrib", - "nodeType": "MemberAccess", - "referencedDeclaration": 29, - "src": "13631:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 526, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 523, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 519, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 429, - "src": "13646:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": - "struct IICO.Bid storage pointer" - } - }, - "id": 520, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "contrib", - "nodeType": "MemberAccess", - "referencedDeclaration": 29, - "src": "13646:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 521, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 429, - "src": "13660:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": - "struct IICO.Bid storage pointer" - } - }, - "id": 522, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "bonus", - "nodeType": "MemberAccess", - "referencedDeclaration": 31, - "src": "13660:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "13646:23:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 524, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "13645:25:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 525, - "name": "BONUS_DIVISOR", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 67, - "src": "13673:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "13645:41:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "13631:55:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "13597:89:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 529, - "nodeType": "ExpressionStatement", - "src": "13597:89:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 533, - "name": "localSumAcceptedContrib", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 408, - "src": "13721:23:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 530, - "name": "beneficiary", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "13704:11:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 532, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "send", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "13704:16:0", - "typeDescriptions": { - "typeIdentifier": - "t_function_send_nonpayable$_t_uint256_$returns$_t_bool_$", - "typeString": - "function (uint256) returns (bool)" - } - }, - "id": 534, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13704:41:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 535, - "nodeType": "ExpressionStatement", - "src": "13704:41:0" - } - ] - }, - "id": 537, - "nodeType": "IfStatement", - "src": "12348:1485:0", - "trueBody": { - "id": 465, - "nodeType": "Block", - "src": "12402:294:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 444, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 441, - "name": "localSumAcceptedContrib", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 408, - "src": "12457:23:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 442, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 429, - "src": "12491:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": - "struct IICO.Bid storage pointer" - } - }, - "id": 443, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "contrib", - "nodeType": "MemberAccess", - "referencedDeclaration": 29, - "src": "12491:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12457:45:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 445, - "nodeType": "ExpressionStatement", - "src": "12457:45:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 458, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 446, - "name": "localSumAcceptedVirtualContrib", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 412, - "src": "12520:30:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 457, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 447, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 429, - "src": "12554:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": - "struct IICO.Bid storage pointer" - } - }, - "id": 448, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "contrib", - "nodeType": "MemberAccess", - "referencedDeclaration": 29, - "src": "12554:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 456, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 453, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 449, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 429, - "src": "12569:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": - "struct IICO.Bid storage pointer" - } - }, - "id": 450, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "contrib", - "nodeType": "MemberAccess", - "referencedDeclaration": 29, - "src": "12569:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 451, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 429, - "src": "12583:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": - "struct IICO.Bid storage pointer" - } - }, - "id": 452, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "bonus", - "nodeType": "MemberAccess", - "referencedDeclaration": 31, - "src": "12583:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12569:23:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 454, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "12568:25:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 455, - "name": "BONUS_DIVISOR", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 67, - "src": "12596:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12568:41:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12554:55:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12520:89:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 459, - "nodeType": "ExpressionStatement", - "src": "12520:89:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 463, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 460, - "name": "localCutOffBidID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 404, - "src": "12627:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 461, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 429, - "src": "12646:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": - "struct IICO.Bid storage pointer" - } - }, - "id": 462, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "prev", - "nodeType": "MemberAccess", - "referencedDeclaration": 23, - "src": "12646:8:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12627:27:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 464, - "nodeType": "ExpressionStatement", - "src": "12627:27:0" - } - ] - } - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 424, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 421, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 419, - "name": "it", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 416, - "src": "12247:2:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 420, - "name": "_maxIt", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 389, - "src": "12252:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12247:11:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "id": 423, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "12262:10:0", - "subExpression": { - "argumentTypes": null, - "id": 422, - "name": "finalized", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 69, - "src": "12263:9:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "12247:25:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 539, - "initializationExpression": { - "assignments": [416], - "declarations": [ - { - "constant": false, - "id": 416, - "name": "it", - "nodeType": "VariableDeclaration", - "scope": 553, - "src": "12234:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 415, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "12234:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 418, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 417, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12244:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "12234:11:0" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 426, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": true, - "src": "12274:4:0", - "subExpression": { - "argumentTypes": null, - "id": 425, - "name": "it", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 416, - "src": "12276:2:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 427, - "nodeType": "ExpressionStatement", - "src": "12274:4:0" - }, - "nodeType": "ForStatement", - "src": "12229:1614:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 542, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 540, - "name": "cutOffBidID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 72, - "src": "13880:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 541, - "name": "localCutOffBidID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 404, - "src": "13894:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "13880:30:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 543, - "nodeType": "ExpressionStatement", - "src": "13880:30:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 546, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 544, - "name": "sumAcceptedContrib", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 74, - "src": "13920:18:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 545, - "name": "localSumAcceptedContrib", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 408, - "src": "13941:23:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "13920:44:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 547, - "nodeType": "ExpressionStatement", - "src": "13920:44:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 550, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 548, - "name": "sumAcceptedVirtualContrib", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 76, - "src": "13974:25:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 549, - "name": "localSumAcceptedVirtualContrib", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 412, - "src": "14002:30:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "13974:58:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 551, - "nodeType": "ExpressionStatement", - "src": "13974:58:0" - } - ] - }, - "documentation": - "@dev Finalize by finding the cut-off bid.\n Since the amount of bids is not bounded, this function may have to be called multiple times.\n The function is O(min(n,_maxIt)) where n is the amount of bids. In total it will perform O(n) computations, possibly in multiple calls.\n Each call only has a O(1) storage write operations.\n @param _maxIt The maximum amount of bids to go through. This value must be set in order to not exceed the gas limit.", - "id": 553, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "finalize", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 390, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 389, - "name": "_maxIt", - "nodeType": "VariableDeclaration", - "scope": 553, - "src": "11771:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 388, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "11771:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11770:13:0" - }, - "payable": false, - "returnParameters": { - "id": 391, - "nodeType": "ParameterList", - "parameters": [], - "src": "11791:0:0" - }, - "scope": 939, - "src": "11753:2286:0", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 636, - "nodeType": "Block", - "src": "14320:662:0", - "statements": [ - { - "assignments": [559], - "declarations": [ - { - "constant": false, - "id": 559, - "name": "bid", - "nodeType": "VariableDeclaration", - "scope": 637, - "src": "14330:15:0", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - }, - "typeName": { - "contractScope": null, - "id": 558, - "name": "Bid", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 38, - "src": "14330:3:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 563, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 560, - "name": "bids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 42, - "src": "14348:4:0", - "typeDescriptions": { - "typeIdentifier": - "t_mapping$_t_uint256_$_t_struct$_Bid_$38_storage_$", - "typeString": - "mapping(uint256 => struct IICO.Bid storage ref)" - } - }, - "id": 562, - "indexExpression": { - "argumentTypes": null, - "id": 561, - "name": "_bidID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 555, - "src": "14353:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "14348:12:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage", - "typeString": "struct IICO.Bid storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "14330:30:0" - }, - { - "assignments": [565], - "declarations": [ - { - "constant": false, - "id": 565, - "name": "cutOffBid", - "nodeType": "VariableDeclaration", - "scope": 637, - "src": "14370:21:0", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - }, - "typeName": { - "contractScope": null, - "id": 564, - "name": "Bid", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 38, - "src": "14370:3:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 569, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 566, - "name": "bids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 42, - "src": "14394:4:0", - "typeDescriptions": { - "typeIdentifier": - "t_mapping$_t_uint256_$_t_struct$_Bid_$38_storage_$", - "typeString": - "mapping(uint256 => struct IICO.Bid storage ref)" - } - }, - "id": 568, - "indexExpression": { - "argumentTypes": null, - "id": 567, - "name": "cutOffBidID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 72, - "src": "14399:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "14394:17:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage", - "typeString": "struct IICO.Bid storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "14370:41:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 571, - "name": "finalized", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 69, - "src": "14429:9:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 570, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1030, - "src": "14421:7:0", - "typeDescriptions": { - "typeIdentifier": - "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 572, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14421:18:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 573, - "nodeType": "ExpressionStatement", - "src": "14421:18:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 577, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "14457:13:0", - "subExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 575, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 559, - "src": "14458:3:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - } - }, - "id": 576, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "redeemed", - "nodeType": "MemberAccess", - "referencedDeclaration": 37, - "src": "14458:12:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 574, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1030, - "src": "14449:7:0", - "typeDescriptions": { - "typeIdentifier": - "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 578, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14449:22:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 579, - "nodeType": "ExpressionStatement", - "src": "14449:22:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 584, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 580, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 559, - "src": "14482:3:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - } - }, - "id": 582, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "redeemed", - "nodeType": "MemberAccess", - "referencedDeclaration": 37, - "src": "14482:12:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 583, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14495:4:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "14482:17:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 585, - "nodeType": "ExpressionStatement", - "src": "14482:17:0" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 601, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 590, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 586, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 559, - "src": "14513:3:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - } - }, - "id": 587, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "maxVal", - "nodeType": "MemberAccess", - "referencedDeclaration": 27, - "src": "14513:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 588, - "name": "cutOffBid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 565, - "src": "14526:9:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - } - }, - "id": 589, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "maxVal", - "nodeType": "MemberAccess", - "referencedDeclaration": 27, - "src": "14526:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "14513:29:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 599, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 595, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 591, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 559, - "src": "14547:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": - "struct IICO.Bid storage pointer" - } - }, - "id": 592, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "maxVal", - "nodeType": "MemberAccess", - "referencedDeclaration": 27, - "src": "14547:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 593, - "name": "cutOffBid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 565, - "src": "14561:9:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": - "struct IICO.Bid storage pointer" - } - }, - "id": 594, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "maxVal", - "nodeType": "MemberAccess", - "referencedDeclaration": 27, - "src": "14561:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "14547:30:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 598, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 596, - "name": "_bidID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 555, - "src": "14581:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 597, - "name": "cutOffBidID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 72, - "src": "14591:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "14581:21:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "14547:55:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 600, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "14546:57:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "14513:90:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 631, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 559, - "src": "14963:3:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - } - }, - "id": 632, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "contrib", - "nodeType": "MemberAccess", - "referencedDeclaration": 29, - "src": "14963:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 626, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 559, - "src": "14938:3:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - } - }, - "id": 629, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "contributor", - "nodeType": "MemberAccess", - "referencedDeclaration": 33, - "src": "14938:15:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 630, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transfer", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "14938:24:0", - "typeDescriptions": { - "typeIdentifier": - "t_function_transfer_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 633, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14938:37:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 634, - "nodeType": "ExpressionStatement", - "src": "14938:37:0" - }, - "id": 635, - "nodeType": "IfStatement", - "src": "14509:466:0", - "trueBody": { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 605, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 559, - "src": "14671:3:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - } - }, - "id": 606, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "contributor", - "nodeType": "MemberAccess", - "referencedDeclaration": 33, - "src": "14671:15:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 623, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 620, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 607, - "name": "tokensForSale", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 62, - "src": "14689:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 618, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 608, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 559, - "src": "14706:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": - "struct IICO.Bid storage pointer" - } - }, - "id": 609, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "contrib", - "nodeType": "MemberAccess", - "referencedDeclaration": 29, - "src": "14706:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 617, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 614, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 610, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 559, - "src": "14721:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": - "struct IICO.Bid storage pointer" - } - }, - "id": 611, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "contrib", - "nodeType": "MemberAccess", - "referencedDeclaration": 29, - "src": "14721:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 612, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 559, - "src": "14735:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": - "struct IICO.Bid storage pointer" - } - }, - "id": 613, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "bonus", - "nodeType": "MemberAccess", - "referencedDeclaration": 31, - "src": "14735:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "14721:23:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 615, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "14720:25:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 616, - "name": "BONUS_DIVISOR", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 67, - "src": "14748:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "14720:41:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "14706:55:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 619, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "14705:57:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "14689:73:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 621, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "14688:75:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 622, - "name": "sumAcceptedVirtualContrib", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 76, - "src": "14766:25:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "14688:103:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 602, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 60, - "src": "14656:5:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$982", - "typeString": "contract ERC20" - } - }, - "id": 604, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 1005, - "src": "14656:14:0", - "typeDescriptions": { - "typeIdentifier": - "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": - "function (address,uint256) external returns (bool)" - } - }, - "id": 624, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14656:136:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 625, - "nodeType": "ExpressionStatement", - "src": "14656:136:0" - } - } - ] - }, - "documentation": - "@dev Redeem a bid. If the bid is accepted, send the tokens, otherwise refund the ETH.\n Note that anyone can call this function, not only the party which made the bid.\n @param _bidID ID of the bid to withdraw.", - "id": 637, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "redeem", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 556, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 555, - "name": "_bidID", - "nodeType": "VariableDeclaration", - "scope": 637, - "src": "14300:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 554, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "14300:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14299:13:0" - }, - "payable": false, - "returnParameters": { - "id": 557, - "nodeType": "ParameterList", - "parameters": [], - "src": "14320:0:0" - }, - "scope": 939, - "src": "14284:698:0", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 703, - "nodeType": "Block", - "src": "15211:632:0", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 651, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 647, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 643, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 640, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1027, - "src": "15225:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 641, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15225:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 642, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15238:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "15225:14:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 646, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 644, - "name": "now", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1029, - "src": "15243:3:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 645, - "name": "startTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 52, - "src": "15250:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "15243:16:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "15225:34:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 650, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 648, - "name": "now", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1029, - "src": "15263:3:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 649, - "name": "endTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 58, - "src": "15269:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "15263:13:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "15225:51:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 662, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 660, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 657, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1027, - "src": "15394:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 658, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15394:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 659, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15407:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "15394:14:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "id": 661, - "name": "finalized", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 69, - "src": "15412:9:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "15394:27:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 701, - "nodeType": "IfStatement", - "src": "15390:446:0", - "trueBody": { - "body": { - "condition": { - "argumentTypes": null, - "id": 686, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "15600:48:0", - "subExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 677, - "name": "bids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 42, - "src": "15601:4:0", - "typeDescriptions": { - "typeIdentifier": - "t_mapping$_t_uint256_$_t_struct$_Bid_$38_storage_$", - "typeString": - "mapping(uint256 => struct IICO.Bid storage ref)" - } - }, - "id": 684, - "indexExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 678, - "name": "contributorBidIDs", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 47, - "src": "15606:17:0", - "typeDescriptions": { - "typeIdentifier": - "t_mapping$_t_address_$_t_array$_t_uint256_$dyn_storage_$", - "typeString": - "mapping(address => uint256[] storage ref)" - } - }, - "id": 681, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 679, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1027, - "src": "15624:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 680, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15624:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "15606:29:0", - "typeDescriptions": { - "typeIdentifier": - "t_array$_t_uint256_$dyn_storage", - "typeString": "uint256[] storage ref" - } - }, - "id": 683, - "indexExpression": { - "argumentTypes": null, - "id": 682, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 664, - "src": "15636:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "15606:32:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "15601:38:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage", - "typeString": "struct IICO.Bid storage ref" - } - }, - "id": 685, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "redeemed", - "nodeType": "MemberAccess", - "referencedDeclaration": 37, - "src": "15601:47:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 696, - "name": "revert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1031, - "src": "15828:6:0", - "typeDescriptions": { - "typeIdentifier": - "t_function_revert_pure$__$returns$__$", - "typeString": "function () pure" - } - }, - "id": 697, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15828:8:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 698, - "nodeType": "ExpressionStatement", - "src": "15828:8:0" - }, - "id": 699, - "nodeType": "IfStatement", - "src": "15596:240:0", - "trueBody": { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 688, - "name": "contributorBidIDs", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 47, - "src": "15677:17:0", - "typeDescriptions": { - "typeIdentifier": - "t_mapping$_t_address_$_t_array$_t_uint256_$dyn_storage_$", - "typeString": - "mapping(address => uint256[] storage ref)" - } - }, - "id": 691, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 689, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1027, - "src": "15695:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 690, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15695:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "15677:29:0", - "typeDescriptions": { - "typeIdentifier": - "t_array$_t_uint256_$dyn_storage", - "typeString": "uint256[] storage ref" - } - }, - "id": 693, - "indexExpression": { - "argumentTypes": null, - "id": 692, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 664, - "src": "15707:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "15677:32:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 687, - "name": "redeem", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 637, - "src": "15670:6:0", - "typeDescriptions": { - "typeIdentifier": - "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 694, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15670:40:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 695, - "nodeType": "ExpressionStatement", - "src": "15670:40:0" - } - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 673, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 667, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 664, - "src": "15533:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 668, - "name": "contributorBidIDs", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 47, - "src": "15537:17:0", - "typeDescriptions": { - "typeIdentifier": - "t_mapping$_t_address_$_t_array$_t_uint256_$dyn_storage_$", - "typeString": - "mapping(address => uint256[] storage ref)" - } - }, - "id": 671, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 669, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1027, - "src": "15555:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 670, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15555:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "15537:29:0", - "typeDescriptions": { - "typeIdentifier": - "t_array$_t_uint256_$dyn_storage", - "typeString": "uint256[] storage ref" - } - }, - "id": 672, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15537:36:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "15533:40:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 700, - "initializationExpression": { - "assignments": [664], - "declarations": [ - { - "constant": false, - "id": 664, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 704, - "src": "15521:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 663, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "15521:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 666, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 665, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15530:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "15521:10:0" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 675, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": true, - "src": "15575:3:0", - "subExpression": { - "argumentTypes": null, - "id": 674, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 664, - "src": "15577:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 676, - "nodeType": "ExpressionStatement", - "src": "15575:3:0" - }, - "nodeType": "ForStatement", - "src": "15516:320:0" - } - }, - "id": 702, - "nodeType": "IfStatement", - "src": "15221:615:0", - "trueBody": { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 653, - "name": "INFINITY", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 21, - "src": "15360:8:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 654, - "name": "TAIL", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15, - "src": "15370:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 652, - "name": "submitBid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 283, - "src": "15350:9:0", - "typeDescriptions": { - "typeIdentifier": - "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (uint256,uint256)" - } - }, - "id": 655, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15350:25:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 656, - "nodeType": "ExpressionStatement", - "src": "15350:25:0" - } - } - ] - }, - "documentation": - "@dev Fallback. Make a bid if ETH are sent. Redeem all the bids of the contributor otherwise.\n This allows users to bid and get their tokens back using only send operations.", - "id": 704, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 638, - "nodeType": "ParameterList", - "parameters": [], - "src": "15193:2:0" - }, - "payable": true, - "returnParameters": { - "id": 639, - "nodeType": "ParameterList", - "parameters": [], - "src": "15211:0:0" - }, - "scope": 939, - "src": "15184:659:0", - "stateMutability": "payable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 766, - "nodeType": "Block", - "src": "16489:759:0", - "statements": [ - { - "assignments": [714], - "declarations": [ - { - "constant": false, - "id": 714, - "name": "next", - "nodeType": "VariableDeclaration", - "scope": 767, - "src": "16499:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 713, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "16499:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 716, - "initialValue": { - "argumentTypes": null, - "id": 715, - "name": "_nextStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 708, - "src": "16511:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "16499:22:0" - }, - { - "assignments": [], - "declarations": [ - { - "constant": false, - "id": 718, - "name": "found", - "nodeType": "VariableDeclaration", - "scope": 767, - "src": "16531:10:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 717, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "16531:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 719, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "16531:10:0" - }, - { - "body": { - "id": 762, - "nodeType": "Block", - "src": "16566:654:0", - "statements": [ - { - "assignments": [723], - "declarations": [ - { - "constant": false, - "id": 723, - "name": "nextBid", - "nodeType": "VariableDeclaration", - "scope": 767, - "src": "16623:19:0", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - }, - "typeName": { - "contractScope": null, - "id": 722, - "name": "Bid", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 38, - "src": "16623:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 727, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 724, - "name": "bids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 42, - "src": "16645:4:0", - "typeDescriptions": { - "typeIdentifier": - "t_mapping$_t_uint256_$_t_struct$_Bid_$38_storage_$", - "typeString": - "mapping(uint256 => struct IICO.Bid storage ref)" - } - }, - "id": 726, - "indexExpression": { - "argumentTypes": null, - "id": 725, - "name": "next", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 714, - "src": "16650:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "16645:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage", - "typeString": "struct IICO.Bid storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "16623:32:0" - }, - { - "assignments": [729], - "declarations": [ - { - "constant": false, - "id": 729, - "name": "prev", - "nodeType": "VariableDeclaration", - "scope": 767, - "src": "16669:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 728, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "16669:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 732, - "initialValue": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 730, - "name": "nextBid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 723, - "src": "16681:7:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - } - }, - "id": 731, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "prev", - "nodeType": "MemberAccess", - "referencedDeclaration": 23, - "src": "16681:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "16669:24:0" - }, - { - "assignments": [734], - "declarations": [ - { - "constant": false, - "id": 734, - "name": "prevBid", - "nodeType": "VariableDeclaration", - "scope": 767, - "src": "16707:19:0", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - }, - "typeName": { - "contractScope": null, - "id": 733, - "name": "Bid", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 38, - "src": "16707:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 738, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 735, - "name": "bids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 42, - "src": "16729:4:0", - "typeDescriptions": { - "typeIdentifier": - "t_mapping$_t_uint256_$_t_struct$_Bid_$38_storage_$", - "typeString": - "mapping(uint256 => struct IICO.Bid storage ref)" - } - }, - "id": 737, - "indexExpression": { - "argumentTypes": null, - "id": 736, - "name": "prev", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 729, - "src": "16734:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "16729:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage", - "typeString": "struct IICO.Bid storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "16707:32:0" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 742, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 739, - "name": "_maxVal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 706, - "src": "16758:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 740, - "name": "prevBid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 734, - "src": "16768:7:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - } - }, - "id": 741, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "maxVal", - "nodeType": "MemberAccess", - "referencedDeclaration": 27, - "src": "16768:14:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16758:24:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 750, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 747, - "name": "_maxVal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 706, - "src": "16873:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 748, - "name": "nextBid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 723, - "src": "16884:7:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": - "struct IICO.Bid storage pointer" - } - }, - "id": 749, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "maxVal", - "nodeType": "MemberAccess", - "referencedDeclaration": 27, - "src": "16884:14:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16873:25:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "expression": { - "argumentTypes": null, - "id": 758, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 756, - "name": "found", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 718, - "src": "17197:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 757, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17205:4:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "17197:12:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 759, - "nodeType": "ExpressionStatement", - "src": "17197:12:0" - }, - "id": 760, - "nodeType": "IfStatement", - "src": "16869:340:0", - "trueBody": { - "expression": { - "argumentTypes": null, - "id": 754, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 751, - "name": "next", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 714, - "src": "17079:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 752, - "name": "nextBid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 723, - "src": "17086:7:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": - "struct IICO.Bid storage pointer" - } - }, - "id": 753, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "next", - "nodeType": "MemberAccess", - "referencedDeclaration": 25, - "src": "17086:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "17079:19:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 755, - "nodeType": "ExpressionStatement", - "src": "17079:19:0" - } - }, - "id": 761, - "nodeType": "IfStatement", - "src": "16754:455:0", - "trueBody": { - "expression": { - "argumentTypes": null, - "id": 745, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 743, - "name": "next", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 714, - "src": "16839:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 744, - "name": "prev", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 729, - "src": "16846:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16839:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 746, - "nodeType": "ExpressionStatement", - "src": "16839:11:0" - } - } - ] - }, - "condition": { - "argumentTypes": null, - "id": 721, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "16558:6:0", - "subExpression": { - "argumentTypes": null, - "id": 720, - "name": "found", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 718, - "src": "16559:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 763, - "nodeType": "WhileStatement", - "src": "16552:668:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 764, - "name": "next", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 714, - "src": "17237:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 712, - "id": 765, - "nodeType": "Return", - "src": "17230:11:0" - } - ] - }, - "documentation": - "@dev Search for the correct insertion spot of a bid.\n This function is O(n), where n is the amount of bids between the initial search position and the insertion position.\n @param _maxVal The maximum valuation given by the contributor. Or INFINITY if no maximum valuation is given.\n @param _nextStart The bidID of the next bid from the initial position to start the search from.\n @return nextInsert The bidID of the next bid from the position the bid must be inserted at.", - "id": 767, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "search", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 709, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 706, - "name": "_maxVal", - "nodeType": "VariableDeclaration", - "scope": 767, - "src": "16417:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 705, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "16417:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 708, - "name": "_nextStart", - "nodeType": "VariableDeclaration", - "scope": 767, - "src": "16431:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 707, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "16431:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16416:31:0" - }, - "payable": false, - "returnParameters": { - "id": 712, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 711, - "name": "nextInsert", - "nodeType": "VariableDeclaration", - "scope": 767, - "src": "16472:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 710, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "16472:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16471:17:0" - }, - "scope": 939, - "src": "16401:847:0", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 797, - "nodeType": "Block", - "src": "17567:366:0", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 774, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 772, - "name": "now", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1029, - "src": "17581:3:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 773, - "name": "endFullBonusTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 54, - "src": "17587:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "17581:22:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 779, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 777, - "name": "now", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1029, - "src": "17666:3:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 778, - "name": "endTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 58, - "src": "17672:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "17666:13:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 793, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 787, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 782, - "name": "maxBonus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 64, - "src": "17868:8:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 785, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 783, - "name": "endTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 58, - "src": "17880:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 784, - "name": "now", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1029, - "src": "17890:3:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "17880:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 786, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "17879:15:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "17868:26:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 788, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "17867:28:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 791, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 789, - "name": "endTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 58, - "src": "17899:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 790, - "name": "endFullBonusTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 54, - "src": "17909:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "17899:26:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 792, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "17898:28:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "17867:59:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 771, - "id": 794, - "nodeType": "Return", - "src": "17860:66:0" - }, - "id": 795, - "nodeType": "IfStatement", - "src": "17662:264:0", - "trueBody": { - "expression": { - "argumentTypes": null, - "hexValue": "30", - "id": 780, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17734:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "functionReturnParameters": 771, - "id": 781, - "nodeType": "Return", - "src": "17727:8:0" - } - }, - "id": 796, - "nodeType": "IfStatement", - "src": "17577:349:0", - "trueBody": { - "expression": { - "argumentTypes": null, - "id": 775, - "name": "maxBonus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 64, - "src": "17639:8:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 771, - "id": 776, - "nodeType": "Return", - "src": "17632:15:0" - } - } - ] - }, - "documentation": - "@dev Return the current bonus. The bonus only changes in 1/BONUS_DIVISOR increments.\n @return b The bonus expressed in 1/BONUS_DIVISOR. Will be normalized by BONUS_DIVISOR. For example for a 20% bonus, _maxBonus must be 0.2 * BONUS_DIVISOR.", - "id": 798, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "bonus", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 768, - "nodeType": "ParameterList", - "parameters": [], - "src": "17532:2:0" - }, - "payable": false, - "returnParameters": { - "id": 771, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 770, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 798, - "src": "17559:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 769, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "17559:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17558:8:0" - }, - "scope": 939, - "src": "17518:415:0", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 830, - "nodeType": "Block", - "src": "18495:159:0", - "statements": [ - { - "body": { - "expression": { - "argumentTypes": null, - "id": 827, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 818, - "name": "contribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 803, - "src": "18583:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 819, - "name": "bids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 42, - "src": "18599:4:0", - "typeDescriptions": { - "typeIdentifier": - "t_mapping$_t_uint256_$_t_struct$_Bid_$38_storage_$", - "typeString": - "mapping(uint256 => struct IICO.Bid storage ref)" - } - }, - "id": 825, - "indexExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 820, - "name": "contributorBidIDs", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 47, - "src": "18604:17:0", - "typeDescriptions": { - "typeIdentifier": - "t_mapping$_t_address_$_t_array$_t_uint256_$dyn_storage_$", - "typeString": - "mapping(address => uint256[] storage ref)" - } - }, - "id": 822, - "indexExpression": { - "argumentTypes": null, - "id": 821, - "name": "_contributor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 800, - "src": "18622:12:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "18604:31:0", - "typeDescriptions": { - "typeIdentifier": - "t_array$_t_uint256_$dyn_storage", - "typeString": "uint256[] storage ref" - } - }, - "id": 824, - "indexExpression": { - "argumentTypes": null, - "id": 823, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 806, - "src": "18636:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "18604:34:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "18599:40:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage", - "typeString": "struct IICO.Bid storage ref" - } - }, - "id": 826, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "contrib", - "nodeType": "MemberAccess", - "referencedDeclaration": 29, - "src": "18599:48:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "18583:64:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 828, - "nodeType": "ExpressionStatement", - "src": "18583:64:0" - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 814, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 809, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 806, - "src": "18522:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 810, - "name": "contributorBidIDs", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 47, - "src": "18526:17:0", - "typeDescriptions": { - "typeIdentifier": - "t_mapping$_t_address_$_t_array$_t_uint256_$dyn_storage_$", - "typeString": - "mapping(address => uint256[] storage ref)" - } - }, - "id": 812, - "indexExpression": { - "argumentTypes": null, - "id": 811, - "name": "_contributor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 800, - "src": "18544:12:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "18526:31:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage", - "typeString": "uint256[] storage ref" - } - }, - "id": 813, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18526:38:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "18522:42:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 829, - "initializationExpression": { - "assignments": [806], - "declarations": [ - { - "constant": false, - "id": 806, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 831, - "src": "18510:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 805, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "18510:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 808, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 807, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18519:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "18510:10:0" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 816, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": true, - "src": "18566:3:0", - "subExpression": { - "argumentTypes": null, - "id": 815, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 806, - "src": "18568:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 817, - "nodeType": "ExpressionStatement", - "src": "18566:3:0" - }, - "nodeType": "ForStatement", - "src": "18505:142:0" - } - ] - }, - "documentation": - "@dev Get the total contribution of an address.\n This can be used for a KYC threshold.\n This function is O(n) where n is the amount of bids made by the contributor.\n This means that the contributor can make totalContrib(contributor) revert due to an out of gas error on purpose.\n @param _contributor The contributor whose contribution will be returned.\n @return contribution The total contribution of the contributor.", - "id": 831, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "totalContrib", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 801, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 800, - "name": "_contributor", - "nodeType": "VariableDeclaration", - "scope": 831, - "src": "18429:20:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 799, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18429:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18428:22:0" - }, - "payable": false, - "returnParameters": { - "id": 804, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 803, - "name": "contribution", - "nodeType": "VariableDeclaration", - "scope": 831, - "src": "18476:17:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 802, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "18476:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18475:19:0" - }, - "scope": 939, - "src": "18407:247:0", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 937, - "nodeType": "Block", - "src": "18993:1095:0", - "statements": [ - { - "assignments": [845], - "declarations": [ - { - "constant": false, - "id": 845, - "name": "localCutOffBidID", - "nodeType": "VariableDeclaration", - "scope": 938, - "src": "19003:21:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 844, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "19003:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 850, - "initialValue": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 846, - "name": "bids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 42, - "src": "19027:4:0", - "typeDescriptions": { - "typeIdentifier": - "t_mapping$_t_uint256_$_t_struct$_Bid_$38_storage_$", - "typeString": - "mapping(uint256 => struct IICO.Bid storage ref)" - } - }, - "id": 848, - "indexExpression": { - "argumentTypes": null, - "id": 847, - "name": "TAIL", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15, - "src": "19032:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "19027:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage", - "typeString": "struct IICO.Bid storage ref" - } - }, - "id": 849, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "prev", - "nodeType": "MemberAccess", - "referencedDeclaration": 23, - "src": "19027:15:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "19003:39:0" - }, - { - "body": { - "id": 924, - "nodeType": "Block", - "src": "19146:838:0", - "statements": [ - { - "assignments": [855], - "declarations": [ - { - "constant": false, - "id": 855, - "name": "bid", - "nodeType": "VariableDeclaration", - "scope": 938, - "src": "19160:15:0", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - }, - "typeName": { - "contractScope": null, - "id": 854, - "name": "Bid", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 38, - "src": "19160:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 859, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 856, - "name": "bids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 42, - "src": "19178:4:0", - "typeDescriptions": { - "typeIdentifier": - "t_mapping$_t_uint256_$_t_struct$_Bid_$38_storage_$", - "typeString": - "mapping(uint256 => struct IICO.Bid storage ref)" - } - }, - "id": 858, - "indexExpression": { - "argumentTypes": null, - "id": 857, - "name": "localCutOffBidID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 845, - "src": "19183:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "19178:22:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage", - "typeString": "struct IICO.Bid storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "19160:40:0" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 866, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 863, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 860, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 855, - "src": "19218:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": - "struct IICO.Bid storage pointer" - } - }, - "id": 861, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "contrib", - "nodeType": "MemberAccess", - "referencedDeclaration": 29, - "src": "19218:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 862, - "name": "valuation", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 834, - "src": "19232:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "19218:23:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 864, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 855, - "src": "19244:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": "struct IICO.Bid storage pointer" - } - }, - "id": 865, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "maxVal", - "nodeType": "MemberAccess", - "referencedDeclaration": 27, - "src": "19244:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "19218:36:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 922, - "nodeType": "Block", - "src": "19521:453:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 903, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 892, - "name": "cutOffBidContrib", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 842, - "src": "19602:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 896, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 893, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 855, - "src": "19621:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": - "struct IICO.Bid storage pointer" - } - }, - "id": 894, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "maxVal", - "nodeType": "MemberAccess", - "referencedDeclaration": 27, - "src": "19621:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 895, - "name": "valuation", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 834, - "src": "19635:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "19621:23:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 901, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19672:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "id": 902, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "19621:52:0", - "trueExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 900, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 897, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 855, - "src": "19647:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": - "struct IICO.Bid storage pointer" - } - }, - "id": 898, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "maxVal", - "nodeType": "MemberAccess", - "referencedDeclaration": 27, - "src": "19647:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 899, - "name": "valuation", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 834, - "src": "19660:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "19647:22:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "19602:71:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 904, - "nodeType": "ExpressionStatement", - "src": "19602:71:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 907, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 905, - "name": "valuation", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 834, - "src": "19804:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "id": 906, - "name": "cutOffBidContrib", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 842, - "src": "19817:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "19804:29:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 908, - "nodeType": "ExpressionStatement", - "src": "19804:29:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 919, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 909, - "name": "virtualValuation", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 836, - "src": "19851:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 918, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 910, - "name": "cutOffBidContrib", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 842, - "src": "19871:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 917, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 914, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 911, - "name": "cutOffBidContrib", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 842, - "src": "19891:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 912, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 855, - "src": "19910:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": - "struct IICO.Bid storage pointer" - } - }, - "id": 913, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "bonus", - "nodeType": "MemberAccess", - "referencedDeclaration": 31, - "src": "19910:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "19891:28:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 915, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "19890:30:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 916, - "name": "BONUS_DIVISOR", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 67, - "src": "19923:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "19890:46:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "19871:65:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "19851:85:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 920, - "nodeType": "ExpressionStatement", - "src": "19851:85:0" - }, - { - "id": 921, - "nodeType": "Break", - "src": "19954:5:0" - } - ] - }, - "id": 923, - "nodeType": "IfStatement", - "src": "19214:760:0", - "trueBody": { - "id": 891, - "nodeType": "Block", - "src": "19256:259:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 870, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 867, - "name": "valuation", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 834, - "src": "19311:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 868, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 855, - "src": "19324:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": - "struct IICO.Bid storage pointer" - } - }, - "id": 869, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "contrib", - "nodeType": "MemberAccess", - "referencedDeclaration": 29, - "src": "19324:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "19311:24:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 871, - "nodeType": "ExpressionStatement", - "src": "19311:24:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 884, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 872, - "name": "virtualValuation", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 836, - "src": "19353:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 883, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 873, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 855, - "src": "19373:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": - "struct IICO.Bid storage pointer" - } - }, - "id": 874, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "contrib", - "nodeType": "MemberAccess", - "referencedDeclaration": 29, - "src": "19373:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 882, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 879, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 875, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 855, - "src": "19388:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": - "struct IICO.Bid storage pointer" - } - }, - "id": 876, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "contrib", - "nodeType": "MemberAccess", - "referencedDeclaration": 29, - "src": "19388:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 877, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 855, - "src": "19402:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": - "struct IICO.Bid storage pointer" - } - }, - "id": 878, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "bonus", - "nodeType": "MemberAccess", - "referencedDeclaration": 31, - "src": "19402:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "19388:23:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 880, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "19387:25:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 881, - "name": "BONUS_DIVISOR", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 67, - "src": "19415:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "19387:41:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "19373:55:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "19353:75:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 885, - "nodeType": "ExpressionStatement", - "src": "19353:75:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 889, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 886, - "name": "localCutOffBidID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 845, - "src": "19446:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 887, - "name": "bid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 855, - "src": "19465:3:0", - "typeDescriptions": { - "typeIdentifier": - "t_struct$_Bid_$38_storage_ptr", - "typeString": - "struct IICO.Bid storage pointer" - } - }, - "id": 888, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "prev", - "nodeType": "MemberAccess", - "referencedDeclaration": 23, - "src": "19465:8:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "19446:27:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 890, - "nodeType": "ExpressionStatement", - "src": "19446:27:0" - } - ] + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4356:33:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 1155, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4390:5:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "4356:39:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" } - ] + }, + "id": 1157, + "nodeType": "ExpressionStatement", + "src": "4356:39:1" }, "condition": { "argumentTypes": null, @@ -25142,359 +5646,603 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 853, + "id": 1146, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 851, - "name": "localCutOffBidID", + "id": 1143, + "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 845, - "src": "19120:16:0", + "referencedDeclaration": 1140, + "src": "4314:1:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", - "operator": "!=", + "operator": "<", "rightExpression": { "argumentTypes": null, - "id": 852, - "name": "HEAD", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9, - "src": "19140:4:0", + "expression": { + "argumentTypes": null, + "id": 1144, + "name": "_buyersToRemove", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1134, + "src": "4316:15:1", + "typeDescriptions": { + "typeIdentifier": + "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 1145, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4316:22:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4314:24:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1158, + "initializationExpression": { + "assignments": [1140], + "declarations": [ + { + "constant": false, + "id": 1140, + "name": "i", + "nodeType": "VariableDeclaration", + "scope": 1160, + "src": "4305:6:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1139, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4305:4:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1142, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 1141, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4312:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "4305:8:1" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 1148, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": true, + "src": "4339:3:1", + "subExpression": { + "argumentTypes": null, + "id": 1147, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1140, + "src": "4341:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "19120:24:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } + "id": 1149, + "nodeType": "ExpressionStatement", + "src": "4339:3:1" + }, + "nodeType": "ForStatement", + "src": "4301:94:1" + } + ] + }, + "documentation": + "@dev Remove buyers from the base whitelist.\n @param _buyersToRemove Buyers to remove from the whitelist.", + "id": 1160, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 1137, + "modifierName": { + "argumentTypes": null, + "id": 1136, + "name": "onlyWhitelister", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 992, + "src": "4275:15:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "4275:15:1" + } + ], + "name": "removeBaseWhitelist", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1135, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1134, + "name": "_buyersToRemove", + "nodeType": "VariableDeclaration", + "scope": 1160, + "src": "4241:25:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 1132, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4241:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1133, + "length": null, + "nodeType": "ArrayTypeName", + "src": "4241:9:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4240:27:1" + }, + "payable": false, + "returnParameters": { + "id": 1138, + "nodeType": "ParameterList", + "parameters": [], + "src": "4291:0:1" + }, + "scope": 1190, + "src": "4212:190:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1188, + "nodeType": "Block", + "src": "4631:117:1", + "statements": [ + { + "body": { + "expression": { + "argumentTypes": null, + "id": 1185, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1179, + "name": "reinforcedWhitelist", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 979, + "src": "4696:19:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 1183, + "indexExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1180, + "name": "_buyersToRemove", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1163, + "src": "4716:15:1", + "typeDescriptions": { + "typeIdentifier": + "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 1182, + "indexExpression": { + "argumentTypes": null, + "id": 1181, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1169, + "src": "4732:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4716:18:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4696:39:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 1184, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4736:5:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "4696:45:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1186, + "nodeType": "ExpressionStatement", + "src": "4696:45:1" }, - "id": 925, - "nodeType": "WhileStatement", - "src": "19113:871:0" - }, - { - "expression": { + "condition": { "argumentTypes": null, - "id": 931, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1175, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "leftHandSide": { + "leftExpression": { "argumentTypes": null, - "id": 926, - "name": "cutOffBidMaxVal", + "id": 1172, + "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 840, - "src": "19994:15:0", + "referencedDeclaration": 1169, + "src": "4654:1:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 927, - "name": "bids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 42, - "src": "20012:4:0", - "typeDescriptions": { - "typeIdentifier": - "t_mapping$_t_uint256_$_t_struct$_Bid_$38_storage_$", - "typeString": - "mapping(uint256 => struct IICO.Bid storage ref)" - } - }, - "id": 929, - "indexExpression": { - "argumentTypes": null, - "id": 928, - "name": "localCutOffBidID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 845, - "src": "20017:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "20012:22:0", + "id": 1173, + "name": "_buyersToRemove", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1163, + "src": "4656:15:1", "typeDescriptions": { - "typeIdentifier": "t_struct$_Bid_$38_storage", - "typeString": "struct IICO.Bid storage ref" + "typeIdentifier": + "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" } }, - "id": 930, + "id": 1174, "isConstant": false, - "isLValue": true, + "isLValue": false, "isPure": false, "lValueRequested": false, - "memberName": "maxVal", + "memberName": "length", "nodeType": "MemberAccess", - "referencedDeclaration": 27, - "src": "20012:29:0", + "referencedDeclaration": null, + "src": "4656:22:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "19994:47:0", + "src": "4654:24:1", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_bool", + "typeString": "bool" } }, - "id": 932, - "nodeType": "ExpressionStatement", - "src": "19994:47:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 935, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { + "id": 1187, + "initializationExpression": { + "assignments": [1169], + "declarations": [ + { + "constant": false, + "id": 1169, + "name": "i", + "nodeType": "VariableDeclaration", + "scope": 1189, + "src": "4645:6:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1168, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4645:4:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1171, + "initialValue": { "argumentTypes": null, - "id": 933, - "name": "cutOffBidID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 838, - "src": "20051:11:0", + "hexValue": "30", + "id": 1170, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4652:1:1", + "subdenomination": null, "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { + "nodeType": "VariableDeclarationStatement", + "src": "4645:8:1" + }, + "loopExpression": { + "expression": { "argumentTypes": null, - "id": 934, - "name": "localCutOffBidID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 845, - "src": "20065:16:0", + "id": 1177, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": true, + "src": "4679:3:1", + "subExpression": { + "argumentTypes": null, + "id": 1176, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1169, + "src": "4681:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "20051:30:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } + "id": 1178, + "nodeType": "ExpressionStatement", + "src": "4679:3:1" }, - "id": 936, - "nodeType": "ExpressionStatement", - "src": "20051:30:0" + "nodeType": "ForStatement", + "src": "4641:100:1" } ] }, "documentation": - "@dev Get the current valuation and cut off bid's details.\n@return The current valuation and cut off bid's details.", - "id": 938, + "@dev Remove buyers from the reinforced whitelist.\n @param _buyersToRemove Buyers to remove from the whitelist.", + "id": 1189, "implemented": true, "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "valuationAndCutOff", + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 1166, + "modifierName": { + "argumentTypes": null, + "id": 1165, + "name": "onlyWhitelister", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 992, + "src": "4615:15:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "4615:15:1" + } + ], + "name": "removeReinforcedWhitelist", "nodeType": "FunctionDefinition", "parameters": { - "id": 832, - "nodeType": "ParameterList", - "parameters": [], - "src": "18867:2:0" - }, - "payable": false, - "returnParameters": { - "id": 843, + "id": 1164, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 834, - "name": "valuation", - "nodeType": "VariableDeclaration", - "scope": 938, - "src": "18891:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 833, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "18891:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 836, - "name": "virtualValuation", - "nodeType": "VariableDeclaration", - "scope": 938, - "src": "18907:21:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 835, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "18907:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 838, - "name": "cutOffBidID", - "nodeType": "VariableDeclaration", - "scope": 938, - "src": "18930:16:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 837, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "18930:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 840, - "name": "cutOffBidMaxVal", - "nodeType": "VariableDeclaration", - "scope": 938, - "src": "18948:20:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 839, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "18948:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 842, - "name": "cutOffBidContrib", + "id": 1163, + "name": "_buyersToRemove", "nodeType": "VariableDeclaration", - "scope": 938, - "src": "18970:21:0", + "scope": 1189, + "src": "4581:25:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" }, "typeName": { - "id": 841, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "18970:4:0", + "baseType": { + "id": 1161, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4581:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1162, + "length": null, + "nodeType": "ArrayTypeName", + "src": "4581:9:1", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" } }, "value": null, "visibility": "internal" } ], - "src": "18890:102:0" + "src": "4580:27:1" + }, + "payable": false, + "returnParameters": { + "id": 1167, + "nodeType": "ParameterList", + "parameters": [], + "src": "4631:0:1" }, - "scope": 939, - "src": "18840:1248:0", - "stateMutability": "view", + "scope": 1190, + "src": "4546:202:1", + "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" } ], - "scope": 940, - "src": "1999:18091:0" + "scope": 1191, + "src": "401:4350:1" } ], - "src": "95:19996:0" + "src": "113:4639:1" }, "compiler": { "name": "solc", - "version": "0.4.21+commit.dfe3193c.Emscripten.clang" + "version": "0.4.23+commit.124ca40d.Emscripten.clang" }, "networks": {}, "schemaVersion": "2.0.0", - "updatedAt": "2018-04-23T21:48:18.480Z" + "updatedAt": "2018-05-11T00:52:53.475Z" } diff --git a/src/assets/contracts/Token.json b/src/assets/contracts/Token.json new file mode 100644 index 0000000..1288744 --- /dev/null +++ b/src/assets/contracts/Token.json @@ -0,0 +1,2697 @@ +{ + "contractName": "MintableToken", + "abi": [ + { + "constant": true, + "inputs": [], + "name": "mintingFinished", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_spender", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_from", + "type": "address" + }, + { + "name": "_to", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_spender", + "type": "address" + }, + { + "name": "_subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseApproval", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "name": "balance", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "owner", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_to", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_spender", + "type": "address" + }, + { + "name": "_addedValue", + "type": "uint256" + } + ], + "name": "increaseApproval", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_owner", + "type": "address" + }, + { + "name": "_spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "to", + "type": "address" + }, + { + "indexed": false, + "name": "amount", + "type": "uint256" + } + ], + "name": "Mint", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "MintFinished", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "from", + "type": "address" + }, + { + "indexed": true, + "name": "to", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "constant": false, + "inputs": [ + { + "name": "_to", + "type": "address" + }, + { + "name": "_amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "finishMinting", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": + "0x60806040526000600360146101000a81548160ff02191690831515021790555033600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061160c8061006f6000396000f3006080604052600436106100c5576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806305d2035b146100ca578063095ea7b3146100f957806318160ddd1461015e57806323b872dd1461018957806340c10f191461020e578063661884631461027357806370a08231146102d85780637d64bcb41461032f5780638da5cb5b1461035e578063a9059cbb146103b5578063d73dd6231461041a578063dd62ed3e1461047f578063f2fde38b146104f6575b600080fd5b3480156100d657600080fd5b506100df610539565b604051808215151515815260200191505060405180910390f35b34801561010557600080fd5b50610144600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061054c565b604051808215151515815260200191505060405180910390f35b34801561016a57600080fd5b5061017361063e565b6040518082815260200191505060405180910390f35b34801561019557600080fd5b506101f4600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610648565b604051808215151515815260200191505060405180910390f35b34801561021a57600080fd5b50610259600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610a02565b604051808215151515815260200191505060405180910390f35b34801561027f57600080fd5b506102be600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610be8565b604051808215151515815260200191505060405180910390f35b3480156102e457600080fd5b50610319600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e79565b6040518082815260200191505060405180910390f35b34801561033b57600080fd5b50610344610ec1565b604051808215151515815260200191505060405180910390f35b34801561036a57600080fd5b50610373610f89565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156103c157600080fd5b50610400600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610faf565b604051808215151515815260200191505060405180910390f35b34801561042657600080fd5b50610465600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506111ce565b604051808215151515815260200191505060405180910390f35b34801561048b57600080fd5b506104e0600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506113ca565b6040518082815260200191505060405180910390f35b34801561050257600080fd5b50610537600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611451565b005b600360149054906101000a900460ff1681565b600081600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b6000600154905090565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415151561068557600080fd5b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482111515156106d257600080fd5b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561075d57600080fd5b6107ae826000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115a990919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610841826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115c290919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061091282600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115a990919063ffffffff16565b600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610a6057600080fd5b600360149054906101000a900460ff16151515610a7c57600080fd5b610a91826001546115c290919063ffffffff16565b600181905550610ae8826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115c290919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff167f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885836040518082815260200191505060405180910390a28273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b600080600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905080831115610cf9576000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610d8d565b610d0c83826115a990919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610f1f57600080fd5b600360149054906101000a900460ff16151515610f3b57600080fd5b6001600360146101000a81548160ff0219169083151502179055507fae5184fba832cb2b1f702aca6117b8d265eaf03ad33eb133f19dde0f5920fa0860405160405180910390a16001905090565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515610fec57600080fd5b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561103957600080fd5b61108a826000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115a990919063ffffffff16565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061111d826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115c290919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b600061125f82600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115c290919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156114ad57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156114e957600080fd5b8073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008282111515156115b757fe5b818303905092915050565b60008082840190508381101515156115d657fe5b80915050929150505600a165627a7a723058202affc87b319d28a512557a2d3fd8833ed34666d996368ae7155e14b193756bec0029", + "deployedBytecode": + "0x6080604052600436106100c5576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806305d2035b146100ca578063095ea7b3146100f957806318160ddd1461015e57806323b872dd1461018957806340c10f191461020e578063661884631461027357806370a08231146102d85780637d64bcb41461032f5780638da5cb5b1461035e578063a9059cbb146103b5578063d73dd6231461041a578063dd62ed3e1461047f578063f2fde38b146104f6575b600080fd5b3480156100d657600080fd5b506100df610539565b604051808215151515815260200191505060405180910390f35b34801561010557600080fd5b50610144600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061054c565b604051808215151515815260200191505060405180910390f35b34801561016a57600080fd5b5061017361063e565b6040518082815260200191505060405180910390f35b34801561019557600080fd5b506101f4600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610648565b604051808215151515815260200191505060405180910390f35b34801561021a57600080fd5b50610259600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610a02565b604051808215151515815260200191505060405180910390f35b34801561027f57600080fd5b506102be600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610be8565b604051808215151515815260200191505060405180910390f35b3480156102e457600080fd5b50610319600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e79565b6040518082815260200191505060405180910390f35b34801561033b57600080fd5b50610344610ec1565b604051808215151515815260200191505060405180910390f35b34801561036a57600080fd5b50610373610f89565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156103c157600080fd5b50610400600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610faf565b604051808215151515815260200191505060405180910390f35b34801561042657600080fd5b50610465600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506111ce565b604051808215151515815260200191505060405180910390f35b34801561048b57600080fd5b506104e0600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506113ca565b6040518082815260200191505060405180910390f35b34801561050257600080fd5b50610537600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611451565b005b600360149054906101000a900460ff1681565b600081600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b6000600154905090565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415151561068557600080fd5b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482111515156106d257600080fd5b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561075d57600080fd5b6107ae826000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115a990919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610841826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115c290919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061091282600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115a990919063ffffffff16565b600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610a6057600080fd5b600360149054906101000a900460ff16151515610a7c57600080fd5b610a91826001546115c290919063ffffffff16565b600181905550610ae8826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115c290919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff167f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885836040518082815260200191505060405180910390a28273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b600080600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905080831115610cf9576000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610d8d565b610d0c83826115a990919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610f1f57600080fd5b600360149054906101000a900460ff16151515610f3b57600080fd5b6001600360146101000a81548160ff0219169083151502179055507fae5184fba832cb2b1f702aca6117b8d265eaf03ad33eb133f19dde0f5920fa0860405160405180910390a16001905090565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515610fec57600080fd5b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561103957600080fd5b61108a826000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115a990919063ffffffff16565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061111d826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115c290919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b600061125f82600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115c290919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156114ad57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156114e957600080fd5b8073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008282111515156115b757fe5b818303905092915050565b60008082840190508381101515156115d657fe5b80915050929150505600a165627a7a723058202affc87b319d28a512557a2d3fd8833ed34666d996368ae7155e14b193756bec0029", + "sourceMap": + "386:982:8:-;;;544:5;514:35;;;;;;;;;;;;;;;;;;;;509:10:4;501:5;;:18;;;;;;;;;;;;;;;;;;386:982:8;;;;;;", + "deployedSourceMap": + "386:982:8:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;514:35;;8:9:-1;5:2;;;30:1;27;20:12;5:2;514:35:8;;;;;;;;;;;;;;;;;;;;;;;;;;;1798:183:9;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1798:183:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;371:83:5;;8:9:-1;5:2;;;30:1;27;20:12;5:2;371:83:5;;;;;;;;;;;;;;;;;;;;;;;736:439:9;;8:9:-1;5:2;;;30:1;27;20:12;5:2;736:439:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;853:264:8;;8:9:-1;5:2;;;30:1;27;20:12;5:2;853:264:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3602:398:9;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3602:398:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1189:107:5;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1189:107:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1231:135:8;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1231:135:8;;;;;;;;;;;;;;;;;;;;;;;;;;;238:20:4;;8:9:-1;5:2;;;30:1;27;20:12;5:2;238:20:4;;;;;;;;;;;;;;;;;;;;;;;;;;;608:379:5;;8:9:-1;5:2;;;30:1;27;20:12;5:2;608:379:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2883:257:9;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2883:257:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2300:126;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2300:126:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;832:169:4;;8:9:-1;5:2;;;30:1;27;20:12;5:2;832:169:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;514:35:8;;;;;;;;;;;;;:::o;1798:183:9:-;1865:4;1909:6;1877:7;:19;1885:10;1877:19;;;;;;;;;;;;;;;:29;1897:8;1877:29;;;;;;;;;;;;;;;:38;;;;1942:8;1921:38;;1930:10;1921:38;;;1952:6;1921:38;;;;;;;;;;;;;;;;;;1972:4;1965:11;;1798:183;;;;:::o;371:83:5:-;415:7;437:12;;430:19;;371:83;:::o;736:439:9:-;818:4;853:1;838:17;;:3;:17;;;;830:26;;;;;;;;880:8;:15;889:5;880:15;;;;;;;;;;;;;;;;870:6;:25;;862:34;;;;;;;;920:7;:14;928:5;920:14;;;;;;;;;;;;;;;:26;935:10;920:26;;;;;;;;;;;;;;;;910:6;:36;;902:45;;;;;;;;972:27;992:6;972:8;:15;981:5;972:15;;;;;;;;;;;;;;;;:19;;:27;;;;:::i;:::-;954:8;:15;963:5;954:15;;;;;;;;;;;;;;;:45;;;;1021:25;1039:6;1021:8;:13;1030:3;1021:13;;;;;;;;;;;;;;;;:17;;:25;;;;:::i;:::-;1005:8;:13;1014:3;1005:13;;;;;;;;;;;;;;;:41;;;;1081:38;1112:6;1081:7;:14;1089:5;1081:14;;;;;;;;;;;;;;;:26;1096:10;1081:26;;;;;;;;;;;;;;;;:30;;:38;;;;:::i;:::-;1052:7;:14;1060:5;1052:14;;;;;;;;;;;;;;;:26;1067:10;1052:26;;;;;;;;;;;;;;;:67;;;;1141:3;1125:28;;1134:5;1125:28;;;1146:6;1125:28;;;;;;;;;;;;;;;;;;1166:4;1159:11;;736:439;;;;;:::o;853:264:8:-;931:4;653:5:4;;;;;;;;;;;639:19;;:10;:19;;;631:28;;;;;;;;589:15:8;;;;;;;;;;;588:16;580:25;;;;;;;;958;975:7;958:12;;:16;;:25;;;;:::i;:::-;943:12;:40;;;;1005:26;1023:7;1005:8;:13;1014:3;1005:13;;;;;;;;;;;;;;;;:17;;:26;;;;:::i;:::-;989:8;:13;998:3;989:13;;;;;;;;;;;;;;;:42;;;;1042:3;1037:18;;;1047:7;1037:18;;;;;;;;;;;;;;;;;;1082:3;1061:34;;1078:1;1061:34;;;1087:7;1061:34;;;;;;;;;;;;;;;;;;1108:4;1101:11;;853:264;;;;:::o;3602:398:9:-;3685:4;3697:13;3713:7;:19;3721:10;3713:19;;;;;;;;;;;;;;;:29;3733:8;3713:29;;;;;;;;;;;;;;;;3697:45;;3771:8;3752:16;:27;3748:164;;;3821:1;3789:7;:19;3797:10;3789:19;;;;;;;;;;;;;;;:29;3809:8;3789:29;;;;;;;;;;;;;;;:33;;;;3748:164;;;3875:30;3888:16;3875:8;:12;;:30;;;;:::i;:::-;3843:7;:19;3851:10;3843:19;;;;;;;;;;;;;;;:29;3863:8;3843:29;;;;;;;;;;;;;;;:62;;;;3748:164;3938:8;3917:61;;3926:10;3917:61;;;3948:7;:19;3956:10;3948:19;;;;;;;;;;;;;;;:29;3968:8;3948:29;;;;;;;;;;;;;;;;3917:61;;;;;;;;;;;;;;;;;;3991:4;3984:11;;3602:398;;;;;:::o;1189:107:5:-;1245:15;1275:8;:16;1284:6;1275:16;;;;;;;;;;;;;;;;1268:23;;1189:107;;;:::o;1231:135:8:-;1290:4;653:5:4;;;;;;;;;;;639:19;;:10;:19;;;631:28;;;;;;;;589:15:8;;;;;;;;;;;588:16;580:25;;;;;;;;1320:4;1302:15;;:22;;;;;;;;;;;;;;;;;;1330:14;;;;;;;;;;1357:4;1350:11;;1231:135;:::o;238:20:4:-;;;;;;;;;;;;;:::o;608:379:5:-;671:4;706:1;691:17;;:3;:17;;;;683:26;;;;;;;;733:8;:20;742:10;733:20;;;;;;;;;;;;;;;;723:6;:30;;715:39;;;;;;;;847:32;872:6;847:8;:20;856:10;847:20;;;;;;;;;;;;;;;;:24;;:32;;;;:::i;:::-;824:8;:20;833:10;824:20;;;;;;;;;;;;;;;:55;;;;901:25;919:6;901:8;:13;910:3;901:13;;;;;;;;;;;;;;;;:17;;:25;;;;:::i;:::-;885:8;:13;894:3;885:13;;;;;;;;;;;;;;;:41;;;;953:3;932:33;;941:10;932:33;;;958:6;932:33;;;;;;;;;;;;;;;;;;978:4;971:11;;608:379;;;;:::o;2883:257:9:-;2961:4;3005:46;3039:11;3005:7;:19;3013:10;3005:19;;;;;;;;;;;;;;;:29;3025:8;3005:29;;;;;;;;;;;;;;;;:33;;:46;;;;:::i;:::-;2973:7;:19;2981:10;2973:19;;;;;;;;;;;;;;;:29;2993:8;2973:29;;;;;;;;;;;;;;;:78;;;;3078:8;3057:61;;3066:10;3057:61;;;3088:7;:19;3096:10;3088:19;;;;;;;;;;;;;;;:29;3108:8;3088:29;;;;;;;;;;;;;;;;3057:61;;;;;;;;;;;;;;;;;;3131:4;3124:11;;2883:257;;;;:::o;2300:126::-;2374:7;2396;:15;2404:6;2396:15;;;;;;;;;;;;;;;:25;2412:8;2396:25;;;;;;;;;;;;;;;;2389:32;;2300:126;;;;:::o;832:169:4:-;653:5;;;;;;;;;;;639:19;;:10;:19;;;631:28;;;;;;;;928:1;908:22;;:8;:22;;;;900:31;;;;;;;;965:8;937:37;;958:5;;;;;;;;;;;937:37;;;;;;;;;;;;988:8;980:5;;:16;;;;;;;;;;;;;;;;;;832:169;:::o;835:110:3:-;893:7;920:1;915;:6;;908:14;;;;;;939:1;935;:5;928:12;;835:110;;;;:::o;1007:129::-;1065:7;1080:9;1096:1;1092;:5;1080:17;;1115:1;1110;:6;;1103:14;;;;;;1130:1;1123:8;;1007:129;;;;;:::o", + "source": + "pragma solidity ^0.4.18;\n\nimport \"./StandardToken.sol\";\nimport \"../../ownership/Ownable.sol\";\n\n\n/**\n * @title Mintable token\n * @dev Simple ERC20 Token example, with mintable token creation\n * @dev Issue: * https://github.com/OpenZeppelin/zeppelin-solidity/issues/120\n * Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol\n */\ncontract MintableToken is StandardToken, Ownable {\n event Mint(address indexed to, uint256 amount);\n event MintFinished();\n\n bool public mintingFinished = false;\n\n\n modifier canMint() {\n require(!mintingFinished);\n _;\n }\n\n /**\n * @dev Function to mint tokens\n * @param _to The address that will receive the minted tokens.\n * @param _amount The amount of tokens to mint.\n * @return A boolean that indicates if the operation was successful.\n */\n function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) {\n totalSupply_ = totalSupply_.add(_amount);\n balances[_to] = balances[_to].add(_amount);\n Mint(_to, _amount);\n Transfer(address(0), _to, _amount);\n return true;\n }\n\n /**\n * @dev Function to stop minting new tokens.\n * @return True if the operation was successful.\n */\n function finishMinting() onlyOwner canMint public returns (bool) {\n mintingFinished = true;\n MintFinished();\n return true;\n }\n}\n", + "sourcePath": "zeppelin-solidity/contracts/token/ERC20/MintableToken.sol", + "ast": { + "absolutePath": "zeppelin-solidity/contracts/token/ERC20/MintableToken.sol", + "exportedSymbols": { + "MintableToken": [1668] + }, + "id": 1669, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1575, + "literals": ["solidity", "^", "0.4", ".18"], + "nodeType": "PragmaDirective", + "src": "0:24:8" + }, + { + "absolutePath": + "zeppelin-solidity/contracts/token/ERC20/StandardToken.sol", + "file": "./StandardToken.sol", + "id": 1576, + "nodeType": "ImportDirective", + "scope": 1669, + "sourceUnit": 1915, + "src": "26:29:8", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "zeppelin-solidity/contracts/ownership/Ownable.sol", + "file": "../../ownership/Ownable.sol", + "id": 1577, + "nodeType": "ImportDirective", + "scope": 1669, + "sourceUnit": 1403, + "src": "56:37:8", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 1578, + "name": "StandardToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1914, + "src": "412:13:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_StandardToken_$1914", + "typeString": "contract StandardToken" + } + }, + "id": 1579, + "nodeType": "InheritanceSpecifier", + "src": "412:13:8" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 1580, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1402, + "src": "427:7:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$1402", + "typeString": "contract Ownable" + } + }, + "id": 1581, + "nodeType": "InheritanceSpecifier", + "src": "427:7:8" + } + ], + "contractDependencies": [1402, 1498, 1541, 1573, 1914], + "contractKind": "contract", + "documentation": + "@title Mintable token\n@dev Simple ERC20 Token example, with mintable token creation\n@dev Issue: * https://github.com/OpenZeppelin/zeppelin-solidity/issues/120\nBased on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol", + "fullyImplemented": true, + "id": 1668, + "linearizedBaseContracts": [1668, 1402, 1914, 1498, 1541, 1573], + "name": "MintableToken", + "nodeType": "ContractDefinition", + "nodes": [ + { + "anonymous": false, + "documentation": null, + "id": 1587, + "name": "Mint", + "nodeType": "EventDefinition", + "parameters": { + "id": 1586, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1583, + "indexed": true, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1587, + "src": "450:18:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1582, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "450:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1585, + "indexed": false, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1587, + "src": "470:14:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1584, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "470:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "449:36:8" + }, + "src": "439:47:8" + }, + { + "anonymous": false, + "documentation": null, + "id": 1589, + "name": "MintFinished", + "nodeType": "EventDefinition", + "parameters": { + "id": 1588, + "nodeType": "ParameterList", + "parameters": [], + "src": "507:2:8" + }, + "src": "489:21:8" + }, + { + "constant": false, + "id": 1592, + "name": "mintingFinished", + "nodeType": "VariableDeclaration", + "scope": 1668, + "src": "514:35:8", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1590, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "514:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 1591, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "544:5:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "visibility": "public" + }, + { + "body": { + "id": 1600, + "nodeType": "Block", + "src": "574:43:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1596, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "588:16:8", + "subExpression": { + "argumentTypes": null, + "id": 1595, + "name": "mintingFinished", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1592, + "src": "589:15:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1594, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [1932, 1933], + "referencedDeclaration": 1932, + "src": "580:7:8", + "typeDescriptions": { + "typeIdentifier": + "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1597, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "580:25:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1598, + "nodeType": "ExpressionStatement", + "src": "580:25:8" + }, + { + "id": 1599, + "nodeType": "PlaceholderStatement", + "src": "611:1:8" + } + ] + }, + "documentation": null, + "id": 1601, + "name": "canMint", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 1593, + "nodeType": "ParameterList", + "parameters": [], + "src": "571:2:8" + }, + "src": "555:62:8", + "visibility": "internal" + }, + { + "body": { + "id": 1647, + "nodeType": "Block", + "src": "937:180:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1619, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1614, + "name": "totalSupply_", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1417, + "src": "943:12:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1617, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1605, + "src": "975:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1615, + "name": "totalSupply_", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1417, + "src": "958:12:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1616, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1345, + "src": "958:16:8", + "typeDescriptions": { + "typeIdentifier": + "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": + "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1618, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "958:25:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "943:40:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1620, + "nodeType": "ExpressionStatement", + "src": "943:40:8" + }, + { + "expression": { + "argumentTypes": null, + "id": 1630, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1621, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1415, + "src": "989:8:8", + "typeDescriptions": { + "typeIdentifier": + "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1623, + "indexExpression": { + "argumentTypes": null, + "id": 1622, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1603, + "src": "998:3:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "989:13:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1628, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1605, + "src": "1023:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1624, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1415, + "src": "1005:8:8", + "typeDescriptions": { + "typeIdentifier": + "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1626, + "indexExpression": { + "argumentTypes": null, + "id": 1625, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1603, + "src": "1014:3:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1005:13:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1627, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1345, + "src": "1005:17:8", + "typeDescriptions": { + "typeIdentifier": + "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": + "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1629, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1005:26:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "989:42:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1631, + "nodeType": "ExpressionStatement", + "src": "989:42:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1633, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1603, + "src": "1042:3:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1634, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1605, + "src": "1047:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1632, + "name": "Mint", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1587, + "src": "1037:4:8", + "typeDescriptions": { + "typeIdentifier": + "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 1635, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1037:18:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1636, + "nodeType": "ExpressionStatement", + "src": "1037:18:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 1639, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1078:1:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1638, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1070:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1640, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1070:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1641, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1603, + "src": "1082:3:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1642, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1605, + "src": "1087:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1637, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1572, + "src": "1061:8:8", + "typeDescriptions": { + "typeIdentifier": + "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 1643, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1061:34:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1644, + "nodeType": "ExpressionStatement", + "src": "1061:34:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1645, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1108:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 1613, + "id": 1646, + "nodeType": "Return", + "src": "1101:11:8" + } + ] + }, + "documentation": + "@dev Function to mint tokens\n@param _to The address that will receive the minted tokens.\n@param _amount The amount of tokens to mint.\n@return A boolean that indicates if the operation was successful.", + "id": 1648, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 1608, + "modifierName": { + "argumentTypes": null, + "id": 1607, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1376, + "src": "897:9:8", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "897:9:8" + }, + { + "arguments": null, + "id": 1610, + "modifierName": { + "argumentTypes": null, + "id": 1609, + "name": "canMint", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1601, + "src": "907:7:8", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "907:7:8" + } + ], + "name": "mint", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1606, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1603, + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 1648, + "src": "867:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1602, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "867:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1605, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 1648, + "src": "880:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1604, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "880:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "866:30:8" + }, + "payable": false, + "returnParameters": { + "id": 1613, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1612, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1648, + "src": "931:4:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1611, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "931:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "930:6:8" + }, + "scope": 1668, + "src": "853:264:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1666, + "nodeType": "Block", + "src": "1296:70:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1659, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1657, + "name": "mintingFinished", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1592, + "src": "1302:15:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1658, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1320:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "1302:22:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1660, + "nodeType": "ExpressionStatement", + "src": "1302:22:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1661, + "name": "MintFinished", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1589, + "src": "1330:12:8", + "typeDescriptions": { + "typeIdentifier": + "t_function_event_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 1662, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1330:14:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1663, + "nodeType": "ExpressionStatement", + "src": "1330:14:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1664, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1357:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 1656, + "id": 1665, + "nodeType": "Return", + "src": "1350:11:8" + } + ] + }, + "documentation": + "@dev Function to stop minting new tokens.\n@return True if the operation was successful.", + "id": 1667, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 1651, + "modifierName": { + "argumentTypes": null, + "id": 1650, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1376, + "src": "1256:9:8", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1256:9:8" + }, + { + "arguments": null, + "id": 1653, + "modifierName": { + "argumentTypes": null, + "id": 1652, + "name": "canMint", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1601, + "src": "1266:7:8", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1266:7:8" + } + ], + "name": "finishMinting", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1649, + "nodeType": "ParameterList", + "parameters": [], + "src": "1253:2:8" + }, + "payable": false, + "returnParameters": { + "id": 1656, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1655, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1667, + "src": "1290:4:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1654, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1290:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1289:6:8" + }, + "scope": 1668, + "src": "1231:135:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 1669, + "src": "386:982:8" + } + ], + "src": "0:1369:8" + }, + "legacyAST": { + "absolutePath": "zeppelin-solidity/contracts/token/ERC20/MintableToken.sol", + "exportedSymbols": { + "MintableToken": [1668] + }, + "id": 1669, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1575, + "literals": ["solidity", "^", "0.4", ".18"], + "nodeType": "PragmaDirective", + "src": "0:24:8" + }, + { + "absolutePath": + "zeppelin-solidity/contracts/token/ERC20/StandardToken.sol", + "file": "./StandardToken.sol", + "id": 1576, + "nodeType": "ImportDirective", + "scope": 1669, + "sourceUnit": 1915, + "src": "26:29:8", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "zeppelin-solidity/contracts/ownership/Ownable.sol", + "file": "../../ownership/Ownable.sol", + "id": 1577, + "nodeType": "ImportDirective", + "scope": 1669, + "sourceUnit": 1403, + "src": "56:37:8", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 1578, + "name": "StandardToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1914, + "src": "412:13:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_StandardToken_$1914", + "typeString": "contract StandardToken" + } + }, + "id": 1579, + "nodeType": "InheritanceSpecifier", + "src": "412:13:8" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 1580, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1402, + "src": "427:7:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$1402", + "typeString": "contract Ownable" + } + }, + "id": 1581, + "nodeType": "InheritanceSpecifier", + "src": "427:7:8" + } + ], + "contractDependencies": [1402, 1498, 1541, 1573, 1914], + "contractKind": "contract", + "documentation": + "@title Mintable token\n@dev Simple ERC20 Token example, with mintable token creation\n@dev Issue: * https://github.com/OpenZeppelin/zeppelin-solidity/issues/120\nBased on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol", + "fullyImplemented": true, + "id": 1668, + "linearizedBaseContracts": [1668, 1402, 1914, 1498, 1541, 1573], + "name": "MintableToken", + "nodeType": "ContractDefinition", + "nodes": [ + { + "anonymous": false, + "documentation": null, + "id": 1587, + "name": "Mint", + "nodeType": "EventDefinition", + "parameters": { + "id": 1586, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1583, + "indexed": true, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1587, + "src": "450:18:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1582, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "450:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1585, + "indexed": false, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1587, + "src": "470:14:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1584, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "470:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "449:36:8" + }, + "src": "439:47:8" + }, + { + "anonymous": false, + "documentation": null, + "id": 1589, + "name": "MintFinished", + "nodeType": "EventDefinition", + "parameters": { + "id": 1588, + "nodeType": "ParameterList", + "parameters": [], + "src": "507:2:8" + }, + "src": "489:21:8" + }, + { + "constant": false, + "id": 1592, + "name": "mintingFinished", + "nodeType": "VariableDeclaration", + "scope": 1668, + "src": "514:35:8", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1590, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "514:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 1591, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "544:5:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "visibility": "public" + }, + { + "body": { + "id": 1600, + "nodeType": "Block", + "src": "574:43:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1596, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "588:16:8", + "subExpression": { + "argumentTypes": null, + "id": 1595, + "name": "mintingFinished", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1592, + "src": "589:15:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1594, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [1932, 1933], + "referencedDeclaration": 1932, + "src": "580:7:8", + "typeDescriptions": { + "typeIdentifier": + "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1597, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "580:25:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1598, + "nodeType": "ExpressionStatement", + "src": "580:25:8" + }, + { + "id": 1599, + "nodeType": "PlaceholderStatement", + "src": "611:1:8" + } + ] + }, + "documentation": null, + "id": 1601, + "name": "canMint", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 1593, + "nodeType": "ParameterList", + "parameters": [], + "src": "571:2:8" + }, + "src": "555:62:8", + "visibility": "internal" + }, + { + "body": { + "id": 1647, + "nodeType": "Block", + "src": "937:180:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1619, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1614, + "name": "totalSupply_", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1417, + "src": "943:12:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1617, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1605, + "src": "975:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1615, + "name": "totalSupply_", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1417, + "src": "958:12:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1616, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1345, + "src": "958:16:8", + "typeDescriptions": { + "typeIdentifier": + "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": + "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1618, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "958:25:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "943:40:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1620, + "nodeType": "ExpressionStatement", + "src": "943:40:8" + }, + { + "expression": { + "argumentTypes": null, + "id": 1630, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1621, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1415, + "src": "989:8:8", + "typeDescriptions": { + "typeIdentifier": + "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1623, + "indexExpression": { + "argumentTypes": null, + "id": 1622, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1603, + "src": "998:3:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "989:13:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1628, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1605, + "src": "1023:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1624, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1415, + "src": "1005:8:8", + "typeDescriptions": { + "typeIdentifier": + "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1626, + "indexExpression": { + "argumentTypes": null, + "id": 1625, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1603, + "src": "1014:3:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1005:13:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1627, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1345, + "src": "1005:17:8", + "typeDescriptions": { + "typeIdentifier": + "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": + "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1629, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1005:26:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "989:42:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1631, + "nodeType": "ExpressionStatement", + "src": "989:42:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1633, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1603, + "src": "1042:3:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1634, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1605, + "src": "1047:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1632, + "name": "Mint", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1587, + "src": "1037:4:8", + "typeDescriptions": { + "typeIdentifier": + "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 1635, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1037:18:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1636, + "nodeType": "ExpressionStatement", + "src": "1037:18:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 1639, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1078:1:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1638, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1070:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1640, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1070:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1641, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1603, + "src": "1082:3:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1642, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1605, + "src": "1087:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1637, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1572, + "src": "1061:8:8", + "typeDescriptions": { + "typeIdentifier": + "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 1643, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1061:34:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1644, + "nodeType": "ExpressionStatement", + "src": "1061:34:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1645, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1108:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 1613, + "id": 1646, + "nodeType": "Return", + "src": "1101:11:8" + } + ] + }, + "documentation": + "@dev Function to mint tokens\n@param _to The address that will receive the minted tokens.\n@param _amount The amount of tokens to mint.\n@return A boolean that indicates if the operation was successful.", + "id": 1648, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 1608, + "modifierName": { + "argumentTypes": null, + "id": 1607, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1376, + "src": "897:9:8", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "897:9:8" + }, + { + "arguments": null, + "id": 1610, + "modifierName": { + "argumentTypes": null, + "id": 1609, + "name": "canMint", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1601, + "src": "907:7:8", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "907:7:8" + } + ], + "name": "mint", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1606, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1603, + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 1648, + "src": "867:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1602, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "867:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1605, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 1648, + "src": "880:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1604, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "880:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "866:30:8" + }, + "payable": false, + "returnParameters": { + "id": 1613, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1612, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1648, + "src": "931:4:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1611, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "931:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "930:6:8" + }, + "scope": 1668, + "src": "853:264:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1666, + "nodeType": "Block", + "src": "1296:70:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1659, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1657, + "name": "mintingFinished", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1592, + "src": "1302:15:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1658, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1320:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "1302:22:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1660, + "nodeType": "ExpressionStatement", + "src": "1302:22:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1661, + "name": "MintFinished", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1589, + "src": "1330:12:8", + "typeDescriptions": { + "typeIdentifier": + "t_function_event_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 1662, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1330:14:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1663, + "nodeType": "ExpressionStatement", + "src": "1330:14:8" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1664, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1357:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 1656, + "id": 1665, + "nodeType": "Return", + "src": "1350:11:8" + } + ] + }, + "documentation": + "@dev Function to stop minting new tokens.\n@return True if the operation was successful.", + "id": 1667, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 1651, + "modifierName": { + "argumentTypes": null, + "id": 1650, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1376, + "src": "1256:9:8", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1256:9:8" + }, + { + "arguments": null, + "id": 1653, + "modifierName": { + "argumentTypes": null, + "id": 1652, + "name": "canMint", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1601, + "src": "1266:7:8", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1266:7:8" + } + ], + "name": "finishMinting", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1649, + "nodeType": "ParameterList", + "parameters": [], + "src": "1253:2:8" + }, + "payable": false, + "returnParameters": { + "id": 1656, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1655, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1667, + "src": "1290:4:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1654, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1290:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1289:6:8" + }, + "scope": 1668, + "src": "1231:135:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 1669, + "src": "386:982:8" + } + ], + "src": "0:1369:8" + }, + "compiler": { + "name": "solc", + "version": "0.4.23+commit.124ca40d.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "2.0.0", + "updatedAt": "2018-05-11T00:52:53.477Z" +} diff --git a/src/bootstrap/app.js b/src/bootstrap/app.js index 0ab702a..b5fd8a9 100755 --- a/src/bootstrap/app.js +++ b/src/bootstrap/app.js @@ -7,22 +7,46 @@ import { Switch, Route } from 'react-router-dom' import NavBar from '../components/nav-bar' import Home from '../containers/home' +import SimpleBid from '../containers/simple-bid' import IICO from '../containers/iico' import PageNotFound from '../components/page-not-found' import Initializer from './initializer' import GlobalComponents from './global-components' +import { ETHAddressRegExp, ETHAddressRegExpCaptureGroup } from './dapp-api' import './app.css' +const toWithAddress = base => location => + `${base}/${location.pathname.match(ETHAddressRegExp)[0]}` +const hasNonRootAddress = location => + location.pathname.slice(0, 3) !== '/0x' && + ETHAddressRegExp.test(location.pathname) const ConnectedNavBar = connect(state => ({ accounts: state.wallet.accounts, balance: state.wallet.balance -}))(({ accounts, balance }) => ( +}))(({ location, accounts, balance }) => ( )) @@ -35,13 +59,24 @@ const App = ({ store, history, testElement }) => ( Open IICO -
- - - - - -
+ + + + + + {testElement}
diff --git a/src/bootstrap/app.scss b/src/bootstrap/app.scss index f50cbc3..91fd64e 100755 --- a/src/bootstrap/app.scss +++ b/src/bootstrap/app.scss @@ -1,10 +1,12 @@ @import '~normalize.css'; @import '~react-redux-toastr/lib/css/react-redux-toastr.min.css'; @import '~create-redux-form/animations/carousel.css'; +@import '~react-joyride/lib/react-joyride-compiled.css'; @import '../styles/_colors.scss'; @import '../styles/_typography.scss'; -@import '../styles/_toastr.scss'; +@import '../styles/_global-components.scss'; @import '../styles/_form.scss'; +@import '../styles/_joyride.scss'; // Global Overrides * { @@ -15,38 +17,42 @@ // Document Root html { + background-color: $light2; + background-image: url('../assets/images/background.png'); + background-position: -90px 180px; + background-repeat: no-repeat; + background-size: cover; color: $dark2; font-size: 16px; + overflow: scroll; } // App Containers html, body, #root, -#router-root, -#scroll-root { +#router-root { border: 0; - height: 100%; margin: 0; padding: 0; width: 100%; } -// React Router Root -#router-root { - padding-top: 70px; +// Initializer Loader +#initializer-loader { + align-items: center; + display: flex; + height: 100%; + justify-content: center; + position: fixed; + width: 100%; } -// Scroll Root -#scroll-root { - background-color: $light2; - background-image: url('../assets/images/background.png'); - background-position: -90px 180px; - background-repeat: no-repeat; - background-size: cover; +// React Router Root +#router-root { display: flex; flex-direction: column; - overflow: scroll; + margin-top: 70px; position: relative; } diff --git a/src/bootstrap/dapp-api.js b/src/bootstrap/dapp-api.js index 2cf24f8..ca60a69 100755 --- a/src/bootstrap/dapp-api.js +++ b/src/bootstrap/dapp-api.js @@ -7,11 +7,21 @@ const ETHEREUM_PROVIDER = process.env[`REACT_APP_${env}_ETHEREUM_PROVIDER`] let eth if (process.env.NODE_ENV === 'test') - eth = new Eth(require('ganache-cli').provider()) + eth = new Eth(require('ganache-cli').provider({ seed: 1 })) else if (window.web3 && window.web3.currentProvider) eth = new Eth(window.web3.currentProvider) -else eth = new Eth.HttpProvider(ETHEREUM_PROVIDER) +else eth = new Eth(new Eth.HttpProvider(ETHEREUM_PROVIDER)) -const IICOContractFactory = eth.contract(IICO.abi) // TODO: Put this on NPM or load dynamically? +const IICOContractFactory = eth.contract && eth.contract(IICO.abi) // TODO: Put this on NPM or load dynamically? -export { eth, IICOContractFactory } +const ETHAddressRegExp = /0x[a-fA-F0-9]{40}/ +const ETHAddressRegExpCaptureGroup = '(0x[a-fA-F0-9]{40})' +const strictETHAddressRegExp = /^0x[a-fA-F0-9]{40}$/ + +export { + eth, + IICOContractFactory, + ETHAddressRegExp, + ETHAddressRegExpCaptureGroup, + strictETHAddressRegExp +} diff --git a/src/bootstrap/global-components.js b/src/bootstrap/global-components.js index c0828ed..739c3cc 100644 --- a/src/bootstrap/global-components.js +++ b/src/bootstrap/global-components.js @@ -3,8 +3,7 @@ import ReactTooltip from 'react-tooltip' import ReduxToastr from 'react-redux-toastr' export default () => ( -
- +
( transitionOut="bounceOutUp" progressBar /> +
) diff --git a/src/bootstrap/initializer.js b/src/bootstrap/initializer.js index b9dcf0a..3827b15 100755 --- a/src/bootstrap/initializer.js +++ b/src/bootstrap/initializer.js @@ -2,12 +2,15 @@ import React, { PureComponent } from 'react' import PropTypes from 'prop-types' import { connect } from 'react-redux' import { RenderIf } from 'lessdux' +import { getChecksumAddress } from 'ethjs-account' +import { PropagateLoader } from 'react-spinners' import * as walletSelectors from '../reducers/wallet' import * as walletActions from '../actions/wallet' import RequiresMetaMask from '../components/requires-meta-mask' +import SimpleBid from '../containers/simple-bid' -import { eth } from './dapp-api' +import { eth, ETHAddressRegExp } from './dapp-api' class Initializer extends PureComponent { static propTypes = { @@ -25,11 +28,15 @@ class Initializer extends PureComponent { ]).isRequired } - state = { isWeb3Loaded: eth.accounts !== undefined } + state = { + isWeb3Loaded: eth.accounts !== undefined, + pathAddress: undefined + } componentDidMount() { const { fetchAccounts } = this.props fetchAccounts() + this.pathAddressCheck() } componentDidUpdate(prevProps) { @@ -39,16 +46,67 @@ class Initializer extends PureComponent { fetchBalance() } + pathAddressCheck = async () => { + this.setState({ pathAddress: undefined }) + + // Get possible address from path + let address = window.location.pathname.match(ETHAddressRegExp) + address = address && address[0] + + // There is an address + if (address) { + // Check that it has code + try { + const code = await eth.getCode(address) + if (code === '0x') throw new Error() + } catch (err) { + console.error(err) + return window.location.replace('/404') + } + + // Is it checksummed? + const checksumAddress = getChecksumAddress(address) + if (address !== checksumAddress) + return window.location.replace( + window.location.pathname.replace(address, checksumAddress) + ) // No, replace it + } + + // Block all other sales for now to avoid phishing + if ( + process.env.REACT_APP_BRANCH === 'master' && + address !== '0xac43300F2D0c345B716F36853eCeb497576E0F67' + ) + return window.location.replace( + '/0xac43300F2D0c345B716F36853eCeb497576E0F67' + ) + + this.setState({ pathAddress: address || null }) + } + render() { - const { isWeb3Loaded } = this.state + const { isWeb3Loaded, pathAddress } = this.state const { accounts, children } = this.props + const loading = ( +
+ +
+ ) + + if (pathAddress === undefined) return loading + return ( } + failedLoading={ +
+ + +
+ } extraValues={[accounts.data && accounts.data[0]]} extraFailedValues={[!isWeb3Loaded]} /> diff --git a/src/bootstrap/setup-integration-test.js b/src/bootstrap/setup-integration-test.js index 137c9f1..4191930 100755 --- a/src/bootstrap/setup-integration-test.js +++ b/src/bootstrap/setup-integration-test.js @@ -1,23 +1,165 @@ -import { mount } from 'enzyme' import React from 'react' +import { mount } from 'enzyme' +import _enzymeToJSON from 'enzyme-to-json' +import Eth from 'ethjs' + +import _Token from '../assets/contracts/Token' +import _IICO from '../assets/contracts/IICO' import configureStore from './configure-store' import App from './app' +import { eth } from './dapp-api' + +const mockETHAddress = '0x0000000000000000000000000000000000000000' /** - * Wait for all promises to resolve in a test environment. - * @returns {Promise} - A promise that resolves when setImmediate is called. + * Send a transaction and wait for it to be mined. + * @param {function} transaction - The transaction function. + * @param {...any} args - The parameters for the transaction. + * @returns {object} - The transaction receipt object. */ -export function flushPromises() { - return new Promise(resolve => setTimeout(resolve, 1000)) +export async function sendTransaction(transaction, ...args) { + // Send transaction + const hash = await transaction(...args) + + // Wait for receipt + let receipt + while (!receipt) { + receipt = await eth.getTransactionReceipt(hash) + await new Promise(resolve => setTimeout(resolve, 200)) + } + + // Return receipt + return receipt +} + +/** + * Sets up the contracts used in a sale. + * @param {number} tokensForSale - The amount of tokens that will be sold. + * @param {number} startTime - The UNIX Epoch time in seconds on which the sale will start. + * @param {number} fullBonusLength - The length of the full bonus phase in seconds. + * @param {number} partialWithdrawalLength - The length of the partial withdrawals phase in seconds. + * @param {number} withdrawalLockUpLength - The length of the withdrawal lock-up phase in seconds. + * @param {number} maxBonus - The maximum/starting bonus for the sale. + * @param {string} beneficiary - The address that receives the ETH from contributions at the end of the sale. + * @param {number} maximumBaseContribution - The maximum contribution from an address that has only passed the base KYC. + * @param {string[]} baseWhitelistAddresses - The addresses to add to the base KYC whitelist. + * @param {string[]} reinforcedWhitelistAddresses - The addresses to add to the reinforced KYC whitelist. + * @returns {{ Token: object, IICO: object }} - The Token and IICO contract instances. + */ +export async function setUpContracts( + tokensForSale, + startTime, + fullBonusLength, + partialWithdrawalLength, + withdrawalLockUpLength, + maxBonus, + beneficiary, + maximumBaseContribution, + baseWhitelistAddresses, + reinforcedWhitelistAddresses +) { + // Get public key of main account + const pubKey = (await eth.accounts())[0] + + // Set up contract factories + const defaultTransactionObject = { + from: pubKey, + data: '', + gas: 3000000 + } + const TokenContractFactory = eth.contract( + _Token.abi, + _Token.bytecode, + defaultTransactionObject + ) + const IICOContractFactory = eth.contract( + _IICO.abi, + _IICO.bytecode, + defaultTransactionObject + ) + + // Deploy contracts + const [Token, IICO] = await Promise.all([ + sendTransaction(TokenContractFactory.new).then(receipt => + TokenContractFactory.at(receipt.contractAddress) + ), + sendTransaction( + IICOContractFactory.new, + startTime, + fullBonusLength, + partialWithdrawalLength, + withdrawalLockUpLength, + maxBonus, + beneficiary, + Eth.toWei(maximumBaseContribution, 'ether') + ).then(receipt => IICOContractFactory.at(receipt.contractAddress)) + ]) + + // Mint and set up token + await sendTransaction( + Token.mint, + IICO.address, + Eth.toWei(tokensForSale, 'ether') + ) + await sendTransaction(IICO.setToken, Token.address) + + // Set up whitelists + await sendTransaction(IICO.setWhitelister, pubKey) + await Promise.all([ + baseWhitelistAddresses.length && + sendTransaction(IICO.addBaseWhitelist, baseWhitelistAddresses), + reinforcedWhitelistAddresses.length && + sendTransaction(IICO.addReinforcedWhitelist, reinforcedWhitelistAddresses) + ]) + + return { Token, IICO } +} + +/** + * Wait for all promises to resolve in a test environment and update the app. + * @param {object} app - The app wrapper to update. + * @returns {Promise} - A promise that resolves when the timeout handler is called. + */ +export function flushPromises(app) { + return new Promise(resolve => + setTimeout(() => { + app.update() + resolve() + }, 1000) + ) +} + +/** + * Serializes enzyme wrappers and ignores the history API's random keys. + * @param {object} enzymeWrapper - The enzyme wrapper to serialize. + * @returns {object} - The serialized wrapper. + */ +export function enzymeToJSON(enzymeWrapper) { + return _enzymeToJSON(enzymeWrapper, { + map: data => ({ + ...data, + props: { + ...data.props, + history: data.props.history && { + ...data.props.history, + location: { ...data.props.history.location, key: '000000' } + }, + location: data.props.location && { + ...data.props.location, + key: '000000' + } + } + }) + }) } /** * Sets up an integration test environment. * @param {object} [initialState={}] - The initial state. - * @returns {{ store: object, dispatchSpy: function, mountTest: function, form: function, wizardForm: function }} - Utilities for testing and the create-redux-form functions to test. + * @returns {{ store: object, history: object, dispatchSpy: function, mountApp: function, contracts: { Token: object, IICO: object } }} - Utilities for testing. */ -export default function setupIntegrationTest(initialState = {}) { +export default async function setupIntegrationTest(initialState = {}) { const dispatchSpy = jest.fn(() => ({})) const { store, history } = configureStore(initialState, { dispatchSpy @@ -25,5 +167,18 @@ export default function setupIntegrationTest(initialState = {}) { const mountApp = testElement => mount() - return { store, history, dispatchSpy, mountApp } + const { Token, IICO } = await setUpContracts( + 0.16 * 1e9, + Date.now() / 1000 + 180, // Now + 3 minutes + 300, + 300, + 300, + 2e8, + mockETHAddress, + 5, + [], + [] + ) + + return { store, history, dispatchSpy, mountApp, contracts: { Token, IICO } } } diff --git a/src/components/__snapshots__/storyshots.test.js.snap b/src/components/__snapshots__/storyshots.test.js.snap index 13a014d..7827624 100755 --- a/src/components/__snapshots__/storyshots.test.js.snap +++ b/src/components/__snapshots__/storyshots.test.js.snap @@ -262,13 +262,9 @@ exports[`Storyshots Button disabled 1`] = `
-
-
- -
+
+
+ +
`; @@ -566,13 +568,9 @@ exports[`Storyshots Button primary 1`] = ` -
-
- -
+
+
+ +
`; @@ -870,13 +874,9 @@ exports[`Storyshots Button with lots of text 1`] = ` -
-
- -
+
+
+ +
`; @@ -1175,13 +1181,311 @@ exports[`Storyshots Chain Hash default 1`] = ` -
+
+ + +
+
+
+
+
+
+ +
+
+
+`; + +exports[`Storyshots Chain Number default 1`] = ` +
+
+
+

+ OpenIICO UI-Kit +

+
+
+
+
+ + 0.000123 + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
`; -exports[`Storyshots Chain Number default 1`] = ` +exports[`Storyshots Checkbox default 1`] = `
- - 0.00 - + +
+ ACTIVE +
+
-
-
- -
+
+
+ +
`; -exports[`Storyshots Checkbox default 1`] = ` +exports[`Storyshots Circle default 1`] = `
- -
- ACTIVE -
-
+ className="Circle" + style={ + Object { + "background": "#eee", + "height": 30, + "width": 30, + } + } + />
-
-
- -
+
+
+ +
`; -exports[`Storyshots Circle default 1`] = ` +exports[`Storyshots ETH QR with address(0) 1`] = `
-
+
+
+
+
+
-
-
- -
+
+
+ +
`; @@ -2388,13 +2709,9 @@ exports[`Storyshots Form header 1`] = `
-
-
- -
+
+
+ +
`; @@ -2685,13 +3008,9 @@ exports[`Storyshots Identicon with placeholder seed 1`] = `
-
-
- -
+
+
+ +
`; @@ -2822,15 +3147,11 @@ exports[`Storyshots Nav Bar with a lot of routes, (scrollable) 1`] = `
- - Logo - + Logo
@@ -2929,7 +3250,12 @@ exports[`Storyshots Nav Bar with a lot of routes, (scrollable) 1`] = `
- 10 ETH + + 10 + ETH +
@@ -3102,13 +3428,9 @@ exports[`Storyshots Nav Bar with a lot of routes, (scrollable) 1`] = `
-
-
- -
+
+
+ +
`; @@ -3239,15 +3567,11 @@ exports[`Storyshots Nav Bar with routes 1`] = `
- - Logo - + Logo
@@ -3292,7 +3616,12 @@ exports[`Storyshots Nav Bar with routes 1`] = `
- 10 ETH + + 10 + ETH +
@@ -3465,13 +3794,9 @@ exports[`Storyshots Nav Bar with routes 1`] = `
-
-
- -
+
+
+ +
`; @@ -3597,7 +3928,12 @@ exports[`Storyshots Page Not Found default 1`] = `
- 404. This is not the page you are looking for. +
+ 404 +
+ This is not the page you are looking for.
-
-
- -
+
+
+ +
`; @@ -4111,13 +4449,9 @@ exports[`Storyshots Pie Chart activated 1`] = `
-
-
- -
+
+
+ +
`; @@ -4254,6 +4594,7 @@ exports[`Storyshots Requires MetaMask needs unlock 1`] = ` > MetaMask + .
-
-
- -
+
+
+ +
`; @@ -4567,6 +4910,7 @@ exports[`Storyshots Requires MetaMask not found 1`] = ` > MetaMask + .
-
-
- -
+
+
+ +
`; @@ -5057,13 +5403,9 @@ exports[`Storyshots Slider default 1`] = ` -
-
- -
+
+
+ +
`; @@ -5184,7 +5532,8 @@ exports[`Storyshots Stat Block default 1`] = ` } >

@@ -5196,6 +5545,10 @@ exports[`Storyshots Stat Block default 1`] = ` > 300

+
-
-
- -
+
+
+ +
`; @@ -5492,7 +5847,8 @@ exports[`Storyshots Stat Block with no label 1`] = ` } >

300

+
-
-
- -
+
+
+ +
`; @@ -5802,7 +6164,8 @@ exports[`Storyshots Stat Row default 1`] = ` className="StatRow-blocks" >

@@ -5814,9 +6177,14 @@ exports[`Storyshots Stat Row default 1`] = ` > 300

+

@@ -5828,9 +6196,14 @@ exports[`Storyshots Stat Row default 1`] = ` > 300

+

@@ -5842,8 +6215,16 @@ exports[`Storyshots Stat Row default 1`] = ` > 300

+
+
-
-
- -
+
+
+ +
`; @@ -6146,7 +6529,8 @@ exports[`Storyshots Stat Row with box shadow 1`] = ` className="StatRow-blocks" >

@@ -6158,9 +6542,14 @@ exports[`Storyshots Stat Row with box shadow 1`] = ` > 300

+

@@ -6172,9 +6561,14 @@ exports[`Storyshots Stat Row with box shadow 1`] = ` > 300

+

@@ -6186,8 +6580,16 @@ exports[`Storyshots Stat Row with box shadow 1`] = ` > 300

+
+
-
-
- -
+
+
+ +
`; @@ -6490,6 +6894,7 @@ exports[`Storyshots Text Input default 1`] = ` className="TextInput-input" onBlur={undefined} onChange={[Function]} + step={undefined} type="text" value="" /> @@ -6667,13 +7072,9 @@ exports[`Storyshots Text Input default 1`] = `
-
-
- -
+
+
+ +
`; @@ -6800,6 +7207,7 @@ exports[`Storyshots Text Input error 1`] = ` className="TextInput-input" onBlur={undefined} onChange={[Function]} + step={undefined} type="text" value="" /> @@ -6977,13 +7385,9 @@ exports[`Storyshots Text Input error 1`] = ` -
-
- -
+
+
+ +
`; @@ -7110,6 +7520,7 @@ exports[`Storyshots Text Input touched 1`] = ` className="TextInput-input" onBlur={undefined} onChange={[Function]} + step={undefined} type="text" value="" /> @@ -7287,13 +7698,9 @@ exports[`Storyshots Text Input touched 1`] = ` -
-
- -
+
+
+ +
`; @@ -7420,6 +7833,7 @@ exports[`Storyshots Text Input valid 1`] = ` className="TextInput-input" onBlur={undefined} onChange={[Function]} + step={undefined} type="text" value="" /> @@ -7597,13 +8011,9 @@ exports[`Storyshots Text Input valid 1`] = ` -
-
- -
+
+
+ +
`; @@ -7891,13 +8307,9 @@ exports[`Storyshots Toast confirm 1`] = ` -
-
- -
+
+
+ +
`; @@ -8185,13 +8603,9 @@ exports[`Storyshots Toast error 1`] = ` -
-
- -
+
+
+ +
`; @@ -8479,13 +8899,9 @@ exports[`Storyshots Toast info 1`] = ` -
-
- -
+
+
+ +
`; @@ -8773,13 +9195,9 @@ exports[`Storyshots Toast message 1`] = ` -
-
- -
+
+
+ +
`; @@ -9067,13 +9491,9 @@ exports[`Storyshots Toast success 1`] = ` -
-
- -
+
+
+ +
`; @@ -9361,13 +9787,9 @@ exports[`Storyshots Toast warning 1`] = ` -
-
- -
+
+
+ +
`; @@ -9671,13 +10099,9 @@ exports[`Storyshots Typography headings 1`] = ` -
-
- -
+
+
+ +
`; @@ -9978,13 +10408,9 @@ exports[`Storyshots Typography paragraphs 1`] = ` -
-
- -
+
+
+ +
`; @@ -10277,13 +10709,9 @@ exports[`Storyshots Typography small 1`] = ` -
-
- -
+
+
+ +
`; diff --git a/src/components/button/button.scss b/src/components/button/button.scss index 5acdbf3..e78a566 100755 --- a/src/components/button/button.scss +++ b/src/components/button/button.scss @@ -7,8 +7,8 @@ border-radius: 5px; box-shadow: 0 2px 0 0 $primary; cursor: pointer; - height: 60px; - min-width: 200px; + height: 40px; + min-width: 100px; padding: 0 18px; text-align: center; @@ -20,7 +20,7 @@ &-label { color: $light; - font-size: 20px; - line-height: 60px; + font-size: 14px; + line-height: 40px; } } diff --git a/src/components/chain-number/index.js b/src/components/chain-number/index.js index 538cc2d..ecb67d6 100644 --- a/src/components/chain-number/index.js +++ b/src/components/chain-number/index.js @@ -3,11 +3,14 @@ import PropTypes from 'prop-types' import './chain-number.css' -const ChainNumber = ({ children }) => ( - - {children.toFixed(2)} - -) +const ChainNumber = ({ children }) => { + const n = children.toFixed(children < 1 ? 6 : 2) + return ( + + {n.length > 8 ? `${n.slice(0, 8)}...` : n} + + ) +} ChainNumber.propTypes = { // State diff --git a/src/components/eth-qr/index.js b/src/components/eth-qr/index.js new file mode 100644 index 0000000..90fe4f5 --- /dev/null +++ b/src/components/eth-qr/index.js @@ -0,0 +1,51 @@ +import React, { PureComponent } from 'react' +import PropTypes from 'prop-types' +import QRCode from 'qrcode' +import { SyncLoader } from 'react-spinners' + +export default class ETHQR extends PureComponent { + static propTypes = { + // State + to: PropTypes.string.isRequired, + size: PropTypes.number + } + + static defaultProps = { + // State + size: 200 + } + + state = { dataURL: null } + + constructor(props) { + super(props) + this.generateDataURL() + } + + componentDidUpdate() { + this.generateDataURL() + } + + generateDataURL = async () => { + const { to } = this.props + + this.setState({ + dataURL: await QRCode.toDataURL(to) + }) + } + + render() { + const { size } = this.props + const { dataURL } = this.state + + return dataURL ? ( + Ethereum Transaction QR Code + ) : ( + + ) + } +} diff --git a/src/components/identicon/index.js b/src/components/identicon/index.js index 6ceca8b..bf60e77 100755 --- a/src/components/identicon/index.js +++ b/src/components/identicon/index.js @@ -11,7 +11,11 @@ const Identicon = ({ seed, size, scale, className, ...rest }) => { className={`Identicon ${className}`} style={{ height: length, width: length }} > - + diff --git a/src/components/nav-bar/index.js b/src/components/nav-bar/index.js index 3b6b0bd..73e9d60 100644 --- a/src/components/nav-bar/index.js +++ b/src/components/nav-bar/index.js @@ -9,23 +9,35 @@ import logo from '../../assets/images/logo.png' import './nav-bar.css' -const NavBar = ({ accounts, balance, routes }) => ( +const NavBar = ({ location, accounts, balance, routes }) => (
- - Logo - + Logo
- {routes.map(r => ( - - {r.name} - - ))} + {routes.filter(r => !r.visible || r.visible(location)).map(r => { + const to = typeof r.to === 'function' ? r.to(location) : r.to + + return r.isExternal ? ( + + {r.name} + + ) : ( + + {r.name} + + ) + })}
@@ -40,7 +52,11 @@ const NavBar = ({ accounts, balance, routes }) => ( + {balance.data} ETH + + } failedLoading="..." />
@@ -49,6 +65,11 @@ const NavBar = ({ accounts, balance, routes }) => ( ) NavBar.propTypes = { + // React Router + location: PropTypes.shape({ + pathname: PropTypes.string.isRequired + }), + // Redux State accounts: walletSelectors.accountsShape.isRequired, balance: walletSelectors.balanceShape.isRequired, @@ -57,9 +78,16 @@ NavBar.propTypes = { routes: PropTypes.arrayOf( PropTypes.shape({ name: PropTypes.string.isRequired, - to: PropTypes.string.isRequired + to: PropTypes.oneOfType([PropTypes.string, PropTypes.func]).isRequired, + isExternal: PropTypes.bool, + visible: PropTypes.func }).isRequired ).isRequired } +NavBar.defaultProps = { + // React Router + location: null +} + export default NavBar diff --git a/src/components/nav-bar/nav-bar.scss b/src/components/nav-bar/nav-bar.scss index 54627bd..98944e0 100644 --- a/src/components/nav-bar/nav-bar.scss +++ b/src/components/nav-bar/nav-bar.scss @@ -12,9 +12,10 @@ display: flex; height: 70px; padding: 0 8%; - position: absolute; + position: fixed; top: 0; width: 100%; + z-index: 1000; &-logo { height: 40px; @@ -26,7 +27,6 @@ display: flex; height: 100%; margin: 0 50px 0 25px; - // overflow-x: scroll; text-overflow: ellipsis; white-space: nowrap; @@ -38,7 +38,7 @@ &:hover, &.is-active { - color: $dark3; + color: $dark4; } } } diff --git a/src/components/page-not-found/index.js b/src/components/page-not-found/index.js index d1a2b81..58a81b8 100755 --- a/src/components/page-not-found/index.js +++ b/src/components/page-not-found/index.js @@ -2,12 +2,11 @@ import React from 'react' import './page-not-found.css' -const PageNotFound = () => ( +export default () => (
- 404. This is not the page you are looking for. +
404
+ This is not the page you are looking for.
) - -export default PageNotFound diff --git a/src/components/page-not-found/page-not-found.scss b/src/components/page-not-found/page-not-found.scss index b3f8236..251d8a7 100755 --- a/src/components/page-not-found/page-not-found.scss +++ b/src/components/page-not-found/page-not-found.scss @@ -1,12 +1,19 @@ +@import '../../styles/_colors.scss'; + /* @define PageNotFound */ .PageNotFound { - background: #273142; height: 100%; &-message { - color: white; + color: $dark; font-size: 40px; padding: 70px 50px; text-align: center; + + &-errorCode { + color: $dark4; + font-size: 60px; + margin-bottom: 20px; + } } } diff --git a/src/components/requires-meta-mask/index.js b/src/components/requires-meta-mask/index.js index 8d3d4db..a02e809 100755 --- a/src/components/requires-meta-mask/index.js +++ b/src/components/requires-meta-mask/index.js @@ -15,7 +15,7 @@ const RequiresMetaMask = ({ needsUnlock }) => ( href="https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn?hl=en" > MetaMask - + .
) diff --git a/src/components/requires-meta-mask/require-meta-mask.scss b/src/components/requires-meta-mask/require-meta-mask.scss index ad03b15..55d2b36 100755 --- a/src/components/requires-meta-mask/require-meta-mask.scss +++ b/src/components/requires-meta-mask/require-meta-mask.scss @@ -1,16 +1,17 @@ +@import '../../styles/_colors.scss'; + /* @define RequiresMetaMask */ .RequiresMetaMask { - background: #273142; height: 100%; &-message { - color: white; + color: $dark; font-size: 40px; padding: 70px 50px; text-align: center; &-link { - color: #999; + color: $dark4; text-decoration: none; } } diff --git a/src/components/slider/index.js b/src/components/slider/index.js index 9dafa63..e6ab1c8 100644 --- a/src/components/slider/index.js +++ b/src/components/slider/index.js @@ -1,9 +1,11 @@ import React, { PureComponent } from 'react' import PropTypes from 'prop-types' +import { numberToPercentage } from '../../utils/number' + import './slider.css' -class Slider extends PureComponent { +export default class Slider extends PureComponent { static propTypes = { // State startLabel: PropTypes.string.isRequired, @@ -13,7 +15,8 @@ class Slider extends PureComponent { PropTypes.shape({ label: PropTypes.string.isRequired, percent: PropTypes.number.isRequired, - color: PropTypes.string + color: PropTypes.string, + point: PropTypes.bool }).isRequired ), @@ -45,11 +48,6 @@ class Slider extends PureComponent { }) } - percentToPixel = percent => { - if (!this.barRef) return 0 - return this.barRef.getBoundingClientRect().width * percent - } - handleBarMouseMove = event => { const { calcValue } = this.props @@ -62,8 +60,46 @@ class Slider extends PureComponent { } render() { - const { startLabel, endLabel, steps } = this.props + const { startLabel, endLabel, steps: _steps } = this.props const { left, value } = this.state + + const steps = [] + if (_steps) { + let accLeftPercent = 0 + for (const step of _steps) { + let width + let style + if (step.point) + style = { + left: numberToPercentage(step.percent) + } + else { + width = step.percent - accLeftPercent + style = { + left: numberToPercentage(accLeftPercent), + width: numberToPercentage(width) + } + accLeftPercent += width + } + + steps.push( +
+
+

{step.label}

+
+
+ ) + } + } + return (
{/* Bar */} @@ -72,6 +108,8 @@ class Slider extends PureComponent { onMouseMove={this.handleBarMouseMove} className="Slider-bar" /> + {/* Steps */} + {steps} {/* Thumb */}
{value && ( @@ -79,23 +117,6 @@ class Slider extends PureComponent {

{value}

)} - {/* Steps */} - {steps && - steps.map(s => ( -
-
-

{s.label}

-
-
- ))} {/* Labels */}

{startLabel}

@@ -105,5 +126,3 @@ class Slider extends PureComponent { ) } } - -export default Slider diff --git a/src/components/slider/slider.scss b/src/components/slider/slider.scss index 03bbd76..5682c33 100644 --- a/src/components/slider/slider.scss +++ b/src/components/slider/slider.scss @@ -14,6 +14,7 @@ background: $primary; height: 20px; left: 0; + pointer-events: none; position: absolute; top: 0; transform: translateX(-50%); @@ -35,12 +36,16 @@ left: 0; position: absolute; top: 5px; - transform: translateX(-50%); - width: 5px; + width: 0; + + &--point { + transform: translateX(-50%); + width: 5px; + } &-label { display: none; - left: 0; + left: 50%; pointer-events: none; position: absolute; top: 1px; diff --git a/src/components/slider/slider.test.js b/src/components/slider/slider.test.js new file mode 100644 index 0000000..0de262a --- /dev/null +++ b/src/components/slider/slider.test.js @@ -0,0 +1,33 @@ +import { mount } from 'enzyme' +import React from 'react' + +import Slider from '.' + +const width = 100 +const calcValue = percent => percent * width + +it('Renders and handles mouse events.', () => { + const wrapper = mount( + + ) + wrapper.find('.Slider-bar').simulate('mousemove', { pageX: width / 2 }) +}) diff --git a/src/components/stat-block/index.js b/src/components/stat-block/index.js index 142f00e..040022d 100644 --- a/src/components/stat-block/index.js +++ b/src/components/stat-block/index.js @@ -3,11 +3,23 @@ import PropTypes from 'prop-types' import './stat-block.css' -const StatBlock = ({ label, value, noBackground, noFlex, flexBasis }) => ( +const StatBlock = ({ + id, + label, + value, + tooltip, + noBackground, + noFlex, + noWrap, + flexBasis +}) => (
{label &&

{label}:

} @@ -18,27 +30,34 @@ const StatBlock = ({ label, value, noBackground, noFlex, flexBasis }) => ( > {value} +
) StatBlock.propTypes = { // State + id: PropTypes.string, label: PropTypes.string, value: PropTypes.node.isRequired, + tooltip: PropTypes.string, // Modifiers noBackground: PropTypes.bool, noFlex: PropTypes.bool, + noWrap: PropTypes.bool, flexBasis: PropTypes.number } StatBlock.defaultProps = { // State + id: undefined, label: null, + tooltip: undefined, // Modifiers noBackground: false, noFlex: false, + noWrap: false, flexBasis: null } diff --git a/src/components/stat-block/stat-block.scss b/src/components/stat-block/stat-block.scss index 027a902..9363206 100644 --- a/src/components/stat-block/stat-block.scss +++ b/src/components/stat-block/stat-block.scss @@ -5,6 +5,7 @@ flex-direction: column; justify-content: flex-end; margin: 10px; + position: relative; &--withNoLabel { border-radius: 5px; @@ -15,9 +16,22 @@ flex: initial; } + &--noWrap { + white-space: nowrap; + } + &-value { &--withNoLabel { margin: 0; } } + + &-joyrideTarget { + height: 100%; + left: 0; + pointer-events: none; + position: absolute; + top: -10px; + width: 100%; + } } diff --git a/src/components/stat-row/index.js b/src/components/stat-row/index.js index 329b1d4..336b6a8 100644 --- a/src/components/stat-row/index.js +++ b/src/components/stat-row/index.js @@ -3,14 +3,16 @@ import PropTypes from 'prop-types' import './stat-row.css' -const StatRow = ({ children, withBoxShadow }) => ( +const StatRow = ({ id, children, withBoxShadow }) => (
{children}
+
) StatRow.propTypes = { // State + id: PropTypes.string, children: PropTypes.node.isRequired, // Modifiers @@ -18,6 +20,9 @@ StatRow.propTypes = { } StatRow.defaultProps = { + // State + id: undefined, + // Modifiers withBoxShadow: false } diff --git a/src/components/stat-row/stat-row.scss b/src/components/stat-row/stat-row.scss index b5e0d53..9710ab1 100644 --- a/src/components/stat-row/stat-row.scss +++ b/src/components/stat-row/stat-row.scss @@ -4,6 +4,7 @@ .StatRow { border-bottom: 2px solid $light3; padding: 25.5px 0 0 0; + position: relative; width: 100%; &--withBoxShadow { @@ -24,4 +25,13 @@ justify-content: center; margin: -10px; } + + &-joyrideTarget { + height: 100%; + left: 0; + pointer-events: none; + position: absolute; + top: 10px; + width: 100%; + } } diff --git a/src/components/text-input/index.js b/src/components/text-input/index.js index f380530..28f4887 100755 --- a/src/components/text-input/index.js +++ b/src/components/text-input/index.js @@ -8,6 +8,7 @@ const TextInput = ({ meta: { touched, valid, error }, placeholder, type, + step, className }) => (
{placeholder && ( @@ -56,6 +58,7 @@ TextInput.propTypes = { // Modifiers type: PropTypes.string, + step: PropTypes.number, className: PropTypes.string } @@ -65,6 +68,7 @@ TextInput.defaultProps = { // Modifiers type: 'text', + step: undefined, className: '' } diff --git a/src/containers/home/__snapshots__/home.test.js.snap b/src/containers/home/__snapshots__/home.test.js.snap new file mode 100644 index 0000000..e1e554e --- /dev/null +++ b/src/containers/home/__snapshots__/home.test.js.snap @@ -0,0 +1,3044 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Renders and loads an IICO contract's data after submitting an address. 1`] = ` + + +
+ + + +
+ +
+
+ + + + +
+

+ Enter the address of the IICO and hit enter. +

+
+
+
+
+
+ + + + +
+ +
+ Address +
+
+
+
+
+
+
+
+
+ +
+
+
+ +
+
+
+`; + +exports[`Renders and loads an IICO contract's data after submitting an address. 2`] = ` + + +
+ + + +
+ +
+
+ + + + +
+

+ Enter the address of the IICO and hit enter. +

+
+
+
+
+
+ + + + +
+ +
+ Address +
+
+
+
+
+
+
+
+
+ +
+
+
+ +
+
+
+`; + +exports[`Renders and loads an IICO contract's data after submitting an address. 3`] = ` + + +
+ + + +
+ +
+
+ + + + +
+

+ Enter the address of the IICO and hit enter. +

+
+
+
+
+
+ + + + +
+ +
+ Address +
+
+
+
+
+
+
+
+
+ +
+
+
+ + +

+ Go To + + + Simple + + / + + + Interactive + + + IICO Page +

+

+ Use the simple interface if you just want to buy tokens in a simple manner. +

+

+ Use the interactive interface if you want to place sophisticated bids with personal caps on the amount raised. +

+
+ } + failedLoading="The address or the contract it holds is invalid. Try another one." + history={undefined} + loading="Loading contract..." + location={undefined} + resource={ + Object { + "data": Object { + "address": "0xE8561C00C9d2857c54Fc847C05FcD7f7fB1d5E3C", + "bonus": 0, + "cutOffBidContrib": 0, + "cutOffBidID": 0, + "cutOffBidMaxValuation": 0, + "endFullBonusTime": "2018-01-25T21:44:54.000Z", + "endTime": "2018-01-25T21:54:54.000Z", + "ethPrice": undefined, + "finalized": false, + "inBaseWhitelist": false, + "inReinforcedWhitelist": false, + "maximumBaseContribution": 5, + "startTime": "2018-01-25T21:39:54.000Z", + "startingBonus": 0.2, + "tokenContractAddress": "0x10070265733b0f064EE81F698437cd07137BB0Ec", + "tokensForSale": 160000000, + "valuation": 0, + "virtualValuation": 0, + "withdrawalLockTime": "2018-01-25T21:49:54.000Z", + }, + "failedLoading": false, + "failedUpdating": false, + "loading": false, + "updating": false, + } + } + > +
+ +
+ [Identicon] +
+
+

+ Go To + + + + Simple + + + / + + + + Interactive + + + + IICO Page +

+

+ Use the simple interface if you just want to buy tokens in a simple manner. +

+

+ Use the interactive interface if you want to place sophisticated bids with personal caps on the amount raised. +

+
+ +
+ + +`; diff --git a/src/containers/home/components/iico-address-form/index.js b/src/containers/home/components/iico-address-form/index.js index 529eb29..ca8f06d 100644 --- a/src/containers/home/components/iico-address-form/index.js +++ b/src/containers/home/components/iico-address-form/index.js @@ -1,5 +1,8 @@ +import { getChecksumAddress } from 'ethjs-account' + import { form } from '../../../../utils/form-generator' -import { required } from '../../../../utils/validation' +import { required, isETHAddress } from '../../../../utils/validation' +import { strictETHAddressRegExp } from '../../../../bootstrap/dapp-api' export const { Form: IICOAddressForm, @@ -12,6 +15,10 @@ export const { }, address: { type: 'text', - validate: [required] + validate: [required, isETHAddress], + reduxFormFieldProps: { + normalize: value => + strictETHAddressRegExp.test(value) ? getChecksumAddress(value) : value + } } }) diff --git a/src/containers/home/home.scss b/src/containers/home/home.scss index 624a221..3212315 100755 --- a/src/containers/home/home.scss +++ b/src/containers/home/home.scss @@ -2,15 +2,25 @@ /* @define Home */ .Home { + align-items: center; + display: flex; + flex-direction: column; height: 100%; padding: 10px 20px; + text-align: center; + + &-form-fieldset-fields { + justify-content: center; + } &-result { - margin-top: 20px; - padding-left: 40px; + align-items: center; + display: flex; + flex-direction: column; + margin-top: 37px; &-link { - margin: 5px; + margin: 15px; } } } diff --git a/src/containers/home/home.test.js b/src/containers/home/home.test.js new file mode 100644 index 0000000..aa685ef --- /dev/null +++ b/src/containers/home/home.test.js @@ -0,0 +1,36 @@ +import setupIntegrationTest, { + flushPromises, + enzymeToJSON +} from '../../bootstrap/setup-integration-test' + +import Home from '.' + +let integration = { + store: null, + history: null, + dispatchSpy: null, + mountApp: null, + contracts: null +} + +beforeEach(async () => { + integration = await setupIntegrationTest({ router: { location: '/' } }) +}) + +it("Renders and loads an IICO contract's data after submitting an address.", async () => { + // Initial render + const app = integration.mountApp() + await flushPromises(app) + expect(app.find(Home)).toMatchSnapshot() + + // Enter an address + app.find('.TextInput-input').simulate('change', { + target: { value: integration.contracts.IICO.address } + }) + expect(app.find(Home)).toMatchSnapshot() + + // Submit address + app.find('.Home').simulate('keypress', { key: 'Enter' }) + await flushPromises(app) + expect(enzymeToJSON(app.find(Home))).toMatchSnapshot() +}) diff --git a/src/containers/home/index.js b/src/containers/home/index.js index 698d5a3..4e1f837 100755 --- a/src/containers/home/index.js +++ b/src/containers/home/index.js @@ -17,6 +17,15 @@ import './home.css' class Home extends PureComponent { static propTypes = { + // React Router + history: PropTypes.shape({ replace: PropTypes.func.isRequired }).isRequired, + location: PropTypes.shape({ + pathname: PropTypes.string.isRequired + }).isRequired, + match: PropTypes.shape({ + params: PropTypes.shape({ address: PropTypes.string }).isRequired + }).isRequired, + // Redux State IICOData: IICOSelectors.IICODataShape.isRequired, @@ -29,13 +38,39 @@ class Home extends PureComponent { } componentDidMount() { - const { clearIICOData } = this.props + const { + match: { params: { address } }, + clearIICOData, + fetchIICOData + } = this.props clearIICOData() + address && fetchIICOData(address) + } + + componentDidUpdate(prevProps) { + const { + match: { params: { address: prevAddress } }, + IICOData: prevIICOData + } = prevProps + const { + history, + location, + match: { params: { address } }, + IICOData, + fetchIICOData + } = this.props + if (address && prevAddress !== address) fetchIICOData(address) + if ( + location.pathname !== '/' && + IICOData.failedLoading && + prevIICOData.failedLoading !== IICOData.failedLoading + ) + history.replace(`/`) } handleIICOAddressFormSubmit = formData => { - const { fetchIICOData } = this.props - fetchIICOData(formData.address) + const { history } = this.props + history.replace(`/${formData.address}`) } handleKeyPress = event => { @@ -47,33 +82,48 @@ class Home extends PureComponent { } render() { - const { IICOData } = this.props + const { match: { params: { address } }, IICOData } = this.props return (
- -
- - -

- - Go To IICO Page - -

-
- ) - } - failedLoading={ - IICOData.data !== null && - 'The address or the contract it holds is invalid. Try another one.' - } + {process.env.REACT_APP_BRANCH !== 'master' && ( + -
+ )} + + +

+ Go To{' '} + Simple /{' '} + + Interactive + {' '} + IICO Page +

+

+ Use the simple interface if you just want to buy tokens in a + simple manner. +

+

+ Use the interactive interface if you want to place + sophisticated bids with personal caps on the amount raised. +

+
+ ) + } + failedLoading={ + IICOData.data !== null && + 'The address or the contract it holds is invalid. Try another one.' + } + />
) } diff --git a/src/containers/iico/components/bids/bids.scss b/src/containers/iico/components/bids/bids.scss index bfbc082..98fc278 100644 --- a/src/containers/iico/components/bids/bids.scss +++ b/src/containers/iico/components/bids/bids.scss @@ -9,8 +9,8 @@ justify-content: space-around; } - &-confirmWithdrawal { + &-confirm { padding: 15px; - text-align: center; + text-align: justify; } } diff --git a/src/containers/iico/components/bids/index.js b/src/containers/iico/components/bids/index.js index 8e52eb0..5ae782b 100644 --- a/src/containers/iico/components/bids/index.js +++ b/src/containers/iico/components/bids/index.js @@ -6,6 +6,7 @@ import { SyncLoader } from 'react-spinners' import * as IICOSelectors from '../../../../reducers/iico' import * as IICOActions from '../../../../actions/iico' +import * as walletSelectors from '../../../../reducers/wallet' import { SubmitBidForm, getSubmitBidFormIsInvalid, @@ -28,6 +29,7 @@ class Bids extends PureComponent { static propTypes = { // Redux State IICOBid: IICOSelectors.IICOBidShape.isRequired, + accounts: walletSelectors.accountsShape.isRequired, // Action Dispatchers createIICOBid: PropTypes.func.isRequired, @@ -51,23 +53,122 @@ class Bids extends PureComponent { updatingBids: PropTypes.oneOfType([ PropTypes.bool, PropTypes.arrayOf(PropTypes.number.isRequired) - ]).isRequired + ]).isRequired, + tutorialNow: PropTypes.number, + tutorialFinalizeIICOData: PropTypes.func.isRequired, + tutorialEditIICOBids: PropTypes.func.isRequired, + tutorialNext: PropTypes.func.isRequired } - handleSubmitBidFormSubmit = formData => { - const { address, createIICOBid } = this.props - createIICOBid( - address, - formData.amount, - formData.personalCap, - formData.noPersonalCap + static defaultProps = { + tutorialNow: null + } + + validateSubmitBidForm = values => { + const { data, bids } = this.props + const errors = {} + + // Check we are not exceeding the KYC max base contrib + if ( + !data.inReinforcedWhitelist && + bids.reduce((acc, b) => b.contrib + acc, 0) + Number(values.amount) > + data.maximumBaseContribution + ) + errors.amount = 'Cannot exceed maximum base KYC contribution.' + + // Check we are not submitting a personal cap lower than the valuation after the withdrawal lockup + if ( + Date.now() >= data.withdrawalLockTime.getTime() && + Number(values.personalCap) < data.valuation ) + errors.personalCap = 'Must be higher than amount raised.' + + return errors + } + + handleSubmitBidFormSubmit = ({ + amount: _amount, + personalCap: _personalCap, + noPersonalCap + }) => { + const { + accounts, + address, + data, + bids, + createIICOBid, + tutorialNow, + tutorialEditIICOBids, + tutorialNext + } = this.props + const amount = Number(_amount) + const personalCap = Number(_personalCap) + + // Calculate max token price + const bonusMultiplier = 1 + data.bonus + + const leftOverToBid = personalCap - (data.valuation + amount) + + // If `leftOverToBid` is positive, assume future bids will get the current bonus, if it's negative, assume bids we are removing have the current bonus. This overestimates the max token price in both cases. + const overEstimatedVirtualValuation = + data.virtualValuation + (amount + leftOverToBid) * bonusMultiplier + + const maxTokenPrice = + amount / + (data.tokensForSale * + (amount * bonusMultiplier / overEstimatedVirtualValuation)) + + toastr.confirm(null, { + okText: 'Confirm', + onOk: () => + tutorialNow + ? tutorialEditIICOBids( + { + ID: bids.length ? bids[bids.length - 1].ID + 1 : 0, + maxValuation: personalCap, + contrib: amount, + bonus: data.bonus, + contributor: accounts.data[0], + withdrawn: false, + redeemed: false + }, + () => { + if (bids.length === 0) tutorialNext() + } + ) + : createIICOBid(address, amount, personalCap, noPersonalCap), + component: () => ( +
+ {noPersonalCap ? ( + `You are going to contribute ${amount} ETH without a personal cap. This means you will get tokens no matter the price.` + ) : ( +
+ You are going to contribute {amount} ETH with a {personalCap} ETH + personal cap. If the total sum of accepted contributions is higher + than {personalCap} ETH, you will get reimbursed. Otherwise, you + will get tokens. This means that the maximum price per token you + would pay is +
+ {maxTokenPrice} ETH. +
+ )} +
+ ) + }) } handleWithdrawClick = ({ currentTarget: { id: _id } }) => { - const { address, data, bids, withdrawIICOBid } = this.props + const { + withdrawIICOBid, + address, + data, + bids, + tutorialNow, + tutorialEditIICOBids, + tutorialNext + } = this.props const id = Number(_id) - const now = Date.now() + const now = tutorialNow || Date.now() const endFullBonusTime = data.endFullBonusTime.getTime() const withdrawalLockTime = data.withdrawalLockTime.getTime() const bid = bids.find(b => b.ID === id) @@ -83,33 +184,61 @@ class Bids extends PureComponent { toastr.confirm(null, { okText: 'Yes', - onOk: () => withdrawIICOBid(address, id), + onOk: () => + tutorialNow + ? tutorialEditIICOBids(id, () => tutorialNext(), lockedIn, newBonus) + : withdrawIICOBid(address, id), component: () => ( -
+
Are you sure you wish to withdraw this bid?
{lockedIn} ETH
- would remain locked in and your new bonus would be -
- {numberToPercentage(newBonus)}. + would remain locked in{lockedIn ? ( + + {' '} + and your new bonus would be +
+ {numberToPercentage(newBonus)} +
+ ) : ( + '.' + )}
) }) } handleFinalizeIICOFormSubmit = formData => { - const { address, finalizeIICO } = this.props + const { + address, + finalizeIICO, + tutorialNow, + tutorialFinalizeIICOData, + tutorialNext + } = this.props + if (tutorialNow) return tutorialFinalizeIICOData(tutorialNext) + finalizeIICO(address, formData.maxIterations) } - handleRedeemClick = ({ currentTarget: { id } }) => { - const { address, redeemIICOBid } = this.props + handleRedeemClick = ({ currentTarget: { id: _id } }) => { + const { + address, + redeemIICOBid, + tutorialNow, + tutorialEditIICOBids, + tutorialNext + } = this.props + const id = Number(_id) + if (tutorialNow) return tutorialEditIICOBids(id, tutorialNext) + redeemIICOBid(address, Number(id)) } handleRedeemAllClick = () => { const { address, redeemIICOBids } = this.props + redeemIICOBids(address) } @@ -122,48 +251,103 @@ class Bids extends PureComponent { submitFinalizeIICOForm, data, bids, - updatingBids + updatingBids, + tutorialNow } = this.props - const now = Date.now() + const now = tutorialNow || Date.now() const hasStarted = now >= data.startTime.getTime() const hasEnded = now >= data.endTime.getTime() - const canBid = hasStarted && !hasEnded + const canWithdraw = hasStarted && now < data.withdrawalLockTime.getTime() const canRedeem = hasEnded && data.finalized + const inPartialWithdrawals = now > data.endFullBonusTime.getTime() + + const currentContribution = bids.reduce((acc, b) => b.contrib + acc, 0) + + let KYCLevelTooltip + let KYCLevel + if (data.inReinforcedWhitelist) { + KYCLevelTooltip = + "You have passed the Reinforced KYC (with ID) and can contribute as much ETH as you'd like" + KYCLevel = 'Reinforced' + } else if (data.inBaseWhitelist) { + KYCLevelTooltip = `You have passed the Base KYC (with no ID) and can contribute less than or equal to ${ + data.maximumBaseContribution + } ETH.` + KYCLevel = 'Base' + } else { + KYCLevelTooltip = 'You need to pass the KYC to participate in the sale.' + KYCLevel = 'None' + } return ( -
+

Your Bids

- {canBid && ( + {!tutorialNow && ( - } - /> - - ADD - - } - noFlex + label="KYC Level" + value={KYCLevel} + tooltip={KYCLevelTooltip} /> + {KYCLevel === 'Base' && ( + + {data.maximumBaseContribution - currentContribution} + + } + tooltip="This is the amount you still have left over to contribute." + /> + )} )} + {hasStarted && + !hasEnded && + (tutorialNow || + data.inReinforcedWhitelist || + (data.inBaseWhitelist && + data.maximumBaseContribution > currentContribution)) && ( + + + } + /> + 0) + } + > + ADD + + } + noFlex + /> + + )} {canRedeem && bids.some(b => !b.redeemed) && ( + } @@ -180,6 +364,7 @@ class Bids extends PureComponent { className="Bids-form" /> } + tooltip="The token sale is finalizing, refresh this page periodically until you see a redeem button." /> } + tooltip="The token sale is finalizing, refresh this page periodically until you see a redeem button." noFlex /> @@ -197,24 +383,34 @@ class Bids extends PureComponent { {IICOBid.creating && ( } + tooltip="ETH that is currently part of the sale." + /> + } + tooltip="This bid's personal cap." /> } + tooltip="This bid's bonus." /> } + tooltip="The price per token this bid got or would get if the sale were to end now." /> } + tooltip="Tokens that can be redeemed or could be redeemed if the sale were to end now." /> } + tooltip="ETH that can be redeemed or could be redeemed if the sale were to end now." /> )} @@ -228,53 +424,73 @@ class Bids extends PureComponent { let refund = b.contrib if (b.ID === data.cutOffBidID) { // This is the cutoff bid - contrib = data.cutOffContrib - refund = b.contrib - data.cutOffContrib + contrib = data.cutOffBidContrib + refund = b.contrib - data.cutOffBidContrib } else if ( - b.maxVal > data.cutOffBidMaxVal || - (b.maxVal === data.cutOffBidMaxVal && b.ID > data.cutOffBidID) + b.maxValuation > data.cutOffBidMaxValuation || + (b.maxValuation === data.cutOffBidMaxValuation && + b.ID > data.cutOffBidID) ) { // This bid is in the sale contrib = b.contrib refund = 0 } + const tokens = + contrib === 0 + ? 0 + : contrib * + (1 + b.bonus) / + data.virtualValuation * + data.tokensForSale + const updating = updatingBids && updatingBids.includes(b.ID) return ( - + {contrib}} + tooltip="ETH that is currently part of the sale." /> = 1.157920892373162e59 + ? '∞' + : b.maxValuation + } + tooltip="This bid's personal cap." /> = 1.157920892373162e59 ? '∞' : b.maxVal} + label="Bonus" + value={numberToPercentage(b.bonus)} + tooltip="This bid's bonus." /> - {contrib === 0 - ? 0 - : contrib * - (1 + b.bonus) / - data.virtualValuation * - data.tokensForSale} + {tokens === 0 ? 0 : contrib / tokens} } + tooltip="The price per token this bid got or would get if the sale were to end now." /> {tokens}} + tooltip="Tokens that can be redeemed or could be redeemed if the sale were to end now." + /> + {refund}} + tooltip="ETH that can be redeemed or could be redeemed if the sale were to end now." /> {((canWithdraw && !b.withdrawn) || (canRedeem && !b.redeemed)) && ( {updating ? ( @@ -314,6 +533,7 @@ class Bids extends PureComponent { export default connect( state => ({ IICOBid: state.IICO.IICOBid, + accounts: state.wallet.accounts, submitBidFormIsInvalid: getSubmitBidFormIsInvalid(state), finalizeIICOFormIsInvalid: getFinalizeIICOFormIsInvalid(state) }), diff --git a/src/containers/iico/components/data/index.js b/src/containers/iico/components/data/index.js index 2b9b78d..e5169b9 100644 --- a/src/containers/iico/components/data/index.js +++ b/src/containers/iico/components/data/index.js @@ -1,4 +1,5 @@ import React, { PureComponent } from 'react' +import PropTypes from 'prop-types' import * as IICOSelectors from '../../../../reducers/iico' import StatRow from '../../../../components/stat-row' @@ -14,7 +15,12 @@ import './data.css' export default class Data extends PureComponent { static propTypes = { // State - data: IICOSelectors._IICODataShape.isRequired + data: IICOSelectors._IICODataShape.isRequired, + tutorialNow: PropTypes.number + } + + static defaultProps = { + tutorialNow: null } calcBonus = percent => { @@ -35,23 +41,39 @@ export default class Data extends PureComponent { } render() { - const { data } = this.props + const { data, tutorialNow } = this.props + const percentageStartingBonus = numberToPercentage(data.startingBonus) // Times - const now = Date.now() + const now = tutorialNow || Date.now() const startTime = data.startTime.getTime() - const endTime = data.endTime.getTime() const endFullBonusTime = data.endFullBonusTime.getTime() const withdrawalLockTime = data.withdrawalLockTime.getTime() + const endTime = data.endTime.getTime() const duration = endTime - startTime // Phase let phase - if (now < startTime) phase = 'Not Started' - else if (now < endFullBonusTime) phase = 'Full Bonus' - else if (now < withdrawalLockTime) phase = 'Partial Withdrawals' - else if (now < endTime) phase = 'Withdrawal Lockup' - else phase = 'Finished' + let phaseTooltip + if (now < startTime) { + phase = 'Not Started' + phaseTooltip = + 'The sale has not started yet, look at the slider to see when it will start.' + } else if (now < endFullBonusTime) { + phase = 'Full Bonus' + phaseTooltip = `If you contribute now, you will have a ${percentageStartingBonus} bonus. You can also withdraw your contribution with no penalty.` + } else if (now < withdrawalLockTime) { + phase = 'Partial Withdrawals' + phaseTooltip = + 'You can still withdraw but only partially and with a 1/3 penalty on your bonus.' + } else if (now < endTime) { + phase = 'Withdrawal Lockup' + phaseTooltip = 'You can no longer withdraw.' + } else { + phase = 'Finished' + phaseTooltip = + 'The sale is over, once finalized, you can redeem your tokens and/or refunded ETH.' + } // Slider percents let initialPercent @@ -64,45 +86,97 @@ export default class Data extends PureComponent { return (
- + {data.tokenContractAddress}} + tooltip="This is the address of the ERC20 contract that holds the tokens for sale." + noWrap + /> + - {data.valuation || 0}} + tooltip="This is the sum of all contributions that are currently in the sale (not refunded)." + noWrap + /> + {data.ethPrice && ( + + )} + {data.ethPrice && ( + + $ + {(data.valuation || 0) * data.ethPrice} + +
+ } + noWrap + /> + )} + -
} noBackground + noWrap flexBasis={390} /> diff --git a/src/containers/iico/components/finalize-iico-form/index.js b/src/containers/iico/components/finalize-iico-form/index.js index 5ac8725..9cd2da8 100644 --- a/src/containers/iico/components/finalize-iico-form/index.js +++ b/src/containers/iico/components/finalize-iico-form/index.js @@ -5,17 +5,10 @@ export const { Form: FinalizeIICOForm, isInvalid: getFinalizeIICOFormIsInvalid, submit: submitFinalizeIICOForm -} = form( - 'finalizeIICOForm', - { - maxIterations: { - type: 'text', - validate: [required, number], - props: { type: 'number' } - } - }, - { - touchOnBlur: true, - touchOnChange: true +} = form('finalizeIICOForm', { + maxIterations: { + type: 'text', + validate: [required, number], + props: { type: 'number' } } -) +}) diff --git a/src/containers/iico/components/joyride/index.js b/src/containers/iico/components/joyride/index.js new file mode 100644 index 0000000..8963cd8 --- /dev/null +++ b/src/containers/iico/components/joyride/index.js @@ -0,0 +1,36 @@ +import React from 'react' +import PropTypes from 'prop-types' +import ReactJoyride from 'react-joyride' + +import steps from './steps' + +const Joyride = ({ getRef, callback }) => ( + +) + +Joyride.propTypes = { + // Callbacks + getRef: PropTypes.func.isRequired, + callback: PropTypes.func.isRequired +} + +export default Joyride diff --git a/src/containers/iico/components/joyride/steps.js b/src/containers/iico/components/joyride/steps.js new file mode 100644 index 0000000..f41ba6e --- /dev/null +++ b/src/containers/iico/components/joyride/steps.js @@ -0,0 +1,269 @@ +import React from 'react' + +export default [ + { + title: 'Welcome to the Interactive Coin Offering.', + text: ( + + Get started with the tutorial or skip it if you already know what you + are doing. +
+
+ First, let’s go over the sale’s main data points and explain what they + are. A full explanation can be found{' '} + + here + . +
+
+ + Keep in mind that everything you do in the tutorial is virtual and + does not create any transactions. + +
+ ), + selector: '#joyrideWelcome' + }, + { + text: ( + + This is the ICO’s contract address. +
+
+ You can hover over it to see it in full and you can click on it to + explore the contract on etherscan. Try doing that now. +
+ ), + selector: '#joyrideTokenContractAddress' + }, + { + text: ( + + This is the amount of tokens that are up for sale. +
+
+ They will be distributed proportionally across all bidders relative to + the size of their contributions and bonuses. +
+ ), + selector: '#joyrideTokensForSale' + }, + { + text: ( + + This is the sale’s current amount raised. +
+
+ That is, the sum of contributions if the sale were to end now and + personal caps were taken into account to see which ones should be + refunded. +
+
+ The number is truncated to two significant digits, but you can hover + over it to see it in full. +
+ ), + selector: '#joyrideValuation' + }, + { + text: ( + + This is the sale’s current phase. There are four phases and the actions + you can take are different in each one. +
+
+ Not Started: The sale has not started yet at this point, so there + is nothing you can do. +
+
+ Full Bonus: You may place bids that take advantage of the whole + bonus and withdrawing a bid will not leave any ETH locked in. +
+
+ Partial Withdrawals: You may still place bids, but the bonus has + started decreasing linearly, and the amount of ETH locked in when + withdrawing has started increasing linearly. +
+
+ Withdrawal Lockup: You may still place bids, but manual + withdrawals are no longer permitted. The only way for a bid to be + refunded is if the amount raised exceeds its personal cap. +
+
+ Finished: You may now redeem your tokens and/or ETH. +
+ ), + selector: '#joyridePhase' + }, + { + text: ( + + This is the sale’s starting bonus. +
+
+ This will start decreasing linearly at the end of the full bonus phase + down to zero at the end of the sale. +
+
+ A bid’s bonus increases its relative token purchasing power against + other bids. +
+
+ The share of tokens you receive is equal to your contribution plus your + bonus over the amount raised with everyone's bonuses factored in. +
+
+ Formula: (bid * (1 + (bonus / 100))) / amountRaisedWithBonuses +
+ ), + selector: '#joyrideStartingBonus' + }, + { + text: ( + + This is the sale’s current bonus. +
+
+ That is, the bonus your contribution would get if you were to make it + right now. +
+ ), + selector: '#joyrideCurrentBonus' + }, + { + text: ( + + This slider lets you preview the bonus throughout the lifetime of the + sale. +
+
+ The colored sections represent the different phases and the light blue + bar represents the current time. +
+
+ Hover over it now to preview the bonus at any stage of the sale. Let’s + skip time to the start of the sale. +
+ ), + selector: '#joyrideSlider' + }, + { + text: ( + + This is where you can make bids. The personal cap lets you set a max cap + at which you are willing to participate in the sale with. If the amount + raised ends up exceeding this value, your bid will be automatically + refunded. +
+
+ If you want to participate regardless of the amount raised, just check + the “No Personal Cap” checkbox. +
+
+ Try placing a bid now and take advantage of the “Full Bonus” phase. +
+
+ Place a bid to continue. +
+
+ + Remember that everything you do in the tutorial is virtual and does + not create any transactions. + +
+ ), + selector: '#joyridePlaceBid', + style: { button: { display: 'none' } } + }, + { + text: ( + + Congratulations on placing your first bid! +
+
+ Withdrawing now would give you all of your ETH back, but let’s skip + through time to demonstrate the lock in process. +
+ ), + selector: '#joyridePlacedBid' + }, + { + text: ( + + We are now in the “Partial Withdrawals” phase. +
+
+ Try withdrawing your bid, you’ll only be able to withdraw whatever + percentage of the “Partial Withdrawals” phase is left and your bonus + will be reduced by 1/3. +
+
+ That is, if you are 80% through the phase, you’ll only be able to + withdraw 20% of your bid and if your bonus was 15% it will be reduced to + 10%. This is to avoid blackout attacks by large players. +
+
+ See{' '} + + this + {' '} + article to learn more. +
+
+ Withdraw your bid to continue. +
+ ), + selector: '#joyrideWithdraw', + style: { button: { display: 'none' } } + }, + { + text: ( + + Nice, you've been refunded. +
+
+ Now, let’s skip to the end of the sale. +
+ ), + selector: '#joyrideWithdrew' + }, + { + text: ( + + Good job! Now you can redeem your tokens (for bids that stayed in the + sale) and/or ETH (for bids where the personal cap ended up being under + or in some cases equal to, the amount raised). +
+
+ Redeem your bid to continue. +
+ ), + selector: '#joyridePlacedBid', + style: { button: { display: 'none' } } + }, + { + text: ( + + Great, you are now more than ready to take part in a real Interactive + Coin Offering. +
+
+ Please let us know if you have any questions or concerns, feedback is + greatly appreciated. +
+
+ You will now be transferred to the real IICO interface where you can + make real transactions. +
+ ), + selector: '#joyrideFinish' + } +] diff --git a/src/containers/iico/components/submit-bid-form/index.js b/src/containers/iico/components/submit-bid-form/index.js index 3c3e5db..3a82478 100644 --- a/src/containers/iico/components/submit-bid-form/index.js +++ b/src/containers/iico/components/submit-bid-form/index.js @@ -10,26 +10,27 @@ export const { Form: SubmitBidForm, isInvalid: getSubmitBidFormIsInvalid, submit: submitSubmitBidForm -} = form( - 'submitBidForm', - { - amount: { - type: 'text', - validate: [required, number, positive, nonZero], - props: { type: 'number' } - }, - personalCap: { - type: 'text', - validate: [required, number, positive, nonZero], - props: { type: 'number' }, - visibleIf: '!noPersonalCap' - }, - noPersonalCap: { - type: 'checkbox' +} = form('submitBidForm', { + amount: { + type: 'text', + validate: [required, number, positive, nonZero], + props: { + type: 'number', + step: 1e-18, + placeholder: 'Amount (ETH)' } }, - { - touchOnBlur: true, - touchOnChange: true + personalCap: { + type: 'text', + validate: [required, number, positive, nonZero], + props: { + type: 'number', + step: 1e-18, + placeholder: 'Personal Cap (ETH)' + }, + visibleIf: '!noPersonalCap' + }, + noPersonalCap: { + type: 'checkbox' } -) +}) diff --git a/src/containers/iico/iico.scss b/src/containers/iico/iico.scss index 25c938b..5de6989 100644 --- a/src/containers/iico/iico.scss +++ b/src/containers/iico/iico.scss @@ -1,8 +1,11 @@ +@import '../../styles/_colors.scss'; + /* @define IICO */ .IICO { display: flex; justify-content: center; padding: 38px 8%; + position: relative; &-data { margin-bottom: 55px; @@ -12,4 +15,25 @@ display: flex; justify-content: center; } + + &-inTutorial { + position: absolute; + right: 60px; + top: 36px; + transform: translateY(-50%); + } + + &-replayTutorial { + background: $dark4; + border-radius: 16px; + color: $light; + cursor: pointer; + height: 32px; + line-height: 32px; + position: absolute; + right: 20px; + text-align: center; + top: 20px; + width: 32px; + } } diff --git a/src/containers/iico/index.js b/src/containers/iico/index.js index cc6b5e0..da664db 100644 --- a/src/containers/iico/index.js +++ b/src/containers/iico/index.js @@ -9,6 +9,7 @@ import * as IICOActions from '../../actions/iico' import Data from './components/data' import Bids from './components/bids' +import Joyride from './components/joyride' import './iico.css' @@ -30,6 +31,17 @@ class IICO extends PureComponent { fetchIICOBids: PropTypes.func.isRequired } + state = { + hasSeenTutorial: localStorage.getItem('hasSeenTutorial') === 'true', + inTutorial: false, + tutorialNow: null, + tutorialIICOData: null, + tutorialIICOBids: null + } + + pollIICODataInterval = null + joyrideRef = null + componentDidMount() { const { match: { params: { address } }, @@ -43,15 +55,243 @@ class IICO extends PureComponent { this.pollIICODataInterval = setInterval(() => pollIICOData(address), 5000) } + componentDidUpdate() { + const { IICOData, IICOBids } = this.props + const { hasSeenTutorial, inTutorial } = this.state + + if ( + !IICOData.loading && + IICOData.data && + !IICOBids.loading && + IICOBids.data && + !hasSeenTutorial && + !inTutorial + ) { + const tutorialIICOData = JSON.parse(JSON.stringify(IICOData)) + const tutorialIICOBids = JSON.parse(JSON.stringify(IICOBids)) + const startTime = IICOData.data.startTime.getTime() + this.setState({ + inTutorial: true, + tutorialNow: startTime - 1000, + tutorialIICOData: { + ...tutorialIICOData, + data: { + ...tutorialIICOData.data, + tokensForSale: 0.16 * 1e9, + startTime: new Date(startTime), + endFullBonusTime: new Date( + IICOData.data.endFullBonusTime.getTime() + ), + withdrawalLockTime: new Date( + IICOData.data.withdrawalLockTime.getTime() + ), + endTime: new Date(IICOData.data.endTime.getTime()), + bonus: IICOData.data.startingBonus, + valuation: 0, + virtualValuation: 0, + cutOffBidID: 0, + cutOffBidMaxValuation: 0, + cutOffBidContrib: 0, + finalized: false + } + }, + tutorialIICOBids: { + ...tutorialIICOBids, + data: [] + } + }) + } + } + componentWillUnmount() { clearInterval(this.pollIICODataInterval) } + getJoyrideRef = ref => { + this.joyrideRef = ref + this.joyrideRef && this.joyrideRef.reset(true) + } + + joyrideCallback = ({ type, step }) => { + const { tutorialIICOData } = this.state + + switch (type) { + case 'step:after': + switch (step.selector.slice('#joyride'.length)) { + case 'Slider': + this.setState({ + tutorialNow: tutorialIICOData.data.startTime.getTime() + }) + break + case 'PlacedBid': { + const endFullBonusTime = tutorialIICOData.data.endFullBonusTime.getTime() + const endTime = tutorialIICOData.data.endTime.getTime() + const tutorialNow = + endFullBonusTime + + (tutorialIICOData.data.withdrawalLockTime.getTime() - + endFullBonusTime) / + 2 + this.setState({ + tutorialNow, + tutorialIICOData: { + ...tutorialIICOData, + data: { + ...tutorialIICOData.data, + bonus: + tutorialIICOData.data.bonus * + ((endTime - tutorialNow) / (endTime - endFullBonusTime)) + } + } + }) + break + } + case 'Withdrew': + this.setState({ + tutorialNow: tutorialIICOData.data.endTime.getTime(), + tutorialIICOData: { + ...tutorialIICOData, + data: { + ...tutorialIICOData.data, + bonus: 0, + finalized: true + } + } + }) + break + default: + break + } + break + case 'finished': + this.setState( + { + hasSeenTutorial: true, + inTutorial: false, + tutorialNow: null, + tutorialIICOData: null, + tutorialIICOBids: null + }, + () => localStorage.setItem('hasSeenTutorial', true) + ) + break + default: + break + } + + setTimeout(() => dispatchEvent(new Event('resize')), 1000) // Fix tooltip positioning lag + } + + tutorialFinalizeIICOData = callback => { + const { tutorialIICOData } = this.state + + this.setState( + { + tutorialIICOData: { + ...tutorialIICOData, + data: { + ...tutorialIICOData.data, + finalized: true + } + } + }, + callback + ) + } + + tutorialEditIICOBids = (IICOBidOrID, callback, lockedIn, newBonus) => { + const { tutorialIICOData, tutorialIICOBids } = this.state + + let newBids + if (typeof IICOBidOrID === 'number') + newBids = tutorialIICOBids.data.map( + b => + b.ID === IICOBidOrID + ? lockedIn + ? { ...b, contrib: lockedIn, bonus: newBonus, withdrawn: true } + : { ...b, redeemed: true } + : b + ) + else newBids = [...tutorialIICOBids.data, IICOBidOrID] + + // Calculate new tutorial IICO Data + const bids = [...newBids].sort((a, b) => { + if (b.maxValuation === a.maxValuation) return b.ID - a.ID + return b.maxValuation - a.maxValuation + }) + let cutOffBidContrib + let cutOffBid = bids[bids.length - 1] + let valuation = 0 + let virtualValuation = 0 + for (const bid of bids) { + if (bid.contrib + valuation < bid.maxValuation) { + // We haven't found the cut-off yet. + cutOffBidContrib = bid.contrib + cutOffBid = bid + valuation += bid.contrib + virtualValuation += bid.contrib + bid.contrib * (1 + bid.bonus) + } else { + // We found the cut-off bid. This bid will be taken partially. + cutOffBidContrib = + bid.maxValuation >= valuation ? bid.maxValuation - valuation : 0 // The amount of the contribution of the cut-off bid that can stay in the sale without spilling over the maxValuation. + cutOffBid = bid + valuation += cutOffBidContrib + virtualValuation += + cutOffBidContrib + cutOffBidContrib * (1 + bid.bonus) + break + } + } + + // Set new tutorial state + this.setState( + { + tutorialIICOData: { + ...tutorialIICOData, + data: { + ...tutorialIICOData.data, + valuation, + virtualValuation, + cutOffBidID: cutOffBid.ID, + cutOffBidMaxValuation: cutOffBid.maxValuation, + cutOffBidContrib + } + }, + tutorialIICOBids: { + ...tutorialIICOBids, + data: newBids + } + }, + callback + ) + } + + tutorialNext = () => this.joyrideRef.next() + + handleReplayTutorialClick = () => { + localStorage.removeItem('hasSeenTutorial') + window.location.reload() + } + render() { - const { match: { params: { address } }, IICOData, IICOBids } = this.props + const { match } = this.props + const { + hasSeenTutorial, + inTutorial, + tutorialNow, + tutorialIICOData, + tutorialIICOBids + } = this.state + const { match: { params: { address } }, IICOData, IICOBids } = inTutorial + ? { match, IICOData: tutorialIICOData, IICOBids: tutorialIICOBids } + : this.props return (
+ {!hasSeenTutorial && ( + + )} -
- +
+
) } @@ -90,9 +336,16 @@ class IICO extends PureComponent { ) } failedLoading="The address or the contract it holds is invalid. Try another one." + extraLoadingValues={[!hasSeenTutorial && !inTutorial]} /> - {/* TODO: Render './components/submit-bid-form' and disable submit button if already participated */} - {/* TODO: Render withdraw button if already participated and in first period */} + {inTutorial &&
In Tutorial Mode
} +
+ i +
) } diff --git a/src/containers/simple-bid/index.js b/src/containers/simple-bid/index.js new file mode 100644 index 0000000..f5869f8 --- /dev/null +++ b/src/containers/simple-bid/index.js @@ -0,0 +1,151 @@ +import React, { PureComponent } from 'react' +import PropTypes from 'prop-types' +import { connect } from 'react-redux' +import { RenderIf } from 'lessdux' + +import * as IICOSelectors from '../../reducers/iico' +import * as IICOActions from '../../actions/iico' +import Identicon from '../../components/identicon' +import ETHQR from '../../components/eth-qr' + +import './simple-bid.css' + +class SimpleBid extends PureComponent { + static propTypes = { + // React Router + match: PropTypes.shape({ + params: PropTypes.shape({ address: PropTypes.string }).isRequired + }).isRequired, + + // Redux State + IICOData: IICOSelectors.IICODataShape.isRequired, + + // Action Dispatchers + fetchIICOData: PropTypes.func.isRequired, + pollIICOData: PropTypes.func.isRequired, + + // State + noWeb3: PropTypes.bool + } + + static defaultProps = { + // State + noWeb3: false + } + + componentDidMount() { + const { + match: { params: { address } }, + fetchIICOData, + pollIICOData, + noWeb3 + } = this.props + + if (!noWeb3) { + fetchIICOData(address) + this.pollIICODataInterval = setInterval(() => pollIICOData(address), 5000) + } + } + + componentWillUnmount() { + clearInterval(this.pollIICODataInterval) + } + + render() { + const { match: { params: { address } }, IICOData, noWeb3 } = this.props + return ( +
+ {noWeb3 && ( +

+ In order to access the advanced functionalities of the Interactive + Coin Offering, you need a Web3 enabled browser (like MetaMask or + Parity). +

+ )} +

+ If you don't care about setting a personal cap on the amount raised + for your bid, you can use any wallet software to send ETH directly to + the contract address. This is equivalent to submitting a bid with the + "No Personal Cap" checkbox checked on the interactive interface. +

+

+ The address you send from has to be whitelisted in the{' '} + + KYC + {' '} + and you need to send at least 300,000 gas with the transaction. + +

+

+ + DON'T SEND YOUR TRANSACTION FROM AN EXCHANGE OR YOUR FUNDS WILL BE + LOST. + +

+ {address && ( +
+ Contract Address: {address} +
+
+ Identicon: +
+
+ +
+
+ QR Code: +
+
+ +
+
+
+ )} +

+ At the end of the sale, you will just need to send a 0 ETH transaction + to the same contract in order to get your Tokens. We will contact you + at the end of the sale with a reminder. +

+ {noWeb3 && ( +

+ Otherwise, to look at contract data and place advanced bids, you can + come back with a Web3 enabled browser. +

+ )} +
+ ) + } +} + +export default connect( + state => ({ + IICOData: state.IICO.IICOData + }), + { + fetchIICOData: IICOActions.fetchIICOData, + pollIICOData: IICOActions.pollIICOData + } +)(SimpleBid) diff --git a/src/containers/simple-bid/simple-bid.scss b/src/containers/simple-bid/simple-bid.scss new file mode 100644 index 0000000..771be7c --- /dev/null +++ b/src/containers/simple-bid/simple-bid.scss @@ -0,0 +1,13 @@ +/* @define SimpleBid */ +.SimpleBid { + padding: 25px 15% 50px; + text-align: justify; + + &-addressInfo { + &-blocks { + display: flex; + justify-content: space-evenly; + margin-top: 24px; + } + } +} diff --git a/src/reducers/iico.js b/src/reducers/iico.js index 7b29fde..672af73 100644 --- a/src/reducers/iico.js +++ b/src/reducers/iico.js @@ -7,6 +7,9 @@ import * as IICOActions from '../actions/iico' export const _IICODataShape = PropTypes.shape({ address: PropTypes.string.isRequired, + // Centralized + ethPrice: PropTypes.number.isRequired, + // Token tokenContractAddress: PropTypes.string.isRequired, tokensForSale: PropTypes.number.isRequired, @@ -23,13 +26,18 @@ export const _IICODataShape = PropTypes.shape({ valuation: PropTypes.number.isRequired, virtualValuation: PropTypes.number.isRequired, cutOffBidID: PropTypes.number.isRequired, - cutOffBidMaxVal: PropTypes.number.isRequired, + cutOffBidMaxValuation: PropTypes.number.isRequired, cutOffBidContrib: PropTypes.number.isRequired, - finalized: PropTypes.bool.isRequired + finalized: PropTypes.bool.isRequired, + + // Optional Whitelist + maximumBaseContribution: PropTypes.number.isRequired, + inBaseWhitelist: PropTypes.bool.isRequired, + inReinforcedWhitelist: PropTypes.bool.isRequired }) export const _IICOBidShape = PropTypes.shape({ ID: PropTypes.number.isRequired, - maxVal: PropTypes.number.isRequired, + maxValuation: PropTypes.number.isRequired, contrib: PropTypes.number.isRequired, bonus: PropTypes.number.isRequired, contributor: PropTypes.string.isRequired, diff --git a/src/sagas/iico.js b/src/sagas/iico.js index 979f1e1..3a8097f 100644 --- a/src/sagas/iico.js +++ b/src/sagas/iico.js @@ -1,4 +1,5 @@ import Eth from 'ethjs' +import { getChecksumAddress } from 'ethjs-account' import { takeLatest, select, all, call, put } from 'redux-saga/effects' @@ -11,7 +12,7 @@ import { action } from '../utils/action' // Parsers const parseBid = (b, ID) => ({ ID, - maxVal: Number(Eth.fromWei(b.maxVal, 'ether')), + maxValuation: Number(Eth.fromWei(b.maxValuation, 'ether')), contrib: Number(Eth.fromWei(b.contrib, 'ether')), bonus: b.bonus.toNumber() / 1e9, contributor: b.contributor, @@ -57,8 +58,16 @@ function* fetchIICOData({ payload: { address } }) { // Load contract const contract = IICOContractFactory.at(address) + const account = yield select(walletSelectors.getAccount) const d = yield all({ + // Centralized + ethTicker: call(() => + fetch('https://api.coinmarketcap.com/v2/ticker/1027/') + .then(res => res.json()) + .catch(err => console.error(err)) + ), + // Token tokenContractAddress: call(contract.token), tokensForSale: call(contract.tokensForSale), @@ -73,14 +82,30 @@ function* fetchIICOData({ payload: { address } }) { startingBonus: call(contract.maxBonus), bonus: call(contract.bonus), valuationAndCutOff: call(contract.valuationAndCutOff), - finalized: call(contract.finalized) + finalized: call(contract.finalized), + + // Optional Whitelist + maximumBaseContribution: call(contract.maximumBaseContribution), + inBaseWhitelist: call(contract.baseWhitelist, account), + inReinforcedWhitelist: call(contract.reinforcedWhitelist, account) }) + let tokenContractAddress + try { + tokenContractAddress = getChecksumAddress(d.tokenContractAddress[0]) + } catch (err) { + console.error(err) + throw new Error() + } + return { address, + // Centralized + ethPrice: d.ethTicker && d.ethTicker.data.quotes.USD.price, + // Token - tokenContractAddress: d.tokenContractAddress[0], + tokenContractAddress, tokensForSale: Number(Eth.fromWei(d.tokensForSale[0], 'ether')), // Times @@ -95,9 +120,18 @@ function* fetchIICOData({ payload: { address } }) { valuation: Number(Eth.fromWei(d.valuationAndCutOff[0], 'ether')), virtualValuation: Number(Eth.fromWei(d.valuationAndCutOff[1], 'ether')), cutOffBidID: d.valuationAndCutOff[2].toNumber(), - cutOffBidMaxVal: Number(Eth.fromWei(d.valuationAndCutOff[3], 'ether')), + cutOffBidMaxValuation: Number( + Eth.fromWei(d.valuationAndCutOff[3], 'ether') + ), cutOffBidContrib: Number(Eth.fromWei(d.valuationAndCutOff[4], 'ether')), - finalized: d.finalized[0] + finalized: d.finalized[0], + + // Optional Whitelist + maximumBaseContribution: Number( + Eth.fromWei(d.maximumBaseContribution[0], 'ether') + ), + inBaseWhitelist: d.inBaseWhitelist[0], + inReinforcedWhitelist: d.inReinforcedWhitelist[0] } } diff --git a/src/sagas/index.js b/src/sagas/index.js index a474556..89afa93 100755 --- a/src/sagas/index.js +++ b/src/sagas/index.js @@ -28,7 +28,7 @@ export function makeRestartable(saga) { err ) - toastr.error('', err.message.slice(0, 100)) + err.message && toastr.error('', err.message.slice(0, 100)) yield call(delay, 3000) } } diff --git a/src/setupTests.js b/src/setupTests.js index 78e6ffa..b39e303 100755 --- a/src/setupTests.js +++ b/src/setupTests.js @@ -8,9 +8,12 @@ import 'jest-enzyme' // Configure configure({ adapter: new Adapter() }) -// Mock Modules +// Mock modules jest.mock('./components/identicon', () => () =>
[Identicon]
) -// Mock Time +// Mock fetch +window.fetch = jest.fn(() => new Promise(resolve => resolve(undefined))) + +// Mock time timezoneMock.register('UTC') Date.now = jest.fn(() => 1516916214006) diff --git a/src/styles/_global-components.scss b/src/styles/_global-components.scss new file mode 100644 index 0000000..9818bb1 --- /dev/null +++ b/src/styles/_global-components.scss @@ -0,0 +1,27 @@ +#global-components { + z-index: 1511; + + .redux-toastr { + .top-center { + margin-left: 0; + padding: 0; + transform: translateX(-50%); + width: 70%; + } + + .toastr { + $types: info warning success error; + $colors: $info $warning $success $error; + + @for $i from 1 through length($types) { + &.rrt-#{nth($types, $i)} { + background-color: nth($colors, $i); + } + } + } + } + + .__react_component_tooltip { + z-index: 99999999; + } +} diff --git a/src/styles/_joyride.scss b/src/styles/_joyride.scss new file mode 100644 index 0000000..9078f3b --- /dev/null +++ b/src/styles/_joyride.scss @@ -0,0 +1,17 @@ +@import '../styles/_colors.scss'; + +.joyride { + &-tooltip { + &__header { + border-color: $primary !important; + } + + &__button--primary { + background: $primary !important; + } + + &__close { + display: none !important; + } + } +} diff --git a/src/styles/_toastr.scss b/src/styles/_toastr.scss deleted file mode 100644 index 7027261..0000000 --- a/src/styles/_toastr.scss +++ /dev/null @@ -1,19 +0,0 @@ -.redux-toastr { - .top-center { - margin-left: 0; - padding: 0; - transform: translateX(-50%); - width: 70%; - } - - .toastr { - $types: info warning success error; - $colors: $info $warning $success $error; - - @for $i from 1 through length($types) { - &.rrt-#{nth($types, $i)} { - background-color: nth($colors, $i); - } - } - } -} diff --git a/src/styles/_typography.scss b/src/styles/_typography.scss index da0a77a..4c8afd2 100644 --- a/src/styles/_typography.scss +++ b/src/styles/_typography.scss @@ -70,19 +70,19 @@ // Headings h1 { - @include heading(1.5rem, 700); + @include heading(1.15rem, 700); } h2 { - @include heading(1.125rem, 300, $dark3); + @include heading(0.775rem, 300, $dark3); } h3 { - @include heading(2rem, 400, $dark2); + @include heading(1.65rem, 400, $dark2); } h4 { - @include heading(1rem, 400); + @include heading(0.65rem, 400); } // Paragraphs diff --git a/src/utils/saga.js b/src/utils/saga.js index a1c365e..a6fbb72 100644 --- a/src/utils/saga.js +++ b/src/utils/saga.js @@ -1,3 +1,4 @@ +import React from 'react' import { delay } from 'redux-saga' import { toastr } from 'react-redux-toastr' @@ -5,6 +6,7 @@ import { call, put } from 'redux-saga/effects' import { eth } from '../bootstrap/dapp-api' import * as walletActions from '../actions/wallet' +import ChainHash from '../components/chain-hash' import { action as _action, errorAction } from './action' @@ -49,7 +51,7 @@ export function* lessduxSaga(flow, resourceActions, saga, action) { }) ) } catch (err) { - toastr.error('', err.message.slice(0, 100)) + err.message && toastr.error('', err.message.slice(0, 100)) yield put(errorAction(resourceActions['FAIL' + failWord], err)) } } @@ -58,17 +60,37 @@ export function* lessduxSaga(flow, resourceActions, saga, action) { * Sends a transaction, waits for it to be mined, and updates the ETH balance. * @param {function} contractFunction - The transaction function to call. * @param {...any} args - The arguments to pass into the contractFunction. + * @returns {object} - The transaction receipt object. */ export function* sendTransaction(contractFunction, ...args) { + // Send transaction const hash = yield call(contractFunction, ...args) - let receipt + // Wait for receipt + let receipt while (!receipt) { receipt = yield call(eth.getTransactionReceipt, hash) yield call(delay, 200) } + // Refetch balance yield put(_action(walletActions.balance.FETCH)) + // Check for failures if (receipt.status === '0x0') throw new Error('Transaction failed.') + + // Show success message + toastr.success('', '', { + timeOut: 0, + component: () => ( +
+ Your transaction with hash{' '} + {receipt.transactionHash} was completed + succesfully. +
+ ) + }) + + // Return receipt + return receipt } diff --git a/src/utils/validation.js b/src/utils/validation.js index 41bc93f..72a37d5 100755 --- a/src/utils/validation.js +++ b/src/utils/validation.js @@ -1,3 +1,5 @@ +import { strictETHAddressRegExp } from '../bootstrap/dapp-api' + // General export const required = name => v => v === undefined ? `${name} is required.` : undefined @@ -9,3 +11,9 @@ export const positive = name => v => Number(v) < 0 ? `${name} must be a positive number.` : undefined export const nonZero = name => v => Number(v) === 0 ? `${name} can't be zero.` : undefined + +// Ethereum +export const isETHAddress = name => v => + !strictETHAddressRegExp.test(v) || v.length !== 42 + ? `${name} must be a valid address.` + : undefined diff --git a/stories/eth-qr.js b/stories/eth-qr.js new file mode 100644 index 0000000..e97c1ef --- /dev/null +++ b/stories/eth-qr.js @@ -0,0 +1,8 @@ +import React from 'react' +import { storiesOf } from '@storybook/react' + +import ETHQR from '../src/components/eth-qr' + +storiesOf('ETH QR', module).add('with address(0)', () => ( + +)) diff --git a/stories/index.js b/stories/index.js index e551f0b..2a50504 100755 --- a/stories/index.js +++ b/stories/index.js @@ -3,6 +3,7 @@ import './chain-hash' import './chain-number' import './checkbox' import './circle' +import './eth-qr' import './form' import './identicon' import './nav-bar' diff --git a/yarn.lock b/yarn.lock index a5f47e4..db84e4f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -913,6 +913,14 @@ async@^2.1.2, async@^2.1.4, async@^2.4.1, async@^2.6.0: dependencies: lodash "^4.14.0" +async@~0.9.0: + version "0.9.2" + resolved "https://registry.yarnpkg.com/async/-/async-0.9.2.tgz#aea74d5e61c1f899613bf64bda66d4c78f2fd17d" + +async@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/async/-/async-1.0.0.tgz#f8fc04ca3a13784ade9e1641af98578cfbd647a9" + asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" @@ -2429,6 +2437,12 @@ camelcase@^4.0.0, camelcase@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" +can-promise@^0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/can-promise/-/can-promise-0.0.1.tgz#7a7597ad801fb14c8b22341dfec314b6bd6ad8d3" + dependencies: + window-or-global "^1.0.1" + caniuse-api@^1.5.2: version "1.6.1" resolved "https://registry.yarnpkg.com/caniuse-api/-/caniuse-api-1.6.1.tgz#b534e7c734c4f81ec5fbe8aca2ad24354b962c6c" @@ -2850,7 +2864,7 @@ colors@0.5.x: version "0.5.1" resolved "https://registry.yarnpkg.com/colors/-/colors-0.5.1.tgz#7d0023eaeb154e8ee9fce75dcb923d0ed1667774" -colors@1.0.3: +colors@1.0.3, colors@1.0.x: version "1.0.3" resolved "https://registry.yarnpkg.com/colors/-/colors-1.0.3.tgz#0433f44d809680fdeb60ed260f1b0c262e82a40b" @@ -2858,6 +2872,10 @@ colors@^1.1.2: version "1.2.1" resolved "https://registry.yarnpkg.com/colors/-/colors-1.2.1.tgz#f4a3d302976aaf042356ba1ade3b1a2c62d9d794" +colors@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/colors/-/colors-1.2.4.tgz#e0cb41d3e4b20806b3bfc27f4559f01b94bc2f7c" + colors@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/colors/-/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63" @@ -3475,6 +3493,10 @@ currently-unhandled@^0.4.1: dependencies: array-find-index "^1.0.1" +cycle@1.0.x: + version "1.0.3" + resolved "https://registry.yarnpkg.com/cycle/-/cycle-1.0.3.tgz#21e80b2be8580f98b468f379430662b046c34ad2" + cyclist@~0.2.2: version "0.2.2" resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-0.2.2.tgz#1b33792e11e914a2fd6d6ed6447464444e5fa640" @@ -3579,6 +3601,10 @@ deep-equal@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.0.1.tgz#f5d260292b660e084eff4cdbc9f08ad3247448b5" +deep-equal@~0.2.1: + version "0.2.2" + resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-0.2.2.tgz#84b745896f34c684e98f2ce0e42abaf43bba017d" + deep-extend@^0.4.0, deep-extend@~0.4.0: version "0.4.2" resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.4.2.tgz#48b699c27e334bf89f10892be432f6e4c7d34a7f" @@ -3724,6 +3750,10 @@ diffie-hellman@^5.0.0: miller-rabin "^4.0.0" randombytes "^2.0.0" +dijkstrajs@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/dijkstrajs/-/dijkstrajs-1.0.1.tgz#d3cd81221e3ea40742cfcde556d4e99e98ddc71b" + dir-glob@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-2.0.0.tgz#0b205d2b6aef98238ca286598a8204d29d0a0034" @@ -3922,6 +3952,15 @@ elegant-spinner@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/elegant-spinner/-/elegant-spinner-1.0.1.tgz#db043521c95d7e303fd8f345bedc3349cfb0729e" +elliptic@6.3.2: + version "6.3.2" + resolved "http://registry.npmjs.org/elliptic/-/elliptic-6.3.2.tgz#e4c81e0829cf0a65ab70e998b8232723b5c1bc48" + dependencies: + bn.js "^4.4.0" + brorand "^1.0.1" + hash.js "^1.0.0" + inherits "^2.0.1" + elliptic@^6.0.0: version "6.4.0" resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.4.0.tgz#cac9af8762c85836187003c8dfe193e5e2eae5df" @@ -4017,7 +4056,7 @@ enzyme-matchers@^4.2.0: circular-json-es6 "^2.0.1" deep-equal-ident "^1.1.1" -enzyme-to-json@^3.3.0: +enzyme-to-json@^3.3.0, enzyme-to-json@^3.3.3: version "3.3.3" resolved "https://registry.yarnpkg.com/enzyme-to-json/-/enzyme-to-json-3.3.3.tgz#ede45938fb309cd87ebd4386f60c754525515a07" dependencies: @@ -4593,6 +4632,15 @@ ethjs-abi@0.2.0: js-sha3 "0.5.5" number-to-bn "1.7.0" +ethjs-account@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/ethjs-account/-/ethjs-account-0.1.4.tgz#27a83786bd0c33b1625be8608dc22b009dbf7b87" + dependencies: + elliptic "6.3.2" + ethjs-sha3 "0.1.2" + randomhex "0.1.5" + strip-hex-prefix "^1.0.0" + ethjs-contract@0.1.9: version "0.1.9" resolved "https://registry.yarnpkg.com/ethjs-contract/-/ethjs-contract-0.1.9.tgz#1c2766896a56d47ec1d6d661829c49cc38a5520a" @@ -4638,6 +4686,12 @@ ethjs-schema@0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/ethjs-schema/-/ethjs-schema-0.2.0.tgz#07b46d4f55b792a846c90a79f330d31d112cca38" +ethjs-sha3@0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/ethjs-sha3/-/ethjs-sha3-0.1.2.tgz#e03f6c34a3c4206bdec28d4174d6d7ff066a15d2" + dependencies: + hash.js "1.0.3" + ethjs-unit@0.1.6: version "0.1.6" resolved "https://registry.yarnpkg.com/ethjs-unit/-/ethjs-unit-0.1.6.tgz#c665921e476e87bce2a9d588a6fe0405b2c41699" @@ -4895,6 +4949,10 @@ extsprintf@^1.2.0: version "1.4.0" resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" +eyes@0.1.x: + version "0.1.8" + resolved "https://registry.yarnpkg.com/eyes/-/eyes-0.1.8.tgz#62cf120234c683785d902348a800ef3e0cc20bc0" + fast-deep-equal@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz#c053477817c86b51daa853c81e059b733d023614" @@ -5557,7 +5615,7 @@ global-prefix@^1.0.1: is-windows "^1.0.1" which "^1.2.14" -global@^4.3.2: +global@^4.3.2, global@~4.3.0: version "4.3.2" resolved "https://registry.yarnpkg.com/global/-/global-4.3.2.tgz#e76989268a6c74c38908b1305b10fc0e394e9d0f" dependencies: @@ -5830,6 +5888,12 @@ hash-base@^3.0.0: inherits "^2.0.1" safe-buffer "^5.0.1" +hash.js@1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.0.3.tgz#1332ff00156c0a0ffdd8236013d07b77a0451573" + dependencies: + inherits "^2.0.1" + hash.js@^1.0.0, hash.js@^1.0.3: version "1.1.3" resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.3.tgz#340dedbe6290187151c1ea1d777a3448935df846" @@ -6089,6 +6153,10 @@ hyphenate-style-name@^1.0.1, hyphenate-style-name@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/hyphenate-style-name/-/hyphenate-style-name-1.0.2.tgz#31160a36930adaf1fc04c6074f7eb41465d4ec4b" +i@0.3.x: + version "0.3.6" + resolved "https://registry.yarnpkg.com/i/-/i-0.3.6.tgz#d96c92732076f072711b6b10fd7d4f65ad8ee23d" + ice-cap@0.0.4: version "0.0.4" resolved "https://registry.yarnpkg.com/ice-cap/-/ice-cap-0.0.4.tgz#8a6d31ab4cac8d4b56de4fa946df3352561b6e18" @@ -6708,6 +6776,10 @@ isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" +isarray@^2.0.1: + version "2.0.4" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.4.tgz#38e7bcbb0f3ba1b7933c86ba1894ddfc3781bbb7" + isexe@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" @@ -6729,7 +6801,7 @@ isomorphic-fetch@^2.1.1: node-fetch "^1.0.1" whatwg-fetch ">=0.10.0" -isstream@~0.1.2: +isstream@0.1.x, isstream@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" @@ -8165,7 +8237,7 @@ mixin-object@^2.0.1: for-in "^0.1.3" is-extendable "^0.1.1" -mkdirp@0.5.1, mkdirp@0.5.x, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@~0.5.1: +mkdirp@0.5.1, mkdirp@0.5.x, mkdirp@0.x.x, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@~0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" dependencies: @@ -8222,7 +8294,7 @@ mute-stream@0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.6.tgz#48962b19e169fd1dfc240b3f1e7317627bbc47db" -mute-stream@0.0.7: +mute-stream@0.0.7, mute-stream@~0.0.4: version "0.0.7" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" @@ -8257,6 +8329,10 @@ ncname@1.0.x: dependencies: xml-char-classes "^1.0.0" +ncp@1.0.x: + version "1.0.1" + resolved "https://registry.yarnpkg.com/ncp/-/ncp-1.0.1.tgz#d15367e5cb87432ba117d2bf80fdf45aecfb4246" + nearley@^2.7.10: version "2.13.0" resolved "https://registry.yarnpkg.com/nearley/-/nearley-2.13.0.tgz#6e7b0f4e68bfc3e74c99eaef2eda39e513143439" @@ -8274,6 +8350,10 @@ neo-async@^2.5.0: version "2.5.0" resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.5.0.tgz#76b1c823130cca26acfbaccc8fbaf0a2fa33b18f" +nested-property@^0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/nested-property/-/nested-property-0.0.7.tgz#ff222f233ca8793c6828b4117091bea597130f4f" + next-tick@1: version "1.0.0" resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.0.0.tgz#ca86d1fe8828169b0120208e3dc8424b9db8342c" @@ -9078,10 +9158,22 @@ pkg-dir@^2.0.0: dependencies: find-up "^2.1.0" +pkginfo@0.3.x: + version "0.3.1" + resolved "https://registry.yarnpkg.com/pkginfo/-/pkginfo-0.3.1.tgz#5b29f6a81f70717142e09e765bbeab97b4f81e21" + +pkginfo@0.x.x: + version "0.4.1" + resolved "https://registry.yarnpkg.com/pkginfo/-/pkginfo-0.4.1.tgz#b5418ef0439de5425fc4995042dced14fb2a84ff" + pluralize@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-7.0.0.tgz#298b89df8b93b0221dbf421ad2b1b1ea23fc6777" +pngjs@^3.3.0: + version "3.3.3" + resolved "https://registry.yarnpkg.com/pngjs/-/pngjs-3.3.3.tgz#85173703bde3edac8998757b96e5821d0966a21b" + portfinder@^1.0.9: version "1.0.13" resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.13.tgz#bb32ecd87c27104ae6ee44b5a3ccbf0ebb1aede9" @@ -9583,6 +9675,17 @@ promise@^7.1.1: dependencies: asap "~2.0.3" +prompt@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/prompt/-/prompt-1.0.0.tgz#8e57123c396ab988897fb327fd3aedc3e735e4fe" + dependencies: + colors "^1.1.2" + pkginfo "0.x.x" + read "1.0.x" + revalidator "0.1.x" + utile "0.3.x" + winston "2.1.x" + prop-types@^15.5.10, prop-types@^15.5.4, prop-types@^15.5.6, prop-types@^15.5.7, prop-types@^15.5.8, prop-types@^15.5.9, prop-types@^15.6.0, prop-types@^15.6.1: version "15.6.1" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.6.1.tgz#36644453564255ddda391191fb3a125cbdf654ca" @@ -9661,6 +9764,16 @@ q@^1.1.2, q@^1.4.1, q@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" +qrcode@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/qrcode/-/qrcode-1.2.0.tgz#330d24313fbf8d429a806091af9525250239e44a" + dependencies: + can-promise "^0.0.1" + dijkstrajs "^1.0.1" + isarray "^2.0.1" + pngjs "^3.3.0" + yargs "^8.0.2" + qs@6.5.1, qs@^6.5.1, qs@~6.5.1: version "6.5.1" resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.1.tgz#349cdf6eef89ec45c12d7d5eb3fc0c870343a6d8" @@ -9723,6 +9836,12 @@ raf@3.4.0, raf@^3.4.0: dependencies: performance-now "^2.1.0" +rafl@~1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/rafl/-/rafl-1.2.2.tgz#fe930f758211020d47e38815f5196a8be4150740" + dependencies: + global "~4.3.0" + railroad-diagrams@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/railroad-diagrams/-/railroad-diagrams-1.0.0.tgz#eb7e6267548ddedfb899c1b90e57374559cddb7e" @@ -9758,6 +9877,10 @@ randomfill@^1.0.3: randombytes "^2.0.5" safe-buffer "^5.1.0" +randomhex@0.1.5: + version "0.1.5" + resolved "https://registry.yarnpkg.com/randomhex/-/randomhex-0.1.5.tgz#baceef982329091400f2a2912c6cd02f1094f585" + range-parser@^1.0.3, range-parser@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e" @@ -9916,6 +10039,13 @@ react-inspector@^2.2.2: babel-runtime "^6.26.0" is-dom "^1.0.9" +react-joyride@^1.11.4: + version "1.11.4" + resolved "https://registry.yarnpkg.com/react-joyride/-/react-joyride-1.11.4.tgz#974369da82ac5c2d563f754f13bed1210f18cb3c" + dependencies: + nested-property "^0.0.7" + scroll "^2.0.3" + react-json-view@^1.13.3: version "1.16.1" resolved "https://registry.yarnpkg.com/react-json-view/-/react-json-view-1.16.1.tgz#ab81fc7db5af70135248704e37741cf097f46604" @@ -10184,6 +10314,12 @@ read-pkg@^3.0.0: normalize-package-data "^2.3.2" path-type "^3.0.0" +read@1.0.x: + version "1.0.7" + resolved "https://registry.yarnpkg.com/read/-/read-1.0.7.tgz#b3da19bd052431a97671d44a42634adf710b40c4" + dependencies: + mute-stream "~0.0.4" + "readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.4, readable-stream@^2.0.6, readable-stream@^2.1.4, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.2.9, readable-stream@^2.3.3, readable-stream@^2.3.5: version "2.3.5" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.5.tgz#b4f85003a938cbb6ecbce2a124fb1012bd1a838d" @@ -10749,6 +10885,10 @@ ret@~0.1.10: version "0.1.15" resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" +revalidator@0.1.x: + version "0.1.8" + resolved "https://registry.yarnpkg.com/revalidator/-/revalidator-0.1.8.tgz#fece61bfa0c1b52a206bd6b18198184bdd523a3b" + right-align@^0.1.1: version "0.1.3" resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" @@ -10759,7 +10899,7 @@ right-pad@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/right-pad/-/right-pad-1.0.1.tgz#8ca08c2cbb5b55e74dafa96bf7fd1a27d568c8d0" -rimraf@2, rimraf@^2.2.8, rimraf@^2.5.1, rimraf@^2.5.2, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2: +rimraf@2, rimraf@2.x.x, rimraf@^2.2.8, rimraf@^2.5.1, rimraf@^2.5.2, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2: version "2.6.2" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36" dependencies: @@ -10887,6 +11027,12 @@ scoped-regex@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/scoped-regex/-/scoped-regex-1.0.0.tgz#a346bb1acd4207ae70bd7c0c7ca9e566b6baddb8" +scroll@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/scroll/-/scroll-2.0.3.tgz#0951b785544205fd17753bc3d294738ba16fc2ab" + dependencies: + rafl "~1.2.1" + scss-tokenizer@^0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/scss-tokenizer/-/scss-tokenizer-0.2.3.tgz#8eb06db9a9723333824d3f5530641149847ce5d1" @@ -11324,6 +11470,10 @@ ssri@^5.2.4: dependencies: safe-buffer "^5.1.1" +stack-trace@0.0.x: + version "0.0.10" + resolved "https://registry.yarnpkg.com/stack-trace/-/stack-trace-0.0.10.tgz#547c70b347e8d32b4e108ea1a2a159e5fdde19c0" + staged-git-files@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/staged-git-files/-/staged-git-files-1.0.0.tgz#cdb847837c1fcc52c08a872d4883cc0877668a80" @@ -11533,7 +11683,7 @@ strip-eof@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" -strip-hex-prefix@1.0.0: +strip-hex-prefix@1.0.0, strip-hex-prefix@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz#0c5f155fef1151373377de9dbb588da05500e36f" dependencies: @@ -12358,6 +12508,17 @@ utila@~0.4: version "0.4.0" resolved "https://registry.yarnpkg.com/utila/-/utila-0.4.0.tgz#8a16a05d445657a3aea5eecc5b12a4fa5379772c" +utile@0.3.x: + version "0.3.0" + resolved "https://registry.yarnpkg.com/utile/-/utile-0.3.0.tgz#1352c340eb820e4d8ddba039a4fbfaa32ed4ef3a" + dependencies: + async "~0.9.0" + deep-equal "~0.2.1" + i "0.3.x" + mkdirp "0.x.x" + ncp "1.0.x" + rimraf "2.x.x" + utils-merge@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" @@ -12745,10 +12906,26 @@ widest-line@^2.0.0: dependencies: string-width "^2.1.1" +window-or-global@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/window-or-global/-/window-or-global-1.0.1.tgz#dbe45ba2a291aabc56d62cf66c45b7fa322946de" + window-size@0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" +winston@2.1.x: + version "2.1.1" + resolved "https://registry.yarnpkg.com/winston/-/winston-2.1.1.tgz#3c9349d196207fd1bdff9d4bc43ef72510e3a12e" + dependencies: + async "~1.0.0" + colors "1.0.x" + cycle "1.0.x" + eyes "0.1.x" + isstream "0.1.x" + pkginfo "0.3.x" + stack-trace "0.0.x" + word-wrap@^1.0.3: version "1.2.3" resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c"