build/contracts/TokenSale.json
{
"contractName": "TokenSale",
"abi": [
{
"constant": true,
"inputs": [],
"name": "hasClosed",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [],
"name": "renounceKYCVerifier",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "rate",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "account",
"type": "address"
}
],
"name": "addKYCVerifier",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [],
"name": "unpause",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "weiRaised",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "account",
"type": "address"
}
],
"name": "kycAuthorized",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "account",
"type": "address"
}
],
"name": "isPauser",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "isOpen",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "closingTime",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [],
"name": "finalize",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "wallet",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "paused",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "account",
"type": "address"
}
],
"name": "isKYCVerifier",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [],
"name": "renouncePauser",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "account",
"type": "address"
}
],
"name": "addPauser",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [],
"name": "pause",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "MINIMUM_CONTRIBUTION",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "FIRST_DAY_DURATION",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "accounts",
"type": "address[]"
}
],
"name": "grantKYCAuthorizations",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "accounts",
"type": "address[]"
}
],
"name": "revertKYCAuthorizations",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "finalized",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "openingTime",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "beneficiary",
"type": "address"
}
],
"name": "buyTokens",
"outputs": [],
"payable": true,
"stateMutability": "payable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "FIRST_DAY_MINIMUM_CONTRIBUTION",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "token",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"name": "openingTime",
"type": "uint256"
},
{
"name": "closingTime",
"type": "uint256"
},
{
"name": "firstDayRate",
"type": "uint256"
},
{
"name": "rate",
"type": "uint256"
},
{
"name": "wallet",
"type": "address"
},
{
"name": "pool",
"type": "address"
},
{
"name": "token",
"type": "address"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"payable": true,
"stateMutability": "payable",
"type": "fallback"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "by",
"type": "address"
},
{
"indexed": true,
"name": "account",
"type": "address"
}
],
"name": "KYCAuthorizationGranted",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "by",
"type": "address"
},
{
"indexed": true,
"name": "account",
"type": "address"
}
],
"name": "KYCAuthorizationReverted",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "account",
"type": "address"
}
],
"name": "KYCVerifierAdded",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "account",
"type": "address"
}
],
"name": "KYCVerifierRemoved",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"name": "account",
"type": "address"
}
],
"name": "Paused",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"name": "account",
"type": "address"
}
],
"name": "Unpaused",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "account",
"type": "address"
}
],
"name": "PauserAdded",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "account",
"type": "address"
}
],
"name": "PauserRemoved",
"type": "event"
},
{
"anonymous": false,
"inputs": [],
"name": "CrowdsaleFinalized",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "purchaser",
"type": "address"
},
{
"indexed": true,
"name": "beneficiary",
"type": "address"
},
{
"indexed": false,
"name": "value",
"type": "uint256"
},
{
"indexed": false,
"name": "amount",
"type": "uint256"
}
],
"name": "TokensPurchased",
"type": "event"
},
{
"constant": true,
"inputs": [],
"name": "getCurrentRate",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
}
],
"bytecode": "0x60806040523480156200001157600080fd5b5060405160e080620020f9833981018060405260e08110156200003357600080fd5b8101908080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190505050868685858460016000819055506000831115156200009d57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614151515620000da57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156200011757600080fd5b8260038190555081600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505050428210151515620001b357600080fd5b8181111515620001c257600080fd5b816005819055508060068190555050506000600760006101000a81548160ff0219169083151502179055506200020733620003ff640100000000026401000000009004565b6000600960006101000a81548160ff0219169083151502179055506200023c3362000469640100000000026401000000009004565b600085111515620002b5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f6669727374206461792072617465206d7573742062652061626f76652030000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141515156200035b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f706f6f6c2063616e6e6f7420626520746865207a65726f20616464726573730081525060200191505060405180910390fd5b86600c8190555084600d8190555083600e8190555081600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080601060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505050505050506200062b565b62000423816008620004d364010000000002620018a2179091906401000000009004565b8073ffffffffffffffffffffffffffffffffffffffff167f6719d08c1888103bea251a4ed56406bd0c3e69723c8a1686e017e7bbe159b6f860405160405180910390a250565b6200048d81600a620004d364010000000002620018a2179091906401000000009004565b8073ffffffffffffffffffffffffffffffffffffffff167f5565480284cbd6151ab5813b9bd9e9b3f9e0e7d2a3a8110e0ca9b24ca819dc0160405160405180910390a250565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156200051057600080fd5b6200052b828262000596640100000000026401000000009004565b1515156200053857600080fd5b60018260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614151515620005d457600080fd5b8260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b611abe806200063b6000396000f3fe60806040526004361061015f576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680631515bc2b1461016a57806318e6010f146101995780632c4e722e146101b057806334ce5d2d146101db5780633f4ba83a1461022c5780634042b66f1461024357806342a14d1f1461026e57806346fbf68e146102d757806347535d7b146103405780634b6753bc1461036f5780634bb278f31461039a578063521eb273146103b15780635c975abb14610408578063696eee51146104375780636ef8d66d146104a057806382dc1ec4146104b75780638456cb59146105085780638d0bba031461051f578063923f7ce21461054a578063b3449bbc14610575578063b3b5e6ea1461063a578063b3f05b97146106ff578063b7a8807c1461072e578063ec8ac4d814610759578063ee5543971461079d578063f7fb07b0146107c8578063fc0c546a146107f3575b6101683361084a565b005b34801561017657600080fd5b5061017f610940565b604051808215151515815260200191505060405180910390f35b3480156101a557600080fd5b506101ae61094c565b005b3480156101bc57600080fd5b506101c5610957565b6040518082815260200191505060405180910390f35b3480156101e757600080fd5b5061022a600480360360208110156101fe57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610961565b005b34801561023857600080fd5b506102416109ea565b005b34801561024f57600080fd5b50610258610a99565b6040518082815260200191505060405180910390f35b34801561027a57600080fd5b506102bd6004803603602081101561029157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610aa3565b604051808215151515815260200191505060405180910390f35b3480156102e357600080fd5b50610326600480360360208110156102fa57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610af9565b604051808215151515815260200191505060405180910390f35b34801561034c57600080fd5b50610355610b16565b604051808215151515815260200191505060405180910390f35b34801561037b57600080fd5b50610384610b31565b6040518082815260200191505060405180910390f35b3480156103a657600080fd5b506103af610b3b565b005b3480156103bd57600080fd5b506103c6610bbb565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561041457600080fd5b5061041d610be5565b604051808215151515815260200191505060405180910390f35b34801561044357600080fd5b506104866004803603602081101561045a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610bfc565b604051808215151515815260200191505060405180910390f35b3480156104ac57600080fd5b506104b5610c19565b005b3480156104c357600080fd5b50610506600480360360208110156104da57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c24565b005b34801561051457600080fd5b5061051d610c44565b005b34801561052b57600080fd5b50610534610cf4565b6040518082815260200191505060405180910390f35b34801561055657600080fd5b5061055f610d00565b6040518082815260200191505060405180910390f35b34801561058157600080fd5b506106386004803603602081101561059857600080fd5b81019080803590602001906401000000008111156105b557600080fd5b8201836020820111156105c757600080fd5b803590602001918460208302840111640100000000831117156105e957600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050610d07565b005b34801561064657600080fd5b506106fd6004803603602081101561065d57600080fd5b810190808035906020019064010000000081111561067a57600080fd5b82018360208201111561068c57600080fd5b803590602001918460208302840111640100000000831117156106ae57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050610e84565b005b34801561070b57600080fd5b50610714611001565b604051808215151515815260200191505060405180910390f35b34801561073a57600080fd5b50610743611018565b6040518082815260200191505060405180910390f35b61079b6004803603602081101561076f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061084a565b005b3480156107a957600080fd5b506107b2611022565b6040518082815260200191505060405180910390f35b3480156107d457600080fd5b506107dd61102e565b6040518082815260200191505060405180910390f35b3480156107ff57600080fd5b50610808611062565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60016000808282540192505081905550600080549050600034905061086f838261108c565b600061087a82611351565b90506108918260045461137490919063ffffffff16565b6004819055506108a18482611395565b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f6faf93231a456e552dbc9961f58d9713ee4f2e69d15f1975b050ef0911053a7b8484604051808381526020018281526020019250505060405180910390a361091884836113a3565b6109206113a7565b61092a8483611412565b50506000548114151561093c57600080fd5b5050565b60006006544211905090565b61095533611416565b565b6000600354905090565b61096a33610bfc565b15156109de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f6d757374206265204b594320766572696669657200000000000000000000000081525060200191505060405180910390fd5b6109e781611470565b50565b6109f333610af9565b15156109fe57600080fd5b600960009054906101000a900460ff161515610a1957600080fd5b6000600960006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1565b6000600454905090565b6000600b60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b6000610b0f8260086114ca90919063ffffffff16565b9050919050565b60006005544210158015610b2c57506006544211155b905090565b6000600654905090565b600760009054906101000a900460ff16151515610b5757600080fd5b610b5f610940565b1515610b6a57600080fd5b6001600760006101000a81548160ff021916908315150217905550610b8d61155e565b7f9270cc390c096600a1c17c44345a1ba689fafd99d97487b10cfccf86cf73183660405160405180910390a1565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000600960009054906101000a900460ff16905090565b6000610c1282600a6114ca90919063ffffffff16565b9050919050565b610c223361168f565b565b610c2d33610af9565b1515610c3857600080fd5b610c41816116e9565b50565b610c4d33610af9565b1515610c5857600080fd5b600960009054906101000a900460ff16151515610c7457600080fd5b6001600960006101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25833604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1565b67016345785d8a000081565b6201518081565b610d1033610bfc565b1515610d84576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f6d757374206265204b594320766572696669657200000000000000000000000081525060200191505060405180910390fd5b60008090505b8151811015610e80576001600b60008484815181101515610da757fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508181815181101515610e1057fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c185685ceb03e9a8983900153554b9ec01ee854b55b319ee0563515a01bbdc760405160405180910390a38080600101915050610d8a565b5050565b610e8d33610bfc565b1515610f01576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f6d757374206265204b594320766572696669657200000000000000000000000081525060200191505060405180910390fd5b60008090505b8151811015610ffd576000600b60008484815181101515610f2457fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508181815181101515610f8d57fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f020398f502fe64d86a50ec8fc67611cfe4a6a14aeeec2f6bc0962aba5a03af5160405160405180910390a38080600101915050610f07565b5050565b6000600760009054906101000a900460ff16905090565b6000600554905090565b678ac7230489e8000081565b600061104862015180600c5461137490919063ffffffff16565b42101561105957600d54905061105f565b600e5490505b90565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6110968282611743565b61109e610be5565b151515611139576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260278152602001807f63616e6e6f74207075726368617365207768656e20636f6e747261637420697381526020017f207061757365640000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b61114282610aa3565b15156111dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001807f62656e6566696369617279206d757374206265204b594320617574686f72697a81526020017f656400000000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b6111f462015180600c5461137490919063ffffffff16565b4210156112a657678ac7230489e8000034101515156112a1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602d8152602001807f636f6e747269627574696f6e206d7573742062652061626f7665206d696e696d81526020017f756d20617574686f72697a65640000000000000000000000000000000000000081525060400191505060405180910390fd5b61134d565b67016345785d8a0000341015151561134c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602d8152602001807f636f6e747269627574696f6e206d7573742062652061626f7665206d696e696d81526020017f756d20617574686f72697a65640000000000000000000000000000000000000081525060400191505060405180910390fd5b5b5050565b600061136d61135e61102e565b8361176490919063ffffffff16565b9050919050565b600080828401905083811015151561138b57600080fd5b8091505092915050565b61139f82826117a2565b5050565b5050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc349081150290604051600060405180830381858888f1935050505015801561140f573d6000803e3d6000fd5b50565b5050565b61142a81600a6117f390919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff167f84fda749cd5d78392088aeddee30341ef789376b68e94319eff31cb54d561ef060405160405180910390a250565b61148481600a6118a290919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff167f5565480284cbd6151ab5813b9bd9e9b3f9e0e7d2a3a8110e0ca9b24ca819dc0160405160405180910390a250565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415151561150757600080fd5b8260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b611566611952565b6000601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561162357600080fd5b505afa158015611637573d6000803e3d6000fd5b505050506040513d602081101561164d57600080fd5b8101908080519060200190929190505050905061168c600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16826117a2565b50565b6116a38160086117f390919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff167fcd265ebaf09df2871cc7bd4133404a235ba12eff2041bb89d9c714a2621c7c7e60405160405180910390a250565b6116fd8160086118a290919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff167f6719d08c1888103bea251a4ed56406bd0c3e69723c8a1686e017e7bbe159b6f860405160405180910390a250565b61174b610b16565b151561175657600080fd5b6117608282611954565b5050565b600080831415611777576000905061179c565b6000828402905082848281151561178a57fe5b0414151561179757600080fd5b809150505b92915050565b6117ef8282600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166119a49092919063ffffffff16565b5050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561182f57600080fd5b61183982826114ca565b151561184457600080fd5b60008260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156118de57600080fd5b6118e882826114ca565b1515156118f457600080fd5b60018260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415151561199057600080fd5b600081141515156119a057600080fd5b5050565b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015611a4757600080fd5b505af1158015611a5b573d6000803e3d6000fd5b505050506040513d6020811015611a7157600080fd5b81019080805190602001909291905050501515611a8d57600080fd5b50505056fea165627a7a723058200b8be0e5e1322bbc9d0ad48347c171ec1237dac09020361c04bd09eabf1f21a90029",
"deployedBytecode": "0x60806040526004361061015f576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680631515bc2b1461016a57806318e6010f146101995780632c4e722e146101b057806334ce5d2d146101db5780633f4ba83a1461022c5780634042b66f1461024357806342a14d1f1461026e57806346fbf68e146102d757806347535d7b146103405780634b6753bc1461036f5780634bb278f31461039a578063521eb273146103b15780635c975abb14610408578063696eee51146104375780636ef8d66d146104a057806382dc1ec4146104b75780638456cb59146105085780638d0bba031461051f578063923f7ce21461054a578063b3449bbc14610575578063b3b5e6ea1461063a578063b3f05b97146106ff578063b7a8807c1461072e578063ec8ac4d814610759578063ee5543971461079d578063f7fb07b0146107c8578063fc0c546a146107f3575b6101683361084a565b005b34801561017657600080fd5b5061017f610940565b604051808215151515815260200191505060405180910390f35b3480156101a557600080fd5b506101ae61094c565b005b3480156101bc57600080fd5b506101c5610957565b6040518082815260200191505060405180910390f35b3480156101e757600080fd5b5061022a600480360360208110156101fe57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610961565b005b34801561023857600080fd5b506102416109ea565b005b34801561024f57600080fd5b50610258610a99565b6040518082815260200191505060405180910390f35b34801561027a57600080fd5b506102bd6004803603602081101561029157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610aa3565b604051808215151515815260200191505060405180910390f35b3480156102e357600080fd5b50610326600480360360208110156102fa57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610af9565b604051808215151515815260200191505060405180910390f35b34801561034c57600080fd5b50610355610b16565b604051808215151515815260200191505060405180910390f35b34801561037b57600080fd5b50610384610b31565b6040518082815260200191505060405180910390f35b3480156103a657600080fd5b506103af610b3b565b005b3480156103bd57600080fd5b506103c6610bbb565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561041457600080fd5b5061041d610be5565b604051808215151515815260200191505060405180910390f35b34801561044357600080fd5b506104866004803603602081101561045a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610bfc565b604051808215151515815260200191505060405180910390f35b3480156104ac57600080fd5b506104b5610c19565b005b3480156104c357600080fd5b50610506600480360360208110156104da57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c24565b005b34801561051457600080fd5b5061051d610c44565b005b34801561052b57600080fd5b50610534610cf4565b6040518082815260200191505060405180910390f35b34801561055657600080fd5b5061055f610d00565b6040518082815260200191505060405180910390f35b34801561058157600080fd5b506106386004803603602081101561059857600080fd5b81019080803590602001906401000000008111156105b557600080fd5b8201836020820111156105c757600080fd5b803590602001918460208302840111640100000000831117156105e957600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050610d07565b005b34801561064657600080fd5b506106fd6004803603602081101561065d57600080fd5b810190808035906020019064010000000081111561067a57600080fd5b82018360208201111561068c57600080fd5b803590602001918460208302840111640100000000831117156106ae57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050610e84565b005b34801561070b57600080fd5b50610714611001565b604051808215151515815260200191505060405180910390f35b34801561073a57600080fd5b50610743611018565b6040518082815260200191505060405180910390f35b61079b6004803603602081101561076f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061084a565b005b3480156107a957600080fd5b506107b2611022565b6040518082815260200191505060405180910390f35b3480156107d457600080fd5b506107dd61102e565b6040518082815260200191505060405180910390f35b3480156107ff57600080fd5b50610808611062565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60016000808282540192505081905550600080549050600034905061086f838261108c565b600061087a82611351565b90506108918260045461137490919063ffffffff16565b6004819055506108a18482611395565b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f6faf93231a456e552dbc9961f58d9713ee4f2e69d15f1975b050ef0911053a7b8484604051808381526020018281526020019250505060405180910390a361091884836113a3565b6109206113a7565b61092a8483611412565b50506000548114151561093c57600080fd5b5050565b60006006544211905090565b61095533611416565b565b6000600354905090565b61096a33610bfc565b15156109de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f6d757374206265204b594320766572696669657200000000000000000000000081525060200191505060405180910390fd5b6109e781611470565b50565b6109f333610af9565b15156109fe57600080fd5b600960009054906101000a900460ff161515610a1957600080fd5b6000600960006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1565b6000600454905090565b6000600b60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b6000610b0f8260086114ca90919063ffffffff16565b9050919050565b60006005544210158015610b2c57506006544211155b905090565b6000600654905090565b600760009054906101000a900460ff16151515610b5757600080fd5b610b5f610940565b1515610b6a57600080fd5b6001600760006101000a81548160ff021916908315150217905550610b8d61155e565b7f9270cc390c096600a1c17c44345a1ba689fafd99d97487b10cfccf86cf73183660405160405180910390a1565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000600960009054906101000a900460ff16905090565b6000610c1282600a6114ca90919063ffffffff16565b9050919050565b610c223361168f565b565b610c2d33610af9565b1515610c3857600080fd5b610c41816116e9565b50565b610c4d33610af9565b1515610c5857600080fd5b600960009054906101000a900460ff16151515610c7457600080fd5b6001600960006101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25833604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1565b67016345785d8a000081565b6201518081565b610d1033610bfc565b1515610d84576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f6d757374206265204b594320766572696669657200000000000000000000000081525060200191505060405180910390fd5b60008090505b8151811015610e80576001600b60008484815181101515610da757fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508181815181101515610e1057fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c185685ceb03e9a8983900153554b9ec01ee854b55b319ee0563515a01bbdc760405160405180910390a38080600101915050610d8a565b5050565b610e8d33610bfc565b1515610f01576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f6d757374206265204b594320766572696669657200000000000000000000000081525060200191505060405180910390fd5b60008090505b8151811015610ffd576000600b60008484815181101515610f2457fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508181815181101515610f8d57fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f020398f502fe64d86a50ec8fc67611cfe4a6a14aeeec2f6bc0962aba5a03af5160405160405180910390a38080600101915050610f07565b5050565b6000600760009054906101000a900460ff16905090565b6000600554905090565b678ac7230489e8000081565b600061104862015180600c5461137490919063ffffffff16565b42101561105957600d54905061105f565b600e5490505b90565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6110968282611743565b61109e610be5565b151515611139576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260278152602001807f63616e6e6f74207075726368617365207768656e20636f6e747261637420697381526020017f207061757365640000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b61114282610aa3565b15156111dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001807f62656e6566696369617279206d757374206265204b594320617574686f72697a81526020017f656400000000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b6111f462015180600c5461137490919063ffffffff16565b4210156112a657678ac7230489e8000034101515156112a1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602d8152602001807f636f6e747269627574696f6e206d7573742062652061626f7665206d696e696d81526020017f756d20617574686f72697a65640000000000000000000000000000000000000081525060400191505060405180910390fd5b61134d565b67016345785d8a0000341015151561134c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602d8152602001807f636f6e747269627574696f6e206d7573742062652061626f7665206d696e696d81526020017f756d20617574686f72697a65640000000000000000000000000000000000000081525060400191505060405180910390fd5b5b5050565b600061136d61135e61102e565b8361176490919063ffffffff16565b9050919050565b600080828401905083811015151561138b57600080fd5b8091505092915050565b61139f82826117a2565b5050565b5050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc349081150290604051600060405180830381858888f1935050505015801561140f573d6000803e3d6000fd5b50565b5050565b61142a81600a6117f390919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff167f84fda749cd5d78392088aeddee30341ef789376b68e94319eff31cb54d561ef060405160405180910390a250565b61148481600a6118a290919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff167f5565480284cbd6151ab5813b9bd9e9b3f9e0e7d2a3a8110e0ca9b24ca819dc0160405160405180910390a250565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415151561150757600080fd5b8260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b611566611952565b6000601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561162357600080fd5b505afa158015611637573d6000803e3d6000fd5b505050506040513d602081101561164d57600080fd5b8101908080519060200190929190505050905061168c600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16826117a2565b50565b6116a38160086117f390919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff167fcd265ebaf09df2871cc7bd4133404a235ba12eff2041bb89d9c714a2621c7c7e60405160405180910390a250565b6116fd8160086118a290919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff167f6719d08c1888103bea251a4ed56406bd0c3e69723c8a1686e017e7bbe159b6f860405160405180910390a250565b61174b610b16565b151561175657600080fd5b6117608282611954565b5050565b600080831415611777576000905061179c565b6000828402905082848281151561178a57fe5b0414151561179757600080fd5b809150505b92915050565b6117ef8282600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166119a49092919063ffffffff16565b5050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561182f57600080fd5b61183982826114ca565b151561184457600080fd5b60008260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156118de57600080fd5b6118e882826114ca565b1515156118f457600080fd5b60018260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415151561199057600080fd5b600081141515156119a057600080fd5b5050565b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015611a4757600080fd5b505af1158015611a5b573d6000803e3d6000fd5b505050506040513d6020811015611a7157600080fd5b81019080805190602001909291905050501515611a8d57600080fd5b50505056fea165627a7a723058200b8be0e5e1322bbc9d0ad48347c171ec1237dac09020361c04bd09eabf1f21a90029",
"sourceMap": "962:5240:3:-;;;2604:610;8:9:-1;5:2;;;30:1;27;20:12;5:2;2604:610:3;;;;;;;;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;2604:610:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2893:11;2906;2849:4;2855:6;2863:5;576:1:25;560:13;:17;;;;2380:1:15;2373:4;:8;2365:17;;;;;;;;2418:1;2400:20;;:6;:20;;;;2392:29;;;;;;;;2465:1;2439:28;;2447:5;2439:28;;;;2431:37;;;;;;;;2487:4;2479:5;:12;;;;2511:6;2501:7;;:16;;;;;;;;;;;;;;;;;;2536:5;2527:6;;:14;;;;;;;;;;;;;;;;;;2283:265;;;806:15:17;791:11;:30;;783:39;;;;;;;;854:11;840;:25;832:34;;;;;;;;892:11;877:12;:26;;;;928:11;913:12;:26;;;;657:289;;454:5:16;441:10;;:18;;;;;;;;;;;;;;;;;;275:22:14;286:10;275;;;:22;;;:::i;:::-;362:5:18;352:7;;:15;;;;;;;;;;;;;;;;;;329:27:12;345:10;329:15;;;:27;;;:::i;:::-;2956:1:3;2941:12;:16;2933:59;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3026:1;3010:18;;:4;:18;;;;3002:62;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3090:11;3075:12;:26;;;;3127:12;3111:13;:28;;;;3157:4;3149:5;:12;;;;3179:4;3171:5;;:12;;;;;;;;;;;;;;;;;;3202:5;3193:6;;:14;;;;;;;;;;;;;;;;;;2604:610;;;;;;;962:5240;;685:119:14;741:21;754:7;741:8;:12;;;;;;:21;;;;;:::i;:::-;789:7;777:20;;;;;;;;;;;;685:119;:::o;812:133:12:-;873:25;890:7;873:12;:16;;;;;;:25;;;;;:::i;:::-;930:7;913:25;;;;;;;;;;;;812:133;:::o;259:181:13:-;354:1;335:21;;:7;:21;;;;327:30;;;;;;;;376:18;380:4;386:7;376:3;;;:18;;;:::i;:::-;375:19;367:28;;;;;;;;429:4;406;:11;;:20;418:7;406:20;;;;;;;;;;;;;;;;:27;;;;;;;;;;;;;;;;;;259:181;;:::o;786:162::-;858:4;901:1;882:21;;:7;:21;;;;874:30;;;;;;;;921:4;:11;;:20;933:7;921:20;;;;;;;;;;;;;;;;;;;;;;;;;914:27;;786:162;;;;:::o;962:5240:3:-;;;;;;;",
"deployedSourceMap": "962:5240:3:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2875:21:15;2885:10;2875:9;:21::i;:::-;962:5240:3;1692:156:17;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1692:156:17;;;;;;;;;;;;;;;;;;;;;;;;;;;721:85:12;;8:9:-1;5:2;;;30:1;27;20:12;5:2;721:85:12;;;;;;3286:75:15;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3286:75:15;;;;;;;;;;;;;;;;;;;;;;;610:105:12;;8:9:-1;5:2;;;30:1;27;20:12;5:2;610:105:12;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;610:105:12;;;;;;;;;;;;;;;;;;;;;;1176:115:18;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1176:115:18;;;;;;3424:85:15;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3424:85:15;;;;;;;;;;;;;;;;;;;;;;;685:119:11;;8:9:-1;5:2;;;30:1;27;20:12;5:2;685:119:11;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;685:119:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;395:107:14;;8:9:-1;5:2;;;30:1;27;20:12;5:2;395:107:14;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;395:107:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1339:189:17;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1339:189:17;;;;;;;;;;;;;;;;;;;;;;;;;;;1165:89;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1165:89:17;;;;;;;;;;;;;;;;;;;;;;;796:183:16;;8:9:-1;5:2;;;30:1;27;20:12;5:2;796:183:16;;;;;;3114:87:15;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3114:87:15;;;;;;;;;;;;;;;;;;;;;;;;;;;460:76:18;;8:9:-1;5:2;;;30:1;27;20:12;5:2;460:76:18;;;;;;;;;;;;;;;;;;;;;;;;;;;488:116:12;;8:9:-1;5:2;;;30:1;27;20:12;5:2;488:116:12;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;488:116:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;604:75:14;;8:9:-1;5:2;;;30:1;27;20:12;5:2;604:75:14;;;;;;508:90;;8:9:-1;5:2;;;30:1;27;20:12;5:2;508:90:14;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;508:90:14;;;;;;;;;;;;;;;;;;;;;;973:113:18;;8:9:-1;5:2;;;30:1;27;20:12;5:2;973:113:18;;;;;;1378:56:3;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1378:56:3;;;;;;;;;;;;;;;;;;;;;;;1156:53;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1156:53:3;;;;;;;;;;;;;;;;;;;;;;;973:310:11;;8:9:-1;5:2;;;30:1;27;20:12;5:2;973:310:11;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;973:310:11;;;;;;;;;;21:11:-1;8;5:28;2:2;;;46:1;43;36:12;2:2;973:310:11;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;973:310:11;;;;;;101:9:-1;95:2;81:12;77:21;67:8;63:36;60:51;39:11;25:12;22:29;11:108;8:2;;;132:1;129;122:12;8:2;973:310:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;93:3;85:6;81:16;74:27;137:4;133:9;126:4;121:3;117:14;113:30;106:37;;169:3;161:6;157:16;147:26;;973:310:11;;;;;;;;;;;;;;;;;;1455:313;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1455:313:11;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1455:313:11;;;;;;;;;;21:11:-1;8;5:28;2:2;;;46:1;43;36:12;2:2;1455:313:11;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;1455:313:11;;;;;;101:9:-1;95:2;81:12;77:21;67:8;63:36;60:51;39:11;25:12;22:29;11:108;8:2;;;132:1;129;122:12;8:2;1455:313:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;93:3;85:6;81:16;74:27;137:4;133:9;126:4;121:3;117:14;113:30;106:37;;169:3;161:6;157:16;147:26;;1455:313:11;;;;;;;;;;;;;;;;;;556:82:16;;8:9:-1;5:2;;;30:1;27;20:12;5:2;556:82:16;;;;;;;;;;;;;;;;;;;;;;;;;;;1011:89:17;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1011:89:17;;;;;;;;;;;;;;;;;;;;;;;3766:603:15;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;3766:603:15;;;;;;;;;;;;;;;;;;;;;;1261:65:3;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1261:65:3;;;;;;;;;;;;;;;;;;;;;;;4088:312;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4088:312:3;;;;;;;;;;;;;;;;;;;;;;;2962:76:15;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2962:76:15;;;;;;;;;;;;;;;;;;;;;;;;;;;3766:603;1010:1:25;993:13;;:18;;;;;;;;;;;1021:20;1044:13;;1021:36;;3844:17:15;3864:9;3844:29;;3883:44;3904:11;3917:9;3883:20;:44::i;:::-;3986:14;4003:26;4019:9;4003:15;:26::i;:::-;3986:43;;4077:25;4092:9;4077:10;;:14;;:25;;;;:::i;:::-;4064:10;:38;;;;4113:37;4130:11;4143:6;4113:16;:37::i;:::-;4193:11;4165:59;;4181:10;4165:59;;;4206:9;4217:6;4165:59;;;;;;;;;;;;;;;;;;;;;;;;4235:46;4258:11;4271:9;4235:22;:46::i;:::-;4292:15;:13;:15::i;:::-;4317:45;4339:11;4352:9;4317:21;:45::i;:::-;1067:1:25;;1102:13;;1086:12;:29;1078:38;;;;;;;;3766:603:15;;:::o;1692:156:17:-;1734:4;1829:12;;1811:15;:30;1804:37;;1692:156;:::o;721:85:12:-;769:30;788:10;769:18;:30::i;:::-;721:85::o;3286:75:15:-;3323:7;3349:5;;3342:12;;3286:75;:::o;610:105:12:-;414:25;428:10;414:13;:25::i;:::-;406:58;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;684:24;700:7;684:15;:24::i;:::-;610:105;:::o;1176:115:18:-;350:20:14;359:10;350:8;:20::i;:::-;342:29;;;;;;;;860:7:18;;;;;;;;;;;852:16;;;;;;;;1244:5;1234:7;;:15;;;;;;;;;;;;;;;;;;1264:20;1273:10;1264:20;;;;;;;;;;;;;;;;;;;;;;1176:115::o;3424:85:15:-;3466:7;3492:10;;3485:17;;3424:85;:::o;685:119:11:-;746:4;769:19;:28;789:7;769:28;;;;;;;;;;;;;;;;;;;;;;;;;762:35;;685:119;;;:::o;395:107:14:-;451:4;474:21;487:7;474:8;:12;;:21;;;;:::i;:::-;467:28;;395:107;;;:::o;1339:189:17:-;1378:4;1474:12;;1455:15;:31;;:66;;;;;1509:12;;1490:15;:31;;1455:66;1448:73;;1339:189;:::o;1165:89::-;1209:7;1235:12;;1228:19;;1165:89;:::o;796:183:16:-;842:10;;;;;;;;;;;841:11;833:20;;;;;;;;871:11;:9;:11::i;:::-;863:20;;;;;;;;907:4;894:10;;:17;;;;;;;;;;;;;;;;;;922:15;:13;:15::i;:::-;952:20;;;;;;;;;;796:183::o;3114:87:15:-;3153:15;3187:7;;;;;;;;;;;3180:14;;3114:87;:::o;460:76:18:-;499:4;522:7;;;;;;;;;;;515:14;;460:76;:::o;488:116:12:-;549:4;572:25;589:7;572:12;:16;;:25;;;;:::i;:::-;565:32;;488:116;;;:::o;604:75:14:-;647:25;661:10;647:13;:25::i;:::-;604:75::o;508:90::-;350:20;359:10;350:8;:20::i;:::-;342:29;;;;;;;;572:19;583:7;572:10;:19::i;:::-;508:90;:::o;973:113:18:-;350:20:14;359:10;350:8;:20::i;:::-;342:29;;;;;;;;689:7:18;;;;;;;;;;;688:8;680:17;;;;;;;;1042:4;1032:7;;:14;;;;;;;;;;;;;;;;;;1061:18;1068:10;1061:18;;;;;;;;;;;;;;;;;;;;;;973:113::o;1378:56:3:-;1425:9;1378:56;:::o;1156:53::-;1201:8;1156:53;:::o;973:310:11:-;414:25:12;428:10;414:13;:25::i;:::-;406:58;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1104:9:11;1116:1;1104:13;;1099:178;1123:8;:15;1119:1;:19;1099:178;;;1195:4;1160:19;:32;1180:8;1189:1;1180:11;;;;;;;;;;;;;;;;;;1160:32;;;;;;;;;;;;;;;;:39;;;;;;;;;;;;;;;;;;1254:8;1263:1;1254:11;;;;;;;;;;;;;;;;;;1218:48;;1242:10;1218:48;;;;;;;;;;;;1141:3;;;;;;;1099:178;;;;973:310;:::o;1455:313::-;414:25:12;428:10;414:13;:25::i;:::-;406:58;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1587:9:11;1599:1;1587:13;;1582:180;1606:8;:15;1602:1;:19;1582:180;;;1678:5;1643:19;:32;1663:8;1672:1;1663:11;;;;;;;;;;;;;;;;;;1643:32;;;;;;;;;;;;;;;;:40;;;;;;;;;;;;;;;;;;1739:8;1748:1;1739:11;;;;;;;;;;;;;;;;;;1702:49;;1727:10;1702:49;;;;;;;;;;;;1624:3;;;;;;;1582:180;;;;1455:313;:::o;556:82:16:-;598:4;621:10;;;;;;;;;;;614:17;;556:82;:::o;1011:89:17:-;1055:7;1081:12;;1074:19;;1011:89;:::o;1261:65:3:-;1318:8;1261:65;:::o;4088:312::-;4159:7;4267:36;1201:8;4267:12;;:16;;:36;;;;:::i;:::-;4248:15;:56;4244:150;;;4327:13;;4320:20;;;;4244:150;4378:5;;4371:12;;4088:312;;:::o;2962:76:15:-;3000:6;3025;;;;;;;;;;;3018:13;;2962:76;:::o;4948:729:3:-;5084:50;5111:11;5124:9;5084:26;:50::i;:::-;5153:8;:6;:8::i;:::-;5152:9;5144:61;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5223:26;5237:11;5223:13;:26::i;:::-;5215:73;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5384:36;1201:8;5384:12;;:16;;:36;;;;:::i;:::-;5365:15;:56;5361:310;;;1318:8;5445:9;:43;;5437:101;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5361:310;;;1425:9;5577;:33;;5569:91;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5361:310;4948:729;;:::o;5948:252::-;6053:7;6162:31;6176:16;:14;:16::i;:::-;6162:9;:13;;:31;;;;:::i;:::-;6155:38;;5948:252;;;:::o;1431:145:19:-;1489:7;1508:9;1524:1;1520;:5;1508:17;;1548:1;1543;:6;;1535:15;;;;;;;;1568:1;1561:8;;;1431:145;;;;:::o;6206:134:15:-;6293:40;6308:11;6321;6293:14;:40::i;:::-;6206:134;;:::o;6610:145::-;;;:::o;7211:78::-;7255:7;;;;;;;;;;;:16;;:27;7272:9;7255:27;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;7255:27:15;7211:78::o;5374:149::-;;;:::o;951:141:12:-;1015:28;1035:7;1015:12;:19;;:28;;;;:::i;:::-;1077:7;1058:27;;;;;;;;;;;;951:141;:::o;812:133::-;873:25;890:7;873:12;:16;;:25;;;;:::i;:::-;930:7;913:25;;;;;;;;;;;;812:133;:::o;786:162:13:-;858:4;901:1;882:21;;:7;:21;;;;874:30;;;;;;;;921:4;:11;;:20;933:7;921:20;;;;;;;;;;;;;;;;;;;;;;;;;914:27;;786:162;;;;:::o;3680:201:3:-;3736:21;:19;:21::i;:::-;3767:24;3794:6;;;;;;;;;;;:16;;;3819:4;3794:31;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3794:31:3;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3794:31:3;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;3794:31:3;;;;;;;;;;;;;;;;3767:58;;3835:39;3850:5;;;;;;;;;;;3857:16;3835:14;:39::i;:::-;3680:201;:::o;810:127:14:-;869:24;885:7;869:8;:15;;:24;;;;:::i;:::-;922:7;908:22;;;;;;;;;;;;810:127;:::o;685:119::-;741:21;754:7;741:8;:12;;:21;;;;:::i;:::-;789:7;777:20;;;;;;;;;;;;685:119;:::o;2040:165:17:-;442:8;:6;:8::i;:::-;434:17;;;;;;;;2148:50;2175:11;2188:9;2148:26;:50::i;:::-;2040:165;;:::o;229:421:19:-;287:7;532:1;527;:6;523:45;;;556:1;549:8;;;;523:45;578:9;594:1;590;:5;578:17;;622:1;617;613;:5;;;;;;;;:10;605:19;;;;;;;;642:1;635:8;;;229:421;;;;;:::o;5803:137:15:-;5888:45;5908:11;5921;5888:6;;;;;;;;;;;:19;;;;:45;;;;;:::i;:::-;5803:137;;:::o;514:184:13:-;612:1;593:21;;:7;:21;;;;585:30;;;;;;;;633:18;637:4;643:7;633:3;:18::i;:::-;625:27;;;;;;;;686:5;663:4;:11;;:20;675:7;663:20;;;;;;;;;;;;;;;;:28;;;;;;;;;;;;;;;;;;514:184;;:::o;259:181::-;354:1;335:21;;:7;:21;;;;327:30;;;;;;;;376:18;380:4;386:7;376:3;:18::i;:::-;375:19;367:28;;;;;;;;429:4;406;:11;;:20;418:7;406:20;;;;;;;;;;;;;;;;:27;;;;;;;;;;;;;;;;;;259:181;;:::o;1188:98:16:-;:::o;4911:168:15:-;5036:1;5013:25;;:11;:25;;;;5005:34;;;;;;;;5070:1;5057:9;:14;;5049:23;;;;;;;;4911:168;;:::o;409:123:24:-;499:5;:14;;;514:2;518:5;499:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;499:25:24;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;499:25:24;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;499:25:24;;;;;;;;;;;;;;;;491:34;;;;;;;;409:123;;;:::o",
"source": "/** @title Hey Token Sale\n* @author Thomas Vanderstraeten - <thomas@hey.network>\n* Keep in mind that smart contracts still rely on experimental technology.\n*/\n\npragma solidity ^0.5.0;\n\nimport \"openzeppelin-solidity/contracts/crowdsale/validation/TimedCrowdsale.sol\";\nimport \"openzeppelin-solidity/contracts/crowdsale/distribution/FinalizableCrowdsale.sol\";\nimport \"openzeppelin-solidity/contracts/lifecycle/Pausable.sol\";\nimport \"openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\";\nimport \"openzeppelin-solidity/contracts/math/SafeMath.sol\";\nimport \"./utils/KYC.sol\";\n\n/**\n * @title Hey Token Sale\n * @dev The only deviations from OpenZeppelin's standard Crowdsale example\n * is a Pausable behaviour to freeze buying of tokens, and a funneling of\n * unsold tokens to a Pool address when the sale closes.\n * Note that we are naming this contract 'TokenSale' to not redeclare the parent\n * Crowdsale contract, from which Sale indirectly inherits.\n */\ncontract TokenSale is TimedCrowdsale, FinalizableCrowdsale, Pausable, KYC {\n\n /* *** Libraries *** */\n using SafeMath for uint256;\n\n\n /* *** Sale Parameters *** */\n // Constants\n uint256 public constant FIRST_DAY_DURATION = 24 hours; // Duration of the first sale day\n uint256 public constant FIRST_DAY_MINIMUM_CONTRIBUTION = 10 ether; // Minimum ETH contribution for the first day\n uint256 public constant MINIMUM_CONTRIBUTION = 0.1 ether; // Minimum ETH contribution after the first day\n // Initialized at contract deployment\n uint256 private _openingTime; // When the sale starts\n uint256 private _firstDayRate; // The ETH-to-Token rate for the first day\n uint256 private _rate; // The ETH-to-Token rate after the first day\n address private _pool; // The address where unsold tokens are sent at finalization\n IERC20 private _token; // The token which is sold\n\n\n /* *** Public Functions *** */\n\n /** @dev Constructor. First contract set up (tokens will also need to be transferred to the contract afterwards)\n * @param openingTime Time the sale will start in seconds since the Unix Epoch\n * @param closingTime Time the sale will close in seconds since the Unix Epoch\n * @param firstDayRate ETH-to-Token rate for the first day of the sale\n * @param rate ETH-to-Token rate after the first day of the sale\n * @param wallet The party which will get the funds of the token sale\n * @param pool The party which will get the unsold tokens at closing of the sale\n * @param token The ERC20 token being sold\n */\n constructor(\n uint256 openingTime,\n uint256 closingTime,\n uint256 firstDayRate,\n uint256 rate,\n address payable wallet,\n address payable pool,\n IERC20 token\n )\n public\n Crowdsale(rate, wallet, token)\n TimedCrowdsale(openingTime, closingTime)\n {\n require(firstDayRate > 0, \"first day rate must be above 0\");\n require(pool != address(0), \"pool cannot be the zero address\");\n\n _openingTime = openingTime;\n _firstDayRate = firstDayRate;\n _rate = rate;\n _pool = pool;\n _token = token;\n }\n\n /** @dev Called when the sale is finalized - extension of OpenZeppelin's\n * standard function. We extend it to have all potentially unsold tokens\n * transferred to the Pool (where they will be made redeemable).\n * This function is called by the public finalize() function.\n * Note interestingly that the caller finalize() public function is callable\n * by anyone to avoid having the admin prevent finalization maliciously.\n */\n function _finalization()\n internal\n {\n super._finalization();\n uint256 remainingBalance = _token.balanceOf(address(this));\n _deliverTokens(_pool, remainingBalance);\n }\n\n /** @dev Override of OpenZeppelin's standard function to reflect the\n * evolving ETH-to-Token rate.\n * @return uint256 The current number of tokens purchasable for the Wei amount\n */\n function getCurrentRate()\n public\n view\n returns (uint256)\n {\n // solium-disable-next-line security/no-block-members\n if (block.timestamp < (_openingTime.add(FIRST_DAY_DURATION))) {\n return _firstDayRate;\n } else {\n return _rate;\n }\n }\n\n\n /* *** Internal Functions *** */\n\n /** @dev Called before any purchase is confirmed - extension of OpenZeppelin's\n * standard function to implement the Pausable, MinimumContribution and KYC\n * behaviours as requirements.\n * Note that OpenZeppelin's implementation choice has been to have this\n * function as a view function, although it does not have a return value.\n * @param beneficiary The party that wishes to receive tokens\n * @param weiAmount The amount sent in exchange for tokens, in Wei\n */\n function _preValidatePurchase(\n address beneficiary,\n uint256 weiAmount\n )\n internal\n view\n {\n super._preValidatePurchase(beneficiary, weiAmount);\n require(!paused(), \"cannot purchase when contract is paused\");\n require(kycAuthorized(beneficiary), \"beneficiary must be KYC authorized\");\n\n // solium-disable-next-line security/no-block-members\n if (block.timestamp < (_openingTime.add(FIRST_DAY_DURATION))) {\n require(msg.value >= FIRST_DAY_MINIMUM_CONTRIBUTION, \"contribution must be above minimum authorized\");\n } else {\n require(msg.value >= MINIMUM_CONTRIBUTION, \"contribution must be above minimum authorized\");\n }\n }\n\n /** @dev Override of OpenZeppelin's standard function to reflect the\n * evolving ETH-to-Token rate.\n * @param weiAmount The amount sent in exchange for tokens, in Wei\n * @return uint256 The number of tokens purchasable for the Wei amount\n */\n function _getTokenAmount(\n uint256 weiAmount\n )\n internal\n view\n returns (uint256)\n {\n // Note that the decimals of ETH and Token (both 18) cancel each other\n return weiAmount.mul(getCurrentRate());\n }\n}\n",
"sourcePath": "/Users/thomasvanderstraeten/code/hey/mainchain/contracts/TokenSale.sol",
"ast": {
"absolutePath": "/Users/thomasvanderstraeten/code/hey/mainchain/contracts/TokenSale.sol",
"exportedSymbols": {
"TokenSale": [
473
]
},
"id": 474,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 259,
"literals": [
"solidity",
"^",
"0.5",
".0"
],
"nodeType": "PragmaDirective",
"src": "162:23:3"
},
{
"absolutePath": "openzeppelin-solidity/contracts/crowdsale/validation/TimedCrowdsale.sol",
"file": "openzeppelin-solidity/contracts/crowdsale/validation/TimedCrowdsale.sol",
"id": 260,
"nodeType": "ImportDirective",
"scope": 474,
"sourceUnit": 2336,
"src": "187:81:3",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "openzeppelin-solidity/contracts/crowdsale/distribution/FinalizableCrowdsale.sol",
"file": "openzeppelin-solidity/contracts/crowdsale/distribution/FinalizableCrowdsale.sol",
"id": 261,
"nodeType": "ImportDirective",
"scope": 474,
"sourceUnit": 2224,
"src": "269:89:3",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "openzeppelin-solidity/contracts/lifecycle/Pausable.sol",
"file": "openzeppelin-solidity/contracts/lifecycle/Pausable.sol",
"id": 262,
"nodeType": "ImportDirective",
"scope": 474,
"sourceUnit": 2419,
"src": "359:64:3",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol",
"file": "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol",
"id": 263,
"nodeType": "ImportDirective",
"scope": 474,
"sourceUnit": 3215,
"src": "424:64:3",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "openzeppelin-solidity/contracts/math/SafeMath.sol",
"file": "openzeppelin-solidity/contracts/math/SafeMath.sol",
"id": 264,
"nodeType": "ImportDirective",
"scope": 474,
"sourceUnit": 2547,
"src": "489:59:3",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/Users/thomasvanderstraeten/code/hey/mainchain/contracts/utils/KYC.sol",
"file": "./utils/KYC.sol",
"id": 265,
"nodeType": "ImportDirective",
"scope": 474,
"sourceUnit": 1598,
"src": "549:25:3",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 266,
"name": "TimedCrowdsale",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 2335,
"src": "984:14:3",
"typeDescriptions": {
"typeIdentifier": "t_contract$_TimedCrowdsale_$2335",
"typeString": "contract TimedCrowdsale"
}
},
"id": 267,
"nodeType": "InheritanceSpecifier",
"src": "984:14:3"
},
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 268,
"name": "FinalizableCrowdsale",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 2223,
"src": "1000:20:3",
"typeDescriptions": {
"typeIdentifier": "t_contract$_FinalizableCrowdsale_$2223",
"typeString": "contract FinalizableCrowdsale"
}
},
"id": 269,
"nodeType": "InheritanceSpecifier",
"src": "1000:20:3"
},
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 270,
"name": "Pausable",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 2418,
"src": "1022:8:3",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Pausable_$2418",
"typeString": "contract Pausable"
}
},
"id": 271,
"nodeType": "InheritanceSpecifier",
"src": "1022:8:3"
},
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 272,
"name": "KYC",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1597,
"src": "1032:3:3",
"typeDescriptions": {
"typeIdentifier": "t_contract$_KYC_$1597",
"typeString": "contract KYC"
}
},
"id": 273,
"nodeType": "InheritanceSpecifier",
"src": "1032:3:3"
}
],
"contractDependencies": [
1597,
1701,
1898,
2165,
2223,
2335,
2418,
3389
],
"contractKind": "contract",
"documentation": " @title Hey Token Sale\n @dev The only deviations from OpenZeppelin's standard Crowdsale example\n is a Pausable behaviour to freeze buying of tokens, and a funneling of\n unsold tokens to a Pool address when the sale closes.\n Note that we are naming this contract 'TokenSale' to not redeclare the parent\n Crowdsale contract, from which Sale indirectly inherits.",
"fullyImplemented": true,
"id": 473,
"linearizedBaseContracts": [
473,
1597,
1701,
2418,
1898,
2223,
2335,
2165,
3389
],
"name": "TokenSale",
"nodeType": "ContractDefinition",
"nodes": [
{
"id": 276,
"libraryName": {
"contractScope": null,
"id": 274,
"name": "SafeMath",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 2546,
"src": "1077:8:3",
"typeDescriptions": {
"typeIdentifier": "t_contract$_SafeMath_$2546",
"typeString": "library SafeMath"
}
},
"nodeType": "UsingForDirective",
"src": "1071:27:3",
"typeName": {
"id": 275,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1090:7:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
{
"constant": true,
"id": 279,
"name": "FIRST_DAY_DURATION",
"nodeType": "VariableDeclaration",
"scope": 473,
"src": "1156:53:3",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 277,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1156:7:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": {
"argumentTypes": null,
"hexValue": "3234",
"id": 278,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1201:8:3",
"subdenomination": "hours",
"typeDescriptions": {
"typeIdentifier": "t_rational_86400_by_1",
"typeString": "int_const 86400"
},
"value": "24"
},
"visibility": "public"
},
{
"constant": true,
"id": 282,
"name": "FIRST_DAY_MINIMUM_CONTRIBUTION",
"nodeType": "VariableDeclaration",
"scope": 473,
"src": "1261:65:3",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 280,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1261:7:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": {
"argumentTypes": null,
"hexValue": "3130",
"id": 281,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1318:8:3",
"subdenomination": "ether",
"typeDescriptions": {
"typeIdentifier": "t_rational_10000000000000000000_by_1",
"typeString": "int_const 10000000000000000000"
},
"value": "10"
},
"visibility": "public"
},
{
"constant": true,
"id": 285,
"name": "MINIMUM_CONTRIBUTION",
"nodeType": "VariableDeclaration",
"scope": 473,
"src": "1378:56:3",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 283,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1378:7:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": {
"argumentTypes": null,
"hexValue": "302e31",
"id": 284,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1425:9:3",
"subdenomination": "ether",
"typeDescriptions": {
"typeIdentifier": "t_rational_100000000000000000_by_1",
"typeString": "int_const 100000000000000000"
},
"value": "0.1"
},
"visibility": "public"
},
{
"constant": false,
"id": 287,
"name": "_openingTime",
"nodeType": "VariableDeclaration",
"scope": 473,
"src": "1539:28:3",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 286,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1539:7:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "private"
},
{
"constant": false,
"id": 289,
"name": "_firstDayRate",
"nodeType": "VariableDeclaration",
"scope": 473,
"src": "1599:29:3",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 288,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1599:7:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "private"
},
{
"constant": false,
"id": 291,
"name": "_rate",
"nodeType": "VariableDeclaration",
"scope": 473,
"src": "1678:21:3",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 290,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1678:7:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "private"
},
{
"constant": false,
"id": 293,
"name": "_pool",
"nodeType": "VariableDeclaration",
"scope": 473,
"src": "1759:21:3",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 292,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1759:7:3",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "private"
},
{
"constant": false,
"id": 295,
"name": "_token",
"nodeType": "VariableDeclaration",
"scope": 473,
"src": "1855:21:3",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20_$3214",
"typeString": "contract IERC20"
},
"typeName": {
"contractScope": null,
"id": 294,
"name": "IERC20",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 3214,
"src": "1855:6:3",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20_$3214",
"typeString": "contract IERC20"
}
},
"value": null,
"visibility": "private"
},
{
"body": {
"id": 357,
"nodeType": "Block",
"src": "2923:291:3",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 324,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 322,
"name": "firstDayRate",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 301,
"src": "2941:12:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 323,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2956:1:3",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "2941:16:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "6669727374206461792072617465206d7573742062652061626f76652030",
"id": 325,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2959:32:3",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_b6758f0afa287093724eb240ee66c9844f1cff94199c19a50eb19e4d3a739c4c",
"typeString": "literal_string \"first day rate must be above 0\""
},
"value": "first day rate must be above 0"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_b6758f0afa287093724eb240ee66c9844f1cff94199c19a50eb19e4d3a739c4c",
"typeString": "literal_string \"first day rate must be above 0\""
}
],
"id": 321,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
3407,
3408
],
"referencedDeclaration": 3408,
"src": "2933:7:3",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 326,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2933:59:3",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 327,
"nodeType": "ExpressionStatement",
"src": "2933:59:3"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
"id": 333,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 329,
"name": "pool",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 307,
"src": "3010:4:3",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "30",
"id": 331,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3026:1:3",
"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": 330,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "3018:7:3",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": "address"
},
"id": 332,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3018:10:3",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"src": "3010:18:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "706f6f6c2063616e6e6f7420626520746865207a65726f2061646472657373",
"id": 334,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3030:33:3",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_d458305a613c76261dda4942709b5b997c0b7daad72c52a3f03d44f0d082a547",
"typeString": "literal_string \"pool cannot be the zero address\""
},
"value": "pool cannot be the zero address"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_d458305a613c76261dda4942709b5b997c0b7daad72c52a3f03d44f0d082a547",
"typeString": "literal_string \"pool cannot be the zero address\""
}
],
"id": 328,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
3407,
3408
],
"referencedDeclaration": 3408,
"src": "3002:7:3",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 335,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3002:62:3",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 336,
"nodeType": "ExpressionStatement",
"src": "3002:62:3"
},
{
"expression": {
"argumentTypes": null,
"id": 339,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 337,
"name": "_openingTime",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 287,
"src": "3075:12:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 338,
"name": "openingTime",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 297,
"src": "3090:11:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3075:26:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 340,
"nodeType": "ExpressionStatement",
"src": "3075:26:3"
},
{
"expression": {
"argumentTypes": null,
"id": 343,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 341,
"name": "_firstDayRate",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 289,
"src": "3111:13:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 342,
"name": "firstDayRate",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 301,
"src": "3127:12:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3111:28:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 344,
"nodeType": "ExpressionStatement",
"src": "3111:28:3"
},
{
"expression": {
"argumentTypes": null,
"id": 347,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 345,
"name": "_rate",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 291,
"src": "3149:5:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 346,
"name": "rate",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 303,
"src": "3157:4:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3149:12:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 348,
"nodeType": "ExpressionStatement",
"src": "3149:12:3"
},
{
"expression": {
"argumentTypes": null,
"id": 351,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 349,
"name": "_pool",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 293,
"src": "3171:5:3",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 350,
"name": "pool",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 307,
"src": "3179:4:3",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"src": "3171:12:3",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 352,
"nodeType": "ExpressionStatement",
"src": "3171:12:3"
},
{
"expression": {
"argumentTypes": null,
"id": 355,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 353,
"name": "_token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 295,
"src": "3193:6:3",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20_$3214",
"typeString": "contract IERC20"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 354,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 309,
"src": "3202:5:3",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20_$3214",
"typeString": "contract IERC20"
}
},
"src": "3193:14:3",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20_$3214",
"typeString": "contract IERC20"
}
},
"id": 356,
"nodeType": "ExpressionStatement",
"src": "3193:14:3"
}
]
},
"documentation": "@dev Constructor. First contract set up (tokens will also need to be transferred to the contract afterwards)\n @param openingTime Time the sale will start in seconds since the Unix Epoch\n @param closingTime Time the sale will close in seconds since the Unix Epoch\n @param firstDayRate ETH-to-Token rate for the first day of the sale\n @param rate ETH-to-Token rate after the first day of the sale\n @param wallet The party which will get the funds of the token sale\n @param pool The party which will get the unsold tokens at closing of the sale\n @param token The ERC20 token being sold",
"id": 358,
"implemented": true,
"kind": "constructor",
"modifiers": [
{
"arguments": [
{
"argumentTypes": null,
"id": 312,
"name": "rate",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 303,
"src": "2849:4:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 313,
"name": "wallet",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 305,
"src": "2855:6:3",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 314,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 309,
"src": "2863:5:3",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20_$3214",
"typeString": "contract IERC20"
}
}
],
"id": 315,
"modifierName": {
"argumentTypes": null,
"id": 311,
"name": "Crowdsale",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2165,
"src": "2839:9:3",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_Crowdsale_$2165_$",
"typeString": "type(contract Crowdsale)"
}
},
"nodeType": "ModifierInvocation",
"src": "2839:30:3"
},
{
"arguments": [
{
"argumentTypes": null,
"id": 317,
"name": "openingTime",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 297,
"src": "2893:11:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 318,
"name": "closingTime",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 299,
"src": "2906:11:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 319,
"modifierName": {
"argumentTypes": null,
"id": 316,
"name": "TimedCrowdsale",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2335,
"src": "2878:14:3",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_TimedCrowdsale_$2335_$",
"typeString": "type(contract TimedCrowdsale)"
}
},
"nodeType": "ModifierInvocation",
"src": "2878:40:3"
}
],
"name": "",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 310,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 297,
"name": "openingTime",
"nodeType": "VariableDeclaration",
"scope": 358,
"src": "2625:19:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 296,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2625:7:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 299,
"name": "closingTime",
"nodeType": "VariableDeclaration",
"scope": 358,
"src": "2654:19:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 298,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2654:7:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 301,
"name": "firstDayRate",
"nodeType": "VariableDeclaration",
"scope": 358,
"src": "2683:20:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 300,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2683:7:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 303,
"name": "rate",
"nodeType": "VariableDeclaration",
"scope": 358,
"src": "2713:12:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 302,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2713:7:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 305,
"name": "wallet",
"nodeType": "VariableDeclaration",
"scope": 358,
"src": "2735:22:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
"typeName": {
"id": 304,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2735:15:3",
"stateMutability": "payable",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 307,
"name": "pool",
"nodeType": "VariableDeclaration",
"scope": 358,
"src": "2767:20:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
"typeName": {
"id": 306,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2767:15:3",
"stateMutability": "payable",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 309,
"name": "token",
"nodeType": "VariableDeclaration",
"scope": 358,
"src": "2797:12:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20_$3214",
"typeString": "contract IERC20"
},
"typeName": {
"contractScope": null,
"id": 308,
"name": "IERC20",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 3214,
"src": "2797:6:3",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20_$3214",
"typeString": "contract IERC20"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2615:200:3"
},
"returnParameters": {
"id": 320,
"nodeType": "ParameterList",
"parameters": [],
"src": "2923:0:3"
},
"scope": 473,
"src": "2604:610:3",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 380,
"nodeType": "Block",
"src": "3726:155:3",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"id": 361,
"name": "super",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3464,
"src": "3736:5:3",
"typeDescriptions": {
"typeIdentifier": "t_super$_TokenSale_$473",
"typeString": "contract super TokenSale"
}
},
"id": 363,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "_finalization",
"nodeType": "MemberAccess",
"referencedDeclaration": 2222,
"src": "3736:19:3",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$__$returns$__$",
"typeString": "function ()"
}
},
"id": 364,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3736:21:3",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 365,
"nodeType": "ExpressionStatement",
"src": "3736:21:3"
},
{
"assignments": [
367
],
"declarations": [
{
"constant": false,
"id": 367,
"name": "remainingBalance",
"nodeType": "VariableDeclaration",
"scope": 380,
"src": "3767:24:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 366,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3767:7:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 374,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 371,
"name": "this",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3463,
"src": "3819:4:3",
"typeDescriptions": {
"typeIdentifier": "t_contract$_TokenSale_$473",
"typeString": "contract TokenSale"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_TokenSale_$473",
"typeString": "contract TokenSale"
}
],
"id": 370,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "3811:7:3",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": "address"
},
"id": 372,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3811:13:3",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
],
"expression": {
"argumentTypes": null,
"id": 368,
"name": "_token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 295,
"src": "3794:6:3",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20_$3214",
"typeString": "contract IERC20"
}
},
"id": 369,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "balanceOf",
"nodeType": "MemberAccess",
"referencedDeclaration": 3188,
"src": "3794:16:3",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$",
"typeString": "function (address) view external returns (uint256)"
}
},
"id": 373,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3794:31:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "3767:58:3"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 376,
"name": "_pool",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 293,
"src": "3850:5:3",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 377,
"name": "remainingBalance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 367,
"src": "3857:16:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 375,
"name": "_deliverTokens",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2119,
"src": "3835:14:3",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,uint256)"
}
},
"id": 378,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3835:39:3",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 379,
"nodeType": "ExpressionStatement",
"src": "3835:39:3"
}
]
},
"documentation": "@dev Called when the sale is finalized - extension of OpenZeppelin's\n standard function. We extend it to have all potentially unsold tokens\n transferred to the Pool (where they will be made redeemable).\n This function is called by the public finalize() function.\n Note interestingly that the caller finalize() public function is callable\n by anyone to avoid having the admin prevent finalization maliciously.",
"id": 381,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "_finalization",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 359,
"nodeType": "ParameterList",
"parameters": [],
"src": "3702:2:3"
},
"returnParameters": {
"id": 360,
"nodeType": "ParameterList",
"parameters": [],
"src": "3726:0:3"
},
"scope": 473,
"src": "3680:201:3",
"stateMutability": "nonpayable",
"superFunction": 2222,
"visibility": "internal"
},
{
"body": {
"id": 401,
"nodeType": "Block",
"src": "4172:228:3",
"statements": [
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 393,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 386,
"name": "block",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3394,
"src": "4248:5:3",
"typeDescriptions": {
"typeIdentifier": "t_magic_block",
"typeString": "block"
}
},
"id": 387,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "timestamp",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "4248:15:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"components": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 390,
"name": "FIRST_DAY_DURATION",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 279,
"src": "4284:18:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 388,
"name": "_openingTime",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 287,
"src": "4267:12:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 389,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "add",
"nodeType": "MemberAccess",
"referencedDeclaration": 2525,
"src": "4267:16:3",
"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": 391,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4267:36:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 392,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "4266:38:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "4248:56:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"id": 399,
"nodeType": "Block",
"src": "4357:37:3",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 397,
"name": "_rate",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 291,
"src": "4378:5:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 385,
"id": 398,
"nodeType": "Return",
"src": "4371:12:3"
}
]
},
"id": 400,
"nodeType": "IfStatement",
"src": "4244:150:3",
"trueBody": {
"id": 396,
"nodeType": "Block",
"src": "4306:45:3",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 394,
"name": "_firstDayRate",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 289,
"src": "4327:13:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 385,
"id": 395,
"nodeType": "Return",
"src": "4320:20:3"
}
]
}
}
]
},
"documentation": "@dev Override of OpenZeppelin's standard function to reflect the\n evolving ETH-to-Token rate.\n @return uint256 The current number of tokens purchasable for the Wei amount",
"id": 402,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "getCurrentRate",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 382,
"nodeType": "ParameterList",
"parameters": [],
"src": "4111:2:3"
},
"returnParameters": {
"id": 385,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 384,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 402,
"src": "4159:7:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 383,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "4159:7:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "4158:9:3"
},
"scope": 473,
"src": "4088:312:3",
"stateMutability": "view",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 457,
"nodeType": "Block",
"src": "5074:603:3",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 412,
"name": "beneficiary",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 404,
"src": "5111:11:3",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 413,
"name": "weiAmount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 406,
"src": "5124:9:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 409,
"name": "super",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3464,
"src": "5084:5:3",
"typeDescriptions": {
"typeIdentifier": "t_super$_TokenSale_$473",
"typeString": "contract super TokenSale"
}
},
"id": 411,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "_preValidatePurchase",
"nodeType": "MemberAccess",
"referencedDeclaration": 2334,
"src": "5084:26:3",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,uint256) view"
}
},
"id": 414,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "5084:50:3",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 415,
"nodeType": "ExpressionStatement",
"src": "5084:50:3"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 419,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "!",
"prefix": true,
"src": "5152:9:3",
"subExpression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 417,
"name": "paused",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2366,
"src": "5153:6:3",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$",
"typeString": "function () view returns (bool)"
}
},
"id": 418,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "5153:8:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "63616e6e6f74207075726368617365207768656e20636f6e747261637420697320706175736564",
"id": 420,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "5163:41:3",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_868972f58774e5d3e62365a569fcc45aed8833abb421498cba8c8f4ee56c3cf8",
"typeString": "literal_string \"cannot purchase when contract is paused\""
},
"value": "cannot purchase when contract is paused"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_868972f58774e5d3e62365a569fcc45aed8833abb421498cba8c8f4ee56c3cf8",
"typeString": "literal_string \"cannot purchase when contract is paused\""
}
],
"id": 416,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
3407,
3408
],
"referencedDeclaration": 3408,
"src": "5144:7:3",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 421,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "5144:61:3",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 422,
"nodeType": "ExpressionStatement",
"src": "5144:61:3"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 425,
"name": "beneficiary",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 404,
"src": "5237:11:3",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 424,
"name": "kycAuthorized",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1520,
"src": "5223:13:3",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$",
"typeString": "function (address) view returns (bool)"
}
},
"id": 426,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "5223:26:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "62656e6566696369617279206d757374206265204b594320617574686f72697a6564",
"id": 427,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "5251:36:3",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_8d7b5675e93a5aff07b174d2af69e2a634222786aef5a32f1bb28da416875350",
"typeString": "literal_string \"beneficiary must be KYC authorized\""
},
"value": "beneficiary must be KYC authorized"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_8d7b5675e93a5aff07b174d2af69e2a634222786aef5a32f1bb28da416875350",
"typeString": "literal_string \"beneficiary must be KYC authorized\""
}
],
"id": 423,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
3407,
3408
],
"referencedDeclaration": 3408,
"src": "5215:7:3",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 428,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "5215:73:3",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 429,
"nodeType": "ExpressionStatement",
"src": "5215:73:3"
},
{
"condition": {
"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": 430,
"name": "block",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3394,
"src": "5365:5:3",
"typeDescriptions": {
"typeIdentifier": "t_magic_block",
"typeString": "block"
}
},
"id": 431,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "timestamp",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "5365:15:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"components": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 434,
"name": "FIRST_DAY_DURATION",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 279,
"src": "5401:18:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 432,
"name": "_openingTime",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 287,
"src": "5384:12:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 433,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "add",
"nodeType": "MemberAccess",
"referencedDeclaration": 2525,
"src": "5384:16:3",
"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": 435,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "5384:36:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 436,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "5383:38:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "5365:56:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"id": 455,
"nodeType": "Block",
"src": "5555:116:3",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 451,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 448,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3404,
"src": "5577:3:3",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 449,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "value",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "5577:9:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"argumentTypes": null,
"id": 450,
"name": "MINIMUM_CONTRIBUTION",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 285,
"src": "5590:20:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "5577:33:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "636f6e747269627574696f6e206d7573742062652061626f7665206d696e696d756d20617574686f72697a6564",
"id": 452,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "5612:47:3",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_77d495c384f9780a8df9f614897e00486245dfb4f08b36993d67c38a58960fb0",
"typeString": "literal_string \"contribution must be above minimum authorized\""
},
"value": "contribution must be above minimum authorized"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_77d495c384f9780a8df9f614897e00486245dfb4f08b36993d67c38a58960fb0",
"typeString": "literal_string \"contribution must be above minimum authorized\""
}
],
"id": 447,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
3407,
3408
],
"referencedDeclaration": 3408,
"src": "5569:7:3",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 453,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "5569:91:3",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 454,
"nodeType": "ExpressionStatement",
"src": "5569:91:3"
}
]
},
"id": 456,
"nodeType": "IfStatement",
"src": "5361:310:3",
"trueBody": {
"id": 446,
"nodeType": "Block",
"src": "5423:126:3",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 442,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 439,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3404,
"src": "5445:3:3",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 440,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "value",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "5445:9:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"argumentTypes": null,
"id": 441,
"name": "FIRST_DAY_MINIMUM_CONTRIBUTION",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 282,
"src": "5458:30:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "5445:43:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "636f6e747269627574696f6e206d7573742062652061626f7665206d696e696d756d20617574686f72697a6564",
"id": 443,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "5490:47:3",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_77d495c384f9780a8df9f614897e00486245dfb4f08b36993d67c38a58960fb0",
"typeString": "literal_string \"contribution must be above minimum authorized\""
},
"value": "contribution must be above minimum authorized"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_77d495c384f9780a8df9f614897e00486245dfb4f08b36993d67c38a58960fb0",
"typeString": "literal_string \"contribution must be above minimum authorized\""
}
],
"id": 438,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
3407,
3408
],
"referencedDeclaration": 3408,
"src": "5437:7:3",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 444,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "5437:101:3",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 445,
"nodeType": "ExpressionStatement",
"src": "5437:101:3"
}
]
}
}
]
},
"documentation": "@dev Called before any purchase is confirmed - extension of OpenZeppelin's\n standard function to implement the Pausable, MinimumContribution and KYC\n behaviours as requirements.\n Note that OpenZeppelin's implementation choice has been to have this\n function as a view function, although it does not have a return value.\n @param beneficiary The party that wishes to receive tokens\n @param weiAmount The amount sent in exchange for tokens, in Wei",
"id": 458,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "_preValidatePurchase",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 407,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 404,
"name": "beneficiary",
"nodeType": "VariableDeclaration",
"scope": 458,
"src": "4987:19:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 403,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "4987:7:3",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 406,
"name": "weiAmount",
"nodeType": "VariableDeclaration",
"scope": 458,
"src": "5016:17:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 405,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "5016:7:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "4977:62:3"
},
"returnParameters": {
"id": 408,
"nodeType": "ParameterList",
"parameters": [],
"src": "5074:0:3"
},
"scope": 473,
"src": "4948:729:3",
"stateMutability": "view",
"superFunction": 2334,
"visibility": "internal"
},
{
"body": {
"id": 471,
"nodeType": "Block",
"src": "6066:134:3",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 467,
"name": "getCurrentRate",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 402,
"src": "6176:14:3",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
"typeString": "function () view returns (uint256)"
}
},
"id": 468,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "6176:16:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 465,
"name": "weiAmount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 460,
"src": "6162:9:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 466,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "mul",
"nodeType": "MemberAccess",
"referencedDeclaration": 2453,
"src": "6162:13:3",
"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": 469,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "6162:31:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 464,
"id": 470,
"nodeType": "Return",
"src": "6155:38:3"
}
]
},
"documentation": "@dev Override of OpenZeppelin's standard function to reflect the\n evolving ETH-to-Token rate.\n @param weiAmount The amount sent in exchange for tokens, in Wei\n @return uint256 The number of tokens purchasable for the Wei amount",
"id": 472,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "_getTokenAmount",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 461,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 460,
"name": "weiAmount",
"nodeType": "VariableDeclaration",
"scope": 472,
"src": "5982:17:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 459,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "5982:7:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "5972:33:3"
},
"returnParameters": {
"id": 464,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 463,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 472,
"src": "6053:7:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 462,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "6053:7:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "6052:9:3"
},
"scope": 473,
"src": "5948:252:3",
"stateMutability": "view",
"superFunction": 2153,
"visibility": "internal"
}
],
"scope": 474,
"src": "962:5240:3"
}
],
"src": "162:6041:3"
},
"legacyAST": {
"absolutePath": "/Users/thomasvanderstraeten/code/hey/mainchain/contracts/TokenSale.sol",
"exportedSymbols": {
"TokenSale": [
473
]
},
"id": 474,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 259,
"literals": [
"solidity",
"^",
"0.5",
".0"
],
"nodeType": "PragmaDirective",
"src": "162:23:3"
},
{
"absolutePath": "openzeppelin-solidity/contracts/crowdsale/validation/TimedCrowdsale.sol",
"file": "openzeppelin-solidity/contracts/crowdsale/validation/TimedCrowdsale.sol",
"id": 260,
"nodeType": "ImportDirective",
"scope": 474,
"sourceUnit": 2336,
"src": "187:81:3",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "openzeppelin-solidity/contracts/crowdsale/distribution/FinalizableCrowdsale.sol",
"file": "openzeppelin-solidity/contracts/crowdsale/distribution/FinalizableCrowdsale.sol",
"id": 261,
"nodeType": "ImportDirective",
"scope": 474,
"sourceUnit": 2224,
"src": "269:89:3",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "openzeppelin-solidity/contracts/lifecycle/Pausable.sol",
"file": "openzeppelin-solidity/contracts/lifecycle/Pausable.sol",
"id": 262,
"nodeType": "ImportDirective",
"scope": 474,
"sourceUnit": 2419,
"src": "359:64:3",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol",
"file": "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol",
"id": 263,
"nodeType": "ImportDirective",
"scope": 474,
"sourceUnit": 3215,
"src": "424:64:3",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "openzeppelin-solidity/contracts/math/SafeMath.sol",
"file": "openzeppelin-solidity/contracts/math/SafeMath.sol",
"id": 264,
"nodeType": "ImportDirective",
"scope": 474,
"sourceUnit": 2547,
"src": "489:59:3",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/Users/thomasvanderstraeten/code/hey/mainchain/contracts/utils/KYC.sol",
"file": "./utils/KYC.sol",
"id": 265,
"nodeType": "ImportDirective",
"scope": 474,
"sourceUnit": 1598,
"src": "549:25:3",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 266,
"name": "TimedCrowdsale",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 2335,
"src": "984:14:3",
"typeDescriptions": {
"typeIdentifier": "t_contract$_TimedCrowdsale_$2335",
"typeString": "contract TimedCrowdsale"
}
},
"id": 267,
"nodeType": "InheritanceSpecifier",
"src": "984:14:3"
},
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 268,
"name": "FinalizableCrowdsale",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 2223,
"src": "1000:20:3",
"typeDescriptions": {
"typeIdentifier": "t_contract$_FinalizableCrowdsale_$2223",
"typeString": "contract FinalizableCrowdsale"
}
},
"id": 269,
"nodeType": "InheritanceSpecifier",
"src": "1000:20:3"
},
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 270,
"name": "Pausable",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 2418,
"src": "1022:8:3",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Pausable_$2418",
"typeString": "contract Pausable"
}
},
"id": 271,
"nodeType": "InheritanceSpecifier",
"src": "1022:8:3"
},
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 272,
"name": "KYC",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1597,
"src": "1032:3:3",
"typeDescriptions": {
"typeIdentifier": "t_contract$_KYC_$1597",
"typeString": "contract KYC"
}
},
"id": 273,
"nodeType": "InheritanceSpecifier",
"src": "1032:3:3"
}
],
"contractDependencies": [
1597,
1701,
1898,
2165,
2223,
2335,
2418,
3389
],
"contractKind": "contract",
"documentation": " @title Hey Token Sale\n @dev The only deviations from OpenZeppelin's standard Crowdsale example\n is a Pausable behaviour to freeze buying of tokens, and a funneling of\n unsold tokens to a Pool address when the sale closes.\n Note that we are naming this contract 'TokenSale' to not redeclare the parent\n Crowdsale contract, from which Sale indirectly inherits.",
"fullyImplemented": true,
"id": 473,
"linearizedBaseContracts": [
473,
1597,
1701,
2418,
1898,
2223,
2335,
2165,
3389
],
"name": "TokenSale",
"nodeType": "ContractDefinition",
"nodes": [
{
"id": 276,
"libraryName": {
"contractScope": null,
"id": 274,
"name": "SafeMath",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 2546,
"src": "1077:8:3",
"typeDescriptions": {
"typeIdentifier": "t_contract$_SafeMath_$2546",
"typeString": "library SafeMath"
}
},
"nodeType": "UsingForDirective",
"src": "1071:27:3",
"typeName": {
"id": 275,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1090:7:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
{
"constant": true,
"id": 279,
"name": "FIRST_DAY_DURATION",
"nodeType": "VariableDeclaration",
"scope": 473,
"src": "1156:53:3",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 277,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1156:7:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": {
"argumentTypes": null,
"hexValue": "3234",
"id": 278,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1201:8:3",
"subdenomination": "hours",
"typeDescriptions": {
"typeIdentifier": "t_rational_86400_by_1",
"typeString": "int_const 86400"
},
"value": "24"
},
"visibility": "public"
},
{
"constant": true,
"id": 282,
"name": "FIRST_DAY_MINIMUM_CONTRIBUTION",
"nodeType": "VariableDeclaration",
"scope": 473,
"src": "1261:65:3",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 280,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1261:7:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": {
"argumentTypes": null,
"hexValue": "3130",
"id": 281,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1318:8:3",
"subdenomination": "ether",
"typeDescriptions": {
"typeIdentifier": "t_rational_10000000000000000000_by_1",
"typeString": "int_const 10000000000000000000"
},
"value": "10"
},
"visibility": "public"
},
{
"constant": true,
"id": 285,
"name": "MINIMUM_CONTRIBUTION",
"nodeType": "VariableDeclaration",
"scope": 473,
"src": "1378:56:3",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 283,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1378:7:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": {
"argumentTypes": null,
"hexValue": "302e31",
"id": 284,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1425:9:3",
"subdenomination": "ether",
"typeDescriptions": {
"typeIdentifier": "t_rational_100000000000000000_by_1",
"typeString": "int_const 100000000000000000"
},
"value": "0.1"
},
"visibility": "public"
},
{
"constant": false,
"id": 287,
"name": "_openingTime",
"nodeType": "VariableDeclaration",
"scope": 473,
"src": "1539:28:3",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 286,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1539:7:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "private"
},
{
"constant": false,
"id": 289,
"name": "_firstDayRate",
"nodeType": "VariableDeclaration",
"scope": 473,
"src": "1599:29:3",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 288,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1599:7:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "private"
},
{
"constant": false,
"id": 291,
"name": "_rate",
"nodeType": "VariableDeclaration",
"scope": 473,
"src": "1678:21:3",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 290,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1678:7:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "private"
},
{
"constant": false,
"id": 293,
"name": "_pool",
"nodeType": "VariableDeclaration",
"scope": 473,
"src": "1759:21:3",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 292,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1759:7:3",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "private"
},
{
"constant": false,
"id": 295,
"name": "_token",
"nodeType": "VariableDeclaration",
"scope": 473,
"src": "1855:21:3",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20_$3214",
"typeString": "contract IERC20"
},
"typeName": {
"contractScope": null,
"id": 294,
"name": "IERC20",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 3214,
"src": "1855:6:3",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20_$3214",
"typeString": "contract IERC20"
}
},
"value": null,
"visibility": "private"
},
{
"body": {
"id": 357,
"nodeType": "Block",
"src": "2923:291:3",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 324,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 322,
"name": "firstDayRate",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 301,
"src": "2941:12:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 323,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2956:1:3",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "2941:16:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "6669727374206461792072617465206d7573742062652061626f76652030",
"id": 325,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2959:32:3",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_b6758f0afa287093724eb240ee66c9844f1cff94199c19a50eb19e4d3a739c4c",
"typeString": "literal_string \"first day rate must be above 0\""
},
"value": "first day rate must be above 0"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_b6758f0afa287093724eb240ee66c9844f1cff94199c19a50eb19e4d3a739c4c",
"typeString": "literal_string \"first day rate must be above 0\""
}
],
"id": 321,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
3407,
3408
],
"referencedDeclaration": 3408,
"src": "2933:7:3",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 326,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2933:59:3",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 327,
"nodeType": "ExpressionStatement",
"src": "2933:59:3"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
"id": 333,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 329,
"name": "pool",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 307,
"src": "3010:4:3",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "30",
"id": 331,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3026:1:3",
"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": 330,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "3018:7:3",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": "address"
},
"id": 332,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3018:10:3",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"src": "3010:18:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "706f6f6c2063616e6e6f7420626520746865207a65726f2061646472657373",
"id": 334,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3030:33:3",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_d458305a613c76261dda4942709b5b997c0b7daad72c52a3f03d44f0d082a547",
"typeString": "literal_string \"pool cannot be the zero address\""
},
"value": "pool cannot be the zero address"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_d458305a613c76261dda4942709b5b997c0b7daad72c52a3f03d44f0d082a547",
"typeString": "literal_string \"pool cannot be the zero address\""
}
],
"id": 328,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
3407,
3408
],
"referencedDeclaration": 3408,
"src": "3002:7:3",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 335,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3002:62:3",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 336,
"nodeType": "ExpressionStatement",
"src": "3002:62:3"
},
{
"expression": {
"argumentTypes": null,
"id": 339,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 337,
"name": "_openingTime",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 287,
"src": "3075:12:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 338,
"name": "openingTime",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 297,
"src": "3090:11:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3075:26:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 340,
"nodeType": "ExpressionStatement",
"src": "3075:26:3"
},
{
"expression": {
"argumentTypes": null,
"id": 343,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 341,
"name": "_firstDayRate",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 289,
"src": "3111:13:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 342,
"name": "firstDayRate",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 301,
"src": "3127:12:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3111:28:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 344,
"nodeType": "ExpressionStatement",
"src": "3111:28:3"
},
{
"expression": {
"argumentTypes": null,
"id": 347,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 345,
"name": "_rate",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 291,
"src": "3149:5:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 346,
"name": "rate",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 303,
"src": "3157:4:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3149:12:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 348,
"nodeType": "ExpressionStatement",
"src": "3149:12:3"
},
{
"expression": {
"argumentTypes": null,
"id": 351,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 349,
"name": "_pool",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 293,
"src": "3171:5:3",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 350,
"name": "pool",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 307,
"src": "3179:4:3",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"src": "3171:12:3",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 352,
"nodeType": "ExpressionStatement",
"src": "3171:12:3"
},
{
"expression": {
"argumentTypes": null,
"id": 355,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 353,
"name": "_token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 295,
"src": "3193:6:3",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20_$3214",
"typeString": "contract IERC20"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 354,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 309,
"src": "3202:5:3",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20_$3214",
"typeString": "contract IERC20"
}
},
"src": "3193:14:3",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20_$3214",
"typeString": "contract IERC20"
}
},
"id": 356,
"nodeType": "ExpressionStatement",
"src": "3193:14:3"
}
]
},
"documentation": "@dev Constructor. First contract set up (tokens will also need to be transferred to the contract afterwards)\n @param openingTime Time the sale will start in seconds since the Unix Epoch\n @param closingTime Time the sale will close in seconds since the Unix Epoch\n @param firstDayRate ETH-to-Token rate for the first day of the sale\n @param rate ETH-to-Token rate after the first day of the sale\n @param wallet The party which will get the funds of the token sale\n @param pool The party which will get the unsold tokens at closing of the sale\n @param token The ERC20 token being sold",
"id": 358,
"implemented": true,
"kind": "constructor",
"modifiers": [
{
"arguments": [
{
"argumentTypes": null,
"id": 312,
"name": "rate",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 303,
"src": "2849:4:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 313,
"name": "wallet",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 305,
"src": "2855:6:3",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 314,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 309,
"src": "2863:5:3",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20_$3214",
"typeString": "contract IERC20"
}
}
],
"id": 315,
"modifierName": {
"argumentTypes": null,
"id": 311,
"name": "Crowdsale",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2165,
"src": "2839:9:3",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_Crowdsale_$2165_$",
"typeString": "type(contract Crowdsale)"
}
},
"nodeType": "ModifierInvocation",
"src": "2839:30:3"
},
{
"arguments": [
{
"argumentTypes": null,
"id": 317,
"name": "openingTime",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 297,
"src": "2893:11:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 318,
"name": "closingTime",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 299,
"src": "2906:11:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 319,
"modifierName": {
"argumentTypes": null,
"id": 316,
"name": "TimedCrowdsale",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2335,
"src": "2878:14:3",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_TimedCrowdsale_$2335_$",
"typeString": "type(contract TimedCrowdsale)"
}
},
"nodeType": "ModifierInvocation",
"src": "2878:40:3"
}
],
"name": "",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 310,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 297,
"name": "openingTime",
"nodeType": "VariableDeclaration",
"scope": 358,
"src": "2625:19:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 296,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2625:7:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 299,
"name": "closingTime",
"nodeType": "VariableDeclaration",
"scope": 358,
"src": "2654:19:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 298,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2654:7:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 301,
"name": "firstDayRate",
"nodeType": "VariableDeclaration",
"scope": 358,
"src": "2683:20:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 300,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2683:7:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 303,
"name": "rate",
"nodeType": "VariableDeclaration",
"scope": 358,
"src": "2713:12:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 302,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2713:7:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 305,
"name": "wallet",
"nodeType": "VariableDeclaration",
"scope": 358,
"src": "2735:22:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
"typeName": {
"id": 304,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2735:15:3",
"stateMutability": "payable",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 307,
"name": "pool",
"nodeType": "VariableDeclaration",
"scope": 358,
"src": "2767:20:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
"typeName": {
"id": 306,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2767:15:3",
"stateMutability": "payable",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 309,
"name": "token",
"nodeType": "VariableDeclaration",
"scope": 358,
"src": "2797:12:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20_$3214",
"typeString": "contract IERC20"
},
"typeName": {
"contractScope": null,
"id": 308,
"name": "IERC20",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 3214,
"src": "2797:6:3",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20_$3214",
"typeString": "contract IERC20"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2615:200:3"
},
"returnParameters": {
"id": 320,
"nodeType": "ParameterList",
"parameters": [],
"src": "2923:0:3"
},
"scope": 473,
"src": "2604:610:3",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 380,
"nodeType": "Block",
"src": "3726:155:3",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"id": 361,
"name": "super",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3464,
"src": "3736:5:3",
"typeDescriptions": {
"typeIdentifier": "t_super$_TokenSale_$473",
"typeString": "contract super TokenSale"
}
},
"id": 363,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "_finalization",
"nodeType": "MemberAccess",
"referencedDeclaration": 2222,
"src": "3736:19:3",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$__$returns$__$",
"typeString": "function ()"
}
},
"id": 364,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3736:21:3",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 365,
"nodeType": "ExpressionStatement",
"src": "3736:21:3"
},
{
"assignments": [
367
],
"declarations": [
{
"constant": false,
"id": 367,
"name": "remainingBalance",
"nodeType": "VariableDeclaration",
"scope": 380,
"src": "3767:24:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 366,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3767:7:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 374,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 371,
"name": "this",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3463,
"src": "3819:4:3",
"typeDescriptions": {
"typeIdentifier": "t_contract$_TokenSale_$473",
"typeString": "contract TokenSale"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_TokenSale_$473",
"typeString": "contract TokenSale"
}
],
"id": 370,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "3811:7:3",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": "address"
},
"id": 372,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3811:13:3",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
],
"expression": {
"argumentTypes": null,
"id": 368,
"name": "_token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 295,
"src": "3794:6:3",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20_$3214",
"typeString": "contract IERC20"
}
},
"id": 369,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "balanceOf",
"nodeType": "MemberAccess",
"referencedDeclaration": 3188,
"src": "3794:16:3",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$",
"typeString": "function (address) view external returns (uint256)"
}
},
"id": 373,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3794:31:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "3767:58:3"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 376,
"name": "_pool",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 293,
"src": "3850:5:3",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 377,
"name": "remainingBalance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 367,
"src": "3857:16:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 375,
"name": "_deliverTokens",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2119,
"src": "3835:14:3",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,uint256)"
}
},
"id": 378,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3835:39:3",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 379,
"nodeType": "ExpressionStatement",
"src": "3835:39:3"
}
]
},
"documentation": "@dev Called when the sale is finalized - extension of OpenZeppelin's\n standard function. We extend it to have all potentially unsold tokens\n transferred to the Pool (where they will be made redeemable).\n This function is called by the public finalize() function.\n Note interestingly that the caller finalize() public function is callable\n by anyone to avoid having the admin prevent finalization maliciously.",
"id": 381,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "_finalization",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 359,
"nodeType": "ParameterList",
"parameters": [],
"src": "3702:2:3"
},
"returnParameters": {
"id": 360,
"nodeType": "ParameterList",
"parameters": [],
"src": "3726:0:3"
},
"scope": 473,
"src": "3680:201:3",
"stateMutability": "nonpayable",
"superFunction": 2222,
"visibility": "internal"
},
{
"body": {
"id": 401,
"nodeType": "Block",
"src": "4172:228:3",
"statements": [
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 393,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 386,
"name": "block",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3394,
"src": "4248:5:3",
"typeDescriptions": {
"typeIdentifier": "t_magic_block",
"typeString": "block"
}
},
"id": 387,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "timestamp",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "4248:15:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"components": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 390,
"name": "FIRST_DAY_DURATION",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 279,
"src": "4284:18:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 388,
"name": "_openingTime",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 287,
"src": "4267:12:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 389,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "add",
"nodeType": "MemberAccess",
"referencedDeclaration": 2525,
"src": "4267:16:3",
"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": 391,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4267:36:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 392,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "4266:38:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "4248:56:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"id": 399,
"nodeType": "Block",
"src": "4357:37:3",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 397,
"name": "_rate",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 291,
"src": "4378:5:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 385,
"id": 398,
"nodeType": "Return",
"src": "4371:12:3"
}
]
},
"id": 400,
"nodeType": "IfStatement",
"src": "4244:150:3",
"trueBody": {
"id": 396,
"nodeType": "Block",
"src": "4306:45:3",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 394,
"name": "_firstDayRate",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 289,
"src": "4327:13:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 385,
"id": 395,
"nodeType": "Return",
"src": "4320:20:3"
}
]
}
}
]
},
"documentation": "@dev Override of OpenZeppelin's standard function to reflect the\n evolving ETH-to-Token rate.\n @return uint256 The current number of tokens purchasable for the Wei amount",
"id": 402,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "getCurrentRate",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 382,
"nodeType": "ParameterList",
"parameters": [],
"src": "4111:2:3"
},
"returnParameters": {
"id": 385,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 384,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 402,
"src": "4159:7:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 383,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "4159:7:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "4158:9:3"
},
"scope": 473,
"src": "4088:312:3",
"stateMutability": "view",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 457,
"nodeType": "Block",
"src": "5074:603:3",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 412,
"name": "beneficiary",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 404,
"src": "5111:11:3",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 413,
"name": "weiAmount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 406,
"src": "5124:9:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 409,
"name": "super",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3464,
"src": "5084:5:3",
"typeDescriptions": {
"typeIdentifier": "t_super$_TokenSale_$473",
"typeString": "contract super TokenSale"
}
},
"id": 411,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "_preValidatePurchase",
"nodeType": "MemberAccess",
"referencedDeclaration": 2334,
"src": "5084:26:3",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,uint256) view"
}
},
"id": 414,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "5084:50:3",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 415,
"nodeType": "ExpressionStatement",
"src": "5084:50:3"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 419,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "!",
"prefix": true,
"src": "5152:9:3",
"subExpression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 417,
"name": "paused",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2366,
"src": "5153:6:3",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$",
"typeString": "function () view returns (bool)"
}
},
"id": 418,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "5153:8:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "63616e6e6f74207075726368617365207768656e20636f6e747261637420697320706175736564",
"id": 420,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "5163:41:3",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_868972f58774e5d3e62365a569fcc45aed8833abb421498cba8c8f4ee56c3cf8",
"typeString": "literal_string \"cannot purchase when contract is paused\""
},
"value": "cannot purchase when contract is paused"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_868972f58774e5d3e62365a569fcc45aed8833abb421498cba8c8f4ee56c3cf8",
"typeString": "literal_string \"cannot purchase when contract is paused\""
}
],
"id": 416,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
3407,
3408
],
"referencedDeclaration": 3408,
"src": "5144:7:3",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 421,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "5144:61:3",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 422,
"nodeType": "ExpressionStatement",
"src": "5144:61:3"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 425,
"name": "beneficiary",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 404,
"src": "5237:11:3",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 424,
"name": "kycAuthorized",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1520,
"src": "5223:13:3",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$",
"typeString": "function (address) view returns (bool)"
}
},
"id": 426,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "5223:26:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "62656e6566696369617279206d757374206265204b594320617574686f72697a6564",
"id": 427,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "5251:36:3",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_8d7b5675e93a5aff07b174d2af69e2a634222786aef5a32f1bb28da416875350",
"typeString": "literal_string \"beneficiary must be KYC authorized\""
},
"value": "beneficiary must be KYC authorized"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_8d7b5675e93a5aff07b174d2af69e2a634222786aef5a32f1bb28da416875350",
"typeString": "literal_string \"beneficiary must be KYC authorized\""
}
],
"id": 423,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
3407,
3408
],
"referencedDeclaration": 3408,
"src": "5215:7:3",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 428,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "5215:73:3",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 429,
"nodeType": "ExpressionStatement",
"src": "5215:73:3"
},
{
"condition": {
"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": 430,
"name": "block",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3394,
"src": "5365:5:3",
"typeDescriptions": {
"typeIdentifier": "t_magic_block",
"typeString": "block"
}
},
"id": 431,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "timestamp",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "5365:15:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"components": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 434,
"name": "FIRST_DAY_DURATION",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 279,
"src": "5401:18:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 432,
"name": "_openingTime",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 287,
"src": "5384:12:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 433,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "add",
"nodeType": "MemberAccess",
"referencedDeclaration": 2525,
"src": "5384:16:3",
"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": 435,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "5384:36:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 436,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "5383:38:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "5365:56:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"id": 455,
"nodeType": "Block",
"src": "5555:116:3",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 451,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 448,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3404,
"src": "5577:3:3",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 449,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "value",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "5577:9:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"argumentTypes": null,
"id": 450,
"name": "MINIMUM_CONTRIBUTION",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 285,
"src": "5590:20:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "5577:33:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "636f6e747269627574696f6e206d7573742062652061626f7665206d696e696d756d20617574686f72697a6564",
"id": 452,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "5612:47:3",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_77d495c384f9780a8df9f614897e00486245dfb4f08b36993d67c38a58960fb0",
"typeString": "literal_string \"contribution must be above minimum authorized\""
},
"value": "contribution must be above minimum authorized"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_77d495c384f9780a8df9f614897e00486245dfb4f08b36993d67c38a58960fb0",
"typeString": "literal_string \"contribution must be above minimum authorized\""
}
],
"id": 447,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
3407,
3408
],
"referencedDeclaration": 3408,
"src": "5569:7:3",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 453,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "5569:91:3",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 454,
"nodeType": "ExpressionStatement",
"src": "5569:91:3"
}
]
},
"id": 456,
"nodeType": "IfStatement",
"src": "5361:310:3",
"trueBody": {
"id": 446,
"nodeType": "Block",
"src": "5423:126:3",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 442,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 439,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3404,
"src": "5445:3:3",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 440,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "value",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "5445:9:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"argumentTypes": null,
"id": 441,
"name": "FIRST_DAY_MINIMUM_CONTRIBUTION",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 282,
"src": "5458:30:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "5445:43:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "636f6e747269627574696f6e206d7573742062652061626f7665206d696e696d756d20617574686f72697a6564",
"id": 443,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "5490:47:3",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_77d495c384f9780a8df9f614897e00486245dfb4f08b36993d67c38a58960fb0",
"typeString": "literal_string \"contribution must be above minimum authorized\""
},
"value": "contribution must be above minimum authorized"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_77d495c384f9780a8df9f614897e00486245dfb4f08b36993d67c38a58960fb0",
"typeString": "literal_string \"contribution must be above minimum authorized\""
}
],
"id": 438,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
3407,
3408
],
"referencedDeclaration": 3408,
"src": "5437:7:3",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 444,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "5437:101:3",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 445,
"nodeType": "ExpressionStatement",
"src": "5437:101:3"
}
]
}
}
]
},
"documentation": "@dev Called before any purchase is confirmed - extension of OpenZeppelin's\n standard function to implement the Pausable, MinimumContribution and KYC\n behaviours as requirements.\n Note that OpenZeppelin's implementation choice has been to have this\n function as a view function, although it does not have a return value.\n @param beneficiary The party that wishes to receive tokens\n @param weiAmount The amount sent in exchange for tokens, in Wei",
"id": 458,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "_preValidatePurchase",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 407,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 404,
"name": "beneficiary",
"nodeType": "VariableDeclaration",
"scope": 458,
"src": "4987:19:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 403,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "4987:7:3",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 406,
"name": "weiAmount",
"nodeType": "VariableDeclaration",
"scope": 458,
"src": "5016:17:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 405,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "5016:7:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "4977:62:3"
},
"returnParameters": {
"id": 408,
"nodeType": "ParameterList",
"parameters": [],
"src": "5074:0:3"
},
"scope": 473,
"src": "4948:729:3",
"stateMutability": "view",
"superFunction": 2334,
"visibility": "internal"
},
{
"body": {
"id": 471,
"nodeType": "Block",
"src": "6066:134:3",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 467,
"name": "getCurrentRate",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 402,
"src": "6176:14:3",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
"typeString": "function () view returns (uint256)"
}
},
"id": 468,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "6176:16:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 465,
"name": "weiAmount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 460,
"src": "6162:9:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 466,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "mul",
"nodeType": "MemberAccess",
"referencedDeclaration": 2453,
"src": "6162:13:3",
"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": 469,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "6162:31:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 464,
"id": 470,
"nodeType": "Return",
"src": "6155:38:3"
}
]
},
"documentation": "@dev Override of OpenZeppelin's standard function to reflect the\n evolving ETH-to-Token rate.\n @param weiAmount The amount sent in exchange for tokens, in Wei\n @return uint256 The number of tokens purchasable for the Wei amount",
"id": 472,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "_getTokenAmount",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 461,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 460,
"name": "weiAmount",
"nodeType": "VariableDeclaration",
"scope": 472,
"src": "5982:17:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 459,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "5982:7:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "5972:33:3"
},
"returnParameters": {
"id": 464,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 463,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 472,
"src": "6053:7:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 462,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "6053:7:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "6052:9:3"
},
"scope": 473,
"src": "5948:252:3",
"stateMutability": "view",
"superFunction": 2153,
"visibility": "internal"
}
],
"scope": 474,
"src": "962:5240:3"
}
],
"src": "162:6041:3"
},
"compiler": {
"name": "solc",
"version": "0.5.0+commit.1d4f565a.Emscripten.clang"
},
"networks": {
"1543575271380": {
"events": {},
"links": {},
"address": "0x214c1fcf508127cf69ba0d4d9e4f017adb064fae",
"transactionHash": "0xf389ff0ee43ce6c39a9261e01a3a5c7043e4edfe3a40cd06f8ab6024819287f9"
},
"1543575362424": {
"events": {},
"links": {},
"address": "0xa6f43130efb2c54ce284aa46f3167f16fdf3158b",
"transactionHash": "0xec7298d5b7aa355c32652e185a040fa85dad626e8af8a1e7bd7a182761243edc"
},
"1543582128197": {
"events": {},
"links": {},
"address": "0x4c3895bf14daddf41d72d7702ff2e4d1c84ef28d",
"transactionHash": "0x04c3b243d95b09cd5f3c543243165787775ff2b961782b206ad122f0a2b5ef6e"
},
"1543582216163": {
"events": {},
"links": {},
"address": "0x9058804cabe5a5743103e63968232631af31565d",
"transactionHash": "0xfb9822e04fdc90181a6388750c98c4c64579d55900dd7b8c3018dc5d8da71888"
},
"1543582360302": {
"events": {},
"links": {},
"address": "0xf7444cb50f14d199dc1f9963d5efd8f80720c901",
"transactionHash": "0xbea5ea5725a488abd3eb69dc060a5d651021d072f86b2be1ac8e1eb1bfe28bda"
},
"1543583319709": {
"events": {},
"links": {},
"address": "0x8b824fd66b3a9e7235678f63c1e760f76d68042c",
"transactionHash": "0xdc298a6ee3c19ed72aa2d4445e698d5c3b61fb20f1e88acd833b74709330c15d"
},
"1543583471841": {
"events": {},
"links": {},
"address": "0x0baee2218a3c8e47b70f8d1833a8ad933c31cb0a",
"transactionHash": "0x7363ec86dffb0e258ea3aaffbed7530bd2a8e5fd5d8135daa9eac394fbb89a7f"
},
"1543584071380": {
"events": {},
"links": {},
"address": "0xf021d156bf32539d4232bea91734d6725aa6507b",
"transactionHash": "0xa773de61751a97e3ecb19df0a1b236c006cb6cdd2a6be513436b0eb9da9ef899"
},
"1543585014304": {
"events": {},
"links": {},
"address": "0x40f94fd5fe53d78e0962777385d185387e22ed3b",
"transactionHash": "0x33e6fe8da5f9d2be569cf868ec9ab66554c7b154aaeeeba16f47ed761a3b6728"
}
},
"schemaVersion": "3.0.2",
"updatedAt": "2019-02-28T16:14:49.622Z",
"devdoc": {
"details": "The only deviations from OpenZeppelin's standard Crowdsale example is a Pausable behaviour to freeze buying of tokens, and a funneling of unsold tokens to a Pool address when the sale closes. Note that we are naming this contract 'TokenSale' to not redeclare the parent Crowdsale contract, from which Sale indirectly inherits.",
"methods": {
"buyTokens(address)": {
"details": "low level token purchase ***DO NOT OVERRIDE*** This function has a non-reentrancy guard, so it shouldn't be called by another `nonReentrant` function.",
"params": {
"beneficiary": "Recipient of the token purchase"
}
},
"closingTime()": {
"return": "the crowdsale closing time."
},
"constructor": {
"details": "Constructor. First contract set up (tokens will also need to be transferred to the contract afterwards)",
"params": {
"closingTime": "Time the sale will close in seconds since the Unix Epoch",
"firstDayRate": "ETH-to-Token rate for the first day of the sale",
"openingTime": "Time the sale will start in seconds since the Unix Epoch",
"pool": "The party which will get the unsold tokens at closing of the sale",
"rate": "ETH-to-Token rate after the first day of the sale",
"token": "The ERC20 token being sold",
"wallet": "The party which will get the funds of the token sale"
}
},
"finalize()": {
"details": "Must be called after crowdsale ends, to do some extra finalization work. Calls the contract's finalization function."
},
"finalized()": {
"return": "true if the crowdsale is finalized, false otherwise."
},
"getCurrentRate()": {
"details": "Override of OpenZeppelin's standard function to reflect the evolving ETH-to-Token rate.",
"return": "uint256 The current number of tokens purchasable for the Wei amount"
},
"grantKYCAuthorizations(address[])": {
"details": "Allows a KYC verifier to grant KYC authorization to accounts.",
"params": {
"accounts": "Array of addresses that have been KYC authorized."
}
},
"hasClosed()": {
"details": "Checks whether the period in which the crowdsale is open has already elapsed.",
"return": "Whether crowdsale period has elapsed"
},
"isOpen()": {
"return": "true if the crowdsale is open, false otherwise."
},
"kycAuthorized(address)": {
"return": "true if `account` has been KYC authorized."
},
"openingTime()": {
"return": "the crowdsale opening time."
},
"pause()": {
"details": "called by the owner to pause, triggers stopped state"
},
"paused()": {
"return": "true if the contract is paused, false otherwise."
},
"rate()": {
"return": "the number of token units a buyer gets per wei."
},
"revertKYCAuthorizations(address[])": {
"details": "Allows a KYC verifier to revert previous KYC authorization to accounts.",
"params": {
"accounts": "The addresses that have been KYC reverted."
}
},
"token()": {
"return": "the token being sold."
},
"unpause()": {
"details": "called by the owner to unpause, returns to normal state"
},
"wallet()": {
"return": "the address where funds are collected."
},
"weiRaised()": {
"return": "the amount of wei raised."
}
},
"title": "Hey Token Sale"
},
"userdoc": {
"methods": {}
}
}