From f09dc351d7dfa60f9919567474fed79013ac0fa1 Mon Sep 17 00:00:00 2001 From: Ville Sundell Date: Fri, 19 Jul 2019 14:10:22 +0300 Subject: [PATCH] Updated Smart Contracts Using smart contracts from the smart-contracts repo: a6458b6751d347d815a13b511782d5acd5da6d8a --- sto/ethereum/contracts-flattened.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sto/ethereum/contracts-flattened.json b/sto/ethereum/contracts-flattened.json index 54eb611..bcf4eb4 100644 --- a/sto/ethereum/contracts-flattened.json +++ b/sto/ethereum/contracts-flattened.json @@ -1 +1 @@ -{"AMLToken": {"abi": [{"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "state", "type": "bool"}], "name": "setTransferAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "mintingFinished", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "name", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "approve", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "recoverTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_from", "type": "address"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setReleaseAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "decimals", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "receiver", "type": "address"}, {"name": "amount", "type": "uint256"}], "name": "mint", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "burnAmount", "type": "uint256"}], "name": "burn", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "mintAgents", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "state", "type": "bool"}], "name": "setMintAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "uint256"}], "name": "upgrade", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_name", "type": "string"}, {"name": "_symbol", "type": "string"}], "name": "setTokenInformation", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "upgradeAgent", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "releaseTokenTransfer", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "upgradeMaster", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_subtractedValue", "type": "uint256"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "fromWhom", "type": "address"}], "name": "transferToOwner", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "getUpgradeState", "outputs": [{"name": "", "type": "uint8"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "transferAgents", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "symbol", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "released", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "canUpgrade", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "tokensToBeReturned", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalUpgraded", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "releaseAgent", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_addedValue", "type": "uint256"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "agent", "type": "address"}], "name": "setUpgradeAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}, {"name": "_spender", "type": "address"}], "name": "allowance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isToken", "outputs": [{"name": "weAre", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "BURN_ADDRESS", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "master", "type": "address"}], "name": "setUpgradeMaster", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [{"name": "_name", "type": "string"}, {"name": "_symbol", "type": "string"}, {"name": "_initialSupply", "type": "uint256"}, {"name": "_decimals", "type": "uint256"}, {"name": "_mintable", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "fromWhom", "type": "address"}, {"indexed": false, "name": "amount", "type": "uint256"}], "name": "OwnerReclaim", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newName", "type": "string"}, {"indexed": false, "name": "newSymbol", "type": "string"}], "name": "UpdatedTokenInformation", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "_from", "type": "address"}, {"indexed": true, "name": "_to", "type": "address"}, {"indexed": false, "name": "_value", "type": "uint256"}], "name": "Upgrade", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "agent", "type": "address"}], "name": "UpgradeAgentSet", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "addr", "type": "address"}, {"indexed": false, "name": "state", "type": "bool"}], "name": "MintingAgentChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "receiver", "type": "address"}, {"indexed": false, "name": "amount", "type": "uint256"}], "name": "Minted", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "burner", "type": "address"}, {"indexed": false, "name": "burnedAmount", "type": "uint256"}], "name": "Burned", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}, {"indexed": true, "name": "spender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "bytecode": "0x60806040526004805460a060020a60ff02191690556006805460ff191690553480156200002b57600080fd5b5060405162001f1e38038062001f1e83398101604090815281516020808401519284015160608501516080860151600380546008805433600160a060020a0319918216811790925591821681179091161790559386018051909695909501949193909290918691869186918691869186918691869186918691620000b691600b919088019062000182565b508351620000cc90600c90602087019062000182565b506001839055600d829055600354600160a060020a03166000908152602081905260408120849055831115620001485760035460015460408051600160a060020a039093168352602083019190915280517f30385c845b448a36257a6a1716e6ad2e1bc2cbe333cde1e69fe849ad6511adfe9281900390910190a15b8015156200016d576006805460ff191660019081179091555415156200016d57600080fd5b50505050505050505050505050505062000227565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620001c557805160ff1916838001178555620001f5565b82800160010185558215620001f5579182015b82811115620001f5578251825591602001919060010190620001d8565b506200020392915062000207565b5090565b6200022491905b808211156200020357600081556001016200020e565b90565b611ce780620002376000396000f3006080604052600436106101d75763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166302f652a381146101dc57806305d2035b1461020457806306fdde031461022d578063095ea7b3146102b757806316114acd146102db57806318160ddd146102fc57806323b872dd1461032357806329ff4f531461034d578063313ce5671461036e57806340c10f191461038357806342966c68146103a757806342c1867b146103bf57806343214675146103e057806345977d03146104065780634eee966f1461041e5780635de4ccb0146104b55780635f412d4f146104e6578063600440cb146104fb578063661884631461051057806370a0823114610534578063812d504d146105555780638444b39114610576578063867c2857146105af5780638da5cb5b146105d057806395d89b41146105e557806396132521146105fa5780639738968c1461060f578063a9059cbb14610624578063c45d19db14610648578063c752ff6214610669578063d1f276d31461067e578063d73dd62314610693578063d7e7088a146106b7578063dd62ed3e146106d8578063eefa597b146106ff578063f2fde38b14610714578063fccc281314610735578063ffeb7d751461074a575b600080fd5b3480156101e857600080fd5b50610202600160a060020a0360043516602435151561076b565b005b34801561021057600080fd5b506102196107d9565b604080519115158252519081900360200190f35b34801561023957600080fd5b506102426107e2565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561027c578181015183820152602001610264565b50505050905090810190601f1680156102a95780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156102c357600080fd5b50610219600160a060020a0360043516602435610870565b3480156102e757600080fd5b50610202600160a060020a03600435166108d6565b34801561030857600080fd5b506103116109a6565b60408051918252519081900360200190f35b34801561032f57600080fd5b50610219600160a060020a03600435811690602435166044356109ad565b34801561035957600080fd5b50610202600160a060020a0360043516610a11565b34801561037a57600080fd5b50610311610a83565b34801561038f57600080fd5b50610202600160a060020a0360043516602435610a89565b3480156103b357600080fd5b50610202600435610c68565b3480156103cb57600080fd5b50610219600160a060020a0360043516610d40565b3480156103ec57600080fd5b50610202600160a060020a03600435166024351515610d55565b34801561041257600080fd5b50610202600435610de0565b34801561042a57600080fd5b506040805160206004803580820135601f810184900484028501840190955284845261020294369492936024939284019190819084018382808284375050604080516020601f89358b018035918201839004830284018301909452808352979a999881019791965091820194509250829150840183828082843750949750610f519650505050505050565b3480156104c157600080fd5b506104ca6110be565b60408051600160a060020a039092168252519081900360200190f35b3480156104f257600080fd5b506102026110cd565b34801561050757600080fd5b506104ca6110fb565b34801561051c57600080fd5b50610219600160a060020a036004351660243561110a565b34801561054057600080fd5b50610311600160a060020a03600435166111fa565b34801561056157600080fd5b50610202600160a060020a0360043516611215565b34801561058257600080fd5b5061058b611369565b6040518082600481111561059b57fe5b60ff16815260200191505060405180910390f35b3480156105bb57600080fd5b50610219600160a060020a03600435166113b4565b3480156105dc57600080fd5b506104ca6113c9565b3480156105f157600080fd5b506102426113d8565b34801561060657600080fd5b50610219611433565b34801561061b57600080fd5b50610219611454565b34801561063057600080fd5b50610219600160a060020a0360043516602435611489565b34801561065457600080fd5b50610311600160a060020a03600435166114eb565b34801561067557600080fd5b50610311611581565b34801561068a57600080fd5b506104ca611587565b34801561069f57600080fd5b50610219600160a060020a0360043516602435611596565b3480156106c357600080fd5b50610202600160a060020a036004351661162f565b3480156106e457600080fd5b50610311600160a060020a0360043581169060243516611830565b34801561070b57600080fd5b5061021961185b565b34801561072057600080fd5b50610202600160a060020a0360043516611860565b34801561074157600080fd5b506104ca6118f5565b34801561075657600080fd5b50610202600160a060020a03600435166118fa565b600354600160a060020a0316331461078257600080fd5b60045460009074010000000000000000000000000000000000000000900460ff16156107ad57600080fd5b50600160a060020a03919091166000908152600560205260409020805460ff1916911515919091179055565b60065460ff1681565b600b805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156108685780601f1061083d57610100808354040283529160200191610868565b820191906000526020600020905b81548152906001019060200180831161084b57829003601f168201915b505050505081565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b600354600160a060020a031633146108ed57600080fd5b600354600160a060020a038083169163a9059cbb911661090c846114eb565b6040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b15801561097757600080fd5b505af115801561098b573d6000803e3d6000fd5b505050506040513d60208110156109a157600080fd5b505050565b6001545b90565b600454600090849074010000000000000000000000000000000000000000900460ff1615156109fd57600160a060020a03811660009081526005602052604090205460ff1615156109fd57600080fd5b610a08858585611955565b95945050505050565b600354600160a060020a03163314610a2857600080fd5b60045460009074010000000000000000000000000000000000000000900460ff1615610a5357600080fd5b506004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600d5481565b3360009081526007602052604090205460ff161515610aa757600080fd5b60065460ff1615610ab757600080fd5b60015473__contracts/SafeMathLib.sol:SafeMathLi__6366098d4f9091836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b158015610b2e57600080fd5b505af4158015610b42573d6000803e3d6000fd5b505050506040513d6020811015610b5857600080fd5b5051600155600160a060020a038216600090815260208181526040918290205482517f66098d4f000000000000000000000000000000000000000000000000000000008152600481019190915260248101849052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b158015610be657600080fd5b505af4158015610bfa573d6000803e3d6000fd5b505050506040513d6020811015610c1057600080fd5b5051600160a060020a0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b33600081815260208190526040902054610c88908363ffffffff611acc16565b600160a060020a038216600090815260208190526040902055600154610cb4908363ffffffff611acc16565b60015560408051600160a060020a03831681526020810184905281517f696de425f79f4a40bc6d2122ca50507f0efbeabbff86a84871b7196ab8ea8df7929181900390910190a1604080518381529051600091600160a060020a038416917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b60076020526000908152604090205460ff1681565b600354600160a060020a03163314610d6c57600080fd5b60065460ff1615610d7c57600080fd5b600160a060020a038216600081815260076020908152604091829020805460ff191685151590811790915582519384529083015280517f4b0adf6c802794c7dde28a08a4e07131abcff3bf9603cd71f14f90bec7865efa9281900390910190a15050565b6000610dea611369565b90506003816004811115610dfa57fe5b1480610e1157506004816004811115610e0f57fe5b145b1515610e1c57600080fd5b811515610e2857600080fd5b33600090815260208190526040902054610e48908363ffffffff611acc16565b33600090815260208190526040902055600154610e6b908363ffffffff611acc16565b600155600a54610e81908363ffffffff611ade16565b600a55600954604080517f753e88e5000000000000000000000000000000000000000000000000000000008152336004820152602481018590529051600160a060020a039092169163753e88e59160448082019260009290919082900301818387803b158015610ef057600080fd5b505af1158015610f04573d6000803e3d6000fd5b5050600954604080518681529051600160a060020a0390921693503392507f7e5c344a8141a805725cb476f76c6953b842222b967edd1f78ddb6e8b3f397ac919081900360200190a35050565b600354600160a060020a03163314610f6857600080fd5b8151610f7b90600b906020850190611c23565b508051610f8f90600c906020840190611c23565b5060408051818152600b8054600260001961010060018416150201909116049282018390527fd131ab1e6f279deea74e13a18477e13e2107deb6dc8ae955648948be5841fb46929091600c91819060208201906060830190869080156110365780601f1061100b57610100808354040283529160200191611036565b820191906000526020600020905b81548152906001019060200180831161101957829003601f168201915b50508381038252845460026000196101006001841615020190911604808252602090910190859080156110aa5780601f1061107f576101008083540402835291602001916110aa565b820191906000526020600020905b81548152906001019060200180831161108d57829003601f168201915b505094505050505060405180910390a15050565b600954600160a060020a031681565b600454600160a060020a031633146110e457600080fd5b6006805460ff191660011790556110f9611af4565b565b600854600160a060020a031681565b336000908152600260209081526040808320600160a060020a03861684529091528120548083111561115f57336000908152600260209081526040808320600160a060020a0388168452909152812055611194565b61116f818463ffffffff611acc16565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a031660009081526020819052604090205490565b600354600090600160a060020a0316331461122f57600080fd5b60045474010000000000000000000000000000000000000000900460ff161561125757600080fd5b611260826111fa565b600160a060020a03831660009081526020819052604090205490915061128c908263ffffffff611acc16565b600160a060020a0380841660009081526020819052604080822093909355600354909116815220546112c4908263ffffffff611ade16565b60038054600160a060020a03908116600090815260208181526040918290209490945591548251858152925190821693918616927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92908290030190a360408051600160a060020a03841681526020810183905281517f6b3f5f84a24147dab46359bf96b628286e8962759491b8c0e11e50770c8cc136929181900390910190a15050565b6000611373611454565b1515611381575060016109aa565b600954600160a060020a0316151561139b575060026109aa565b600a5415156113ac575060036109aa565b5060046109aa565b60056020526000908152604090205460ff1681565b600354600160a060020a031681565b600c805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156108685780601f1061083d57610100808354040283529160200191610868565b60045474010000000000000000000000000000000000000000900460ff1681565b60045460009074010000000000000000000000000000000000000000900460ff168015611484575061148461185b565b905090565b600454600090339074010000000000000000000000000000000000000000900460ff1615156114d957600160a060020a03811660009081526005602052604090205460ff1615156114d957600080fd5b6114e38484611b42565b949350505050565b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600091600160a060020a038416916370a082319160248082019260209290919082900301818787803b15801561154f57600080fd5b505af1158015611563573d6000803e3d6000fd5b505050506040513d602081101561157957600080fd5b505192915050565b600a5481565b600454600160a060020a031681565b336000908152600260209081526040808320600160a060020a03861684529091528120546115ca908363ffffffff611ade16565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b611637611454565b151561164257600080fd5b600160a060020a038116151561165757600080fd5b600854600160a060020a0316331461166e57600080fd5b6004611678611369565b600481111561168357fe5b141561168e57600080fd5b6009805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038381169190911791829055604080517f61d3d7a6000000000000000000000000000000000000000000000000000000008152905192909116916361d3d7a6916004808201926020929091908290030181600087803b15801561171257600080fd5b505af1158015611726573d6000803e3d6000fd5b505050506040513d602081101561173c57600080fd5b5051151561174957600080fd5b600154600960009054906101000a9004600160a060020a0316600160a060020a0316634b2ba0dd6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156117b857600080fd5b505af11580156117cc573d6000803e3d6000fd5b505050506040513d60208110156117e257600080fd5b5051146117ee57600080fd5b60095460408051600160a060020a039092168252517f7845d5aa74cc410e35571258d954f23b82276e160fe8c188fa80566580f279cc9181900360200190a150565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600190565b600354600160a060020a0316331461187757600080fd5b600160a060020a038116151561188c57600080fd5b600354604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600081565b600160a060020a038116151561190f57600080fd5b600854600160a060020a0316331461192657600080fd5b6008805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6000600160a060020a038316151561196c57600080fd5b600160a060020a03841660009081526020819052604090205482111561199157600080fd5b600160a060020a03841660009081526002602090815260408083203384529091529020548211156119c157600080fd5b600160a060020a0384166000908152602081905260409020546119ea908363ffffffff611acc16565b600160a060020a038086166000908152602081905260408082209390935590851681522054611a1f908363ffffffff611ade16565b600160a060020a03808516600090815260208181526040808320949094559187168152600282528281203382529091522054611a61908363ffffffff611acc16565b600160a060020a03808616600081815260026020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b600082821115611ad857fe5b50900390565b600082820183811015611aed57fe5b9392505050565b600454600160a060020a03163314611b0b57600080fd5b6004805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b6000600160a060020a0383161515611b5957600080fd5b33600090815260208190526040902054821115611b7557600080fd5b33600090815260208190526040902054611b95908363ffffffff611acc16565b3360009081526020819052604080822092909255600160a060020a03851681522054611bc7908363ffffffff611ade16565b600160a060020a038416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10611c6457805160ff1916838001178555611c91565b82800160010185558215611c91579182015b82811115611c91578251825591602001919060010190611c76565b50611c9d929150611ca1565b5090565b6109aa91905b80821115611c9d5760008155600101611ca75600a165627a7a7230582087718b612167d2fe4829deb1d7ab0b4ede3913ba1487f06b55a5d6a1a4dc1f730029", "bytecode_runtime": "0x6080604052600436106101d75763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166302f652a381146101dc57806305d2035b1461020457806306fdde031461022d578063095ea7b3146102b757806316114acd146102db57806318160ddd146102fc57806323b872dd1461032357806329ff4f531461034d578063313ce5671461036e57806340c10f191461038357806342966c68146103a757806342c1867b146103bf57806343214675146103e057806345977d03146104065780634eee966f1461041e5780635de4ccb0146104b55780635f412d4f146104e6578063600440cb146104fb578063661884631461051057806370a0823114610534578063812d504d146105555780638444b39114610576578063867c2857146105af5780638da5cb5b146105d057806395d89b41146105e557806396132521146105fa5780639738968c1461060f578063a9059cbb14610624578063c45d19db14610648578063c752ff6214610669578063d1f276d31461067e578063d73dd62314610693578063d7e7088a146106b7578063dd62ed3e146106d8578063eefa597b146106ff578063f2fde38b14610714578063fccc281314610735578063ffeb7d751461074a575b600080fd5b3480156101e857600080fd5b50610202600160a060020a0360043516602435151561076b565b005b34801561021057600080fd5b506102196107d9565b604080519115158252519081900360200190f35b34801561023957600080fd5b506102426107e2565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561027c578181015183820152602001610264565b50505050905090810190601f1680156102a95780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156102c357600080fd5b50610219600160a060020a0360043516602435610870565b3480156102e757600080fd5b50610202600160a060020a03600435166108d6565b34801561030857600080fd5b506103116109a6565b60408051918252519081900360200190f35b34801561032f57600080fd5b50610219600160a060020a03600435811690602435166044356109ad565b34801561035957600080fd5b50610202600160a060020a0360043516610a11565b34801561037a57600080fd5b50610311610a83565b34801561038f57600080fd5b50610202600160a060020a0360043516602435610a89565b3480156103b357600080fd5b50610202600435610c68565b3480156103cb57600080fd5b50610219600160a060020a0360043516610d40565b3480156103ec57600080fd5b50610202600160a060020a03600435166024351515610d55565b34801561041257600080fd5b50610202600435610de0565b34801561042a57600080fd5b506040805160206004803580820135601f810184900484028501840190955284845261020294369492936024939284019190819084018382808284375050604080516020601f89358b018035918201839004830284018301909452808352979a999881019791965091820194509250829150840183828082843750949750610f519650505050505050565b3480156104c157600080fd5b506104ca6110be565b60408051600160a060020a039092168252519081900360200190f35b3480156104f257600080fd5b506102026110cd565b34801561050757600080fd5b506104ca6110fb565b34801561051c57600080fd5b50610219600160a060020a036004351660243561110a565b34801561054057600080fd5b50610311600160a060020a03600435166111fa565b34801561056157600080fd5b50610202600160a060020a0360043516611215565b34801561058257600080fd5b5061058b611369565b6040518082600481111561059b57fe5b60ff16815260200191505060405180910390f35b3480156105bb57600080fd5b50610219600160a060020a03600435166113b4565b3480156105dc57600080fd5b506104ca6113c9565b3480156105f157600080fd5b506102426113d8565b34801561060657600080fd5b50610219611433565b34801561061b57600080fd5b50610219611454565b34801561063057600080fd5b50610219600160a060020a0360043516602435611489565b34801561065457600080fd5b50610311600160a060020a03600435166114eb565b34801561067557600080fd5b50610311611581565b34801561068a57600080fd5b506104ca611587565b34801561069f57600080fd5b50610219600160a060020a0360043516602435611596565b3480156106c357600080fd5b50610202600160a060020a036004351661162f565b3480156106e457600080fd5b50610311600160a060020a0360043581169060243516611830565b34801561070b57600080fd5b5061021961185b565b34801561072057600080fd5b50610202600160a060020a0360043516611860565b34801561074157600080fd5b506104ca6118f5565b34801561075657600080fd5b50610202600160a060020a03600435166118fa565b600354600160a060020a0316331461078257600080fd5b60045460009074010000000000000000000000000000000000000000900460ff16156107ad57600080fd5b50600160a060020a03919091166000908152600560205260409020805460ff1916911515919091179055565b60065460ff1681565b600b805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156108685780601f1061083d57610100808354040283529160200191610868565b820191906000526020600020905b81548152906001019060200180831161084b57829003601f168201915b505050505081565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b600354600160a060020a031633146108ed57600080fd5b600354600160a060020a038083169163a9059cbb911661090c846114eb565b6040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b15801561097757600080fd5b505af115801561098b573d6000803e3d6000fd5b505050506040513d60208110156109a157600080fd5b505050565b6001545b90565b600454600090849074010000000000000000000000000000000000000000900460ff1615156109fd57600160a060020a03811660009081526005602052604090205460ff1615156109fd57600080fd5b610a08858585611955565b95945050505050565b600354600160a060020a03163314610a2857600080fd5b60045460009074010000000000000000000000000000000000000000900460ff1615610a5357600080fd5b506004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600d5481565b3360009081526007602052604090205460ff161515610aa757600080fd5b60065460ff1615610ab757600080fd5b60015473__contracts/SafeMathLib.sol:SafeMathLi__6366098d4f9091836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b158015610b2e57600080fd5b505af4158015610b42573d6000803e3d6000fd5b505050506040513d6020811015610b5857600080fd5b5051600155600160a060020a038216600090815260208181526040918290205482517f66098d4f000000000000000000000000000000000000000000000000000000008152600481019190915260248101849052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b158015610be657600080fd5b505af4158015610bfa573d6000803e3d6000fd5b505050506040513d6020811015610c1057600080fd5b5051600160a060020a0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b33600081815260208190526040902054610c88908363ffffffff611acc16565b600160a060020a038216600090815260208190526040902055600154610cb4908363ffffffff611acc16565b60015560408051600160a060020a03831681526020810184905281517f696de425f79f4a40bc6d2122ca50507f0efbeabbff86a84871b7196ab8ea8df7929181900390910190a1604080518381529051600091600160a060020a038416917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b60076020526000908152604090205460ff1681565b600354600160a060020a03163314610d6c57600080fd5b60065460ff1615610d7c57600080fd5b600160a060020a038216600081815260076020908152604091829020805460ff191685151590811790915582519384529083015280517f4b0adf6c802794c7dde28a08a4e07131abcff3bf9603cd71f14f90bec7865efa9281900390910190a15050565b6000610dea611369565b90506003816004811115610dfa57fe5b1480610e1157506004816004811115610e0f57fe5b145b1515610e1c57600080fd5b811515610e2857600080fd5b33600090815260208190526040902054610e48908363ffffffff611acc16565b33600090815260208190526040902055600154610e6b908363ffffffff611acc16565b600155600a54610e81908363ffffffff611ade16565b600a55600954604080517f753e88e5000000000000000000000000000000000000000000000000000000008152336004820152602481018590529051600160a060020a039092169163753e88e59160448082019260009290919082900301818387803b158015610ef057600080fd5b505af1158015610f04573d6000803e3d6000fd5b5050600954604080518681529051600160a060020a0390921693503392507f7e5c344a8141a805725cb476f76c6953b842222b967edd1f78ddb6e8b3f397ac919081900360200190a35050565b600354600160a060020a03163314610f6857600080fd5b8151610f7b90600b906020850190611c23565b508051610f8f90600c906020840190611c23565b5060408051818152600b8054600260001961010060018416150201909116049282018390527fd131ab1e6f279deea74e13a18477e13e2107deb6dc8ae955648948be5841fb46929091600c91819060208201906060830190869080156110365780601f1061100b57610100808354040283529160200191611036565b820191906000526020600020905b81548152906001019060200180831161101957829003601f168201915b50508381038252845460026000196101006001841615020190911604808252602090910190859080156110aa5780601f1061107f576101008083540402835291602001916110aa565b820191906000526020600020905b81548152906001019060200180831161108d57829003601f168201915b505094505050505060405180910390a15050565b600954600160a060020a031681565b600454600160a060020a031633146110e457600080fd5b6006805460ff191660011790556110f9611af4565b565b600854600160a060020a031681565b336000908152600260209081526040808320600160a060020a03861684529091528120548083111561115f57336000908152600260209081526040808320600160a060020a0388168452909152812055611194565b61116f818463ffffffff611acc16565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a031660009081526020819052604090205490565b600354600090600160a060020a0316331461122f57600080fd5b60045474010000000000000000000000000000000000000000900460ff161561125757600080fd5b611260826111fa565b600160a060020a03831660009081526020819052604090205490915061128c908263ffffffff611acc16565b600160a060020a0380841660009081526020819052604080822093909355600354909116815220546112c4908263ffffffff611ade16565b60038054600160a060020a03908116600090815260208181526040918290209490945591548251858152925190821693918616927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92908290030190a360408051600160a060020a03841681526020810183905281517f6b3f5f84a24147dab46359bf96b628286e8962759491b8c0e11e50770c8cc136929181900390910190a15050565b6000611373611454565b1515611381575060016109aa565b600954600160a060020a0316151561139b575060026109aa565b600a5415156113ac575060036109aa565b5060046109aa565b60056020526000908152604090205460ff1681565b600354600160a060020a031681565b600c805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156108685780601f1061083d57610100808354040283529160200191610868565b60045474010000000000000000000000000000000000000000900460ff1681565b60045460009074010000000000000000000000000000000000000000900460ff168015611484575061148461185b565b905090565b600454600090339074010000000000000000000000000000000000000000900460ff1615156114d957600160a060020a03811660009081526005602052604090205460ff1615156114d957600080fd5b6114e38484611b42565b949350505050565b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600091600160a060020a038416916370a082319160248082019260209290919082900301818787803b15801561154f57600080fd5b505af1158015611563573d6000803e3d6000fd5b505050506040513d602081101561157957600080fd5b505192915050565b600a5481565b600454600160a060020a031681565b336000908152600260209081526040808320600160a060020a03861684529091528120546115ca908363ffffffff611ade16565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b611637611454565b151561164257600080fd5b600160a060020a038116151561165757600080fd5b600854600160a060020a0316331461166e57600080fd5b6004611678611369565b600481111561168357fe5b141561168e57600080fd5b6009805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038381169190911791829055604080517f61d3d7a6000000000000000000000000000000000000000000000000000000008152905192909116916361d3d7a6916004808201926020929091908290030181600087803b15801561171257600080fd5b505af1158015611726573d6000803e3d6000fd5b505050506040513d602081101561173c57600080fd5b5051151561174957600080fd5b600154600960009054906101000a9004600160a060020a0316600160a060020a0316634b2ba0dd6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156117b857600080fd5b505af11580156117cc573d6000803e3d6000fd5b505050506040513d60208110156117e257600080fd5b5051146117ee57600080fd5b60095460408051600160a060020a039092168252517f7845d5aa74cc410e35571258d954f23b82276e160fe8c188fa80566580f279cc9181900360200190a150565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600190565b600354600160a060020a0316331461187757600080fd5b600160a060020a038116151561188c57600080fd5b600354604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600081565b600160a060020a038116151561190f57600080fd5b600854600160a060020a0316331461192657600080fd5b6008805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6000600160a060020a038316151561196c57600080fd5b600160a060020a03841660009081526020819052604090205482111561199157600080fd5b600160a060020a03841660009081526002602090815260408083203384529091529020548211156119c157600080fd5b600160a060020a0384166000908152602081905260409020546119ea908363ffffffff611acc16565b600160a060020a038086166000908152602081905260408082209390935590851681522054611a1f908363ffffffff611ade16565b600160a060020a03808516600090815260208181526040808320949094559187168152600282528281203382529091522054611a61908363ffffffff611acc16565b600160a060020a03808616600081815260026020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b600082821115611ad857fe5b50900390565b600082820183811015611aed57fe5b9392505050565b600454600160a060020a03163314611b0b57600080fd5b6004805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b6000600160a060020a0383161515611b5957600080fd5b33600090815260208190526040902054821115611b7557600080fd5b33600090815260208190526040902054611b95908363ffffffff611acc16565b3360009081526020819052604080822092909255600160a060020a03851681522054611bc7908363ffffffff611ade16565b600160a060020a038416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10611c6457805160ff1916838001178555611c91565b82800160010185558215611c91579182015b82811115611c91578251825591602001919060010190611c76565b50611c9d929150611ca1565b5090565b6109aa91905b80821115611c9d5760008155600101611ca75600a165627a7a7230582087718b612167d2fe4829deb1d7ab0b4ede3913ba1487f06b55a5d6a1a4dc1f730029", "direct_dependencies": ["SafeMathLib"], "full_dependencies": ["SafeMathLib"], "linkrefs": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 6630}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 7118}], "linkrefs_runtime": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 5496}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 5984}], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "state", "type": "bool"}], "name": "setTransferAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "mintingFinished", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "name", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "approve", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "recoverTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_from", "type": "address"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setReleaseAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "decimals", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "receiver", "type": "address"}, {"name": "amount", "type": "uint256"}], "name": "mint", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "burnAmount", "type": "uint256"}], "name": "burn", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "mintAgents", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "state", "type": "bool"}], "name": "setMintAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "uint256"}], "name": "upgrade", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_name", "type": "string"}, {"name": "_symbol", "type": "string"}], "name": "setTokenInformation", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "upgradeAgent", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "releaseTokenTransfer", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "upgradeMaster", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_subtractedValue", "type": "uint256"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "fromWhom", "type": "address"}], "name": "transferToOwner", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "getUpgradeState", "outputs": [{"name": "", "type": "uint8"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "transferAgents", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "symbol", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "released", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "canUpgrade", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "tokensToBeReturned", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalUpgraded", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "releaseAgent", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_addedValue", "type": "uint256"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "agent", "type": "address"}], "name": "setUpgradeAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}, {"name": "_spender", "type": "address"}], "name": "allowance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isToken", "outputs": [{"name": "weAre", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "BURN_ADDRESS", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "master", "type": "address"}], "name": "setUpgradeMaster", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [{"name": "_name", "type": "string"}, {"name": "_symbol", "type": "string"}, {"name": "_initialSupply", "type": "uint256"}, {"name": "_decimals", "type": "uint256"}, {"name": "_mintable", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "fromWhom", "type": "address"}, {"indexed": false, "name": "amount", "type": "uint256"}], "name": "OwnerReclaim", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newName", "type": "string"}, {"indexed": false, "name": "newSymbol", "type": "string"}], "name": "UpdatedTokenInformation", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "_from", "type": "address"}, {"indexed": true, "name": "_to", "type": "address"}, {"indexed": false, "name": "_value", "type": "uint256"}], "name": "Upgrade", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "agent", "type": "address"}], "name": "UpgradeAgentSet", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "addr", "type": "address"}, {"indexed": false, "name": "state", "type": "bool"}], "name": "MintingAgentChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "receiver", "type": "address"}, {"indexed": false, "name": "amount", "type": "uint256"}], "name": "Minted", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "burner", "type": "address"}, {"indexed": false, "name": "burnedAmount", "type": "uint256"}], "name": "Burned", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}, {"indexed": true, "name": "spender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "devdoc": {"methods": {"allowance(address,address)": {"details": "Function to check the amount of tokens that an owner allowed to a spender.", "params": {"_owner": "address The address which owns the funds.", "_spender": "address The address which will spend the funds."}, "return": "A uint256 specifying the amount of tokens still available for the spender."}, "approve(address,uint256)": {"details": "Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729", "params": {"_spender": "The address which will spend the funds.", "_value": "The amount of tokens to be spent."}}, "balanceOf(address)": {"details": "Gets the balance of the specified address.", "params": {"_owner": "The address to query the the balance of."}, "return": "An uint256 representing the amount owned by the passed address."}, "decreaseApproval(address,uint256)": {"details": "Decrease the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[_spender] == 0. To decrement allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"_spender": "The address which will spend the funds.", "_subtractedValue": "The amount of tokens to decrease the allowance by."}}, "increaseApproval(address,uint256)": {"details": "Increase the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[_spender] == 0. To increment allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"_addedValue": "The amount of tokens to increase the allowance by.", "_spender": "The address which will spend the funds."}}, "recoverTokens(address)": {"details": "This will be invoked by the owner, when owner wants to rescue tokens", "params": {"token": "Token which will we rescue to the owner from the contract"}}, "tokensToBeReturned(address)": {"details": "Interface function, can be overwritten by the superclass", "params": {"token": "Token which balance we will check and return"}, "return": "The amount of tokens (in smallest denominator) the contract owns"}, "totalSupply()": {"details": "total number of tokens in existence"}, "transferOwnership(address)": {"details": "Allows the current owner to transfer control of the contract to a newOwner.", "params": {"newOwner": "The address to transfer ownership to."}}, "transferToOwner(address)": {"details": "Here the owner can reclaim the tokens from a participant if the token is not released yet. Refund will be handled offband.", "params": {"fromWhom": "address of the participant whose tokens we want to claim"}}}}, "userdoc": {"methods": {"burn(uint256)": {"notice": "Burn extra tokens from a balance. "}, "canUpgrade()": {"notice": "Allow upgrade agent functionality kick in only if the crowdsale was success."}, "getUpgradeState()": {"notice": "Get the state of the token upgrade."}, "mint(address,uint256)": {"notice": "Create new tokens and allocate them to an address.. * Only callably by a crowdsale contract (mint agent)."}, "releaseTokenTransfer()": {"notice": "When token is released to be transferable, enforce no new tokens can be created."}, "setMintAgent(address,bool)": {"notice": "Owner can allow a crowdsale contract to mint new tokens."}, "setReleaseAgent(address)": {"notice": "Set the contract that can call release and make the token transferable. * Design choice. Allow reset the release agent to fix fat finger mistakes."}, "setTokenInformation(string,string)": {"notice": "Owner can update token information here. * It is often useful to conceal the actual token association, until the token operations, like central issuance or reissuance have been completed. * This function allows the token owner to rename the token after the operations have been completed and then point the audience to use the token contract."}, "setTransferAgent(address,bool)": {"notice": "Owner can allow a particular address (a crowdsale contract) to transfer tokens despite the lock up period."}, "setUpgradeAgent(address)": {"notice": "Set an upgrade agent that handles"}, "setUpgradeMaster(address)": {"notice": "Change the upgrade master. * This allows us to set a new owner for the upgrade mechanism."}, "upgrade(uint256)": {"notice": "Allow the token holder to upgrade some of their tokens to a new contract."}}}}, "settings": {"compilationTarget": {"contracts/AMLToken.sol": "AMLToken"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/AMLToken.sol": {"keccak256": "0x5fd8cb89c45e2e8cca4af557a8ed60d6b922591f44b1d18d058eb1f14481995a", "urls": ["bzzr://b935edf727e8e30daa7b63b0db5ed87b8e65ae97d499ad1bd6085490084a8c5f"]}, "contracts/BurnableCrowdsaleToken.sol": {"keccak256": "0x675958952b65781d10a687151f84f5164b4c92bb5893070c6a2ffc9e32875a00", "urls": ["bzzr://444b37bcc9479485ba287995cf667781a659c883a3a7102611f7557c21a2ffbc"]}, "contracts/BurnableToken.sol": {"keccak256": "0xb97707de2018141fb22482d7ad4faa35cd471ae2ed992343bbcc1be0d3b95218", "urls": ["bzzr://a8b275d0ee25a96664f613d48339250b11d5140d7b74122d74482c3a94cc5295"]}, "contracts/CrowdsaleToken.sol": {"keccak256": "0xa812687ac327cd19fac64667980e70d4fb72ef7f61dce477818d085cf0a915df", "urls": ["bzzr://826d9dda00ce341794e5bb05c78b1abb2728e3c631f7a542345dcfa9f3bd9c50"]}, "contracts/MintableToken.sol": {"keccak256": "0x650e1d6b2bedcd36508918357c7cf4f36fdd093cd0c4d6342f4dcd3bdcdd7578", "urls": ["bzzr://7ba2ac0480d428066a18727e2adb76ba56856ecd37b4420e801131ec8f8f4be3"]}, "contracts/Recoverable.sol": {"keccak256": "0x311a332cdd87df6e00057f5455f4e68b043b5dbe211f6d68bc64e20817515635", "urls": ["bzzr://4fd99bcfb93baed6e7c8d22ee9ecc5c8346a1aa98288e77b01333b2c5d3f582d"]}, "contracts/ReleasableToken.sol": {"keccak256": "0x2c50180d0c1eab1aa63a04da3ae87ee2c482665d2a1a42c5f05b11234a7edaf4", "urls": ["bzzr://10752c317eba5c42e2848722689cfee4fffb7bcb42f3346e1a20715d843798e8"]}, "contracts/SafeMathLib.sol": {"keccak256": "0x501bfe31e274b9a5591f7c540bdced4d4312e27d4f19599147c9bbca3d9c6b18", "urls": ["bzzr://a80935ebddb06c247d71372d4e5833ee029f08633bd0fe4a274a57009567e5b9"]}, "contracts/StandardTokenExt.sol": {"keccak256": "0x9ea2d4cec4dccd5639c05e6c23dd027d80b5e5a20abd99b280ab7b2631b5a5fc", "urls": ["bzzr://a52d8fc5a21bd83997aff19128e00dceb251df712207b61223894c8b7f42d5ff"]}, "contracts/UpgradeAgent.sol": {"keccak256": "0x88e793f72feca4a18d2cd06e6037c1413d7b963eabcf5626d60bfb9d04d6e8e6", "urls": ["bzzr://87e39a65cf25d539ab49ad7e759b3298b8a19272964e69e3f2432f0323f30025"]}, "contracts/UpgradeableToken.sol": {"keccak256": "0xa74fc300c514564ece81c86905502c2de674b69c0633b133af19c1ba027da2c9", "urls": ["bzzr://55bc0b908c94781462b8959f051c6dbb53c35641b0f8cb38d74632ad6bf95e52"]}, "zeppelin/contracts/math/SafeMath.sol": {"keccak256": "0x341ba8cb467a3623e819ba1a683ac1d264005186f308505214e5f6bc89446a08", "urls": ["bzzr://59b5652ee4e4a1b5a8f1a8906e14c84af43d636cf5ca0725cc1813aabe4c8c17"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}, "zeppelin/contracts/token/ERC20/BasicToken.sol": {"keccak256": "0x948404468d61ff35ea4194650670408dabd65da7f905a1c16888ab84520bf39e", "urls": ["bzzr://ea75e20f95d7e4e10394fe6bfaa8eee56b4757c2a6f1e8df4180d33afa621935"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}, "zeppelin/contracts/token/ERC20/StandardToken.sol": {"keccak256": "0xd2b344a5259e19ec143074cfa65637a10c40b68395c59808c4af13bccbb2de55", "urls": ["bzzr://d61a01175a7ca1ba9f4403de603c20b897e33ec425aef2d9f8a7f9ddfdfaf5b2"]}}, "version": 1}, "name": "AMLToken", "ordered_full_dependencies": ["SafeMathLib"], "source_path": "contracts/AMLToken.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n assert(c / a == b);\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n\n\n\n/**\n * @title Basic token\n * @dev Basic version of StandardToken, with no allowances.\n */\ncontract BasicToken is ERC20Basic {\n using SafeMath for uint256;\n\n mapping(address => uint256) balances;\n\n uint256 totalSupply_;\n\n /**\n * @dev total number of tokens in existence\n */\n function totalSupply() public view returns (uint256) {\n return totalSupply_;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param _to The address to transfer to.\n * @param _value The amount to be transferred.\n */\n function transfer(address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[msg.sender]);\n\n // SafeMath.sub will throw if there is not enough balance.\n balances[msg.sender] = balances[msg.sender].sub(_value);\n balances[_to] = balances[_to].add(_value);\n Transfer(msg.sender, _to, _value);\n return true;\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param _owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address _owner) public view returns (uint256 balance) {\n return balances[_owner];\n }\n\n}\n\n\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n\n\n/**\n * @title Standard ERC20 token\n *\n * @dev Implementation of the basic standard token.\n * @dev https://github.com/ethereum/EIPs/issues/20\n * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol\n */\ncontract StandardToken is ERC20, BasicToken {\n\n mapping (address => mapping (address => uint256)) internal allowed;\n\n\n /**\n * @dev Transfer tokens from one address to another\n * @param _from address The address which you want to send tokens from\n * @param _to address The address which you want to transfer to\n * @param _value uint256 the amount of tokens to be transferred\n */\n function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[_from]);\n require(_value <= allowed[_from][msg.sender]);\n\n balances[_from] = balances[_from].sub(_value);\n balances[_to] = balances[_to].add(_value);\n allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);\n Transfer(_from, _to, _value);\n return true;\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n *\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param _spender The address which will spend the funds.\n * @param _value The amount of tokens to be spent.\n */\n function approve(address _spender, uint256 _value) public returns (bool) {\n allowed[msg.sender][_spender] = _value;\n Approval(msg.sender, _spender, _value);\n return true;\n }\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param _owner address The address which owns the funds.\n * @param _spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address _owner, address _spender) public view returns (uint256) {\n return allowed[_owner][_spender];\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(address _spender, uint _addedValue) public returns (bool) {\n allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {\n uint oldValue = allowed[msg.sender][_spender];\n if (_subtractedValue > oldValue) {\n allowed[msg.sender][_spender] = 0;\n } else {\n allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);\n }\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n\ncontract Recoverable is Ownable {\n\n /// @dev Empty constructor (for now)\n function Recoverable() {\n }\n\n /// @dev This will be invoked by the owner, when owner wants to rescue tokens\n /// @param token Token which will we rescue to the owner from the contract\n function recoverTokens(ERC20Basic token) onlyOwner public {\n token.transfer(owner, tokensToBeReturned(token));\n }\n\n /// @dev Interface function, can be overwritten by the superclass\n /// @param token Token which balance we will check and return\n /// @return The amount of tokens (in smallest denominator) the contract owns\n function tokensToBeReturned(ERC20Basic token) public returns (uint) {\n return token.balanceOf(this);\n }\n}\n\n\n\n/**\n * Standard EIP-20 token with an interface marker.\n *\n * @notice Interface marker is used by crowdsale contracts to validate that addresses point a good token contract.\n *\n */\ncontract StandardTokenExt is StandardToken, Recoverable {\n\n /* Interface declaration */\n function isToken() public constant returns (bool weAre) {\n return true;\n }\n}\n\n\ncontract BurnableToken is StandardTokenExt {\n\n // @notice An address for the transfer event where the burned tokens are transferred in a faux Transfer event\n address public constant BURN_ADDRESS = 0;\n\n /** How many tokens we burned */\n event Burned(address burner, uint burnedAmount);\n\n /**\n * Burn extra tokens from a balance.\n *\n */\n function burn(uint burnAmount) {\n address burner = msg.sender;\n balances[burner] = balances[burner].sub(burnAmount);\n totalSupply_ = totalSupply_.sub(burnAmount);\n Burned(burner, burnAmount);\n\n // Inform the blockchain explores that track the\n // balances only by a transfer event that the balance in this\n // address has decreased\n Transfer(burner, BURN_ADDRESS, burnAmount);\n }\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Upgrade agent interface inspired by Lunyr.\n *\n * Upgrade agent transfers tokens to a new contract.\n * Upgrade agent itself can be the token contract, or just a middle man contract doing the heavy lifting.\n */\ncontract UpgradeAgent {\n\n uint public originalSupply;\n\n /** Interface marker */\n function isUpgradeAgent() public constant returns (bool) {\n return true;\n }\n\n function upgradeFrom(address _from, uint256 _value) public;\n\n}\n\n\n/**\n * A token upgrade mechanism where users can opt-in amount of tokens to the next smart contract revision.\n *\n * First envisioned by Golem and Lunyr projects.\n */\ncontract UpgradeableToken is StandardTokenExt {\n\n /** Contract / person who can set the upgrade path. This can be the same as team multisig wallet, as what it is with its default value. */\n address public upgradeMaster;\n\n /** The next contract where the tokens will be migrated. */\n UpgradeAgent public upgradeAgent;\n\n /** How many tokens we have upgraded by now. */\n uint256 public totalUpgraded;\n\n /**\n * Upgrade states.\n *\n * - NotAllowed: The child contract has not reached a condition where the upgrade can bgun\n * - WaitingForAgent: Token allows upgrade, but we don't have a new agent yet\n * - ReadyToUpgrade: The agent is set, but not a single token has been upgraded yet\n * - Upgrading: Upgrade agent is set and the balance holders can upgrade their tokens\n *\n */\n enum UpgradeState {Unknown, NotAllowed, WaitingForAgent, ReadyToUpgrade, Upgrading}\n\n /**\n * Somebody has upgraded some of his tokens.\n */\n event Upgrade(address indexed _from, address indexed _to, uint256 _value);\n\n /**\n * New upgrade agent available.\n */\n event UpgradeAgentSet(address agent);\n\n /**\n * Do not allow construction without upgrade master set.\n */\n function UpgradeableToken(address _upgradeMaster) {\n upgradeMaster = _upgradeMaster;\n }\n\n /**\n * Allow the token holder to upgrade some of their tokens to a new contract.\n */\n function upgrade(uint256 value) public {\n\n UpgradeState state = getUpgradeState();\n if(!(state == UpgradeState.ReadyToUpgrade || state == UpgradeState.Upgrading)) {\n // Called in a bad state\n throw;\n }\n\n // Validate input value.\n if (value == 0) throw;\n\n balances[msg.sender] = balances[msg.sender].sub(value);\n\n // Take tokens out from circulation\n totalSupply_ = totalSupply_.sub(value);\n totalUpgraded = totalUpgraded.add(value);\n\n // Upgrade agent reissues the tokens\n upgradeAgent.upgradeFrom(msg.sender, value);\n Upgrade(msg.sender, upgradeAgent, value);\n }\n\n /**\n * Set an upgrade agent that handles\n */\n function setUpgradeAgent(address agent) external {\n\n if(!canUpgrade()) {\n // The token is not yet in a state that we could think upgrading\n throw;\n }\n\n if (agent == 0x0) throw;\n // Only a master can designate the next agent\n if (msg.sender != upgradeMaster) throw;\n // Upgrade has already begun for an agent\n if (getUpgradeState() == UpgradeState.Upgrading) throw;\n\n upgradeAgent = UpgradeAgent(agent);\n\n // Bad interface\n if(!upgradeAgent.isUpgradeAgent()) throw;\n // Make sure that token supplies match in source and target\n if (upgradeAgent.originalSupply() != totalSupply_) throw;\n\n UpgradeAgentSet(upgradeAgent);\n }\n\n /**\n * Get the state of the token upgrade.\n */\n function getUpgradeState() public constant returns(UpgradeState) {\n if(!canUpgrade()) return UpgradeState.NotAllowed;\n else if(address(upgradeAgent) == 0x00) return UpgradeState.WaitingForAgent;\n else if(totalUpgraded == 0) return UpgradeState.ReadyToUpgrade;\n else return UpgradeState.Upgrading;\n }\n\n /**\n * Change the upgrade master.\n *\n * This allows us to set a new owner for the upgrade mechanism.\n */\n function setUpgradeMaster(address master) public {\n if (master == 0x0) throw;\n if (msg.sender != upgradeMaster) throw;\n upgradeMaster = master;\n }\n\n /**\n * Child contract can enable to provide the condition when the upgrade can begun.\n */\n function canUpgrade() public constant returns(bool) {\n return true;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n/**\n * Define interface for releasing the token transfer after a successful crowdsale.\n */\ncontract ReleasableToken is StandardTokenExt {\n\n /* The finalizer contract that allows unlift the transfer limits on this token */\n address public releaseAgent;\n\n /** A crowdsale contract can release us to the wild if ICO success. If false we are are in transfer lock up period.*/\n bool public released = false;\n\n /** Map of agents that are allowed to transfer tokens regardless of the lock down period. These are crowdsale contracts and possible the team multisig itself. */\n mapping (address => bool) public transferAgents;\n\n /**\n * Limit token transfer until the crowdsale is over.\n *\n */\n modifier canTransfer(address _sender) {\n\n if(!released) {\n if(!transferAgents[_sender]) {\n throw;\n }\n }\n\n _;\n }\n\n /**\n * Set the contract that can call release and make the token transferable.\n *\n * Design choice. Allow reset the release agent to fix fat finger mistakes.\n */\n function setReleaseAgent(address addr) onlyOwner inReleaseState(false) public {\n\n // We don't do interface check here as we might want to a normal wallet address to act as a release agent\n releaseAgent = addr;\n }\n\n /**\n * Owner can allow a particular address (a crowdsale contract) to transfer tokens despite the lock up period.\n */\n function setTransferAgent(address addr, bool state) onlyOwner inReleaseState(false) public {\n transferAgents[addr] = state;\n }\n\n /**\n * One way function to release the tokens to the wild.\n *\n * Can be called only from the release agent that is the final ICO contract. It is only called if the crowdsale has been success (first milestone reached).\n */\n function releaseTokenTransfer() public onlyReleaseAgent {\n released = true;\n }\n\n /** The function can be called only before or after the tokens have been releasesd */\n modifier inReleaseState(bool releaseState) {\n if(releaseState != released) {\n throw;\n }\n _;\n }\n\n /** The function can be called only by a whitelisted release agent. */\n modifier onlyReleaseAgent() {\n if(msg.sender != releaseAgent) {\n throw;\n }\n _;\n }\n\n function transfer(address _to, uint _value) canTransfer(msg.sender) returns (bool success) {\n // Call StandardToken.transfer()\n return super.transfer(_to, _value);\n }\n\n function transferFrom(address _from, address _to, uint _value) canTransfer(_from) returns (bool success) {\n // Call StandardToken.transferForm()\n return super.transferFrom(_from, _to, _value);\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Safe unsigned safe math.\n *\n * https://blog.aragon.one/library-driven-development-in-solidity-2bebcaf88736#.750gwtwli\n *\n * Originally from https://raw.githubusercontent.com/AragonOne/zeppelin-solidity/master/contracts/SafeMathLib.sol\n *\n * Maintained here until merged to mainline zeppelin-solidity.\n *\n */\nlibrary SafeMathLib {\n\n function times(uint a, uint b) returns (uint) {\n uint c = a * b;\n assert(a == 0 || c / a == b);\n return c;\n }\n\n function minus(uint a, uint b) returns (uint) {\n assert(b <= a);\n return a - b;\n }\n\n function plus(uint a, uint b) returns (uint) {\n uint c = a + b;\n assert(c>=a);\n return c;\n }\n\n}\n\n\n\n/**\n * A token that can increase its supply by another contract.\n *\n * This allows uncapped crowdsale by dynamically increasing the supply when money pours in.\n * Only mint agents, contracts whitelisted by owner, can mint new tokens.\n *\n */\ncontract MintableToken is StandardTokenExt {\n\n using SafeMathLib for uint;\n\n bool public mintingFinished = false;\n\n /** List of agents that are allowed to create new tokens */\n mapping (address => bool) public mintAgents;\n\n event MintingAgentChanged(address addr, bool state);\n event Minted(address receiver, uint amount);\n\n /**\n * Create new tokens and allocate them to an address..\n *\n * Only callably by a crowdsale contract (mint agent).\n */\n function mint(address receiver, uint amount) onlyMintAgent canMint public {\n totalSupply_ = totalSupply_.plus(amount);\n balances[receiver] = balances[receiver].plus(amount);\n\n // This will make the mint transaction apper in EtherScan.io\n // We can remove this after there is a standardized minting event\n Transfer(0, receiver, amount);\n }\n\n /**\n * Owner can allow a crowdsale contract to mint new tokens.\n */\n function setMintAgent(address addr, bool state) onlyOwner canMint public {\n mintAgents[addr] = state;\n MintingAgentChanged(addr, state);\n }\n\n modifier onlyMintAgent() {\n // Only crowdsale contracts are allowed to mint new tokens\n if(!mintAgents[msg.sender]) {\n throw;\n }\n _;\n }\n\n /** Make sure we are not done yet. */\n modifier canMint() {\n if(mintingFinished) throw;\n _;\n }\n}\n\n\n\n/**\n * A crowdsaled token.\n *\n * An ERC-20 token designed specifically for crowdsales with investor protection and further development path.\n *\n * - The token transfer() is disabled until the crowdsale is over\n * - The token contract gives an opt-in upgrade path to a new contract\n * - The same token can be part of several crowdsales through approve() mechanism\n * - The token can be capped (supply set in the constructor) or uncapped (crowdsale contract can mint new tokens)\n *\n */\ncontract CrowdsaleToken is ReleasableToken, MintableToken, UpgradeableToken {\n\n /** Name and symbol were updated. */\n event UpdatedTokenInformation(string newName, string newSymbol);\n\n string public name;\n\n string public symbol;\n\n uint public decimals;\n\n /**\n * Construct the token.\n *\n * This token must be created through a team multisig wallet, so that it is owned by that wallet.\n *\n * @param _name Token name\n * @param _symbol Token symbol - should be all caps\n * @param _initialSupply How many tokens we start with\n * @param _decimals Number of decimal places\n * @param _mintable Are new tokens created over the crowdsale or do we distribute only the initial supply? Note that when the token becomes transferable the minting always ends.\n */\n function CrowdsaleToken(string _name, string _symbol, uint _initialSupply, uint _decimals, bool _mintable)\n UpgradeableToken(msg.sender) {\n\n // Create any address, can be transferred\n // to team multisig via changeOwner(),\n // also remember to call setUpgradeMaster()\n owner = msg.sender;\n\n name = _name;\n symbol = _symbol;\n\n totalSupply_ = _initialSupply;\n\n decimals = _decimals;\n\n // Create initially all balance on the team multisig\n balances[owner] = totalSupply_;\n\n if(totalSupply_ > 0) {\n Minted(owner, totalSupply_);\n }\n\n // No more new supply allowed after the token creation\n if(!_mintable) {\n mintingFinished = true;\n if(totalSupply_ == 0) {\n throw; // Cannot create a token without supply and no minting\n }\n }\n }\n\n /**\n * When token is released to be transferable, enforce no new tokens can be created.\n */\n function releaseTokenTransfer() public onlyReleaseAgent {\n mintingFinished = true;\n super.releaseTokenTransfer();\n }\n\n /**\n * Allow upgrade agent functionality kick in only if the crowdsale was success.\n */\n function canUpgrade() public constant returns(bool) {\n return released && super.canUpgrade();\n }\n\n /**\n * Owner can update token information here.\n *\n * It is often useful to conceal the actual token association, until\n * the token operations, like central issuance or reissuance have been completed.\n *\n * This function allows the token owner to rename the token after the operations\n * have been completed and then point the audience to use the token contract.\n */\n function setTokenInformation(string _name, string _symbol) onlyOwner {\n name = _name;\n symbol = _symbol;\n\n UpdatedTokenInformation(name, symbol);\n }\n\n}\n\n\n/**\n * A crowdsaled token that you can also burn.\n *\n */\ncontract BurnableCrowdsaleToken is BurnableToken, CrowdsaleToken {\n\n function BurnableCrowdsaleToken(string _name, string _symbol, uint _initialSupply, uint _decimals, bool _mintable)\n CrowdsaleToken(_name, _symbol, _initialSupply, _decimals, _mintable) {\n\n }\n}\n\n\n\n/**\n * The AML Token\n *\n * This subset of BurnableCrowdsaleToken gives the Owner a possibility to\n * reclaim tokens from a participant before the token is released\n * after a participant has failed a prolonged AML process.\n *\n * It is assumed that the anti-money laundering process depends on blockchain data.\n * The data is not available before the transaction and not for the smart contract.\n * Thus, we need to implement logic to handle AML failure cases post payment.\n * We give a time window before the token release for the token sale owners to\n * complete the AML and claw back all token transactions that were\n * caused by rejected purchases.\n */\ncontract AMLToken is BurnableCrowdsaleToken {\n\n // An event when the owner has reclaimed non-released tokens\n event OwnerReclaim(address fromWhom, uint amount);\n\n function AMLToken(string _name, string _symbol, uint _initialSupply, uint _decimals, bool _mintable) BurnableCrowdsaleToken(_name, _symbol, _initialSupply, _decimals, _mintable) {\n\n }\n\n /// @dev Here the owner can reclaim the tokens from a participant if\n /// the token is not released yet. Refund will be handled offband.\n /// @param fromWhom address of the participant whose tokens we want to claim\n function transferToOwner(address fromWhom) onlyOwner {\n if (released) revert();\n\n uint amount = balanceOf(fromWhom);\n balances[fromWhom] = balances[fromWhom].sub(amount);\n balances[owner] = balances[owner].add(amount);\n Transfer(fromWhom, owner, amount);\n OwnerReclaim(fromWhom, amount);\n }\n}\n"}, "AdvancedTransferAgent": {"abi": [{"constant": false, "inputs": [{"name": "who", "type": "address"}, {"name": "status", "type": "bool"}], "name": "setBlacklist", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_KYC", "type": "address"}], "name": "setKYC", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "who", "type": "address"}, {"name": "status", "type": "bool"}], "name": "setWhitelist", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "from", "type": "address"}, {"name": "to", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "verify", "outputs": [{"name": "newValue", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [{"name": "_KYC", "type": "address"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "who", "type": "address"}, {"indexed": false, "name": "status", "type": "bool"}], "name": "Whitelisted", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "who", "type": "address"}, {"indexed": false, "name": "status", "type": "bool"}], "name": "Blacklisted", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newKYC", "type": "address"}], "name": "ChangedKYC", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "bytecode": "0x608060405234801561001057600080fd5b50604051602080610588833981016040525160008054600160a060020a03909216600160a060020a0319928316179055600180549091163317905561052e8061005a6000396000f3006080604052600436106100775763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663153b0d1e811461007c578063483a83df146100a457806353d6fd59146100c55780638da5cb5b146100eb578063ad0769941461011c578063f2fde38b14610158575b600080fd5b34801561008857600080fd5b506100a2600160a060020a03600435166024351515610179565b005b3480156100b057600080fd5b506100a2600160a060020a03600435166101f4565b3480156100d157600080fd5b506100a2600160a060020a03600435166024351515610272565b3480156100f757600080fd5b506101006102ed565b60408051600160a060020a039092168252519081900360200190f35b34801561012857600080fd5b50610146600160a060020a03600435811690602435166044356102fc565b60408051918252519081900360200190f35b34801561016457600080fd5b506100a2600160a060020a03600435166103a8565b600154600160a060020a0316331461019057600080fd5b600160a060020a038216600081815260036020908152604091829020805460ff191685151590811790915582519384529083015280517fcf3473b85df1594d47b6958f29a32bea0abff9dd68296f7bf33443646793cfd89281900390910190a15050565b600154600160a060020a0316331461020b57600080fd5b6000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03838116919091179182905560408051929091168252517ff5b5fa8c9579deead24efc57404c831108a42aeb01f6a75828d9b8c6a37589ad916020908290030190a150565b600154600160a060020a0316331461028957600080fd5b600160a060020a038216600081815260026020908152604091829020805460ff191685151590811790915582519384529083015280517fa54714518c5d275fdcd3d2a461e4858e4e8cb04fb93cd0bca9d6d34115f264409281900390910190a15050565b600154600160a060020a031681565b600160a060020a03831660009081526003602052604081205460ff168061033b5750600160a060020a03831660009081526003602052604090205460ff165b15610348575060006103a1565b600160a060020a03841660009081526002602052604090205460ff16806103875750600160a060020a03831660009081526002602052604090205460ff165b156103935750806103a1565b61039e84848461043d565b90505b9392505050565b600154600160a060020a031633146103bf57600080fd5b600160a060020a03811615156103d457600080fd5b600154604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60008054600160a060020a031615156104575750806103a1565b60008054604080517f3af32abf000000000000000000000000000000000000000000000000000000008152600160a060020a03878116600483015291519190921692633af32abf92602480820193602093909283900390910190829087803b1580156104c257600080fd5b505af11580156104d6573d6000803e3d6000fd5b505050506040513d60208110156104ec57600080fd5b5051156104fa5750806103a1565b5060006103a15600a165627a7a72305820aabdef67f83599d8133858ef357dc3bb27c3a93d545c777c82eca69d905f3ac20029", "bytecode_runtime": "0x6080604052600436106100775763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663153b0d1e811461007c578063483a83df146100a457806353d6fd59146100c55780638da5cb5b146100eb578063ad0769941461011c578063f2fde38b14610158575b600080fd5b34801561008857600080fd5b506100a2600160a060020a03600435166024351515610179565b005b3480156100b057600080fd5b506100a2600160a060020a03600435166101f4565b3480156100d157600080fd5b506100a2600160a060020a03600435166024351515610272565b3480156100f757600080fd5b506101006102ed565b60408051600160a060020a039092168252519081900360200190f35b34801561012857600080fd5b50610146600160a060020a03600435811690602435166044356102fc565b60408051918252519081900360200190f35b34801561016457600080fd5b506100a2600160a060020a03600435166103a8565b600154600160a060020a0316331461019057600080fd5b600160a060020a038216600081815260036020908152604091829020805460ff191685151590811790915582519384529083015280517fcf3473b85df1594d47b6958f29a32bea0abff9dd68296f7bf33443646793cfd89281900390910190a15050565b600154600160a060020a0316331461020b57600080fd5b6000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03838116919091179182905560408051929091168252517ff5b5fa8c9579deead24efc57404c831108a42aeb01f6a75828d9b8c6a37589ad916020908290030190a150565b600154600160a060020a0316331461028957600080fd5b600160a060020a038216600081815260026020908152604091829020805460ff191685151590811790915582519384529083015280517fa54714518c5d275fdcd3d2a461e4858e4e8cb04fb93cd0bca9d6d34115f264409281900390910190a15050565b600154600160a060020a031681565b600160a060020a03831660009081526003602052604081205460ff168061033b5750600160a060020a03831660009081526003602052604090205460ff165b15610348575060006103a1565b600160a060020a03841660009081526002602052604090205460ff16806103875750600160a060020a03831660009081526002602052604090205460ff165b156103935750806103a1565b61039e84848461043d565b90505b9392505050565b600154600160a060020a031633146103bf57600080fd5b600160a060020a03811615156103d457600080fd5b600154604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60008054600160a060020a031615156104575750806103a1565b60008054604080517f3af32abf000000000000000000000000000000000000000000000000000000008152600160a060020a03878116600483015291519190921692633af32abf92602480820193602093909283900390910190829087803b1580156104c257600080fd5b505af11580156104d6573d6000803e3d6000fd5b505050506040513d60208110156104ec57600080fd5b5051156104fa5750806103a1565b5060006103a15600a165627a7a72305820aabdef67f83599d8133858ef357dc3bb27c3a93d545c777c82eca69d905f3ac20029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": false, "inputs": [{"name": "who", "type": "address"}, {"name": "status", "type": "bool"}], "name": "setBlacklist", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_KYC", "type": "address"}], "name": "setKYC", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "who", "type": "address"}, {"name": "status", "type": "bool"}], "name": "setWhitelist", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "from", "type": "address"}, {"name": "to", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "verify", "outputs": [{"name": "newValue", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [{"name": "_KYC", "type": "address"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "who", "type": "address"}, {"indexed": false, "name": "status", "type": "bool"}], "name": "Whitelisted", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "who", "type": "address"}, {"indexed": false, "name": "status", "type": "bool"}], "name": "Blacklisted", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newKYC", "type": "address"}], "name": "ChangedKYC", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "devdoc": {"methods": {"setBlacklist(address,bool)": {"details": "Setting the blacklist status for an address", "params": {"status": "True, if the address is blacklisted, false otherwise", "who": "Whose blacklist status will be changed"}}, "setKYC(address)": {"details": "Setting KYC contract address", "params": {"_KYC": "Address of the new Know Your Customer contract"}}, "setWhitelist(address,bool)": {"details": "Setting the whitelist status for an address", "params": {"status": "True, if the address is whitelisted, false otherwise", "who": "Whose whitelist status will be changed"}}, "transferOwnership(address)": {"details": "Allows the current owner to transfer control of the contract to a newOwner.", "params": {"newOwner": "The address to transfer ownership to."}}, "verify(address,address,uint256)": {"details": "Checking if transfer can happen, and if so, what is the right amount", "params": {"from": "The account sending the tokens", "to": "The account receiving the tokens", "value": "The indended amount"}, "return": "The actual amount permitted"}}}, "userdoc": {"methods": {}}}, "settings": {"compilationTarget": {"contracts/security-token/AdvancedTransferAgent.sol": "AdvancedTransferAgent"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/security-token/AdvancedTransferAgent.sol": {"keccak256": "0x5201fb9366b0f58587eb6668bbc04892f6e889e9135262f368ba2595a65a5ff8", "urls": ["bzzr://c4a71df3d56bd87e7104450a5ddc3cb9d312d381c6e88fbdffb56ef93c9d1ee4"]}, "contracts/security-token/KYCInterface.sol": {"keccak256": "0x29b1037cfb17f26421589f64eb271362aa9fbfd1f975e68df8071fd98be2052c", "urls": ["bzzr://f815559e1245fd3603a1baf5f3ad7ed7d571690b35f131cb27e0fcf8246c34a4"]}, "contracts/security-token/RestrictedTransferAgent.sol": {"keccak256": "0x34786dd1f88a4ee10875ae8477cdc80c3501813094ab1d9bfe9e49ed6ec0b394", "urls": ["bzzr://d176aac0b77abed04029368f80348ed739f8984de586fb988a4f1822a5a3a825"]}, "contracts/security-token/SecurityTransferAgent.sol": {"keccak256": "0x23b8a61926435e2c583480c0de72a99b4f7ec8a4213ffc46711f83ecdeaf9186", "urls": ["bzzr://36be13b6cf1389357679705bd18969409ecde684ace2d9c5b606d8986e0231cd"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}}, "version": 1}, "name": "AdvancedTransferAgent", "ordered_full_dependencies": [], "source_path": "contracts/security-token/AdvancedTransferAgent.sol", "source": "\n\ninterface KYCInterface {\n event Whitelisted(address who, uint128 nonce);\n\n function isWhitelisted(address who) external view returns(bool);\n}\n\n\n\n\ninterface SecurityTransferAgent {\n function verify(address from, address to, uint256 value) public view returns (uint256 newValue);\n}\n\n\ncontract RestrictedTransferAgent is SecurityTransferAgent {\n\n KYCInterface KYC;\n\n function RestrictedTransferAgent(KYCInterface _KYC) {\n KYC = _KYC;\n }\n\n /**\n * @dev Checking if transfer can happen, and if so, what is the right amount\n *\n * @param from The account sending the tokens\n * @param to The account receiving the tokens\n * @param value The indended amount\n * @return The actual amount permitted\n */\n function verify(address from, address to, uint256 value) public view returns (uint256 newValue) {\n if (address(KYC) == address(0)) {\n return value;\n }\n\n if (KYC.isWhitelisted(to)) {\n return value;\n } else {\n return 0;\n }\n }\n}\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\ncontract AdvancedTransferAgent is RestrictedTransferAgent, Ownable {\n /** @dev Mapping of addresses which are permitted to make a transfer in any situation: */\n mapping(address => bool) whitelist;\n /** @dev Mapping of addresses which are prohibited to make a transfer in any situation: */\n mapping(address => bool) blacklist;\n\n /** @dev This event is emitted when whitelisting status (true/false) of an address changes: */\n event Whitelisted(address who, bool status);\n /** @dev This event is emitted when blackilisting status (true/false) of an address changes: */\n event Blacklisted(address who, bool status);\n /** @dev This event is emitted when KYC verifier contract address is changed: */\n event ChangedKYC(address newKYC);\n\n /**\n * @dev Constructor taking a contract implementing KYCInterface as the argument\n * @param _KYC a contract implementing KYCInterface for KYC checking\n */\n function AdvancedTransferAgent(KYCInterface _KYC) RestrictedTransferAgent(_KYC) {\n }\n\n /**\n * @dev Setting the whitelist status for an address\n *\n * @param who Whose whitelist status will be changed\n * @param status True, if the address is whitelisted, false otherwise\n */\n function setWhitelist(address who, bool status) public onlyOwner {\n whitelist[who] = status;\n Whitelisted(who, status);\n }\n\n /**\n * @dev Setting KYC contract address\n *\n * @param _KYC Address of the new Know Your Customer contract\n */\n function setKYC(KYCInterface _KYC) public onlyOwner {\n KYC = _KYC;\n\n ChangedKYC(KYC);\n }\n\n /**\n * @dev Setting the blacklist status for an address\n *\n * @param who Whose blacklist status will be changed\n * @param status True, if the address is blacklisted, false otherwise\n */\n function setBlacklist(address who, bool status) public onlyOwner {\n blacklist[who] = status;\n Blacklisted(who, status);\n }\n\n /**\n * @dev Checking if transfer can happen, and if so, what is the right amount\n *\n * @param from The account sending the tokens\n * @param to The account receiving the tokens\n * @param value The indended amount\n * @return The actual amount permitted\n */\n function verify(address from, address to, uint256 value) public view returns (uint256 newValue) {\n /* We invoke RestrictedTransferAgent here, because whatever it wants to do\n (like KYC checks if KYC is specified), we want to do too. */\n if (blacklist[from] || blacklist[to]) {\n return 0;\n } else {\n if (whitelist[from] || whitelist[to]) {\n return value;\n } else {\n return RestrictedTransferAgent.verify(from, to, value);\n }\n }\n }\n}\n"}, "AllocatedCrowdsale": {"abi": [{"constant": true, "inputs": [], "name": "ownerTestValue", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "requireCustomerId", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "invest", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "isPricingSane", "outputs": [{"name": "sane", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "endsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "minimumFundingGoal", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getState", "outputs": [{"name": "", "type": "uint8"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setFinalizeAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "customerId", "type": "uint128"}, {"name": "v", "type": "uint8"}, {"name": "r", "type": "bytes32"}, {"name": "s", "type": "bytes32"}], "name": "investWithSignedAddress", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "investedAmountOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "finalizeAgent", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "receiver", "type": "address"}, {"name": "fullTokens", "type": "uint256"}, {"name": "weiPrice", "type": "uint256"}], "name": "preallocate", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "beneficiary", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "weiRaised", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isCrowdsale", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "finalize", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_pricingStrategy", "type": "address"}], "name": "setPricingStrategy", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "tokensSold", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "refund", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "signerAddress", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "weiRefunded", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "halt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}, {"name": "checksum", "type": "bytes1"}], "name": "buyWithCustomerIdWithChecksum", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "time", "type": "uint256"}], "name": "setEndsAt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "pricingStrategy", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "loadedRefund", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isMinimumGoalReached", "outputs": [{"name": "reached", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "bool"}], "name": "setRequireCustomerId", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "loadRefund", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "val", "type": "uint256"}], "name": "setOwnerTestValue", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "weisTotal", "type": "uint256"}, {"name": "pricePerToken", "type": "uint256"}], "name": "calculateTokens", "outputs": [{"name": "tokensTotal", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "multisigWallet", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "tokenAmountOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}], "name": "buyWithCustomerId", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [{"name": "weiAmount", "type": "uint256"}, {"name": "tokenAmount", "type": "uint256"}, {"name": "weiRaisedTotal", "type": "uint256"}, {"name": "tokensSoldTotal", "type": "uint256"}], "name": "isBreakingCap", "outputs": [{"name": "limitBroken", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "buy", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "isFinalizerSane", "outputs": [{"name": "sane", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "startsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "finalized", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "halted", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "earlyParticipantWhitelist", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "unhalt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "requiredSignedAddress", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isCrowdsaleFull", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "investorCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getTokensLeft", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "status", "type": "bool"}], "name": "setEarlyParicipantWhitelist", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "bool"}, {"name": "_signerAddress", "type": "address"}], "name": "setRequireSignedAddress", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "customerId", "type": "uint128"}], "name": "investWithCustomerId", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setMultisig", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}, {"name": "v", "type": "uint8"}, {"name": "r", "type": "bytes32"}, {"name": "s", "type": "bytes32"}], "name": "buyWithSignedAddress", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "presaleWeiRaised", "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": "_token", "type": "address"}, {"name": "_pricingStrategy", "type": "address"}, {"name": "_multisigWallet", "type": "address"}, {"name": "_start", "type": "uint256"}, {"name": "_end", "type": "uint256"}, {"name": "_minimumFundingGoal", "type": "uint256"}, {"name": "_beneficiary", "type": "address"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"payable": true, "stateMutability": "payable", "type": "fallback"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}, {"indexed": false, "name": "tokenAmount", "type": "uint256"}, {"indexed": false, "name": "customerId", "type": "uint128"}], "name": "Invested", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}], "name": "Refund", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newRequireCustomerId", "type": "bool"}, {"indexed": false, "name": "newRequiredSignedAddress", "type": "bool"}, {"indexed": false, "name": "newSignerAddress", "type": "address"}], "name": "InvestmentPolicyChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "addr", "type": "address"}, {"indexed": false, "name": "status", "type": "bool"}], "name": "Whitelisted", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newEndsAt", "type": "uint256"}], "name": "EndsAtChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "bytecode": "0x6080604052600560015560006009556000600a556000600b556000600c556000600d556000600e553480156200003457600080fd5b5060405160e0806200282883398101604090815281516020830151918301516060840151608085015160a086015160c0909601516000805433600160a060020a0319918216811782161790915560028054909116600160a060020a038716179055939592939192909186868686868686868686868686620000be856401000000006200015c810204565b60058054600160a060020a031916600160a060020a038681169190911791829055161515620000ec57600080fd5b821515620000f957600080fd5b60078390558115156200010b57600080fd5b600882905560075482116200011f57600080fd5b600655505060148054600160a060020a031916600160a060020a03959095169490941790935550620002299e505050505050505050505050505050565b600054600160a060020a031633146200017457600080fd5b60038054600160a060020a031916600160a060020a038381169190911791829055604080517f04bbc255000000000000000000000000000000000000000000000000000000008152905192909116916304bbc255916004808201926020929091908290030181600087803b158015620001ec57600080fd5b505af115801562000201573d6000803e3d6000fd5b505050506040513d60208110156200021857600080fd5b505115156200022657600080fd5b50565b6125ef80620002396000396000f30060806040526004361061029d5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630226401d81146102a257806303ca0eed146102c957806303f9c793146102f2578063062b01ce146103085780630a09284a1461031d57806313f4e977146103325780631865c57d1461034757806319b667da146103805780631a49803b146103a15780631aae3460146103d657806321d5c0f6146103f757806332013ac31461042857806338af3eed1461044f5780634042b66f146104645780634551dd59146104795780634bb278f31461048e57806350c67734146104a3578063518ab2a8146104c4578063590e1ae3146104d95780635b7633d0146104ee5780635da89ac0146105035780635ed7ca5b146105185780636203f09f1461052d57806363c6082f146105425780636e50eb3f1461058457806378b99c241461059c578063797d9437146105b15780637c2e08a3146105c65780637f7d711e146105db57806387612102146105f55780638d51faec146105fd5780638da5cb5b14610615578063903cc5831461062a5780639075becf1461064557806397b150ca1461065a57806399e9376c1461067b5780639d3c663f14610698578063a6f2ae3a146106b9578063a7ba44c3146106c1578063af468682146106d6578063b3f05b97146106eb578063b9b8af0b14610700578063cb16e6d014610715578063cb3e64fd14610736578063d222dc041461074b578063d5d0902114610760578063d7e64c0014610775578063de5f98661461078a578063eac249321461079f578063ed68ff2c146107c5578063ef869443146107eb578063f2fde38b14610814578063f3283fba14610835578063f486972614610856578063f7c00e2f1461087f578063fc0c546a14610894575b600080fd5b3480156102ae57600080fd5b506102b76108a9565b60408051918252519081900360200190f35b3480156102d557600080fd5b506102de6108af565b604080519115158252519081900360200190f35b610306600160a060020a03600435166108d0565b005b34801561031457600080fd5b506102de610930565b34801561032957600080fd5b506102b76109c7565b34801561033e57600080fd5b506102b76109cd565b34801561035357600080fd5b5061035c6109d3565b6040518082600781111561036c57fe5b60ff16815260200191505060405180910390f35b34801561038c57600080fd5b50610306600160a060020a0360043516610bc1565b610306600160a060020a03600435166fffffffffffffffffffffffffffffffff6024351660ff60443516606435608435610c92565b3480156103e257600080fd5b506102b7600160a060020a0360043516610db5565b34801561040357600080fd5b5061040c610dc7565b60408051600160a060020a039092168252519081900360200190f35b34801561043457600080fd5b50610306600160a060020a0360043516602435604435610dd6565b34801561045b57600080fd5b5061040c61118c565b34801561047057600080fd5b506102b761119b565b34801561048557600080fd5b506102de6111a1565b34801561049a57600080fd5b506103066111a6565b3480156104af57600080fd5b50610306600160a060020a03600435166112ab565b3480156104d057600080fd5b506102b7611346565b3480156104e557600080fd5b5061030661134c565b3480156104fa57600080fd5b5061040c611492565b34801561050f57600080fd5b506102b76114a1565b34801561052457600080fd5b506103066114a7565b34801561053957600080fd5b506102b76114f5565b6103066fffffffffffffffffffffffffffffffff600435167fff00000000000000000000000000000000000000000000000000000000000000602435166114fb565b34801561059057600080fd5b5061030660043561156d565b3480156105a857600080fd5b5061040c6115db565b3480156105bd57600080fd5b506102b76115ea565b3480156105d257600080fd5b506102de6115f0565b3480156105e757600080fd5b5061030660043515156115fb565b6103066116c3565b34801561060957600080fd5b50610306600435611783565b34801561062157600080fd5b5061040c61179f565b34801561063657600080fd5b506102b76004356024356117ae565b34801561065157600080fd5b5061040c611905565b34801561066657600080fd5b506102b7600160a060020a0360043516611914565b6103066fffffffffffffffffffffffffffffffff60043516611926565b3480156106a457600080fd5b506102de600435602435604435606435611930565b610306611955565b3480156106cd57600080fd5b506102de611960565b3480156106e257600080fd5b506102b76119ce565b3480156106f757600080fd5b506102de6119d4565b34801561070c57600080fd5b506102de6119dd565b34801561072157600080fd5b506102de600160a060020a03600435166119fe565b34801561074257600080fd5b50610306611a13565b34801561075757600080fd5b506102de611a73565b34801561076c57600080fd5b506102de611a95565b34801561078157600080fd5b506102b7611aa5565b34801561079657600080fd5b506102b7611aab565b3480156107ab57600080fd5b50610306600160a060020a03600435166024351515611b1f565b3480156107d157600080fd5b506103066004351515600160a060020a0360243516611b9a565b610306600160a060020a03600435166fffffffffffffffffffffffffffffffff60243516611c87565b34801561082057600080fd5b50610306600160a060020a0360043516611cdd565b34801561084157600080fd5b50610306600160a060020a0360043516611d71565b6103066fffffffffffffffffffffffffffffffff6004351660ff60243516604435606435611dc8565b34801561088b57600080fd5b506102b7611ddb565b3480156108a057600080fd5b5061040c611de1565b60135481565b60145474010000000000000000000000000000000000000000900460ff1681565b60145474010000000000000000000000000000000000000000900460ff16156108f857600080fd5b6014547501000000000000000000000000000000000000000000900460ff161561092157600080fd5b61092c816000611df0565b5050565b600354604080517f8e7682880000000000000000000000000000000000000000000000000000000081523060048201529051600092600160a060020a031691638e76828891602480830192602092919082900301818787803b15801561099557600080fd5b505af11580156109a9573d6000803e3d6000fd5b505050506040513d60208110156109bf57600080fd5b505190505b90565b60085481565b60065481565b600f5460009060ff16156109e9575060066109c4565b600454600160a060020a03161515610a03575060016109c4565b60048054604080517f82771c8e0000000000000000000000000000000000000000000000000000000081529051600160a060020a03909216926382771c8e9282820192602092908290030181600087803b158015610a6057600080fd5b505af1158015610a74573d6000803e3d6000fd5b505050506040513d6020811015610a8a57600080fd5b50511515610a9a575060016109c4565b600354604080517f8e7682880000000000000000000000000000000000000000000000000000000081523060048201529051600160a060020a0390921691638e768288916024808201926020929091908290030181600087803b158015610b0057600080fd5b505af1158015610b14573d6000803e3d6000fd5b505050506040513d6020811015610b2a57600080fd5b50511515610b3a575060016109c4565b600754421015610b4c575060026109c4565b6008544211158015610b635750610b61611a95565b155b15610b70575060036109c4565b610b786115f0565b15610b85575060046109c4565b610b8d6115f0565b158015610b9c57506000600a54115b8015610bac5750600a54600d5410155b15610bb9575060076109c4565b5060056109c4565b600054600160a060020a03163314610bd857600080fd5b6004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383811691909117808355604080517f614cb9040000000000000000000000000000000000000000000000000000000081529051919092169263614cb904928082019260209290918290030181600087803b158015610c5857600080fd5b505af1158015610c6c573d6000803e3d6000fd5b505050506040513d6020811015610c8257600080fd5b50511515610c8f57600080fd5b50565b60006002866040518082600160a060020a0316600160a060020a03166c010000000000000000000000000281526014019150506020604051808303816000865af1158015610ce4573d6000803e3d6000fd5b5050506040513d6020811015610cf957600080fd5b5051601554604080516000808252602082810180855286905260ff8a168385015260608301899052608083018890529251949550600160a060020a039093169360019360a08084019493601f198401939081900390910191865af1158015610d65573d6000803e3d6000fd5b50505060206040510351600160a060020a0316141515610d8457600080fd5b6fffffffffffffffffffffffffffffffff85161515610da257600080fd5b610dac8686611df0565b50505050505050565b60106020526000908152604090205481565b600454600160a060020a031681565b600080548190600160a060020a03163314610df057600080fd5b600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610e5c57600080fd5b505af1158015610e70573d6000803e3d6000fd5b505050506040513d6020811015610e8657600080fd5b5051600a8054604080516000805160206125a4833981519152815260048101929092528688026024830181905290519390920a8702945090925073__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f91604480820192602092909190829003018186803b158015610efc57600080fd5b505af4158015610f10573d6000803e3d6000fd5b505050506040513d6020811015610f2657600080fd5b5051600a55600954604080516000805160206125a483398151915281526004810192909252602482018490525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b158015610f8e57600080fd5b505af4158015610fa2573d6000803e3d6000fd5b505050506040513d6020811015610fb857600080fd5b5051600955600160a060020a0385166000908152601060209081526040918290205482516000805160206125a48339815191528152600481019190915260248101849052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561103657600080fd5b505af415801561104a573d6000803e3d6000fd5b505050506040513d602081101561106057600080fd5b5051600160a060020a03861660009081526010602090815260408083209390935560118152908290205482516000805160206125a48339815191528152600481019190915260248101859052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b1580156110e657600080fd5b505af41580156110fa573d6000803e3d6000fd5b505050506040513d602081101561111057600080fd5b5051600160a060020a0386166000908152601160205260409020556111358583611f97565b60408051600160a060020a0387168152602081018390528082018490526000606082015290517f0396f60aaad038749091d273dc13aaabc63db6e2271c7bad442d5cf25cc433509181900360800190a15050505050565b601454600160a060020a031681565b600a5481565b600190565b6004806111b16109d3565b60078111156111bc57fe5b146111c657600080fd5b600054600160a060020a031633146111dd57600080fd5b60005474010000000000000000000000000000000000000000900460ff161561120557600080fd5b600f5460ff161561121557600080fd5b600454600160a060020a03161561129b5760048054604080517f0bf318a30000000000000000000000000000000000000000000000000000000081529051600160a060020a0390921692630bf318a392828201926000929082900301818387803b15801561128257600080fd5b505af1158015611296573d6000803e3d6000fd5b505050505b50600f805460ff19166001179055565b600054600160a060020a031633146112c257600080fd5b6003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038381169190911791829055604080517f04bbc255000000000000000000000000000000000000000000000000000000008152905192909116916304bbc255916004808201926020929091908290030181600087803b158015610c5857600080fd5b60095481565b60006007806113596109d3565b600781111561136457fe5b1461136e57600080fd5b33600090815260106020526040902054915081151561138c57600080fd5b33600090815260106020908152604080832092909255600e5482516000805160206125a48339815191528152600481019190915260248101859052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561140157600080fd5b505af4158015611415573d6000803e3d6000fd5b505050506040513d602081101561142b57600080fd5b5051600e55604080513381526020810184905281517fbb28353e4598c3b9199101a66e0989549b659a59a54d2c27fbb183f1932c8e6d929181900390910190a1604051339083156108fc029084906000818181858888f19350505050151561092c57600080fd5b601554600160a060020a031681565b600e5481565b600054600160a060020a031633146114be57600080fd5b6000805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b60015481565b604080517001000000000000000000000000000000006fffffffffffffffffffffffffffffffff851602815290519081900360100190207fff000000000000000000000000000000000000000000000000000000000000009081169082161461156357600080fd5b61092c3383611c87565b600054600160a060020a0316331461158457600080fd5b8042111561159157600080fd5b8060075411156115a057600080fd5b60088190556040805182815290517fd34bb772c4ae9baa99db852f622773b31c7827e8ee818449fef20d30980bd3109181900360200190a150565b600354600160a060020a031681565b600d5481565b600654600a54101590565b600054600160a060020a0316331461161257600080fd5b6014805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000831515810291909117918290556015546040805160ff938504841615158152750100000000000000000000000000000000000000000090940490921615156020840152600160a060020a031682820152517f48d826081348f5f00e8a33c9ae8ce89ed4c6e88400b585a478bc203d9e8177d3916060908290030190a150565b6005806116ce6109d3565b60078111156116d957fe5b146116e357600080fd5b3415156116ef57600080fd5b600d54604080516000805160206125a4833981519152815260048101929092523460248301525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b15801561175157600080fd5b505af4158015611765573d6000803e3d6000fd5b505050506040513d602081101561177b57600080fd5b5051600d5550565b600054600160a060020a0316331461179a57600080fd5b601355565b600054600160a060020a031681565b600080600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561181d57600080fd5b505af1158015611831573d6000803e3d6000fd5b505050506040513d602081101561184757600080fd5b5051604080517f1d3b9edf00000000000000000000000000000000000000000000000000000000815260048101879052600a9290920a602483018190529051909250849173__contracts/SafeMathLib.sol:SafeMathLi__91631d3b9edf91604480820192602092909190829003018186803b1580156118c757600080fd5b505af41580156118db573d6000803e3d6000fd5b505050506040513d60208110156118f157600080fd5b50518115156118fc57fe5b04949350505050565b600554600160a060020a031681565b60116020526000908152604090205481565b610c8f3382611c87565b600061193a611aab565b8411156119495750600161194d565b5060005b949350505050565b61195e336108d0565b565b6000600460009054906101000a9004600160a060020a0316600160a060020a03166382771c8e6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561099557600080fd5b60075481565b600f5460ff1681565b60005474010000000000000000000000000000000000000000900460ff1681565b60126020526000908152604090205460ff1681565b600054600160a060020a03163314611a2a57600080fd5b60005474010000000000000000000000000000000000000000900460ff161515611a5357600080fd5b6000805474ff000000000000000000000000000000000000000019169055565b6014547501000000000000000000000000000000000000000000900460ff1681565b6000611a9f611aab565b15905090565b600c5481565b60025460008054604080517fdd62ed3e000000000000000000000000000000000000000000000000000000008152600160a060020a03928316600482015230602482015290519293919091169163dd62ed3e9160448082019260209290919082900301818787803b15801561099557600080fd5b600054600160a060020a03163314611b3657600080fd5b600160a060020a038216600081815260126020908152604091829020805460ff191685151590811790915582519384529083015280517fa54714518c5d275fdcd3d2a461e4858e4e8cb04fb93cd0bca9d6d34115f264409281900390910190a15050565b600054600160a060020a03163314611bb157600080fd5b6014805475ff00000000000000000000000000000000000000000019167501000000000000000000000000000000000000000000841515810291909117918290556015805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0385811691909117918290556040805160ff74010000000000000000000000000000000000000000870481161515825294909504909316151560208501521682820152517f48d826081348f5f00e8a33c9ae8ce89ed4c6e88400b585a478bc203d9e8177d3916060908290030190a15050565b6014547501000000000000000000000000000000000000000000900460ff1615611cb057600080fd5b6fffffffffffffffffffffffffffffffff81161515611cce57600080fd5b611cd88282611df0565b505050565b600054600160a060020a03163314611cf457600080fd5b600160a060020a0381161515611d0957600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600054600160a060020a03163314611d8857600080fd5b600154600c541115611d9957600080fd5b6005805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b611dd53385858585610c92565b50505050565b600b5481565b600254600160a060020a031681565b6000805474010000000000000000000000000000000000000000900460ff1615611e1957600080fd5b611f908383600360009054906101000a9004600160a060020a0316600160a060020a03166318a4155e34600b54600a540360095433600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015611eba57600080fd5b505af1158015611ece573d6000803e3d6000fd5b505050506040513d6020811015611ee457600080fd5b5051604080517c010000000000000000000000000000000000000000000000000000000063ffffffff8916028152600481019690965260248601949094526044850192909252600160a060020a0316606484015260848301525160a48083019260209291908290030181600087803b158015611f5f57600080fd5b505af1158015611f73573d6000803e3d6000fd5b505050506040513d6020811015611f8957600080fd5b5051612048565b9392505050565b600254601454604080517f23b872dd000000000000000000000000000000000000000000000000000000008152600160a060020a039283166004820152858316602482015260448101859052905191909216916323b872dd9160648083019260209291908290030181600087803b15801561201157600080fd5b505af1158015612025573d6000803e3d6000fd5b505050506040513d602081101561203b57600080fd5b5051151561092c57600080fd5b60008054819074010000000000000000000000000000000000000000900460ff161561207357600080fd5b600261207d6109d3565b600781111561208857fe5b14156120ba57600160a060020a03851660009081526012602052604090205460ff1615156120b557600080fd5b6120d6565b60036120c46109d3565b60078111156120cf57fe5b141561029d575b50348215156120e457600080fd5b600160a060020a038516600090815260106020526040902054151561210d57600c805460010190555b600160a060020a0385166000908152601060209081526040918290205482516000805160206125a48339815191528152600481019190915260248101849052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561218657600080fd5b505af415801561219a573d6000803e3d6000fd5b505050506040513d60208110156121b057600080fd5b5051600160a060020a03861660009081526010602090815260408083209390935560118152908290205482516000805160206125a48339815191528152600481019190915260248101869052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561223657600080fd5b505af415801561224a573d6000803e3d6000fd5b505050506040513d602081101561226057600080fd5b5051600160a060020a03861660009081526011602090815260409182902092909255600a5481516000805160206125a48339815191528152600481019190915260248101849052905173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f9260448082019391829003018186803b1580156122e057600080fd5b505af41580156122f4573d6000803e3d6000fd5b505050506040513d602081101561230a57600080fd5b5051600a55600954604080516000805160206125a483398151915281526004810192909252602482018590525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b15801561237257600080fd5b505af4158015612386573d6000803e3d6000fd5b505050506040513d602081101561239c57600080fd5b5051600955600354604080517ff14ae17d000000000000000000000000000000000000000000000000000000008152600160a060020a0388811660048301529151919092169163f14ae17d9160248083019260209291908290030181600087803b15801561240957600080fd5b505af115801561241d573d6000803e3d6000fd5b505050506040513d602081101561243357600080fd5b5051156124e157600b5473__contracts/SafeMathLib.sol:SafeMathLi__6366098d4f9091836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b1580156124b157600080fd5b505af41580156124c5573d6000803e3d6000fd5b505050506040513d60208110156124db57600080fd5b5051600b555b6124f18184600a54600954611930565b156124fb57600080fd5b6125058584611f97565b600554604051600160a060020a039091169082156108fc029083906000818181858888f19350505050151561253957600080fd5b60408051600160a060020a0387168152602081018390528082018590526fffffffffffffffffffffffffffffffff8616606082015290517f0396f60aaad038749091d273dc13aaabc63db6e2271c7bad442d5cf25cc433509181900360800190a150909392505050560066098d4f00000000000000000000000000000000000000000000000000000000a165627a7a723058201d3c976e51bf33951a89b23c90d24b0970825cf30c97d2cec529d0ad116500b00029", "bytecode_runtime": "0x60806040526004361061029d5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630226401d81146102a257806303ca0eed146102c957806303f9c793146102f2578063062b01ce146103085780630a09284a1461031d57806313f4e977146103325780631865c57d1461034757806319b667da146103805780631a49803b146103a15780631aae3460146103d657806321d5c0f6146103f757806332013ac31461042857806338af3eed1461044f5780634042b66f146104645780634551dd59146104795780634bb278f31461048e57806350c67734146104a3578063518ab2a8146104c4578063590e1ae3146104d95780635b7633d0146104ee5780635da89ac0146105035780635ed7ca5b146105185780636203f09f1461052d57806363c6082f146105425780636e50eb3f1461058457806378b99c241461059c578063797d9437146105b15780637c2e08a3146105c65780637f7d711e146105db57806387612102146105f55780638d51faec146105fd5780638da5cb5b14610615578063903cc5831461062a5780639075becf1461064557806397b150ca1461065a57806399e9376c1461067b5780639d3c663f14610698578063a6f2ae3a146106b9578063a7ba44c3146106c1578063af468682146106d6578063b3f05b97146106eb578063b9b8af0b14610700578063cb16e6d014610715578063cb3e64fd14610736578063d222dc041461074b578063d5d0902114610760578063d7e64c0014610775578063de5f98661461078a578063eac249321461079f578063ed68ff2c146107c5578063ef869443146107eb578063f2fde38b14610814578063f3283fba14610835578063f486972614610856578063f7c00e2f1461087f578063fc0c546a14610894575b600080fd5b3480156102ae57600080fd5b506102b76108a9565b60408051918252519081900360200190f35b3480156102d557600080fd5b506102de6108af565b604080519115158252519081900360200190f35b610306600160a060020a03600435166108d0565b005b34801561031457600080fd5b506102de610930565b34801561032957600080fd5b506102b76109c7565b34801561033e57600080fd5b506102b76109cd565b34801561035357600080fd5b5061035c6109d3565b6040518082600781111561036c57fe5b60ff16815260200191505060405180910390f35b34801561038c57600080fd5b50610306600160a060020a0360043516610bc1565b610306600160a060020a03600435166fffffffffffffffffffffffffffffffff6024351660ff60443516606435608435610c92565b3480156103e257600080fd5b506102b7600160a060020a0360043516610db5565b34801561040357600080fd5b5061040c610dc7565b60408051600160a060020a039092168252519081900360200190f35b34801561043457600080fd5b50610306600160a060020a0360043516602435604435610dd6565b34801561045b57600080fd5b5061040c61118c565b34801561047057600080fd5b506102b761119b565b34801561048557600080fd5b506102de6111a1565b34801561049a57600080fd5b506103066111a6565b3480156104af57600080fd5b50610306600160a060020a03600435166112ab565b3480156104d057600080fd5b506102b7611346565b3480156104e557600080fd5b5061030661134c565b3480156104fa57600080fd5b5061040c611492565b34801561050f57600080fd5b506102b76114a1565b34801561052457600080fd5b506103066114a7565b34801561053957600080fd5b506102b76114f5565b6103066fffffffffffffffffffffffffffffffff600435167fff00000000000000000000000000000000000000000000000000000000000000602435166114fb565b34801561059057600080fd5b5061030660043561156d565b3480156105a857600080fd5b5061040c6115db565b3480156105bd57600080fd5b506102b76115ea565b3480156105d257600080fd5b506102de6115f0565b3480156105e757600080fd5b5061030660043515156115fb565b6103066116c3565b34801561060957600080fd5b50610306600435611783565b34801561062157600080fd5b5061040c61179f565b34801561063657600080fd5b506102b76004356024356117ae565b34801561065157600080fd5b5061040c611905565b34801561066657600080fd5b506102b7600160a060020a0360043516611914565b6103066fffffffffffffffffffffffffffffffff60043516611926565b3480156106a457600080fd5b506102de600435602435604435606435611930565b610306611955565b3480156106cd57600080fd5b506102de611960565b3480156106e257600080fd5b506102b76119ce565b3480156106f757600080fd5b506102de6119d4565b34801561070c57600080fd5b506102de6119dd565b34801561072157600080fd5b506102de600160a060020a03600435166119fe565b34801561074257600080fd5b50610306611a13565b34801561075757600080fd5b506102de611a73565b34801561076c57600080fd5b506102de611a95565b34801561078157600080fd5b506102b7611aa5565b34801561079657600080fd5b506102b7611aab565b3480156107ab57600080fd5b50610306600160a060020a03600435166024351515611b1f565b3480156107d157600080fd5b506103066004351515600160a060020a0360243516611b9a565b610306600160a060020a03600435166fffffffffffffffffffffffffffffffff60243516611c87565b34801561082057600080fd5b50610306600160a060020a0360043516611cdd565b34801561084157600080fd5b50610306600160a060020a0360043516611d71565b6103066fffffffffffffffffffffffffffffffff6004351660ff60243516604435606435611dc8565b34801561088b57600080fd5b506102b7611ddb565b3480156108a057600080fd5b5061040c611de1565b60135481565b60145474010000000000000000000000000000000000000000900460ff1681565b60145474010000000000000000000000000000000000000000900460ff16156108f857600080fd5b6014547501000000000000000000000000000000000000000000900460ff161561092157600080fd5b61092c816000611df0565b5050565b600354604080517f8e7682880000000000000000000000000000000000000000000000000000000081523060048201529051600092600160a060020a031691638e76828891602480830192602092919082900301818787803b15801561099557600080fd5b505af11580156109a9573d6000803e3d6000fd5b505050506040513d60208110156109bf57600080fd5b505190505b90565b60085481565b60065481565b600f5460009060ff16156109e9575060066109c4565b600454600160a060020a03161515610a03575060016109c4565b60048054604080517f82771c8e0000000000000000000000000000000000000000000000000000000081529051600160a060020a03909216926382771c8e9282820192602092908290030181600087803b158015610a6057600080fd5b505af1158015610a74573d6000803e3d6000fd5b505050506040513d6020811015610a8a57600080fd5b50511515610a9a575060016109c4565b600354604080517f8e7682880000000000000000000000000000000000000000000000000000000081523060048201529051600160a060020a0390921691638e768288916024808201926020929091908290030181600087803b158015610b0057600080fd5b505af1158015610b14573d6000803e3d6000fd5b505050506040513d6020811015610b2a57600080fd5b50511515610b3a575060016109c4565b600754421015610b4c575060026109c4565b6008544211158015610b635750610b61611a95565b155b15610b70575060036109c4565b610b786115f0565b15610b85575060046109c4565b610b8d6115f0565b158015610b9c57506000600a54115b8015610bac5750600a54600d5410155b15610bb9575060076109c4565b5060056109c4565b600054600160a060020a03163314610bd857600080fd5b6004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383811691909117808355604080517f614cb9040000000000000000000000000000000000000000000000000000000081529051919092169263614cb904928082019260209290918290030181600087803b158015610c5857600080fd5b505af1158015610c6c573d6000803e3d6000fd5b505050506040513d6020811015610c8257600080fd5b50511515610c8f57600080fd5b50565b60006002866040518082600160a060020a0316600160a060020a03166c010000000000000000000000000281526014019150506020604051808303816000865af1158015610ce4573d6000803e3d6000fd5b5050506040513d6020811015610cf957600080fd5b5051601554604080516000808252602082810180855286905260ff8a168385015260608301899052608083018890529251949550600160a060020a039093169360019360a08084019493601f198401939081900390910191865af1158015610d65573d6000803e3d6000fd5b50505060206040510351600160a060020a0316141515610d8457600080fd5b6fffffffffffffffffffffffffffffffff85161515610da257600080fd5b610dac8686611df0565b50505050505050565b60106020526000908152604090205481565b600454600160a060020a031681565b600080548190600160a060020a03163314610df057600080fd5b600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610e5c57600080fd5b505af1158015610e70573d6000803e3d6000fd5b505050506040513d6020811015610e8657600080fd5b5051600a8054604080516000805160206125a4833981519152815260048101929092528688026024830181905290519390920a8702945090925073__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f91604480820192602092909190829003018186803b158015610efc57600080fd5b505af4158015610f10573d6000803e3d6000fd5b505050506040513d6020811015610f2657600080fd5b5051600a55600954604080516000805160206125a483398151915281526004810192909252602482018490525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b158015610f8e57600080fd5b505af4158015610fa2573d6000803e3d6000fd5b505050506040513d6020811015610fb857600080fd5b5051600955600160a060020a0385166000908152601060209081526040918290205482516000805160206125a48339815191528152600481019190915260248101849052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561103657600080fd5b505af415801561104a573d6000803e3d6000fd5b505050506040513d602081101561106057600080fd5b5051600160a060020a03861660009081526010602090815260408083209390935560118152908290205482516000805160206125a48339815191528152600481019190915260248101859052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b1580156110e657600080fd5b505af41580156110fa573d6000803e3d6000fd5b505050506040513d602081101561111057600080fd5b5051600160a060020a0386166000908152601160205260409020556111358583611f97565b60408051600160a060020a0387168152602081018390528082018490526000606082015290517f0396f60aaad038749091d273dc13aaabc63db6e2271c7bad442d5cf25cc433509181900360800190a15050505050565b601454600160a060020a031681565b600a5481565b600190565b6004806111b16109d3565b60078111156111bc57fe5b146111c657600080fd5b600054600160a060020a031633146111dd57600080fd5b60005474010000000000000000000000000000000000000000900460ff161561120557600080fd5b600f5460ff161561121557600080fd5b600454600160a060020a03161561129b5760048054604080517f0bf318a30000000000000000000000000000000000000000000000000000000081529051600160a060020a0390921692630bf318a392828201926000929082900301818387803b15801561128257600080fd5b505af1158015611296573d6000803e3d6000fd5b505050505b50600f805460ff19166001179055565b600054600160a060020a031633146112c257600080fd5b6003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038381169190911791829055604080517f04bbc255000000000000000000000000000000000000000000000000000000008152905192909116916304bbc255916004808201926020929091908290030181600087803b158015610c5857600080fd5b60095481565b60006007806113596109d3565b600781111561136457fe5b1461136e57600080fd5b33600090815260106020526040902054915081151561138c57600080fd5b33600090815260106020908152604080832092909255600e5482516000805160206125a48339815191528152600481019190915260248101859052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561140157600080fd5b505af4158015611415573d6000803e3d6000fd5b505050506040513d602081101561142b57600080fd5b5051600e55604080513381526020810184905281517fbb28353e4598c3b9199101a66e0989549b659a59a54d2c27fbb183f1932c8e6d929181900390910190a1604051339083156108fc029084906000818181858888f19350505050151561092c57600080fd5b601554600160a060020a031681565b600e5481565b600054600160a060020a031633146114be57600080fd5b6000805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b60015481565b604080517001000000000000000000000000000000006fffffffffffffffffffffffffffffffff851602815290519081900360100190207fff000000000000000000000000000000000000000000000000000000000000009081169082161461156357600080fd5b61092c3383611c87565b600054600160a060020a0316331461158457600080fd5b8042111561159157600080fd5b8060075411156115a057600080fd5b60088190556040805182815290517fd34bb772c4ae9baa99db852f622773b31c7827e8ee818449fef20d30980bd3109181900360200190a150565b600354600160a060020a031681565b600d5481565b600654600a54101590565b600054600160a060020a0316331461161257600080fd5b6014805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000831515810291909117918290556015546040805160ff938504841615158152750100000000000000000000000000000000000000000090940490921615156020840152600160a060020a031682820152517f48d826081348f5f00e8a33c9ae8ce89ed4c6e88400b585a478bc203d9e8177d3916060908290030190a150565b6005806116ce6109d3565b60078111156116d957fe5b146116e357600080fd5b3415156116ef57600080fd5b600d54604080516000805160206125a4833981519152815260048101929092523460248301525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b15801561175157600080fd5b505af4158015611765573d6000803e3d6000fd5b505050506040513d602081101561177b57600080fd5b5051600d5550565b600054600160a060020a0316331461179a57600080fd5b601355565b600054600160a060020a031681565b600080600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561181d57600080fd5b505af1158015611831573d6000803e3d6000fd5b505050506040513d602081101561184757600080fd5b5051604080517f1d3b9edf00000000000000000000000000000000000000000000000000000000815260048101879052600a9290920a602483018190529051909250849173__contracts/SafeMathLib.sol:SafeMathLi__91631d3b9edf91604480820192602092909190829003018186803b1580156118c757600080fd5b505af41580156118db573d6000803e3d6000fd5b505050506040513d60208110156118f157600080fd5b50518115156118fc57fe5b04949350505050565b600554600160a060020a031681565b60116020526000908152604090205481565b610c8f3382611c87565b600061193a611aab565b8411156119495750600161194d565b5060005b949350505050565b61195e336108d0565b565b6000600460009054906101000a9004600160a060020a0316600160a060020a03166382771c8e6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561099557600080fd5b60075481565b600f5460ff1681565b60005474010000000000000000000000000000000000000000900460ff1681565b60126020526000908152604090205460ff1681565b600054600160a060020a03163314611a2a57600080fd5b60005474010000000000000000000000000000000000000000900460ff161515611a5357600080fd5b6000805474ff000000000000000000000000000000000000000019169055565b6014547501000000000000000000000000000000000000000000900460ff1681565b6000611a9f611aab565b15905090565b600c5481565b60025460008054604080517fdd62ed3e000000000000000000000000000000000000000000000000000000008152600160a060020a03928316600482015230602482015290519293919091169163dd62ed3e9160448082019260209290919082900301818787803b15801561099557600080fd5b600054600160a060020a03163314611b3657600080fd5b600160a060020a038216600081815260126020908152604091829020805460ff191685151590811790915582519384529083015280517fa54714518c5d275fdcd3d2a461e4858e4e8cb04fb93cd0bca9d6d34115f264409281900390910190a15050565b600054600160a060020a03163314611bb157600080fd5b6014805475ff00000000000000000000000000000000000000000019167501000000000000000000000000000000000000000000841515810291909117918290556015805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0385811691909117918290556040805160ff74010000000000000000000000000000000000000000870481161515825294909504909316151560208501521682820152517f48d826081348f5f00e8a33c9ae8ce89ed4c6e88400b585a478bc203d9e8177d3916060908290030190a15050565b6014547501000000000000000000000000000000000000000000900460ff1615611cb057600080fd5b6fffffffffffffffffffffffffffffffff81161515611cce57600080fd5b611cd88282611df0565b505050565b600054600160a060020a03163314611cf457600080fd5b600160a060020a0381161515611d0957600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600054600160a060020a03163314611d8857600080fd5b600154600c541115611d9957600080fd5b6005805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b611dd53385858585610c92565b50505050565b600b5481565b600254600160a060020a031681565b6000805474010000000000000000000000000000000000000000900460ff1615611e1957600080fd5b611f908383600360009054906101000a9004600160a060020a0316600160a060020a03166318a4155e34600b54600a540360095433600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015611eba57600080fd5b505af1158015611ece573d6000803e3d6000fd5b505050506040513d6020811015611ee457600080fd5b5051604080517c010000000000000000000000000000000000000000000000000000000063ffffffff8916028152600481019690965260248601949094526044850192909252600160a060020a0316606484015260848301525160a48083019260209291908290030181600087803b158015611f5f57600080fd5b505af1158015611f73573d6000803e3d6000fd5b505050506040513d6020811015611f8957600080fd5b5051612048565b9392505050565b600254601454604080517f23b872dd000000000000000000000000000000000000000000000000000000008152600160a060020a039283166004820152858316602482015260448101859052905191909216916323b872dd9160648083019260209291908290030181600087803b15801561201157600080fd5b505af1158015612025573d6000803e3d6000fd5b505050506040513d602081101561203b57600080fd5b5051151561092c57600080fd5b60008054819074010000000000000000000000000000000000000000900460ff161561207357600080fd5b600261207d6109d3565b600781111561208857fe5b14156120ba57600160a060020a03851660009081526012602052604090205460ff1615156120b557600080fd5b6120d6565b60036120c46109d3565b60078111156120cf57fe5b141561029d575b50348215156120e457600080fd5b600160a060020a038516600090815260106020526040902054151561210d57600c805460010190555b600160a060020a0385166000908152601060209081526040918290205482516000805160206125a48339815191528152600481019190915260248101849052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561218657600080fd5b505af415801561219a573d6000803e3d6000fd5b505050506040513d60208110156121b057600080fd5b5051600160a060020a03861660009081526010602090815260408083209390935560118152908290205482516000805160206125a48339815191528152600481019190915260248101869052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561223657600080fd5b505af415801561224a573d6000803e3d6000fd5b505050506040513d602081101561226057600080fd5b5051600160a060020a03861660009081526011602090815260409182902092909255600a5481516000805160206125a48339815191528152600481019190915260248101849052905173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f9260448082019391829003018186803b1580156122e057600080fd5b505af41580156122f4573d6000803e3d6000fd5b505050506040513d602081101561230a57600080fd5b5051600a55600954604080516000805160206125a483398151915281526004810192909252602482018590525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b15801561237257600080fd5b505af4158015612386573d6000803e3d6000fd5b505050506040513d602081101561239c57600080fd5b5051600955600354604080517ff14ae17d000000000000000000000000000000000000000000000000000000008152600160a060020a0388811660048301529151919092169163f14ae17d9160248083019260209291908290030181600087803b15801561240957600080fd5b505af115801561241d573d6000803e3d6000fd5b505050506040513d602081101561243357600080fd5b5051156124e157600b5473__contracts/SafeMathLib.sol:SafeMathLi__6366098d4f9091836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b1580156124b157600080fd5b505af41580156124c5573d6000803e3d6000fd5b505050506040513d60208110156124db57600080fd5b5051600b555b6124f18184600a54600954611930565b156124fb57600080fd5b6125058584611f97565b600554604051600160a060020a039091169082156108fc029083906000818181858888f19350505050151561253957600080fd5b60408051600160a060020a0387168152602081018390528082018590526fffffffffffffffffffffffffffffffff8616606082015290517f0396f60aaad038749091d273dc13aaabc63db6e2271c7bad442d5cf25cc433509181900360800190a150909392505050560066098d4f00000000000000000000000000000000000000000000000000000000a165627a7a723058201d3c976e51bf33951a89b23c90d24b0970825cf30c97d2cec529d0ad116500b00029", "direct_dependencies": ["SafeMathLib"], "full_dependencies": ["SafeMathLib"], "linkrefs": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 8694}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 8988}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 9330}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 9682}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 11272}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 12962}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 13708}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 18194}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 18546}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 18888}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 19172}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 19696}], "linkrefs_runtime": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 7556}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 7850}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 8192}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 8544}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 10134}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 11824}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 12570}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 17056}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 17408}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 17750}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 18034}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 18558}], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": true, "inputs": [], "name": "ownerTestValue", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "requireCustomerId", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "invest", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "isPricingSane", "outputs": [{"name": "sane", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "endsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "minimumFundingGoal", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getState", "outputs": [{"name": "", "type": "uint8"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setFinalizeAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "customerId", "type": "uint128"}, {"name": "v", "type": "uint8"}, {"name": "r", "type": "bytes32"}, {"name": "s", "type": "bytes32"}], "name": "investWithSignedAddress", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "investedAmountOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "finalizeAgent", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "receiver", "type": "address"}, {"name": "fullTokens", "type": "uint256"}, {"name": "weiPrice", "type": "uint256"}], "name": "preallocate", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "beneficiary", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "weiRaised", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isCrowdsale", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "finalize", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_pricingStrategy", "type": "address"}], "name": "setPricingStrategy", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "tokensSold", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "refund", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "signerAddress", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "weiRefunded", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "halt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}, {"name": "checksum", "type": "bytes1"}], "name": "buyWithCustomerIdWithChecksum", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "time", "type": "uint256"}], "name": "setEndsAt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "pricingStrategy", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "loadedRefund", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isMinimumGoalReached", "outputs": [{"name": "reached", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "bool"}], "name": "setRequireCustomerId", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "loadRefund", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "val", "type": "uint256"}], "name": "setOwnerTestValue", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "weisTotal", "type": "uint256"}, {"name": "pricePerToken", "type": "uint256"}], "name": "calculateTokens", "outputs": [{"name": "tokensTotal", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "multisigWallet", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "tokenAmountOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}], "name": "buyWithCustomerId", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [{"name": "weiAmount", "type": "uint256"}, {"name": "tokenAmount", "type": "uint256"}, {"name": "weiRaisedTotal", "type": "uint256"}, {"name": "tokensSoldTotal", "type": "uint256"}], "name": "isBreakingCap", "outputs": [{"name": "limitBroken", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "buy", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "isFinalizerSane", "outputs": [{"name": "sane", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "startsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "finalized", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "halted", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "earlyParticipantWhitelist", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "unhalt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "requiredSignedAddress", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isCrowdsaleFull", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "investorCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getTokensLeft", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "status", "type": "bool"}], "name": "setEarlyParicipantWhitelist", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "bool"}, {"name": "_signerAddress", "type": "address"}], "name": "setRequireSignedAddress", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "customerId", "type": "uint128"}], "name": "investWithCustomerId", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setMultisig", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}, {"name": "v", "type": "uint8"}, {"name": "r", "type": "bytes32"}, {"name": "s", "type": "bytes32"}], "name": "buyWithSignedAddress", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "presaleWeiRaised", "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": "_token", "type": "address"}, {"name": "_pricingStrategy", "type": "address"}, {"name": "_multisigWallet", "type": "address"}, {"name": "_start", "type": "uint256"}, {"name": "_end", "type": "uint256"}, {"name": "_minimumFundingGoal", "type": "uint256"}, {"name": "_beneficiary", "type": "address"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"payable": true, "stateMutability": "payable", "type": "fallback"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}, {"indexed": false, "name": "tokenAmount", "type": "uint256"}, {"indexed": false, "name": "customerId", "type": "uint128"}], "name": "Invested", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}], "name": "Refund", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newRequireCustomerId", "type": "bool"}, {"indexed": false, "name": "newRequiredSignedAddress", "type": "bool"}, {"indexed": false, "name": "newSignerAddress", "type": "address"}], "name": "InvestmentPolicyChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "addr", "type": "address"}, {"indexed": false, "name": "status", "type": "bool"}], "name": "Whitelisted", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newEndsAt", "type": "uint256"}], "name": "EndsAtChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "devdoc": {"methods": {"calculateTokens(uint256,uint256)": {"details": "Calculate tokens user will have for their purchase", "params": {"pricePerToken": "What is the price for one token", "weisTotal": "How much ethers (in wei) the user putssssss in"}, "return": "tokensTotal which is received tokens, token decimals included"}, "isMinimumGoalReached()": {"return": "true if the crowdsale has raised enough money to be a successful."}, "preallocate(address,uint256,uint256)": {"params": {"fullTokens": "tokens as full tokens - decimal places added internally", "weiPrice": "Price of a single full token in wei "}}, "transferOwnership(address)": {"details": "Allows the current owner to transfer control of the contract to a newOwner.", "params": {"newOwner": "The address to transfer ownership to."}}}}, "userdoc": {"methods": {"buy()": {"notice": "The basic entry point to participate the crowdsale process. * Pay for funding, get invested tokens back in the sender address."}, "buyWithCustomerId(uint128)": {"notice": "Legacy API signature."}, "buyWithCustomerIdWithChecksum(uint128,bytes1)": {"notice": "Invest to tokens, recognize the payer. "}, "buyWithSignedAddress(uint128,uint8,bytes32,bytes32)": {"notice": "Invest to tokens, recognize the payer and clear his address. "}, "finalize()": {"notice": "Finalize a succcesful crowdsale. * The owner can triggre a call the contract that provides post-crowdsale actions, like releasing the tokens."}, "getState()": {"notice": "Crowdfund state machine management. * We make it a function and do not assign the result to a variable, so there is no chance of the variable being stale."}, "getTokensLeft()": {"notice": "Get the amount of unsold tokens allocated to this contract;"}, "invest(address)": {"notice": "Allow anonymous contributions to this crowdsale."}, "investWithCustomerId(address,uint128)": {"notice": "Track who is the customer making the payment so we can send thank you email."}, "investWithSignedAddress(address,uint128,uint8,bytes32,bytes32)": {"notice": "Allow anonymous contributions to this crowdsale."}, "isBreakingCap(uint256,uint256,uint256,uint256)": {"notice": "Called from invest() to confirm if the curret investment does not break our cap rule."}, "isCrowdsale()": {"notice": "Interface marker. "}, "isCrowdsaleFull()": {"notice": "We are sold out when our approve pool becomes empty."}, "isFinalizerSane()": {"notice": "Check if the contract relationship looks good."}, "isPricingSane()": {"notice": "Check if the contract relationship looks good."}, "loadRefund()": {"notice": "Allow load refunds back on the contract for the refunding. * The team can transfer the funds back on the smart contract in the case the minimum goal was not reached.."}, "preallocate(address,uint256,uint256)": {"notice": "Preallocate tokens for the early investors. * Preallocated tokens have been sold before the actual crowdsale opens. This function mints the tokens and moves the crowdsale needle. * Investor count is not handled; it is assumed this goes for multiple investors and the token distribution happens outside the smart contract flow. * No money is exchanged, as the crowdsale team already have received the payment."}, "refund()": {"notice": "Investors can claim refund. * Note that any refunds from proxy buyers should be handled separately, and not through this contract."}, "setEarlyParicipantWhitelist(address,bool)": {"notice": "Allow addresses to do early participation. * TODO: Fix spelling error in the name"}, "setEndsAt(uint256)": {"notice": "Allow crowdsale owner to close early or extend the crowdsale. * This is useful e.g. for a manual soft cap implementation: - after X amount is reached determine manual closing * This may put the crowdsale to an invalid state, but we trust owners know what they are doing. "}, "setFinalizeAgent(address)": {"notice": "Allow to (re)set finalize agent. * Design choice: no state restrictions on setting this, so that we can fix fat finger mistakes."}, "setMultisig(address)": {"notice": "Allow to change the team multisig address in the case of emergency. * This allows to save a deployed crowdsale wallet in the case the crowdsale has not yet begun (we have done only few test transactions). After the crowdsale is going then multisig address stays locked for the safety reasons."}, "setOwnerTestValue(uint256)": {"notice": "This is for manual testing of multisig wallet interaction "}, "setPricingStrategy(address)": {"notice": "Allow to (re)set pricing strategy. * Design choice: no state restrictions on the set, so that we can fix fat finger mistakes."}, "setRequireCustomerId(bool)": {"notice": "Set policy do we need to have server-side customer ids for the investments. "}, "setRequireSignedAddress(bool,address)": {"notice": "Set policy if all investors must be cleared on the server side first. * This is e.g. for the accredited investor clearing. "}}}}, "settings": {"compilationTarget": {"contracts/AllocatedCrowdsale.sol": "AllocatedCrowdsale"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/AllocatedCrowdsale.sol": {"keccak256": "0x372bc2a112cc03ceedadd84590c9a3bcd6cec3e80ff31f77c9fc24935b67e8ef", "urls": ["bzzr://074dd9cf92ee40b8232c72f88f85a0cd2f33fb50b3a65ec69ef48ce8f240559f"]}, "contracts/AllocatedCrowdsaleMixin.sol": {"keccak256": "0xb0f304a6316b4dd97ae57cbb99962b474f6bf14d90b5ff20d6d61d3b4f363da0", "urls": ["bzzr://342e3e02fb4570a64954190dff8a3664b6c11b9d01807e90a0a71be4c4a975ce"]}, "contracts/Crowdsale.sol": {"keccak256": "0x2697c26528f64bb954a7c2547d3b43317d2d2b02c7d9d05a7b1ab388cd79f65d", "urls": ["bzzr://f28b280794222114141c51dd5c388d403a7c98d8b51e04170a0e294246d5164b"]}, "contracts/CrowdsaleBase.sol": {"keccak256": "0xe2c9ed11183ce705616980df7b02544d72fe18b40395da7d9d4bcb621fb87871", "urls": ["bzzr://07f3887ba0d0eb3248b1ad3581480ed71a2fe70a47dcc283c4e97c8c92e0790a"]}, "contracts/FinalizeAgent.sol": {"keccak256": "0x309fd0510e0b3e2b5044e33f7c80cfb2d6f2a5697e41a5f185931d65770cfea9", "urls": ["bzzr://4e7ed6f82c0f542e92e56c12566b2ecd7666730865bf12566c27587ec64160ac"]}, "contracts/FractionalERC20.sol": {"keccak256": "0x75bc4ad90a8b13ce961c89b1bf405776f616e019d3a2720168f8e52be223198f", "urls": ["bzzr://6a3688f12da1a5c890ef06f80f883f6c5370886092d38a1b33cd4219b718478b"]}, "contracts/Haltable.sol": {"keccak256": "0x265dcf25e7c9ab4b6eecd2181f1b71334a1b5381a60f8db7d9526dab120f4b70", "urls": ["bzzr://d522e00fa9e075941469dd81738b59fdb99ce3c12cdc39e33abe40b588c4da9b"]}, "contracts/PricingStrategy.sol": {"keccak256": "0x8df5093b7d07168ad994f9176de0bd2268f6563b1e8a3a448d8cfe7fe246c628", "urls": ["bzzr://ef5c944d51f739ab34e2c951d6ac82a7152e6bb844058a8e57bae52c14cbe16b"]}, "contracts/SafeMathLib.sol": {"keccak256": "0x501bfe31e274b9a5591f7c540bdced4d4312e27d4f19599147c9bbca3d9c6b18", "urls": ["bzzr://a80935ebddb06c247d71372d4e5833ee029f08633bd0fe4a274a57009567e5b9"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}}, "version": 1}, "name": "AllocatedCrowdsale", "ordered_full_dependencies": ["SafeMathLib"], "source_path": "contracts/AllocatedCrowdsale.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n/*\n * Haltable\n *\n * Abstract contract that allows children to implement an\n * emergency stop mechanism. Differs from Pausable by causing a throw when in halt mode.\n *\n *\n * Originally envisioned in FirstBlood ICO contract.\n */\ncontract Haltable is Ownable {\n bool public halted;\n\n modifier stopInEmergency {\n if (halted) throw;\n _;\n }\n\n modifier stopNonOwnersInEmergency {\n if (halted && msg.sender != owner) throw;\n _;\n }\n\n modifier onlyInEmergency {\n if (!halted) throw;\n _;\n }\n\n // called by the owner on emergency, triggers stopped state\n function halt() external onlyOwner {\n halted = true;\n }\n\n // called by the owner on end of emergency, returns to normal state\n function unhalt() external onlyOwner onlyInEmergency {\n halted = false;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Safe unsigned safe math.\n *\n * https://blog.aragon.one/library-driven-development-in-solidity-2bebcaf88736#.750gwtwli\n *\n * Originally from https://raw.githubusercontent.com/AragonOne/zeppelin-solidity/master/contracts/SafeMathLib.sol\n *\n * Maintained here until merged to mainline zeppelin-solidity.\n *\n */\nlibrary SafeMathLib {\n\n function times(uint a, uint b) returns (uint) {\n uint c = a * b;\n assert(a == 0 || c / a == b);\n return c;\n }\n\n function minus(uint a, uint b) returns (uint) {\n assert(b <= a);\n return a - b;\n }\n\n function plus(uint a, uint b) returns (uint) {\n uint c = a + b;\n assert(c>=a);\n return c;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n\n/**\n * A token that defines fractional units as decimals.\n */\ncontract FractionalERC20 is ERC20 {\n\n uint public decimals;\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Interface for defining crowdsale pricing.\n */\ncontract PricingStrategy {\n\n /** Interface declaration. */\n function isPricingStrategy() public constant returns (bool) {\n return true;\n }\n\n /** Self check if all references are correctly set.\n *\n * Checks that pricing strategy matches crowdsale parameters.\n */\n function isSane(address crowdsale) public constant returns (bool) {\n return true;\n }\n\n /**\n * @dev Pricing tells if this is a presale purchase or not.\n @param purchaser Address of the purchaser\n @return False by default, true if a presale purchaser\n */\n function isPresalePurchase(address purchaser) public constant returns (bool) {\n return false;\n }\n\n /**\n * When somebody tries to buy tokens for X eth, calculate how many tokens they get.\n *\n *\n * @param value - What is the value of the transaction send in as wei\n * @param tokensSold - how much tokens have been sold this far\n * @param weiRaised - how much money has been raised this far in the main token sale - this number excludes presale\n * @param msgSender - who is the investor of this transaction\n * @param decimals - how many decimal units the token has\n * @return Amount of tokens the investor receives\n */\n function calculatePrice(uint value, uint weiRaised, uint tokensSold, address msgSender, uint decimals) public constant returns (uint tokenAmount);\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Finalize agent defines what happens at the end of succeseful crowdsale.\n *\n * - Allocate tokens for founders, bounties and community\n * - Make tokens transferable\n * - etc.\n */\ncontract FinalizeAgent {\n\n function isFinalizeAgent() public constant returns(bool) {\n return true;\n }\n\n /** Return true if we can run finalizeCrowdsale() properly.\n *\n * This is a safety check function that doesn't allow crowdsale to begin\n * unless the finalizer has been set up properly.\n */\n function isSane() public constant returns (bool);\n\n /** Called once by crowdsale finalize() if the sale was success. */\n function finalizeCrowdsale();\n\n}\n\n\n\n/**\n * Crowdsale state machine without buy functionality.\n *\n * Implements basic state machine logic, but leaves out all buy functions,\n * so that subclasses can implement their own buying logic.\n *\n *\n * For the default buy() implementation see Crowdsale.sol.\n */\ncontract CrowdsaleBase is Haltable {\n\n /* Max investment count when we are still allowed to change the multisig address */\n uint public MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE = 5;\n\n using SafeMathLib for uint;\n\n /* The token we are selling */\n FractionalERC20 public token;\n\n /* How we are going to price our offering */\n PricingStrategy public pricingStrategy;\n\n /* Post-success callback */\n FinalizeAgent public finalizeAgent;\n\n /* tokens will be transfered from this address */\n address public multisigWallet;\n\n /* if the funding goal is not reached, investors may withdraw their funds */\n uint public minimumFundingGoal;\n\n /* the UNIX timestamp start date of the crowdsale */\n uint public startsAt;\n\n /* the UNIX timestamp end date of the crowdsale */\n uint public endsAt;\n\n /* the number of tokens already sold through this contract*/\n uint public tokensSold = 0;\n\n /* How many wei of funding we have raised */\n uint public weiRaised = 0;\n\n /* Calculate incoming funds from presale contracts and addresses */\n uint public presaleWeiRaised = 0;\n\n /* How many distinct addresses have invested */\n uint public investorCount = 0;\n\n /* How much wei we have returned back to the contract after a failed crowdfund. */\n uint public loadedRefund = 0;\n\n /* How much wei we have given back to investors.*/\n uint public weiRefunded = 0;\n\n /* Has this crowdsale been finalized */\n bool public finalized;\n\n /** How much ETH each address has invested to this crowdsale */\n mapping (address => uint256) public investedAmountOf;\n\n /** How much tokens this crowdsale has credited for each investor address */\n mapping (address => uint256) public tokenAmountOf;\n\n /** Addresses that are allowed to invest even before ICO offical opens. For testing, for ICO partners, etc. */\n mapping (address => bool) public earlyParticipantWhitelist;\n\n /** This is for manul testing for the interaction from owner wallet. You can set it to any value and inspect this in blockchain explorer to see that crowdsale interaction works. */\n uint public ownerTestValue;\n\n /** State machine\n *\n * - Preparing: All contract initialization calls and variables have not been set yet\n * - Prefunding: We have not passed start time yet\n * - Funding: Active crowdsale\n * - Success: Minimum funding goal reached\n * - Failure: Minimum funding goal not reached before ending time\n * - Finalized: The finalized has been called and succesfully executed\n * - Refunding: Refunds are loaded on the contract for reclaim.\n */\n enum State{Unknown, Preparing, PreFunding, Funding, Success, Failure, Finalized, Refunding}\n\n // A new investment was made\n event Invested(address investor, uint weiAmount, uint tokenAmount, uint128 customerId);\n\n // Refund was processed for a contributor\n event Refund(address investor, uint weiAmount);\n\n // The rules were changed what kind of investments we accept\n event InvestmentPolicyChanged(bool newRequireCustomerId, bool newRequiredSignedAddress, address newSignerAddress);\n\n // Address early participation whitelist status changed\n event Whitelisted(address addr, bool status);\n\n // Crowdsale end time has been changed\n event EndsAtChanged(uint newEndsAt);\n\n function CrowdsaleBase(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal) {\n\n owner = msg.sender;\n\n token = FractionalERC20(_token);\n setPricingStrategy(_pricingStrategy);\n\n multisigWallet = _multisigWallet;\n if(multisigWallet == 0) {\n throw;\n }\n\n if(_start == 0) {\n throw;\n }\n\n startsAt = _start;\n\n if(_end == 0) {\n throw;\n }\n\n endsAt = _end;\n\n // Don't mess the dates\n if(startsAt >= endsAt) {\n throw;\n }\n\n // Minimum funding goal can be zero\n minimumFundingGoal = _minimumFundingGoal;\n }\n\n /**\n * Don't expect to just send in money and get tokens.\n */\n function() payable {\n throw;\n }\n\n /**\n * @dev Make an investment.\n *\n * Crowdsale must be running for one to invest.\n * We must have not pressed the emergency brake.\n *\n * @param receiver The Ethereum address who receives the tokens\n * @param customerId (optional) UUID v4 to track the successful payments on the server side'\n * @param tokenAmount Amount of tokens which be credited to receiver\n *\n * @return tokensBought How mony tokens were bought\n */\n function buyTokens(address receiver, uint128 customerId, uint256 tokenAmount) stopInEmergency internal returns(uint tokensBought) {\n\n // Determine if it's a good time to accept investment from this participant\n if(getState() == State.PreFunding) {\n // Are we whitelisted for early deposit\n if(!earlyParticipantWhitelist[receiver]) {\n throw;\n }\n } else if(getState() == State.Funding) {\n // Retail participants can only come in when the crowdsale is running\n // pass\n } else {\n // Unwanted state\n throw;\n }\n\n uint weiAmount = msg.value;\n\n // Dust transaction\n require(tokenAmount != 0);\n\n if(investedAmountOf[receiver] == 0) {\n // A new investor\n investorCount++;\n }\n\n // Update investor\n investedAmountOf[receiver] = investedAmountOf[receiver].plus(weiAmount);\n tokenAmountOf[receiver] = tokenAmountOf[receiver].plus(tokenAmount);\n\n // Update totals\n weiRaised = weiRaised.plus(weiAmount);\n tokensSold = tokensSold.plus(tokenAmount);\n\n if(pricingStrategy.isPresalePurchase(receiver)) {\n presaleWeiRaised = presaleWeiRaised.plus(weiAmount);\n }\n\n // Check that we did not bust the cap\n require(!isBreakingCap(weiAmount, tokenAmount, weiRaised, tokensSold));\n\n assignTokens(receiver, tokenAmount);\n\n // Pocket the money, or fail the crowdsale if we for some reason cannot send the money to our multisig\n if(!multisigWallet.send(weiAmount)) throw;\n\n // Tell us invest was success\n Invested(receiver, weiAmount, tokenAmount, customerId);\n\n return tokenAmount;\n }\n\n /**\n * @dev Make an investment based on pricing strategy\n *\n * This is a wrapper for buyTokens(), but the amount of tokens receiver will\n * have depends on the pricing strategy used.\n *\n * @param receiver The Ethereum address who receives the tokens\n * @param customerId (optional) UUID v4 to track the successful payments on the server side'\n *\n * @return tokensBought How mony tokens were bought\n */\n function investInternal(address receiver, uint128 customerId) stopInEmergency internal returns(uint tokensBought) {\n return buyTokens(receiver, customerId, pricingStrategy.calculatePrice(msg.value, weiRaised - presaleWeiRaised, tokensSold, msg.sender, token.decimals()));\n }\n\n /**\n * @dev Calculate tokens user will have for their purchase\n *\n * @param weisTotal How much ethers (in wei) the user putssssss in\n * @param pricePerToken What is the price for one token\n *\n * @return tokensTotal which is received tokens, token decimals included\n */\n function calculateTokens(uint256 weisTotal, uint256 pricePerToken) public constant returns(uint tokensTotal) {\n // pricePerToken is how many full tokens, token decimal place included, you get for wei amount.\n // Because, in theory, decimal amount can vary, we do the exponent calculation here,\n // though gas wise using 10**18 constant would be much simpler.\n // Furthermore we could use rough amounts and take in raw wei per tokens amount,\n // but we lose too much accuracy for generic calculations, thus all these are\n // practically implemented as 10**18 fixed points.\n uint multiplier = 10 ** token.decimals();\n return weisTotal.times(multiplier)/pricePerToken;\n }\n\n /**\n * Finalize a succcesful crowdsale.\n *\n * The owner can triggre a call the contract that provides post-crowdsale actions, like releasing the tokens.\n */\n function finalize() public inState(State.Success) onlyOwner stopInEmergency {\n\n // Already finalized\n if(finalized) {\n throw;\n }\n\n // Finalizing is optional. We only call it if we are given a finalizing agent.\n if(address(finalizeAgent) != 0) {\n finalizeAgent.finalizeCrowdsale();\n }\n\n finalized = true;\n }\n\n /**\n * Allow to (re)set finalize agent.\n *\n * Design choice: no state restrictions on setting this, so that we can fix fat finger mistakes.\n */\n function setFinalizeAgent(FinalizeAgent addr) onlyOwner {\n finalizeAgent = addr;\n\n // Don't allow setting bad agent\n if(!finalizeAgent.isFinalizeAgent()) {\n throw;\n }\n }\n\n /**\n * Allow crowdsale owner to close early or extend the crowdsale.\n *\n * This is useful e.g. for a manual soft cap implementation:\n * - after X amount is reached determine manual closing\n *\n * This may put the crowdsale to an invalid state,\n * but we trust owners know what they are doing.\n *\n */\n function setEndsAt(uint time) onlyOwner {\n\n if(now > time) {\n throw; // Don't change past\n }\n\n if(startsAt > time) {\n throw; // Prevent human mistakes\n }\n\n endsAt = time;\n EndsAtChanged(endsAt);\n }\n\n /**\n * Allow to (re)set pricing strategy.\n *\n * Design choice: no state restrictions on the set, so that we can fix fat finger mistakes.\n */\n function setPricingStrategy(PricingStrategy _pricingStrategy) onlyOwner {\n pricingStrategy = _pricingStrategy;\n\n // Don't allow setting bad agent\n if(!pricingStrategy.isPricingStrategy()) {\n throw;\n }\n }\n\n /**\n * Allow to change the team multisig address in the case of emergency.\n *\n * This allows to save a deployed crowdsale wallet in the case the crowdsale has not yet begun\n * (we have done only few test transactions). After the crowdsale is going\n * then multisig address stays locked for the safety reasons.\n */\n function setMultisig(address addr) public onlyOwner {\n\n // Change\n if(investorCount > MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE) {\n throw;\n }\n\n multisigWallet = addr;\n }\n\n /**\n * Allow load refunds back on the contract for the refunding.\n *\n * The team can transfer the funds back on the smart contract in the case the minimum goal was not reached..\n */\n function loadRefund() public payable inState(State.Failure) {\n if(msg.value == 0) throw;\n loadedRefund = loadedRefund.plus(msg.value);\n }\n\n /**\n * Investors can claim refund.\n *\n * Note that any refunds from proxy buyers should be handled separately,\n * and not through this contract.\n */\n function refund() public inState(State.Refunding) {\n uint256 weiValue = investedAmountOf[msg.sender];\n if (weiValue == 0) throw;\n investedAmountOf[msg.sender] = 0;\n weiRefunded = weiRefunded.plus(weiValue);\n Refund(msg.sender, weiValue);\n if (!msg.sender.send(weiValue)) throw;\n }\n\n /**\n * @return true if the crowdsale has raised enough money to be a successful.\n */\n function isMinimumGoalReached() public constant returns (bool reached) {\n return weiRaised >= minimumFundingGoal;\n }\n\n /**\n * Check if the contract relationship looks good.\n */\n function isFinalizerSane() public constant returns (bool sane) {\n return finalizeAgent.isSane();\n }\n\n /**\n * Check if the contract relationship looks good.\n */\n function isPricingSane() public constant returns (bool sane) {\n return pricingStrategy.isSane(address(this));\n }\n\n /**\n * Crowdfund state machine management.\n *\n * We make it a function and do not assign the result to a variable, so there is no chance of the variable being stale.\n */\n function getState() public constant returns (State) {\n if(finalized) return State.Finalized;\n else if (address(finalizeAgent) == 0) return State.Preparing;\n else if (!finalizeAgent.isSane()) return State.Preparing;\n else if (!pricingStrategy.isSane(address(this))) return State.Preparing;\n else if (block.timestamp < startsAt) return State.PreFunding;\n else if (block.timestamp <= endsAt && !isCrowdsaleFull()) return State.Funding;\n else if (isMinimumGoalReached()) return State.Success;\n else if (!isMinimumGoalReached() && weiRaised > 0 && loadedRefund >= weiRaised) return State.Refunding;\n else return State.Failure;\n }\n\n /** This is for manual testing of multisig wallet interaction */\n function setOwnerTestValue(uint val) onlyOwner {\n ownerTestValue = val;\n }\n\n /**\n * Allow addresses to do early participation.\n *\n * TODO: Fix spelling error in the name\n */\n function setEarlyParicipantWhitelist(address addr, bool status) onlyOwner {\n earlyParticipantWhitelist[addr] = status;\n Whitelisted(addr, status);\n }\n\n\n /** Interface marker. */\n function isCrowdsale() public constant returns (bool) {\n return true;\n }\n\n //\n // Modifiers\n //\n\n /** Modified allowing execution only if the crowdsale is currently running. */\n modifier inState(State state) {\n if(getState() != state) throw;\n _;\n }\n\n\n //\n // Abstract functions\n //\n\n /**\n * Check if the current invested breaks our cap rules.\n *\n *\n * The child contract must define their own cap setting rules.\n * We allow a lot of flexibility through different capping strategies (ETH, token count)\n * Called from invest().\n *\n * @param weiAmount The amount of wei the investor tries to invest in the current transaction\n * @param tokenAmount The amount of tokens we try to give to the investor in the current transaction\n * @param weiRaisedTotal What would be our total raised balance after this transaction\n * @param tokensSoldTotal What would be our total sold tokens count after this transaction\n *\n * @return true if taking this investment would break our cap rules\n */\n function isBreakingCap(uint weiAmount, uint tokenAmount, uint weiRaisedTotal, uint tokensSoldTotal) constant returns (bool limitBroken);\n\n /**\n * Check if the current crowdsale is full and we can no longer sell any tokens.\n */\n function isCrowdsaleFull() public constant returns (bool);\n\n /**\n * Create new tokens or transfer issued tokens to the investor depending on the cap model.\n */\n function assignTokens(address receiver, uint tokenAmount) internal;\n}\n\n\n/**\n * A mixin that is selling tokens from a preallocated pool\n *\n * - Tokens have precreated supply \"premined\"\n *\n * - Token owner must transfer sellable tokens to the crowdsale contract using ERC20.approve()\n *\n * - The mixin does not implement buy entry point.\n *\n */\ncontract AllocatedCrowdsaleMixin is CrowdsaleBase {\n\n /* The party who holds the full token pool and has approve()'ed tokens for this crowdsale */\n address public beneficiary;\n\n /**\n * @param _beneficiary The account who has performed approve() to allocate tokens for the token sale.\n *\n */\n function AllocatedCrowdsaleMixin(address _beneficiary) {\n beneficiary = _beneficiary;\n }\n\n /**\n * Called from invest() to confirm if the curret investment does not break our cap rule.\n */\n function isBreakingCap(uint weiAmount, uint tokenAmount, uint weiRaisedTotal, uint tokensSoldTotal) constant returns (bool limitBroken) {\n if(tokenAmount > getTokensLeft()) {\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * We are sold out when our approve pool becomes empty.\n */\n function isCrowdsaleFull() public constant returns (bool) {\n return getTokensLeft() == 0;\n }\n\n /**\n * Get the amount of unsold tokens allocated to this contract;\n */\n function getTokensLeft() public constant returns (uint) {\n return token.allowance(owner, this);\n }\n\n /**\n * Transfer tokens from approve() pool to the buyer.\n *\n * Use approve() given to this crowdsale to distribute the tokens.\n */\n function assignTokens(address receiver, uint tokenAmount) internal {\n if(!token.transferFrom(beneficiary, receiver, tokenAmount)) throw;\n }\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n\n\n\n\n/**\n * Abstract base contract for token sales with the default buy entry points.\n *\n * Handle\n * - start and end dates\n * - accepting investments\n * - minimum funding goal and refund\n * - various statistics during the crowdfund\n * - different pricing strategies\n * - different investment policies (require server side customer id, allow only whitelisted addresses)\n *\n * Does not Handle\n *\n * - Token allocation (minting vs. transfer)\n * - Cap rules\n *\n */\ncontract Crowdsale is CrowdsaleBase {\n\n /* Do we need to have unique contributor id for each customer */\n bool public requireCustomerId;\n\n /**\n * Do we verify that contributor has been cleared on the server side (accredited investors only).\n * This method was first used in FirstBlood crowdsale to ensure all contributors have accepted terms on sale (on the web).\n */\n bool public requiredSignedAddress;\n\n /* Server side address that signed allowed contributors (Ethereum addresses) that can participate the crowdsale */\n address public signerAddress;\n\n function Crowdsale(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal) CrowdsaleBase(_token, _pricingStrategy, _multisigWallet, _start, _end, _minimumFundingGoal) {\n }\n\n /**\n * Preallocate tokens for the early investors.\n *\n * Preallocated tokens have been sold before the actual crowdsale opens.\n * This function mints the tokens and moves the crowdsale needle.\n *\n * Investor count is not handled; it is assumed this goes for multiple investors\n * and the token distribution happens outside the smart contract flow.\n *\n * No money is exchanged, as the crowdsale team already have received the payment.\n *\n * @param fullTokens tokens as full tokens - decimal places added internally\n * @param weiPrice Price of a single full token in wei\n *\n */\n function preallocate(address receiver, uint fullTokens, uint weiPrice) public onlyOwner {\n\n uint tokenAmount = fullTokens * 10**token.decimals();\n uint weiAmount = weiPrice * fullTokens; // This can be also 0, we give out tokens for free\n\n weiRaised = weiRaised.plus(weiAmount);\n tokensSold = tokensSold.plus(tokenAmount);\n\n investedAmountOf[receiver] = investedAmountOf[receiver].plus(weiAmount);\n tokenAmountOf[receiver] = tokenAmountOf[receiver].plus(tokenAmount);\n\n assignTokens(receiver, tokenAmount);\n\n // Tell us invest was success\n Invested(receiver, weiAmount, tokenAmount, 0);\n }\n\n /**\n * Allow anonymous contributions to this crowdsale.\n */\n function investWithSignedAddress(address addr, uint128 customerId, uint8 v, bytes32 r, bytes32 s) public payable {\n bytes32 hash = sha256(addr);\n if (ecrecover(hash, v, r, s) != signerAddress) throw;\n if(customerId == 0) throw; // UUIDv4 sanity check\n investInternal(addr, customerId);\n }\n\n /**\n * Track who is the customer making the payment so we can send thank you email.\n */\n function investWithCustomerId(address addr, uint128 customerId) public payable {\n if(requiredSignedAddress) throw; // Crowdsale allows only server-side signed participants\n if(customerId == 0) throw; // UUIDv4 sanity check\n investInternal(addr, customerId);\n }\n\n /**\n * Allow anonymous contributions to this crowdsale.\n */\n function invest(address addr) public payable {\n if(requireCustomerId) throw; // Crowdsale needs to track participants for thank you email\n if(requiredSignedAddress) throw; // Crowdsale allows only server-side signed participants\n investInternal(addr, 0);\n }\n\n /**\n * Invest to tokens, recognize the payer and clear his address.\n *\n */\n function buyWithSignedAddress(uint128 customerId, uint8 v, bytes32 r, bytes32 s) public payable {\n investWithSignedAddress(msg.sender, customerId, v, r, s);\n }\n\n /**\n * Invest to tokens, recognize the payer.\n *\n */\n function buyWithCustomerIdWithChecksum(uint128 customerId, bytes1 checksum) public payable {\n // see customerid.py\n if (bytes1(sha3(customerId)) != checksum) throw;\n investWithCustomerId(msg.sender, customerId);\n }\n\n /**\n * Legacy API signature.\n */\n function buyWithCustomerId(uint128 customerId) public payable {\n investWithCustomerId(msg.sender, customerId);\n }\n\n /**\n * The basic entry point to participate the crowdsale process.\n *\n * Pay for funding, get invested tokens back in the sender address.\n */\n function buy() public payable {\n invest(msg.sender);\n }\n\n /**\n * Set policy do we need to have server-side customer ids for the investments.\n *\n */\n function setRequireCustomerId(bool value) onlyOwner {\n requireCustomerId = value;\n InvestmentPolicyChanged(requireCustomerId, requiredSignedAddress, signerAddress);\n }\n\n /**\n * Set policy if all investors must be cleared on the server side first.\n *\n * This is e.g. for the accredited investor clearing.\n *\n */\n function setRequireSignedAddress(bool value, address _signerAddress) onlyOwner {\n requiredSignedAddress = value;\n signerAddress = _signerAddress;\n InvestmentPolicyChanged(requireCustomerId, requiredSignedAddress, signerAddress);\n }\n\n}\n\n\n\n/**\n * An implementation of allocated crowdsale.\n *\n * This implementation does not have KYC logic (vs. KYCCrowdsale).\n *\n */\ncontract AllocatedCrowdsale is AllocatedCrowdsaleMixin, Crowdsale {\n\n function AllocatedCrowdsale(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal, address _beneficiary) Crowdsale(_token, _pricingStrategy, _multisigWallet, _start, _end, _minimumFundingGoal) AllocatedCrowdsaleMixin(_beneficiary) {\n\n }\n\n}\n"}, "AllocatedCrowdsaleMixin": {"abi": [{"constant": true, "inputs": [], "name": "ownerTestValue", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isPricingSane", "outputs": [{"name": "sane", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "endsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "minimumFundingGoal", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getState", "outputs": [{"name": "", "type": "uint8"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setFinalizeAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "investedAmountOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "finalizeAgent", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "beneficiary", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "weiRaised", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isCrowdsale", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "finalize", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_pricingStrategy", "type": "address"}], "name": "setPricingStrategy", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "tokensSold", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "refund", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "weiRefunded", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "halt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "time", "type": "uint256"}], "name": "setEndsAt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "pricingStrategy", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "loadedRefund", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isMinimumGoalReached", "outputs": [{"name": "reached", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "loadRefund", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "val", "type": "uint256"}], "name": "setOwnerTestValue", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "weisTotal", "type": "uint256"}, {"name": "pricePerToken", "type": "uint256"}], "name": "calculateTokens", "outputs": [{"name": "tokensTotal", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "multisigWallet", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "tokenAmountOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "weiAmount", "type": "uint256"}, {"name": "tokenAmount", "type": "uint256"}, {"name": "weiRaisedTotal", "type": "uint256"}, {"name": "tokensSoldTotal", "type": "uint256"}], "name": "isBreakingCap", "outputs": [{"name": "limitBroken", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isFinalizerSane", "outputs": [{"name": "sane", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "startsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "finalized", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "halted", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "earlyParticipantWhitelist", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "unhalt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "isCrowdsaleFull", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "investorCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getTokensLeft", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "status", "type": "bool"}], "name": "setEarlyParicipantWhitelist", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setMultisig", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "presaleWeiRaised", "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": "_beneficiary", "type": "address"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"payable": true, "stateMutability": "payable", "type": "fallback"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}, {"indexed": false, "name": "tokenAmount", "type": "uint256"}, {"indexed": false, "name": "customerId", "type": "uint128"}], "name": "Invested", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}], "name": "Refund", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newRequireCustomerId", "type": "bool"}, {"indexed": false, "name": "newRequiredSignedAddress", "type": "bool"}, {"indexed": false, "name": "newSignerAddress", "type": "address"}], "name": "InvestmentPolicyChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "addr", "type": "address"}, {"indexed": false, "name": "status", "type": "bool"}], "name": "Whitelisted", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newEndsAt", "type": "uint256"}], "name": "EndsAtChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "bytecode": "0x", "bytecode_runtime": "0x", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": null, "name": "AllocatedCrowdsaleMixin", "ordered_full_dependencies": [], "source_path": "contracts/AllocatedCrowdsaleMixin.sol"}, "Announcement": {"abi": [{"constant": true, "inputs": [], "name": "announcementHash", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "announcementType", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "announcementName", "outputs": [{"name": "", "type": "bytes32"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "announcementURI", "outputs": [{"name": "", "type": "bytes32"}], "payable": false, "stateMutability": "view", "type": "function"}], "bytecode": "0x", "bytecode_runtime": "0x", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": null, "name": "Announcement", "ordered_full_dependencies": [], "source_path": "contracts/security-token/SecurityToken.sol"}, "BasicKYC": {"abi": [{"constant": true, "inputs": [{"name": "who", "type": "address"}], "name": "isWhitelisted", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "whitelist", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "who", "type": "address"}, {"name": "status", "type": "bool"}], "name": "whitelistUser", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "nonce", "type": "uint128"}, {"name": "v", "type": "uint8"}, {"name": "r", "type": "bytes32"}, {"name": "s", "type": "bytes32"}], "name": "whitelistMe", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "bytes32"}], "name": "hashes", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "who", "type": "address"}, {"indexed": false, "name": "status", "type": "bool"}], "name": "Whitelisted", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "who", "type": "address"}, {"indexed": false, "name": "nonce", "type": "uint128"}], "name": "Whitelisted", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "bytecode": "0x608060405234801561001057600080fd5b5060008054600160a060020a03191633179055610524806100326000396000f3006080604052600436106100825763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416633af32abf81146100875780638da5cb5b146100c95780639b19251a14610107578063a0ca3ee114610135578063bda9b45c1461016a578063d658d2e9146101a0578063f2fde38b146101b8575b600080fd5b34801561009357600080fd5b506100b573ffffffffffffffffffffffffffffffffffffffff600435166101e6565b604080519115158252519081900360200190f35b3480156100d557600080fd5b506100de610211565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561011357600080fd5b506100b573ffffffffffffffffffffffffffffffffffffffff6004351661022d565b34801561014157600080fd5b5061016873ffffffffffffffffffffffffffffffffffffffff600435166024351515610242565b005b34801561017657600080fd5b506101686fffffffffffffffffffffffffffffffff6004351660ff60243516604435606435610274565b3480156101ac57600080fd5b506100b56004356103aa565b3480156101c457600080fd5b5061016873ffffffffffffffffffffffffffffffffffffffff600435166103bf565b73ffffffffffffffffffffffffffffffffffffffff1660009081526001602052604090205460ff1690565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60016020526000908152604090205460ff1681565b60005473ffffffffffffffffffffffffffffffffffffffff16331461026657600080fd5b6102708282610487565b5050565b604080516c01000000000000000000000000330281527001000000000000000000000000000000006fffffffffffffffffffffffffffffffff8716026014820152815190819003602401902060008181526002602052919091205460ff16156102dc57600080fd5b6000805460408051838152602080820180845286905260ff8916828401526060820188905260808201879052915173ffffffffffffffffffffffffffffffffffffffff9093169360019360a08084019493601f19830193908390039091019190865af1158015610350573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff1614151561037c57600080fd5b6000818152600260205260409020805460ff191660019081179091556103a3903390610487565b5050505050565b60026020526000908152604090205460ff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1633146103e357600080fd5b73ffffffffffffffffffffffffffffffffffffffff8116151561040557600080fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff191673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b73ffffffffffffffffffffffffffffffffffffffff8216600081815260016020908152604091829020805460ff191685151590811790915582519384529083015280517fa54714518c5d275fdcd3d2a461e4858e4e8cb04fb93cd0bca9d6d34115f264409281900390910190a150505600a165627a7a7230582004fe75ea66e5ae4344247a416501d10eb5e9ae457c421d9ffbbb0924e89159c20029", "bytecode_runtime": "0x6080604052600436106100825763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416633af32abf81146100875780638da5cb5b146100c95780639b19251a14610107578063a0ca3ee114610135578063bda9b45c1461016a578063d658d2e9146101a0578063f2fde38b146101b8575b600080fd5b34801561009357600080fd5b506100b573ffffffffffffffffffffffffffffffffffffffff600435166101e6565b604080519115158252519081900360200190f35b3480156100d557600080fd5b506100de610211565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561011357600080fd5b506100b573ffffffffffffffffffffffffffffffffffffffff6004351661022d565b34801561014157600080fd5b5061016873ffffffffffffffffffffffffffffffffffffffff600435166024351515610242565b005b34801561017657600080fd5b506101686fffffffffffffffffffffffffffffffff6004351660ff60243516604435606435610274565b3480156101ac57600080fd5b506100b56004356103aa565b3480156101c457600080fd5b5061016873ffffffffffffffffffffffffffffffffffffffff600435166103bf565b73ffffffffffffffffffffffffffffffffffffffff1660009081526001602052604090205460ff1690565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60016020526000908152604090205460ff1681565b60005473ffffffffffffffffffffffffffffffffffffffff16331461026657600080fd5b6102708282610487565b5050565b604080516c01000000000000000000000000330281527001000000000000000000000000000000006fffffffffffffffffffffffffffffffff8716026014820152815190819003602401902060008181526002602052919091205460ff16156102dc57600080fd5b6000805460408051838152602080820180845286905260ff8916828401526060820188905260808201879052915173ffffffffffffffffffffffffffffffffffffffff9093169360019360a08084019493601f19830193908390039091019190865af1158015610350573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff1614151561037c57600080fd5b6000818152600260205260409020805460ff191660019081179091556103a3903390610487565b5050505050565b60026020526000908152604090205460ff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1633146103e357600080fd5b73ffffffffffffffffffffffffffffffffffffffff8116151561040557600080fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff191673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b73ffffffffffffffffffffffffffffffffffffffff8216600081815260016020908152604091829020805460ff191685151590811790915582519384529083015280517fa54714518c5d275fdcd3d2a461e4858e4e8cb04fb93cd0bca9d6d34115f264409281900390910190a150505600a165627a7a7230582004fe75ea66e5ae4344247a416501d10eb5e9ae457c421d9ffbbb0924e89159c20029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": true, "inputs": [{"name": "who", "type": "address"}], "name": "isWhitelisted", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "whitelist", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "who", "type": "address"}, {"name": "status", "type": "bool"}], "name": "whitelistUser", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "nonce", "type": "uint128"}, {"name": "v", "type": "uint8"}, {"name": "r", "type": "bytes32"}, {"name": "s", "type": "bytes32"}], "name": "whitelistMe", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "bytes32"}], "name": "hashes", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "who", "type": "address"}, {"indexed": false, "name": "status", "type": "bool"}], "name": "Whitelisted", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "who", "type": "address"}, {"indexed": false, "name": "nonce", "type": "uint128"}], "name": "Whitelisted", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "devdoc": {"author": "TokenMarket / Ville Sundell ", "methods": {"isWhitelisted(address)": {"details": "Check the whitelisting status of an address. Although \"whitelist\" is a public mapping, we provide this \"external\" function to optimize gas usage.", "params": {"who": "Address of the user whose whitelist status we want to check"}}, "transferOwnership(address)": {"details": "Allows the current owner to transfer control of the contract to a newOwner.", "params": {"newOwner": "The address to transfer ownership to."}}, "whitelistMe(uint128,uint8,bytes32,bytes32)": {"details": "Whitelist an address. User can whitelist themselves by using a signed message from server side.", "params": {"nonce": "Value to prevent re-use of the server side signed data", "r": "R of the server's key which was used to sign this transfer", "s": "S of the server's key which was used to sign this transfer", "v": "V of the server's key which was used to sign this transfer"}}, "whitelistUser(address,bool)": {"details": "Whitelist an address.", "params": {"status": "True for whitelisting, False for de-whitelisting", "who": "Address being whitelisted"}}}}, "userdoc": {"methods": {}}}, "settings": {"compilationTarget": {"contracts/security-token/BasicKYC.sol": "BasicKYC"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/security-token/BasicKYC.sol": {"keccak256": "0xb8493e83c6d5b18b71fe6abf34dd933896ae45a4e9d90ea8ae4bd484c8bf8eb0", "urls": ["bzzr://2eaaabfb18c4684acdd02bc56d4c26b5fb2ddfb6d26e2cbaa3182554b8baaa5f"]}, "contracts/security-token/KYCInterface.sol": {"keccak256": "0x29b1037cfb17f26421589f64eb271362aa9fbfd1f975e68df8071fd98be2052c", "urls": ["bzzr://f815559e1245fd3603a1baf5f3ad7ed7d571690b35f131cb27e0fcf8246c34a4"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}}, "version": 1}, "name": "BasicKYC", "ordered_full_dependencies": [], "source_path": "contracts/security-token/BasicKYC.sol", "source": "/**\n * This smart contract code is Copyright 2019 TokenMarket Ltd. For more information see https://tokenmarket.net\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n * NatSpec is used intentionally to cover also other than public functions\n * Solidity 0.4.18 is intentionally used: it's stable, and our framework is\n * based on that.\n */\n\n\n\ninterface KYCInterface {\n event Whitelisted(address who, uint128 nonce);\n\n function isWhitelisted(address who) external view returns(bool);\n}\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n/**\n * @author TokenMarket / Ville Sundell \n */\ncontract BasicKYC is Ownable, KYCInterface {\n /** @dev This mapping contains address which have completed the KYC: */\n mapping (address => bool) public whitelist;\n /** @dev This mapping contains signature hashes which have been already used: */\n mapping (bytes32 => bool) public hashes;\n\n /** @dev this event is emitted when address is whitelisted, including the nonce:*/\n event Whitelisted(address who, bool status);\n\n /** @dev Simple contructor, mainly because of a Populus bug. */\n function BasicKYC() Ownable() {\n // This is here for our verification code only\n }\n\n /**\n * @dev Whitelist an address.\n * @param who Address being whitelisted\n * @param status True for whitelisting, False for de-whitelisting\n */\n function setWhitelisting(address who, bool status) internal {\n whitelist[who] = status;\n\n Whitelisted(who, status);\n }\n\n /**\n * @dev Whitelist an address.\n * @param who Address being whitelisted\n * @param status True for whitelisting, False for de-whitelisting\n */\n function whitelistUser(address who, bool status) external onlyOwner {\n setWhitelisting(who, status);\n }\n\n /**\n * @dev Whitelist an address. User can whitelist themselves by using a\n * signed message from server side.\n * @param nonce Value to prevent re-use of the server side signed data\n * @param v V of the server's key which was used to sign this transfer\n * @param r R of the server's key which was used to sign this transfer\n * @param s S of the server's key which was used to sign this transfer\n */\n function whitelistMe(uint128 nonce, uint8 v, bytes32 r, bytes32 s) external {\n bytes32 hash = keccak256(msg.sender, nonce);\n require(hashes[hash] == false);\n require(ecrecover(hash, v, r, s) == owner);\n\n hashes[hash] = true;\n setWhitelisting(msg.sender, true);\n }\n\n /**\n * @dev Check the whitelisting status of an address.\n * Although \"whitelist\" is a public mapping, we provide this \"external\"\n * function to optimize gas usage.\n * @param who Address of the user whose whitelist status we want to check\n */\n function isWhitelisted(address who) external view returns(bool) {\n return whitelist[who];\n }\n}\n"}, "BasicToken": {"abi": [{"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "bytecode": "0x608060405234801561001057600080fd5b5061027f806100206000396000f3006080604052600436106100565763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166318160ddd811461005b57806370a0823114610082578063a9059cbb146100b0575b600080fd5b34801561006757600080fd5b506100706100f5565b60408051918252519081900360200190f35b34801561008e57600080fd5b5061007073ffffffffffffffffffffffffffffffffffffffff600435166100fb565b3480156100bc57600080fd5b506100e173ffffffffffffffffffffffffffffffffffffffff60043516602435610123565b604080519115158252519081900360200190f35b60015490565b73ffffffffffffffffffffffffffffffffffffffff1660009081526020819052604090205490565b600073ffffffffffffffffffffffffffffffffffffffff8316151561014757600080fd5b3360009081526020819052604090205482111561016357600080fd5b33600090815260208190526040902054610183908363ffffffff61022b16565b336000908152602081905260408082209290925573ffffffffffffffffffffffffffffffffffffffff8516815220546101c2908363ffffffff61023d16565b73ffffffffffffffffffffffffffffffffffffffff8416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b60008282111561023757fe5b50900390565b60008282018381101561024c57fe5b93925050505600a165627a7a72305820b0271c191dfed30f2c56d22549eda32c3232cba9c26b3437594ee49e1b7c46560029", "bytecode_runtime": "0x6080604052600436106100565763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166318160ddd811461005b57806370a0823114610082578063a9059cbb146100b0575b600080fd5b34801561006757600080fd5b506100706100f5565b60408051918252519081900360200190f35b34801561008e57600080fd5b5061007073ffffffffffffffffffffffffffffffffffffffff600435166100fb565b3480156100bc57600080fd5b506100e173ffffffffffffffffffffffffffffffffffffffff60043516602435610123565b604080519115158252519081900360200190f35b60015490565b73ffffffffffffffffffffffffffffffffffffffff1660009081526020819052604090205490565b600073ffffffffffffffffffffffffffffffffffffffff8316151561014757600080fd5b3360009081526020819052604090205482111561016357600080fd5b33600090815260208190526040902054610183908363ffffffff61022b16565b336000908152602081905260408082209290925573ffffffffffffffffffffffffffffffffffffffff8516815220546101c2908363ffffffff61023d16565b73ffffffffffffffffffffffffffffffffffffffff8416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b60008282111561023757fe5b50900390565b60008282018381101561024c57fe5b93925050505600a165627a7a72305820b0271c191dfed30f2c56d22549eda32c3232cba9c26b3437594ee49e1b7c46560029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "devdoc": {"methods": {"balanceOf(address)": {"details": "Gets the balance of the specified address.", "params": {"_owner": "The address to query the the balance of."}, "return": "An uint256 representing the amount owned by the passed address."}, "totalSupply()": {"details": "total number of tokens in existence"}, "transfer(address,uint256)": {"details": "transfer token for a specified address", "params": {"_to": "The address to transfer to.", "_value": "The amount to be transferred."}}}, "title": "Basic token"}, "userdoc": {"methods": {}}}, "settings": {"compilationTarget": {"zeppelin/contracts/token/ERC20/BasicToken.sol": "BasicToken"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"zeppelin/contracts/math/SafeMath.sol": {"keccak256": "0x341ba8cb467a3623e819ba1a683ac1d264005186f308505214e5f6bc89446a08", "urls": ["bzzr://59b5652ee4e4a1b5a8f1a8906e14c84af43d636cf5ca0725cc1813aabe4c8c17"]}, "zeppelin/contracts/token/ERC20/BasicToken.sol": {"keccak256": "0x948404468d61ff35ea4194650670408dabd65da7f905a1c16888ab84520bf39e", "urls": ["bzzr://ea75e20f95d7e4e10394fe6bfaa8eee56b4757c2a6f1e8df4180d33afa621935"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}}, "version": 1}, "name": "BasicToken", "ordered_full_dependencies": [], "source_path": "zeppelin/contracts/token/ERC20/BasicToken.sol", "source": "\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n assert(c / a == b);\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n\n\n\n/**\n * @title Basic token\n * @dev Basic version of StandardToken, with no allowances.\n */\ncontract BasicToken is ERC20Basic {\n using SafeMath for uint256;\n\n mapping(address => uint256) balances;\n\n uint256 totalSupply_;\n\n /**\n * @dev total number of tokens in existence\n */\n function totalSupply() public view returns (uint256) {\n return totalSupply_;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param _to The address to transfer to.\n * @param _value The amount to be transferred.\n */\n function transfer(address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[msg.sender]);\n\n // SafeMath.sub will throw if there is not enough balance.\n balances[msg.sender] = balances[msg.sender].sub(_value);\n balances[_to] = balances[_to].add(_value);\n Transfer(msg.sender, _to, _value);\n return true;\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param _owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address _owner) public view returns (uint256 balance) {\n return balances[_owner];\n }\n\n}\n"}, "BogusAnnouncement": {"abi": [{"constant": true, "inputs": [], "name": "announcementHash", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "announcementType", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "announcementName", "outputs": [{"name": "", "type": "bytes32"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "announcementURI", "outputs": [{"name": "", "type": "bytes32"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [{"name": "_announcementName", "type": "bytes32"}, {"name": "_announcementURI", "type": "bytes32"}, {"name": "_announcementType", "type": "uint256"}, {"name": "_announcementHash", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}], "bytecode": "0x608060405234801561001057600080fd5b50604051608080610156833981016040908152815160208301519183015160609093015160009190915560019190915560029190915560035560ff806100576000396000f300608060405260043610605c5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416631274c3f3811460615780635fcce2791460855780639ea0c08c146097578063f31294a41460a9575b600080fd5b348015606c57600080fd5b50607360bb565b60408051918252519081900360200190f35b348015609057600080fd5b50607360c1565b34801560a257600080fd5b50607360c7565b34801560b457600080fd5b50607360cd565b60035481565b60025481565b60005481565b600154815600a165627a7a72305820beabd9120ed9158857828e2e8fb1f905a15d61b9f66c7744b6b8cf644245051f0029", "bytecode_runtime": "0x608060405260043610605c5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416631274c3f3811460615780635fcce2791460855780639ea0c08c146097578063f31294a41460a9575b600080fd5b348015606c57600080fd5b50607360bb565b60408051918252519081900360200190f35b348015609057600080fd5b50607360c1565b34801560a257600080fd5b50607360c7565b34801560b457600080fd5b50607360cd565b60035481565b60025481565b60005481565b600154815600a165627a7a72305820beabd9120ed9158857828e2e8fb1f905a15d61b9f66c7744b6b8cf644245051f0029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": true, "inputs": [], "name": "announcementHash", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "announcementType", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "announcementName", "outputs": [{"name": "", "type": "bytes32"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "announcementURI", "outputs": [{"name": "", "type": "bytes32"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [{"name": "_announcementName", "type": "bytes32"}, {"name": "_announcementURI", "type": "bytes32"}, {"name": "_announcementType", "type": "uint256"}, {"name": "_announcementHash", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}], "devdoc": {"methods": {}}, "userdoc": {"methods": {}}}, "settings": {"compilationTarget": {"contracts/security-token/tests/BogusAnnouncement.sol": "BogusAnnouncement"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/security-token/tests/BogusAnnouncement.sol": {"keccak256": "0x2acace3c803b98f5aa174ddf3eb1af7dec2b67c4d6c34d1ef69fa88a2851a68b", "urls": ["bzzr://74b212027437f6f197cc0d9cd06f056e02be9595cf7b45582b41f14a080d51d3"]}}, "version": 1}, "name": "BogusAnnouncement", "ordered_full_dependencies": [], "source_path": "contracts/security-token/tests/BogusAnnouncement.sol", "source": "\ncontract BogusAnnouncement {\n bytes32 public announcementName;\n bytes32 public announcementURI;\n uint256 public announcementType;\n uint256 public announcementHash;\n\n function BogusAnnouncement(bytes32 _announcementName, bytes32 _announcementURI, uint256 _announcementType, uint256 _announcementHash) public {\n announcementName = _announcementName;\n announcementURI = _announcementURI;\n announcementType = _announcementType;\n announcementHash = _announcementHash;\n }\n}\n"}, "BonusFinalizeAgent": {"abi": [{"constant": false, "inputs": [], "name": "finalizeCrowdsale", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "isFinalizeAgent", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "allocatedBonus", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "bonusBasePoints", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isSane", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "crowdsale", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "teamMultisig", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "token", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [{"name": "_token", "type": "address"}, {"name": "_crowdsale", "type": "address"}, {"name": "_bonusBasePoints", "type": "uint256"}, {"name": "_teamMultisig", "type": "address"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}], "bytecode": "0x608060405234801561001057600080fd5b5060405160808061070a833981016040908152815160208301519183015160609093015160008054600160a060020a03808516600160a060020a031992831617909255600180548387169216919091179081905592949216151561007357600080fd5b60038054600160a060020a031916600160a060020a0383811691909117918290551615156100a057600080fd5b506002555050610655806100b56000396000f30060806040526004361061008d5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630bf318a38114610092578063614cb904146100a95780636a457ee9146100d25780637424bebc146100f957806382771c8e1461010e5780639c1e03a014610123578063dbc0c08514610161578063fc0c546a14610176575b600080fd5b34801561009e57600080fd5b506100a761018b565b005b3480156100b557600080fd5b506100be610434565b604080519115158252519081900360200190f35b3480156100de57600080fd5b506100e7610439565b60408051918252519081900360200190f35b34801561010557600080fd5b506100e761043f565b34801561011a57600080fd5b506100be610445565b34801561012f57600080fd5b506101386105d5565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561016d57600080fd5b506101386105f1565b34801561018257600080fd5b5061013861060d565b60015460009073ffffffffffffffffffffffffffffffffffffffff1633146101b257600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663518ab2a86040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561023857600080fd5b505af115801561024c573d6000803e3d6000fd5b505050506040513d602081101561026257600080fd5b5051600254604080517f1d3b9edf000000000000000000000000000000000000000000000000000000008152600481018490526024810192909252519192506127109173__contracts/SafeMathLib.sol:SafeMathLi__91631d3b9edf916044808301926020929190829003018186803b1580156102e057600080fd5b505af41580156102f4573d6000803e3d6000fd5b505050506040513d602081101561030a57600080fd5b505181151561031557fe5b04600481815560008054600354604080517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff92831695810195909552602485019590955293519316926340c10f1992604480820193929182900301818387803b15801561039857600080fd5b505af11580156103ac573d6000803e3d6000fd5b505060008054604080517f5f412d4f000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff9092169450635f412d4f9350600480820193929182900301818387803b15801561041957600080fd5b505af115801561042d573d6000803e3d6000fd5b5050505050565b600190565b60045481565b60025481565b60008054604080517f42c1867b000000000000000000000000000000000000000000000000000000008152306004820152905173ffffffffffffffffffffffffffffffffffffffff909216916342c1867b9160248082019260209290919082900301818787803b1580156104b857600080fd5b505af11580156104cc573d6000803e3d6000fd5b505050506040513d60208110156104e257600080fd5b5051151560011480156105d057503073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d1f276d36040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561058c57600080fd5b505af11580156105a0573d6000803e3d6000fd5b505050506040513d60208110156105b657600080fd5b505173ffffffffffffffffffffffffffffffffffffffff16145b905090565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff16815600a165627a7a7230582019d70dfba80c263654d1902f80a2780ab21de68666092d44c42939339e2f9de00029", "bytecode_runtime": "0x60806040526004361061008d5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630bf318a38114610092578063614cb904146100a95780636a457ee9146100d25780637424bebc146100f957806382771c8e1461010e5780639c1e03a014610123578063dbc0c08514610161578063fc0c546a14610176575b600080fd5b34801561009e57600080fd5b506100a761018b565b005b3480156100b557600080fd5b506100be610434565b604080519115158252519081900360200190f35b3480156100de57600080fd5b506100e7610439565b60408051918252519081900360200190f35b34801561010557600080fd5b506100e761043f565b34801561011a57600080fd5b506100be610445565b34801561012f57600080fd5b506101386105d5565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561016d57600080fd5b506101386105f1565b34801561018257600080fd5b5061013861060d565b60015460009073ffffffffffffffffffffffffffffffffffffffff1633146101b257600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663518ab2a86040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561023857600080fd5b505af115801561024c573d6000803e3d6000fd5b505050506040513d602081101561026257600080fd5b5051600254604080517f1d3b9edf000000000000000000000000000000000000000000000000000000008152600481018490526024810192909252519192506127109173__contracts/SafeMathLib.sol:SafeMathLi__91631d3b9edf916044808301926020929190829003018186803b1580156102e057600080fd5b505af41580156102f4573d6000803e3d6000fd5b505050506040513d602081101561030a57600080fd5b505181151561031557fe5b04600481815560008054600354604080517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff92831695810195909552602485019590955293519316926340c10f1992604480820193929182900301818387803b15801561039857600080fd5b505af11580156103ac573d6000803e3d6000fd5b505060008054604080517f5f412d4f000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff9092169450635f412d4f9350600480820193929182900301818387803b15801561041957600080fd5b505af115801561042d573d6000803e3d6000fd5b5050505050565b600190565b60045481565b60025481565b60008054604080517f42c1867b000000000000000000000000000000000000000000000000000000008152306004820152905173ffffffffffffffffffffffffffffffffffffffff909216916342c1867b9160248082019260209290919082900301818787803b1580156104b857600080fd5b505af11580156104cc573d6000803e3d6000fd5b505050506040513d60208110156104e257600080fd5b5051151560011480156105d057503073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d1f276d36040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561058c57600080fd5b505af11580156105a0573d6000803e3d6000fd5b505050506040513d60208110156105b657600080fd5b505173ffffffffffffffffffffffffffffffffffffffff16145b905090565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff16815600a165627a7a7230582019d70dfba80c263654d1902f80a2780ab21de68666092d44c42939339e2f9de00029", "direct_dependencies": ["SafeMathLib"], "full_dependencies": ["SafeMathLib"], "linkrefs": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 1720}], "linkrefs_runtime": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 1358}], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": false, "inputs": [], "name": "finalizeCrowdsale", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "isFinalizeAgent", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "allocatedBonus", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "bonusBasePoints", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isSane", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "crowdsale", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "teamMultisig", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "token", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [{"name": "_token", "type": "address"}, {"name": "_crowdsale", "type": "address"}, {"name": "_bonusBasePoints", "type": "uint256"}, {"name": "_teamMultisig", "type": "address"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}], "devdoc": {"methods": {}}, "userdoc": {"methods": {"finalizeCrowdsale()": {"notice": "Called once by crowdsale finalize() if the sale was success. "}}}}, "settings": {"compilationTarget": {"contracts/BonusFinalizeAgent.sol": "BonusFinalizeAgent"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/BonusFinalizeAgent.sol": {"keccak256": "0xb69e8580f1bc298dd3e1c0bea75175f6f9b5e53909e9e1414011b1cad3864274", "urls": ["bzzr://ef9419d0e13ec54843214aaf25623b11c7a39a231cd576ca3f34d53bbdaa89ba"]}, "contracts/Crowdsale.sol": {"keccak256": "0x2697c26528f64bb954a7c2547d3b43317d2d2b02c7d9d05a7b1ab388cd79f65d", "urls": ["bzzr://f28b280794222114141c51dd5c388d403a7c98d8b51e04170a0e294246d5164b"]}, "contracts/CrowdsaleBase.sol": {"keccak256": "0xe2c9ed11183ce705616980df7b02544d72fe18b40395da7d9d4bcb621fb87871", "urls": ["bzzr://07f3887ba0d0eb3248b1ad3581480ed71a2fe70a47dcc283c4e97c8c92e0790a"]}, "contracts/CrowdsaleToken.sol": {"keccak256": "0xa812687ac327cd19fac64667980e70d4fb72ef7f61dce477818d085cf0a915df", "urls": ["bzzr://826d9dda00ce341794e5bb05c78b1abb2728e3c631f7a542345dcfa9f3bd9c50"]}, "contracts/FinalizeAgent.sol": {"keccak256": "0x309fd0510e0b3e2b5044e33f7c80cfb2d6f2a5697e41a5f185931d65770cfea9", "urls": ["bzzr://4e7ed6f82c0f542e92e56c12566b2ecd7666730865bf12566c27587ec64160ac"]}, "contracts/FractionalERC20.sol": {"keccak256": "0x75bc4ad90a8b13ce961c89b1bf405776f616e019d3a2720168f8e52be223198f", "urls": ["bzzr://6a3688f12da1a5c890ef06f80f883f6c5370886092d38a1b33cd4219b718478b"]}, "contracts/Haltable.sol": {"keccak256": "0x265dcf25e7c9ab4b6eecd2181f1b71334a1b5381a60f8db7d9526dab120f4b70", "urls": ["bzzr://d522e00fa9e075941469dd81738b59fdb99ce3c12cdc39e33abe40b588c4da9b"]}, "contracts/MintableToken.sol": {"keccak256": "0x650e1d6b2bedcd36508918357c7cf4f36fdd093cd0c4d6342f4dcd3bdcdd7578", "urls": ["bzzr://7ba2ac0480d428066a18727e2adb76ba56856ecd37b4420e801131ec8f8f4be3"]}, "contracts/PricingStrategy.sol": {"keccak256": "0x8df5093b7d07168ad994f9176de0bd2268f6563b1e8a3a448d8cfe7fe246c628", "urls": ["bzzr://ef5c944d51f739ab34e2c951d6ac82a7152e6bb844058a8e57bae52c14cbe16b"]}, "contracts/Recoverable.sol": {"keccak256": "0x311a332cdd87df6e00057f5455f4e68b043b5dbe211f6d68bc64e20817515635", "urls": ["bzzr://4fd99bcfb93baed6e7c8d22ee9ecc5c8346a1aa98288e77b01333b2c5d3f582d"]}, "contracts/ReleasableToken.sol": {"keccak256": "0x2c50180d0c1eab1aa63a04da3ae87ee2c482665d2a1a42c5f05b11234a7edaf4", "urls": ["bzzr://10752c317eba5c42e2848722689cfee4fffb7bcb42f3346e1a20715d843798e8"]}, "contracts/SafeMathLib.sol": {"keccak256": "0x501bfe31e274b9a5591f7c540bdced4d4312e27d4f19599147c9bbca3d9c6b18", "urls": ["bzzr://a80935ebddb06c247d71372d4e5833ee029f08633bd0fe4a274a57009567e5b9"]}, "contracts/StandardTokenExt.sol": {"keccak256": "0x9ea2d4cec4dccd5639c05e6c23dd027d80b5e5a20abd99b280ab7b2631b5a5fc", "urls": ["bzzr://a52d8fc5a21bd83997aff19128e00dceb251df712207b61223894c8b7f42d5ff"]}, "contracts/UpgradeAgent.sol": {"keccak256": "0x88e793f72feca4a18d2cd06e6037c1413d7b963eabcf5626d60bfb9d04d6e8e6", "urls": ["bzzr://87e39a65cf25d539ab49ad7e759b3298b8a19272964e69e3f2432f0323f30025"]}, "contracts/UpgradeableToken.sol": {"keccak256": "0xa74fc300c514564ece81c86905502c2de674b69c0633b133af19c1ba027da2c9", "urls": ["bzzr://55bc0b908c94781462b8959f051c6dbb53c35641b0f8cb38d74632ad6bf95e52"]}, "zeppelin/contracts/math/SafeMath.sol": {"keccak256": "0x341ba8cb467a3623e819ba1a683ac1d264005186f308505214e5f6bc89446a08", "urls": ["bzzr://59b5652ee4e4a1b5a8f1a8906e14c84af43d636cf5ca0725cc1813aabe4c8c17"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}, "zeppelin/contracts/token/ERC20/BasicToken.sol": {"keccak256": "0x948404468d61ff35ea4194650670408dabd65da7f905a1c16888ab84520bf39e", "urls": ["bzzr://ea75e20f95d7e4e10394fe6bfaa8eee56b4757c2a6f1e8df4180d33afa621935"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}, "zeppelin/contracts/token/ERC20/StandardToken.sol": {"keccak256": "0xd2b344a5259e19ec143074cfa65637a10c40b68395c59808c4af13bccbb2de55", "urls": ["bzzr://d61a01175a7ca1ba9f4403de603c20b897e33ec425aef2d9f8a7f9ddfdfaf5b2"]}}, "version": 1}, "name": "BonusFinalizeAgent", "ordered_full_dependencies": ["SafeMathLib"], "source_path": "contracts/BonusFinalizeAgent.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Safe unsigned safe math.\n *\n * https://blog.aragon.one/library-driven-development-in-solidity-2bebcaf88736#.750gwtwli\n *\n * Originally from https://raw.githubusercontent.com/AragonOne/zeppelin-solidity/master/contracts/SafeMathLib.sol\n *\n * Maintained here until merged to mainline zeppelin-solidity.\n *\n */\nlibrary SafeMathLib {\n\n function times(uint a, uint b) returns (uint) {\n uint c = a * b;\n assert(a == 0 || c / a == b);\n return c;\n }\n\n function minus(uint a, uint b) returns (uint) {\n assert(b <= a);\n return a - b;\n }\n\n function plus(uint a, uint b) returns (uint) {\n uint c = a + b;\n assert(c>=a);\n return c;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Interface for defining crowdsale pricing.\n */\ncontract PricingStrategy {\n\n /** Interface declaration. */\n function isPricingStrategy() public constant returns (bool) {\n return true;\n }\n\n /** Self check if all references are correctly set.\n *\n * Checks that pricing strategy matches crowdsale parameters.\n */\n function isSane(address crowdsale) public constant returns (bool) {\n return true;\n }\n\n /**\n * @dev Pricing tells if this is a presale purchase or not.\n @param purchaser Address of the purchaser\n @return False by default, true if a presale purchaser\n */\n function isPresalePurchase(address purchaser) public constant returns (bool) {\n return false;\n }\n\n /**\n * When somebody tries to buy tokens for X eth, calculate how many tokens they get.\n *\n *\n * @param value - What is the value of the transaction send in as wei\n * @param tokensSold - how much tokens have been sold this far\n * @param weiRaised - how much money has been raised this far in the main token sale - this number excludes presale\n * @param msgSender - who is the investor of this transaction\n * @param decimals - how many decimal units the token has\n * @return Amount of tokens the investor receives\n */\n function calculatePrice(uint value, uint weiRaised, uint tokensSold, address msgSender, uint decimals) public constant returns (uint tokenAmount);\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Finalize agent defines what happens at the end of succeseful crowdsale.\n *\n * - Allocate tokens for founders, bounties and community\n * - Make tokens transferable\n * - etc.\n */\ncontract FinalizeAgent {\n\n function isFinalizeAgent() public constant returns(bool) {\n return true;\n }\n\n /** Return true if we can run finalizeCrowdsale() properly.\n *\n * This is a safety check function that doesn't allow crowdsale to begin\n * unless the finalizer has been set up properly.\n */\n function isSane() public constant returns (bool);\n\n /** Called once by crowdsale finalize() if the sale was success. */\n function finalizeCrowdsale();\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n\n/**\n * A token that defines fractional units as decimals.\n */\ncontract FractionalERC20 is ERC20 {\n\n uint public decimals;\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n/*\n * Haltable\n *\n * Abstract contract that allows children to implement an\n * emergency stop mechanism. Differs from Pausable by causing a throw when in halt mode.\n *\n *\n * Originally envisioned in FirstBlood ICO contract.\n */\ncontract Haltable is Ownable {\n bool public halted;\n\n modifier stopInEmergency {\n if (halted) throw;\n _;\n }\n\n modifier stopNonOwnersInEmergency {\n if (halted && msg.sender != owner) throw;\n _;\n }\n\n modifier onlyInEmergency {\n if (!halted) throw;\n _;\n }\n\n // called by the owner on emergency, triggers stopped state\n function halt() external onlyOwner {\n halted = true;\n }\n\n // called by the owner on end of emergency, returns to normal state\n function unhalt() external onlyOwner onlyInEmergency {\n halted = false;\n }\n\n}\n\n\n\n\n\n\n\n/**\n * Crowdsale state machine without buy functionality.\n *\n * Implements basic state machine logic, but leaves out all buy functions,\n * so that subclasses can implement their own buying logic.\n *\n *\n * For the default buy() implementation see Crowdsale.sol.\n */\ncontract CrowdsaleBase is Haltable {\n\n /* Max investment count when we are still allowed to change the multisig address */\n uint public MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE = 5;\n\n using SafeMathLib for uint;\n\n /* The token we are selling */\n FractionalERC20 public token;\n\n /* How we are going to price our offering */\n PricingStrategy public pricingStrategy;\n\n /* Post-success callback */\n FinalizeAgent public finalizeAgent;\n\n /* tokens will be transfered from this address */\n address public multisigWallet;\n\n /* if the funding goal is not reached, investors may withdraw their funds */\n uint public minimumFundingGoal;\n\n /* the UNIX timestamp start date of the crowdsale */\n uint public startsAt;\n\n /* the UNIX timestamp end date of the crowdsale */\n uint public endsAt;\n\n /* the number of tokens already sold through this contract*/\n uint public tokensSold = 0;\n\n /* How many wei of funding we have raised */\n uint public weiRaised = 0;\n\n /* Calculate incoming funds from presale contracts and addresses */\n uint public presaleWeiRaised = 0;\n\n /* How many distinct addresses have invested */\n uint public investorCount = 0;\n\n /* How much wei we have returned back to the contract after a failed crowdfund. */\n uint public loadedRefund = 0;\n\n /* How much wei we have given back to investors.*/\n uint public weiRefunded = 0;\n\n /* Has this crowdsale been finalized */\n bool public finalized;\n\n /** How much ETH each address has invested to this crowdsale */\n mapping (address => uint256) public investedAmountOf;\n\n /** How much tokens this crowdsale has credited for each investor address */\n mapping (address => uint256) public tokenAmountOf;\n\n /** Addresses that are allowed to invest even before ICO offical opens. For testing, for ICO partners, etc. */\n mapping (address => bool) public earlyParticipantWhitelist;\n\n /** This is for manul testing for the interaction from owner wallet. You can set it to any value and inspect this in blockchain explorer to see that crowdsale interaction works. */\n uint public ownerTestValue;\n\n /** State machine\n *\n * - Preparing: All contract initialization calls and variables have not been set yet\n * - Prefunding: We have not passed start time yet\n * - Funding: Active crowdsale\n * - Success: Minimum funding goal reached\n * - Failure: Minimum funding goal not reached before ending time\n * - Finalized: The finalized has been called and succesfully executed\n * - Refunding: Refunds are loaded on the contract for reclaim.\n */\n enum State{Unknown, Preparing, PreFunding, Funding, Success, Failure, Finalized, Refunding}\n\n // A new investment was made\n event Invested(address investor, uint weiAmount, uint tokenAmount, uint128 customerId);\n\n // Refund was processed for a contributor\n event Refund(address investor, uint weiAmount);\n\n // The rules were changed what kind of investments we accept\n event InvestmentPolicyChanged(bool newRequireCustomerId, bool newRequiredSignedAddress, address newSignerAddress);\n\n // Address early participation whitelist status changed\n event Whitelisted(address addr, bool status);\n\n // Crowdsale end time has been changed\n event EndsAtChanged(uint newEndsAt);\n\n function CrowdsaleBase(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal) {\n\n owner = msg.sender;\n\n token = FractionalERC20(_token);\n setPricingStrategy(_pricingStrategy);\n\n multisigWallet = _multisigWallet;\n if(multisigWallet == 0) {\n throw;\n }\n\n if(_start == 0) {\n throw;\n }\n\n startsAt = _start;\n\n if(_end == 0) {\n throw;\n }\n\n endsAt = _end;\n\n // Don't mess the dates\n if(startsAt >= endsAt) {\n throw;\n }\n\n // Minimum funding goal can be zero\n minimumFundingGoal = _minimumFundingGoal;\n }\n\n /**\n * Don't expect to just send in money and get tokens.\n */\n function() payable {\n throw;\n }\n\n /**\n * @dev Make an investment.\n *\n * Crowdsale must be running for one to invest.\n * We must have not pressed the emergency brake.\n *\n * @param receiver The Ethereum address who receives the tokens\n * @param customerId (optional) UUID v4 to track the successful payments on the server side'\n * @param tokenAmount Amount of tokens which be credited to receiver\n *\n * @return tokensBought How mony tokens were bought\n */\n function buyTokens(address receiver, uint128 customerId, uint256 tokenAmount) stopInEmergency internal returns(uint tokensBought) {\n\n // Determine if it's a good time to accept investment from this participant\n if(getState() == State.PreFunding) {\n // Are we whitelisted for early deposit\n if(!earlyParticipantWhitelist[receiver]) {\n throw;\n }\n } else if(getState() == State.Funding) {\n // Retail participants can only come in when the crowdsale is running\n // pass\n } else {\n // Unwanted state\n throw;\n }\n\n uint weiAmount = msg.value;\n\n // Dust transaction\n require(tokenAmount != 0);\n\n if(investedAmountOf[receiver] == 0) {\n // A new investor\n investorCount++;\n }\n\n // Update investor\n investedAmountOf[receiver] = investedAmountOf[receiver].plus(weiAmount);\n tokenAmountOf[receiver] = tokenAmountOf[receiver].plus(tokenAmount);\n\n // Update totals\n weiRaised = weiRaised.plus(weiAmount);\n tokensSold = tokensSold.plus(tokenAmount);\n\n if(pricingStrategy.isPresalePurchase(receiver)) {\n presaleWeiRaised = presaleWeiRaised.plus(weiAmount);\n }\n\n // Check that we did not bust the cap\n require(!isBreakingCap(weiAmount, tokenAmount, weiRaised, tokensSold));\n\n assignTokens(receiver, tokenAmount);\n\n // Pocket the money, or fail the crowdsale if we for some reason cannot send the money to our multisig\n if(!multisigWallet.send(weiAmount)) throw;\n\n // Tell us invest was success\n Invested(receiver, weiAmount, tokenAmount, customerId);\n\n return tokenAmount;\n }\n\n /**\n * @dev Make an investment based on pricing strategy\n *\n * This is a wrapper for buyTokens(), but the amount of tokens receiver will\n * have depends on the pricing strategy used.\n *\n * @param receiver The Ethereum address who receives the tokens\n * @param customerId (optional) UUID v4 to track the successful payments on the server side'\n *\n * @return tokensBought How mony tokens were bought\n */\n function investInternal(address receiver, uint128 customerId) stopInEmergency internal returns(uint tokensBought) {\n return buyTokens(receiver, customerId, pricingStrategy.calculatePrice(msg.value, weiRaised - presaleWeiRaised, tokensSold, msg.sender, token.decimals()));\n }\n\n /**\n * @dev Calculate tokens user will have for their purchase\n *\n * @param weisTotal How much ethers (in wei) the user putssssss in\n * @param pricePerToken What is the price for one token\n *\n * @return tokensTotal which is received tokens, token decimals included\n */\n function calculateTokens(uint256 weisTotal, uint256 pricePerToken) public constant returns(uint tokensTotal) {\n // pricePerToken is how many full tokens, token decimal place included, you get for wei amount.\n // Because, in theory, decimal amount can vary, we do the exponent calculation here,\n // though gas wise using 10**18 constant would be much simpler.\n // Furthermore we could use rough amounts and take in raw wei per tokens amount,\n // but we lose too much accuracy for generic calculations, thus all these are\n // practically implemented as 10**18 fixed points.\n uint multiplier = 10 ** token.decimals();\n return weisTotal.times(multiplier)/pricePerToken;\n }\n\n /**\n * Finalize a succcesful crowdsale.\n *\n * The owner can triggre a call the contract that provides post-crowdsale actions, like releasing the tokens.\n */\n function finalize() public inState(State.Success) onlyOwner stopInEmergency {\n\n // Already finalized\n if(finalized) {\n throw;\n }\n\n // Finalizing is optional. We only call it if we are given a finalizing agent.\n if(address(finalizeAgent) != 0) {\n finalizeAgent.finalizeCrowdsale();\n }\n\n finalized = true;\n }\n\n /**\n * Allow to (re)set finalize agent.\n *\n * Design choice: no state restrictions on setting this, so that we can fix fat finger mistakes.\n */\n function setFinalizeAgent(FinalizeAgent addr) onlyOwner {\n finalizeAgent = addr;\n\n // Don't allow setting bad agent\n if(!finalizeAgent.isFinalizeAgent()) {\n throw;\n }\n }\n\n /**\n * Allow crowdsale owner to close early or extend the crowdsale.\n *\n * This is useful e.g. for a manual soft cap implementation:\n * - after X amount is reached determine manual closing\n *\n * This may put the crowdsale to an invalid state,\n * but we trust owners know what they are doing.\n *\n */\n function setEndsAt(uint time) onlyOwner {\n\n if(now > time) {\n throw; // Don't change past\n }\n\n if(startsAt > time) {\n throw; // Prevent human mistakes\n }\n\n endsAt = time;\n EndsAtChanged(endsAt);\n }\n\n /**\n * Allow to (re)set pricing strategy.\n *\n * Design choice: no state restrictions on the set, so that we can fix fat finger mistakes.\n */\n function setPricingStrategy(PricingStrategy _pricingStrategy) onlyOwner {\n pricingStrategy = _pricingStrategy;\n\n // Don't allow setting bad agent\n if(!pricingStrategy.isPricingStrategy()) {\n throw;\n }\n }\n\n /**\n * Allow to change the team multisig address in the case of emergency.\n *\n * This allows to save a deployed crowdsale wallet in the case the crowdsale has not yet begun\n * (we have done only few test transactions). After the crowdsale is going\n * then multisig address stays locked for the safety reasons.\n */\n function setMultisig(address addr) public onlyOwner {\n\n // Change\n if(investorCount > MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE) {\n throw;\n }\n\n multisigWallet = addr;\n }\n\n /**\n * Allow load refunds back on the contract for the refunding.\n *\n * The team can transfer the funds back on the smart contract in the case the minimum goal was not reached..\n */\n function loadRefund() public payable inState(State.Failure) {\n if(msg.value == 0) throw;\n loadedRefund = loadedRefund.plus(msg.value);\n }\n\n /**\n * Investors can claim refund.\n *\n * Note that any refunds from proxy buyers should be handled separately,\n * and not through this contract.\n */\n function refund() public inState(State.Refunding) {\n uint256 weiValue = investedAmountOf[msg.sender];\n if (weiValue == 0) throw;\n investedAmountOf[msg.sender] = 0;\n weiRefunded = weiRefunded.plus(weiValue);\n Refund(msg.sender, weiValue);\n if (!msg.sender.send(weiValue)) throw;\n }\n\n /**\n * @return true if the crowdsale has raised enough money to be a successful.\n */\n function isMinimumGoalReached() public constant returns (bool reached) {\n return weiRaised >= minimumFundingGoal;\n }\n\n /**\n * Check if the contract relationship looks good.\n */\n function isFinalizerSane() public constant returns (bool sane) {\n return finalizeAgent.isSane();\n }\n\n /**\n * Check if the contract relationship looks good.\n */\n function isPricingSane() public constant returns (bool sane) {\n return pricingStrategy.isSane(address(this));\n }\n\n /**\n * Crowdfund state machine management.\n *\n * We make it a function and do not assign the result to a variable, so there is no chance of the variable being stale.\n */\n function getState() public constant returns (State) {\n if(finalized) return State.Finalized;\n else if (address(finalizeAgent) == 0) return State.Preparing;\n else if (!finalizeAgent.isSane()) return State.Preparing;\n else if (!pricingStrategy.isSane(address(this))) return State.Preparing;\n else if (block.timestamp < startsAt) return State.PreFunding;\n else if (block.timestamp <= endsAt && !isCrowdsaleFull()) return State.Funding;\n else if (isMinimumGoalReached()) return State.Success;\n else if (!isMinimumGoalReached() && weiRaised > 0 && loadedRefund >= weiRaised) return State.Refunding;\n else return State.Failure;\n }\n\n /** This is for manual testing of multisig wallet interaction */\n function setOwnerTestValue(uint val) onlyOwner {\n ownerTestValue = val;\n }\n\n /**\n * Allow addresses to do early participation.\n *\n * TODO: Fix spelling error in the name\n */\n function setEarlyParicipantWhitelist(address addr, bool status) onlyOwner {\n earlyParticipantWhitelist[addr] = status;\n Whitelisted(addr, status);\n }\n\n\n /** Interface marker. */\n function isCrowdsale() public constant returns (bool) {\n return true;\n }\n\n //\n // Modifiers\n //\n\n /** Modified allowing execution only if the crowdsale is currently running. */\n modifier inState(State state) {\n if(getState() != state) throw;\n _;\n }\n\n\n //\n // Abstract functions\n //\n\n /**\n * Check if the current invested breaks our cap rules.\n *\n *\n * The child contract must define their own cap setting rules.\n * We allow a lot of flexibility through different capping strategies (ETH, token count)\n * Called from invest().\n *\n * @param weiAmount The amount of wei the investor tries to invest in the current transaction\n * @param tokenAmount The amount of tokens we try to give to the investor in the current transaction\n * @param weiRaisedTotal What would be our total raised balance after this transaction\n * @param tokensSoldTotal What would be our total sold tokens count after this transaction\n *\n * @return true if taking this investment would break our cap rules\n */\n function isBreakingCap(uint weiAmount, uint tokenAmount, uint weiRaisedTotal, uint tokensSoldTotal) constant returns (bool limitBroken);\n\n /**\n * Check if the current crowdsale is full and we can no longer sell any tokens.\n */\n function isCrowdsaleFull() public constant returns (bool);\n\n /**\n * Create new tokens or transfer issued tokens to the investor depending on the cap model.\n */\n function assignTokens(address receiver, uint tokenAmount) internal;\n}\n\n\n\n/**\n * Abstract base contract for token sales with the default buy entry points.\n *\n * Handle\n * - start and end dates\n * - accepting investments\n * - minimum funding goal and refund\n * - various statistics during the crowdfund\n * - different pricing strategies\n * - different investment policies (require server side customer id, allow only whitelisted addresses)\n *\n * Does not Handle\n *\n * - Token allocation (minting vs. transfer)\n * - Cap rules\n *\n */\ncontract Crowdsale is CrowdsaleBase {\n\n /* Do we need to have unique contributor id for each customer */\n bool public requireCustomerId;\n\n /**\n * Do we verify that contributor has been cleared on the server side (accredited investors only).\n * This method was first used in FirstBlood crowdsale to ensure all contributors have accepted terms on sale (on the web).\n */\n bool public requiredSignedAddress;\n\n /* Server side address that signed allowed contributors (Ethereum addresses) that can participate the crowdsale */\n address public signerAddress;\n\n function Crowdsale(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal) CrowdsaleBase(_token, _pricingStrategy, _multisigWallet, _start, _end, _minimumFundingGoal) {\n }\n\n /**\n * Preallocate tokens for the early investors.\n *\n * Preallocated tokens have been sold before the actual crowdsale opens.\n * This function mints the tokens and moves the crowdsale needle.\n *\n * Investor count is not handled; it is assumed this goes for multiple investors\n * and the token distribution happens outside the smart contract flow.\n *\n * No money is exchanged, as the crowdsale team already have received the payment.\n *\n * @param fullTokens tokens as full tokens - decimal places added internally\n * @param weiPrice Price of a single full token in wei\n *\n */\n function preallocate(address receiver, uint fullTokens, uint weiPrice) public onlyOwner {\n\n uint tokenAmount = fullTokens * 10**token.decimals();\n uint weiAmount = weiPrice * fullTokens; // This can be also 0, we give out tokens for free\n\n weiRaised = weiRaised.plus(weiAmount);\n tokensSold = tokensSold.plus(tokenAmount);\n\n investedAmountOf[receiver] = investedAmountOf[receiver].plus(weiAmount);\n tokenAmountOf[receiver] = tokenAmountOf[receiver].plus(tokenAmount);\n\n assignTokens(receiver, tokenAmount);\n\n // Tell us invest was success\n Invested(receiver, weiAmount, tokenAmount, 0);\n }\n\n /**\n * Allow anonymous contributions to this crowdsale.\n */\n function investWithSignedAddress(address addr, uint128 customerId, uint8 v, bytes32 r, bytes32 s) public payable {\n bytes32 hash = sha256(addr);\n if (ecrecover(hash, v, r, s) != signerAddress) throw;\n if(customerId == 0) throw; // UUIDv4 sanity check\n investInternal(addr, customerId);\n }\n\n /**\n * Track who is the customer making the payment so we can send thank you email.\n */\n function investWithCustomerId(address addr, uint128 customerId) public payable {\n if(requiredSignedAddress) throw; // Crowdsale allows only server-side signed participants\n if(customerId == 0) throw; // UUIDv4 sanity check\n investInternal(addr, customerId);\n }\n\n /**\n * Allow anonymous contributions to this crowdsale.\n */\n function invest(address addr) public payable {\n if(requireCustomerId) throw; // Crowdsale needs to track participants for thank you email\n if(requiredSignedAddress) throw; // Crowdsale allows only server-side signed participants\n investInternal(addr, 0);\n }\n\n /**\n * Invest to tokens, recognize the payer and clear his address.\n *\n */\n function buyWithSignedAddress(uint128 customerId, uint8 v, bytes32 r, bytes32 s) public payable {\n investWithSignedAddress(msg.sender, customerId, v, r, s);\n }\n\n /**\n * Invest to tokens, recognize the payer.\n *\n */\n function buyWithCustomerIdWithChecksum(uint128 customerId, bytes1 checksum) public payable {\n // see customerid.py\n if (bytes1(sha3(customerId)) != checksum) throw;\n investWithCustomerId(msg.sender, customerId);\n }\n\n /**\n * Legacy API signature.\n */\n function buyWithCustomerId(uint128 customerId) public payable {\n investWithCustomerId(msg.sender, customerId);\n }\n\n /**\n * The basic entry point to participate the crowdsale process.\n *\n * Pay for funding, get invested tokens back in the sender address.\n */\n function buy() public payable {\n invest(msg.sender);\n }\n\n /**\n * Set policy do we need to have server-side customer ids for the investments.\n *\n */\n function setRequireCustomerId(bool value) onlyOwner {\n requireCustomerId = value;\n InvestmentPolicyChanged(requireCustomerId, requiredSignedAddress, signerAddress);\n }\n\n /**\n * Set policy if all investors must be cleared on the server side first.\n *\n * This is e.g. for the accredited investor clearing.\n *\n */\n function setRequireSignedAddress(bool value, address _signerAddress) onlyOwner {\n requiredSignedAddress = value;\n signerAddress = _signerAddress;\n InvestmentPolicyChanged(requireCustomerId, requiredSignedAddress, signerAddress);\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n assert(c / a == b);\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n\n\n\n/**\n * @title Basic token\n * @dev Basic version of StandardToken, with no allowances.\n */\ncontract BasicToken is ERC20Basic {\n using SafeMath for uint256;\n\n mapping(address => uint256) balances;\n\n uint256 totalSupply_;\n\n /**\n * @dev total number of tokens in existence\n */\n function totalSupply() public view returns (uint256) {\n return totalSupply_;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param _to The address to transfer to.\n * @param _value The amount to be transferred.\n */\n function transfer(address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[msg.sender]);\n\n // SafeMath.sub will throw if there is not enough balance.\n balances[msg.sender] = balances[msg.sender].sub(_value);\n balances[_to] = balances[_to].add(_value);\n Transfer(msg.sender, _to, _value);\n return true;\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param _owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address _owner) public view returns (uint256 balance) {\n return balances[_owner];\n }\n\n}\n\n\n\n\n/**\n * @title Standard ERC20 token\n *\n * @dev Implementation of the basic standard token.\n * @dev https://github.com/ethereum/EIPs/issues/20\n * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol\n */\ncontract StandardToken is ERC20, BasicToken {\n\n mapping (address => mapping (address => uint256)) internal allowed;\n\n\n /**\n * @dev Transfer tokens from one address to another\n * @param _from address The address which you want to send tokens from\n * @param _to address The address which you want to transfer to\n * @param _value uint256 the amount of tokens to be transferred\n */\n function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[_from]);\n require(_value <= allowed[_from][msg.sender]);\n\n balances[_from] = balances[_from].sub(_value);\n balances[_to] = balances[_to].add(_value);\n allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);\n Transfer(_from, _to, _value);\n return true;\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n *\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param _spender The address which will spend the funds.\n * @param _value The amount of tokens to be spent.\n */\n function approve(address _spender, uint256 _value) public returns (bool) {\n allowed[msg.sender][_spender] = _value;\n Approval(msg.sender, _spender, _value);\n return true;\n }\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param _owner address The address which owns the funds.\n * @param _spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address _owner, address _spender) public view returns (uint256) {\n return allowed[_owner][_spender];\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(address _spender, uint _addedValue) public returns (bool) {\n allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {\n uint oldValue = allowed[msg.sender][_spender];\n if (_subtractedValue > oldValue) {\n allowed[msg.sender][_spender] = 0;\n } else {\n allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);\n }\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\ncontract Recoverable is Ownable {\n\n /// @dev Empty constructor (for now)\n function Recoverable() {\n }\n\n /// @dev This will be invoked by the owner, when owner wants to rescue tokens\n /// @param token Token which will we rescue to the owner from the contract\n function recoverTokens(ERC20Basic token) onlyOwner public {\n token.transfer(owner, tokensToBeReturned(token));\n }\n\n /// @dev Interface function, can be overwritten by the superclass\n /// @param token Token which balance we will check and return\n /// @return The amount of tokens (in smallest denominator) the contract owns\n function tokensToBeReturned(ERC20Basic token) public returns (uint) {\n return token.balanceOf(this);\n }\n}\n\n\n\n/**\n * Standard EIP-20 token with an interface marker.\n *\n * @notice Interface marker is used by crowdsale contracts to validate that addresses point a good token contract.\n *\n */\ncontract StandardTokenExt is StandardToken, Recoverable {\n\n /* Interface declaration */\n function isToken() public constant returns (bool weAre) {\n return true;\n }\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Upgrade agent interface inspired by Lunyr.\n *\n * Upgrade agent transfers tokens to a new contract.\n * Upgrade agent itself can be the token contract, or just a middle man contract doing the heavy lifting.\n */\ncontract UpgradeAgent {\n\n uint public originalSupply;\n\n /** Interface marker */\n function isUpgradeAgent() public constant returns (bool) {\n return true;\n }\n\n function upgradeFrom(address _from, uint256 _value) public;\n\n}\n\n\n/**\n * A token upgrade mechanism where users can opt-in amount of tokens to the next smart contract revision.\n *\n * First envisioned by Golem and Lunyr projects.\n */\ncontract UpgradeableToken is StandardTokenExt {\n\n /** Contract / person who can set the upgrade path. This can be the same as team multisig wallet, as what it is with its default value. */\n address public upgradeMaster;\n\n /** The next contract where the tokens will be migrated. */\n UpgradeAgent public upgradeAgent;\n\n /** How many tokens we have upgraded by now. */\n uint256 public totalUpgraded;\n\n /**\n * Upgrade states.\n *\n * - NotAllowed: The child contract has not reached a condition where the upgrade can bgun\n * - WaitingForAgent: Token allows upgrade, but we don't have a new agent yet\n * - ReadyToUpgrade: The agent is set, but not a single token has been upgraded yet\n * - Upgrading: Upgrade agent is set and the balance holders can upgrade their tokens\n *\n */\n enum UpgradeState {Unknown, NotAllowed, WaitingForAgent, ReadyToUpgrade, Upgrading}\n\n /**\n * Somebody has upgraded some of his tokens.\n */\n event Upgrade(address indexed _from, address indexed _to, uint256 _value);\n\n /**\n * New upgrade agent available.\n */\n event UpgradeAgentSet(address agent);\n\n /**\n * Do not allow construction without upgrade master set.\n */\n function UpgradeableToken(address _upgradeMaster) {\n upgradeMaster = _upgradeMaster;\n }\n\n /**\n * Allow the token holder to upgrade some of their tokens to a new contract.\n */\n function upgrade(uint256 value) public {\n\n UpgradeState state = getUpgradeState();\n if(!(state == UpgradeState.ReadyToUpgrade || state == UpgradeState.Upgrading)) {\n // Called in a bad state\n throw;\n }\n\n // Validate input value.\n if (value == 0) throw;\n\n balances[msg.sender] = balances[msg.sender].sub(value);\n\n // Take tokens out from circulation\n totalSupply_ = totalSupply_.sub(value);\n totalUpgraded = totalUpgraded.add(value);\n\n // Upgrade agent reissues the tokens\n upgradeAgent.upgradeFrom(msg.sender, value);\n Upgrade(msg.sender, upgradeAgent, value);\n }\n\n /**\n * Set an upgrade agent that handles\n */\n function setUpgradeAgent(address agent) external {\n\n if(!canUpgrade()) {\n // The token is not yet in a state that we could think upgrading\n throw;\n }\n\n if (agent == 0x0) throw;\n // Only a master can designate the next agent\n if (msg.sender != upgradeMaster) throw;\n // Upgrade has already begun for an agent\n if (getUpgradeState() == UpgradeState.Upgrading) throw;\n\n upgradeAgent = UpgradeAgent(agent);\n\n // Bad interface\n if(!upgradeAgent.isUpgradeAgent()) throw;\n // Make sure that token supplies match in source and target\n if (upgradeAgent.originalSupply() != totalSupply_) throw;\n\n UpgradeAgentSet(upgradeAgent);\n }\n\n /**\n * Get the state of the token upgrade.\n */\n function getUpgradeState() public constant returns(UpgradeState) {\n if(!canUpgrade()) return UpgradeState.NotAllowed;\n else if(address(upgradeAgent) == 0x00) return UpgradeState.WaitingForAgent;\n else if(totalUpgraded == 0) return UpgradeState.ReadyToUpgrade;\n else return UpgradeState.Upgrading;\n }\n\n /**\n * Change the upgrade master.\n *\n * This allows us to set a new owner for the upgrade mechanism.\n */\n function setUpgradeMaster(address master) public {\n if (master == 0x0) throw;\n if (msg.sender != upgradeMaster) throw;\n upgradeMaster = master;\n }\n\n /**\n * Child contract can enable to provide the condition when the upgrade can begun.\n */\n function canUpgrade() public constant returns(bool) {\n return true;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n/**\n * Define interface for releasing the token transfer after a successful crowdsale.\n */\ncontract ReleasableToken is StandardTokenExt {\n\n /* The finalizer contract that allows unlift the transfer limits on this token */\n address public releaseAgent;\n\n /** A crowdsale contract can release us to the wild if ICO success. If false we are are in transfer lock up period.*/\n bool public released = false;\n\n /** Map of agents that are allowed to transfer tokens regardless of the lock down period. These are crowdsale contracts and possible the team multisig itself. */\n mapping (address => bool) public transferAgents;\n\n /**\n * Limit token transfer until the crowdsale is over.\n *\n */\n modifier canTransfer(address _sender) {\n\n if(!released) {\n if(!transferAgents[_sender]) {\n throw;\n }\n }\n\n _;\n }\n\n /**\n * Set the contract that can call release and make the token transferable.\n *\n * Design choice. Allow reset the release agent to fix fat finger mistakes.\n */\n function setReleaseAgent(address addr) onlyOwner inReleaseState(false) public {\n\n // We don't do interface check here as we might want to a normal wallet address to act as a release agent\n releaseAgent = addr;\n }\n\n /**\n * Owner can allow a particular address (a crowdsale contract) to transfer tokens despite the lock up period.\n */\n function setTransferAgent(address addr, bool state) onlyOwner inReleaseState(false) public {\n transferAgents[addr] = state;\n }\n\n /**\n * One way function to release the tokens to the wild.\n *\n * Can be called only from the release agent that is the final ICO contract. It is only called if the crowdsale has been success (first milestone reached).\n */\n function releaseTokenTransfer() public onlyReleaseAgent {\n released = true;\n }\n\n /** The function can be called only before or after the tokens have been releasesd */\n modifier inReleaseState(bool releaseState) {\n if(releaseState != released) {\n throw;\n }\n _;\n }\n\n /** The function can be called only by a whitelisted release agent. */\n modifier onlyReleaseAgent() {\n if(msg.sender != releaseAgent) {\n throw;\n }\n _;\n }\n\n function transfer(address _to, uint _value) canTransfer(msg.sender) returns (bool success) {\n // Call StandardToken.transfer()\n return super.transfer(_to, _value);\n }\n\n function transferFrom(address _from, address _to, uint _value) canTransfer(_from) returns (bool success) {\n // Call StandardToken.transferForm()\n return super.transferFrom(_from, _to, _value);\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n\n/**\n * A token that can increase its supply by another contract.\n *\n * This allows uncapped crowdsale by dynamically increasing the supply when money pours in.\n * Only mint agents, contracts whitelisted by owner, can mint new tokens.\n *\n */\ncontract MintableToken is StandardTokenExt {\n\n using SafeMathLib for uint;\n\n bool public mintingFinished = false;\n\n /** List of agents that are allowed to create new tokens */\n mapping (address => bool) public mintAgents;\n\n event MintingAgentChanged(address addr, bool state);\n event Minted(address receiver, uint amount);\n\n /**\n * Create new tokens and allocate them to an address..\n *\n * Only callably by a crowdsale contract (mint agent).\n */\n function mint(address receiver, uint amount) onlyMintAgent canMint public {\n totalSupply_ = totalSupply_.plus(amount);\n balances[receiver] = balances[receiver].plus(amount);\n\n // This will make the mint transaction apper in EtherScan.io\n // We can remove this after there is a standardized minting event\n Transfer(0, receiver, amount);\n }\n\n /**\n * Owner can allow a crowdsale contract to mint new tokens.\n */\n function setMintAgent(address addr, bool state) onlyOwner canMint public {\n mintAgents[addr] = state;\n MintingAgentChanged(addr, state);\n }\n\n modifier onlyMintAgent() {\n // Only crowdsale contracts are allowed to mint new tokens\n if(!mintAgents[msg.sender]) {\n throw;\n }\n _;\n }\n\n /** Make sure we are not done yet. */\n modifier canMint() {\n if(mintingFinished) throw;\n _;\n }\n}\n\n\n\n/**\n * A crowdsaled token.\n *\n * An ERC-20 token designed specifically for crowdsales with investor protection and further development path.\n *\n * - The token transfer() is disabled until the crowdsale is over\n * - The token contract gives an opt-in upgrade path to a new contract\n * - The same token can be part of several crowdsales through approve() mechanism\n * - The token can be capped (supply set in the constructor) or uncapped (crowdsale contract can mint new tokens)\n *\n */\ncontract CrowdsaleToken is ReleasableToken, MintableToken, UpgradeableToken {\n\n /** Name and symbol were updated. */\n event UpdatedTokenInformation(string newName, string newSymbol);\n\n string public name;\n\n string public symbol;\n\n uint public decimals;\n\n /**\n * Construct the token.\n *\n * This token must be created through a team multisig wallet, so that it is owned by that wallet.\n *\n * @param _name Token name\n * @param _symbol Token symbol - should be all caps\n * @param _initialSupply How many tokens we start with\n * @param _decimals Number of decimal places\n * @param _mintable Are new tokens created over the crowdsale or do we distribute only the initial supply? Note that when the token becomes transferable the minting always ends.\n */\n function CrowdsaleToken(string _name, string _symbol, uint _initialSupply, uint _decimals, bool _mintable)\n UpgradeableToken(msg.sender) {\n\n // Create any address, can be transferred\n // to team multisig via changeOwner(),\n // also remember to call setUpgradeMaster()\n owner = msg.sender;\n\n name = _name;\n symbol = _symbol;\n\n totalSupply_ = _initialSupply;\n\n decimals = _decimals;\n\n // Create initially all balance on the team multisig\n balances[owner] = totalSupply_;\n\n if(totalSupply_ > 0) {\n Minted(owner, totalSupply_);\n }\n\n // No more new supply allowed after the token creation\n if(!_mintable) {\n mintingFinished = true;\n if(totalSupply_ == 0) {\n throw; // Cannot create a token without supply and no minting\n }\n }\n }\n\n /**\n * When token is released to be transferable, enforce no new tokens can be created.\n */\n function releaseTokenTransfer() public onlyReleaseAgent {\n mintingFinished = true;\n super.releaseTokenTransfer();\n }\n\n /**\n * Allow upgrade agent functionality kick in only if the crowdsale was success.\n */\n function canUpgrade() public constant returns(bool) {\n return released && super.canUpgrade();\n }\n\n /**\n * Owner can update token information here.\n *\n * It is often useful to conceal the actual token association, until\n * the token operations, like central issuance or reissuance have been completed.\n *\n * This function allows the token owner to rename the token after the operations\n * have been completed and then point the audience to use the token contract.\n */\n function setTokenInformation(string _name, string _symbol) onlyOwner {\n name = _name;\n symbol = _symbol;\n\n UpdatedTokenInformation(name, symbol);\n }\n\n}\n\n\n\n/**\n * At the end of the successful crowdsale allocate % bonus of tokens to the team.\n *\n * Unlock tokens.\n *\n * BonusAllocationFinal must be set as the minting agent for the MintableToken.\n *\n */\ncontract BonusFinalizeAgent is FinalizeAgent {\n\n using SafeMathLib for uint;\n\n CrowdsaleToken public token;\n Crowdsale public crowdsale;\n\n /** Total percent of tokens minted to the team at the end of the sale as base points (0.0001) */\n uint public bonusBasePoints;\n\n /** Where we move the tokens at the end of the sale. */\n address public teamMultisig;\n\n /* How much bonus tokens we allocated */\n uint public allocatedBonus;\n\n function BonusFinalizeAgent(CrowdsaleToken _token, Crowdsale _crowdsale, uint _bonusBasePoints, address _teamMultisig) {\n token = _token;\n crowdsale = _crowdsale;\n if(address(crowdsale) == 0) {\n throw;\n }\n\n teamMultisig = _teamMultisig;\n if(address(teamMultisig) == 0) {\n throw;\n }\n\n bonusBasePoints = _bonusBasePoints;\n }\n\n /* Can we run finalize properly */\n function isSane() public constant returns (bool) {\n return (token.mintAgents(address(this)) == true) && (token.releaseAgent() == address(this));\n }\n\n /** Called once by crowdsale finalize() if the sale was success. */\n function finalizeCrowdsale() {\n if(msg.sender != address(crowdsale)) {\n throw;\n }\n\n // How many % of tokens the founders and others get\n uint tokensSold = crowdsale.tokensSold();\n allocatedBonus = tokensSold.times(bonusBasePoints) / 10000;\n\n // move tokens to the team multisig wallet\n token.mint(teamMultisig, allocatedBonus);\n\n // Make token transferable\n token.releaseTokenTransfer();\n }\n\n}\n"}, "BurnableCrowdsaleToken": {"abi": [{"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "state", "type": "bool"}], "name": "setTransferAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "mintingFinished", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "name", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "approve", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "recoverTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_from", "type": "address"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setReleaseAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "decimals", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "receiver", "type": "address"}, {"name": "amount", "type": "uint256"}], "name": "mint", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "burnAmount", "type": "uint256"}], "name": "burn", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "mintAgents", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "state", "type": "bool"}], "name": "setMintAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "uint256"}], "name": "upgrade", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_name", "type": "string"}, {"name": "_symbol", "type": "string"}], "name": "setTokenInformation", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "upgradeAgent", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "releaseTokenTransfer", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "upgradeMaster", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_subtractedValue", "type": "uint256"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getUpgradeState", "outputs": [{"name": "", "type": "uint8"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "transferAgents", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "symbol", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "released", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "canUpgrade", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "tokensToBeReturned", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalUpgraded", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "releaseAgent", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_addedValue", "type": "uint256"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "agent", "type": "address"}], "name": "setUpgradeAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}, {"name": "_spender", "type": "address"}], "name": "allowance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isToken", "outputs": [{"name": "weAre", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "BURN_ADDRESS", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "master", "type": "address"}], "name": "setUpgradeMaster", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [{"name": "_name", "type": "string"}, {"name": "_symbol", "type": "string"}, {"name": "_initialSupply", "type": "uint256"}, {"name": "_decimals", "type": "uint256"}, {"name": "_mintable", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newName", "type": "string"}, {"indexed": false, "name": "newSymbol", "type": "string"}], "name": "UpdatedTokenInformation", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "_from", "type": "address"}, {"indexed": true, "name": "_to", "type": "address"}, {"indexed": false, "name": "_value", "type": "uint256"}], "name": "Upgrade", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "agent", "type": "address"}], "name": "UpgradeAgentSet", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "addr", "type": "address"}, {"indexed": false, "name": "state", "type": "bool"}], "name": "MintingAgentChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "receiver", "type": "address"}, {"indexed": false, "name": "amount", "type": "uint256"}], "name": "Minted", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "burner", "type": "address"}, {"indexed": false, "name": "burnedAmount", "type": "uint256"}], "name": "Burned", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}, {"indexed": true, "name": "spender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "bytecode": "0x60806040526004805460a060020a60ff02191690556006805460ff191690553480156200002b57600080fd5b5060405162001d8e38038062001d8e83398101604090815281516020808401519284015160608501516080860151600380546008805433600160a060020a03199182168117909255918216811790911617905593860180519096959095019491939092909186918691869186918691620000ab91600b9188019062000172565b508351620000c190600c90602087019062000172565b506001839055600d829055600354600160a060020a031660009081526020819052604081208490558311156200013d5760035460015460408051600160a060020a039093168352602083019190915280517f30385c845b448a36257a6a1716e6ad2e1bc2cbe333cde1e69fe849ad6511adfe9281900390910190a15b80151562000162576006805460ff191660019081179091555415156200016257600080fd5b5050505050505050505062000217565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620001b557805160ff1916838001178555620001e5565b82800160010185558215620001e5579182015b82811115620001e5578251825591602001919060010190620001c8565b50620001f3929150620001f7565b5090565b6200021491905b80821115620001f35760008155600101620001fe565b90565b611b6780620002276000396000f3006080604052600436106101cc5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166302f652a381146101d157806305d2035b146101f957806306fdde0314610222578063095ea7b3146102ac57806316114acd146102d057806318160ddd146102f157806323b872dd1461031857806329ff4f5314610342578063313ce5671461036357806340c10f191461037857806342966c681461039c57806342c1867b146103b457806343214675146103d557806345977d03146103fb5780634eee966f146104135780635de4ccb0146104aa5780635f412d4f146104db578063600440cb146104f0578063661884631461050557806370a08231146105295780638444b3911461054a578063867c2857146105835780638da5cb5b146105a457806395d89b41146105b957806396132521146105ce5780639738968c146105e3578063a9059cbb146105f8578063c45d19db1461061c578063c752ff621461063d578063d1f276d314610652578063d73dd62314610667578063d7e7088a1461068b578063dd62ed3e146106ac578063eefa597b146106d3578063f2fde38b146106e8578063fccc281314610709578063ffeb7d751461071e575b600080fd5b3480156101dd57600080fd5b506101f7600160a060020a0360043516602435151561073f565b005b34801561020557600080fd5b5061020e6107ad565b604080519115158252519081900360200190f35b34801561022e57600080fd5b506102376107b6565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610271578181015183820152602001610259565b50505050905090810190601f16801561029e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156102b857600080fd5b5061020e600160a060020a0360043516602435610844565b3480156102dc57600080fd5b506101f7600160a060020a03600435166108aa565b3480156102fd57600080fd5b5061030661097a565b60408051918252519081900360200190f35b34801561032457600080fd5b5061020e600160a060020a0360043581169060243516604435610981565b34801561034e57600080fd5b506101f7600160a060020a03600435166109e5565b34801561036f57600080fd5b50610306610a57565b34801561038457600080fd5b506101f7600160a060020a0360043516602435610a5d565b3480156103a857600080fd5b506101f7600435610c3c565b3480156103c057600080fd5b5061020e600160a060020a0360043516610d14565b3480156103e157600080fd5b506101f7600160a060020a03600435166024351515610d29565b34801561040757600080fd5b506101f7600435610db4565b34801561041f57600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526101f794369492936024939284019190819084018382808284375050604080516020601f89358b018035918201839004830284018301909452808352979a999881019791965091820194509250829150840183828082843750949750610f259650505050505050565b3480156104b657600080fd5b506104bf611092565b60408051600160a060020a039092168252519081900360200190f35b3480156104e757600080fd5b506101f76110a1565b3480156104fc57600080fd5b506104bf6110cf565b34801561051157600080fd5b5061020e600160a060020a03600435166024356110de565b34801561053557600080fd5b50610306600160a060020a03600435166111ce565b34801561055657600080fd5b5061055f6111e9565b6040518082600481111561056f57fe5b60ff16815260200191505060405180910390f35b34801561058f57600080fd5b5061020e600160a060020a0360043516611234565b3480156105b057600080fd5b506104bf611249565b3480156105c557600080fd5b50610237611258565b3480156105da57600080fd5b5061020e6112b3565b3480156105ef57600080fd5b5061020e6112d4565b34801561060457600080fd5b5061020e600160a060020a0360043516602435611309565b34801561062857600080fd5b50610306600160a060020a036004351661136b565b34801561064957600080fd5b50610306611401565b34801561065e57600080fd5b506104bf611407565b34801561067357600080fd5b5061020e600160a060020a0360043516602435611416565b34801561069757600080fd5b506101f7600160a060020a03600435166114af565b3480156106b857600080fd5b50610306600160a060020a03600435811690602435166116b0565b3480156106df57600080fd5b5061020e6116db565b3480156106f457600080fd5b506101f7600160a060020a03600435166116e0565b34801561071557600080fd5b506104bf611775565b34801561072a57600080fd5b506101f7600160a060020a036004351661177a565b600354600160a060020a0316331461075657600080fd5b60045460009074010000000000000000000000000000000000000000900460ff161561078157600080fd5b50600160a060020a03919091166000908152600560205260409020805460ff1916911515919091179055565b60065460ff1681565b600b805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561083c5780601f106108115761010080835404028352916020019161083c565b820191906000526020600020905b81548152906001019060200180831161081f57829003601f168201915b505050505081565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b600354600160a060020a031633146108c157600080fd5b600354600160a060020a038083169163a9059cbb91166108e08461136b565b6040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b15801561094b57600080fd5b505af115801561095f573d6000803e3d6000fd5b505050506040513d602081101561097557600080fd5b505050565b6001545b90565b600454600090849074010000000000000000000000000000000000000000900460ff1615156109d157600160a060020a03811660009081526005602052604090205460ff1615156109d157600080fd5b6109dc8585856117d5565b95945050505050565b600354600160a060020a031633146109fc57600080fd5b60045460009074010000000000000000000000000000000000000000900460ff1615610a2757600080fd5b506004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600d5481565b3360009081526007602052604090205460ff161515610a7b57600080fd5b60065460ff1615610a8b57600080fd5b60015473__contracts/SafeMathLib.sol:SafeMathLi__6366098d4f9091836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b158015610b0257600080fd5b505af4158015610b16573d6000803e3d6000fd5b505050506040513d6020811015610b2c57600080fd5b5051600155600160a060020a038216600090815260208181526040918290205482517f66098d4f000000000000000000000000000000000000000000000000000000008152600481019190915260248101849052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b158015610bba57600080fd5b505af4158015610bce573d6000803e3d6000fd5b505050506040513d6020811015610be457600080fd5b5051600160a060020a0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b33600081815260208190526040902054610c5c908363ffffffff61194c16565b600160a060020a038216600090815260208190526040902055600154610c88908363ffffffff61194c16565b60015560408051600160a060020a03831681526020810184905281517f696de425f79f4a40bc6d2122ca50507f0efbeabbff86a84871b7196ab8ea8df7929181900390910190a1604080518381529051600091600160a060020a038416917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b60076020526000908152604090205460ff1681565b600354600160a060020a03163314610d4057600080fd5b60065460ff1615610d5057600080fd5b600160a060020a038216600081815260076020908152604091829020805460ff191685151590811790915582519384529083015280517f4b0adf6c802794c7dde28a08a4e07131abcff3bf9603cd71f14f90bec7865efa9281900390910190a15050565b6000610dbe6111e9565b90506003816004811115610dce57fe5b1480610de557506004816004811115610de357fe5b145b1515610df057600080fd5b811515610dfc57600080fd5b33600090815260208190526040902054610e1c908363ffffffff61194c16565b33600090815260208190526040902055600154610e3f908363ffffffff61194c16565b600155600a54610e55908363ffffffff61195e16565b600a55600954604080517f753e88e5000000000000000000000000000000000000000000000000000000008152336004820152602481018590529051600160a060020a039092169163753e88e59160448082019260009290919082900301818387803b158015610ec457600080fd5b505af1158015610ed8573d6000803e3d6000fd5b5050600954604080518681529051600160a060020a0390921693503392507f7e5c344a8141a805725cb476f76c6953b842222b967edd1f78ddb6e8b3f397ac919081900360200190a35050565b600354600160a060020a03163314610f3c57600080fd5b8151610f4f90600b906020850190611aa3565b508051610f6390600c906020840190611aa3565b5060408051818152600b8054600260001961010060018416150201909116049282018390527fd131ab1e6f279deea74e13a18477e13e2107deb6dc8ae955648948be5841fb46929091600c918190602082019060608301908690801561100a5780601f10610fdf5761010080835404028352916020019161100a565b820191906000526020600020905b815481529060010190602001808311610fed57829003601f168201915b505083810382528454600260001961010060018416150201909116048082526020909101908590801561107e5780601f106110535761010080835404028352916020019161107e565b820191906000526020600020905b81548152906001019060200180831161106157829003601f168201915b505094505050505060405180910390a15050565b600954600160a060020a031681565b600454600160a060020a031633146110b857600080fd5b6006805460ff191660011790556110cd611974565b565b600854600160a060020a031681565b336000908152600260209081526040808320600160a060020a03861684529091528120548083111561113357336000908152600260209081526040808320600160a060020a0388168452909152812055611168565b611143818463ffffffff61194c16565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a031660009081526020819052604090205490565b60006111f36112d4565b15156112015750600161097e565b600954600160a060020a0316151561121b5750600261097e565b600a54151561122c5750600361097e565b50600461097e565b60056020526000908152604090205460ff1681565b600354600160a060020a031681565b600c805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561083c5780601f106108115761010080835404028352916020019161083c565b60045474010000000000000000000000000000000000000000900460ff1681565b60045460009074010000000000000000000000000000000000000000900460ff16801561130457506113046116db565b905090565b600454600090339074010000000000000000000000000000000000000000900460ff16151561135957600160a060020a03811660009081526005602052604090205460ff16151561135957600080fd5b61136384846119c2565b949350505050565b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600091600160a060020a038416916370a082319160248082019260209290919082900301818787803b1580156113cf57600080fd5b505af11580156113e3573d6000803e3d6000fd5b505050506040513d60208110156113f957600080fd5b505192915050565b600a5481565b600454600160a060020a031681565b336000908152600260209081526040808320600160a060020a038616845290915281205461144a908363ffffffff61195e16565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b6114b76112d4565b15156114c257600080fd5b600160a060020a03811615156114d757600080fd5b600854600160a060020a031633146114ee57600080fd5b60046114f86111e9565b600481111561150357fe5b141561150e57600080fd5b6009805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038381169190911791829055604080517f61d3d7a6000000000000000000000000000000000000000000000000000000008152905192909116916361d3d7a6916004808201926020929091908290030181600087803b15801561159257600080fd5b505af11580156115a6573d6000803e3d6000fd5b505050506040513d60208110156115bc57600080fd5b505115156115c957600080fd5b600154600960009054906101000a9004600160a060020a0316600160a060020a0316634b2ba0dd6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561163857600080fd5b505af115801561164c573d6000803e3d6000fd5b505050506040513d602081101561166257600080fd5b50511461166e57600080fd5b60095460408051600160a060020a039092168252517f7845d5aa74cc410e35571258d954f23b82276e160fe8c188fa80566580f279cc9181900360200190a150565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600190565b600354600160a060020a031633146116f757600080fd5b600160a060020a038116151561170c57600080fd5b600354604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600081565b600160a060020a038116151561178f57600080fd5b600854600160a060020a031633146117a657600080fd5b6008805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6000600160a060020a03831615156117ec57600080fd5b600160a060020a03841660009081526020819052604090205482111561181157600080fd5b600160a060020a038416600090815260026020908152604080832033845290915290205482111561184157600080fd5b600160a060020a03841660009081526020819052604090205461186a908363ffffffff61194c16565b600160a060020a03808616600090815260208190526040808220939093559085168152205461189f908363ffffffff61195e16565b600160a060020a038085166000908152602081815260408083209490945591871681526002825282812033825290915220546118e1908363ffffffff61194c16565b600160a060020a03808616600081815260026020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b60008282111561195857fe5b50900390565b60008282018381101561196d57fe5b9392505050565b600454600160a060020a0316331461198b57600080fd5b6004805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b6000600160a060020a03831615156119d957600080fd5b336000908152602081905260409020548211156119f557600080fd5b33600090815260208190526040902054611a15908363ffffffff61194c16565b3360009081526020819052604080822092909255600160a060020a03851681522054611a47908363ffffffff61195e16565b600160a060020a038416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10611ae457805160ff1916838001178555611b11565b82800160010185558215611b11579182015b82811115611b11578251825591602001919060010190611af6565b50611b1d929150611b21565b5090565b61097e91905b80821115611b1d5760008155600101611b275600a165627a7a72305820ea139161e6388df5aba2e906031cd2d29897c110d345cca522f6ea1086be1bfb0029", "bytecode_runtime": "0x6080604052600436106101cc5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166302f652a381146101d157806305d2035b146101f957806306fdde0314610222578063095ea7b3146102ac57806316114acd146102d057806318160ddd146102f157806323b872dd1461031857806329ff4f5314610342578063313ce5671461036357806340c10f191461037857806342966c681461039c57806342c1867b146103b457806343214675146103d557806345977d03146103fb5780634eee966f146104135780635de4ccb0146104aa5780635f412d4f146104db578063600440cb146104f0578063661884631461050557806370a08231146105295780638444b3911461054a578063867c2857146105835780638da5cb5b146105a457806395d89b41146105b957806396132521146105ce5780639738968c146105e3578063a9059cbb146105f8578063c45d19db1461061c578063c752ff621461063d578063d1f276d314610652578063d73dd62314610667578063d7e7088a1461068b578063dd62ed3e146106ac578063eefa597b146106d3578063f2fde38b146106e8578063fccc281314610709578063ffeb7d751461071e575b600080fd5b3480156101dd57600080fd5b506101f7600160a060020a0360043516602435151561073f565b005b34801561020557600080fd5b5061020e6107ad565b604080519115158252519081900360200190f35b34801561022e57600080fd5b506102376107b6565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610271578181015183820152602001610259565b50505050905090810190601f16801561029e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156102b857600080fd5b5061020e600160a060020a0360043516602435610844565b3480156102dc57600080fd5b506101f7600160a060020a03600435166108aa565b3480156102fd57600080fd5b5061030661097a565b60408051918252519081900360200190f35b34801561032457600080fd5b5061020e600160a060020a0360043581169060243516604435610981565b34801561034e57600080fd5b506101f7600160a060020a03600435166109e5565b34801561036f57600080fd5b50610306610a57565b34801561038457600080fd5b506101f7600160a060020a0360043516602435610a5d565b3480156103a857600080fd5b506101f7600435610c3c565b3480156103c057600080fd5b5061020e600160a060020a0360043516610d14565b3480156103e157600080fd5b506101f7600160a060020a03600435166024351515610d29565b34801561040757600080fd5b506101f7600435610db4565b34801561041f57600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526101f794369492936024939284019190819084018382808284375050604080516020601f89358b018035918201839004830284018301909452808352979a999881019791965091820194509250829150840183828082843750949750610f259650505050505050565b3480156104b657600080fd5b506104bf611092565b60408051600160a060020a039092168252519081900360200190f35b3480156104e757600080fd5b506101f76110a1565b3480156104fc57600080fd5b506104bf6110cf565b34801561051157600080fd5b5061020e600160a060020a03600435166024356110de565b34801561053557600080fd5b50610306600160a060020a03600435166111ce565b34801561055657600080fd5b5061055f6111e9565b6040518082600481111561056f57fe5b60ff16815260200191505060405180910390f35b34801561058f57600080fd5b5061020e600160a060020a0360043516611234565b3480156105b057600080fd5b506104bf611249565b3480156105c557600080fd5b50610237611258565b3480156105da57600080fd5b5061020e6112b3565b3480156105ef57600080fd5b5061020e6112d4565b34801561060457600080fd5b5061020e600160a060020a0360043516602435611309565b34801561062857600080fd5b50610306600160a060020a036004351661136b565b34801561064957600080fd5b50610306611401565b34801561065e57600080fd5b506104bf611407565b34801561067357600080fd5b5061020e600160a060020a0360043516602435611416565b34801561069757600080fd5b506101f7600160a060020a03600435166114af565b3480156106b857600080fd5b50610306600160a060020a03600435811690602435166116b0565b3480156106df57600080fd5b5061020e6116db565b3480156106f457600080fd5b506101f7600160a060020a03600435166116e0565b34801561071557600080fd5b506104bf611775565b34801561072a57600080fd5b506101f7600160a060020a036004351661177a565b600354600160a060020a0316331461075657600080fd5b60045460009074010000000000000000000000000000000000000000900460ff161561078157600080fd5b50600160a060020a03919091166000908152600560205260409020805460ff1916911515919091179055565b60065460ff1681565b600b805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561083c5780601f106108115761010080835404028352916020019161083c565b820191906000526020600020905b81548152906001019060200180831161081f57829003601f168201915b505050505081565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b600354600160a060020a031633146108c157600080fd5b600354600160a060020a038083169163a9059cbb91166108e08461136b565b6040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b15801561094b57600080fd5b505af115801561095f573d6000803e3d6000fd5b505050506040513d602081101561097557600080fd5b505050565b6001545b90565b600454600090849074010000000000000000000000000000000000000000900460ff1615156109d157600160a060020a03811660009081526005602052604090205460ff1615156109d157600080fd5b6109dc8585856117d5565b95945050505050565b600354600160a060020a031633146109fc57600080fd5b60045460009074010000000000000000000000000000000000000000900460ff1615610a2757600080fd5b506004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600d5481565b3360009081526007602052604090205460ff161515610a7b57600080fd5b60065460ff1615610a8b57600080fd5b60015473__contracts/SafeMathLib.sol:SafeMathLi__6366098d4f9091836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b158015610b0257600080fd5b505af4158015610b16573d6000803e3d6000fd5b505050506040513d6020811015610b2c57600080fd5b5051600155600160a060020a038216600090815260208181526040918290205482517f66098d4f000000000000000000000000000000000000000000000000000000008152600481019190915260248101849052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b158015610bba57600080fd5b505af4158015610bce573d6000803e3d6000fd5b505050506040513d6020811015610be457600080fd5b5051600160a060020a0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b33600081815260208190526040902054610c5c908363ffffffff61194c16565b600160a060020a038216600090815260208190526040902055600154610c88908363ffffffff61194c16565b60015560408051600160a060020a03831681526020810184905281517f696de425f79f4a40bc6d2122ca50507f0efbeabbff86a84871b7196ab8ea8df7929181900390910190a1604080518381529051600091600160a060020a038416917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b60076020526000908152604090205460ff1681565b600354600160a060020a03163314610d4057600080fd5b60065460ff1615610d5057600080fd5b600160a060020a038216600081815260076020908152604091829020805460ff191685151590811790915582519384529083015280517f4b0adf6c802794c7dde28a08a4e07131abcff3bf9603cd71f14f90bec7865efa9281900390910190a15050565b6000610dbe6111e9565b90506003816004811115610dce57fe5b1480610de557506004816004811115610de357fe5b145b1515610df057600080fd5b811515610dfc57600080fd5b33600090815260208190526040902054610e1c908363ffffffff61194c16565b33600090815260208190526040902055600154610e3f908363ffffffff61194c16565b600155600a54610e55908363ffffffff61195e16565b600a55600954604080517f753e88e5000000000000000000000000000000000000000000000000000000008152336004820152602481018590529051600160a060020a039092169163753e88e59160448082019260009290919082900301818387803b158015610ec457600080fd5b505af1158015610ed8573d6000803e3d6000fd5b5050600954604080518681529051600160a060020a0390921693503392507f7e5c344a8141a805725cb476f76c6953b842222b967edd1f78ddb6e8b3f397ac919081900360200190a35050565b600354600160a060020a03163314610f3c57600080fd5b8151610f4f90600b906020850190611aa3565b508051610f6390600c906020840190611aa3565b5060408051818152600b8054600260001961010060018416150201909116049282018390527fd131ab1e6f279deea74e13a18477e13e2107deb6dc8ae955648948be5841fb46929091600c918190602082019060608301908690801561100a5780601f10610fdf5761010080835404028352916020019161100a565b820191906000526020600020905b815481529060010190602001808311610fed57829003601f168201915b505083810382528454600260001961010060018416150201909116048082526020909101908590801561107e5780601f106110535761010080835404028352916020019161107e565b820191906000526020600020905b81548152906001019060200180831161106157829003601f168201915b505094505050505060405180910390a15050565b600954600160a060020a031681565b600454600160a060020a031633146110b857600080fd5b6006805460ff191660011790556110cd611974565b565b600854600160a060020a031681565b336000908152600260209081526040808320600160a060020a03861684529091528120548083111561113357336000908152600260209081526040808320600160a060020a0388168452909152812055611168565b611143818463ffffffff61194c16565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a031660009081526020819052604090205490565b60006111f36112d4565b15156112015750600161097e565b600954600160a060020a0316151561121b5750600261097e565b600a54151561122c5750600361097e565b50600461097e565b60056020526000908152604090205460ff1681565b600354600160a060020a031681565b600c805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561083c5780601f106108115761010080835404028352916020019161083c565b60045474010000000000000000000000000000000000000000900460ff1681565b60045460009074010000000000000000000000000000000000000000900460ff16801561130457506113046116db565b905090565b600454600090339074010000000000000000000000000000000000000000900460ff16151561135957600160a060020a03811660009081526005602052604090205460ff16151561135957600080fd5b61136384846119c2565b949350505050565b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600091600160a060020a038416916370a082319160248082019260209290919082900301818787803b1580156113cf57600080fd5b505af11580156113e3573d6000803e3d6000fd5b505050506040513d60208110156113f957600080fd5b505192915050565b600a5481565b600454600160a060020a031681565b336000908152600260209081526040808320600160a060020a038616845290915281205461144a908363ffffffff61195e16565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b6114b76112d4565b15156114c257600080fd5b600160a060020a03811615156114d757600080fd5b600854600160a060020a031633146114ee57600080fd5b60046114f86111e9565b600481111561150357fe5b141561150e57600080fd5b6009805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038381169190911791829055604080517f61d3d7a6000000000000000000000000000000000000000000000000000000008152905192909116916361d3d7a6916004808201926020929091908290030181600087803b15801561159257600080fd5b505af11580156115a6573d6000803e3d6000fd5b505050506040513d60208110156115bc57600080fd5b505115156115c957600080fd5b600154600960009054906101000a9004600160a060020a0316600160a060020a0316634b2ba0dd6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561163857600080fd5b505af115801561164c573d6000803e3d6000fd5b505050506040513d602081101561166257600080fd5b50511461166e57600080fd5b60095460408051600160a060020a039092168252517f7845d5aa74cc410e35571258d954f23b82276e160fe8c188fa80566580f279cc9181900360200190a150565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600190565b600354600160a060020a031633146116f757600080fd5b600160a060020a038116151561170c57600080fd5b600354604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600081565b600160a060020a038116151561178f57600080fd5b600854600160a060020a031633146117a657600080fd5b6008805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6000600160a060020a03831615156117ec57600080fd5b600160a060020a03841660009081526020819052604090205482111561181157600080fd5b600160a060020a038416600090815260026020908152604080832033845290915290205482111561184157600080fd5b600160a060020a03841660009081526020819052604090205461186a908363ffffffff61194c16565b600160a060020a03808616600090815260208190526040808220939093559085168152205461189f908363ffffffff61195e16565b600160a060020a038085166000908152602081815260408083209490945591871681526002825282812033825290915220546118e1908363ffffffff61194c16565b600160a060020a03808616600081815260026020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b60008282111561195857fe5b50900390565b60008282018381101561196d57fe5b9392505050565b600454600160a060020a0316331461198b57600080fd5b6004805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b6000600160a060020a03831615156119d957600080fd5b336000908152602081905260409020548211156119f557600080fd5b33600090815260208190526040902054611a15908363ffffffff61194c16565b3360009081526020819052604080822092909255600160a060020a03851681522054611a47908363ffffffff61195e16565b600160a060020a038416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10611ae457805160ff1916838001178555611b11565b82800160010185558215611b11579182015b82811115611b11578251825591602001919060010190611af6565b50611b1d929150611b21565b5090565b61097e91905b80821115611b1d5760008155600101611b275600a165627a7a72305820ea139161e6388df5aba2e906031cd2d29897c110d345cca522f6ea1086be1bfb0029", "direct_dependencies": ["SafeMathLib"], "full_dependencies": ["SafeMathLib"], "linkrefs": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 6510}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 6998}], "linkrefs_runtime": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 5408}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 5896}], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "state", "type": "bool"}], "name": "setTransferAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "mintingFinished", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "name", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "approve", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "recoverTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_from", "type": "address"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setReleaseAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "decimals", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "receiver", "type": "address"}, {"name": "amount", "type": "uint256"}], "name": "mint", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "burnAmount", "type": "uint256"}], "name": "burn", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "mintAgents", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "state", "type": "bool"}], "name": "setMintAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "uint256"}], "name": "upgrade", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_name", "type": "string"}, {"name": "_symbol", "type": "string"}], "name": "setTokenInformation", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "upgradeAgent", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "releaseTokenTransfer", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "upgradeMaster", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_subtractedValue", "type": "uint256"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getUpgradeState", "outputs": [{"name": "", "type": "uint8"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "transferAgents", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "symbol", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "released", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "canUpgrade", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "tokensToBeReturned", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalUpgraded", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "releaseAgent", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_addedValue", "type": "uint256"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "agent", "type": "address"}], "name": "setUpgradeAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}, {"name": "_spender", "type": "address"}], "name": "allowance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isToken", "outputs": [{"name": "weAre", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "BURN_ADDRESS", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "master", "type": "address"}], "name": "setUpgradeMaster", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [{"name": "_name", "type": "string"}, {"name": "_symbol", "type": "string"}, {"name": "_initialSupply", "type": "uint256"}, {"name": "_decimals", "type": "uint256"}, {"name": "_mintable", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newName", "type": "string"}, {"indexed": false, "name": "newSymbol", "type": "string"}], "name": "UpdatedTokenInformation", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "_from", "type": "address"}, {"indexed": true, "name": "_to", "type": "address"}, {"indexed": false, "name": "_value", "type": "uint256"}], "name": "Upgrade", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "agent", "type": "address"}], "name": "UpgradeAgentSet", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "addr", "type": "address"}, {"indexed": false, "name": "state", "type": "bool"}], "name": "MintingAgentChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "receiver", "type": "address"}, {"indexed": false, "name": "amount", "type": "uint256"}], "name": "Minted", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "burner", "type": "address"}, {"indexed": false, "name": "burnedAmount", "type": "uint256"}], "name": "Burned", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}, {"indexed": true, "name": "spender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "devdoc": {"methods": {"allowance(address,address)": {"details": "Function to check the amount of tokens that an owner allowed to a spender.", "params": {"_owner": "address The address which owns the funds.", "_spender": "address The address which will spend the funds."}, "return": "A uint256 specifying the amount of tokens still available for the spender."}, "approve(address,uint256)": {"details": "Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729", "params": {"_spender": "The address which will spend the funds.", "_value": "The amount of tokens to be spent."}}, "balanceOf(address)": {"details": "Gets the balance of the specified address.", "params": {"_owner": "The address to query the the balance of."}, "return": "An uint256 representing the amount owned by the passed address."}, "decreaseApproval(address,uint256)": {"details": "Decrease the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[_spender] == 0. To decrement allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"_spender": "The address which will spend the funds.", "_subtractedValue": "The amount of tokens to decrease the allowance by."}}, "increaseApproval(address,uint256)": {"details": "Increase the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[_spender] == 0. To increment allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"_addedValue": "The amount of tokens to increase the allowance by.", "_spender": "The address which will spend the funds."}}, "recoverTokens(address)": {"details": "This will be invoked by the owner, when owner wants to rescue tokens", "params": {"token": "Token which will we rescue to the owner from the contract"}}, "tokensToBeReturned(address)": {"details": "Interface function, can be overwritten by the superclass", "params": {"token": "Token which balance we will check and return"}, "return": "The amount of tokens (in smallest denominator) the contract owns"}, "totalSupply()": {"details": "total number of tokens in existence"}, "transferOwnership(address)": {"details": "Allows the current owner to transfer control of the contract to a newOwner.", "params": {"newOwner": "The address to transfer ownership to."}}}}, "userdoc": {"methods": {"burn(uint256)": {"notice": "Burn extra tokens from a balance. "}, "canUpgrade()": {"notice": "Allow upgrade agent functionality kick in only if the crowdsale was success."}, "getUpgradeState()": {"notice": "Get the state of the token upgrade."}, "mint(address,uint256)": {"notice": "Create new tokens and allocate them to an address.. * Only callably by a crowdsale contract (mint agent)."}, "releaseTokenTransfer()": {"notice": "When token is released to be transferable, enforce no new tokens can be created."}, "setMintAgent(address,bool)": {"notice": "Owner can allow a crowdsale contract to mint new tokens."}, "setReleaseAgent(address)": {"notice": "Set the contract that can call release and make the token transferable. * Design choice. Allow reset the release agent to fix fat finger mistakes."}, "setTokenInformation(string,string)": {"notice": "Owner can update token information here. * It is often useful to conceal the actual token association, until the token operations, like central issuance or reissuance have been completed. * This function allows the token owner to rename the token after the operations have been completed and then point the audience to use the token contract."}, "setTransferAgent(address,bool)": {"notice": "Owner can allow a particular address (a crowdsale contract) to transfer tokens despite the lock up period."}, "setUpgradeAgent(address)": {"notice": "Set an upgrade agent that handles"}, "setUpgradeMaster(address)": {"notice": "Change the upgrade master. * This allows us to set a new owner for the upgrade mechanism."}, "upgrade(uint256)": {"notice": "Allow the token holder to upgrade some of their tokens to a new contract."}}}}, "settings": {"compilationTarget": {"contracts/BurnableCrowdsaleToken.sol": "BurnableCrowdsaleToken"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/BurnableCrowdsaleToken.sol": {"keccak256": "0x675958952b65781d10a687151f84f5164b4c92bb5893070c6a2ffc9e32875a00", "urls": ["bzzr://444b37bcc9479485ba287995cf667781a659c883a3a7102611f7557c21a2ffbc"]}, "contracts/BurnableToken.sol": {"keccak256": "0xb97707de2018141fb22482d7ad4faa35cd471ae2ed992343bbcc1be0d3b95218", "urls": ["bzzr://a8b275d0ee25a96664f613d48339250b11d5140d7b74122d74482c3a94cc5295"]}, "contracts/CrowdsaleToken.sol": {"keccak256": "0xa812687ac327cd19fac64667980e70d4fb72ef7f61dce477818d085cf0a915df", "urls": ["bzzr://826d9dda00ce341794e5bb05c78b1abb2728e3c631f7a542345dcfa9f3bd9c50"]}, "contracts/MintableToken.sol": {"keccak256": "0x650e1d6b2bedcd36508918357c7cf4f36fdd093cd0c4d6342f4dcd3bdcdd7578", "urls": ["bzzr://7ba2ac0480d428066a18727e2adb76ba56856ecd37b4420e801131ec8f8f4be3"]}, "contracts/Recoverable.sol": {"keccak256": "0x311a332cdd87df6e00057f5455f4e68b043b5dbe211f6d68bc64e20817515635", "urls": ["bzzr://4fd99bcfb93baed6e7c8d22ee9ecc5c8346a1aa98288e77b01333b2c5d3f582d"]}, "contracts/ReleasableToken.sol": {"keccak256": "0x2c50180d0c1eab1aa63a04da3ae87ee2c482665d2a1a42c5f05b11234a7edaf4", "urls": ["bzzr://10752c317eba5c42e2848722689cfee4fffb7bcb42f3346e1a20715d843798e8"]}, "contracts/SafeMathLib.sol": {"keccak256": "0x501bfe31e274b9a5591f7c540bdced4d4312e27d4f19599147c9bbca3d9c6b18", "urls": ["bzzr://a80935ebddb06c247d71372d4e5833ee029f08633bd0fe4a274a57009567e5b9"]}, "contracts/StandardTokenExt.sol": {"keccak256": "0x9ea2d4cec4dccd5639c05e6c23dd027d80b5e5a20abd99b280ab7b2631b5a5fc", "urls": ["bzzr://a52d8fc5a21bd83997aff19128e00dceb251df712207b61223894c8b7f42d5ff"]}, "contracts/UpgradeAgent.sol": {"keccak256": "0x88e793f72feca4a18d2cd06e6037c1413d7b963eabcf5626d60bfb9d04d6e8e6", "urls": ["bzzr://87e39a65cf25d539ab49ad7e759b3298b8a19272964e69e3f2432f0323f30025"]}, "contracts/UpgradeableToken.sol": {"keccak256": "0xa74fc300c514564ece81c86905502c2de674b69c0633b133af19c1ba027da2c9", "urls": ["bzzr://55bc0b908c94781462b8959f051c6dbb53c35641b0f8cb38d74632ad6bf95e52"]}, "zeppelin/contracts/math/SafeMath.sol": {"keccak256": "0x341ba8cb467a3623e819ba1a683ac1d264005186f308505214e5f6bc89446a08", "urls": ["bzzr://59b5652ee4e4a1b5a8f1a8906e14c84af43d636cf5ca0725cc1813aabe4c8c17"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}, "zeppelin/contracts/token/ERC20/BasicToken.sol": {"keccak256": "0x948404468d61ff35ea4194650670408dabd65da7f905a1c16888ab84520bf39e", "urls": ["bzzr://ea75e20f95d7e4e10394fe6bfaa8eee56b4757c2a6f1e8df4180d33afa621935"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}, "zeppelin/contracts/token/ERC20/StandardToken.sol": {"keccak256": "0xd2b344a5259e19ec143074cfa65637a10c40b68395c59808c4af13bccbb2de55", "urls": ["bzzr://d61a01175a7ca1ba9f4403de603c20b897e33ec425aef2d9f8a7f9ddfdfaf5b2"]}}, "version": 1}, "name": "BurnableCrowdsaleToken", "ordered_full_dependencies": ["SafeMathLib"], "source_path": "contracts/BurnableCrowdsaleToken.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n assert(c / a == b);\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n\n\n\n/**\n * @title Basic token\n * @dev Basic version of StandardToken, with no allowances.\n */\ncontract BasicToken is ERC20Basic {\n using SafeMath for uint256;\n\n mapping(address => uint256) balances;\n\n uint256 totalSupply_;\n\n /**\n * @dev total number of tokens in existence\n */\n function totalSupply() public view returns (uint256) {\n return totalSupply_;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param _to The address to transfer to.\n * @param _value The amount to be transferred.\n */\n function transfer(address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[msg.sender]);\n\n // SafeMath.sub will throw if there is not enough balance.\n balances[msg.sender] = balances[msg.sender].sub(_value);\n balances[_to] = balances[_to].add(_value);\n Transfer(msg.sender, _to, _value);\n return true;\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param _owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address _owner) public view returns (uint256 balance) {\n return balances[_owner];\n }\n\n}\n\n\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n\n\n/**\n * @title Standard ERC20 token\n *\n * @dev Implementation of the basic standard token.\n * @dev https://github.com/ethereum/EIPs/issues/20\n * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol\n */\ncontract StandardToken is ERC20, BasicToken {\n\n mapping (address => mapping (address => uint256)) internal allowed;\n\n\n /**\n * @dev Transfer tokens from one address to another\n * @param _from address The address which you want to send tokens from\n * @param _to address The address which you want to transfer to\n * @param _value uint256 the amount of tokens to be transferred\n */\n function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[_from]);\n require(_value <= allowed[_from][msg.sender]);\n\n balances[_from] = balances[_from].sub(_value);\n balances[_to] = balances[_to].add(_value);\n allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);\n Transfer(_from, _to, _value);\n return true;\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n *\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param _spender The address which will spend the funds.\n * @param _value The amount of tokens to be spent.\n */\n function approve(address _spender, uint256 _value) public returns (bool) {\n allowed[msg.sender][_spender] = _value;\n Approval(msg.sender, _spender, _value);\n return true;\n }\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param _owner address The address which owns the funds.\n * @param _spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address _owner, address _spender) public view returns (uint256) {\n return allowed[_owner][_spender];\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(address _spender, uint _addedValue) public returns (bool) {\n allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {\n uint oldValue = allowed[msg.sender][_spender];\n if (_subtractedValue > oldValue) {\n allowed[msg.sender][_spender] = 0;\n } else {\n allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);\n }\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n\ncontract Recoverable is Ownable {\n\n /// @dev Empty constructor (for now)\n function Recoverable() {\n }\n\n /// @dev This will be invoked by the owner, when owner wants to rescue tokens\n /// @param token Token which will we rescue to the owner from the contract\n function recoverTokens(ERC20Basic token) onlyOwner public {\n token.transfer(owner, tokensToBeReturned(token));\n }\n\n /// @dev Interface function, can be overwritten by the superclass\n /// @param token Token which balance we will check and return\n /// @return The amount of tokens (in smallest denominator) the contract owns\n function tokensToBeReturned(ERC20Basic token) public returns (uint) {\n return token.balanceOf(this);\n }\n}\n\n\n\n/**\n * Standard EIP-20 token with an interface marker.\n *\n * @notice Interface marker is used by crowdsale contracts to validate that addresses point a good token contract.\n *\n */\ncontract StandardTokenExt is StandardToken, Recoverable {\n\n /* Interface declaration */\n function isToken() public constant returns (bool weAre) {\n return true;\n }\n}\n\n\ncontract BurnableToken is StandardTokenExt {\n\n // @notice An address for the transfer event where the burned tokens are transferred in a faux Transfer event\n address public constant BURN_ADDRESS = 0;\n\n /** How many tokens we burned */\n event Burned(address burner, uint burnedAmount);\n\n /**\n * Burn extra tokens from a balance.\n *\n */\n function burn(uint burnAmount) {\n address burner = msg.sender;\n balances[burner] = balances[burner].sub(burnAmount);\n totalSupply_ = totalSupply_.sub(burnAmount);\n Burned(burner, burnAmount);\n\n // Inform the blockchain explores that track the\n // balances only by a transfer event that the balance in this\n // address has decreased\n Transfer(burner, BURN_ADDRESS, burnAmount);\n }\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Upgrade agent interface inspired by Lunyr.\n *\n * Upgrade agent transfers tokens to a new contract.\n * Upgrade agent itself can be the token contract, or just a middle man contract doing the heavy lifting.\n */\ncontract UpgradeAgent {\n\n uint public originalSupply;\n\n /** Interface marker */\n function isUpgradeAgent() public constant returns (bool) {\n return true;\n }\n\n function upgradeFrom(address _from, uint256 _value) public;\n\n}\n\n\n/**\n * A token upgrade mechanism where users can opt-in amount of tokens to the next smart contract revision.\n *\n * First envisioned by Golem and Lunyr projects.\n */\ncontract UpgradeableToken is StandardTokenExt {\n\n /** Contract / person who can set the upgrade path. This can be the same as team multisig wallet, as what it is with its default value. */\n address public upgradeMaster;\n\n /** The next contract where the tokens will be migrated. */\n UpgradeAgent public upgradeAgent;\n\n /** How many tokens we have upgraded by now. */\n uint256 public totalUpgraded;\n\n /**\n * Upgrade states.\n *\n * - NotAllowed: The child contract has not reached a condition where the upgrade can bgun\n * - WaitingForAgent: Token allows upgrade, but we don't have a new agent yet\n * - ReadyToUpgrade: The agent is set, but not a single token has been upgraded yet\n * - Upgrading: Upgrade agent is set and the balance holders can upgrade their tokens\n *\n */\n enum UpgradeState {Unknown, NotAllowed, WaitingForAgent, ReadyToUpgrade, Upgrading}\n\n /**\n * Somebody has upgraded some of his tokens.\n */\n event Upgrade(address indexed _from, address indexed _to, uint256 _value);\n\n /**\n * New upgrade agent available.\n */\n event UpgradeAgentSet(address agent);\n\n /**\n * Do not allow construction without upgrade master set.\n */\n function UpgradeableToken(address _upgradeMaster) {\n upgradeMaster = _upgradeMaster;\n }\n\n /**\n * Allow the token holder to upgrade some of their tokens to a new contract.\n */\n function upgrade(uint256 value) public {\n\n UpgradeState state = getUpgradeState();\n if(!(state == UpgradeState.ReadyToUpgrade || state == UpgradeState.Upgrading)) {\n // Called in a bad state\n throw;\n }\n\n // Validate input value.\n if (value == 0) throw;\n\n balances[msg.sender] = balances[msg.sender].sub(value);\n\n // Take tokens out from circulation\n totalSupply_ = totalSupply_.sub(value);\n totalUpgraded = totalUpgraded.add(value);\n\n // Upgrade agent reissues the tokens\n upgradeAgent.upgradeFrom(msg.sender, value);\n Upgrade(msg.sender, upgradeAgent, value);\n }\n\n /**\n * Set an upgrade agent that handles\n */\n function setUpgradeAgent(address agent) external {\n\n if(!canUpgrade()) {\n // The token is not yet in a state that we could think upgrading\n throw;\n }\n\n if (agent == 0x0) throw;\n // Only a master can designate the next agent\n if (msg.sender != upgradeMaster) throw;\n // Upgrade has already begun for an agent\n if (getUpgradeState() == UpgradeState.Upgrading) throw;\n\n upgradeAgent = UpgradeAgent(agent);\n\n // Bad interface\n if(!upgradeAgent.isUpgradeAgent()) throw;\n // Make sure that token supplies match in source and target\n if (upgradeAgent.originalSupply() != totalSupply_) throw;\n\n UpgradeAgentSet(upgradeAgent);\n }\n\n /**\n * Get the state of the token upgrade.\n */\n function getUpgradeState() public constant returns(UpgradeState) {\n if(!canUpgrade()) return UpgradeState.NotAllowed;\n else if(address(upgradeAgent) == 0x00) return UpgradeState.WaitingForAgent;\n else if(totalUpgraded == 0) return UpgradeState.ReadyToUpgrade;\n else return UpgradeState.Upgrading;\n }\n\n /**\n * Change the upgrade master.\n *\n * This allows us to set a new owner for the upgrade mechanism.\n */\n function setUpgradeMaster(address master) public {\n if (master == 0x0) throw;\n if (msg.sender != upgradeMaster) throw;\n upgradeMaster = master;\n }\n\n /**\n * Child contract can enable to provide the condition when the upgrade can begun.\n */\n function canUpgrade() public constant returns(bool) {\n return true;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n/**\n * Define interface for releasing the token transfer after a successful crowdsale.\n */\ncontract ReleasableToken is StandardTokenExt {\n\n /* The finalizer contract that allows unlift the transfer limits on this token */\n address public releaseAgent;\n\n /** A crowdsale contract can release us to the wild if ICO success. If false we are are in transfer lock up period.*/\n bool public released = false;\n\n /** Map of agents that are allowed to transfer tokens regardless of the lock down period. These are crowdsale contracts and possible the team multisig itself. */\n mapping (address => bool) public transferAgents;\n\n /**\n * Limit token transfer until the crowdsale is over.\n *\n */\n modifier canTransfer(address _sender) {\n\n if(!released) {\n if(!transferAgents[_sender]) {\n throw;\n }\n }\n\n _;\n }\n\n /**\n * Set the contract that can call release and make the token transferable.\n *\n * Design choice. Allow reset the release agent to fix fat finger mistakes.\n */\n function setReleaseAgent(address addr) onlyOwner inReleaseState(false) public {\n\n // We don't do interface check here as we might want to a normal wallet address to act as a release agent\n releaseAgent = addr;\n }\n\n /**\n * Owner can allow a particular address (a crowdsale contract) to transfer tokens despite the lock up period.\n */\n function setTransferAgent(address addr, bool state) onlyOwner inReleaseState(false) public {\n transferAgents[addr] = state;\n }\n\n /**\n * One way function to release the tokens to the wild.\n *\n * Can be called only from the release agent that is the final ICO contract. It is only called if the crowdsale has been success (first milestone reached).\n */\n function releaseTokenTransfer() public onlyReleaseAgent {\n released = true;\n }\n\n /** The function can be called only before or after the tokens have been releasesd */\n modifier inReleaseState(bool releaseState) {\n if(releaseState != released) {\n throw;\n }\n _;\n }\n\n /** The function can be called only by a whitelisted release agent. */\n modifier onlyReleaseAgent() {\n if(msg.sender != releaseAgent) {\n throw;\n }\n _;\n }\n\n function transfer(address _to, uint _value) canTransfer(msg.sender) returns (bool success) {\n // Call StandardToken.transfer()\n return super.transfer(_to, _value);\n }\n\n function transferFrom(address _from, address _to, uint _value) canTransfer(_from) returns (bool success) {\n // Call StandardToken.transferForm()\n return super.transferFrom(_from, _to, _value);\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Safe unsigned safe math.\n *\n * https://blog.aragon.one/library-driven-development-in-solidity-2bebcaf88736#.750gwtwli\n *\n * Originally from https://raw.githubusercontent.com/AragonOne/zeppelin-solidity/master/contracts/SafeMathLib.sol\n *\n * Maintained here until merged to mainline zeppelin-solidity.\n *\n */\nlibrary SafeMathLib {\n\n function times(uint a, uint b) returns (uint) {\n uint c = a * b;\n assert(a == 0 || c / a == b);\n return c;\n }\n\n function minus(uint a, uint b) returns (uint) {\n assert(b <= a);\n return a - b;\n }\n\n function plus(uint a, uint b) returns (uint) {\n uint c = a + b;\n assert(c>=a);\n return c;\n }\n\n}\n\n\n\n/**\n * A token that can increase its supply by another contract.\n *\n * This allows uncapped crowdsale by dynamically increasing the supply when money pours in.\n * Only mint agents, contracts whitelisted by owner, can mint new tokens.\n *\n */\ncontract MintableToken is StandardTokenExt {\n\n using SafeMathLib for uint;\n\n bool public mintingFinished = false;\n\n /** List of agents that are allowed to create new tokens */\n mapping (address => bool) public mintAgents;\n\n event MintingAgentChanged(address addr, bool state);\n event Minted(address receiver, uint amount);\n\n /**\n * Create new tokens and allocate them to an address..\n *\n * Only callably by a crowdsale contract (mint agent).\n */\n function mint(address receiver, uint amount) onlyMintAgent canMint public {\n totalSupply_ = totalSupply_.plus(amount);\n balances[receiver] = balances[receiver].plus(amount);\n\n // This will make the mint transaction apper in EtherScan.io\n // We can remove this after there is a standardized minting event\n Transfer(0, receiver, amount);\n }\n\n /**\n * Owner can allow a crowdsale contract to mint new tokens.\n */\n function setMintAgent(address addr, bool state) onlyOwner canMint public {\n mintAgents[addr] = state;\n MintingAgentChanged(addr, state);\n }\n\n modifier onlyMintAgent() {\n // Only crowdsale contracts are allowed to mint new tokens\n if(!mintAgents[msg.sender]) {\n throw;\n }\n _;\n }\n\n /** Make sure we are not done yet. */\n modifier canMint() {\n if(mintingFinished) throw;\n _;\n }\n}\n\n\n\n/**\n * A crowdsaled token.\n *\n * An ERC-20 token designed specifically for crowdsales with investor protection and further development path.\n *\n * - The token transfer() is disabled until the crowdsale is over\n * - The token contract gives an opt-in upgrade path to a new contract\n * - The same token can be part of several crowdsales through approve() mechanism\n * - The token can be capped (supply set in the constructor) or uncapped (crowdsale contract can mint new tokens)\n *\n */\ncontract CrowdsaleToken is ReleasableToken, MintableToken, UpgradeableToken {\n\n /** Name and symbol were updated. */\n event UpdatedTokenInformation(string newName, string newSymbol);\n\n string public name;\n\n string public symbol;\n\n uint public decimals;\n\n /**\n * Construct the token.\n *\n * This token must be created through a team multisig wallet, so that it is owned by that wallet.\n *\n * @param _name Token name\n * @param _symbol Token symbol - should be all caps\n * @param _initialSupply How many tokens we start with\n * @param _decimals Number of decimal places\n * @param _mintable Are new tokens created over the crowdsale or do we distribute only the initial supply? Note that when the token becomes transferable the minting always ends.\n */\n function CrowdsaleToken(string _name, string _symbol, uint _initialSupply, uint _decimals, bool _mintable)\n UpgradeableToken(msg.sender) {\n\n // Create any address, can be transferred\n // to team multisig via changeOwner(),\n // also remember to call setUpgradeMaster()\n owner = msg.sender;\n\n name = _name;\n symbol = _symbol;\n\n totalSupply_ = _initialSupply;\n\n decimals = _decimals;\n\n // Create initially all balance on the team multisig\n balances[owner] = totalSupply_;\n\n if(totalSupply_ > 0) {\n Minted(owner, totalSupply_);\n }\n\n // No more new supply allowed after the token creation\n if(!_mintable) {\n mintingFinished = true;\n if(totalSupply_ == 0) {\n throw; // Cannot create a token without supply and no minting\n }\n }\n }\n\n /**\n * When token is released to be transferable, enforce no new tokens can be created.\n */\n function releaseTokenTransfer() public onlyReleaseAgent {\n mintingFinished = true;\n super.releaseTokenTransfer();\n }\n\n /**\n * Allow upgrade agent functionality kick in only if the crowdsale was success.\n */\n function canUpgrade() public constant returns(bool) {\n return released && super.canUpgrade();\n }\n\n /**\n * Owner can update token information here.\n *\n * It is often useful to conceal the actual token association, until\n * the token operations, like central issuance or reissuance have been completed.\n *\n * This function allows the token owner to rename the token after the operations\n * have been completed and then point the audience to use the token contract.\n */\n function setTokenInformation(string _name, string _symbol) onlyOwner {\n name = _name;\n symbol = _symbol;\n\n UpdatedTokenInformation(name, symbol);\n }\n\n}\n\n\n/**\n * A crowdsaled token that you can also burn.\n *\n */\ncontract BurnableCrowdsaleToken is BurnableToken, CrowdsaleToken {\n\n function BurnableCrowdsaleToken(string _name, string _symbol, uint _initialSupply, uint _decimals, bool _mintable)\n CrowdsaleToken(_name, _symbol, _initialSupply, _decimals, _mintable) {\n\n }\n}\n"}, "BurnableToken": {"abi": [{"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "approve", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "recoverTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_from", "type": "address"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "burnAmount", "type": "uint256"}], "name": "burn", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_subtractedValue", "type": "uint256"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "tokensToBeReturned", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_addedValue", "type": "uint256"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}, {"name": "_spender", "type": "address"}], "name": "allowance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isToken", "outputs": [{"name": "weAre", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "BURN_ADDRESS", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "burner", "type": "address"}, {"indexed": false, "name": "burnedAmount", "type": "uint256"}], "name": "Burned", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}, {"indexed": true, "name": "spender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "bytecode": "0x608060405260038054600160a060020a03191633179055610ac7806100256000396000f3006080604052600436106100da5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663095ea7b381146100df57806316114acd1461011757806318160ddd1461013a57806323b872dd1461016157806342966c681461018b57806366188463146101a357806370a08231146101c75780638da5cb5b146101e8578063a9059cbb14610219578063c45d19db1461023d578063d73dd6231461025e578063dd62ed3e14610282578063eefa597b146102a9578063f2fde38b146102be578063fccc2813146102df575b600080fd5b3480156100eb57600080fd5b50610103600160a060020a03600435166024356102f4565b604080519115158252519081900360200190f35b34801561012357600080fd5b50610138600160a060020a036004351661035a565b005b34801561014657600080fd5b5061014f61042a565b60408051918252519081900360200190f35b34801561016d57600080fd5b50610103600160a060020a0360043581169060243516604435610430565b34801561019757600080fd5b506101386004356105a7565b3480156101af57600080fd5b50610103600160a060020a036004351660243561067f565b3480156101d357600080fd5b5061014f600160a060020a036004351661076f565b3480156101f457600080fd5b506101fd61078a565b60408051600160a060020a039092168252519081900360200190f35b34801561022557600080fd5b50610103600160a060020a0360043516602435610799565b34801561024957600080fd5b5061014f600160a060020a036004351661087a565b34801561026a57600080fd5b50610103600160a060020a0360043516602435610910565b34801561028e57600080fd5b5061014f600160a060020a03600435811690602435166109a9565b3480156102b557600080fd5b506101036109d4565b3480156102ca57600080fd5b50610138600160a060020a03600435166109d9565b3480156102eb57600080fd5b506101fd610a6e565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b600354600160a060020a0316331461037157600080fd5b600354600160a060020a038083169163a9059cbb91166103908461087a565b6040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b1580156103fb57600080fd5b505af115801561040f573d6000803e3d6000fd5b505050506040513d602081101561042557600080fd5b505050565b60015490565b6000600160a060020a038316151561044757600080fd5b600160a060020a03841660009081526020819052604090205482111561046c57600080fd5b600160a060020a038416600090815260026020908152604080832033845290915290205482111561049c57600080fd5b600160a060020a0384166000908152602081905260409020546104c5908363ffffffff610a7316565b600160a060020a0380861660009081526020819052604080822093909355908516815220546104fa908363ffffffff610a8516565b600160a060020a0380851660009081526020818152604080832094909455918716815260028252828120338252909152205461053c908363ffffffff610a7316565b600160a060020a03808616600081815260026020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b336000818152602081905260409020546105c7908363ffffffff610a7316565b600160a060020a0382166000908152602081905260409020556001546105f3908363ffffffff610a7316565b60015560408051600160a060020a03831681526020810184905281517f696de425f79f4a40bc6d2122ca50507f0efbeabbff86a84871b7196ab8ea8df7929181900390910190a1604080518381529051600091600160a060020a038416917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b336000908152600260209081526040808320600160a060020a0386168452909152812054808311156106d457336000908152600260209081526040808320600160a060020a0388168452909152812055610709565b6106e4818463ffffffff610a7316565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a031660009081526020819052604090205490565b600354600160a060020a031681565b6000600160a060020a03831615156107b057600080fd5b336000908152602081905260409020548211156107cc57600080fd5b336000908152602081905260409020546107ec908363ffffffff610a7316565b3360009081526020819052604080822092909255600160a060020a0385168152205461081e908363ffffffff610a8516565b600160a060020a038416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600091600160a060020a038416916370a082319160248082019260209290919082900301818787803b1580156108de57600080fd5b505af11580156108f2573d6000803e3d6000fd5b505050506040513d602081101561090857600080fd5b505192915050565b336000908152600260209081526040808320600160a060020a0386168452909152812054610944908363ffffffff610a8516565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600190565b600354600160a060020a031633146109f057600080fd5b600160a060020a0381161515610a0557600080fd5b600354604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600081565b600082821115610a7f57fe5b50900390565b600082820183811015610a9457fe5b93925050505600a165627a7a72305820546158f762971e05ee7b823b00328fdcde3255e17a50553e190eef4268522a550029", "bytecode_runtime": "0x6080604052600436106100da5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663095ea7b381146100df57806316114acd1461011757806318160ddd1461013a57806323b872dd1461016157806342966c681461018b57806366188463146101a357806370a08231146101c75780638da5cb5b146101e8578063a9059cbb14610219578063c45d19db1461023d578063d73dd6231461025e578063dd62ed3e14610282578063eefa597b146102a9578063f2fde38b146102be578063fccc2813146102df575b600080fd5b3480156100eb57600080fd5b50610103600160a060020a03600435166024356102f4565b604080519115158252519081900360200190f35b34801561012357600080fd5b50610138600160a060020a036004351661035a565b005b34801561014657600080fd5b5061014f61042a565b60408051918252519081900360200190f35b34801561016d57600080fd5b50610103600160a060020a0360043581169060243516604435610430565b34801561019757600080fd5b506101386004356105a7565b3480156101af57600080fd5b50610103600160a060020a036004351660243561067f565b3480156101d357600080fd5b5061014f600160a060020a036004351661076f565b3480156101f457600080fd5b506101fd61078a565b60408051600160a060020a039092168252519081900360200190f35b34801561022557600080fd5b50610103600160a060020a0360043516602435610799565b34801561024957600080fd5b5061014f600160a060020a036004351661087a565b34801561026a57600080fd5b50610103600160a060020a0360043516602435610910565b34801561028e57600080fd5b5061014f600160a060020a03600435811690602435166109a9565b3480156102b557600080fd5b506101036109d4565b3480156102ca57600080fd5b50610138600160a060020a03600435166109d9565b3480156102eb57600080fd5b506101fd610a6e565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b600354600160a060020a0316331461037157600080fd5b600354600160a060020a038083169163a9059cbb91166103908461087a565b6040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b1580156103fb57600080fd5b505af115801561040f573d6000803e3d6000fd5b505050506040513d602081101561042557600080fd5b505050565b60015490565b6000600160a060020a038316151561044757600080fd5b600160a060020a03841660009081526020819052604090205482111561046c57600080fd5b600160a060020a038416600090815260026020908152604080832033845290915290205482111561049c57600080fd5b600160a060020a0384166000908152602081905260409020546104c5908363ffffffff610a7316565b600160a060020a0380861660009081526020819052604080822093909355908516815220546104fa908363ffffffff610a8516565b600160a060020a0380851660009081526020818152604080832094909455918716815260028252828120338252909152205461053c908363ffffffff610a7316565b600160a060020a03808616600081815260026020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b336000818152602081905260409020546105c7908363ffffffff610a7316565b600160a060020a0382166000908152602081905260409020556001546105f3908363ffffffff610a7316565b60015560408051600160a060020a03831681526020810184905281517f696de425f79f4a40bc6d2122ca50507f0efbeabbff86a84871b7196ab8ea8df7929181900390910190a1604080518381529051600091600160a060020a038416917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b336000908152600260209081526040808320600160a060020a0386168452909152812054808311156106d457336000908152600260209081526040808320600160a060020a0388168452909152812055610709565b6106e4818463ffffffff610a7316565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a031660009081526020819052604090205490565b600354600160a060020a031681565b6000600160a060020a03831615156107b057600080fd5b336000908152602081905260409020548211156107cc57600080fd5b336000908152602081905260409020546107ec908363ffffffff610a7316565b3360009081526020819052604080822092909255600160a060020a0385168152205461081e908363ffffffff610a8516565b600160a060020a038416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600091600160a060020a038416916370a082319160248082019260209290919082900301818787803b1580156108de57600080fd5b505af11580156108f2573d6000803e3d6000fd5b505050506040513d602081101561090857600080fd5b505192915050565b336000908152600260209081526040808320600160a060020a0386168452909152812054610944908363ffffffff610a8516565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600190565b600354600160a060020a031633146109f057600080fd5b600160a060020a0381161515610a0557600080fd5b600354604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600081565b600082821115610a7f57fe5b50900390565b600082820183811015610a9457fe5b93925050505600a165627a7a72305820546158f762971e05ee7b823b00328fdcde3255e17a50553e190eef4268522a550029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "approve", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "recoverTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_from", "type": "address"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "burnAmount", "type": "uint256"}], "name": "burn", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_subtractedValue", "type": "uint256"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "tokensToBeReturned", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_addedValue", "type": "uint256"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}, {"name": "_spender", "type": "address"}], "name": "allowance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isToken", "outputs": [{"name": "weAre", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "BURN_ADDRESS", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "burner", "type": "address"}, {"indexed": false, "name": "burnedAmount", "type": "uint256"}], "name": "Burned", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}, {"indexed": true, "name": "spender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "devdoc": {"methods": {"allowance(address,address)": {"details": "Function to check the amount of tokens that an owner allowed to a spender.", "params": {"_owner": "address The address which owns the funds.", "_spender": "address The address which will spend the funds."}, "return": "A uint256 specifying the amount of tokens still available for the spender."}, "approve(address,uint256)": {"details": "Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729", "params": {"_spender": "The address which will spend the funds.", "_value": "The amount of tokens to be spent."}}, "balanceOf(address)": {"details": "Gets the balance of the specified address.", "params": {"_owner": "The address to query the the balance of."}, "return": "An uint256 representing the amount owned by the passed address."}, "decreaseApproval(address,uint256)": {"details": "Decrease the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[_spender] == 0. To decrement allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"_spender": "The address which will spend the funds.", "_subtractedValue": "The amount of tokens to decrease the allowance by."}}, "increaseApproval(address,uint256)": {"details": "Increase the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[_spender] == 0. To increment allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"_addedValue": "The amount of tokens to increase the allowance by.", "_spender": "The address which will spend the funds."}}, "recoverTokens(address)": {"details": "This will be invoked by the owner, when owner wants to rescue tokens", "params": {"token": "Token which will we rescue to the owner from the contract"}}, "tokensToBeReturned(address)": {"details": "Interface function, can be overwritten by the superclass", "params": {"token": "Token which balance we will check and return"}, "return": "The amount of tokens (in smallest denominator) the contract owns"}, "totalSupply()": {"details": "total number of tokens in existence"}, "transfer(address,uint256)": {"details": "transfer token for a specified address", "params": {"_to": "The address to transfer to.", "_value": "The amount to be transferred."}}, "transferFrom(address,address,uint256)": {"details": "Transfer tokens from one address to another", "params": {"_from": "address The address which you want to send tokens from", "_to": "address The address which you want to transfer to", "_value": "uint256 the amount of tokens to be transferred"}}, "transferOwnership(address)": {"details": "Allows the current owner to transfer control of the contract to a newOwner.", "params": {"newOwner": "The address to transfer ownership to."}}}}, "userdoc": {"methods": {"burn(uint256)": {"notice": "Burn extra tokens from a balance. "}}}}, "settings": {"compilationTarget": {"contracts/BurnableToken.sol": "BurnableToken"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/BurnableToken.sol": {"keccak256": "0xb97707de2018141fb22482d7ad4faa35cd471ae2ed992343bbcc1be0d3b95218", "urls": ["bzzr://a8b275d0ee25a96664f613d48339250b11d5140d7b74122d74482c3a94cc5295"]}, "contracts/Recoverable.sol": {"keccak256": "0x311a332cdd87df6e00057f5455f4e68b043b5dbe211f6d68bc64e20817515635", "urls": ["bzzr://4fd99bcfb93baed6e7c8d22ee9ecc5c8346a1aa98288e77b01333b2c5d3f582d"]}, "contracts/StandardTokenExt.sol": {"keccak256": "0x9ea2d4cec4dccd5639c05e6c23dd027d80b5e5a20abd99b280ab7b2631b5a5fc", "urls": ["bzzr://a52d8fc5a21bd83997aff19128e00dceb251df712207b61223894c8b7f42d5ff"]}, "zeppelin/contracts/math/SafeMath.sol": {"keccak256": "0x341ba8cb467a3623e819ba1a683ac1d264005186f308505214e5f6bc89446a08", "urls": ["bzzr://59b5652ee4e4a1b5a8f1a8906e14c84af43d636cf5ca0725cc1813aabe4c8c17"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}, "zeppelin/contracts/token/ERC20/BasicToken.sol": {"keccak256": "0x948404468d61ff35ea4194650670408dabd65da7f905a1c16888ab84520bf39e", "urls": ["bzzr://ea75e20f95d7e4e10394fe6bfaa8eee56b4757c2a6f1e8df4180d33afa621935"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}, "zeppelin/contracts/token/ERC20/StandardToken.sol": {"keccak256": "0xd2b344a5259e19ec143074cfa65637a10c40b68395c59808c4af13bccbb2de55", "urls": ["bzzr://d61a01175a7ca1ba9f4403de603c20b897e33ec425aef2d9f8a7f9ddfdfaf5b2"]}}, "version": 1}, "name": "BurnableToken", "ordered_full_dependencies": [], "source_path": "contracts/BurnableToken.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n assert(c / a == b);\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n\n\n\n/**\n * @title Basic token\n * @dev Basic version of StandardToken, with no allowances.\n */\ncontract BasicToken is ERC20Basic {\n using SafeMath for uint256;\n\n mapping(address => uint256) balances;\n\n uint256 totalSupply_;\n\n /**\n * @dev total number of tokens in existence\n */\n function totalSupply() public view returns (uint256) {\n return totalSupply_;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param _to The address to transfer to.\n * @param _value The amount to be transferred.\n */\n function transfer(address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[msg.sender]);\n\n // SafeMath.sub will throw if there is not enough balance.\n balances[msg.sender] = balances[msg.sender].sub(_value);\n balances[_to] = balances[_to].add(_value);\n Transfer(msg.sender, _to, _value);\n return true;\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param _owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address _owner) public view returns (uint256 balance) {\n return balances[_owner];\n }\n\n}\n\n\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n\n\n/**\n * @title Standard ERC20 token\n *\n * @dev Implementation of the basic standard token.\n * @dev https://github.com/ethereum/EIPs/issues/20\n * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol\n */\ncontract StandardToken is ERC20, BasicToken {\n\n mapping (address => mapping (address => uint256)) internal allowed;\n\n\n /**\n * @dev Transfer tokens from one address to another\n * @param _from address The address which you want to send tokens from\n * @param _to address The address which you want to transfer to\n * @param _value uint256 the amount of tokens to be transferred\n */\n function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[_from]);\n require(_value <= allowed[_from][msg.sender]);\n\n balances[_from] = balances[_from].sub(_value);\n balances[_to] = balances[_to].add(_value);\n allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);\n Transfer(_from, _to, _value);\n return true;\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n *\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param _spender The address which will spend the funds.\n * @param _value The amount of tokens to be spent.\n */\n function approve(address _spender, uint256 _value) public returns (bool) {\n allowed[msg.sender][_spender] = _value;\n Approval(msg.sender, _spender, _value);\n return true;\n }\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param _owner address The address which owns the funds.\n * @param _spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address _owner, address _spender) public view returns (uint256) {\n return allowed[_owner][_spender];\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(address _spender, uint _addedValue) public returns (bool) {\n allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {\n uint oldValue = allowed[msg.sender][_spender];\n if (_subtractedValue > oldValue) {\n allowed[msg.sender][_spender] = 0;\n } else {\n allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);\n }\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n\ncontract Recoverable is Ownable {\n\n /// @dev Empty constructor (for now)\n function Recoverable() {\n }\n\n /// @dev This will be invoked by the owner, when owner wants to rescue tokens\n /// @param token Token which will we rescue to the owner from the contract\n function recoverTokens(ERC20Basic token) onlyOwner public {\n token.transfer(owner, tokensToBeReturned(token));\n }\n\n /// @dev Interface function, can be overwritten by the superclass\n /// @param token Token which balance we will check and return\n /// @return The amount of tokens (in smallest denominator) the contract owns\n function tokensToBeReturned(ERC20Basic token) public returns (uint) {\n return token.balanceOf(this);\n }\n}\n\n\n\n/**\n * Standard EIP-20 token with an interface marker.\n *\n * @notice Interface marker is used by crowdsale contracts to validate that addresses point a good token contract.\n *\n */\ncontract StandardTokenExt is StandardToken, Recoverable {\n\n /* Interface declaration */\n function isToken() public constant returns (bool weAre) {\n return true;\n }\n}\n\n\ncontract BurnableToken is StandardTokenExt {\n\n // @notice An address for the transfer event where the burned tokens are transferred in a faux Transfer event\n address public constant BURN_ADDRESS = 0;\n\n /** How many tokens we burned */\n event Burned(address burner, uint burnedAmount);\n\n /**\n * Burn extra tokens from a balance.\n *\n */\n function burn(uint burnAmount) {\n address burner = msg.sender;\n balances[burner] = balances[burner].sub(burnAmount);\n totalSupply_ = totalSupply_.sub(burnAmount);\n Burned(burner, burnAmount);\n\n // Inform the blockchain explores that track the\n // balances only by a transfer event that the balance in this\n // address has decreased\n Transfer(burner, BURN_ADDRESS, burnAmount);\n }\n}\n"}, "BytesDeserializer": {"abi": [{"constant": true, "inputs": [{"name": "b", "type": "bytes"}, {"name": "offset", "type": "uint256"}], "name": "slice16", "outputs": [{"name": "", "type": "bytes16"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "b", "type": "bytes"}, {"name": "offset", "type": "uint256"}], "name": "slice2", "outputs": [{"name": "", "type": "bytes2"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "b", "type": "bytes"}, {"name": "offset", "type": "uint256"}], "name": "slice32", "outputs": [{"name": "", "type": "bytes32"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "b", "type": "bytes"}, {"name": "offset", "type": "uint256"}], "name": "sliceAddress", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "b", "type": "bytes"}, {"name": "offset", "type": "uint256"}], "name": "slice4", "outputs": [{"name": "", "type": "bytes4"}], "payable": false, "stateMutability": "view", "type": "function"}], "bytecode": "0x6105ae610030600b82828239805160001a6073146000811461002057610022565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600436106100835763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166316419aa7811461008857806320956341146100fc5780632e1eb7fe1461017f578063b655e138146101df578063d54dd8f914610256575b600080fd5b6040805160206004803580820135601f81018490048402850184019095528484526100d694369492936024939284019190819084018382808284375094975050933594506102d99350505050565b604080516fffffffffffffffffffffffffffffffff199092168252519081900360200190f35b6040805160206004803580820135601f810184900484028501840190955284845261014a94369492936024939284019190819084018382808284375094975050933594506103679350505050565b604080517fffff0000000000000000000000000000000000000000000000000000000000009092168252519081900360200190f35b6040805160206004803580820135601f81018490048402850184019095528484526101cd94369492936024939284019190819084018382808284375094975050933594506103ed9350505050565b60408051918252519081900360200190f35b6040805160206004803580820135601f810184900484028501840190955284845261022d94369492936024939284019190819084018382808284375094975050933594506104739350505050565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6040805160206004803580820135601f81018490048402850184019095528484526102a494369492936024939284019190819084018382808284375094975050933594506104fc9350505050565b604080517fffffffff000000000000000000000000000000000000000000000000000000009092168252519081900360200190f35b600080805b601081101561035f5780600802858286018151811015156102fb57fe5b60209101015160029190910a7f0100000000000000000000000000000000000000000000000000000000000000918290049091027fff00000000000000000000000000000000000000000000000000000000000000160491909117906001016102de565b509392505050565b600080805b600281101561035f57806008028582860181518110151561038957fe5b60209101015160029190910a7f0100000000000000000000000000000000000000000000000000000000000000918290049091027fff000000000000000000000000000000000000000000000000000000000000001604919091179060010161036c565b600080805b602081101561035f57806008028582860181518110151561040f57fe5b60209101015160029190910a7f0100000000000000000000000000000000000000000000000000000000000000918290049091027fff00000000000000000000000000000000000000000000000000000000000000160491909117906001016103f2565b600080805b601481101561035f5780600c016008028582860181518110151561049857fe5b60209101015160029190910a7f0100000000000000000000000000000000000000000000000000000000000000918290049091027fff0000000000000000000000000000000000000000000000000000000000000016049190911790600101610478565b600080805b600481101561035f57806008028582860181518110151561051e57fe5b60209101015160029190910a7f0100000000000000000000000000000000000000000000000000000000000000918290049091027fff00000000000000000000000000000000000000000000000000000000000000160491909117906001016105015600a165627a7a72305820ded35810d6367dabea61946ef5bfe732f17719ee3468bb63b9d0af48d80ce8910029", "bytecode_runtime": "0x73000000000000000000000000000000000000000030146080604052600436106100835763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166316419aa7811461008857806320956341146100fc5780632e1eb7fe1461017f578063b655e138146101df578063d54dd8f914610256575b600080fd5b6040805160206004803580820135601f81018490048402850184019095528484526100d694369492936024939284019190819084018382808284375094975050933594506102d99350505050565b604080516fffffffffffffffffffffffffffffffff199092168252519081900360200190f35b6040805160206004803580820135601f810184900484028501840190955284845261014a94369492936024939284019190819084018382808284375094975050933594506103679350505050565b604080517fffff0000000000000000000000000000000000000000000000000000000000009092168252519081900360200190f35b6040805160206004803580820135601f81018490048402850184019095528484526101cd94369492936024939284019190819084018382808284375094975050933594506103ed9350505050565b60408051918252519081900360200190f35b6040805160206004803580820135601f810184900484028501840190955284845261022d94369492936024939284019190819084018382808284375094975050933594506104739350505050565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6040805160206004803580820135601f81018490048402850184019095528484526102a494369492936024939284019190819084018382808284375094975050933594506104fc9350505050565b604080517fffffffff000000000000000000000000000000000000000000000000000000009092168252519081900360200190f35b600080805b601081101561035f5780600802858286018151811015156102fb57fe5b60209101015160029190910a7f0100000000000000000000000000000000000000000000000000000000000000918290049091027fff00000000000000000000000000000000000000000000000000000000000000160491909117906001016102de565b509392505050565b600080805b600281101561035f57806008028582860181518110151561038957fe5b60209101015160029190910a7f0100000000000000000000000000000000000000000000000000000000000000918290049091027fff000000000000000000000000000000000000000000000000000000000000001604919091179060010161036c565b600080805b602081101561035f57806008028582860181518110151561040f57fe5b60209101015160029190910a7f0100000000000000000000000000000000000000000000000000000000000000918290049091027fff00000000000000000000000000000000000000000000000000000000000000160491909117906001016103f2565b600080805b601481101561035f5780600c016008028582860181518110151561049857fe5b60209101015160029190910a7f0100000000000000000000000000000000000000000000000000000000000000918290049091027fff0000000000000000000000000000000000000000000000000000000000000016049190911790600101610478565b600080805b600481101561035f57806008028582860181518110151561051e57fe5b60209101015160029190910a7f0100000000000000000000000000000000000000000000000000000000000000918290049091027fff00000000000000000000000000000000000000000000000000000000000000160491909117906001016105015600a165627a7a72305820ded35810d6367dabea61946ef5bfe732f17719ee3468bb63b9d0af48d80ce8910029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": true, "inputs": [{"name": "b", "type": "bytes"}, {"name": "offset", "type": "uint256"}], "name": "slice16", "outputs": [{"name": "", "type": "bytes16"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "b", "type": "bytes"}, {"name": "offset", "type": "uint256"}], "name": "slice2", "outputs": [{"name": "", "type": "bytes2"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "b", "type": "bytes"}, {"name": "offset", "type": "uint256"}], "name": "slice32", "outputs": [{"name": "", "type": "bytes32"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "b", "type": "bytes"}, {"name": "offset", "type": "uint256"}], "name": "sliceAddress", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "b", "type": "bytes"}, {"name": "offset", "type": "uint256"}], "name": "slice4", "outputs": [{"name": "", "type": "bytes4"}], "payable": false, "stateMutability": "view", "type": "function"}], "devdoc": {"methods": {}}, "userdoc": {"methods": {"slice16(bytes,uint256)": {"notice": "Extract 128-bit worth of data from the bytes stream."}, "slice2(bytes,uint256)": {"notice": "Extract 16-bit worth of data from the bytes stream."}, "slice32(bytes,uint256)": {"notice": "Extract 256-bit worth of data from the bytes stream."}, "slice4(bytes,uint256)": {"notice": "Extract 32-bit worth of data from the bytes stream."}, "sliceAddress(bytes,uint256)": {"notice": "Extract Ethereum address worth of data from the bytes stream."}}}}, "settings": {"compilationTarget": {"contracts/BytesDeserializer.sol": "BytesDeserializer"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/BytesDeserializer.sol": {"keccak256": "0xdd1718e5ea778d4dd36ccb98336360536beffdffd152bd9fb035124835fa4765", "urls": ["bzzr://ee94acd8149a77baf3f6881b995d1e9eba68c3225b2fe666dc0d402e0b68c5ce"]}}, "version": 1}, "name": "BytesDeserializer", "ordered_full_dependencies": [], "source_path": "contracts/BytesDeserializer.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n/**\n * Deserialize bytes payloads.\n *\n * Values are in big-endian byte order.\n *\n */\nlibrary BytesDeserializer {\n\n /**\n * Extract 256-bit worth of data from the bytes stream.\n */\n function slice32(bytes b, uint offset) constant returns (bytes32) {\n bytes32 out;\n\n for (uint i = 0; i < 32; i++) {\n out |= bytes32(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n /**\n * Extract Ethereum address worth of data from the bytes stream.\n */\n function sliceAddress(bytes b, uint offset) constant returns (address) {\n bytes32 out;\n\n for (uint i = 0; i < 20; i++) {\n out |= bytes32(b[offset + i] & 0xFF) >> ((i+12) * 8);\n }\n return address(uint(out));\n }\n\n /**\n * Extract 128-bit worth of data from the bytes stream.\n */\n function slice16(bytes b, uint offset) constant returns (bytes16) {\n bytes16 out;\n\n for (uint i = 0; i < 16; i++) {\n out |= bytes16(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n /**\n * Extract 32-bit worth of data from the bytes stream.\n */\n function slice4(bytes b, uint offset) constant returns (bytes4) {\n bytes4 out;\n\n for (uint i = 0; i < 4; i++) {\n out |= bytes4(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n /**\n * Extract 16-bit worth of data from the bytes stream.\n */\n function slice2(bytes b, uint offset) constant returns (bytes2) {\n bytes2 out;\n\n for (uint i = 0; i < 2; i++) {\n out |= bytes2(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n\n\n}\n"}, "CentrallyIssuedToken": {"abi": [{"constant": true, "inputs": [], "name": "name", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "approve", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "recoverTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_from", "type": "address"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "decimals", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "burnAmount", "type": "uint256"}], "name": "burn", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "uint256"}], "name": "upgrade", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_name", "type": "string"}, {"name": "_symbol", "type": "string"}], "name": "setTokenInformation", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "upgradeAgent", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "releaseTokenTransfer", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "upgradeMaster", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_subtractedValue", "type": "uint256"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "releaseFinalizationDate", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getUpgradeState", "outputs": [{"name": "", "type": "uint8"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "symbol", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "released", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "canUpgrade", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "tokensToBeReturned", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalUpgraded", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_addedValue", "type": "uint256"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "agent", "type": "address"}], "name": "setUpgradeAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}, {"name": "_spender", "type": "address"}], "name": "allowance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isToken", "outputs": [{"name": "weAre", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "BURN_ADDRESS", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "master", "type": "address"}], "name": "setUpgradeMaster", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [{"name": "_owner", "type": "address"}, {"name": "_name", "type": "string"}, {"name": "_symbol", "type": "string"}, {"name": "_totalSupply", "type": "uint256"}, {"name": "_decimals", "type": "uint256"}, {"name": "_releaseFinalizationDate", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newName", "type": "string"}, {"indexed": false, "name": "newSymbol", "type": "string"}], "name": "UpdatedTokenInformation", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "_from", "type": "address"}, {"indexed": true, "name": "_to", "type": "address"}, {"indexed": false, "name": "_value", "type": "uint256"}], "name": "Upgrade", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "agent", "type": "address"}], "name": "UpgradeAgentSet", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "burner", "type": "address"}, {"indexed": false, "name": "burnedAmount", "type": "uint256"}], "name": "Burned", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}, {"indexed": true, "name": "spender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "bytecode": "0x6080604052600a805460ff191690553480156200001b57600080fd5b50604051620016eb380380620016eb8339810160409081528151602080840151928401516060850151608086015160a08701516003805433600160a060020a03199182161790915560048054909116600160a060020a03881617905595870180519597909693019491939092916200009a9160079190880190620000e1565b508351620000b0906008906020870190620000e1565b506001839055600991909155600160a060020a039094166000908152602081905260409020555050600b5562000186565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200012457805160ff191683800117855562000154565b8280016001018555821562000154579182015b828111156200015457825182559160200191906001019062000137565b506200016292915062000166565b5090565b6200018391905b808211156200016257600081556001016200016d565b90565b61155580620001966000396000f30060806040526004361061017f5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde038114610184578063095ea7b31461020e57806316114acd1461024657806318160ddd1461026957806323b872dd14610290578063313ce567146102ba57806342966c68146102cf57806345977d03146102e75780634eee966f146102ff5780635de4ccb0146103965780635f412d4f146103c7578063600440cb146103dc57806366188463146103f15780636748a0c61461041557806370a082311461042a5780638444b3911461044b5780638da5cb5b1461048457806395d89b411461049957806396132521146104ae5780639738968c146104c3578063a9059cbb146104d8578063c45d19db146104fc578063c752ff621461051d578063d73dd62314610532578063d7e7088a14610556578063dd62ed3e14610577578063eefa597b146104c3578063f2fde38b1461059e578063fccc2813146105bf578063ffeb7d75146105d4575b600080fd5b34801561019057600080fd5b506101996105f5565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101d35781810151838201526020016101bb565b50505050905090810190601f1680156102005780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561021a57600080fd5b50610232600160a060020a0360043516602435610683565b604080519115158252519081900360200190f35b34801561025257600080fd5b50610267600160a060020a03600435166106e9565b005b34801561027557600080fd5b5061027e6107b9565b60408051918252519081900360200190f35b34801561029c57600080fd5b50610232600160a060020a03600435811690602435166044356107c0565b3480156102c657600080fd5b5061027e610937565b3480156102db57600080fd5b5061026760043561093d565b3480156102f357600080fd5b50610267600435610a15565b34801561030b57600080fd5b506040805160206004803580820135601f810184900484028501840190955284845261026794369492936024939284019190819084018382808284375050604080516020601f89358b018035918201839004830284018301909452808352979a999881019791965091820194509250829150840183828082843750949750610b869650505050505050565b3480156103a257600080fd5b506103ab610cf3565b60408051600160a060020a039092168252519081900360200190f35b3480156103d357600080fd5b50610267610d02565b3480156103e857600080fd5b506103ab610d28565b3480156103fd57600080fd5b50610232600160a060020a0360043516602435610d37565b34801561042157600080fd5b5061027e610e27565b34801561043657600080fd5b5061027e600160a060020a0360043516610e2d565b34801561045757600080fd5b50610460610e48565b6040518082600481111561047057fe5b60ff16815260200191505060405180910390f35b34801561049057600080fd5b506103ab610e93565b3480156104a557600080fd5b50610199610ea2565b3480156104ba57600080fd5b50610232610efd565b3480156104cf57600080fd5b50610232610f06565b3480156104e457600080fd5b50610232600160a060020a0360043516602435610f0b565b34801561050857600080fd5b5061027e600160a060020a0360043516610f39565b34801561052957600080fd5b5061027e610fcf565b34801561053e57600080fd5b50610232600160a060020a0360043516602435610fd5565b34801561056257600080fd5b50610267600160a060020a036004351661106e565b34801561058357600080fd5b5061027e600160a060020a036004358116906024351661126f565b3480156105aa57600080fd5b50610267600160a060020a036004351661129a565b3480156105cb57600080fd5b506103ab61132f565b3480156105e057600080fd5b50610267600160a060020a0360043516611334565b6007805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561067b5780601f106106505761010080835404028352916020019161067b565b820191906000526020600020905b81548152906001019060200180831161065e57829003601f168201915b505050505081565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b600354600160a060020a0316331461070057600080fd5b600354600160a060020a038083169163a9059cbb911661071f84610f39565b6040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b15801561078a57600080fd5b505af115801561079e573d6000803e3d6000fd5b505050506040513d60208110156107b457600080fd5b505050565b6001545b90565b6000600160a060020a03831615156107d757600080fd5b600160a060020a0384166000908152602081905260409020548211156107fc57600080fd5b600160a060020a038416600090815260026020908152604080832033845290915290205482111561082c57600080fd5b600160a060020a038416600090815260208190526040902054610855908363ffffffff61138f16565b600160a060020a03808616600090815260208190526040808220939093559085168152205461088a908363ffffffff6113a116565b600160a060020a038085166000908152602081815260408083209490945591871681526002825282812033825290915220546108cc908363ffffffff61138f16565b600160a060020a03808616600081815260026020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b60095481565b3360008181526020819052604090205461095d908363ffffffff61138f16565b600160a060020a038216600090815260208190526040902055600154610989908363ffffffff61138f16565b60015560408051600160a060020a03831681526020810184905281517f696de425f79f4a40bc6d2122ca50507f0efbeabbff86a84871b7196ab8ea8df7929181900390910190a1604080518381529051600091600160a060020a038416917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b6000610a1f610e48565b90506003816004811115610a2f57fe5b1480610a4657506004816004811115610a4457fe5b145b1515610a5157600080fd5b811515610a5d57600080fd5b33600090815260208190526040902054610a7d908363ffffffff61138f16565b33600090815260208190526040902055600154610aa0908363ffffffff61138f16565b600155600654610ab6908363ffffffff6113a116565b600655600554604080517f753e88e5000000000000000000000000000000000000000000000000000000008152336004820152602481018590529051600160a060020a039092169163753e88e59160448082019260009290919082900301818387803b158015610b2557600080fd5b505af1158015610b39573d6000803e3d6000fd5b5050600554604080518681529051600160a060020a0390921693503392507f7e5c344a8141a805725cb476f76c6953b842222b967edd1f78ddb6e8b3f397ac919081900360200190a35050565b600454600160a060020a03163314610b9d57600080fd5b8151610bb0906007906020850190611491565b508051610bc4906008906020840190611491565b506040805181815260078054600260001961010060018416150201909116049282018390527fd131ab1e6f279deea74e13a18477e13e2107deb6dc8ae955648948be5841fb4692909160089181906020820190606083019086908015610c6b5780601f10610c4057610100808354040283529160200191610c6b565b820191906000526020600020905b815481529060010190602001808311610c4e57829003601f168201915b5050838103825284546002600019610100600184161502019091160480825260209091019085908015610cdf5780601f10610cb457610100808354040283529160200191610cdf565b820191906000526020600020905b815481529060010190602001808311610cc257829003601f168201915b505094505050505060405180910390a15050565b600554600160a060020a031681565b600454600160a060020a03163314610d1957600080fd5b600a805460ff19166001179055565b600454600160a060020a031681565b336000908152600260209081526040808320600160a060020a038616845290915281205480831115610d8c57336000908152600260209081526040808320600160a060020a0388168452909152812055610dc1565b610d9c818463ffffffff61138f16565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600b5481565b600160a060020a031660009081526020819052604090205490565b6000610e52610f06565b1515610e60575060016107bd565b600554600160a060020a03161515610e7a575060026107bd565b6006541515610e8b575060036107bd565b5060046107bd565b600354600160a060020a031681565b6008805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561067b5780601f106106505761010080835404028352916020019161067b565b600a5460ff1681565b600190565b6000600b54421115610f2857600a5460ff161515610f2857600080fd5b610f3283836113b0565b9392505050565b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600091600160a060020a038416916370a082319160248082019260209290919082900301818787803b158015610f9d57600080fd5b505af1158015610fb1573d6000803e3d6000fd5b505050506040513d6020811015610fc757600080fd5b505192915050565b60065481565b336000908152600260209081526040808320600160a060020a0386168452909152812054611009908363ffffffff6113a116565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b611076610f06565b151561108157600080fd5b600160a060020a038116151561109657600080fd5b600454600160a060020a031633146110ad57600080fd5b60046110b7610e48565b60048111156110c257fe5b14156110cd57600080fd5b6005805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038381169190911791829055604080517f61d3d7a6000000000000000000000000000000000000000000000000000000008152905192909116916361d3d7a6916004808201926020929091908290030181600087803b15801561115157600080fd5b505af1158015611165573d6000803e3d6000fd5b505050506040513d602081101561117b57600080fd5b5051151561118857600080fd5b600154600560009054906101000a9004600160a060020a0316600160a060020a0316634b2ba0dd6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156111f757600080fd5b505af115801561120b573d6000803e3d6000fd5b505050506040513d602081101561122157600080fd5b50511461122d57600080fd5b60055460408051600160a060020a039092168252517f7845d5aa74cc410e35571258d954f23b82276e160fe8c188fa80566580f279cc9181900360200190a150565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600354600160a060020a031633146112b157600080fd5b600160a060020a03811615156112c657600080fd5b600354604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600081565b600160a060020a038116151561134957600080fd5b600454600160a060020a0316331461136057600080fd5b6004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60008282111561139b57fe5b50900390565b600082820183811015610f3257fe5b6000600160a060020a03831615156113c757600080fd5b336000908152602081905260409020548211156113e357600080fd5b33600090815260208190526040902054611403908363ffffffff61138f16565b3360009081526020819052604080822092909255600160a060020a03851681522054611435908363ffffffff6113a116565b600160a060020a038416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106114d257805160ff19168380011785556114ff565b828001600101855582156114ff579182015b828111156114ff5782518255916020019190600101906114e4565b5061150b92915061150f565b5090565b6107bd91905b8082111561150b57600081556001016115155600a165627a7a72305820981ad25731f3d17d9ec3b135923e93a8ac04c1a3c80b6b63b2a0f046b9cae8d90029", "bytecode_runtime": "0x60806040526004361061017f5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde038114610184578063095ea7b31461020e57806316114acd1461024657806318160ddd1461026957806323b872dd14610290578063313ce567146102ba57806342966c68146102cf57806345977d03146102e75780634eee966f146102ff5780635de4ccb0146103965780635f412d4f146103c7578063600440cb146103dc57806366188463146103f15780636748a0c61461041557806370a082311461042a5780638444b3911461044b5780638da5cb5b1461048457806395d89b411461049957806396132521146104ae5780639738968c146104c3578063a9059cbb146104d8578063c45d19db146104fc578063c752ff621461051d578063d73dd62314610532578063d7e7088a14610556578063dd62ed3e14610577578063eefa597b146104c3578063f2fde38b1461059e578063fccc2813146105bf578063ffeb7d75146105d4575b600080fd5b34801561019057600080fd5b506101996105f5565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101d35781810151838201526020016101bb565b50505050905090810190601f1680156102005780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561021a57600080fd5b50610232600160a060020a0360043516602435610683565b604080519115158252519081900360200190f35b34801561025257600080fd5b50610267600160a060020a03600435166106e9565b005b34801561027557600080fd5b5061027e6107b9565b60408051918252519081900360200190f35b34801561029c57600080fd5b50610232600160a060020a03600435811690602435166044356107c0565b3480156102c657600080fd5b5061027e610937565b3480156102db57600080fd5b5061026760043561093d565b3480156102f357600080fd5b50610267600435610a15565b34801561030b57600080fd5b506040805160206004803580820135601f810184900484028501840190955284845261026794369492936024939284019190819084018382808284375050604080516020601f89358b018035918201839004830284018301909452808352979a999881019791965091820194509250829150840183828082843750949750610b869650505050505050565b3480156103a257600080fd5b506103ab610cf3565b60408051600160a060020a039092168252519081900360200190f35b3480156103d357600080fd5b50610267610d02565b3480156103e857600080fd5b506103ab610d28565b3480156103fd57600080fd5b50610232600160a060020a0360043516602435610d37565b34801561042157600080fd5b5061027e610e27565b34801561043657600080fd5b5061027e600160a060020a0360043516610e2d565b34801561045757600080fd5b50610460610e48565b6040518082600481111561047057fe5b60ff16815260200191505060405180910390f35b34801561049057600080fd5b506103ab610e93565b3480156104a557600080fd5b50610199610ea2565b3480156104ba57600080fd5b50610232610efd565b3480156104cf57600080fd5b50610232610f06565b3480156104e457600080fd5b50610232600160a060020a0360043516602435610f0b565b34801561050857600080fd5b5061027e600160a060020a0360043516610f39565b34801561052957600080fd5b5061027e610fcf565b34801561053e57600080fd5b50610232600160a060020a0360043516602435610fd5565b34801561056257600080fd5b50610267600160a060020a036004351661106e565b34801561058357600080fd5b5061027e600160a060020a036004358116906024351661126f565b3480156105aa57600080fd5b50610267600160a060020a036004351661129a565b3480156105cb57600080fd5b506103ab61132f565b3480156105e057600080fd5b50610267600160a060020a0360043516611334565b6007805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561067b5780601f106106505761010080835404028352916020019161067b565b820191906000526020600020905b81548152906001019060200180831161065e57829003601f168201915b505050505081565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b600354600160a060020a0316331461070057600080fd5b600354600160a060020a038083169163a9059cbb911661071f84610f39565b6040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b15801561078a57600080fd5b505af115801561079e573d6000803e3d6000fd5b505050506040513d60208110156107b457600080fd5b505050565b6001545b90565b6000600160a060020a03831615156107d757600080fd5b600160a060020a0384166000908152602081905260409020548211156107fc57600080fd5b600160a060020a038416600090815260026020908152604080832033845290915290205482111561082c57600080fd5b600160a060020a038416600090815260208190526040902054610855908363ffffffff61138f16565b600160a060020a03808616600090815260208190526040808220939093559085168152205461088a908363ffffffff6113a116565b600160a060020a038085166000908152602081815260408083209490945591871681526002825282812033825290915220546108cc908363ffffffff61138f16565b600160a060020a03808616600081815260026020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b60095481565b3360008181526020819052604090205461095d908363ffffffff61138f16565b600160a060020a038216600090815260208190526040902055600154610989908363ffffffff61138f16565b60015560408051600160a060020a03831681526020810184905281517f696de425f79f4a40bc6d2122ca50507f0efbeabbff86a84871b7196ab8ea8df7929181900390910190a1604080518381529051600091600160a060020a038416917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b6000610a1f610e48565b90506003816004811115610a2f57fe5b1480610a4657506004816004811115610a4457fe5b145b1515610a5157600080fd5b811515610a5d57600080fd5b33600090815260208190526040902054610a7d908363ffffffff61138f16565b33600090815260208190526040902055600154610aa0908363ffffffff61138f16565b600155600654610ab6908363ffffffff6113a116565b600655600554604080517f753e88e5000000000000000000000000000000000000000000000000000000008152336004820152602481018590529051600160a060020a039092169163753e88e59160448082019260009290919082900301818387803b158015610b2557600080fd5b505af1158015610b39573d6000803e3d6000fd5b5050600554604080518681529051600160a060020a0390921693503392507f7e5c344a8141a805725cb476f76c6953b842222b967edd1f78ddb6e8b3f397ac919081900360200190a35050565b600454600160a060020a03163314610b9d57600080fd5b8151610bb0906007906020850190611491565b508051610bc4906008906020840190611491565b506040805181815260078054600260001961010060018416150201909116049282018390527fd131ab1e6f279deea74e13a18477e13e2107deb6dc8ae955648948be5841fb4692909160089181906020820190606083019086908015610c6b5780601f10610c4057610100808354040283529160200191610c6b565b820191906000526020600020905b815481529060010190602001808311610c4e57829003601f168201915b5050838103825284546002600019610100600184161502019091160480825260209091019085908015610cdf5780601f10610cb457610100808354040283529160200191610cdf565b820191906000526020600020905b815481529060010190602001808311610cc257829003601f168201915b505094505050505060405180910390a15050565b600554600160a060020a031681565b600454600160a060020a03163314610d1957600080fd5b600a805460ff19166001179055565b600454600160a060020a031681565b336000908152600260209081526040808320600160a060020a038616845290915281205480831115610d8c57336000908152600260209081526040808320600160a060020a0388168452909152812055610dc1565b610d9c818463ffffffff61138f16565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600b5481565b600160a060020a031660009081526020819052604090205490565b6000610e52610f06565b1515610e60575060016107bd565b600554600160a060020a03161515610e7a575060026107bd565b6006541515610e8b575060036107bd565b5060046107bd565b600354600160a060020a031681565b6008805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561067b5780601f106106505761010080835404028352916020019161067b565b600a5460ff1681565b600190565b6000600b54421115610f2857600a5460ff161515610f2857600080fd5b610f3283836113b0565b9392505050565b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600091600160a060020a038416916370a082319160248082019260209290919082900301818787803b158015610f9d57600080fd5b505af1158015610fb1573d6000803e3d6000fd5b505050506040513d6020811015610fc757600080fd5b505192915050565b60065481565b336000908152600260209081526040808320600160a060020a0386168452909152812054611009908363ffffffff6113a116565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b611076610f06565b151561108157600080fd5b600160a060020a038116151561109657600080fd5b600454600160a060020a031633146110ad57600080fd5b60046110b7610e48565b60048111156110c257fe5b14156110cd57600080fd5b6005805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038381169190911791829055604080517f61d3d7a6000000000000000000000000000000000000000000000000000000008152905192909116916361d3d7a6916004808201926020929091908290030181600087803b15801561115157600080fd5b505af1158015611165573d6000803e3d6000fd5b505050506040513d602081101561117b57600080fd5b5051151561118857600080fd5b600154600560009054906101000a9004600160a060020a0316600160a060020a0316634b2ba0dd6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156111f757600080fd5b505af115801561120b573d6000803e3d6000fd5b505050506040513d602081101561122157600080fd5b50511461122d57600080fd5b60055460408051600160a060020a039092168252517f7845d5aa74cc410e35571258d954f23b82276e160fe8c188fa80566580f279cc9181900360200190a150565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600354600160a060020a031633146112b157600080fd5b600160a060020a03811615156112c657600080fd5b600354604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600081565b600160a060020a038116151561134957600080fd5b600454600160a060020a0316331461136057600080fd5b6004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60008282111561139b57fe5b50900390565b600082820183811015610f3257fe5b6000600160a060020a03831615156113c757600080fd5b336000908152602081905260409020548211156113e357600080fd5b33600090815260208190526040902054611403908363ffffffff61138f16565b3360009081526020819052604080822092909255600160a060020a03851681522054611435908363ffffffff6113a116565b600160a060020a038416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106114d257805160ff19168380011785556114ff565b828001600101855582156114ff579182015b828111156114ff5782518255916020019190600101906114e4565b5061150b92915061150f565b5090565b6107bd91905b8082111561150b57600081556001016115155600a165627a7a72305820981ad25731f3d17d9ec3b135923e93a8ac04c1a3c80b6b63b2a0f046b9cae8d90029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": true, "inputs": [], "name": "name", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "approve", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "recoverTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_from", "type": "address"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "decimals", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "burnAmount", "type": "uint256"}], "name": "burn", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "uint256"}], "name": "upgrade", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_name", "type": "string"}, {"name": "_symbol", "type": "string"}], "name": "setTokenInformation", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "upgradeAgent", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "releaseTokenTransfer", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "upgradeMaster", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_subtractedValue", "type": "uint256"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "releaseFinalizationDate", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getUpgradeState", "outputs": [{"name": "", "type": "uint8"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "symbol", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "released", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "canUpgrade", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "tokensToBeReturned", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalUpgraded", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_addedValue", "type": "uint256"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "agent", "type": "address"}], "name": "setUpgradeAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}, {"name": "_spender", "type": "address"}], "name": "allowance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isToken", "outputs": [{"name": "weAre", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "BURN_ADDRESS", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "master", "type": "address"}], "name": "setUpgradeMaster", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [{"name": "_owner", "type": "address"}, {"name": "_name", "type": "string"}, {"name": "_symbol", "type": "string"}, {"name": "_totalSupply", "type": "uint256"}, {"name": "_decimals", "type": "uint256"}, {"name": "_releaseFinalizationDate", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newName", "type": "string"}, {"indexed": false, "name": "newSymbol", "type": "string"}], "name": "UpdatedTokenInformation", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "_from", "type": "address"}, {"indexed": true, "name": "_to", "type": "address"}, {"indexed": false, "name": "_value", "type": "uint256"}], "name": "Upgrade", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "agent", "type": "address"}], "name": "UpgradeAgentSet", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "burner", "type": "address"}, {"indexed": false, "name": "burnedAmount", "type": "uint256"}], "name": "Burned", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}, {"indexed": true, "name": "spender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "devdoc": {"methods": {"allowance(address,address)": {"details": "Function to check the amount of tokens that an owner allowed to a spender.", "params": {"_owner": "address The address which owns the funds.", "_spender": "address The address which will spend the funds."}, "return": "A uint256 specifying the amount of tokens still available for the spender."}, "approve(address,uint256)": {"details": "Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729", "params": {"_spender": "The address which will spend the funds.", "_value": "The amount of tokens to be spent."}}, "balanceOf(address)": {"details": "Gets the balance of the specified address.", "params": {"_owner": "The address to query the the balance of."}, "return": "An uint256 representing the amount owned by the passed address."}, "decreaseApproval(address,uint256)": {"details": "Decrease the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[_spender] == 0. To decrement allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"_spender": "The address which will spend the funds.", "_subtractedValue": "The amount of tokens to decrease the allowance by."}}, "increaseApproval(address,uint256)": {"details": "Increase the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[_spender] == 0. To increment allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"_addedValue": "The amount of tokens to increase the allowance by.", "_spender": "The address which will spend the funds."}}, "recoverTokens(address)": {"details": "This will be invoked by the owner, when owner wants to rescue tokens", "params": {"token": "Token which will we rescue to the owner from the contract"}}, "tokensToBeReturned(address)": {"details": "Interface function, can be overwritten by the superclass", "params": {"token": "Token which balance we will check and return"}, "return": "The amount of tokens (in smallest denominator) the contract owns"}, "totalSupply()": {"details": "total number of tokens in existence"}, "transferFrom(address,address,uint256)": {"details": "Transfer tokens from one address to another", "params": {"_from": "address The address which you want to send tokens from", "_to": "address The address which you want to transfer to", "_value": "uint256 the amount of tokens to be transferred"}}, "transferOwnership(address)": {"details": "Allows the current owner to transfer control of the contract to a newOwner.", "params": {"newOwner": "The address to transfer ownership to."}}}}, "userdoc": {"methods": {"burn(uint256)": {"notice": "Burn extra tokens from a balance. "}, "canUpgrade()": {"notice": "Child contract can enable to provide the condition when the upgrade can begun."}, "getUpgradeState()": {"notice": "Get the state of the token upgrade."}, "releaseTokenTransfer()": {"notice": "One way function to perform the final token release."}, "setTokenInformation(string,string)": {"notice": "Owner can update token information here. * It is often useful to conceal the actual token association, until the token operations, like central issuance or reissuance have been completed. In this case the initial token can be supplied with empty name and symbol information. * This function allows the token owner to rename the token after the operations have been completed and then point the audience to use the token contract."}, "setUpgradeAgent(address)": {"notice": "Set an upgrade agent that handles"}, "setUpgradeMaster(address)": {"notice": "Change the upgrade master. * This allows us to set a new owner for the upgrade mechanism."}, "transfer(address,uint256)": {"notice": "Kill switch for the token in the case of distribution issue. "}, "upgrade(uint256)": {"notice": "Allow the token holder to upgrade some of their tokens to a new contract."}}}}, "settings": {"compilationTarget": {"contracts/CentrallyIssuedToken.sol": "CentrallyIssuedToken"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/BurnableToken.sol": {"keccak256": "0xb97707de2018141fb22482d7ad4faa35cd471ae2ed992343bbcc1be0d3b95218", "urls": ["bzzr://a8b275d0ee25a96664f613d48339250b11d5140d7b74122d74482c3a94cc5295"]}, "contracts/CentrallyIssuedToken.sol": {"keccak256": "0x352f64fa232126ae810d28a2d38fcae9edf8db0a10d42e8062294c2dd09def86", "urls": ["bzzr://1897a982b6e164c95ad34c77f4be36485525e1b74930ef6a5606a51bc05ba01e"]}, "contracts/Recoverable.sol": {"keccak256": "0x311a332cdd87df6e00057f5455f4e68b043b5dbe211f6d68bc64e20817515635", "urls": ["bzzr://4fd99bcfb93baed6e7c8d22ee9ecc5c8346a1aa98288e77b01333b2c5d3f582d"]}, "contracts/StandardTokenExt.sol": {"keccak256": "0x9ea2d4cec4dccd5639c05e6c23dd027d80b5e5a20abd99b280ab7b2631b5a5fc", "urls": ["bzzr://a52d8fc5a21bd83997aff19128e00dceb251df712207b61223894c8b7f42d5ff"]}, "contracts/UpgradeAgent.sol": {"keccak256": "0x88e793f72feca4a18d2cd06e6037c1413d7b963eabcf5626d60bfb9d04d6e8e6", "urls": ["bzzr://87e39a65cf25d539ab49ad7e759b3298b8a19272964e69e3f2432f0323f30025"]}, "contracts/UpgradeableToken.sol": {"keccak256": "0xa74fc300c514564ece81c86905502c2de674b69c0633b133af19c1ba027da2c9", "urls": ["bzzr://55bc0b908c94781462b8959f051c6dbb53c35641b0f8cb38d74632ad6bf95e52"]}, "zeppelin/contracts/math/SafeMath.sol": {"keccak256": "0x341ba8cb467a3623e819ba1a683ac1d264005186f308505214e5f6bc89446a08", "urls": ["bzzr://59b5652ee4e4a1b5a8f1a8906e14c84af43d636cf5ca0725cc1813aabe4c8c17"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}, "zeppelin/contracts/token/ERC20/BasicToken.sol": {"keccak256": "0x948404468d61ff35ea4194650670408dabd65da7f905a1c16888ab84520bf39e", "urls": ["bzzr://ea75e20f95d7e4e10394fe6bfaa8eee56b4757c2a6f1e8df4180d33afa621935"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}, "zeppelin/contracts/token/ERC20/StandardToken.sol": {"keccak256": "0xd2b344a5259e19ec143074cfa65637a10c40b68395c59808c4af13bccbb2de55", "urls": ["bzzr://d61a01175a7ca1ba9f4403de603c20b897e33ec425aef2d9f8a7f9ddfdfaf5b2"]}}, "version": 1}, "name": "CentrallyIssuedToken", "ordered_full_dependencies": [], "source_path": "contracts/CentrallyIssuedToken.sol", "source": "\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n assert(c / a == b);\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n\n\n\n/**\n * @title Basic token\n * @dev Basic version of StandardToken, with no allowances.\n */\ncontract BasicToken is ERC20Basic {\n using SafeMath for uint256;\n\n mapping(address => uint256) balances;\n\n uint256 totalSupply_;\n\n /**\n * @dev total number of tokens in existence\n */\n function totalSupply() public view returns (uint256) {\n return totalSupply_;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param _to The address to transfer to.\n * @param _value The amount to be transferred.\n */\n function transfer(address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[msg.sender]);\n\n // SafeMath.sub will throw if there is not enough balance.\n balances[msg.sender] = balances[msg.sender].sub(_value);\n balances[_to] = balances[_to].add(_value);\n Transfer(msg.sender, _to, _value);\n return true;\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param _owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address _owner) public view returns (uint256 balance) {\n return balances[_owner];\n }\n\n}\n\n\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n\n\n/**\n * @title Standard ERC20 token\n *\n * @dev Implementation of the basic standard token.\n * @dev https://github.com/ethereum/EIPs/issues/20\n * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol\n */\ncontract StandardToken is ERC20, BasicToken {\n\n mapping (address => mapping (address => uint256)) internal allowed;\n\n\n /**\n * @dev Transfer tokens from one address to another\n * @param _from address The address which you want to send tokens from\n * @param _to address The address which you want to transfer to\n * @param _value uint256 the amount of tokens to be transferred\n */\n function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[_from]);\n require(_value <= allowed[_from][msg.sender]);\n\n balances[_from] = balances[_from].sub(_value);\n balances[_to] = balances[_to].add(_value);\n allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);\n Transfer(_from, _to, _value);\n return true;\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n *\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param _spender The address which will spend the funds.\n * @param _value The amount of tokens to be spent.\n */\n function approve(address _spender, uint256 _value) public returns (bool) {\n allowed[msg.sender][_spender] = _value;\n Approval(msg.sender, _spender, _value);\n return true;\n }\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param _owner address The address which owns the funds.\n * @param _spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address _owner, address _spender) public view returns (uint256) {\n return allowed[_owner][_spender];\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(address _spender, uint _addedValue) public returns (bool) {\n allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {\n uint oldValue = allowed[msg.sender][_spender];\n if (_subtractedValue > oldValue) {\n allowed[msg.sender][_spender] = 0;\n } else {\n allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);\n }\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n\ncontract Recoverable is Ownable {\n\n /// @dev Empty constructor (for now)\n function Recoverable() {\n }\n\n /// @dev This will be invoked by the owner, when owner wants to rescue tokens\n /// @param token Token which will we rescue to the owner from the contract\n function recoverTokens(ERC20Basic token) onlyOwner public {\n token.transfer(owner, tokensToBeReturned(token));\n }\n\n /// @dev Interface function, can be overwritten by the superclass\n /// @param token Token which balance we will check and return\n /// @return The amount of tokens (in smallest denominator) the contract owns\n function tokensToBeReturned(ERC20Basic token) public returns (uint) {\n return token.balanceOf(this);\n }\n}\n\n\n\n/**\n * Standard EIP-20 token with an interface marker.\n *\n * @notice Interface marker is used by crowdsale contracts to validate that addresses point a good token contract.\n *\n */\ncontract StandardTokenExt is StandardToken, Recoverable {\n\n /* Interface declaration */\n function isToken() public constant returns (bool weAre) {\n return true;\n }\n}\n\n\ncontract BurnableToken is StandardTokenExt {\n\n // @notice An address for the transfer event where the burned tokens are transferred in a faux Transfer event\n address public constant BURN_ADDRESS = 0;\n\n /** How many tokens we burned */\n event Burned(address burner, uint burnedAmount);\n\n /**\n * Burn extra tokens from a balance.\n *\n */\n function burn(uint burnAmount) {\n address burner = msg.sender;\n balances[burner] = balances[burner].sub(burnAmount);\n totalSupply_ = totalSupply_.sub(burnAmount);\n Burned(burner, burnAmount);\n\n // Inform the blockchain explores that track the\n // balances only by a transfer event that the balance in this\n // address has decreased\n Transfer(burner, BURN_ADDRESS, burnAmount);\n }\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Upgrade agent interface inspired by Lunyr.\n *\n * Upgrade agent transfers tokens to a new contract.\n * Upgrade agent itself can be the token contract, or just a middle man contract doing the heavy lifting.\n */\ncontract UpgradeAgent {\n\n uint public originalSupply;\n\n /** Interface marker */\n function isUpgradeAgent() public constant returns (bool) {\n return true;\n }\n\n function upgradeFrom(address _from, uint256 _value) public;\n\n}\n\n\n/**\n * A token upgrade mechanism where users can opt-in amount of tokens to the next smart contract revision.\n *\n * First envisioned by Golem and Lunyr projects.\n */\ncontract UpgradeableToken is StandardTokenExt {\n\n /** Contract / person who can set the upgrade path. This can be the same as team multisig wallet, as what it is with its default value. */\n address public upgradeMaster;\n\n /** The next contract where the tokens will be migrated. */\n UpgradeAgent public upgradeAgent;\n\n /** How many tokens we have upgraded by now. */\n uint256 public totalUpgraded;\n\n /**\n * Upgrade states.\n *\n * - NotAllowed: The child contract has not reached a condition where the upgrade can bgun\n * - WaitingForAgent: Token allows upgrade, but we don't have a new agent yet\n * - ReadyToUpgrade: The agent is set, but not a single token has been upgraded yet\n * - Upgrading: Upgrade agent is set and the balance holders can upgrade their tokens\n *\n */\n enum UpgradeState {Unknown, NotAllowed, WaitingForAgent, ReadyToUpgrade, Upgrading}\n\n /**\n * Somebody has upgraded some of his tokens.\n */\n event Upgrade(address indexed _from, address indexed _to, uint256 _value);\n\n /**\n * New upgrade agent available.\n */\n event UpgradeAgentSet(address agent);\n\n /**\n * Do not allow construction without upgrade master set.\n */\n function UpgradeableToken(address _upgradeMaster) {\n upgradeMaster = _upgradeMaster;\n }\n\n /**\n * Allow the token holder to upgrade some of their tokens to a new contract.\n */\n function upgrade(uint256 value) public {\n\n UpgradeState state = getUpgradeState();\n if(!(state == UpgradeState.ReadyToUpgrade || state == UpgradeState.Upgrading)) {\n // Called in a bad state\n throw;\n }\n\n // Validate input value.\n if (value == 0) throw;\n\n balances[msg.sender] = balances[msg.sender].sub(value);\n\n // Take tokens out from circulation\n totalSupply_ = totalSupply_.sub(value);\n totalUpgraded = totalUpgraded.add(value);\n\n // Upgrade agent reissues the tokens\n upgradeAgent.upgradeFrom(msg.sender, value);\n Upgrade(msg.sender, upgradeAgent, value);\n }\n\n /**\n * Set an upgrade agent that handles\n */\n function setUpgradeAgent(address agent) external {\n\n if(!canUpgrade()) {\n // The token is not yet in a state that we could think upgrading\n throw;\n }\n\n if (agent == 0x0) throw;\n // Only a master can designate the next agent\n if (msg.sender != upgradeMaster) throw;\n // Upgrade has already begun for an agent\n if (getUpgradeState() == UpgradeState.Upgrading) throw;\n\n upgradeAgent = UpgradeAgent(agent);\n\n // Bad interface\n if(!upgradeAgent.isUpgradeAgent()) throw;\n // Make sure that token supplies match in source and target\n if (upgradeAgent.originalSupply() != totalSupply_) throw;\n\n UpgradeAgentSet(upgradeAgent);\n }\n\n /**\n * Get the state of the token upgrade.\n */\n function getUpgradeState() public constant returns(UpgradeState) {\n if(!canUpgrade()) return UpgradeState.NotAllowed;\n else if(address(upgradeAgent) == 0x00) return UpgradeState.WaitingForAgent;\n else if(totalUpgraded == 0) return UpgradeState.ReadyToUpgrade;\n else return UpgradeState.Upgrading;\n }\n\n /**\n * Change the upgrade master.\n *\n * This allows us to set a new owner for the upgrade mechanism.\n */\n function setUpgradeMaster(address master) public {\n if (master == 0x0) throw;\n if (msg.sender != upgradeMaster) throw;\n upgradeMaster = master;\n }\n\n /**\n * Child contract can enable to provide the condition when the upgrade can begun.\n */\n function canUpgrade() public constant returns(bool) {\n return true;\n }\n\n}\n\n\n\n/**\n * Centrally issued Ethereum token.\n *\n * We mix in burnable and upgradeable traits.\n *\n * Token supply is created in the token contract creation and allocated to owner.\n * The owner can then transfer from its supply to crowdsale participants.\n * The owner, or anybody, can burn any excessive tokens they are holding.\n *\n */\ncontract CentrallyIssuedToken is BurnableToken, UpgradeableToken {\n\n // Token meta information\n string public name;\n string public symbol;\n uint public decimals;\n\n // Token release switch\n bool public released = false;\n\n // The date before the release must be finalized or upgrade path will be forced\n uint public releaseFinalizationDate;\n\n /** Name and symbol were updated. */\n event UpdatedTokenInformation(string newName, string newSymbol);\n\n function CentrallyIssuedToken(address _owner, string _name, string _symbol, uint _totalSupply, uint _decimals, uint _releaseFinalizationDate) UpgradeableToken(_owner) {\n name = _name;\n symbol = _symbol;\n totalSupply_ = _totalSupply;\n decimals = _decimals;\n\n // Allocate initial balance to the owner\n balances[_owner] = _totalSupply;\n\n releaseFinalizationDate = _releaseFinalizationDate;\n }\n\n /**\n * Owner can update token information here.\n *\n * It is often useful to conceal the actual token association, until\n * the token operations, like central issuance or reissuance have been completed.\n * In this case the initial token can be supplied with empty name and symbol information.\n *\n * This function allows the token owner to rename the token after the operations\n * have been completed and then point the audience to use the token contract.\n */\n function setTokenInformation(string _name, string _symbol) {\n\n if(msg.sender != upgradeMaster) {\n throw;\n }\n\n name = _name;\n symbol = _symbol;\n UpdatedTokenInformation(name, symbol);\n }\n\n\n /**\n * Kill switch for the token in the case of distribution issue.\n *\n */\n function transfer(address _to, uint _value) returns (bool success) {\n\n if(now > releaseFinalizationDate) {\n if(!released) {\n throw;\n }\n }\n\n return super.transfer(_to, _value);\n }\n\n /**\n * One way function to perform the final token release.\n */\n function releaseTokenTransfer() {\n if(msg.sender != upgradeMaster) {\n throw;\n }\n\n released = true;\n }\n}\n"}, "CheckpointToken": {"abi": [{"constant": true, "inputs": [], "name": "name", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "approve", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "addedValue", "type": "uint256"}, {"name": "data", "type": "bytes"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "tokenCount", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "from", "type": "address"}, {"name": "to", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "decimals", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "owner", "type": "address"}, {"name": "blockNumber", "type": "uint256"}], "name": "balanceAt", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "receiver", "type": "address"}, {"name": "amount", "type": "uint256"}, {"name": "data", "type": "bytes"}], "name": "transferAndCall", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}, {"name": "", "type": "uint256"}], "name": "tokenBalances", "outputs": [{"name": "blockNumber", "type": "uint256"}, {"name": "value", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "uint256"}], "name": "tokensTotal", "outputs": [{"name": "blockNumber", "type": "uint256"}, {"name": "value", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}, {"name": "", "type": "address"}], "name": "allowed", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "subtractedValue", "type": "uint256"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "owner", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "subtractedValue", "type": "uint256"}, {"name": "data", "type": "bytes"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "transferVerifier", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "symbol", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "blockNumber", "type": "uint256"}], "name": "totalSupplyAt", "outputs": [{"name": "tokenCount", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "to", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "addedValue", "type": "uint256"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "owner", "type": "address"}, {"name": "spender", "type": "address"}], "name": "allowance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [{"name": "_name", "type": "string"}, {"name": "_symbol", "type": "string"}, {"name": "_decimals", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "from", "type": "address"}, {"indexed": false, "name": "receiver", "type": "address"}, {"indexed": false, "name": "amount", "type": "uint256"}, {"indexed": false, "name": "data", "type": "bytes"}], "name": "ERC677Transfer", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}, {"indexed": true, "name": "spender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "bytecode": "0x60806040523480156200001157600080fd5b506040516200128d3803806200128d83398101604090815281516020808401519284015191840180519094939093019262000053916000919086019062000076565b5081516200006990600190602085019062000076565b50600255506200011b9050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620000b957805160ff1916838001178555620000e9565b82800160010185558215620000e9579182015b82811115620000e9578251825591602001919060010190620000cc565b50620000f7929150620000fb565b5090565b6200011891905b80821115620000f7576000815560010162000102565b90565b611162806200012b6000396000f3006080604052600436106101115763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde038114610116578063095ea7b3146101a057806316ca3b63146101d857806318160ddd1461024157806323b872dd14610268578063313ce567146102925780633b8e6f2e146102a75780634000aea0146102cb57806348ff5665146103345780634f0092ab146103715780635c6581651461038957806366188463146103b057806370a08231146103d45780637272ad49146103f55780638daed5281461045e57806395d89b411461048f578063981b24d0146104a4578063a9059cbb146104bc578063d73dd623146104e0578063dd62ed3e14610504575b600080fd5b34801561012257600080fd5b5061012b61052b565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561016557818101518382015260200161014d565b50505050905090810190601f1680156101925780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101ac57600080fd5b506101c4600160a060020a03600435166024356105b9565b604080519115158252519081900360200190f35b3480156101e457600080fd5b50604080516020600460443581810135601f81018490048402850184019095528484526101c4948235600160a060020a031694602480359536959460649492019190819084018382808284375094975061061f9650505050505050565b34801561024d57600080fd5b506102566106cf565b60408051918252519081900360200190f35b34801561027457600080fd5b506101c4600160a060020a03600435811690602435166044356106e1565b34801561029e57600080fd5b50610256610771565b3480156102b357600080fd5b50610256600160a060020a0360043516602435610777565b3480156102d757600080fd5b50604080516020600460443581810135601f81018490048402850184019095528484526101c4948235600160a060020a03169460248035953695946064949201919081908401838280828437509497506107999650505050505050565b34801561034057600080fd5b50610358600160a060020a03600435166024356109a2565b6040805192835260208301919091528051918290030190f35b34801561037d57600080fd5b506103586004356109dd565b34801561039557600080fd5b50610256600160a060020a0360043581169060243516610a09565b3480156103bc57600080fd5b506101c4600160a060020a0360043516602435610a26565b3480156103e057600080fd5b50610256600160a060020a0360043516610b16565b34801561040157600080fd5b50604080516020600460443581810135601f81018490048402850184019095528484526101c4948235600160a060020a0316946024803595369594606494920191908190840183828082843750949750610b3e9650505050505050565b34801561046a57600080fd5b50610473610b60565b60408051600160a060020a039092168252519081900360200190f35b34801561049b57600080fd5b5061012b610b6f565b3480156104b057600080fd5b50610256600435610bc9565b3480156104c857600080fd5b506101c4600160a060020a0360043516602435610bd6565b3480156104ec57600080fd5b506101c4600160a060020a0360043516602435610c2c565b34801561051057600080fd5b50610256600160a060020a0360043581169060243516610cc5565b6000805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156105b15780601f10610586576101008083540402835291602001916105b1565b820191906000526020600020905b81548152906001019060200180831161059457829003601f168201915b505050505081565b336000818152600660209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b6000600160a060020a03841630141561063757600080fd5b6106418484610c2c565b5083600160a060020a03168260405180828051906020019080838360005b8381101561067757818101518382015260200161065f565b50505050905090810190601f1680156106a45780820380516001836020036101000a031916815260200191505b509150506000604051808303816000865af191505015156106c457600080fd5b5060015b9392505050565b60006106dc600543610cf0565b905090565b600160a060020a038316600090815260066020908152604080832033845290915281205482111561071157600080fd5b61071c848484610d06565b82600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a35060019392505050565b60025481565b600160a060020a03821660009081526004602052604081206106c89083610cf0565b60006107a58484610bd6565b15156107b057600080fd5b7f72db2339068fd324bbc28f2944e01064da539ac76064b6ce4a97a5f81de43dd6338585856040518085600160a060020a0316600160a060020a0316815260200184600160a060020a0316600160a060020a0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610848578181015183820152602001610830565b50505050905090810190601f1680156108755780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a183600160a060020a031663c0ee0b8a3385856040518463ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018084600160a060020a0316600160a060020a0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561091d578181015183820152602001610905565b50505050905090810190601f16801561094a5780820380516001836020036101000a031916815260200191505b50945050505050602060405180830381600087803b15801561096b57600080fd5b505af115801561097f573d6000803e3d6000fd5b505050506040513d602081101561099557600080fd5b505115156106c857600080fd5b6004602052816000526040600020818154811015156109bd57fe5b600091825260209091206002909102018054600190910154909250905082565b60058054829081106109eb57fe5b60009182526020909120600290910201805460019091015490915082565b600660209081526000928352604080842090915290825290205481565b336000908152600660209081526040808320600160a060020a038616845290915281205480831115610a7b57336000908152600660209081526040808320600160a060020a0388168452909152812055610ab0565b610a8b818463ffffffff610e4716565b336000908152600660209081526040808320600160a060020a03891684529091529020555b336000818152600660209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a0381166000908152600460205260408120610b389043610cf0565b92915050565b6000600160a060020a038416301415610b5657600080fd5b6106418484610a26565b600354600160a060020a031681565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156105b15780601f10610586576101008083540402835291602001916105b1565b6000610b38600583610cf0565b6000610be3338484610d06565b604080518381529051600160a060020a0385169133917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a350600192915050565b336000908152600660209081526040808320600160a060020a0386168452909152812054610c60908363ffffffff610e5916565b336000818152600660209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a03918216600090815260066020908152604080832093909416825291909152205490565b600080610cfd8484610e68565b95945050505050565b600080610d1285610b16565b9150610d1d84610b16565b600354909150600160a060020a031615610de357600354604080517fad076994000000000000000000000000000000000000000000000000000000008152600160a060020a0388811660048301528781166024830152604482018790529151919092169163ad0769949160648083019260209291908290030181600087803b158015610da857600080fd5b505af1158015610dbc573d6000803e3d6000fd5b505050506040513d6020811015610dd257600080fd5b5051925060008311610de357600080fd5b600160a060020a0385166000908152600460205260409020610e1490610e0f848663ffffffff610e4716565b611048565b600160a060020a0384166000908152600460205260409020610e4090610e0f838663ffffffff610e5916565b5050505050565b600082821115610e5357fe5b50900390565b6000828201838110156106c857fe5b6000806000806000868054905060001415610e89576000945084935061103e565b86548790610e9e90600163ffffffff610e4716565b81548110610ea857fe5b60009182526020909120600290910201548610610f295786548790610ed490600163ffffffff610e4716565b81548110610ede57fe5b600091825260209091206002909102015487548890610f0490600163ffffffff610e4716565b81548110610f0e57fe5b9060005260206000209060020201600101549450945061103e565b866000815481101515610f3857fe5b906000526020600020906002020160000154861015610f5d576000945084935061103e565b865460009350610f7490600163ffffffff610e4716565b91505b82821115610ff957610fb16002610fa5610f9886600163ffffffff610e5916565b859063ffffffff610e5916565b9063ffffffff61111f16565b9050858782815481101515610fc257fe5b600091825260209091206002909102015411610fe057809250610ff4565b610ff181600163ffffffff610e4716565b91505b610f77565b868381548110151561100757fe5b906000526020600020906002020160000154878481548110151561102757fe5b906000526020600020906002020160010154945094505b5050509250929050565b81541580611086575081544390839061106890600163ffffffff610e4716565b8154811061107257fe5b906000526020600020906002020160000154105b156110c857604080518082019091524381526020808201838152845460018181018755600087815293909320935160029091029093019283555191015561111b565b6040805180820190915243815260208101829052825483906110f190600163ffffffff610e4716565b815481106110fb57fe5b600091825260209182902083516002909202019081559101516001909101555b5050565b600080828481151561112d57fe5b049493505050505600a165627a7a72305820180ea1371400a89e7d311971aa899363578b9ff567f67e2712a9baa5980517600029", "bytecode_runtime": "0x6080604052600436106101115763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde038114610116578063095ea7b3146101a057806316ca3b63146101d857806318160ddd1461024157806323b872dd14610268578063313ce567146102925780633b8e6f2e146102a75780634000aea0146102cb57806348ff5665146103345780634f0092ab146103715780635c6581651461038957806366188463146103b057806370a08231146103d45780637272ad49146103f55780638daed5281461045e57806395d89b411461048f578063981b24d0146104a4578063a9059cbb146104bc578063d73dd623146104e0578063dd62ed3e14610504575b600080fd5b34801561012257600080fd5b5061012b61052b565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561016557818101518382015260200161014d565b50505050905090810190601f1680156101925780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101ac57600080fd5b506101c4600160a060020a03600435166024356105b9565b604080519115158252519081900360200190f35b3480156101e457600080fd5b50604080516020600460443581810135601f81018490048402850184019095528484526101c4948235600160a060020a031694602480359536959460649492019190819084018382808284375094975061061f9650505050505050565b34801561024d57600080fd5b506102566106cf565b60408051918252519081900360200190f35b34801561027457600080fd5b506101c4600160a060020a03600435811690602435166044356106e1565b34801561029e57600080fd5b50610256610771565b3480156102b357600080fd5b50610256600160a060020a0360043516602435610777565b3480156102d757600080fd5b50604080516020600460443581810135601f81018490048402850184019095528484526101c4948235600160a060020a03169460248035953695946064949201919081908401838280828437509497506107999650505050505050565b34801561034057600080fd5b50610358600160a060020a03600435166024356109a2565b6040805192835260208301919091528051918290030190f35b34801561037d57600080fd5b506103586004356109dd565b34801561039557600080fd5b50610256600160a060020a0360043581169060243516610a09565b3480156103bc57600080fd5b506101c4600160a060020a0360043516602435610a26565b3480156103e057600080fd5b50610256600160a060020a0360043516610b16565b34801561040157600080fd5b50604080516020600460443581810135601f81018490048402850184019095528484526101c4948235600160a060020a0316946024803595369594606494920191908190840183828082843750949750610b3e9650505050505050565b34801561046a57600080fd5b50610473610b60565b60408051600160a060020a039092168252519081900360200190f35b34801561049b57600080fd5b5061012b610b6f565b3480156104b057600080fd5b50610256600435610bc9565b3480156104c857600080fd5b506101c4600160a060020a0360043516602435610bd6565b3480156104ec57600080fd5b506101c4600160a060020a0360043516602435610c2c565b34801561051057600080fd5b50610256600160a060020a0360043581169060243516610cc5565b6000805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156105b15780601f10610586576101008083540402835291602001916105b1565b820191906000526020600020905b81548152906001019060200180831161059457829003601f168201915b505050505081565b336000818152600660209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b6000600160a060020a03841630141561063757600080fd5b6106418484610c2c565b5083600160a060020a03168260405180828051906020019080838360005b8381101561067757818101518382015260200161065f565b50505050905090810190601f1680156106a45780820380516001836020036101000a031916815260200191505b509150506000604051808303816000865af191505015156106c457600080fd5b5060015b9392505050565b60006106dc600543610cf0565b905090565b600160a060020a038316600090815260066020908152604080832033845290915281205482111561071157600080fd5b61071c848484610d06565b82600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a35060019392505050565b60025481565b600160a060020a03821660009081526004602052604081206106c89083610cf0565b60006107a58484610bd6565b15156107b057600080fd5b7f72db2339068fd324bbc28f2944e01064da539ac76064b6ce4a97a5f81de43dd6338585856040518085600160a060020a0316600160a060020a0316815260200184600160a060020a0316600160a060020a0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610848578181015183820152602001610830565b50505050905090810190601f1680156108755780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a183600160a060020a031663c0ee0b8a3385856040518463ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018084600160a060020a0316600160a060020a0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561091d578181015183820152602001610905565b50505050905090810190601f16801561094a5780820380516001836020036101000a031916815260200191505b50945050505050602060405180830381600087803b15801561096b57600080fd5b505af115801561097f573d6000803e3d6000fd5b505050506040513d602081101561099557600080fd5b505115156106c857600080fd5b6004602052816000526040600020818154811015156109bd57fe5b600091825260209091206002909102018054600190910154909250905082565b60058054829081106109eb57fe5b60009182526020909120600290910201805460019091015490915082565b600660209081526000928352604080842090915290825290205481565b336000908152600660209081526040808320600160a060020a038616845290915281205480831115610a7b57336000908152600660209081526040808320600160a060020a0388168452909152812055610ab0565b610a8b818463ffffffff610e4716565b336000908152600660209081526040808320600160a060020a03891684529091529020555b336000818152600660209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a0381166000908152600460205260408120610b389043610cf0565b92915050565b6000600160a060020a038416301415610b5657600080fd5b6106418484610a26565b600354600160a060020a031681565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156105b15780601f10610586576101008083540402835291602001916105b1565b6000610b38600583610cf0565b6000610be3338484610d06565b604080518381529051600160a060020a0385169133917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a350600192915050565b336000908152600660209081526040808320600160a060020a0386168452909152812054610c60908363ffffffff610e5916565b336000818152600660209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a03918216600090815260066020908152604080832093909416825291909152205490565b600080610cfd8484610e68565b95945050505050565b600080610d1285610b16565b9150610d1d84610b16565b600354909150600160a060020a031615610de357600354604080517fad076994000000000000000000000000000000000000000000000000000000008152600160a060020a0388811660048301528781166024830152604482018790529151919092169163ad0769949160648083019260209291908290030181600087803b158015610da857600080fd5b505af1158015610dbc573d6000803e3d6000fd5b505050506040513d6020811015610dd257600080fd5b5051925060008311610de357600080fd5b600160a060020a0385166000908152600460205260409020610e1490610e0f848663ffffffff610e4716565b611048565b600160a060020a0384166000908152600460205260409020610e4090610e0f838663ffffffff610e5916565b5050505050565b600082821115610e5357fe5b50900390565b6000828201838110156106c857fe5b6000806000806000868054905060001415610e89576000945084935061103e565b86548790610e9e90600163ffffffff610e4716565b81548110610ea857fe5b60009182526020909120600290910201548610610f295786548790610ed490600163ffffffff610e4716565b81548110610ede57fe5b600091825260209091206002909102015487548890610f0490600163ffffffff610e4716565b81548110610f0e57fe5b9060005260206000209060020201600101549450945061103e565b866000815481101515610f3857fe5b906000526020600020906002020160000154861015610f5d576000945084935061103e565b865460009350610f7490600163ffffffff610e4716565b91505b82821115610ff957610fb16002610fa5610f9886600163ffffffff610e5916565b859063ffffffff610e5916565b9063ffffffff61111f16565b9050858782815481101515610fc257fe5b600091825260209091206002909102015411610fe057809250610ff4565b610ff181600163ffffffff610e4716565b91505b610f77565b868381548110151561100757fe5b906000526020600020906002020160000154878481548110151561102757fe5b906000526020600020906002020160010154945094505b5050509250929050565b81541580611086575081544390839061106890600163ffffffff610e4716565b8154811061107257fe5b906000526020600020906002020160000154105b156110c857604080518082019091524381526020808201838152845460018181018755600087815293909320935160029091029093019283555191015561111b565b6040805180820190915243815260208101829052825483906110f190600163ffffffff610e4716565b815481106110fb57fe5b600091825260209182902083516002909202019081559101516001909101555b5050565b600080828481151561112d57fe5b049493505050505600a165627a7a72305820180ea1371400a89e7d311971aa899363578b9ff567f67e2712a9baa5980517600029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": true, "inputs": [], "name": "name", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "approve", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "addedValue", "type": "uint256"}, {"name": "data", "type": "bytes"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "tokenCount", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "from", "type": "address"}, {"name": "to", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "decimals", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "owner", "type": "address"}, {"name": "blockNumber", "type": "uint256"}], "name": "balanceAt", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "receiver", "type": "address"}, {"name": "amount", "type": "uint256"}, {"name": "data", "type": "bytes"}], "name": "transferAndCall", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}, {"name": "", "type": "uint256"}], "name": "tokenBalances", "outputs": [{"name": "blockNumber", "type": "uint256"}, {"name": "value", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "uint256"}], "name": "tokensTotal", "outputs": [{"name": "blockNumber", "type": "uint256"}, {"name": "value", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}, {"name": "", "type": "address"}], "name": "allowed", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "subtractedValue", "type": "uint256"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "owner", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "subtractedValue", "type": "uint256"}, {"name": "data", "type": "bytes"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "transferVerifier", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "symbol", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "blockNumber", "type": "uint256"}], "name": "totalSupplyAt", "outputs": [{"name": "tokenCount", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "to", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "addedValue", "type": "uint256"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "owner", "type": "address"}, {"name": "spender", "type": "address"}], "name": "allowance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [{"name": "_name", "type": "string"}, {"name": "_symbol", "type": "string"}, {"name": "_decimals", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "from", "type": "address"}, {"indexed": false, "name": "receiver", "type": "address"}, {"indexed": false, "name": "amount", "type": "uint256"}, {"indexed": false, "name": "data", "type": "bytes"}], "name": "ERC677Transfer", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}, {"indexed": true, "name": "spender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "devdoc": {"author": "TokenMarket / Ville Sundell ", "methods": {"allowance(address,address)": {"details": "Function to check the amount of tokens that an owner allowed to a spender.", "params": {"owner": "address The address which owns the funds.", "spender": "address The address which will spend the funds."}, "return": "A uint256 specifying the amount of tokens still available for the spender."}, "approve(address,uint256)": {"details": "Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729", "params": {"spender": "The address which will spend the funds.", "value": "The amount of tokens to be spent."}, "return": "true if the call function was executed successfully"}, "balanceAt(address,uint256)": {"details": "Gets the balance of the specified address.", "params": {"blockNumber": "The block number we want to query for the balance.", "owner": "The address to query the the balance of."}, "return": "An uint256 representing the amount owned by the passed address."}, "balanceOf(address)": {"details": "Gets the balance of the specified address.", "params": {"owner": "The address to query the the balance of."}, "return": "An uint256 representing the amount owned by the passed address."}, "decreaseApproval(address,uint256)": {"details": "Decrease the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[spender] == 0. To decrement allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"spender": "The address which will spend the funds.", "subtractedValue": "The amount of tokens to decrease the allowance by."}}, "decreaseApproval(address,uint256,bytes)": {"details": "Addition to StandardToken methods. Decrease the amount of tokens that an owner allowed to a spender and execute a call with the sent data. * This is originally from OpenZeppelin. * approve should be called when allowed[spender] == 0. To decrement allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"data": "ABI-encoded contract call to call `spender` address.", "spender": "The address which will spend the funds.", "subtractedValue": "The amount of tokens to decrease the allowance by."}}, "increaseApproval(address,uint256)": {"details": "Increase the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[spender] == 0. To increment allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"addedValue": "The amount of tokens to increase the allowance by.", "spender": "The address which will spend the funds."}}, "increaseApproval(address,uint256,bytes)": {"details": "Addition to StandardToken methods. Increase the amount of tokens that an owner allowed to a spender and execute a call with the sent data. * This is originally from OpenZeppelin. * approve should be called when allowed[spender] == 0. To increment allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"addedValue": "The amount of tokens to increase the allowance by.", "data": "ABI-encoded contract call to call `spender` address.", "spender": "The address which will spend the funds."}}, "totalSupply()": {"details": "total number of tokens in existence", "return": "A uint256 specifying the total number of tokens in existence"}, "totalSupplyAt(uint256)": {"details": "total number of tokens in existence at the given block", "params": {"blockNumber": "The block number we want to query for the total supply"}, "return": "A uint256 specifying the total number of tokens at a given block"}, "transfer(address,uint256)": {"details": "transfer token for a specified address", "params": {"to": "The address to transfer to.", "value": "The amount to be transferred."}, "return": "true if the call function was executed successfully"}, "transferFrom(address,address,uint256)": {"details": "Transfer tokens from one address to another", "params": {"from": "address The address which you want to send tokens from", "to": "address The address which you want to transfer to", "value": "uint256 the amount of tokens to be transferred"}, "return": "true if the call function was executed successfully"}}}, "userdoc": {"methods": {}}}, "settings": {"compilationTarget": {"contracts/security-token/CheckpointToken.sol": "CheckpointToken"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/CrowdsaleToken.sol": {"keccak256": "0xa812687ac327cd19fac64667980e70d4fb72ef7f61dce477818d085cf0a915df", "urls": ["bzzr://826d9dda00ce341794e5bb05c78b1abb2728e3c631f7a542345dcfa9f3bd9c50"]}, "contracts/MintableToken.sol": {"keccak256": "0x650e1d6b2bedcd36508918357c7cf4f36fdd093cd0c4d6342f4dcd3bdcdd7578", "urls": ["bzzr://7ba2ac0480d428066a18727e2adb76ba56856ecd37b4420e801131ec8f8f4be3"]}, "contracts/Recoverable.sol": {"keccak256": "0x311a332cdd87df6e00057f5455f4e68b043b5dbe211f6d68bc64e20817515635", "urls": ["bzzr://4fd99bcfb93baed6e7c8d22ee9ecc5c8346a1aa98288e77b01333b2c5d3f582d"]}, "contracts/ReleasableToken.sol": {"keccak256": "0x2c50180d0c1eab1aa63a04da3ae87ee2c482665d2a1a42c5f05b11234a7edaf4", "urls": ["bzzr://10752c317eba5c42e2848722689cfee4fffb7bcb42f3346e1a20715d843798e8"]}, "contracts/SafeMathLib.sol": {"keccak256": "0x501bfe31e274b9a5591f7c540bdced4d4312e27d4f19599147c9bbca3d9c6b18", "urls": ["bzzr://a80935ebddb06c247d71372d4e5833ee029f08633bd0fe4a274a57009567e5b9"]}, "contracts/StandardTokenExt.sol": {"keccak256": "0x9ea2d4cec4dccd5639c05e6c23dd027d80b5e5a20abd99b280ab7b2631b5a5fc", "urls": ["bzzr://a52d8fc5a21bd83997aff19128e00dceb251df712207b61223894c8b7f42d5ff"]}, "contracts/UpgradeAgent.sol": {"keccak256": "0x88e793f72feca4a18d2cd06e6037c1413d7b963eabcf5626d60bfb9d04d6e8e6", "urls": ["bzzr://87e39a65cf25d539ab49ad7e759b3298b8a19272964e69e3f2432f0323f30025"]}, "contracts/UpgradeableToken.sol": {"keccak256": "0xa74fc300c514564ece81c86905502c2de674b69c0633b133af19c1ba027da2c9", "urls": ["bzzr://55bc0b908c94781462b8959f051c6dbb53c35641b0f8cb38d74632ad6bf95e52"]}, "contracts/security-token/CheckpointToken.sol": {"keccak256": "0x6df7f71b8c4d9edd19c9c8fbc5dadb6d03c62ad2840f3b4a1d11f558e64ab8c1", "urls": ["bzzr://cd1c4b5351981664ef90752d33c5230d61f1a15664b7f465f8e260778abb944a"]}, "contracts/security-token/ERC677.sol": {"keccak256": "0xf557f3e12aa7f5a23d40957d9ac216db0902997f70f856697529d55e9823e50a", "urls": ["bzzr://c924011b4a57d2eb355c276255fc7af284c2f5b20ece36957d23a2e058975349"]}, "contracts/security-token/ERC677Token.sol": {"keccak256": "0xd67b6b0d3c7e9def09554b11c35f3b609a87ae2ea0f5853f0ca745f7f6366866", "urls": ["bzzr://bcd0f5e4bad7064ea5d8fe4e4e8a276af4ebddc4c7c25703c2dd32ca9ff715f7"]}, "contracts/security-token/SecurityTransferAgent.sol": {"keccak256": "0x23b8a61926435e2c583480c0de72a99b4f7ec8a4213ffc46711f83ecdeaf9186", "urls": ["bzzr://36be13b6cf1389357679705bd18969409ecde684ace2d9c5b606d8986e0231cd"]}, "zeppelin/contracts/math/SafeMath.sol": {"keccak256": "0x341ba8cb467a3623e819ba1a683ac1d264005186f308505214e5f6bc89446a08", "urls": ["bzzr://59b5652ee4e4a1b5a8f1a8906e14c84af43d636cf5ca0725cc1813aabe4c8c17"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}, "zeppelin/contracts/ownership/Whitelist.sol": {"keccak256": "0x0b451cac6e2d6be139bd652fcaf0d31f4abd34fadd1d078db7089eb1f5519267", "urls": ["bzzr://42126e694194a0e1b616a90422905d50a1a19242110e33abecfe2bcb820b4beb"]}, "zeppelin/contracts/token/ERC20/BasicToken.sol": {"keccak256": "0x948404468d61ff35ea4194650670408dabd65da7f905a1c16888ab84520bf39e", "urls": ["bzzr://ea75e20f95d7e4e10394fe6bfaa8eee56b4757c2a6f1e8df4180d33afa621935"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}, "zeppelin/contracts/token/ERC20/StandardToken.sol": {"keccak256": "0xd2b344a5259e19ec143074cfa65637a10c40b68395c59808c4af13bccbb2de55", "urls": ["bzzr://d61a01175a7ca1ba9f4403de603c20b897e33ec425aef2d9f8a7f9ddfdfaf5b2"]}}, "version": 1}, "name": "CheckpointToken", "ordered_full_dependencies": [], "source_path": "contracts/security-token/CheckpointToken.sol", "source": "/**\n * This smart contract code is Copyright 2018 TokenMarket Ltd. For more information see https://tokenmarket.net\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n * NatSpec is used intentionally to cover also other than public functions\n * Solidity 0.4.18 is intentionally used: it's stable, and our framework is\n * based on that.\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n assert(c / a == b);\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n\n\n\n/**\n * @title Basic token\n * @dev Basic version of StandardToken, with no allowances.\n */\ncontract BasicToken is ERC20Basic {\n using SafeMath for uint256;\n\n mapping(address => uint256) balances;\n\n uint256 totalSupply_;\n\n /**\n * @dev total number of tokens in existence\n */\n function totalSupply() public view returns (uint256) {\n return totalSupply_;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param _to The address to transfer to.\n * @param _value The amount to be transferred.\n */\n function transfer(address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[msg.sender]);\n\n // SafeMath.sub will throw if there is not enough balance.\n balances[msg.sender] = balances[msg.sender].sub(_value);\n balances[_to] = balances[_to].add(_value);\n Transfer(msg.sender, _to, _value);\n return true;\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param _owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address _owner) public view returns (uint256 balance) {\n return balances[_owner];\n }\n\n}\n\n\n\n\n/**\n * @title Standard ERC20 token\n *\n * @dev Implementation of the basic standard token.\n * @dev https://github.com/ethereum/EIPs/issues/20\n * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol\n */\ncontract StandardToken is ERC20, BasicToken {\n\n mapping (address => mapping (address => uint256)) internal allowed;\n\n\n /**\n * @dev Transfer tokens from one address to another\n * @param _from address The address which you want to send tokens from\n * @param _to address The address which you want to transfer to\n * @param _value uint256 the amount of tokens to be transferred\n */\n function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[_from]);\n require(_value <= allowed[_from][msg.sender]);\n\n balances[_from] = balances[_from].sub(_value);\n balances[_to] = balances[_to].add(_value);\n allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);\n Transfer(_from, _to, _value);\n return true;\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n *\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param _spender The address which will spend the funds.\n * @param _value The amount of tokens to be spent.\n */\n function approve(address _spender, uint256 _value) public returns (bool) {\n allowed[msg.sender][_spender] = _value;\n Approval(msg.sender, _spender, _value);\n return true;\n }\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param _owner address The address which owns the funds.\n * @param _spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address _owner, address _spender) public view returns (uint256) {\n return allowed[_owner][_spender];\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(address _spender, uint _addedValue) public returns (bool) {\n allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {\n uint oldValue = allowed[msg.sender][_spender];\n if (_subtractedValue > oldValue) {\n allowed[msg.sender][_spender] = 0;\n } else {\n allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);\n }\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n\ncontract Recoverable is Ownable {\n\n /// @dev Empty constructor (for now)\n function Recoverable() {\n }\n\n /// @dev This will be invoked by the owner, when owner wants to rescue tokens\n /// @param token Token which will we rescue to the owner from the contract\n function recoverTokens(ERC20Basic token) onlyOwner public {\n token.transfer(owner, tokensToBeReturned(token));\n }\n\n /// @dev Interface function, can be overwritten by the superclass\n /// @param token Token which balance we will check and return\n /// @return The amount of tokens (in smallest denominator) the contract owns\n function tokensToBeReturned(ERC20Basic token) public returns (uint) {\n return token.balanceOf(this);\n }\n}\n\n\n\n/**\n * Standard EIP-20 token with an interface marker.\n *\n * @notice Interface marker is used by crowdsale contracts to validate that addresses point a good token contract.\n *\n */\ncontract StandardTokenExt is StandardToken, Recoverable {\n\n /* Interface declaration */\n function isToken() public constant returns (bool weAre) {\n return true;\n }\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Upgrade agent interface inspired by Lunyr.\n *\n * Upgrade agent transfers tokens to a new contract.\n * Upgrade agent itself can be the token contract, or just a middle man contract doing the heavy lifting.\n */\ncontract UpgradeAgent {\n\n uint public originalSupply;\n\n /** Interface marker */\n function isUpgradeAgent() public constant returns (bool) {\n return true;\n }\n\n function upgradeFrom(address _from, uint256 _value) public;\n\n}\n\n\n/**\n * A token upgrade mechanism where users can opt-in amount of tokens to the next smart contract revision.\n *\n * First envisioned by Golem and Lunyr projects.\n */\ncontract UpgradeableToken is StandardTokenExt {\n\n /** Contract / person who can set the upgrade path. This can be the same as team multisig wallet, as what it is with its default value. */\n address public upgradeMaster;\n\n /** The next contract where the tokens will be migrated. */\n UpgradeAgent public upgradeAgent;\n\n /** How many tokens we have upgraded by now. */\n uint256 public totalUpgraded;\n\n /**\n * Upgrade states.\n *\n * - NotAllowed: The child contract has not reached a condition where the upgrade can bgun\n * - WaitingForAgent: Token allows upgrade, but we don't have a new agent yet\n * - ReadyToUpgrade: The agent is set, but not a single token has been upgraded yet\n * - Upgrading: Upgrade agent is set and the balance holders can upgrade their tokens\n *\n */\n enum UpgradeState {Unknown, NotAllowed, WaitingForAgent, ReadyToUpgrade, Upgrading}\n\n /**\n * Somebody has upgraded some of his tokens.\n */\n event Upgrade(address indexed _from, address indexed _to, uint256 _value);\n\n /**\n * New upgrade agent available.\n */\n event UpgradeAgentSet(address agent);\n\n /**\n * Do not allow construction without upgrade master set.\n */\n function UpgradeableToken(address _upgradeMaster) {\n upgradeMaster = _upgradeMaster;\n }\n\n /**\n * Allow the token holder to upgrade some of their tokens to a new contract.\n */\n function upgrade(uint256 value) public {\n\n UpgradeState state = getUpgradeState();\n if(!(state == UpgradeState.ReadyToUpgrade || state == UpgradeState.Upgrading)) {\n // Called in a bad state\n throw;\n }\n\n // Validate input value.\n if (value == 0) throw;\n\n balances[msg.sender] = balances[msg.sender].sub(value);\n\n // Take tokens out from circulation\n totalSupply_ = totalSupply_.sub(value);\n totalUpgraded = totalUpgraded.add(value);\n\n // Upgrade agent reissues the tokens\n upgradeAgent.upgradeFrom(msg.sender, value);\n Upgrade(msg.sender, upgradeAgent, value);\n }\n\n /**\n * Set an upgrade agent that handles\n */\n function setUpgradeAgent(address agent) external {\n\n if(!canUpgrade()) {\n // The token is not yet in a state that we could think upgrading\n throw;\n }\n\n if (agent == 0x0) throw;\n // Only a master can designate the next agent\n if (msg.sender != upgradeMaster) throw;\n // Upgrade has already begun for an agent\n if (getUpgradeState() == UpgradeState.Upgrading) throw;\n\n upgradeAgent = UpgradeAgent(agent);\n\n // Bad interface\n if(!upgradeAgent.isUpgradeAgent()) throw;\n // Make sure that token supplies match in source and target\n if (upgradeAgent.originalSupply() != totalSupply_) throw;\n\n UpgradeAgentSet(upgradeAgent);\n }\n\n /**\n * Get the state of the token upgrade.\n */\n function getUpgradeState() public constant returns(UpgradeState) {\n if(!canUpgrade()) return UpgradeState.NotAllowed;\n else if(address(upgradeAgent) == 0x00) return UpgradeState.WaitingForAgent;\n else if(totalUpgraded == 0) return UpgradeState.ReadyToUpgrade;\n else return UpgradeState.Upgrading;\n }\n\n /**\n * Change the upgrade master.\n *\n * This allows us to set a new owner for the upgrade mechanism.\n */\n function setUpgradeMaster(address master) public {\n if (master == 0x0) throw;\n if (msg.sender != upgradeMaster) throw;\n upgradeMaster = master;\n }\n\n /**\n * Child contract can enable to provide the condition when the upgrade can begun.\n */\n function canUpgrade() public constant returns(bool) {\n return true;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n/**\n * Define interface for releasing the token transfer after a successful crowdsale.\n */\ncontract ReleasableToken is StandardTokenExt {\n\n /* The finalizer contract that allows unlift the transfer limits on this token */\n address public releaseAgent;\n\n /** A crowdsale contract can release us to the wild if ICO success. If false we are are in transfer lock up period.*/\n bool public released = false;\n\n /** Map of agents that are allowed to transfer tokens regardless of the lock down period. These are crowdsale contracts and possible the team multisig itself. */\n mapping (address => bool) public transferAgents;\n\n /**\n * Limit token transfer until the crowdsale is over.\n *\n */\n modifier canTransfer(address _sender) {\n\n if(!released) {\n if(!transferAgents[_sender]) {\n throw;\n }\n }\n\n _;\n }\n\n /**\n * Set the contract that can call release and make the token transferable.\n *\n * Design choice. Allow reset the release agent to fix fat finger mistakes.\n */\n function setReleaseAgent(address addr) onlyOwner inReleaseState(false) public {\n\n // We don't do interface check here as we might want to a normal wallet address to act as a release agent\n releaseAgent = addr;\n }\n\n /**\n * Owner can allow a particular address (a crowdsale contract) to transfer tokens despite the lock up period.\n */\n function setTransferAgent(address addr, bool state) onlyOwner inReleaseState(false) public {\n transferAgents[addr] = state;\n }\n\n /**\n * One way function to release the tokens to the wild.\n *\n * Can be called only from the release agent that is the final ICO contract. It is only called if the crowdsale has been success (first milestone reached).\n */\n function releaseTokenTransfer() public onlyReleaseAgent {\n released = true;\n }\n\n /** The function can be called only before or after the tokens have been releasesd */\n modifier inReleaseState(bool releaseState) {\n if(releaseState != released) {\n throw;\n }\n _;\n }\n\n /** The function can be called only by a whitelisted release agent. */\n modifier onlyReleaseAgent() {\n if(msg.sender != releaseAgent) {\n throw;\n }\n _;\n }\n\n function transfer(address _to, uint _value) canTransfer(msg.sender) returns (bool success) {\n // Call StandardToken.transfer()\n return super.transfer(_to, _value);\n }\n\n function transferFrom(address _from, address _to, uint _value) canTransfer(_from) returns (bool success) {\n // Call StandardToken.transferForm()\n return super.transferFrom(_from, _to, _value);\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Safe unsigned safe math.\n *\n * https://blog.aragon.one/library-driven-development-in-solidity-2bebcaf88736#.750gwtwli\n *\n * Originally from https://raw.githubusercontent.com/AragonOne/zeppelin-solidity/master/contracts/SafeMathLib.sol\n *\n * Maintained here until merged to mainline zeppelin-solidity.\n *\n */\nlibrary SafeMathLib {\n\n function times(uint a, uint b) returns (uint) {\n uint c = a * b;\n assert(a == 0 || c / a == b);\n return c;\n }\n\n function minus(uint a, uint b) returns (uint) {\n assert(b <= a);\n return a - b;\n }\n\n function plus(uint a, uint b) returns (uint) {\n uint c = a + b;\n assert(c>=a);\n return c;\n }\n\n}\n\n\n\n/**\n * A token that can increase its supply by another contract.\n *\n * This allows uncapped crowdsale by dynamically increasing the supply when money pours in.\n * Only mint agents, contracts whitelisted by owner, can mint new tokens.\n *\n */\ncontract MintableToken is StandardTokenExt {\n\n using SafeMathLib for uint;\n\n bool public mintingFinished = false;\n\n /** List of agents that are allowed to create new tokens */\n mapping (address => bool) public mintAgents;\n\n event MintingAgentChanged(address addr, bool state);\n event Minted(address receiver, uint amount);\n\n /**\n * Create new tokens and allocate them to an address..\n *\n * Only callably by a crowdsale contract (mint agent).\n */\n function mint(address receiver, uint amount) onlyMintAgent canMint public {\n totalSupply_ = totalSupply_.plus(amount);\n balances[receiver] = balances[receiver].plus(amount);\n\n // This will make the mint transaction apper in EtherScan.io\n // We can remove this after there is a standardized minting event\n Transfer(0, receiver, amount);\n }\n\n /**\n * Owner can allow a crowdsale contract to mint new tokens.\n */\n function setMintAgent(address addr, bool state) onlyOwner canMint public {\n mintAgents[addr] = state;\n MintingAgentChanged(addr, state);\n }\n\n modifier onlyMintAgent() {\n // Only crowdsale contracts are allowed to mint new tokens\n if(!mintAgents[msg.sender]) {\n throw;\n }\n _;\n }\n\n /** Make sure we are not done yet. */\n modifier canMint() {\n if(mintingFinished) throw;\n _;\n }\n}\n\n\n\n/**\n * A crowdsaled token.\n *\n * An ERC-20 token designed specifically for crowdsales with investor protection and further development path.\n *\n * - The token transfer() is disabled until the crowdsale is over\n * - The token contract gives an opt-in upgrade path to a new contract\n * - The same token can be part of several crowdsales through approve() mechanism\n * - The token can be capped (supply set in the constructor) or uncapped (crowdsale contract can mint new tokens)\n *\n */\ncontract CrowdsaleToken is ReleasableToken, MintableToken, UpgradeableToken {\n\n /** Name and symbol were updated. */\n event UpdatedTokenInformation(string newName, string newSymbol);\n\n string public name;\n\n string public symbol;\n\n uint public decimals;\n\n /**\n * Construct the token.\n *\n * This token must be created through a team multisig wallet, so that it is owned by that wallet.\n *\n * @param _name Token name\n * @param _symbol Token symbol - should be all caps\n * @param _initialSupply How many tokens we start with\n * @param _decimals Number of decimal places\n * @param _mintable Are new tokens created over the crowdsale or do we distribute only the initial supply? Note that when the token becomes transferable the minting always ends.\n */\n function CrowdsaleToken(string _name, string _symbol, uint _initialSupply, uint _decimals, bool _mintable)\n UpgradeableToken(msg.sender) {\n\n // Create any address, can be transferred\n // to team multisig via changeOwner(),\n // also remember to call setUpgradeMaster()\n owner = msg.sender;\n\n name = _name;\n symbol = _symbol;\n\n totalSupply_ = _initialSupply;\n\n decimals = _decimals;\n\n // Create initially all balance on the team multisig\n balances[owner] = totalSupply_;\n\n if(totalSupply_ > 0) {\n Minted(owner, totalSupply_);\n }\n\n // No more new supply allowed after the token creation\n if(!_mintable) {\n mintingFinished = true;\n if(totalSupply_ == 0) {\n throw; // Cannot create a token without supply and no minting\n }\n }\n }\n\n /**\n * When token is released to be transferable, enforce no new tokens can be created.\n */\n function releaseTokenTransfer() public onlyReleaseAgent {\n mintingFinished = true;\n super.releaseTokenTransfer();\n }\n\n /**\n * Allow upgrade agent functionality kick in only if the crowdsale was success.\n */\n function canUpgrade() public constant returns(bool) {\n return released && super.canUpgrade();\n }\n\n /**\n * Owner can update token information here.\n *\n * It is often useful to conceal the actual token association, until\n * the token operations, like central issuance or reissuance have been completed.\n *\n * This function allows the token owner to rename the token after the operations\n * have been completed and then point the audience to use the token contract.\n */\n function setTokenInformation(string _name, string _symbol) onlyOwner {\n name = _name;\n symbol = _symbol;\n\n UpdatedTokenInformation(name, symbol);\n }\n\n}\n\n\ninterface SecurityTransferAgent {\n function verify(address from, address to, uint256 value) public view returns (uint256 newValue);\n}\n\n\n\n\n\n\n\n/**\n * @title Whitelist\n * @dev The Whitelist contract has a whitelist of addresses, and provides basic authorization control functions.\n * @dev This simplifies the implementation of \"user permissions\".\n */\ncontract Whitelist is Ownable {\n mapping(address => bool) public whitelist;\n \n event WhitelistedAddressAdded(address addr);\n event WhitelistedAddressRemoved(address addr);\n\n /**\n * @dev Throws if called by any account that's not whitelisted.\n */\n modifier onlyWhitelisted() {\n require(whitelist[msg.sender]);\n _;\n }\n\n /**\n * @dev add an address to the whitelist\n * @param addr address\n * @return true if the address was added to the whitelist, false if the address was already in the whitelist \n */\n function addAddressToWhitelist(address addr) onlyOwner public returns(bool success) {\n if (!whitelist[addr]) {\n whitelist[addr] = true;\n WhitelistedAddressAdded(addr);\n success = true; \n }\n }\n\n /**\n * @dev add addresses to the whitelist\n * @param addrs addresses\n * @return true if at least one address was added to the whitelist, \n * false if all addresses were already in the whitelist \n */\n function addAddressesToWhitelist(address[] addrs) onlyOwner public returns(bool success) {\n for (uint256 i = 0; i < addrs.length; i++) {\n if (addAddressToWhitelist(addrs[i])) {\n success = true;\n }\n }\n }\n\n /**\n * @dev remove an address from the whitelist\n * @param addr address\n * @return true if the address was removed from the whitelist, \n * false if the address wasn't in the whitelist in the first place \n */\n function removeAddressFromWhitelist(address addr) onlyOwner public returns(bool success) {\n if (whitelist[addr]) {\n whitelist[addr] = false;\n WhitelistedAddressRemoved(addr);\n success = true;\n }\n }\n\n /**\n * @dev remove addresses from the whitelist\n * @param addrs addresses\n * @return true if at least one address was removed from the whitelist, \n * false if all addresses weren't in the whitelist in the first place\n */\n function removeAddressesFromWhitelist(address[] addrs) onlyOwner public returns(bool success) {\n for (uint256 i = 0; i < addrs.length; i++) {\n if (removeAddressFromWhitelist(addrs[i])) {\n success = true;\n }\n }\n }\n\n}\n\n\n\n\n\ninterface ERC677Receiver {\n function tokenFallback(address from, uint256 amount, bytes data) returns (bool success);\n}\n\ninterface ERC677 {\n\n // TODO: Have a different event name to make sure that tools with bad APIs do not mix this with ERC-20 Transfer() event that lacks data parameter\n event ERC677Transfer(address from, address receiver, uint256 amount, bytes data);\n\n function transferAndCall(ERC677Receiver receiver, uint amount, bytes data) returns (bool success);\n}\n\n\n\ncontract ERC677Token is ERC20, ERC677 {\n function transferAndCall(ERC677Receiver receiver, uint amount, bytes data) returns (bool success) {\n require(transfer(address(receiver), amount));\n\n ERC677Transfer(msg.sender, address(receiver), amount, data);\n\n require(receiver.tokenFallback(msg.sender, amount, data));\n }\n}\n\n\n/**\n * @author TokenMarket / Ville Sundell \n */\ncontract CheckpointToken is ERC677Token {\n using SafeMath for uint256; // We use only uint256 for safety reasons (no boxing)\n\n /// @dev Name of the token, usually the company and/or series (like \"TokenMeerkat Ltd. Series A\"):\n string public name;\n /// @dev Ticker symbol, usually bases on the \"name\" above (like \"MEER\"):\n string public symbol;\n /// @dev Decimals are usually set to 18 for EIP-20 tokens:\n uint256 public decimals;\n /// @dev If transferVerifier is set, that contract will be queried upon every token transaction:\n SecurityTransferAgent public transferVerifier;\n\n /// @dev Checkpoint is the fundamental unit for our internal accounting\n /// (who owns what, and at what moment in time)\n struct Checkpoint {\n uint256 blockNumber;\n uint256 value;\n }\n /// @dev This mapping contains checkpoints for every address:\n mapping (address => Checkpoint[]) public tokenBalances;\n /// @dev This is a one dimensional Checkpoint mapping of the overall token supply:\n Checkpoint[] public tokensTotal;\n\n /// @dev This mapping keeps account for approve() -> fransferFrom() pattern:\n mapping (address => mapping (address => uint256)) public allowed;\n\n /**\n * @dev Constructor for CheckpointToken, initializing the token\n *\n * Here we define initial values for name, symbol and decimals.\n *\n * @param _name Initial name of the token\n * @param _symbol Initial symbol of the token\n * @param _decimals Number of decimals for the token, industry standard is 18\n */\n function CheckpointToken(string _name, string _symbol, uint256 _decimals) public {\n name = _name;\n symbol = _symbol;\n decimals = _decimals;\n }\n\n /** PUBLIC FUNCTIONS\n ****************************************/\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param owner address The address which owns the funds.\n * @param spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address owner, address spender) public view returns (uint256) {\n return allowed[owner][spender];\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n *\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param spender The address which will spend the funds.\n * @param value The amount of tokens to be spent.\n * @return true if the call function was executed successfully\n */\n function approve(address spender, uint256 value) public returns (bool) {\n allowed[msg.sender][spender] = value;\n Approval(msg.sender, spender, value);\n return true;\n }\n\n /**\n * @dev Transfer tokens from one address to another\n * @param from address The address which you want to send tokens from\n * @param to address The address which you want to transfer to\n * @param value uint256 the amount of tokens to be transferred\n * @return true if the call function was executed successfully\n */\n function transferFrom(address from, address to, uint256 value) public returns (bool) {\n require(value <= allowed[from][msg.sender]);\n\n transferInternal(from, to, value);\n Transfer(from, to, value);\n return true;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param to The address to transfer to.\n * @param value The amount to be transferred.\n * @return true if the call function was executed successfully\n */\n function transfer(address to, uint256 value) public returns (bool) {\n transferInternal(msg.sender, to, value);\n Transfer(msg.sender, to, value);\n return true;\n }\n\n /**\n * @dev total number of tokens in existence\n * @return A uint256 specifying the total number of tokens in existence\n */\n function totalSupply() public view returns (uint256 tokenCount) {\n tokenCount = balanceAtBlock(tokensTotal, block.number);\n }\n\n /**\n * @dev total number of tokens in existence at the given block\n * @param blockNumber The block number we want to query for the total supply\n * @return A uint256 specifying the total number of tokens at a given block\n */\n function totalSupplyAt(uint256 blockNumber) public view returns (uint256 tokenCount) {\n tokenCount = balanceAtBlock(tokensTotal, blockNumber);\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address owner) public view returns (uint256 balance) {\n balance = balanceAtBlock(tokenBalances[owner], block.number);\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param owner The address to query the the balance of.\n * @param blockNumber The block number we want to query for the balance.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceAt(address owner, uint256 blockNumber) public view returns (uint256 balance) {\n balance = balanceAtBlock(tokenBalances[owner], blockNumber);\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param spender The address which will spend the funds.\n * @param addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(address spender, uint addedValue) public returns (bool) {\n allowed[msg.sender][spender] = allowed[msg.sender][spender].add(addedValue);\n Approval(msg.sender, spender, allowed[msg.sender][spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param spender The address which will spend the funds.\n * @param subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(address spender, uint subtractedValue) public returns (bool) {\n uint oldValue = allowed[msg.sender][spender];\n if (subtractedValue > oldValue) {\n allowed[msg.sender][spender] = 0;\n } else {\n allowed[msg.sender][spender] = oldValue.sub(subtractedValue);\n }\n Approval(msg.sender, spender, allowed[msg.sender][spender]);\n return true;\n }\n\n /**\n * @dev Addition to StandardToken methods. Increase the amount of tokens that\n * an owner allowed to a spender and execute a call with the sent data.\n *\n * This is originally from OpenZeppelin.\n *\n * approve should be called when allowed[spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param spender The address which will spend the funds.\n * @param addedValue The amount of tokens to increase the allowance by.\n * @param data ABI-encoded contract call to call `spender` address.\n */\n function increaseApproval(address spender, uint addedValue, bytes data) public returns (bool) {\n require(spender != address(this));\n\n increaseApproval(spender, addedValue);\n\n require(spender.call(data));\n\n return true;\n }\n\n /**\n * @dev Addition to StandardToken methods. Decrease the amount of tokens that\n * an owner allowed to a spender and execute a call with the sent data.\n *\n * This is originally from OpenZeppelin.\n *\n * approve should be called when allowed[spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param spender The address which will spend the funds.\n * @param subtractedValue The amount of tokens to decrease the allowance by.\n * @param data ABI-encoded contract call to call `spender` address.\n */\n function decreaseApproval(address spender, uint subtractedValue, bytes data) public returns (bool) {\n require(spender != address(this));\n\n decreaseApproval(spender, subtractedValue);\n\n require(spender.call(data));\n\n return true;\n }\n\n /** INTERNALS\n ****************************************/\n\n function balanceAtBlock(Checkpoint[] storage checkpoints, uint256 blockNumber) internal returns (uint256 balance) {\n uint256 currentBlockNumber;\n (currentBlockNumber, balance) = getCheckpoint(checkpoints, blockNumber);\n }\n\n function transferInternal(address from, address to, uint256 value) internal {\n uint256 fromBalance = balanceOf(from);\n uint256 toBalance = balanceOf(to);\n\n if (address(transferVerifier) != address(0)) {\n value = transferVerifier.verify(from, to, value);\n require(value > 0);\n }\n\n setCheckpoint(tokenBalances[from], fromBalance.sub(value));\n setCheckpoint(tokenBalances[to], toBalance.add(value));\n }\n\n\n /** CORE\n ** The Magic happens below:\n ***************************************/\n\n function setCheckpoint(Checkpoint[] storage checkpoints, uint256 newValue) internal {\n if ((checkpoints.length == 0) || (checkpoints[checkpoints.length.sub(1)].blockNumber < block.number)) {\n checkpoints.push(Checkpoint(block.number, newValue));\n } else {\n checkpoints[checkpoints.length.sub(1)] = Checkpoint(block.number, newValue);\n }\n }\n\n function getCheckpoint(Checkpoint[] storage checkpoints, uint256 blockNumber) internal returns (uint256 blockNumber_, uint256 value) {\n if (checkpoints.length == 0) {\n return (0, 0);\n }\n\n // Shortcut for the actual value\n if (blockNumber >= checkpoints[checkpoints.length.sub(1)].blockNumber) {\n return (checkpoints[checkpoints.length.sub(1)].blockNumber, checkpoints[checkpoints.length.sub(1)].value);\n }\n\n if (blockNumber < checkpoints[0].blockNumber) {\n return (0, 0);\n }\n\n // Binary search of the value in the array\n uint256 min = 0;\n uint256 max = checkpoints.length.sub(1);\n while (max > min) {\n uint256 mid = (max.add(min.add(1))).div(2);\n if (checkpoints[mid].blockNumber <= blockNumber) {\n min = mid;\n } else {\n max = mid.sub(1);\n }\n }\n\n return (checkpoints[min].blockNumber, checkpoints[min].value);\n }\n}\n"}, "Crowdsale": {"abi": [{"constant": true, "inputs": [], "name": "ownerTestValue", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "requireCustomerId", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "invest", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "isPricingSane", "outputs": [{"name": "sane", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "endsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "minimumFundingGoal", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getState", "outputs": [{"name": "", "type": "uint8"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setFinalizeAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "customerId", "type": "uint128"}, {"name": "v", "type": "uint8"}, {"name": "r", "type": "bytes32"}, {"name": "s", "type": "bytes32"}], "name": "investWithSignedAddress", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "investedAmountOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "finalizeAgent", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "receiver", "type": "address"}, {"name": "fullTokens", "type": "uint256"}, {"name": "weiPrice", "type": "uint256"}], "name": "preallocate", "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": "isCrowdsale", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "finalize", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_pricingStrategy", "type": "address"}], "name": "setPricingStrategy", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "tokensSold", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "refund", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "signerAddress", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "weiRefunded", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "halt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}, {"name": "checksum", "type": "bytes1"}], "name": "buyWithCustomerIdWithChecksum", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "time", "type": "uint256"}], "name": "setEndsAt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "pricingStrategy", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "loadedRefund", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isMinimumGoalReached", "outputs": [{"name": "reached", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "bool"}], "name": "setRequireCustomerId", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "loadRefund", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "val", "type": "uint256"}], "name": "setOwnerTestValue", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "weisTotal", "type": "uint256"}, {"name": "pricePerToken", "type": "uint256"}], "name": "calculateTokens", "outputs": [{"name": "tokensTotal", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "multisigWallet", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "tokenAmountOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}], "name": "buyWithCustomerId", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [{"name": "weiAmount", "type": "uint256"}, {"name": "tokenAmount", "type": "uint256"}, {"name": "weiRaisedTotal", "type": "uint256"}, {"name": "tokensSoldTotal", "type": "uint256"}], "name": "isBreakingCap", "outputs": [{"name": "limitBroken", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "buy", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "isFinalizerSane", "outputs": [{"name": "sane", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "startsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "finalized", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "halted", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "earlyParticipantWhitelist", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "unhalt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "requiredSignedAddress", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isCrowdsaleFull", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "investorCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "status", "type": "bool"}], "name": "setEarlyParicipantWhitelist", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "bool"}, {"name": "_signerAddress", "type": "address"}], "name": "setRequireSignedAddress", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "customerId", "type": "uint128"}], "name": "investWithCustomerId", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setMultisig", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}, {"name": "v", "type": "uint8"}, {"name": "r", "type": "bytes32"}, {"name": "s", "type": "bytes32"}], "name": "buyWithSignedAddress", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "presaleWeiRaised", "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": "_token", "type": "address"}, {"name": "_pricingStrategy", "type": "address"}, {"name": "_multisigWallet", "type": "address"}, {"name": "_start", "type": "uint256"}, {"name": "_end", "type": "uint256"}, {"name": "_minimumFundingGoal", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"payable": true, "stateMutability": "payable", "type": "fallback"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}, {"indexed": false, "name": "tokenAmount", "type": "uint256"}, {"indexed": false, "name": "customerId", "type": "uint128"}], "name": "Invested", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}], "name": "Refund", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newRequireCustomerId", "type": "bool"}, {"indexed": false, "name": "newRequiredSignedAddress", "type": "bool"}, {"indexed": false, "name": "newSignerAddress", "type": "address"}], "name": "InvestmentPolicyChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "addr", "type": "address"}, {"indexed": false, "name": "status", "type": "bool"}], "name": "Whitelisted", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newEndsAt", "type": "uint256"}], "name": "EndsAtChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "bytecode": "0x", "bytecode_runtime": "0x", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": null, "name": "Crowdsale", "ordered_full_dependencies": [], "source_path": "contracts/Crowdsale.sol"}, "CrowdsaleBase": {"abi": [{"constant": true, "inputs": [], "name": "ownerTestValue", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isPricingSane", "outputs": [{"name": "sane", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "endsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "minimumFundingGoal", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getState", "outputs": [{"name": "", "type": "uint8"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setFinalizeAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "investedAmountOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "finalizeAgent", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "weiRaised", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isCrowdsale", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "finalize", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_pricingStrategy", "type": "address"}], "name": "setPricingStrategy", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "tokensSold", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "refund", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "weiRefunded", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "halt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "time", "type": "uint256"}], "name": "setEndsAt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "pricingStrategy", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "loadedRefund", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isMinimumGoalReached", "outputs": [{"name": "reached", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "loadRefund", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "val", "type": "uint256"}], "name": "setOwnerTestValue", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "weisTotal", "type": "uint256"}, {"name": "pricePerToken", "type": "uint256"}], "name": "calculateTokens", "outputs": [{"name": "tokensTotal", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "multisigWallet", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "tokenAmountOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "weiAmount", "type": "uint256"}, {"name": "tokenAmount", "type": "uint256"}, {"name": "weiRaisedTotal", "type": "uint256"}, {"name": "tokensSoldTotal", "type": "uint256"}], "name": "isBreakingCap", "outputs": [{"name": "limitBroken", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isFinalizerSane", "outputs": [{"name": "sane", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "startsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "finalized", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "halted", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "earlyParticipantWhitelist", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "unhalt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "isCrowdsaleFull", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "investorCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "status", "type": "bool"}], "name": "setEarlyParicipantWhitelist", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setMultisig", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "presaleWeiRaised", "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": "_token", "type": "address"}, {"name": "_pricingStrategy", "type": "address"}, {"name": "_multisigWallet", "type": "address"}, {"name": "_start", "type": "uint256"}, {"name": "_end", "type": "uint256"}, {"name": "_minimumFundingGoal", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"payable": true, "stateMutability": "payable", "type": "fallback"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}, {"indexed": false, "name": "tokenAmount", "type": "uint256"}, {"indexed": false, "name": "customerId", "type": "uint128"}], "name": "Invested", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}], "name": "Refund", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newRequireCustomerId", "type": "bool"}, {"indexed": false, "name": "newRequiredSignedAddress", "type": "bool"}, {"indexed": false, "name": "newSignerAddress", "type": "address"}], "name": "InvestmentPolicyChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "addr", "type": "address"}, {"indexed": false, "name": "status", "type": "bool"}], "name": "Whitelisted", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newEndsAt", "type": "uint256"}], "name": "EndsAtChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "bytecode": "0x", "bytecode_runtime": "0x", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": null, "name": "CrowdsaleBase", "ordered_full_dependencies": [], "source_path": "contracts/CrowdsaleBase.sol"}, "CrowdsaleToken": {"abi": [{"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "state", "type": "bool"}], "name": "setTransferAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "mintingFinished", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "name", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "approve", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "recoverTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_from", "type": "address"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setReleaseAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "decimals", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "receiver", "type": "address"}, {"name": "amount", "type": "uint256"}], "name": "mint", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "mintAgents", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "state", "type": "bool"}], "name": "setMintAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "uint256"}], "name": "upgrade", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_name", "type": "string"}, {"name": "_symbol", "type": "string"}], "name": "setTokenInformation", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "upgradeAgent", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "releaseTokenTransfer", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "upgradeMaster", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_subtractedValue", "type": "uint256"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getUpgradeState", "outputs": [{"name": "", "type": "uint8"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "transferAgents", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "symbol", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "released", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "canUpgrade", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "tokensToBeReturned", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalUpgraded", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "releaseAgent", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_addedValue", "type": "uint256"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "agent", "type": "address"}], "name": "setUpgradeAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}, {"name": "_spender", "type": "address"}], "name": "allowance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isToken", "outputs": [{"name": "weAre", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "master", "type": "address"}], "name": "setUpgradeMaster", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [{"name": "_name", "type": "string"}, {"name": "_symbol", "type": "string"}, {"name": "_initialSupply", "type": "uint256"}, {"name": "_decimals", "type": "uint256"}, {"name": "_mintable", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newName", "type": "string"}, {"indexed": false, "name": "newSymbol", "type": "string"}], "name": "UpdatedTokenInformation", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "_from", "type": "address"}, {"indexed": true, "name": "_to", "type": "address"}, {"indexed": false, "name": "_value", "type": "uint256"}], "name": "Upgrade", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "agent", "type": "address"}], "name": "UpgradeAgentSet", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "addr", "type": "address"}, {"indexed": false, "name": "state", "type": "bool"}], "name": "MintingAgentChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "receiver", "type": "address"}, {"indexed": false, "name": "amount", "type": "uint256"}], "name": "Minted", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}, {"indexed": true, "name": "spender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "bytecode": "0x60806040526004805460a060020a60ff02191690556006805460ff191690553480156200002b57600080fd5b5060405162001c6038038062001c6083398101604090815281516020808401519284015160608501516080860151600380546008805433600160a060020a031991821681179092559182168117909116179055938601805190969590950194919390929091620000a291600b919088019062000164565b508351620000b890600c90602087019062000164565b506001839055600d829055600354600160a060020a03166000908152602081905260408120849055831115620001345760035460015460408051600160a060020a039093168352602083019190915280517f30385c845b448a36257a6a1716e6ad2e1bc2cbe333cde1e69fe849ad6511adfe9281900390910190a15b80151562000159576006805460ff191660019081179091555415156200015957600080fd5b505050505062000209565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620001a757805160ff1916838001178555620001d7565b82800160010185558215620001d7579182015b82811115620001d7578251825591602001919060010190620001ba565b50620001e5929150620001e9565b5090565b6200020691905b80821115620001e55760008155600101620001f0565b90565b611a4780620002196000396000f3006080604052600436106101b65763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166302f652a381146101bb57806305d2035b146101e357806306fdde031461020c578063095ea7b31461029657806316114acd146102ba57806318160ddd146102db57806323b872dd1461030257806329ff4f531461032c578063313ce5671461034d57806340c10f191461036257806342c1867b1461038657806343214675146103a757806345977d03146103cd5780634eee966f146103e55780635de4ccb01461047c5780635f412d4f146104ad578063600440cb146104c257806366188463146104d757806370a08231146104fb5780638444b3911461051c578063867c2857146105555780638da5cb5b1461057657806395d89b411461058b57806396132521146105a05780639738968c146105b5578063a9059cbb146105ca578063c45d19db146105ee578063c752ff621461060f578063d1f276d314610624578063d73dd62314610639578063d7e7088a1461065d578063dd62ed3e1461067e578063eefa597b146106a5578063f2fde38b146106ba578063ffeb7d75146106db575b600080fd5b3480156101c757600080fd5b506101e1600160a060020a036004351660243515156106fc565b005b3480156101ef57600080fd5b506101f861076a565b604080519115158252519081900360200190f35b34801561021857600080fd5b50610221610773565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561025b578181015183820152602001610243565b50505050905090810190601f1680156102885780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156102a257600080fd5b506101f8600160a060020a0360043516602435610801565b3480156102c657600080fd5b506101e1600160a060020a0360043516610867565b3480156102e757600080fd5b506102f0610937565b60408051918252519081900360200190f35b34801561030e57600080fd5b506101f8600160a060020a036004358116906024351660443561093e565b34801561033857600080fd5b506101e1600160a060020a03600435166109a2565b34801561035957600080fd5b506102f0610a14565b34801561036e57600080fd5b506101e1600160a060020a0360043516602435610a1a565b34801561039257600080fd5b506101f8600160a060020a0360043516610bf9565b3480156103b357600080fd5b506101e1600160a060020a03600435166024351515610c0e565b3480156103d957600080fd5b506101e1600435610c99565b3480156103f157600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526101e194369492936024939284019190819084018382808284375050604080516020601f89358b018035918201839004830284018301909452808352979a999881019791965091820194509250829150840183828082843750949750610e0a9650505050505050565b34801561048857600080fd5b50610491610f77565b60408051600160a060020a039092168252519081900360200190f35b3480156104b957600080fd5b506101e1610f86565b3480156104ce57600080fd5b50610491610fb4565b3480156104e357600080fd5b506101f8600160a060020a0360043516602435610fc3565b34801561050757600080fd5b506102f0600160a060020a03600435166110b3565b34801561052857600080fd5b506105316110ce565b6040518082600481111561054157fe5b60ff16815260200191505060405180910390f35b34801561056157600080fd5b506101f8600160a060020a0360043516611119565b34801561058257600080fd5b5061049161112e565b34801561059757600080fd5b5061022161113d565b3480156105ac57600080fd5b506101f8611198565b3480156105c157600080fd5b506101f86111b9565b3480156105d657600080fd5b506101f8600160a060020a03600435166024356111ee565b3480156105fa57600080fd5b506102f0600160a060020a0360043516611250565b34801561061b57600080fd5b506102f06112e6565b34801561063057600080fd5b506104916112ec565b34801561064557600080fd5b506101f8600160a060020a03600435166024356112fb565b34801561066957600080fd5b506101e1600160a060020a0360043516611394565b34801561068a57600080fd5b506102f0600160a060020a0360043581169060243516611595565b3480156106b157600080fd5b506101f86115c0565b3480156106c657600080fd5b506101e1600160a060020a03600435166115c5565b3480156106e757600080fd5b506101e1600160a060020a036004351661165a565b600354600160a060020a0316331461071357600080fd5b60045460009074010000000000000000000000000000000000000000900460ff161561073e57600080fd5b50600160a060020a03919091166000908152600560205260409020805460ff1916911515919091179055565b60065460ff1681565b600b805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156107f95780601f106107ce576101008083540402835291602001916107f9565b820191906000526020600020905b8154815290600101906020018083116107dc57829003601f168201915b505050505081565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b600354600160a060020a0316331461087e57600080fd5b600354600160a060020a038083169163a9059cbb911661089d84611250565b6040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b15801561090857600080fd5b505af115801561091c573d6000803e3d6000fd5b505050506040513d602081101561093257600080fd5b505050565b6001545b90565b600454600090849074010000000000000000000000000000000000000000900460ff16151561098e57600160a060020a03811660009081526005602052604090205460ff16151561098e57600080fd5b6109998585856116b5565b95945050505050565b600354600160a060020a031633146109b957600080fd5b60045460009074010000000000000000000000000000000000000000900460ff16156109e457600080fd5b506004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600d5481565b3360009081526007602052604090205460ff161515610a3857600080fd5b60065460ff1615610a4857600080fd5b60015473__contracts/SafeMathLib.sol:SafeMathLi__6366098d4f9091836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b158015610abf57600080fd5b505af4158015610ad3573d6000803e3d6000fd5b505050506040513d6020811015610ae957600080fd5b5051600155600160a060020a038216600090815260208181526040918290205482517f66098d4f000000000000000000000000000000000000000000000000000000008152600481019190915260248101849052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b158015610b7757600080fd5b505af4158015610b8b573d6000803e3d6000fd5b505050506040513d6020811015610ba157600080fd5b5051600160a060020a0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b60076020526000908152604090205460ff1681565b600354600160a060020a03163314610c2557600080fd5b60065460ff1615610c3557600080fd5b600160a060020a038216600081815260076020908152604091829020805460ff191685151590811790915582519384529083015280517f4b0adf6c802794c7dde28a08a4e07131abcff3bf9603cd71f14f90bec7865efa9281900390910190a15050565b6000610ca36110ce565b90506003816004811115610cb357fe5b1480610cca57506004816004811115610cc857fe5b145b1515610cd557600080fd5b811515610ce157600080fd5b33600090815260208190526040902054610d01908363ffffffff61182c16565b33600090815260208190526040902055600154610d24908363ffffffff61182c16565b600155600a54610d3a908363ffffffff61183e16565b600a55600954604080517f753e88e5000000000000000000000000000000000000000000000000000000008152336004820152602481018590529051600160a060020a039092169163753e88e59160448082019260009290919082900301818387803b158015610da957600080fd5b505af1158015610dbd573d6000803e3d6000fd5b5050600954604080518681529051600160a060020a0390921693503392507f7e5c344a8141a805725cb476f76c6953b842222b967edd1f78ddb6e8b3f397ac919081900360200190a35050565b600354600160a060020a03163314610e2157600080fd5b8151610e3490600b906020850190611983565b508051610e4890600c906020840190611983565b5060408051818152600b8054600260001961010060018416150201909116049282018390527fd131ab1e6f279deea74e13a18477e13e2107deb6dc8ae955648948be5841fb46929091600c9181906020820190606083019086908015610eef5780601f10610ec457610100808354040283529160200191610eef565b820191906000526020600020905b815481529060010190602001808311610ed257829003601f168201915b5050838103825284546002600019610100600184161502019091160480825260209091019085908015610f635780601f10610f3857610100808354040283529160200191610f63565b820191906000526020600020905b815481529060010190602001808311610f4657829003601f168201915b505094505050505060405180910390a15050565b600954600160a060020a031681565b600454600160a060020a03163314610f9d57600080fd5b6006805460ff19166001179055610fb2611854565b565b600854600160a060020a031681565b336000908152600260209081526040808320600160a060020a03861684529091528120548083111561101857336000908152600260209081526040808320600160a060020a038816845290915281205561104d565b611028818463ffffffff61182c16565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a031660009081526020819052604090205490565b60006110d86111b9565b15156110e65750600161093b565b600954600160a060020a031615156111005750600261093b565b600a5415156111115750600361093b565b50600461093b565b60056020526000908152604090205460ff1681565b600354600160a060020a031681565b600c805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156107f95780601f106107ce576101008083540402835291602001916107f9565b60045474010000000000000000000000000000000000000000900460ff1681565b60045460009074010000000000000000000000000000000000000000900460ff1680156111e957506111e96115c0565b905090565b600454600090339074010000000000000000000000000000000000000000900460ff16151561123e57600160a060020a03811660009081526005602052604090205460ff16151561123e57600080fd5b61124884846118a2565b949350505050565b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600091600160a060020a038416916370a082319160248082019260209290919082900301818787803b1580156112b457600080fd5b505af11580156112c8573d6000803e3d6000fd5b505050506040513d60208110156112de57600080fd5b505192915050565b600a5481565b600454600160a060020a031681565b336000908152600260209081526040808320600160a060020a038616845290915281205461132f908363ffffffff61183e16565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b61139c6111b9565b15156113a757600080fd5b600160a060020a03811615156113bc57600080fd5b600854600160a060020a031633146113d357600080fd5b60046113dd6110ce565b60048111156113e857fe5b14156113f357600080fd5b6009805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038381169190911791829055604080517f61d3d7a6000000000000000000000000000000000000000000000000000000008152905192909116916361d3d7a6916004808201926020929091908290030181600087803b15801561147757600080fd5b505af115801561148b573d6000803e3d6000fd5b505050506040513d60208110156114a157600080fd5b505115156114ae57600080fd5b600154600960009054906101000a9004600160a060020a0316600160a060020a0316634b2ba0dd6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561151d57600080fd5b505af1158015611531573d6000803e3d6000fd5b505050506040513d602081101561154757600080fd5b50511461155357600080fd5b60095460408051600160a060020a039092168252517f7845d5aa74cc410e35571258d954f23b82276e160fe8c188fa80566580f279cc9181900360200190a150565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600190565b600354600160a060020a031633146115dc57600080fd5b600160a060020a03811615156115f157600080fd5b600354604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600160a060020a038116151561166f57600080fd5b600854600160a060020a0316331461168657600080fd5b6008805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6000600160a060020a03831615156116cc57600080fd5b600160a060020a0384166000908152602081905260409020548211156116f157600080fd5b600160a060020a038416600090815260026020908152604080832033845290915290205482111561172157600080fd5b600160a060020a03841660009081526020819052604090205461174a908363ffffffff61182c16565b600160a060020a03808616600090815260208190526040808220939093559085168152205461177f908363ffffffff61183e16565b600160a060020a038085166000908152602081815260408083209490945591871681526002825282812033825290915220546117c1908363ffffffff61182c16565b600160a060020a03808616600081815260026020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b60008282111561183857fe5b50900390565b60008282018381101561184d57fe5b9392505050565b600454600160a060020a0316331461186b57600080fd5b6004805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b6000600160a060020a03831615156118b957600080fd5b336000908152602081905260409020548211156118d557600080fd5b336000908152602081905260409020546118f5908363ffffffff61182c16565b3360009081526020819052604080822092909255600160a060020a03851681522054611927908363ffffffff61183e16565b600160a060020a038416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106119c457805160ff19168380011785556119f1565b828001600101855582156119f1579182015b828111156119f15782518255916020019190600101906119d6565b506119fd929150611a01565b5090565b61093b91905b808211156119fd5760008155600101611a075600a165627a7a723058203627fb1890407471551a072bd60617b7d15e4053faa6d2c7e1c51f57338f0e960029", "bytecode_runtime": "0x6080604052600436106101b65763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166302f652a381146101bb57806305d2035b146101e357806306fdde031461020c578063095ea7b31461029657806316114acd146102ba57806318160ddd146102db57806323b872dd1461030257806329ff4f531461032c578063313ce5671461034d57806340c10f191461036257806342c1867b1461038657806343214675146103a757806345977d03146103cd5780634eee966f146103e55780635de4ccb01461047c5780635f412d4f146104ad578063600440cb146104c257806366188463146104d757806370a08231146104fb5780638444b3911461051c578063867c2857146105555780638da5cb5b1461057657806395d89b411461058b57806396132521146105a05780639738968c146105b5578063a9059cbb146105ca578063c45d19db146105ee578063c752ff621461060f578063d1f276d314610624578063d73dd62314610639578063d7e7088a1461065d578063dd62ed3e1461067e578063eefa597b146106a5578063f2fde38b146106ba578063ffeb7d75146106db575b600080fd5b3480156101c757600080fd5b506101e1600160a060020a036004351660243515156106fc565b005b3480156101ef57600080fd5b506101f861076a565b604080519115158252519081900360200190f35b34801561021857600080fd5b50610221610773565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561025b578181015183820152602001610243565b50505050905090810190601f1680156102885780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156102a257600080fd5b506101f8600160a060020a0360043516602435610801565b3480156102c657600080fd5b506101e1600160a060020a0360043516610867565b3480156102e757600080fd5b506102f0610937565b60408051918252519081900360200190f35b34801561030e57600080fd5b506101f8600160a060020a036004358116906024351660443561093e565b34801561033857600080fd5b506101e1600160a060020a03600435166109a2565b34801561035957600080fd5b506102f0610a14565b34801561036e57600080fd5b506101e1600160a060020a0360043516602435610a1a565b34801561039257600080fd5b506101f8600160a060020a0360043516610bf9565b3480156103b357600080fd5b506101e1600160a060020a03600435166024351515610c0e565b3480156103d957600080fd5b506101e1600435610c99565b3480156103f157600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526101e194369492936024939284019190819084018382808284375050604080516020601f89358b018035918201839004830284018301909452808352979a999881019791965091820194509250829150840183828082843750949750610e0a9650505050505050565b34801561048857600080fd5b50610491610f77565b60408051600160a060020a039092168252519081900360200190f35b3480156104b957600080fd5b506101e1610f86565b3480156104ce57600080fd5b50610491610fb4565b3480156104e357600080fd5b506101f8600160a060020a0360043516602435610fc3565b34801561050757600080fd5b506102f0600160a060020a03600435166110b3565b34801561052857600080fd5b506105316110ce565b6040518082600481111561054157fe5b60ff16815260200191505060405180910390f35b34801561056157600080fd5b506101f8600160a060020a0360043516611119565b34801561058257600080fd5b5061049161112e565b34801561059757600080fd5b5061022161113d565b3480156105ac57600080fd5b506101f8611198565b3480156105c157600080fd5b506101f86111b9565b3480156105d657600080fd5b506101f8600160a060020a03600435166024356111ee565b3480156105fa57600080fd5b506102f0600160a060020a0360043516611250565b34801561061b57600080fd5b506102f06112e6565b34801561063057600080fd5b506104916112ec565b34801561064557600080fd5b506101f8600160a060020a03600435166024356112fb565b34801561066957600080fd5b506101e1600160a060020a0360043516611394565b34801561068a57600080fd5b506102f0600160a060020a0360043581169060243516611595565b3480156106b157600080fd5b506101f86115c0565b3480156106c657600080fd5b506101e1600160a060020a03600435166115c5565b3480156106e757600080fd5b506101e1600160a060020a036004351661165a565b600354600160a060020a0316331461071357600080fd5b60045460009074010000000000000000000000000000000000000000900460ff161561073e57600080fd5b50600160a060020a03919091166000908152600560205260409020805460ff1916911515919091179055565b60065460ff1681565b600b805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156107f95780601f106107ce576101008083540402835291602001916107f9565b820191906000526020600020905b8154815290600101906020018083116107dc57829003601f168201915b505050505081565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b600354600160a060020a0316331461087e57600080fd5b600354600160a060020a038083169163a9059cbb911661089d84611250565b6040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b15801561090857600080fd5b505af115801561091c573d6000803e3d6000fd5b505050506040513d602081101561093257600080fd5b505050565b6001545b90565b600454600090849074010000000000000000000000000000000000000000900460ff16151561098e57600160a060020a03811660009081526005602052604090205460ff16151561098e57600080fd5b6109998585856116b5565b95945050505050565b600354600160a060020a031633146109b957600080fd5b60045460009074010000000000000000000000000000000000000000900460ff16156109e457600080fd5b506004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600d5481565b3360009081526007602052604090205460ff161515610a3857600080fd5b60065460ff1615610a4857600080fd5b60015473__contracts/SafeMathLib.sol:SafeMathLi__6366098d4f9091836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b158015610abf57600080fd5b505af4158015610ad3573d6000803e3d6000fd5b505050506040513d6020811015610ae957600080fd5b5051600155600160a060020a038216600090815260208181526040918290205482517f66098d4f000000000000000000000000000000000000000000000000000000008152600481019190915260248101849052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b158015610b7757600080fd5b505af4158015610b8b573d6000803e3d6000fd5b505050506040513d6020811015610ba157600080fd5b5051600160a060020a0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b60076020526000908152604090205460ff1681565b600354600160a060020a03163314610c2557600080fd5b60065460ff1615610c3557600080fd5b600160a060020a038216600081815260076020908152604091829020805460ff191685151590811790915582519384529083015280517f4b0adf6c802794c7dde28a08a4e07131abcff3bf9603cd71f14f90bec7865efa9281900390910190a15050565b6000610ca36110ce565b90506003816004811115610cb357fe5b1480610cca57506004816004811115610cc857fe5b145b1515610cd557600080fd5b811515610ce157600080fd5b33600090815260208190526040902054610d01908363ffffffff61182c16565b33600090815260208190526040902055600154610d24908363ffffffff61182c16565b600155600a54610d3a908363ffffffff61183e16565b600a55600954604080517f753e88e5000000000000000000000000000000000000000000000000000000008152336004820152602481018590529051600160a060020a039092169163753e88e59160448082019260009290919082900301818387803b158015610da957600080fd5b505af1158015610dbd573d6000803e3d6000fd5b5050600954604080518681529051600160a060020a0390921693503392507f7e5c344a8141a805725cb476f76c6953b842222b967edd1f78ddb6e8b3f397ac919081900360200190a35050565b600354600160a060020a03163314610e2157600080fd5b8151610e3490600b906020850190611983565b508051610e4890600c906020840190611983565b5060408051818152600b8054600260001961010060018416150201909116049282018390527fd131ab1e6f279deea74e13a18477e13e2107deb6dc8ae955648948be5841fb46929091600c9181906020820190606083019086908015610eef5780601f10610ec457610100808354040283529160200191610eef565b820191906000526020600020905b815481529060010190602001808311610ed257829003601f168201915b5050838103825284546002600019610100600184161502019091160480825260209091019085908015610f635780601f10610f3857610100808354040283529160200191610f63565b820191906000526020600020905b815481529060010190602001808311610f4657829003601f168201915b505094505050505060405180910390a15050565b600954600160a060020a031681565b600454600160a060020a03163314610f9d57600080fd5b6006805460ff19166001179055610fb2611854565b565b600854600160a060020a031681565b336000908152600260209081526040808320600160a060020a03861684529091528120548083111561101857336000908152600260209081526040808320600160a060020a038816845290915281205561104d565b611028818463ffffffff61182c16565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a031660009081526020819052604090205490565b60006110d86111b9565b15156110e65750600161093b565b600954600160a060020a031615156111005750600261093b565b600a5415156111115750600361093b565b50600461093b565b60056020526000908152604090205460ff1681565b600354600160a060020a031681565b600c805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156107f95780601f106107ce576101008083540402835291602001916107f9565b60045474010000000000000000000000000000000000000000900460ff1681565b60045460009074010000000000000000000000000000000000000000900460ff1680156111e957506111e96115c0565b905090565b600454600090339074010000000000000000000000000000000000000000900460ff16151561123e57600160a060020a03811660009081526005602052604090205460ff16151561123e57600080fd5b61124884846118a2565b949350505050565b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600091600160a060020a038416916370a082319160248082019260209290919082900301818787803b1580156112b457600080fd5b505af11580156112c8573d6000803e3d6000fd5b505050506040513d60208110156112de57600080fd5b505192915050565b600a5481565b600454600160a060020a031681565b336000908152600260209081526040808320600160a060020a038616845290915281205461132f908363ffffffff61183e16565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b61139c6111b9565b15156113a757600080fd5b600160a060020a03811615156113bc57600080fd5b600854600160a060020a031633146113d357600080fd5b60046113dd6110ce565b60048111156113e857fe5b14156113f357600080fd5b6009805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038381169190911791829055604080517f61d3d7a6000000000000000000000000000000000000000000000000000000008152905192909116916361d3d7a6916004808201926020929091908290030181600087803b15801561147757600080fd5b505af115801561148b573d6000803e3d6000fd5b505050506040513d60208110156114a157600080fd5b505115156114ae57600080fd5b600154600960009054906101000a9004600160a060020a0316600160a060020a0316634b2ba0dd6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561151d57600080fd5b505af1158015611531573d6000803e3d6000fd5b505050506040513d602081101561154757600080fd5b50511461155357600080fd5b60095460408051600160a060020a039092168252517f7845d5aa74cc410e35571258d954f23b82276e160fe8c188fa80566580f279cc9181900360200190a150565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600190565b600354600160a060020a031633146115dc57600080fd5b600160a060020a03811615156115f157600080fd5b600354604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600160a060020a038116151561166f57600080fd5b600854600160a060020a0316331461168657600080fd5b6008805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6000600160a060020a03831615156116cc57600080fd5b600160a060020a0384166000908152602081905260409020548211156116f157600080fd5b600160a060020a038416600090815260026020908152604080832033845290915290205482111561172157600080fd5b600160a060020a03841660009081526020819052604090205461174a908363ffffffff61182c16565b600160a060020a03808616600090815260208190526040808220939093559085168152205461177f908363ffffffff61183e16565b600160a060020a038085166000908152602081815260408083209490945591871681526002825282812033825290915220546117c1908363ffffffff61182c16565b600160a060020a03808616600081815260026020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b60008282111561183857fe5b50900390565b60008282018381101561184d57fe5b9392505050565b600454600160a060020a0316331461186b57600080fd5b6004805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b6000600160a060020a03831615156118b957600080fd5b336000908152602081905260409020548211156118d557600080fd5b336000908152602081905260409020546118f5908363ffffffff61182c16565b3360009081526020819052604080822092909255600160a060020a03851681522054611927908363ffffffff61183e16565b600160a060020a038416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106119c457805160ff19168380011785556119f1565b828001600101855582156119f1579182015b828111156119f15782518255916020019190600101906119d6565b506119fd929150611a01565b5090565b61093b91905b808211156119fd5760008155600101611a075600a165627a7a723058203627fb1890407471551a072bd60617b7d15e4053faa6d2c7e1c51f57338f0e960029", "direct_dependencies": ["SafeMathLib"], "full_dependencies": ["SafeMathLib"], "linkrefs": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 6348}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 6836}], "linkrefs_runtime": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 5274}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 5762}], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "state", "type": "bool"}], "name": "setTransferAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "mintingFinished", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "name", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "approve", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "recoverTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_from", "type": "address"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setReleaseAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "decimals", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "receiver", "type": "address"}, {"name": "amount", "type": "uint256"}], "name": "mint", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "mintAgents", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "state", "type": "bool"}], "name": "setMintAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "uint256"}], "name": "upgrade", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_name", "type": "string"}, {"name": "_symbol", "type": "string"}], "name": "setTokenInformation", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "upgradeAgent", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "releaseTokenTransfer", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "upgradeMaster", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_subtractedValue", "type": "uint256"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getUpgradeState", "outputs": [{"name": "", "type": "uint8"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "transferAgents", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "symbol", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "released", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "canUpgrade", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "tokensToBeReturned", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalUpgraded", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "releaseAgent", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_addedValue", "type": "uint256"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "agent", "type": "address"}], "name": "setUpgradeAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}, {"name": "_spender", "type": "address"}], "name": "allowance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isToken", "outputs": [{"name": "weAre", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "master", "type": "address"}], "name": "setUpgradeMaster", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [{"name": "_name", "type": "string"}, {"name": "_symbol", "type": "string"}, {"name": "_initialSupply", "type": "uint256"}, {"name": "_decimals", "type": "uint256"}, {"name": "_mintable", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newName", "type": "string"}, {"indexed": false, "name": "newSymbol", "type": "string"}], "name": "UpdatedTokenInformation", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "_from", "type": "address"}, {"indexed": true, "name": "_to", "type": "address"}, {"indexed": false, "name": "_value", "type": "uint256"}], "name": "Upgrade", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "agent", "type": "address"}], "name": "UpgradeAgentSet", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "addr", "type": "address"}, {"indexed": false, "name": "state", "type": "bool"}], "name": "MintingAgentChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "receiver", "type": "address"}, {"indexed": false, "name": "amount", "type": "uint256"}], "name": "Minted", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}, {"indexed": true, "name": "spender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "devdoc": {"methods": {"allowance(address,address)": {"details": "Function to check the amount of tokens that an owner allowed to a spender.", "params": {"_owner": "address The address which owns the funds.", "_spender": "address The address which will spend the funds."}, "return": "A uint256 specifying the amount of tokens still available for the spender."}, "approve(address,uint256)": {"details": "Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729", "params": {"_spender": "The address which will spend the funds.", "_value": "The amount of tokens to be spent."}}, "balanceOf(address)": {"details": "Gets the balance of the specified address.", "params": {"_owner": "The address to query the the balance of."}, "return": "An uint256 representing the amount owned by the passed address."}, "decreaseApproval(address,uint256)": {"details": "Decrease the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[_spender] == 0. To decrement allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"_spender": "The address which will spend the funds.", "_subtractedValue": "The amount of tokens to decrease the allowance by."}}, "increaseApproval(address,uint256)": {"details": "Increase the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[_spender] == 0. To increment allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"_addedValue": "The amount of tokens to increase the allowance by.", "_spender": "The address which will spend the funds."}}, "recoverTokens(address)": {"details": "This will be invoked by the owner, when owner wants to rescue tokens", "params": {"token": "Token which will we rescue to the owner from the contract"}}, "tokensToBeReturned(address)": {"details": "Interface function, can be overwritten by the superclass", "params": {"token": "Token which balance we will check and return"}, "return": "The amount of tokens (in smallest denominator) the contract owns"}, "totalSupply()": {"details": "total number of tokens in existence"}, "transferOwnership(address)": {"details": "Allows the current owner to transfer control of the contract to a newOwner.", "params": {"newOwner": "The address to transfer ownership to."}}}}, "userdoc": {"methods": {"canUpgrade()": {"notice": "Allow upgrade agent functionality kick in only if the crowdsale was success."}, "getUpgradeState()": {"notice": "Get the state of the token upgrade."}, "mint(address,uint256)": {"notice": "Create new tokens and allocate them to an address.. * Only callably by a crowdsale contract (mint agent)."}, "releaseTokenTransfer()": {"notice": "When token is released to be transferable, enforce no new tokens can be created."}, "setMintAgent(address,bool)": {"notice": "Owner can allow a crowdsale contract to mint new tokens."}, "setReleaseAgent(address)": {"notice": "Set the contract that can call release and make the token transferable. * Design choice. Allow reset the release agent to fix fat finger mistakes."}, "setTokenInformation(string,string)": {"notice": "Owner can update token information here. * It is often useful to conceal the actual token association, until the token operations, like central issuance or reissuance have been completed. * This function allows the token owner to rename the token after the operations have been completed and then point the audience to use the token contract."}, "setTransferAgent(address,bool)": {"notice": "Owner can allow a particular address (a crowdsale contract) to transfer tokens despite the lock up period."}, "setUpgradeAgent(address)": {"notice": "Set an upgrade agent that handles"}, "setUpgradeMaster(address)": {"notice": "Change the upgrade master. * This allows us to set a new owner for the upgrade mechanism."}, "upgrade(uint256)": {"notice": "Allow the token holder to upgrade some of their tokens to a new contract."}}}}, "settings": {"compilationTarget": {"contracts/CrowdsaleToken.sol": "CrowdsaleToken"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/CrowdsaleToken.sol": {"keccak256": "0xa812687ac327cd19fac64667980e70d4fb72ef7f61dce477818d085cf0a915df", "urls": ["bzzr://826d9dda00ce341794e5bb05c78b1abb2728e3c631f7a542345dcfa9f3bd9c50"]}, "contracts/MintableToken.sol": {"keccak256": "0x650e1d6b2bedcd36508918357c7cf4f36fdd093cd0c4d6342f4dcd3bdcdd7578", "urls": ["bzzr://7ba2ac0480d428066a18727e2adb76ba56856ecd37b4420e801131ec8f8f4be3"]}, "contracts/Recoverable.sol": {"keccak256": "0x311a332cdd87df6e00057f5455f4e68b043b5dbe211f6d68bc64e20817515635", "urls": ["bzzr://4fd99bcfb93baed6e7c8d22ee9ecc5c8346a1aa98288e77b01333b2c5d3f582d"]}, "contracts/ReleasableToken.sol": {"keccak256": "0x2c50180d0c1eab1aa63a04da3ae87ee2c482665d2a1a42c5f05b11234a7edaf4", "urls": ["bzzr://10752c317eba5c42e2848722689cfee4fffb7bcb42f3346e1a20715d843798e8"]}, "contracts/SafeMathLib.sol": {"keccak256": "0x501bfe31e274b9a5591f7c540bdced4d4312e27d4f19599147c9bbca3d9c6b18", "urls": ["bzzr://a80935ebddb06c247d71372d4e5833ee029f08633bd0fe4a274a57009567e5b9"]}, "contracts/StandardTokenExt.sol": {"keccak256": "0x9ea2d4cec4dccd5639c05e6c23dd027d80b5e5a20abd99b280ab7b2631b5a5fc", "urls": ["bzzr://a52d8fc5a21bd83997aff19128e00dceb251df712207b61223894c8b7f42d5ff"]}, "contracts/UpgradeAgent.sol": {"keccak256": "0x88e793f72feca4a18d2cd06e6037c1413d7b963eabcf5626d60bfb9d04d6e8e6", "urls": ["bzzr://87e39a65cf25d539ab49ad7e759b3298b8a19272964e69e3f2432f0323f30025"]}, "contracts/UpgradeableToken.sol": {"keccak256": "0xa74fc300c514564ece81c86905502c2de674b69c0633b133af19c1ba027da2c9", "urls": ["bzzr://55bc0b908c94781462b8959f051c6dbb53c35641b0f8cb38d74632ad6bf95e52"]}, "zeppelin/contracts/math/SafeMath.sol": {"keccak256": "0x341ba8cb467a3623e819ba1a683ac1d264005186f308505214e5f6bc89446a08", "urls": ["bzzr://59b5652ee4e4a1b5a8f1a8906e14c84af43d636cf5ca0725cc1813aabe4c8c17"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}, "zeppelin/contracts/token/ERC20/BasicToken.sol": {"keccak256": "0x948404468d61ff35ea4194650670408dabd65da7f905a1c16888ab84520bf39e", "urls": ["bzzr://ea75e20f95d7e4e10394fe6bfaa8eee56b4757c2a6f1e8df4180d33afa621935"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}, "zeppelin/contracts/token/ERC20/StandardToken.sol": {"keccak256": "0xd2b344a5259e19ec143074cfa65637a10c40b68395c59808c4af13bccbb2de55", "urls": ["bzzr://d61a01175a7ca1ba9f4403de603c20b897e33ec425aef2d9f8a7f9ddfdfaf5b2"]}}, "version": 1}, "name": "CrowdsaleToken", "ordered_full_dependencies": ["SafeMathLib"], "source_path": "contracts/CrowdsaleToken.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n assert(c / a == b);\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n\n\n\n/**\n * @title Basic token\n * @dev Basic version of StandardToken, with no allowances.\n */\ncontract BasicToken is ERC20Basic {\n using SafeMath for uint256;\n\n mapping(address => uint256) balances;\n\n uint256 totalSupply_;\n\n /**\n * @dev total number of tokens in existence\n */\n function totalSupply() public view returns (uint256) {\n return totalSupply_;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param _to The address to transfer to.\n * @param _value The amount to be transferred.\n */\n function transfer(address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[msg.sender]);\n\n // SafeMath.sub will throw if there is not enough balance.\n balances[msg.sender] = balances[msg.sender].sub(_value);\n balances[_to] = balances[_to].add(_value);\n Transfer(msg.sender, _to, _value);\n return true;\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param _owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address _owner) public view returns (uint256 balance) {\n return balances[_owner];\n }\n\n}\n\n\n\n\n/**\n * @title Standard ERC20 token\n *\n * @dev Implementation of the basic standard token.\n * @dev https://github.com/ethereum/EIPs/issues/20\n * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol\n */\ncontract StandardToken is ERC20, BasicToken {\n\n mapping (address => mapping (address => uint256)) internal allowed;\n\n\n /**\n * @dev Transfer tokens from one address to another\n * @param _from address The address which you want to send tokens from\n * @param _to address The address which you want to transfer to\n * @param _value uint256 the amount of tokens to be transferred\n */\n function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[_from]);\n require(_value <= allowed[_from][msg.sender]);\n\n balances[_from] = balances[_from].sub(_value);\n balances[_to] = balances[_to].add(_value);\n allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);\n Transfer(_from, _to, _value);\n return true;\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n *\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param _spender The address which will spend the funds.\n * @param _value The amount of tokens to be spent.\n */\n function approve(address _spender, uint256 _value) public returns (bool) {\n allowed[msg.sender][_spender] = _value;\n Approval(msg.sender, _spender, _value);\n return true;\n }\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param _owner address The address which owns the funds.\n * @param _spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address _owner, address _spender) public view returns (uint256) {\n return allowed[_owner][_spender];\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(address _spender, uint _addedValue) public returns (bool) {\n allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {\n uint oldValue = allowed[msg.sender][_spender];\n if (_subtractedValue > oldValue) {\n allowed[msg.sender][_spender] = 0;\n } else {\n allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);\n }\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n\ncontract Recoverable is Ownable {\n\n /// @dev Empty constructor (for now)\n function Recoverable() {\n }\n\n /// @dev This will be invoked by the owner, when owner wants to rescue tokens\n /// @param token Token which will we rescue to the owner from the contract\n function recoverTokens(ERC20Basic token) onlyOwner public {\n token.transfer(owner, tokensToBeReturned(token));\n }\n\n /// @dev Interface function, can be overwritten by the superclass\n /// @param token Token which balance we will check and return\n /// @return The amount of tokens (in smallest denominator) the contract owns\n function tokensToBeReturned(ERC20Basic token) public returns (uint) {\n return token.balanceOf(this);\n }\n}\n\n\n\n/**\n * Standard EIP-20 token with an interface marker.\n *\n * @notice Interface marker is used by crowdsale contracts to validate that addresses point a good token contract.\n *\n */\ncontract StandardTokenExt is StandardToken, Recoverable {\n\n /* Interface declaration */\n function isToken() public constant returns (bool weAre) {\n return true;\n }\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Upgrade agent interface inspired by Lunyr.\n *\n * Upgrade agent transfers tokens to a new contract.\n * Upgrade agent itself can be the token contract, or just a middle man contract doing the heavy lifting.\n */\ncontract UpgradeAgent {\n\n uint public originalSupply;\n\n /** Interface marker */\n function isUpgradeAgent() public constant returns (bool) {\n return true;\n }\n\n function upgradeFrom(address _from, uint256 _value) public;\n\n}\n\n\n/**\n * A token upgrade mechanism where users can opt-in amount of tokens to the next smart contract revision.\n *\n * First envisioned by Golem and Lunyr projects.\n */\ncontract UpgradeableToken is StandardTokenExt {\n\n /** Contract / person who can set the upgrade path. This can be the same as team multisig wallet, as what it is with its default value. */\n address public upgradeMaster;\n\n /** The next contract where the tokens will be migrated. */\n UpgradeAgent public upgradeAgent;\n\n /** How many tokens we have upgraded by now. */\n uint256 public totalUpgraded;\n\n /**\n * Upgrade states.\n *\n * - NotAllowed: The child contract has not reached a condition where the upgrade can bgun\n * - WaitingForAgent: Token allows upgrade, but we don't have a new agent yet\n * - ReadyToUpgrade: The agent is set, but not a single token has been upgraded yet\n * - Upgrading: Upgrade agent is set and the balance holders can upgrade their tokens\n *\n */\n enum UpgradeState {Unknown, NotAllowed, WaitingForAgent, ReadyToUpgrade, Upgrading}\n\n /**\n * Somebody has upgraded some of his tokens.\n */\n event Upgrade(address indexed _from, address indexed _to, uint256 _value);\n\n /**\n * New upgrade agent available.\n */\n event UpgradeAgentSet(address agent);\n\n /**\n * Do not allow construction without upgrade master set.\n */\n function UpgradeableToken(address _upgradeMaster) {\n upgradeMaster = _upgradeMaster;\n }\n\n /**\n * Allow the token holder to upgrade some of their tokens to a new contract.\n */\n function upgrade(uint256 value) public {\n\n UpgradeState state = getUpgradeState();\n if(!(state == UpgradeState.ReadyToUpgrade || state == UpgradeState.Upgrading)) {\n // Called in a bad state\n throw;\n }\n\n // Validate input value.\n if (value == 0) throw;\n\n balances[msg.sender] = balances[msg.sender].sub(value);\n\n // Take tokens out from circulation\n totalSupply_ = totalSupply_.sub(value);\n totalUpgraded = totalUpgraded.add(value);\n\n // Upgrade agent reissues the tokens\n upgradeAgent.upgradeFrom(msg.sender, value);\n Upgrade(msg.sender, upgradeAgent, value);\n }\n\n /**\n * Set an upgrade agent that handles\n */\n function setUpgradeAgent(address agent) external {\n\n if(!canUpgrade()) {\n // The token is not yet in a state that we could think upgrading\n throw;\n }\n\n if (agent == 0x0) throw;\n // Only a master can designate the next agent\n if (msg.sender != upgradeMaster) throw;\n // Upgrade has already begun for an agent\n if (getUpgradeState() == UpgradeState.Upgrading) throw;\n\n upgradeAgent = UpgradeAgent(agent);\n\n // Bad interface\n if(!upgradeAgent.isUpgradeAgent()) throw;\n // Make sure that token supplies match in source and target\n if (upgradeAgent.originalSupply() != totalSupply_) throw;\n\n UpgradeAgentSet(upgradeAgent);\n }\n\n /**\n * Get the state of the token upgrade.\n */\n function getUpgradeState() public constant returns(UpgradeState) {\n if(!canUpgrade()) return UpgradeState.NotAllowed;\n else if(address(upgradeAgent) == 0x00) return UpgradeState.WaitingForAgent;\n else if(totalUpgraded == 0) return UpgradeState.ReadyToUpgrade;\n else return UpgradeState.Upgrading;\n }\n\n /**\n * Change the upgrade master.\n *\n * This allows us to set a new owner for the upgrade mechanism.\n */\n function setUpgradeMaster(address master) public {\n if (master == 0x0) throw;\n if (msg.sender != upgradeMaster) throw;\n upgradeMaster = master;\n }\n\n /**\n * Child contract can enable to provide the condition when the upgrade can begun.\n */\n function canUpgrade() public constant returns(bool) {\n return true;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n/**\n * Define interface for releasing the token transfer after a successful crowdsale.\n */\ncontract ReleasableToken is StandardTokenExt {\n\n /* The finalizer contract that allows unlift the transfer limits on this token */\n address public releaseAgent;\n\n /** A crowdsale contract can release us to the wild if ICO success. If false we are are in transfer lock up period.*/\n bool public released = false;\n\n /** Map of agents that are allowed to transfer tokens regardless of the lock down period. These are crowdsale contracts and possible the team multisig itself. */\n mapping (address => bool) public transferAgents;\n\n /**\n * Limit token transfer until the crowdsale is over.\n *\n */\n modifier canTransfer(address _sender) {\n\n if(!released) {\n if(!transferAgents[_sender]) {\n throw;\n }\n }\n\n _;\n }\n\n /**\n * Set the contract that can call release and make the token transferable.\n *\n * Design choice. Allow reset the release agent to fix fat finger mistakes.\n */\n function setReleaseAgent(address addr) onlyOwner inReleaseState(false) public {\n\n // We don't do interface check here as we might want to a normal wallet address to act as a release agent\n releaseAgent = addr;\n }\n\n /**\n * Owner can allow a particular address (a crowdsale contract) to transfer tokens despite the lock up period.\n */\n function setTransferAgent(address addr, bool state) onlyOwner inReleaseState(false) public {\n transferAgents[addr] = state;\n }\n\n /**\n * One way function to release the tokens to the wild.\n *\n * Can be called only from the release agent that is the final ICO contract. It is only called if the crowdsale has been success (first milestone reached).\n */\n function releaseTokenTransfer() public onlyReleaseAgent {\n released = true;\n }\n\n /** The function can be called only before or after the tokens have been releasesd */\n modifier inReleaseState(bool releaseState) {\n if(releaseState != released) {\n throw;\n }\n _;\n }\n\n /** The function can be called only by a whitelisted release agent. */\n modifier onlyReleaseAgent() {\n if(msg.sender != releaseAgent) {\n throw;\n }\n _;\n }\n\n function transfer(address _to, uint _value) canTransfer(msg.sender) returns (bool success) {\n // Call StandardToken.transfer()\n return super.transfer(_to, _value);\n }\n\n function transferFrom(address _from, address _to, uint _value) canTransfer(_from) returns (bool success) {\n // Call StandardToken.transferForm()\n return super.transferFrom(_from, _to, _value);\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Safe unsigned safe math.\n *\n * https://blog.aragon.one/library-driven-development-in-solidity-2bebcaf88736#.750gwtwli\n *\n * Originally from https://raw.githubusercontent.com/AragonOne/zeppelin-solidity/master/contracts/SafeMathLib.sol\n *\n * Maintained here until merged to mainline zeppelin-solidity.\n *\n */\nlibrary SafeMathLib {\n\n function times(uint a, uint b) returns (uint) {\n uint c = a * b;\n assert(a == 0 || c / a == b);\n return c;\n }\n\n function minus(uint a, uint b) returns (uint) {\n assert(b <= a);\n return a - b;\n }\n\n function plus(uint a, uint b) returns (uint) {\n uint c = a + b;\n assert(c>=a);\n return c;\n }\n\n}\n\n\n\n/**\n * A token that can increase its supply by another contract.\n *\n * This allows uncapped crowdsale by dynamically increasing the supply when money pours in.\n * Only mint agents, contracts whitelisted by owner, can mint new tokens.\n *\n */\ncontract MintableToken is StandardTokenExt {\n\n using SafeMathLib for uint;\n\n bool public mintingFinished = false;\n\n /** List of agents that are allowed to create new tokens */\n mapping (address => bool) public mintAgents;\n\n event MintingAgentChanged(address addr, bool state);\n event Minted(address receiver, uint amount);\n\n /**\n * Create new tokens and allocate them to an address..\n *\n * Only callably by a crowdsale contract (mint agent).\n */\n function mint(address receiver, uint amount) onlyMintAgent canMint public {\n totalSupply_ = totalSupply_.plus(amount);\n balances[receiver] = balances[receiver].plus(amount);\n\n // This will make the mint transaction apper in EtherScan.io\n // We can remove this after there is a standardized minting event\n Transfer(0, receiver, amount);\n }\n\n /**\n * Owner can allow a crowdsale contract to mint new tokens.\n */\n function setMintAgent(address addr, bool state) onlyOwner canMint public {\n mintAgents[addr] = state;\n MintingAgentChanged(addr, state);\n }\n\n modifier onlyMintAgent() {\n // Only crowdsale contracts are allowed to mint new tokens\n if(!mintAgents[msg.sender]) {\n throw;\n }\n _;\n }\n\n /** Make sure we are not done yet. */\n modifier canMint() {\n if(mintingFinished) throw;\n _;\n }\n}\n\n\n\n/**\n * A crowdsaled token.\n *\n * An ERC-20 token designed specifically for crowdsales with investor protection and further development path.\n *\n * - The token transfer() is disabled until the crowdsale is over\n * - The token contract gives an opt-in upgrade path to a new contract\n * - The same token can be part of several crowdsales through approve() mechanism\n * - The token can be capped (supply set in the constructor) or uncapped (crowdsale contract can mint new tokens)\n *\n */\ncontract CrowdsaleToken is ReleasableToken, MintableToken, UpgradeableToken {\n\n /** Name and symbol were updated. */\n event UpdatedTokenInformation(string newName, string newSymbol);\n\n string public name;\n\n string public symbol;\n\n uint public decimals;\n\n /**\n * Construct the token.\n *\n * This token must be created through a team multisig wallet, so that it is owned by that wallet.\n *\n * @param _name Token name\n * @param _symbol Token symbol - should be all caps\n * @param _initialSupply How many tokens we start with\n * @param _decimals Number of decimal places\n * @param _mintable Are new tokens created over the crowdsale or do we distribute only the initial supply? Note that when the token becomes transferable the minting always ends.\n */\n function CrowdsaleToken(string _name, string _symbol, uint _initialSupply, uint _decimals, bool _mintable)\n UpgradeableToken(msg.sender) {\n\n // Create any address, can be transferred\n // to team multisig via changeOwner(),\n // also remember to call setUpgradeMaster()\n owner = msg.sender;\n\n name = _name;\n symbol = _symbol;\n\n totalSupply_ = _initialSupply;\n\n decimals = _decimals;\n\n // Create initially all balance on the team multisig\n balances[owner] = totalSupply_;\n\n if(totalSupply_ > 0) {\n Minted(owner, totalSupply_);\n }\n\n // No more new supply allowed after the token creation\n if(!_mintable) {\n mintingFinished = true;\n if(totalSupply_ == 0) {\n throw; // Cannot create a token without supply and no minting\n }\n }\n }\n\n /**\n * When token is released to be transferable, enforce no new tokens can be created.\n */\n function releaseTokenTransfer() public onlyReleaseAgent {\n mintingFinished = true;\n super.releaseTokenTransfer();\n }\n\n /**\n * Allow upgrade agent functionality kick in only if the crowdsale was success.\n */\n function canUpgrade() public constant returns(bool) {\n return released && super.canUpgrade();\n }\n\n /**\n * Owner can update token information here.\n *\n * It is often useful to conceal the actual token association, until\n * the token operations, like central issuance or reissuance have been completed.\n *\n * This function allows the token owner to rename the token after the operations\n * have been completed and then point the audience to use the token contract.\n */\n function setTokenInformation(string _name, string _symbol) onlyOwner {\n name = _name;\n symbol = _symbol;\n\n UpdatedTokenInformation(name, symbol);\n }\n\n}\n"}, "DefaultFinalizeAgent": {"abi": [{"constant": false, "inputs": [], "name": "finalizeCrowdsale", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "isFinalizeAgent", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isSane", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "crowdsale", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "token", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [{"name": "_token", "type": "address"}, {"name": "_crowdsale", "type": "address"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}], "bytecode": "0x608060405234801561001057600080fd5b5060405160408061034283398101604052805160209091015160008054600160a060020a03938416600160a060020a031991821617909155600180549390921692169190911790556102db806100676000396000f30060806040526004361061006c5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630bf318a38114610071578063614cb9041461008857806382771c8e146100b15780639c1e03a0146100c6578063fc0c546a14610104575b600080fd5b34801561007d57600080fd5b50610086610119565b005b34801561009457600080fd5b5061009d6101be565b604080519115158252519081900360200190f35b3480156100bd57600080fd5b5061009d6101c3565b3480156100d257600080fd5b506100db610277565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561011057600080fd5b506100db610293565b60015473ffffffffffffffffffffffffffffffffffffffff16331461013d57600080fd5b60008054604080517f5f412d4f000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff90921692635f412d4f9260048084019382900301818387803b1580156101a457600080fd5b505af11580156101b8573d6000803e3d6000fd5b50505050565b600190565b60008054604080517fd1f276d30000000000000000000000000000000000000000000000000000000081529051309273ffffffffffffffffffffffffffffffffffffffff169163d1f276d391600480830192602092919082900301818887803b15801561022f57600080fd5b505af1158015610243573d6000803e3d6000fd5b505050506040513d602081101561025957600080fd5b505173ffffffffffffffffffffffffffffffffffffffff1614905090565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff16815600a165627a7a7230582057788df747bff06899cac0c36a190e00b7a9cd0dff59dbaf4badbd0bb1e67e850029", "bytecode_runtime": "0x60806040526004361061006c5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630bf318a38114610071578063614cb9041461008857806382771c8e146100b15780639c1e03a0146100c6578063fc0c546a14610104575b600080fd5b34801561007d57600080fd5b50610086610119565b005b34801561009457600080fd5b5061009d6101be565b604080519115158252519081900360200190f35b3480156100bd57600080fd5b5061009d6101c3565b3480156100d257600080fd5b506100db610277565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561011057600080fd5b506100db610293565b60015473ffffffffffffffffffffffffffffffffffffffff16331461013d57600080fd5b60008054604080517f5f412d4f000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff90921692635f412d4f9260048084019382900301818387803b1580156101a457600080fd5b505af11580156101b8573d6000803e3d6000fd5b50505050565b600190565b60008054604080517fd1f276d30000000000000000000000000000000000000000000000000000000081529051309273ffffffffffffffffffffffffffffffffffffffff169163d1f276d391600480830192602092919082900301818887803b15801561022f57600080fd5b505af1158015610243573d6000803e3d6000fd5b505050506040513d602081101561025957600080fd5b505173ffffffffffffffffffffffffffffffffffffffff1614905090565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff16815600a165627a7a7230582057788df747bff06899cac0c36a190e00b7a9cd0dff59dbaf4badbd0bb1e67e850029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": false, "inputs": [], "name": "finalizeCrowdsale", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "isFinalizeAgent", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isSane", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "crowdsale", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "token", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [{"name": "_token", "type": "address"}, {"name": "_crowdsale", "type": "address"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}], "devdoc": {"methods": {}}, "userdoc": {"methods": {"finalizeCrowdsale()": {"notice": "Called once by crowdsale finalize() if the sale was success. "}, "isSane()": {"notice": "Check that we can release the token "}}}}, "settings": {"compilationTarget": {"contracts/DefaultFinalizeAgent.sol": "DefaultFinalizeAgent"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/Crowdsale.sol": {"keccak256": "0x2697c26528f64bb954a7c2547d3b43317d2d2b02c7d9d05a7b1ab388cd79f65d", "urls": ["bzzr://f28b280794222114141c51dd5c388d403a7c98d8b51e04170a0e294246d5164b"]}, "contracts/CrowdsaleBase.sol": {"keccak256": "0xe2c9ed11183ce705616980df7b02544d72fe18b40395da7d9d4bcb621fb87871", "urls": ["bzzr://07f3887ba0d0eb3248b1ad3581480ed71a2fe70a47dcc283c4e97c8c92e0790a"]}, "contracts/DefaultFinalizeAgent.sol": {"keccak256": "0xbb8b3a1ed6bc82e5638ee652a23a860faaa989897cec37a6114d2d11e74238a0", "urls": ["bzzr://972b62e1346341c37202dd7615e9399095c3b1234b60471b8e502df2d766c9d9"]}, "contracts/FinalizeAgent.sol": {"keccak256": "0x309fd0510e0b3e2b5044e33f7c80cfb2d6f2a5697e41a5f185931d65770cfea9", "urls": ["bzzr://4e7ed6f82c0f542e92e56c12566b2ecd7666730865bf12566c27587ec64160ac"]}, "contracts/FractionalERC20.sol": {"keccak256": "0x75bc4ad90a8b13ce961c89b1bf405776f616e019d3a2720168f8e52be223198f", "urls": ["bzzr://6a3688f12da1a5c890ef06f80f883f6c5370886092d38a1b33cd4219b718478b"]}, "contracts/Haltable.sol": {"keccak256": "0x265dcf25e7c9ab4b6eecd2181f1b71334a1b5381a60f8db7d9526dab120f4b70", "urls": ["bzzr://d522e00fa9e075941469dd81738b59fdb99ce3c12cdc39e33abe40b588c4da9b"]}, "contracts/PricingStrategy.sol": {"keccak256": "0x8df5093b7d07168ad994f9176de0bd2268f6563b1e8a3a448d8cfe7fe246c628", "urls": ["bzzr://ef5c944d51f739ab34e2c951d6ac82a7152e6bb844058a8e57bae52c14cbe16b"]}, "contracts/Recoverable.sol": {"keccak256": "0x311a332cdd87df6e00057f5455f4e68b043b5dbe211f6d68bc64e20817515635", "urls": ["bzzr://4fd99bcfb93baed6e7c8d22ee9ecc5c8346a1aa98288e77b01333b2c5d3f582d"]}, "contracts/ReleasableToken.sol": {"keccak256": "0x2c50180d0c1eab1aa63a04da3ae87ee2c482665d2a1a42c5f05b11234a7edaf4", "urls": ["bzzr://10752c317eba5c42e2848722689cfee4fffb7bcb42f3346e1a20715d843798e8"]}, "contracts/SafeMathLib.sol": {"keccak256": "0x501bfe31e274b9a5591f7c540bdced4d4312e27d4f19599147c9bbca3d9c6b18", "urls": ["bzzr://a80935ebddb06c247d71372d4e5833ee029f08633bd0fe4a274a57009567e5b9"]}, "contracts/StandardTokenExt.sol": {"keccak256": "0x9ea2d4cec4dccd5639c05e6c23dd027d80b5e5a20abd99b280ab7b2631b5a5fc", "urls": ["bzzr://a52d8fc5a21bd83997aff19128e00dceb251df712207b61223894c8b7f42d5ff"]}, "zeppelin/contracts/math/SafeMath.sol": {"keccak256": "0x341ba8cb467a3623e819ba1a683ac1d264005186f308505214e5f6bc89446a08", "urls": ["bzzr://59b5652ee4e4a1b5a8f1a8906e14c84af43d636cf5ca0725cc1813aabe4c8c17"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}, "zeppelin/contracts/token/ERC20/BasicToken.sol": {"keccak256": "0x948404468d61ff35ea4194650670408dabd65da7f905a1c16888ab84520bf39e", "urls": ["bzzr://ea75e20f95d7e4e10394fe6bfaa8eee56b4757c2a6f1e8df4180d33afa621935"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}, "zeppelin/contracts/token/ERC20/StandardToken.sol": {"keccak256": "0xd2b344a5259e19ec143074cfa65637a10c40b68395c59808c4af13bccbb2de55", "urls": ["bzzr://d61a01175a7ca1ba9f4403de603c20b897e33ec425aef2d9f8a7f9ddfdfaf5b2"]}}, "version": 1}, "name": "DefaultFinalizeAgent", "ordered_full_dependencies": [], "source_path": "contracts/DefaultFinalizeAgent.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Safe unsigned safe math.\n *\n * https://blog.aragon.one/library-driven-development-in-solidity-2bebcaf88736#.750gwtwli\n *\n * Originally from https://raw.githubusercontent.com/AragonOne/zeppelin-solidity/master/contracts/SafeMathLib.sol\n *\n * Maintained here until merged to mainline zeppelin-solidity.\n *\n */\nlibrary SafeMathLib {\n\n function times(uint a, uint b) returns (uint) {\n uint c = a * b;\n assert(a == 0 || c / a == b);\n return c;\n }\n\n function minus(uint a, uint b) returns (uint) {\n assert(b <= a);\n return a - b;\n }\n\n function plus(uint a, uint b) returns (uint) {\n uint c = a + b;\n assert(c>=a);\n return c;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Interface for defining crowdsale pricing.\n */\ncontract PricingStrategy {\n\n /** Interface declaration. */\n function isPricingStrategy() public constant returns (bool) {\n return true;\n }\n\n /** Self check if all references are correctly set.\n *\n * Checks that pricing strategy matches crowdsale parameters.\n */\n function isSane(address crowdsale) public constant returns (bool) {\n return true;\n }\n\n /**\n * @dev Pricing tells if this is a presale purchase or not.\n @param purchaser Address of the purchaser\n @return False by default, true if a presale purchaser\n */\n function isPresalePurchase(address purchaser) public constant returns (bool) {\n return false;\n }\n\n /**\n * When somebody tries to buy tokens for X eth, calculate how many tokens they get.\n *\n *\n * @param value - What is the value of the transaction send in as wei\n * @param tokensSold - how much tokens have been sold this far\n * @param weiRaised - how much money has been raised this far in the main token sale - this number excludes presale\n * @param msgSender - who is the investor of this transaction\n * @param decimals - how many decimal units the token has\n * @return Amount of tokens the investor receives\n */\n function calculatePrice(uint value, uint weiRaised, uint tokensSold, address msgSender, uint decimals) public constant returns (uint tokenAmount);\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Finalize agent defines what happens at the end of succeseful crowdsale.\n *\n * - Allocate tokens for founders, bounties and community\n * - Make tokens transferable\n * - etc.\n */\ncontract FinalizeAgent {\n\n function isFinalizeAgent() public constant returns(bool) {\n return true;\n }\n\n /** Return true if we can run finalizeCrowdsale() properly.\n *\n * This is a safety check function that doesn't allow crowdsale to begin\n * unless the finalizer has been set up properly.\n */\n function isSane() public constant returns (bool);\n\n /** Called once by crowdsale finalize() if the sale was success. */\n function finalizeCrowdsale();\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n\n/**\n * A token that defines fractional units as decimals.\n */\ncontract FractionalERC20 is ERC20 {\n\n uint public decimals;\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n/*\n * Haltable\n *\n * Abstract contract that allows children to implement an\n * emergency stop mechanism. Differs from Pausable by causing a throw when in halt mode.\n *\n *\n * Originally envisioned in FirstBlood ICO contract.\n */\ncontract Haltable is Ownable {\n bool public halted;\n\n modifier stopInEmergency {\n if (halted) throw;\n _;\n }\n\n modifier stopNonOwnersInEmergency {\n if (halted && msg.sender != owner) throw;\n _;\n }\n\n modifier onlyInEmergency {\n if (!halted) throw;\n _;\n }\n\n // called by the owner on emergency, triggers stopped state\n function halt() external onlyOwner {\n halted = true;\n }\n\n // called by the owner on end of emergency, returns to normal state\n function unhalt() external onlyOwner onlyInEmergency {\n halted = false;\n }\n\n}\n\n\n\n\n\n\n\n/**\n * Crowdsale state machine without buy functionality.\n *\n * Implements basic state machine logic, but leaves out all buy functions,\n * so that subclasses can implement their own buying logic.\n *\n *\n * For the default buy() implementation see Crowdsale.sol.\n */\ncontract CrowdsaleBase is Haltable {\n\n /* Max investment count when we are still allowed to change the multisig address */\n uint public MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE = 5;\n\n using SafeMathLib for uint;\n\n /* The token we are selling */\n FractionalERC20 public token;\n\n /* How we are going to price our offering */\n PricingStrategy public pricingStrategy;\n\n /* Post-success callback */\n FinalizeAgent public finalizeAgent;\n\n /* tokens will be transfered from this address */\n address public multisigWallet;\n\n /* if the funding goal is not reached, investors may withdraw their funds */\n uint public minimumFundingGoal;\n\n /* the UNIX timestamp start date of the crowdsale */\n uint public startsAt;\n\n /* the UNIX timestamp end date of the crowdsale */\n uint public endsAt;\n\n /* the number of tokens already sold through this contract*/\n uint public tokensSold = 0;\n\n /* How many wei of funding we have raised */\n uint public weiRaised = 0;\n\n /* Calculate incoming funds from presale contracts and addresses */\n uint public presaleWeiRaised = 0;\n\n /* How many distinct addresses have invested */\n uint public investorCount = 0;\n\n /* How much wei we have returned back to the contract after a failed crowdfund. */\n uint public loadedRefund = 0;\n\n /* How much wei we have given back to investors.*/\n uint public weiRefunded = 0;\n\n /* Has this crowdsale been finalized */\n bool public finalized;\n\n /** How much ETH each address has invested to this crowdsale */\n mapping (address => uint256) public investedAmountOf;\n\n /** How much tokens this crowdsale has credited for each investor address */\n mapping (address => uint256) public tokenAmountOf;\n\n /** Addresses that are allowed to invest even before ICO offical opens. For testing, for ICO partners, etc. */\n mapping (address => bool) public earlyParticipantWhitelist;\n\n /** This is for manul testing for the interaction from owner wallet. You can set it to any value and inspect this in blockchain explorer to see that crowdsale interaction works. */\n uint public ownerTestValue;\n\n /** State machine\n *\n * - Preparing: All contract initialization calls and variables have not been set yet\n * - Prefunding: We have not passed start time yet\n * - Funding: Active crowdsale\n * - Success: Minimum funding goal reached\n * - Failure: Minimum funding goal not reached before ending time\n * - Finalized: The finalized has been called and succesfully executed\n * - Refunding: Refunds are loaded on the contract for reclaim.\n */\n enum State{Unknown, Preparing, PreFunding, Funding, Success, Failure, Finalized, Refunding}\n\n // A new investment was made\n event Invested(address investor, uint weiAmount, uint tokenAmount, uint128 customerId);\n\n // Refund was processed for a contributor\n event Refund(address investor, uint weiAmount);\n\n // The rules were changed what kind of investments we accept\n event InvestmentPolicyChanged(bool newRequireCustomerId, bool newRequiredSignedAddress, address newSignerAddress);\n\n // Address early participation whitelist status changed\n event Whitelisted(address addr, bool status);\n\n // Crowdsale end time has been changed\n event EndsAtChanged(uint newEndsAt);\n\n function CrowdsaleBase(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal) {\n\n owner = msg.sender;\n\n token = FractionalERC20(_token);\n setPricingStrategy(_pricingStrategy);\n\n multisigWallet = _multisigWallet;\n if(multisigWallet == 0) {\n throw;\n }\n\n if(_start == 0) {\n throw;\n }\n\n startsAt = _start;\n\n if(_end == 0) {\n throw;\n }\n\n endsAt = _end;\n\n // Don't mess the dates\n if(startsAt >= endsAt) {\n throw;\n }\n\n // Minimum funding goal can be zero\n minimumFundingGoal = _minimumFundingGoal;\n }\n\n /**\n * Don't expect to just send in money and get tokens.\n */\n function() payable {\n throw;\n }\n\n /**\n * @dev Make an investment.\n *\n * Crowdsale must be running for one to invest.\n * We must have not pressed the emergency brake.\n *\n * @param receiver The Ethereum address who receives the tokens\n * @param customerId (optional) UUID v4 to track the successful payments on the server side'\n * @param tokenAmount Amount of tokens which be credited to receiver\n *\n * @return tokensBought How mony tokens were bought\n */\n function buyTokens(address receiver, uint128 customerId, uint256 tokenAmount) stopInEmergency internal returns(uint tokensBought) {\n\n // Determine if it's a good time to accept investment from this participant\n if(getState() == State.PreFunding) {\n // Are we whitelisted for early deposit\n if(!earlyParticipantWhitelist[receiver]) {\n throw;\n }\n } else if(getState() == State.Funding) {\n // Retail participants can only come in when the crowdsale is running\n // pass\n } else {\n // Unwanted state\n throw;\n }\n\n uint weiAmount = msg.value;\n\n // Dust transaction\n require(tokenAmount != 0);\n\n if(investedAmountOf[receiver] == 0) {\n // A new investor\n investorCount++;\n }\n\n // Update investor\n investedAmountOf[receiver] = investedAmountOf[receiver].plus(weiAmount);\n tokenAmountOf[receiver] = tokenAmountOf[receiver].plus(tokenAmount);\n\n // Update totals\n weiRaised = weiRaised.plus(weiAmount);\n tokensSold = tokensSold.plus(tokenAmount);\n\n if(pricingStrategy.isPresalePurchase(receiver)) {\n presaleWeiRaised = presaleWeiRaised.plus(weiAmount);\n }\n\n // Check that we did not bust the cap\n require(!isBreakingCap(weiAmount, tokenAmount, weiRaised, tokensSold));\n\n assignTokens(receiver, tokenAmount);\n\n // Pocket the money, or fail the crowdsale if we for some reason cannot send the money to our multisig\n if(!multisigWallet.send(weiAmount)) throw;\n\n // Tell us invest was success\n Invested(receiver, weiAmount, tokenAmount, customerId);\n\n return tokenAmount;\n }\n\n /**\n * @dev Make an investment based on pricing strategy\n *\n * This is a wrapper for buyTokens(), but the amount of tokens receiver will\n * have depends on the pricing strategy used.\n *\n * @param receiver The Ethereum address who receives the tokens\n * @param customerId (optional) UUID v4 to track the successful payments on the server side'\n *\n * @return tokensBought How mony tokens were bought\n */\n function investInternal(address receiver, uint128 customerId) stopInEmergency internal returns(uint tokensBought) {\n return buyTokens(receiver, customerId, pricingStrategy.calculatePrice(msg.value, weiRaised - presaleWeiRaised, tokensSold, msg.sender, token.decimals()));\n }\n\n /**\n * @dev Calculate tokens user will have for their purchase\n *\n * @param weisTotal How much ethers (in wei) the user putssssss in\n * @param pricePerToken What is the price for one token\n *\n * @return tokensTotal which is received tokens, token decimals included\n */\n function calculateTokens(uint256 weisTotal, uint256 pricePerToken) public constant returns(uint tokensTotal) {\n // pricePerToken is how many full tokens, token decimal place included, you get for wei amount.\n // Because, in theory, decimal amount can vary, we do the exponent calculation here,\n // though gas wise using 10**18 constant would be much simpler.\n // Furthermore we could use rough amounts and take in raw wei per tokens amount,\n // but we lose too much accuracy for generic calculations, thus all these are\n // practically implemented as 10**18 fixed points.\n uint multiplier = 10 ** token.decimals();\n return weisTotal.times(multiplier)/pricePerToken;\n }\n\n /**\n * Finalize a succcesful crowdsale.\n *\n * The owner can triggre a call the contract that provides post-crowdsale actions, like releasing the tokens.\n */\n function finalize() public inState(State.Success) onlyOwner stopInEmergency {\n\n // Already finalized\n if(finalized) {\n throw;\n }\n\n // Finalizing is optional. We only call it if we are given a finalizing agent.\n if(address(finalizeAgent) != 0) {\n finalizeAgent.finalizeCrowdsale();\n }\n\n finalized = true;\n }\n\n /**\n * Allow to (re)set finalize agent.\n *\n * Design choice: no state restrictions on setting this, so that we can fix fat finger mistakes.\n */\n function setFinalizeAgent(FinalizeAgent addr) onlyOwner {\n finalizeAgent = addr;\n\n // Don't allow setting bad agent\n if(!finalizeAgent.isFinalizeAgent()) {\n throw;\n }\n }\n\n /**\n * Allow crowdsale owner to close early or extend the crowdsale.\n *\n * This is useful e.g. for a manual soft cap implementation:\n * - after X amount is reached determine manual closing\n *\n * This may put the crowdsale to an invalid state,\n * but we trust owners know what they are doing.\n *\n */\n function setEndsAt(uint time) onlyOwner {\n\n if(now > time) {\n throw; // Don't change past\n }\n\n if(startsAt > time) {\n throw; // Prevent human mistakes\n }\n\n endsAt = time;\n EndsAtChanged(endsAt);\n }\n\n /**\n * Allow to (re)set pricing strategy.\n *\n * Design choice: no state restrictions on the set, so that we can fix fat finger mistakes.\n */\n function setPricingStrategy(PricingStrategy _pricingStrategy) onlyOwner {\n pricingStrategy = _pricingStrategy;\n\n // Don't allow setting bad agent\n if(!pricingStrategy.isPricingStrategy()) {\n throw;\n }\n }\n\n /**\n * Allow to change the team multisig address in the case of emergency.\n *\n * This allows to save a deployed crowdsale wallet in the case the crowdsale has not yet begun\n * (we have done only few test transactions). After the crowdsale is going\n * then multisig address stays locked for the safety reasons.\n */\n function setMultisig(address addr) public onlyOwner {\n\n // Change\n if(investorCount > MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE) {\n throw;\n }\n\n multisigWallet = addr;\n }\n\n /**\n * Allow load refunds back on the contract for the refunding.\n *\n * The team can transfer the funds back on the smart contract in the case the minimum goal was not reached..\n */\n function loadRefund() public payable inState(State.Failure) {\n if(msg.value == 0) throw;\n loadedRefund = loadedRefund.plus(msg.value);\n }\n\n /**\n * Investors can claim refund.\n *\n * Note that any refunds from proxy buyers should be handled separately,\n * and not through this contract.\n */\n function refund() public inState(State.Refunding) {\n uint256 weiValue = investedAmountOf[msg.sender];\n if (weiValue == 0) throw;\n investedAmountOf[msg.sender] = 0;\n weiRefunded = weiRefunded.plus(weiValue);\n Refund(msg.sender, weiValue);\n if (!msg.sender.send(weiValue)) throw;\n }\n\n /**\n * @return true if the crowdsale has raised enough money to be a successful.\n */\n function isMinimumGoalReached() public constant returns (bool reached) {\n return weiRaised >= minimumFundingGoal;\n }\n\n /**\n * Check if the contract relationship looks good.\n */\n function isFinalizerSane() public constant returns (bool sane) {\n return finalizeAgent.isSane();\n }\n\n /**\n * Check if the contract relationship looks good.\n */\n function isPricingSane() public constant returns (bool sane) {\n return pricingStrategy.isSane(address(this));\n }\n\n /**\n * Crowdfund state machine management.\n *\n * We make it a function and do not assign the result to a variable, so there is no chance of the variable being stale.\n */\n function getState() public constant returns (State) {\n if(finalized) return State.Finalized;\n else if (address(finalizeAgent) == 0) return State.Preparing;\n else if (!finalizeAgent.isSane()) return State.Preparing;\n else if (!pricingStrategy.isSane(address(this))) return State.Preparing;\n else if (block.timestamp < startsAt) return State.PreFunding;\n else if (block.timestamp <= endsAt && !isCrowdsaleFull()) return State.Funding;\n else if (isMinimumGoalReached()) return State.Success;\n else if (!isMinimumGoalReached() && weiRaised > 0 && loadedRefund >= weiRaised) return State.Refunding;\n else return State.Failure;\n }\n\n /** This is for manual testing of multisig wallet interaction */\n function setOwnerTestValue(uint val) onlyOwner {\n ownerTestValue = val;\n }\n\n /**\n * Allow addresses to do early participation.\n *\n * TODO: Fix spelling error in the name\n */\n function setEarlyParicipantWhitelist(address addr, bool status) onlyOwner {\n earlyParticipantWhitelist[addr] = status;\n Whitelisted(addr, status);\n }\n\n\n /** Interface marker. */\n function isCrowdsale() public constant returns (bool) {\n return true;\n }\n\n //\n // Modifiers\n //\n\n /** Modified allowing execution only if the crowdsale is currently running. */\n modifier inState(State state) {\n if(getState() != state) throw;\n _;\n }\n\n\n //\n // Abstract functions\n //\n\n /**\n * Check if the current invested breaks our cap rules.\n *\n *\n * The child contract must define their own cap setting rules.\n * We allow a lot of flexibility through different capping strategies (ETH, token count)\n * Called from invest().\n *\n * @param weiAmount The amount of wei the investor tries to invest in the current transaction\n * @param tokenAmount The amount of tokens we try to give to the investor in the current transaction\n * @param weiRaisedTotal What would be our total raised balance after this transaction\n * @param tokensSoldTotal What would be our total sold tokens count after this transaction\n *\n * @return true if taking this investment would break our cap rules\n */\n function isBreakingCap(uint weiAmount, uint tokenAmount, uint weiRaisedTotal, uint tokensSoldTotal) constant returns (bool limitBroken);\n\n /**\n * Check if the current crowdsale is full and we can no longer sell any tokens.\n */\n function isCrowdsaleFull() public constant returns (bool);\n\n /**\n * Create new tokens or transfer issued tokens to the investor depending on the cap model.\n */\n function assignTokens(address receiver, uint tokenAmount) internal;\n}\n\n\n\n/**\n * Abstract base contract for token sales with the default buy entry points.\n *\n * Handle\n * - start and end dates\n * - accepting investments\n * - minimum funding goal and refund\n * - various statistics during the crowdfund\n * - different pricing strategies\n * - different investment policies (require server side customer id, allow only whitelisted addresses)\n *\n * Does not Handle\n *\n * - Token allocation (minting vs. transfer)\n * - Cap rules\n *\n */\ncontract Crowdsale is CrowdsaleBase {\n\n /* Do we need to have unique contributor id for each customer */\n bool public requireCustomerId;\n\n /**\n * Do we verify that contributor has been cleared on the server side (accredited investors only).\n * This method was first used in FirstBlood crowdsale to ensure all contributors have accepted terms on sale (on the web).\n */\n bool public requiredSignedAddress;\n\n /* Server side address that signed allowed contributors (Ethereum addresses) that can participate the crowdsale */\n address public signerAddress;\n\n function Crowdsale(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal) CrowdsaleBase(_token, _pricingStrategy, _multisigWallet, _start, _end, _minimumFundingGoal) {\n }\n\n /**\n * Preallocate tokens for the early investors.\n *\n * Preallocated tokens have been sold before the actual crowdsale opens.\n * This function mints the tokens and moves the crowdsale needle.\n *\n * Investor count is not handled; it is assumed this goes for multiple investors\n * and the token distribution happens outside the smart contract flow.\n *\n * No money is exchanged, as the crowdsale team already have received the payment.\n *\n * @param fullTokens tokens as full tokens - decimal places added internally\n * @param weiPrice Price of a single full token in wei\n *\n */\n function preallocate(address receiver, uint fullTokens, uint weiPrice) public onlyOwner {\n\n uint tokenAmount = fullTokens * 10**token.decimals();\n uint weiAmount = weiPrice * fullTokens; // This can be also 0, we give out tokens for free\n\n weiRaised = weiRaised.plus(weiAmount);\n tokensSold = tokensSold.plus(tokenAmount);\n\n investedAmountOf[receiver] = investedAmountOf[receiver].plus(weiAmount);\n tokenAmountOf[receiver] = tokenAmountOf[receiver].plus(tokenAmount);\n\n assignTokens(receiver, tokenAmount);\n\n // Tell us invest was success\n Invested(receiver, weiAmount, tokenAmount, 0);\n }\n\n /**\n * Allow anonymous contributions to this crowdsale.\n */\n function investWithSignedAddress(address addr, uint128 customerId, uint8 v, bytes32 r, bytes32 s) public payable {\n bytes32 hash = sha256(addr);\n if (ecrecover(hash, v, r, s) != signerAddress) throw;\n if(customerId == 0) throw; // UUIDv4 sanity check\n investInternal(addr, customerId);\n }\n\n /**\n * Track who is the customer making the payment so we can send thank you email.\n */\n function investWithCustomerId(address addr, uint128 customerId) public payable {\n if(requiredSignedAddress) throw; // Crowdsale allows only server-side signed participants\n if(customerId == 0) throw; // UUIDv4 sanity check\n investInternal(addr, customerId);\n }\n\n /**\n * Allow anonymous contributions to this crowdsale.\n */\n function invest(address addr) public payable {\n if(requireCustomerId) throw; // Crowdsale needs to track participants for thank you email\n if(requiredSignedAddress) throw; // Crowdsale allows only server-side signed participants\n investInternal(addr, 0);\n }\n\n /**\n * Invest to tokens, recognize the payer and clear his address.\n *\n */\n function buyWithSignedAddress(uint128 customerId, uint8 v, bytes32 r, bytes32 s) public payable {\n investWithSignedAddress(msg.sender, customerId, v, r, s);\n }\n\n /**\n * Invest to tokens, recognize the payer.\n *\n */\n function buyWithCustomerIdWithChecksum(uint128 customerId, bytes1 checksum) public payable {\n // see customerid.py\n if (bytes1(sha3(customerId)) != checksum) throw;\n investWithCustomerId(msg.sender, customerId);\n }\n\n /**\n * Legacy API signature.\n */\n function buyWithCustomerId(uint128 customerId) public payable {\n investWithCustomerId(msg.sender, customerId);\n }\n\n /**\n * The basic entry point to participate the crowdsale process.\n *\n * Pay for funding, get invested tokens back in the sender address.\n */\n function buy() public payable {\n invest(msg.sender);\n }\n\n /**\n * Set policy do we need to have server-side customer ids for the investments.\n *\n */\n function setRequireCustomerId(bool value) onlyOwner {\n requireCustomerId = value;\n InvestmentPolicyChanged(requireCustomerId, requiredSignedAddress, signerAddress);\n }\n\n /**\n * Set policy if all investors must be cleared on the server side first.\n *\n * This is e.g. for the accredited investor clearing.\n *\n */\n function setRequireSignedAddress(bool value, address _signerAddress) onlyOwner {\n requiredSignedAddress = value;\n signerAddress = _signerAddress;\n InvestmentPolicyChanged(requireCustomerId, requiredSignedAddress, signerAddress);\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n assert(c / a == b);\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n\n\n\n/**\n * @title Basic token\n * @dev Basic version of StandardToken, with no allowances.\n */\ncontract BasicToken is ERC20Basic {\n using SafeMath for uint256;\n\n mapping(address => uint256) balances;\n\n uint256 totalSupply_;\n\n /**\n * @dev total number of tokens in existence\n */\n function totalSupply() public view returns (uint256) {\n return totalSupply_;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param _to The address to transfer to.\n * @param _value The amount to be transferred.\n */\n function transfer(address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[msg.sender]);\n\n // SafeMath.sub will throw if there is not enough balance.\n balances[msg.sender] = balances[msg.sender].sub(_value);\n balances[_to] = balances[_to].add(_value);\n Transfer(msg.sender, _to, _value);\n return true;\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param _owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address _owner) public view returns (uint256 balance) {\n return balances[_owner];\n }\n\n}\n\n\n\n\n/**\n * @title Standard ERC20 token\n *\n * @dev Implementation of the basic standard token.\n * @dev https://github.com/ethereum/EIPs/issues/20\n * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol\n */\ncontract StandardToken is ERC20, BasicToken {\n\n mapping (address => mapping (address => uint256)) internal allowed;\n\n\n /**\n * @dev Transfer tokens from one address to another\n * @param _from address The address which you want to send tokens from\n * @param _to address The address which you want to transfer to\n * @param _value uint256 the amount of tokens to be transferred\n */\n function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[_from]);\n require(_value <= allowed[_from][msg.sender]);\n\n balances[_from] = balances[_from].sub(_value);\n balances[_to] = balances[_to].add(_value);\n allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);\n Transfer(_from, _to, _value);\n return true;\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n *\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param _spender The address which will spend the funds.\n * @param _value The amount of tokens to be spent.\n */\n function approve(address _spender, uint256 _value) public returns (bool) {\n allowed[msg.sender][_spender] = _value;\n Approval(msg.sender, _spender, _value);\n return true;\n }\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param _owner address The address which owns the funds.\n * @param _spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address _owner, address _spender) public view returns (uint256) {\n return allowed[_owner][_spender];\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(address _spender, uint _addedValue) public returns (bool) {\n allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {\n uint oldValue = allowed[msg.sender][_spender];\n if (_subtractedValue > oldValue) {\n allowed[msg.sender][_spender] = 0;\n } else {\n allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);\n }\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\ncontract Recoverable is Ownable {\n\n /// @dev Empty constructor (for now)\n function Recoverable() {\n }\n\n /// @dev This will be invoked by the owner, when owner wants to rescue tokens\n /// @param token Token which will we rescue to the owner from the contract\n function recoverTokens(ERC20Basic token) onlyOwner public {\n token.transfer(owner, tokensToBeReturned(token));\n }\n\n /// @dev Interface function, can be overwritten by the superclass\n /// @param token Token which balance we will check and return\n /// @return The amount of tokens (in smallest denominator) the contract owns\n function tokensToBeReturned(ERC20Basic token) public returns (uint) {\n return token.balanceOf(this);\n }\n}\n\n\n\n/**\n * Standard EIP-20 token with an interface marker.\n *\n * @notice Interface marker is used by crowdsale contracts to validate that addresses point a good token contract.\n *\n */\ncontract StandardTokenExt is StandardToken, Recoverable {\n\n /* Interface declaration */\n function isToken() public constant returns (bool weAre) {\n return true;\n }\n}\n\n\n\n/**\n * Define interface for releasing the token transfer after a successful crowdsale.\n */\ncontract ReleasableToken is StandardTokenExt {\n\n /* The finalizer contract that allows unlift the transfer limits on this token */\n address public releaseAgent;\n\n /** A crowdsale contract can release us to the wild if ICO success. If false we are are in transfer lock up period.*/\n bool public released = false;\n\n /** Map of agents that are allowed to transfer tokens regardless of the lock down period. These are crowdsale contracts and possible the team multisig itself. */\n mapping (address => bool) public transferAgents;\n\n /**\n * Limit token transfer until the crowdsale is over.\n *\n */\n modifier canTransfer(address _sender) {\n\n if(!released) {\n if(!transferAgents[_sender]) {\n throw;\n }\n }\n\n _;\n }\n\n /**\n * Set the contract that can call release and make the token transferable.\n *\n * Design choice. Allow reset the release agent to fix fat finger mistakes.\n */\n function setReleaseAgent(address addr) onlyOwner inReleaseState(false) public {\n\n // We don't do interface check here as we might want to a normal wallet address to act as a release agent\n releaseAgent = addr;\n }\n\n /**\n * Owner can allow a particular address (a crowdsale contract) to transfer tokens despite the lock up period.\n */\n function setTransferAgent(address addr, bool state) onlyOwner inReleaseState(false) public {\n transferAgents[addr] = state;\n }\n\n /**\n * One way function to release the tokens to the wild.\n *\n * Can be called only from the release agent that is the final ICO contract. It is only called if the crowdsale has been success (first milestone reached).\n */\n function releaseTokenTransfer() public onlyReleaseAgent {\n released = true;\n }\n\n /** The function can be called only before or after the tokens have been releasesd */\n modifier inReleaseState(bool releaseState) {\n if(releaseState != released) {\n throw;\n }\n _;\n }\n\n /** The function can be called only by a whitelisted release agent. */\n modifier onlyReleaseAgent() {\n if(msg.sender != releaseAgent) {\n throw;\n }\n _;\n }\n\n function transfer(address _to, uint _value) canTransfer(msg.sender) returns (bool success) {\n // Call StandardToken.transfer()\n return super.transfer(_to, _value);\n }\n\n function transferFrom(address _from, address _to, uint _value) canTransfer(_from) returns (bool success) {\n // Call StandardToken.transferForm()\n return super.transferFrom(_from, _to, _value);\n }\n\n}\n\n\n/**\n * The default behavior for the crowdsale end.\n *\n * Unlock tokens.\n */\ncontract DefaultFinalizeAgent is FinalizeAgent {\n\n ReleasableToken public token;\n Crowdsale public crowdsale;\n\n function DefaultFinalizeAgent(ReleasableToken _token, Crowdsale _crowdsale) {\n token = _token;\n crowdsale = _crowdsale;\n }\n\n /** Check that we can release the token */\n function isSane() public constant returns (bool) {\n return (token.releaseAgent() == address(this));\n }\n\n /** Called once by crowdsale finalize() if the sale was success. */\n function finalizeCrowdsale() public {\n if(msg.sender != address(crowdsale)) {\n throw;\n }\n token.releaseTokenTransfer();\n }\n\n}\n"}, "ERC20": {"abi": [{"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "approve", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "from", "type": "address"}, {"name": "to", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "who", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "to", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "owner", "type": "address"}, {"name": "spender", "type": "address"}], "name": "allowance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}, {"indexed": true, "name": "spender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "bytecode": "0x", "bytecode_runtime": "0x", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": null, "name": "ERC20", "ordered_full_dependencies": [], "source_path": "zeppelin/contracts/token/ERC20/ERC20.sol"}, "ERC20Basic": {"abi": [{"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "who", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "to", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "bytecode": "0x", "bytecode_runtime": "0x", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": null, "name": "ERC20Basic", "ordered_full_dependencies": [], "source_path": "zeppelin/contracts/token/ERC20/ERC20Basic.sol"}, "ERC677": {"abi": [{"constant": false, "inputs": [{"name": "receiver", "type": "address"}, {"name": "amount", "type": "uint256"}, {"name": "data", "type": "bytes"}], "name": "transferAndCall", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "from", "type": "address"}, {"indexed": false, "name": "receiver", "type": "address"}, {"indexed": false, "name": "amount", "type": "uint256"}, {"indexed": false, "name": "data", "type": "bytes"}], "name": "ERC677Transfer", "type": "event"}], "bytecode": "0x", "bytecode_runtime": "0x", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": null, "name": "ERC677", "ordered_full_dependencies": [], "source_path": "contracts/security-token/ERC677.sol"}, "ERC677Receiver": {"abi": [{"constant": false, "inputs": [{"name": "from", "type": "address"}, {"name": "amount", "type": "uint256"}, {"name": "data", "type": "bytes"}], "name": "tokenFallback", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}], "bytecode": "0x", "bytecode_runtime": "0x", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": null, "name": "ERC677Receiver", "ordered_full_dependencies": [], "source_path": "contracts/security-token/ERC677.sol"}, "ERC677Token": {"abi": [{"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "approve", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "from", "type": "address"}, {"name": "to", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "receiver", "type": "address"}, {"name": "amount", "type": "uint256"}, {"name": "data", "type": "bytes"}], "name": "transferAndCall", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "who", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "to", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "owner", "type": "address"}, {"name": "spender", "type": "address"}], "name": "allowance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "from", "type": "address"}, {"indexed": false, "name": "receiver", "type": "address"}, {"indexed": false, "name": "amount", "type": "uint256"}, {"indexed": false, "name": "data", "type": "bytes"}], "name": "ERC677Transfer", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}, {"indexed": true, "name": "spender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "bytecode": "0x", "bytecode_runtime": "0x", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": null, "name": "ERC677Token", "ordered_full_dependencies": [], "source_path": "contracts/security-token/ERC677Token.sol"}, "ERC865": {"abi": [{"constant": true, "inputs": [], "name": "name", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "approve", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_signature", "type": "bytes"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}, {"name": "_fee", "type": "uint256"}, {"name": "_nonce", "type": "uint256"}], "name": "transferPreSigned", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_token", "type": "address"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}, {"name": "_fee", "type": "uint256"}, {"name": "_nonce", "type": "uint256"}], "name": "transferPreSignedHashing", "outputs": [{"name": "", "type": "bytes32"}], "payable": false, "stateMutability": "pure", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "addedValue", "type": "uint256"}, {"name": "data", "type": "bytes"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "tokenCount", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "hash", "type": "bytes32"}, {"name": "sig", "type": "bytes"}], "name": "recover", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "pure", "type": "function"}, {"constant": false, "inputs": [{"name": "from", "type": "address"}, {"name": "to", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "decimals", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "owner", "type": "address"}, {"name": "blockNumber", "type": "uint256"}], "name": "balanceAt", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "receiver", "type": "address"}, {"name": "amount", "type": "uint256"}, {"name": "data", "type": "bytes"}], "name": "transferAndCall", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}, {"name": "", "type": "uint256"}], "name": "tokenBalances", "outputs": [{"name": "blockNumber", "type": "uint256"}, {"name": "value", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "uint256"}], "name": "tokensTotal", "outputs": [{"name": "blockNumber", "type": "uint256"}, {"name": "value", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}, {"name": "", "type": "address"}], "name": "allowed", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "subtractedValue", "type": "uint256"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "owner", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "subtractedValue", "type": "uint256"}, {"name": "data", "type": "bytes"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "transferVerifier", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "symbol", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "blockNumber", "type": "uint256"}], "name": "totalSupplyAt", "outputs": [{"name": "tokenCount", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "to", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "addedValue", "type": "uint256"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "owner", "type": "address"}, {"name": "spender", "type": "address"}], "name": "allowance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": true, "name": "delegate", "type": "address"}, {"indexed": false, "name": "amount", "type": "uint256"}, {"indexed": false, "name": "fee", "type": "uint256"}], "name": "TransferPreSigned", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "from", "type": "address"}, {"indexed": false, "name": "hash", "type": "bytes32"}], "name": "Debug", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "from", "type": "address"}, {"indexed": false, "name": "receiver", "type": "address"}, {"indexed": false, "name": "amount", "type": "uint256"}, {"indexed": false, "name": "data", "type": "bytes"}], "name": "ERC677Transfer", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}, {"indexed": true, "name": "spender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "bytecode": "0x", "bytecode_runtime": "0x", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": null, "name": "ERC865", "ordered_full_dependencies": [], "source_path": "contracts/security-token/ERC865.sol"}, "EthTranchePricing": {"abi": [{"constant": true, "inputs": [], "name": "isPricingStrategy", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "value", "type": "uint256"}, {"name": "weiRaised", "type": "uint256"}, {"name": "tokensSold", "type": "uint256"}, {"name": "msgSender", "type": "address"}, {"name": "decimals", "type": "uint256"}], "name": "calculatePrice", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "uint256"}], "name": "tranches", "outputs": [{"name": "amount", "type": "uint256"}, {"name": "price", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getPricingStartsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "trancheCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getPricingEndsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "MAX_TRANCHES", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "_crowdsale", "type": "address"}], "name": "isSane", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "weiRaised", "type": "uint256"}], "name": "getCurrentPrice", "outputs": [{"name": "result", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "n", "type": "uint256"}], "name": "getTranche", "outputs": [{"name": "", "type": "uint256"}, {"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "preicoAddress", "type": "address"}, {"name": "pricePerToken", "type": "uint256"}], "name": "setPreicoAddress", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "purchaser", "type": "address"}], "name": "isPresalePurchase", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "preicoAddresses", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [{"name": "_tranches", "type": "uint256[]"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"payable": true, "stateMutability": "payable", "type": "fallback"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "bytecode": "0x608060405234801561001057600080fd5b506040516108c03803806108c083398101604052805160008054600160a060020a03191633178155910180519091908190600290066001148061005557508251601411155b1561005f57600080fd5b50508051600290046016556000805b82516002900481101561012c57828160020281518110151561008c57fe5b60209081029091010151600282600a81106100a357fe5b600202016000018190555082816002026001018151811015156100c257fe5b60209081029091010151600282600a81106100d957fe5b600202016001018190555081600014158015610106575081600282600a81106100fe57fe5b600202015411155b1561011057600080fd5b600281600a811061011d57fe5b6002020154915060010161006e565b6002541561013957600080fd5b60165460029060001901600a811061014d57fe5b6002020160010154600014151561016357600080fd5b50505061074b806101756000396000f3006080604052600436106100da5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166304bbc25581146100df57806318a4155e1461010857806326c25962146101475780632c9a0a951461017857806359eb82241461018d5780636f079f90146101a257806389506a44146101b75780638da5cb5b146101cc5780638e768288146101fd578063c55d0f561461021e578063d972e8ad14610236578063e474f97a1461024e578063f14ae17d14610274578063f1ef9a0814610295578063f2fde38b146102b6575b600080fd5b3480156100eb57600080fd5b506100f46102d7565b604080519115158252519081900360200190f35b34801561011457600080fd5b50610135600435602435604435600160a060020a03606435166084356102dc565b60408051918252519081900360200190f35b34801561015357600080fd5b5061015f600435610490565b6040805192835260208301919091528051918290030190f35b34801561018457600080fd5b506101356104af565b34801561019957600080fd5b506101356104bf565b3480156101ae57600080fd5b506101356104c5565b3480156101c357600080fd5b506101356104cf565b3480156101d857600080fd5b506101e16104d4565b60408051600160a060020a039092168252519081900360200190f35b34801561020957600080fd5b506100f4600160a060020a03600435166104e3565b34801561022a57600080fd5b506101356004356104eb565b34801561024257600080fd5b5061015f600435610500565b34801561025a57600080fd5b50610272600160a060020a0360043516602435610538565b005b34801561028057600080fd5b506100f4600160a060020a036004351661056b565b3480156102a157600080fd5b50610135600160a060020a036004351661059b565b3480156102c257600080fd5b50610272600160a060020a03600435166105ad565b600190565b600160a060020a038216600090815260016020526040812054600a83900a9082908110156103cb57600160a060020a0385166000908152600160209081526040918290205482517f1d3b9edf000000000000000000000000000000000000000000000000000000008152600481018c9052602481018690529251909273__contracts/SafeMathLib.sol:SafeMathLi__92631d3b9edf92604480840193829003018186803b15801561038e57600080fd5b505af41580156103a2573d6000803e3d6000fd5b505050506040513d60208110156103b857600080fd5b50518115156103c357fe5b049250610485565b6103d4876104eb565b9050808873__contracts/SafeMathLib.sol:SafeMathLi__631d3b9edf9091856040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b15801561044c57600080fd5b505af4158015610460573d6000803e3d6000fd5b505050506040513d602081101561047657600080fd5b505181151561048157fe5b0492505b505095945050505050565b600281600a811061049d57fe5b60020201805460019091015490915082565b60006104b9610641565b51905090565b60165481565b60006104b9610676565b600a81565b600054600160a060020a031681565b60015b919050565b60006104f682610692565b6020015192915050565b600080600283600a811061051057fe5b6002020160000154600284600a8110151561052757fe5b600202016001015491509150915091565b600054600160a060020a0316331461054f57600080fd5b600160a060020a03909116600090815260016020526040902055565b600160a060020a038116600090815260016020526040812054811015610593575060016104e6565b5060006104e6565b60016020526000908152604090205481565b600054600160a060020a031633146105c457600080fd5b600160a060020a03811615156105d957600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b610649610708565b600260005b6002020160408051908101604052908160008201548152602001600182015481525050905090565b61067e610708565b60165460029060001901600a811061064e57fe5b61069a610708565b60005b600a81101561070257600281600a81106106b357fe5b60020201548310156106fa5760026000198201600a81106106d057fe5b60020201604080519081016040529081600082015481526020016001820154815250509150610702565b60010161069d565b50919050565b6040805180820190915260008082526020820152905600a165627a7a72305820d3be910c39d6128b0180ba58805623edb67f956e17910b4d1ff2f192207d6ec70029", "bytecode_runtime": "0x6080604052600436106100da5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166304bbc25581146100df57806318a4155e1461010857806326c25962146101475780632c9a0a951461017857806359eb82241461018d5780636f079f90146101a257806389506a44146101b75780638da5cb5b146101cc5780638e768288146101fd578063c55d0f561461021e578063d972e8ad14610236578063e474f97a1461024e578063f14ae17d14610274578063f1ef9a0814610295578063f2fde38b146102b6575b600080fd5b3480156100eb57600080fd5b506100f46102d7565b604080519115158252519081900360200190f35b34801561011457600080fd5b50610135600435602435604435600160a060020a03606435166084356102dc565b60408051918252519081900360200190f35b34801561015357600080fd5b5061015f600435610490565b6040805192835260208301919091528051918290030190f35b34801561018457600080fd5b506101356104af565b34801561019957600080fd5b506101356104bf565b3480156101ae57600080fd5b506101356104c5565b3480156101c357600080fd5b506101356104cf565b3480156101d857600080fd5b506101e16104d4565b60408051600160a060020a039092168252519081900360200190f35b34801561020957600080fd5b506100f4600160a060020a03600435166104e3565b34801561022a57600080fd5b506101356004356104eb565b34801561024257600080fd5b5061015f600435610500565b34801561025a57600080fd5b50610272600160a060020a0360043516602435610538565b005b34801561028057600080fd5b506100f4600160a060020a036004351661056b565b3480156102a157600080fd5b50610135600160a060020a036004351661059b565b3480156102c257600080fd5b50610272600160a060020a03600435166105ad565b600190565b600160a060020a038216600090815260016020526040812054600a83900a9082908110156103cb57600160a060020a0385166000908152600160209081526040918290205482517f1d3b9edf000000000000000000000000000000000000000000000000000000008152600481018c9052602481018690529251909273__contracts/SafeMathLib.sol:SafeMathLi__92631d3b9edf92604480840193829003018186803b15801561038e57600080fd5b505af41580156103a2573d6000803e3d6000fd5b505050506040513d60208110156103b857600080fd5b50518115156103c357fe5b049250610485565b6103d4876104eb565b9050808873__contracts/SafeMathLib.sol:SafeMathLi__631d3b9edf9091856040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b15801561044c57600080fd5b505af4158015610460573d6000803e3d6000fd5b505050506040513d602081101561047657600080fd5b505181151561048157fe5b0492505b505095945050505050565b600281600a811061049d57fe5b60020201805460019091015490915082565b60006104b9610641565b51905090565b60165481565b60006104b9610676565b600a81565b600054600160a060020a031681565b60015b919050565b60006104f682610692565b6020015192915050565b600080600283600a811061051057fe5b6002020160000154600284600a8110151561052757fe5b600202016001015491509150915091565b600054600160a060020a0316331461054f57600080fd5b600160a060020a03909116600090815260016020526040902055565b600160a060020a038116600090815260016020526040812054811015610593575060016104e6565b5060006104e6565b60016020526000908152604090205481565b600054600160a060020a031633146105c457600080fd5b600160a060020a03811615156105d957600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b610649610708565b600260005b6002020160408051908101604052908160008201548152602001600182015481525050905090565b61067e610708565b60165460029060001901600a811061064e57fe5b61069a610708565b60005b600a81101561070257600281600a81106106b357fe5b60020201548310156106fa5760026000198201600a81106106d057fe5b60020201604080519081016040529081600082015481526020016001820154815250509150610702565b60010161069d565b50919050565b6040805180820190915260008082526020820152905600a165627a7a72305820d3be910c39d6128b0180ba58805623edb67f956e17910b4d1ff2f192207d6ec70029", "direct_dependencies": ["SafeMathLib"], "full_dependencies": ["SafeMathLib"], "linkrefs": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 2462}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 2718}], "linkrefs_runtime": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 1716}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 1972}], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": true, "inputs": [], "name": "isPricingStrategy", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "value", "type": "uint256"}, {"name": "weiRaised", "type": "uint256"}, {"name": "tokensSold", "type": "uint256"}, {"name": "msgSender", "type": "address"}, {"name": "decimals", "type": "uint256"}], "name": "calculatePrice", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "uint256"}], "name": "tranches", "outputs": [{"name": "amount", "type": "uint256"}, {"name": "price", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getPricingStartsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "trancheCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getPricingEndsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "MAX_TRANCHES", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "_crowdsale", "type": "address"}], "name": "isSane", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "weiRaised", "type": "uint256"}], "name": "getCurrentPrice", "outputs": [{"name": "result", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "n", "type": "uint256"}], "name": "getTranche", "outputs": [{"name": "", "type": "uint256"}, {"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "preicoAddress", "type": "address"}, {"name": "pricePerToken", "type": "uint256"}], "name": "setPreicoAddress", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "purchaser", "type": "address"}], "name": "isPresalePurchase", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "preicoAddresses", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [{"name": "_tranches", "type": "uint256[]"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"payable": true, "stateMutability": "payable", "type": "fallback"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "devdoc": {"methods": {"calculatePrice(uint256,uint256,uint256,address,uint256)": {"details": "Calculate the current price for buy in amount."}, "getCurrentPrice(uint256)": {"details": "Get the current price.", "params": {"weiRaised": "total amount of weis raised, for calculating the current tranche"}, "return": "The current price or 0 if we are outside trache ranges"}, "getTranche(uint256)": {"details": "Iterate through tranches. You reach end of tranches when price = 0", "return": "tuple (time, price)"}, "setPreicoAddress(address,uint256)": {"details": "This is invoked once for every pre-ICO address, set pricePerToken to 0 to disable", "params": {"preicoAddress": "PresaleFundCollector address", "pricePerToken": "How many weis one token cost for pre-ico investors"}}, "transferOwnership(address)": {"details": "Allows the current owner to transfer control of the contract to a newOwner.", "params": {"newOwner": "The address to transfer ownership to."}}}}, "userdoc": {"methods": {"isPricingStrategy()": {"notice": "Interface declaration. "}}}}, "settings": {"compilationTarget": {"contracts/EthTranchePricing.sol": "EthTranchePricing"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/Crowdsale.sol": {"keccak256": "0x2697c26528f64bb954a7c2547d3b43317d2d2b02c7d9d05a7b1ab388cd79f65d", "urls": ["bzzr://f28b280794222114141c51dd5c388d403a7c98d8b51e04170a0e294246d5164b"]}, "contracts/CrowdsaleBase.sol": {"keccak256": "0xe2c9ed11183ce705616980df7b02544d72fe18b40395da7d9d4bcb621fb87871", "urls": ["bzzr://07f3887ba0d0eb3248b1ad3581480ed71a2fe70a47dcc283c4e97c8c92e0790a"]}, "contracts/EthTranchePricing.sol": {"keccak256": "0xc2a8df4ab0a04489847f79ab18a76a71cc2a93fde6b3f686a6e193c3c5045785", "urls": ["bzzr://8b69863e70dc60fb68991d5b90dbd09540d200f5f898adbc99a9d3a8c97501b9"]}, "contracts/FinalizeAgent.sol": {"keccak256": "0x309fd0510e0b3e2b5044e33f7c80cfb2d6f2a5697e41a5f185931d65770cfea9", "urls": ["bzzr://4e7ed6f82c0f542e92e56c12566b2ecd7666730865bf12566c27587ec64160ac"]}, "contracts/FractionalERC20.sol": {"keccak256": "0x75bc4ad90a8b13ce961c89b1bf405776f616e019d3a2720168f8e52be223198f", "urls": ["bzzr://6a3688f12da1a5c890ef06f80f883f6c5370886092d38a1b33cd4219b718478b"]}, "contracts/Haltable.sol": {"keccak256": "0x265dcf25e7c9ab4b6eecd2181f1b71334a1b5381a60f8db7d9526dab120f4b70", "urls": ["bzzr://d522e00fa9e075941469dd81738b59fdb99ce3c12cdc39e33abe40b588c4da9b"]}, "contracts/PricingStrategy.sol": {"keccak256": "0x8df5093b7d07168ad994f9176de0bd2268f6563b1e8a3a448d8cfe7fe246c628", "urls": ["bzzr://ef5c944d51f739ab34e2c951d6ac82a7152e6bb844058a8e57bae52c14cbe16b"]}, "contracts/SafeMathLib.sol": {"keccak256": "0x501bfe31e274b9a5591f7c540bdced4d4312e27d4f19599147c9bbca3d9c6b18", "urls": ["bzzr://a80935ebddb06c247d71372d4e5833ee029f08633bd0fe4a274a57009567e5b9"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}}, "version": 1}, "name": "EthTranchePricing", "ordered_full_dependencies": ["SafeMathLib"], "source_path": "contracts/EthTranchePricing.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Interface for defining crowdsale pricing.\n */\ncontract PricingStrategy {\n\n /** Interface declaration. */\n function isPricingStrategy() public constant returns (bool) {\n return true;\n }\n\n /** Self check if all references are correctly set.\n *\n * Checks that pricing strategy matches crowdsale parameters.\n */\n function isSane(address crowdsale) public constant returns (bool) {\n return true;\n }\n\n /**\n * @dev Pricing tells if this is a presale purchase or not.\n @param purchaser Address of the purchaser\n @return False by default, true if a presale purchaser\n */\n function isPresalePurchase(address purchaser) public constant returns (bool) {\n return false;\n }\n\n /**\n * When somebody tries to buy tokens for X eth, calculate how many tokens they get.\n *\n *\n * @param value - What is the value of the transaction send in as wei\n * @param tokensSold - how much tokens have been sold this far\n * @param weiRaised - how much money has been raised this far in the main token sale - this number excludes presale\n * @param msgSender - who is the investor of this transaction\n * @param decimals - how many decimal units the token has\n * @return Amount of tokens the investor receives\n */\n function calculatePrice(uint value, uint weiRaised, uint tokensSold, address msgSender, uint decimals) public constant returns (uint tokenAmount);\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Safe unsigned safe math.\n *\n * https://blog.aragon.one/library-driven-development-in-solidity-2bebcaf88736#.750gwtwli\n *\n * Originally from https://raw.githubusercontent.com/AragonOne/zeppelin-solidity/master/contracts/SafeMathLib.sol\n *\n * Maintained here until merged to mainline zeppelin-solidity.\n *\n */\nlibrary SafeMathLib {\n\n function times(uint a, uint b) returns (uint) {\n uint c = a * b;\n assert(a == 0 || c / a == b);\n return c;\n }\n\n function minus(uint a, uint b) returns (uint) {\n assert(b <= a);\n return a - b;\n }\n\n function plus(uint a, uint b) returns (uint) {\n uint c = a + b;\n assert(c>=a);\n return c;\n }\n\n}\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Finalize agent defines what happens at the end of succeseful crowdsale.\n *\n * - Allocate tokens for founders, bounties and community\n * - Make tokens transferable\n * - etc.\n */\ncontract FinalizeAgent {\n\n function isFinalizeAgent() public constant returns(bool) {\n return true;\n }\n\n /** Return true if we can run finalizeCrowdsale() properly.\n *\n * This is a safety check function that doesn't allow crowdsale to begin\n * unless the finalizer has been set up properly.\n */\n function isSane() public constant returns (bool);\n\n /** Called once by crowdsale finalize() if the sale was success. */\n function finalizeCrowdsale();\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n\n/**\n * A token that defines fractional units as decimals.\n */\ncontract FractionalERC20 is ERC20 {\n\n uint public decimals;\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n/*\n * Haltable\n *\n * Abstract contract that allows children to implement an\n * emergency stop mechanism. Differs from Pausable by causing a throw when in halt mode.\n *\n *\n * Originally envisioned in FirstBlood ICO contract.\n */\ncontract Haltable is Ownable {\n bool public halted;\n\n modifier stopInEmergency {\n if (halted) throw;\n _;\n }\n\n modifier stopNonOwnersInEmergency {\n if (halted && msg.sender != owner) throw;\n _;\n }\n\n modifier onlyInEmergency {\n if (!halted) throw;\n _;\n }\n\n // called by the owner on emergency, triggers stopped state\n function halt() external onlyOwner {\n halted = true;\n }\n\n // called by the owner on end of emergency, returns to normal state\n function unhalt() external onlyOwner onlyInEmergency {\n halted = false;\n }\n\n}\n\n\n\n\n\n\n\n/**\n * Crowdsale state machine without buy functionality.\n *\n * Implements basic state machine logic, but leaves out all buy functions,\n * so that subclasses can implement their own buying logic.\n *\n *\n * For the default buy() implementation see Crowdsale.sol.\n */\ncontract CrowdsaleBase is Haltable {\n\n /* Max investment count when we are still allowed to change the multisig address */\n uint public MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE = 5;\n\n using SafeMathLib for uint;\n\n /* The token we are selling */\n FractionalERC20 public token;\n\n /* How we are going to price our offering */\n PricingStrategy public pricingStrategy;\n\n /* Post-success callback */\n FinalizeAgent public finalizeAgent;\n\n /* tokens will be transfered from this address */\n address public multisigWallet;\n\n /* if the funding goal is not reached, investors may withdraw their funds */\n uint public minimumFundingGoal;\n\n /* the UNIX timestamp start date of the crowdsale */\n uint public startsAt;\n\n /* the UNIX timestamp end date of the crowdsale */\n uint public endsAt;\n\n /* the number of tokens already sold through this contract*/\n uint public tokensSold = 0;\n\n /* How many wei of funding we have raised */\n uint public weiRaised = 0;\n\n /* Calculate incoming funds from presale contracts and addresses */\n uint public presaleWeiRaised = 0;\n\n /* How many distinct addresses have invested */\n uint public investorCount = 0;\n\n /* How much wei we have returned back to the contract after a failed crowdfund. */\n uint public loadedRefund = 0;\n\n /* How much wei we have given back to investors.*/\n uint public weiRefunded = 0;\n\n /* Has this crowdsale been finalized */\n bool public finalized;\n\n /** How much ETH each address has invested to this crowdsale */\n mapping (address => uint256) public investedAmountOf;\n\n /** How much tokens this crowdsale has credited for each investor address */\n mapping (address => uint256) public tokenAmountOf;\n\n /** Addresses that are allowed to invest even before ICO offical opens. For testing, for ICO partners, etc. */\n mapping (address => bool) public earlyParticipantWhitelist;\n\n /** This is for manul testing for the interaction from owner wallet. You can set it to any value and inspect this in blockchain explorer to see that crowdsale interaction works. */\n uint public ownerTestValue;\n\n /** State machine\n *\n * - Preparing: All contract initialization calls and variables have not been set yet\n * - Prefunding: We have not passed start time yet\n * - Funding: Active crowdsale\n * - Success: Minimum funding goal reached\n * - Failure: Minimum funding goal not reached before ending time\n * - Finalized: The finalized has been called and succesfully executed\n * - Refunding: Refunds are loaded on the contract for reclaim.\n */\n enum State{Unknown, Preparing, PreFunding, Funding, Success, Failure, Finalized, Refunding}\n\n // A new investment was made\n event Invested(address investor, uint weiAmount, uint tokenAmount, uint128 customerId);\n\n // Refund was processed for a contributor\n event Refund(address investor, uint weiAmount);\n\n // The rules were changed what kind of investments we accept\n event InvestmentPolicyChanged(bool newRequireCustomerId, bool newRequiredSignedAddress, address newSignerAddress);\n\n // Address early participation whitelist status changed\n event Whitelisted(address addr, bool status);\n\n // Crowdsale end time has been changed\n event EndsAtChanged(uint newEndsAt);\n\n function CrowdsaleBase(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal) {\n\n owner = msg.sender;\n\n token = FractionalERC20(_token);\n setPricingStrategy(_pricingStrategy);\n\n multisigWallet = _multisigWallet;\n if(multisigWallet == 0) {\n throw;\n }\n\n if(_start == 0) {\n throw;\n }\n\n startsAt = _start;\n\n if(_end == 0) {\n throw;\n }\n\n endsAt = _end;\n\n // Don't mess the dates\n if(startsAt >= endsAt) {\n throw;\n }\n\n // Minimum funding goal can be zero\n minimumFundingGoal = _minimumFundingGoal;\n }\n\n /**\n * Don't expect to just send in money and get tokens.\n */\n function() payable {\n throw;\n }\n\n /**\n * @dev Make an investment.\n *\n * Crowdsale must be running for one to invest.\n * We must have not pressed the emergency brake.\n *\n * @param receiver The Ethereum address who receives the tokens\n * @param customerId (optional) UUID v4 to track the successful payments on the server side'\n * @param tokenAmount Amount of tokens which be credited to receiver\n *\n * @return tokensBought How mony tokens were bought\n */\n function buyTokens(address receiver, uint128 customerId, uint256 tokenAmount) stopInEmergency internal returns(uint tokensBought) {\n\n // Determine if it's a good time to accept investment from this participant\n if(getState() == State.PreFunding) {\n // Are we whitelisted for early deposit\n if(!earlyParticipantWhitelist[receiver]) {\n throw;\n }\n } else if(getState() == State.Funding) {\n // Retail participants can only come in when the crowdsale is running\n // pass\n } else {\n // Unwanted state\n throw;\n }\n\n uint weiAmount = msg.value;\n\n // Dust transaction\n require(tokenAmount != 0);\n\n if(investedAmountOf[receiver] == 0) {\n // A new investor\n investorCount++;\n }\n\n // Update investor\n investedAmountOf[receiver] = investedAmountOf[receiver].plus(weiAmount);\n tokenAmountOf[receiver] = tokenAmountOf[receiver].plus(tokenAmount);\n\n // Update totals\n weiRaised = weiRaised.plus(weiAmount);\n tokensSold = tokensSold.plus(tokenAmount);\n\n if(pricingStrategy.isPresalePurchase(receiver)) {\n presaleWeiRaised = presaleWeiRaised.plus(weiAmount);\n }\n\n // Check that we did not bust the cap\n require(!isBreakingCap(weiAmount, tokenAmount, weiRaised, tokensSold));\n\n assignTokens(receiver, tokenAmount);\n\n // Pocket the money, or fail the crowdsale if we for some reason cannot send the money to our multisig\n if(!multisigWallet.send(weiAmount)) throw;\n\n // Tell us invest was success\n Invested(receiver, weiAmount, tokenAmount, customerId);\n\n return tokenAmount;\n }\n\n /**\n * @dev Make an investment based on pricing strategy\n *\n * This is a wrapper for buyTokens(), but the amount of tokens receiver will\n * have depends on the pricing strategy used.\n *\n * @param receiver The Ethereum address who receives the tokens\n * @param customerId (optional) UUID v4 to track the successful payments on the server side'\n *\n * @return tokensBought How mony tokens were bought\n */\n function investInternal(address receiver, uint128 customerId) stopInEmergency internal returns(uint tokensBought) {\n return buyTokens(receiver, customerId, pricingStrategy.calculatePrice(msg.value, weiRaised - presaleWeiRaised, tokensSold, msg.sender, token.decimals()));\n }\n\n /**\n * @dev Calculate tokens user will have for their purchase\n *\n * @param weisTotal How much ethers (in wei) the user putssssss in\n * @param pricePerToken What is the price for one token\n *\n * @return tokensTotal which is received tokens, token decimals included\n */\n function calculateTokens(uint256 weisTotal, uint256 pricePerToken) public constant returns(uint tokensTotal) {\n // pricePerToken is how many full tokens, token decimal place included, you get for wei amount.\n // Because, in theory, decimal amount can vary, we do the exponent calculation here,\n // though gas wise using 10**18 constant would be much simpler.\n // Furthermore we could use rough amounts and take in raw wei per tokens amount,\n // but we lose too much accuracy for generic calculations, thus all these are\n // practically implemented as 10**18 fixed points.\n uint multiplier = 10 ** token.decimals();\n return weisTotal.times(multiplier)/pricePerToken;\n }\n\n /**\n * Finalize a succcesful crowdsale.\n *\n * The owner can triggre a call the contract that provides post-crowdsale actions, like releasing the tokens.\n */\n function finalize() public inState(State.Success) onlyOwner stopInEmergency {\n\n // Already finalized\n if(finalized) {\n throw;\n }\n\n // Finalizing is optional. We only call it if we are given a finalizing agent.\n if(address(finalizeAgent) != 0) {\n finalizeAgent.finalizeCrowdsale();\n }\n\n finalized = true;\n }\n\n /**\n * Allow to (re)set finalize agent.\n *\n * Design choice: no state restrictions on setting this, so that we can fix fat finger mistakes.\n */\n function setFinalizeAgent(FinalizeAgent addr) onlyOwner {\n finalizeAgent = addr;\n\n // Don't allow setting bad agent\n if(!finalizeAgent.isFinalizeAgent()) {\n throw;\n }\n }\n\n /**\n * Allow crowdsale owner to close early or extend the crowdsale.\n *\n * This is useful e.g. for a manual soft cap implementation:\n * - after X amount is reached determine manual closing\n *\n * This may put the crowdsale to an invalid state,\n * but we trust owners know what they are doing.\n *\n */\n function setEndsAt(uint time) onlyOwner {\n\n if(now > time) {\n throw; // Don't change past\n }\n\n if(startsAt > time) {\n throw; // Prevent human mistakes\n }\n\n endsAt = time;\n EndsAtChanged(endsAt);\n }\n\n /**\n * Allow to (re)set pricing strategy.\n *\n * Design choice: no state restrictions on the set, so that we can fix fat finger mistakes.\n */\n function setPricingStrategy(PricingStrategy _pricingStrategy) onlyOwner {\n pricingStrategy = _pricingStrategy;\n\n // Don't allow setting bad agent\n if(!pricingStrategy.isPricingStrategy()) {\n throw;\n }\n }\n\n /**\n * Allow to change the team multisig address in the case of emergency.\n *\n * This allows to save a deployed crowdsale wallet in the case the crowdsale has not yet begun\n * (we have done only few test transactions). After the crowdsale is going\n * then multisig address stays locked for the safety reasons.\n */\n function setMultisig(address addr) public onlyOwner {\n\n // Change\n if(investorCount > MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE) {\n throw;\n }\n\n multisigWallet = addr;\n }\n\n /**\n * Allow load refunds back on the contract for the refunding.\n *\n * The team can transfer the funds back on the smart contract in the case the minimum goal was not reached..\n */\n function loadRefund() public payable inState(State.Failure) {\n if(msg.value == 0) throw;\n loadedRefund = loadedRefund.plus(msg.value);\n }\n\n /**\n * Investors can claim refund.\n *\n * Note that any refunds from proxy buyers should be handled separately,\n * and not through this contract.\n */\n function refund() public inState(State.Refunding) {\n uint256 weiValue = investedAmountOf[msg.sender];\n if (weiValue == 0) throw;\n investedAmountOf[msg.sender] = 0;\n weiRefunded = weiRefunded.plus(weiValue);\n Refund(msg.sender, weiValue);\n if (!msg.sender.send(weiValue)) throw;\n }\n\n /**\n * @return true if the crowdsale has raised enough money to be a successful.\n */\n function isMinimumGoalReached() public constant returns (bool reached) {\n return weiRaised >= minimumFundingGoal;\n }\n\n /**\n * Check if the contract relationship looks good.\n */\n function isFinalizerSane() public constant returns (bool sane) {\n return finalizeAgent.isSane();\n }\n\n /**\n * Check if the contract relationship looks good.\n */\n function isPricingSane() public constant returns (bool sane) {\n return pricingStrategy.isSane(address(this));\n }\n\n /**\n * Crowdfund state machine management.\n *\n * We make it a function and do not assign the result to a variable, so there is no chance of the variable being stale.\n */\n function getState() public constant returns (State) {\n if(finalized) return State.Finalized;\n else if (address(finalizeAgent) == 0) return State.Preparing;\n else if (!finalizeAgent.isSane()) return State.Preparing;\n else if (!pricingStrategy.isSane(address(this))) return State.Preparing;\n else if (block.timestamp < startsAt) return State.PreFunding;\n else if (block.timestamp <= endsAt && !isCrowdsaleFull()) return State.Funding;\n else if (isMinimumGoalReached()) return State.Success;\n else if (!isMinimumGoalReached() && weiRaised > 0 && loadedRefund >= weiRaised) return State.Refunding;\n else return State.Failure;\n }\n\n /** This is for manual testing of multisig wallet interaction */\n function setOwnerTestValue(uint val) onlyOwner {\n ownerTestValue = val;\n }\n\n /**\n * Allow addresses to do early participation.\n *\n * TODO: Fix spelling error in the name\n */\n function setEarlyParicipantWhitelist(address addr, bool status) onlyOwner {\n earlyParticipantWhitelist[addr] = status;\n Whitelisted(addr, status);\n }\n\n\n /** Interface marker. */\n function isCrowdsale() public constant returns (bool) {\n return true;\n }\n\n //\n // Modifiers\n //\n\n /** Modified allowing execution only if the crowdsale is currently running. */\n modifier inState(State state) {\n if(getState() != state) throw;\n _;\n }\n\n\n //\n // Abstract functions\n //\n\n /**\n * Check if the current invested breaks our cap rules.\n *\n *\n * The child contract must define their own cap setting rules.\n * We allow a lot of flexibility through different capping strategies (ETH, token count)\n * Called from invest().\n *\n * @param weiAmount The amount of wei the investor tries to invest in the current transaction\n * @param tokenAmount The amount of tokens we try to give to the investor in the current transaction\n * @param weiRaisedTotal What would be our total raised balance after this transaction\n * @param tokensSoldTotal What would be our total sold tokens count after this transaction\n *\n * @return true if taking this investment would break our cap rules\n */\n function isBreakingCap(uint weiAmount, uint tokenAmount, uint weiRaisedTotal, uint tokensSoldTotal) constant returns (bool limitBroken);\n\n /**\n * Check if the current crowdsale is full and we can no longer sell any tokens.\n */\n function isCrowdsaleFull() public constant returns (bool);\n\n /**\n * Create new tokens or transfer issued tokens to the investor depending on the cap model.\n */\n function assignTokens(address receiver, uint tokenAmount) internal;\n}\n\n\n\n/**\n * Abstract base contract for token sales with the default buy entry points.\n *\n * Handle\n * - start and end dates\n * - accepting investments\n * - minimum funding goal and refund\n * - various statistics during the crowdfund\n * - different pricing strategies\n * - different investment policies (require server side customer id, allow only whitelisted addresses)\n *\n * Does not Handle\n *\n * - Token allocation (minting vs. transfer)\n * - Cap rules\n *\n */\ncontract Crowdsale is CrowdsaleBase {\n\n /* Do we need to have unique contributor id for each customer */\n bool public requireCustomerId;\n\n /**\n * Do we verify that contributor has been cleared on the server side (accredited investors only).\n * This method was first used in FirstBlood crowdsale to ensure all contributors have accepted terms on sale (on the web).\n */\n bool public requiredSignedAddress;\n\n /* Server side address that signed allowed contributors (Ethereum addresses) that can participate the crowdsale */\n address public signerAddress;\n\n function Crowdsale(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal) CrowdsaleBase(_token, _pricingStrategy, _multisigWallet, _start, _end, _minimumFundingGoal) {\n }\n\n /**\n * Preallocate tokens for the early investors.\n *\n * Preallocated tokens have been sold before the actual crowdsale opens.\n * This function mints the tokens and moves the crowdsale needle.\n *\n * Investor count is not handled; it is assumed this goes for multiple investors\n * and the token distribution happens outside the smart contract flow.\n *\n * No money is exchanged, as the crowdsale team already have received the payment.\n *\n * @param fullTokens tokens as full tokens - decimal places added internally\n * @param weiPrice Price of a single full token in wei\n *\n */\n function preallocate(address receiver, uint fullTokens, uint weiPrice) public onlyOwner {\n\n uint tokenAmount = fullTokens * 10**token.decimals();\n uint weiAmount = weiPrice * fullTokens; // This can be also 0, we give out tokens for free\n\n weiRaised = weiRaised.plus(weiAmount);\n tokensSold = tokensSold.plus(tokenAmount);\n\n investedAmountOf[receiver] = investedAmountOf[receiver].plus(weiAmount);\n tokenAmountOf[receiver] = tokenAmountOf[receiver].plus(tokenAmount);\n\n assignTokens(receiver, tokenAmount);\n\n // Tell us invest was success\n Invested(receiver, weiAmount, tokenAmount, 0);\n }\n\n /**\n * Allow anonymous contributions to this crowdsale.\n */\n function investWithSignedAddress(address addr, uint128 customerId, uint8 v, bytes32 r, bytes32 s) public payable {\n bytes32 hash = sha256(addr);\n if (ecrecover(hash, v, r, s) != signerAddress) throw;\n if(customerId == 0) throw; // UUIDv4 sanity check\n investInternal(addr, customerId);\n }\n\n /**\n * Track who is the customer making the payment so we can send thank you email.\n */\n function investWithCustomerId(address addr, uint128 customerId) public payable {\n if(requiredSignedAddress) throw; // Crowdsale allows only server-side signed participants\n if(customerId == 0) throw; // UUIDv4 sanity check\n investInternal(addr, customerId);\n }\n\n /**\n * Allow anonymous contributions to this crowdsale.\n */\n function invest(address addr) public payable {\n if(requireCustomerId) throw; // Crowdsale needs to track participants for thank you email\n if(requiredSignedAddress) throw; // Crowdsale allows only server-side signed participants\n investInternal(addr, 0);\n }\n\n /**\n * Invest to tokens, recognize the payer and clear his address.\n *\n */\n function buyWithSignedAddress(uint128 customerId, uint8 v, bytes32 r, bytes32 s) public payable {\n investWithSignedAddress(msg.sender, customerId, v, r, s);\n }\n\n /**\n * Invest to tokens, recognize the payer.\n *\n */\n function buyWithCustomerIdWithChecksum(uint128 customerId, bytes1 checksum) public payable {\n // see customerid.py\n if (bytes1(sha3(customerId)) != checksum) throw;\n investWithCustomerId(msg.sender, customerId);\n }\n\n /**\n * Legacy API signature.\n */\n function buyWithCustomerId(uint128 customerId) public payable {\n investWithCustomerId(msg.sender, customerId);\n }\n\n /**\n * The basic entry point to participate the crowdsale process.\n *\n * Pay for funding, get invested tokens back in the sender address.\n */\n function buy() public payable {\n invest(msg.sender);\n }\n\n /**\n * Set policy do we need to have server-side customer ids for the investments.\n *\n */\n function setRequireCustomerId(bool value) onlyOwner {\n requireCustomerId = value;\n InvestmentPolicyChanged(requireCustomerId, requiredSignedAddress, signerAddress);\n }\n\n /**\n * Set policy if all investors must be cleared on the server side first.\n *\n * This is e.g. for the accredited investor clearing.\n *\n */\n function setRequireSignedAddress(bool value, address _signerAddress) onlyOwner {\n requiredSignedAddress = value;\n signerAddress = _signerAddress;\n InvestmentPolicyChanged(requireCustomerId, requiredSignedAddress, signerAddress);\n }\n\n}\n\n\n\n\n/// @dev Tranche based pricing with special support for pre-ico deals.\n/// Implementing \"first price\" tranches, meaning, that if byers order is\n/// covering more than one tranche, the price of the lowest tranche will apply\n/// to the whole order.\ncontract EthTranchePricing is PricingStrategy, Ownable {\n\n using SafeMathLib for uint;\n\n uint public constant MAX_TRANCHES = 10;\n\n // This contains all pre-ICO addresses, and their prices (weis per token)\n mapping (address => uint) public preicoAddresses;\n\n /**\n * Define pricing schedule using tranches.\n */\n struct Tranche {\n\n // Amount in weis when this tranche becomes active\n uint amount;\n\n // How many tokens per satoshi you will get while this tranche is active\n uint price;\n }\n\n // Store tranches in a fixed array, so that it can be seen in a blockchain explorer\n // Tranche 0 is always (0, 0)\n // (TODO: change this when we confirm dynamic arrays are explorable)\n Tranche[10] public tranches;\n\n // How many active tranches we have\n uint public trancheCount;\n\n /// @dev Contruction, creating a list of tranches\n /// @param _tranches uint[] tranches Pairs of (start amount, price)\n function EthTranchePricing(uint[] _tranches) {\n // Need to have tuples, length check\n if(_tranches.length % 2 == 1 || _tranches.length >= MAX_TRANCHES*2) {\n throw;\n }\n\n trancheCount = _tranches.length / 2;\n\n uint highestAmount = 0;\n\n for(uint i=0; i<_tranches.length/2; i++) {\n tranches[i].amount = _tranches[i*2];\n tranches[i].price = _tranches[i*2+1];\n\n // No invalid steps\n if((highestAmount != 0) && (tranches[i].amount <= highestAmount)) {\n throw;\n }\n\n highestAmount = tranches[i].amount;\n }\n\n // We need to start from zero, otherwise we blow up our deployment\n if(tranches[0].amount != 0) {\n throw;\n }\n\n // Last tranche price must be zero, terminating the crowdale\n if(tranches[trancheCount-1].price != 0) {\n throw;\n }\n }\n\n /// @dev This is invoked once for every pre-ICO address, set pricePerToken\n /// to 0 to disable\n /// @param preicoAddress PresaleFundCollector address\n /// @param pricePerToken How many weis one token cost for pre-ico investors\n function setPreicoAddress(address preicoAddress, uint pricePerToken)\n public\n onlyOwner\n {\n preicoAddresses[preicoAddress] = pricePerToken;\n }\n\n /// @dev Iterate through tranches. You reach end of tranches when price = 0\n /// @return tuple (time, price)\n function getTranche(uint n) public constant returns (uint, uint) {\n return (tranches[n].amount, tranches[n].price);\n }\n\n function getFirstTranche() private constant returns (Tranche) {\n return tranches[0];\n }\n\n function getLastTranche() private constant returns (Tranche) {\n return tranches[trancheCount-1];\n }\n\n function getPricingStartsAt() public constant returns (uint) {\n return getFirstTranche().amount;\n }\n\n function getPricingEndsAt() public constant returns (uint) {\n return getLastTranche().amount;\n }\n\n function isSane(address _crowdsale) public constant returns(bool) {\n // Our tranches are not bound by time, so we can't really check are we sane\n // so we presume we are ;)\n // In the future we could save and track raised tokens, and compare it to\n // the Crowdsale contract.\n return true;\n }\n\n /// @dev Get the current tranche or bail out if we are not in the tranche periods.\n /// @param weiRaised total amount of weis raised, for calculating the current tranche\n /// @return {[type]} [description]\n function getCurrentTranche(uint weiRaised) private constant returns (Tranche) {\n uint i;\n\n for(i=0; i < tranches.length; i++) {\n if(weiRaised < tranches[i].amount) {\n return tranches[i-1];\n }\n }\n }\n\n /// @dev Get the current price.\n /// @param weiRaised total amount of weis raised, for calculating the current tranche\n /// @return The current price or 0 if we are outside trache ranges\n function getCurrentPrice(uint weiRaised) public constant returns (uint result) {\n return getCurrentTranche(weiRaised).price;\n }\n\n function isPresalePurchase(address purchaser) public constant returns (bool) {\n if(preicoAddresses[purchaser] > 0)\n return true;\n else\n return false;\n }\n\n /// @dev Calculate the current price for buy in amount.\n function calculatePrice(uint value, uint weiRaised, uint tokensSold, address msgSender, uint decimals) public constant returns (uint) {\n\n uint multiplier = 10 ** decimals;\n\n // This investor is coming through pre-ico\n if(preicoAddresses[msgSender] > 0) {\n return value.times(multiplier) / preicoAddresses[msgSender];\n }\n\n uint price = getCurrentPrice(weiRaised);\n return value.times(multiplier) / price;\n }\n\n function() payable {\n throw; // No money on this contract\n }\n\n}\n"}, "ExtraFinalizeAgent": {"abi": [{"constant": false, "inputs": [], "name": "finalizeCrowdsale", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "isFinalizeAgent", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "allocatedBonus", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "bonusBasePoints", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isSane", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "crowdsale", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "accountedTokenSales", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "teamMultisig", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "token", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [{"name": "_token", "type": "address"}, {"name": "_crowdsale", "type": "address"}, {"name": "_bonusBasePoints", "type": "uint256"}, {"name": "_teamMultisig", "type": "address"}, {"name": "_accountedTokenSales", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}], "bytecode": "0x608060405234801561001057600080fd5b5060405160a0806106718339810160409081528151602083015191830151606084015160809094015160008054600160a060020a03808616600160a060020a03199283161790925560018054838816921691909117908190559395929316151561007957600080fd5b60038054600160a060020a031916600160a060020a0384811691909117918290551615156100a657600080fd5b600555505050506105b5806100bc6000396000f3006080604052600436106100985763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630bf318a3811461009d578063614cb904146100b45780636a457ee9146100dd5780637424bebc1461010457806382771c8e146101195780639c1e03a01461012e578063bc129a981461016c578063dbc0c08514610181578063fc0c546a14610196575b600080fd5b3480156100a957600080fd5b506100b26101ab565b005b3480156100c057600080fd5b506100c9610475565b604080519115158252519081900360200190f35b3480156100e957600080fd5b506100f261047a565b60408051918252519081900360200190f35b34801561011057600080fd5b506100f2610480565b34801561012557600080fd5b506100c9610486565b34801561013a57600080fd5b5061014361052f565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561017857600080fd5b506100f261054b565b34801561018d57600080fd5b50610143610551565b3480156101a257600080fd5b5061014361056d565b60015460009073ffffffffffffffffffffffffffffffffffffffff1633146101d257600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663518ab2a86040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561025857600080fd5b505af115801561026c573d6000803e3d6000fd5b505050506040513d602081101561028257600080fd5b5051600554604080517ff4f3bdc1000000000000000000000000000000000000000000000000000000008152600481019390935260248301919091525173__contracts/SafeMathLib.sol:SafeMathLi__9163f4f3bdc1916044808301926020929190829003018186803b1580156102fa57600080fd5b505af415801561030e573d6000803e3d6000fd5b505050506040513d602081101561032457600080fd5b5051600254604080517f1d3b9edf000000000000000000000000000000000000000000000000000000008152600481018490526024810192909252519192506127109173__contracts/SafeMathLib.sol:SafeMathLi__91631d3b9edf916044808301926020929190829003018186803b1580156103a257600080fd5b505af41580156103b6573d6000803e3d6000fd5b505050506040513d60208110156103cc57600080fd5b50518115156103d757fe5b04600481815560008054600354604080517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff92831695810195909552602485019590955293519316926340c10f1992604480820193929182900301818387803b15801561045a57600080fd5b505af115801561046e573d6000803e3d6000fd5b5050505050565b600190565b60045481565b60025481565b60008054604080517f42c1867b000000000000000000000000000000000000000000000000000000008152306004820152905173ffffffffffffffffffffffffffffffffffffffff909216916342c1867b9160248082019260209290919082900301818787803b1580156104f957600080fd5b505af115801561050d573d6000803e3d6000fd5b505050506040513d602081101561052357600080fd5b50511515600114919050565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b60055481565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff16815600a165627a7a72305820b9b8a6f1b6ef33a76aae227c82080e330d3b248c1922e66c77c437058f5557a00029", "bytecode_runtime": "0x6080604052600436106100985763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630bf318a3811461009d578063614cb904146100b45780636a457ee9146100dd5780637424bebc1461010457806382771c8e146101195780639c1e03a01461012e578063bc129a981461016c578063dbc0c08514610181578063fc0c546a14610196575b600080fd5b3480156100a957600080fd5b506100b26101ab565b005b3480156100c057600080fd5b506100c9610475565b604080519115158252519081900360200190f35b3480156100e957600080fd5b506100f261047a565b60408051918252519081900360200190f35b34801561011057600080fd5b506100f2610480565b34801561012557600080fd5b506100c9610486565b34801561013a57600080fd5b5061014361052f565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561017857600080fd5b506100f261054b565b34801561018d57600080fd5b50610143610551565b3480156101a257600080fd5b5061014361056d565b60015460009073ffffffffffffffffffffffffffffffffffffffff1633146101d257600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663518ab2a86040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561025857600080fd5b505af115801561026c573d6000803e3d6000fd5b505050506040513d602081101561028257600080fd5b5051600554604080517ff4f3bdc1000000000000000000000000000000000000000000000000000000008152600481019390935260248301919091525173__contracts/SafeMathLib.sol:SafeMathLi__9163f4f3bdc1916044808301926020929190829003018186803b1580156102fa57600080fd5b505af415801561030e573d6000803e3d6000fd5b505050506040513d602081101561032457600080fd5b5051600254604080517f1d3b9edf000000000000000000000000000000000000000000000000000000008152600481018490526024810192909252519192506127109173__contracts/SafeMathLib.sol:SafeMathLi__91631d3b9edf916044808301926020929190829003018186803b1580156103a257600080fd5b505af41580156103b6573d6000803e3d6000fd5b505050506040513d60208110156103cc57600080fd5b50518115156103d757fe5b04600481815560008054600354604080517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff92831695810195909552602485019590955293519316926340c10f1992604480820193929182900301818387803b15801561045a57600080fd5b505af115801561046e573d6000803e3d6000fd5b5050505050565b600190565b60045481565b60025481565b60008054604080517f42c1867b000000000000000000000000000000000000000000000000000000008152306004820152905173ffffffffffffffffffffffffffffffffffffffff909216916342c1867b9160248082019260209290919082900301818787803b1580156104f957600080fd5b505af115801561050d573d6000803e3d6000fd5b505050506040513d602081101561052357600080fd5b50511515600114919050565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b60055481565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff16815600a165627a7a72305820b9b8a6f1b6ef33a76aae227c82080e330d3b248c1922e66c77c437058f5557a00029", "direct_dependencies": ["SafeMathLib"], "full_dependencies": ["SafeMathLib"], "linkrefs": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 1786}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 2122}], "linkrefs_runtime": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 1410}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 1746}], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": false, "inputs": [], "name": "finalizeCrowdsale", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "isFinalizeAgent", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "allocatedBonus", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "bonusBasePoints", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isSane", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "crowdsale", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "accountedTokenSales", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "teamMultisig", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "token", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [{"name": "_token", "type": "address"}, {"name": "_crowdsale", "type": "address"}, {"name": "_bonusBasePoints", "type": "uint256"}, {"name": "_teamMultisig", "type": "address"}, {"name": "_accountedTokenSales", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}], "devdoc": {"methods": {}}, "userdoc": {"methods": {"finalizeCrowdsale()": {"notice": "Called once by crowdsale finalize() if the sale was success. "}}}}, "settings": {"compilationTarget": {"contracts/ExtraFinalizeAgent.sol": "ExtraFinalizeAgent"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/Crowdsale.sol": {"keccak256": "0x2697c26528f64bb954a7c2547d3b43317d2d2b02c7d9d05a7b1ab388cd79f65d", "urls": ["bzzr://f28b280794222114141c51dd5c388d403a7c98d8b51e04170a0e294246d5164b"]}, "contracts/CrowdsaleBase.sol": {"keccak256": "0xe2c9ed11183ce705616980df7b02544d72fe18b40395da7d9d4bcb621fb87871", "urls": ["bzzr://07f3887ba0d0eb3248b1ad3581480ed71a2fe70a47dcc283c4e97c8c92e0790a"]}, "contracts/CrowdsaleToken.sol": {"keccak256": "0xa812687ac327cd19fac64667980e70d4fb72ef7f61dce477818d085cf0a915df", "urls": ["bzzr://826d9dda00ce341794e5bb05c78b1abb2728e3c631f7a542345dcfa9f3bd9c50"]}, "contracts/ExtraFinalizeAgent.sol": {"keccak256": "0x74db5270f5f58395810cca51b02240f5fd842570658b4740388e489c1c5abfca", "urls": ["bzzr://18b4f69b9afca469b72af3da6dac4bd3c240fc513ebdde9fc2f71fcd408092f3"]}, "contracts/FinalizeAgent.sol": {"keccak256": "0x309fd0510e0b3e2b5044e33f7c80cfb2d6f2a5697e41a5f185931d65770cfea9", "urls": ["bzzr://4e7ed6f82c0f542e92e56c12566b2ecd7666730865bf12566c27587ec64160ac"]}, "contracts/FractionalERC20.sol": {"keccak256": "0x75bc4ad90a8b13ce961c89b1bf405776f616e019d3a2720168f8e52be223198f", "urls": ["bzzr://6a3688f12da1a5c890ef06f80f883f6c5370886092d38a1b33cd4219b718478b"]}, "contracts/Haltable.sol": {"keccak256": "0x265dcf25e7c9ab4b6eecd2181f1b71334a1b5381a60f8db7d9526dab120f4b70", "urls": ["bzzr://d522e00fa9e075941469dd81738b59fdb99ce3c12cdc39e33abe40b588c4da9b"]}, "contracts/MintableToken.sol": {"keccak256": "0x650e1d6b2bedcd36508918357c7cf4f36fdd093cd0c4d6342f4dcd3bdcdd7578", "urls": ["bzzr://7ba2ac0480d428066a18727e2adb76ba56856ecd37b4420e801131ec8f8f4be3"]}, "contracts/PricingStrategy.sol": {"keccak256": "0x8df5093b7d07168ad994f9176de0bd2268f6563b1e8a3a448d8cfe7fe246c628", "urls": ["bzzr://ef5c944d51f739ab34e2c951d6ac82a7152e6bb844058a8e57bae52c14cbe16b"]}, "contracts/Recoverable.sol": {"keccak256": "0x311a332cdd87df6e00057f5455f4e68b043b5dbe211f6d68bc64e20817515635", "urls": ["bzzr://4fd99bcfb93baed6e7c8d22ee9ecc5c8346a1aa98288e77b01333b2c5d3f582d"]}, "contracts/ReleasableToken.sol": {"keccak256": "0x2c50180d0c1eab1aa63a04da3ae87ee2c482665d2a1a42c5f05b11234a7edaf4", "urls": ["bzzr://10752c317eba5c42e2848722689cfee4fffb7bcb42f3346e1a20715d843798e8"]}, "contracts/SafeMathLib.sol": {"keccak256": "0x501bfe31e274b9a5591f7c540bdced4d4312e27d4f19599147c9bbca3d9c6b18", "urls": ["bzzr://a80935ebddb06c247d71372d4e5833ee029f08633bd0fe4a274a57009567e5b9"]}, "contracts/StandardTokenExt.sol": {"keccak256": "0x9ea2d4cec4dccd5639c05e6c23dd027d80b5e5a20abd99b280ab7b2631b5a5fc", "urls": ["bzzr://a52d8fc5a21bd83997aff19128e00dceb251df712207b61223894c8b7f42d5ff"]}, "contracts/UpgradeAgent.sol": {"keccak256": "0x88e793f72feca4a18d2cd06e6037c1413d7b963eabcf5626d60bfb9d04d6e8e6", "urls": ["bzzr://87e39a65cf25d539ab49ad7e759b3298b8a19272964e69e3f2432f0323f30025"]}, "contracts/UpgradeableToken.sol": {"keccak256": "0xa74fc300c514564ece81c86905502c2de674b69c0633b133af19c1ba027da2c9", "urls": ["bzzr://55bc0b908c94781462b8959f051c6dbb53c35641b0f8cb38d74632ad6bf95e52"]}, "zeppelin/contracts/math/SafeMath.sol": {"keccak256": "0x341ba8cb467a3623e819ba1a683ac1d264005186f308505214e5f6bc89446a08", "urls": ["bzzr://59b5652ee4e4a1b5a8f1a8906e14c84af43d636cf5ca0725cc1813aabe4c8c17"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}, "zeppelin/contracts/token/ERC20/BasicToken.sol": {"keccak256": "0x948404468d61ff35ea4194650670408dabd65da7f905a1c16888ab84520bf39e", "urls": ["bzzr://ea75e20f95d7e4e10394fe6bfaa8eee56b4757c2a6f1e8df4180d33afa621935"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}, "zeppelin/contracts/token/ERC20/StandardToken.sol": {"keccak256": "0xd2b344a5259e19ec143074cfa65637a10c40b68395c59808c4af13bccbb2de55", "urls": ["bzzr://d61a01175a7ca1ba9f4403de603c20b897e33ec425aef2d9f8a7f9ddfdfaf5b2"]}}, "version": 1}, "name": "ExtraFinalizeAgent", "ordered_full_dependencies": ["SafeMathLib"], "source_path": "contracts/ExtraFinalizeAgent.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Safe unsigned safe math.\n *\n * https://blog.aragon.one/library-driven-development-in-solidity-2bebcaf88736#.750gwtwli\n *\n * Originally from https://raw.githubusercontent.com/AragonOne/zeppelin-solidity/master/contracts/SafeMathLib.sol\n *\n * Maintained here until merged to mainline zeppelin-solidity.\n *\n */\nlibrary SafeMathLib {\n\n function times(uint a, uint b) returns (uint) {\n uint c = a * b;\n assert(a == 0 || c / a == b);\n return c;\n }\n\n function minus(uint a, uint b) returns (uint) {\n assert(b <= a);\n return a - b;\n }\n\n function plus(uint a, uint b) returns (uint) {\n uint c = a + b;\n assert(c>=a);\n return c;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Interface for defining crowdsale pricing.\n */\ncontract PricingStrategy {\n\n /** Interface declaration. */\n function isPricingStrategy() public constant returns (bool) {\n return true;\n }\n\n /** Self check if all references are correctly set.\n *\n * Checks that pricing strategy matches crowdsale parameters.\n */\n function isSane(address crowdsale) public constant returns (bool) {\n return true;\n }\n\n /**\n * @dev Pricing tells if this is a presale purchase or not.\n @param purchaser Address of the purchaser\n @return False by default, true if a presale purchaser\n */\n function isPresalePurchase(address purchaser) public constant returns (bool) {\n return false;\n }\n\n /**\n * When somebody tries to buy tokens for X eth, calculate how many tokens they get.\n *\n *\n * @param value - What is the value of the transaction send in as wei\n * @param tokensSold - how much tokens have been sold this far\n * @param weiRaised - how much money has been raised this far in the main token sale - this number excludes presale\n * @param msgSender - who is the investor of this transaction\n * @param decimals - how many decimal units the token has\n * @return Amount of tokens the investor receives\n */\n function calculatePrice(uint value, uint weiRaised, uint tokensSold, address msgSender, uint decimals) public constant returns (uint tokenAmount);\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Finalize agent defines what happens at the end of succeseful crowdsale.\n *\n * - Allocate tokens for founders, bounties and community\n * - Make tokens transferable\n * - etc.\n */\ncontract FinalizeAgent {\n\n function isFinalizeAgent() public constant returns(bool) {\n return true;\n }\n\n /** Return true if we can run finalizeCrowdsale() properly.\n *\n * This is a safety check function that doesn't allow crowdsale to begin\n * unless the finalizer has been set up properly.\n */\n function isSane() public constant returns (bool);\n\n /** Called once by crowdsale finalize() if the sale was success. */\n function finalizeCrowdsale();\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n\n/**\n * A token that defines fractional units as decimals.\n */\ncontract FractionalERC20 is ERC20 {\n\n uint public decimals;\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n/*\n * Haltable\n *\n * Abstract contract that allows children to implement an\n * emergency stop mechanism. Differs from Pausable by causing a throw when in halt mode.\n *\n *\n * Originally envisioned in FirstBlood ICO contract.\n */\ncontract Haltable is Ownable {\n bool public halted;\n\n modifier stopInEmergency {\n if (halted) throw;\n _;\n }\n\n modifier stopNonOwnersInEmergency {\n if (halted && msg.sender != owner) throw;\n _;\n }\n\n modifier onlyInEmergency {\n if (!halted) throw;\n _;\n }\n\n // called by the owner on emergency, triggers stopped state\n function halt() external onlyOwner {\n halted = true;\n }\n\n // called by the owner on end of emergency, returns to normal state\n function unhalt() external onlyOwner onlyInEmergency {\n halted = false;\n }\n\n}\n\n\n\n\n\n\n\n/**\n * Crowdsale state machine without buy functionality.\n *\n * Implements basic state machine logic, but leaves out all buy functions,\n * so that subclasses can implement their own buying logic.\n *\n *\n * For the default buy() implementation see Crowdsale.sol.\n */\ncontract CrowdsaleBase is Haltable {\n\n /* Max investment count when we are still allowed to change the multisig address */\n uint public MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE = 5;\n\n using SafeMathLib for uint;\n\n /* The token we are selling */\n FractionalERC20 public token;\n\n /* How we are going to price our offering */\n PricingStrategy public pricingStrategy;\n\n /* Post-success callback */\n FinalizeAgent public finalizeAgent;\n\n /* tokens will be transfered from this address */\n address public multisigWallet;\n\n /* if the funding goal is not reached, investors may withdraw their funds */\n uint public minimumFundingGoal;\n\n /* the UNIX timestamp start date of the crowdsale */\n uint public startsAt;\n\n /* the UNIX timestamp end date of the crowdsale */\n uint public endsAt;\n\n /* the number of tokens already sold through this contract*/\n uint public tokensSold = 0;\n\n /* How many wei of funding we have raised */\n uint public weiRaised = 0;\n\n /* Calculate incoming funds from presale contracts and addresses */\n uint public presaleWeiRaised = 0;\n\n /* How many distinct addresses have invested */\n uint public investorCount = 0;\n\n /* How much wei we have returned back to the contract after a failed crowdfund. */\n uint public loadedRefund = 0;\n\n /* How much wei we have given back to investors.*/\n uint public weiRefunded = 0;\n\n /* Has this crowdsale been finalized */\n bool public finalized;\n\n /** How much ETH each address has invested to this crowdsale */\n mapping (address => uint256) public investedAmountOf;\n\n /** How much tokens this crowdsale has credited for each investor address */\n mapping (address => uint256) public tokenAmountOf;\n\n /** Addresses that are allowed to invest even before ICO offical opens. For testing, for ICO partners, etc. */\n mapping (address => bool) public earlyParticipantWhitelist;\n\n /** This is for manul testing for the interaction from owner wallet. You can set it to any value and inspect this in blockchain explorer to see that crowdsale interaction works. */\n uint public ownerTestValue;\n\n /** State machine\n *\n * - Preparing: All contract initialization calls and variables have not been set yet\n * - Prefunding: We have not passed start time yet\n * - Funding: Active crowdsale\n * - Success: Minimum funding goal reached\n * - Failure: Minimum funding goal not reached before ending time\n * - Finalized: The finalized has been called and succesfully executed\n * - Refunding: Refunds are loaded on the contract for reclaim.\n */\n enum State{Unknown, Preparing, PreFunding, Funding, Success, Failure, Finalized, Refunding}\n\n // A new investment was made\n event Invested(address investor, uint weiAmount, uint tokenAmount, uint128 customerId);\n\n // Refund was processed for a contributor\n event Refund(address investor, uint weiAmount);\n\n // The rules were changed what kind of investments we accept\n event InvestmentPolicyChanged(bool newRequireCustomerId, bool newRequiredSignedAddress, address newSignerAddress);\n\n // Address early participation whitelist status changed\n event Whitelisted(address addr, bool status);\n\n // Crowdsale end time has been changed\n event EndsAtChanged(uint newEndsAt);\n\n function CrowdsaleBase(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal) {\n\n owner = msg.sender;\n\n token = FractionalERC20(_token);\n setPricingStrategy(_pricingStrategy);\n\n multisigWallet = _multisigWallet;\n if(multisigWallet == 0) {\n throw;\n }\n\n if(_start == 0) {\n throw;\n }\n\n startsAt = _start;\n\n if(_end == 0) {\n throw;\n }\n\n endsAt = _end;\n\n // Don't mess the dates\n if(startsAt >= endsAt) {\n throw;\n }\n\n // Minimum funding goal can be zero\n minimumFundingGoal = _minimumFundingGoal;\n }\n\n /**\n * Don't expect to just send in money and get tokens.\n */\n function() payable {\n throw;\n }\n\n /**\n * @dev Make an investment.\n *\n * Crowdsale must be running for one to invest.\n * We must have not pressed the emergency brake.\n *\n * @param receiver The Ethereum address who receives the tokens\n * @param customerId (optional) UUID v4 to track the successful payments on the server side'\n * @param tokenAmount Amount of tokens which be credited to receiver\n *\n * @return tokensBought How mony tokens were bought\n */\n function buyTokens(address receiver, uint128 customerId, uint256 tokenAmount) stopInEmergency internal returns(uint tokensBought) {\n\n // Determine if it's a good time to accept investment from this participant\n if(getState() == State.PreFunding) {\n // Are we whitelisted for early deposit\n if(!earlyParticipantWhitelist[receiver]) {\n throw;\n }\n } else if(getState() == State.Funding) {\n // Retail participants can only come in when the crowdsale is running\n // pass\n } else {\n // Unwanted state\n throw;\n }\n\n uint weiAmount = msg.value;\n\n // Dust transaction\n require(tokenAmount != 0);\n\n if(investedAmountOf[receiver] == 0) {\n // A new investor\n investorCount++;\n }\n\n // Update investor\n investedAmountOf[receiver] = investedAmountOf[receiver].plus(weiAmount);\n tokenAmountOf[receiver] = tokenAmountOf[receiver].plus(tokenAmount);\n\n // Update totals\n weiRaised = weiRaised.plus(weiAmount);\n tokensSold = tokensSold.plus(tokenAmount);\n\n if(pricingStrategy.isPresalePurchase(receiver)) {\n presaleWeiRaised = presaleWeiRaised.plus(weiAmount);\n }\n\n // Check that we did not bust the cap\n require(!isBreakingCap(weiAmount, tokenAmount, weiRaised, tokensSold));\n\n assignTokens(receiver, tokenAmount);\n\n // Pocket the money, or fail the crowdsale if we for some reason cannot send the money to our multisig\n if(!multisigWallet.send(weiAmount)) throw;\n\n // Tell us invest was success\n Invested(receiver, weiAmount, tokenAmount, customerId);\n\n return tokenAmount;\n }\n\n /**\n * @dev Make an investment based on pricing strategy\n *\n * This is a wrapper for buyTokens(), but the amount of tokens receiver will\n * have depends on the pricing strategy used.\n *\n * @param receiver The Ethereum address who receives the tokens\n * @param customerId (optional) UUID v4 to track the successful payments on the server side'\n *\n * @return tokensBought How mony tokens were bought\n */\n function investInternal(address receiver, uint128 customerId) stopInEmergency internal returns(uint tokensBought) {\n return buyTokens(receiver, customerId, pricingStrategy.calculatePrice(msg.value, weiRaised - presaleWeiRaised, tokensSold, msg.sender, token.decimals()));\n }\n\n /**\n * @dev Calculate tokens user will have for their purchase\n *\n * @param weisTotal How much ethers (in wei) the user putssssss in\n * @param pricePerToken What is the price for one token\n *\n * @return tokensTotal which is received tokens, token decimals included\n */\n function calculateTokens(uint256 weisTotal, uint256 pricePerToken) public constant returns(uint tokensTotal) {\n // pricePerToken is how many full tokens, token decimal place included, you get for wei amount.\n // Because, in theory, decimal amount can vary, we do the exponent calculation here,\n // though gas wise using 10**18 constant would be much simpler.\n // Furthermore we could use rough amounts and take in raw wei per tokens amount,\n // but we lose too much accuracy for generic calculations, thus all these are\n // practically implemented as 10**18 fixed points.\n uint multiplier = 10 ** token.decimals();\n return weisTotal.times(multiplier)/pricePerToken;\n }\n\n /**\n * Finalize a succcesful crowdsale.\n *\n * The owner can triggre a call the contract that provides post-crowdsale actions, like releasing the tokens.\n */\n function finalize() public inState(State.Success) onlyOwner stopInEmergency {\n\n // Already finalized\n if(finalized) {\n throw;\n }\n\n // Finalizing is optional. We only call it if we are given a finalizing agent.\n if(address(finalizeAgent) != 0) {\n finalizeAgent.finalizeCrowdsale();\n }\n\n finalized = true;\n }\n\n /**\n * Allow to (re)set finalize agent.\n *\n * Design choice: no state restrictions on setting this, so that we can fix fat finger mistakes.\n */\n function setFinalizeAgent(FinalizeAgent addr) onlyOwner {\n finalizeAgent = addr;\n\n // Don't allow setting bad agent\n if(!finalizeAgent.isFinalizeAgent()) {\n throw;\n }\n }\n\n /**\n * Allow crowdsale owner to close early or extend the crowdsale.\n *\n * This is useful e.g. for a manual soft cap implementation:\n * - after X amount is reached determine manual closing\n *\n * This may put the crowdsale to an invalid state,\n * but we trust owners know what they are doing.\n *\n */\n function setEndsAt(uint time) onlyOwner {\n\n if(now > time) {\n throw; // Don't change past\n }\n\n if(startsAt > time) {\n throw; // Prevent human mistakes\n }\n\n endsAt = time;\n EndsAtChanged(endsAt);\n }\n\n /**\n * Allow to (re)set pricing strategy.\n *\n * Design choice: no state restrictions on the set, so that we can fix fat finger mistakes.\n */\n function setPricingStrategy(PricingStrategy _pricingStrategy) onlyOwner {\n pricingStrategy = _pricingStrategy;\n\n // Don't allow setting bad agent\n if(!pricingStrategy.isPricingStrategy()) {\n throw;\n }\n }\n\n /**\n * Allow to change the team multisig address in the case of emergency.\n *\n * This allows to save a deployed crowdsale wallet in the case the crowdsale has not yet begun\n * (we have done only few test transactions). After the crowdsale is going\n * then multisig address stays locked for the safety reasons.\n */\n function setMultisig(address addr) public onlyOwner {\n\n // Change\n if(investorCount > MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE) {\n throw;\n }\n\n multisigWallet = addr;\n }\n\n /**\n * Allow load refunds back on the contract for the refunding.\n *\n * The team can transfer the funds back on the smart contract in the case the minimum goal was not reached..\n */\n function loadRefund() public payable inState(State.Failure) {\n if(msg.value == 0) throw;\n loadedRefund = loadedRefund.plus(msg.value);\n }\n\n /**\n * Investors can claim refund.\n *\n * Note that any refunds from proxy buyers should be handled separately,\n * and not through this contract.\n */\n function refund() public inState(State.Refunding) {\n uint256 weiValue = investedAmountOf[msg.sender];\n if (weiValue == 0) throw;\n investedAmountOf[msg.sender] = 0;\n weiRefunded = weiRefunded.plus(weiValue);\n Refund(msg.sender, weiValue);\n if (!msg.sender.send(weiValue)) throw;\n }\n\n /**\n * @return true if the crowdsale has raised enough money to be a successful.\n */\n function isMinimumGoalReached() public constant returns (bool reached) {\n return weiRaised >= minimumFundingGoal;\n }\n\n /**\n * Check if the contract relationship looks good.\n */\n function isFinalizerSane() public constant returns (bool sane) {\n return finalizeAgent.isSane();\n }\n\n /**\n * Check if the contract relationship looks good.\n */\n function isPricingSane() public constant returns (bool sane) {\n return pricingStrategy.isSane(address(this));\n }\n\n /**\n * Crowdfund state machine management.\n *\n * We make it a function and do not assign the result to a variable, so there is no chance of the variable being stale.\n */\n function getState() public constant returns (State) {\n if(finalized) return State.Finalized;\n else if (address(finalizeAgent) == 0) return State.Preparing;\n else if (!finalizeAgent.isSane()) return State.Preparing;\n else if (!pricingStrategy.isSane(address(this))) return State.Preparing;\n else if (block.timestamp < startsAt) return State.PreFunding;\n else if (block.timestamp <= endsAt && !isCrowdsaleFull()) return State.Funding;\n else if (isMinimumGoalReached()) return State.Success;\n else if (!isMinimumGoalReached() && weiRaised > 0 && loadedRefund >= weiRaised) return State.Refunding;\n else return State.Failure;\n }\n\n /** This is for manual testing of multisig wallet interaction */\n function setOwnerTestValue(uint val) onlyOwner {\n ownerTestValue = val;\n }\n\n /**\n * Allow addresses to do early participation.\n *\n * TODO: Fix spelling error in the name\n */\n function setEarlyParicipantWhitelist(address addr, bool status) onlyOwner {\n earlyParticipantWhitelist[addr] = status;\n Whitelisted(addr, status);\n }\n\n\n /** Interface marker. */\n function isCrowdsale() public constant returns (bool) {\n return true;\n }\n\n //\n // Modifiers\n //\n\n /** Modified allowing execution only if the crowdsale is currently running. */\n modifier inState(State state) {\n if(getState() != state) throw;\n _;\n }\n\n\n //\n // Abstract functions\n //\n\n /**\n * Check if the current invested breaks our cap rules.\n *\n *\n * The child contract must define their own cap setting rules.\n * We allow a lot of flexibility through different capping strategies (ETH, token count)\n * Called from invest().\n *\n * @param weiAmount The amount of wei the investor tries to invest in the current transaction\n * @param tokenAmount The amount of tokens we try to give to the investor in the current transaction\n * @param weiRaisedTotal What would be our total raised balance after this transaction\n * @param tokensSoldTotal What would be our total sold tokens count after this transaction\n *\n * @return true if taking this investment would break our cap rules\n */\n function isBreakingCap(uint weiAmount, uint tokenAmount, uint weiRaisedTotal, uint tokensSoldTotal) constant returns (bool limitBroken);\n\n /**\n * Check if the current crowdsale is full and we can no longer sell any tokens.\n */\n function isCrowdsaleFull() public constant returns (bool);\n\n /**\n * Create new tokens or transfer issued tokens to the investor depending on the cap model.\n */\n function assignTokens(address receiver, uint tokenAmount) internal;\n}\n\n\n\n/**\n * Abstract base contract for token sales with the default buy entry points.\n *\n * Handle\n * - start and end dates\n * - accepting investments\n * - minimum funding goal and refund\n * - various statistics during the crowdfund\n * - different pricing strategies\n * - different investment policies (require server side customer id, allow only whitelisted addresses)\n *\n * Does not Handle\n *\n * - Token allocation (minting vs. transfer)\n * - Cap rules\n *\n */\ncontract Crowdsale is CrowdsaleBase {\n\n /* Do we need to have unique contributor id for each customer */\n bool public requireCustomerId;\n\n /**\n * Do we verify that contributor has been cleared on the server side (accredited investors only).\n * This method was first used in FirstBlood crowdsale to ensure all contributors have accepted terms on sale (on the web).\n */\n bool public requiredSignedAddress;\n\n /* Server side address that signed allowed contributors (Ethereum addresses) that can participate the crowdsale */\n address public signerAddress;\n\n function Crowdsale(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal) CrowdsaleBase(_token, _pricingStrategy, _multisigWallet, _start, _end, _minimumFundingGoal) {\n }\n\n /**\n * Preallocate tokens for the early investors.\n *\n * Preallocated tokens have been sold before the actual crowdsale opens.\n * This function mints the tokens and moves the crowdsale needle.\n *\n * Investor count is not handled; it is assumed this goes for multiple investors\n * and the token distribution happens outside the smart contract flow.\n *\n * No money is exchanged, as the crowdsale team already have received the payment.\n *\n * @param fullTokens tokens as full tokens - decimal places added internally\n * @param weiPrice Price of a single full token in wei\n *\n */\n function preallocate(address receiver, uint fullTokens, uint weiPrice) public onlyOwner {\n\n uint tokenAmount = fullTokens * 10**token.decimals();\n uint weiAmount = weiPrice * fullTokens; // This can be also 0, we give out tokens for free\n\n weiRaised = weiRaised.plus(weiAmount);\n tokensSold = tokensSold.plus(tokenAmount);\n\n investedAmountOf[receiver] = investedAmountOf[receiver].plus(weiAmount);\n tokenAmountOf[receiver] = tokenAmountOf[receiver].plus(tokenAmount);\n\n assignTokens(receiver, tokenAmount);\n\n // Tell us invest was success\n Invested(receiver, weiAmount, tokenAmount, 0);\n }\n\n /**\n * Allow anonymous contributions to this crowdsale.\n */\n function investWithSignedAddress(address addr, uint128 customerId, uint8 v, bytes32 r, bytes32 s) public payable {\n bytes32 hash = sha256(addr);\n if (ecrecover(hash, v, r, s) != signerAddress) throw;\n if(customerId == 0) throw; // UUIDv4 sanity check\n investInternal(addr, customerId);\n }\n\n /**\n * Track who is the customer making the payment so we can send thank you email.\n */\n function investWithCustomerId(address addr, uint128 customerId) public payable {\n if(requiredSignedAddress) throw; // Crowdsale allows only server-side signed participants\n if(customerId == 0) throw; // UUIDv4 sanity check\n investInternal(addr, customerId);\n }\n\n /**\n * Allow anonymous contributions to this crowdsale.\n */\n function invest(address addr) public payable {\n if(requireCustomerId) throw; // Crowdsale needs to track participants for thank you email\n if(requiredSignedAddress) throw; // Crowdsale allows only server-side signed participants\n investInternal(addr, 0);\n }\n\n /**\n * Invest to tokens, recognize the payer and clear his address.\n *\n */\n function buyWithSignedAddress(uint128 customerId, uint8 v, bytes32 r, bytes32 s) public payable {\n investWithSignedAddress(msg.sender, customerId, v, r, s);\n }\n\n /**\n * Invest to tokens, recognize the payer.\n *\n */\n function buyWithCustomerIdWithChecksum(uint128 customerId, bytes1 checksum) public payable {\n // see customerid.py\n if (bytes1(sha3(customerId)) != checksum) throw;\n investWithCustomerId(msg.sender, customerId);\n }\n\n /**\n * Legacy API signature.\n */\n function buyWithCustomerId(uint128 customerId) public payable {\n investWithCustomerId(msg.sender, customerId);\n }\n\n /**\n * The basic entry point to participate the crowdsale process.\n *\n * Pay for funding, get invested tokens back in the sender address.\n */\n function buy() public payable {\n invest(msg.sender);\n }\n\n /**\n * Set policy do we need to have server-side customer ids for the investments.\n *\n */\n function setRequireCustomerId(bool value) onlyOwner {\n requireCustomerId = value;\n InvestmentPolicyChanged(requireCustomerId, requiredSignedAddress, signerAddress);\n }\n\n /**\n * Set policy if all investors must be cleared on the server side first.\n *\n * This is e.g. for the accredited investor clearing.\n *\n */\n function setRequireSignedAddress(bool value, address _signerAddress) onlyOwner {\n requiredSignedAddress = value;\n signerAddress = _signerAddress;\n InvestmentPolicyChanged(requireCustomerId, requiredSignedAddress, signerAddress);\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n assert(c / a == b);\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n\n\n\n/**\n * @title Basic token\n * @dev Basic version of StandardToken, with no allowances.\n */\ncontract BasicToken is ERC20Basic {\n using SafeMath for uint256;\n\n mapping(address => uint256) balances;\n\n uint256 totalSupply_;\n\n /**\n * @dev total number of tokens in existence\n */\n function totalSupply() public view returns (uint256) {\n return totalSupply_;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param _to The address to transfer to.\n * @param _value The amount to be transferred.\n */\n function transfer(address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[msg.sender]);\n\n // SafeMath.sub will throw if there is not enough balance.\n balances[msg.sender] = balances[msg.sender].sub(_value);\n balances[_to] = balances[_to].add(_value);\n Transfer(msg.sender, _to, _value);\n return true;\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param _owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address _owner) public view returns (uint256 balance) {\n return balances[_owner];\n }\n\n}\n\n\n\n\n/**\n * @title Standard ERC20 token\n *\n * @dev Implementation of the basic standard token.\n * @dev https://github.com/ethereum/EIPs/issues/20\n * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol\n */\ncontract StandardToken is ERC20, BasicToken {\n\n mapping (address => mapping (address => uint256)) internal allowed;\n\n\n /**\n * @dev Transfer tokens from one address to another\n * @param _from address The address which you want to send tokens from\n * @param _to address The address which you want to transfer to\n * @param _value uint256 the amount of tokens to be transferred\n */\n function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[_from]);\n require(_value <= allowed[_from][msg.sender]);\n\n balances[_from] = balances[_from].sub(_value);\n balances[_to] = balances[_to].add(_value);\n allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);\n Transfer(_from, _to, _value);\n return true;\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n *\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param _spender The address which will spend the funds.\n * @param _value The amount of tokens to be spent.\n */\n function approve(address _spender, uint256 _value) public returns (bool) {\n allowed[msg.sender][_spender] = _value;\n Approval(msg.sender, _spender, _value);\n return true;\n }\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param _owner address The address which owns the funds.\n * @param _spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address _owner, address _spender) public view returns (uint256) {\n return allowed[_owner][_spender];\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(address _spender, uint _addedValue) public returns (bool) {\n allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {\n uint oldValue = allowed[msg.sender][_spender];\n if (_subtractedValue > oldValue) {\n allowed[msg.sender][_spender] = 0;\n } else {\n allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);\n }\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\ncontract Recoverable is Ownable {\n\n /// @dev Empty constructor (for now)\n function Recoverable() {\n }\n\n /// @dev This will be invoked by the owner, when owner wants to rescue tokens\n /// @param token Token which will we rescue to the owner from the contract\n function recoverTokens(ERC20Basic token) onlyOwner public {\n token.transfer(owner, tokensToBeReturned(token));\n }\n\n /// @dev Interface function, can be overwritten by the superclass\n /// @param token Token which balance we will check and return\n /// @return The amount of tokens (in smallest denominator) the contract owns\n function tokensToBeReturned(ERC20Basic token) public returns (uint) {\n return token.balanceOf(this);\n }\n}\n\n\n\n/**\n * Standard EIP-20 token with an interface marker.\n *\n * @notice Interface marker is used by crowdsale contracts to validate that addresses point a good token contract.\n *\n */\ncontract StandardTokenExt is StandardToken, Recoverable {\n\n /* Interface declaration */\n function isToken() public constant returns (bool weAre) {\n return true;\n }\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Upgrade agent interface inspired by Lunyr.\n *\n * Upgrade agent transfers tokens to a new contract.\n * Upgrade agent itself can be the token contract, or just a middle man contract doing the heavy lifting.\n */\ncontract UpgradeAgent {\n\n uint public originalSupply;\n\n /** Interface marker */\n function isUpgradeAgent() public constant returns (bool) {\n return true;\n }\n\n function upgradeFrom(address _from, uint256 _value) public;\n\n}\n\n\n/**\n * A token upgrade mechanism where users can opt-in amount of tokens to the next smart contract revision.\n *\n * First envisioned by Golem and Lunyr projects.\n */\ncontract UpgradeableToken is StandardTokenExt {\n\n /** Contract / person who can set the upgrade path. This can be the same as team multisig wallet, as what it is with its default value. */\n address public upgradeMaster;\n\n /** The next contract where the tokens will be migrated. */\n UpgradeAgent public upgradeAgent;\n\n /** How many tokens we have upgraded by now. */\n uint256 public totalUpgraded;\n\n /**\n * Upgrade states.\n *\n * - NotAllowed: The child contract has not reached a condition where the upgrade can bgun\n * - WaitingForAgent: Token allows upgrade, but we don't have a new agent yet\n * - ReadyToUpgrade: The agent is set, but not a single token has been upgraded yet\n * - Upgrading: Upgrade agent is set and the balance holders can upgrade their tokens\n *\n */\n enum UpgradeState {Unknown, NotAllowed, WaitingForAgent, ReadyToUpgrade, Upgrading}\n\n /**\n * Somebody has upgraded some of his tokens.\n */\n event Upgrade(address indexed _from, address indexed _to, uint256 _value);\n\n /**\n * New upgrade agent available.\n */\n event UpgradeAgentSet(address agent);\n\n /**\n * Do not allow construction without upgrade master set.\n */\n function UpgradeableToken(address _upgradeMaster) {\n upgradeMaster = _upgradeMaster;\n }\n\n /**\n * Allow the token holder to upgrade some of their tokens to a new contract.\n */\n function upgrade(uint256 value) public {\n\n UpgradeState state = getUpgradeState();\n if(!(state == UpgradeState.ReadyToUpgrade || state == UpgradeState.Upgrading)) {\n // Called in a bad state\n throw;\n }\n\n // Validate input value.\n if (value == 0) throw;\n\n balances[msg.sender] = balances[msg.sender].sub(value);\n\n // Take tokens out from circulation\n totalSupply_ = totalSupply_.sub(value);\n totalUpgraded = totalUpgraded.add(value);\n\n // Upgrade agent reissues the tokens\n upgradeAgent.upgradeFrom(msg.sender, value);\n Upgrade(msg.sender, upgradeAgent, value);\n }\n\n /**\n * Set an upgrade agent that handles\n */\n function setUpgradeAgent(address agent) external {\n\n if(!canUpgrade()) {\n // The token is not yet in a state that we could think upgrading\n throw;\n }\n\n if (agent == 0x0) throw;\n // Only a master can designate the next agent\n if (msg.sender != upgradeMaster) throw;\n // Upgrade has already begun for an agent\n if (getUpgradeState() == UpgradeState.Upgrading) throw;\n\n upgradeAgent = UpgradeAgent(agent);\n\n // Bad interface\n if(!upgradeAgent.isUpgradeAgent()) throw;\n // Make sure that token supplies match in source and target\n if (upgradeAgent.originalSupply() != totalSupply_) throw;\n\n UpgradeAgentSet(upgradeAgent);\n }\n\n /**\n * Get the state of the token upgrade.\n */\n function getUpgradeState() public constant returns(UpgradeState) {\n if(!canUpgrade()) return UpgradeState.NotAllowed;\n else if(address(upgradeAgent) == 0x00) return UpgradeState.WaitingForAgent;\n else if(totalUpgraded == 0) return UpgradeState.ReadyToUpgrade;\n else return UpgradeState.Upgrading;\n }\n\n /**\n * Change the upgrade master.\n *\n * This allows us to set a new owner for the upgrade mechanism.\n */\n function setUpgradeMaster(address master) public {\n if (master == 0x0) throw;\n if (msg.sender != upgradeMaster) throw;\n upgradeMaster = master;\n }\n\n /**\n * Child contract can enable to provide the condition when the upgrade can begun.\n */\n function canUpgrade() public constant returns(bool) {\n return true;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n/**\n * Define interface for releasing the token transfer after a successful crowdsale.\n */\ncontract ReleasableToken is StandardTokenExt {\n\n /* The finalizer contract that allows unlift the transfer limits on this token */\n address public releaseAgent;\n\n /** A crowdsale contract can release us to the wild if ICO success. If false we are are in transfer lock up period.*/\n bool public released = false;\n\n /** Map of agents that are allowed to transfer tokens regardless of the lock down period. These are crowdsale contracts and possible the team multisig itself. */\n mapping (address => bool) public transferAgents;\n\n /**\n * Limit token transfer until the crowdsale is over.\n *\n */\n modifier canTransfer(address _sender) {\n\n if(!released) {\n if(!transferAgents[_sender]) {\n throw;\n }\n }\n\n _;\n }\n\n /**\n * Set the contract that can call release and make the token transferable.\n *\n * Design choice. Allow reset the release agent to fix fat finger mistakes.\n */\n function setReleaseAgent(address addr) onlyOwner inReleaseState(false) public {\n\n // We don't do interface check here as we might want to a normal wallet address to act as a release agent\n releaseAgent = addr;\n }\n\n /**\n * Owner can allow a particular address (a crowdsale contract) to transfer tokens despite the lock up period.\n */\n function setTransferAgent(address addr, bool state) onlyOwner inReleaseState(false) public {\n transferAgents[addr] = state;\n }\n\n /**\n * One way function to release the tokens to the wild.\n *\n * Can be called only from the release agent that is the final ICO contract. It is only called if the crowdsale has been success (first milestone reached).\n */\n function releaseTokenTransfer() public onlyReleaseAgent {\n released = true;\n }\n\n /** The function can be called only before or after the tokens have been releasesd */\n modifier inReleaseState(bool releaseState) {\n if(releaseState != released) {\n throw;\n }\n _;\n }\n\n /** The function can be called only by a whitelisted release agent. */\n modifier onlyReleaseAgent() {\n if(msg.sender != releaseAgent) {\n throw;\n }\n _;\n }\n\n function transfer(address _to, uint _value) canTransfer(msg.sender) returns (bool success) {\n // Call StandardToken.transfer()\n return super.transfer(_to, _value);\n }\n\n function transferFrom(address _from, address _to, uint _value) canTransfer(_from) returns (bool success) {\n // Call StandardToken.transferForm()\n return super.transferFrom(_from, _to, _value);\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n\n/**\n * A token that can increase its supply by another contract.\n *\n * This allows uncapped crowdsale by dynamically increasing the supply when money pours in.\n * Only mint agents, contracts whitelisted by owner, can mint new tokens.\n *\n */\ncontract MintableToken is StandardTokenExt {\n\n using SafeMathLib for uint;\n\n bool public mintingFinished = false;\n\n /** List of agents that are allowed to create new tokens */\n mapping (address => bool) public mintAgents;\n\n event MintingAgentChanged(address addr, bool state);\n event Minted(address receiver, uint amount);\n\n /**\n * Create new tokens and allocate them to an address..\n *\n * Only callably by a crowdsale contract (mint agent).\n */\n function mint(address receiver, uint amount) onlyMintAgent canMint public {\n totalSupply_ = totalSupply_.plus(amount);\n balances[receiver] = balances[receiver].plus(amount);\n\n // This will make the mint transaction apper in EtherScan.io\n // We can remove this after there is a standardized minting event\n Transfer(0, receiver, amount);\n }\n\n /**\n * Owner can allow a crowdsale contract to mint new tokens.\n */\n function setMintAgent(address addr, bool state) onlyOwner canMint public {\n mintAgents[addr] = state;\n MintingAgentChanged(addr, state);\n }\n\n modifier onlyMintAgent() {\n // Only crowdsale contracts are allowed to mint new tokens\n if(!mintAgents[msg.sender]) {\n throw;\n }\n _;\n }\n\n /** Make sure we are not done yet. */\n modifier canMint() {\n if(mintingFinished) throw;\n _;\n }\n}\n\n\n\n/**\n * A crowdsaled token.\n *\n * An ERC-20 token designed specifically for crowdsales with investor protection and further development path.\n *\n * - The token transfer() is disabled until the crowdsale is over\n * - The token contract gives an opt-in upgrade path to a new contract\n * - The same token can be part of several crowdsales through approve() mechanism\n * - The token can be capped (supply set in the constructor) or uncapped (crowdsale contract can mint new tokens)\n *\n */\ncontract CrowdsaleToken is ReleasableToken, MintableToken, UpgradeableToken {\n\n /** Name and symbol were updated. */\n event UpdatedTokenInformation(string newName, string newSymbol);\n\n string public name;\n\n string public symbol;\n\n uint public decimals;\n\n /**\n * Construct the token.\n *\n * This token must be created through a team multisig wallet, so that it is owned by that wallet.\n *\n * @param _name Token name\n * @param _symbol Token symbol - should be all caps\n * @param _initialSupply How many tokens we start with\n * @param _decimals Number of decimal places\n * @param _mintable Are new tokens created over the crowdsale or do we distribute only the initial supply? Note that when the token becomes transferable the minting always ends.\n */\n function CrowdsaleToken(string _name, string _symbol, uint _initialSupply, uint _decimals, bool _mintable)\n UpgradeableToken(msg.sender) {\n\n // Create any address, can be transferred\n // to team multisig via changeOwner(),\n // also remember to call setUpgradeMaster()\n owner = msg.sender;\n\n name = _name;\n symbol = _symbol;\n\n totalSupply_ = _initialSupply;\n\n decimals = _decimals;\n\n // Create initially all balance on the team multisig\n balances[owner] = totalSupply_;\n\n if(totalSupply_ > 0) {\n Minted(owner, totalSupply_);\n }\n\n // No more new supply allowed after the token creation\n if(!_mintable) {\n mintingFinished = true;\n if(totalSupply_ == 0) {\n throw; // Cannot create a token without supply and no minting\n }\n }\n }\n\n /**\n * When token is released to be transferable, enforce no new tokens can be created.\n */\n function releaseTokenTransfer() public onlyReleaseAgent {\n mintingFinished = true;\n super.releaseTokenTransfer();\n }\n\n /**\n * Allow upgrade agent functionality kick in only if the crowdsale was success.\n */\n function canUpgrade() public constant returns(bool) {\n return released && super.canUpgrade();\n }\n\n /**\n * Owner can update token information here.\n *\n * It is often useful to conceal the actual token association, until\n * the token operations, like central issuance or reissuance have been completed.\n *\n * This function allows the token owner to rename the token after the operations\n * have been completed and then point the audience to use the token contract.\n */\n function setTokenInformation(string _name, string _symbol) onlyOwner {\n name = _name;\n symbol = _symbol;\n\n UpdatedTokenInformation(name, symbol);\n }\n\n}\n\n\n\n/**\n * At the end of the successful crowdsale allocate % bonus of tokens to the team.\n *\n * Do not unlock the tokens.\n *\n * BonusAllocationFinal must be set as the minting agent for the MintableToken.\n *\n */\ncontract ExtraFinalizeAgent is FinalizeAgent {\n\n using SafeMathLib for uint;\n\n CrowdsaleToken public token;\n Crowdsale public crowdsale;\n\n /** Total percent of tokens minted to the team at the end of the sale as base points (0.0001) */\n uint public bonusBasePoints;\n\n /** Where we move the tokens at the end of the sale. */\n address public teamMultisig;\n\n /* How much bonus tokens we allocated */\n uint public allocatedBonus;\n\n /* How many tokens other finalizers will allocate and we do not count these in */\n uint public accountedTokenSales;\n\n function ExtraFinalizeAgent(CrowdsaleToken _token, Crowdsale _crowdsale, uint _bonusBasePoints, address _teamMultisig, uint _accountedTokenSales) {\n token = _token;\n crowdsale = _crowdsale;\n\n if(address(crowdsale) == 0) {\n throw;\n }\n\n teamMultisig = _teamMultisig;\n if(address(teamMultisig) == 0) {\n throw;\n }\n\n accountedTokenSales = _accountedTokenSales;\n }\n\n /* Can we run finalize properly */\n function isSane() public constant returns (bool) {\n return (token.mintAgents(address(this)) == true);\n }\n\n /** Called once by crowdsale finalize() if the sale was success. */\n function finalizeCrowdsale() {\n if(msg.sender != address(crowdsale)) {\n throw;\n }\n\n // How many % of tokens the founders and others get\n uint tokensSold = crowdsale.tokensSold().minus(accountedTokenSales);\n allocatedBonus = tokensSold.times(bonusBasePoints) / 10000;\n\n // move tokens to the team multisig wallet\n token.mint(teamMultisig, allocatedBonus);\n\n }\n\n}\n"}, "FinalizeAgent": {"abi": [{"constant": false, "inputs": [], "name": "finalizeCrowdsale", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "isFinalizeAgent", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isSane", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}], "bytecode": "0x", "bytecode_runtime": "0x", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": null, "name": "FinalizeAgent", "ordered_full_dependencies": [], "source_path": "contracts/FinalizeAgent.sol"}, "FlatPricing": {"abi": [{"constant": true, "inputs": [], "name": "isPricingStrategy", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "value", "type": "uint256"}, {"name": "weiRaised", "type": "uint256"}, {"name": "tokensSold", "type": "uint256"}, {"name": "msgSender", "type": "address"}, {"name": "decimals", "type": "uint256"}], "name": "calculatePrice", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "oneTokenInWei", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "crowdsale", "type": "address"}], "name": "isSane", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "purchaser", "type": "address"}], "name": "isPresalePurchase", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [{"name": "_oneTokenInWei", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}], "bytecode": "0x608060405234801561001057600080fd5b5060405160208061029d83398101604052516000811161002f57600080fd5b60005561025c806100416000396000f30060806040526004361061006c5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166304bbc255811461007157806318a4155e1461009a57806384e3ac94146100e65780638e768288146100fb578063f14ae17d14610129575b600080fd5b34801561007d57600080fd5b50610086610157565b604080519115158252519081900360200190f35b3480156100a657600080fd5b506100d460043560243560443573ffffffffffffffffffffffffffffffffffffffff6064351660843561015c565b60408051918252519081900360200190f35b3480156100f257600080fd5b506100d461021e565b34801561010757600080fd5b5061008673ffffffffffffffffffffffffffffffffffffffff60043516610224565b34801561013557600080fd5b5061008673ffffffffffffffffffffffffffffffffffffffff6004351661022a565b600190565b60008082600a0a90506000548773__contracts/SafeMathLib.sol:SafeMathLi__631d3b9edf9091846040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b1580156101dd57600080fd5b505af41580156101f1573d6000803e3d6000fd5b505050506040513d602081101561020757600080fd5b505181151561021257fe5b04979650505050505050565b60005481565b50600190565b506000905600a165627a7a72305820f55a662027b31e3bcddbdc707b9eb49b47074100692dc0a03e04d7fefeae59ac0029", "bytecode_runtime": "0x60806040526004361061006c5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166304bbc255811461007157806318a4155e1461009a57806384e3ac94146100e65780638e768288146100fb578063f14ae17d14610129575b600080fd5b34801561007d57600080fd5b50610086610157565b604080519115158252519081900360200190f35b3480156100a657600080fd5b506100d460043560243560443573ffffffffffffffffffffffffffffffffffffffff6064351660843561015c565b60408051918252519081900360200190f35b3480156100f257600080fd5b506100d461021e565b34801561010757600080fd5b5061008673ffffffffffffffffffffffffffffffffffffffff60043516610224565b34801561013557600080fd5b5061008673ffffffffffffffffffffffffffffffffffffffff6004351661022a565b600190565b60008082600a0a90506000548773__contracts/SafeMathLib.sol:SafeMathLi__631d3b9edf9091846040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b1580156101dd57600080fd5b505af41580156101f1573d6000803e3d6000fd5b505050506040513d602081101561020757600080fd5b505181151561021257fe5b04979650505050505050565b60005481565b50600190565b506000905600a165627a7a72305820f55a662027b31e3bcddbdc707b9eb49b47074100692dc0a03e04d7fefeae59ac0029", "direct_dependencies": ["SafeMathLib"], "full_dependencies": ["SafeMathLib"], "linkrefs": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 856}], "linkrefs_runtime": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 726}], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": true, "inputs": [], "name": "isPricingStrategy", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "value", "type": "uint256"}, {"name": "weiRaised", "type": "uint256"}, {"name": "tokensSold", "type": "uint256"}, {"name": "msgSender", "type": "address"}, {"name": "decimals", "type": "uint256"}], "name": "calculatePrice", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "oneTokenInWei", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "crowdsale", "type": "address"}], "name": "isSane", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "purchaser", "type": "address"}], "name": "isPresalePurchase", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [{"name": "_oneTokenInWei", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}], "devdoc": {"methods": {"isPresalePurchase(address)": {"details": "Pricing tells if this is a presale purchase or not.", "params": {"purchaser": "Address of the purchaser"}, "return": "False by default, true if a presale purchaser"}}}, "userdoc": {"methods": {"calculatePrice(uint256,uint256,uint256,address,uint256)": {"notice": "Calculate the current price for buy in amount. "}, "isPricingStrategy()": {"notice": "Interface declaration. "}, "isSane(address)": {"notice": "Self check if all references are correctly set. * Checks that pricing strategy matches crowdsale parameters."}}}}, "settings": {"compilationTarget": {"contracts/FlatPricing.sol": "FlatPricing"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/FlatPricing.sol": {"keccak256": "0xaa3193a3c1759e4c9248c18c286c6b19e10d84f7a8dc535ae7ce31d523beb6ea", "urls": ["bzzr://4abe5f57bebd105778acadd3cee768b48c5af94909243f59aca6607567c45b14"]}, "contracts/PricingStrategy.sol": {"keccak256": "0x8df5093b7d07168ad994f9176de0bd2268f6563b1e8a3a448d8cfe7fe246c628", "urls": ["bzzr://ef5c944d51f739ab34e2c951d6ac82a7152e6bb844058a8e57bae52c14cbe16b"]}, "contracts/SafeMathLib.sol": {"keccak256": "0x501bfe31e274b9a5591f7c540bdced4d4312e27d4f19599147c9bbca3d9c6b18", "urls": ["bzzr://a80935ebddb06c247d71372d4e5833ee029f08633bd0fe4a274a57009567e5b9"]}}, "version": 1}, "name": "FlatPricing", "ordered_full_dependencies": ["SafeMathLib"], "source_path": "contracts/FlatPricing.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Interface for defining crowdsale pricing.\n */\ncontract PricingStrategy {\n\n /** Interface declaration. */\n function isPricingStrategy() public constant returns (bool) {\n return true;\n }\n\n /** Self check if all references are correctly set.\n *\n * Checks that pricing strategy matches crowdsale parameters.\n */\n function isSane(address crowdsale) public constant returns (bool) {\n return true;\n }\n\n /**\n * @dev Pricing tells if this is a presale purchase or not.\n @param purchaser Address of the purchaser\n @return False by default, true if a presale purchaser\n */\n function isPresalePurchase(address purchaser) public constant returns (bool) {\n return false;\n }\n\n /**\n * When somebody tries to buy tokens for X eth, calculate how many tokens they get.\n *\n *\n * @param value - What is the value of the transaction send in as wei\n * @param tokensSold - how much tokens have been sold this far\n * @param weiRaised - how much money has been raised this far in the main token sale - this number excludes presale\n * @param msgSender - who is the investor of this transaction\n * @param decimals - how many decimal units the token has\n * @return Amount of tokens the investor receives\n */\n function calculatePrice(uint value, uint weiRaised, uint tokensSold, address msgSender, uint decimals) public constant returns (uint tokenAmount);\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Safe unsigned safe math.\n *\n * https://blog.aragon.one/library-driven-development-in-solidity-2bebcaf88736#.750gwtwli\n *\n * Originally from https://raw.githubusercontent.com/AragonOne/zeppelin-solidity/master/contracts/SafeMathLib.sol\n *\n * Maintained here until merged to mainline zeppelin-solidity.\n *\n */\nlibrary SafeMathLib {\n\n function times(uint a, uint b) returns (uint) {\n uint c = a * b;\n assert(a == 0 || c / a == b);\n return c;\n }\n\n function minus(uint a, uint b) returns (uint) {\n assert(b <= a);\n return a - b;\n }\n\n function plus(uint a, uint b) returns (uint) {\n uint c = a + b;\n assert(c>=a);\n return c;\n }\n\n}\n\n\n/**\n * Fixed crowdsale pricing - everybody gets the same price.\n */\ncontract FlatPricing is PricingStrategy {\n\n using SafeMathLib for uint;\n\n /* How many weis one token costs */\n uint public oneTokenInWei;\n\n function FlatPricing(uint _oneTokenInWei) {\n require(_oneTokenInWei > 0);\n oneTokenInWei = _oneTokenInWei;\n }\n\n /**\n * Calculate the current price for buy in amount.\n *\n */\n function calculatePrice(uint value, uint weiRaised, uint tokensSold, address msgSender, uint decimals) public constant returns (uint) {\n uint multiplier = 10 ** decimals;\n return value.times(multiplier) / oneTokenInWei;\n }\n\n}\n"}, "FractionalERC20": {"abi": [{"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "approve", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "from", "type": "address"}, {"name": "to", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "decimals", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "who", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "to", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "owner", "type": "address"}, {"name": "spender", "type": "address"}], "name": "allowance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}, {"indexed": true, "name": "spender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "bytecode": "0x", "bytecode_runtime": "0x", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": null, "name": "FractionalERC20", "ordered_full_dependencies": [], "source_path": "contracts/FractionalERC20.sol"}, "GasStipendTester": {"abi": [{"constant": false, "inputs": [{"name": "target", "type": "address"}], "name": "transfer", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}], "bytecode": "0x608060405234801561001057600080fd5b5060d58061001f6000396000f300608060405260043610603e5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416631a69523081146043575b600080fd5b606273ffffffffffffffffffffffffffffffffffffffff600435166064565b005b60405173ffffffffffffffffffffffffffffffffffffffff8216903480156108fc02916000818181858888f1935050505015801560a5573d6000803e3d6000fd5b50505600a165627a7a723058205db514ece666d745fc9e88f2a3f9d782ea9269e2c772af99e4b0ffbcce79478e0029", "bytecode_runtime": "0x608060405260043610603e5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416631a69523081146043575b600080fd5b606273ffffffffffffffffffffffffffffffffffffffff600435166064565b005b60405173ffffffffffffffffffffffffffffffffffffffff8216903480156108fc02916000818181858888f1935050505015801560a5573d6000803e3d6000fd5b50505600a165627a7a723058205db514ece666d745fc9e88f2a3f9d782ea9269e2c772af99e4b0ffbcce79478e0029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": false, "inputs": [{"name": "target", "type": "address"}], "name": "transfer", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}], "devdoc": {"author": "TokenMarket Ltd. / Ville Sundell * This is for testing will the fallback function of \"target\" fit to the gas stipend.", "methods": {}}, "userdoc": {"methods": {}}}, "settings": {"compilationTarget": {"contracts/test/GasStipendTester.sol": "GasStipendTester"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/test/GasStipendTester.sol": {"keccak256": "0xdec947905b8993a22303c11c1c9422547c4f01501c4e7dc3df7827dcf1cc1001", "urls": ["bzzr://7d9227979a0730cdd3a7f7615baa52075a6d7bd90777054b00dece82306ac8d9"]}}, "version": 1}, "name": "GasStipendTester", "ordered_full_dependencies": [], "source_path": "contracts/test/GasStipendTester.sol", "source": "/**\n * This smart contract code is Copyright 2018 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * @dev Send ethers with transfer()\n * @author TokenMarket Ltd. / Ville Sundell \n *\n * This is for testing will the fallback function of \"target\" fit to the\n * gas stipend.\n */\n\ncontract GasStipendTester {\n function transfer(address target) external payable {\n target.transfer(msg.value);\n }\n}\n"}, "Haltable": {"abi": [{"constant": false, "inputs": [], "name": "halt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "halted", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "unhalt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "bytecode": "0x608060405260008054600160a060020a0319163317905561032b806100256000396000f30060806040526004361061006c5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416635ed7ca5b81146100715780638da5cb5b14610088578063b9b8af0b146100c6578063cb3e64fd146100ef578063f2fde38b14610104575b600080fd5b34801561007d57600080fd5b50610086610132565b005b34801561009457600080fd5b5061009d61018d565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b3480156100d257600080fd5b506100db6101a9565b604080519115158252519081900360200190f35b3480156100fb57600080fd5b506100866101ca565b34801561011057600080fd5b5061008673ffffffffffffffffffffffffffffffffffffffff60043516610237565b60005473ffffffffffffffffffffffffffffffffffffffff16331461015657600080fd5b6000805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60005474010000000000000000000000000000000000000000900460ff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1633146101ee57600080fd5b60005474010000000000000000000000000000000000000000900460ff16151561021757600080fd5b6000805474ff000000000000000000000000000000000000000019169055565b60005473ffffffffffffffffffffffffffffffffffffffff16331461025b57600080fd5b73ffffffffffffffffffffffffffffffffffffffff8116151561027d57600080fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff191673ffffffffffffffffffffffffffffffffffffffff929092169190911790555600a165627a7a72305820332a1e13909c008c1ec5c01e7bfda263f68a5146ff1cd054d7d4f7a21c3f1f670029", "bytecode_runtime": "0x60806040526004361061006c5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416635ed7ca5b81146100715780638da5cb5b14610088578063b9b8af0b146100c6578063cb3e64fd146100ef578063f2fde38b14610104575b600080fd5b34801561007d57600080fd5b50610086610132565b005b34801561009457600080fd5b5061009d61018d565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b3480156100d257600080fd5b506100db6101a9565b604080519115158252519081900360200190f35b3480156100fb57600080fd5b506100866101ca565b34801561011057600080fd5b5061008673ffffffffffffffffffffffffffffffffffffffff60043516610237565b60005473ffffffffffffffffffffffffffffffffffffffff16331461015657600080fd5b6000805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60005474010000000000000000000000000000000000000000900460ff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1633146101ee57600080fd5b60005474010000000000000000000000000000000000000000900460ff16151561021757600080fd5b6000805474ff000000000000000000000000000000000000000019169055565b60005473ffffffffffffffffffffffffffffffffffffffff16331461025b57600080fd5b73ffffffffffffffffffffffffffffffffffffffff8116151561027d57600080fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff191673ffffffffffffffffffffffffffffffffffffffff929092169190911790555600a165627a7a72305820332a1e13909c008c1ec5c01e7bfda263f68a5146ff1cd054d7d4f7a21c3f1f670029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": false, "inputs": [], "name": "halt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "halted", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "unhalt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "devdoc": {"methods": {"transferOwnership(address)": {"details": "Allows the current owner to transfer control of the contract to a newOwner.", "params": {"newOwner": "The address to transfer ownership to."}}}}, "userdoc": {"methods": {}}}, "settings": {"compilationTarget": {"contracts/Haltable.sol": "Haltable"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/Haltable.sol": {"keccak256": "0x265dcf25e7c9ab4b6eecd2181f1b71334a1b5381a60f8db7d9526dab120f4b70", "urls": ["bzzr://d522e00fa9e075941469dd81738b59fdb99ce3c12cdc39e33abe40b588c4da9b"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}}, "version": 1}, "name": "Haltable", "ordered_full_dependencies": [], "source_path": "contracts/Haltable.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n/*\n * Haltable\n *\n * Abstract contract that allows children to implement an\n * emergency stop mechanism. Differs from Pausable by causing a throw when in halt mode.\n *\n *\n * Originally envisioned in FirstBlood ICO contract.\n */\ncontract Haltable is Ownable {\n bool public halted;\n\n modifier stopInEmergency {\n if (halted) throw;\n _;\n }\n\n modifier stopNonOwnersInEmergency {\n if (halted && msg.sender != owner) throw;\n _;\n }\n\n modifier onlyInEmergency {\n if (!halted) throw;\n _;\n }\n\n // called by the owner on emergency, triggers stopped state\n function halt() external onlyOwner {\n halted = true;\n }\n\n // called by the owner on end of emergency, returns to normal state\n function unhalt() external onlyOwner onlyInEmergency {\n halted = false;\n }\n\n}\n"}, "InvestorInteractionContract": {"abi": [{"constant": true, "inputs": [], "name": "maximumSupply", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "name", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "approve", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "announcementHash", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_signature", "type": "bytes"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}, {"name": "_fee", "type": "uint256"}, {"name": "_nonce", "type": "uint256"}], "name": "transferPreSigned", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_token", "type": "address"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}, {"name": "_fee", "type": "uint256"}, {"name": "_nonce", "type": "uint256"}], "name": "transferPreSignedHashing", "outputs": [{"name": "", "type": "bytes32"}], "payable": false, "stateMutability": "pure", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "addedValue", "type": "uint256"}, {"name": "data", "type": "bytes"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "tokenCount", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "hash", "type": "bytes32"}, {"name": "sig", "type": "bytes"}], "name": "recover", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "pure", "type": "function"}, {"constant": false, "inputs": [{"name": "from", "type": "address"}, {"name": "to", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "investor", "type": "address"}], "name": "importInvestor", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "decimals", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "owner", "type": "address"}, {"name": "blockNumber", "type": "uint256"}], "name": "balanceAt", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "receiver", "type": "address"}, {"name": "amount", "type": "uint256"}, {"name": "data", "type": "bytes"}], "name": "transferAndCall", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}, {"name": "", "type": "uint256"}], "name": "tokenBalances", "outputs": [{"name": "blockNumber", "type": "uint256"}, {"name": "value", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "uint256"}], "name": "tokensTotal", "outputs": [{"name": "blockNumber", "type": "uint256"}, {"name": "value", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}, {"name": "", "type": "address"}], "name": "used", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "blockNumber", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}, {"name": "", "type": "address"}], "name": "allowed", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "announcementType", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "subtractedValue", "type": "uint256"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "owner", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "subtractedValue", "type": "uint256"}, {"name": "data", "type": "bytes"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "balanceImported", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "options", "outputs": [{"name": "", "type": "bytes32"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "to", "type": "address"}, {"name": "amount", "type": "uint256"}], "name": "transferInvestorTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "transferVerifier", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "symbol", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "blockNumber", "type": "uint256"}], "name": "totalSupplyAt", "outputs": [{"name": "tokenCount", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "announcementName", "outputs": [{"name": "", "type": "bytes32"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "KYC", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "optionsTotal", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "amount", "type": "uint256"}], "name": "act", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "addedValue", "type": "uint256"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "owner", "type": "address"}, {"name": "spender", "type": "address"}], "name": "allowance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "announcementURI", "outputs": [{"name": "", "type": "bytes32"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "token", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [{"name": "_token", "type": "address"}, {"name": "_KYC", "type": "address"}, {"name": "name", "type": "bytes32"}, {"name": "URI", "type": "bytes32"}, {"name": "_type", "type": "uint256"}, {"name": "_hash", "type": "uint256"}, {"name": "_blockNumber", "type": "uint256"}, {"name": "_options", "type": "bytes32[]"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "option", "type": "address"}, {"indexed": false, "name": "description", "type": "bytes32"}], "name": "OptionAdded", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "token", "type": "address"}, {"indexed": false, "name": "KYC", "type": "address"}, {"indexed": false, "name": "blockNumber", "type": "uint256"}, {"indexed": false, "name": "maximumSupply", "type": "uint256"}], "name": "IICCreated", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": true, "name": "delegate", "type": "address"}, {"indexed": false, "name": "amount", "type": "uint256"}, {"indexed": false, "name": "fee", "type": "uint256"}], "name": "TransferPreSigned", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "from", "type": "address"}, {"indexed": false, "name": "hash", "type": "bytes32"}], "name": "Debug", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "from", "type": "address"}, {"indexed": false, "name": "receiver", "type": "address"}, {"indexed": false, "name": "amount", "type": "uint256"}, {"indexed": false, "name": "data", "type": "bytes"}], "name": "ERC677Transfer", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}, {"indexed": true, "name": "spender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "bytecode": "0x60806040523480156200001157600080fd5b5060405162001ef138038062001ef18339810160408181528251602080850151838601516060870151608088015160a089015160c08a015160e08b0151878b01808b526000808d528b51998a01909b528a8952868b556001869055600285905560038490558b51999c979b969a959994989397929691909201949384939192601291620000a191600491620002bd565b508151620000b7906005906020850190620002bd565b506006555050600d8054600160a060020a031916600160a060020a038c161790556000841115620000ed57600c849055620000f2565b43600c555b600f8054600160a060020a031916600160a060020a038b16179055600091505b8251821015620001be5781606401905082828151811015156200013157fe5b6020908102909101810151600160a060020a0383166000908152601090925260409091205582517f4657af31f793f7106e2139bb6d8ae7293c2af46cf8c457b73c33d316f78bb24f9082908590859081106200018957fe5b602090810290910181015160408051600160a060020a039094168452918301528051918290030190a160019091019062000112565b600d54600c54604080517f981b24d0000000000000000000000000000000000000000000000000000000008152600481019290925251600160a060020a039092169163981b24d0916024808201926020929091908290030181600087803b1580156200022957600080fd5b505af11580156200023e573d6000803e3d6000fd5b505050506040513d60208110156200025557600080fd5b5051601381905560408051600160a060020a03808e1682528c1660208201528082018790526060810192909252517fe7c73ce173192d0e4ea6632e934e4df90b0a61a55086c4dc27534581a54518d69181900360800190a15050505050505050505062000362565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200030057805160ff191683800117855562000330565b8280016001018555821562000330579182015b828111156200033057825182559160200191906001019062000313565b506200033e92915062000342565b5090565b6200035f91905b808211156200033e576000815560010162000349565b90565b611b7f80620003726000396000f3006080604052600436106101d75763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630480e58b81146101dc57806306fdde0314610203578063095ea7b31461028d5780631274c3f3146102c55780631296830d146102da57806315420b711461034d57806316ca3b631461037d57806318160ddd146103e657806319045a25146103fb57806323b872dd146104755780632eb0236a1461049f578063313ce567146104c25780633b8e6f2e146104d75780634000aea0146104fb57806348ff5665146105645780634f0092ab146105a15780635195afa5146105b957806357e871e7146105e05780635c658165146105f55780635fcce2791461061c578063661884631461063157806370a08231146106555780637272ad4914610676578063755d76b7146106df57806382fae9c1146107005780638cd98ee3146107215780638daed5281461074557806395d89b411461075a578063981b24d01461076f5780639ea0c08c14610787578063a12a6bb01461079c578063a9059cbb146107b1578063a9ec80d8146107d5578063c9ee7e02146107ea578063d73dd62314610802578063dd62ed3e14610826578063f31294a41461084d578063fc0c546a14610862575b600080fd5b3480156101e857600080fd5b506101f1610877565b60408051918252519081900360200190f35b34801561020f57600080fd5b5061021861087d565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561025257818101518382015260200161023a565b50505050905090810190601f16801561027f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561029957600080fd5b506102b1600160a060020a036004351660243561090b565b604080519115158252519081900360200190f35b3480156102d157600080fd5b506101f1610971565b3480156102e657600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526102b194369492936024939284019190819084018382808284375094975050508335600160a060020a0316945050506020820135916040810135915060600135610977565b34801561035957600080fd5b506101f1600160a060020a0360043581169060243516604435606435608435610b97565b34801561038957600080fd5b50604080516020600460443581810135601f81018490048402850184019095528484526102b1948235600160a060020a0316946024803595369594606494920191908190840183828082843750949750610c099650505050505050565b3480156103f257600080fd5b506101f1610cb9565b34801561040757600080fd5b5060408051602060046024803582810135601f8101859004850286018501909652858552610459958335953695604494919390910191908190840183828082843750949750610ccb9650505050505050565b60408051600160a060020a039092168252519081900360200190f35b34801561048157600080fd5b506102b1600160a060020a0360043581169060243516604435610da0565b3480156104ab57600080fd5b506104c0600160a060020a0360043516610e30565b005b3480156104ce57600080fd5b506101f1610fd2565b3480156104e357600080fd5b506101f1600160a060020a0360043516602435610fd8565b34801561050757600080fd5b50604080516020600460443581810135601f81018490048402850184019095528484526102b1948235600160a060020a0316946024803595369594606494920191908190840183828082843750949750610ffa9650505050505050565b34801561057057600080fd5b50610588600160a060020a0360043516602435611203565b6040805192835260208301919091528051918290030190f35b3480156105ad57600080fd5b5061058860043561123e565b3480156105c557600080fd5b506101f1600160a060020a036004358116906024351661126a565b3480156105ec57600080fd5b506101f1611287565b34801561060157600080fd5b506101f1600160a060020a036004358116906024351661128d565b34801561062857600080fd5b506101f16112aa565b34801561063d57600080fd5b506102b1600160a060020a03600435166024356112b0565b34801561066157600080fd5b506101f1600160a060020a03600435166113a0565b34801561068257600080fd5b50604080516020600460443581810135601f81018490048402850184019095528484526102b1948235600160a060020a03169460248035953695946064949201919081908401838280828437509497506113c89650505050505050565b3480156106eb57600080fd5b506102b1600160a060020a03600435166113ea565b34801561070c57600080fd5b506101f1600160a060020a03600435166113ff565b34801561072d57600080fd5b506104c0600160a060020a0360043516602435611411565b34801561075157600080fd5b50610459611420565b34801561076657600080fd5b5061021861142f565b34801561077b57600080fd5b506101f160043561148a565b34801561079357600080fd5b506101f1611497565b3480156107a857600080fd5b5061045961149d565b3480156107bd57600080fd5b506102b1600160a060020a03600435166024356114ac565b3480156107e157600080fd5b506101f161159e565b3480156107f657600080fd5b506104c06004356115a4565b34801561080e57600080fd5b506102b1600160a060020a03600435166024356115b2565b34801561083257600080fd5b506101f1600160a060020a036004358116906024351661164b565b34801561085957600080fd5b506101f1611676565b34801561086e57600080fd5b5061045961167c565b60135481565b6004805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156109035780601f106108d857610100808354040283529160200191610903565b820191906000526020600020905b8154815290600101906020018083116108e657829003601f168201915b505050505081565b336000818152600a60209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b60035481565b60008080600160a060020a038716151561099057600080fd5b600b886040518082805190602001908083835b602083106109c25780518252601f1990920191602091820191016109a3565b51815160209384036101000a600019018019909216911617905292019485525060405193849003019092205460ff161591506109ff905057600080fd5b610a0c3088888888610b97565b9150610a188289610ccb565b9050600160a060020a0381161515610a2f57600080fd5b610a3a81888861168b565b610a4581338761168b565b6001600b896040518082805190602001908083835b60208310610a795780518252601f199092019160209182019101610a5a565b51815160209384036101000a6000190180199092169116179052920194855250604080519485900382018520805460ff1916961515969096179095558a84528301899052505081513392600160a060020a038b811693908616927fec5a73fd1f178be20c1bca1b406cbf4b5c20d833b66e582fc122fb4baa0fc2a4929181900390910190a486600160a060020a031681600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef886040518082815260200191505060405180910390a36040805186815290513391600160a060020a038416917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a3506001979650505050505050565b604080517f48664c160000000000000000000000000000000000000000000000000000000081526c01000000000000000000000000600160a060020a0397881681026004830152959096169094026018860152602c850192909252604c840152606c8301525190819003608c01902090565b6000600160a060020a038416301415610c2157600080fd5b610c2b84846115b2565b5083600160a060020a03168260405180828051906020019080838360005b83811015610c61578181015183820152602001610c49565b50505050905090810190601f168015610c8e5780820380516001836020036101000a031916815260200191505b509150506000604051808303816000865af19150501515610cae57600080fd5b5060015b9392505050565b6000610cc66009436117c7565b905090565b60008060008084516041141515610ce55760009350610d97565b50505060208201516040830151606084015160001a601b60ff82161015610d0a57601b015b8060ff16601b14158015610d2257508060ff16601c14155b15610d305760009350610d97565b60408051600080825260208083018085528a905260ff8516838501526060830187905260808301869052925160019360a0808501949193601f19840193928390039091019190865af1158015610d8a573d6000803e3d6000fd5b5050506020604051035193505b50505092915050565b600160a060020a0383166000908152600a60209081526040808320338452909152812054821115610dd057600080fd5b610ddb84848461168b565b82600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a35060019392505050565b600160a060020a0381166000908152600e60205260408120548190819060ff1615610e5a57600080fd5b600d54600c54604080517f3b8e6f2e000000000000000000000000000000000000000000000000000000008152600160a060020a038881166004830152602482019390935290519190921691633b8e6f2e9160448083019260209291908290030181600087803b158015610ecd57600080fd5b505af1158015610ee1573d6000803e3d6000fd5b505050506040513d6020811015610ef757600080fd5b50519250610f0560006113a0565b9150610f0f610cb9565b6000805260086020529050610f537f5eff886ea0ce6ca488a3d6e336d6c0f75f46d19b42c06ce5ee98e42c96d256c7610f4e848663ffffffff6117dd16565b6117ec565b610f5f6000858561168b565b610f746009610f4e838663ffffffff6117dd16565b600160a060020a0384166000818152600e60209081526040808320805460ff19166001179055805187815290517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a350505050565b60065481565b600160a060020a0382166000908152600860205260408120610cb290836117c7565b600061100684846114ac565b151561101157600080fd5b7f72db2339068fd324bbc28f2944e01064da539ac76064b6ce4a97a5f81de43dd6338585856040518085600160a060020a0316600160a060020a0316815260200184600160a060020a0316600160a060020a0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156110a9578181015183820152602001611091565b50505050905090810190601f1680156110d65780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a183600160a060020a031663c0ee0b8a3385856040518463ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018084600160a060020a0316600160a060020a0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561117e578181015183820152602001611166565b50505050905090810190601f1680156111ab5780820380516001836020036101000a031916815260200191505b50945050505050602060405180830381600087803b1580156111cc57600080fd5b505af11580156111e0573d6000803e3d6000fd5b505050506040513d60208110156111f657600080fd5b50511515610cb257600080fd5b60086020528160005260406000208181548110151561121e57fe5b600091825260209091206002909102018054600190910154909250905082565b600980548290811061124c57fe5b60009182526020909120600290910201805460019091015490915082565b601160209081526000928352604080842090915290825290205481565b600c5481565b600a60209081526000928352604080842090915290825290205481565b60025481565b336000908152600a60209081526040808320600160a060020a03861684529091528120548083111561130557336000908152600a60209081526040808320600160a060020a038816845290915281205561133a565b611315818463ffffffff6118c316565b336000908152600a60209081526040808320600160a060020a03891684529091529020555b336000818152600a60209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a03811660009081526008602052604081206113c290436117c7565b92915050565b6000600160a060020a0384163014156113e057600080fd5b610c2b84846112b0565b600e6020526000908152604090205460ff1681565b60106020526000908152604090205481565b61141b82826114ac565b505050565b600754600160a060020a031681565b6005805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156109035780601f106108d857610100808354040283529160200191610903565b60006113c26009836117c7565b60005481565b600f54600160a060020a031681565b336000908152600e602052604081205460ff1615156114ce576114ce33610e30565b600160a060020a0383166000908152601060205260409020541561159457600f54604080517f3af32abf0000000000000000000000000000000000000000000000000000000081523360048201529051600160a060020a0390921691633af32abf916024808201926020929091908290030181600087803b15801561155257600080fd5b505af1158015611566573d6000803e3d6000fd5b505050506040513d602081101561157c57600080fd5b5051151561158957600080fd5b6115943384846118d5565b610cb28383611906565b60125481565b6115af606482611411565b50565b336000908152600a60209081526040808320600160a060020a03861684529091528120546115e6908363ffffffff6117dd16565b336000818152600a60209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a039182166000908152600a6020908152604080832093909416825291909152205490565b60015481565b600d54600160a060020a031681565b600080611697856113a0565b91506116a2846113a0565b600754909150600160a060020a03161561176857600754604080517fad076994000000000000000000000000000000000000000000000000000000008152600160a060020a0388811660048301528781166024830152604482018790529151919092169163ad0769949160648083019260209291908290030181600087803b15801561172d57600080fd5b505af1158015611741573d6000803e3d6000fd5b505050506040513d602081101561175757600080fd5b505192506000831161176857600080fd5b600160a060020a038516600090815260086020526040902061179490610f4e848663ffffffff6118c316565b600160a060020a03841660009081526008602052604090206117c090610f4e838663ffffffff6117dd16565b5050505050565b6000806117d4848461195c565b95945050505050565b600082820183811015610cb257fe5b8154158061182a575081544390839061180c90600163ffffffff6118c316565b8154811061181657fe5b906000526020600020906002020160000154105b1561186c5760408051808201909152438152602080820183815284546001818101875560008781529390932093516002909102909301928355519101556118bf565b60408051808201909152438152602081018290528254839061189590600163ffffffff6118c316565b8154811061189f57fe5b600091825260209182902083516002909202019081559101516001909101555b5050565b6000828211156118cf57fe5b50900390565b600160a060020a03918216600090815260116020908152604080832095909416825293909352912080549091019055565b600061191333848461168b565b604080518381529051600160a060020a0385169133917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a350600192915050565b600080600080600086805490506000141561197d5760009450849350611b32565b8654879061199290600163ffffffff6118c316565b8154811061199c57fe5b60009182526020909120600290910201548610611a1d57865487906119c890600163ffffffff6118c316565b815481106119d257fe5b6000918252602090912060029091020154875488906119f890600163ffffffff6118c316565b81548110611a0257fe5b90600052602060002090600202016001015494509450611b32565b866000815481101515611a2c57fe5b906000526020600020906002020160000154861015611a515760009450849350611b32565b865460009350611a6890600163ffffffff6118c316565b91505b82821115611aed57611aa56002611a99611a8c86600163ffffffff6117dd16565b859063ffffffff6117dd16565b9063ffffffff611b3c16565b9050858782815481101515611ab657fe5b600091825260209091206002909102015411611ad457809250611ae8565b611ae581600163ffffffff6118c316565b91505b611a6b565b8683815481101515611afb57fe5b9060005260206000209060020201600001548784815481101515611b1b57fe5b906000526020600020906002020160010154945094505b5050509250929050565b6000808284811515611b4a57fe5b049493505050505600a165627a7a723058200c35b3552b9185625dd8cae6a8f2f04e1d1553e31977f5d734d69f343d0a045f0029", "bytecode_runtime": "0x6080604052600436106101d75763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630480e58b81146101dc57806306fdde0314610203578063095ea7b31461028d5780631274c3f3146102c55780631296830d146102da57806315420b711461034d57806316ca3b631461037d57806318160ddd146103e657806319045a25146103fb57806323b872dd146104755780632eb0236a1461049f578063313ce567146104c25780633b8e6f2e146104d75780634000aea0146104fb57806348ff5665146105645780634f0092ab146105a15780635195afa5146105b957806357e871e7146105e05780635c658165146105f55780635fcce2791461061c578063661884631461063157806370a08231146106555780637272ad4914610676578063755d76b7146106df57806382fae9c1146107005780638cd98ee3146107215780638daed5281461074557806395d89b411461075a578063981b24d01461076f5780639ea0c08c14610787578063a12a6bb01461079c578063a9059cbb146107b1578063a9ec80d8146107d5578063c9ee7e02146107ea578063d73dd62314610802578063dd62ed3e14610826578063f31294a41461084d578063fc0c546a14610862575b600080fd5b3480156101e857600080fd5b506101f1610877565b60408051918252519081900360200190f35b34801561020f57600080fd5b5061021861087d565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561025257818101518382015260200161023a565b50505050905090810190601f16801561027f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561029957600080fd5b506102b1600160a060020a036004351660243561090b565b604080519115158252519081900360200190f35b3480156102d157600080fd5b506101f1610971565b3480156102e657600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526102b194369492936024939284019190819084018382808284375094975050508335600160a060020a0316945050506020820135916040810135915060600135610977565b34801561035957600080fd5b506101f1600160a060020a0360043581169060243516604435606435608435610b97565b34801561038957600080fd5b50604080516020600460443581810135601f81018490048402850184019095528484526102b1948235600160a060020a0316946024803595369594606494920191908190840183828082843750949750610c099650505050505050565b3480156103f257600080fd5b506101f1610cb9565b34801561040757600080fd5b5060408051602060046024803582810135601f8101859004850286018501909652858552610459958335953695604494919390910191908190840183828082843750949750610ccb9650505050505050565b60408051600160a060020a039092168252519081900360200190f35b34801561048157600080fd5b506102b1600160a060020a0360043581169060243516604435610da0565b3480156104ab57600080fd5b506104c0600160a060020a0360043516610e30565b005b3480156104ce57600080fd5b506101f1610fd2565b3480156104e357600080fd5b506101f1600160a060020a0360043516602435610fd8565b34801561050757600080fd5b50604080516020600460443581810135601f81018490048402850184019095528484526102b1948235600160a060020a0316946024803595369594606494920191908190840183828082843750949750610ffa9650505050505050565b34801561057057600080fd5b50610588600160a060020a0360043516602435611203565b6040805192835260208301919091528051918290030190f35b3480156105ad57600080fd5b5061058860043561123e565b3480156105c557600080fd5b506101f1600160a060020a036004358116906024351661126a565b3480156105ec57600080fd5b506101f1611287565b34801561060157600080fd5b506101f1600160a060020a036004358116906024351661128d565b34801561062857600080fd5b506101f16112aa565b34801561063d57600080fd5b506102b1600160a060020a03600435166024356112b0565b34801561066157600080fd5b506101f1600160a060020a03600435166113a0565b34801561068257600080fd5b50604080516020600460443581810135601f81018490048402850184019095528484526102b1948235600160a060020a03169460248035953695946064949201919081908401838280828437509497506113c89650505050505050565b3480156106eb57600080fd5b506102b1600160a060020a03600435166113ea565b34801561070c57600080fd5b506101f1600160a060020a03600435166113ff565b34801561072d57600080fd5b506104c0600160a060020a0360043516602435611411565b34801561075157600080fd5b50610459611420565b34801561076657600080fd5b5061021861142f565b34801561077b57600080fd5b506101f160043561148a565b34801561079357600080fd5b506101f1611497565b3480156107a857600080fd5b5061045961149d565b3480156107bd57600080fd5b506102b1600160a060020a03600435166024356114ac565b3480156107e157600080fd5b506101f161159e565b3480156107f657600080fd5b506104c06004356115a4565b34801561080e57600080fd5b506102b1600160a060020a03600435166024356115b2565b34801561083257600080fd5b506101f1600160a060020a036004358116906024351661164b565b34801561085957600080fd5b506101f1611676565b34801561086e57600080fd5b5061045961167c565b60135481565b6004805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156109035780601f106108d857610100808354040283529160200191610903565b820191906000526020600020905b8154815290600101906020018083116108e657829003601f168201915b505050505081565b336000818152600a60209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b60035481565b60008080600160a060020a038716151561099057600080fd5b600b886040518082805190602001908083835b602083106109c25780518252601f1990920191602091820191016109a3565b51815160209384036101000a600019018019909216911617905292019485525060405193849003019092205460ff161591506109ff905057600080fd5b610a0c3088888888610b97565b9150610a188289610ccb565b9050600160a060020a0381161515610a2f57600080fd5b610a3a81888861168b565b610a4581338761168b565b6001600b896040518082805190602001908083835b60208310610a795780518252601f199092019160209182019101610a5a565b51815160209384036101000a6000190180199092169116179052920194855250604080519485900382018520805460ff1916961515969096179095558a84528301899052505081513392600160a060020a038b811693908616927fec5a73fd1f178be20c1bca1b406cbf4b5c20d833b66e582fc122fb4baa0fc2a4929181900390910190a486600160a060020a031681600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef886040518082815260200191505060405180910390a36040805186815290513391600160a060020a038416917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a3506001979650505050505050565b604080517f48664c160000000000000000000000000000000000000000000000000000000081526c01000000000000000000000000600160a060020a0397881681026004830152959096169094026018860152602c850192909252604c840152606c8301525190819003608c01902090565b6000600160a060020a038416301415610c2157600080fd5b610c2b84846115b2565b5083600160a060020a03168260405180828051906020019080838360005b83811015610c61578181015183820152602001610c49565b50505050905090810190601f168015610c8e5780820380516001836020036101000a031916815260200191505b509150506000604051808303816000865af19150501515610cae57600080fd5b5060015b9392505050565b6000610cc66009436117c7565b905090565b60008060008084516041141515610ce55760009350610d97565b50505060208201516040830151606084015160001a601b60ff82161015610d0a57601b015b8060ff16601b14158015610d2257508060ff16601c14155b15610d305760009350610d97565b60408051600080825260208083018085528a905260ff8516838501526060830187905260808301869052925160019360a0808501949193601f19840193928390039091019190865af1158015610d8a573d6000803e3d6000fd5b5050506020604051035193505b50505092915050565b600160a060020a0383166000908152600a60209081526040808320338452909152812054821115610dd057600080fd5b610ddb84848461168b565b82600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a35060019392505050565b600160a060020a0381166000908152600e60205260408120548190819060ff1615610e5a57600080fd5b600d54600c54604080517f3b8e6f2e000000000000000000000000000000000000000000000000000000008152600160a060020a038881166004830152602482019390935290519190921691633b8e6f2e9160448083019260209291908290030181600087803b158015610ecd57600080fd5b505af1158015610ee1573d6000803e3d6000fd5b505050506040513d6020811015610ef757600080fd5b50519250610f0560006113a0565b9150610f0f610cb9565b6000805260086020529050610f537f5eff886ea0ce6ca488a3d6e336d6c0f75f46d19b42c06ce5ee98e42c96d256c7610f4e848663ffffffff6117dd16565b6117ec565b610f5f6000858561168b565b610f746009610f4e838663ffffffff6117dd16565b600160a060020a0384166000818152600e60209081526040808320805460ff19166001179055805187815290517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a350505050565b60065481565b600160a060020a0382166000908152600860205260408120610cb290836117c7565b600061100684846114ac565b151561101157600080fd5b7f72db2339068fd324bbc28f2944e01064da539ac76064b6ce4a97a5f81de43dd6338585856040518085600160a060020a0316600160a060020a0316815260200184600160a060020a0316600160a060020a0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156110a9578181015183820152602001611091565b50505050905090810190601f1680156110d65780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a183600160a060020a031663c0ee0b8a3385856040518463ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018084600160a060020a0316600160a060020a0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561117e578181015183820152602001611166565b50505050905090810190601f1680156111ab5780820380516001836020036101000a031916815260200191505b50945050505050602060405180830381600087803b1580156111cc57600080fd5b505af11580156111e0573d6000803e3d6000fd5b505050506040513d60208110156111f657600080fd5b50511515610cb257600080fd5b60086020528160005260406000208181548110151561121e57fe5b600091825260209091206002909102018054600190910154909250905082565b600980548290811061124c57fe5b60009182526020909120600290910201805460019091015490915082565b601160209081526000928352604080842090915290825290205481565b600c5481565b600a60209081526000928352604080842090915290825290205481565b60025481565b336000908152600a60209081526040808320600160a060020a03861684529091528120548083111561130557336000908152600a60209081526040808320600160a060020a038816845290915281205561133a565b611315818463ffffffff6118c316565b336000908152600a60209081526040808320600160a060020a03891684529091529020555b336000818152600a60209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a03811660009081526008602052604081206113c290436117c7565b92915050565b6000600160a060020a0384163014156113e057600080fd5b610c2b84846112b0565b600e6020526000908152604090205460ff1681565b60106020526000908152604090205481565b61141b82826114ac565b505050565b600754600160a060020a031681565b6005805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156109035780601f106108d857610100808354040283529160200191610903565b60006113c26009836117c7565b60005481565b600f54600160a060020a031681565b336000908152600e602052604081205460ff1615156114ce576114ce33610e30565b600160a060020a0383166000908152601060205260409020541561159457600f54604080517f3af32abf0000000000000000000000000000000000000000000000000000000081523360048201529051600160a060020a0390921691633af32abf916024808201926020929091908290030181600087803b15801561155257600080fd5b505af1158015611566573d6000803e3d6000fd5b505050506040513d602081101561157c57600080fd5b5051151561158957600080fd5b6115943384846118d5565b610cb28383611906565b60125481565b6115af606482611411565b50565b336000908152600a60209081526040808320600160a060020a03861684529091528120546115e6908363ffffffff6117dd16565b336000818152600a60209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a039182166000908152600a6020908152604080832093909416825291909152205490565b60015481565b600d54600160a060020a031681565b600080611697856113a0565b91506116a2846113a0565b600754909150600160a060020a03161561176857600754604080517fad076994000000000000000000000000000000000000000000000000000000008152600160a060020a0388811660048301528781166024830152604482018790529151919092169163ad0769949160648083019260209291908290030181600087803b15801561172d57600080fd5b505af1158015611741573d6000803e3d6000fd5b505050506040513d602081101561175757600080fd5b505192506000831161176857600080fd5b600160a060020a038516600090815260086020526040902061179490610f4e848663ffffffff6118c316565b600160a060020a03841660009081526008602052604090206117c090610f4e838663ffffffff6117dd16565b5050505050565b6000806117d4848461195c565b95945050505050565b600082820183811015610cb257fe5b8154158061182a575081544390839061180c90600163ffffffff6118c316565b8154811061181657fe5b906000526020600020906002020160000154105b1561186c5760408051808201909152438152602080820183815284546001818101875560008781529390932093516002909102909301928355519101556118bf565b60408051808201909152438152602081018290528254839061189590600163ffffffff6118c316565b8154811061189f57fe5b600091825260209182902083516002909202019081559101516001909101555b5050565b6000828211156118cf57fe5b50900390565b600160a060020a03918216600090815260116020908152604080832095909416825293909352912080549091019055565b600061191333848461168b565b604080518381529051600160a060020a0385169133917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a350600192915050565b600080600080600086805490506000141561197d5760009450849350611b32565b8654879061199290600163ffffffff6118c316565b8154811061199c57fe5b60009182526020909120600290910201548610611a1d57865487906119c890600163ffffffff6118c316565b815481106119d257fe5b6000918252602090912060029091020154875488906119f890600163ffffffff6118c316565b81548110611a0257fe5b90600052602060002090600202016001015494509450611b32565b866000815481101515611a2c57fe5b906000526020600020906002020160000154861015611a515760009450849350611b32565b865460009350611a6890600163ffffffff6118c316565b91505b82821115611aed57611aa56002611a99611a8c86600163ffffffff6117dd16565b859063ffffffff6117dd16565b9063ffffffff611b3c16565b9050858782815481101515611ab657fe5b600091825260209091206002909102015411611ad457809250611ae8565b611ae581600163ffffffff6118c316565b91505b611a6b565b8683815481101515611afb57fe5b9060005260206000209060020201600001548784815481101515611b1b57fe5b906000526020600020906002020160010154945094505b5050509250929050565b6000808284811515611b4a57fe5b049493505050505600a165627a7a723058200c35b3552b9185625dd8cae6a8f2f04e1d1553e31977f5d734d69f343d0a045f0029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": true, "inputs": [], "name": "maximumSupply", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "name", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "approve", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "announcementHash", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_signature", "type": "bytes"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}, {"name": "_fee", "type": "uint256"}, {"name": "_nonce", "type": "uint256"}], "name": "transferPreSigned", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_token", "type": "address"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}, {"name": "_fee", "type": "uint256"}, {"name": "_nonce", "type": "uint256"}], "name": "transferPreSignedHashing", "outputs": [{"name": "", "type": "bytes32"}], "payable": false, "stateMutability": "pure", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "addedValue", "type": "uint256"}, {"name": "data", "type": "bytes"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "tokenCount", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "hash", "type": "bytes32"}, {"name": "sig", "type": "bytes"}], "name": "recover", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "pure", "type": "function"}, {"constant": false, "inputs": [{"name": "from", "type": "address"}, {"name": "to", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "investor", "type": "address"}], "name": "importInvestor", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "decimals", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "owner", "type": "address"}, {"name": "blockNumber", "type": "uint256"}], "name": "balanceAt", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "receiver", "type": "address"}, {"name": "amount", "type": "uint256"}, {"name": "data", "type": "bytes"}], "name": "transferAndCall", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}, {"name": "", "type": "uint256"}], "name": "tokenBalances", "outputs": [{"name": "blockNumber", "type": "uint256"}, {"name": "value", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "uint256"}], "name": "tokensTotal", "outputs": [{"name": "blockNumber", "type": "uint256"}, {"name": "value", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}, {"name": "", "type": "address"}], "name": "used", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "blockNumber", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}, {"name": "", "type": "address"}], "name": "allowed", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "announcementType", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "subtractedValue", "type": "uint256"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "owner", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "subtractedValue", "type": "uint256"}, {"name": "data", "type": "bytes"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "balanceImported", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "options", "outputs": [{"name": "", "type": "bytes32"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "to", "type": "address"}, {"name": "amount", "type": "uint256"}], "name": "transferInvestorTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "transferVerifier", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "symbol", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "blockNumber", "type": "uint256"}], "name": "totalSupplyAt", "outputs": [{"name": "tokenCount", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "announcementName", "outputs": [{"name": "", "type": "bytes32"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "KYC", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "optionsTotal", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "amount", "type": "uint256"}], "name": "act", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "addedValue", "type": "uint256"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "owner", "type": "address"}, {"name": "spender", "type": "address"}], "name": "allowance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "announcementURI", "outputs": [{"name": "", "type": "bytes32"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "token", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [{"name": "_token", "type": "address"}, {"name": "_KYC", "type": "address"}, {"name": "name", "type": "bytes32"}, {"name": "URI", "type": "bytes32"}, {"name": "_type", "type": "uint256"}, {"name": "_hash", "type": "uint256"}, {"name": "_blockNumber", "type": "uint256"}, {"name": "_options", "type": "bytes32[]"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "option", "type": "address"}, {"indexed": false, "name": "description", "type": "bytes32"}], "name": "OptionAdded", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "token", "type": "address"}, {"indexed": false, "name": "KYC", "type": "address"}, {"indexed": false, "name": "blockNumber", "type": "uint256"}, {"indexed": false, "name": "maximumSupply", "type": "uint256"}], "name": "IICCreated", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": true, "name": "delegate", "type": "address"}, {"indexed": false, "name": "amount", "type": "uint256"}, {"indexed": false, "name": "fee", "type": "uint256"}], "name": "TransferPreSigned", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "from", "type": "address"}, {"indexed": false, "name": "hash", "type": "bytes32"}], "name": "Debug", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "from", "type": "address"}, {"indexed": false, "name": "receiver", "type": "address"}, {"indexed": false, "name": "amount", "type": "uint256"}, {"indexed": false, "name": "data", "type": "bytes"}], "name": "ERC677Transfer", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}, {"indexed": true, "name": "spender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "devdoc": {"methods": {"allowance(address,address)": {"details": "Function to check the amount of tokens that an owner allowed to a spender.", "params": {"owner": "address The address which owns the funds.", "spender": "address The address which will spend the funds."}, "return": "A uint256 specifying the amount of tokens still available for the spender."}, "approve(address,uint256)": {"details": "Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729", "params": {"spender": "The address which will spend the funds.", "value": "The amount of tokens to be spent."}, "return": "true if the call function was executed successfully"}, "balanceAt(address,uint256)": {"details": "Gets the balance of the specified address.", "params": {"blockNumber": "The block number we want to query for the balance.", "owner": "The address to query the the balance of."}, "return": "An uint256 representing the amount owned by the passed address."}, "balanceOf(address)": {"details": "Gets the balance of the specified address.", "params": {"owner": "The address to query the the balance of."}, "return": "An uint256 representing the amount owned by the passed address."}, "decreaseApproval(address,uint256)": {"details": "Decrease the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[spender] == 0. To decrement allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"spender": "The address which will spend the funds.", "subtractedValue": "The amount of tokens to decrease the allowance by."}}, "decreaseApproval(address,uint256,bytes)": {"details": "Addition to StandardToken methods. Decrease the amount of tokens that an owner allowed to a spender and execute a call with the sent data. * This is originally from OpenZeppelin. * approve should be called when allowed[spender] == 0. To decrement allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"data": "ABI-encoded contract call to call `spender` address.", "spender": "The address which will spend the funds.", "subtractedValue": "The amount of tokens to decrease the allowance by."}}, "increaseApproval(address,uint256)": {"details": "Increase the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[spender] == 0. To increment allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"addedValue": "The amount of tokens to increase the allowance by.", "spender": "The address which will spend the funds."}}, "increaseApproval(address,uint256,bytes)": {"details": "Addition to StandardToken methods. Increase the amount of tokens that an owner allowed to a spender and execute a call with the sent data. * This is originally from OpenZeppelin. * approve should be called when allowed[spender] == 0. To increment allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"addedValue": "The amount of tokens to increase the allowance by.", "data": "ABI-encoded contract call to call `spender` address.", "spender": "The address which will spend the funds."}}, "recover(bytes32,bytes)": {"params": {"hash": "bytes32 message, the hash is the signed message. What is recovered is the signer address.", "sig": "bytes signature, the signature is generated using web3.eth.sign()"}}, "totalSupply()": {"details": "total number of tokens in existence", "return": "A uint256 specifying the total number of tokens in existence"}, "totalSupplyAt(uint256)": {"details": "total number of tokens in existence at the given block", "params": {"blockNumber": "The block number we want to query for the total supply"}, "return": "A uint256 specifying the total number of tokens at a given block"}, "transferFrom(address,address,uint256)": {"details": "Transfer tokens from one address to another", "params": {"from": "address The address which you want to send tokens from", "to": "address The address which you want to transfer to", "value": "uint256 the amount of tokens to be transferred"}, "return": "true if the call function was executed successfully"}, "transferPreSigned(bytes,address,uint256,uint256,uint256)": {"params": {"_fee": "uint256 The amount of tokens paid to msg.sender, by the person who used to own the tokens.", "_nonce": "uint256 Presigned transaction number", "_signature": "bytes The signature, issued by the owner.", "_to": "address The address which you want to transfer to.", "_value": "uint256 The amount of tokens to be transferred."}}, "transferPreSignedHashing(address,address,uint256,uint256,uint256)": {"params": {"_fee": "uint256 The amount of tokens paid to msg.sender, by the owner.", "_nonce": "uint256 Presigned transaction number.", "_to": "address The address which you want to transfer to.", "_token": "address The address of the token.", "_value": "uint256 The amount of tokens to be transferred."}}}}, "userdoc": {"methods": {"recover(bytes32,bytes)": {"notice": "Recover signer address from a message by using his signature. Signature is delivered as a byte array, hence need for this implementation."}, "transferPreSigned(bytes,address,uint256,uint256,uint256)": {"notice": "Submit a presigned transfer"}, "transferPreSignedHashing(address,address,uint256,uint256,uint256)": {"notice": "Hash (keccak256) of the payload used by transferPreSigned"}}}}, "settings": {"compilationTarget": {"contracts/security-token/tests/InvestorInteractionContract.sol": "InvestorInteractionContract"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/CrowdsaleToken.sol": {"keccak256": "0xa812687ac327cd19fac64667980e70d4fb72ef7f61dce477818d085cf0a915df", "urls": ["bzzr://826d9dda00ce341794e5bb05c78b1abb2728e3c631f7a542345dcfa9f3bd9c50"]}, "contracts/MintableToken.sol": {"keccak256": "0x650e1d6b2bedcd36508918357c7cf4f36fdd093cd0c4d6342f4dcd3bdcdd7578", "urls": ["bzzr://7ba2ac0480d428066a18727e2adb76ba56856ecd37b4420e801131ec8f8f4be3"]}, "contracts/Recoverable.sol": {"keccak256": "0x311a332cdd87df6e00057f5455f4e68b043b5dbe211f6d68bc64e20817515635", "urls": ["bzzr://4fd99bcfb93baed6e7c8d22ee9ecc5c8346a1aa98288e77b01333b2c5d3f582d"]}, "contracts/ReleasableToken.sol": {"keccak256": "0x2c50180d0c1eab1aa63a04da3ae87ee2c482665d2a1a42c5f05b11234a7edaf4", "urls": ["bzzr://10752c317eba5c42e2848722689cfee4fffb7bcb42f3346e1a20715d843798e8"]}, "contracts/SafeMathLib.sol": {"keccak256": "0x501bfe31e274b9a5591f7c540bdced4d4312e27d4f19599147c9bbca3d9c6b18", "urls": ["bzzr://a80935ebddb06c247d71372d4e5833ee029f08633bd0fe4a274a57009567e5b9"]}, "contracts/StandardTokenExt.sol": {"keccak256": "0x9ea2d4cec4dccd5639c05e6c23dd027d80b5e5a20abd99b280ab7b2631b5a5fc", "urls": ["bzzr://a52d8fc5a21bd83997aff19128e00dceb251df712207b61223894c8b7f42d5ff"]}, "contracts/UpgradeAgent.sol": {"keccak256": "0x88e793f72feca4a18d2cd06e6037c1413d7b963eabcf5626d60bfb9d04d6e8e6", "urls": ["bzzr://87e39a65cf25d539ab49ad7e759b3298b8a19272964e69e3f2432f0323f30025"]}, "contracts/UpgradeableToken.sol": {"keccak256": "0xa74fc300c514564ece81c86905502c2de674b69c0633b133af19c1ba027da2c9", "urls": ["bzzr://55bc0b908c94781462b8959f051c6dbb53c35641b0f8cb38d74632ad6bf95e52"]}, "contracts/security-token/CheckpointToken.sol": {"keccak256": "0x6df7f71b8c4d9edd19c9c8fbc5dadb6d03c62ad2840f3b4a1d11f558e64ab8c1", "urls": ["bzzr://cd1c4b5351981664ef90752d33c5230d61f1a15664b7f465f8e260778abb944a"]}, "contracts/security-token/ERC677.sol": {"keccak256": "0xf557f3e12aa7f5a23d40957d9ac216db0902997f70f856697529d55e9823e50a", "urls": ["bzzr://c924011b4a57d2eb355c276255fc7af284c2f5b20ece36957d23a2e058975349"]}, "contracts/security-token/ERC677Token.sol": {"keccak256": "0xd67b6b0d3c7e9def09554b11c35f3b609a87ae2ea0f5853f0ca745f7f6366866", "urls": ["bzzr://bcd0f5e4bad7064ea5d8fe4e4e8a276af4ebddc4c7c25703c2dd32ca9ff715f7"]}, "contracts/security-token/ERC865.sol": {"keccak256": "0x326ad6a9d49740439036de2eb866edeabde2e12710ad03d4a3709a41e827ea96", "urls": ["bzzr://1a82e221a8da7446b644300d00183eefe1015f4a9ecd3d2ccbfa99c6bc68f9f3"]}, "contracts/security-token/KYCInterface.sol": {"keccak256": "0x29b1037cfb17f26421589f64eb271362aa9fbfd1f975e68df8071fd98be2052c", "urls": ["bzzr://f815559e1245fd3603a1baf5f3ad7ed7d571690b35f131cb27e0fcf8246c34a4"]}, "contracts/security-token/SecurityTransferAgent.sol": {"keccak256": "0x23b8a61926435e2c583480c0de72a99b4f7ec8a4213ffc46711f83ecdeaf9186", "urls": ["bzzr://36be13b6cf1389357679705bd18969409ecde684ace2d9c5b606d8986e0231cd"]}, "contracts/security-token/tests/BogusAnnouncement.sol": {"keccak256": "0x2acace3c803b98f5aa174ddf3eb1af7dec2b67c4d6c34d1ef69fa88a2851a68b", "urls": ["bzzr://74b212027437f6f197cc0d9cd06f056e02be9595cf7b45582b41f14a080d51d3"]}, "contracts/security-token/tests/InvestorInteractionContract.sol": {"keccak256": "0x2a4149dfcef2c7a3e9327ea07cce094bb8bda4ff2f18506e8054788bedf741ff", "urls": ["bzzr://343e1ebb08208bffd6c6b0a5a41d9cbb081c1f200b534cd01e0c67d29b163543"]}, "zeppelin/contracts/math/SafeMath.sol": {"keccak256": "0x341ba8cb467a3623e819ba1a683ac1d264005186f308505214e5f6bc89446a08", "urls": ["bzzr://59b5652ee4e4a1b5a8f1a8906e14c84af43d636cf5ca0725cc1813aabe4c8c17"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}, "zeppelin/contracts/ownership/Whitelist.sol": {"keccak256": "0x0b451cac6e2d6be139bd652fcaf0d31f4abd34fadd1d078db7089eb1f5519267", "urls": ["bzzr://42126e694194a0e1b616a90422905d50a1a19242110e33abecfe2bcb820b4beb"]}, "zeppelin/contracts/token/ERC20/BasicToken.sol": {"keccak256": "0x948404468d61ff35ea4194650670408dabd65da7f905a1c16888ab84520bf39e", "urls": ["bzzr://ea75e20f95d7e4e10394fe6bfaa8eee56b4757c2a6f1e8df4180d33afa621935"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}, "zeppelin/contracts/token/ERC20/StandardToken.sol": {"keccak256": "0xd2b344a5259e19ec143074cfa65637a10c40b68395c59808c4af13bccbb2de55", "urls": ["bzzr://d61a01175a7ca1ba9f4403de603c20b897e33ec425aef2d9f8a7f9ddfdfaf5b2"]}}, "version": 1}, "name": "InvestorInteractionContract", "ordered_full_dependencies": [], "source_path": "contracts/security-token/tests/InvestorInteractionContract.sol", "source": "\n\ncontract BogusAnnouncement {\n bytes32 public announcementName;\n bytes32 public announcementURI;\n uint256 public announcementType;\n uint256 public announcementHash;\n\n function BogusAnnouncement(bytes32 _announcementName, bytes32 _announcementURI, uint256 _announcementType, uint256 _announcementHash) public {\n announcementName = _announcementName;\n announcementURI = _announcementURI;\n announcementType = _announcementType;\n announcementHash = _announcementHash;\n }\n}\n\n\ninterface KYCInterface {\n event Whitelisted(address who, uint128 nonce);\n\n function isWhitelisted(address who) external view returns(bool);\n}\n\n/**\n * This smart contract code is Copyright 2018 TokenMarket Ltd. For more information see https://tokenmarket.net\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n * NatSpec is used intentionally to cover also other than public functions\n * Solidity 0.4.18 is intentionally used: it's stable, and our framework is\n * based on that.\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n assert(c / a == b);\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n\n\n\n/**\n * @title Basic token\n * @dev Basic version of StandardToken, with no allowances.\n */\ncontract BasicToken is ERC20Basic {\n using SafeMath for uint256;\n\n mapping(address => uint256) balances;\n\n uint256 totalSupply_;\n\n /**\n * @dev total number of tokens in existence\n */\n function totalSupply() public view returns (uint256) {\n return totalSupply_;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param _to The address to transfer to.\n * @param _value The amount to be transferred.\n */\n function transfer(address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[msg.sender]);\n\n // SafeMath.sub will throw if there is not enough balance.\n balances[msg.sender] = balances[msg.sender].sub(_value);\n balances[_to] = balances[_to].add(_value);\n Transfer(msg.sender, _to, _value);\n return true;\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param _owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address _owner) public view returns (uint256 balance) {\n return balances[_owner];\n }\n\n}\n\n\n\n\n/**\n * @title Standard ERC20 token\n *\n * @dev Implementation of the basic standard token.\n * @dev https://github.com/ethereum/EIPs/issues/20\n * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol\n */\ncontract StandardToken is ERC20, BasicToken {\n\n mapping (address => mapping (address => uint256)) internal allowed;\n\n\n /**\n * @dev Transfer tokens from one address to another\n * @param _from address The address which you want to send tokens from\n * @param _to address The address which you want to transfer to\n * @param _value uint256 the amount of tokens to be transferred\n */\n function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[_from]);\n require(_value <= allowed[_from][msg.sender]);\n\n balances[_from] = balances[_from].sub(_value);\n balances[_to] = balances[_to].add(_value);\n allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);\n Transfer(_from, _to, _value);\n return true;\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n *\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param _spender The address which will spend the funds.\n * @param _value The amount of tokens to be spent.\n */\n function approve(address _spender, uint256 _value) public returns (bool) {\n allowed[msg.sender][_spender] = _value;\n Approval(msg.sender, _spender, _value);\n return true;\n }\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param _owner address The address which owns the funds.\n * @param _spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address _owner, address _spender) public view returns (uint256) {\n return allowed[_owner][_spender];\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(address _spender, uint _addedValue) public returns (bool) {\n allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {\n uint oldValue = allowed[msg.sender][_spender];\n if (_subtractedValue > oldValue) {\n allowed[msg.sender][_spender] = 0;\n } else {\n allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);\n }\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n\ncontract Recoverable is Ownable {\n\n /// @dev Empty constructor (for now)\n function Recoverable() {\n }\n\n /// @dev This will be invoked by the owner, when owner wants to rescue tokens\n /// @param token Token which will we rescue to the owner from the contract\n function recoverTokens(ERC20Basic token) onlyOwner public {\n token.transfer(owner, tokensToBeReturned(token));\n }\n\n /// @dev Interface function, can be overwritten by the superclass\n /// @param token Token which balance we will check and return\n /// @return The amount of tokens (in smallest denominator) the contract owns\n function tokensToBeReturned(ERC20Basic token) public returns (uint) {\n return token.balanceOf(this);\n }\n}\n\n\n\n/**\n * Standard EIP-20 token with an interface marker.\n *\n * @notice Interface marker is used by crowdsale contracts to validate that addresses point a good token contract.\n *\n */\ncontract StandardTokenExt is StandardToken, Recoverable {\n\n /* Interface declaration */\n function isToken() public constant returns (bool weAre) {\n return true;\n }\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Upgrade agent interface inspired by Lunyr.\n *\n * Upgrade agent transfers tokens to a new contract.\n * Upgrade agent itself can be the token contract, or just a middle man contract doing the heavy lifting.\n */\ncontract UpgradeAgent {\n\n uint public originalSupply;\n\n /** Interface marker */\n function isUpgradeAgent() public constant returns (bool) {\n return true;\n }\n\n function upgradeFrom(address _from, uint256 _value) public;\n\n}\n\n\n/**\n * A token upgrade mechanism where users can opt-in amount of tokens to the next smart contract revision.\n *\n * First envisioned by Golem and Lunyr projects.\n */\ncontract UpgradeableToken is StandardTokenExt {\n\n /** Contract / person who can set the upgrade path. This can be the same as team multisig wallet, as what it is with its default value. */\n address public upgradeMaster;\n\n /** The next contract where the tokens will be migrated. */\n UpgradeAgent public upgradeAgent;\n\n /** How many tokens we have upgraded by now. */\n uint256 public totalUpgraded;\n\n /**\n * Upgrade states.\n *\n * - NotAllowed: The child contract has not reached a condition where the upgrade can bgun\n * - WaitingForAgent: Token allows upgrade, but we don't have a new agent yet\n * - ReadyToUpgrade: The agent is set, but not a single token has been upgraded yet\n * - Upgrading: Upgrade agent is set and the balance holders can upgrade their tokens\n *\n */\n enum UpgradeState {Unknown, NotAllowed, WaitingForAgent, ReadyToUpgrade, Upgrading}\n\n /**\n * Somebody has upgraded some of his tokens.\n */\n event Upgrade(address indexed _from, address indexed _to, uint256 _value);\n\n /**\n * New upgrade agent available.\n */\n event UpgradeAgentSet(address agent);\n\n /**\n * Do not allow construction without upgrade master set.\n */\n function UpgradeableToken(address _upgradeMaster) {\n upgradeMaster = _upgradeMaster;\n }\n\n /**\n * Allow the token holder to upgrade some of their tokens to a new contract.\n */\n function upgrade(uint256 value) public {\n\n UpgradeState state = getUpgradeState();\n if(!(state == UpgradeState.ReadyToUpgrade || state == UpgradeState.Upgrading)) {\n // Called in a bad state\n throw;\n }\n\n // Validate input value.\n if (value == 0) throw;\n\n balances[msg.sender] = balances[msg.sender].sub(value);\n\n // Take tokens out from circulation\n totalSupply_ = totalSupply_.sub(value);\n totalUpgraded = totalUpgraded.add(value);\n\n // Upgrade agent reissues the tokens\n upgradeAgent.upgradeFrom(msg.sender, value);\n Upgrade(msg.sender, upgradeAgent, value);\n }\n\n /**\n * Set an upgrade agent that handles\n */\n function setUpgradeAgent(address agent) external {\n\n if(!canUpgrade()) {\n // The token is not yet in a state that we could think upgrading\n throw;\n }\n\n if (agent == 0x0) throw;\n // Only a master can designate the next agent\n if (msg.sender != upgradeMaster) throw;\n // Upgrade has already begun for an agent\n if (getUpgradeState() == UpgradeState.Upgrading) throw;\n\n upgradeAgent = UpgradeAgent(agent);\n\n // Bad interface\n if(!upgradeAgent.isUpgradeAgent()) throw;\n // Make sure that token supplies match in source and target\n if (upgradeAgent.originalSupply() != totalSupply_) throw;\n\n UpgradeAgentSet(upgradeAgent);\n }\n\n /**\n * Get the state of the token upgrade.\n */\n function getUpgradeState() public constant returns(UpgradeState) {\n if(!canUpgrade()) return UpgradeState.NotAllowed;\n else if(address(upgradeAgent) == 0x00) return UpgradeState.WaitingForAgent;\n else if(totalUpgraded == 0) return UpgradeState.ReadyToUpgrade;\n else return UpgradeState.Upgrading;\n }\n\n /**\n * Change the upgrade master.\n *\n * This allows us to set a new owner for the upgrade mechanism.\n */\n function setUpgradeMaster(address master) public {\n if (master == 0x0) throw;\n if (msg.sender != upgradeMaster) throw;\n upgradeMaster = master;\n }\n\n /**\n * Child contract can enable to provide the condition when the upgrade can begun.\n */\n function canUpgrade() public constant returns(bool) {\n return true;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n/**\n * Define interface for releasing the token transfer after a successful crowdsale.\n */\ncontract ReleasableToken is StandardTokenExt {\n\n /* The finalizer contract that allows unlift the transfer limits on this token */\n address public releaseAgent;\n\n /** A crowdsale contract can release us to the wild if ICO success. If false we are are in transfer lock up period.*/\n bool public released = false;\n\n /** Map of agents that are allowed to transfer tokens regardless of the lock down period. These are crowdsale contracts and possible the team multisig itself. */\n mapping (address => bool) public transferAgents;\n\n /**\n * Limit token transfer until the crowdsale is over.\n *\n */\n modifier canTransfer(address _sender) {\n\n if(!released) {\n if(!transferAgents[_sender]) {\n throw;\n }\n }\n\n _;\n }\n\n /**\n * Set the contract that can call release and make the token transferable.\n *\n * Design choice. Allow reset the release agent to fix fat finger mistakes.\n */\n function setReleaseAgent(address addr) onlyOwner inReleaseState(false) public {\n\n // We don't do interface check here as we might want to a normal wallet address to act as a release agent\n releaseAgent = addr;\n }\n\n /**\n * Owner can allow a particular address (a crowdsale contract) to transfer tokens despite the lock up period.\n */\n function setTransferAgent(address addr, bool state) onlyOwner inReleaseState(false) public {\n transferAgents[addr] = state;\n }\n\n /**\n * One way function to release the tokens to the wild.\n *\n * Can be called only from the release agent that is the final ICO contract. It is only called if the crowdsale has been success (first milestone reached).\n */\n function releaseTokenTransfer() public onlyReleaseAgent {\n released = true;\n }\n\n /** The function can be called only before or after the tokens have been releasesd */\n modifier inReleaseState(bool releaseState) {\n if(releaseState != released) {\n throw;\n }\n _;\n }\n\n /** The function can be called only by a whitelisted release agent. */\n modifier onlyReleaseAgent() {\n if(msg.sender != releaseAgent) {\n throw;\n }\n _;\n }\n\n function transfer(address _to, uint _value) canTransfer(msg.sender) returns (bool success) {\n // Call StandardToken.transfer()\n return super.transfer(_to, _value);\n }\n\n function transferFrom(address _from, address _to, uint _value) canTransfer(_from) returns (bool success) {\n // Call StandardToken.transferForm()\n return super.transferFrom(_from, _to, _value);\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Safe unsigned safe math.\n *\n * https://blog.aragon.one/library-driven-development-in-solidity-2bebcaf88736#.750gwtwli\n *\n * Originally from https://raw.githubusercontent.com/AragonOne/zeppelin-solidity/master/contracts/SafeMathLib.sol\n *\n * Maintained here until merged to mainline zeppelin-solidity.\n *\n */\nlibrary SafeMathLib {\n\n function times(uint a, uint b) returns (uint) {\n uint c = a * b;\n assert(a == 0 || c / a == b);\n return c;\n }\n\n function minus(uint a, uint b) returns (uint) {\n assert(b <= a);\n return a - b;\n }\n\n function plus(uint a, uint b) returns (uint) {\n uint c = a + b;\n assert(c>=a);\n return c;\n }\n\n}\n\n\n\n/**\n * A token that can increase its supply by another contract.\n *\n * This allows uncapped crowdsale by dynamically increasing the supply when money pours in.\n * Only mint agents, contracts whitelisted by owner, can mint new tokens.\n *\n */\ncontract MintableToken is StandardTokenExt {\n\n using SafeMathLib for uint;\n\n bool public mintingFinished = false;\n\n /** List of agents that are allowed to create new tokens */\n mapping (address => bool) public mintAgents;\n\n event MintingAgentChanged(address addr, bool state);\n event Minted(address receiver, uint amount);\n\n /**\n * Create new tokens and allocate them to an address..\n *\n * Only callably by a crowdsale contract (mint agent).\n */\n function mint(address receiver, uint amount) onlyMintAgent canMint public {\n totalSupply_ = totalSupply_.plus(amount);\n balances[receiver] = balances[receiver].plus(amount);\n\n // This will make the mint transaction apper in EtherScan.io\n // We can remove this after there is a standardized minting event\n Transfer(0, receiver, amount);\n }\n\n /**\n * Owner can allow a crowdsale contract to mint new tokens.\n */\n function setMintAgent(address addr, bool state) onlyOwner canMint public {\n mintAgents[addr] = state;\n MintingAgentChanged(addr, state);\n }\n\n modifier onlyMintAgent() {\n // Only crowdsale contracts are allowed to mint new tokens\n if(!mintAgents[msg.sender]) {\n throw;\n }\n _;\n }\n\n /** Make sure we are not done yet. */\n modifier canMint() {\n if(mintingFinished) throw;\n _;\n }\n}\n\n\n\n/**\n * A crowdsaled token.\n *\n * An ERC-20 token designed specifically for crowdsales with investor protection and further development path.\n *\n * - The token transfer() is disabled until the crowdsale is over\n * - The token contract gives an opt-in upgrade path to a new contract\n * - The same token can be part of several crowdsales through approve() mechanism\n * - The token can be capped (supply set in the constructor) or uncapped (crowdsale contract can mint new tokens)\n *\n */\ncontract CrowdsaleToken is ReleasableToken, MintableToken, UpgradeableToken {\n\n /** Name and symbol were updated. */\n event UpdatedTokenInformation(string newName, string newSymbol);\n\n string public name;\n\n string public symbol;\n\n uint public decimals;\n\n /**\n * Construct the token.\n *\n * This token must be created through a team multisig wallet, so that it is owned by that wallet.\n *\n * @param _name Token name\n * @param _symbol Token symbol - should be all caps\n * @param _initialSupply How many tokens we start with\n * @param _decimals Number of decimal places\n * @param _mintable Are new tokens created over the crowdsale or do we distribute only the initial supply? Note that when the token becomes transferable the minting always ends.\n */\n function CrowdsaleToken(string _name, string _symbol, uint _initialSupply, uint _decimals, bool _mintable)\n UpgradeableToken(msg.sender) {\n\n // Create any address, can be transferred\n // to team multisig via changeOwner(),\n // also remember to call setUpgradeMaster()\n owner = msg.sender;\n\n name = _name;\n symbol = _symbol;\n\n totalSupply_ = _initialSupply;\n\n decimals = _decimals;\n\n // Create initially all balance on the team multisig\n balances[owner] = totalSupply_;\n\n if(totalSupply_ > 0) {\n Minted(owner, totalSupply_);\n }\n\n // No more new supply allowed after the token creation\n if(!_mintable) {\n mintingFinished = true;\n if(totalSupply_ == 0) {\n throw; // Cannot create a token without supply and no minting\n }\n }\n }\n\n /**\n * When token is released to be transferable, enforce no new tokens can be created.\n */\n function releaseTokenTransfer() public onlyReleaseAgent {\n mintingFinished = true;\n super.releaseTokenTransfer();\n }\n\n /**\n * Allow upgrade agent functionality kick in only if the crowdsale was success.\n */\n function canUpgrade() public constant returns(bool) {\n return released && super.canUpgrade();\n }\n\n /**\n * Owner can update token information here.\n *\n * It is often useful to conceal the actual token association, until\n * the token operations, like central issuance or reissuance have been completed.\n *\n * This function allows the token owner to rename the token after the operations\n * have been completed and then point the audience to use the token contract.\n */\n function setTokenInformation(string _name, string _symbol) onlyOwner {\n name = _name;\n symbol = _symbol;\n\n UpdatedTokenInformation(name, symbol);\n }\n\n}\n\n\ninterface SecurityTransferAgent {\n function verify(address from, address to, uint256 value) public view returns (uint256 newValue);\n}\n\n\n\n\n\n\n\n/**\n * @title Whitelist\n * @dev The Whitelist contract has a whitelist of addresses, and provides basic authorization control functions.\n * @dev This simplifies the implementation of \"user permissions\".\n */\ncontract Whitelist is Ownable {\n mapping(address => bool) public whitelist;\n \n event WhitelistedAddressAdded(address addr);\n event WhitelistedAddressRemoved(address addr);\n\n /**\n * @dev Throws if called by any account that's not whitelisted.\n */\n modifier onlyWhitelisted() {\n require(whitelist[msg.sender]);\n _;\n }\n\n /**\n * @dev add an address to the whitelist\n * @param addr address\n * @return true if the address was added to the whitelist, false if the address was already in the whitelist \n */\n function addAddressToWhitelist(address addr) onlyOwner public returns(bool success) {\n if (!whitelist[addr]) {\n whitelist[addr] = true;\n WhitelistedAddressAdded(addr);\n success = true; \n }\n }\n\n /**\n * @dev add addresses to the whitelist\n * @param addrs addresses\n * @return true if at least one address was added to the whitelist, \n * false if all addresses were already in the whitelist \n */\n function addAddressesToWhitelist(address[] addrs) onlyOwner public returns(bool success) {\n for (uint256 i = 0; i < addrs.length; i++) {\n if (addAddressToWhitelist(addrs[i])) {\n success = true;\n }\n }\n }\n\n /**\n * @dev remove an address from the whitelist\n * @param addr address\n * @return true if the address was removed from the whitelist, \n * false if the address wasn't in the whitelist in the first place \n */\n function removeAddressFromWhitelist(address addr) onlyOwner public returns(bool success) {\n if (whitelist[addr]) {\n whitelist[addr] = false;\n WhitelistedAddressRemoved(addr);\n success = true;\n }\n }\n\n /**\n * @dev remove addresses from the whitelist\n * @param addrs addresses\n * @return true if at least one address was removed from the whitelist, \n * false if all addresses weren't in the whitelist in the first place\n */\n function removeAddressesFromWhitelist(address[] addrs) onlyOwner public returns(bool success) {\n for (uint256 i = 0; i < addrs.length; i++) {\n if (removeAddressFromWhitelist(addrs[i])) {\n success = true;\n }\n }\n }\n\n}\n\n\n\n\n\ninterface ERC677Receiver {\n function tokenFallback(address from, uint256 amount, bytes data) returns (bool success);\n}\n\ninterface ERC677 {\n\n // TODO: Have a different event name to make sure that tools with bad APIs do not mix this with ERC-20 Transfer() event that lacks data parameter\n event ERC677Transfer(address from, address receiver, uint256 amount, bytes data);\n\n function transferAndCall(ERC677Receiver receiver, uint amount, bytes data) returns (bool success);\n}\n\n\n\ncontract ERC677Token is ERC20, ERC677 {\n function transferAndCall(ERC677Receiver receiver, uint amount, bytes data) returns (bool success) {\n require(transfer(address(receiver), amount));\n\n ERC677Transfer(msg.sender, address(receiver), amount, data);\n\n require(receiver.tokenFallback(msg.sender, amount, data));\n }\n}\n\n\n/**\n * @author TokenMarket / Ville Sundell \n */\ncontract CheckpointToken is ERC677Token {\n using SafeMath for uint256; // We use only uint256 for safety reasons (no boxing)\n\n /// @dev Name of the token, usually the company and/or series (like \"TokenMeerkat Ltd. Series A\"):\n string public name;\n /// @dev Ticker symbol, usually bases on the \"name\" above (like \"MEER\"):\n string public symbol;\n /// @dev Decimals are usually set to 18 for EIP-20 tokens:\n uint256 public decimals;\n /// @dev If transferVerifier is set, that contract will be queried upon every token transaction:\n SecurityTransferAgent public transferVerifier;\n\n /// @dev Checkpoint is the fundamental unit for our internal accounting\n /// (who owns what, and at what moment in time)\n struct Checkpoint {\n uint256 blockNumber;\n uint256 value;\n }\n /// @dev This mapping contains checkpoints for every address:\n mapping (address => Checkpoint[]) public tokenBalances;\n /// @dev This is a one dimensional Checkpoint mapping of the overall token supply:\n Checkpoint[] public tokensTotal;\n\n /// @dev This mapping keeps account for approve() -> fransferFrom() pattern:\n mapping (address => mapping (address => uint256)) public allowed;\n\n /**\n * @dev Constructor for CheckpointToken, initializing the token\n *\n * Here we define initial values for name, symbol and decimals.\n *\n * @param _name Initial name of the token\n * @param _symbol Initial symbol of the token\n * @param _decimals Number of decimals for the token, industry standard is 18\n */\n function CheckpointToken(string _name, string _symbol, uint256 _decimals) public {\n name = _name;\n symbol = _symbol;\n decimals = _decimals;\n }\n\n /** PUBLIC FUNCTIONS\n ****************************************/\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param owner address The address which owns the funds.\n * @param spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address owner, address spender) public view returns (uint256) {\n return allowed[owner][spender];\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n *\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param spender The address which will spend the funds.\n * @param value The amount of tokens to be spent.\n * @return true if the call function was executed successfully\n */\n function approve(address spender, uint256 value) public returns (bool) {\n allowed[msg.sender][spender] = value;\n Approval(msg.sender, spender, value);\n return true;\n }\n\n /**\n * @dev Transfer tokens from one address to another\n * @param from address The address which you want to send tokens from\n * @param to address The address which you want to transfer to\n * @param value uint256 the amount of tokens to be transferred\n * @return true if the call function was executed successfully\n */\n function transferFrom(address from, address to, uint256 value) public returns (bool) {\n require(value <= allowed[from][msg.sender]);\n\n transferInternal(from, to, value);\n Transfer(from, to, value);\n return true;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param to The address to transfer to.\n * @param value The amount to be transferred.\n * @return true if the call function was executed successfully\n */\n function transfer(address to, uint256 value) public returns (bool) {\n transferInternal(msg.sender, to, value);\n Transfer(msg.sender, to, value);\n return true;\n }\n\n /**\n * @dev total number of tokens in existence\n * @return A uint256 specifying the total number of tokens in existence\n */\n function totalSupply() public view returns (uint256 tokenCount) {\n tokenCount = balanceAtBlock(tokensTotal, block.number);\n }\n\n /**\n * @dev total number of tokens in existence at the given block\n * @param blockNumber The block number we want to query for the total supply\n * @return A uint256 specifying the total number of tokens at a given block\n */\n function totalSupplyAt(uint256 blockNumber) public view returns (uint256 tokenCount) {\n tokenCount = balanceAtBlock(tokensTotal, blockNumber);\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address owner) public view returns (uint256 balance) {\n balance = balanceAtBlock(tokenBalances[owner], block.number);\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param owner The address to query the the balance of.\n * @param blockNumber The block number we want to query for the balance.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceAt(address owner, uint256 blockNumber) public view returns (uint256 balance) {\n balance = balanceAtBlock(tokenBalances[owner], blockNumber);\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param spender The address which will spend the funds.\n * @param addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(address spender, uint addedValue) public returns (bool) {\n allowed[msg.sender][spender] = allowed[msg.sender][spender].add(addedValue);\n Approval(msg.sender, spender, allowed[msg.sender][spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param spender The address which will spend the funds.\n * @param subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(address spender, uint subtractedValue) public returns (bool) {\n uint oldValue = allowed[msg.sender][spender];\n if (subtractedValue > oldValue) {\n allowed[msg.sender][spender] = 0;\n } else {\n allowed[msg.sender][spender] = oldValue.sub(subtractedValue);\n }\n Approval(msg.sender, spender, allowed[msg.sender][spender]);\n return true;\n }\n\n /**\n * @dev Addition to StandardToken methods. Increase the amount of tokens that\n * an owner allowed to a spender and execute a call with the sent data.\n *\n * This is originally from OpenZeppelin.\n *\n * approve should be called when allowed[spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param spender The address which will spend the funds.\n * @param addedValue The amount of tokens to increase the allowance by.\n * @param data ABI-encoded contract call to call `spender` address.\n */\n function increaseApproval(address spender, uint addedValue, bytes data) public returns (bool) {\n require(spender != address(this));\n\n increaseApproval(spender, addedValue);\n\n require(spender.call(data));\n\n return true;\n }\n\n /**\n * @dev Addition to StandardToken methods. Decrease the amount of tokens that\n * an owner allowed to a spender and execute a call with the sent data.\n *\n * This is originally from OpenZeppelin.\n *\n * approve should be called when allowed[spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param spender The address which will spend the funds.\n * @param subtractedValue The amount of tokens to decrease the allowance by.\n * @param data ABI-encoded contract call to call `spender` address.\n */\n function decreaseApproval(address spender, uint subtractedValue, bytes data) public returns (bool) {\n require(spender != address(this));\n\n decreaseApproval(spender, subtractedValue);\n\n require(spender.call(data));\n\n return true;\n }\n\n /** INTERNALS\n ****************************************/\n\n function balanceAtBlock(Checkpoint[] storage checkpoints, uint256 blockNumber) internal returns (uint256 balance) {\n uint256 currentBlockNumber;\n (currentBlockNumber, balance) = getCheckpoint(checkpoints, blockNumber);\n }\n\n function transferInternal(address from, address to, uint256 value) internal {\n uint256 fromBalance = balanceOf(from);\n uint256 toBalance = balanceOf(to);\n\n if (address(transferVerifier) != address(0)) {\n value = transferVerifier.verify(from, to, value);\n require(value > 0);\n }\n\n setCheckpoint(tokenBalances[from], fromBalance.sub(value));\n setCheckpoint(tokenBalances[to], toBalance.add(value));\n }\n\n\n /** CORE\n ** The Magic happens below:\n ***************************************/\n\n function setCheckpoint(Checkpoint[] storage checkpoints, uint256 newValue) internal {\n if ((checkpoints.length == 0) || (checkpoints[checkpoints.length.sub(1)].blockNumber < block.number)) {\n checkpoints.push(Checkpoint(block.number, newValue));\n } else {\n checkpoints[checkpoints.length.sub(1)] = Checkpoint(block.number, newValue);\n }\n }\n\n function getCheckpoint(Checkpoint[] storage checkpoints, uint256 blockNumber) internal returns (uint256 blockNumber_, uint256 value) {\n if (checkpoints.length == 0) {\n return (0, 0);\n }\n\n // Shortcut for the actual value\n if (blockNumber >= checkpoints[checkpoints.length.sub(1)].blockNumber) {\n return (checkpoints[checkpoints.length.sub(1)].blockNumber, checkpoints[checkpoints.length.sub(1)].value);\n }\n\n if (blockNumber < checkpoints[0].blockNumber) {\n return (0, 0);\n }\n\n // Binary search of the value in the array\n uint256 min = 0;\n uint256 max = checkpoints.length.sub(1);\n while (max > min) {\n uint256 mid = (max.add(min.add(1))).div(2);\n if (checkpoints[mid].blockNumber <= blockNumber) {\n min = mid;\n } else {\n max = mid.sub(1);\n }\n }\n\n return (checkpoints[min].blockNumber, checkpoints[min].value);\n }\n}\n\n\n\n\n/* Largely copied from https://github.com/OpenZeppelin/openzeppelin-solidity/pull/741/files */\n\ncontract ERC865 is CheckpointToken {\n /** @dev This is used to prevent nonce reuse: */\n mapping(bytes => bool) signatures;\n\n event TransferPreSigned(address indexed from, address indexed to, address indexed delegate, uint256 amount, uint256 fee);\n event Debug(address from, bytes32 hash);\n\n /**\n * @notice Submit a presigned transfer\n * @param _signature bytes The signature, issued by the owner.\n * @param _to address The address which you want to transfer to.\n * @param _value uint256 The amount of tokens to be transferred.\n * @param _fee uint256 The amount of tokens paid to msg.sender, by the person who used to own the tokens.\n * @param _nonce uint256 Presigned transaction number\n */\n function transferPreSigned(\n bytes _signature,\n address _to,\n uint256 _value,\n uint256 _fee,\n uint256 _nonce\n )\n public\n returns (bool)\n {\n require(_to != address(0));\n require(signatures[_signature] == false);\n bytes32 hashedTx = transferPreSignedHashing(address(this), _to, _value, _fee, _nonce);\n address from = recover(hashedTx, _signature);\n require(from != address(0));\n\n transferInternal(from, _to, _value);\n transferInternal(from, msg.sender, _fee);\n\n signatures[_signature] = true;\n TransferPreSigned(from, _to, msg.sender, _value, _fee);\n Transfer(from, _to, _value);\n Transfer(from, msg.sender, _fee);\n return true;\n }\n\n /**\n * @notice Hash (keccak256) of the payload used by transferPreSigned\n * @param _token address The address of the token.\n * @param _to address The address which you want to transfer to.\n * @param _value uint256 The amount of tokens to be transferred.\n * @param _fee uint256 The amount of tokens paid to msg.sender, by the owner.\n * @param _nonce uint256 Presigned transaction number.\n */\n function transferPreSignedHashing(\n address _token,\n address _to,\n uint256 _value,\n uint256 _fee,\n uint256 _nonce\n )\n public\n pure\n returns (bytes32)\n {\n /* \"48664c16\": transferPreSignedHashing(address,address,address,uint256,uint256,uint256) */\n return keccak256(bytes4(0x48664c16), _token, _to, _value, _fee, _nonce);\n }\n\n /**\n * @notice Recover signer address from a message by using his signature.\n * Signature is delivered as a byte array, hence need for this\n * implementation.\n * @param hash bytes32 message, the hash is the signed message. What is recovered is the signer address.\n * @param sig bytes signature, the signature is generated using web3.eth.sign()\n */\n function recover(bytes32 hash, bytes sig) public pure returns (address) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n\n /* Check the signature length */\n if (sig.length != 65) {\n return (address(0));\n }\n\n /* Divide the signature in r, s and v variables */\n assembly {\n r := mload(add(sig, 32))\n s := mload(add(sig, 64))\n v := byte(0, mload(add(sig, 96)))\n }\n\n /* Version of signature should be 27 or 28, but 0 and 1 are also possible versions */\n if (v < 27) {\n v += 27;\n }\n\n /* If the version is correct return the signer address */\n if (v != 27 && v != 28) {\n return (address(0));\n } else {\n return ecrecover(hash, v, r, s);\n }\n }\n\n}\n\n\n\ncontract InvestorInteractionContract is BogusAnnouncement, CheckpointToken, ERC865 {\n uint256 public blockNumber;\n CheckpointToken public token;\n mapping(address => bool) public balanceImported;\n\n KYCInterface public KYC;\n\n mapping(address => bytes32) public options;\n mapping(address => mapping(address => uint256)) public used;\n uint256 public optionsTotal;\n uint256 public maximumSupply;\n\n event OptionAdded(address option, bytes32 description);\n event IICCreated(address token, address KYC, uint256 blockNumber, uint256 maximumSupply);\n\n function InvestorInteractionContract(CheckpointToken _token, KYCInterface _KYC, bytes32 name, bytes32 URI, uint256 _type, uint256 _hash, uint256 _blockNumber, bytes32[] _options) CheckpointToken(\"\", \"\", 18) BogusAnnouncement(name, URI, _type, _hash) public {\n token = _token;\n if (_blockNumber > 0) {\n blockNumber = _blockNumber;\n } else {\n blockNumber = block.number;\n }\n KYC = _KYC;\n\n for(uint i=0; i<_options.length; i++) {\n address optionAddress = address(100 + i);\n options[optionAddress] = _options[i];\n\n OptionAdded(optionAddress, _options[i]);\n }\n\n maximumSupply = token.totalSupplyAt(blockNumber);\n\n IICCreated(_token, _KYC, _blockNumber, maximumSupply);\n }\n\n function importInvestor(address investor) public {\n // Anyone can invoke this for failsafe reasons\n\n require(balanceImported[investor] == false);\n\n uint256 value = token.balanceAt(investor, blockNumber);\n uint256 blackHoleBalance = balanceOf(address(0));\n uint256 totalSupplyNow = totalSupply();\n\n setCheckpoint(tokenBalances[address(0)], blackHoleBalance.add(value));\n transferInternal(address(0), investor, value);\n setCheckpoint(tokensTotal, totalSupplyNow.add(value));\n\n balanceImported[investor] = true;\n Transfer(address(0), investor, value);\n }\n\n function transferTrigger(address from, address to, uint256 amount) internal {\n used[to][from] += amount;\n }\n\n function transfer(address _to, uint256 _value) public returns (bool) {\n if (balanceImported[msg.sender] == false) {\n importInvestor(msg.sender);\n }\n\n if (options[_to] != 0) {\n require(KYC.isWhitelisted(msg.sender));\n transferTrigger(msg.sender, _to, _value);\n }\n\n // Doing this as msg.sender:\n return super.transfer(_to, _value);\n }\n\n function transferInvestorTokens(address to, uint256 amount) {\n transfer(to, amount);\n }\n\n function act(uint256 amount) external {\n // This is for the default action, address 100\n transferInvestorTokens(address(100), amount);\n }\n}\n"}, "Issuer": {"abi": [{"constant": true, "inputs": [], "name": "issuedCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "benefactor", "type": "address"}, {"name": "amount", "type": "uint256"}], "name": "issue", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "allower", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "issued", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "token", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [{"name": "_owner", "type": "address"}, {"name": "_allower", "type": "address"}, {"name": "_token", "type": "address"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "bytecode": "0x608060405234801561001057600080fd5b506040516060806104e78339810160409081528151602083015191909201516000805433600160a060020a0319918216178116600160a060020a0395861617825560038054821694861694909417909355600280549093169390911692909217905561046590819061008290396000f3006080604052600436106100825763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630b0f77438114610087578063867904b4146100ae5780638da5cb5b146100e1578063dd449a831461011f578063f02d7ef014610134578063f2fde38b14610176578063fc0c546a146101a4575b600080fd5b34801561009357600080fd5b5061009c6101b9565b60408051918252519081900360200190f35b3480156100ba57600080fd5b506100df73ffffffffffffffffffffffffffffffffffffffff600435166024356101bf565b005b3480156100ed57600080fd5b506100f6610308565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561012b57600080fd5b506100f6610324565b34801561014057600080fd5b5061016273ffffffffffffffffffffffffffffffffffffffff60043516610340565b604080519115158252519081900360200190f35b34801561018257600080fd5b506100df73ffffffffffffffffffffffffffffffffffffffff60043516610355565b3480156101b057600080fd5b506100f661041d565b60045481565b60005473ffffffffffffffffffffffffffffffffffffffff1633146101e357600080fd5b73ffffffffffffffffffffffffffffffffffffffff821660009081526001602052604090205460ff161561021657600080fd5b600254600354604080517f23b872dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9283166004820152858316602482015260448101859052905191909216916323b872dd9160648083019260209291908290030181600087803b15801561029d57600080fd5b505af11580156102b1573d6000803e3d6000fd5b505050506040513d60208110156102c757600080fd5b505073ffffffffffffffffffffffffffffffffffffffff9091166000908152600160208190526040909120805460ff19169091179055600480549091019055565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b60016020526000908152604090205460ff1681565b60005473ffffffffffffffffffffffffffffffffffffffff16331461037957600080fd5b73ffffffffffffffffffffffffffffffffffffffff8116151561039b57600080fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff191673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60025473ffffffffffffffffffffffffffffffffffffffff16815600a165627a7a7230582032a4153ec3bf191ebdf89b36b2d3dfeca9a67704a9b70f3cb7e066bcdf4f7ce10029", "bytecode_runtime": "0x6080604052600436106100825763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630b0f77438114610087578063867904b4146100ae5780638da5cb5b146100e1578063dd449a831461011f578063f02d7ef014610134578063f2fde38b14610176578063fc0c546a146101a4575b600080fd5b34801561009357600080fd5b5061009c6101b9565b60408051918252519081900360200190f35b3480156100ba57600080fd5b506100df73ffffffffffffffffffffffffffffffffffffffff600435166024356101bf565b005b3480156100ed57600080fd5b506100f6610308565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561012b57600080fd5b506100f6610324565b34801561014057600080fd5b5061016273ffffffffffffffffffffffffffffffffffffffff60043516610340565b604080519115158252519081900360200190f35b34801561018257600080fd5b506100df73ffffffffffffffffffffffffffffffffffffffff60043516610355565b3480156101b057600080fd5b506100f661041d565b60045481565b60005473ffffffffffffffffffffffffffffffffffffffff1633146101e357600080fd5b73ffffffffffffffffffffffffffffffffffffffff821660009081526001602052604090205460ff161561021657600080fd5b600254600354604080517f23b872dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9283166004820152858316602482015260448101859052905191909216916323b872dd9160648083019260209291908290030181600087803b15801561029d57600080fd5b505af11580156102b1573d6000803e3d6000fd5b505050506040513d60208110156102c757600080fd5b505073ffffffffffffffffffffffffffffffffffffffff9091166000908152600160208190526040909120805460ff19169091179055600480549091019055565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b60016020526000908152604090205460ff1681565b60005473ffffffffffffffffffffffffffffffffffffffff16331461037957600080fd5b73ffffffffffffffffffffffffffffffffffffffff8116151561039b57600080fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff191673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60025473ffffffffffffffffffffffffffffffffffffffff16815600a165627a7a7230582032a4153ec3bf191ebdf89b36b2d3dfeca9a67704a9b70f3cb7e066bcdf4f7ce10029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": true, "inputs": [], "name": "issuedCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "benefactor", "type": "address"}, {"name": "amount", "type": "uint256"}], "name": "issue", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "allower", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "issued", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "token", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [{"name": "_owner", "type": "address"}, {"name": "_allower", "type": "address"}, {"name": "_token", "type": "address"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "devdoc": {"methods": {"transferOwnership(address)": {"details": "Allows the current owner to transfer control of the contract to a newOwner.", "params": {"newOwner": "The address to transfer ownership to."}}}}, "userdoc": {"methods": {}}}, "settings": {"compilationTarget": {"contracts/Issuer.sol": "Issuer"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/Issuer.sol": {"keccak256": "0xb10a5f563c35e5037d0fcc11696f94176be7387b78170d3b3372782d616e4983", "urls": ["bzzr://ac4e8dadd19d713bc2ce1fac1939d79aa8b0cf100731f91d3e0f63fb86991fd7"]}, "contracts/Recoverable.sol": {"keccak256": "0x311a332cdd87df6e00057f5455f4e68b043b5dbe211f6d68bc64e20817515635", "urls": ["bzzr://4fd99bcfb93baed6e7c8d22ee9ecc5c8346a1aa98288e77b01333b2c5d3f582d"]}, "contracts/StandardTokenExt.sol": {"keccak256": "0x9ea2d4cec4dccd5639c05e6c23dd027d80b5e5a20abd99b280ab7b2631b5a5fc", "urls": ["bzzr://a52d8fc5a21bd83997aff19128e00dceb251df712207b61223894c8b7f42d5ff"]}, "zeppelin/contracts/math/SafeMath.sol": {"keccak256": "0x341ba8cb467a3623e819ba1a683ac1d264005186f308505214e5f6bc89446a08", "urls": ["bzzr://59b5652ee4e4a1b5a8f1a8906e14c84af43d636cf5ca0725cc1813aabe4c8c17"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}, "zeppelin/contracts/token/ERC20/BasicToken.sol": {"keccak256": "0x948404468d61ff35ea4194650670408dabd65da7f905a1c16888ab84520bf39e", "urls": ["bzzr://ea75e20f95d7e4e10394fe6bfaa8eee56b4757c2a6f1e8df4180d33afa621935"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}, "zeppelin/contracts/token/ERC20/StandardToken.sol": {"keccak256": "0xd2b344a5259e19ec143074cfa65637a10c40b68395c59808c4af13bccbb2de55", "urls": ["bzzr://d61a01175a7ca1ba9f4403de603c20b897e33ec425aef2d9f8a7f9ddfdfaf5b2"]}}, "version": 1}, "name": "Issuer", "ordered_full_dependencies": [], "source_path": "contracts/Issuer.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n assert(c / a == b);\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n\n\n\n/**\n * @title Basic token\n * @dev Basic version of StandardToken, with no allowances.\n */\ncontract BasicToken is ERC20Basic {\n using SafeMath for uint256;\n\n mapping(address => uint256) balances;\n\n uint256 totalSupply_;\n\n /**\n * @dev total number of tokens in existence\n */\n function totalSupply() public view returns (uint256) {\n return totalSupply_;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param _to The address to transfer to.\n * @param _value The amount to be transferred.\n */\n function transfer(address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[msg.sender]);\n\n // SafeMath.sub will throw if there is not enough balance.\n balances[msg.sender] = balances[msg.sender].sub(_value);\n balances[_to] = balances[_to].add(_value);\n Transfer(msg.sender, _to, _value);\n return true;\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param _owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address _owner) public view returns (uint256 balance) {\n return balances[_owner];\n }\n\n}\n\n\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n\n\n/**\n * @title Standard ERC20 token\n *\n * @dev Implementation of the basic standard token.\n * @dev https://github.com/ethereum/EIPs/issues/20\n * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol\n */\ncontract StandardToken is ERC20, BasicToken {\n\n mapping (address => mapping (address => uint256)) internal allowed;\n\n\n /**\n * @dev Transfer tokens from one address to another\n * @param _from address The address which you want to send tokens from\n * @param _to address The address which you want to transfer to\n * @param _value uint256 the amount of tokens to be transferred\n */\n function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[_from]);\n require(_value <= allowed[_from][msg.sender]);\n\n balances[_from] = balances[_from].sub(_value);\n balances[_to] = balances[_to].add(_value);\n allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);\n Transfer(_from, _to, _value);\n return true;\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n *\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param _spender The address which will spend the funds.\n * @param _value The amount of tokens to be spent.\n */\n function approve(address _spender, uint256 _value) public returns (bool) {\n allowed[msg.sender][_spender] = _value;\n Approval(msg.sender, _spender, _value);\n return true;\n }\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param _owner address The address which owns the funds.\n * @param _spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address _owner, address _spender) public view returns (uint256) {\n return allowed[_owner][_spender];\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(address _spender, uint _addedValue) public returns (bool) {\n allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {\n uint oldValue = allowed[msg.sender][_spender];\n if (_subtractedValue > oldValue) {\n allowed[msg.sender][_spender] = 0;\n } else {\n allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);\n }\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n\ncontract Recoverable is Ownable {\n\n /// @dev Empty constructor (for now)\n function Recoverable() {\n }\n\n /// @dev This will be invoked by the owner, when owner wants to rescue tokens\n /// @param token Token which will we rescue to the owner from the contract\n function recoverTokens(ERC20Basic token) onlyOwner public {\n token.transfer(owner, tokensToBeReturned(token));\n }\n\n /// @dev Interface function, can be overwritten by the superclass\n /// @param token Token which balance we will check and return\n /// @return The amount of tokens (in smallest denominator) the contract owns\n function tokensToBeReturned(ERC20Basic token) public returns (uint) {\n return token.balanceOf(this);\n }\n}\n\n\n\n/**\n * Standard EIP-20 token with an interface marker.\n *\n * @notice Interface marker is used by crowdsale contracts to validate that addresses point a good token contract.\n *\n */\ncontract StandardTokenExt is StandardToken, Recoverable {\n\n /* Interface declaration */\n function isToken() public constant returns (bool weAre) {\n return true;\n }\n}\n\n\n\n/**\n * Issuer manages token distribution after the crowdsale.\n *\n * This contract is fed a CSV file with Ethereum addresses and their\n * issued token balances.\n *\n * Issuer act as a gate keeper to ensure there is no double issuance\n * per address, in the case we need to do several issuance batches,\n * there is a race condition or there is a fat finger error.\n *\n * Issuer contract gets allowance from the team multisig to distribute tokens.\n *\n */\ncontract Issuer is Ownable {\n\n /** Map addresses whose tokens we have already issued. */\n mapping(address => bool) public issued;\n\n /** Centrally issued token we are distributing to our contributors */\n StandardTokenExt public token;\n\n /** Party (team multisig) who is in the control of the token pool. Note that this will be different from the owner address (scripted) that calls this contract. */\n address public allower;\n\n /** How many addresses have received their tokens. */\n uint public issuedCount;\n\n function Issuer(address _owner, address _allower, StandardTokenExt _token) {\n owner = _owner;\n allower = _allower;\n token = _token;\n }\n\n function issue(address benefactor, uint amount) onlyOwner {\n if(issued[benefactor]) throw;\n token.transferFrom(allower, benefactor, amount);\n issued[benefactor] = true;\n issuedCount += amount;\n }\n\n}\n"}, "IssuerWithId": {"abi": [{"constant": true, "inputs": [], "name": "issuedCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "uint256"}], "name": "issued", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "allower", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "benefactor", "type": "address"}, {"name": "amount", "type": "uint256"}, {"name": "id", "type": "uint256"}], "name": "issue", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "token", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [{"name": "_owner", "type": "address"}, {"name": "_allower", "type": "address"}, {"name": "_token", "type": "address"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "benefactor", "type": "address"}, {"indexed": false, "name": "amount", "type": "uint256"}, {"indexed": false, "name": "id", "type": "uint256"}], "name": "Issued", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "bytecode": "0x608060405234801561001057600080fd5b5060405160608061054683398101604090815281516020830151919092015160008054600160a060020a03191633179055600160a060020a038316151561005657600080fd5b600160a060020a038216151561006b57600080fd5b600160a060020a038116151561008057600080fd5b60008054600160a060020a03948516600160a060020a03199182161790915560038054938516938216939093179092556002805491909316911617905561047a806100cc6000396000f3006080604052600436106100825763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630b0f77438114610087578063647dfbed146100ae5780638da5cb5b146100da578063dd449a8314610118578063dfe5ef481461012d578063f2fde38b14610163578063fc0c546a14610191575b600080fd5b34801561009357600080fd5b5061009c6101a6565b60408051918252519081900360200190f35b3480156100ba57600080fd5b506100c66004356101ac565b604080519115158252519081900360200190f35b3480156100e657600080fd5b506100ef6101c1565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561012457600080fd5b506100ef6101dd565b34801561013957600080fd5b5061016173ffffffffffffffffffffffffffffffffffffffff600435166024356044356101f9565b005b34801561016f57600080fd5b5061016173ffffffffffffffffffffffffffffffffffffffff6004351661036a565b34801561019d57600080fd5b506100ef610432565b60045481565b60016020526000908152604090205460ff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff16331461021d57600080fd5b60008181526001602052604090205460ff161561023957600080fd5b600254600354604080517f23b872dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9283166004820152868316602482015260448101869052905191909216916323b872dd9160648083019260209291908290030181600087803b1580156102c057600080fd5b505af11580156102d4573d6000803e3d6000fd5b505050506040513d60208110156102ea57600080fd5b5050600081815260016020818152604092839020805460ff19169092179091556004805485019055815173ffffffffffffffffffffffffffffffffffffffff8616815290810184905280820183905290517f8269ee3da431ac4749e945c9753440ce6e9c96a9807c29e4228328cfab2722599181900360600190a1505050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461038e57600080fd5b73ffffffffffffffffffffffffffffffffffffffff811615156103b057600080fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff191673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60025473ffffffffffffffffffffffffffffffffffffffff16815600a165627a7a72305820c06114bb56be3998b65ee049ef6a9a07218443c83da04c4b768f722c0843b0700029", "bytecode_runtime": "0x6080604052600436106100825763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630b0f77438114610087578063647dfbed146100ae5780638da5cb5b146100da578063dd449a8314610118578063dfe5ef481461012d578063f2fde38b14610163578063fc0c546a14610191575b600080fd5b34801561009357600080fd5b5061009c6101a6565b60408051918252519081900360200190f35b3480156100ba57600080fd5b506100c66004356101ac565b604080519115158252519081900360200190f35b3480156100e657600080fd5b506100ef6101c1565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561012457600080fd5b506100ef6101dd565b34801561013957600080fd5b5061016173ffffffffffffffffffffffffffffffffffffffff600435166024356044356101f9565b005b34801561016f57600080fd5b5061016173ffffffffffffffffffffffffffffffffffffffff6004351661036a565b34801561019d57600080fd5b506100ef610432565b60045481565b60016020526000908152604090205460ff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff16331461021d57600080fd5b60008181526001602052604090205460ff161561023957600080fd5b600254600354604080517f23b872dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9283166004820152868316602482015260448101869052905191909216916323b872dd9160648083019260209291908290030181600087803b1580156102c057600080fd5b505af11580156102d4573d6000803e3d6000fd5b505050506040513d60208110156102ea57600080fd5b5050600081815260016020818152604092839020805460ff19169092179091556004805485019055815173ffffffffffffffffffffffffffffffffffffffff8616815290810184905280820183905290517f8269ee3da431ac4749e945c9753440ce6e9c96a9807c29e4228328cfab2722599181900360600190a1505050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461038e57600080fd5b73ffffffffffffffffffffffffffffffffffffffff811615156103b057600080fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff191673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60025473ffffffffffffffffffffffffffffffffffffffff16815600a165627a7a72305820c06114bb56be3998b65ee049ef6a9a07218443c83da04c4b768f722c0843b0700029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": true, "inputs": [], "name": "issuedCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "uint256"}], "name": "issued", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "allower", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "benefactor", "type": "address"}, {"name": "amount", "type": "uint256"}, {"name": "id", "type": "uint256"}], "name": "issue", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "token", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [{"name": "_owner", "type": "address"}, {"name": "_allower", "type": "address"}, {"name": "_token", "type": "address"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "benefactor", "type": "address"}, {"indexed": false, "name": "amount", "type": "uint256"}, {"indexed": false, "name": "id", "type": "uint256"}], "name": "Issued", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "devdoc": {"methods": {"transferOwnership(address)": {"details": "Allows the current owner to transfer control of the contract to a newOwner.", "params": {"newOwner": "The address to transfer ownership to."}}}}, "userdoc": {"methods": {}}}, "settings": {"compilationTarget": {"contracts/IssuerWithId.sol": "IssuerWithId"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/IssuerWithId.sol": {"keccak256": "0x4ff40abce06ca5bc0443461ce56d3af51732d917a85b6563bc0721bae8ef1f02", "urls": ["bzzr://16fd74efe32e22407cb37917b62eb38909f73119e7a154506fbfcb364cd20bb0"]}, "contracts/Recoverable.sol": {"keccak256": "0x311a332cdd87df6e00057f5455f4e68b043b5dbe211f6d68bc64e20817515635", "urls": ["bzzr://4fd99bcfb93baed6e7c8d22ee9ecc5c8346a1aa98288e77b01333b2c5d3f582d"]}, "contracts/StandardTokenExt.sol": {"keccak256": "0x9ea2d4cec4dccd5639c05e6c23dd027d80b5e5a20abd99b280ab7b2631b5a5fc", "urls": ["bzzr://a52d8fc5a21bd83997aff19128e00dceb251df712207b61223894c8b7f42d5ff"]}, "zeppelin/contracts/math/SafeMath.sol": {"keccak256": "0x341ba8cb467a3623e819ba1a683ac1d264005186f308505214e5f6bc89446a08", "urls": ["bzzr://59b5652ee4e4a1b5a8f1a8906e14c84af43d636cf5ca0725cc1813aabe4c8c17"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}, "zeppelin/contracts/token/ERC20/BasicToken.sol": {"keccak256": "0x948404468d61ff35ea4194650670408dabd65da7f905a1c16888ab84520bf39e", "urls": ["bzzr://ea75e20f95d7e4e10394fe6bfaa8eee56b4757c2a6f1e8df4180d33afa621935"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}, "zeppelin/contracts/token/ERC20/StandardToken.sol": {"keccak256": "0xd2b344a5259e19ec143074cfa65637a10c40b68395c59808c4af13bccbb2de55", "urls": ["bzzr://d61a01175a7ca1ba9f4403de603c20b897e33ec425aef2d9f8a7f9ddfdfaf5b2"]}}, "version": 1}, "name": "IssuerWithId", "ordered_full_dependencies": [], "source_path": "contracts/IssuerWithId.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n assert(c / a == b);\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n\n\n\n/**\n * @title Basic token\n * @dev Basic version of StandardToken, with no allowances.\n */\ncontract BasicToken is ERC20Basic {\n using SafeMath for uint256;\n\n mapping(address => uint256) balances;\n\n uint256 totalSupply_;\n\n /**\n * @dev total number of tokens in existence\n */\n function totalSupply() public view returns (uint256) {\n return totalSupply_;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param _to The address to transfer to.\n * @param _value The amount to be transferred.\n */\n function transfer(address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[msg.sender]);\n\n // SafeMath.sub will throw if there is not enough balance.\n balances[msg.sender] = balances[msg.sender].sub(_value);\n balances[_to] = balances[_to].add(_value);\n Transfer(msg.sender, _to, _value);\n return true;\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param _owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address _owner) public view returns (uint256 balance) {\n return balances[_owner];\n }\n\n}\n\n\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n\n\n/**\n * @title Standard ERC20 token\n *\n * @dev Implementation of the basic standard token.\n * @dev https://github.com/ethereum/EIPs/issues/20\n * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol\n */\ncontract StandardToken is ERC20, BasicToken {\n\n mapping (address => mapping (address => uint256)) internal allowed;\n\n\n /**\n * @dev Transfer tokens from one address to another\n * @param _from address The address which you want to send tokens from\n * @param _to address The address which you want to transfer to\n * @param _value uint256 the amount of tokens to be transferred\n */\n function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[_from]);\n require(_value <= allowed[_from][msg.sender]);\n\n balances[_from] = balances[_from].sub(_value);\n balances[_to] = balances[_to].add(_value);\n allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);\n Transfer(_from, _to, _value);\n return true;\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n *\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param _spender The address which will spend the funds.\n * @param _value The amount of tokens to be spent.\n */\n function approve(address _spender, uint256 _value) public returns (bool) {\n allowed[msg.sender][_spender] = _value;\n Approval(msg.sender, _spender, _value);\n return true;\n }\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param _owner address The address which owns the funds.\n * @param _spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address _owner, address _spender) public view returns (uint256) {\n return allowed[_owner][_spender];\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(address _spender, uint _addedValue) public returns (bool) {\n allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {\n uint oldValue = allowed[msg.sender][_spender];\n if (_subtractedValue > oldValue) {\n allowed[msg.sender][_spender] = 0;\n } else {\n allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);\n }\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n\ncontract Recoverable is Ownable {\n\n /// @dev Empty constructor (for now)\n function Recoverable() {\n }\n\n /// @dev This will be invoked by the owner, when owner wants to rescue tokens\n /// @param token Token which will we rescue to the owner from the contract\n function recoverTokens(ERC20Basic token) onlyOwner public {\n token.transfer(owner, tokensToBeReturned(token));\n }\n\n /// @dev Interface function, can be overwritten by the superclass\n /// @param token Token which balance we will check and return\n /// @return The amount of tokens (in smallest denominator) the contract owns\n function tokensToBeReturned(ERC20Basic token) public returns (uint) {\n return token.balanceOf(this);\n }\n}\n\n\n\n/**\n * Standard EIP-20 token with an interface marker.\n *\n * @notice Interface marker is used by crowdsale contracts to validate that addresses point a good token contract.\n *\n */\ncontract StandardTokenExt is StandardToken, Recoverable {\n\n /* Interface declaration */\n function isToken() public constant returns (bool weAre) {\n return true;\n }\n}\n\n\n\n/**\n * Issuer manages token distribution after the crowdsale.\n *\n * This contract is fed a CSV file with Ethereum addresses and their\n * issued token balances.\n *\n * Issuer act as a gate keeper to ensure there is no double issuance\n * per ID number, in the case we need to do several issuance batches,\n * there is a race condition or there is a fat finger error.\n *\n * Issuer contract gets allowance from the team multisig to distribute tokens.\n *\n */\ncontract IssuerWithId is Ownable {\n\n /** Map IDs whose tokens we have already issued. */\n mapping(uint => bool) public issued;\n\n /** Centrally issued token we are distributing to our contributors */\n StandardTokenExt public token;\n\n /** Party (team multisig) who is in the control of the token pool. Note that this will be different from the owner address (scripted) that calls this contract. */\n address public allower;\n\n /** How many tokens have been issued. */\n uint public issuedCount;\n\n /** Issue event **/\n event Issued(address benefactor, uint amount, uint id);\n\n function IssuerWithId(address _owner, address _allower, StandardTokenExt _token) {\n require(address(_owner) != address(0));\n require(address(_allower) != address(0));\n require(address(_token) != address(0));\n\n owner = _owner;\n allower = _allower;\n token = _token;\n }\n\n function issue(address benefactor, uint amount, uint id) onlyOwner {\n if(issued[id]) throw;\n token.transferFrom(allower, benefactor, amount);\n issued[id] = true;\n issuedCount += amount;\n\n Issued(benefactor, amount, id);\n }\n\n}\n"}, "KYCCrowdsale": {"abi": [{"constant": true, "inputs": [], "name": "ownerTestValue", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_signerAddress", "type": "address"}], "name": "setSignerAddress", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "isPricingSane", "outputs": [{"name": "sane", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "endsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "minimumFundingGoal", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getState", "outputs": [{"name": "", "type": "uint8"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setFinalizeAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "investedAmountOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "finalizeAgent", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "beneficiary", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "weiRaised", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isCrowdsale", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "finalize", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_pricingStrategy", "type": "address"}], "name": "setPricingStrategy", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "tokensSold", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "refund", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "signerAddress", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "weiRefunded", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "halt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "time", "type": "uint256"}], "name": "setEndsAt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "dataframe", "type": "bytes"}], "name": "getKYCPayload", "outputs": [{"name": "whitelistedAddress", "type": "address"}, {"name": "customerId", "type": "uint128"}, {"name": "minEth", "type": "uint32"}, {"name": "maxEth", "type": "uint32"}, {"name": "pricingInfo", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "pricingStrategy", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "loadedRefund", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isMinimumGoalReached", "outputs": [{"name": "reached", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "loadRefund", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "val", "type": "uint256"}], "name": "setOwnerTestValue", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "weisTotal", "type": "uint256"}, {"name": "pricePerToken", "type": "uint256"}], "name": "calculateTokens", "outputs": [{"name": "tokensTotal", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "multisigWallet", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "tokenAmountOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "weiAmount", "type": "uint256"}, {"name": "tokenAmount", "type": "uint256"}, {"name": "weiRaisedTotal", "type": "uint256"}, {"name": "tokensSoldTotal", "type": "uint256"}], "name": "isBreakingCap", "outputs": [{"name": "limitBroken", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isFinalizerSane", "outputs": [{"name": "sane", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "startsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "finalized", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "halted", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "earlyParticipantWhitelist", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "unhalt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "isCrowdsaleFull", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "dataframe", "type": "bytes"}, {"name": "v", "type": "uint8"}, {"name": "r", "type": "bytes32"}, {"name": "s", "type": "bytes32"}], "name": "buyWithKYCData", "outputs": [{"name": "tokenAmount", "type": "uint256"}], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "investorCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getTokensLeft", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "status", "type": "bool"}], "name": "setEarlyParicipantWhitelist", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setMultisig", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "presaleWeiRaised", "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": "_token", "type": "address"}, {"name": "_pricingStrategy", "type": "address"}, {"name": "_multisigWallet", "type": "address"}, {"name": "_start", "type": "uint256"}, {"name": "_end", "type": "uint256"}, {"name": "_minimumFundingGoal", "type": "uint256"}, {"name": "_beneficiary", "type": "address"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"payable": true, "stateMutability": "payable", "type": "fallback"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "signer", "type": "address"}], "name": "SignerChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}, {"indexed": false, "name": "tokenAmount", "type": "uint256"}, {"indexed": false, "name": "customerId", "type": "uint128"}], "name": "Invested", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}], "name": "Refund", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newRequireCustomerId", "type": "bool"}, {"indexed": false, "name": "newRequiredSignedAddress", "type": "bool"}, {"indexed": false, "name": "newSignerAddress", "type": "address"}], "name": "InvestmentPolicyChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "addr", "type": "address"}, {"indexed": false, "name": "status", "type": "bool"}], "name": "Whitelisted", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newEndsAt", "type": "uint256"}], "name": "EndsAtChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "bytecode": "0x6080604052600560015560006009556000600a556000600b556000600c556000600d556000600e553480156200003457600080fd5b5060405160e080620026c183398101604090815281516020830151918301516060840151608085015160a086015160c0909601516000805433600160a060020a0319918216811782161790915560028054909116600160a060020a038716179055939592939192909180878787878787620000b88564010000000062000150810204565b60058054600160a060020a031916600160a060020a038681169190911791829055161515620000e657600080fd5b821515620000f357600080fd5b60078390558115156200010557600080fd5b600882905560075482116200011957600080fd5b600655505060148054600160a060020a031916600160a060020a039590951694909417909355506200021d98505050505050505050565b600054600160a060020a031633146200016857600080fd5b60038054600160a060020a031916600160a060020a038381169190911791829055604080517f04bbc255000000000000000000000000000000000000000000000000000000008152905192909116916304bbc255916004808201926020929091908290030181600087803b158015620001e057600080fd5b505af1158015620001f5573d6000803e3d6000fd5b505050506040513d60208110156200020c57600080fd5b505115156200021a57600080fd5b50565b612494806200022d6000396000f3006080604052600436106102215763ffffffff60e060020a6000350416630226401d8114610226578063046dc1661461024d578063062b01ce146102705780630a09284a1461029957806313f4e977146102ae5780631865c57d146102c357806319b667da146102fc5780631aae34601461031d57806321d5c0f61461033e57806338af3eed1461036f5780634042b66f146103845780634551dd59146103995780634bb278f3146103ae57806350c67734146103c3578063518ab2a8146103e4578063590e1ae3146103f95780635b7633d01461040e5780635da89ac0146104235780635ed7ca5b146104385780636203f09f1461044d5780636e50eb3f1461046257806373752db41461047a57806378b99c2414610520578063797d9437146105355780637c2e08a31461054a578063876121021461055f5780638d51faec146105675780638da5cb5b1461057f578063903cc583146105945780639075becf146105af57806397b150ca146105c45780639d3c663f146105e5578063a7ba44c314610606578063af4686821461061b578063b3f05b9714610630578063b9b8af0b14610645578063cb16e6d01461065a578063cb3e64fd1461067b578063d5d0902114610690578063d7c7159c146106a5578063d7e64c0014610700578063de5f986614610715578063eac249321461072a578063f2fde38b14610750578063f3283fba14610771578063f7c00e2f14610792578063fc0c546a146107a7575b600080fd5b34801561023257600080fd5b5061023b6107bc565b60408051918252519081900360200190f35b34801561025957600080fd5b5061026e600160a060020a03600435166107c2565b005b34801561027c57600080fd5b50610285610840565b604080519115158252519081900360200190f35b3480156102a557600080fd5b5061023b6108d7565b3480156102ba57600080fd5b5061023b6108dd565b3480156102cf57600080fd5b506102d86108e3565b604051808260078111156102e857fe5b60ff16815260200191505060405180910390f35b34801561030857600080fd5b5061026e600160a060020a0360043516610ad1565b34801561032957600080fd5b5061023b600160a060020a0360043516610ba2565b34801561034a57600080fd5b50610353610bb4565b60408051600160a060020a039092168252519081900360200190f35b34801561037b57600080fd5b50610353610bc3565b34801561039057600080fd5b5061023b610bd2565b3480156103a557600080fd5b50610285610bd8565b3480156103ba57600080fd5b5061026e610bdd565b3480156103cf57600080fd5b5061026e600160a060020a0360043516610ce2565b3480156103f057600080fd5b5061023b610d7d565b34801561040557600080fd5b5061026e610d83565b34801561041a57600080fd5b50610353610edf565b34801561042f57600080fd5b5061023b610eee565b34801561044457600080fd5b5061026e610ef4565b34801561045957600080fd5b5061023b610f42565b34801561046e57600080fd5b5061026e600435610f48565b34801561048657600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526104d3943694929360249392840191908190840183828082843750949750610fb69650505050505050565b60408051600160a060020a0390961686526fffffffffffffffffffffffffffffffff909416602086015263ffffffff92831685850152911660608401526080830152519081900360a00190f35b34801561052c57600080fd5b506103536114d5565b34801561054157600080fd5b5061023b6114e4565b34801561055657600080fd5b506102856114ea565b61026e6114f5565b34801561057357600080fd5b5061026e6004356115c7565b34801561058b57600080fd5b506103536115e3565b3480156105a057600080fd5b5061023b6004356024356115f2565b3480156105bb57600080fd5b50610353611730565b3480156105d057600080fd5b5061023b600160a060020a036004351661173f565b3480156105f157600080fd5b50610285600435602435604435606435611751565b34801561061257600080fd5b50610285611776565b34801561062757600080fd5b5061023b6117cb565b34801561063c57600080fd5b506102856117d1565b34801561065157600080fd5b506102856117da565b34801561066657600080fd5b50610285600160a060020a03600435166117fb565b34801561068757600080fd5b5061026e611810565b34801561069c57600080fd5b50610285611870565b6040805160206004803580820135601f810184900484028501840190955284845261023b9436949293602493928401919081908401838280828437509497505050833560ff1694505050602082013591604001359050611880565b34801561070c57600080fd5b5061023b611ac3565b34801561072157600080fd5b5061023b611ac9565b34801561073657600080fd5b5061026e600160a060020a03600435166024351515611b3d565b34801561075c57600080fd5b5061026e600160a060020a0360043516611bb8565b34801561077d57600080fd5b5061026e600160a060020a0360043516611c4c565b34801561079e57600080fd5b5061023b611ca3565b3480156107b357600080fd5b50610353611ca9565b60135481565b600054600160a060020a031633146107d957600080fd5b6015805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03838116919091179182905560408051929091168252517f5719a5656c5cfdaafa148ecf366fd3b0a7fae06449ce2a46225977fb7417e29d916020908290030190a150565b600354604080517f8e7682880000000000000000000000000000000000000000000000000000000081523060048201529051600092600160a060020a031691638e76828891602480830192602092919082900301818787803b1580156108a557600080fd5b505af11580156108b9573d6000803e3d6000fd5b505050506040513d60208110156108cf57600080fd5b505190505b90565b60085481565b60065481565b600f5460009060ff16156108f9575060066108d4565b600454600160a060020a03161515610913575060016108d4565b60048054604080517f82771c8e0000000000000000000000000000000000000000000000000000000081529051600160a060020a03909216926382771c8e9282820192602092908290030181600087803b15801561097057600080fd5b505af1158015610984573d6000803e3d6000fd5b505050506040513d602081101561099a57600080fd5b505115156109aa575060016108d4565b600354604080517f8e7682880000000000000000000000000000000000000000000000000000000081523060048201529051600160a060020a0390921691638e768288916024808201926020929091908290030181600087803b158015610a1057600080fd5b505af1158015610a24573d6000803e3d6000fd5b505050506040513d6020811015610a3a57600080fd5b50511515610a4a575060016108d4565b600754421015610a5c575060026108d4565b6008544211158015610a735750610a71611870565b155b15610a80575060036108d4565b610a886114ea565b15610a95575060046108d4565b610a9d6114ea565b158015610aac57506000600a54115b8015610abc5750600a54600d5410155b15610ac9575060076108d4565b5060056108d4565b600054600160a060020a03163314610ae857600080fd5b6004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383811691909117808355604080517f614cb9040000000000000000000000000000000000000000000000000000000081529051919092169263614cb904928082019260209290918290030181600087803b158015610b6857600080fd5b505af1158015610b7c573d6000803e3d6000fd5b505050506040513d6020811015610b9257600080fd5b50511515610b9f57600080fd5b50565b60106020526000908152604090205481565b600454600160a060020a031681565b601454600160a060020a031681565b600a5481565b600190565b600480610be86108e3565b6007811115610bf357fe5b14610bfd57600080fd5b600054600160a060020a03163314610c1457600080fd5b60005474010000000000000000000000000000000000000000900460ff1615610c3c57600080fd5b600f5460ff1615610c4c57600080fd5b600454600160a060020a031615610cd25760048054604080517f0bf318a30000000000000000000000000000000000000000000000000000000081529051600160a060020a0390921692630bf318a392828201926000929082900301818387803b158015610cb957600080fd5b505af1158015610ccd573d6000803e3d6000fd5b505050505b50600f805460ff19166001179055565b600054600160a060020a03163314610cf957600080fd5b6003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038381169190911791829055604080517f04bbc255000000000000000000000000000000000000000000000000000000008152905192909116916304bbc255916004808201926020929091908290030181600087803b158015610b6857600080fd5b60095481565b6000600780610d906108e3565b6007811115610d9b57fe5b14610da557600080fd5b336000908152601060205260409020549150811515610dc357600080fd5b33600090815260106020908152604080832092909255600e5482517f66098d4f000000000000000000000000000000000000000000000000000000008152600481019190915260248101859052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b158015610e4a57600080fd5b505af4158015610e5e573d6000803e3d6000fd5b505050506040513d6020811015610e7457600080fd5b5051600e55604080513381526020810184905281517fbb28353e4598c3b9199101a66e0989549b659a59a54d2c27fbb183f1932c8e6d929181900390910190a1604051339083156108fc029084906000818181858888f193505050501515610edb57600080fd5b5050565b601554600160a060020a031681565b600e5481565b600054600160a060020a03163314610f0b57600080fd5b6000805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b60015481565b600054600160a060020a03163314610f5f57600080fd5b80421115610f6c57600080fd5b806007541115610f7b57600080fd5b60088190556040805182815290517fd34bb772c4ae9baa99db852f622773b31c7827e8ee818449fef20d30980bd3109181900360200190a150565b6000806000806000806000806000808a73__contracts/BytesDeserializer.sol:Byte__63b655e138909160006040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b83811015611039578181015183820152602001611021565b50505050905090810190601f1680156110665780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b15801561108457600080fd5b505af4158015611098573d6000803e3d6000fd5b505050506040513d60208110156110ae57600080fd5b810190808051906020019092919050505094508a73__contracts/BytesDeserializer.sol:Byte__6316419aa7909160146040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b8381101561113557818101518382015260200161111d565b50505050905090810190601f1680156111625780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b15801561118057600080fd5b505af4158015611194573d6000803e3d6000fd5b505050506040513d60208110156111aa57600080fd5b8101908080519060200190929190505050700100000000000000000000000000000000900493508a73__contracts/BytesDeserializer.sol:Byte__63d54dd8f9909160246040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b8381101561124557818101518382015260200161122d565b50505050905090810190601f1680156112725780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b15801561129057600080fd5b505af41580156112a4573d6000803e3d6000fd5b505050506040513d60208110156112ba57600080fd5b810190808051906020019092919050505060e060020a900492508a73__contracts/BytesDeserializer.sol:Byte__63d54dd8f9909160286040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b83811015611348578181015183820152602001611330565b50505050905090810190601f1680156113755780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b15801561139357600080fd5b505af41580156113a7573d6000803e3d6000fd5b505050506040513d60208110156113bd57600080fd5b810190808051906020019092919050505060e060020a900491508a73__contracts/BytesDeserializer.sol:Byte__632e1eb7fe9091602c6040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b8381101561144b578181015183820152602001611433565b50505050905090810190601f1680156114785780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b15801561149657600080fd5b505af41580156114aa573d6000803e3d6000fd5b505050506040513d60208110156114c057600080fd5b5051949b939a50919850965091945092505050565b600354600160a060020a031681565b600d5481565b600654600a54101590565b6005806115006108e3565b600781111561150b57fe5b1461151557600080fd5b34151561152157600080fd5b600d54604080517f66098d4f00000000000000000000000000000000000000000000000000000000815260048101929092523460248301525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b15801561159557600080fd5b505af41580156115a9573d6000803e3d6000fd5b505050506040513d60208110156115bf57600080fd5b5051600d5550565b600054600160a060020a031633146115de57600080fd5b601355565b600054600160a060020a031681565b600080600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561164857600080fd5b505af115801561165c573d6000803e3d6000fd5b505050506040513d602081101561167257600080fd5b5051604080517f1d3b9edf00000000000000000000000000000000000000000000000000000000815260048101879052600a9290920a602483018190529051909250849173__contracts/SafeMathLib.sol:SafeMathLi__91631d3b9edf91604480820192602092909190829003018186803b1580156116f257600080fd5b505af4158015611706573d6000803e3d6000fd5b505050506040513d602081101561171c57600080fd5b505181151561172757fe5b04949350505050565b600554600160a060020a031681565b60116020526000908152604090205481565b600061175b611ac9565b84111561176a5750600161176e565b5060005b949350505050565b6000600460009054906101000a9004600160a060020a0316600160a060020a03166382771c8e6040518163ffffffff1660e060020a028152600401602060405180830381600087803b1580156108a557600080fd5b60075481565b600f5460ff1681565b60005474010000000000000000000000000000000000000000900460ff1681565b60126020526000908152604090205460ff1681565b600054600160a060020a0316331461182757600080fd5b60005474010000000000000000000000000000000000000000900460ff16151561185057600080fd5b6000805474ff000000000000000000000000000000000000000019169055565b600061187a611ac9565b15905090565b336000908152601260205260408120548190670de0b6b3a764000090829081908190819081908190819060ff16156118c5576118be33611000611cb8565b9850611a48565b60028e6040518082805190602001908083835b602083106118f75780518252601f1990920191602091820191016118d8565b51815160209384036101000a600019018019909216911617905260405191909301945091925050808303816000865af1158015611938573d6000803e3d6000fd5b5050506040513d602081101561194d57600080fd5b5051965061195a8e610fb6565b95509550955095509550601560009054906101000a9004600160a060020a0316600160a060020a03166001888f8f8f604051600081526020016040526040518085600019166000191681526020018460ff1660ff1681526020018360001916600019168152602001826000191660001916815260200194505050505060206040516020810390808403906000865af11580156119fa573d6000803e3d6000fd5b50505060206040510351600160a060020a0316141515611a1957600080fd5b600160a060020a0386163314611a2e57600080fd5b611a3834836115f2565b9050611a45338683611e2d565b98505b3360009081526012602052604090205460ff161515611ab1573360009081526010602052604090205461271063ffffffff86168a02041115611a8957600080fd5b3360009081526010602052604090205461271063ffffffff85168a02041015611ab157600080fd5b50969c9b505050505050505050505050565b600c5481565b60025460008054604080517fdd62ed3e000000000000000000000000000000000000000000000000000000008152600160a060020a03928316600482015230602482015290519293919091169163dd62ed3e9160448082019260209290919082900301818787803b1580156108a557600080fd5b600054600160a060020a03163314611b5457600080fd5b600160a060020a038216600081815260126020908152604091829020805460ff191685151590811790915582519384529083015280517fa54714518c5d275fdcd3d2a461e4858e4e8cb04fb93cd0bca9d6d34115f264409281900390910190a15050565b600054600160a060020a03163314611bcf57600080fd5b600160a060020a0381161515611be457600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600054600160a060020a03163314611c6357600080fd5b600154600c541115611c7457600080fd5b6005805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600b5481565b600254600160a060020a031681565b6000805474010000000000000000000000000000000000000000900460ff1615611ce157600080fd5b611e268383600360009054906101000a9004600160a060020a0316600160a060020a03166318a4155e34600b54600a540360095433600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff1660e060020a028152600401602060405180830381600087803b158015611d6957600080fd5b505af1158015611d7d573d6000803e3d6000fd5b505050506040513d6020811015611d9357600080fd5b50516040805160e060020a63ffffffff8916028152600481019690965260248601949094526044850192909252600160a060020a0316606484015260848301525160a48083019260209291908290030181600087803b158015611df557600080fd5b505af1158015611e09573d6000803e3d6000fd5b505050506040513d6020811015611e1f57600080fd5b5051611e2d565b9392505050565b60008054819074010000000000000000000000000000000000000000900460ff1615611e5857600080fd5b6002611e626108e3565b6007811115611e6d57fe5b1415611e9f57600160a060020a03851660009081526012602052604090205460ff161515611e9a57600080fd5b611ebb565b6003611ea96108e3565b6007811115611eb457fe5b1415610221575b5034821515611ec957600080fd5b600160a060020a0385166000908152601060205260409020541515611ef257600c805460010190555b600160a060020a0385166000908152601060209081526040918290205482517f66098d4f000000000000000000000000000000000000000000000000000000008152600481019190915260248101849052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b158015611f7d57600080fd5b505af4158015611f91573d6000803e3d6000fd5b505050506040513d6020811015611fa757600080fd5b5051600160a060020a03861660009081526010602090815260408083209390935560118152908290205482517f66098d4f000000000000000000000000000000000000000000000000000000008152600481019190915260248101869052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561203f57600080fd5b505af4158015612053573d6000803e3d6000fd5b505050506040513d602081101561206957600080fd5b5051600160a060020a03861660009081526011602090815260409182902092909255600a5481517f66098d4f000000000000000000000000000000000000000000000000000000008152600481019190915260248101849052905173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f9260448082019391829003018186803b1580156120fb57600080fd5b505af415801561210f573d6000803e3d6000fd5b505050506040513d602081101561212557600080fd5b5051600a55600954604080517f66098d4f0000000000000000000000000000000000000000000000000000000081526004810192909252602482018590525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b15801561219f57600080fd5b505af41580156121b3573d6000803e3d6000fd5b505050506040513d60208110156121c957600080fd5b5051600955600354604080517ff14ae17d000000000000000000000000000000000000000000000000000000008152600160a060020a0388811660048301529151919092169163f14ae17d9160248083019260209291908290030181600087803b15801561223657600080fd5b505af115801561224a573d6000803e3d6000fd5b505050506040513d602081101561226057600080fd5b5051156122f557600b5473__contracts/SafeMathLib.sol:SafeMathLi__6366098d4f9091836040518363ffffffff1660e060020a028152600401808381526020018281526020019250505060206040518083038186803b1580156122c557600080fd5b505af41580156122d9573d6000803e3d6000fd5b505050506040513d60208110156122ef57600080fd5b5051600b555b6123058184600a54600954611751565b1561230f57600080fd5b61231985846123b7565b600554604051600160a060020a039091169082156108fc029083906000818181858888f19350505050151561234d57600080fd5b60408051600160a060020a0387168152602081018390528082018590526fffffffffffffffffffffffffffffffff8616606082015290517f0396f60aaad038749091d273dc13aaabc63db6e2271c7bad442d5cf25cc433509181900360800190a150909392505050565b600254601454604080517f23b872dd000000000000000000000000000000000000000000000000000000008152600160a060020a039283166004820152858316602482015260448101859052905191909216916323b872dd9160648083019260209291908290030181600087803b15801561243157600080fd5b505af1158015612445573d6000803e3d6000fd5b505050506040513d602081101561245b57600080fd5b50511515610edb57600080fd00a165627a7a72305820f450024a220fe4bf666d69f3205d2eb6ff8cbe2031500e416c2c8ebfe2ec42710029", "bytecode_runtime": "0x6080604052600436106102215763ffffffff60e060020a6000350416630226401d8114610226578063046dc1661461024d578063062b01ce146102705780630a09284a1461029957806313f4e977146102ae5780631865c57d146102c357806319b667da146102fc5780631aae34601461031d57806321d5c0f61461033e57806338af3eed1461036f5780634042b66f146103845780634551dd59146103995780634bb278f3146103ae57806350c67734146103c3578063518ab2a8146103e4578063590e1ae3146103f95780635b7633d01461040e5780635da89ac0146104235780635ed7ca5b146104385780636203f09f1461044d5780636e50eb3f1461046257806373752db41461047a57806378b99c2414610520578063797d9437146105355780637c2e08a31461054a578063876121021461055f5780638d51faec146105675780638da5cb5b1461057f578063903cc583146105945780639075becf146105af57806397b150ca146105c45780639d3c663f146105e5578063a7ba44c314610606578063af4686821461061b578063b3f05b9714610630578063b9b8af0b14610645578063cb16e6d01461065a578063cb3e64fd1461067b578063d5d0902114610690578063d7c7159c146106a5578063d7e64c0014610700578063de5f986614610715578063eac249321461072a578063f2fde38b14610750578063f3283fba14610771578063f7c00e2f14610792578063fc0c546a146107a7575b600080fd5b34801561023257600080fd5b5061023b6107bc565b60408051918252519081900360200190f35b34801561025957600080fd5b5061026e600160a060020a03600435166107c2565b005b34801561027c57600080fd5b50610285610840565b604080519115158252519081900360200190f35b3480156102a557600080fd5b5061023b6108d7565b3480156102ba57600080fd5b5061023b6108dd565b3480156102cf57600080fd5b506102d86108e3565b604051808260078111156102e857fe5b60ff16815260200191505060405180910390f35b34801561030857600080fd5b5061026e600160a060020a0360043516610ad1565b34801561032957600080fd5b5061023b600160a060020a0360043516610ba2565b34801561034a57600080fd5b50610353610bb4565b60408051600160a060020a039092168252519081900360200190f35b34801561037b57600080fd5b50610353610bc3565b34801561039057600080fd5b5061023b610bd2565b3480156103a557600080fd5b50610285610bd8565b3480156103ba57600080fd5b5061026e610bdd565b3480156103cf57600080fd5b5061026e600160a060020a0360043516610ce2565b3480156103f057600080fd5b5061023b610d7d565b34801561040557600080fd5b5061026e610d83565b34801561041a57600080fd5b50610353610edf565b34801561042f57600080fd5b5061023b610eee565b34801561044457600080fd5b5061026e610ef4565b34801561045957600080fd5b5061023b610f42565b34801561046e57600080fd5b5061026e600435610f48565b34801561048657600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526104d3943694929360249392840191908190840183828082843750949750610fb69650505050505050565b60408051600160a060020a0390961686526fffffffffffffffffffffffffffffffff909416602086015263ffffffff92831685850152911660608401526080830152519081900360a00190f35b34801561052c57600080fd5b506103536114d5565b34801561054157600080fd5b5061023b6114e4565b34801561055657600080fd5b506102856114ea565b61026e6114f5565b34801561057357600080fd5b5061026e6004356115c7565b34801561058b57600080fd5b506103536115e3565b3480156105a057600080fd5b5061023b6004356024356115f2565b3480156105bb57600080fd5b50610353611730565b3480156105d057600080fd5b5061023b600160a060020a036004351661173f565b3480156105f157600080fd5b50610285600435602435604435606435611751565b34801561061257600080fd5b50610285611776565b34801561062757600080fd5b5061023b6117cb565b34801561063c57600080fd5b506102856117d1565b34801561065157600080fd5b506102856117da565b34801561066657600080fd5b50610285600160a060020a03600435166117fb565b34801561068757600080fd5b5061026e611810565b34801561069c57600080fd5b50610285611870565b6040805160206004803580820135601f810184900484028501840190955284845261023b9436949293602493928401919081908401838280828437509497505050833560ff1694505050602082013591604001359050611880565b34801561070c57600080fd5b5061023b611ac3565b34801561072157600080fd5b5061023b611ac9565b34801561073657600080fd5b5061026e600160a060020a03600435166024351515611b3d565b34801561075c57600080fd5b5061026e600160a060020a0360043516611bb8565b34801561077d57600080fd5b5061026e600160a060020a0360043516611c4c565b34801561079e57600080fd5b5061023b611ca3565b3480156107b357600080fd5b50610353611ca9565b60135481565b600054600160a060020a031633146107d957600080fd5b6015805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03838116919091179182905560408051929091168252517f5719a5656c5cfdaafa148ecf366fd3b0a7fae06449ce2a46225977fb7417e29d916020908290030190a150565b600354604080517f8e7682880000000000000000000000000000000000000000000000000000000081523060048201529051600092600160a060020a031691638e76828891602480830192602092919082900301818787803b1580156108a557600080fd5b505af11580156108b9573d6000803e3d6000fd5b505050506040513d60208110156108cf57600080fd5b505190505b90565b60085481565b60065481565b600f5460009060ff16156108f9575060066108d4565b600454600160a060020a03161515610913575060016108d4565b60048054604080517f82771c8e0000000000000000000000000000000000000000000000000000000081529051600160a060020a03909216926382771c8e9282820192602092908290030181600087803b15801561097057600080fd5b505af1158015610984573d6000803e3d6000fd5b505050506040513d602081101561099a57600080fd5b505115156109aa575060016108d4565b600354604080517f8e7682880000000000000000000000000000000000000000000000000000000081523060048201529051600160a060020a0390921691638e768288916024808201926020929091908290030181600087803b158015610a1057600080fd5b505af1158015610a24573d6000803e3d6000fd5b505050506040513d6020811015610a3a57600080fd5b50511515610a4a575060016108d4565b600754421015610a5c575060026108d4565b6008544211158015610a735750610a71611870565b155b15610a80575060036108d4565b610a886114ea565b15610a95575060046108d4565b610a9d6114ea565b158015610aac57506000600a54115b8015610abc5750600a54600d5410155b15610ac9575060076108d4565b5060056108d4565b600054600160a060020a03163314610ae857600080fd5b6004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383811691909117808355604080517f614cb9040000000000000000000000000000000000000000000000000000000081529051919092169263614cb904928082019260209290918290030181600087803b158015610b6857600080fd5b505af1158015610b7c573d6000803e3d6000fd5b505050506040513d6020811015610b9257600080fd5b50511515610b9f57600080fd5b50565b60106020526000908152604090205481565b600454600160a060020a031681565b601454600160a060020a031681565b600a5481565b600190565b600480610be86108e3565b6007811115610bf357fe5b14610bfd57600080fd5b600054600160a060020a03163314610c1457600080fd5b60005474010000000000000000000000000000000000000000900460ff1615610c3c57600080fd5b600f5460ff1615610c4c57600080fd5b600454600160a060020a031615610cd25760048054604080517f0bf318a30000000000000000000000000000000000000000000000000000000081529051600160a060020a0390921692630bf318a392828201926000929082900301818387803b158015610cb957600080fd5b505af1158015610ccd573d6000803e3d6000fd5b505050505b50600f805460ff19166001179055565b600054600160a060020a03163314610cf957600080fd5b6003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038381169190911791829055604080517f04bbc255000000000000000000000000000000000000000000000000000000008152905192909116916304bbc255916004808201926020929091908290030181600087803b158015610b6857600080fd5b60095481565b6000600780610d906108e3565b6007811115610d9b57fe5b14610da557600080fd5b336000908152601060205260409020549150811515610dc357600080fd5b33600090815260106020908152604080832092909255600e5482517f66098d4f000000000000000000000000000000000000000000000000000000008152600481019190915260248101859052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b158015610e4a57600080fd5b505af4158015610e5e573d6000803e3d6000fd5b505050506040513d6020811015610e7457600080fd5b5051600e55604080513381526020810184905281517fbb28353e4598c3b9199101a66e0989549b659a59a54d2c27fbb183f1932c8e6d929181900390910190a1604051339083156108fc029084906000818181858888f193505050501515610edb57600080fd5b5050565b601554600160a060020a031681565b600e5481565b600054600160a060020a03163314610f0b57600080fd5b6000805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b60015481565b600054600160a060020a03163314610f5f57600080fd5b80421115610f6c57600080fd5b806007541115610f7b57600080fd5b60088190556040805182815290517fd34bb772c4ae9baa99db852f622773b31c7827e8ee818449fef20d30980bd3109181900360200190a150565b6000806000806000806000806000808a73__contracts/BytesDeserializer.sol:Byte__63b655e138909160006040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b83811015611039578181015183820152602001611021565b50505050905090810190601f1680156110665780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b15801561108457600080fd5b505af4158015611098573d6000803e3d6000fd5b505050506040513d60208110156110ae57600080fd5b810190808051906020019092919050505094508a73__contracts/BytesDeserializer.sol:Byte__6316419aa7909160146040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b8381101561113557818101518382015260200161111d565b50505050905090810190601f1680156111625780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b15801561118057600080fd5b505af4158015611194573d6000803e3d6000fd5b505050506040513d60208110156111aa57600080fd5b8101908080519060200190929190505050700100000000000000000000000000000000900493508a73__contracts/BytesDeserializer.sol:Byte__63d54dd8f9909160246040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b8381101561124557818101518382015260200161122d565b50505050905090810190601f1680156112725780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b15801561129057600080fd5b505af41580156112a4573d6000803e3d6000fd5b505050506040513d60208110156112ba57600080fd5b810190808051906020019092919050505060e060020a900492508a73__contracts/BytesDeserializer.sol:Byte__63d54dd8f9909160286040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b83811015611348578181015183820152602001611330565b50505050905090810190601f1680156113755780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b15801561139357600080fd5b505af41580156113a7573d6000803e3d6000fd5b505050506040513d60208110156113bd57600080fd5b810190808051906020019092919050505060e060020a900491508a73__contracts/BytesDeserializer.sol:Byte__632e1eb7fe9091602c6040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b8381101561144b578181015183820152602001611433565b50505050905090810190601f1680156114785780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b15801561149657600080fd5b505af41580156114aa573d6000803e3d6000fd5b505050506040513d60208110156114c057600080fd5b5051949b939a50919850965091945092505050565b600354600160a060020a031681565b600d5481565b600654600a54101590565b6005806115006108e3565b600781111561150b57fe5b1461151557600080fd5b34151561152157600080fd5b600d54604080517f66098d4f00000000000000000000000000000000000000000000000000000000815260048101929092523460248301525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b15801561159557600080fd5b505af41580156115a9573d6000803e3d6000fd5b505050506040513d60208110156115bf57600080fd5b5051600d5550565b600054600160a060020a031633146115de57600080fd5b601355565b600054600160a060020a031681565b600080600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561164857600080fd5b505af115801561165c573d6000803e3d6000fd5b505050506040513d602081101561167257600080fd5b5051604080517f1d3b9edf00000000000000000000000000000000000000000000000000000000815260048101879052600a9290920a602483018190529051909250849173__contracts/SafeMathLib.sol:SafeMathLi__91631d3b9edf91604480820192602092909190829003018186803b1580156116f257600080fd5b505af4158015611706573d6000803e3d6000fd5b505050506040513d602081101561171c57600080fd5b505181151561172757fe5b04949350505050565b600554600160a060020a031681565b60116020526000908152604090205481565b600061175b611ac9565b84111561176a5750600161176e565b5060005b949350505050565b6000600460009054906101000a9004600160a060020a0316600160a060020a03166382771c8e6040518163ffffffff1660e060020a028152600401602060405180830381600087803b1580156108a557600080fd5b60075481565b600f5460ff1681565b60005474010000000000000000000000000000000000000000900460ff1681565b60126020526000908152604090205460ff1681565b600054600160a060020a0316331461182757600080fd5b60005474010000000000000000000000000000000000000000900460ff16151561185057600080fd5b6000805474ff000000000000000000000000000000000000000019169055565b600061187a611ac9565b15905090565b336000908152601260205260408120548190670de0b6b3a764000090829081908190819081908190819060ff16156118c5576118be33611000611cb8565b9850611a48565b60028e6040518082805190602001908083835b602083106118f75780518252601f1990920191602091820191016118d8565b51815160209384036101000a600019018019909216911617905260405191909301945091925050808303816000865af1158015611938573d6000803e3d6000fd5b5050506040513d602081101561194d57600080fd5b5051965061195a8e610fb6565b95509550955095509550601560009054906101000a9004600160a060020a0316600160a060020a03166001888f8f8f604051600081526020016040526040518085600019166000191681526020018460ff1660ff1681526020018360001916600019168152602001826000191660001916815260200194505050505060206040516020810390808403906000865af11580156119fa573d6000803e3d6000fd5b50505060206040510351600160a060020a0316141515611a1957600080fd5b600160a060020a0386163314611a2e57600080fd5b611a3834836115f2565b9050611a45338683611e2d565b98505b3360009081526012602052604090205460ff161515611ab1573360009081526010602052604090205461271063ffffffff86168a02041115611a8957600080fd5b3360009081526010602052604090205461271063ffffffff85168a02041015611ab157600080fd5b50969c9b505050505050505050505050565b600c5481565b60025460008054604080517fdd62ed3e000000000000000000000000000000000000000000000000000000008152600160a060020a03928316600482015230602482015290519293919091169163dd62ed3e9160448082019260209290919082900301818787803b1580156108a557600080fd5b600054600160a060020a03163314611b5457600080fd5b600160a060020a038216600081815260126020908152604091829020805460ff191685151590811790915582519384529083015280517fa54714518c5d275fdcd3d2a461e4858e4e8cb04fb93cd0bca9d6d34115f264409281900390910190a15050565b600054600160a060020a03163314611bcf57600080fd5b600160a060020a0381161515611be457600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600054600160a060020a03163314611c6357600080fd5b600154600c541115611c7457600080fd5b6005805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600b5481565b600254600160a060020a031681565b6000805474010000000000000000000000000000000000000000900460ff1615611ce157600080fd5b611e268383600360009054906101000a9004600160a060020a0316600160a060020a03166318a4155e34600b54600a540360095433600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff1660e060020a028152600401602060405180830381600087803b158015611d6957600080fd5b505af1158015611d7d573d6000803e3d6000fd5b505050506040513d6020811015611d9357600080fd5b50516040805160e060020a63ffffffff8916028152600481019690965260248601949094526044850192909252600160a060020a0316606484015260848301525160a48083019260209291908290030181600087803b158015611df557600080fd5b505af1158015611e09573d6000803e3d6000fd5b505050506040513d6020811015611e1f57600080fd5b5051611e2d565b9392505050565b60008054819074010000000000000000000000000000000000000000900460ff1615611e5857600080fd5b6002611e626108e3565b6007811115611e6d57fe5b1415611e9f57600160a060020a03851660009081526012602052604090205460ff161515611e9a57600080fd5b611ebb565b6003611ea96108e3565b6007811115611eb457fe5b1415610221575b5034821515611ec957600080fd5b600160a060020a0385166000908152601060205260409020541515611ef257600c805460010190555b600160a060020a0385166000908152601060209081526040918290205482517f66098d4f000000000000000000000000000000000000000000000000000000008152600481019190915260248101849052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b158015611f7d57600080fd5b505af4158015611f91573d6000803e3d6000fd5b505050506040513d6020811015611fa757600080fd5b5051600160a060020a03861660009081526010602090815260408083209390935560118152908290205482517f66098d4f000000000000000000000000000000000000000000000000000000008152600481019190915260248101869052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561203f57600080fd5b505af4158015612053573d6000803e3d6000fd5b505050506040513d602081101561206957600080fd5b5051600160a060020a03861660009081526011602090815260409182902092909255600a5481517f66098d4f000000000000000000000000000000000000000000000000000000008152600481019190915260248101849052905173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f9260448082019391829003018186803b1580156120fb57600080fd5b505af415801561210f573d6000803e3d6000fd5b505050506040513d602081101561212557600080fd5b5051600a55600954604080517f66098d4f0000000000000000000000000000000000000000000000000000000081526004810192909252602482018590525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b15801561219f57600080fd5b505af41580156121b3573d6000803e3d6000fd5b505050506040513d60208110156121c957600080fd5b5051600955600354604080517ff14ae17d000000000000000000000000000000000000000000000000000000008152600160a060020a0388811660048301529151919092169163f14ae17d9160248083019260209291908290030181600087803b15801561223657600080fd5b505af115801561224a573d6000803e3d6000fd5b505050506040513d602081101561226057600080fd5b5051156122f557600b5473__contracts/SafeMathLib.sol:SafeMathLi__6366098d4f9091836040518363ffffffff1660e060020a028152600401808381526020018281526020019250505060206040518083038186803b1580156122c557600080fd5b505af41580156122d9573d6000803e3d6000fd5b505050506040513d60208110156122ef57600080fd5b5051600b555b6123058184600a54600954611751565b1561230f57600080fd5b61231985846123b7565b600554604051600160a060020a039091169082156108fc029083906000818181858888f19350505050151561234d57600080fd5b60408051600160a060020a0387168152602081018390528082018590526fffffffffffffffffffffffffffffffff8616606082015290517f0396f60aaad038749091d273dc13aaabc63db6e2271c7bad442d5cf25cc433509181900360800190a150909392505050565b600254601454604080517f23b872dd000000000000000000000000000000000000000000000000000000008152600160a060020a039283166004820152858316602482015260448101859052905191909216916323b872dd9160648083019260209291908290030181600087803b15801561243157600080fd5b505af1158015612445573d6000803e3d6000fd5b505050506040513d602081101561245b57600080fd5b50511515610edb57600080fd00a165627a7a72305820f450024a220fe4bf666d69f3205d2eb6ff8cbe2031500e416c2c8ebfe2ec42710029", "direct_dependencies": ["BytesDeserializer", "SafeMathLib"], "full_dependencies": ["BytesDeserializer", "SafeMathLib"], "linkrefs": [{"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 9194}, {"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 9698}, {"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 10242}, {"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 10760}, {"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 11278}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 8322}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 12050}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 12746}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 17128}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 17516}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 17894}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 18214}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 18738}], "linkrefs_runtime": [{"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 8080}, {"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 8584}, {"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 9128}, {"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 9646}, {"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 10164}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 7208}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 10936}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 11632}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 16014}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 16402}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 16780}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 17100}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 17624}], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": true, "inputs": [], "name": "ownerTestValue", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_signerAddress", "type": "address"}], "name": "setSignerAddress", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "isPricingSane", "outputs": [{"name": "sane", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "endsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "minimumFundingGoal", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getState", "outputs": [{"name": "", "type": "uint8"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setFinalizeAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "investedAmountOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "finalizeAgent", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "beneficiary", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "weiRaised", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isCrowdsale", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "finalize", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_pricingStrategy", "type": "address"}], "name": "setPricingStrategy", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "tokensSold", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "refund", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "signerAddress", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "weiRefunded", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "halt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "time", "type": "uint256"}], "name": "setEndsAt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "dataframe", "type": "bytes"}], "name": "getKYCPayload", "outputs": [{"name": "whitelistedAddress", "type": "address"}, {"name": "customerId", "type": "uint128"}, {"name": "minEth", "type": "uint32"}, {"name": "maxEth", "type": "uint32"}, {"name": "pricingInfo", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "pricingStrategy", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "loadedRefund", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isMinimumGoalReached", "outputs": [{"name": "reached", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "loadRefund", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "val", "type": "uint256"}], "name": "setOwnerTestValue", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "weisTotal", "type": "uint256"}, {"name": "pricePerToken", "type": "uint256"}], "name": "calculateTokens", "outputs": [{"name": "tokensTotal", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "multisigWallet", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "tokenAmountOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "weiAmount", "type": "uint256"}, {"name": "tokenAmount", "type": "uint256"}, {"name": "weiRaisedTotal", "type": "uint256"}, {"name": "tokensSoldTotal", "type": "uint256"}], "name": "isBreakingCap", "outputs": [{"name": "limitBroken", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isFinalizerSane", "outputs": [{"name": "sane", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "startsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "finalized", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "halted", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "earlyParticipantWhitelist", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "unhalt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "isCrowdsaleFull", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "dataframe", "type": "bytes"}, {"name": "v", "type": "uint8"}, {"name": "r", "type": "bytes32"}, {"name": "s", "type": "bytes32"}], "name": "buyWithKYCData", "outputs": [{"name": "tokenAmount", "type": "uint256"}], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "investorCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getTokensLeft", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "status", "type": "bool"}], "name": "setEarlyParicipantWhitelist", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setMultisig", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "presaleWeiRaised", "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": "_token", "type": "address"}, {"name": "_pricingStrategy", "type": "address"}, {"name": "_multisigWallet", "type": "address"}, {"name": "_start", "type": "uint256"}, {"name": "_end", "type": "uint256"}, {"name": "_minimumFundingGoal", "type": "uint256"}, {"name": "_beneficiary", "type": "address"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"payable": true, "stateMutability": "payable", "type": "fallback"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "signer", "type": "address"}], "name": "SignerChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}, {"indexed": false, "name": "tokenAmount", "type": "uint256"}, {"indexed": false, "name": "customerId", "type": "uint128"}], "name": "Invested", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}], "name": "Refund", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newRequireCustomerId", "type": "bool"}, {"indexed": false, "name": "newRequiredSignedAddress", "type": "bool"}, {"indexed": false, "name": "newSignerAddress", "type": "address"}], "name": "InvestmentPolicyChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "addr", "type": "address"}, {"indexed": false, "name": "status", "type": "bool"}], "name": "Whitelisted", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newEndsAt", "type": "uint256"}], "name": "EndsAtChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "devdoc": {"methods": {"calculateTokens(uint256,uint256)": {"details": "Calculate tokens user will have for their purchase", "params": {"pricePerToken": "What is the price for one token", "weisTotal": "How much ethers (in wei) the user putssssss in"}, "return": "tokensTotal which is received tokens, token decimals included"}, "isMinimumGoalReached()": {"return": "true if the crowdsale has raised enough money to be a successful."}, "setSignerAddress(address)": {"details": "This function can set the server side address", "params": {"_signerAddress": "The address derived from server's private key"}}, "transferOwnership(address)": {"details": "Allows the current owner to transfer control of the contract to a newOwner.", "params": {"newOwner": "The address to transfer ownership to."}}}}, "userdoc": {"methods": {"buyWithKYCData(bytes,uint8,bytes32,bytes32)": {"notice": "A token purchase with anti-money laundering * \u00a9return tokenAmount How many tokens where bought"}, "finalize()": {"notice": "Finalize a succcesful crowdsale. * The owner can triggre a call the contract that provides post-crowdsale actions, like releasing the tokens."}, "getKYCPayload(bytes)": {"notice": "Same as above, but with pricing information included in the payload as the last integer.In a long run, deprecate the legacy methods above and only use this payload."}, "getState()": {"notice": "Crowdfund state machine management. * We make it a function and do not assign the result to a variable, so there is no chance of the variable being stale."}, "getTokensLeft()": {"notice": "Get the amount of unsold tokens allocated to this contract;"}, "isBreakingCap(uint256,uint256,uint256,uint256)": {"notice": "Called from invest() to confirm if the curret investment does not break our cap rule."}, "isCrowdsale()": {"notice": "Interface marker. "}, "isCrowdsaleFull()": {"notice": "We are sold out when our approve pool becomes empty."}, "isFinalizerSane()": {"notice": "Check if the contract relationship looks good."}, "isPricingSane()": {"notice": "Check if the contract relationship looks good."}, "loadRefund()": {"notice": "Allow load refunds back on the contract for the refunding. * The team can transfer the funds back on the smart contract in the case the minimum goal was not reached.."}, "refund()": {"notice": "Investors can claim refund. * Note that any refunds from proxy buyers should be handled separately, and not through this contract."}, "setEarlyParicipantWhitelist(address,bool)": {"notice": "Allow addresses to do early participation. * TODO: Fix spelling error in the name"}, "setEndsAt(uint256)": {"notice": "Allow crowdsale owner to close early or extend the crowdsale. * This is useful e.g. for a manual soft cap implementation: - after X amount is reached determine manual closing * This may put the crowdsale to an invalid state, but we trust owners know what they are doing. "}, "setFinalizeAgent(address)": {"notice": "Allow to (re)set finalize agent. * Design choice: no state restrictions on setting this, so that we can fix fat finger mistakes."}, "setMultisig(address)": {"notice": "Allow to change the team multisig address in the case of emergency. * This allows to save a deployed crowdsale wallet in the case the crowdsale has not yet begun (we have done only few test transactions). After the crowdsale is going then multisig address stays locked for the safety reasons."}, "setOwnerTestValue(uint256)": {"notice": "This is for manual testing of multisig wallet interaction "}, "setPricingStrategy(address)": {"notice": "Allow to (re)set pricing strategy. * Design choice: no state restrictions on the set, so that we can fix fat finger mistakes."}}}}, "settings": {"compilationTarget": {"contracts/KYCCrowdsale.sol": "KYCCrowdsale"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/AllocatedCrowdsaleMixin.sol": {"keccak256": "0xb0f304a6316b4dd97ae57cbb99962b474f6bf14d90b5ff20d6d61d3b4f363da0", "urls": ["bzzr://342e3e02fb4570a64954190dff8a3664b6c11b9d01807e90a0a71be4c4a975ce"]}, "contracts/BytesDeserializer.sol": {"keccak256": "0xdd1718e5ea778d4dd36ccb98336360536beffdffd152bd9fb035124835fa4765", "urls": ["bzzr://ee94acd8149a77baf3f6881b995d1e9eba68c3225b2fe666dc0d402e0b68c5ce"]}, "contracts/CrowdsaleBase.sol": {"keccak256": "0xe2c9ed11183ce705616980df7b02544d72fe18b40395da7d9d4bcb621fb87871", "urls": ["bzzr://07f3887ba0d0eb3248b1ad3581480ed71a2fe70a47dcc283c4e97c8c92e0790a"]}, "contracts/FinalizeAgent.sol": {"keccak256": "0x309fd0510e0b3e2b5044e33f7c80cfb2d6f2a5697e41a5f185931d65770cfea9", "urls": ["bzzr://4e7ed6f82c0f542e92e56c12566b2ecd7666730865bf12566c27587ec64160ac"]}, "contracts/FractionalERC20.sol": {"keccak256": "0x75bc4ad90a8b13ce961c89b1bf405776f616e019d3a2720168f8e52be223198f", "urls": ["bzzr://6a3688f12da1a5c890ef06f80f883f6c5370886092d38a1b33cd4219b718478b"]}, "contracts/Haltable.sol": {"keccak256": "0x265dcf25e7c9ab4b6eecd2181f1b71334a1b5381a60f8db7d9526dab120f4b70", "urls": ["bzzr://d522e00fa9e075941469dd81738b59fdb99ce3c12cdc39e33abe40b588c4da9b"]}, "contracts/KYCCrowdsale.sol": {"keccak256": "0x57d211c61edcec07f527c07fa60fd82f822d0641cd2f79b9f3546c513bfca935", "urls": ["bzzr://52aeea60b0b3601c34a3a65d3b46759d15da2bc00cfbea9436d92ff7a2f01b89"]}, "contracts/KYCPayloadDeserializer.sol": {"keccak256": "0x4dbf491aa75393638028f16bedbc395bbec6beb6721ed5d569a18da089faf182", "urls": ["bzzr://a9b13fd13eda2199df6497108c1a0313d1ce91366a48f8650d647a0d86c43c6c"]}, "contracts/PricingStrategy.sol": {"keccak256": "0x8df5093b7d07168ad994f9176de0bd2268f6563b1e8a3a448d8cfe7fe246c628", "urls": ["bzzr://ef5c944d51f739ab34e2c951d6ac82a7152e6bb844058a8e57bae52c14cbe16b"]}, "contracts/SafeMathLib.sol": {"keccak256": "0x501bfe31e274b9a5591f7c540bdced4d4312e27d4f19599147c9bbca3d9c6b18", "urls": ["bzzr://a80935ebddb06c247d71372d4e5833ee029f08633bd0fe4a274a57009567e5b9"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}}, "version": 1}, "name": "KYCCrowdsale", "ordered_full_dependencies": ["BytesDeserializer", "SafeMathLib"], "source_path": "contracts/KYCCrowdsale.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n/*\n * Haltable\n *\n * Abstract contract that allows children to implement an\n * emergency stop mechanism. Differs from Pausable by causing a throw when in halt mode.\n *\n *\n * Originally envisioned in FirstBlood ICO contract.\n */\ncontract Haltable is Ownable {\n bool public halted;\n\n modifier stopInEmergency {\n if (halted) throw;\n _;\n }\n\n modifier stopNonOwnersInEmergency {\n if (halted && msg.sender != owner) throw;\n _;\n }\n\n modifier onlyInEmergency {\n if (!halted) throw;\n _;\n }\n\n // called by the owner on emergency, triggers stopped state\n function halt() external onlyOwner {\n halted = true;\n }\n\n // called by the owner on end of emergency, returns to normal state\n function unhalt() external onlyOwner onlyInEmergency {\n halted = false;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Safe unsigned safe math.\n *\n * https://blog.aragon.one/library-driven-development-in-solidity-2bebcaf88736#.750gwtwli\n *\n * Originally from https://raw.githubusercontent.com/AragonOne/zeppelin-solidity/master/contracts/SafeMathLib.sol\n *\n * Maintained here until merged to mainline zeppelin-solidity.\n *\n */\nlibrary SafeMathLib {\n\n function times(uint a, uint b) returns (uint) {\n uint c = a * b;\n assert(a == 0 || c / a == b);\n return c;\n }\n\n function minus(uint a, uint b) returns (uint) {\n assert(b <= a);\n return a - b;\n }\n\n function plus(uint a, uint b) returns (uint) {\n uint c = a + b;\n assert(c>=a);\n return c;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n\n/**\n * A token that defines fractional units as decimals.\n */\ncontract FractionalERC20 is ERC20 {\n\n uint public decimals;\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Interface for defining crowdsale pricing.\n */\ncontract PricingStrategy {\n\n /** Interface declaration. */\n function isPricingStrategy() public constant returns (bool) {\n return true;\n }\n\n /** Self check if all references are correctly set.\n *\n * Checks that pricing strategy matches crowdsale parameters.\n */\n function isSane(address crowdsale) public constant returns (bool) {\n return true;\n }\n\n /**\n * @dev Pricing tells if this is a presale purchase or not.\n @param purchaser Address of the purchaser\n @return False by default, true if a presale purchaser\n */\n function isPresalePurchase(address purchaser) public constant returns (bool) {\n return false;\n }\n\n /**\n * When somebody tries to buy tokens for X eth, calculate how many tokens they get.\n *\n *\n * @param value - What is the value of the transaction send in as wei\n * @param tokensSold - how much tokens have been sold this far\n * @param weiRaised - how much money has been raised this far in the main token sale - this number excludes presale\n * @param msgSender - who is the investor of this transaction\n * @param decimals - how many decimal units the token has\n * @return Amount of tokens the investor receives\n */\n function calculatePrice(uint value, uint weiRaised, uint tokensSold, address msgSender, uint decimals) public constant returns (uint tokenAmount);\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Finalize agent defines what happens at the end of succeseful crowdsale.\n *\n * - Allocate tokens for founders, bounties and community\n * - Make tokens transferable\n * - etc.\n */\ncontract FinalizeAgent {\n\n function isFinalizeAgent() public constant returns(bool) {\n return true;\n }\n\n /** Return true if we can run finalizeCrowdsale() properly.\n *\n * This is a safety check function that doesn't allow crowdsale to begin\n * unless the finalizer has been set up properly.\n */\n function isSane() public constant returns (bool);\n\n /** Called once by crowdsale finalize() if the sale was success. */\n function finalizeCrowdsale();\n\n}\n\n\n\n/**\n * Crowdsale state machine without buy functionality.\n *\n * Implements basic state machine logic, but leaves out all buy functions,\n * so that subclasses can implement their own buying logic.\n *\n *\n * For the default buy() implementation see Crowdsale.sol.\n */\ncontract CrowdsaleBase is Haltable {\n\n /* Max investment count when we are still allowed to change the multisig address */\n uint public MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE = 5;\n\n using SafeMathLib for uint;\n\n /* The token we are selling */\n FractionalERC20 public token;\n\n /* How we are going to price our offering */\n PricingStrategy public pricingStrategy;\n\n /* Post-success callback */\n FinalizeAgent public finalizeAgent;\n\n /* tokens will be transfered from this address */\n address public multisigWallet;\n\n /* if the funding goal is not reached, investors may withdraw their funds */\n uint public minimumFundingGoal;\n\n /* the UNIX timestamp start date of the crowdsale */\n uint public startsAt;\n\n /* the UNIX timestamp end date of the crowdsale */\n uint public endsAt;\n\n /* the number of tokens already sold through this contract*/\n uint public tokensSold = 0;\n\n /* How many wei of funding we have raised */\n uint public weiRaised = 0;\n\n /* Calculate incoming funds from presale contracts and addresses */\n uint public presaleWeiRaised = 0;\n\n /* How many distinct addresses have invested */\n uint public investorCount = 0;\n\n /* How much wei we have returned back to the contract after a failed crowdfund. */\n uint public loadedRefund = 0;\n\n /* How much wei we have given back to investors.*/\n uint public weiRefunded = 0;\n\n /* Has this crowdsale been finalized */\n bool public finalized;\n\n /** How much ETH each address has invested to this crowdsale */\n mapping (address => uint256) public investedAmountOf;\n\n /** How much tokens this crowdsale has credited for each investor address */\n mapping (address => uint256) public tokenAmountOf;\n\n /** Addresses that are allowed to invest even before ICO offical opens. For testing, for ICO partners, etc. */\n mapping (address => bool) public earlyParticipantWhitelist;\n\n /** This is for manul testing for the interaction from owner wallet. You can set it to any value and inspect this in blockchain explorer to see that crowdsale interaction works. */\n uint public ownerTestValue;\n\n /** State machine\n *\n * - Preparing: All contract initialization calls and variables have not been set yet\n * - Prefunding: We have not passed start time yet\n * - Funding: Active crowdsale\n * - Success: Minimum funding goal reached\n * - Failure: Minimum funding goal not reached before ending time\n * - Finalized: The finalized has been called and succesfully executed\n * - Refunding: Refunds are loaded on the contract for reclaim.\n */\n enum State{Unknown, Preparing, PreFunding, Funding, Success, Failure, Finalized, Refunding}\n\n // A new investment was made\n event Invested(address investor, uint weiAmount, uint tokenAmount, uint128 customerId);\n\n // Refund was processed for a contributor\n event Refund(address investor, uint weiAmount);\n\n // The rules were changed what kind of investments we accept\n event InvestmentPolicyChanged(bool newRequireCustomerId, bool newRequiredSignedAddress, address newSignerAddress);\n\n // Address early participation whitelist status changed\n event Whitelisted(address addr, bool status);\n\n // Crowdsale end time has been changed\n event EndsAtChanged(uint newEndsAt);\n\n function CrowdsaleBase(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal) {\n\n owner = msg.sender;\n\n token = FractionalERC20(_token);\n setPricingStrategy(_pricingStrategy);\n\n multisigWallet = _multisigWallet;\n if(multisigWallet == 0) {\n throw;\n }\n\n if(_start == 0) {\n throw;\n }\n\n startsAt = _start;\n\n if(_end == 0) {\n throw;\n }\n\n endsAt = _end;\n\n // Don't mess the dates\n if(startsAt >= endsAt) {\n throw;\n }\n\n // Minimum funding goal can be zero\n minimumFundingGoal = _minimumFundingGoal;\n }\n\n /**\n * Don't expect to just send in money and get tokens.\n */\n function() payable {\n throw;\n }\n\n /**\n * @dev Make an investment.\n *\n * Crowdsale must be running for one to invest.\n * We must have not pressed the emergency brake.\n *\n * @param receiver The Ethereum address who receives the tokens\n * @param customerId (optional) UUID v4 to track the successful payments on the server side'\n * @param tokenAmount Amount of tokens which be credited to receiver\n *\n * @return tokensBought How mony tokens were bought\n */\n function buyTokens(address receiver, uint128 customerId, uint256 tokenAmount) stopInEmergency internal returns(uint tokensBought) {\n\n // Determine if it's a good time to accept investment from this participant\n if(getState() == State.PreFunding) {\n // Are we whitelisted for early deposit\n if(!earlyParticipantWhitelist[receiver]) {\n throw;\n }\n } else if(getState() == State.Funding) {\n // Retail participants can only come in when the crowdsale is running\n // pass\n } else {\n // Unwanted state\n throw;\n }\n\n uint weiAmount = msg.value;\n\n // Dust transaction\n require(tokenAmount != 0);\n\n if(investedAmountOf[receiver] == 0) {\n // A new investor\n investorCount++;\n }\n\n // Update investor\n investedAmountOf[receiver] = investedAmountOf[receiver].plus(weiAmount);\n tokenAmountOf[receiver] = tokenAmountOf[receiver].plus(tokenAmount);\n\n // Update totals\n weiRaised = weiRaised.plus(weiAmount);\n tokensSold = tokensSold.plus(tokenAmount);\n\n if(pricingStrategy.isPresalePurchase(receiver)) {\n presaleWeiRaised = presaleWeiRaised.plus(weiAmount);\n }\n\n // Check that we did not bust the cap\n require(!isBreakingCap(weiAmount, tokenAmount, weiRaised, tokensSold));\n\n assignTokens(receiver, tokenAmount);\n\n // Pocket the money, or fail the crowdsale if we for some reason cannot send the money to our multisig\n if(!multisigWallet.send(weiAmount)) throw;\n\n // Tell us invest was success\n Invested(receiver, weiAmount, tokenAmount, customerId);\n\n return tokenAmount;\n }\n\n /**\n * @dev Make an investment based on pricing strategy\n *\n * This is a wrapper for buyTokens(), but the amount of tokens receiver will\n * have depends on the pricing strategy used.\n *\n * @param receiver The Ethereum address who receives the tokens\n * @param customerId (optional) UUID v4 to track the successful payments on the server side'\n *\n * @return tokensBought How mony tokens were bought\n */\n function investInternal(address receiver, uint128 customerId) stopInEmergency internal returns(uint tokensBought) {\n return buyTokens(receiver, customerId, pricingStrategy.calculatePrice(msg.value, weiRaised - presaleWeiRaised, tokensSold, msg.sender, token.decimals()));\n }\n\n /**\n * @dev Calculate tokens user will have for their purchase\n *\n * @param weisTotal How much ethers (in wei) the user putssssss in\n * @param pricePerToken What is the price for one token\n *\n * @return tokensTotal which is received tokens, token decimals included\n */\n function calculateTokens(uint256 weisTotal, uint256 pricePerToken) public constant returns(uint tokensTotal) {\n // pricePerToken is how many full tokens, token decimal place included, you get for wei amount.\n // Because, in theory, decimal amount can vary, we do the exponent calculation here,\n // though gas wise using 10**18 constant would be much simpler.\n // Furthermore we could use rough amounts and take in raw wei per tokens amount,\n // but we lose too much accuracy for generic calculations, thus all these are\n // practically implemented as 10**18 fixed points.\n uint multiplier = 10 ** token.decimals();\n return weisTotal.times(multiplier)/pricePerToken;\n }\n\n /**\n * Finalize a succcesful crowdsale.\n *\n * The owner can triggre a call the contract that provides post-crowdsale actions, like releasing the tokens.\n */\n function finalize() public inState(State.Success) onlyOwner stopInEmergency {\n\n // Already finalized\n if(finalized) {\n throw;\n }\n\n // Finalizing is optional. We only call it if we are given a finalizing agent.\n if(address(finalizeAgent) != 0) {\n finalizeAgent.finalizeCrowdsale();\n }\n\n finalized = true;\n }\n\n /**\n * Allow to (re)set finalize agent.\n *\n * Design choice: no state restrictions on setting this, so that we can fix fat finger mistakes.\n */\n function setFinalizeAgent(FinalizeAgent addr) onlyOwner {\n finalizeAgent = addr;\n\n // Don't allow setting bad agent\n if(!finalizeAgent.isFinalizeAgent()) {\n throw;\n }\n }\n\n /**\n * Allow crowdsale owner to close early or extend the crowdsale.\n *\n * This is useful e.g. for a manual soft cap implementation:\n * - after X amount is reached determine manual closing\n *\n * This may put the crowdsale to an invalid state,\n * but we trust owners know what they are doing.\n *\n */\n function setEndsAt(uint time) onlyOwner {\n\n if(now > time) {\n throw; // Don't change past\n }\n\n if(startsAt > time) {\n throw; // Prevent human mistakes\n }\n\n endsAt = time;\n EndsAtChanged(endsAt);\n }\n\n /**\n * Allow to (re)set pricing strategy.\n *\n * Design choice: no state restrictions on the set, so that we can fix fat finger mistakes.\n */\n function setPricingStrategy(PricingStrategy _pricingStrategy) onlyOwner {\n pricingStrategy = _pricingStrategy;\n\n // Don't allow setting bad agent\n if(!pricingStrategy.isPricingStrategy()) {\n throw;\n }\n }\n\n /**\n * Allow to change the team multisig address in the case of emergency.\n *\n * This allows to save a deployed crowdsale wallet in the case the crowdsale has not yet begun\n * (we have done only few test transactions). After the crowdsale is going\n * then multisig address stays locked for the safety reasons.\n */\n function setMultisig(address addr) public onlyOwner {\n\n // Change\n if(investorCount > MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE) {\n throw;\n }\n\n multisigWallet = addr;\n }\n\n /**\n * Allow load refunds back on the contract for the refunding.\n *\n * The team can transfer the funds back on the smart contract in the case the minimum goal was not reached..\n */\n function loadRefund() public payable inState(State.Failure) {\n if(msg.value == 0) throw;\n loadedRefund = loadedRefund.plus(msg.value);\n }\n\n /**\n * Investors can claim refund.\n *\n * Note that any refunds from proxy buyers should be handled separately,\n * and not through this contract.\n */\n function refund() public inState(State.Refunding) {\n uint256 weiValue = investedAmountOf[msg.sender];\n if (weiValue == 0) throw;\n investedAmountOf[msg.sender] = 0;\n weiRefunded = weiRefunded.plus(weiValue);\n Refund(msg.sender, weiValue);\n if (!msg.sender.send(weiValue)) throw;\n }\n\n /**\n * @return true if the crowdsale has raised enough money to be a successful.\n */\n function isMinimumGoalReached() public constant returns (bool reached) {\n return weiRaised >= minimumFundingGoal;\n }\n\n /**\n * Check if the contract relationship looks good.\n */\n function isFinalizerSane() public constant returns (bool sane) {\n return finalizeAgent.isSane();\n }\n\n /**\n * Check if the contract relationship looks good.\n */\n function isPricingSane() public constant returns (bool sane) {\n return pricingStrategy.isSane(address(this));\n }\n\n /**\n * Crowdfund state machine management.\n *\n * We make it a function and do not assign the result to a variable, so there is no chance of the variable being stale.\n */\n function getState() public constant returns (State) {\n if(finalized) return State.Finalized;\n else if (address(finalizeAgent) == 0) return State.Preparing;\n else if (!finalizeAgent.isSane()) return State.Preparing;\n else if (!pricingStrategy.isSane(address(this))) return State.Preparing;\n else if (block.timestamp < startsAt) return State.PreFunding;\n else if (block.timestamp <= endsAt && !isCrowdsaleFull()) return State.Funding;\n else if (isMinimumGoalReached()) return State.Success;\n else if (!isMinimumGoalReached() && weiRaised > 0 && loadedRefund >= weiRaised) return State.Refunding;\n else return State.Failure;\n }\n\n /** This is for manual testing of multisig wallet interaction */\n function setOwnerTestValue(uint val) onlyOwner {\n ownerTestValue = val;\n }\n\n /**\n * Allow addresses to do early participation.\n *\n * TODO: Fix spelling error in the name\n */\n function setEarlyParicipantWhitelist(address addr, bool status) onlyOwner {\n earlyParticipantWhitelist[addr] = status;\n Whitelisted(addr, status);\n }\n\n\n /** Interface marker. */\n function isCrowdsale() public constant returns (bool) {\n return true;\n }\n\n //\n // Modifiers\n //\n\n /** Modified allowing execution only if the crowdsale is currently running. */\n modifier inState(State state) {\n if(getState() != state) throw;\n _;\n }\n\n\n //\n // Abstract functions\n //\n\n /**\n * Check if the current invested breaks our cap rules.\n *\n *\n * The child contract must define their own cap setting rules.\n * We allow a lot of flexibility through different capping strategies (ETH, token count)\n * Called from invest().\n *\n * @param weiAmount The amount of wei the investor tries to invest in the current transaction\n * @param tokenAmount The amount of tokens we try to give to the investor in the current transaction\n * @param weiRaisedTotal What would be our total raised balance after this transaction\n * @param tokensSoldTotal What would be our total sold tokens count after this transaction\n *\n * @return true if taking this investment would break our cap rules\n */\n function isBreakingCap(uint weiAmount, uint tokenAmount, uint weiRaisedTotal, uint tokensSoldTotal) constant returns (bool limitBroken);\n\n /**\n * Check if the current crowdsale is full and we can no longer sell any tokens.\n */\n function isCrowdsaleFull() public constant returns (bool);\n\n /**\n * Create new tokens or transfer issued tokens to the investor depending on the cap model.\n */\n function assignTokens(address receiver, uint tokenAmount) internal;\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * A mixin that is selling tokens from a preallocated pool\n *\n * - Tokens have precreated supply \"premined\"\n *\n * - Token owner must transfer sellable tokens to the crowdsale contract using ERC20.approve()\n *\n * - The mixin does not implement buy entry point.\n *\n */\ncontract AllocatedCrowdsaleMixin is CrowdsaleBase {\n\n /* The party who holds the full token pool and has approve()'ed tokens for this crowdsale */\n address public beneficiary;\n\n /**\n * @param _beneficiary The account who has performed approve() to allocate tokens for the token sale.\n *\n */\n function AllocatedCrowdsaleMixin(address _beneficiary) {\n beneficiary = _beneficiary;\n }\n\n /**\n * Called from invest() to confirm if the curret investment does not break our cap rule.\n */\n function isBreakingCap(uint weiAmount, uint tokenAmount, uint weiRaisedTotal, uint tokensSoldTotal) constant returns (bool limitBroken) {\n if(tokenAmount > getTokensLeft()) {\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * We are sold out when our approve pool becomes empty.\n */\n function isCrowdsaleFull() public constant returns (bool) {\n return getTokensLeft() == 0;\n }\n\n /**\n * Get the amount of unsold tokens allocated to this contract;\n */\n function getTokensLeft() public constant returns (uint) {\n return token.allowance(owner, this);\n }\n\n /**\n * Transfer tokens from approve() pool to the buyer.\n *\n * Use approve() given to this crowdsale to distribute the tokens.\n */\n function assignTokens(address receiver, uint tokenAmount) internal {\n if(!token.transferFrom(beneficiary, receiver, tokenAmount)) throw;\n }\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n/**\n * Deserialize bytes payloads.\n *\n * Values are in big-endian byte order.\n *\n */\nlibrary BytesDeserializer {\n\n /**\n * Extract 256-bit worth of data from the bytes stream.\n */\n function slice32(bytes b, uint offset) constant returns (bytes32) {\n bytes32 out;\n\n for (uint i = 0; i < 32; i++) {\n out |= bytes32(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n /**\n * Extract Ethereum address worth of data from the bytes stream.\n */\n function sliceAddress(bytes b, uint offset) constant returns (address) {\n bytes32 out;\n\n for (uint i = 0; i < 20; i++) {\n out |= bytes32(b[offset + i] & 0xFF) >> ((i+12) * 8);\n }\n return address(uint(out));\n }\n\n /**\n * Extract 128-bit worth of data from the bytes stream.\n */\n function slice16(bytes b, uint offset) constant returns (bytes16) {\n bytes16 out;\n\n for (uint i = 0; i < 16; i++) {\n out |= bytes16(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n /**\n * Extract 32-bit worth of data from the bytes stream.\n */\n function slice4(bytes b, uint offset) constant returns (bytes4) {\n bytes4 out;\n\n for (uint i = 0; i < 4; i++) {\n out |= bytes4(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n /**\n * Extract 16-bit worth of data from the bytes stream.\n */\n function slice2(bytes b, uint offset) constant returns (bytes2) {\n bytes2 out;\n\n for (uint i = 0; i < 2; i++) {\n out |= bytes2(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n\n\n}\n\n\n/**\n * A mix-in contract to decode different signed KYC payloads.\n *\n * @notice This should be a library, but for the complexity and toolchain fragility risks involving of linking library inside library, we currently use this as a helper method mix-in.\n */\ncontract KYCPayloadDeserializer {\n\n using BytesDeserializer for bytes;\n\n // @notice this struct describes what kind of data we include in the payload, we do not use this directly\n // The bytes payload set on the server side\n // total 56 bytes\n struct KYCPayload {\n\n /** Customer whitelisted address where the deposit can come from */\n address whitelistedAddress; // 20 bytes\n\n /** Customer id, UUID v4 */\n uint128 customerId; // 16 bytes\n\n /**\n * Min amount this customer needs to invest in ETH. Set zero if no minimum. Expressed as parts of 10000. 1 ETH = 10000.\n * @notice Decided to use 32-bit words to make the copy-pasted Data field for the ICO transaction less lenghty.\n */\n uint32 minETH; // 4 bytes\n\n /** Max amount this customer can to invest in ETH. Set zero if no maximum. Expressed as parts of 10000. 1 ETH = 10000. */\n uint32 maxETH; // 4 bytes\n\n /**\n * Information about the price promised for this participant. It can be pricing tier id or directly one token price in weis.\n * @notice This is a later addition and not supported in all scenarios yet.\n */\n uint256 pricingInfo;\n }\n\n\n /**\n * Same as above, but with pricing information included in the payload as the last integer.\n *\n * @notice In a long run, deprecate the legacy methods above and only use this payload.\n */\n function getKYCPayload(bytes dataframe) public constant returns(address whitelistedAddress, uint128 customerId, uint32 minEth, uint32 maxEth, uint256 pricingInfo) {\n address _whitelistedAddress = dataframe.sliceAddress(0);\n uint128 _customerId = uint128(dataframe.slice16(20));\n uint32 _minETH = uint32(dataframe.slice4(36));\n uint32 _maxETH = uint32(dataframe.slice4(40));\n uint256 _pricingInfo = uint256(dataframe.slice32(44));\n return (_whitelistedAddress, _customerId, _minETH, _maxETH, _pricingInfo);\n }\n\n}\n\n\n/**\n * A crowdsale that allows buys only from signed payload with server-side specified limits and price.\n *\n * The token distribution happens as in the allocated crowdsale.\n *\n */\ncontract KYCCrowdsale is AllocatedCrowdsaleMixin, KYCPayloadDeserializer {\n\n /* Server holds the private key to this address to sign incoming buy payloads to signal we have KYC records in the books for these users. */\n address public signerAddress;\n\n /* A new server-side signer key was set to be effective */\n event SignerChanged(address signer);\n\n /**\n * Constructor.\n */\n function KYCCrowdsale(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal, address _beneficiary) CrowdsaleBase(_token, _pricingStrategy, _multisigWallet, _start, _end, _minimumFundingGoal) AllocatedCrowdsaleMixin(_beneficiary) {\n\n }\n\n /**\n * A token purchase with anti-money laundering\n *\n * \u00a9return tokenAmount How many tokens where bought\n */\n function buyWithKYCData(bytes dataframe, uint8 v, bytes32 r, bytes32 s) public payable returns(uint tokenAmount) {\n\n uint _tokenAmount;\n uint multiplier = 10 ** 18;\n\n // Perform signature check for normal addresses\n // (not deployment accounts, etc.)\n if(earlyParticipantWhitelist[msg.sender]) {\n // Deployment provided early participant list is for deployment and diagnostics\n // For test purchases use this faux customer id 0x1000\n _tokenAmount = investInternal(msg.sender, 0x1000);\n\n } else {\n // User comes through the server, check that the signature to ensure ther server\n // side KYC has passed for this customer id and whitelisted Ethereum address\n\n bytes32 hash = sha256(dataframe);\n\n var (whitelistedAddress, customerId, minETH, maxETH, pricingInfo) = getKYCPayload(dataframe);\n\n // Check that the KYC data is signed by our server\n require(ecrecover(hash, v, r, s) == signerAddress);\n\n // Only whitelisted address can participate the transaction\n require(whitelistedAddress == msg.sender);\n\n // Server gives us information what is the buy price for this user\n uint256 tokensTotal = calculateTokens(msg.value, pricingInfo);\n\n _tokenAmount = buyTokens(msg.sender, customerId, tokensTotal);\n }\n\n if(!earlyParticipantWhitelist[msg.sender]) {\n // We assume there is no serious min and max fluctuations for the customer, unless\n // especially set in the server side per customer manual override.\n // Otherwise the customer can reuse old data payload with different min or max value\n // to work around the per customer cap.\n require(investedAmountOf[msg.sender] >= minETH * multiplier / 10000);\n require(investedAmountOf[msg.sender] <= maxETH * multiplier / 10000);\n }\n\n return _tokenAmount;\n }\n\n /// @dev This function can set the server side address\n /// @param _signerAddress The address derived from server's private key\n function setSignerAddress(address _signerAddress) onlyOwner {\n signerAddress = _signerAddress;\n SignerChanged(signerAddress);\n }\n\n}\n"}, "KYCInterface": {"abi": [{"constant": true, "inputs": [{"name": "who", "type": "address"}], "name": "isWhitelisted", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "who", "type": "address"}, {"indexed": false, "name": "nonce", "type": "uint128"}], "name": "Whitelisted", "type": "event"}], "bytecode": "0x", "bytecode_runtime": "0x", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": null, "name": "KYCInterface", "ordered_full_dependencies": [], "source_path": "contracts/security-token/KYCInterface.sol"}, "KYCPayloadDeserializer": {"abi": [{"constant": true, "inputs": [{"name": "dataframe", "type": "bytes"}], "name": "getKYCPayload", "outputs": [{"name": "whitelistedAddress", "type": "address"}, {"name": "customerId", "type": "uint128"}, {"name": "minEth", "type": "uint32"}, {"name": "maxEth", "type": "uint32"}, {"name": "pricingInfo", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}], "bytecode": "0x608060405234801561001057600080fd5b5061062a806100206000396000f3006080604052600436106100275763ffffffff60e060020a60003504166373752db4811461002c575b600080fd5b34801561003857600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526100859436949293602493928401919081908401838280828437509497506100df9650505050505050565b6040805173ffffffffffffffffffffffffffffffffffffffff90961686526fffffffffffffffffffffffffffffffff909416602086015263ffffffff92831685850152911660608401526080830152519081900360a00190f35b6000806000806000806000806000808a73__contracts/BytesDeserializer.sol:Byte__63b655e138909160006040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b8381101561016257818101518382015260200161014a565b50505050905090810190601f16801561018f5780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b1580156101ad57600080fd5b505af41580156101c1573d6000803e3d6000fd5b505050506040513d60208110156101d757600080fd5b810190808051906020019092919050505094508a73__contracts/BytesDeserializer.sol:Byte__6316419aa7909160146040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b8381101561025e578181015183820152602001610246565b50505050905090810190601f16801561028b5780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b1580156102a957600080fd5b505af41580156102bd573d6000803e3d6000fd5b505050506040513d60208110156102d357600080fd5b8101908080519060200190929190505050700100000000000000000000000000000000900493508a73__contracts/BytesDeserializer.sol:Byte__63d54dd8f9909160246040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b8381101561036e578181015183820152602001610356565b50505050905090810190601f16801561039b5780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b1580156103b957600080fd5b505af41580156103cd573d6000803e3d6000fd5b505050506040513d60208110156103e357600080fd5b810190808051906020019092919050505060e060020a900492508a73__contracts/BytesDeserializer.sol:Byte__63d54dd8f9909160286040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b83811015610471578181015183820152602001610459565b50505050905090810190601f16801561049e5780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b1580156104bc57600080fd5b505af41580156104d0573d6000803e3d6000fd5b505050506040513d60208110156104e657600080fd5b810190808051906020019092919050505060e060020a900491508a73__contracts/BytesDeserializer.sol:Byte__632e1eb7fe9091602c6040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b8381101561057457818101518382015260200161055c565b50505050905090810190601f1680156105a15780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b1580156105bf57600080fd5b505af41580156105d3573d6000803e3d6000fd5b505050506040513d60208110156105e957600080fd5b5051949b939a509198509650919450925050505600a165627a7a723058202e8c6ae50b444d1ab055f9c1c2095c147299a0aa25e5a9633c301b2b9494e6770029", "bytecode_runtime": "0x6080604052600436106100275763ffffffff60e060020a60003504166373752db4811461002c575b600080fd5b34801561003857600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526100859436949293602493928401919081908401838280828437509497506100df9650505050505050565b6040805173ffffffffffffffffffffffffffffffffffffffff90961686526fffffffffffffffffffffffffffffffff909416602086015263ffffffff92831685850152911660608401526080830152519081900360a00190f35b6000806000806000806000806000808a73__contracts/BytesDeserializer.sol:Byte__63b655e138909160006040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b8381101561016257818101518382015260200161014a565b50505050905090810190601f16801561018f5780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b1580156101ad57600080fd5b505af41580156101c1573d6000803e3d6000fd5b505050506040513d60208110156101d757600080fd5b810190808051906020019092919050505094508a73__contracts/BytesDeserializer.sol:Byte__6316419aa7909160146040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b8381101561025e578181015183820152602001610246565b50505050905090810190601f16801561028b5780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b1580156102a957600080fd5b505af41580156102bd573d6000803e3d6000fd5b505050506040513d60208110156102d357600080fd5b8101908080519060200190929190505050700100000000000000000000000000000000900493508a73__contracts/BytesDeserializer.sol:Byte__63d54dd8f9909160246040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b8381101561036e578181015183820152602001610356565b50505050905090810190601f16801561039b5780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b1580156103b957600080fd5b505af41580156103cd573d6000803e3d6000fd5b505050506040513d60208110156103e357600080fd5b810190808051906020019092919050505060e060020a900492508a73__contracts/BytesDeserializer.sol:Byte__63d54dd8f9909160286040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b83811015610471578181015183820152602001610459565b50505050905090810190601f16801561049e5780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b1580156104bc57600080fd5b505af41580156104d0573d6000803e3d6000fd5b505050506040513d60208110156104e657600080fd5b810190808051906020019092919050505060e060020a900491508a73__contracts/BytesDeserializer.sol:Byte__632e1eb7fe9091602c6040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b8381101561057457818101518382015260200161055c565b50505050905090810190601f1680156105a15780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b1580156105bf57600080fd5b505af41580156105d3573d6000803e3d6000fd5b505050506040513d60208110156105e957600080fd5b5051949b939a509198509650919450925050505600a165627a7a723058202e8c6ae50b444d1ab055f9c1c2095c147299a0aa25e5a9633c301b2b9494e6770029", "direct_dependencies": ["BytesDeserializer"], "full_dependencies": ["BytesDeserializer"], "linkrefs": [{"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 546}, {"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 1050}, {"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 1594}, {"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 2112}, {"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 2630}], "linkrefs_runtime": [{"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 482}, {"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 986}, {"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 1530}, {"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 2048}, {"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 2566}], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": true, "inputs": [{"name": "dataframe", "type": "bytes"}], "name": "getKYCPayload", "outputs": [{"name": "whitelistedAddress", "type": "address"}, {"name": "customerId", "type": "uint128"}, {"name": "minEth", "type": "uint32"}, {"name": "maxEth", "type": "uint32"}, {"name": "pricingInfo", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}], "devdoc": {"methods": {}}, "userdoc": {"methods": {"getKYCPayload(bytes)": {"notice": "Same as above, but with pricing information included in the payload as the last integer.In a long run, deprecate the legacy methods above and only use this payload."}}}}, "settings": {"compilationTarget": {"contracts/KYCPayloadDeserializer.sol": "KYCPayloadDeserializer"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/BytesDeserializer.sol": {"keccak256": "0xdd1718e5ea778d4dd36ccb98336360536beffdffd152bd9fb035124835fa4765", "urls": ["bzzr://ee94acd8149a77baf3f6881b995d1e9eba68c3225b2fe666dc0d402e0b68c5ce"]}, "contracts/KYCPayloadDeserializer.sol": {"keccak256": "0x4dbf491aa75393638028f16bedbc395bbec6beb6721ed5d569a18da089faf182", "urls": ["bzzr://a9b13fd13eda2199df6497108c1a0313d1ce91366a48f8650d647a0d86c43c6c"]}}, "version": 1}, "name": "KYCPayloadDeserializer", "ordered_full_dependencies": ["BytesDeserializer"], "source_path": "contracts/KYCPayloadDeserializer.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n/**\n * Deserialize bytes payloads.\n *\n * Values are in big-endian byte order.\n *\n */\nlibrary BytesDeserializer {\n\n /**\n * Extract 256-bit worth of data from the bytes stream.\n */\n function slice32(bytes b, uint offset) constant returns (bytes32) {\n bytes32 out;\n\n for (uint i = 0; i < 32; i++) {\n out |= bytes32(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n /**\n * Extract Ethereum address worth of data from the bytes stream.\n */\n function sliceAddress(bytes b, uint offset) constant returns (address) {\n bytes32 out;\n\n for (uint i = 0; i < 20; i++) {\n out |= bytes32(b[offset + i] & 0xFF) >> ((i+12) * 8);\n }\n return address(uint(out));\n }\n\n /**\n * Extract 128-bit worth of data from the bytes stream.\n */\n function slice16(bytes b, uint offset) constant returns (bytes16) {\n bytes16 out;\n\n for (uint i = 0; i < 16; i++) {\n out |= bytes16(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n /**\n * Extract 32-bit worth of data from the bytes stream.\n */\n function slice4(bytes b, uint offset) constant returns (bytes4) {\n bytes4 out;\n\n for (uint i = 0; i < 4; i++) {\n out |= bytes4(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n /**\n * Extract 16-bit worth of data from the bytes stream.\n */\n function slice2(bytes b, uint offset) constant returns (bytes2) {\n bytes2 out;\n\n for (uint i = 0; i < 2; i++) {\n out |= bytes2(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n\n\n}\n\n\n/**\n * A mix-in contract to decode different signed KYC payloads.\n *\n * @notice This should be a library, but for the complexity and toolchain fragility risks involving of linking library inside library, we currently use this as a helper method mix-in.\n */\ncontract KYCPayloadDeserializer {\n\n using BytesDeserializer for bytes;\n\n // @notice this struct describes what kind of data we include in the payload, we do not use this directly\n // The bytes payload set on the server side\n // total 56 bytes\n struct KYCPayload {\n\n /** Customer whitelisted address where the deposit can come from */\n address whitelistedAddress; // 20 bytes\n\n /** Customer id, UUID v4 */\n uint128 customerId; // 16 bytes\n\n /**\n * Min amount this customer needs to invest in ETH. Set zero if no minimum. Expressed as parts of 10000. 1 ETH = 10000.\n * @notice Decided to use 32-bit words to make the copy-pasted Data field for the ICO transaction less lenghty.\n */\n uint32 minETH; // 4 bytes\n\n /** Max amount this customer can to invest in ETH. Set zero if no maximum. Expressed as parts of 10000. 1 ETH = 10000. */\n uint32 maxETH; // 4 bytes\n\n /**\n * Information about the price promised for this participant. It can be pricing tier id or directly one token price in weis.\n * @notice This is a later addition and not supported in all scenarios yet.\n */\n uint256 pricingInfo;\n }\n\n\n /**\n * Same as above, but with pricing information included in the payload as the last integer.\n *\n * @notice In a long run, deprecate the legacy methods above and only use this payload.\n */\n function getKYCPayload(bytes dataframe) public constant returns(address whitelistedAddress, uint128 customerId, uint32 minEth, uint32 maxEth, uint256 pricingInfo) {\n address _whitelistedAddress = dataframe.sliceAddress(0);\n uint128 _customerId = uint128(dataframe.slice16(20));\n uint32 _minETH = uint32(dataframe.slice4(36));\n uint32 _maxETH = uint32(dataframe.slice4(40));\n uint256 _pricingInfo = uint256(dataframe.slice32(44));\n return (_whitelistedAddress, _customerId, _minETH, _maxETH, _pricingInfo);\n }\n\n}\n"}, "KYCPresale": {"abi": [{"constant": false, "inputs": [{"name": "newCap", "type": "uint256"}], "name": "setWeiCap", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "ownerTestValue", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_signerAddress", "type": "address"}], "name": "setSignerAddress", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "isPricingSane", "outputs": [{"name": "sane", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "endsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "minimumFundingGoal", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getState", "outputs": [{"name": "", "type": "uint8"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setFinalizeAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "investedAmountOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "finalizeAgent", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "weiRaised", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isCrowdsale", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "finalize", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_pricingStrategy", "type": "address"}], "name": "setPricingStrategy", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "tokensSold", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "refund", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "signerAddress", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "weiRefunded", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "halt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "time", "type": "uint256"}], "name": "setEndsAt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "dataframe", "type": "bytes"}], "name": "getKYCPayload", "outputs": [{"name": "whitelistedAddress", "type": "address"}, {"name": "customerId", "type": "uint128"}, {"name": "minEth", "type": "uint32"}, {"name": "maxEth", "type": "uint32"}, {"name": "pricingInfo", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "pricingStrategy", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "loadedRefund", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isMinimumGoalReached", "outputs": [{"name": "reached", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "loadRefund", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "val", "type": "uint256"}], "name": "setOwnerTestValue", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "weisTotal", "type": "uint256"}, {"name": "pricePerToken", "type": "uint256"}], "name": "calculateTokens", "outputs": [{"name": "tokensTotal", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "multisigWallet", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "tokenAmountOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "weiAmount", "type": "uint256"}, {"name": "tokenAmount", "type": "uint256"}, {"name": "weiRaisedTotal", "type": "uint256"}, {"name": "tokensSoldTotal", "type": "uint256"}], "name": "isBreakingCap", "outputs": [{"name": "limitBroken", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isFinalizerSane", "outputs": [{"name": "sane", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "startsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "finalized", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "halted", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "saleWeiCap", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "earlyParticipantWhitelist", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "unhalt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "isCrowdsaleFull", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "dataframe", "type": "bytes"}, {"name": "v", "type": "uint8"}, {"name": "r", "type": "bytes32"}, {"name": "s", "type": "bytes32"}], "name": "buyWithKYCData", "outputs": [{"name": "tokenAmount", "type": "uint256"}], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "investorCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "status", "type": "bool"}], "name": "setEarlyParicipantWhitelist", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setMultisig", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "presaleWeiRaised", "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": "_multisigWallet", "type": "address"}, {"name": "_start", "type": "uint256"}, {"name": "_end", "type": "uint256"}, {"name": "_saleWeiCap", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"payable": true, "stateMutability": "payable", "type": "fallback"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "signer", "type": "address"}], "name": "SignerChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}, {"indexed": false, "name": "tokenAmount", "type": "uint256"}, {"indexed": false, "name": "customerId", "type": "uint128"}, {"indexed": false, "name": "pricingInfo", "type": "uint256"}], "name": "Prepurchased", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newCap", "type": "uint256"}], "name": "CapUpdated", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}, {"indexed": false, "name": "tokenAmount", "type": "uint256"}, {"indexed": false, "name": "customerId", "type": "uint128"}], "name": "Invested", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}], "name": "Refund", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newRequireCustomerId", "type": "bool"}, {"indexed": false, "name": "newRequiredSignedAddress", "type": "bool"}, {"indexed": false, "name": "newSignerAddress", "type": "address"}], "name": "InvestmentPolicyChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "addr", "type": "address"}, {"indexed": false, "name": "status", "type": "bool"}], "name": "Whitelisted", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newEndsAt", "type": "uint256"}], "name": "EndsAtChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "bytecode": "0x6080604052600560015560006009556000600a556000600b556000600c556000600d556000600e553480156200003457600080fd5b5060405160808062001e0883398101604090815281516020830151918301516060909301516000805433600160a060020a03199182168117821617825560028054909116600190811790915592949290858585836200009c8164010000000062000115810204565b60058054600160a060020a031916600160a060020a038681169190911791829055161515620000ca57600080fd5b821515620000d757600080fd5b6007839055811515620000e957600080fd5b60088290556007548211620000fd57600080fd5b60065550505060149290925550620001309350505050565b600054600160a060020a031633146200012d57600080fd5b50565b611cc880620001406000396000f3006080604052600436106102215763ffffffff60e060020a600035041663015fa6c181146102265780630226401d14610240578063046dc16614610267578063062b01ce146102885780630a09284a146102b157806313f4e977146102c65780631865c57d146102db57806319b667da146103145780631aae34601461033557806321d5c0f6146103565780634042b66f146103875780634551dd591461039c5780634bb278f3146103b157806350c67734146103c6578063518ab2a8146103e7578063590e1ae3146103fc5780635b7633d0146104115780635da89ac0146104265780635ed7ca5b1461043b5780636203f09f146104505780636e50eb3f1461046557806373752db41461047d57806378b99c2414610523578063797d9437146105385780637c2e08a31461054d57806387612102146105625780638d51faec1461056a5780638da5cb5b14610582578063903cc583146105975780639075becf146105b257806397b150ca146105c75780639d3c663f146105e8578063a7ba44c314610609578063af4686821461061e578063b3f05b9714610633578063b9b8af0b14610648578063c80d36941461065d578063cb16e6d014610672578063cb3e64fd14610693578063d5d09021146106a8578063d7c7159c146106bd578063d7e64c0014610718578063eac249321461072d578063f2fde38b14610753578063f3283fba14610774578063f7c00e2f14610795578063fc0c546a146107aa575b600080fd5b34801561023257600080fd5b5061023e6004356107bf565b005b34801561024c57600080fd5b50610255610811565b60408051918252519081900360200190f35b34801561027357600080fd5b5061023e600160a060020a0360043516610817565b34801561029457600080fd5b5061029d610895565b604080519115158252519081900360200190f35b3480156102bd57600080fd5b5061025561092c565b3480156102d257600080fd5b50610255610932565b3480156102e757600080fd5b506102f0610938565b6040518082600781111561030057fe5b60ff16815260200191505060405180910390f35b34801561032057600080fd5b5061023e600160a060020a0360043516610954565b34801561034157600080fd5b50610255600160a060020a0360043516610a25565b34801561036257600080fd5b5061036b610a37565b60408051600160a060020a039092168252519081900360200190f35b34801561039357600080fd5b50610255610a46565b3480156103a857600080fd5b5061029d610a4c565b3480156103bd57600080fd5b5061023e610a51565b3480156103d257600080fd5b5061023e600160a060020a0360043516610b56565b3480156103f357600080fd5b50610255610b6d565b34801561040857600080fd5b5061023e610b73565b34801561041d57600080fd5b5061036b610ccf565b34801561043257600080fd5b50610255610cde565b34801561044757600080fd5b5061023e610ce4565b34801561045c57600080fd5b50610255610d32565b34801561047157600080fd5b5061023e600435610d38565b34801561048957600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526104d6943694929360249392840191908190840183828082843750949750610da69650505050505050565b60408051600160a060020a0390961686526fffffffffffffffffffffffffffffffff909416602086015263ffffffff92831685850152911660608401526080830152519081900360a00190f35b34801561052f57600080fd5b5061036b6112c5565b34801561054457600080fd5b506102556112d4565b34801561055957600080fd5b5061029d6112da565b61023e6112e5565b34801561057657600080fd5b5061023e6004356113b7565b34801561058e57600080fd5b5061036b6113d3565b3480156105a357600080fd5b506102556004356024356113e2565b3480156105be57600080fd5b5061036b611520565b3480156105d357600080fd5b50610255600160a060020a036004351661152f565b3480156105f457600080fd5b5061029d600435602435604435606435611541565b34801561061557600080fd5b5061029d611561565b34801561062a57600080fd5b506102556115b6565b34801561063f57600080fd5b5061029d6115bc565b34801561065457600080fd5b5061029d6115c5565b34801561066957600080fd5b506102556115e6565b34801561067e57600080fd5b5061029d600160a060020a03600435166115ec565b34801561069f57600080fd5b5061023e611601565b3480156106b457600080fd5b5061029d611661565b6040805160206004803580820135601f81018490048402850184019095528484526102559436949293602493928401919081908401838280828437509497505050833560ff169450505060208201359160400135905061166c565b34801561072457600080fd5b50610255611b1b565b34801561073957600080fd5b5061023e600160a060020a03600435166024351515611b21565b34801561075f57600080fd5b5061023e600160a060020a0360043516611b9c565b34801561078057600080fd5b5061023e600160a060020a0360043516611c30565b3480156107a157600080fd5b50610255611c87565b3480156107b657600080fd5b5061036b611c8d565b600054600160a060020a031633146107d657600080fd5b60148190556040805182815290517f3c8eb7c49d332f4c1e4d92a27cda93c31cc9452f7a408e0c6109fcddbc9946ea9181900360200190a150565b60135481565b600054600160a060020a0316331461082e57600080fd5b6015805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03838116919091179182905560408051929091168252517f5719a5656c5cfdaafa148ecf366fd3b0a7fae06449ce2a46225977fb7417e29d916020908290030190a150565b600354604080517f8e7682880000000000000000000000000000000000000000000000000000000081523060048201529051600092600160a060020a031691638e76828891602480830192602092919082900301818787803b1580156108fa57600080fd5b505af115801561090e573d6000803e3d6000fd5b505050506040513d602081101561092457600080fd5b505190505b90565b60085481565b60065481565b600060075442101561094c57506002610929565b506003610929565b600054600160a060020a0316331461096b57600080fd5b6004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383811691909117808355604080517f614cb9040000000000000000000000000000000000000000000000000000000081529051919092169263614cb904928082019260209290918290030181600087803b1580156109eb57600080fd5b505af11580156109ff573d6000803e3d6000fd5b505050506040513d6020811015610a1557600080fd5b50511515610a2257600080fd5b50565b60106020526000908152604090205481565b600454600160a060020a031681565b600a5481565b600190565b600480610a5c610938565b6007811115610a6757fe5b14610a7157600080fd5b600054600160a060020a03163314610a8857600080fd5b60005474010000000000000000000000000000000000000000900460ff1615610ab057600080fd5b600f5460ff1615610ac057600080fd5b600454600160a060020a031615610b465760048054604080517f0bf318a30000000000000000000000000000000000000000000000000000000081529051600160a060020a0390921692630bf318a392828201926000929082900301818387803b158015610b2d57600080fd5b505af1158015610b41573d6000803e3d6000fd5b505050505b50600f805460ff19166001179055565b600054600160a060020a03163314610a2257600080fd5b60095481565b6000600780610b80610938565b6007811115610b8b57fe5b14610b9557600080fd5b336000908152601060205260409020549150811515610bb357600080fd5b33600090815260106020908152604080832092909255600e5482517f66098d4f000000000000000000000000000000000000000000000000000000008152600481019190915260248101859052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b158015610c3a57600080fd5b505af4158015610c4e573d6000803e3d6000fd5b505050506040513d6020811015610c6457600080fd5b5051600e55604080513381526020810184905281517fbb28353e4598c3b9199101a66e0989549b659a59a54d2c27fbb183f1932c8e6d929181900390910190a1604051339083156108fc029084906000818181858888f193505050501515610ccb57600080fd5b5050565b601554600160a060020a031681565b600e5481565b600054600160a060020a03163314610cfb57600080fd5b6000805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b60015481565b600054600160a060020a03163314610d4f57600080fd5b80421115610d5c57600080fd5b806007541115610d6b57600080fd5b60088190556040805182815290517fd34bb772c4ae9baa99db852f622773b31c7827e8ee818449fef20d30980bd3109181900360200190a150565b6000806000806000806000806000808a73__contracts/BytesDeserializer.sol:Byte__63b655e138909160006040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b83811015610e29578181015183820152602001610e11565b50505050905090810190601f168015610e565780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b158015610e7457600080fd5b505af4158015610e88573d6000803e3d6000fd5b505050506040513d6020811015610e9e57600080fd5b810190808051906020019092919050505094508a73__contracts/BytesDeserializer.sol:Byte__6316419aa7909160146040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b83811015610f25578181015183820152602001610f0d565b50505050905090810190601f168015610f525780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b158015610f7057600080fd5b505af4158015610f84573d6000803e3d6000fd5b505050506040513d6020811015610f9a57600080fd5b8101908080519060200190929190505050700100000000000000000000000000000000900493508a73__contracts/BytesDeserializer.sol:Byte__63d54dd8f9909160246040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b8381101561103557818101518382015260200161101d565b50505050905090810190601f1680156110625780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b15801561108057600080fd5b505af4158015611094573d6000803e3d6000fd5b505050506040513d60208110156110aa57600080fd5b810190808051906020019092919050505060e060020a900492508a73__contracts/BytesDeserializer.sol:Byte__63d54dd8f9909160286040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b83811015611138578181015183820152602001611120565b50505050905090810190601f1680156111655780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b15801561118357600080fd5b505af4158015611197573d6000803e3d6000fd5b505050506040513d60208110156111ad57600080fd5b810190808051906020019092919050505060e060020a900491508a73__contracts/BytesDeserializer.sol:Byte__632e1eb7fe9091602c6040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b8381101561123b578181015183820152602001611223565b50505050905090810190601f1680156112685780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b15801561128657600080fd5b505af415801561129a573d6000803e3d6000fd5b505050506040513d60208110156112b057600080fd5b5051949b939a50919850965091945092505050565b600354600160a060020a031681565b600d5481565b600654600a54101590565b6005806112f0610938565b60078111156112fb57fe5b1461130557600080fd5b34151561131157600080fd5b600d54604080517f66098d4f00000000000000000000000000000000000000000000000000000000815260048101929092523460248301525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b15801561138557600080fd5b505af4158015611399573d6000803e3d6000fd5b505050506040513d60208110156113af57600080fd5b5051600d5550565b600054600160a060020a031633146113ce57600080fd5b601355565b600054600160a060020a031681565b600080600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561143857600080fd5b505af115801561144c573d6000803e3d6000fd5b505050506040513d602081101561146257600080fd5b5051604080517f1d3b9edf00000000000000000000000000000000000000000000000000000000815260048101879052600a9290920a602483018190529051909250849173__contracts/SafeMathLib.sol:SafeMathLi__91631d3b9edf91604480820192602092909190829003018186803b1580156114e257600080fd5b505af41580156114f6573d6000803e3d6000fd5b505050506040513d602081101561150c57600080fd5b505181151561151757fe5b04949350505050565b600554600160a060020a031681565b60116020526000908152604090205481565b600060145483111561155557506001611559565b5060005b949350505050565b6000600460009054906101000a9004600160a060020a0316600160a060020a03166382771c8e6040518163ffffffff1660e060020a028152600401602060405180830381600087803b1580156108fa57600080fd5b60075481565b600f5460ff1681565b60005474010000000000000000000000000000000000000000900460ff1681565b60145481565b60126020526000908152604090205460ff1681565b600054600160a060020a0316331461161857600080fd5b60005474010000000000000000000000000000000000000000900460ff16151561164157600080fd5b6000805474ff000000000000000000000000000000000000000019169055565b601454600a54101590565b600080600080600080600080600080600060149054906101000a900460ff1615151561169757600080fd5b60028e6040518082805190602001908083835b602083106116c95780518252601f1990920191602091820191016116aa565b51815160209384036101000a600019018019909216911617905260405191909301945091925050808303816000865af115801561170a573d6000803e3d6000fd5b5050506040513d602081101561171f57600080fd5b5051985061172c8e610da6565b97509750975097509750670de0b6b3a76400009250339150349050601560009054906101000a9004600160a060020a0316600160a060020a031660018a8f8f8f604051600081526020016040526040518085600019166000191681526020018460ff1660ff1681526020018360001916600019168152602001826000191660001916815260200194505050505060206040516020810390808403906000865af11580156117dd573d6000803e3d6000fd5b50505060206040510351600160a060020a03161415156117fc57600080fd5b6002611806610938565b600781111561181157fe5b141561184357600160a060020a03821660009081526012602052604090205460ff16151561183e57600080fd5b61185f565b600361184d610938565b600781111561185857fe5b1415610221575b600160a060020a038216600090815260106020526040902054151561188857600c805460010190555b600160a060020a0382166000908152601060209081526040918290205482517f66098d4f000000000000000000000000000000000000000000000000000000008152600481019190915260248101849052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561191357600080fd5b505af4158015611927573d6000803e3d6000fd5b505050506040513d602081101561193d57600080fd5b5051600160a060020a03831660009081526010602090815260409182902092909255600a5481517f66098d4f000000000000000000000000000000000000000000000000000000008152600481019190915260248101849052905173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f9260448082019391829003018186803b1580156119cf57600080fd5b505af41580156119e3573d6000803e3d6000fd5b505050506040513d60208110156119f957600080fd5b5051600a819055600954611a119183918d9190611541565b15611a1b57600080fd5b3360009081526010602052604090205461271063ffffffff88168502041115611a4357600080fd5b3360009081526010602052604090205461271063ffffffff87168502041015611a6b57600080fd5b600554604051600160a060020a039091169082156108fc029083906000818181858888f193505050501515611a9f57600080fd5b60408051600160a060020a0384168152602081018390528082018c90526fffffffffffffffffffffffffffffffff891660608201526080810186905290517fb926bd06586c265869c2a70eaf4affb7b7b778b25883b85a123262d056f79c019181900360a00190a15060009d9c50505050505050505050505050565b600c5481565b600054600160a060020a03163314611b3857600080fd5b600160a060020a038216600081815260126020908152604091829020805460ff191685151590811790915582519384529083015280517fa54714518c5d275fdcd3d2a461e4858e4e8cb04fb93cd0bca9d6d34115f264409281900390910190a15050565b600054600160a060020a03163314611bb357600080fd5b600160a060020a0381161515611bc857600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600054600160a060020a03163314611c4757600080fd5b600154600c541115611c5857600080fd5b6005805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600b5481565b600254600160a060020a0316815600a165627a7a7230582005a68f2f1a7bf395ecb708187dfec7408bc250900ba183e4401870cbdb2acf960029", "bytecode_runtime": "0x6080604052600436106102215763ffffffff60e060020a600035041663015fa6c181146102265780630226401d14610240578063046dc16614610267578063062b01ce146102885780630a09284a146102b157806313f4e977146102c65780631865c57d146102db57806319b667da146103145780631aae34601461033557806321d5c0f6146103565780634042b66f146103875780634551dd591461039c5780634bb278f3146103b157806350c67734146103c6578063518ab2a8146103e7578063590e1ae3146103fc5780635b7633d0146104115780635da89ac0146104265780635ed7ca5b1461043b5780636203f09f146104505780636e50eb3f1461046557806373752db41461047d57806378b99c2414610523578063797d9437146105385780637c2e08a31461054d57806387612102146105625780638d51faec1461056a5780638da5cb5b14610582578063903cc583146105975780639075becf146105b257806397b150ca146105c75780639d3c663f146105e8578063a7ba44c314610609578063af4686821461061e578063b3f05b9714610633578063b9b8af0b14610648578063c80d36941461065d578063cb16e6d014610672578063cb3e64fd14610693578063d5d09021146106a8578063d7c7159c146106bd578063d7e64c0014610718578063eac249321461072d578063f2fde38b14610753578063f3283fba14610774578063f7c00e2f14610795578063fc0c546a146107aa575b600080fd5b34801561023257600080fd5b5061023e6004356107bf565b005b34801561024c57600080fd5b50610255610811565b60408051918252519081900360200190f35b34801561027357600080fd5b5061023e600160a060020a0360043516610817565b34801561029457600080fd5b5061029d610895565b604080519115158252519081900360200190f35b3480156102bd57600080fd5b5061025561092c565b3480156102d257600080fd5b50610255610932565b3480156102e757600080fd5b506102f0610938565b6040518082600781111561030057fe5b60ff16815260200191505060405180910390f35b34801561032057600080fd5b5061023e600160a060020a0360043516610954565b34801561034157600080fd5b50610255600160a060020a0360043516610a25565b34801561036257600080fd5b5061036b610a37565b60408051600160a060020a039092168252519081900360200190f35b34801561039357600080fd5b50610255610a46565b3480156103a857600080fd5b5061029d610a4c565b3480156103bd57600080fd5b5061023e610a51565b3480156103d257600080fd5b5061023e600160a060020a0360043516610b56565b3480156103f357600080fd5b50610255610b6d565b34801561040857600080fd5b5061023e610b73565b34801561041d57600080fd5b5061036b610ccf565b34801561043257600080fd5b50610255610cde565b34801561044757600080fd5b5061023e610ce4565b34801561045c57600080fd5b50610255610d32565b34801561047157600080fd5b5061023e600435610d38565b34801561048957600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526104d6943694929360249392840191908190840183828082843750949750610da69650505050505050565b60408051600160a060020a0390961686526fffffffffffffffffffffffffffffffff909416602086015263ffffffff92831685850152911660608401526080830152519081900360a00190f35b34801561052f57600080fd5b5061036b6112c5565b34801561054457600080fd5b506102556112d4565b34801561055957600080fd5b5061029d6112da565b61023e6112e5565b34801561057657600080fd5b5061023e6004356113b7565b34801561058e57600080fd5b5061036b6113d3565b3480156105a357600080fd5b506102556004356024356113e2565b3480156105be57600080fd5b5061036b611520565b3480156105d357600080fd5b50610255600160a060020a036004351661152f565b3480156105f457600080fd5b5061029d600435602435604435606435611541565b34801561061557600080fd5b5061029d611561565b34801561062a57600080fd5b506102556115b6565b34801561063f57600080fd5b5061029d6115bc565b34801561065457600080fd5b5061029d6115c5565b34801561066957600080fd5b506102556115e6565b34801561067e57600080fd5b5061029d600160a060020a03600435166115ec565b34801561069f57600080fd5b5061023e611601565b3480156106b457600080fd5b5061029d611661565b6040805160206004803580820135601f81018490048402850184019095528484526102559436949293602493928401919081908401838280828437509497505050833560ff169450505060208201359160400135905061166c565b34801561072457600080fd5b50610255611b1b565b34801561073957600080fd5b5061023e600160a060020a03600435166024351515611b21565b34801561075f57600080fd5b5061023e600160a060020a0360043516611b9c565b34801561078057600080fd5b5061023e600160a060020a0360043516611c30565b3480156107a157600080fd5b50610255611c87565b3480156107b657600080fd5b5061036b611c8d565b600054600160a060020a031633146107d657600080fd5b60148190556040805182815290517f3c8eb7c49d332f4c1e4d92a27cda93c31cc9452f7a408e0c6109fcddbc9946ea9181900360200190a150565b60135481565b600054600160a060020a0316331461082e57600080fd5b6015805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03838116919091179182905560408051929091168252517f5719a5656c5cfdaafa148ecf366fd3b0a7fae06449ce2a46225977fb7417e29d916020908290030190a150565b600354604080517f8e7682880000000000000000000000000000000000000000000000000000000081523060048201529051600092600160a060020a031691638e76828891602480830192602092919082900301818787803b1580156108fa57600080fd5b505af115801561090e573d6000803e3d6000fd5b505050506040513d602081101561092457600080fd5b505190505b90565b60085481565b60065481565b600060075442101561094c57506002610929565b506003610929565b600054600160a060020a0316331461096b57600080fd5b6004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383811691909117808355604080517f614cb9040000000000000000000000000000000000000000000000000000000081529051919092169263614cb904928082019260209290918290030181600087803b1580156109eb57600080fd5b505af11580156109ff573d6000803e3d6000fd5b505050506040513d6020811015610a1557600080fd5b50511515610a2257600080fd5b50565b60106020526000908152604090205481565b600454600160a060020a031681565b600a5481565b600190565b600480610a5c610938565b6007811115610a6757fe5b14610a7157600080fd5b600054600160a060020a03163314610a8857600080fd5b60005474010000000000000000000000000000000000000000900460ff1615610ab057600080fd5b600f5460ff1615610ac057600080fd5b600454600160a060020a031615610b465760048054604080517f0bf318a30000000000000000000000000000000000000000000000000000000081529051600160a060020a0390921692630bf318a392828201926000929082900301818387803b158015610b2d57600080fd5b505af1158015610b41573d6000803e3d6000fd5b505050505b50600f805460ff19166001179055565b600054600160a060020a03163314610a2257600080fd5b60095481565b6000600780610b80610938565b6007811115610b8b57fe5b14610b9557600080fd5b336000908152601060205260409020549150811515610bb357600080fd5b33600090815260106020908152604080832092909255600e5482517f66098d4f000000000000000000000000000000000000000000000000000000008152600481019190915260248101859052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b158015610c3a57600080fd5b505af4158015610c4e573d6000803e3d6000fd5b505050506040513d6020811015610c6457600080fd5b5051600e55604080513381526020810184905281517fbb28353e4598c3b9199101a66e0989549b659a59a54d2c27fbb183f1932c8e6d929181900390910190a1604051339083156108fc029084906000818181858888f193505050501515610ccb57600080fd5b5050565b601554600160a060020a031681565b600e5481565b600054600160a060020a03163314610cfb57600080fd5b6000805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b60015481565b600054600160a060020a03163314610d4f57600080fd5b80421115610d5c57600080fd5b806007541115610d6b57600080fd5b60088190556040805182815290517fd34bb772c4ae9baa99db852f622773b31c7827e8ee818449fef20d30980bd3109181900360200190a150565b6000806000806000806000806000808a73__contracts/BytesDeserializer.sol:Byte__63b655e138909160006040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b83811015610e29578181015183820152602001610e11565b50505050905090810190601f168015610e565780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b158015610e7457600080fd5b505af4158015610e88573d6000803e3d6000fd5b505050506040513d6020811015610e9e57600080fd5b810190808051906020019092919050505094508a73__contracts/BytesDeserializer.sol:Byte__6316419aa7909160146040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b83811015610f25578181015183820152602001610f0d565b50505050905090810190601f168015610f525780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b158015610f7057600080fd5b505af4158015610f84573d6000803e3d6000fd5b505050506040513d6020811015610f9a57600080fd5b8101908080519060200190929190505050700100000000000000000000000000000000900493508a73__contracts/BytesDeserializer.sol:Byte__63d54dd8f9909160246040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b8381101561103557818101518382015260200161101d565b50505050905090810190601f1680156110625780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b15801561108057600080fd5b505af4158015611094573d6000803e3d6000fd5b505050506040513d60208110156110aa57600080fd5b810190808051906020019092919050505060e060020a900492508a73__contracts/BytesDeserializer.sol:Byte__63d54dd8f9909160286040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b83811015611138578181015183820152602001611120565b50505050905090810190601f1680156111655780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b15801561118357600080fd5b505af4158015611197573d6000803e3d6000fd5b505050506040513d60208110156111ad57600080fd5b810190808051906020019092919050505060e060020a900491508a73__contracts/BytesDeserializer.sol:Byte__632e1eb7fe9091602c6040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b8381101561123b578181015183820152602001611223565b50505050905090810190601f1680156112685780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b15801561128657600080fd5b505af415801561129a573d6000803e3d6000fd5b505050506040513d60208110156112b057600080fd5b5051949b939a50919850965091945092505050565b600354600160a060020a031681565b600d5481565b600654600a54101590565b6005806112f0610938565b60078111156112fb57fe5b1461130557600080fd5b34151561131157600080fd5b600d54604080517f66098d4f00000000000000000000000000000000000000000000000000000000815260048101929092523460248301525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b15801561138557600080fd5b505af4158015611399573d6000803e3d6000fd5b505050506040513d60208110156113af57600080fd5b5051600d5550565b600054600160a060020a031633146113ce57600080fd5b601355565b600054600160a060020a031681565b600080600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561143857600080fd5b505af115801561144c573d6000803e3d6000fd5b505050506040513d602081101561146257600080fd5b5051604080517f1d3b9edf00000000000000000000000000000000000000000000000000000000815260048101879052600a9290920a602483018190529051909250849173__contracts/SafeMathLib.sol:SafeMathLi__91631d3b9edf91604480820192602092909190829003018186803b1580156114e257600080fd5b505af41580156114f6573d6000803e3d6000fd5b505050506040513d602081101561150c57600080fd5b505181151561151757fe5b04949350505050565b600554600160a060020a031681565b60116020526000908152604090205481565b600060145483111561155557506001611559565b5060005b949350505050565b6000600460009054906101000a9004600160a060020a0316600160a060020a03166382771c8e6040518163ffffffff1660e060020a028152600401602060405180830381600087803b1580156108fa57600080fd5b60075481565b600f5460ff1681565b60005474010000000000000000000000000000000000000000900460ff1681565b60145481565b60126020526000908152604090205460ff1681565b600054600160a060020a0316331461161857600080fd5b60005474010000000000000000000000000000000000000000900460ff16151561164157600080fd5b6000805474ff000000000000000000000000000000000000000019169055565b601454600a54101590565b600080600080600080600080600080600060149054906101000a900460ff1615151561169757600080fd5b60028e6040518082805190602001908083835b602083106116c95780518252601f1990920191602091820191016116aa565b51815160209384036101000a600019018019909216911617905260405191909301945091925050808303816000865af115801561170a573d6000803e3d6000fd5b5050506040513d602081101561171f57600080fd5b5051985061172c8e610da6565b97509750975097509750670de0b6b3a76400009250339150349050601560009054906101000a9004600160a060020a0316600160a060020a031660018a8f8f8f604051600081526020016040526040518085600019166000191681526020018460ff1660ff1681526020018360001916600019168152602001826000191660001916815260200194505050505060206040516020810390808403906000865af11580156117dd573d6000803e3d6000fd5b50505060206040510351600160a060020a03161415156117fc57600080fd5b6002611806610938565b600781111561181157fe5b141561184357600160a060020a03821660009081526012602052604090205460ff16151561183e57600080fd5b61185f565b600361184d610938565b600781111561185857fe5b1415610221575b600160a060020a038216600090815260106020526040902054151561188857600c805460010190555b600160a060020a0382166000908152601060209081526040918290205482517f66098d4f000000000000000000000000000000000000000000000000000000008152600481019190915260248101849052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561191357600080fd5b505af4158015611927573d6000803e3d6000fd5b505050506040513d602081101561193d57600080fd5b5051600160a060020a03831660009081526010602090815260409182902092909255600a5481517f66098d4f000000000000000000000000000000000000000000000000000000008152600481019190915260248101849052905173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f9260448082019391829003018186803b1580156119cf57600080fd5b505af41580156119e3573d6000803e3d6000fd5b505050506040513d60208110156119f957600080fd5b5051600a819055600954611a119183918d9190611541565b15611a1b57600080fd5b3360009081526010602052604090205461271063ffffffff88168502041115611a4357600080fd5b3360009081526010602052604090205461271063ffffffff87168502041015611a6b57600080fd5b600554604051600160a060020a039091169082156108fc029083906000818181858888f193505050501515611a9f57600080fd5b60408051600160a060020a0384168152602081018390528082018c90526fffffffffffffffffffffffffffffffff891660608201526080810186905290517fb926bd06586c265869c2a70eaf4affb7b7b778b25883b85a123262d056f79c019181900360a00190a15060009d9c50505050505050505050505050565b600c5481565b600054600160a060020a03163314611b3857600080fd5b600160a060020a038216600081815260126020908152604091829020805460ff191685151590811790915582519384529083015280517fa54714518c5d275fdcd3d2a461e4858e4e8cb04fb93cd0bca9d6d34115f264409281900390910190a15050565b600054600160a060020a03163314611bb357600080fd5b600160a060020a0381161515611bc857600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600054600160a060020a03163314611c4757600080fd5b600154600c541115611c5857600080fd5b6005805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600b5481565b600254600160a060020a0316815600a165627a7a7230582005a68f2f1a7bf395ecb708187dfec7408bc250900ba183e4401870cbdb2acf960029", "direct_dependencies": ["BytesDeserializer", "SafeMathLib"], "full_dependencies": ["BytesDeserializer", "SafeMathLib"], "linkrefs": [{"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 7664}, {"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 8168}, {"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 8712}, {"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 9230}, {"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 9748}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 6792}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 10520}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 11216}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 13370}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 13748}], "linkrefs_runtime": [{"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 7024}, {"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 7528}, {"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 8072}, {"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 8590}, {"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 9108}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 6152}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 9880}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 10576}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 12730}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 13108}], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": false, "inputs": [{"name": "newCap", "type": "uint256"}], "name": "setWeiCap", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "ownerTestValue", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_signerAddress", "type": "address"}], "name": "setSignerAddress", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "isPricingSane", "outputs": [{"name": "sane", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "endsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "minimumFundingGoal", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getState", "outputs": [{"name": "", "type": "uint8"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setFinalizeAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "investedAmountOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "finalizeAgent", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "weiRaised", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isCrowdsale", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "finalize", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_pricingStrategy", "type": "address"}], "name": "setPricingStrategy", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "tokensSold", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "refund", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "signerAddress", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "weiRefunded", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "halt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "time", "type": "uint256"}], "name": "setEndsAt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "dataframe", "type": "bytes"}], "name": "getKYCPayload", "outputs": [{"name": "whitelistedAddress", "type": "address"}, {"name": "customerId", "type": "uint128"}, {"name": "minEth", "type": "uint32"}, {"name": "maxEth", "type": "uint32"}, {"name": "pricingInfo", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "pricingStrategy", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "loadedRefund", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isMinimumGoalReached", "outputs": [{"name": "reached", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "loadRefund", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "val", "type": "uint256"}], "name": "setOwnerTestValue", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "weisTotal", "type": "uint256"}, {"name": "pricePerToken", "type": "uint256"}], "name": "calculateTokens", "outputs": [{"name": "tokensTotal", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "multisigWallet", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "tokenAmountOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "weiAmount", "type": "uint256"}, {"name": "tokenAmount", "type": "uint256"}, {"name": "weiRaisedTotal", "type": "uint256"}, {"name": "tokensSoldTotal", "type": "uint256"}], "name": "isBreakingCap", "outputs": [{"name": "limitBroken", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isFinalizerSane", "outputs": [{"name": "sane", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "startsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "finalized", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "halted", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "saleWeiCap", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "earlyParticipantWhitelist", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "unhalt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "isCrowdsaleFull", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "dataframe", "type": "bytes"}, {"name": "v", "type": "uint8"}, {"name": "r", "type": "bytes32"}, {"name": "s", "type": "bytes32"}], "name": "buyWithKYCData", "outputs": [{"name": "tokenAmount", "type": "uint256"}], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "investorCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "status", "type": "bool"}], "name": "setEarlyParicipantWhitelist", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setMultisig", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "presaleWeiRaised", "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": "_multisigWallet", "type": "address"}, {"name": "_start", "type": "uint256"}, {"name": "_end", "type": "uint256"}, {"name": "_saleWeiCap", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"payable": true, "stateMutability": "payable", "type": "fallback"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "signer", "type": "address"}], "name": "SignerChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}, {"indexed": false, "name": "tokenAmount", "type": "uint256"}, {"indexed": false, "name": "customerId", "type": "uint128"}, {"indexed": false, "name": "pricingInfo", "type": "uint256"}], "name": "Prepurchased", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newCap", "type": "uint256"}], "name": "CapUpdated", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}, {"indexed": false, "name": "tokenAmount", "type": "uint256"}, {"indexed": false, "name": "customerId", "type": "uint128"}], "name": "Invested", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}], "name": "Refund", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newRequireCustomerId", "type": "bool"}, {"indexed": false, "name": "newRequiredSignedAddress", "type": "bool"}, {"indexed": false, "name": "newSignerAddress", "type": "address"}], "name": "InvestmentPolicyChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "addr", "type": "address"}, {"indexed": false, "name": "status", "type": "bool"}], "name": "Whitelisted", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newEndsAt", "type": "uint256"}], "name": "EndsAtChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "devdoc": {"methods": {"calculateTokens(uint256,uint256)": {"details": "Calculate tokens user will have for their purchase", "params": {"pricePerToken": "What is the price for one token", "weisTotal": "How much ethers (in wei) the user putssssss in"}, "return": "tokensTotal which is received tokens, token decimals included"}, "isMinimumGoalReached()": {"return": "true if the crowdsale has raised enough money to be a successful."}, "setPricingStrategy(address)": {"details": "Because we do not have token price set in presale, we do nothing. This will be removed in the future versions."}, "setSignerAddress(address)": {"details": "This function can set the server side address", "params": {"_signerAddress": "The address derived from server's private key"}}, "transferOwnership(address)": {"details": "Allows the current owner to transfer control of the contract to a newOwner.", "params": {"newOwner": "The address to transfer ownership to."}}}}, "userdoc": {"methods": {"buyWithKYCData(bytes,uint8,bytes32,bytes32)": {"notice": "A token purchase with anti-money laundering * \u00a9return tokenAmount How many tokens where bought"}, "finalize()": {"notice": "Finalize a succcesful crowdsale. * The owner can triggre a call the contract that provides post-crowdsale actions, like releasing the tokens."}, "getKYCPayload(bytes)": {"notice": "Same as above, but with pricing information included in the payload as the last integer.In a long run, deprecate the legacy methods above and only use this payload."}, "getState()": {"notice": "Presale state machine management. * Presale cannot fail; it is running until manually ended. "}, "isBreakingCap(uint256,uint256,uint256,uint256)": {"notice": "Called from invest() to confirm if the curret investment does not break our cap rule."}, "isCrowdsale()": {"notice": "Interface marker. "}, "isCrowdsaleFull()": {"notice": "We are sold out when our approve pool becomes empty."}, "isFinalizerSane()": {"notice": "Check if the contract relationship looks good."}, "isPricingSane()": {"notice": "Check if the contract relationship looks good."}, "loadRefund()": {"notice": "Allow load refunds back on the contract for the refunding. * The team can transfer the funds back on the smart contract in the case the minimum goal was not reached.."}, "refund()": {"notice": "Investors can claim refund. * Note that any refunds from proxy buyers should be handled separately, and not through this contract."}, "setEarlyParicipantWhitelist(address,bool)": {"notice": "Allow addresses to do early participation. * TODO: Fix spelling error in the name"}, "setEndsAt(uint256)": {"notice": "Allow crowdsale owner to close early or extend the crowdsale. * This is useful e.g. for a manual soft cap implementation: - after X amount is reached determine manual closing * This may put the crowdsale to an invalid state, but we trust owners know what they are doing. "}, "setFinalizeAgent(address)": {"notice": "Allow to (re)set finalize agent. * Design choice: no state restrictions on setting this, so that we can fix fat finger mistakes."}, "setMultisig(address)": {"notice": "Allow to change the team multisig address in the case of emergency. * This allows to save a deployed crowdsale wallet in the case the crowdsale has not yet begun (we have done only few test transactions). After the crowdsale is going then multisig address stays locked for the safety reasons."}, "setOwnerTestValue(uint256)": {"notice": "This is for manual testing of multisig wallet interaction "}, "setPricingStrategy(address)": {"notice": "Allow to (re)set pricing strategy."}, "setWeiCap(uint256)": {"notice": "Allow owner to adjust the cap during the presale. * This allows e.g. US dollar pegged caps."}}}}, "settings": {"compilationTarget": {"contracts/KYCPresale.sol": "KYCPresale"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/BytesDeserializer.sol": {"keccak256": "0xdd1718e5ea778d4dd36ccb98336360536beffdffd152bd9fb035124835fa4765", "urls": ["bzzr://ee94acd8149a77baf3f6881b995d1e9eba68c3225b2fe666dc0d402e0b68c5ce"]}, "contracts/CrowdsaleBase.sol": {"keccak256": "0xe2c9ed11183ce705616980df7b02544d72fe18b40395da7d9d4bcb621fb87871", "urls": ["bzzr://07f3887ba0d0eb3248b1ad3581480ed71a2fe70a47dcc283c4e97c8c92e0790a"]}, "contracts/FinalizeAgent.sol": {"keccak256": "0x309fd0510e0b3e2b5044e33f7c80cfb2d6f2a5697e41a5f185931d65770cfea9", "urls": ["bzzr://4e7ed6f82c0f542e92e56c12566b2ecd7666730865bf12566c27587ec64160ac"]}, "contracts/FractionalERC20.sol": {"keccak256": "0x75bc4ad90a8b13ce961c89b1bf405776f616e019d3a2720168f8e52be223198f", "urls": ["bzzr://6a3688f12da1a5c890ef06f80f883f6c5370886092d38a1b33cd4219b718478b"]}, "contracts/Haltable.sol": {"keccak256": "0x265dcf25e7c9ab4b6eecd2181f1b71334a1b5381a60f8db7d9526dab120f4b70", "urls": ["bzzr://d522e00fa9e075941469dd81738b59fdb99ce3c12cdc39e33abe40b588c4da9b"]}, "contracts/KYCPayloadDeserializer.sol": {"keccak256": "0x4dbf491aa75393638028f16bedbc395bbec6beb6721ed5d569a18da089faf182", "urls": ["bzzr://a9b13fd13eda2199df6497108c1a0313d1ce91366a48f8650d647a0d86c43c6c"]}, "contracts/KYCPresale.sol": {"keccak256": "0xe12e36f3f688289c03bf0a98f7e90162687eb2278463e0eb9b0a90384c2ff2eb", "urls": ["bzzr://fc823c4e1ffc92d3c021b16fae52154bd20e721c4eecba804d4bcd2dd6469086"]}, "contracts/PricingStrategy.sol": {"keccak256": "0x8df5093b7d07168ad994f9176de0bd2268f6563b1e8a3a448d8cfe7fe246c628", "urls": ["bzzr://ef5c944d51f739ab34e2c951d6ac82a7152e6bb844058a8e57bae52c14cbe16b"]}, "contracts/SafeMathLib.sol": {"keccak256": "0x501bfe31e274b9a5591f7c540bdced4d4312e27d4f19599147c9bbca3d9c6b18", "urls": ["bzzr://a80935ebddb06c247d71372d4e5833ee029f08633bd0fe4a274a57009567e5b9"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}}, "version": 1}, "name": "KYCPresale", "ordered_full_dependencies": ["BytesDeserializer", "SafeMathLib"], "source_path": "contracts/KYCPresale.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n/*\n * Haltable\n *\n * Abstract contract that allows children to implement an\n * emergency stop mechanism. Differs from Pausable by causing a throw when in halt mode.\n *\n *\n * Originally envisioned in FirstBlood ICO contract.\n */\ncontract Haltable is Ownable {\n bool public halted;\n\n modifier stopInEmergency {\n if (halted) throw;\n _;\n }\n\n modifier stopNonOwnersInEmergency {\n if (halted && msg.sender != owner) throw;\n _;\n }\n\n modifier onlyInEmergency {\n if (!halted) throw;\n _;\n }\n\n // called by the owner on emergency, triggers stopped state\n function halt() external onlyOwner {\n halted = true;\n }\n\n // called by the owner on end of emergency, returns to normal state\n function unhalt() external onlyOwner onlyInEmergency {\n halted = false;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Safe unsigned safe math.\n *\n * https://blog.aragon.one/library-driven-development-in-solidity-2bebcaf88736#.750gwtwli\n *\n * Originally from https://raw.githubusercontent.com/AragonOne/zeppelin-solidity/master/contracts/SafeMathLib.sol\n *\n * Maintained here until merged to mainline zeppelin-solidity.\n *\n */\nlibrary SafeMathLib {\n\n function times(uint a, uint b) returns (uint) {\n uint c = a * b;\n assert(a == 0 || c / a == b);\n return c;\n }\n\n function minus(uint a, uint b) returns (uint) {\n assert(b <= a);\n return a - b;\n }\n\n function plus(uint a, uint b) returns (uint) {\n uint c = a + b;\n assert(c>=a);\n return c;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n\n/**\n * A token that defines fractional units as decimals.\n */\ncontract FractionalERC20 is ERC20 {\n\n uint public decimals;\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Interface for defining crowdsale pricing.\n */\ncontract PricingStrategy {\n\n /** Interface declaration. */\n function isPricingStrategy() public constant returns (bool) {\n return true;\n }\n\n /** Self check if all references are correctly set.\n *\n * Checks that pricing strategy matches crowdsale parameters.\n */\n function isSane(address crowdsale) public constant returns (bool) {\n return true;\n }\n\n /**\n * @dev Pricing tells if this is a presale purchase or not.\n @param purchaser Address of the purchaser\n @return False by default, true if a presale purchaser\n */\n function isPresalePurchase(address purchaser) public constant returns (bool) {\n return false;\n }\n\n /**\n * When somebody tries to buy tokens for X eth, calculate how many tokens they get.\n *\n *\n * @param value - What is the value of the transaction send in as wei\n * @param tokensSold - how much tokens have been sold this far\n * @param weiRaised - how much money has been raised this far in the main token sale - this number excludes presale\n * @param msgSender - who is the investor of this transaction\n * @param decimals - how many decimal units the token has\n * @return Amount of tokens the investor receives\n */\n function calculatePrice(uint value, uint weiRaised, uint tokensSold, address msgSender, uint decimals) public constant returns (uint tokenAmount);\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Finalize agent defines what happens at the end of succeseful crowdsale.\n *\n * - Allocate tokens for founders, bounties and community\n * - Make tokens transferable\n * - etc.\n */\ncontract FinalizeAgent {\n\n function isFinalizeAgent() public constant returns(bool) {\n return true;\n }\n\n /** Return true if we can run finalizeCrowdsale() properly.\n *\n * This is a safety check function that doesn't allow crowdsale to begin\n * unless the finalizer has been set up properly.\n */\n function isSane() public constant returns (bool);\n\n /** Called once by crowdsale finalize() if the sale was success. */\n function finalizeCrowdsale();\n\n}\n\n\n\n/**\n * Crowdsale state machine without buy functionality.\n *\n * Implements basic state machine logic, but leaves out all buy functions,\n * so that subclasses can implement their own buying logic.\n *\n *\n * For the default buy() implementation see Crowdsale.sol.\n */\ncontract CrowdsaleBase is Haltable {\n\n /* Max investment count when we are still allowed to change the multisig address */\n uint public MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE = 5;\n\n using SafeMathLib for uint;\n\n /* The token we are selling */\n FractionalERC20 public token;\n\n /* How we are going to price our offering */\n PricingStrategy public pricingStrategy;\n\n /* Post-success callback */\n FinalizeAgent public finalizeAgent;\n\n /* tokens will be transfered from this address */\n address public multisigWallet;\n\n /* if the funding goal is not reached, investors may withdraw their funds */\n uint public minimumFundingGoal;\n\n /* the UNIX timestamp start date of the crowdsale */\n uint public startsAt;\n\n /* the UNIX timestamp end date of the crowdsale */\n uint public endsAt;\n\n /* the number of tokens already sold through this contract*/\n uint public tokensSold = 0;\n\n /* How many wei of funding we have raised */\n uint public weiRaised = 0;\n\n /* Calculate incoming funds from presale contracts and addresses */\n uint public presaleWeiRaised = 0;\n\n /* How many distinct addresses have invested */\n uint public investorCount = 0;\n\n /* How much wei we have returned back to the contract after a failed crowdfund. */\n uint public loadedRefund = 0;\n\n /* How much wei we have given back to investors.*/\n uint public weiRefunded = 0;\n\n /* Has this crowdsale been finalized */\n bool public finalized;\n\n /** How much ETH each address has invested to this crowdsale */\n mapping (address => uint256) public investedAmountOf;\n\n /** How much tokens this crowdsale has credited for each investor address */\n mapping (address => uint256) public tokenAmountOf;\n\n /** Addresses that are allowed to invest even before ICO offical opens. For testing, for ICO partners, etc. */\n mapping (address => bool) public earlyParticipantWhitelist;\n\n /** This is for manul testing for the interaction from owner wallet. You can set it to any value and inspect this in blockchain explorer to see that crowdsale interaction works. */\n uint public ownerTestValue;\n\n /** State machine\n *\n * - Preparing: All contract initialization calls and variables have not been set yet\n * - Prefunding: We have not passed start time yet\n * - Funding: Active crowdsale\n * - Success: Minimum funding goal reached\n * - Failure: Minimum funding goal not reached before ending time\n * - Finalized: The finalized has been called and succesfully executed\n * - Refunding: Refunds are loaded on the contract for reclaim.\n */\n enum State{Unknown, Preparing, PreFunding, Funding, Success, Failure, Finalized, Refunding}\n\n // A new investment was made\n event Invested(address investor, uint weiAmount, uint tokenAmount, uint128 customerId);\n\n // Refund was processed for a contributor\n event Refund(address investor, uint weiAmount);\n\n // The rules were changed what kind of investments we accept\n event InvestmentPolicyChanged(bool newRequireCustomerId, bool newRequiredSignedAddress, address newSignerAddress);\n\n // Address early participation whitelist status changed\n event Whitelisted(address addr, bool status);\n\n // Crowdsale end time has been changed\n event EndsAtChanged(uint newEndsAt);\n\n function CrowdsaleBase(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal) {\n\n owner = msg.sender;\n\n token = FractionalERC20(_token);\n setPricingStrategy(_pricingStrategy);\n\n multisigWallet = _multisigWallet;\n if(multisigWallet == 0) {\n throw;\n }\n\n if(_start == 0) {\n throw;\n }\n\n startsAt = _start;\n\n if(_end == 0) {\n throw;\n }\n\n endsAt = _end;\n\n // Don't mess the dates\n if(startsAt >= endsAt) {\n throw;\n }\n\n // Minimum funding goal can be zero\n minimumFundingGoal = _minimumFundingGoal;\n }\n\n /**\n * Don't expect to just send in money and get tokens.\n */\n function() payable {\n throw;\n }\n\n /**\n * @dev Make an investment.\n *\n * Crowdsale must be running for one to invest.\n * We must have not pressed the emergency brake.\n *\n * @param receiver The Ethereum address who receives the tokens\n * @param customerId (optional) UUID v4 to track the successful payments on the server side'\n * @param tokenAmount Amount of tokens which be credited to receiver\n *\n * @return tokensBought How mony tokens were bought\n */\n function buyTokens(address receiver, uint128 customerId, uint256 tokenAmount) stopInEmergency internal returns(uint tokensBought) {\n\n // Determine if it's a good time to accept investment from this participant\n if(getState() == State.PreFunding) {\n // Are we whitelisted for early deposit\n if(!earlyParticipantWhitelist[receiver]) {\n throw;\n }\n } else if(getState() == State.Funding) {\n // Retail participants can only come in when the crowdsale is running\n // pass\n } else {\n // Unwanted state\n throw;\n }\n\n uint weiAmount = msg.value;\n\n // Dust transaction\n require(tokenAmount != 0);\n\n if(investedAmountOf[receiver] == 0) {\n // A new investor\n investorCount++;\n }\n\n // Update investor\n investedAmountOf[receiver] = investedAmountOf[receiver].plus(weiAmount);\n tokenAmountOf[receiver] = tokenAmountOf[receiver].plus(tokenAmount);\n\n // Update totals\n weiRaised = weiRaised.plus(weiAmount);\n tokensSold = tokensSold.plus(tokenAmount);\n\n if(pricingStrategy.isPresalePurchase(receiver)) {\n presaleWeiRaised = presaleWeiRaised.plus(weiAmount);\n }\n\n // Check that we did not bust the cap\n require(!isBreakingCap(weiAmount, tokenAmount, weiRaised, tokensSold));\n\n assignTokens(receiver, tokenAmount);\n\n // Pocket the money, or fail the crowdsale if we for some reason cannot send the money to our multisig\n if(!multisigWallet.send(weiAmount)) throw;\n\n // Tell us invest was success\n Invested(receiver, weiAmount, tokenAmount, customerId);\n\n return tokenAmount;\n }\n\n /**\n * @dev Make an investment based on pricing strategy\n *\n * This is a wrapper for buyTokens(), but the amount of tokens receiver will\n * have depends on the pricing strategy used.\n *\n * @param receiver The Ethereum address who receives the tokens\n * @param customerId (optional) UUID v4 to track the successful payments on the server side'\n *\n * @return tokensBought How mony tokens were bought\n */\n function investInternal(address receiver, uint128 customerId) stopInEmergency internal returns(uint tokensBought) {\n return buyTokens(receiver, customerId, pricingStrategy.calculatePrice(msg.value, weiRaised - presaleWeiRaised, tokensSold, msg.sender, token.decimals()));\n }\n\n /**\n * @dev Calculate tokens user will have for their purchase\n *\n * @param weisTotal How much ethers (in wei) the user putssssss in\n * @param pricePerToken What is the price for one token\n *\n * @return tokensTotal which is received tokens, token decimals included\n */\n function calculateTokens(uint256 weisTotal, uint256 pricePerToken) public constant returns(uint tokensTotal) {\n // pricePerToken is how many full tokens, token decimal place included, you get for wei amount.\n // Because, in theory, decimal amount can vary, we do the exponent calculation here,\n // though gas wise using 10**18 constant would be much simpler.\n // Furthermore we could use rough amounts and take in raw wei per tokens amount,\n // but we lose too much accuracy for generic calculations, thus all these are\n // practically implemented as 10**18 fixed points.\n uint multiplier = 10 ** token.decimals();\n return weisTotal.times(multiplier)/pricePerToken;\n }\n\n /**\n * Finalize a succcesful crowdsale.\n *\n * The owner can triggre a call the contract that provides post-crowdsale actions, like releasing the tokens.\n */\n function finalize() public inState(State.Success) onlyOwner stopInEmergency {\n\n // Already finalized\n if(finalized) {\n throw;\n }\n\n // Finalizing is optional. We only call it if we are given a finalizing agent.\n if(address(finalizeAgent) != 0) {\n finalizeAgent.finalizeCrowdsale();\n }\n\n finalized = true;\n }\n\n /**\n * Allow to (re)set finalize agent.\n *\n * Design choice: no state restrictions on setting this, so that we can fix fat finger mistakes.\n */\n function setFinalizeAgent(FinalizeAgent addr) onlyOwner {\n finalizeAgent = addr;\n\n // Don't allow setting bad agent\n if(!finalizeAgent.isFinalizeAgent()) {\n throw;\n }\n }\n\n /**\n * Allow crowdsale owner to close early or extend the crowdsale.\n *\n * This is useful e.g. for a manual soft cap implementation:\n * - after X amount is reached determine manual closing\n *\n * This may put the crowdsale to an invalid state,\n * but we trust owners know what they are doing.\n *\n */\n function setEndsAt(uint time) onlyOwner {\n\n if(now > time) {\n throw; // Don't change past\n }\n\n if(startsAt > time) {\n throw; // Prevent human mistakes\n }\n\n endsAt = time;\n EndsAtChanged(endsAt);\n }\n\n /**\n * Allow to (re)set pricing strategy.\n *\n * Design choice: no state restrictions on the set, so that we can fix fat finger mistakes.\n */\n function setPricingStrategy(PricingStrategy _pricingStrategy) onlyOwner {\n pricingStrategy = _pricingStrategy;\n\n // Don't allow setting bad agent\n if(!pricingStrategy.isPricingStrategy()) {\n throw;\n }\n }\n\n /**\n * Allow to change the team multisig address in the case of emergency.\n *\n * This allows to save a deployed crowdsale wallet in the case the crowdsale has not yet begun\n * (we have done only few test transactions). After the crowdsale is going\n * then multisig address stays locked for the safety reasons.\n */\n function setMultisig(address addr) public onlyOwner {\n\n // Change\n if(investorCount > MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE) {\n throw;\n }\n\n multisigWallet = addr;\n }\n\n /**\n * Allow load refunds back on the contract for the refunding.\n *\n * The team can transfer the funds back on the smart contract in the case the minimum goal was not reached..\n */\n function loadRefund() public payable inState(State.Failure) {\n if(msg.value == 0) throw;\n loadedRefund = loadedRefund.plus(msg.value);\n }\n\n /**\n * Investors can claim refund.\n *\n * Note that any refunds from proxy buyers should be handled separately,\n * and not through this contract.\n */\n function refund() public inState(State.Refunding) {\n uint256 weiValue = investedAmountOf[msg.sender];\n if (weiValue == 0) throw;\n investedAmountOf[msg.sender] = 0;\n weiRefunded = weiRefunded.plus(weiValue);\n Refund(msg.sender, weiValue);\n if (!msg.sender.send(weiValue)) throw;\n }\n\n /**\n * @return true if the crowdsale has raised enough money to be a successful.\n */\n function isMinimumGoalReached() public constant returns (bool reached) {\n return weiRaised >= minimumFundingGoal;\n }\n\n /**\n * Check if the contract relationship looks good.\n */\n function isFinalizerSane() public constant returns (bool sane) {\n return finalizeAgent.isSane();\n }\n\n /**\n * Check if the contract relationship looks good.\n */\n function isPricingSane() public constant returns (bool sane) {\n return pricingStrategy.isSane(address(this));\n }\n\n /**\n * Crowdfund state machine management.\n *\n * We make it a function and do not assign the result to a variable, so there is no chance of the variable being stale.\n */\n function getState() public constant returns (State) {\n if(finalized) return State.Finalized;\n else if (address(finalizeAgent) == 0) return State.Preparing;\n else if (!finalizeAgent.isSane()) return State.Preparing;\n else if (!pricingStrategy.isSane(address(this))) return State.Preparing;\n else if (block.timestamp < startsAt) return State.PreFunding;\n else if (block.timestamp <= endsAt && !isCrowdsaleFull()) return State.Funding;\n else if (isMinimumGoalReached()) return State.Success;\n else if (!isMinimumGoalReached() && weiRaised > 0 && loadedRefund >= weiRaised) return State.Refunding;\n else return State.Failure;\n }\n\n /** This is for manual testing of multisig wallet interaction */\n function setOwnerTestValue(uint val) onlyOwner {\n ownerTestValue = val;\n }\n\n /**\n * Allow addresses to do early participation.\n *\n * TODO: Fix spelling error in the name\n */\n function setEarlyParicipantWhitelist(address addr, bool status) onlyOwner {\n earlyParticipantWhitelist[addr] = status;\n Whitelisted(addr, status);\n }\n\n\n /** Interface marker. */\n function isCrowdsale() public constant returns (bool) {\n return true;\n }\n\n //\n // Modifiers\n //\n\n /** Modified allowing execution only if the crowdsale is currently running. */\n modifier inState(State state) {\n if(getState() != state) throw;\n _;\n }\n\n\n //\n // Abstract functions\n //\n\n /**\n * Check if the current invested breaks our cap rules.\n *\n *\n * The child contract must define their own cap setting rules.\n * We allow a lot of flexibility through different capping strategies (ETH, token count)\n * Called from invest().\n *\n * @param weiAmount The amount of wei the investor tries to invest in the current transaction\n * @param tokenAmount The amount of tokens we try to give to the investor in the current transaction\n * @param weiRaisedTotal What would be our total raised balance after this transaction\n * @param tokensSoldTotal What would be our total sold tokens count after this transaction\n *\n * @return true if taking this investment would break our cap rules\n */\n function isBreakingCap(uint weiAmount, uint tokenAmount, uint weiRaisedTotal, uint tokensSoldTotal) constant returns (bool limitBroken);\n\n /**\n * Check if the current crowdsale is full and we can no longer sell any tokens.\n */\n function isCrowdsaleFull() public constant returns (bool);\n\n /**\n * Create new tokens or transfer issued tokens to the investor depending on the cap model.\n */\n function assignTokens(address receiver, uint tokenAmount) internal;\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n/**\n * Deserialize bytes payloads.\n *\n * Values are in big-endian byte order.\n *\n */\nlibrary BytesDeserializer {\n\n /**\n * Extract 256-bit worth of data from the bytes stream.\n */\n function slice32(bytes b, uint offset) constant returns (bytes32) {\n bytes32 out;\n\n for (uint i = 0; i < 32; i++) {\n out |= bytes32(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n /**\n * Extract Ethereum address worth of data from the bytes stream.\n */\n function sliceAddress(bytes b, uint offset) constant returns (address) {\n bytes32 out;\n\n for (uint i = 0; i < 20; i++) {\n out |= bytes32(b[offset + i] & 0xFF) >> ((i+12) * 8);\n }\n return address(uint(out));\n }\n\n /**\n * Extract 128-bit worth of data from the bytes stream.\n */\n function slice16(bytes b, uint offset) constant returns (bytes16) {\n bytes16 out;\n\n for (uint i = 0; i < 16; i++) {\n out |= bytes16(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n /**\n * Extract 32-bit worth of data from the bytes stream.\n */\n function slice4(bytes b, uint offset) constant returns (bytes4) {\n bytes4 out;\n\n for (uint i = 0; i < 4; i++) {\n out |= bytes4(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n /**\n * Extract 16-bit worth of data from the bytes stream.\n */\n function slice2(bytes b, uint offset) constant returns (bytes2) {\n bytes2 out;\n\n for (uint i = 0; i < 2; i++) {\n out |= bytes2(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n\n\n}\n\n\n/**\n * A mix-in contract to decode different signed KYC payloads.\n *\n * @notice This should be a library, but for the complexity and toolchain fragility risks involving of linking library inside library, we currently use this as a helper method mix-in.\n */\ncontract KYCPayloadDeserializer {\n\n using BytesDeserializer for bytes;\n\n // @notice this struct describes what kind of data we include in the payload, we do not use this directly\n // The bytes payload set on the server side\n // total 56 bytes\n struct KYCPayload {\n\n /** Customer whitelisted address where the deposit can come from */\n address whitelistedAddress; // 20 bytes\n\n /** Customer id, UUID v4 */\n uint128 customerId; // 16 bytes\n\n /**\n * Min amount this customer needs to invest in ETH. Set zero if no minimum. Expressed as parts of 10000. 1 ETH = 10000.\n * @notice Decided to use 32-bit words to make the copy-pasted Data field for the ICO transaction less lenghty.\n */\n uint32 minETH; // 4 bytes\n\n /** Max amount this customer can to invest in ETH. Set zero if no maximum. Expressed as parts of 10000. 1 ETH = 10000. */\n uint32 maxETH; // 4 bytes\n\n /**\n * Information about the price promised for this participant. It can be pricing tier id or directly one token price in weis.\n * @notice This is a later addition and not supported in all scenarios yet.\n */\n uint256 pricingInfo;\n }\n\n\n /**\n * Same as above, but with pricing information included in the payload as the last integer.\n *\n * @notice In a long run, deprecate the legacy methods above and only use this payload.\n */\n function getKYCPayload(bytes dataframe) public constant returns(address whitelistedAddress, uint128 customerId, uint32 minEth, uint32 maxEth, uint256 pricingInfo) {\n address _whitelistedAddress = dataframe.sliceAddress(0);\n uint128 _customerId = uint128(dataframe.slice16(20));\n uint32 _minETH = uint32(dataframe.slice4(36));\n uint32 _maxETH = uint32(dataframe.slice4(40));\n uint256 _pricingInfo = uint256(dataframe.slice32(44));\n return (_whitelistedAddress, _customerId, _minETH, _maxETH, _pricingInfo);\n }\n\n}\n\n\n/**\n * A presale smart contract that collects money from SAFT/SAFTE agreed buyers.\n *\n * Presale contract where we collect money for the token that does not exist yet.\n * The same KYC rules apply as in KYCCrowdsale. No tokens are issued in this point,\n * but they are delivered to the buyers after the token sale is over.\n *\n */\ncontract KYCPresale is CrowdsaleBase, KYCPayloadDeserializer {\n\n /** The cap of this presale contract in wei */\n uint256 public saleWeiCap;\n\n /** Server holds the private key to this address to decide if the AML payload is valid or not. */\n address public signerAddress;\n\n /** A new server-side signer key was set to be effective */\n event SignerChanged(address signer);\n\n /** An user made a prepurchase through KYC'ed interface. The money has been moved to the token sale multisig wallet. The buyer will receive their tokens in an airdrop after the token sale is over. */\n event Prepurchased(address investor, uint weiAmount, uint tokenAmount, uint128 customerId, uint256 pricingInfo);\n\n /** The owner changes the presale ETH cap during the sale */\n event CapUpdated(uint256 newCap);\n\n /**\n * Constructor.\n *\n * Presale does not know about token or pricing strategy, as they will be only available during the future airdrop.\n *\n * @dev The parent contract has some unnecessary variables for our use case. For this round of development, we chose to use null value for token and pricing strategy. In the future versions have a parent sale contract that does not assume an existing token.\n */\n function KYCPresale(address _multisigWallet, uint _start, uint _end, uint _saleWeiCap) CrowdsaleBase(FractionalERC20(address(1)), PricingStrategy(address(0)), _multisigWallet, _start, _end, 0) {\n saleWeiCap = _saleWeiCap;\n }\n\n /**\n * A token purchase with anti-money laundering\n *\n * \u00a9return tokenAmount How many tokens where bought\n */\n function buyWithKYCData(bytes dataframe, uint8 v, bytes32 r, bytes32 s) public payable returns(uint tokenAmount) {\n\n // Presale ended / emergency abort\n require(!halted);\n\n bytes32 hash = sha256(dataframe);\n var (whitelistedAddress, customerId, minETH, maxETH, pricingInfo) = getKYCPayload(dataframe);\n uint multiplier = 10 ** 18;\n address receiver = msg.sender;\n uint weiAmount = msg.value;\n\n // The payload was created by token sale server\n require(ecrecover(hash, v, r, s) == signerAddress);\n\n // Determine if it's a good time to accept investment from this participant\n if(getState() == State.PreFunding) {\n // Are we whitelisted for early deposit\n require(earlyParticipantWhitelist[receiver]);\n } else if(getState() == State.Funding) {\n // Retail participants can only come in when the crowdsale is running\n // pass\n } else {\n // Unwanted state\n revert();\n }\n\n if(investedAmountOf[receiver] == 0) {\n // A new investor\n investorCount++;\n }\n\n // Update per investor amount\n investedAmountOf[receiver] = investedAmountOf[receiver].plus(weiAmount);\n\n // Update totals\n weiRaised = weiRaised.plus(weiAmount);\n\n // Check that we did not bust the cap\n require(!isBreakingCap(weiAmount, tokenAmount, weiRaised, tokensSold));\n\n require(investedAmountOf[msg.sender] >= minETH * multiplier / 10000);\n require(investedAmountOf[msg.sender] <= maxETH * multiplier / 10000);\n\n // Pocket the money, or fail the crowdsale if we for some reason cannot send the money to our multisig\n require(multisigWallet.send(weiAmount));\n\n // Tell us invest was success\n Prepurchased(receiver, weiAmount, tokenAmount, customerId, pricingInfo);\n\n return 0; // In presale we do not issue actual tokens tyet\n }\n\n /// @dev This function can set the server side address\n /// @param _signerAddress The address derived from server's private key\n function setSignerAddress(address _signerAddress) onlyOwner {\n signerAddress = _signerAddress;\n SignerChanged(signerAddress);\n }\n\n /**\n * Called from invest() to confirm if the curret investment does not break our cap rule.\n */\n function isBreakingCap(uint weiAmount, uint tokenAmount, uint weiRaisedTotal, uint tokensSoldTotal) constant returns (bool limitBroken) {\n if(weiRaisedTotal > saleWeiCap) {\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * We are sold out when our approve pool becomes empty.\n */\n function isCrowdsaleFull() public constant returns (bool) {\n return weiRaised >= saleWeiCap;\n }\n\n /**\n * Allow owner to adjust the cap during the presale.\n *\n * This allows e.g. US dollar pegged caps.\n */\n function setWeiCap(uint newCap) public onlyOwner {\n saleWeiCap = newCap;\n CapUpdated(newCap);\n }\n\n /**\n * Because this is a presale, we do not issue any tokens yet.\n *\n * @dev Have this taken away from the parent contract?\n */\n function assignTokens(address receiver, uint tokenAmount) internal {\n revert();\n }\n\n /**\n * Allow to (re)set pricing strategy.\n *\n * @dev Because we do not have token price set in presale, we do nothing. This will be removed in the future versions.\n */\n function setPricingStrategy(PricingStrategy _pricingStrategy) onlyOwner {\n }\n\n /**\n * Presale state machine management.\n *\n * Presale cannot fail; it is running until manually ended.\n *\n */\n function getState() public constant returns (State) {\n if (block.timestamp < startsAt) {\n return State.PreFunding;\n } else {\n return State.Funding;\n }\n }\n\n}\n"}, "MilestonePricing": {"abi": [{"constant": true, "inputs": [], "name": "isPricingStrategy", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "milestoneCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "value", "type": "uint256"}, {"name": "weiRaised", "type": "uint256"}, {"name": "tokensSold", "type": "uint256"}, {"name": "msgSender", "type": "address"}, {"name": "decimals", "type": "uint256"}], "name": "calculatePrice", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "n", "type": "uint256"}], "name": "getMilestone", "outputs": [{"name": "", "type": "uint256"}, {"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getPricingStartsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getPricingEndsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "_crowdsale", "type": "address"}], "name": "isSane", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "MAX_MILESTONE", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "preicoAddress", "type": "address"}, {"name": "pricePerToken", "type": "uint256"}], "name": "setPreicoAddress", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "uint256"}], "name": "milestones", "outputs": [{"name": "time", "type": "uint256"}, {"name": "price", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getCurrentPrice", "outputs": [{"name": "result", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "purchaser", "type": "address"}], "name": "isPresalePurchase", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "preicoAddresses", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [{"name": "_milestones", "type": "uint256[]"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"payable": true, "stateMutability": "payable", "type": "fallback"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "bytecode": "0x608060405234801561001057600080fd5b506040516109ce3803806109ce83398101604052805160008054600160a060020a03191633178155910180519091908190600290066001148061005557508251601411155b1561005f57600080fd5b50508051600290046016556000805b82516002900481101561012c57828160020281518110151561008c57fe5b60209081029091010151600282600a81106100a357fe5b600202016000018190555082816002026001018151811015156100c257fe5b60209081029091010151600282600a81106100d957fe5b600202016001018190555081600014158015610106575081600282600a81106100fe57fe5b600202015411155b1561011057600080fd5b600281600a811061011d57fe5b6002020154915060010161006e565b60165460029060001901600a811061014057fe5b6002020160010154600014151561015657600080fd5b505050610866806101686000396000f3006080604052600436106100da5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166304bbc25581146100df5780630681ca551461010857806318a4155e1461012f5780632442e1cb1461015c5780632c9a0a951461018d5780636f079f90146101a25780638da5cb5b146101b75780638e768288146101e857806396821fc114610209578063e474f97a1461021e578063e89e4ed614610244578063eb91d37e1461025c578063f14ae17d14610271578063f1ef9a0814610292578063f2fde38b146102b3575b600080fd5b3480156100eb57600080fd5b506100f46102d4565b604080519115158252519081900360200190f35b34801561011457600080fd5b5061011d6102d9565b60408051918252519081900360200190f35b34801561013b57600080fd5b5061011d600435602435604435600160a060020a03606435166084356102df565b34801561016857600080fd5b50610174600435610492565b6040805192835260208301919091528051918290030190f35b34801561019957600080fd5b5061011d6104ca565b3480156101ae57600080fd5b5061011d6104da565b3480156101c357600080fd5b506101cc6104e4565b60408051600160a060020a039092168252519081900360200190f35b3480156101f457600080fd5b506100f4600160a060020a03600435166104f3565b34801561021557600080fd5b5061011d61061d565b34801561022a57600080fd5b50610242600160a060020a0360043516602435610622565b005b34801561025057600080fd5b50610174600435610655565b34801561026857600080fd5b5061011d610674565b34801561027d57600080fd5b506100f4600160a060020a0360043516610687565b34801561029e57600080fd5b5061011d600160a060020a03600435166106b8565b3480156102bf57600080fd5b50610242600160a060020a03600435166106ca565b600190565b60165481565b600160a060020a038216600090815260016020526040812054600a83900a9082908110156103ce57600160a060020a0385166000908152600160209081526040918290205482517f1d3b9edf000000000000000000000000000000000000000000000000000000008152600481018c9052602481018690529251909273__contracts/SafeMathLib.sol:SafeMathLi__92631d3b9edf92604480840193829003018186803b15801561039157600080fd5b505af41580156103a5573d6000803e3d6000fd5b505050506040513d60208110156103bb57600080fd5b50518115156103c657fe5b049250610487565b6103d6610674565b9050808873__contracts/SafeMathLib.sol:SafeMathLi__631d3b9edf9091856040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b15801561044e57600080fd5b505af4158015610462573d6000803e3d6000fd5b505050506040513d602081101561047857600080fd5b505181151561048357fe5b0492505b505095945050505050565b600080600283600a81106104a257fe5b6002020160000154600284600a811015156104b957fe5b600202016001015491509150915091565b60006104d461075e565b51905090565b60006104d4610793565b600054600160a060020a031681565b6000816104fe6104ca565b81600160a060020a031663af4686826040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561055557600080fd5b505af1158015610569573d6000803e3d6000fd5b505050506040513d602081101561057f57600080fd5b505114801561061657506105916104da565b81600160a060020a0316630a09284a6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156105e857600080fd5b505af11580156105fc573d6000803e3d6000fd5b505050506040513d602081101561061257600080fd5b5051145b9392505050565b600a81565b600054600160a060020a0316331461063957600080fd5b600160a060020a03909116600090815260016020526040902055565b600281600a811061066257fe5b60020201805460019091015490915082565b600061067e6107af565b60200151905090565b600160a060020a0381166000908152600160205260408120548110156106af575060016106b3565b5060005b919050565b60016020526000908152604090205481565b600054600160a060020a031633146106e157600080fd5b600160a060020a03811615156106f657600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b610766610823565b600260005b6002020160408051908101604052908160008201548152602001600182015481525050905090565b61079b610823565b60165460029060001901600a811061076b57fe5b6107b7610823565b60005b600a81101561081f57600281600a81106107d057fe5b60020201544210156108175760026000198201600a81106107ed57fe5b6002020160408051908101604052908160008201548152602001600182015481525050915061081f565b6001016107ba565b5090565b6040805180820190915260008082526020820152905600a165627a7a7230582076a5a0068d674dbb23c6d83c391f67b5a23f32d41f982e20329dc3cc3bb7ae8d0029", "bytecode_runtime": "0x6080604052600436106100da5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166304bbc25581146100df5780630681ca551461010857806318a4155e1461012f5780632442e1cb1461015c5780632c9a0a951461018d5780636f079f90146101a25780638da5cb5b146101b75780638e768288146101e857806396821fc114610209578063e474f97a1461021e578063e89e4ed614610244578063eb91d37e1461025c578063f14ae17d14610271578063f1ef9a0814610292578063f2fde38b146102b3575b600080fd5b3480156100eb57600080fd5b506100f46102d4565b604080519115158252519081900360200190f35b34801561011457600080fd5b5061011d6102d9565b60408051918252519081900360200190f35b34801561013b57600080fd5b5061011d600435602435604435600160a060020a03606435166084356102df565b34801561016857600080fd5b50610174600435610492565b6040805192835260208301919091528051918290030190f35b34801561019957600080fd5b5061011d6104ca565b3480156101ae57600080fd5b5061011d6104da565b3480156101c357600080fd5b506101cc6104e4565b60408051600160a060020a039092168252519081900360200190f35b3480156101f457600080fd5b506100f4600160a060020a03600435166104f3565b34801561021557600080fd5b5061011d61061d565b34801561022a57600080fd5b50610242600160a060020a0360043516602435610622565b005b34801561025057600080fd5b50610174600435610655565b34801561026857600080fd5b5061011d610674565b34801561027d57600080fd5b506100f4600160a060020a0360043516610687565b34801561029e57600080fd5b5061011d600160a060020a03600435166106b8565b3480156102bf57600080fd5b50610242600160a060020a03600435166106ca565b600190565b60165481565b600160a060020a038216600090815260016020526040812054600a83900a9082908110156103ce57600160a060020a0385166000908152600160209081526040918290205482517f1d3b9edf000000000000000000000000000000000000000000000000000000008152600481018c9052602481018690529251909273__contracts/SafeMathLib.sol:SafeMathLi__92631d3b9edf92604480840193829003018186803b15801561039157600080fd5b505af41580156103a5573d6000803e3d6000fd5b505050506040513d60208110156103bb57600080fd5b50518115156103c657fe5b049250610487565b6103d6610674565b9050808873__contracts/SafeMathLib.sol:SafeMathLi__631d3b9edf9091856040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b15801561044e57600080fd5b505af4158015610462573d6000803e3d6000fd5b505050506040513d602081101561047857600080fd5b505181151561048357fe5b0492505b505095945050505050565b600080600283600a81106104a257fe5b6002020160000154600284600a811015156104b957fe5b600202016001015491509150915091565b60006104d461075e565b51905090565b60006104d4610793565b600054600160a060020a031681565b6000816104fe6104ca565b81600160a060020a031663af4686826040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561055557600080fd5b505af1158015610569573d6000803e3d6000fd5b505050506040513d602081101561057f57600080fd5b505114801561061657506105916104da565b81600160a060020a0316630a09284a6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156105e857600080fd5b505af11580156105fc573d6000803e3d6000fd5b505050506040513d602081101561061257600080fd5b5051145b9392505050565b600a81565b600054600160a060020a0316331461063957600080fd5b600160a060020a03909116600090815260016020526040902055565b600281600a811061066257fe5b60020201805460019091015490915082565b600061067e6107af565b60200151905090565b600160a060020a0381166000908152600160205260408120548110156106af575060016106b3565b5060005b919050565b60016020526000908152604090205481565b600054600160a060020a031633146106e157600080fd5b600160a060020a03811615156106f657600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b610766610823565b600260005b6002020160408051908101604052908160008201548152602001600182015481525050905090565b61079b610823565b60165460029060001901600a811061076b57fe5b6107b7610823565b60005b600a81101561081f57600281600a81106107d057fe5b60020201544210156108175760026000198201600a81106107ed57fe5b6002020160408051908101604052908160008201548152602001600182015481525050915061081f565b6001016107ba565b5090565b6040805180820190915260008082526020820152905600a165627a7a7230582076a5a0068d674dbb23c6d83c391f67b5a23f32d41f982e20329dc3cc3bb7ae8d0029", "direct_dependencies": ["SafeMathLib"], "full_dependencies": ["SafeMathLib"], "linkrefs": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 2442}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 2696}], "linkrefs_runtime": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 1722}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 1976}], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": true, "inputs": [], "name": "isPricingStrategy", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "milestoneCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "value", "type": "uint256"}, {"name": "weiRaised", "type": "uint256"}, {"name": "tokensSold", "type": "uint256"}, {"name": "msgSender", "type": "address"}, {"name": "decimals", "type": "uint256"}], "name": "calculatePrice", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "n", "type": "uint256"}], "name": "getMilestone", "outputs": [{"name": "", "type": "uint256"}, {"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getPricingStartsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getPricingEndsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "_crowdsale", "type": "address"}], "name": "isSane", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "MAX_MILESTONE", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "preicoAddress", "type": "address"}, {"name": "pricePerToken", "type": "uint256"}], "name": "setPreicoAddress", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "uint256"}], "name": "milestones", "outputs": [{"name": "time", "type": "uint256"}, {"name": "price", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getCurrentPrice", "outputs": [{"name": "result", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "purchaser", "type": "address"}], "name": "isPresalePurchase", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "preicoAddresses", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [{"name": "_milestones", "type": "uint256[]"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"payable": true, "stateMutability": "payable", "type": "fallback"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "devdoc": {"methods": {"calculatePrice(uint256,uint256,uint256,address,uint256)": {"details": "Calculate the current price for buy in amount."}, "getCurrentPrice()": {"details": "Get the current price.", "return": "The current price or 0 if we are outside milestone period"}, "getMilestone(uint256)": {"details": "Iterate through milestones. You reach end of milestones when price = 0", "return": "tuple (time, price)"}, "setPreicoAddress(address,uint256)": {"details": "This is invoked once for every pre-ICO address, set pricePerToken to 0 to disable", "params": {"preicoAddress": "PresaleFundCollector address", "pricePerToken": "How many weis one token cost for pre-ico investors"}}, "transferOwnership(address)": {"details": "Allows the current owner to transfer control of the contract to a newOwner.", "params": {"newOwner": "The address to transfer ownership to."}}}}, "userdoc": {"methods": {"isPricingStrategy()": {"notice": "Interface declaration. "}}}}, "settings": {"compilationTarget": {"contracts/MilestonePricing.sol": "MilestonePricing"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/Crowdsale.sol": {"keccak256": "0x2697c26528f64bb954a7c2547d3b43317d2d2b02c7d9d05a7b1ab388cd79f65d", "urls": ["bzzr://f28b280794222114141c51dd5c388d403a7c98d8b51e04170a0e294246d5164b"]}, "contracts/CrowdsaleBase.sol": {"keccak256": "0xe2c9ed11183ce705616980df7b02544d72fe18b40395da7d9d4bcb621fb87871", "urls": ["bzzr://07f3887ba0d0eb3248b1ad3581480ed71a2fe70a47dcc283c4e97c8c92e0790a"]}, "contracts/FinalizeAgent.sol": {"keccak256": "0x309fd0510e0b3e2b5044e33f7c80cfb2d6f2a5697e41a5f185931d65770cfea9", "urls": ["bzzr://4e7ed6f82c0f542e92e56c12566b2ecd7666730865bf12566c27587ec64160ac"]}, "contracts/FractionalERC20.sol": {"keccak256": "0x75bc4ad90a8b13ce961c89b1bf405776f616e019d3a2720168f8e52be223198f", "urls": ["bzzr://6a3688f12da1a5c890ef06f80f883f6c5370886092d38a1b33cd4219b718478b"]}, "contracts/Haltable.sol": {"keccak256": "0x265dcf25e7c9ab4b6eecd2181f1b71334a1b5381a60f8db7d9526dab120f4b70", "urls": ["bzzr://d522e00fa9e075941469dd81738b59fdb99ce3c12cdc39e33abe40b588c4da9b"]}, "contracts/MilestonePricing.sol": {"keccak256": "0x9864d40b1794ed3d38af9f7d6fdd3d4f988b05234fef7f05b6df34674a10fddb", "urls": ["bzzr://790c4cb5af370af4185617838395077643f298593ac6035cabe75a4944eaa2b4"]}, "contracts/PricingStrategy.sol": {"keccak256": "0x8df5093b7d07168ad994f9176de0bd2268f6563b1e8a3a448d8cfe7fe246c628", "urls": ["bzzr://ef5c944d51f739ab34e2c951d6ac82a7152e6bb844058a8e57bae52c14cbe16b"]}, "contracts/SafeMathLib.sol": {"keccak256": "0x501bfe31e274b9a5591f7c540bdced4d4312e27d4f19599147c9bbca3d9c6b18", "urls": ["bzzr://a80935ebddb06c247d71372d4e5833ee029f08633bd0fe4a274a57009567e5b9"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}}, "version": 1}, "name": "MilestonePricing", "ordered_full_dependencies": ["SafeMathLib"], "source_path": "contracts/MilestonePricing.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Interface for defining crowdsale pricing.\n */\ncontract PricingStrategy {\n\n /** Interface declaration. */\n function isPricingStrategy() public constant returns (bool) {\n return true;\n }\n\n /** Self check if all references are correctly set.\n *\n * Checks that pricing strategy matches crowdsale parameters.\n */\n function isSane(address crowdsale) public constant returns (bool) {\n return true;\n }\n\n /**\n * @dev Pricing tells if this is a presale purchase or not.\n @param purchaser Address of the purchaser\n @return False by default, true if a presale purchaser\n */\n function isPresalePurchase(address purchaser) public constant returns (bool) {\n return false;\n }\n\n /**\n * When somebody tries to buy tokens for X eth, calculate how many tokens they get.\n *\n *\n * @param value - What is the value of the transaction send in as wei\n * @param tokensSold - how much tokens have been sold this far\n * @param weiRaised - how much money has been raised this far in the main token sale - this number excludes presale\n * @param msgSender - who is the investor of this transaction\n * @param decimals - how many decimal units the token has\n * @return Amount of tokens the investor receives\n */\n function calculatePrice(uint value, uint weiRaised, uint tokensSold, address msgSender, uint decimals) public constant returns (uint tokenAmount);\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Safe unsigned safe math.\n *\n * https://blog.aragon.one/library-driven-development-in-solidity-2bebcaf88736#.750gwtwli\n *\n * Originally from https://raw.githubusercontent.com/AragonOne/zeppelin-solidity/master/contracts/SafeMathLib.sol\n *\n * Maintained here until merged to mainline zeppelin-solidity.\n *\n */\nlibrary SafeMathLib {\n\n function times(uint a, uint b) returns (uint) {\n uint c = a * b;\n assert(a == 0 || c / a == b);\n return c;\n }\n\n function minus(uint a, uint b) returns (uint) {\n assert(b <= a);\n return a - b;\n }\n\n function plus(uint a, uint b) returns (uint) {\n uint c = a + b;\n assert(c>=a);\n return c;\n }\n\n}\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Finalize agent defines what happens at the end of succeseful crowdsale.\n *\n * - Allocate tokens for founders, bounties and community\n * - Make tokens transferable\n * - etc.\n */\ncontract FinalizeAgent {\n\n function isFinalizeAgent() public constant returns(bool) {\n return true;\n }\n\n /** Return true if we can run finalizeCrowdsale() properly.\n *\n * This is a safety check function that doesn't allow crowdsale to begin\n * unless the finalizer has been set up properly.\n */\n function isSane() public constant returns (bool);\n\n /** Called once by crowdsale finalize() if the sale was success. */\n function finalizeCrowdsale();\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n\n/**\n * A token that defines fractional units as decimals.\n */\ncontract FractionalERC20 is ERC20 {\n\n uint public decimals;\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n/*\n * Haltable\n *\n * Abstract contract that allows children to implement an\n * emergency stop mechanism. Differs from Pausable by causing a throw when in halt mode.\n *\n *\n * Originally envisioned in FirstBlood ICO contract.\n */\ncontract Haltable is Ownable {\n bool public halted;\n\n modifier stopInEmergency {\n if (halted) throw;\n _;\n }\n\n modifier stopNonOwnersInEmergency {\n if (halted && msg.sender != owner) throw;\n _;\n }\n\n modifier onlyInEmergency {\n if (!halted) throw;\n _;\n }\n\n // called by the owner on emergency, triggers stopped state\n function halt() external onlyOwner {\n halted = true;\n }\n\n // called by the owner on end of emergency, returns to normal state\n function unhalt() external onlyOwner onlyInEmergency {\n halted = false;\n }\n\n}\n\n\n\n\n\n\n\n/**\n * Crowdsale state machine without buy functionality.\n *\n * Implements basic state machine logic, but leaves out all buy functions,\n * so that subclasses can implement their own buying logic.\n *\n *\n * For the default buy() implementation see Crowdsale.sol.\n */\ncontract CrowdsaleBase is Haltable {\n\n /* Max investment count when we are still allowed to change the multisig address */\n uint public MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE = 5;\n\n using SafeMathLib for uint;\n\n /* The token we are selling */\n FractionalERC20 public token;\n\n /* How we are going to price our offering */\n PricingStrategy public pricingStrategy;\n\n /* Post-success callback */\n FinalizeAgent public finalizeAgent;\n\n /* tokens will be transfered from this address */\n address public multisigWallet;\n\n /* if the funding goal is not reached, investors may withdraw their funds */\n uint public minimumFundingGoal;\n\n /* the UNIX timestamp start date of the crowdsale */\n uint public startsAt;\n\n /* the UNIX timestamp end date of the crowdsale */\n uint public endsAt;\n\n /* the number of tokens already sold through this contract*/\n uint public tokensSold = 0;\n\n /* How many wei of funding we have raised */\n uint public weiRaised = 0;\n\n /* Calculate incoming funds from presale contracts and addresses */\n uint public presaleWeiRaised = 0;\n\n /* How many distinct addresses have invested */\n uint public investorCount = 0;\n\n /* How much wei we have returned back to the contract after a failed crowdfund. */\n uint public loadedRefund = 0;\n\n /* How much wei we have given back to investors.*/\n uint public weiRefunded = 0;\n\n /* Has this crowdsale been finalized */\n bool public finalized;\n\n /** How much ETH each address has invested to this crowdsale */\n mapping (address => uint256) public investedAmountOf;\n\n /** How much tokens this crowdsale has credited for each investor address */\n mapping (address => uint256) public tokenAmountOf;\n\n /** Addresses that are allowed to invest even before ICO offical opens. For testing, for ICO partners, etc. */\n mapping (address => bool) public earlyParticipantWhitelist;\n\n /** This is for manul testing for the interaction from owner wallet. You can set it to any value and inspect this in blockchain explorer to see that crowdsale interaction works. */\n uint public ownerTestValue;\n\n /** State machine\n *\n * - Preparing: All contract initialization calls and variables have not been set yet\n * - Prefunding: We have not passed start time yet\n * - Funding: Active crowdsale\n * - Success: Minimum funding goal reached\n * - Failure: Minimum funding goal not reached before ending time\n * - Finalized: The finalized has been called and succesfully executed\n * - Refunding: Refunds are loaded on the contract for reclaim.\n */\n enum State{Unknown, Preparing, PreFunding, Funding, Success, Failure, Finalized, Refunding}\n\n // A new investment was made\n event Invested(address investor, uint weiAmount, uint tokenAmount, uint128 customerId);\n\n // Refund was processed for a contributor\n event Refund(address investor, uint weiAmount);\n\n // The rules were changed what kind of investments we accept\n event InvestmentPolicyChanged(bool newRequireCustomerId, bool newRequiredSignedAddress, address newSignerAddress);\n\n // Address early participation whitelist status changed\n event Whitelisted(address addr, bool status);\n\n // Crowdsale end time has been changed\n event EndsAtChanged(uint newEndsAt);\n\n function CrowdsaleBase(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal) {\n\n owner = msg.sender;\n\n token = FractionalERC20(_token);\n setPricingStrategy(_pricingStrategy);\n\n multisigWallet = _multisigWallet;\n if(multisigWallet == 0) {\n throw;\n }\n\n if(_start == 0) {\n throw;\n }\n\n startsAt = _start;\n\n if(_end == 0) {\n throw;\n }\n\n endsAt = _end;\n\n // Don't mess the dates\n if(startsAt >= endsAt) {\n throw;\n }\n\n // Minimum funding goal can be zero\n minimumFundingGoal = _minimumFundingGoal;\n }\n\n /**\n * Don't expect to just send in money and get tokens.\n */\n function() payable {\n throw;\n }\n\n /**\n * @dev Make an investment.\n *\n * Crowdsale must be running for one to invest.\n * We must have not pressed the emergency brake.\n *\n * @param receiver The Ethereum address who receives the tokens\n * @param customerId (optional) UUID v4 to track the successful payments on the server side'\n * @param tokenAmount Amount of tokens which be credited to receiver\n *\n * @return tokensBought How mony tokens were bought\n */\n function buyTokens(address receiver, uint128 customerId, uint256 tokenAmount) stopInEmergency internal returns(uint tokensBought) {\n\n // Determine if it's a good time to accept investment from this participant\n if(getState() == State.PreFunding) {\n // Are we whitelisted for early deposit\n if(!earlyParticipantWhitelist[receiver]) {\n throw;\n }\n } else if(getState() == State.Funding) {\n // Retail participants can only come in when the crowdsale is running\n // pass\n } else {\n // Unwanted state\n throw;\n }\n\n uint weiAmount = msg.value;\n\n // Dust transaction\n require(tokenAmount != 0);\n\n if(investedAmountOf[receiver] == 0) {\n // A new investor\n investorCount++;\n }\n\n // Update investor\n investedAmountOf[receiver] = investedAmountOf[receiver].plus(weiAmount);\n tokenAmountOf[receiver] = tokenAmountOf[receiver].plus(tokenAmount);\n\n // Update totals\n weiRaised = weiRaised.plus(weiAmount);\n tokensSold = tokensSold.plus(tokenAmount);\n\n if(pricingStrategy.isPresalePurchase(receiver)) {\n presaleWeiRaised = presaleWeiRaised.plus(weiAmount);\n }\n\n // Check that we did not bust the cap\n require(!isBreakingCap(weiAmount, tokenAmount, weiRaised, tokensSold));\n\n assignTokens(receiver, tokenAmount);\n\n // Pocket the money, or fail the crowdsale if we for some reason cannot send the money to our multisig\n if(!multisigWallet.send(weiAmount)) throw;\n\n // Tell us invest was success\n Invested(receiver, weiAmount, tokenAmount, customerId);\n\n return tokenAmount;\n }\n\n /**\n * @dev Make an investment based on pricing strategy\n *\n * This is a wrapper for buyTokens(), but the amount of tokens receiver will\n * have depends on the pricing strategy used.\n *\n * @param receiver The Ethereum address who receives the tokens\n * @param customerId (optional) UUID v4 to track the successful payments on the server side'\n *\n * @return tokensBought How mony tokens were bought\n */\n function investInternal(address receiver, uint128 customerId) stopInEmergency internal returns(uint tokensBought) {\n return buyTokens(receiver, customerId, pricingStrategy.calculatePrice(msg.value, weiRaised - presaleWeiRaised, tokensSold, msg.sender, token.decimals()));\n }\n\n /**\n * @dev Calculate tokens user will have for their purchase\n *\n * @param weisTotal How much ethers (in wei) the user putssssss in\n * @param pricePerToken What is the price for one token\n *\n * @return tokensTotal which is received tokens, token decimals included\n */\n function calculateTokens(uint256 weisTotal, uint256 pricePerToken) public constant returns(uint tokensTotal) {\n // pricePerToken is how many full tokens, token decimal place included, you get for wei amount.\n // Because, in theory, decimal amount can vary, we do the exponent calculation here,\n // though gas wise using 10**18 constant would be much simpler.\n // Furthermore we could use rough amounts and take in raw wei per tokens amount,\n // but we lose too much accuracy for generic calculations, thus all these are\n // practically implemented as 10**18 fixed points.\n uint multiplier = 10 ** token.decimals();\n return weisTotal.times(multiplier)/pricePerToken;\n }\n\n /**\n * Finalize a succcesful crowdsale.\n *\n * The owner can triggre a call the contract that provides post-crowdsale actions, like releasing the tokens.\n */\n function finalize() public inState(State.Success) onlyOwner stopInEmergency {\n\n // Already finalized\n if(finalized) {\n throw;\n }\n\n // Finalizing is optional. We only call it if we are given a finalizing agent.\n if(address(finalizeAgent) != 0) {\n finalizeAgent.finalizeCrowdsale();\n }\n\n finalized = true;\n }\n\n /**\n * Allow to (re)set finalize agent.\n *\n * Design choice: no state restrictions on setting this, so that we can fix fat finger mistakes.\n */\n function setFinalizeAgent(FinalizeAgent addr) onlyOwner {\n finalizeAgent = addr;\n\n // Don't allow setting bad agent\n if(!finalizeAgent.isFinalizeAgent()) {\n throw;\n }\n }\n\n /**\n * Allow crowdsale owner to close early or extend the crowdsale.\n *\n * This is useful e.g. for a manual soft cap implementation:\n * - after X amount is reached determine manual closing\n *\n * This may put the crowdsale to an invalid state,\n * but we trust owners know what they are doing.\n *\n */\n function setEndsAt(uint time) onlyOwner {\n\n if(now > time) {\n throw; // Don't change past\n }\n\n if(startsAt > time) {\n throw; // Prevent human mistakes\n }\n\n endsAt = time;\n EndsAtChanged(endsAt);\n }\n\n /**\n * Allow to (re)set pricing strategy.\n *\n * Design choice: no state restrictions on the set, so that we can fix fat finger mistakes.\n */\n function setPricingStrategy(PricingStrategy _pricingStrategy) onlyOwner {\n pricingStrategy = _pricingStrategy;\n\n // Don't allow setting bad agent\n if(!pricingStrategy.isPricingStrategy()) {\n throw;\n }\n }\n\n /**\n * Allow to change the team multisig address in the case of emergency.\n *\n * This allows to save a deployed crowdsale wallet in the case the crowdsale has not yet begun\n * (we have done only few test transactions). After the crowdsale is going\n * then multisig address stays locked for the safety reasons.\n */\n function setMultisig(address addr) public onlyOwner {\n\n // Change\n if(investorCount > MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE) {\n throw;\n }\n\n multisigWallet = addr;\n }\n\n /**\n * Allow load refunds back on the contract for the refunding.\n *\n * The team can transfer the funds back on the smart contract in the case the minimum goal was not reached..\n */\n function loadRefund() public payable inState(State.Failure) {\n if(msg.value == 0) throw;\n loadedRefund = loadedRefund.plus(msg.value);\n }\n\n /**\n * Investors can claim refund.\n *\n * Note that any refunds from proxy buyers should be handled separately,\n * and not through this contract.\n */\n function refund() public inState(State.Refunding) {\n uint256 weiValue = investedAmountOf[msg.sender];\n if (weiValue == 0) throw;\n investedAmountOf[msg.sender] = 0;\n weiRefunded = weiRefunded.plus(weiValue);\n Refund(msg.sender, weiValue);\n if (!msg.sender.send(weiValue)) throw;\n }\n\n /**\n * @return true if the crowdsale has raised enough money to be a successful.\n */\n function isMinimumGoalReached() public constant returns (bool reached) {\n return weiRaised >= minimumFundingGoal;\n }\n\n /**\n * Check if the contract relationship looks good.\n */\n function isFinalizerSane() public constant returns (bool sane) {\n return finalizeAgent.isSane();\n }\n\n /**\n * Check if the contract relationship looks good.\n */\n function isPricingSane() public constant returns (bool sane) {\n return pricingStrategy.isSane(address(this));\n }\n\n /**\n * Crowdfund state machine management.\n *\n * We make it a function and do not assign the result to a variable, so there is no chance of the variable being stale.\n */\n function getState() public constant returns (State) {\n if(finalized) return State.Finalized;\n else if (address(finalizeAgent) == 0) return State.Preparing;\n else if (!finalizeAgent.isSane()) return State.Preparing;\n else if (!pricingStrategy.isSane(address(this))) return State.Preparing;\n else if (block.timestamp < startsAt) return State.PreFunding;\n else if (block.timestamp <= endsAt && !isCrowdsaleFull()) return State.Funding;\n else if (isMinimumGoalReached()) return State.Success;\n else if (!isMinimumGoalReached() && weiRaised > 0 && loadedRefund >= weiRaised) return State.Refunding;\n else return State.Failure;\n }\n\n /** This is for manual testing of multisig wallet interaction */\n function setOwnerTestValue(uint val) onlyOwner {\n ownerTestValue = val;\n }\n\n /**\n * Allow addresses to do early participation.\n *\n * TODO: Fix spelling error in the name\n */\n function setEarlyParicipantWhitelist(address addr, bool status) onlyOwner {\n earlyParticipantWhitelist[addr] = status;\n Whitelisted(addr, status);\n }\n\n\n /** Interface marker. */\n function isCrowdsale() public constant returns (bool) {\n return true;\n }\n\n //\n // Modifiers\n //\n\n /** Modified allowing execution only if the crowdsale is currently running. */\n modifier inState(State state) {\n if(getState() != state) throw;\n _;\n }\n\n\n //\n // Abstract functions\n //\n\n /**\n * Check if the current invested breaks our cap rules.\n *\n *\n * The child contract must define their own cap setting rules.\n * We allow a lot of flexibility through different capping strategies (ETH, token count)\n * Called from invest().\n *\n * @param weiAmount The amount of wei the investor tries to invest in the current transaction\n * @param tokenAmount The amount of tokens we try to give to the investor in the current transaction\n * @param weiRaisedTotal What would be our total raised balance after this transaction\n * @param tokensSoldTotal What would be our total sold tokens count after this transaction\n *\n * @return true if taking this investment would break our cap rules\n */\n function isBreakingCap(uint weiAmount, uint tokenAmount, uint weiRaisedTotal, uint tokensSoldTotal) constant returns (bool limitBroken);\n\n /**\n * Check if the current crowdsale is full and we can no longer sell any tokens.\n */\n function isCrowdsaleFull() public constant returns (bool);\n\n /**\n * Create new tokens or transfer issued tokens to the investor depending on the cap model.\n */\n function assignTokens(address receiver, uint tokenAmount) internal;\n}\n\n\n\n/**\n * Abstract base contract for token sales with the default buy entry points.\n *\n * Handle\n * - start and end dates\n * - accepting investments\n * - minimum funding goal and refund\n * - various statistics during the crowdfund\n * - different pricing strategies\n * - different investment policies (require server side customer id, allow only whitelisted addresses)\n *\n * Does not Handle\n *\n * - Token allocation (minting vs. transfer)\n * - Cap rules\n *\n */\ncontract Crowdsale is CrowdsaleBase {\n\n /* Do we need to have unique contributor id for each customer */\n bool public requireCustomerId;\n\n /**\n * Do we verify that contributor has been cleared on the server side (accredited investors only).\n * This method was first used in FirstBlood crowdsale to ensure all contributors have accepted terms on sale (on the web).\n */\n bool public requiredSignedAddress;\n\n /* Server side address that signed allowed contributors (Ethereum addresses) that can participate the crowdsale */\n address public signerAddress;\n\n function Crowdsale(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal) CrowdsaleBase(_token, _pricingStrategy, _multisigWallet, _start, _end, _minimumFundingGoal) {\n }\n\n /**\n * Preallocate tokens for the early investors.\n *\n * Preallocated tokens have been sold before the actual crowdsale opens.\n * This function mints the tokens and moves the crowdsale needle.\n *\n * Investor count is not handled; it is assumed this goes for multiple investors\n * and the token distribution happens outside the smart contract flow.\n *\n * No money is exchanged, as the crowdsale team already have received the payment.\n *\n * @param fullTokens tokens as full tokens - decimal places added internally\n * @param weiPrice Price of a single full token in wei\n *\n */\n function preallocate(address receiver, uint fullTokens, uint weiPrice) public onlyOwner {\n\n uint tokenAmount = fullTokens * 10**token.decimals();\n uint weiAmount = weiPrice * fullTokens; // This can be also 0, we give out tokens for free\n\n weiRaised = weiRaised.plus(weiAmount);\n tokensSold = tokensSold.plus(tokenAmount);\n\n investedAmountOf[receiver] = investedAmountOf[receiver].plus(weiAmount);\n tokenAmountOf[receiver] = tokenAmountOf[receiver].plus(tokenAmount);\n\n assignTokens(receiver, tokenAmount);\n\n // Tell us invest was success\n Invested(receiver, weiAmount, tokenAmount, 0);\n }\n\n /**\n * Allow anonymous contributions to this crowdsale.\n */\n function investWithSignedAddress(address addr, uint128 customerId, uint8 v, bytes32 r, bytes32 s) public payable {\n bytes32 hash = sha256(addr);\n if (ecrecover(hash, v, r, s) != signerAddress) throw;\n if(customerId == 0) throw; // UUIDv4 sanity check\n investInternal(addr, customerId);\n }\n\n /**\n * Track who is the customer making the payment so we can send thank you email.\n */\n function investWithCustomerId(address addr, uint128 customerId) public payable {\n if(requiredSignedAddress) throw; // Crowdsale allows only server-side signed participants\n if(customerId == 0) throw; // UUIDv4 sanity check\n investInternal(addr, customerId);\n }\n\n /**\n * Allow anonymous contributions to this crowdsale.\n */\n function invest(address addr) public payable {\n if(requireCustomerId) throw; // Crowdsale needs to track participants for thank you email\n if(requiredSignedAddress) throw; // Crowdsale allows only server-side signed participants\n investInternal(addr, 0);\n }\n\n /**\n * Invest to tokens, recognize the payer and clear his address.\n *\n */\n function buyWithSignedAddress(uint128 customerId, uint8 v, bytes32 r, bytes32 s) public payable {\n investWithSignedAddress(msg.sender, customerId, v, r, s);\n }\n\n /**\n * Invest to tokens, recognize the payer.\n *\n */\n function buyWithCustomerIdWithChecksum(uint128 customerId, bytes1 checksum) public payable {\n // see customerid.py\n if (bytes1(sha3(customerId)) != checksum) throw;\n investWithCustomerId(msg.sender, customerId);\n }\n\n /**\n * Legacy API signature.\n */\n function buyWithCustomerId(uint128 customerId) public payable {\n investWithCustomerId(msg.sender, customerId);\n }\n\n /**\n * The basic entry point to participate the crowdsale process.\n *\n * Pay for funding, get invested tokens back in the sender address.\n */\n function buy() public payable {\n invest(msg.sender);\n }\n\n /**\n * Set policy do we need to have server-side customer ids for the investments.\n *\n */\n function setRequireCustomerId(bool value) onlyOwner {\n requireCustomerId = value;\n InvestmentPolicyChanged(requireCustomerId, requiredSignedAddress, signerAddress);\n }\n\n /**\n * Set policy if all investors must be cleared on the server side first.\n *\n * This is e.g. for the accredited investor clearing.\n *\n */\n function setRequireSignedAddress(bool value, address _signerAddress) onlyOwner {\n requiredSignedAddress = value;\n signerAddress = _signerAddress;\n InvestmentPolicyChanged(requireCustomerId, requiredSignedAddress, signerAddress);\n }\n\n}\n\n\n\n\n\n/// @dev Time milestone based pricing with special support for pre-ico deals.\ncontract MilestonePricing is PricingStrategy, Ownable {\n\n using SafeMathLib for uint;\n\n uint public constant MAX_MILESTONE = 10;\n\n // This contains all pre-ICO addresses, and their prices (weis per token)\n mapping (address => uint) public preicoAddresses;\n\n /**\n * Define pricing schedule using milestones.\n */\n struct Milestone {\n\n // UNIX timestamp when this milestone kicks in\n uint time;\n\n // How many tokens per wei you will get after this milestone has been passed\n uint price;\n }\n\n // Store milestones in a fixed array, so that it can be seen in a blockchain explorer\n // Milestone 0 is always (0, 0)\n // (TODO: change this when we confirm dynamic arrays are explorable)\n Milestone[10] public milestones;\n\n // How many active milestones we have\n uint public milestoneCount;\n\n /// @dev Contruction, creating a list of milestones\n /// @param _milestones uint[] milestones Pairs of (time, price)\n function MilestonePricing(uint[] _milestones) {\n // Need to have tuples, length check\n if(_milestones.length % 2 == 1 || _milestones.length >= MAX_MILESTONE*2) {\n throw;\n }\n\n milestoneCount = _milestones.length / 2;\n\n uint lastTimestamp = 0;\n\n for(uint i=0; i<_milestones.length/2; i++) {\n milestones[i].time = _milestones[i*2];\n milestones[i].price = _milestones[i*2+1];\n\n // No invalid steps\n if((lastTimestamp != 0) && (milestones[i].time <= lastTimestamp)) {\n throw;\n }\n\n lastTimestamp = milestones[i].time;\n }\n\n // Last milestone price must be zero, terminating the crowdale\n if(milestones[milestoneCount-1].price != 0) {\n throw;\n }\n }\n\n /// @dev This is invoked once for every pre-ICO address, set pricePerToken\n /// to 0 to disable\n /// @param preicoAddress PresaleFundCollector address\n /// @param pricePerToken How many weis one token cost for pre-ico investors\n function setPreicoAddress(address preicoAddress, uint pricePerToken)\n public\n onlyOwner\n {\n preicoAddresses[preicoAddress] = pricePerToken;\n }\n\n /// @dev Iterate through milestones. You reach end of milestones when price = 0\n /// @return tuple (time, price)\n function getMilestone(uint n) public constant returns (uint, uint) {\n return (milestones[n].time, milestones[n].price);\n }\n\n function getFirstMilestone() private constant returns (Milestone) {\n return milestones[0];\n }\n\n function getLastMilestone() private constant returns (Milestone) {\n return milestones[milestoneCount-1];\n }\n\n function getPricingStartsAt() public constant returns (uint) {\n return getFirstMilestone().time;\n }\n\n function getPricingEndsAt() public constant returns (uint) {\n return getLastMilestone().time;\n }\n\n function isSane(address _crowdsale) public constant returns(bool) {\n Crowdsale crowdsale = Crowdsale(_crowdsale);\n return crowdsale.startsAt() == getPricingStartsAt() && crowdsale.endsAt() == getPricingEndsAt();\n }\n\n /// @dev Get the current milestone or bail out if we are not in the milestone periods.\n /// @return {[type]} [description]\n function getCurrentMilestone() private constant returns (Milestone) {\n uint i;\n\n for(i=0; i 0) {\n return value.times(multiplier) / preicoAddresses[msgSender];\n }\n\n uint price = getCurrentPrice();\n return value.times(multiplier) / price;\n }\n\n function isPresalePurchase(address purchaser) public constant returns (bool) {\n if(preicoAddresses[purchaser] > 0)\n return true;\n else\n return false;\n }\n\n function() payable {\n throw; // No money on this contract\n }\n\n}\n"}, "MintableToken": {"abi": [{"constant": true, "inputs": [], "name": "mintingFinished", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "approve", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "recoverTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_from", "type": "address"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "receiver", "type": "address"}, {"name": "amount", "type": "uint256"}], "name": "mint", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "mintAgents", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "state", "type": "bool"}], "name": "setMintAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_subtractedValue", "type": "uint256"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "tokensToBeReturned", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_addedValue", "type": "uint256"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}, {"name": "_spender", "type": "address"}], "name": "allowance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isToken", "outputs": [{"name": "weAre", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "addr", "type": "address"}, {"indexed": false, "name": "state", "type": "bool"}], "name": "MintingAgentChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "receiver", "type": "address"}, {"indexed": false, "name": "amount", "type": "uint256"}], "name": "Minted", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}, {"indexed": true, "name": "spender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "bytecode": "0x608060405260038054600160a860020a03191633179055610d23806100256000396000f3006080604052600436106100f05763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166305d2035b81146100f5578063095ea7b31461011e57806316114acd1461014257806318160ddd1461016557806323b872dd1461018c57806340c10f19146101b657806342c1867b146101da57806343214675146101fb578063661884631461022157806370a08231146102455780638da5cb5b14610266578063a9059cbb14610297578063c45d19db146102bb578063d73dd623146102dc578063dd62ed3e14610300578063eefa597b14610327578063f2fde38b1461033c575b600080fd5b34801561010157600080fd5b5061010a61035d565b604080519115158252519081900360200190f35b34801561012a57600080fd5b5061010a600160a060020a036004351660243561037e565b34801561014e57600080fd5b50610163600160a060020a03600435166103e4565b005b34801561017157600080fd5b5061017a6104b4565b60408051918252519081900360200190f35b34801561019857600080fd5b5061010a600160a060020a03600435811690602435166044356104ba565b3480156101c257600080fd5b50610163600160a060020a0360043516602435610631565b3480156101e657600080fd5b5061010a600160a060020a0360043516610828565b34801561020757600080fd5b50610163600160a060020a0360043516602435151561083d565b34801561022d57600080fd5b5061010a600160a060020a03600435166024356108e0565b34801561025157600080fd5b5061017a600160a060020a03600435166109d0565b34801561027257600080fd5b5061027b6109eb565b60408051600160a060020a039092168252519081900360200190f35b3480156102a357600080fd5b5061010a600160a060020a03600435166024356109fa565b3480156102c757600080fd5b5061017a600160a060020a0360043516610adb565b3480156102e857600080fd5b5061010a600160a060020a0360043516602435610b71565b34801561030c57600080fd5b5061017a600160a060020a0360043581169060243516610c0a565b34801561033357600080fd5b5061010a610c35565b34801561034857600080fd5b50610163600160a060020a0360043516610c3a565b60035474010000000000000000000000000000000000000000900460ff1681565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b600354600160a060020a031633146103fb57600080fd5b600354600160a060020a038083169163a9059cbb911661041a84610adb565b6040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b15801561048557600080fd5b505af1158015610499573d6000803e3d6000fd5b505050506040513d60208110156104af57600080fd5b505050565b60015490565b6000600160a060020a03831615156104d157600080fd5b600160a060020a0384166000908152602081905260409020548211156104f657600080fd5b600160a060020a038416600090815260026020908152604080832033845290915290205482111561052657600080fd5b600160a060020a03841660009081526020819052604090205461054f908363ffffffff610ccf16565b600160a060020a038086166000908152602081905260408082209390935590851681522054610584908363ffffffff610ce116565b600160a060020a038085166000908152602081815260408083209490945591871681526002825282812033825290915220546105c6908363ffffffff610ccf16565b600160a060020a03808616600081815260026020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b3360009081526004602052604090205460ff16151561064f57600080fd5b60035474010000000000000000000000000000000000000000900460ff161561067757600080fd5b60015473__contracts/SafeMathLib.sol:SafeMathLi__6366098d4f9091836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b1580156106ee57600080fd5b505af4158015610702573d6000803e3d6000fd5b505050506040513d602081101561071857600080fd5b5051600155600160a060020a038216600090815260208181526040918290205482517f66098d4f000000000000000000000000000000000000000000000000000000008152600481019190915260248101849052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b1580156107a657600080fd5b505af41580156107ba573d6000803e3d6000fd5b505050506040513d60208110156107d057600080fd5b5051600160a060020a0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b60046020526000908152604090205460ff1681565b600354600160a060020a0316331461085457600080fd5b60035474010000000000000000000000000000000000000000900460ff161561087c57600080fd5b600160a060020a038216600081815260046020908152604091829020805460ff191685151590811790915582519384529083015280517f4b0adf6c802794c7dde28a08a4e07131abcff3bf9603cd71f14f90bec7865efa9281900390910190a15050565b336000908152600260209081526040808320600160a060020a03861684529091528120548083111561093557336000908152600260209081526040808320600160a060020a038816845290915281205561096a565b610945818463ffffffff610ccf16565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a031660009081526020819052604090205490565b600354600160a060020a031681565b6000600160a060020a0383161515610a1157600080fd5b33600090815260208190526040902054821115610a2d57600080fd5b33600090815260208190526040902054610a4d908363ffffffff610ccf16565b3360009081526020819052604080822092909255600160a060020a03851681522054610a7f908363ffffffff610ce116565b600160a060020a038416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600091600160a060020a038416916370a082319160248082019260209290919082900301818787803b158015610b3f57600080fd5b505af1158015610b53573d6000803e3d6000fd5b505050506040513d6020811015610b6957600080fd5b505192915050565b336000908152600260209081526040808320600160a060020a0386168452909152812054610ba5908363ffffffff610ce116565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600190565b600354600160a060020a03163314610c5157600080fd5b600160a060020a0381161515610c6657600080fd5b600354604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600082821115610cdb57fe5b50900390565b600082820183811015610cf057fe5b93925050505600a165627a7a72305820e5c7f5b40bacf11f042f309019026e210005d705e51634cccba5a71f8aa276fa0029", "bytecode_runtime": "0x6080604052600436106100f05763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166305d2035b81146100f5578063095ea7b31461011e57806316114acd1461014257806318160ddd1461016557806323b872dd1461018c57806340c10f19146101b657806342c1867b146101da57806343214675146101fb578063661884631461022157806370a08231146102455780638da5cb5b14610266578063a9059cbb14610297578063c45d19db146102bb578063d73dd623146102dc578063dd62ed3e14610300578063eefa597b14610327578063f2fde38b1461033c575b600080fd5b34801561010157600080fd5b5061010a61035d565b604080519115158252519081900360200190f35b34801561012a57600080fd5b5061010a600160a060020a036004351660243561037e565b34801561014e57600080fd5b50610163600160a060020a03600435166103e4565b005b34801561017157600080fd5b5061017a6104b4565b60408051918252519081900360200190f35b34801561019857600080fd5b5061010a600160a060020a03600435811690602435166044356104ba565b3480156101c257600080fd5b50610163600160a060020a0360043516602435610631565b3480156101e657600080fd5b5061010a600160a060020a0360043516610828565b34801561020757600080fd5b50610163600160a060020a0360043516602435151561083d565b34801561022d57600080fd5b5061010a600160a060020a03600435166024356108e0565b34801561025157600080fd5b5061017a600160a060020a03600435166109d0565b34801561027257600080fd5b5061027b6109eb565b60408051600160a060020a039092168252519081900360200190f35b3480156102a357600080fd5b5061010a600160a060020a03600435166024356109fa565b3480156102c757600080fd5b5061017a600160a060020a0360043516610adb565b3480156102e857600080fd5b5061010a600160a060020a0360043516602435610b71565b34801561030c57600080fd5b5061017a600160a060020a0360043581169060243516610c0a565b34801561033357600080fd5b5061010a610c35565b34801561034857600080fd5b50610163600160a060020a0360043516610c3a565b60035474010000000000000000000000000000000000000000900460ff1681565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b600354600160a060020a031633146103fb57600080fd5b600354600160a060020a038083169163a9059cbb911661041a84610adb565b6040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b15801561048557600080fd5b505af1158015610499573d6000803e3d6000fd5b505050506040513d60208110156104af57600080fd5b505050565b60015490565b6000600160a060020a03831615156104d157600080fd5b600160a060020a0384166000908152602081905260409020548211156104f657600080fd5b600160a060020a038416600090815260026020908152604080832033845290915290205482111561052657600080fd5b600160a060020a03841660009081526020819052604090205461054f908363ffffffff610ccf16565b600160a060020a038086166000908152602081905260408082209390935590851681522054610584908363ffffffff610ce116565b600160a060020a038085166000908152602081815260408083209490945591871681526002825282812033825290915220546105c6908363ffffffff610ccf16565b600160a060020a03808616600081815260026020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b3360009081526004602052604090205460ff16151561064f57600080fd5b60035474010000000000000000000000000000000000000000900460ff161561067757600080fd5b60015473__contracts/SafeMathLib.sol:SafeMathLi__6366098d4f9091836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b1580156106ee57600080fd5b505af4158015610702573d6000803e3d6000fd5b505050506040513d602081101561071857600080fd5b5051600155600160a060020a038216600090815260208181526040918290205482517f66098d4f000000000000000000000000000000000000000000000000000000008152600481019190915260248101849052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b1580156107a657600080fd5b505af41580156107ba573d6000803e3d6000fd5b505050506040513d60208110156107d057600080fd5b5051600160a060020a0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b60046020526000908152604090205460ff1681565b600354600160a060020a0316331461085457600080fd5b60035474010000000000000000000000000000000000000000900460ff161561087c57600080fd5b600160a060020a038216600081815260046020908152604091829020805460ff191685151590811790915582519384529083015280517f4b0adf6c802794c7dde28a08a4e07131abcff3bf9603cd71f14f90bec7865efa9281900390910190a15050565b336000908152600260209081526040808320600160a060020a03861684529091528120548083111561093557336000908152600260209081526040808320600160a060020a038816845290915281205561096a565b610945818463ffffffff610ccf16565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a031660009081526020819052604090205490565b600354600160a060020a031681565b6000600160a060020a0383161515610a1157600080fd5b33600090815260208190526040902054821115610a2d57600080fd5b33600090815260208190526040902054610a4d908363ffffffff610ccf16565b3360009081526020819052604080822092909255600160a060020a03851681522054610a7f908363ffffffff610ce116565b600160a060020a038416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600091600160a060020a038416916370a082319160248082019260209290919082900301818787803b158015610b3f57600080fd5b505af1158015610b53573d6000803e3d6000fd5b505050506040513d6020811015610b6957600080fd5b505192915050565b336000908152600260209081526040808320600160a060020a0386168452909152812054610ba5908363ffffffff610ce116565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600190565b600354600160a060020a03163314610c5157600080fd5b600160a060020a0381161515610c6657600080fd5b600354604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600082821115610cdb57fe5b50900390565b600082820183811015610cf057fe5b93925050505600a165627a7a72305820e5c7f5b40bacf11f042f309019026e210005d705e51634cccba5a71f8aa276fa0029", "direct_dependencies": ["SafeMathLib"], "full_dependencies": ["SafeMathLib"], "linkrefs": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 3394}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 3882}], "linkrefs_runtime": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 3320}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 3808}], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": true, "inputs": [], "name": "mintingFinished", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "approve", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "recoverTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_from", "type": "address"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "receiver", "type": "address"}, {"name": "amount", "type": "uint256"}], "name": "mint", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "mintAgents", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "state", "type": "bool"}], "name": "setMintAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_subtractedValue", "type": "uint256"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "tokensToBeReturned", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_addedValue", "type": "uint256"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}, {"name": "_spender", "type": "address"}], "name": "allowance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isToken", "outputs": [{"name": "weAre", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "addr", "type": "address"}, {"indexed": false, "name": "state", "type": "bool"}], "name": "MintingAgentChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "receiver", "type": "address"}, {"indexed": false, "name": "amount", "type": "uint256"}], "name": "Minted", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}, {"indexed": true, "name": "spender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "devdoc": {"methods": {"allowance(address,address)": {"details": "Function to check the amount of tokens that an owner allowed to a spender.", "params": {"_owner": "address The address which owns the funds.", "_spender": "address The address which will spend the funds."}, "return": "A uint256 specifying the amount of tokens still available for the spender."}, "approve(address,uint256)": {"details": "Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729", "params": {"_spender": "The address which will spend the funds.", "_value": "The amount of tokens to be spent."}}, "balanceOf(address)": {"details": "Gets the balance of the specified address.", "params": {"_owner": "The address to query the the balance of."}, "return": "An uint256 representing the amount owned by the passed address."}, "decreaseApproval(address,uint256)": {"details": "Decrease the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[_spender] == 0. To decrement allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"_spender": "The address which will spend the funds.", "_subtractedValue": "The amount of tokens to decrease the allowance by."}}, "increaseApproval(address,uint256)": {"details": "Increase the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[_spender] == 0. To increment allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"_addedValue": "The amount of tokens to increase the allowance by.", "_spender": "The address which will spend the funds."}}, "recoverTokens(address)": {"details": "This will be invoked by the owner, when owner wants to rescue tokens", "params": {"token": "Token which will we rescue to the owner from the contract"}}, "tokensToBeReturned(address)": {"details": "Interface function, can be overwritten by the superclass", "params": {"token": "Token which balance we will check and return"}, "return": "The amount of tokens (in smallest denominator) the contract owns"}, "totalSupply()": {"details": "total number of tokens in existence"}, "transfer(address,uint256)": {"details": "transfer token for a specified address", "params": {"_to": "The address to transfer to.", "_value": "The amount to be transferred."}}, "transferFrom(address,address,uint256)": {"details": "Transfer tokens from one address to another", "params": {"_from": "address The address which you want to send tokens from", "_to": "address The address which you want to transfer to", "_value": "uint256 the amount of tokens to be transferred"}}, "transferOwnership(address)": {"details": "Allows the current owner to transfer control of the contract to a newOwner.", "params": {"newOwner": "The address to transfer ownership to."}}}}, "userdoc": {"methods": {"mint(address,uint256)": {"notice": "Create new tokens and allocate them to an address.. * Only callably by a crowdsale contract (mint agent)."}, "setMintAgent(address,bool)": {"notice": "Owner can allow a crowdsale contract to mint new tokens."}}}}, "settings": {"compilationTarget": {"contracts/MintableToken.sol": "MintableToken"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/MintableToken.sol": {"keccak256": "0x650e1d6b2bedcd36508918357c7cf4f36fdd093cd0c4d6342f4dcd3bdcdd7578", "urls": ["bzzr://7ba2ac0480d428066a18727e2adb76ba56856ecd37b4420e801131ec8f8f4be3"]}, "contracts/Recoverable.sol": {"keccak256": "0x311a332cdd87df6e00057f5455f4e68b043b5dbe211f6d68bc64e20817515635", "urls": ["bzzr://4fd99bcfb93baed6e7c8d22ee9ecc5c8346a1aa98288e77b01333b2c5d3f582d"]}, "contracts/SafeMathLib.sol": {"keccak256": "0x501bfe31e274b9a5591f7c540bdced4d4312e27d4f19599147c9bbca3d9c6b18", "urls": ["bzzr://a80935ebddb06c247d71372d4e5833ee029f08633bd0fe4a274a57009567e5b9"]}, "contracts/StandardTokenExt.sol": {"keccak256": "0x9ea2d4cec4dccd5639c05e6c23dd027d80b5e5a20abd99b280ab7b2631b5a5fc", "urls": ["bzzr://a52d8fc5a21bd83997aff19128e00dceb251df712207b61223894c8b7f42d5ff"]}, "zeppelin/contracts/math/SafeMath.sol": {"keccak256": "0x341ba8cb467a3623e819ba1a683ac1d264005186f308505214e5f6bc89446a08", "urls": ["bzzr://59b5652ee4e4a1b5a8f1a8906e14c84af43d636cf5ca0725cc1813aabe4c8c17"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}, "zeppelin/contracts/token/ERC20/BasicToken.sol": {"keccak256": "0x948404468d61ff35ea4194650670408dabd65da7f905a1c16888ab84520bf39e", "urls": ["bzzr://ea75e20f95d7e4e10394fe6bfaa8eee56b4757c2a6f1e8df4180d33afa621935"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}, "zeppelin/contracts/token/ERC20/StandardToken.sol": {"keccak256": "0xd2b344a5259e19ec143074cfa65637a10c40b68395c59808c4af13bccbb2de55", "urls": ["bzzr://d61a01175a7ca1ba9f4403de603c20b897e33ec425aef2d9f8a7f9ddfdfaf5b2"]}}, "version": 1}, "name": "MintableToken", "ordered_full_dependencies": ["SafeMathLib"], "source_path": "contracts/MintableToken.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n assert(c / a == b);\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n\n\n\n/**\n * @title Basic token\n * @dev Basic version of StandardToken, with no allowances.\n */\ncontract BasicToken is ERC20Basic {\n using SafeMath for uint256;\n\n mapping(address => uint256) balances;\n\n uint256 totalSupply_;\n\n /**\n * @dev total number of tokens in existence\n */\n function totalSupply() public view returns (uint256) {\n return totalSupply_;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param _to The address to transfer to.\n * @param _value The amount to be transferred.\n */\n function transfer(address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[msg.sender]);\n\n // SafeMath.sub will throw if there is not enough balance.\n balances[msg.sender] = balances[msg.sender].sub(_value);\n balances[_to] = balances[_to].add(_value);\n Transfer(msg.sender, _to, _value);\n return true;\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param _owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address _owner) public view returns (uint256 balance) {\n return balances[_owner];\n }\n\n}\n\n\n\n\n/**\n * @title Standard ERC20 token\n *\n * @dev Implementation of the basic standard token.\n * @dev https://github.com/ethereum/EIPs/issues/20\n * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol\n */\ncontract StandardToken is ERC20, BasicToken {\n\n mapping (address => mapping (address => uint256)) internal allowed;\n\n\n /**\n * @dev Transfer tokens from one address to another\n * @param _from address The address which you want to send tokens from\n * @param _to address The address which you want to transfer to\n * @param _value uint256 the amount of tokens to be transferred\n */\n function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[_from]);\n require(_value <= allowed[_from][msg.sender]);\n\n balances[_from] = balances[_from].sub(_value);\n balances[_to] = balances[_to].add(_value);\n allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);\n Transfer(_from, _to, _value);\n return true;\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n *\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param _spender The address which will spend the funds.\n * @param _value The amount of tokens to be spent.\n */\n function approve(address _spender, uint256 _value) public returns (bool) {\n allowed[msg.sender][_spender] = _value;\n Approval(msg.sender, _spender, _value);\n return true;\n }\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param _owner address The address which owns the funds.\n * @param _spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address _owner, address _spender) public view returns (uint256) {\n return allowed[_owner][_spender];\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(address _spender, uint _addedValue) public returns (bool) {\n allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {\n uint oldValue = allowed[msg.sender][_spender];\n if (_subtractedValue > oldValue) {\n allowed[msg.sender][_spender] = 0;\n } else {\n allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);\n }\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n\ncontract Recoverable is Ownable {\n\n /// @dev Empty constructor (for now)\n function Recoverable() {\n }\n\n /// @dev This will be invoked by the owner, when owner wants to rescue tokens\n /// @param token Token which will we rescue to the owner from the contract\n function recoverTokens(ERC20Basic token) onlyOwner public {\n token.transfer(owner, tokensToBeReturned(token));\n }\n\n /// @dev Interface function, can be overwritten by the superclass\n /// @param token Token which balance we will check and return\n /// @return The amount of tokens (in smallest denominator) the contract owns\n function tokensToBeReturned(ERC20Basic token) public returns (uint) {\n return token.balanceOf(this);\n }\n}\n\n\n\n/**\n * Standard EIP-20 token with an interface marker.\n *\n * @notice Interface marker is used by crowdsale contracts to validate that addresses point a good token contract.\n *\n */\ncontract StandardTokenExt is StandardToken, Recoverable {\n\n /* Interface declaration */\n function isToken() public constant returns (bool weAre) {\n return true;\n }\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Safe unsigned safe math.\n *\n * https://blog.aragon.one/library-driven-development-in-solidity-2bebcaf88736#.750gwtwli\n *\n * Originally from https://raw.githubusercontent.com/AragonOne/zeppelin-solidity/master/contracts/SafeMathLib.sol\n *\n * Maintained here until merged to mainline zeppelin-solidity.\n *\n */\nlibrary SafeMathLib {\n\n function times(uint a, uint b) returns (uint) {\n uint c = a * b;\n assert(a == 0 || c / a == b);\n return c;\n }\n\n function minus(uint a, uint b) returns (uint) {\n assert(b <= a);\n return a - b;\n }\n\n function plus(uint a, uint b) returns (uint) {\n uint c = a + b;\n assert(c>=a);\n return c;\n }\n\n}\n\n\n\n/**\n * A token that can increase its supply by another contract.\n *\n * This allows uncapped crowdsale by dynamically increasing the supply when money pours in.\n * Only mint agents, contracts whitelisted by owner, can mint new tokens.\n *\n */\ncontract MintableToken is StandardTokenExt {\n\n using SafeMathLib for uint;\n\n bool public mintingFinished = false;\n\n /** List of agents that are allowed to create new tokens */\n mapping (address => bool) public mintAgents;\n\n event MintingAgentChanged(address addr, bool state);\n event Minted(address receiver, uint amount);\n\n /**\n * Create new tokens and allocate them to an address..\n *\n * Only callably by a crowdsale contract (mint agent).\n */\n function mint(address receiver, uint amount) onlyMintAgent canMint public {\n totalSupply_ = totalSupply_.plus(amount);\n balances[receiver] = balances[receiver].plus(amount);\n\n // This will make the mint transaction apper in EtherScan.io\n // We can remove this after there is a standardized minting event\n Transfer(0, receiver, amount);\n }\n\n /**\n * Owner can allow a crowdsale contract to mint new tokens.\n */\n function setMintAgent(address addr, bool state) onlyOwner canMint public {\n mintAgents[addr] = state;\n MintingAgentChanged(addr, state);\n }\n\n modifier onlyMintAgent() {\n // Only crowdsale contracts are allowed to mint new tokens\n if(!mintAgents[msg.sender]) {\n throw;\n }\n _;\n }\n\n /** Make sure we are not done yet. */\n modifier canMint() {\n if(mintingFinished) throw;\n _;\n }\n}\n"}, "MintedEthCappedCrowdsale": {"abi": [{"constant": true, "inputs": [], "name": "ownerTestValue", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "requireCustomerId", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "invest", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "isPricingSane", "outputs": [{"name": "sane", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "endsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "minimumFundingGoal", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getState", "outputs": [{"name": "", "type": "uint8"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setFinalizeAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "customerId", "type": "uint128"}, {"name": "v", "type": "uint8"}, {"name": "r", "type": "bytes32"}, {"name": "s", "type": "bytes32"}], "name": "investWithSignedAddress", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "investedAmountOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "finalizeAgent", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "receiver", "type": "address"}, {"name": "fullTokens", "type": "uint256"}, {"name": "weiPrice", "type": "uint256"}], "name": "preallocate", "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": "isCrowdsale", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "finalize", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_pricingStrategy", "type": "address"}], "name": "setPricingStrategy", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "tokensSold", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "refund", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "signerAddress", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "weiRefunded", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "halt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}, {"name": "checksum", "type": "bytes1"}], "name": "buyWithCustomerIdWithChecksum", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "time", "type": "uint256"}], "name": "setEndsAt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "pricingStrategy", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "loadedRefund", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isMinimumGoalReached", "outputs": [{"name": "reached", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "bool"}], "name": "setRequireCustomerId", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "weiCap", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "loadRefund", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "val", "type": "uint256"}], "name": "setOwnerTestValue", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "weisTotal", "type": "uint256"}, {"name": "pricePerToken", "type": "uint256"}], "name": "calculateTokens", "outputs": [{"name": "tokensTotal", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "multisigWallet", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "tokenAmountOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}], "name": "buyWithCustomerId", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [{"name": "weiAmount", "type": "uint256"}, {"name": "tokenAmount", "type": "uint256"}, {"name": "weiRaisedTotal", "type": "uint256"}, {"name": "tokensSoldTotal", "type": "uint256"}], "name": "isBreakingCap", "outputs": [{"name": "limitBroken", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "buy", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "isFinalizerSane", "outputs": [{"name": "sane", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "startsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "finalized", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "halted", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "earlyParticipantWhitelist", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "unhalt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "requiredSignedAddress", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isCrowdsaleFull", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "investorCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "status", "type": "bool"}], "name": "setEarlyParicipantWhitelist", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "bool"}, {"name": "_signerAddress", "type": "address"}], "name": "setRequireSignedAddress", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "customerId", "type": "uint128"}], "name": "investWithCustomerId", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setMultisig", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}, {"name": "v", "type": "uint8"}, {"name": "r", "type": "bytes32"}, {"name": "s", "type": "bytes32"}], "name": "buyWithSignedAddress", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "presaleWeiRaised", "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": "_token", "type": "address"}, {"name": "_pricingStrategy", "type": "address"}, {"name": "_multisigWallet", "type": "address"}, {"name": "_start", "type": "uint256"}, {"name": "_end", "type": "uint256"}, {"name": "_minimumFundingGoal", "type": "uint256"}, {"name": "_weiCap", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"payable": true, "stateMutability": "payable", "type": "fallback"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}, {"indexed": false, "name": "tokenAmount", "type": "uint256"}, {"indexed": false, "name": "customerId", "type": "uint128"}], "name": "Invested", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}], "name": "Refund", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newRequireCustomerId", "type": "bool"}, {"indexed": false, "name": "newRequiredSignedAddress", "type": "bool"}, {"indexed": false, "name": "newSignerAddress", "type": "address"}], "name": "InvestmentPolicyChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "addr", "type": "address"}, {"indexed": false, "name": "status", "type": "bool"}], "name": "Whitelisted", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newEndsAt", "type": "uint256"}], "name": "EndsAtChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "bytecode": "0x6080604052600560015560006009556000600a556000600b556000600c556000600d556000600e553480156200003457600080fd5b5060405160e0806200264183398101604090815281516020830151918301516060840151608085015160a086015160c0909601516000805433600160a060020a0319918216811782161790915560028054909116600160a060020a0387161790559395929391929091868686868686858585858585620000bd856401000000006200013f810204565b60058054600160a060020a031916600160a060020a038681169190911791829055161515620000eb57600080fd5b821515620000f857600080fd5b60078390558115156200010a57600080fd5b600882905560075482116200011e57600080fd5b600655505050601598909855506200020c9c50505050505050505050505050565b600054600160a060020a031633146200015757600080fd5b60038054600160a060020a031916600160a060020a038381169190911791829055604080517f04bbc255000000000000000000000000000000000000000000000000000000008152905192909116916304bbc255916004808201926020929091908290030181600087803b158015620001cf57600080fd5b505af1158015620001e4573d6000803e3d6000fd5b505050506040513d6020811015620001fb57600080fd5b505115156200020957600080fd5b50565b612425806200021c6000396000f3006080604052600436106102925763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630226401d811461029757806303ca0eed146102be57806303f9c793146102e7578063062b01ce146102fd5780630a09284a1461031257806313f4e977146103275780631865c57d1461033c57806319b667da146103755780631a49803b146103965780631aae3460146103cb57806321d5c0f6146103ec57806332013ac31461041d5780634042b66f146104445780634551dd59146104595780634bb278f31461046e57806350c6773414610483578063518ab2a8146104a4578063590e1ae3146104b95780635b7633d0146104ce5780635da89ac0146104e35780635ed7ca5b146104f85780636203f09f1461050d57806363c6082f146105225780636e50eb3f1461056457806378b99c241461057c578063797d9437146105915780637c2e08a3146105a65780637f7d711e146105bb57806384fe5029146105d557806387612102146105ea5780638d51faec146105f25780638da5cb5b1461060a578063903cc5831461061f5780639075becf1461063a57806397b150ca1461064f57806399e9376c146106705780639d3c663f1461068d578063a6f2ae3a146106ae578063a7ba44c3146106b6578063af468682146106cb578063b3f05b97146106e0578063b9b8af0b146106f5578063cb16e6d01461070a578063cb3e64fd1461072b578063d222dc0414610740578063d5d0902114610755578063d7e64c001461076a578063eac249321461077f578063ed68ff2c146107a5578063ef869443146107cb578063f2fde38b146107f4578063f3283fba14610815578063f486972614610836578063f7c00e2f1461085f578063fc0c546a14610874575b600080fd5b3480156102a357600080fd5b506102ac610889565b60408051918252519081900360200190f35b3480156102ca57600080fd5b506102d361088f565b604080519115158252519081900360200190f35b6102fb600160a060020a0360043516610898565b005b34801561030957600080fd5b506102d36108cc565b34801561031e57600080fd5b506102ac610963565b34801561033357600080fd5b506102ac610969565b34801561034857600080fd5b5061035161096f565b6040518082600781111561036157fe5b60ff16815260200191505060405180910390f35b34801561038157600080fd5b506102fb600160a060020a0360043516610b5d565b6102fb600160a060020a03600435166fffffffffffffffffffffffffffffffff6024351660ff60443516606435608435610c2e565b3480156103d757600080fd5b506102ac600160a060020a0360043516610d56565b3480156103f857600080fd5b50610401610d68565b60408051600160a060020a039092168252519081900360200190f35b34801561042957600080fd5b506102fb600160a060020a0360043516602435604435610d77565b34801561045057600080fd5b506102ac61112d565b34801561046557600080fd5b506102d3611133565b34801561047a57600080fd5b506102fb611138565b34801561048f57600080fd5b506102fb600160a060020a036004351661123d565b3480156104b057600080fd5b506102ac6112d8565b3480156104c557600080fd5b506102fb6112de565b3480156104da57600080fd5b50610401611424565b3480156104ef57600080fd5b506102ac611439565b34801561050457600080fd5b506102fb61143f565b34801561051957600080fd5b506102ac61148d565b6102fb6fffffffffffffffffffffffffffffffff600435167fff0000000000000000000000000000000000000000000000000000000000000060243516611493565b34801561057057600080fd5b506102fb600435611505565b34801561058857600080fd5b50610401611573565b34801561059d57600080fd5b506102ac611582565b3480156105b257600080fd5b506102d3611588565b3480156105c757600080fd5b506102fb6004351515611593565b3480156105e157600080fd5b506102ac611617565b6102fb61161d565b3480156105fe57600080fd5b506102fb6004356116dd565b34801561061657600080fd5b506104016116f9565b34801561062b57600080fd5b506102ac600435602435611708565b34801561064657600080fd5b5061040161185f565b34801561065b57600080fd5b506102ac600160a060020a036004351661186e565b6102fb6fffffffffffffffffffffffffffffffff60043516611880565b34801561069957600080fd5b506102d360043560243560443560643561188a565b6102fb611895565b3480156106c257600080fd5b506102d36118a0565b3480156106d757600080fd5b506102ac61190e565b3480156106ec57600080fd5b506102d3611914565b34801561070157600080fd5b506102d361191d565b34801561071657600080fd5b506102d3600160a060020a036004351661193e565b34801561073757600080fd5b506102fb611953565b34801561074c57600080fd5b506102d36119b3565b34801561076157600080fd5b506102d36119c1565b34801561077657600080fd5b506102ac6119cc565b34801561078b57600080fd5b506102fb600160a060020a036004351660243515156119d2565b3480156107b157600080fd5b506102fb6004351515600160a060020a0360243516611a4d565b6102fb600160a060020a03600435166fffffffffffffffffffffffffffffffff60243516611afd565b34801561080057600080fd5b506102fb600160a060020a0360043516611b3f565b34801561082157600080fd5b506102fb600160a060020a0360043516611bd3565b6102fb6fffffffffffffffffffffffffffffffff6004351660ff60243516604435606435611c2a565b34801561086b57600080fd5b506102ac611c3d565b34801561088057600080fd5b50610401611c43565b60135481565b60145460ff1681565b60145460ff16156108a857600080fd5b601454610100900460ff16156108bd57600080fd5b6108c8816000611c52565b5050565b600354604080517f8e7682880000000000000000000000000000000000000000000000000000000081523060048201529051600092600160a060020a031691638e76828891602480830192602092919082900301818787803b15801561093157600080fd5b505af1158015610945573d6000803e3d6000fd5b505050506040513d602081101561095b57600080fd5b505190505b90565b60085481565b60065481565b600f5460009060ff161561098557506006610960565b600454600160a060020a0316151561099f57506001610960565b60048054604080517f82771c8e0000000000000000000000000000000000000000000000000000000081529051600160a060020a03909216926382771c8e9282820192602092908290030181600087803b1580156109fc57600080fd5b505af1158015610a10573d6000803e3d6000fd5b505050506040513d6020811015610a2657600080fd5b50511515610a3657506001610960565b600354604080517f8e7682880000000000000000000000000000000000000000000000000000000081523060048201529051600160a060020a0390921691638e768288916024808201926020929091908290030181600087803b158015610a9c57600080fd5b505af1158015610ab0573d6000803e3d6000fd5b505050506040513d6020811015610ac657600080fd5b50511515610ad657506001610960565b600754421015610ae857506002610960565b6008544211158015610aff5750610afd6119c1565b155b15610b0c57506003610960565b610b14611588565b15610b2157506004610960565b610b29611588565b158015610b3857506000600a54115b8015610b485750600a54600d5410155b15610b5557506007610960565b506005610960565b600054600160a060020a03163314610b7457600080fd5b6004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383811691909117808355604080517f614cb9040000000000000000000000000000000000000000000000000000000081529051919092169263614cb904928082019260209290918290030181600087803b158015610bf457600080fd5b505af1158015610c08573d6000803e3d6000fd5b505050506040513d6020811015610c1e57600080fd5b50511515610c2b57600080fd5b50565b60006002866040518082600160a060020a0316600160a060020a03166c010000000000000000000000000281526014019150506020604051808303816000865af1158015610c80573d6000803e3d6000fd5b5050506040513d6020811015610c9557600080fd5b5051601454604080516000808252602080830180855286905260ff8a16838501526060830189905260808301889052925194955062010000909304600160a060020a03169360019360a08084019493601f198401939081900390910191865af1158015610d06573d6000803e3d6000fd5b50505060206040510351600160a060020a0316141515610d2557600080fd5b6fffffffffffffffffffffffffffffffff85161515610d4357600080fd5b610d4d8686611c52565b50505050505050565b60106020526000908152604090205481565b600454600160a060020a031681565b600080548190600160a060020a03163314610d9157600080fd5b600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610dfd57600080fd5b505af1158015610e11573d6000803e3d6000fd5b505050506040513d6020811015610e2757600080fd5b5051600a8054604080516000805160206123da833981519152815260048101929092528688026024830181905290519390920a8702945090925073__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f91604480820192602092909190829003018186803b158015610e9d57600080fd5b505af4158015610eb1573d6000803e3d6000fd5b505050506040513d6020811015610ec757600080fd5b5051600a55600954604080516000805160206123da83398151915281526004810192909252602482018490525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b158015610f2f57600080fd5b505af4158015610f43573d6000803e3d6000fd5b505050506040513d6020811015610f5957600080fd5b5051600955600160a060020a0385166000908152601060209081526040918290205482516000805160206123da8339815191528152600481019190915260248101849052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b158015610fd757600080fd5b505af4158015610feb573d6000803e3d6000fd5b505050506040513d602081101561100157600080fd5b5051600160a060020a03861660009081526010602090815260408083209390935560118152908290205482516000805160206123da8339815191528152600481019190915260248101859052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561108757600080fd5b505af415801561109b573d6000803e3d6000fd5b505050506040513d60208110156110b157600080fd5b5051600160a060020a0386166000908152601160205260409020556110d68583611df9565b60408051600160a060020a0387168152602081018390528082018490526000606082015290517f0396f60aaad038749091d273dc13aaabc63db6e2271c7bad442d5cf25cc433509181900360800190a15050505050565b600a5481565b600190565b60048061114361096f565b600781111561114e57fe5b1461115857600080fd5b600054600160a060020a0316331461116f57600080fd5b60005474010000000000000000000000000000000000000000900460ff161561119757600080fd5b600f5460ff16156111a757600080fd5b600454600160a060020a03161561122d5760048054604080517f0bf318a30000000000000000000000000000000000000000000000000000000081529051600160a060020a0390921692630bf318a392828201926000929082900301818387803b15801561121457600080fd5b505af1158015611228573d6000803e3d6000fd5b505050505b50600f805460ff19166001179055565b600054600160a060020a0316331461125457600080fd5b6003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038381169190911791829055604080517f04bbc255000000000000000000000000000000000000000000000000000000008152905192909116916304bbc255916004808201926020929091908290030181600087803b158015610bf457600080fd5b60095481565b60006007806112eb61096f565b60078111156112f657fe5b1461130057600080fd5b33600090815260106020526040902054915081151561131e57600080fd5b33600090815260106020908152604080832092909255600e5482516000805160206123da8339815191528152600481019190915260248101859052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561139357600080fd5b505af41580156113a7573d6000803e3d6000fd5b505050506040513d60208110156113bd57600080fd5b5051600e55604080513381526020810184905281517fbb28353e4598c3b9199101a66e0989549b659a59a54d2c27fbb183f1932c8e6d929181900390910190a1604051339083156108fc029084906000818181858888f1935050505015156108c857600080fd5b601454620100009004600160a060020a031681565b600e5481565b600054600160a060020a0316331461145657600080fd5b6000805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b60015481565b604080517001000000000000000000000000000000006fffffffffffffffffffffffffffffffff851602815290519081900360100190207fff00000000000000000000000000000000000000000000000000000000000000908116908216146114fb57600080fd5b6108c83383611afd565b600054600160a060020a0316331461151c57600080fd5b8042111561152957600080fd5b80600754111561153857600080fd5b60088190556040805182815290517fd34bb772c4ae9baa99db852f622773b31c7827e8ee818449fef20d30980bd3109181900360200190a150565b600354600160a060020a031681565b600d5481565b600654600a54101590565b600054600160a060020a031633146115aa57600080fd5b6014805460ff191682151517908190556040805160ff808416151582526101008404161515602082015262010000909204600160a060020a031682820152517f48d826081348f5f00e8a33c9ae8ce89ed4c6e88400b585a478bc203d9e8177d3916060908290030190a150565b60155481565b60058061162861096f565b600781111561163357fe5b1461163d57600080fd5b34151561164957600080fd5b600d54604080516000805160206123da833981519152815260048101929092523460248301525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b1580156116ab57600080fd5b505af41580156116bf573d6000803e3d6000fd5b505050506040513d60208110156116d557600080fd5b5051600d5550565b600054600160a060020a031633146116f457600080fd5b601355565b600054600160a060020a031681565b600080600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561177757600080fd5b505af115801561178b573d6000803e3d6000fd5b505050506040513d60208110156117a157600080fd5b5051604080517f1d3b9edf00000000000000000000000000000000000000000000000000000000815260048101879052600a9290920a602483018190529051909250849173__contracts/SafeMathLib.sol:SafeMathLi__91631d3b9edf91604480820192602092909190829003018186803b15801561182157600080fd5b505af4158015611835573d6000803e3d6000fd5b505050506040513d602081101561184b57600080fd5b505181151561185657fe5b04949350505050565b600554600160a060020a031681565b60116020526000908152604090205481565b610c2b3382611afd565b506015541092915050565b61189e33610898565b565b6000600460009054906101000a9004600160a060020a0316600160a060020a03166382771c8e6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561093157600080fd5b60075481565b600f5460ff1681565b60005474010000000000000000000000000000000000000000900460ff1681565b60126020526000908152604090205460ff1681565b600054600160a060020a0316331461196a57600080fd5b60005474010000000000000000000000000000000000000000900460ff16151561199357600080fd5b6000805474ff000000000000000000000000000000000000000019169055565b601454610100900460ff1681565b601554600a54101590565b600c5481565b600054600160a060020a031633146119e957600080fd5b600160a060020a038216600081815260126020908152604091829020805460ff191685151590811790915582519384529083015280517fa54714518c5d275fdcd3d2a461e4858e4e8cb04fb93cd0bca9d6d34115f264409281900390910190a15050565b600054600160a060020a03163314611a6457600080fd5b60148054600160a060020a038084166201000090810275ffffffffffffffffffffffffffffffffffffffff00001987151561010090810261ff0019909616959095171617938490556040805160ff86811615158252948604909416151560208501529304168183015290517f48d826081348f5f00e8a33c9ae8ce89ed4c6e88400b585a478bc203d9e8177d39181900360600190a15050565b601454610100900460ff1615611b1257600080fd5b6fffffffffffffffffffffffffffffffff81161515611b3057600080fd5b611b3a8282611c52565b505050565b600054600160a060020a03163314611b5657600080fd5b600160a060020a0381161515611b6b57600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600054600160a060020a03163314611bea57600080fd5b600154600c541115611bfb57600080fd5b6005805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b611c373385858585610c2e565b50505050565b600b5481565b600254600160a060020a031681565b6000805474010000000000000000000000000000000000000000900460ff1615611c7b57600080fd5b611df28383600360009054906101000a9004600160a060020a0316600160a060020a03166318a4155e34600b54600a540360095433600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015611d1c57600080fd5b505af1158015611d30573d6000803e3d6000fd5b505050506040513d6020811015611d4657600080fd5b5051604080517c010000000000000000000000000000000000000000000000000000000063ffffffff8916028152600481019690965260248601949094526044850192909252600160a060020a0316606484015260848301525160a48083019260209291908290030181600087803b158015611dc157600080fd5b505af1158015611dd5573d6000803e3d6000fd5b505050506040513d6020811015611deb57600080fd5b5051611e7e565b9392505050565b600254604080517f40c10f19000000000000000000000000000000000000000000000000000000008152600160a060020a038581166004830152602482018590529151919092169182916340c10f199160448082019260009290919082900301818387803b158015611e6a57600080fd5b505af1158015610d4d573d6000803e3d6000fd5b60008054819074010000000000000000000000000000000000000000900460ff1615611ea957600080fd5b6002611eb361096f565b6007811115611ebe57fe5b1415611ef057600160a060020a03851660009081526012602052604090205460ff161515611eeb57600080fd5b611f0c565b6003611efa61096f565b6007811115611f0557fe5b1415610292575b5034821515611f1a57600080fd5b600160a060020a0385166000908152601060205260409020541515611f4357600c805460010190555b600160a060020a0385166000908152601060209081526040918290205482516000805160206123da8339815191528152600481019190915260248101849052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b158015611fbc57600080fd5b505af4158015611fd0573d6000803e3d6000fd5b505050506040513d6020811015611fe657600080fd5b5051600160a060020a03861660009081526010602090815260408083209390935560118152908290205482516000805160206123da8339815191528152600481019190915260248101869052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561206c57600080fd5b505af4158015612080573d6000803e3d6000fd5b505050506040513d602081101561209657600080fd5b5051600160a060020a03861660009081526011602090815260409182902092909255600a5481516000805160206123da8339815191528152600481019190915260248101849052905173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f9260448082019391829003018186803b15801561211657600080fd5b505af415801561212a573d6000803e3d6000fd5b505050506040513d602081101561214057600080fd5b5051600a55600954604080516000805160206123da83398151915281526004810192909252602482018590525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b1580156121a857600080fd5b505af41580156121bc573d6000803e3d6000fd5b505050506040513d60208110156121d257600080fd5b5051600955600354604080517ff14ae17d000000000000000000000000000000000000000000000000000000008152600160a060020a0388811660048301529151919092169163f14ae17d9160248083019260209291908290030181600087803b15801561223f57600080fd5b505af1158015612253573d6000803e3d6000fd5b505050506040513d602081101561226957600080fd5b50511561231757600b5473__contracts/SafeMathLib.sol:SafeMathLi__6366098d4f9091836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b1580156122e757600080fd5b505af41580156122fb573d6000803e3d6000fd5b505050506040513d602081101561231157600080fd5b5051600b555b6123278184600a5460095461188a565b1561233157600080fd5b61233b8584611df9565b600554604051600160a060020a039091169082156108fc029083906000818181858888f19350505050151561236f57600080fd5b60408051600160a060020a0387168152602081018390528082018590526fffffffffffffffffffffffffffffffff8616606082015290517f0396f60aaad038749091d273dc13aaabc63db6e2271c7bad442d5cf25cc433509181900360800190a150909392505050560066098d4f00000000000000000000000000000000000000000000000000000000a165627a7a72305820ccf242c2b1c36bba5a827f39ef1ddb685f427668fea0301bbdbe3b87959481560029", "bytecode_runtime": "0x6080604052600436106102925763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630226401d811461029757806303ca0eed146102be57806303f9c793146102e7578063062b01ce146102fd5780630a09284a1461031257806313f4e977146103275780631865c57d1461033c57806319b667da146103755780631a49803b146103965780631aae3460146103cb57806321d5c0f6146103ec57806332013ac31461041d5780634042b66f146104445780634551dd59146104595780634bb278f31461046e57806350c6773414610483578063518ab2a8146104a4578063590e1ae3146104b95780635b7633d0146104ce5780635da89ac0146104e35780635ed7ca5b146104f85780636203f09f1461050d57806363c6082f146105225780636e50eb3f1461056457806378b99c241461057c578063797d9437146105915780637c2e08a3146105a65780637f7d711e146105bb57806384fe5029146105d557806387612102146105ea5780638d51faec146105f25780638da5cb5b1461060a578063903cc5831461061f5780639075becf1461063a57806397b150ca1461064f57806399e9376c146106705780639d3c663f1461068d578063a6f2ae3a146106ae578063a7ba44c3146106b6578063af468682146106cb578063b3f05b97146106e0578063b9b8af0b146106f5578063cb16e6d01461070a578063cb3e64fd1461072b578063d222dc0414610740578063d5d0902114610755578063d7e64c001461076a578063eac249321461077f578063ed68ff2c146107a5578063ef869443146107cb578063f2fde38b146107f4578063f3283fba14610815578063f486972614610836578063f7c00e2f1461085f578063fc0c546a14610874575b600080fd5b3480156102a357600080fd5b506102ac610889565b60408051918252519081900360200190f35b3480156102ca57600080fd5b506102d361088f565b604080519115158252519081900360200190f35b6102fb600160a060020a0360043516610898565b005b34801561030957600080fd5b506102d36108cc565b34801561031e57600080fd5b506102ac610963565b34801561033357600080fd5b506102ac610969565b34801561034857600080fd5b5061035161096f565b6040518082600781111561036157fe5b60ff16815260200191505060405180910390f35b34801561038157600080fd5b506102fb600160a060020a0360043516610b5d565b6102fb600160a060020a03600435166fffffffffffffffffffffffffffffffff6024351660ff60443516606435608435610c2e565b3480156103d757600080fd5b506102ac600160a060020a0360043516610d56565b3480156103f857600080fd5b50610401610d68565b60408051600160a060020a039092168252519081900360200190f35b34801561042957600080fd5b506102fb600160a060020a0360043516602435604435610d77565b34801561045057600080fd5b506102ac61112d565b34801561046557600080fd5b506102d3611133565b34801561047a57600080fd5b506102fb611138565b34801561048f57600080fd5b506102fb600160a060020a036004351661123d565b3480156104b057600080fd5b506102ac6112d8565b3480156104c557600080fd5b506102fb6112de565b3480156104da57600080fd5b50610401611424565b3480156104ef57600080fd5b506102ac611439565b34801561050457600080fd5b506102fb61143f565b34801561051957600080fd5b506102ac61148d565b6102fb6fffffffffffffffffffffffffffffffff600435167fff0000000000000000000000000000000000000000000000000000000000000060243516611493565b34801561057057600080fd5b506102fb600435611505565b34801561058857600080fd5b50610401611573565b34801561059d57600080fd5b506102ac611582565b3480156105b257600080fd5b506102d3611588565b3480156105c757600080fd5b506102fb6004351515611593565b3480156105e157600080fd5b506102ac611617565b6102fb61161d565b3480156105fe57600080fd5b506102fb6004356116dd565b34801561061657600080fd5b506104016116f9565b34801561062b57600080fd5b506102ac600435602435611708565b34801561064657600080fd5b5061040161185f565b34801561065b57600080fd5b506102ac600160a060020a036004351661186e565b6102fb6fffffffffffffffffffffffffffffffff60043516611880565b34801561069957600080fd5b506102d360043560243560443560643561188a565b6102fb611895565b3480156106c257600080fd5b506102d36118a0565b3480156106d757600080fd5b506102ac61190e565b3480156106ec57600080fd5b506102d3611914565b34801561070157600080fd5b506102d361191d565b34801561071657600080fd5b506102d3600160a060020a036004351661193e565b34801561073757600080fd5b506102fb611953565b34801561074c57600080fd5b506102d36119b3565b34801561076157600080fd5b506102d36119c1565b34801561077657600080fd5b506102ac6119cc565b34801561078b57600080fd5b506102fb600160a060020a036004351660243515156119d2565b3480156107b157600080fd5b506102fb6004351515600160a060020a0360243516611a4d565b6102fb600160a060020a03600435166fffffffffffffffffffffffffffffffff60243516611afd565b34801561080057600080fd5b506102fb600160a060020a0360043516611b3f565b34801561082157600080fd5b506102fb600160a060020a0360043516611bd3565b6102fb6fffffffffffffffffffffffffffffffff6004351660ff60243516604435606435611c2a565b34801561086b57600080fd5b506102ac611c3d565b34801561088057600080fd5b50610401611c43565b60135481565b60145460ff1681565b60145460ff16156108a857600080fd5b601454610100900460ff16156108bd57600080fd5b6108c8816000611c52565b5050565b600354604080517f8e7682880000000000000000000000000000000000000000000000000000000081523060048201529051600092600160a060020a031691638e76828891602480830192602092919082900301818787803b15801561093157600080fd5b505af1158015610945573d6000803e3d6000fd5b505050506040513d602081101561095b57600080fd5b505190505b90565b60085481565b60065481565b600f5460009060ff161561098557506006610960565b600454600160a060020a0316151561099f57506001610960565b60048054604080517f82771c8e0000000000000000000000000000000000000000000000000000000081529051600160a060020a03909216926382771c8e9282820192602092908290030181600087803b1580156109fc57600080fd5b505af1158015610a10573d6000803e3d6000fd5b505050506040513d6020811015610a2657600080fd5b50511515610a3657506001610960565b600354604080517f8e7682880000000000000000000000000000000000000000000000000000000081523060048201529051600160a060020a0390921691638e768288916024808201926020929091908290030181600087803b158015610a9c57600080fd5b505af1158015610ab0573d6000803e3d6000fd5b505050506040513d6020811015610ac657600080fd5b50511515610ad657506001610960565b600754421015610ae857506002610960565b6008544211158015610aff5750610afd6119c1565b155b15610b0c57506003610960565b610b14611588565b15610b2157506004610960565b610b29611588565b158015610b3857506000600a54115b8015610b485750600a54600d5410155b15610b5557506007610960565b506005610960565b600054600160a060020a03163314610b7457600080fd5b6004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383811691909117808355604080517f614cb9040000000000000000000000000000000000000000000000000000000081529051919092169263614cb904928082019260209290918290030181600087803b158015610bf457600080fd5b505af1158015610c08573d6000803e3d6000fd5b505050506040513d6020811015610c1e57600080fd5b50511515610c2b57600080fd5b50565b60006002866040518082600160a060020a0316600160a060020a03166c010000000000000000000000000281526014019150506020604051808303816000865af1158015610c80573d6000803e3d6000fd5b5050506040513d6020811015610c9557600080fd5b5051601454604080516000808252602080830180855286905260ff8a16838501526060830189905260808301889052925194955062010000909304600160a060020a03169360019360a08084019493601f198401939081900390910191865af1158015610d06573d6000803e3d6000fd5b50505060206040510351600160a060020a0316141515610d2557600080fd5b6fffffffffffffffffffffffffffffffff85161515610d4357600080fd5b610d4d8686611c52565b50505050505050565b60106020526000908152604090205481565b600454600160a060020a031681565b600080548190600160a060020a03163314610d9157600080fd5b600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610dfd57600080fd5b505af1158015610e11573d6000803e3d6000fd5b505050506040513d6020811015610e2757600080fd5b5051600a8054604080516000805160206123da833981519152815260048101929092528688026024830181905290519390920a8702945090925073__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f91604480820192602092909190829003018186803b158015610e9d57600080fd5b505af4158015610eb1573d6000803e3d6000fd5b505050506040513d6020811015610ec757600080fd5b5051600a55600954604080516000805160206123da83398151915281526004810192909252602482018490525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b158015610f2f57600080fd5b505af4158015610f43573d6000803e3d6000fd5b505050506040513d6020811015610f5957600080fd5b5051600955600160a060020a0385166000908152601060209081526040918290205482516000805160206123da8339815191528152600481019190915260248101849052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b158015610fd757600080fd5b505af4158015610feb573d6000803e3d6000fd5b505050506040513d602081101561100157600080fd5b5051600160a060020a03861660009081526010602090815260408083209390935560118152908290205482516000805160206123da8339815191528152600481019190915260248101859052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561108757600080fd5b505af415801561109b573d6000803e3d6000fd5b505050506040513d60208110156110b157600080fd5b5051600160a060020a0386166000908152601160205260409020556110d68583611df9565b60408051600160a060020a0387168152602081018390528082018490526000606082015290517f0396f60aaad038749091d273dc13aaabc63db6e2271c7bad442d5cf25cc433509181900360800190a15050505050565b600a5481565b600190565b60048061114361096f565b600781111561114e57fe5b1461115857600080fd5b600054600160a060020a0316331461116f57600080fd5b60005474010000000000000000000000000000000000000000900460ff161561119757600080fd5b600f5460ff16156111a757600080fd5b600454600160a060020a03161561122d5760048054604080517f0bf318a30000000000000000000000000000000000000000000000000000000081529051600160a060020a0390921692630bf318a392828201926000929082900301818387803b15801561121457600080fd5b505af1158015611228573d6000803e3d6000fd5b505050505b50600f805460ff19166001179055565b600054600160a060020a0316331461125457600080fd5b6003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038381169190911791829055604080517f04bbc255000000000000000000000000000000000000000000000000000000008152905192909116916304bbc255916004808201926020929091908290030181600087803b158015610bf457600080fd5b60095481565b60006007806112eb61096f565b60078111156112f657fe5b1461130057600080fd5b33600090815260106020526040902054915081151561131e57600080fd5b33600090815260106020908152604080832092909255600e5482516000805160206123da8339815191528152600481019190915260248101859052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561139357600080fd5b505af41580156113a7573d6000803e3d6000fd5b505050506040513d60208110156113bd57600080fd5b5051600e55604080513381526020810184905281517fbb28353e4598c3b9199101a66e0989549b659a59a54d2c27fbb183f1932c8e6d929181900390910190a1604051339083156108fc029084906000818181858888f1935050505015156108c857600080fd5b601454620100009004600160a060020a031681565b600e5481565b600054600160a060020a0316331461145657600080fd5b6000805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b60015481565b604080517001000000000000000000000000000000006fffffffffffffffffffffffffffffffff851602815290519081900360100190207fff00000000000000000000000000000000000000000000000000000000000000908116908216146114fb57600080fd5b6108c83383611afd565b600054600160a060020a0316331461151c57600080fd5b8042111561152957600080fd5b80600754111561153857600080fd5b60088190556040805182815290517fd34bb772c4ae9baa99db852f622773b31c7827e8ee818449fef20d30980bd3109181900360200190a150565b600354600160a060020a031681565b600d5481565b600654600a54101590565b600054600160a060020a031633146115aa57600080fd5b6014805460ff191682151517908190556040805160ff808416151582526101008404161515602082015262010000909204600160a060020a031682820152517f48d826081348f5f00e8a33c9ae8ce89ed4c6e88400b585a478bc203d9e8177d3916060908290030190a150565b60155481565b60058061162861096f565b600781111561163357fe5b1461163d57600080fd5b34151561164957600080fd5b600d54604080516000805160206123da833981519152815260048101929092523460248301525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b1580156116ab57600080fd5b505af41580156116bf573d6000803e3d6000fd5b505050506040513d60208110156116d557600080fd5b5051600d5550565b600054600160a060020a031633146116f457600080fd5b601355565b600054600160a060020a031681565b600080600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561177757600080fd5b505af115801561178b573d6000803e3d6000fd5b505050506040513d60208110156117a157600080fd5b5051604080517f1d3b9edf00000000000000000000000000000000000000000000000000000000815260048101879052600a9290920a602483018190529051909250849173__contracts/SafeMathLib.sol:SafeMathLi__91631d3b9edf91604480820192602092909190829003018186803b15801561182157600080fd5b505af4158015611835573d6000803e3d6000fd5b505050506040513d602081101561184b57600080fd5b505181151561185657fe5b04949350505050565b600554600160a060020a031681565b60116020526000908152604090205481565b610c2b3382611afd565b506015541092915050565b61189e33610898565b565b6000600460009054906101000a9004600160a060020a0316600160a060020a03166382771c8e6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561093157600080fd5b60075481565b600f5460ff1681565b60005474010000000000000000000000000000000000000000900460ff1681565b60126020526000908152604090205460ff1681565b600054600160a060020a0316331461196a57600080fd5b60005474010000000000000000000000000000000000000000900460ff16151561199357600080fd5b6000805474ff000000000000000000000000000000000000000019169055565b601454610100900460ff1681565b601554600a54101590565b600c5481565b600054600160a060020a031633146119e957600080fd5b600160a060020a038216600081815260126020908152604091829020805460ff191685151590811790915582519384529083015280517fa54714518c5d275fdcd3d2a461e4858e4e8cb04fb93cd0bca9d6d34115f264409281900390910190a15050565b600054600160a060020a03163314611a6457600080fd5b60148054600160a060020a038084166201000090810275ffffffffffffffffffffffffffffffffffffffff00001987151561010090810261ff0019909616959095171617938490556040805160ff86811615158252948604909416151560208501529304168183015290517f48d826081348f5f00e8a33c9ae8ce89ed4c6e88400b585a478bc203d9e8177d39181900360600190a15050565b601454610100900460ff1615611b1257600080fd5b6fffffffffffffffffffffffffffffffff81161515611b3057600080fd5b611b3a8282611c52565b505050565b600054600160a060020a03163314611b5657600080fd5b600160a060020a0381161515611b6b57600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600054600160a060020a03163314611bea57600080fd5b600154600c541115611bfb57600080fd5b6005805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b611c373385858585610c2e565b50505050565b600b5481565b600254600160a060020a031681565b6000805474010000000000000000000000000000000000000000900460ff1615611c7b57600080fd5b611df28383600360009054906101000a9004600160a060020a0316600160a060020a03166318a4155e34600b54600a540360095433600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015611d1c57600080fd5b505af1158015611d30573d6000803e3d6000fd5b505050506040513d6020811015611d4657600080fd5b5051604080517c010000000000000000000000000000000000000000000000000000000063ffffffff8916028152600481019690965260248601949094526044850192909252600160a060020a0316606484015260848301525160a48083019260209291908290030181600087803b158015611dc157600080fd5b505af1158015611dd5573d6000803e3d6000fd5b505050506040513d6020811015611deb57600080fd5b5051611e7e565b9392505050565b600254604080517f40c10f19000000000000000000000000000000000000000000000000000000008152600160a060020a038581166004830152602482018590529151919092169182916340c10f199160448082019260009290919082900301818387803b158015611e6a57600080fd5b505af1158015610d4d573d6000803e3d6000fd5b60008054819074010000000000000000000000000000000000000000900460ff1615611ea957600080fd5b6002611eb361096f565b6007811115611ebe57fe5b1415611ef057600160a060020a03851660009081526012602052604090205460ff161515611eeb57600080fd5b611f0c565b6003611efa61096f565b6007811115611f0557fe5b1415610292575b5034821515611f1a57600080fd5b600160a060020a0385166000908152601060205260409020541515611f4357600c805460010190555b600160a060020a0385166000908152601060209081526040918290205482516000805160206123da8339815191528152600481019190915260248101849052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b158015611fbc57600080fd5b505af4158015611fd0573d6000803e3d6000fd5b505050506040513d6020811015611fe657600080fd5b5051600160a060020a03861660009081526010602090815260408083209390935560118152908290205482516000805160206123da8339815191528152600481019190915260248101869052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561206c57600080fd5b505af4158015612080573d6000803e3d6000fd5b505050506040513d602081101561209657600080fd5b5051600160a060020a03861660009081526011602090815260409182902092909255600a5481516000805160206123da8339815191528152600481019190915260248101849052905173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f9260448082019391829003018186803b15801561211657600080fd5b505af415801561212a573d6000803e3d6000fd5b505050506040513d602081101561214057600080fd5b5051600a55600954604080516000805160206123da83398151915281526004810192909252602482018590525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b1580156121a857600080fd5b505af41580156121bc573d6000803e3d6000fd5b505050506040513d60208110156121d257600080fd5b5051600955600354604080517ff14ae17d000000000000000000000000000000000000000000000000000000008152600160a060020a0388811660048301529151919092169163f14ae17d9160248083019260209291908290030181600087803b15801561223f57600080fd5b505af1158015612253573d6000803e3d6000fd5b505050506040513d602081101561226957600080fd5b50511561231757600b5473__contracts/SafeMathLib.sol:SafeMathLi__6366098d4f9091836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b1580156122e757600080fd5b505af41580156122fb573d6000803e3d6000fd5b505050506040513d602081101561231157600080fd5b5051600b555b6123278184600a5460095461188a565b1561233157600080fd5b61233b8584611df9565b600554604051600160a060020a039091169082156108fc029083906000818181858888f19350505050151561236f57600080fd5b60408051600160a060020a0387168152602081018390528082018590526fffffffffffffffffffffffffffffffff8616606082015290517f0396f60aaad038749091d273dc13aaabc63db6e2271c7bad442d5cf25cc433509181900360800190a150909392505050560066098d4f00000000000000000000000000000000000000000000000000000000a165627a7a72305820ccf242c2b1c36bba5a827f39ef1ddb685f427668fea0301bbdbe3b87959481560029", "direct_dependencies": ["SafeMathLib"], "full_dependencies": ["SafeMathLib"], "linkrefs": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 8446}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 8740}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 9082}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 9434}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 10994}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 12572}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 13318}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 17220}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 17572}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 17914}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 18198}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 18722}], "linkrefs_runtime": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 7366}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 7660}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 8002}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 8354}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 9914}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 11492}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 12238}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 16140}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 16492}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 16834}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 17118}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 17642}], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": true, "inputs": [], "name": "ownerTestValue", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "requireCustomerId", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "invest", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "isPricingSane", "outputs": [{"name": "sane", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "endsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "minimumFundingGoal", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getState", "outputs": [{"name": "", "type": "uint8"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setFinalizeAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "customerId", "type": "uint128"}, {"name": "v", "type": "uint8"}, {"name": "r", "type": "bytes32"}, {"name": "s", "type": "bytes32"}], "name": "investWithSignedAddress", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "investedAmountOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "finalizeAgent", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "receiver", "type": "address"}, {"name": "fullTokens", "type": "uint256"}, {"name": "weiPrice", "type": "uint256"}], "name": "preallocate", "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": "isCrowdsale", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "finalize", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_pricingStrategy", "type": "address"}], "name": "setPricingStrategy", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "tokensSold", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "refund", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "signerAddress", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "weiRefunded", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "halt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}, {"name": "checksum", "type": "bytes1"}], "name": "buyWithCustomerIdWithChecksum", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "time", "type": "uint256"}], "name": "setEndsAt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "pricingStrategy", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "loadedRefund", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isMinimumGoalReached", "outputs": [{"name": "reached", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "bool"}], "name": "setRequireCustomerId", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "weiCap", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "loadRefund", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "val", "type": "uint256"}], "name": "setOwnerTestValue", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "weisTotal", "type": "uint256"}, {"name": "pricePerToken", "type": "uint256"}], "name": "calculateTokens", "outputs": [{"name": "tokensTotal", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "multisigWallet", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "tokenAmountOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}], "name": "buyWithCustomerId", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [{"name": "weiAmount", "type": "uint256"}, {"name": "tokenAmount", "type": "uint256"}, {"name": "weiRaisedTotal", "type": "uint256"}, {"name": "tokensSoldTotal", "type": "uint256"}], "name": "isBreakingCap", "outputs": [{"name": "limitBroken", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "buy", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "isFinalizerSane", "outputs": [{"name": "sane", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "startsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "finalized", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "halted", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "earlyParticipantWhitelist", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "unhalt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "requiredSignedAddress", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isCrowdsaleFull", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "investorCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "status", "type": "bool"}], "name": "setEarlyParicipantWhitelist", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "bool"}, {"name": "_signerAddress", "type": "address"}], "name": "setRequireSignedAddress", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "customerId", "type": "uint128"}], "name": "investWithCustomerId", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setMultisig", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}, {"name": "v", "type": "uint8"}, {"name": "r", "type": "bytes32"}, {"name": "s", "type": "bytes32"}], "name": "buyWithSignedAddress", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "presaleWeiRaised", "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": "_token", "type": "address"}, {"name": "_pricingStrategy", "type": "address"}, {"name": "_multisigWallet", "type": "address"}, {"name": "_start", "type": "uint256"}, {"name": "_end", "type": "uint256"}, {"name": "_minimumFundingGoal", "type": "uint256"}, {"name": "_weiCap", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"payable": true, "stateMutability": "payable", "type": "fallback"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}, {"indexed": false, "name": "tokenAmount", "type": "uint256"}, {"indexed": false, "name": "customerId", "type": "uint128"}], "name": "Invested", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}], "name": "Refund", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newRequireCustomerId", "type": "bool"}, {"indexed": false, "name": "newRequiredSignedAddress", "type": "bool"}, {"indexed": false, "name": "newSignerAddress", "type": "address"}], "name": "InvestmentPolicyChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "addr", "type": "address"}, {"indexed": false, "name": "status", "type": "bool"}], "name": "Whitelisted", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newEndsAt", "type": "uint256"}], "name": "EndsAtChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "devdoc": {"methods": {"calculateTokens(uint256,uint256)": {"details": "Calculate tokens user will have for their purchase", "params": {"pricePerToken": "What is the price for one token", "weisTotal": "How much ethers (in wei) the user putssssss in"}, "return": "tokensTotal which is received tokens, token decimals included"}, "isMinimumGoalReached()": {"return": "true if the crowdsale has raised enough money to be a successful."}, "preallocate(address,uint256,uint256)": {"params": {"fullTokens": "tokens as full tokens - decimal places added internally", "weiPrice": "Price of a single full token in wei "}}, "transferOwnership(address)": {"details": "Allows the current owner to transfer control of the contract to a newOwner.", "params": {"newOwner": "The address to transfer ownership to."}}}}, "userdoc": {"methods": {"buy()": {"notice": "The basic entry point to participate the crowdsale process. * Pay for funding, get invested tokens back in the sender address."}, "buyWithCustomerId(uint128)": {"notice": "Legacy API signature."}, "buyWithCustomerIdWithChecksum(uint128,bytes1)": {"notice": "Invest to tokens, recognize the payer. "}, "buyWithSignedAddress(uint128,uint8,bytes32,bytes32)": {"notice": "Invest to tokens, recognize the payer and clear his address. "}, "finalize()": {"notice": "Finalize a succcesful crowdsale. * The owner can triggre a call the contract that provides post-crowdsale actions, like releasing the tokens."}, "getState()": {"notice": "Crowdfund state machine management. * We make it a function and do not assign the result to a variable, so there is no chance of the variable being stale."}, "invest(address)": {"notice": "Allow anonymous contributions to this crowdsale."}, "investWithCustomerId(address,uint128)": {"notice": "Track who is the customer making the payment so we can send thank you email."}, "investWithSignedAddress(address,uint128,uint8,bytes32,bytes32)": {"notice": "Allow anonymous contributions to this crowdsale."}, "isBreakingCap(uint256,uint256,uint256,uint256)": {"notice": "Called from invest() to confirm if the curret investment does not break our cap rule."}, "isCrowdsale()": {"notice": "Interface marker. "}, "isFinalizerSane()": {"notice": "Check if the contract relationship looks good."}, "isPricingSane()": {"notice": "Check if the contract relationship looks good."}, "loadRefund()": {"notice": "Allow load refunds back on the contract for the refunding. * The team can transfer the funds back on the smart contract in the case the minimum goal was not reached.."}, "preallocate(address,uint256,uint256)": {"notice": "Preallocate tokens for the early investors. * Preallocated tokens have been sold before the actual crowdsale opens. This function mints the tokens and moves the crowdsale needle. * Investor count is not handled; it is assumed this goes for multiple investors and the token distribution happens outside the smart contract flow. * No money is exchanged, as the crowdsale team already have received the payment."}, "refund()": {"notice": "Investors can claim refund. * Note that any refunds from proxy buyers should be handled separately, and not through this contract."}, "setEarlyParicipantWhitelist(address,bool)": {"notice": "Allow addresses to do early participation. * TODO: Fix spelling error in the name"}, "setEndsAt(uint256)": {"notice": "Allow crowdsale owner to close early or extend the crowdsale. * This is useful e.g. for a manual soft cap implementation: - after X amount is reached determine manual closing * This may put the crowdsale to an invalid state, but we trust owners know what they are doing. "}, "setFinalizeAgent(address)": {"notice": "Allow to (re)set finalize agent. * Design choice: no state restrictions on setting this, so that we can fix fat finger mistakes."}, "setMultisig(address)": {"notice": "Allow to change the team multisig address in the case of emergency. * This allows to save a deployed crowdsale wallet in the case the crowdsale has not yet begun (we have done only few test transactions). After the crowdsale is going then multisig address stays locked for the safety reasons."}, "setOwnerTestValue(uint256)": {"notice": "This is for manual testing of multisig wallet interaction "}, "setPricingStrategy(address)": {"notice": "Allow to (re)set pricing strategy. * Design choice: no state restrictions on the set, so that we can fix fat finger mistakes."}, "setRequireCustomerId(bool)": {"notice": "Set policy do we need to have server-side customer ids for the investments. "}, "setRequireSignedAddress(bool,address)": {"notice": "Set policy if all investors must be cleared on the server side first. * This is e.g. for the accredited investor clearing. "}}}}, "settings": {"compilationTarget": {"contracts/MintedEthCappedCrowdsale.sol": "MintedEthCappedCrowdsale"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/Crowdsale.sol": {"keccak256": "0x2697c26528f64bb954a7c2547d3b43317d2d2b02c7d9d05a7b1ab388cd79f65d", "urls": ["bzzr://f28b280794222114141c51dd5c388d403a7c98d8b51e04170a0e294246d5164b"]}, "contracts/CrowdsaleBase.sol": {"keccak256": "0xe2c9ed11183ce705616980df7b02544d72fe18b40395da7d9d4bcb621fb87871", "urls": ["bzzr://07f3887ba0d0eb3248b1ad3581480ed71a2fe70a47dcc283c4e97c8c92e0790a"]}, "contracts/FinalizeAgent.sol": {"keccak256": "0x309fd0510e0b3e2b5044e33f7c80cfb2d6f2a5697e41a5f185931d65770cfea9", "urls": ["bzzr://4e7ed6f82c0f542e92e56c12566b2ecd7666730865bf12566c27587ec64160ac"]}, "contracts/FractionalERC20.sol": {"keccak256": "0x75bc4ad90a8b13ce961c89b1bf405776f616e019d3a2720168f8e52be223198f", "urls": ["bzzr://6a3688f12da1a5c890ef06f80f883f6c5370886092d38a1b33cd4219b718478b"]}, "contracts/Haltable.sol": {"keccak256": "0x265dcf25e7c9ab4b6eecd2181f1b71334a1b5381a60f8db7d9526dab120f4b70", "urls": ["bzzr://d522e00fa9e075941469dd81738b59fdb99ce3c12cdc39e33abe40b588c4da9b"]}, "contracts/MintableToken.sol": {"keccak256": "0x650e1d6b2bedcd36508918357c7cf4f36fdd093cd0c4d6342f4dcd3bdcdd7578", "urls": ["bzzr://7ba2ac0480d428066a18727e2adb76ba56856ecd37b4420e801131ec8f8f4be3"]}, "contracts/MintedEthCappedCrowdsale.sol": {"keccak256": "0xa78d28210665878216d0e2b182ddd26c942f22e47f3a2d4633d03a05cafff3f1", "urls": ["bzzr://6818f7aa52d2c48dee78eeb477aeee9d9f890154581850e3f7178388fad81b92"]}, "contracts/PricingStrategy.sol": {"keccak256": "0x8df5093b7d07168ad994f9176de0bd2268f6563b1e8a3a448d8cfe7fe246c628", "urls": ["bzzr://ef5c944d51f739ab34e2c951d6ac82a7152e6bb844058a8e57bae52c14cbe16b"]}, "contracts/Recoverable.sol": {"keccak256": "0x311a332cdd87df6e00057f5455f4e68b043b5dbe211f6d68bc64e20817515635", "urls": ["bzzr://4fd99bcfb93baed6e7c8d22ee9ecc5c8346a1aa98288e77b01333b2c5d3f582d"]}, "contracts/SafeMathLib.sol": {"keccak256": "0x501bfe31e274b9a5591f7c540bdced4d4312e27d4f19599147c9bbca3d9c6b18", "urls": ["bzzr://a80935ebddb06c247d71372d4e5833ee029f08633bd0fe4a274a57009567e5b9"]}, "contracts/StandardTokenExt.sol": {"keccak256": "0x9ea2d4cec4dccd5639c05e6c23dd027d80b5e5a20abd99b280ab7b2631b5a5fc", "urls": ["bzzr://a52d8fc5a21bd83997aff19128e00dceb251df712207b61223894c8b7f42d5ff"]}, "zeppelin/contracts/math/SafeMath.sol": {"keccak256": "0x341ba8cb467a3623e819ba1a683ac1d264005186f308505214e5f6bc89446a08", "urls": ["bzzr://59b5652ee4e4a1b5a8f1a8906e14c84af43d636cf5ca0725cc1813aabe4c8c17"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}, "zeppelin/contracts/token/ERC20/BasicToken.sol": {"keccak256": "0x948404468d61ff35ea4194650670408dabd65da7f905a1c16888ab84520bf39e", "urls": ["bzzr://ea75e20f95d7e4e10394fe6bfaa8eee56b4757c2a6f1e8df4180d33afa621935"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}, "zeppelin/contracts/token/ERC20/StandardToken.sol": {"keccak256": "0xd2b344a5259e19ec143074cfa65637a10c40b68395c59808c4af13bccbb2de55", "urls": ["bzzr://d61a01175a7ca1ba9f4403de603c20b897e33ec425aef2d9f8a7f9ddfdfaf5b2"]}}, "version": 1}, "name": "MintedEthCappedCrowdsale", "ordered_full_dependencies": ["SafeMathLib"], "source_path": "contracts/MintedEthCappedCrowdsale.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Safe unsigned safe math.\n *\n * https://blog.aragon.one/library-driven-development-in-solidity-2bebcaf88736#.750gwtwli\n *\n * Originally from https://raw.githubusercontent.com/AragonOne/zeppelin-solidity/master/contracts/SafeMathLib.sol\n *\n * Maintained here until merged to mainline zeppelin-solidity.\n *\n */\nlibrary SafeMathLib {\n\n function times(uint a, uint b) returns (uint) {\n uint c = a * b;\n assert(a == 0 || c / a == b);\n return c;\n }\n\n function minus(uint a, uint b) returns (uint) {\n assert(b <= a);\n return a - b;\n }\n\n function plus(uint a, uint b) returns (uint) {\n uint c = a + b;\n assert(c>=a);\n return c;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Interface for defining crowdsale pricing.\n */\ncontract PricingStrategy {\n\n /** Interface declaration. */\n function isPricingStrategy() public constant returns (bool) {\n return true;\n }\n\n /** Self check if all references are correctly set.\n *\n * Checks that pricing strategy matches crowdsale parameters.\n */\n function isSane(address crowdsale) public constant returns (bool) {\n return true;\n }\n\n /**\n * @dev Pricing tells if this is a presale purchase or not.\n @param purchaser Address of the purchaser\n @return False by default, true if a presale purchaser\n */\n function isPresalePurchase(address purchaser) public constant returns (bool) {\n return false;\n }\n\n /**\n * When somebody tries to buy tokens for X eth, calculate how many tokens they get.\n *\n *\n * @param value - What is the value of the transaction send in as wei\n * @param tokensSold - how much tokens have been sold this far\n * @param weiRaised - how much money has been raised this far in the main token sale - this number excludes presale\n * @param msgSender - who is the investor of this transaction\n * @param decimals - how many decimal units the token has\n * @return Amount of tokens the investor receives\n */\n function calculatePrice(uint value, uint weiRaised, uint tokensSold, address msgSender, uint decimals) public constant returns (uint tokenAmount);\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Finalize agent defines what happens at the end of succeseful crowdsale.\n *\n * - Allocate tokens for founders, bounties and community\n * - Make tokens transferable\n * - etc.\n */\ncontract FinalizeAgent {\n\n function isFinalizeAgent() public constant returns(bool) {\n return true;\n }\n\n /** Return true if we can run finalizeCrowdsale() properly.\n *\n * This is a safety check function that doesn't allow crowdsale to begin\n * unless the finalizer has been set up properly.\n */\n function isSane() public constant returns (bool);\n\n /** Called once by crowdsale finalize() if the sale was success. */\n function finalizeCrowdsale();\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n\n/**\n * A token that defines fractional units as decimals.\n */\ncontract FractionalERC20 is ERC20 {\n\n uint public decimals;\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n/*\n * Haltable\n *\n * Abstract contract that allows children to implement an\n * emergency stop mechanism. Differs from Pausable by causing a throw when in halt mode.\n *\n *\n * Originally envisioned in FirstBlood ICO contract.\n */\ncontract Haltable is Ownable {\n bool public halted;\n\n modifier stopInEmergency {\n if (halted) throw;\n _;\n }\n\n modifier stopNonOwnersInEmergency {\n if (halted && msg.sender != owner) throw;\n _;\n }\n\n modifier onlyInEmergency {\n if (!halted) throw;\n _;\n }\n\n // called by the owner on emergency, triggers stopped state\n function halt() external onlyOwner {\n halted = true;\n }\n\n // called by the owner on end of emergency, returns to normal state\n function unhalt() external onlyOwner onlyInEmergency {\n halted = false;\n }\n\n}\n\n\n\n\n\n\n\n/**\n * Crowdsale state machine without buy functionality.\n *\n * Implements basic state machine logic, but leaves out all buy functions,\n * so that subclasses can implement their own buying logic.\n *\n *\n * For the default buy() implementation see Crowdsale.sol.\n */\ncontract CrowdsaleBase is Haltable {\n\n /* Max investment count when we are still allowed to change the multisig address */\n uint public MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE = 5;\n\n using SafeMathLib for uint;\n\n /* The token we are selling */\n FractionalERC20 public token;\n\n /* How we are going to price our offering */\n PricingStrategy public pricingStrategy;\n\n /* Post-success callback */\n FinalizeAgent public finalizeAgent;\n\n /* tokens will be transfered from this address */\n address public multisigWallet;\n\n /* if the funding goal is not reached, investors may withdraw their funds */\n uint public minimumFundingGoal;\n\n /* the UNIX timestamp start date of the crowdsale */\n uint public startsAt;\n\n /* the UNIX timestamp end date of the crowdsale */\n uint public endsAt;\n\n /* the number of tokens already sold through this contract*/\n uint public tokensSold = 0;\n\n /* How many wei of funding we have raised */\n uint public weiRaised = 0;\n\n /* Calculate incoming funds from presale contracts and addresses */\n uint public presaleWeiRaised = 0;\n\n /* How many distinct addresses have invested */\n uint public investorCount = 0;\n\n /* How much wei we have returned back to the contract after a failed crowdfund. */\n uint public loadedRefund = 0;\n\n /* How much wei we have given back to investors.*/\n uint public weiRefunded = 0;\n\n /* Has this crowdsale been finalized */\n bool public finalized;\n\n /** How much ETH each address has invested to this crowdsale */\n mapping (address => uint256) public investedAmountOf;\n\n /** How much tokens this crowdsale has credited for each investor address */\n mapping (address => uint256) public tokenAmountOf;\n\n /** Addresses that are allowed to invest even before ICO offical opens. For testing, for ICO partners, etc. */\n mapping (address => bool) public earlyParticipantWhitelist;\n\n /** This is for manul testing for the interaction from owner wallet. You can set it to any value and inspect this in blockchain explorer to see that crowdsale interaction works. */\n uint public ownerTestValue;\n\n /** State machine\n *\n * - Preparing: All contract initialization calls and variables have not been set yet\n * - Prefunding: We have not passed start time yet\n * - Funding: Active crowdsale\n * - Success: Minimum funding goal reached\n * - Failure: Minimum funding goal not reached before ending time\n * - Finalized: The finalized has been called and succesfully executed\n * - Refunding: Refunds are loaded on the contract for reclaim.\n */\n enum State{Unknown, Preparing, PreFunding, Funding, Success, Failure, Finalized, Refunding}\n\n // A new investment was made\n event Invested(address investor, uint weiAmount, uint tokenAmount, uint128 customerId);\n\n // Refund was processed for a contributor\n event Refund(address investor, uint weiAmount);\n\n // The rules were changed what kind of investments we accept\n event InvestmentPolicyChanged(bool newRequireCustomerId, bool newRequiredSignedAddress, address newSignerAddress);\n\n // Address early participation whitelist status changed\n event Whitelisted(address addr, bool status);\n\n // Crowdsale end time has been changed\n event EndsAtChanged(uint newEndsAt);\n\n function CrowdsaleBase(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal) {\n\n owner = msg.sender;\n\n token = FractionalERC20(_token);\n setPricingStrategy(_pricingStrategy);\n\n multisigWallet = _multisigWallet;\n if(multisigWallet == 0) {\n throw;\n }\n\n if(_start == 0) {\n throw;\n }\n\n startsAt = _start;\n\n if(_end == 0) {\n throw;\n }\n\n endsAt = _end;\n\n // Don't mess the dates\n if(startsAt >= endsAt) {\n throw;\n }\n\n // Minimum funding goal can be zero\n minimumFundingGoal = _minimumFundingGoal;\n }\n\n /**\n * Don't expect to just send in money and get tokens.\n */\n function() payable {\n throw;\n }\n\n /**\n * @dev Make an investment.\n *\n * Crowdsale must be running for one to invest.\n * We must have not pressed the emergency brake.\n *\n * @param receiver The Ethereum address who receives the tokens\n * @param customerId (optional) UUID v4 to track the successful payments on the server side'\n * @param tokenAmount Amount of tokens which be credited to receiver\n *\n * @return tokensBought How mony tokens were bought\n */\n function buyTokens(address receiver, uint128 customerId, uint256 tokenAmount) stopInEmergency internal returns(uint tokensBought) {\n\n // Determine if it's a good time to accept investment from this participant\n if(getState() == State.PreFunding) {\n // Are we whitelisted for early deposit\n if(!earlyParticipantWhitelist[receiver]) {\n throw;\n }\n } else if(getState() == State.Funding) {\n // Retail participants can only come in when the crowdsale is running\n // pass\n } else {\n // Unwanted state\n throw;\n }\n\n uint weiAmount = msg.value;\n\n // Dust transaction\n require(tokenAmount != 0);\n\n if(investedAmountOf[receiver] == 0) {\n // A new investor\n investorCount++;\n }\n\n // Update investor\n investedAmountOf[receiver] = investedAmountOf[receiver].plus(weiAmount);\n tokenAmountOf[receiver] = tokenAmountOf[receiver].plus(tokenAmount);\n\n // Update totals\n weiRaised = weiRaised.plus(weiAmount);\n tokensSold = tokensSold.plus(tokenAmount);\n\n if(pricingStrategy.isPresalePurchase(receiver)) {\n presaleWeiRaised = presaleWeiRaised.plus(weiAmount);\n }\n\n // Check that we did not bust the cap\n require(!isBreakingCap(weiAmount, tokenAmount, weiRaised, tokensSold));\n\n assignTokens(receiver, tokenAmount);\n\n // Pocket the money, or fail the crowdsale if we for some reason cannot send the money to our multisig\n if(!multisigWallet.send(weiAmount)) throw;\n\n // Tell us invest was success\n Invested(receiver, weiAmount, tokenAmount, customerId);\n\n return tokenAmount;\n }\n\n /**\n * @dev Make an investment based on pricing strategy\n *\n * This is a wrapper for buyTokens(), but the amount of tokens receiver will\n * have depends on the pricing strategy used.\n *\n * @param receiver The Ethereum address who receives the tokens\n * @param customerId (optional) UUID v4 to track the successful payments on the server side'\n *\n * @return tokensBought How mony tokens were bought\n */\n function investInternal(address receiver, uint128 customerId) stopInEmergency internal returns(uint tokensBought) {\n return buyTokens(receiver, customerId, pricingStrategy.calculatePrice(msg.value, weiRaised - presaleWeiRaised, tokensSold, msg.sender, token.decimals()));\n }\n\n /**\n * @dev Calculate tokens user will have for their purchase\n *\n * @param weisTotal How much ethers (in wei) the user putssssss in\n * @param pricePerToken What is the price for one token\n *\n * @return tokensTotal which is received tokens, token decimals included\n */\n function calculateTokens(uint256 weisTotal, uint256 pricePerToken) public constant returns(uint tokensTotal) {\n // pricePerToken is how many full tokens, token decimal place included, you get for wei amount.\n // Because, in theory, decimal amount can vary, we do the exponent calculation here,\n // though gas wise using 10**18 constant would be much simpler.\n // Furthermore we could use rough amounts and take in raw wei per tokens amount,\n // but we lose too much accuracy for generic calculations, thus all these are\n // practically implemented as 10**18 fixed points.\n uint multiplier = 10 ** token.decimals();\n return weisTotal.times(multiplier)/pricePerToken;\n }\n\n /**\n * Finalize a succcesful crowdsale.\n *\n * The owner can triggre a call the contract that provides post-crowdsale actions, like releasing the tokens.\n */\n function finalize() public inState(State.Success) onlyOwner stopInEmergency {\n\n // Already finalized\n if(finalized) {\n throw;\n }\n\n // Finalizing is optional. We only call it if we are given a finalizing agent.\n if(address(finalizeAgent) != 0) {\n finalizeAgent.finalizeCrowdsale();\n }\n\n finalized = true;\n }\n\n /**\n * Allow to (re)set finalize agent.\n *\n * Design choice: no state restrictions on setting this, so that we can fix fat finger mistakes.\n */\n function setFinalizeAgent(FinalizeAgent addr) onlyOwner {\n finalizeAgent = addr;\n\n // Don't allow setting bad agent\n if(!finalizeAgent.isFinalizeAgent()) {\n throw;\n }\n }\n\n /**\n * Allow crowdsale owner to close early or extend the crowdsale.\n *\n * This is useful e.g. for a manual soft cap implementation:\n * - after X amount is reached determine manual closing\n *\n * This may put the crowdsale to an invalid state,\n * but we trust owners know what they are doing.\n *\n */\n function setEndsAt(uint time) onlyOwner {\n\n if(now > time) {\n throw; // Don't change past\n }\n\n if(startsAt > time) {\n throw; // Prevent human mistakes\n }\n\n endsAt = time;\n EndsAtChanged(endsAt);\n }\n\n /**\n * Allow to (re)set pricing strategy.\n *\n * Design choice: no state restrictions on the set, so that we can fix fat finger mistakes.\n */\n function setPricingStrategy(PricingStrategy _pricingStrategy) onlyOwner {\n pricingStrategy = _pricingStrategy;\n\n // Don't allow setting bad agent\n if(!pricingStrategy.isPricingStrategy()) {\n throw;\n }\n }\n\n /**\n * Allow to change the team multisig address in the case of emergency.\n *\n * This allows to save a deployed crowdsale wallet in the case the crowdsale has not yet begun\n * (we have done only few test transactions). After the crowdsale is going\n * then multisig address stays locked for the safety reasons.\n */\n function setMultisig(address addr) public onlyOwner {\n\n // Change\n if(investorCount > MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE) {\n throw;\n }\n\n multisigWallet = addr;\n }\n\n /**\n * Allow load refunds back on the contract for the refunding.\n *\n * The team can transfer the funds back on the smart contract in the case the minimum goal was not reached..\n */\n function loadRefund() public payable inState(State.Failure) {\n if(msg.value == 0) throw;\n loadedRefund = loadedRefund.plus(msg.value);\n }\n\n /**\n * Investors can claim refund.\n *\n * Note that any refunds from proxy buyers should be handled separately,\n * and not through this contract.\n */\n function refund() public inState(State.Refunding) {\n uint256 weiValue = investedAmountOf[msg.sender];\n if (weiValue == 0) throw;\n investedAmountOf[msg.sender] = 0;\n weiRefunded = weiRefunded.plus(weiValue);\n Refund(msg.sender, weiValue);\n if (!msg.sender.send(weiValue)) throw;\n }\n\n /**\n * @return true if the crowdsale has raised enough money to be a successful.\n */\n function isMinimumGoalReached() public constant returns (bool reached) {\n return weiRaised >= minimumFundingGoal;\n }\n\n /**\n * Check if the contract relationship looks good.\n */\n function isFinalizerSane() public constant returns (bool sane) {\n return finalizeAgent.isSane();\n }\n\n /**\n * Check if the contract relationship looks good.\n */\n function isPricingSane() public constant returns (bool sane) {\n return pricingStrategy.isSane(address(this));\n }\n\n /**\n * Crowdfund state machine management.\n *\n * We make it a function and do not assign the result to a variable, so there is no chance of the variable being stale.\n */\n function getState() public constant returns (State) {\n if(finalized) return State.Finalized;\n else if (address(finalizeAgent) == 0) return State.Preparing;\n else if (!finalizeAgent.isSane()) return State.Preparing;\n else if (!pricingStrategy.isSane(address(this))) return State.Preparing;\n else if (block.timestamp < startsAt) return State.PreFunding;\n else if (block.timestamp <= endsAt && !isCrowdsaleFull()) return State.Funding;\n else if (isMinimumGoalReached()) return State.Success;\n else if (!isMinimumGoalReached() && weiRaised > 0 && loadedRefund >= weiRaised) return State.Refunding;\n else return State.Failure;\n }\n\n /** This is for manual testing of multisig wallet interaction */\n function setOwnerTestValue(uint val) onlyOwner {\n ownerTestValue = val;\n }\n\n /**\n * Allow addresses to do early participation.\n *\n * TODO: Fix spelling error in the name\n */\n function setEarlyParicipantWhitelist(address addr, bool status) onlyOwner {\n earlyParticipantWhitelist[addr] = status;\n Whitelisted(addr, status);\n }\n\n\n /** Interface marker. */\n function isCrowdsale() public constant returns (bool) {\n return true;\n }\n\n //\n // Modifiers\n //\n\n /** Modified allowing execution only if the crowdsale is currently running. */\n modifier inState(State state) {\n if(getState() != state) throw;\n _;\n }\n\n\n //\n // Abstract functions\n //\n\n /**\n * Check if the current invested breaks our cap rules.\n *\n *\n * The child contract must define their own cap setting rules.\n * We allow a lot of flexibility through different capping strategies (ETH, token count)\n * Called from invest().\n *\n * @param weiAmount The amount of wei the investor tries to invest in the current transaction\n * @param tokenAmount The amount of tokens we try to give to the investor in the current transaction\n * @param weiRaisedTotal What would be our total raised balance after this transaction\n * @param tokensSoldTotal What would be our total sold tokens count after this transaction\n *\n * @return true if taking this investment would break our cap rules\n */\n function isBreakingCap(uint weiAmount, uint tokenAmount, uint weiRaisedTotal, uint tokensSoldTotal) constant returns (bool limitBroken);\n\n /**\n * Check if the current crowdsale is full and we can no longer sell any tokens.\n */\n function isCrowdsaleFull() public constant returns (bool);\n\n /**\n * Create new tokens or transfer issued tokens to the investor depending on the cap model.\n */\n function assignTokens(address receiver, uint tokenAmount) internal;\n}\n\n\n\n/**\n * Abstract base contract for token sales with the default buy entry points.\n *\n * Handle\n * - start and end dates\n * - accepting investments\n * - minimum funding goal and refund\n * - various statistics during the crowdfund\n * - different pricing strategies\n * - different investment policies (require server side customer id, allow only whitelisted addresses)\n *\n * Does not Handle\n *\n * - Token allocation (minting vs. transfer)\n * - Cap rules\n *\n */\ncontract Crowdsale is CrowdsaleBase {\n\n /* Do we need to have unique contributor id for each customer */\n bool public requireCustomerId;\n\n /**\n * Do we verify that contributor has been cleared on the server side (accredited investors only).\n * This method was first used in FirstBlood crowdsale to ensure all contributors have accepted terms on sale (on the web).\n */\n bool public requiredSignedAddress;\n\n /* Server side address that signed allowed contributors (Ethereum addresses) that can participate the crowdsale */\n address public signerAddress;\n\n function Crowdsale(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal) CrowdsaleBase(_token, _pricingStrategy, _multisigWallet, _start, _end, _minimumFundingGoal) {\n }\n\n /**\n * Preallocate tokens for the early investors.\n *\n * Preallocated tokens have been sold before the actual crowdsale opens.\n * This function mints the tokens and moves the crowdsale needle.\n *\n * Investor count is not handled; it is assumed this goes for multiple investors\n * and the token distribution happens outside the smart contract flow.\n *\n * No money is exchanged, as the crowdsale team already have received the payment.\n *\n * @param fullTokens tokens as full tokens - decimal places added internally\n * @param weiPrice Price of a single full token in wei\n *\n */\n function preallocate(address receiver, uint fullTokens, uint weiPrice) public onlyOwner {\n\n uint tokenAmount = fullTokens * 10**token.decimals();\n uint weiAmount = weiPrice * fullTokens; // This can be also 0, we give out tokens for free\n\n weiRaised = weiRaised.plus(weiAmount);\n tokensSold = tokensSold.plus(tokenAmount);\n\n investedAmountOf[receiver] = investedAmountOf[receiver].plus(weiAmount);\n tokenAmountOf[receiver] = tokenAmountOf[receiver].plus(tokenAmount);\n\n assignTokens(receiver, tokenAmount);\n\n // Tell us invest was success\n Invested(receiver, weiAmount, tokenAmount, 0);\n }\n\n /**\n * Allow anonymous contributions to this crowdsale.\n */\n function investWithSignedAddress(address addr, uint128 customerId, uint8 v, bytes32 r, bytes32 s) public payable {\n bytes32 hash = sha256(addr);\n if (ecrecover(hash, v, r, s) != signerAddress) throw;\n if(customerId == 0) throw; // UUIDv4 sanity check\n investInternal(addr, customerId);\n }\n\n /**\n * Track who is the customer making the payment so we can send thank you email.\n */\n function investWithCustomerId(address addr, uint128 customerId) public payable {\n if(requiredSignedAddress) throw; // Crowdsale allows only server-side signed participants\n if(customerId == 0) throw; // UUIDv4 sanity check\n investInternal(addr, customerId);\n }\n\n /**\n * Allow anonymous contributions to this crowdsale.\n */\n function invest(address addr) public payable {\n if(requireCustomerId) throw; // Crowdsale needs to track participants for thank you email\n if(requiredSignedAddress) throw; // Crowdsale allows only server-side signed participants\n investInternal(addr, 0);\n }\n\n /**\n * Invest to tokens, recognize the payer and clear his address.\n *\n */\n function buyWithSignedAddress(uint128 customerId, uint8 v, bytes32 r, bytes32 s) public payable {\n investWithSignedAddress(msg.sender, customerId, v, r, s);\n }\n\n /**\n * Invest to tokens, recognize the payer.\n *\n */\n function buyWithCustomerIdWithChecksum(uint128 customerId, bytes1 checksum) public payable {\n // see customerid.py\n if (bytes1(sha3(customerId)) != checksum) throw;\n investWithCustomerId(msg.sender, customerId);\n }\n\n /**\n * Legacy API signature.\n */\n function buyWithCustomerId(uint128 customerId) public payable {\n investWithCustomerId(msg.sender, customerId);\n }\n\n /**\n * The basic entry point to participate the crowdsale process.\n *\n * Pay for funding, get invested tokens back in the sender address.\n */\n function buy() public payable {\n invest(msg.sender);\n }\n\n /**\n * Set policy do we need to have server-side customer ids for the investments.\n *\n */\n function setRequireCustomerId(bool value) onlyOwner {\n requireCustomerId = value;\n InvestmentPolicyChanged(requireCustomerId, requiredSignedAddress, signerAddress);\n }\n\n /**\n * Set policy if all investors must be cleared on the server side first.\n *\n * This is e.g. for the accredited investor clearing.\n *\n */\n function setRequireSignedAddress(bool value, address _signerAddress) onlyOwner {\n requiredSignedAddress = value;\n signerAddress = _signerAddress;\n InvestmentPolicyChanged(requireCustomerId, requiredSignedAddress, signerAddress);\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n assert(c / a == b);\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n\n\n\n/**\n * @title Basic token\n * @dev Basic version of StandardToken, with no allowances.\n */\ncontract BasicToken is ERC20Basic {\n using SafeMath for uint256;\n\n mapping(address => uint256) balances;\n\n uint256 totalSupply_;\n\n /**\n * @dev total number of tokens in existence\n */\n function totalSupply() public view returns (uint256) {\n return totalSupply_;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param _to The address to transfer to.\n * @param _value The amount to be transferred.\n */\n function transfer(address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[msg.sender]);\n\n // SafeMath.sub will throw if there is not enough balance.\n balances[msg.sender] = balances[msg.sender].sub(_value);\n balances[_to] = balances[_to].add(_value);\n Transfer(msg.sender, _to, _value);\n return true;\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param _owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address _owner) public view returns (uint256 balance) {\n return balances[_owner];\n }\n\n}\n\n\n\n\n/**\n * @title Standard ERC20 token\n *\n * @dev Implementation of the basic standard token.\n * @dev https://github.com/ethereum/EIPs/issues/20\n * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol\n */\ncontract StandardToken is ERC20, BasicToken {\n\n mapping (address => mapping (address => uint256)) internal allowed;\n\n\n /**\n * @dev Transfer tokens from one address to another\n * @param _from address The address which you want to send tokens from\n * @param _to address The address which you want to transfer to\n * @param _value uint256 the amount of tokens to be transferred\n */\n function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[_from]);\n require(_value <= allowed[_from][msg.sender]);\n\n balances[_from] = balances[_from].sub(_value);\n balances[_to] = balances[_to].add(_value);\n allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);\n Transfer(_from, _to, _value);\n return true;\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n *\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param _spender The address which will spend the funds.\n * @param _value The amount of tokens to be spent.\n */\n function approve(address _spender, uint256 _value) public returns (bool) {\n allowed[msg.sender][_spender] = _value;\n Approval(msg.sender, _spender, _value);\n return true;\n }\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param _owner address The address which owns the funds.\n * @param _spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address _owner, address _spender) public view returns (uint256) {\n return allowed[_owner][_spender];\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(address _spender, uint _addedValue) public returns (bool) {\n allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {\n uint oldValue = allowed[msg.sender][_spender];\n if (_subtractedValue > oldValue) {\n allowed[msg.sender][_spender] = 0;\n } else {\n allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);\n }\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\ncontract Recoverable is Ownable {\n\n /// @dev Empty constructor (for now)\n function Recoverable() {\n }\n\n /// @dev This will be invoked by the owner, when owner wants to rescue tokens\n /// @param token Token which will we rescue to the owner from the contract\n function recoverTokens(ERC20Basic token) onlyOwner public {\n token.transfer(owner, tokensToBeReturned(token));\n }\n\n /// @dev Interface function, can be overwritten by the superclass\n /// @param token Token which balance we will check and return\n /// @return The amount of tokens (in smallest denominator) the contract owns\n function tokensToBeReturned(ERC20Basic token) public returns (uint) {\n return token.balanceOf(this);\n }\n}\n\n\n\n/**\n * Standard EIP-20 token with an interface marker.\n *\n * @notice Interface marker is used by crowdsale contracts to validate that addresses point a good token contract.\n *\n */\ncontract StandardTokenExt is StandardToken, Recoverable {\n\n /* Interface declaration */\n function isToken() public constant returns (bool weAre) {\n return true;\n }\n}\n\n\n\n\n/**\n * A token that can increase its supply by another contract.\n *\n * This allows uncapped crowdsale by dynamically increasing the supply when money pours in.\n * Only mint agents, contracts whitelisted by owner, can mint new tokens.\n *\n */\ncontract MintableToken is StandardTokenExt {\n\n using SafeMathLib for uint;\n\n bool public mintingFinished = false;\n\n /** List of agents that are allowed to create new tokens */\n mapping (address => bool) public mintAgents;\n\n event MintingAgentChanged(address addr, bool state);\n event Minted(address receiver, uint amount);\n\n /**\n * Create new tokens and allocate them to an address..\n *\n * Only callably by a crowdsale contract (mint agent).\n */\n function mint(address receiver, uint amount) onlyMintAgent canMint public {\n totalSupply_ = totalSupply_.plus(amount);\n balances[receiver] = balances[receiver].plus(amount);\n\n // This will make the mint transaction apper in EtherScan.io\n // We can remove this after there is a standardized minting event\n Transfer(0, receiver, amount);\n }\n\n /**\n * Owner can allow a crowdsale contract to mint new tokens.\n */\n function setMintAgent(address addr, bool state) onlyOwner canMint public {\n mintAgents[addr] = state;\n MintingAgentChanged(addr, state);\n }\n\n modifier onlyMintAgent() {\n // Only crowdsale contracts are allowed to mint new tokens\n if(!mintAgents[msg.sender]) {\n throw;\n }\n _;\n }\n\n /** Make sure we are not done yet. */\n modifier canMint() {\n if(mintingFinished) throw;\n _;\n }\n}\n\n\n/**\n * ICO crowdsale contract that is capped by amout of ETH.\n *\n * - Tokens are dynamically created during the crowdsale\n *\n *\n */\ncontract MintedEthCappedCrowdsale is Crowdsale {\n\n /* Maximum amount of wei this crowdsale can raise. */\n uint public weiCap;\n\n function MintedEthCappedCrowdsale(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal, uint _weiCap) Crowdsale(_token, _pricingStrategy, _multisigWallet, _start, _end, _minimumFundingGoal) {\n weiCap = _weiCap;\n }\n\n /**\n * Called from invest() to confirm if the curret investment does not break our cap rule.\n */\n function isBreakingCap(uint weiAmount, uint tokenAmount, uint weiRaisedTotal, uint tokensSoldTotal) constant returns (bool limitBroken) {\n return weiRaisedTotal > weiCap;\n }\n\n function isCrowdsaleFull() public constant returns (bool) {\n return weiRaised >= weiCap;\n }\n\n /**\n * Dynamically create tokens and assign them to the investor.\n */\n function assignTokens(address receiver, uint tokenAmount) internal {\n MintableToken mintableToken = MintableToken(token);\n mintableToken.mint(receiver, tokenAmount);\n }\n}\n"}, "MintedTokenCappedCrowdsale": {"abi": [{"constant": true, "inputs": [], "name": "ownerTestValue", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "requireCustomerId", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "invest", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "isPricingSane", "outputs": [{"name": "sane", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "endsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "minimumFundingGoal", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getState", "outputs": [{"name": "", "type": "uint8"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setFinalizeAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "customerId", "type": "uint128"}, {"name": "v", "type": "uint8"}, {"name": "r", "type": "bytes32"}, {"name": "s", "type": "bytes32"}], "name": "investWithSignedAddress", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "investedAmountOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "finalizeAgent", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "receiver", "type": "address"}, {"name": "fullTokens", "type": "uint256"}, {"name": "weiPrice", "type": "uint256"}], "name": "preallocate", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "maximumSellableTokens", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "weiRaised", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isCrowdsale", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "finalize", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_pricingStrategy", "type": "address"}], "name": "setPricingStrategy", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "tokensSold", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "refund", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "signerAddress", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "weiRefunded", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "halt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}, {"name": "checksum", "type": "bytes1"}], "name": "buyWithCustomerIdWithChecksum", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "time", "type": "uint256"}], "name": "setEndsAt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "pricingStrategy", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "loadedRefund", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isMinimumGoalReached", "outputs": [{"name": "reached", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "bool"}], "name": "setRequireCustomerId", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "loadRefund", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "val", "type": "uint256"}], "name": "setOwnerTestValue", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "weisTotal", "type": "uint256"}, {"name": "pricePerToken", "type": "uint256"}], "name": "calculateTokens", "outputs": [{"name": "tokensTotal", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "multisigWallet", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "tokenAmountOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}], "name": "buyWithCustomerId", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [{"name": "weiAmount", "type": "uint256"}, {"name": "tokenAmount", "type": "uint256"}, {"name": "weiRaisedTotal", "type": "uint256"}, {"name": "tokensSoldTotal", "type": "uint256"}], "name": "isBreakingCap", "outputs": [{"name": "limitBroken", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "buy", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "isFinalizerSane", "outputs": [{"name": "sane", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "startsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "finalized", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "halted", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "earlyParticipantWhitelist", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "unhalt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "requiredSignedAddress", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isCrowdsaleFull", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "investorCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "status", "type": "bool"}], "name": "setEarlyParicipantWhitelist", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "bool"}, {"name": "_signerAddress", "type": "address"}], "name": "setRequireSignedAddress", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "customerId", "type": "uint128"}], "name": "investWithCustomerId", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setMultisig", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}, {"name": "v", "type": "uint8"}, {"name": "r", "type": "bytes32"}, {"name": "s", "type": "bytes32"}], "name": "buyWithSignedAddress", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "presaleWeiRaised", "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": "_token", "type": "address"}, {"name": "_pricingStrategy", "type": "address"}, {"name": "_multisigWallet", "type": "address"}, {"name": "_start", "type": "uint256"}, {"name": "_end", "type": "uint256"}, {"name": "_minimumFundingGoal", "type": "uint256"}, {"name": "_maximumSellableTokens", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"payable": true, "stateMutability": "payable", "type": "fallback"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}, {"indexed": false, "name": "tokenAmount", "type": "uint256"}, {"indexed": false, "name": "customerId", "type": "uint128"}], "name": "Invested", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}], "name": "Refund", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newRequireCustomerId", "type": "bool"}, {"indexed": false, "name": "newRequiredSignedAddress", "type": "bool"}, {"indexed": false, "name": "newSignerAddress", "type": "address"}], "name": "InvestmentPolicyChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "addr", "type": "address"}, {"indexed": false, "name": "status", "type": "bool"}], "name": "Whitelisted", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newEndsAt", "type": "uint256"}], "name": "EndsAtChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "bytecode": "0x6080604052600560015560006009556000600a556000600b556000600c556000600d556000600e553480156200003457600080fd5b5060405160e0806200264183398101604090815281516020830151918301516060840151608085015160a086015160c0909601516000805433600160a060020a0319918216811782161790915560028054909116600160a060020a0387161790559395929391929091868686868686858585858585620000bd856401000000006200013f810204565b60058054600160a060020a031916600160a060020a038681169190911791829055161515620000eb57600080fd5b821515620000f857600080fd5b60078390558115156200010a57600080fd5b600882905560075482116200011e57600080fd5b600655505050601598909855506200020c9c50505050505050505050505050565b600054600160a060020a031633146200015757600080fd5b60038054600160a060020a031916600160a060020a038381169190911791829055604080517f04bbc255000000000000000000000000000000000000000000000000000000008152905192909116916304bbc255916004808201926020929091908290030181600087803b158015620001cf57600080fd5b505af1158015620001e4573d6000803e3d6000fd5b505050506040513d6020811015620001fb57600080fd5b505115156200020957600080fd5b50565b612425806200021c6000396000f3006080604052600436106102925763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630226401d811461029757806303ca0eed146102be57806303f9c793146102e7578063062b01ce146102fd5780630a09284a1461031257806313f4e977146103275780631865c57d1461033c57806319b667da146103755780631a49803b146103965780631aae3460146103cb57806321d5c0f6146103ec57806332013ac31461041d5780633ad075ea146104445780634042b66f146104595780634551dd591461046e5780634bb278f31461048357806350c6773414610498578063518ab2a8146104b9578063590e1ae3146104ce5780635b7633d0146104e35780635da89ac0146104f85780635ed7ca5b1461050d5780636203f09f1461052257806363c6082f146105375780636e50eb3f1461057957806378b99c2414610591578063797d9437146105a65780637c2e08a3146105bb5780637f7d711e146105d057806387612102146105ea5780638d51faec146105f25780638da5cb5b1461060a578063903cc5831461061f5780639075becf1461063a57806397b150ca1461064f57806399e9376c146106705780639d3c663f1461068d578063a6f2ae3a146106ae578063a7ba44c3146106b6578063af468682146106cb578063b3f05b97146106e0578063b9b8af0b146106f5578063cb16e6d01461070a578063cb3e64fd1461072b578063d222dc0414610740578063d5d0902114610755578063d7e64c001461076a578063eac249321461077f578063ed68ff2c146107a5578063ef869443146107cb578063f2fde38b146107f4578063f3283fba14610815578063f486972614610836578063f7c00e2f1461085f578063fc0c546a14610874575b600080fd5b3480156102a357600080fd5b506102ac610889565b60408051918252519081900360200190f35b3480156102ca57600080fd5b506102d361088f565b604080519115158252519081900360200190f35b6102fb600160a060020a0360043516610898565b005b34801561030957600080fd5b506102d36108cc565b34801561031e57600080fd5b506102ac610963565b34801561033357600080fd5b506102ac610969565b34801561034857600080fd5b5061035161096f565b6040518082600781111561036157fe5b60ff16815260200191505060405180910390f35b34801561038157600080fd5b506102fb600160a060020a0360043516610b5d565b6102fb600160a060020a03600435166fffffffffffffffffffffffffffffffff6024351660ff60443516606435608435610c2e565b3480156103d757600080fd5b506102ac600160a060020a0360043516610d56565b3480156103f857600080fd5b50610401610d68565b60408051600160a060020a039092168252519081900360200190f35b34801561042957600080fd5b506102fb600160a060020a0360043516602435604435610d77565b34801561045057600080fd5b506102ac61112d565b34801561046557600080fd5b506102ac611133565b34801561047a57600080fd5b506102d3611139565b34801561048f57600080fd5b506102fb61113e565b3480156104a457600080fd5b506102fb600160a060020a0360043516611243565b3480156104c557600080fd5b506102ac6112de565b3480156104da57600080fd5b506102fb6112e4565b3480156104ef57600080fd5b5061040161142a565b34801561050457600080fd5b506102ac61143f565b34801561051957600080fd5b506102fb611445565b34801561052e57600080fd5b506102ac611493565b6102fb6fffffffffffffffffffffffffffffffff600435167fff0000000000000000000000000000000000000000000000000000000000000060243516611499565b34801561058557600080fd5b506102fb60043561150b565b34801561059d57600080fd5b50610401611579565b3480156105b257600080fd5b506102ac611588565b3480156105c757600080fd5b506102d361158e565b3480156105dc57600080fd5b506102fb6004351515611599565b6102fb61161d565b3480156105fe57600080fd5b506102fb6004356116dd565b34801561061657600080fd5b506104016116f9565b34801561062b57600080fd5b506102ac600435602435611708565b34801561064657600080fd5b5061040161185f565b34801561065b57600080fd5b506102ac600160a060020a036004351661186e565b6102fb6fffffffffffffffffffffffffffffffff60043516611880565b34801561069957600080fd5b506102d360043560243560443560643561188a565b6102fb611895565b3480156106c257600080fd5b506102d36118a0565b3480156106d757600080fd5b506102ac61190e565b3480156106ec57600080fd5b506102d3611914565b34801561070157600080fd5b506102d361191d565b34801561071657600080fd5b506102d3600160a060020a036004351661193e565b34801561073757600080fd5b506102fb611953565b34801561074c57600080fd5b506102d36119b3565b34801561076157600080fd5b506102d36119c1565b34801561077657600080fd5b506102ac6119cc565b34801561078b57600080fd5b506102fb600160a060020a036004351660243515156119d2565b3480156107b157600080fd5b506102fb6004351515600160a060020a0360243516611a4d565b6102fb600160a060020a03600435166fffffffffffffffffffffffffffffffff60243516611afd565b34801561080057600080fd5b506102fb600160a060020a0360043516611b3f565b34801561082157600080fd5b506102fb600160a060020a0360043516611bd3565b6102fb6fffffffffffffffffffffffffffffffff6004351660ff60243516604435606435611c2a565b34801561086b57600080fd5b506102ac611c3d565b34801561088057600080fd5b50610401611c43565b60135481565b60145460ff1681565b60145460ff16156108a857600080fd5b601454610100900460ff16156108bd57600080fd5b6108c8816000611c52565b5050565b600354604080517f8e7682880000000000000000000000000000000000000000000000000000000081523060048201529051600092600160a060020a031691638e76828891602480830192602092919082900301818787803b15801561093157600080fd5b505af1158015610945573d6000803e3d6000fd5b505050506040513d602081101561095b57600080fd5b505190505b90565b60085481565b60065481565b600f5460009060ff161561098557506006610960565b600454600160a060020a0316151561099f57506001610960565b60048054604080517f82771c8e0000000000000000000000000000000000000000000000000000000081529051600160a060020a03909216926382771c8e9282820192602092908290030181600087803b1580156109fc57600080fd5b505af1158015610a10573d6000803e3d6000fd5b505050506040513d6020811015610a2657600080fd5b50511515610a3657506001610960565b600354604080517f8e7682880000000000000000000000000000000000000000000000000000000081523060048201529051600160a060020a0390921691638e768288916024808201926020929091908290030181600087803b158015610a9c57600080fd5b505af1158015610ab0573d6000803e3d6000fd5b505050506040513d6020811015610ac657600080fd5b50511515610ad657506001610960565b600754421015610ae857506002610960565b6008544211158015610aff5750610afd6119c1565b155b15610b0c57506003610960565b610b1461158e565b15610b2157506004610960565b610b2961158e565b158015610b3857506000600a54115b8015610b485750600a54600d5410155b15610b5557506007610960565b506005610960565b600054600160a060020a03163314610b7457600080fd5b6004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383811691909117808355604080517f614cb9040000000000000000000000000000000000000000000000000000000081529051919092169263614cb904928082019260209290918290030181600087803b158015610bf457600080fd5b505af1158015610c08573d6000803e3d6000fd5b505050506040513d6020811015610c1e57600080fd5b50511515610c2b57600080fd5b50565b60006002866040518082600160a060020a0316600160a060020a03166c010000000000000000000000000281526014019150506020604051808303816000865af1158015610c80573d6000803e3d6000fd5b5050506040513d6020811015610c9557600080fd5b5051601454604080516000808252602080830180855286905260ff8a16838501526060830189905260808301889052925194955062010000909304600160a060020a03169360019360a08084019493601f198401939081900390910191865af1158015610d06573d6000803e3d6000fd5b50505060206040510351600160a060020a0316141515610d2557600080fd5b6fffffffffffffffffffffffffffffffff85161515610d4357600080fd5b610d4d8686611c52565b50505050505050565b60106020526000908152604090205481565b600454600160a060020a031681565b600080548190600160a060020a03163314610d9157600080fd5b600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610dfd57600080fd5b505af1158015610e11573d6000803e3d6000fd5b505050506040513d6020811015610e2757600080fd5b5051600a8054604080516000805160206123da833981519152815260048101929092528688026024830181905290519390920a8702945090925073__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f91604480820192602092909190829003018186803b158015610e9d57600080fd5b505af4158015610eb1573d6000803e3d6000fd5b505050506040513d6020811015610ec757600080fd5b5051600a55600954604080516000805160206123da83398151915281526004810192909252602482018490525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b158015610f2f57600080fd5b505af4158015610f43573d6000803e3d6000fd5b505050506040513d6020811015610f5957600080fd5b5051600955600160a060020a0385166000908152601060209081526040918290205482516000805160206123da8339815191528152600481019190915260248101849052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b158015610fd757600080fd5b505af4158015610feb573d6000803e3d6000fd5b505050506040513d602081101561100157600080fd5b5051600160a060020a03861660009081526010602090815260408083209390935560118152908290205482516000805160206123da8339815191528152600481019190915260248101859052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561108757600080fd5b505af415801561109b573d6000803e3d6000fd5b505050506040513d60208110156110b157600080fd5b5051600160a060020a0386166000908152601160205260409020556110d68583611df9565b60408051600160a060020a0387168152602081018390528082018490526000606082015290517f0396f60aaad038749091d273dc13aaabc63db6e2271c7bad442d5cf25cc433509181900360800190a15050505050565b60155481565b600a5481565b600190565b60048061114961096f565b600781111561115457fe5b1461115e57600080fd5b600054600160a060020a0316331461117557600080fd5b60005474010000000000000000000000000000000000000000900460ff161561119d57600080fd5b600f5460ff16156111ad57600080fd5b600454600160a060020a0316156112335760048054604080517f0bf318a30000000000000000000000000000000000000000000000000000000081529051600160a060020a0390921692630bf318a392828201926000929082900301818387803b15801561121a57600080fd5b505af115801561122e573d6000803e3d6000fd5b505050505b50600f805460ff19166001179055565b600054600160a060020a0316331461125a57600080fd5b6003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038381169190911791829055604080517f04bbc255000000000000000000000000000000000000000000000000000000008152905192909116916304bbc255916004808201926020929091908290030181600087803b158015610bf457600080fd5b60095481565b60006007806112f161096f565b60078111156112fc57fe5b1461130657600080fd5b33600090815260106020526040902054915081151561132457600080fd5b33600090815260106020908152604080832092909255600e5482516000805160206123da8339815191528152600481019190915260248101859052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561139957600080fd5b505af41580156113ad573d6000803e3d6000fd5b505050506040513d60208110156113c357600080fd5b5051600e55604080513381526020810184905281517fbb28353e4598c3b9199101a66e0989549b659a59a54d2c27fbb183f1932c8e6d929181900390910190a1604051339083156108fc029084906000818181858888f1935050505015156108c857600080fd5b601454620100009004600160a060020a031681565b600e5481565b600054600160a060020a0316331461145c57600080fd5b6000805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b60015481565b604080517001000000000000000000000000000000006fffffffffffffffffffffffffffffffff851602815290519081900360100190207fff000000000000000000000000000000000000000000000000000000000000009081169082161461150157600080fd5b6108c83383611afd565b600054600160a060020a0316331461152257600080fd5b8042111561152f57600080fd5b80600754111561153e57600080fd5b60088190556040805182815290517fd34bb772c4ae9baa99db852f622773b31c7827e8ee818449fef20d30980bd3109181900360200190a150565b600354600160a060020a031681565b600d5481565b600654600a54101590565b600054600160a060020a031633146115b057600080fd5b6014805460ff191682151517908190556040805160ff808416151582526101008404161515602082015262010000909204600160a060020a031682820152517f48d826081348f5f00e8a33c9ae8ce89ed4c6e88400b585a478bc203d9e8177d3916060908290030190a150565b60058061162861096f565b600781111561163357fe5b1461163d57600080fd5b34151561164957600080fd5b600d54604080516000805160206123da833981519152815260048101929092523460248301525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b1580156116ab57600080fd5b505af41580156116bf573d6000803e3d6000fd5b505050506040513d60208110156116d557600080fd5b5051600d5550565b600054600160a060020a031633146116f457600080fd5b601355565b600054600160a060020a031681565b600080600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561177757600080fd5b505af115801561178b573d6000803e3d6000fd5b505050506040513d60208110156117a157600080fd5b5051604080517f1d3b9edf00000000000000000000000000000000000000000000000000000000815260048101879052600a9290920a602483018190529051909250849173__contracts/SafeMathLib.sol:SafeMathLi__91631d3b9edf91604480820192602092909190829003018186803b15801561182157600080fd5b505af4158015611835573d6000803e3d6000fd5b505050506040513d602081101561184b57600080fd5b505181151561185657fe5b04949350505050565b600554600160a060020a031681565b60116020526000908152604090205481565b610c2b3382611afd565b601554109392505050565b61189e33610898565b565b6000600460009054906101000a9004600160a060020a0316600160a060020a03166382771c8e6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561093157600080fd5b60075481565b600f5460ff1681565b60005474010000000000000000000000000000000000000000900460ff1681565b60126020526000908152604090205460ff1681565b600054600160a060020a0316331461196a57600080fd5b60005474010000000000000000000000000000000000000000900460ff16151561199357600080fd5b6000805474ff000000000000000000000000000000000000000019169055565b601454610100900460ff1681565b601554600954101590565b600c5481565b600054600160a060020a031633146119e957600080fd5b600160a060020a038216600081815260126020908152604091829020805460ff191685151590811790915582519384529083015280517fa54714518c5d275fdcd3d2a461e4858e4e8cb04fb93cd0bca9d6d34115f264409281900390910190a15050565b600054600160a060020a03163314611a6457600080fd5b60148054600160a060020a038084166201000090810275ffffffffffffffffffffffffffffffffffffffff00001987151561010090810261ff0019909616959095171617938490556040805160ff86811615158252948604909416151560208501529304168183015290517f48d826081348f5f00e8a33c9ae8ce89ed4c6e88400b585a478bc203d9e8177d39181900360600190a15050565b601454610100900460ff1615611b1257600080fd5b6fffffffffffffffffffffffffffffffff81161515611b3057600080fd5b611b3a8282611c52565b505050565b600054600160a060020a03163314611b5657600080fd5b600160a060020a0381161515611b6b57600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600054600160a060020a03163314611bea57600080fd5b600154600c541115611bfb57600080fd5b6005805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b611c373385858585610c2e565b50505050565b600b5481565b600254600160a060020a031681565b6000805474010000000000000000000000000000000000000000900460ff1615611c7b57600080fd5b611df28383600360009054906101000a9004600160a060020a0316600160a060020a03166318a4155e34600b54600a540360095433600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015611d1c57600080fd5b505af1158015611d30573d6000803e3d6000fd5b505050506040513d6020811015611d4657600080fd5b5051604080517c010000000000000000000000000000000000000000000000000000000063ffffffff8916028152600481019690965260248601949094526044850192909252600160a060020a0316606484015260848301525160a48083019260209291908290030181600087803b158015611dc157600080fd5b505af1158015611dd5573d6000803e3d6000fd5b505050506040513d6020811015611deb57600080fd5b5051611e7e565b9392505050565b600254604080517f40c10f19000000000000000000000000000000000000000000000000000000008152600160a060020a038581166004830152602482018590529151919092169182916340c10f199160448082019260009290919082900301818387803b158015611e6a57600080fd5b505af1158015610d4d573d6000803e3d6000fd5b60008054819074010000000000000000000000000000000000000000900460ff1615611ea957600080fd5b6002611eb361096f565b6007811115611ebe57fe5b1415611ef057600160a060020a03851660009081526012602052604090205460ff161515611eeb57600080fd5b611f0c565b6003611efa61096f565b6007811115611f0557fe5b1415610292575b5034821515611f1a57600080fd5b600160a060020a0385166000908152601060205260409020541515611f4357600c805460010190555b600160a060020a0385166000908152601060209081526040918290205482516000805160206123da8339815191528152600481019190915260248101849052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b158015611fbc57600080fd5b505af4158015611fd0573d6000803e3d6000fd5b505050506040513d6020811015611fe657600080fd5b5051600160a060020a03861660009081526010602090815260408083209390935560118152908290205482516000805160206123da8339815191528152600481019190915260248101869052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561206c57600080fd5b505af4158015612080573d6000803e3d6000fd5b505050506040513d602081101561209657600080fd5b5051600160a060020a03861660009081526011602090815260409182902092909255600a5481516000805160206123da8339815191528152600481019190915260248101849052905173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f9260448082019391829003018186803b15801561211657600080fd5b505af415801561212a573d6000803e3d6000fd5b505050506040513d602081101561214057600080fd5b5051600a55600954604080516000805160206123da83398151915281526004810192909252602482018590525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b1580156121a857600080fd5b505af41580156121bc573d6000803e3d6000fd5b505050506040513d60208110156121d257600080fd5b5051600955600354604080517ff14ae17d000000000000000000000000000000000000000000000000000000008152600160a060020a0388811660048301529151919092169163f14ae17d9160248083019260209291908290030181600087803b15801561223f57600080fd5b505af1158015612253573d6000803e3d6000fd5b505050506040513d602081101561226957600080fd5b50511561231757600b5473__contracts/SafeMathLib.sol:SafeMathLi__6366098d4f9091836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b1580156122e757600080fd5b505af41580156122fb573d6000803e3d6000fd5b505050506040513d602081101561231157600080fd5b5051600b555b6123278184600a5460095461188a565b1561233157600080fd5b61233b8584611df9565b600554604051600160a060020a039091169082156108fc029083906000818181858888f19350505050151561236f57600080fd5b60408051600160a060020a0387168152602081018390528082018590526fffffffffffffffffffffffffffffffff8616606082015290517f0396f60aaad038749091d273dc13aaabc63db6e2271c7bad442d5cf25cc433509181900360800190a150909392505050560066098d4f00000000000000000000000000000000000000000000000000000000a165627a7a72305820a20a0cf7a49e6ae8a0e15e1d4a12ebecb57d0480fc1aff9ed5dfad6c9212dd080029", "bytecode_runtime": "0x6080604052600436106102925763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630226401d811461029757806303ca0eed146102be57806303f9c793146102e7578063062b01ce146102fd5780630a09284a1461031257806313f4e977146103275780631865c57d1461033c57806319b667da146103755780631a49803b146103965780631aae3460146103cb57806321d5c0f6146103ec57806332013ac31461041d5780633ad075ea146104445780634042b66f146104595780634551dd591461046e5780634bb278f31461048357806350c6773414610498578063518ab2a8146104b9578063590e1ae3146104ce5780635b7633d0146104e35780635da89ac0146104f85780635ed7ca5b1461050d5780636203f09f1461052257806363c6082f146105375780636e50eb3f1461057957806378b99c2414610591578063797d9437146105a65780637c2e08a3146105bb5780637f7d711e146105d057806387612102146105ea5780638d51faec146105f25780638da5cb5b1461060a578063903cc5831461061f5780639075becf1461063a57806397b150ca1461064f57806399e9376c146106705780639d3c663f1461068d578063a6f2ae3a146106ae578063a7ba44c3146106b6578063af468682146106cb578063b3f05b97146106e0578063b9b8af0b146106f5578063cb16e6d01461070a578063cb3e64fd1461072b578063d222dc0414610740578063d5d0902114610755578063d7e64c001461076a578063eac249321461077f578063ed68ff2c146107a5578063ef869443146107cb578063f2fde38b146107f4578063f3283fba14610815578063f486972614610836578063f7c00e2f1461085f578063fc0c546a14610874575b600080fd5b3480156102a357600080fd5b506102ac610889565b60408051918252519081900360200190f35b3480156102ca57600080fd5b506102d361088f565b604080519115158252519081900360200190f35b6102fb600160a060020a0360043516610898565b005b34801561030957600080fd5b506102d36108cc565b34801561031e57600080fd5b506102ac610963565b34801561033357600080fd5b506102ac610969565b34801561034857600080fd5b5061035161096f565b6040518082600781111561036157fe5b60ff16815260200191505060405180910390f35b34801561038157600080fd5b506102fb600160a060020a0360043516610b5d565b6102fb600160a060020a03600435166fffffffffffffffffffffffffffffffff6024351660ff60443516606435608435610c2e565b3480156103d757600080fd5b506102ac600160a060020a0360043516610d56565b3480156103f857600080fd5b50610401610d68565b60408051600160a060020a039092168252519081900360200190f35b34801561042957600080fd5b506102fb600160a060020a0360043516602435604435610d77565b34801561045057600080fd5b506102ac61112d565b34801561046557600080fd5b506102ac611133565b34801561047a57600080fd5b506102d3611139565b34801561048f57600080fd5b506102fb61113e565b3480156104a457600080fd5b506102fb600160a060020a0360043516611243565b3480156104c557600080fd5b506102ac6112de565b3480156104da57600080fd5b506102fb6112e4565b3480156104ef57600080fd5b5061040161142a565b34801561050457600080fd5b506102ac61143f565b34801561051957600080fd5b506102fb611445565b34801561052e57600080fd5b506102ac611493565b6102fb6fffffffffffffffffffffffffffffffff600435167fff0000000000000000000000000000000000000000000000000000000000000060243516611499565b34801561058557600080fd5b506102fb60043561150b565b34801561059d57600080fd5b50610401611579565b3480156105b257600080fd5b506102ac611588565b3480156105c757600080fd5b506102d361158e565b3480156105dc57600080fd5b506102fb6004351515611599565b6102fb61161d565b3480156105fe57600080fd5b506102fb6004356116dd565b34801561061657600080fd5b506104016116f9565b34801561062b57600080fd5b506102ac600435602435611708565b34801561064657600080fd5b5061040161185f565b34801561065b57600080fd5b506102ac600160a060020a036004351661186e565b6102fb6fffffffffffffffffffffffffffffffff60043516611880565b34801561069957600080fd5b506102d360043560243560443560643561188a565b6102fb611895565b3480156106c257600080fd5b506102d36118a0565b3480156106d757600080fd5b506102ac61190e565b3480156106ec57600080fd5b506102d3611914565b34801561070157600080fd5b506102d361191d565b34801561071657600080fd5b506102d3600160a060020a036004351661193e565b34801561073757600080fd5b506102fb611953565b34801561074c57600080fd5b506102d36119b3565b34801561076157600080fd5b506102d36119c1565b34801561077657600080fd5b506102ac6119cc565b34801561078b57600080fd5b506102fb600160a060020a036004351660243515156119d2565b3480156107b157600080fd5b506102fb6004351515600160a060020a0360243516611a4d565b6102fb600160a060020a03600435166fffffffffffffffffffffffffffffffff60243516611afd565b34801561080057600080fd5b506102fb600160a060020a0360043516611b3f565b34801561082157600080fd5b506102fb600160a060020a0360043516611bd3565b6102fb6fffffffffffffffffffffffffffffffff6004351660ff60243516604435606435611c2a565b34801561086b57600080fd5b506102ac611c3d565b34801561088057600080fd5b50610401611c43565b60135481565b60145460ff1681565b60145460ff16156108a857600080fd5b601454610100900460ff16156108bd57600080fd5b6108c8816000611c52565b5050565b600354604080517f8e7682880000000000000000000000000000000000000000000000000000000081523060048201529051600092600160a060020a031691638e76828891602480830192602092919082900301818787803b15801561093157600080fd5b505af1158015610945573d6000803e3d6000fd5b505050506040513d602081101561095b57600080fd5b505190505b90565b60085481565b60065481565b600f5460009060ff161561098557506006610960565b600454600160a060020a0316151561099f57506001610960565b60048054604080517f82771c8e0000000000000000000000000000000000000000000000000000000081529051600160a060020a03909216926382771c8e9282820192602092908290030181600087803b1580156109fc57600080fd5b505af1158015610a10573d6000803e3d6000fd5b505050506040513d6020811015610a2657600080fd5b50511515610a3657506001610960565b600354604080517f8e7682880000000000000000000000000000000000000000000000000000000081523060048201529051600160a060020a0390921691638e768288916024808201926020929091908290030181600087803b158015610a9c57600080fd5b505af1158015610ab0573d6000803e3d6000fd5b505050506040513d6020811015610ac657600080fd5b50511515610ad657506001610960565b600754421015610ae857506002610960565b6008544211158015610aff5750610afd6119c1565b155b15610b0c57506003610960565b610b1461158e565b15610b2157506004610960565b610b2961158e565b158015610b3857506000600a54115b8015610b485750600a54600d5410155b15610b5557506007610960565b506005610960565b600054600160a060020a03163314610b7457600080fd5b6004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383811691909117808355604080517f614cb9040000000000000000000000000000000000000000000000000000000081529051919092169263614cb904928082019260209290918290030181600087803b158015610bf457600080fd5b505af1158015610c08573d6000803e3d6000fd5b505050506040513d6020811015610c1e57600080fd5b50511515610c2b57600080fd5b50565b60006002866040518082600160a060020a0316600160a060020a03166c010000000000000000000000000281526014019150506020604051808303816000865af1158015610c80573d6000803e3d6000fd5b5050506040513d6020811015610c9557600080fd5b5051601454604080516000808252602080830180855286905260ff8a16838501526060830189905260808301889052925194955062010000909304600160a060020a03169360019360a08084019493601f198401939081900390910191865af1158015610d06573d6000803e3d6000fd5b50505060206040510351600160a060020a0316141515610d2557600080fd5b6fffffffffffffffffffffffffffffffff85161515610d4357600080fd5b610d4d8686611c52565b50505050505050565b60106020526000908152604090205481565b600454600160a060020a031681565b600080548190600160a060020a03163314610d9157600080fd5b600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610dfd57600080fd5b505af1158015610e11573d6000803e3d6000fd5b505050506040513d6020811015610e2757600080fd5b5051600a8054604080516000805160206123da833981519152815260048101929092528688026024830181905290519390920a8702945090925073__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f91604480820192602092909190829003018186803b158015610e9d57600080fd5b505af4158015610eb1573d6000803e3d6000fd5b505050506040513d6020811015610ec757600080fd5b5051600a55600954604080516000805160206123da83398151915281526004810192909252602482018490525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b158015610f2f57600080fd5b505af4158015610f43573d6000803e3d6000fd5b505050506040513d6020811015610f5957600080fd5b5051600955600160a060020a0385166000908152601060209081526040918290205482516000805160206123da8339815191528152600481019190915260248101849052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b158015610fd757600080fd5b505af4158015610feb573d6000803e3d6000fd5b505050506040513d602081101561100157600080fd5b5051600160a060020a03861660009081526010602090815260408083209390935560118152908290205482516000805160206123da8339815191528152600481019190915260248101859052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561108757600080fd5b505af415801561109b573d6000803e3d6000fd5b505050506040513d60208110156110b157600080fd5b5051600160a060020a0386166000908152601160205260409020556110d68583611df9565b60408051600160a060020a0387168152602081018390528082018490526000606082015290517f0396f60aaad038749091d273dc13aaabc63db6e2271c7bad442d5cf25cc433509181900360800190a15050505050565b60155481565b600a5481565b600190565b60048061114961096f565b600781111561115457fe5b1461115e57600080fd5b600054600160a060020a0316331461117557600080fd5b60005474010000000000000000000000000000000000000000900460ff161561119d57600080fd5b600f5460ff16156111ad57600080fd5b600454600160a060020a0316156112335760048054604080517f0bf318a30000000000000000000000000000000000000000000000000000000081529051600160a060020a0390921692630bf318a392828201926000929082900301818387803b15801561121a57600080fd5b505af115801561122e573d6000803e3d6000fd5b505050505b50600f805460ff19166001179055565b600054600160a060020a0316331461125a57600080fd5b6003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038381169190911791829055604080517f04bbc255000000000000000000000000000000000000000000000000000000008152905192909116916304bbc255916004808201926020929091908290030181600087803b158015610bf457600080fd5b60095481565b60006007806112f161096f565b60078111156112fc57fe5b1461130657600080fd5b33600090815260106020526040902054915081151561132457600080fd5b33600090815260106020908152604080832092909255600e5482516000805160206123da8339815191528152600481019190915260248101859052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561139957600080fd5b505af41580156113ad573d6000803e3d6000fd5b505050506040513d60208110156113c357600080fd5b5051600e55604080513381526020810184905281517fbb28353e4598c3b9199101a66e0989549b659a59a54d2c27fbb183f1932c8e6d929181900390910190a1604051339083156108fc029084906000818181858888f1935050505015156108c857600080fd5b601454620100009004600160a060020a031681565b600e5481565b600054600160a060020a0316331461145c57600080fd5b6000805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b60015481565b604080517001000000000000000000000000000000006fffffffffffffffffffffffffffffffff851602815290519081900360100190207fff000000000000000000000000000000000000000000000000000000000000009081169082161461150157600080fd5b6108c83383611afd565b600054600160a060020a0316331461152257600080fd5b8042111561152f57600080fd5b80600754111561153e57600080fd5b60088190556040805182815290517fd34bb772c4ae9baa99db852f622773b31c7827e8ee818449fef20d30980bd3109181900360200190a150565b600354600160a060020a031681565b600d5481565b600654600a54101590565b600054600160a060020a031633146115b057600080fd5b6014805460ff191682151517908190556040805160ff808416151582526101008404161515602082015262010000909204600160a060020a031682820152517f48d826081348f5f00e8a33c9ae8ce89ed4c6e88400b585a478bc203d9e8177d3916060908290030190a150565b60058061162861096f565b600781111561163357fe5b1461163d57600080fd5b34151561164957600080fd5b600d54604080516000805160206123da833981519152815260048101929092523460248301525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b1580156116ab57600080fd5b505af41580156116bf573d6000803e3d6000fd5b505050506040513d60208110156116d557600080fd5b5051600d5550565b600054600160a060020a031633146116f457600080fd5b601355565b600054600160a060020a031681565b600080600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561177757600080fd5b505af115801561178b573d6000803e3d6000fd5b505050506040513d60208110156117a157600080fd5b5051604080517f1d3b9edf00000000000000000000000000000000000000000000000000000000815260048101879052600a9290920a602483018190529051909250849173__contracts/SafeMathLib.sol:SafeMathLi__91631d3b9edf91604480820192602092909190829003018186803b15801561182157600080fd5b505af4158015611835573d6000803e3d6000fd5b505050506040513d602081101561184b57600080fd5b505181151561185657fe5b04949350505050565b600554600160a060020a031681565b60116020526000908152604090205481565b610c2b3382611afd565b601554109392505050565b61189e33610898565b565b6000600460009054906101000a9004600160a060020a0316600160a060020a03166382771c8e6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561093157600080fd5b60075481565b600f5460ff1681565b60005474010000000000000000000000000000000000000000900460ff1681565b60126020526000908152604090205460ff1681565b600054600160a060020a0316331461196a57600080fd5b60005474010000000000000000000000000000000000000000900460ff16151561199357600080fd5b6000805474ff000000000000000000000000000000000000000019169055565b601454610100900460ff1681565b601554600954101590565b600c5481565b600054600160a060020a031633146119e957600080fd5b600160a060020a038216600081815260126020908152604091829020805460ff191685151590811790915582519384529083015280517fa54714518c5d275fdcd3d2a461e4858e4e8cb04fb93cd0bca9d6d34115f264409281900390910190a15050565b600054600160a060020a03163314611a6457600080fd5b60148054600160a060020a038084166201000090810275ffffffffffffffffffffffffffffffffffffffff00001987151561010090810261ff0019909616959095171617938490556040805160ff86811615158252948604909416151560208501529304168183015290517f48d826081348f5f00e8a33c9ae8ce89ed4c6e88400b585a478bc203d9e8177d39181900360600190a15050565b601454610100900460ff1615611b1257600080fd5b6fffffffffffffffffffffffffffffffff81161515611b3057600080fd5b611b3a8282611c52565b505050565b600054600160a060020a03163314611b5657600080fd5b600160a060020a0381161515611b6b57600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600054600160a060020a03163314611bea57600080fd5b600154600c541115611bfb57600080fd5b6005805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b611c373385858585610c2e565b50505050565b600b5481565b600254600160a060020a031681565b6000805474010000000000000000000000000000000000000000900460ff1615611c7b57600080fd5b611df28383600360009054906101000a9004600160a060020a0316600160a060020a03166318a4155e34600b54600a540360095433600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015611d1c57600080fd5b505af1158015611d30573d6000803e3d6000fd5b505050506040513d6020811015611d4657600080fd5b5051604080517c010000000000000000000000000000000000000000000000000000000063ffffffff8916028152600481019690965260248601949094526044850192909252600160a060020a0316606484015260848301525160a48083019260209291908290030181600087803b158015611dc157600080fd5b505af1158015611dd5573d6000803e3d6000fd5b505050506040513d6020811015611deb57600080fd5b5051611e7e565b9392505050565b600254604080517f40c10f19000000000000000000000000000000000000000000000000000000008152600160a060020a038581166004830152602482018590529151919092169182916340c10f199160448082019260009290919082900301818387803b158015611e6a57600080fd5b505af1158015610d4d573d6000803e3d6000fd5b60008054819074010000000000000000000000000000000000000000900460ff1615611ea957600080fd5b6002611eb361096f565b6007811115611ebe57fe5b1415611ef057600160a060020a03851660009081526012602052604090205460ff161515611eeb57600080fd5b611f0c565b6003611efa61096f565b6007811115611f0557fe5b1415610292575b5034821515611f1a57600080fd5b600160a060020a0385166000908152601060205260409020541515611f4357600c805460010190555b600160a060020a0385166000908152601060209081526040918290205482516000805160206123da8339815191528152600481019190915260248101849052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b158015611fbc57600080fd5b505af4158015611fd0573d6000803e3d6000fd5b505050506040513d6020811015611fe657600080fd5b5051600160a060020a03861660009081526010602090815260408083209390935560118152908290205482516000805160206123da8339815191528152600481019190915260248101869052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561206c57600080fd5b505af4158015612080573d6000803e3d6000fd5b505050506040513d602081101561209657600080fd5b5051600160a060020a03861660009081526011602090815260409182902092909255600a5481516000805160206123da8339815191528152600481019190915260248101849052905173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f9260448082019391829003018186803b15801561211657600080fd5b505af415801561212a573d6000803e3d6000fd5b505050506040513d602081101561214057600080fd5b5051600a55600954604080516000805160206123da83398151915281526004810192909252602482018590525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b1580156121a857600080fd5b505af41580156121bc573d6000803e3d6000fd5b505050506040513d60208110156121d257600080fd5b5051600955600354604080517ff14ae17d000000000000000000000000000000000000000000000000000000008152600160a060020a0388811660048301529151919092169163f14ae17d9160248083019260209291908290030181600087803b15801561223f57600080fd5b505af1158015612253573d6000803e3d6000fd5b505050506040513d602081101561226957600080fd5b50511561231757600b5473__contracts/SafeMathLib.sol:SafeMathLi__6366098d4f9091836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b1580156122e757600080fd5b505af41580156122fb573d6000803e3d6000fd5b505050506040513d602081101561231157600080fd5b5051600b555b6123278184600a5460095461188a565b1561233157600080fd5b61233b8584611df9565b600554604051600160a060020a039091169082156108fc029083906000818181858888f19350505050151561236f57600080fd5b60408051600160a060020a0387168152602081018390528082018590526fffffffffffffffffffffffffffffffff8616606082015290517f0396f60aaad038749091d273dc13aaabc63db6e2271c7bad442d5cf25cc433509181900360800190a150909392505050560066098d4f00000000000000000000000000000000000000000000000000000000a165627a7a72305820a20a0cf7a49e6ae8a0e15e1d4a12ebecb57d0480fc1aff9ed5dfad6c9212dd080029", "direct_dependencies": ["SafeMathLib"], "full_dependencies": ["SafeMathLib"], "linkrefs": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 8446}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 8740}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 9082}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 9434}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 11006}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 12572}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 13318}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 17220}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 17572}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 17914}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 18198}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 18722}], "linkrefs_runtime": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 7366}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 7660}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 8002}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 8354}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 9926}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 11492}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 12238}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 16140}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 16492}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 16834}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 17118}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 17642}], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": true, "inputs": [], "name": "ownerTestValue", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "requireCustomerId", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "invest", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "isPricingSane", "outputs": [{"name": "sane", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "endsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "minimumFundingGoal", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getState", "outputs": [{"name": "", "type": "uint8"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setFinalizeAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "customerId", "type": "uint128"}, {"name": "v", "type": "uint8"}, {"name": "r", "type": "bytes32"}, {"name": "s", "type": "bytes32"}], "name": "investWithSignedAddress", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "investedAmountOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "finalizeAgent", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "receiver", "type": "address"}, {"name": "fullTokens", "type": "uint256"}, {"name": "weiPrice", "type": "uint256"}], "name": "preallocate", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "maximumSellableTokens", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "weiRaised", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isCrowdsale", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "finalize", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_pricingStrategy", "type": "address"}], "name": "setPricingStrategy", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "tokensSold", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "refund", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "signerAddress", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "weiRefunded", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "halt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}, {"name": "checksum", "type": "bytes1"}], "name": "buyWithCustomerIdWithChecksum", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "time", "type": "uint256"}], "name": "setEndsAt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "pricingStrategy", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "loadedRefund", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isMinimumGoalReached", "outputs": [{"name": "reached", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "bool"}], "name": "setRequireCustomerId", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "loadRefund", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "val", "type": "uint256"}], "name": "setOwnerTestValue", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "weisTotal", "type": "uint256"}, {"name": "pricePerToken", "type": "uint256"}], "name": "calculateTokens", "outputs": [{"name": "tokensTotal", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "multisigWallet", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "tokenAmountOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}], "name": "buyWithCustomerId", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [{"name": "weiAmount", "type": "uint256"}, {"name": "tokenAmount", "type": "uint256"}, {"name": "weiRaisedTotal", "type": "uint256"}, {"name": "tokensSoldTotal", "type": "uint256"}], "name": "isBreakingCap", "outputs": [{"name": "limitBroken", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "buy", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "isFinalizerSane", "outputs": [{"name": "sane", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "startsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "finalized", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "halted", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "earlyParticipantWhitelist", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "unhalt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "requiredSignedAddress", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isCrowdsaleFull", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "investorCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "status", "type": "bool"}], "name": "setEarlyParicipantWhitelist", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "bool"}, {"name": "_signerAddress", "type": "address"}], "name": "setRequireSignedAddress", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "customerId", "type": "uint128"}], "name": "investWithCustomerId", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setMultisig", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}, {"name": "v", "type": "uint8"}, {"name": "r", "type": "bytes32"}, {"name": "s", "type": "bytes32"}], "name": "buyWithSignedAddress", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "presaleWeiRaised", "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": "_token", "type": "address"}, {"name": "_pricingStrategy", "type": "address"}, {"name": "_multisigWallet", "type": "address"}, {"name": "_start", "type": "uint256"}, {"name": "_end", "type": "uint256"}, {"name": "_minimumFundingGoal", "type": "uint256"}, {"name": "_maximumSellableTokens", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"payable": true, "stateMutability": "payable", "type": "fallback"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}, {"indexed": false, "name": "tokenAmount", "type": "uint256"}, {"indexed": false, "name": "customerId", "type": "uint128"}], "name": "Invested", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}], "name": "Refund", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newRequireCustomerId", "type": "bool"}, {"indexed": false, "name": "newRequiredSignedAddress", "type": "bool"}, {"indexed": false, "name": "newSignerAddress", "type": "address"}], "name": "InvestmentPolicyChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "addr", "type": "address"}, {"indexed": false, "name": "status", "type": "bool"}], "name": "Whitelisted", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newEndsAt", "type": "uint256"}], "name": "EndsAtChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "devdoc": {"methods": {"calculateTokens(uint256,uint256)": {"details": "Calculate tokens user will have for their purchase", "params": {"pricePerToken": "What is the price for one token", "weisTotal": "How much ethers (in wei) the user putssssss in"}, "return": "tokensTotal which is received tokens, token decimals included"}, "isMinimumGoalReached()": {"return": "true if the crowdsale has raised enough money to be a successful."}, "preallocate(address,uint256,uint256)": {"params": {"fullTokens": "tokens as full tokens - decimal places added internally", "weiPrice": "Price of a single full token in wei "}}, "transferOwnership(address)": {"details": "Allows the current owner to transfer control of the contract to a newOwner.", "params": {"newOwner": "The address to transfer ownership to."}}}}, "userdoc": {"methods": {"buy()": {"notice": "The basic entry point to participate the crowdsale process. * Pay for funding, get invested tokens back in the sender address."}, "buyWithCustomerId(uint128)": {"notice": "Legacy API signature."}, "buyWithCustomerIdWithChecksum(uint128,bytes1)": {"notice": "Invest to tokens, recognize the payer. "}, "buyWithSignedAddress(uint128,uint8,bytes32,bytes32)": {"notice": "Invest to tokens, recognize the payer and clear his address. "}, "finalize()": {"notice": "Finalize a succcesful crowdsale. * The owner can triggre a call the contract that provides post-crowdsale actions, like releasing the tokens."}, "getState()": {"notice": "Crowdfund state machine management. * We make it a function and do not assign the result to a variable, so there is no chance of the variable being stale."}, "invest(address)": {"notice": "Allow anonymous contributions to this crowdsale."}, "investWithCustomerId(address,uint128)": {"notice": "Track who is the customer making the payment so we can send thank you email."}, "investWithSignedAddress(address,uint128,uint8,bytes32,bytes32)": {"notice": "Allow anonymous contributions to this crowdsale."}, "isBreakingCap(uint256,uint256,uint256,uint256)": {"notice": "Called from invest() to confirm if the curret investment does not break our cap rule."}, "isCrowdsale()": {"notice": "Interface marker. "}, "isFinalizerSane()": {"notice": "Check if the contract relationship looks good."}, "isPricingSane()": {"notice": "Check if the contract relationship looks good."}, "loadRefund()": {"notice": "Allow load refunds back on the contract for the refunding. * The team can transfer the funds back on the smart contract in the case the minimum goal was not reached.."}, "preallocate(address,uint256,uint256)": {"notice": "Preallocate tokens for the early investors. * Preallocated tokens have been sold before the actual crowdsale opens. This function mints the tokens and moves the crowdsale needle. * Investor count is not handled; it is assumed this goes for multiple investors and the token distribution happens outside the smart contract flow. * No money is exchanged, as the crowdsale team already have received the payment."}, "refund()": {"notice": "Investors can claim refund. * Note that any refunds from proxy buyers should be handled separately, and not through this contract."}, "setEarlyParicipantWhitelist(address,bool)": {"notice": "Allow addresses to do early participation. * TODO: Fix spelling error in the name"}, "setEndsAt(uint256)": {"notice": "Allow crowdsale owner to close early or extend the crowdsale. * This is useful e.g. for a manual soft cap implementation: - after X amount is reached determine manual closing * This may put the crowdsale to an invalid state, but we trust owners know what they are doing. "}, "setFinalizeAgent(address)": {"notice": "Allow to (re)set finalize agent. * Design choice: no state restrictions on setting this, so that we can fix fat finger mistakes."}, "setMultisig(address)": {"notice": "Allow to change the team multisig address in the case of emergency. * This allows to save a deployed crowdsale wallet in the case the crowdsale has not yet begun (we have done only few test transactions). After the crowdsale is going then multisig address stays locked for the safety reasons."}, "setOwnerTestValue(uint256)": {"notice": "This is for manual testing of multisig wallet interaction "}, "setPricingStrategy(address)": {"notice": "Allow to (re)set pricing strategy. * Design choice: no state restrictions on the set, so that we can fix fat finger mistakes."}, "setRequireCustomerId(bool)": {"notice": "Set policy do we need to have server-side customer ids for the investments. "}, "setRequireSignedAddress(bool,address)": {"notice": "Set policy if all investors must be cleared on the server side first. * This is e.g. for the accredited investor clearing. "}}}}, "settings": {"compilationTarget": {"contracts/MintedTokenCappedCrowdsale.sol": "MintedTokenCappedCrowdsale"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/Crowdsale.sol": {"keccak256": "0x2697c26528f64bb954a7c2547d3b43317d2d2b02c7d9d05a7b1ab388cd79f65d", "urls": ["bzzr://f28b280794222114141c51dd5c388d403a7c98d8b51e04170a0e294246d5164b"]}, "contracts/CrowdsaleBase.sol": {"keccak256": "0xe2c9ed11183ce705616980df7b02544d72fe18b40395da7d9d4bcb621fb87871", "urls": ["bzzr://07f3887ba0d0eb3248b1ad3581480ed71a2fe70a47dcc283c4e97c8c92e0790a"]}, "contracts/FinalizeAgent.sol": {"keccak256": "0x309fd0510e0b3e2b5044e33f7c80cfb2d6f2a5697e41a5f185931d65770cfea9", "urls": ["bzzr://4e7ed6f82c0f542e92e56c12566b2ecd7666730865bf12566c27587ec64160ac"]}, "contracts/FractionalERC20.sol": {"keccak256": "0x75bc4ad90a8b13ce961c89b1bf405776f616e019d3a2720168f8e52be223198f", "urls": ["bzzr://6a3688f12da1a5c890ef06f80f883f6c5370886092d38a1b33cd4219b718478b"]}, "contracts/Haltable.sol": {"keccak256": "0x265dcf25e7c9ab4b6eecd2181f1b71334a1b5381a60f8db7d9526dab120f4b70", "urls": ["bzzr://d522e00fa9e075941469dd81738b59fdb99ce3c12cdc39e33abe40b588c4da9b"]}, "contracts/MintableToken.sol": {"keccak256": "0x650e1d6b2bedcd36508918357c7cf4f36fdd093cd0c4d6342f4dcd3bdcdd7578", "urls": ["bzzr://7ba2ac0480d428066a18727e2adb76ba56856ecd37b4420e801131ec8f8f4be3"]}, "contracts/MintedTokenCappedCrowdsale.sol": {"keccak256": "0xcbf855529729f71de827a444174aca4b9ea24afd98732a1b1676e1e40002b3cd", "urls": ["bzzr://2f5eb43ec94474c403930e5230551d1e78b8501efbde429e3dc65a00e8c683ee"]}, "contracts/PricingStrategy.sol": {"keccak256": "0x8df5093b7d07168ad994f9176de0bd2268f6563b1e8a3a448d8cfe7fe246c628", "urls": ["bzzr://ef5c944d51f739ab34e2c951d6ac82a7152e6bb844058a8e57bae52c14cbe16b"]}, "contracts/Recoverable.sol": {"keccak256": "0x311a332cdd87df6e00057f5455f4e68b043b5dbe211f6d68bc64e20817515635", "urls": ["bzzr://4fd99bcfb93baed6e7c8d22ee9ecc5c8346a1aa98288e77b01333b2c5d3f582d"]}, "contracts/SafeMathLib.sol": {"keccak256": "0x501bfe31e274b9a5591f7c540bdced4d4312e27d4f19599147c9bbca3d9c6b18", "urls": ["bzzr://a80935ebddb06c247d71372d4e5833ee029f08633bd0fe4a274a57009567e5b9"]}, "contracts/StandardTokenExt.sol": {"keccak256": "0x9ea2d4cec4dccd5639c05e6c23dd027d80b5e5a20abd99b280ab7b2631b5a5fc", "urls": ["bzzr://a52d8fc5a21bd83997aff19128e00dceb251df712207b61223894c8b7f42d5ff"]}, "zeppelin/contracts/math/SafeMath.sol": {"keccak256": "0x341ba8cb467a3623e819ba1a683ac1d264005186f308505214e5f6bc89446a08", "urls": ["bzzr://59b5652ee4e4a1b5a8f1a8906e14c84af43d636cf5ca0725cc1813aabe4c8c17"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}, "zeppelin/contracts/token/ERC20/BasicToken.sol": {"keccak256": "0x948404468d61ff35ea4194650670408dabd65da7f905a1c16888ab84520bf39e", "urls": ["bzzr://ea75e20f95d7e4e10394fe6bfaa8eee56b4757c2a6f1e8df4180d33afa621935"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}, "zeppelin/contracts/token/ERC20/StandardToken.sol": {"keccak256": "0xd2b344a5259e19ec143074cfa65637a10c40b68395c59808c4af13bccbb2de55", "urls": ["bzzr://d61a01175a7ca1ba9f4403de603c20b897e33ec425aef2d9f8a7f9ddfdfaf5b2"]}}, "version": 1}, "name": "MintedTokenCappedCrowdsale", "ordered_full_dependencies": ["SafeMathLib"], "source_path": "contracts/MintedTokenCappedCrowdsale.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Safe unsigned safe math.\n *\n * https://blog.aragon.one/library-driven-development-in-solidity-2bebcaf88736#.750gwtwli\n *\n * Originally from https://raw.githubusercontent.com/AragonOne/zeppelin-solidity/master/contracts/SafeMathLib.sol\n *\n * Maintained here until merged to mainline zeppelin-solidity.\n *\n */\nlibrary SafeMathLib {\n\n function times(uint a, uint b) returns (uint) {\n uint c = a * b;\n assert(a == 0 || c / a == b);\n return c;\n }\n\n function minus(uint a, uint b) returns (uint) {\n assert(b <= a);\n return a - b;\n }\n\n function plus(uint a, uint b) returns (uint) {\n uint c = a + b;\n assert(c>=a);\n return c;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Interface for defining crowdsale pricing.\n */\ncontract PricingStrategy {\n\n /** Interface declaration. */\n function isPricingStrategy() public constant returns (bool) {\n return true;\n }\n\n /** Self check if all references are correctly set.\n *\n * Checks that pricing strategy matches crowdsale parameters.\n */\n function isSane(address crowdsale) public constant returns (bool) {\n return true;\n }\n\n /**\n * @dev Pricing tells if this is a presale purchase or not.\n @param purchaser Address of the purchaser\n @return False by default, true if a presale purchaser\n */\n function isPresalePurchase(address purchaser) public constant returns (bool) {\n return false;\n }\n\n /**\n * When somebody tries to buy tokens for X eth, calculate how many tokens they get.\n *\n *\n * @param value - What is the value of the transaction send in as wei\n * @param tokensSold - how much tokens have been sold this far\n * @param weiRaised - how much money has been raised this far in the main token sale - this number excludes presale\n * @param msgSender - who is the investor of this transaction\n * @param decimals - how many decimal units the token has\n * @return Amount of tokens the investor receives\n */\n function calculatePrice(uint value, uint weiRaised, uint tokensSold, address msgSender, uint decimals) public constant returns (uint tokenAmount);\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Finalize agent defines what happens at the end of succeseful crowdsale.\n *\n * - Allocate tokens for founders, bounties and community\n * - Make tokens transferable\n * - etc.\n */\ncontract FinalizeAgent {\n\n function isFinalizeAgent() public constant returns(bool) {\n return true;\n }\n\n /** Return true if we can run finalizeCrowdsale() properly.\n *\n * This is a safety check function that doesn't allow crowdsale to begin\n * unless the finalizer has been set up properly.\n */\n function isSane() public constant returns (bool);\n\n /** Called once by crowdsale finalize() if the sale was success. */\n function finalizeCrowdsale();\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n\n/**\n * A token that defines fractional units as decimals.\n */\ncontract FractionalERC20 is ERC20 {\n\n uint public decimals;\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n/*\n * Haltable\n *\n * Abstract contract that allows children to implement an\n * emergency stop mechanism. Differs from Pausable by causing a throw when in halt mode.\n *\n *\n * Originally envisioned in FirstBlood ICO contract.\n */\ncontract Haltable is Ownable {\n bool public halted;\n\n modifier stopInEmergency {\n if (halted) throw;\n _;\n }\n\n modifier stopNonOwnersInEmergency {\n if (halted && msg.sender != owner) throw;\n _;\n }\n\n modifier onlyInEmergency {\n if (!halted) throw;\n _;\n }\n\n // called by the owner on emergency, triggers stopped state\n function halt() external onlyOwner {\n halted = true;\n }\n\n // called by the owner on end of emergency, returns to normal state\n function unhalt() external onlyOwner onlyInEmergency {\n halted = false;\n }\n\n}\n\n\n\n\n\n\n\n/**\n * Crowdsale state machine without buy functionality.\n *\n * Implements basic state machine logic, but leaves out all buy functions,\n * so that subclasses can implement their own buying logic.\n *\n *\n * For the default buy() implementation see Crowdsale.sol.\n */\ncontract CrowdsaleBase is Haltable {\n\n /* Max investment count when we are still allowed to change the multisig address */\n uint public MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE = 5;\n\n using SafeMathLib for uint;\n\n /* The token we are selling */\n FractionalERC20 public token;\n\n /* How we are going to price our offering */\n PricingStrategy public pricingStrategy;\n\n /* Post-success callback */\n FinalizeAgent public finalizeAgent;\n\n /* tokens will be transfered from this address */\n address public multisigWallet;\n\n /* if the funding goal is not reached, investors may withdraw their funds */\n uint public minimumFundingGoal;\n\n /* the UNIX timestamp start date of the crowdsale */\n uint public startsAt;\n\n /* the UNIX timestamp end date of the crowdsale */\n uint public endsAt;\n\n /* the number of tokens already sold through this contract*/\n uint public tokensSold = 0;\n\n /* How many wei of funding we have raised */\n uint public weiRaised = 0;\n\n /* Calculate incoming funds from presale contracts and addresses */\n uint public presaleWeiRaised = 0;\n\n /* How many distinct addresses have invested */\n uint public investorCount = 0;\n\n /* How much wei we have returned back to the contract after a failed crowdfund. */\n uint public loadedRefund = 0;\n\n /* How much wei we have given back to investors.*/\n uint public weiRefunded = 0;\n\n /* Has this crowdsale been finalized */\n bool public finalized;\n\n /** How much ETH each address has invested to this crowdsale */\n mapping (address => uint256) public investedAmountOf;\n\n /** How much tokens this crowdsale has credited for each investor address */\n mapping (address => uint256) public tokenAmountOf;\n\n /** Addresses that are allowed to invest even before ICO offical opens. For testing, for ICO partners, etc. */\n mapping (address => bool) public earlyParticipantWhitelist;\n\n /** This is for manul testing for the interaction from owner wallet. You can set it to any value and inspect this in blockchain explorer to see that crowdsale interaction works. */\n uint public ownerTestValue;\n\n /** State machine\n *\n * - Preparing: All contract initialization calls and variables have not been set yet\n * - Prefunding: We have not passed start time yet\n * - Funding: Active crowdsale\n * - Success: Minimum funding goal reached\n * - Failure: Minimum funding goal not reached before ending time\n * - Finalized: The finalized has been called and succesfully executed\n * - Refunding: Refunds are loaded on the contract for reclaim.\n */\n enum State{Unknown, Preparing, PreFunding, Funding, Success, Failure, Finalized, Refunding}\n\n // A new investment was made\n event Invested(address investor, uint weiAmount, uint tokenAmount, uint128 customerId);\n\n // Refund was processed for a contributor\n event Refund(address investor, uint weiAmount);\n\n // The rules were changed what kind of investments we accept\n event InvestmentPolicyChanged(bool newRequireCustomerId, bool newRequiredSignedAddress, address newSignerAddress);\n\n // Address early participation whitelist status changed\n event Whitelisted(address addr, bool status);\n\n // Crowdsale end time has been changed\n event EndsAtChanged(uint newEndsAt);\n\n function CrowdsaleBase(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal) {\n\n owner = msg.sender;\n\n token = FractionalERC20(_token);\n setPricingStrategy(_pricingStrategy);\n\n multisigWallet = _multisigWallet;\n if(multisigWallet == 0) {\n throw;\n }\n\n if(_start == 0) {\n throw;\n }\n\n startsAt = _start;\n\n if(_end == 0) {\n throw;\n }\n\n endsAt = _end;\n\n // Don't mess the dates\n if(startsAt >= endsAt) {\n throw;\n }\n\n // Minimum funding goal can be zero\n minimumFundingGoal = _minimumFundingGoal;\n }\n\n /**\n * Don't expect to just send in money and get tokens.\n */\n function() payable {\n throw;\n }\n\n /**\n * @dev Make an investment.\n *\n * Crowdsale must be running for one to invest.\n * We must have not pressed the emergency brake.\n *\n * @param receiver The Ethereum address who receives the tokens\n * @param customerId (optional) UUID v4 to track the successful payments on the server side'\n * @param tokenAmount Amount of tokens which be credited to receiver\n *\n * @return tokensBought How mony tokens were bought\n */\n function buyTokens(address receiver, uint128 customerId, uint256 tokenAmount) stopInEmergency internal returns(uint tokensBought) {\n\n // Determine if it's a good time to accept investment from this participant\n if(getState() == State.PreFunding) {\n // Are we whitelisted for early deposit\n if(!earlyParticipantWhitelist[receiver]) {\n throw;\n }\n } else if(getState() == State.Funding) {\n // Retail participants can only come in when the crowdsale is running\n // pass\n } else {\n // Unwanted state\n throw;\n }\n\n uint weiAmount = msg.value;\n\n // Dust transaction\n require(tokenAmount != 0);\n\n if(investedAmountOf[receiver] == 0) {\n // A new investor\n investorCount++;\n }\n\n // Update investor\n investedAmountOf[receiver] = investedAmountOf[receiver].plus(weiAmount);\n tokenAmountOf[receiver] = tokenAmountOf[receiver].plus(tokenAmount);\n\n // Update totals\n weiRaised = weiRaised.plus(weiAmount);\n tokensSold = tokensSold.plus(tokenAmount);\n\n if(pricingStrategy.isPresalePurchase(receiver)) {\n presaleWeiRaised = presaleWeiRaised.plus(weiAmount);\n }\n\n // Check that we did not bust the cap\n require(!isBreakingCap(weiAmount, tokenAmount, weiRaised, tokensSold));\n\n assignTokens(receiver, tokenAmount);\n\n // Pocket the money, or fail the crowdsale if we for some reason cannot send the money to our multisig\n if(!multisigWallet.send(weiAmount)) throw;\n\n // Tell us invest was success\n Invested(receiver, weiAmount, tokenAmount, customerId);\n\n return tokenAmount;\n }\n\n /**\n * @dev Make an investment based on pricing strategy\n *\n * This is a wrapper for buyTokens(), but the amount of tokens receiver will\n * have depends on the pricing strategy used.\n *\n * @param receiver The Ethereum address who receives the tokens\n * @param customerId (optional) UUID v4 to track the successful payments on the server side'\n *\n * @return tokensBought How mony tokens were bought\n */\n function investInternal(address receiver, uint128 customerId) stopInEmergency internal returns(uint tokensBought) {\n return buyTokens(receiver, customerId, pricingStrategy.calculatePrice(msg.value, weiRaised - presaleWeiRaised, tokensSold, msg.sender, token.decimals()));\n }\n\n /**\n * @dev Calculate tokens user will have for their purchase\n *\n * @param weisTotal How much ethers (in wei) the user putssssss in\n * @param pricePerToken What is the price for one token\n *\n * @return tokensTotal which is received tokens, token decimals included\n */\n function calculateTokens(uint256 weisTotal, uint256 pricePerToken) public constant returns(uint tokensTotal) {\n // pricePerToken is how many full tokens, token decimal place included, you get for wei amount.\n // Because, in theory, decimal amount can vary, we do the exponent calculation here,\n // though gas wise using 10**18 constant would be much simpler.\n // Furthermore we could use rough amounts and take in raw wei per tokens amount,\n // but we lose too much accuracy for generic calculations, thus all these are\n // practically implemented as 10**18 fixed points.\n uint multiplier = 10 ** token.decimals();\n return weisTotal.times(multiplier)/pricePerToken;\n }\n\n /**\n * Finalize a succcesful crowdsale.\n *\n * The owner can triggre a call the contract that provides post-crowdsale actions, like releasing the tokens.\n */\n function finalize() public inState(State.Success) onlyOwner stopInEmergency {\n\n // Already finalized\n if(finalized) {\n throw;\n }\n\n // Finalizing is optional. We only call it if we are given a finalizing agent.\n if(address(finalizeAgent) != 0) {\n finalizeAgent.finalizeCrowdsale();\n }\n\n finalized = true;\n }\n\n /**\n * Allow to (re)set finalize agent.\n *\n * Design choice: no state restrictions on setting this, so that we can fix fat finger mistakes.\n */\n function setFinalizeAgent(FinalizeAgent addr) onlyOwner {\n finalizeAgent = addr;\n\n // Don't allow setting bad agent\n if(!finalizeAgent.isFinalizeAgent()) {\n throw;\n }\n }\n\n /**\n * Allow crowdsale owner to close early or extend the crowdsale.\n *\n * This is useful e.g. for a manual soft cap implementation:\n * - after X amount is reached determine manual closing\n *\n * This may put the crowdsale to an invalid state,\n * but we trust owners know what they are doing.\n *\n */\n function setEndsAt(uint time) onlyOwner {\n\n if(now > time) {\n throw; // Don't change past\n }\n\n if(startsAt > time) {\n throw; // Prevent human mistakes\n }\n\n endsAt = time;\n EndsAtChanged(endsAt);\n }\n\n /**\n * Allow to (re)set pricing strategy.\n *\n * Design choice: no state restrictions on the set, so that we can fix fat finger mistakes.\n */\n function setPricingStrategy(PricingStrategy _pricingStrategy) onlyOwner {\n pricingStrategy = _pricingStrategy;\n\n // Don't allow setting bad agent\n if(!pricingStrategy.isPricingStrategy()) {\n throw;\n }\n }\n\n /**\n * Allow to change the team multisig address in the case of emergency.\n *\n * This allows to save a deployed crowdsale wallet in the case the crowdsale has not yet begun\n * (we have done only few test transactions). After the crowdsale is going\n * then multisig address stays locked for the safety reasons.\n */\n function setMultisig(address addr) public onlyOwner {\n\n // Change\n if(investorCount > MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE) {\n throw;\n }\n\n multisigWallet = addr;\n }\n\n /**\n * Allow load refunds back on the contract for the refunding.\n *\n * The team can transfer the funds back on the smart contract in the case the minimum goal was not reached..\n */\n function loadRefund() public payable inState(State.Failure) {\n if(msg.value == 0) throw;\n loadedRefund = loadedRefund.plus(msg.value);\n }\n\n /**\n * Investors can claim refund.\n *\n * Note that any refunds from proxy buyers should be handled separately,\n * and not through this contract.\n */\n function refund() public inState(State.Refunding) {\n uint256 weiValue = investedAmountOf[msg.sender];\n if (weiValue == 0) throw;\n investedAmountOf[msg.sender] = 0;\n weiRefunded = weiRefunded.plus(weiValue);\n Refund(msg.sender, weiValue);\n if (!msg.sender.send(weiValue)) throw;\n }\n\n /**\n * @return true if the crowdsale has raised enough money to be a successful.\n */\n function isMinimumGoalReached() public constant returns (bool reached) {\n return weiRaised >= minimumFundingGoal;\n }\n\n /**\n * Check if the contract relationship looks good.\n */\n function isFinalizerSane() public constant returns (bool sane) {\n return finalizeAgent.isSane();\n }\n\n /**\n * Check if the contract relationship looks good.\n */\n function isPricingSane() public constant returns (bool sane) {\n return pricingStrategy.isSane(address(this));\n }\n\n /**\n * Crowdfund state machine management.\n *\n * We make it a function and do not assign the result to a variable, so there is no chance of the variable being stale.\n */\n function getState() public constant returns (State) {\n if(finalized) return State.Finalized;\n else if (address(finalizeAgent) == 0) return State.Preparing;\n else if (!finalizeAgent.isSane()) return State.Preparing;\n else if (!pricingStrategy.isSane(address(this))) return State.Preparing;\n else if (block.timestamp < startsAt) return State.PreFunding;\n else if (block.timestamp <= endsAt && !isCrowdsaleFull()) return State.Funding;\n else if (isMinimumGoalReached()) return State.Success;\n else if (!isMinimumGoalReached() && weiRaised > 0 && loadedRefund >= weiRaised) return State.Refunding;\n else return State.Failure;\n }\n\n /** This is for manual testing of multisig wallet interaction */\n function setOwnerTestValue(uint val) onlyOwner {\n ownerTestValue = val;\n }\n\n /**\n * Allow addresses to do early participation.\n *\n * TODO: Fix spelling error in the name\n */\n function setEarlyParicipantWhitelist(address addr, bool status) onlyOwner {\n earlyParticipantWhitelist[addr] = status;\n Whitelisted(addr, status);\n }\n\n\n /** Interface marker. */\n function isCrowdsale() public constant returns (bool) {\n return true;\n }\n\n //\n // Modifiers\n //\n\n /** Modified allowing execution only if the crowdsale is currently running. */\n modifier inState(State state) {\n if(getState() != state) throw;\n _;\n }\n\n\n //\n // Abstract functions\n //\n\n /**\n * Check if the current invested breaks our cap rules.\n *\n *\n * The child contract must define their own cap setting rules.\n * We allow a lot of flexibility through different capping strategies (ETH, token count)\n * Called from invest().\n *\n * @param weiAmount The amount of wei the investor tries to invest in the current transaction\n * @param tokenAmount The amount of tokens we try to give to the investor in the current transaction\n * @param weiRaisedTotal What would be our total raised balance after this transaction\n * @param tokensSoldTotal What would be our total sold tokens count after this transaction\n *\n * @return true if taking this investment would break our cap rules\n */\n function isBreakingCap(uint weiAmount, uint tokenAmount, uint weiRaisedTotal, uint tokensSoldTotal) constant returns (bool limitBroken);\n\n /**\n * Check if the current crowdsale is full and we can no longer sell any tokens.\n */\n function isCrowdsaleFull() public constant returns (bool);\n\n /**\n * Create new tokens or transfer issued tokens to the investor depending on the cap model.\n */\n function assignTokens(address receiver, uint tokenAmount) internal;\n}\n\n\n\n/**\n * Abstract base contract for token sales with the default buy entry points.\n *\n * Handle\n * - start and end dates\n * - accepting investments\n * - minimum funding goal and refund\n * - various statistics during the crowdfund\n * - different pricing strategies\n * - different investment policies (require server side customer id, allow only whitelisted addresses)\n *\n * Does not Handle\n *\n * - Token allocation (minting vs. transfer)\n * - Cap rules\n *\n */\ncontract Crowdsale is CrowdsaleBase {\n\n /* Do we need to have unique contributor id for each customer */\n bool public requireCustomerId;\n\n /**\n * Do we verify that contributor has been cleared on the server side (accredited investors only).\n * This method was first used in FirstBlood crowdsale to ensure all contributors have accepted terms on sale (on the web).\n */\n bool public requiredSignedAddress;\n\n /* Server side address that signed allowed contributors (Ethereum addresses) that can participate the crowdsale */\n address public signerAddress;\n\n function Crowdsale(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal) CrowdsaleBase(_token, _pricingStrategy, _multisigWallet, _start, _end, _minimumFundingGoal) {\n }\n\n /**\n * Preallocate tokens for the early investors.\n *\n * Preallocated tokens have been sold before the actual crowdsale opens.\n * This function mints the tokens and moves the crowdsale needle.\n *\n * Investor count is not handled; it is assumed this goes for multiple investors\n * and the token distribution happens outside the smart contract flow.\n *\n * No money is exchanged, as the crowdsale team already have received the payment.\n *\n * @param fullTokens tokens as full tokens - decimal places added internally\n * @param weiPrice Price of a single full token in wei\n *\n */\n function preallocate(address receiver, uint fullTokens, uint weiPrice) public onlyOwner {\n\n uint tokenAmount = fullTokens * 10**token.decimals();\n uint weiAmount = weiPrice * fullTokens; // This can be also 0, we give out tokens for free\n\n weiRaised = weiRaised.plus(weiAmount);\n tokensSold = tokensSold.plus(tokenAmount);\n\n investedAmountOf[receiver] = investedAmountOf[receiver].plus(weiAmount);\n tokenAmountOf[receiver] = tokenAmountOf[receiver].plus(tokenAmount);\n\n assignTokens(receiver, tokenAmount);\n\n // Tell us invest was success\n Invested(receiver, weiAmount, tokenAmount, 0);\n }\n\n /**\n * Allow anonymous contributions to this crowdsale.\n */\n function investWithSignedAddress(address addr, uint128 customerId, uint8 v, bytes32 r, bytes32 s) public payable {\n bytes32 hash = sha256(addr);\n if (ecrecover(hash, v, r, s) != signerAddress) throw;\n if(customerId == 0) throw; // UUIDv4 sanity check\n investInternal(addr, customerId);\n }\n\n /**\n * Track who is the customer making the payment so we can send thank you email.\n */\n function investWithCustomerId(address addr, uint128 customerId) public payable {\n if(requiredSignedAddress) throw; // Crowdsale allows only server-side signed participants\n if(customerId == 0) throw; // UUIDv4 sanity check\n investInternal(addr, customerId);\n }\n\n /**\n * Allow anonymous contributions to this crowdsale.\n */\n function invest(address addr) public payable {\n if(requireCustomerId) throw; // Crowdsale needs to track participants for thank you email\n if(requiredSignedAddress) throw; // Crowdsale allows only server-side signed participants\n investInternal(addr, 0);\n }\n\n /**\n * Invest to tokens, recognize the payer and clear his address.\n *\n */\n function buyWithSignedAddress(uint128 customerId, uint8 v, bytes32 r, bytes32 s) public payable {\n investWithSignedAddress(msg.sender, customerId, v, r, s);\n }\n\n /**\n * Invest to tokens, recognize the payer.\n *\n */\n function buyWithCustomerIdWithChecksum(uint128 customerId, bytes1 checksum) public payable {\n // see customerid.py\n if (bytes1(sha3(customerId)) != checksum) throw;\n investWithCustomerId(msg.sender, customerId);\n }\n\n /**\n * Legacy API signature.\n */\n function buyWithCustomerId(uint128 customerId) public payable {\n investWithCustomerId(msg.sender, customerId);\n }\n\n /**\n * The basic entry point to participate the crowdsale process.\n *\n * Pay for funding, get invested tokens back in the sender address.\n */\n function buy() public payable {\n invest(msg.sender);\n }\n\n /**\n * Set policy do we need to have server-side customer ids for the investments.\n *\n */\n function setRequireCustomerId(bool value) onlyOwner {\n requireCustomerId = value;\n InvestmentPolicyChanged(requireCustomerId, requiredSignedAddress, signerAddress);\n }\n\n /**\n * Set policy if all investors must be cleared on the server side first.\n *\n * This is e.g. for the accredited investor clearing.\n *\n */\n function setRequireSignedAddress(bool value, address _signerAddress) onlyOwner {\n requiredSignedAddress = value;\n signerAddress = _signerAddress;\n InvestmentPolicyChanged(requireCustomerId, requiredSignedAddress, signerAddress);\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n assert(c / a == b);\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n\n\n\n/**\n * @title Basic token\n * @dev Basic version of StandardToken, with no allowances.\n */\ncontract BasicToken is ERC20Basic {\n using SafeMath for uint256;\n\n mapping(address => uint256) balances;\n\n uint256 totalSupply_;\n\n /**\n * @dev total number of tokens in existence\n */\n function totalSupply() public view returns (uint256) {\n return totalSupply_;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param _to The address to transfer to.\n * @param _value The amount to be transferred.\n */\n function transfer(address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[msg.sender]);\n\n // SafeMath.sub will throw if there is not enough balance.\n balances[msg.sender] = balances[msg.sender].sub(_value);\n balances[_to] = balances[_to].add(_value);\n Transfer(msg.sender, _to, _value);\n return true;\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param _owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address _owner) public view returns (uint256 balance) {\n return balances[_owner];\n }\n\n}\n\n\n\n\n/**\n * @title Standard ERC20 token\n *\n * @dev Implementation of the basic standard token.\n * @dev https://github.com/ethereum/EIPs/issues/20\n * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol\n */\ncontract StandardToken is ERC20, BasicToken {\n\n mapping (address => mapping (address => uint256)) internal allowed;\n\n\n /**\n * @dev Transfer tokens from one address to another\n * @param _from address The address which you want to send tokens from\n * @param _to address The address which you want to transfer to\n * @param _value uint256 the amount of tokens to be transferred\n */\n function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[_from]);\n require(_value <= allowed[_from][msg.sender]);\n\n balances[_from] = balances[_from].sub(_value);\n balances[_to] = balances[_to].add(_value);\n allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);\n Transfer(_from, _to, _value);\n return true;\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n *\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param _spender The address which will spend the funds.\n * @param _value The amount of tokens to be spent.\n */\n function approve(address _spender, uint256 _value) public returns (bool) {\n allowed[msg.sender][_spender] = _value;\n Approval(msg.sender, _spender, _value);\n return true;\n }\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param _owner address The address which owns the funds.\n * @param _spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address _owner, address _spender) public view returns (uint256) {\n return allowed[_owner][_spender];\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(address _spender, uint _addedValue) public returns (bool) {\n allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {\n uint oldValue = allowed[msg.sender][_spender];\n if (_subtractedValue > oldValue) {\n allowed[msg.sender][_spender] = 0;\n } else {\n allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);\n }\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\ncontract Recoverable is Ownable {\n\n /// @dev Empty constructor (for now)\n function Recoverable() {\n }\n\n /// @dev This will be invoked by the owner, when owner wants to rescue tokens\n /// @param token Token which will we rescue to the owner from the contract\n function recoverTokens(ERC20Basic token) onlyOwner public {\n token.transfer(owner, tokensToBeReturned(token));\n }\n\n /// @dev Interface function, can be overwritten by the superclass\n /// @param token Token which balance we will check and return\n /// @return The amount of tokens (in smallest denominator) the contract owns\n function tokensToBeReturned(ERC20Basic token) public returns (uint) {\n return token.balanceOf(this);\n }\n}\n\n\n\n/**\n * Standard EIP-20 token with an interface marker.\n *\n * @notice Interface marker is used by crowdsale contracts to validate that addresses point a good token contract.\n *\n */\ncontract StandardTokenExt is StandardToken, Recoverable {\n\n /* Interface declaration */\n function isToken() public constant returns (bool weAre) {\n return true;\n }\n}\n\n\n\n\n/**\n * A token that can increase its supply by another contract.\n *\n * This allows uncapped crowdsale by dynamically increasing the supply when money pours in.\n * Only mint agents, contracts whitelisted by owner, can mint new tokens.\n *\n */\ncontract MintableToken is StandardTokenExt {\n\n using SafeMathLib for uint;\n\n bool public mintingFinished = false;\n\n /** List of agents that are allowed to create new tokens */\n mapping (address => bool) public mintAgents;\n\n event MintingAgentChanged(address addr, bool state);\n event Minted(address receiver, uint amount);\n\n /**\n * Create new tokens and allocate them to an address..\n *\n * Only callably by a crowdsale contract (mint agent).\n */\n function mint(address receiver, uint amount) onlyMintAgent canMint public {\n totalSupply_ = totalSupply_.plus(amount);\n balances[receiver] = balances[receiver].plus(amount);\n\n // This will make the mint transaction apper in EtherScan.io\n // We can remove this after there is a standardized minting event\n Transfer(0, receiver, amount);\n }\n\n /**\n * Owner can allow a crowdsale contract to mint new tokens.\n */\n function setMintAgent(address addr, bool state) onlyOwner canMint public {\n mintAgents[addr] = state;\n MintingAgentChanged(addr, state);\n }\n\n modifier onlyMintAgent() {\n // Only crowdsale contracts are allowed to mint new tokens\n if(!mintAgents[msg.sender]) {\n throw;\n }\n _;\n }\n\n /** Make sure we are not done yet. */\n modifier canMint() {\n if(mintingFinished) throw;\n _;\n }\n}\n\n\n/**\n * ICO crowdsale contract that is capped by amout of tokens.\n *\n * - Tokens are dynamically created during the crowdsale\n *\n *\n */\ncontract MintedTokenCappedCrowdsale is Crowdsale {\n\n /* Maximum amount of tokens this crowdsale can sell. */\n uint public maximumSellableTokens;\n\n function MintedTokenCappedCrowdsale(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal, uint _maximumSellableTokens) Crowdsale(_token, _pricingStrategy, _multisigWallet, _start, _end, _minimumFundingGoal) {\n maximumSellableTokens = _maximumSellableTokens;\n }\n\n /**\n * Called from invest() to confirm if the curret investment does not break our cap rule.\n */\n function isBreakingCap(uint weiAmount, uint tokenAmount, uint weiRaisedTotal, uint tokensSoldTotal) constant returns (bool limitBroken) {\n return tokensSoldTotal > maximumSellableTokens;\n }\n\n function isCrowdsaleFull() public constant returns (bool) {\n return tokensSold >= maximumSellableTokens;\n }\n\n /**\n * Dynamically create tokens and assign them to the investor.\n */\n function assignTokens(address receiver, uint tokenAmount) internal {\n MintableToken mintableToken = MintableToken(token);\n mintableToken.mint(receiver, tokenAmount);\n }\n}\n"}, "MockERC677Receiver": {"abi": [{"constant": false, "inputs": [{"name": "from", "type": "address"}, {"name": "amount", "type": "uint256"}, {"name": "data", "type": "bytes"}], "name": "tokenFallback", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}], "bytecode": "0x608060405234801561001057600080fd5b5060ff8061001f6000396000f300608060405260043610603e5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663c0ee0b8a81146043575b600080fd5b348015604e57600080fd5b50604080516020600460443581810135601f810184900484028501840190955284845260b694823573ffffffffffffffffffffffffffffffffffffffff1694602480359536959460649492019190819084018382808284375094975060ca9650505050505050565b604080519115158252519081900360200190f35b600193925050505600a165627a7a72305820e7504563cb1d33d5caf8010eab70daabdd447ebf68da6ba0fdb2ebce779942b90029", "bytecode_runtime": "0x608060405260043610603e5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663c0ee0b8a81146043575b600080fd5b348015604e57600080fd5b50604080516020600460443581810135601f810184900484028501840190955284845260b694823573ffffffffffffffffffffffffffffffffffffffff1694602480359536959460649492019190819084018382808284375094975060ca9650505050505050565b604080519115158252519081900360200190f35b600193925050505600a165627a7a72305820e7504563cb1d33d5caf8010eab70daabdd447ebf68da6ba0fdb2ebce779942b90029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": false, "inputs": [{"name": "from", "type": "address"}, {"name": "amount", "type": "uint256"}, {"name": "data", "type": "bytes"}], "name": "tokenFallback", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}], "devdoc": {"methods": {}}, "userdoc": {"methods": {}}}, "settings": {"compilationTarget": {"contracts/security-token/tests/MockERC677Receiver.sol": "MockERC677Receiver"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/security-token/ERC677.sol": {"keccak256": "0xf557f3e12aa7f5a23d40957d9ac216db0902997f70f856697529d55e9823e50a", "urls": ["bzzr://c924011b4a57d2eb355c276255fc7af284c2f5b20ece36957d23a2e058975349"]}, "contracts/security-token/tests/MockERC677Receiver.sol": {"keccak256": "0x38977c866a0cb676bc003c55190829ad22d5db882a6b68817ffcd2b1a383287a", "urls": ["bzzr://8b65b37486b417370e4099a9a6facae9fce14ebe7e9896884c7a10c6b3d67b23"]}}, "version": 1}, "name": "MockERC677Receiver", "ordered_full_dependencies": [], "source_path": "contracts/security-token/tests/MockERC677Receiver.sol", "source": "\n\ninterface ERC677Receiver {\n function tokenFallback(address from, uint256 amount, bytes data) returns (bool success);\n}\n\ninterface ERC677 {\n\n // TODO: Have a different event name to make sure that tools with bad APIs do not mix this with ERC-20 Transfer() event that lacks data parameter\n event ERC677Transfer(address from, address receiver, uint256 amount, bytes data);\n\n function transferAndCall(ERC677Receiver receiver, uint amount, bytes data) returns (bool success);\n}\n\n\ncontract MockERC677Receiver is ERC677Receiver {\n function tokenFallback(address from, uint256 amount, bytes data) returns (bool success) {\n return true;\n }\n}\n"}, "MockSecurityTransferAgent": {"abi": [{"constant": false, "inputs": [], "name": "freeze", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "from", "type": "address"}, {"name": "to", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "verify", "outputs": [{"name": "newValue", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}], "bytecode": "0x60806040526000805460ff1916905534801561001a57600080fd5b5060fc806100296000396000f30060806040526004361060485763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166362a5af3b8114604d578063ad076994146061575b600080fd5b348015605857600080fd5b50605f60a7565b005b348015606c57600080fd5b50609573ffffffffffffffffffffffffffffffffffffffff6004358116906024351660443560b6565b60408051918252519081900360200190f35b6000805460ff19166001179055565b6000805460ff161560c657600080fd5b50600193925050505600a165627a7a72305820e875dd1071e4549e8e88eb1664bb48e1f4d05d55d6a2a502b063160acb6bb9e50029", "bytecode_runtime": "0x60806040526004361060485763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166362a5af3b8114604d578063ad076994146061575b600080fd5b348015605857600080fd5b50605f60a7565b005b348015606c57600080fd5b50609573ffffffffffffffffffffffffffffffffffffffff6004358116906024351660443560b6565b60408051918252519081900360200190f35b6000805460ff19166001179055565b6000805460ff161560c657600080fd5b50600193925050505600a165627a7a72305820e875dd1071e4549e8e88eb1664bb48e1f4d05d55d6a2a502b063160acb6bb9e50029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": false, "inputs": [], "name": "freeze", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "from", "type": "address"}, {"name": "to", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "verify", "outputs": [{"name": "newValue", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}], "devdoc": {"methods": {}}, "userdoc": {"methods": {}}}, "settings": {"compilationTarget": {"contracts/security-token/tests/MockSecurityTransferAgent.sol": "MockSecurityTransferAgent"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/security-token/SecurityTransferAgent.sol": {"keccak256": "0x23b8a61926435e2c583480c0de72a99b4f7ec8a4213ffc46711f83ecdeaf9186", "urls": ["bzzr://36be13b6cf1389357679705bd18969409ecde684ace2d9c5b606d8986e0231cd"]}, "contracts/security-token/tests/MockSecurityTransferAgent.sol": {"keccak256": "0x1abe78fa663146a6c9ed66d95078af2d30328e22709b0e797f2fefe92fc6aaf9", "urls": ["bzzr://3514ec4f8efdd702e8fdc8704964802fd9f7d19e2148d3c9de61fce013be7da1"]}}, "version": 1}, "name": "MockSecurityTransferAgent", "ordered_full_dependencies": [], "source_path": "contracts/security-token/tests/MockSecurityTransferAgent.sol", "source": " pragma solidity ^0.4.18;\n\n\ninterface SecurityTransferAgent {\n function verify(address from, address to, uint256 value) public view returns (uint256 newValue);\n}\n\n\ncontract MockSecurityTransferAgent is SecurityTransferAgent {\n bool frozen = false;\n\n function MockSecurityTransferAgent() {\n // This is here for our verification code only\n }\n\n function freeze() public {\n frozen = true;\n }\n\n function verify(address from, address to, uint256 value) public view returns (uint256 newValue) {\n require(frozen == false);\n\n return 1;\n }\n}\n"}, "MultiSigWallet": {"abi": [{"constant": true, "inputs": [{"name": "", "type": "uint256"}], "name": "owners", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "owner", "type": "address"}], "name": "removeOwner", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "transactionId", "type": "uint256"}], "name": "revokeConfirmation", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "isOwner", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "uint256"}, {"name": "", "type": "address"}], "name": "confirmations", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "pending", "type": "bool"}, {"name": "executed", "type": "bool"}], "name": "getTransactionCount", "outputs": [{"name": "count", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "owner", "type": "address"}], "name": "addOwner", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "transactionId", "type": "uint256"}], "name": "isConfirmed", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "transactionId", "type": "uint256"}], "name": "getConfirmationCount", "outputs": [{"name": "count", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "uint256"}], "name": "transactions", "outputs": [{"name": "destination", "type": "address"}, {"name": "value", "type": "uint256"}, {"name": "data", "type": "bytes"}, {"name": "executed", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getOwners", "outputs": [{"name": "", "type": "address[]"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "from", "type": "uint256"}, {"name": "to", "type": "uint256"}, {"name": "pending", "type": "bool"}, {"name": "executed", "type": "bool"}], "name": "getTransactionIds", "outputs": [{"name": "_transactionIds", "type": "uint256[]"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "transactionId", "type": "uint256"}], "name": "getConfirmations", "outputs": [{"name": "_confirmations", "type": "address[]"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "transactionCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_required", "type": "uint256"}], "name": "changeRequirement", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "transactionId", "type": "uint256"}], "name": "confirmTransaction", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "destination", "type": "address"}, {"name": "value", "type": "uint256"}, {"name": "data", "type": "bytes"}], "name": "submitTransaction", "outputs": [{"name": "transactionId", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "MAX_OWNER_COUNT", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "required", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "owner", "type": "address"}, {"name": "newOwner", "type": "address"}], "name": "replaceOwner", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "transactionId", "type": "uint256"}], "name": "executeTransaction", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [{"name": "_owners", "type": "address[]"}, {"name": "_required", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"payable": true, "stateMutability": "payable", "type": "fallback"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "sender", "type": "address"}, {"indexed": true, "name": "transactionId", "type": "uint256"}], "name": "Confirmation", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "sender", "type": "address"}, {"indexed": true, "name": "transactionId", "type": "uint256"}], "name": "Revocation", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "transactionId", "type": "uint256"}], "name": "Submission", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "transactionId", "type": "uint256"}], "name": "Execution", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "transactionId", "type": "uint256"}], "name": "ExecutionFailure", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "sender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Deposit", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}], "name": "OwnerAddition", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}], "name": "OwnerRemoval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "required", "type": "uint256"}], "name": "RequirementChange", "type": "event"}], "bytecode": "0x60806040523480156200001157600080fd5b5060405162001631380380620016318339810160405280516020820151910180519091906000908260328211806200004857508181115b8062000052575080155b806200005c575081155b156200006757600080fd5b600092505b84518310156200013b576002600086858151811015156200008957fe5b6020908102909101810151600160a060020a031682528101919091526040016000205460ff1680620000dc57508483815181101515620000c557fe5b90602001906020020151600160a060020a03166000145b15620000e757600080fd5b6001600260008786815181101515620000fc57fe5b602090810291909101810151600160a060020a03168252810191909152604001600020805460ff1916911515919091179055600192909201916200006c565b84516200015090600390602088019062000162565b50505060049190915550620001f69050565b828054828255906000526020600020908101928215620001ba579160200282015b82811115620001ba5782518254600160a060020a031916600160a060020a0390911617825560209092019160019091019062000183565b50620001c8929150620001cc565b5090565b620001f391905b80821115620001c8578054600160a060020a0319168155600101620001d3565b90565b61142b80620002066000396000f30060806040526004361061011c5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663025e7c27811461015e578063173825d91461019257806320ea8d86146101b35780632f54bf6e146101cb5780633411c81c1461020057806354741525146102245780637065cb4814610255578063784547a7146102765780638b51d13f1461028e5780639ace38c2146102a6578063a0e67e2b14610361578063a8abe69a146103c6578063b5dc40c3146103eb578063b77bf60014610403578063ba51a6df14610418578063c01a8c8414610430578063c642747414610448578063d74f8edd146104b1578063dc8452cd146104c6578063e20056e6146104db578063ee22610b14610502575b600034111561015c5760408051348152905133917fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c919081900360200190a25b005b34801561016a57600080fd5b5061017660043561051a565b60408051600160a060020a039092168252519081900360200190f35b34801561019e57600080fd5b5061015c600160a060020a0360043516610542565b3480156101bf57600080fd5b5061015c6004356106b9565b3480156101d757600080fd5b506101ec600160a060020a0360043516610773565b604080519115158252519081900360200190f35b34801561020c57600080fd5b506101ec600435600160a060020a0360243516610788565b34801561023057600080fd5b50610243600435151560243515156107a8565b60408051918252519081900360200190f35b34801561026157600080fd5b5061015c600160a060020a0360043516610814565b34801561028257600080fd5b506101ec600435610931565b34801561029a57600080fd5b506102436004356109b5565b3480156102b257600080fd5b506102be600435610a24565b6040518085600160a060020a0316600160a060020a031681526020018481526020018060200183151515158152602001828103825284818151815260200191508051906020019080838360005b8381101561032357818101518382015260200161030b565b50505050905090810190601f1680156103505780820380516001836020036101000a031916815260200191505b509550505050505060405180910390f35b34801561036d57600080fd5b50610376610ae2565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156103b257818101518382015260200161039a565b505050509050019250505060405180910390f35b3480156103d257600080fd5b5061037660043560243560443515156064351515610b45565b3480156103f757600080fd5b50610376600435610c7e565b34801561040f57600080fd5b50610243610df7565b34801561042457600080fd5b5061015c600435610dfd565b34801561043c57600080fd5b5061015c600435610e74565b34801561045457600080fd5b50604080516020600460443581810135601f8101849004840285018401909552848452610243948235600160a060020a0316946024803595369594606494920191908190840183828082843750949750610f3f9650505050505050565b3480156104bd57600080fd5b50610243610f5e565b3480156104d257600080fd5b50610243610f63565b3480156104e757600080fd5b5061015c600160a060020a0360043581169060243516610f69565b34801561050e57600080fd5b5061015c6004356110f3565b600380548290811061052857fe5b600091825260209091200154600160a060020a0316905081565b600033301461055057600080fd5b600160a060020a038216600090815260026020526040902054829060ff16151561057957600080fd5b600160a060020a0383166000908152600260205260408120805460ff1916905591505b600354600019018210156106545782600160a060020a03166003838154811015156105c357fe5b600091825260209091200154600160a060020a03161415610649576003805460001981019081106105f057fe5b60009182526020909120015460038054600160a060020a03909216918490811061061657fe5b9060005260206000200160006101000a815481600160a060020a030219169083600160a060020a03160217905550610654565b60019091019061059c565b6003805460001901906106679082611343565b5060035460045411156106805760035461068090610dfd565b604051600160a060020a038416907f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9090600090a2505050565b3360008181526002602052604090205460ff1615156106d757600080fd5b60008281526001602090815260408083203380855292529091205483919060ff16151561070357600080fd5b600084815260208190526040902060030154849060ff161561072457600080fd5b6000858152600160209081526040808320338085529252808320805460ff191690555187927ff6a317157440607f36269043eb55f1287a5a19ba2216afeab88cd46cbcfb88e991a35050505050565b60026020526000908152604090205460ff1681565b600160209081526000928352604080842090915290825290205460ff1681565b6000805b60055481101561080d578380156107d5575060008181526020819052604090206003015460ff16155b806107f957508280156107f9575060008181526020819052604090206003015460ff165b15610805576001820191505b6001016107ac565b5092915050565b33301461082057600080fd5b600160a060020a038116600090815260026020526040902054819060ff161561084857600080fd5b81600160a060020a038116151561085e57600080fd5b600380549050600101600454603282118061087857508181115b80610881575080155b8061088a575081155b1561089457600080fd5b600160a060020a038516600081815260026020526040808220805460ff1916600190811790915560038054918201815583527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01805473ffffffffffffffffffffffffffffffffffffffff191684179055517ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d9190a25050505050565b600080805b6003548110156109ae576000848152600160205260408120600380549192918490811061095f57fe5b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610993576001820191505b6004548214156109a657600192506109ae565b600101610936565b5050919050565b6000805b600354811015610a1e57600083815260016020526040812060038054919291849081106109e257fe5b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610a16576001820191505b6001016109b9565b50919050565b6000602081815291815260409081902080546001808301546002808501805487516101009582161595909502600019011691909104601f8101889004880284018801909652858352600160a060020a0390931695909491929190830182828015610acf5780601f10610aa457610100808354040283529160200191610acf565b820191906000526020600020905b815481529060010190602001808311610ab257829003601f168201915b5050506003909301549192505060ff1684565b60606003805480602002602001604051908101604052809291908181526020018280548015610b3a57602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311610b1c575b505050505090505b90565b606080600080600554604051908082528060200260200182016040528015610b77578160200160208202803883390190505b50925060009150600090505b600554811015610bfe57858015610bac575060008181526020819052604090206003015460ff16155b80610bd05750848015610bd0575060008181526020819052604090206003015460ff165b15610bf657808383815181101515610be457fe5b60209081029091010152600191909101905b600101610b83565b878703604051908082528060200260200182016040528015610c2a578160200160208202803883390190505b5093508790505b86811015610c73578281815181101515610c4757fe5b9060200190602002015184898303815181101515610c6157fe5b60209081029091010152600101610c31565b505050949350505050565b606080600080600380549050604051908082528060200260200182016040528015610cb3578160200160208202803883390190505b50925060009150600090505b600354811015610d705760008581526001602052604081206003805491929184908110610ce857fe5b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610d68576003805482908110610d2357fe5b6000918252602090912001548351600160a060020a0390911690849084908110610d4957fe5b600160a060020a03909216602092830290910190910152600191909101905b600101610cbf565b81604051908082528060200260200182016040528015610d9a578160200160208202803883390190505b509350600090505b81811015610def578281815181101515610db857fe5b906020019060200201518482815181101515610dd057fe5b600160a060020a03909216602092830290910190910152600101610da2565b505050919050565b60055481565b333014610e0957600080fd5b600354816032821180610e1b57508181115b80610e24575080155b80610e2d575081155b15610e3757600080fd5b60048390556040805184815290517fa3f1ee9126a074d9326c682f561767f710e927faa811f7a99829d49dc421797a9181900360200190a1505050565b3360008181526002602052604090205460ff161515610e9257600080fd5b6000828152602081905260409020548290600160a060020a03161515610eb757600080fd5b60008381526001602090815260408083203380855292529091205484919060ff1615610ee257600080fd5b6000858152600160208181526040808420338086529252808420805460ff1916909317909255905187927f4a504a94899432a9846e1aa406dceb1bcfd538bb839071d49d1e5e23f5be30ef91a3610f38856110f3565b5050505050565b6000610f4c848484611253565b9050610f5781610e74565b9392505050565b603281565b60045481565b6000333014610f7757600080fd5b600160a060020a038316600090815260026020526040902054839060ff161515610fa057600080fd5b600160a060020a038316600090815260026020526040902054839060ff1615610fc857600080fd5b600092505b6003548310156110595784600160a060020a0316600384815481101515610ff057fe5b600091825260209091200154600160a060020a0316141561104e578360038481548110151561101b57fe5b9060005260206000200160006101000a815481600160a060020a030219169083600160a060020a03160217905550611059565b600190920191610fcd565b600160a060020a03808616600081815260026020526040808220805460ff1990811690915593881682528082208054909416600117909355915190917f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9091a2604051600160a060020a038516907ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d90600090a25050505050565b600081815260208190526040812060030154829060ff161561111457600080fd5b61111d83610931565b1561124e576000838152602081905260409081902060038101805460ff19166001908117909155815481830154935160028085018054959850600160a060020a03909316959492939192839285926000199183161561010002919091019091160480156111cb5780601f106111a0576101008083540402835291602001916111cb565b820191906000526020600020905b8154815290600101906020018083116111ae57829003601f168201915b505091505060006040518083038185875af192505050156112165760405183907f33e13ecb54c3076d8e8bb8c2881800a4d972b792045ffae98fdf46df365fed7590600090a261124e565b60405183907f526441bb6c1aba3c9a4a6ca1d6545da9c2333c8c48343ef398eb858d72b7923690600090a260038201805460ff191690555b505050565b600083600160a060020a038116151561126b57600080fd5b60055460408051608081018252600160a060020a0388811682526020808301898152838501898152600060608601819052878152808452959095208451815473ffffffffffffffffffffffffffffffffffffffff1916941693909317835551600183015592518051949650919390926112eb926002850192910190611367565b50606091909101516003909101805460ff191691151591909117905560058054600101905560405182907fc0ba8fe4b176c1714197d43b9cc6bcf797a4a7461c5fe8d0ef6e184ae7601e5190600090a2509392505050565b81548183558181111561124e5760008381526020902061124e9181019083016113e5565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106113a857805160ff19168380011785556113d5565b828001600101855582156113d5579182015b828111156113d55782518255916020019190600101906113ba565b506113e19291506113e5565b5090565b610b4291905b808211156113e157600081556001016113eb5600a165627a7a7230582039c1a07f2a2067d6c26254a72669acee8a559ff9f03a8df051532a0a1c3c6af50029", "bytecode_runtime": "0x60806040526004361061011c5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663025e7c27811461015e578063173825d91461019257806320ea8d86146101b35780632f54bf6e146101cb5780633411c81c1461020057806354741525146102245780637065cb4814610255578063784547a7146102765780638b51d13f1461028e5780639ace38c2146102a6578063a0e67e2b14610361578063a8abe69a146103c6578063b5dc40c3146103eb578063b77bf60014610403578063ba51a6df14610418578063c01a8c8414610430578063c642747414610448578063d74f8edd146104b1578063dc8452cd146104c6578063e20056e6146104db578063ee22610b14610502575b600034111561015c5760408051348152905133917fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c919081900360200190a25b005b34801561016a57600080fd5b5061017660043561051a565b60408051600160a060020a039092168252519081900360200190f35b34801561019e57600080fd5b5061015c600160a060020a0360043516610542565b3480156101bf57600080fd5b5061015c6004356106b9565b3480156101d757600080fd5b506101ec600160a060020a0360043516610773565b604080519115158252519081900360200190f35b34801561020c57600080fd5b506101ec600435600160a060020a0360243516610788565b34801561023057600080fd5b50610243600435151560243515156107a8565b60408051918252519081900360200190f35b34801561026157600080fd5b5061015c600160a060020a0360043516610814565b34801561028257600080fd5b506101ec600435610931565b34801561029a57600080fd5b506102436004356109b5565b3480156102b257600080fd5b506102be600435610a24565b6040518085600160a060020a0316600160a060020a031681526020018481526020018060200183151515158152602001828103825284818151815260200191508051906020019080838360005b8381101561032357818101518382015260200161030b565b50505050905090810190601f1680156103505780820380516001836020036101000a031916815260200191505b509550505050505060405180910390f35b34801561036d57600080fd5b50610376610ae2565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156103b257818101518382015260200161039a565b505050509050019250505060405180910390f35b3480156103d257600080fd5b5061037660043560243560443515156064351515610b45565b3480156103f757600080fd5b50610376600435610c7e565b34801561040f57600080fd5b50610243610df7565b34801561042457600080fd5b5061015c600435610dfd565b34801561043c57600080fd5b5061015c600435610e74565b34801561045457600080fd5b50604080516020600460443581810135601f8101849004840285018401909552848452610243948235600160a060020a0316946024803595369594606494920191908190840183828082843750949750610f3f9650505050505050565b3480156104bd57600080fd5b50610243610f5e565b3480156104d257600080fd5b50610243610f63565b3480156104e757600080fd5b5061015c600160a060020a0360043581169060243516610f69565b34801561050e57600080fd5b5061015c6004356110f3565b600380548290811061052857fe5b600091825260209091200154600160a060020a0316905081565b600033301461055057600080fd5b600160a060020a038216600090815260026020526040902054829060ff16151561057957600080fd5b600160a060020a0383166000908152600260205260408120805460ff1916905591505b600354600019018210156106545782600160a060020a03166003838154811015156105c357fe5b600091825260209091200154600160a060020a03161415610649576003805460001981019081106105f057fe5b60009182526020909120015460038054600160a060020a03909216918490811061061657fe5b9060005260206000200160006101000a815481600160a060020a030219169083600160a060020a03160217905550610654565b60019091019061059c565b6003805460001901906106679082611343565b5060035460045411156106805760035461068090610dfd565b604051600160a060020a038416907f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9090600090a2505050565b3360008181526002602052604090205460ff1615156106d757600080fd5b60008281526001602090815260408083203380855292529091205483919060ff16151561070357600080fd5b600084815260208190526040902060030154849060ff161561072457600080fd5b6000858152600160209081526040808320338085529252808320805460ff191690555187927ff6a317157440607f36269043eb55f1287a5a19ba2216afeab88cd46cbcfb88e991a35050505050565b60026020526000908152604090205460ff1681565b600160209081526000928352604080842090915290825290205460ff1681565b6000805b60055481101561080d578380156107d5575060008181526020819052604090206003015460ff16155b806107f957508280156107f9575060008181526020819052604090206003015460ff165b15610805576001820191505b6001016107ac565b5092915050565b33301461082057600080fd5b600160a060020a038116600090815260026020526040902054819060ff161561084857600080fd5b81600160a060020a038116151561085e57600080fd5b600380549050600101600454603282118061087857508181115b80610881575080155b8061088a575081155b1561089457600080fd5b600160a060020a038516600081815260026020526040808220805460ff1916600190811790915560038054918201815583527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01805473ffffffffffffffffffffffffffffffffffffffff191684179055517ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d9190a25050505050565b600080805b6003548110156109ae576000848152600160205260408120600380549192918490811061095f57fe5b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610993576001820191505b6004548214156109a657600192506109ae565b600101610936565b5050919050565b6000805b600354811015610a1e57600083815260016020526040812060038054919291849081106109e257fe5b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610a16576001820191505b6001016109b9565b50919050565b6000602081815291815260409081902080546001808301546002808501805487516101009582161595909502600019011691909104601f8101889004880284018801909652858352600160a060020a0390931695909491929190830182828015610acf5780601f10610aa457610100808354040283529160200191610acf565b820191906000526020600020905b815481529060010190602001808311610ab257829003601f168201915b5050506003909301549192505060ff1684565b60606003805480602002602001604051908101604052809291908181526020018280548015610b3a57602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311610b1c575b505050505090505b90565b606080600080600554604051908082528060200260200182016040528015610b77578160200160208202803883390190505b50925060009150600090505b600554811015610bfe57858015610bac575060008181526020819052604090206003015460ff16155b80610bd05750848015610bd0575060008181526020819052604090206003015460ff165b15610bf657808383815181101515610be457fe5b60209081029091010152600191909101905b600101610b83565b878703604051908082528060200260200182016040528015610c2a578160200160208202803883390190505b5093508790505b86811015610c73578281815181101515610c4757fe5b9060200190602002015184898303815181101515610c6157fe5b60209081029091010152600101610c31565b505050949350505050565b606080600080600380549050604051908082528060200260200182016040528015610cb3578160200160208202803883390190505b50925060009150600090505b600354811015610d705760008581526001602052604081206003805491929184908110610ce857fe5b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610d68576003805482908110610d2357fe5b6000918252602090912001548351600160a060020a0390911690849084908110610d4957fe5b600160a060020a03909216602092830290910190910152600191909101905b600101610cbf565b81604051908082528060200260200182016040528015610d9a578160200160208202803883390190505b509350600090505b81811015610def578281815181101515610db857fe5b906020019060200201518482815181101515610dd057fe5b600160a060020a03909216602092830290910190910152600101610da2565b505050919050565b60055481565b333014610e0957600080fd5b600354816032821180610e1b57508181115b80610e24575080155b80610e2d575081155b15610e3757600080fd5b60048390556040805184815290517fa3f1ee9126a074d9326c682f561767f710e927faa811f7a99829d49dc421797a9181900360200190a1505050565b3360008181526002602052604090205460ff161515610e9257600080fd5b6000828152602081905260409020548290600160a060020a03161515610eb757600080fd5b60008381526001602090815260408083203380855292529091205484919060ff1615610ee257600080fd5b6000858152600160208181526040808420338086529252808420805460ff1916909317909255905187927f4a504a94899432a9846e1aa406dceb1bcfd538bb839071d49d1e5e23f5be30ef91a3610f38856110f3565b5050505050565b6000610f4c848484611253565b9050610f5781610e74565b9392505050565b603281565b60045481565b6000333014610f7757600080fd5b600160a060020a038316600090815260026020526040902054839060ff161515610fa057600080fd5b600160a060020a038316600090815260026020526040902054839060ff1615610fc857600080fd5b600092505b6003548310156110595784600160a060020a0316600384815481101515610ff057fe5b600091825260209091200154600160a060020a0316141561104e578360038481548110151561101b57fe5b9060005260206000200160006101000a815481600160a060020a030219169083600160a060020a03160217905550611059565b600190920191610fcd565b600160a060020a03808616600081815260026020526040808220805460ff1990811690915593881682528082208054909416600117909355915190917f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9091a2604051600160a060020a038516907ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d90600090a25050505050565b600081815260208190526040812060030154829060ff161561111457600080fd5b61111d83610931565b1561124e576000838152602081905260409081902060038101805460ff19166001908117909155815481830154935160028085018054959850600160a060020a03909316959492939192839285926000199183161561010002919091019091160480156111cb5780601f106111a0576101008083540402835291602001916111cb565b820191906000526020600020905b8154815290600101906020018083116111ae57829003601f168201915b505091505060006040518083038185875af192505050156112165760405183907f33e13ecb54c3076d8e8bb8c2881800a4d972b792045ffae98fdf46df365fed7590600090a261124e565b60405183907f526441bb6c1aba3c9a4a6ca1d6545da9c2333c8c48343ef398eb858d72b7923690600090a260038201805460ff191690555b505050565b600083600160a060020a038116151561126b57600080fd5b60055460408051608081018252600160a060020a0388811682526020808301898152838501898152600060608601819052878152808452959095208451815473ffffffffffffffffffffffffffffffffffffffff1916941693909317835551600183015592518051949650919390926112eb926002850192910190611367565b50606091909101516003909101805460ff191691151591909117905560058054600101905560405182907fc0ba8fe4b176c1714197d43b9cc6bcf797a4a7461c5fe8d0ef6e184ae7601e5190600090a2509392505050565b81548183558181111561124e5760008381526020902061124e9181019083016113e5565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106113a857805160ff19168380011785556113d5565b828001600101855582156113d5579182015b828111156113d55782518255916020019190600101906113ba565b506113e19291506113e5565b5090565b610b4291905b808211156113e157600081556001016113eb5600a165627a7a7230582039c1a07f2a2067d6c26254a72669acee8a559ff9f03a8df051532a0a1c3c6af50029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": true, "inputs": [{"name": "", "type": "uint256"}], "name": "owners", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "owner", "type": "address"}], "name": "removeOwner", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "transactionId", "type": "uint256"}], "name": "revokeConfirmation", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "isOwner", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "uint256"}, {"name": "", "type": "address"}], "name": "confirmations", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "pending", "type": "bool"}, {"name": "executed", "type": "bool"}], "name": "getTransactionCount", "outputs": [{"name": "count", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "owner", "type": "address"}], "name": "addOwner", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "transactionId", "type": "uint256"}], "name": "isConfirmed", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "transactionId", "type": "uint256"}], "name": "getConfirmationCount", "outputs": [{"name": "count", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "uint256"}], "name": "transactions", "outputs": [{"name": "destination", "type": "address"}, {"name": "value", "type": "uint256"}, {"name": "data", "type": "bytes"}, {"name": "executed", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getOwners", "outputs": [{"name": "", "type": "address[]"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "from", "type": "uint256"}, {"name": "to", "type": "uint256"}, {"name": "pending", "type": "bool"}, {"name": "executed", "type": "bool"}], "name": "getTransactionIds", "outputs": [{"name": "_transactionIds", "type": "uint256[]"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "transactionId", "type": "uint256"}], "name": "getConfirmations", "outputs": [{"name": "_confirmations", "type": "address[]"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "transactionCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_required", "type": "uint256"}], "name": "changeRequirement", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "transactionId", "type": "uint256"}], "name": "confirmTransaction", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "destination", "type": "address"}, {"name": "value", "type": "uint256"}, {"name": "data", "type": "bytes"}], "name": "submitTransaction", "outputs": [{"name": "transactionId", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "MAX_OWNER_COUNT", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "required", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "owner", "type": "address"}, {"name": "newOwner", "type": "address"}], "name": "replaceOwner", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "transactionId", "type": "uint256"}], "name": "executeTransaction", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [{"name": "_owners", "type": "address[]"}, {"name": "_required", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"payable": true, "stateMutability": "payable", "type": "fallback"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "sender", "type": "address"}, {"indexed": true, "name": "transactionId", "type": "uint256"}], "name": "Confirmation", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "sender", "type": "address"}, {"indexed": true, "name": "transactionId", "type": "uint256"}], "name": "Revocation", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "transactionId", "type": "uint256"}], "name": "Submission", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "transactionId", "type": "uint256"}], "name": "Execution", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "transactionId", "type": "uint256"}], "name": "ExecutionFailure", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "sender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Deposit", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}], "name": "OwnerAddition", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}], "name": "OwnerRemoval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "required", "type": "uint256"}], "name": "RequirementChange", "type": "event"}], "devdoc": {"author": "Stefan George - ", "methods": {"addOwner(address)": {"details": "Allows to add a new owner. Transaction has to be sent by wallet.", "params": {"owner": "Address of new owner."}}, "changeRequirement(uint256)": {"details": "Allows to change the number of required confirmations. Transaction has to be sent by wallet.", "params": {"_required": "Number of required confirmations."}}, "confirmTransaction(uint256)": {"details": "Allows an owner to confirm a transaction.", "params": {"transactionId": "Transaction ID."}}, "executeTransaction(uint256)": {"details": "Allows anyone to execute a confirmed transaction.", "params": {"transactionId": "Transaction ID."}}, "getConfirmationCount(uint256)": {"details": "Returns number of confirmations of a transaction.", "params": {"transactionId": "Transaction ID."}, "return": "Number of confirmations."}, "getConfirmations(uint256)": {"details": "Returns array with owner addresses, which confirmed transaction.", "params": {"transactionId": "Transaction ID."}, "return": "Returns array of owner addresses."}, "getOwners()": {"details": "Returns list of owners.", "return": "List of owner addresses."}, "getTransactionCount(bool,bool)": {"details": "Returns total number of transactions after filers are applied.", "params": {"executed": "Include executed transactions.", "pending": "Include pending transactions."}, "return": "Total number of transactions after filters are applied."}, "getTransactionIds(uint256,uint256,bool,bool)": {"details": "Returns list of transaction IDs in defined range.", "params": {"executed": "Include executed transactions.", "from": "Index start position of transaction array.", "pending": "Include pending transactions.", "to": "Index end position of transaction array."}, "return": "Returns array of transaction IDs."}, "isConfirmed(uint256)": {"details": "Returns the confirmation status of a transaction.", "params": {"transactionId": "Transaction ID."}, "return": "Confirmation status."}, "removeOwner(address)": {"details": "Allows to remove an owner. Transaction has to be sent by wallet.", "params": {"owner": "Address of owner."}}, "replaceOwner(address,address)": {"details": "Allows to replace an owner with a new owner. Transaction has to be sent by wallet.", "params": {"owner": "Address of new owner."}}, "revokeConfirmation(uint256)": {"details": "Allows an owner to revoke a confirmation for a transaction.", "params": {"transactionId": "Transaction ID."}}, "submitTransaction(address,uint256,bytes)": {"details": "Allows an owner to submit and confirm a transaction.", "params": {"data": "Transaction data payload.", "destination": "Transaction target address.", "value": "Transaction ether value."}, "return": "Returns transaction ID."}}, "title": "Multisignature wallet - Allows multiple parties to agree on transactions before execution."}, "userdoc": {"methods": {}}}, "settings": {"compilationTarget": {"contracts/GnosisWallet.sol": "MultiSigWallet"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/GnosisWallet.sol": {"keccak256": "0x1b55f3015578d791361e10c43ff9ee240749bbeb87d2765542798d7ddcc61d11", "urls": ["bzzr://3eed486369c96bda6b7eba4442eed255ead1f5f024f33d1d66e920c65ba523d2"]}}, "version": 1}, "name": "MultiSigWallet", "ordered_full_dependencies": [], "source_path": "contracts/GnosisWallet.sol", "source": "/**\n * Originally from https://github.com/ConsenSys/MultiSigWallet\n */\n\n\n\n/// @title Multisignature wallet - Allows multiple parties to agree on transactions before execution.\n/// @author Stefan George - \ncontract MultiSigWallet {\n\n uint constant public MAX_OWNER_COUNT = 50;\n\n event Confirmation(address indexed sender, uint indexed transactionId);\n event Revocation(address indexed sender, uint indexed transactionId);\n event Submission(uint indexed transactionId);\n event Execution(uint indexed transactionId);\n event ExecutionFailure(uint indexed transactionId);\n event Deposit(address indexed sender, uint value);\n event OwnerAddition(address indexed owner);\n event OwnerRemoval(address indexed owner);\n event RequirementChange(uint required);\n\n mapping (uint => Transaction) public transactions;\n mapping (uint => mapping (address => bool)) public confirmations;\n mapping (address => bool) public isOwner;\n address[] public owners;\n uint public required;\n uint public transactionCount;\n\n struct Transaction {\n address destination;\n uint value;\n bytes data;\n bool executed;\n }\n\n modifier onlyWallet() {\n if (msg.sender != address(this))\n throw;\n _;\n }\n\n modifier ownerDoesNotExist(address owner) {\n if (isOwner[owner])\n throw;\n _;\n }\n\n modifier ownerExists(address owner) {\n if (!isOwner[owner])\n throw;\n _;\n }\n\n modifier transactionExists(uint transactionId) {\n if (transactions[transactionId].destination == 0)\n throw;\n _;\n }\n\n modifier confirmed(uint transactionId, address owner) {\n if (!confirmations[transactionId][owner])\n throw;\n _;\n }\n\n modifier notConfirmed(uint transactionId, address owner) {\n if (confirmations[transactionId][owner])\n throw;\n _;\n }\n\n modifier notExecuted(uint transactionId) {\n if (transactions[transactionId].executed)\n throw;\n _;\n }\n\n modifier notNull(address _address) {\n if (_address == 0)\n throw;\n _;\n }\n\n modifier validRequirement(uint ownerCount, uint _required) {\n if ( ownerCount > MAX_OWNER_COUNT\n || _required > ownerCount\n || _required == 0\n || ownerCount == 0)\n throw;\n _;\n }\n\n /// @dev Fallback function allows to deposit ether.\n function()\n payable\n {\n if (msg.value > 0)\n Deposit(msg.sender, msg.value);\n }\n\n /*\n * Public functions\n */\n /// @dev Contract constructor sets initial owners and required number of confirmations.\n /// @param _owners List of initial owners.\n /// @param _required Number of required confirmations.\n function MultiSigWallet(address[] _owners, uint _required)\n public\n validRequirement(_owners.length, _required)\n {\n for (uint i=0; i<_owners.length; i++) {\n if (isOwner[_owners[i]] || _owners[i] == 0)\n throw;\n isOwner[_owners[i]] = true;\n }\n owners = _owners;\n required = _required;\n }\n\n /// @dev Allows to add a new owner. Transaction has to be sent by wallet.\n /// @param owner Address of new owner.\n function addOwner(address owner)\n public\n onlyWallet\n ownerDoesNotExist(owner)\n notNull(owner)\n validRequirement(owners.length + 1, required)\n {\n isOwner[owner] = true;\n owners.push(owner);\n OwnerAddition(owner);\n }\n\n /// @dev Allows to remove an owner. Transaction has to be sent by wallet.\n /// @param owner Address of owner.\n function removeOwner(address owner)\n public\n onlyWallet\n ownerExists(owner)\n {\n isOwner[owner] = false;\n for (uint i=0; i owners.length)\n changeRequirement(owners.length);\n OwnerRemoval(owner);\n }\n\n /// @dev Allows to replace an owner with a new owner. Transaction has to be sent by wallet.\n /// @param owner Address of owner to be replaced.\n /// @param owner Address of new owner.\n function replaceOwner(address owner, address newOwner)\n public\n onlyWallet\n ownerExists(owner)\n ownerDoesNotExist(newOwner)\n {\n for (uint i=0; i=a);\n return c;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Interface for defining crowdsale pricing.\n */\ncontract PricingStrategy {\n\n /** Interface declaration. */\n function isPricingStrategy() public constant returns (bool) {\n return true;\n }\n\n /** Self check if all references are correctly set.\n *\n * Checks that pricing strategy matches crowdsale parameters.\n */\n function isSane(address crowdsale) public constant returns (bool) {\n return true;\n }\n\n /**\n * @dev Pricing tells if this is a presale purchase or not.\n @param purchaser Address of the purchaser\n @return False by default, true if a presale purchaser\n */\n function isPresalePurchase(address purchaser) public constant returns (bool) {\n return false;\n }\n\n /**\n * When somebody tries to buy tokens for X eth, calculate how many tokens they get.\n *\n *\n * @param value - What is the value of the transaction send in as wei\n * @param tokensSold - how much tokens have been sold this far\n * @param weiRaised - how much money has been raised this far in the main token sale - this number excludes presale\n * @param msgSender - who is the investor of this transaction\n * @param decimals - how many decimal units the token has\n * @return Amount of tokens the investor receives\n */\n function calculatePrice(uint value, uint weiRaised, uint tokensSold, address msgSender, uint decimals) public constant returns (uint tokenAmount);\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Finalize agent defines what happens at the end of succeseful crowdsale.\n *\n * - Allocate tokens for founders, bounties and community\n * - Make tokens transferable\n * - etc.\n */\ncontract FinalizeAgent {\n\n function isFinalizeAgent() public constant returns(bool) {\n return true;\n }\n\n /** Return true if we can run finalizeCrowdsale() properly.\n *\n * This is a safety check function that doesn't allow crowdsale to begin\n * unless the finalizer has been set up properly.\n */\n function isSane() public constant returns (bool);\n\n /** Called once by crowdsale finalize() if the sale was success. */\n function finalizeCrowdsale();\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n\n/**\n * A token that defines fractional units as decimals.\n */\ncontract FractionalERC20 is ERC20 {\n\n uint public decimals;\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n/*\n * Haltable\n *\n * Abstract contract that allows children to implement an\n * emergency stop mechanism. Differs from Pausable by causing a throw when in halt mode.\n *\n *\n * Originally envisioned in FirstBlood ICO contract.\n */\ncontract Haltable is Ownable {\n bool public halted;\n\n modifier stopInEmergency {\n if (halted) throw;\n _;\n }\n\n modifier stopNonOwnersInEmergency {\n if (halted && msg.sender != owner) throw;\n _;\n }\n\n modifier onlyInEmergency {\n if (!halted) throw;\n _;\n }\n\n // called by the owner on emergency, triggers stopped state\n function halt() external onlyOwner {\n halted = true;\n }\n\n // called by the owner on end of emergency, returns to normal state\n function unhalt() external onlyOwner onlyInEmergency {\n halted = false;\n }\n\n}\n\n\n\n\n\n\n\n/**\n * Crowdsale state machine without buy functionality.\n *\n * Implements basic state machine logic, but leaves out all buy functions,\n * so that subclasses can implement their own buying logic.\n *\n *\n * For the default buy() implementation see Crowdsale.sol.\n */\ncontract CrowdsaleBase is Haltable {\n\n /* Max investment count when we are still allowed to change the multisig address */\n uint public MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE = 5;\n\n using SafeMathLib for uint;\n\n /* The token we are selling */\n FractionalERC20 public token;\n\n /* How we are going to price our offering */\n PricingStrategy public pricingStrategy;\n\n /* Post-success callback */\n FinalizeAgent public finalizeAgent;\n\n /* tokens will be transfered from this address */\n address public multisigWallet;\n\n /* if the funding goal is not reached, investors may withdraw their funds */\n uint public minimumFundingGoal;\n\n /* the UNIX timestamp start date of the crowdsale */\n uint public startsAt;\n\n /* the UNIX timestamp end date of the crowdsale */\n uint public endsAt;\n\n /* the number of tokens already sold through this contract*/\n uint public tokensSold = 0;\n\n /* How many wei of funding we have raised */\n uint public weiRaised = 0;\n\n /* Calculate incoming funds from presale contracts and addresses */\n uint public presaleWeiRaised = 0;\n\n /* How many distinct addresses have invested */\n uint public investorCount = 0;\n\n /* How much wei we have returned back to the contract after a failed crowdfund. */\n uint public loadedRefund = 0;\n\n /* How much wei we have given back to investors.*/\n uint public weiRefunded = 0;\n\n /* Has this crowdsale been finalized */\n bool public finalized;\n\n /** How much ETH each address has invested to this crowdsale */\n mapping (address => uint256) public investedAmountOf;\n\n /** How much tokens this crowdsale has credited for each investor address */\n mapping (address => uint256) public tokenAmountOf;\n\n /** Addresses that are allowed to invest even before ICO offical opens. For testing, for ICO partners, etc. */\n mapping (address => bool) public earlyParticipantWhitelist;\n\n /** This is for manul testing for the interaction from owner wallet. You can set it to any value and inspect this in blockchain explorer to see that crowdsale interaction works. */\n uint public ownerTestValue;\n\n /** State machine\n *\n * - Preparing: All contract initialization calls and variables have not been set yet\n * - Prefunding: We have not passed start time yet\n * - Funding: Active crowdsale\n * - Success: Minimum funding goal reached\n * - Failure: Minimum funding goal not reached before ending time\n * - Finalized: The finalized has been called and succesfully executed\n * - Refunding: Refunds are loaded on the contract for reclaim.\n */\n enum State{Unknown, Preparing, PreFunding, Funding, Success, Failure, Finalized, Refunding}\n\n // A new investment was made\n event Invested(address investor, uint weiAmount, uint tokenAmount, uint128 customerId);\n\n // Refund was processed for a contributor\n event Refund(address investor, uint weiAmount);\n\n // The rules were changed what kind of investments we accept\n event InvestmentPolicyChanged(bool newRequireCustomerId, bool newRequiredSignedAddress, address newSignerAddress);\n\n // Address early participation whitelist status changed\n event Whitelisted(address addr, bool status);\n\n // Crowdsale end time has been changed\n event EndsAtChanged(uint newEndsAt);\n\n function CrowdsaleBase(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal) {\n\n owner = msg.sender;\n\n token = FractionalERC20(_token);\n setPricingStrategy(_pricingStrategy);\n\n multisigWallet = _multisigWallet;\n if(multisigWallet == 0) {\n throw;\n }\n\n if(_start == 0) {\n throw;\n }\n\n startsAt = _start;\n\n if(_end == 0) {\n throw;\n }\n\n endsAt = _end;\n\n // Don't mess the dates\n if(startsAt >= endsAt) {\n throw;\n }\n\n // Minimum funding goal can be zero\n minimumFundingGoal = _minimumFundingGoal;\n }\n\n /**\n * Don't expect to just send in money and get tokens.\n */\n function() payable {\n throw;\n }\n\n /**\n * @dev Make an investment.\n *\n * Crowdsale must be running for one to invest.\n * We must have not pressed the emergency brake.\n *\n * @param receiver The Ethereum address who receives the tokens\n * @param customerId (optional) UUID v4 to track the successful payments on the server side'\n * @param tokenAmount Amount of tokens which be credited to receiver\n *\n * @return tokensBought How mony tokens were bought\n */\n function buyTokens(address receiver, uint128 customerId, uint256 tokenAmount) stopInEmergency internal returns(uint tokensBought) {\n\n // Determine if it's a good time to accept investment from this participant\n if(getState() == State.PreFunding) {\n // Are we whitelisted for early deposit\n if(!earlyParticipantWhitelist[receiver]) {\n throw;\n }\n } else if(getState() == State.Funding) {\n // Retail participants can only come in when the crowdsale is running\n // pass\n } else {\n // Unwanted state\n throw;\n }\n\n uint weiAmount = msg.value;\n\n // Dust transaction\n require(tokenAmount != 0);\n\n if(investedAmountOf[receiver] == 0) {\n // A new investor\n investorCount++;\n }\n\n // Update investor\n investedAmountOf[receiver] = investedAmountOf[receiver].plus(weiAmount);\n tokenAmountOf[receiver] = tokenAmountOf[receiver].plus(tokenAmount);\n\n // Update totals\n weiRaised = weiRaised.plus(weiAmount);\n tokensSold = tokensSold.plus(tokenAmount);\n\n if(pricingStrategy.isPresalePurchase(receiver)) {\n presaleWeiRaised = presaleWeiRaised.plus(weiAmount);\n }\n\n // Check that we did not bust the cap\n require(!isBreakingCap(weiAmount, tokenAmount, weiRaised, tokensSold));\n\n assignTokens(receiver, tokenAmount);\n\n // Pocket the money, or fail the crowdsale if we for some reason cannot send the money to our multisig\n if(!multisigWallet.send(weiAmount)) throw;\n\n // Tell us invest was success\n Invested(receiver, weiAmount, tokenAmount, customerId);\n\n return tokenAmount;\n }\n\n /**\n * @dev Make an investment based on pricing strategy\n *\n * This is a wrapper for buyTokens(), but the amount of tokens receiver will\n * have depends on the pricing strategy used.\n *\n * @param receiver The Ethereum address who receives the tokens\n * @param customerId (optional) UUID v4 to track the successful payments on the server side'\n *\n * @return tokensBought How mony tokens were bought\n */\n function investInternal(address receiver, uint128 customerId) stopInEmergency internal returns(uint tokensBought) {\n return buyTokens(receiver, customerId, pricingStrategy.calculatePrice(msg.value, weiRaised - presaleWeiRaised, tokensSold, msg.sender, token.decimals()));\n }\n\n /**\n * @dev Calculate tokens user will have for their purchase\n *\n * @param weisTotal How much ethers (in wei) the user putssssss in\n * @param pricePerToken What is the price for one token\n *\n * @return tokensTotal which is received tokens, token decimals included\n */\n function calculateTokens(uint256 weisTotal, uint256 pricePerToken) public constant returns(uint tokensTotal) {\n // pricePerToken is how many full tokens, token decimal place included, you get for wei amount.\n // Because, in theory, decimal amount can vary, we do the exponent calculation here,\n // though gas wise using 10**18 constant would be much simpler.\n // Furthermore we could use rough amounts and take in raw wei per tokens amount,\n // but we lose too much accuracy for generic calculations, thus all these are\n // practically implemented as 10**18 fixed points.\n uint multiplier = 10 ** token.decimals();\n return weisTotal.times(multiplier)/pricePerToken;\n }\n\n /**\n * Finalize a succcesful crowdsale.\n *\n * The owner can triggre a call the contract that provides post-crowdsale actions, like releasing the tokens.\n */\n function finalize() public inState(State.Success) onlyOwner stopInEmergency {\n\n // Already finalized\n if(finalized) {\n throw;\n }\n\n // Finalizing is optional. We only call it if we are given a finalizing agent.\n if(address(finalizeAgent) != 0) {\n finalizeAgent.finalizeCrowdsale();\n }\n\n finalized = true;\n }\n\n /**\n * Allow to (re)set finalize agent.\n *\n * Design choice: no state restrictions on setting this, so that we can fix fat finger mistakes.\n */\n function setFinalizeAgent(FinalizeAgent addr) onlyOwner {\n finalizeAgent = addr;\n\n // Don't allow setting bad agent\n if(!finalizeAgent.isFinalizeAgent()) {\n throw;\n }\n }\n\n /**\n * Allow crowdsale owner to close early or extend the crowdsale.\n *\n * This is useful e.g. for a manual soft cap implementation:\n * - after X amount is reached determine manual closing\n *\n * This may put the crowdsale to an invalid state,\n * but we trust owners know what they are doing.\n *\n */\n function setEndsAt(uint time) onlyOwner {\n\n if(now > time) {\n throw; // Don't change past\n }\n\n if(startsAt > time) {\n throw; // Prevent human mistakes\n }\n\n endsAt = time;\n EndsAtChanged(endsAt);\n }\n\n /**\n * Allow to (re)set pricing strategy.\n *\n * Design choice: no state restrictions on the set, so that we can fix fat finger mistakes.\n */\n function setPricingStrategy(PricingStrategy _pricingStrategy) onlyOwner {\n pricingStrategy = _pricingStrategy;\n\n // Don't allow setting bad agent\n if(!pricingStrategy.isPricingStrategy()) {\n throw;\n }\n }\n\n /**\n * Allow to change the team multisig address in the case of emergency.\n *\n * This allows to save a deployed crowdsale wallet in the case the crowdsale has not yet begun\n * (we have done only few test transactions). After the crowdsale is going\n * then multisig address stays locked for the safety reasons.\n */\n function setMultisig(address addr) public onlyOwner {\n\n // Change\n if(investorCount > MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE) {\n throw;\n }\n\n multisigWallet = addr;\n }\n\n /**\n * Allow load refunds back on the contract for the refunding.\n *\n * The team can transfer the funds back on the smart contract in the case the minimum goal was not reached..\n */\n function loadRefund() public payable inState(State.Failure) {\n if(msg.value == 0) throw;\n loadedRefund = loadedRefund.plus(msg.value);\n }\n\n /**\n * Investors can claim refund.\n *\n * Note that any refunds from proxy buyers should be handled separately,\n * and not through this contract.\n */\n function refund() public inState(State.Refunding) {\n uint256 weiValue = investedAmountOf[msg.sender];\n if (weiValue == 0) throw;\n investedAmountOf[msg.sender] = 0;\n weiRefunded = weiRefunded.plus(weiValue);\n Refund(msg.sender, weiValue);\n if (!msg.sender.send(weiValue)) throw;\n }\n\n /**\n * @return true if the crowdsale has raised enough money to be a successful.\n */\n function isMinimumGoalReached() public constant returns (bool reached) {\n return weiRaised >= minimumFundingGoal;\n }\n\n /**\n * Check if the contract relationship looks good.\n */\n function isFinalizerSane() public constant returns (bool sane) {\n return finalizeAgent.isSane();\n }\n\n /**\n * Check if the contract relationship looks good.\n */\n function isPricingSane() public constant returns (bool sane) {\n return pricingStrategy.isSane(address(this));\n }\n\n /**\n * Crowdfund state machine management.\n *\n * We make it a function and do not assign the result to a variable, so there is no chance of the variable being stale.\n */\n function getState() public constant returns (State) {\n if(finalized) return State.Finalized;\n else if (address(finalizeAgent) == 0) return State.Preparing;\n else if (!finalizeAgent.isSane()) return State.Preparing;\n else if (!pricingStrategy.isSane(address(this))) return State.Preparing;\n else if (block.timestamp < startsAt) return State.PreFunding;\n else if (block.timestamp <= endsAt && !isCrowdsaleFull()) return State.Funding;\n else if (isMinimumGoalReached()) return State.Success;\n else if (!isMinimumGoalReached() && weiRaised > 0 && loadedRefund >= weiRaised) return State.Refunding;\n else return State.Failure;\n }\n\n /** This is for manual testing of multisig wallet interaction */\n function setOwnerTestValue(uint val) onlyOwner {\n ownerTestValue = val;\n }\n\n /**\n * Allow addresses to do early participation.\n *\n * TODO: Fix spelling error in the name\n */\n function setEarlyParicipantWhitelist(address addr, bool status) onlyOwner {\n earlyParticipantWhitelist[addr] = status;\n Whitelisted(addr, status);\n }\n\n\n /** Interface marker. */\n function isCrowdsale() public constant returns (bool) {\n return true;\n }\n\n //\n // Modifiers\n //\n\n /** Modified allowing execution only if the crowdsale is currently running. */\n modifier inState(State state) {\n if(getState() != state) throw;\n _;\n }\n\n\n //\n // Abstract functions\n //\n\n /**\n * Check if the current invested breaks our cap rules.\n *\n *\n * The child contract must define their own cap setting rules.\n * We allow a lot of flexibility through different capping strategies (ETH, token count)\n * Called from invest().\n *\n * @param weiAmount The amount of wei the investor tries to invest in the current transaction\n * @param tokenAmount The amount of tokens we try to give to the investor in the current transaction\n * @param weiRaisedTotal What would be our total raised balance after this transaction\n * @param tokensSoldTotal What would be our total sold tokens count after this transaction\n *\n * @return true if taking this investment would break our cap rules\n */\n function isBreakingCap(uint weiAmount, uint tokenAmount, uint weiRaisedTotal, uint tokensSoldTotal) constant returns (bool limitBroken);\n\n /**\n * Check if the current crowdsale is full and we can no longer sell any tokens.\n */\n function isCrowdsaleFull() public constant returns (bool);\n\n /**\n * Create new tokens or transfer issued tokens to the investor depending on the cap model.\n */\n function assignTokens(address receiver, uint tokenAmount) internal;\n}\n\n\n\n/**\n * Abstract base contract for token sales with the default buy entry points.\n *\n * Handle\n * - start and end dates\n * - accepting investments\n * - minimum funding goal and refund\n * - various statistics during the crowdfund\n * - different pricing strategies\n * - different investment policies (require server side customer id, allow only whitelisted addresses)\n *\n * Does not Handle\n *\n * - Token allocation (minting vs. transfer)\n * - Cap rules\n *\n */\ncontract Crowdsale is CrowdsaleBase {\n\n /* Do we need to have unique contributor id for each customer */\n bool public requireCustomerId;\n\n /**\n * Do we verify that contributor has been cleared on the server side (accredited investors only).\n * This method was first used in FirstBlood crowdsale to ensure all contributors have accepted terms on sale (on the web).\n */\n bool public requiredSignedAddress;\n\n /* Server side address that signed allowed contributors (Ethereum addresses) that can participate the crowdsale */\n address public signerAddress;\n\n function Crowdsale(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal) CrowdsaleBase(_token, _pricingStrategy, _multisigWallet, _start, _end, _minimumFundingGoal) {\n }\n\n /**\n * Preallocate tokens for the early investors.\n *\n * Preallocated tokens have been sold before the actual crowdsale opens.\n * This function mints the tokens and moves the crowdsale needle.\n *\n * Investor count is not handled; it is assumed this goes for multiple investors\n * and the token distribution happens outside the smart contract flow.\n *\n * No money is exchanged, as the crowdsale team already have received the payment.\n *\n * @param fullTokens tokens as full tokens - decimal places added internally\n * @param weiPrice Price of a single full token in wei\n *\n */\n function preallocate(address receiver, uint fullTokens, uint weiPrice) public onlyOwner {\n\n uint tokenAmount = fullTokens * 10**token.decimals();\n uint weiAmount = weiPrice * fullTokens; // This can be also 0, we give out tokens for free\n\n weiRaised = weiRaised.plus(weiAmount);\n tokensSold = tokensSold.plus(tokenAmount);\n\n investedAmountOf[receiver] = investedAmountOf[receiver].plus(weiAmount);\n tokenAmountOf[receiver] = tokenAmountOf[receiver].plus(tokenAmount);\n\n assignTokens(receiver, tokenAmount);\n\n // Tell us invest was success\n Invested(receiver, weiAmount, tokenAmount, 0);\n }\n\n /**\n * Allow anonymous contributions to this crowdsale.\n */\n function investWithSignedAddress(address addr, uint128 customerId, uint8 v, bytes32 r, bytes32 s) public payable {\n bytes32 hash = sha256(addr);\n if (ecrecover(hash, v, r, s) != signerAddress) throw;\n if(customerId == 0) throw; // UUIDv4 sanity check\n investInternal(addr, customerId);\n }\n\n /**\n * Track who is the customer making the payment so we can send thank you email.\n */\n function investWithCustomerId(address addr, uint128 customerId) public payable {\n if(requiredSignedAddress) throw; // Crowdsale allows only server-side signed participants\n if(customerId == 0) throw; // UUIDv4 sanity check\n investInternal(addr, customerId);\n }\n\n /**\n * Allow anonymous contributions to this crowdsale.\n */\n function invest(address addr) public payable {\n if(requireCustomerId) throw; // Crowdsale needs to track participants for thank you email\n if(requiredSignedAddress) throw; // Crowdsale allows only server-side signed participants\n investInternal(addr, 0);\n }\n\n /**\n * Invest to tokens, recognize the payer and clear his address.\n *\n */\n function buyWithSignedAddress(uint128 customerId, uint8 v, bytes32 r, bytes32 s) public payable {\n investWithSignedAddress(msg.sender, customerId, v, r, s);\n }\n\n /**\n * Invest to tokens, recognize the payer.\n *\n */\n function buyWithCustomerIdWithChecksum(uint128 customerId, bytes1 checksum) public payable {\n // see customerid.py\n if (bytes1(sha3(customerId)) != checksum) throw;\n investWithCustomerId(msg.sender, customerId);\n }\n\n /**\n * Legacy API signature.\n */\n function buyWithCustomerId(uint128 customerId) public payable {\n investWithCustomerId(msg.sender, customerId);\n }\n\n /**\n * The basic entry point to participate the crowdsale process.\n *\n * Pay for funding, get invested tokens back in the sender address.\n */\n function buy() public payable {\n invest(msg.sender);\n }\n\n /**\n * Set policy do we need to have server-side customer ids for the investments.\n *\n */\n function setRequireCustomerId(bool value) onlyOwner {\n requireCustomerId = value;\n InvestmentPolicyChanged(requireCustomerId, requiredSignedAddress, signerAddress);\n }\n\n /**\n * Set policy if all investors must be cleared on the server side first.\n *\n * This is e.g. for the accredited investor clearing.\n *\n */\n function setRequireSignedAddress(bool value, address _signerAddress) onlyOwner {\n requiredSignedAddress = value;\n signerAddress = _signerAddress;\n InvestmentPolicyChanged(requireCustomerId, requiredSignedAddress, signerAddress);\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n assert(c / a == b);\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n\n\n\n/**\n * @title Basic token\n * @dev Basic version of StandardToken, with no allowances.\n */\ncontract BasicToken is ERC20Basic {\n using SafeMath for uint256;\n\n mapping(address => uint256) balances;\n\n uint256 totalSupply_;\n\n /**\n * @dev total number of tokens in existence\n */\n function totalSupply() public view returns (uint256) {\n return totalSupply_;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param _to The address to transfer to.\n * @param _value The amount to be transferred.\n */\n function transfer(address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[msg.sender]);\n\n // SafeMath.sub will throw if there is not enough balance.\n balances[msg.sender] = balances[msg.sender].sub(_value);\n balances[_to] = balances[_to].add(_value);\n Transfer(msg.sender, _to, _value);\n return true;\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param _owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address _owner) public view returns (uint256 balance) {\n return balances[_owner];\n }\n\n}\n\n\n\n\n/**\n * @title Standard ERC20 token\n *\n * @dev Implementation of the basic standard token.\n * @dev https://github.com/ethereum/EIPs/issues/20\n * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol\n */\ncontract StandardToken is ERC20, BasicToken {\n\n mapping (address => mapping (address => uint256)) internal allowed;\n\n\n /**\n * @dev Transfer tokens from one address to another\n * @param _from address The address which you want to send tokens from\n * @param _to address The address which you want to transfer to\n * @param _value uint256 the amount of tokens to be transferred\n */\n function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[_from]);\n require(_value <= allowed[_from][msg.sender]);\n\n balances[_from] = balances[_from].sub(_value);\n balances[_to] = balances[_to].add(_value);\n allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);\n Transfer(_from, _to, _value);\n return true;\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n *\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param _spender The address which will spend the funds.\n * @param _value The amount of tokens to be spent.\n */\n function approve(address _spender, uint256 _value) public returns (bool) {\n allowed[msg.sender][_spender] = _value;\n Approval(msg.sender, _spender, _value);\n return true;\n }\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param _owner address The address which owns the funds.\n * @param _spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address _owner, address _spender) public view returns (uint256) {\n return allowed[_owner][_spender];\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(address _spender, uint _addedValue) public returns (bool) {\n allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {\n uint oldValue = allowed[msg.sender][_spender];\n if (_subtractedValue > oldValue) {\n allowed[msg.sender][_spender] = 0;\n } else {\n allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);\n }\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\ncontract Recoverable is Ownable {\n\n /// @dev Empty constructor (for now)\n function Recoverable() {\n }\n\n /// @dev This will be invoked by the owner, when owner wants to rescue tokens\n /// @param token Token which will we rescue to the owner from the contract\n function recoverTokens(ERC20Basic token) onlyOwner public {\n token.transfer(owner, tokensToBeReturned(token));\n }\n\n /// @dev Interface function, can be overwritten by the superclass\n /// @param token Token which balance we will check and return\n /// @return The amount of tokens (in smallest denominator) the contract owns\n function tokensToBeReturned(ERC20Basic token) public returns (uint) {\n return token.balanceOf(this);\n }\n}\n\n\n\n/**\n * Standard EIP-20 token with an interface marker.\n *\n * @notice Interface marker is used by crowdsale contracts to validate that addresses point a good token contract.\n *\n */\ncontract StandardTokenExt is StandardToken, Recoverable {\n\n /* Interface declaration */\n function isToken() public constant returns (bool weAre) {\n return true;\n }\n}\n\n\n\n/**\n * Define interface for releasing the token transfer after a successful crowdsale.\n */\ncontract ReleasableToken is StandardTokenExt {\n\n /* The finalizer contract that allows unlift the transfer limits on this token */\n address public releaseAgent;\n\n /** A crowdsale contract can release us to the wild if ICO success. If false we are are in transfer lock up period.*/\n bool public released = false;\n\n /** Map of agents that are allowed to transfer tokens regardless of the lock down period. These are crowdsale contracts and possible the team multisig itself. */\n mapping (address => bool) public transferAgents;\n\n /**\n * Limit token transfer until the crowdsale is over.\n *\n */\n modifier canTransfer(address _sender) {\n\n if(!released) {\n if(!transferAgents[_sender]) {\n throw;\n }\n }\n\n _;\n }\n\n /**\n * Set the contract that can call release and make the token transferable.\n *\n * Design choice. Allow reset the release agent to fix fat finger mistakes.\n */\n function setReleaseAgent(address addr) onlyOwner inReleaseState(false) public {\n\n // We don't do interface check here as we might want to a normal wallet address to act as a release agent\n releaseAgent = addr;\n }\n\n /**\n * Owner can allow a particular address (a crowdsale contract) to transfer tokens despite the lock up period.\n */\n function setTransferAgent(address addr, bool state) onlyOwner inReleaseState(false) public {\n transferAgents[addr] = state;\n }\n\n /**\n * One way function to release the tokens to the wild.\n *\n * Can be called only from the release agent that is the final ICO contract. It is only called if the crowdsale has been success (first milestone reached).\n */\n function releaseTokenTransfer() public onlyReleaseAgent {\n released = true;\n }\n\n /** The function can be called only before or after the tokens have been releasesd */\n modifier inReleaseState(bool releaseState) {\n if(releaseState != released) {\n throw;\n }\n _;\n }\n\n /** The function can be called only by a whitelisted release agent. */\n modifier onlyReleaseAgent() {\n if(msg.sender != releaseAgent) {\n throw;\n }\n _;\n }\n\n function transfer(address _to, uint _value) canTransfer(msg.sender) returns (bool success) {\n // Call StandardToken.transfer()\n return super.transfer(_to, _value);\n }\n\n function transferFrom(address _from, address _to, uint _value) canTransfer(_from) returns (bool success) {\n // Call StandardToken.transferForm()\n return super.transferFrom(_from, _to, _value);\n }\n\n}\n\n\n/**\n * A finalize agent that does nothing.\n *\n * - Token transfer must be manually released by the owner\n */\ncontract NullFinalizeAgent is FinalizeAgent {\n\n Crowdsale public crowdsale;\n\n function NullFinalizeAgent(Crowdsale _crowdsale) {\n crowdsale = _crowdsale;\n }\n\n /** Check that we can release the token */\n function isSane() public constant returns (bool) {\n return true;\n }\n\n /** Called once by crowdsale finalize() if the sale was success. */\n function finalizeCrowdsale() public {\n }\n\n}\n"}, "Ownable": {"abi": [{"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "bytecode": "0x608060405234801561001057600080fd5b5060008054600160a060020a031916331790556101ce806100326000396000f30060806040526004361061004b5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416638da5cb5b8114610050578063f2fde38b1461008e575b600080fd5b34801561005c57600080fd5b506100656100be565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561009a57600080fd5b506100bc73ffffffffffffffffffffffffffffffffffffffff600435166100da565b005b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1633146100fe57600080fd5b73ffffffffffffffffffffffffffffffffffffffff8116151561012057600080fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff191673ffffffffffffffffffffffffffffffffffffffff929092169190911790555600a165627a7a7230582011fbb79fb68811a9f5db8fdf02201415540235de06f1035b06aa4eb54c1ede720029", "bytecode_runtime": "0x60806040526004361061004b5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416638da5cb5b8114610050578063f2fde38b1461008e575b600080fd5b34801561005c57600080fd5b506100656100be565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561009a57600080fd5b506100bc73ffffffffffffffffffffffffffffffffffffffff600435166100da565b005b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1633146100fe57600080fd5b73ffffffffffffffffffffffffffffffffffffffff8116151561012057600080fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff191673ffffffffffffffffffffffffffffffffffffffff929092169190911790555600a165627a7a7230582011fbb79fb68811a9f5db8fdf02201415540235de06f1035b06aa4eb54c1ede720029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "devdoc": {"methods": {"transferOwnership(address)": {"details": "Allows the current owner to transfer control of the contract to a newOwner.", "params": {"newOwner": "The address to transfer ownership to."}}}, "title": "Ownable"}, "userdoc": {"methods": {}}}, "settings": {"compilationTarget": {"zeppelin/contracts/ownership/Ownable.sol": "Ownable"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}}, "version": 1}, "name": "Ownable", "ordered_full_dependencies": [], "source_path": "zeppelin/contracts/ownership/Ownable.sol", "source": "\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n"}, "PaymentForwarder": {"abi": [{"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}], "name": "payForMyself", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}, {"name": "benefactor", "type": "address"}], "name": "payWithoutChecksum", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}, {"name": "checksum", "type": "bytes1"}], "name": "payForMyselfWithChecksum", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [], "name": "halt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "customerCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "totalTransferred", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "halted", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}, {"name": "benefactor", "type": "address"}, {"name": "checksum", "type": "bytes1"}], "name": "pay", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [], "name": "unhalt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "teamMultisig", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "paymentsByBenefactor", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "uint128"}], "name": "paymentsByCustomer", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [{"name": "_owner", "type": "address"}, {"name": "_teamMultisig", "type": "address"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "source", "type": "address"}, {"indexed": false, "name": "amount", "type": "uint256"}, {"indexed": false, "name": "customerId", "type": "uint128"}, {"indexed": false, "name": "benefactor", "type": "address"}], "name": "PaymentForwarded", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "bytecode": "0x608060405234801561001057600080fd5b506040516040806107a98339810160405280516020909101516000805460018054600160a060020a03948516600160a060020a03199182161790915592909316928216331790911691909117905561073c8061006d6000396000f3006080604052600436106100cf5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663274465b481146100d457806331288397146100f357806346f2e8801461011c5780635ed7ca5b1461015e5780638da5cb5b146101735780639757e8a3146101a45780639b087b2d146101cb578063b9b8af0b146101e0578063bbc43d4114610209578063cb3e64fd14610257578063dbc0c0851461026c578063ef3336f514610281578063f2fde38b146102a2578063f9215676146102c3575b600080fd5b6100f16fffffffffffffffffffffffffffffffff600435166102ed565b005b6100f16fffffffffffffffffffffffffffffffff60043516600160a060020a03602435166102fa565b6100f16fffffffffffffffffffffffffffffffff600435167fff0000000000000000000000000000000000000000000000000000000000000060243516610431565b34801561016a57600080fd5b506100f16104a7565b34801561017f57600080fd5b506101886104f5565b60408051600160a060020a039092168252519081900360200190f35b3480156101b057600080fd5b506101b9610504565b60408051918252519081900360200190f35b3480156101d757600080fd5b506101b961050a565b3480156101ec57600080fd5b506101f5610510565b604080519115158252519081900360200190f35b6100f16fffffffffffffffffffffffffffffffff60043516600160a060020a03602435167fff0000000000000000000000000000000000000000000000000000000000000060443516610531565b34801561026357600080fd5b506100f16105e9565b34801561027857600080fd5b50610188610649565b34801561028d57600080fd5b506101b9600160a060020a0360043516610658565b3480156102ae57600080fd5b506100f1600160a060020a036004351661066a565b3480156102cf57600080fd5b506101b96fffffffffffffffffffffffffffffffff600435166106fe565b6102f781336102fa565b50565b6000805474010000000000000000000000000000000000000000900460ff161561032357600080fd5b506040805133815234602082018190526fffffffffffffffffffffffffffffffff851682840152600160a060020a038416606083015291517f4e4e2d6da11427f2d85d47e2bced64efa9ccd9694ae97786772a22d465bc80a49181900360800190a160028054820190556fffffffffffffffffffffffffffffffff831660009081526004602052604090205415156103bf576003805460010190555b6fffffffffffffffffffffffffffffffff83166000908152600460209081526040808320805485019055600160a060020a0380861684526005909252808320805485019055600154905191169183156108fc02918491818181858888f19350505050151561042c57600080fd5b505050565b604080517001000000000000000000000000000000006fffffffffffffffffffffffffffffffff851602815290519081900360100190207fff000000000000000000000000000000000000000000000000000000000000009081169082161461049957600080fd5b6104a382336102fa565b5050565b600054600160a060020a031633146104be57600080fd5b6000805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b600054600160a060020a031681565b60035481565b60025481565b60005474010000000000000000000000000000000000000000900460ff1681565b60005474010000000000000000000000000000000000000000900460ff161561055957600080fd5b604080517001000000000000000000000000000000006fffffffffffffffffffffffffffffffff86160281526c01000000000000000000000000600160a060020a03851602601082015290519081900360240190207fff00000000000000000000000000000000000000000000000000000000000000908116908216146105df57600080fd5b61042c83836102fa565b600054600160a060020a0316331461060057600080fd5b60005474010000000000000000000000000000000000000000900460ff16151561062957600080fd5b6000805474ff000000000000000000000000000000000000000019169055565b600154600160a060020a031681565b60056020526000908152604090205481565b600054600160a060020a0316331461068157600080fd5b600160a060020a038116151561069657600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600460205260009081526040902054815600a165627a7a72305820123d5cf6ed3d6023b06341b8768c945871e5dfbb5177354c5da93a103c9686f80029", "bytecode_runtime": "0x6080604052600436106100cf5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663274465b481146100d457806331288397146100f357806346f2e8801461011c5780635ed7ca5b1461015e5780638da5cb5b146101735780639757e8a3146101a45780639b087b2d146101cb578063b9b8af0b146101e0578063bbc43d4114610209578063cb3e64fd14610257578063dbc0c0851461026c578063ef3336f514610281578063f2fde38b146102a2578063f9215676146102c3575b600080fd5b6100f16fffffffffffffffffffffffffffffffff600435166102ed565b005b6100f16fffffffffffffffffffffffffffffffff60043516600160a060020a03602435166102fa565b6100f16fffffffffffffffffffffffffffffffff600435167fff0000000000000000000000000000000000000000000000000000000000000060243516610431565b34801561016a57600080fd5b506100f16104a7565b34801561017f57600080fd5b506101886104f5565b60408051600160a060020a039092168252519081900360200190f35b3480156101b057600080fd5b506101b9610504565b60408051918252519081900360200190f35b3480156101d757600080fd5b506101b961050a565b3480156101ec57600080fd5b506101f5610510565b604080519115158252519081900360200190f35b6100f16fffffffffffffffffffffffffffffffff60043516600160a060020a03602435167fff0000000000000000000000000000000000000000000000000000000000000060443516610531565b34801561026357600080fd5b506100f16105e9565b34801561027857600080fd5b50610188610649565b34801561028d57600080fd5b506101b9600160a060020a0360043516610658565b3480156102ae57600080fd5b506100f1600160a060020a036004351661066a565b3480156102cf57600080fd5b506101b96fffffffffffffffffffffffffffffffff600435166106fe565b6102f781336102fa565b50565b6000805474010000000000000000000000000000000000000000900460ff161561032357600080fd5b506040805133815234602082018190526fffffffffffffffffffffffffffffffff851682840152600160a060020a038416606083015291517f4e4e2d6da11427f2d85d47e2bced64efa9ccd9694ae97786772a22d465bc80a49181900360800190a160028054820190556fffffffffffffffffffffffffffffffff831660009081526004602052604090205415156103bf576003805460010190555b6fffffffffffffffffffffffffffffffff83166000908152600460209081526040808320805485019055600160a060020a0380861684526005909252808320805485019055600154905191169183156108fc02918491818181858888f19350505050151561042c57600080fd5b505050565b604080517001000000000000000000000000000000006fffffffffffffffffffffffffffffffff851602815290519081900360100190207fff000000000000000000000000000000000000000000000000000000000000009081169082161461049957600080fd5b6104a382336102fa565b5050565b600054600160a060020a031633146104be57600080fd5b6000805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b600054600160a060020a031681565b60035481565b60025481565b60005474010000000000000000000000000000000000000000900460ff1681565b60005474010000000000000000000000000000000000000000900460ff161561055957600080fd5b604080517001000000000000000000000000000000006fffffffffffffffffffffffffffffffff86160281526c01000000000000000000000000600160a060020a03851602601082015290519081900360240190207fff00000000000000000000000000000000000000000000000000000000000000908116908216146105df57600080fd5b61042c83836102fa565b600054600160a060020a0316331461060057600080fd5b60005474010000000000000000000000000000000000000000900460ff16151561062957600080fd5b6000805474ff000000000000000000000000000000000000000019169055565b600154600160a060020a031681565b60056020526000908152604090205481565b600054600160a060020a0316331461068157600080fd5b600160a060020a038116151561069657600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600460205260009081526040902054815600a165627a7a72305820123d5cf6ed3d6023b06341b8768c945871e5dfbb5177354c5da93a103c9686f80029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}], "name": "payForMyself", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}, {"name": "benefactor", "type": "address"}], "name": "payWithoutChecksum", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}, {"name": "checksum", "type": "bytes1"}], "name": "payForMyselfWithChecksum", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [], "name": "halt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "customerCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "totalTransferred", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "halted", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}, {"name": "benefactor", "type": "address"}, {"name": "checksum", "type": "bytes1"}], "name": "pay", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [], "name": "unhalt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "teamMultisig", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "paymentsByBenefactor", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "uint128"}], "name": "paymentsByCustomer", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [{"name": "_owner", "type": "address"}, {"name": "_teamMultisig", "type": "address"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "source", "type": "address"}, {"indexed": false, "name": "amount", "type": "uint256"}, {"indexed": false, "name": "customerId", "type": "uint128"}, {"indexed": false, "name": "benefactor", "type": "address"}], "name": "PaymentForwarded", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "devdoc": {"methods": {"pay(uint128,address,bytes1)": {"params": {"customerId": "Identifier in the central database, UUID v4 "}}, "payForMyselfWithChecksum(uint128,bytes1)": {"params": {"customerId": "Identifier in the central database, UUID v4 "}}, "transferOwnership(address)": {"details": "Allows the current owner to transfer control of the contract to a newOwner.", "params": {"newOwner": "The address to transfer ownership to."}}}}, "userdoc": {"methods": {"pay(uint128,address,bytes1)": {"notice": "Pay on a behalf of an address."}, "payForMyself(uint128)": {"notice": "Legacy API signature."}, "payForMyselfWithChecksum(uint128,bytes1)": {"notice": "Pay on a behalf of the sender."}}}}, "settings": {"compilationTarget": {"contracts/PaymentForwarder.sol": "PaymentForwarder"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/Haltable.sol": {"keccak256": "0x265dcf25e7c9ab4b6eecd2181f1b71334a1b5381a60f8db7d9526dab120f4b70", "urls": ["bzzr://d522e00fa9e075941469dd81738b59fdb99ce3c12cdc39e33abe40b588c4da9b"]}, "contracts/PaymentForwarder.sol": {"keccak256": "0xf7937378fd309771c8f8d8816f16ccb5fe1567759b0f961528b7284be4254f20", "urls": ["bzzr://01c5de9cbd95a656d0a477ff5108904bc5142327653ea40313feb59059cc8062"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}}, "version": 1}, "name": "PaymentForwarder", "ordered_full_dependencies": [], "source_path": "contracts/PaymentForwarder.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n/*\n * Haltable\n *\n * Abstract contract that allows children to implement an\n * emergency stop mechanism. Differs from Pausable by causing a throw when in halt mode.\n *\n *\n * Originally envisioned in FirstBlood ICO contract.\n */\ncontract Haltable is Ownable {\n bool public halted;\n\n modifier stopInEmergency {\n if (halted) throw;\n _;\n }\n\n modifier stopNonOwnersInEmergency {\n if (halted && msg.sender != owner) throw;\n _;\n }\n\n modifier onlyInEmergency {\n if (!halted) throw;\n _;\n }\n\n // called by the owner on emergency, triggers stopped state\n function halt() external onlyOwner {\n halted = true;\n }\n\n // called by the owner on end of emergency, returns to normal state\n function unhalt() external onlyOwner onlyInEmergency {\n halted = false;\n }\n\n}\n\n\n/**\n * Forward Ethereum payments to another wallet and track them with an event.\n *\n * Allows to identify customers who made Ethereum payment for a central token issuance.\n * Furthermore allow making a payment on behalf of another address.\n *\n * Allow pausing to signal the end of the crowdsale.\n */\ncontract PaymentForwarder is Haltable {\n\n /** Who will get all ETH in the end */\n address public teamMultisig;\n\n /** Total incoming money */\n uint public totalTransferred;\n\n /** How many distinct customers we have that have made a payment */\n uint public customerCount;\n\n /** Total incoming money per centrally tracked customer id */\n mapping(uint128 => uint) public paymentsByCustomer;\n\n /** Total incoming money per benefactor address */\n mapping(address => uint) public paymentsByBenefactor;\n\n /** A customer has made a payment. Benefactor is the address where the tokens will be ultimately issued.*/\n event PaymentForwarded(address source, uint amount, uint128 customerId, address benefactor);\n\n function PaymentForwarder(address _owner, address _teamMultisig) {\n teamMultisig = _teamMultisig;\n owner = _owner;\n }\n\n function payWithoutChecksum(uint128 customerId, address benefactor) public stopInEmergency payable {\n\n uint weiAmount = msg.value;\n\n PaymentForwarded(msg.sender, weiAmount, customerId, benefactor);\n\n // We trust Ethereum amounts cannot overflow uint256\n totalTransferred += weiAmount;\n\n if(paymentsByCustomer[customerId] == 0) {\n customerCount++;\n }\n\n paymentsByCustomer[customerId] += weiAmount;\n\n // We track benefactor addresses for extra safety;\n // In the case of central ETH issuance tracking has problems we can\n // construct ETH contributions solely based on blockchain data\n paymentsByBenefactor[benefactor] += weiAmount;\n\n // May run out of gas\n if(!teamMultisig.send(weiAmount)) throw;\n }\n\n /**\n * Pay on a behalf of an address.\n *\n * @param customerId Identifier in the central database, UUID v4\n *\n */\n function pay(uint128 customerId, address benefactor, bytes1 checksum) public stopInEmergency payable {\n // see customerid.py\n if (bytes1(sha3(customerId, benefactor)) != checksum) throw;\n payWithoutChecksum(customerId, benefactor);\n }\n\n /**\n * Pay on a behalf of the sender.\n *\n * @param customerId Identifier in the central database, UUID v4\n *\n */\n function payForMyselfWithChecksum(uint128 customerId, bytes1 checksum) public payable {\n // see customerid.py\n if (bytes1(sha3(customerId)) != checksum) throw;\n payWithoutChecksum(customerId, msg.sender);\n }\n\n /**\n * Legacy API signature.\n */\n function payForMyself(uint128 customerId) public payable {\n payWithoutChecksum(customerId, msg.sender);\n }\n\n}\n"}, "PaymentSplitter": {"abi": [{"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "recoverTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "uint256"}], "name": "parties", "outputs": [{"name": "addr", "type": "address"}, {"name": "slices", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSlices", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "tokensToBeReturned", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "split", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [{"name": "addresses", "type": "address[]"}, {"name": "slices", "type": "uint256[]"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"payable": true, "stateMutability": "payable", "type": "fallback"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "sender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Deposit", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "who", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Split", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "SplitTo", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "bytecode": "0x608060405234801561001057600080fd5b50604051610869380380610869833981016040528051602082015160008054600160a060020a031916331781559083018051929093018051909392146100dd57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f61646472657373657320616e6420736c69636573206d7573742062652065717560448201527f616c206c656e6774682e00000000000000000000000000000000000000000000606482015290519081900360840190fd5b600083511180156100ef575060648351105b151561018257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f416d6f756e74206f6620706172746965732069732065697468657220746f6f2060448201527f6d616e792c206f72207a65726f2e000000000000000000000000000000000000606482015290519081900360840190fd5b5060005b8251811015610259576002604080519081016040528085848151811015156101aa57fe5b90602001906020020151600160a060020a0316815260200184848151811015156101d057fe5b60209081029190910181015190915282546001808201855560009485529382902083516002909202018054600160a060020a031916600160a060020a03909216919091178155910151910155815161024e9083908390811061022e57fe5b60209081029091010151600154906401000000006105a861026182021704565b600190815501610186565b505050610277565b60008282018381101561027057fe5b9392505050565b6105e3806102866000396000f3006080604052600436106100825763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166316114acd81146100ba57806370651a18146100dd5780638d047d00146101185780638da5cb5b1461013f578063c45d19db14610170578063f2fde38b14610191578063f7654176146101b2575b60408051348152905133917fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c919081900360200190a2005b3480156100c657600080fd5b506100db600160a060020a03600435166101c7565b005b3480156100e957600080fd5b506100f5600435610297565b60408051600160a060020a03909316835260208301919091528051918290030190f35b34801561012457600080fd5b5061012d6102cd565b60408051918252519081900360200190f35b34801561014b57600080fd5b506101546102d3565b60408051600160a060020a039092168252519081900360200190f35b34801561017c57600080fd5b5061012d600160a060020a03600435166102e2565b34801561019d57600080fd5b506100db600160a060020a0360043516610378565b3480156101be57600080fd5b506100db61040c565b600054600160a060020a031633146101de57600080fd5b600054600160a060020a038083169163a9059cbb91166101fd846102e2565b6040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b15801561026857600080fd5b505af115801561027c573d6000803e3d6000fd5b505050506040513d602081101561029257600080fd5b505050565b60028054829081106102a557fe5b600091825260209091206002909102018054600190910154600160a060020a03909116915082565b60015481565b600054600160a060020a031681565b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600091600160a060020a038416916370a082319160248082019260209290919082900301818787803b15801561034657600080fd5b505af115801561035a573d6000803e3d6000fd5b505050506040513d602081101561037057600080fd5b505192915050565b600054600160a060020a0316331461038f57600080fd5b600160a060020a03811615156103a457600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6001543031906000908190819061042a90859063ffffffff61055a16565b9250600091505b60025482101561051e5761046e60028381548110151561044d57fe5b9060005260206000209060020201600101548461057690919063ffffffff16565b905060028281548110151561047f57fe5b60009182526020822060029091020154604051600160a060020a039091169183156108fc02918491818181858888f19350505050506002828154811015156104c357fe5b600091825260209182902060029091020154604080518481529051600160a060020a03909216927f8eb149b035c5f6f2d0957bc08ba5bae0e31139eab8eee6671cad10b105ec8c3c92918290030190a2600190910190610431565b60408051858152905133917fe1665329182bc1dab50c9b04ea6bd37107b73ed7c585951d808b02cd9b659627919081900360200190a250505050565b600080828481151561056857fe5b0490508091505b5092915050565b600080831515610589576000915061056f565b5082820282848281151561059957fe5b04146105a157fe5b9392505050565b6000828201838110156105a157fe00a165627a7a723058206dd924f6a5a850ba2b40d4c071a7f27dbbfea0bea55135019c294ba805a0deb70029", "bytecode_runtime": "0x6080604052600436106100825763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166316114acd81146100ba57806370651a18146100dd5780638d047d00146101185780638da5cb5b1461013f578063c45d19db14610170578063f2fde38b14610191578063f7654176146101b2575b60408051348152905133917fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c919081900360200190a2005b3480156100c657600080fd5b506100db600160a060020a03600435166101c7565b005b3480156100e957600080fd5b506100f5600435610297565b60408051600160a060020a03909316835260208301919091528051918290030190f35b34801561012457600080fd5b5061012d6102cd565b60408051918252519081900360200190f35b34801561014b57600080fd5b506101546102d3565b60408051600160a060020a039092168252519081900360200190f35b34801561017c57600080fd5b5061012d600160a060020a03600435166102e2565b34801561019d57600080fd5b506100db600160a060020a0360043516610378565b3480156101be57600080fd5b506100db61040c565b600054600160a060020a031633146101de57600080fd5b600054600160a060020a038083169163a9059cbb91166101fd846102e2565b6040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b15801561026857600080fd5b505af115801561027c573d6000803e3d6000fd5b505050506040513d602081101561029257600080fd5b505050565b60028054829081106102a557fe5b600091825260209091206002909102018054600190910154600160a060020a03909116915082565b60015481565b600054600160a060020a031681565b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600091600160a060020a038416916370a082319160248082019260209290919082900301818787803b15801561034657600080fd5b505af115801561035a573d6000803e3d6000fd5b505050506040513d602081101561037057600080fd5b505192915050565b600054600160a060020a0316331461038f57600080fd5b600160a060020a03811615156103a457600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6001543031906000908190819061042a90859063ffffffff61055a16565b9250600091505b60025482101561051e5761046e60028381548110151561044d57fe5b9060005260206000209060020201600101548461057690919063ffffffff16565b905060028281548110151561047f57fe5b60009182526020822060029091020154604051600160a060020a039091169183156108fc02918491818181858888f19350505050506002828154811015156104c357fe5b600091825260209182902060029091020154604080518481529051600160a060020a03909216927f8eb149b035c5f6f2d0957bc08ba5bae0e31139eab8eee6671cad10b105ec8c3c92918290030190a2600190910190610431565b60408051858152905133917fe1665329182bc1dab50c9b04ea6bd37107b73ed7c585951d808b02cd9b659627919081900360200190a250505050565b600080828481151561056857fe5b0490508091505b5092915050565b600080831515610589576000915061056f565b5082820282848281151561059957fe5b04146105a157fe5b9392505050565b6000828201838110156105a157fe00a165627a7a723058206dd924f6a5a850ba2b40d4c071a7f27dbbfea0bea55135019c294ba805a0deb70029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "recoverTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "uint256"}], "name": "parties", "outputs": [{"name": "addr", "type": "address"}, {"name": "slices", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSlices", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "tokensToBeReturned", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "split", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [{"name": "addresses", "type": "address[]"}, {"name": "slices", "type": "uint256[]"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"payable": true, "stateMutability": "payable", "type": "fallback"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "sender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Deposit", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "who", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Split", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "SplitTo", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "devdoc": {"methods": {"recoverTokens(address)": {"details": "This will be invoked by the owner, when owner wants to rescue tokens", "params": {"token": "Token which will we rescue to the owner from the contract"}}, "split()": {"details": "Split the ethers, and send to parties according to slices. This can be intentionally invoked by anyone: if some random person wants to pay for the gas, that's good for us."}, "tokensToBeReturned(address)": {"details": "Interface function, can be overwritten by the superclass", "params": {"token": "Token which balance we will check and return"}, "return": "The amount of tokens (in smallest denominator) the contract owns"}, "transferOwnership(address)": {"details": "Allows the current owner to transfer control of the contract to a newOwner.", "params": {"newOwner": "The address to transfer ownership to."}}}}, "userdoc": {"methods": {}}}, "settings": {"compilationTarget": {"contracts/PaymentSplitter.sol": "PaymentSplitter"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/PaymentSplitter.sol": {"keccak256": "0xe5142d5f28d263591e23f894740efecd170d0c2fc8809f43d4d4b27a1db2b0ea", "urls": ["bzzr://ce24a69c87e66a2446b059d9b17eaf431d74bdd76933116d6e033f6a0f4c7559"]}, "contracts/Recoverable.sol": {"keccak256": "0x311a332cdd87df6e00057f5455f4e68b043b5dbe211f6d68bc64e20817515635", "urls": ["bzzr://4fd99bcfb93baed6e7c8d22ee9ecc5c8346a1aa98288e77b01333b2c5d3f582d"]}, "zeppelin/contracts/math/SafeMath.sol": {"keccak256": "0x341ba8cb467a3623e819ba1a683ac1d264005186f308505214e5f6bc89446a08", "urls": ["bzzr://59b5652ee4e4a1b5a8f1a8906e14c84af43d636cf5ca0725cc1813aabe4c8c17"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}}, "version": 1}, "name": "PaymentSplitter", "ordered_full_dependencies": [], "source_path": "contracts/PaymentSplitter.sol", "source": "/**\n * This smart contract code is Copyright 2018 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * @dev Split ether between parties.\n * @author TokenMarket Ltd. / Ville Sundell \n *\n * Allows splitting payments between parties.\n * Ethers are split to parties, each party has slices they are entitled to.\n * Ethers of this smart contract are divided into slices upon split().\n */\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\ncontract Recoverable is Ownable {\n\n /// @dev Empty constructor (for now)\n function Recoverable() {\n }\n\n /// @dev This will be invoked by the owner, when owner wants to rescue tokens\n /// @param token Token which will we rescue to the owner from the contract\n function recoverTokens(ERC20Basic token) onlyOwner public {\n token.transfer(owner, tokensToBeReturned(token));\n }\n\n /// @dev Interface function, can be overwritten by the superclass\n /// @param token Token which balance we will check and return\n /// @return The amount of tokens (in smallest denominator) the contract owns\n function tokensToBeReturned(ERC20Basic token) public returns (uint) {\n return token.balanceOf(this);\n }\n}\n\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n assert(c / a == b);\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n\n\ncontract PaymentSplitter is Recoverable {\n using SafeMath for uint256; // We use only uint256 for safety reasons (no boxing)\n\n /// @dev Describes a party (address and amount of slices the party is entitled to)\n struct Party {\n address addr;\n uint256 slices;\n }\n\n /// @dev This is just a failsafe, so we can't initialize a contract where\n /// splitting would not be succesful in the future (for example because\n /// of decreased block gas limit):\n uint256 constant MAX_PARTIES = 100;\n /// @dev How many slices there are in total:\n uint256 public totalSlices;\n /// @dev Array of \"Party\"s for each party's address and amount of slices:\n Party[] public parties;\n\n /// @dev This event is emitted when someone makes a payment:\n /// (Gnosis MultiSigWallet compatible event)\n event Deposit(address indexed sender, uint256 value);\n /// @dev This event is emitted when someone splits the ethers between parties:\n /// (emitted once per call)\n event Split(address indexed who, uint256 value);\n /// @dev This event is emitted for every party we send ethers to:\n event SplitTo(address indexed to, uint256 value);\n\n /// @dev Constructor: takes list of parties and their slices.\n /// @param addresses List of addresses of the parties\n /// @param slices Slices of the parties. Will be added to totalSlices.\n function PaymentSplitter(address[] addresses, uint[] slices) public {\n require(addresses.length == slices.length, \"addresses and slices must be equal length.\");\n require(addresses.length > 0 && addresses.length < MAX_PARTIES, \"Amount of parties is either too many, or zero.\");\n\n for(uint i=0; i 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n\n\n\n/**\n * @title Basic token\n * @dev Basic version of StandardToken, with no allowances.\n */\ncontract BasicToken is ERC20Basic {\n using SafeMath for uint256;\n\n mapping(address => uint256) balances;\n\n uint256 totalSupply_;\n\n /**\n * @dev total number of tokens in existence\n */\n function totalSupply() public view returns (uint256) {\n return totalSupply_;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param _to The address to transfer to.\n * @param _value The amount to be transferred.\n */\n function transfer(address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[msg.sender]);\n\n // SafeMath.sub will throw if there is not enough balance.\n balances[msg.sender] = balances[msg.sender].sub(_value);\n balances[_to] = balances[_to].add(_value);\n Transfer(msg.sender, _to, _value);\n return true;\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param _owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address _owner) public view returns (uint256 balance) {\n return balances[_owner];\n }\n\n}\n\n\n\n\n/**\n * @title Standard ERC20 token\n *\n * @dev Implementation of the basic standard token.\n * @dev https://github.com/ethereum/EIPs/issues/20\n * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol\n */\ncontract StandardToken is ERC20, BasicToken {\n\n mapping (address => mapping (address => uint256)) internal allowed;\n\n\n /**\n * @dev Transfer tokens from one address to another\n * @param _from address The address which you want to send tokens from\n * @param _to address The address which you want to transfer to\n * @param _value uint256 the amount of tokens to be transferred\n */\n function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[_from]);\n require(_value <= allowed[_from][msg.sender]);\n\n balances[_from] = balances[_from].sub(_value);\n balances[_to] = balances[_to].add(_value);\n allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);\n Transfer(_from, _to, _value);\n return true;\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n *\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param _spender The address which will spend the funds.\n * @param _value The amount of tokens to be spent.\n */\n function approve(address _spender, uint256 _value) public returns (bool) {\n allowed[msg.sender][_spender] = _value;\n Approval(msg.sender, _spender, _value);\n return true;\n }\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param _owner address The address which owns the funds.\n * @param _spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address _owner, address _spender) public view returns (uint256) {\n return allowed[_owner][_spender];\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(address _spender, uint _addedValue) public returns (bool) {\n allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {\n uint oldValue = allowed[msg.sender][_spender];\n if (_subtractedValue > oldValue) {\n allowed[msg.sender][_spender] = 0;\n } else {\n allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);\n }\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n\ncontract Recoverable is Ownable {\n\n /// @dev Empty constructor (for now)\n function Recoverable() {\n }\n\n /// @dev This will be invoked by the owner, when owner wants to rescue tokens\n /// @param token Token which will we rescue to the owner from the contract\n function recoverTokens(ERC20Basic token) onlyOwner public {\n token.transfer(owner, tokensToBeReturned(token));\n }\n\n /// @dev Interface function, can be overwritten by the superclass\n /// @param token Token which balance we will check and return\n /// @return The amount of tokens (in smallest denominator) the contract owns\n function tokensToBeReturned(ERC20Basic token) public returns (uint) {\n return token.balanceOf(this);\n }\n}\n\n\n\n/**\n * Standard EIP-20 token with an interface marker.\n *\n * @notice Interface marker is used by crowdsale contracts to validate that addresses point a good token contract.\n *\n */\ncontract StandardTokenExt is StandardToken, Recoverable {\n\n /* Interface declaration */\n function isToken() public constant returns (bool weAre) {\n return true;\n }\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Upgrade agent interface inspired by Lunyr.\n *\n * Upgrade agent transfers tokens to a new contract.\n * Upgrade agent itself can be the token contract, or just a middle man contract doing the heavy lifting.\n */\ncontract UpgradeAgent {\n\n uint public originalSupply;\n\n /** Interface marker */\n function isUpgradeAgent() public constant returns (bool) {\n return true;\n }\n\n function upgradeFrom(address _from, uint256 _value) public;\n\n}\n\n\n/**\n * A token upgrade mechanism where users can opt-in amount of tokens to the next smart contract revision.\n *\n * First envisioned by Golem and Lunyr projects.\n */\ncontract UpgradeableToken is StandardTokenExt {\n\n /** Contract / person who can set the upgrade path. This can be the same as team multisig wallet, as what it is with its default value. */\n address public upgradeMaster;\n\n /** The next contract where the tokens will be migrated. */\n UpgradeAgent public upgradeAgent;\n\n /** How many tokens we have upgraded by now. */\n uint256 public totalUpgraded;\n\n /**\n * Upgrade states.\n *\n * - NotAllowed: The child contract has not reached a condition where the upgrade can bgun\n * - WaitingForAgent: Token allows upgrade, but we don't have a new agent yet\n * - ReadyToUpgrade: The agent is set, but not a single token has been upgraded yet\n * - Upgrading: Upgrade agent is set and the balance holders can upgrade their tokens\n *\n */\n enum UpgradeState {Unknown, NotAllowed, WaitingForAgent, ReadyToUpgrade, Upgrading}\n\n /**\n * Somebody has upgraded some of his tokens.\n */\n event Upgrade(address indexed _from, address indexed _to, uint256 _value);\n\n /**\n * New upgrade agent available.\n */\n event UpgradeAgentSet(address agent);\n\n /**\n * Do not allow construction without upgrade master set.\n */\n function UpgradeableToken(address _upgradeMaster) {\n upgradeMaster = _upgradeMaster;\n }\n\n /**\n * Allow the token holder to upgrade some of their tokens to a new contract.\n */\n function upgrade(uint256 value) public {\n\n UpgradeState state = getUpgradeState();\n if(!(state == UpgradeState.ReadyToUpgrade || state == UpgradeState.Upgrading)) {\n // Called in a bad state\n throw;\n }\n\n // Validate input value.\n if (value == 0) throw;\n\n balances[msg.sender] = balances[msg.sender].sub(value);\n\n // Take tokens out from circulation\n totalSupply_ = totalSupply_.sub(value);\n totalUpgraded = totalUpgraded.add(value);\n\n // Upgrade agent reissues the tokens\n upgradeAgent.upgradeFrom(msg.sender, value);\n Upgrade(msg.sender, upgradeAgent, value);\n }\n\n /**\n * Set an upgrade agent that handles\n */\n function setUpgradeAgent(address agent) external {\n\n if(!canUpgrade()) {\n // The token is not yet in a state that we could think upgrading\n throw;\n }\n\n if (agent == 0x0) throw;\n // Only a master can designate the next agent\n if (msg.sender != upgradeMaster) throw;\n // Upgrade has already begun for an agent\n if (getUpgradeState() == UpgradeState.Upgrading) throw;\n\n upgradeAgent = UpgradeAgent(agent);\n\n // Bad interface\n if(!upgradeAgent.isUpgradeAgent()) throw;\n // Make sure that token supplies match in source and target\n if (upgradeAgent.originalSupply() != totalSupply_) throw;\n\n UpgradeAgentSet(upgradeAgent);\n }\n\n /**\n * Get the state of the token upgrade.\n */\n function getUpgradeState() public constant returns(UpgradeState) {\n if(!canUpgrade()) return UpgradeState.NotAllowed;\n else if(address(upgradeAgent) == 0x00) return UpgradeState.WaitingForAgent;\n else if(totalUpgraded == 0) return UpgradeState.ReadyToUpgrade;\n else return UpgradeState.Upgrading;\n }\n\n /**\n * Change the upgrade master.\n *\n * This allows us to set a new owner for the upgrade mechanism.\n */\n function setUpgradeMaster(address master) public {\n if (master == 0x0) throw;\n if (msg.sender != upgradeMaster) throw;\n upgradeMaster = master;\n }\n\n /**\n * Child contract can enable to provide the condition when the upgrade can begun.\n */\n function canUpgrade() public constant returns(bool) {\n return true;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n/**\n * Define interface for releasing the token transfer after a successful crowdsale.\n */\ncontract ReleasableToken is StandardTokenExt {\n\n /* The finalizer contract that allows unlift the transfer limits on this token */\n address public releaseAgent;\n\n /** A crowdsale contract can release us to the wild if ICO success. If false we are are in transfer lock up period.*/\n bool public released = false;\n\n /** Map of agents that are allowed to transfer tokens regardless of the lock down period. These are crowdsale contracts and possible the team multisig itself. */\n mapping (address => bool) public transferAgents;\n\n /**\n * Limit token transfer until the crowdsale is over.\n *\n */\n modifier canTransfer(address _sender) {\n\n if(!released) {\n if(!transferAgents[_sender]) {\n throw;\n }\n }\n\n _;\n }\n\n /**\n * Set the contract that can call release and make the token transferable.\n *\n * Design choice. Allow reset the release agent to fix fat finger mistakes.\n */\n function setReleaseAgent(address addr) onlyOwner inReleaseState(false) public {\n\n // We don't do interface check here as we might want to a normal wallet address to act as a release agent\n releaseAgent = addr;\n }\n\n /**\n * Owner can allow a particular address (a crowdsale contract) to transfer tokens despite the lock up period.\n */\n function setTransferAgent(address addr, bool state) onlyOwner inReleaseState(false) public {\n transferAgents[addr] = state;\n }\n\n /**\n * One way function to release the tokens to the wild.\n *\n * Can be called only from the release agent that is the final ICO contract. It is only called if the crowdsale has been success (first milestone reached).\n */\n function releaseTokenTransfer() public onlyReleaseAgent {\n released = true;\n }\n\n /** The function can be called only before or after the tokens have been releasesd */\n modifier inReleaseState(bool releaseState) {\n if(releaseState != released) {\n throw;\n }\n _;\n }\n\n /** The function can be called only by a whitelisted release agent. */\n modifier onlyReleaseAgent() {\n if(msg.sender != releaseAgent) {\n throw;\n }\n _;\n }\n\n function transfer(address _to, uint _value) canTransfer(msg.sender) returns (bool success) {\n // Call StandardToken.transfer()\n return super.transfer(_to, _value);\n }\n\n function transferFrom(address _from, address _to, uint _value) canTransfer(_from) returns (bool success) {\n // Call StandardToken.transferForm()\n return super.transferFrom(_from, _to, _value);\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Safe unsigned safe math.\n *\n * https://blog.aragon.one/library-driven-development-in-solidity-2bebcaf88736#.750gwtwli\n *\n * Originally from https://raw.githubusercontent.com/AragonOne/zeppelin-solidity/master/contracts/SafeMathLib.sol\n *\n * Maintained here until merged to mainline zeppelin-solidity.\n *\n */\nlibrary SafeMathLib {\n\n function times(uint a, uint b) returns (uint) {\n uint c = a * b;\n assert(a == 0 || c / a == b);\n return c;\n }\n\n function minus(uint a, uint b) returns (uint) {\n assert(b <= a);\n return a - b;\n }\n\n function plus(uint a, uint b) returns (uint) {\n uint c = a + b;\n assert(c>=a);\n return c;\n }\n\n}\n\n\n\n/**\n * A token that can increase its supply by another contract.\n *\n * This allows uncapped crowdsale by dynamically increasing the supply when money pours in.\n * Only mint agents, contracts whitelisted by owner, can mint new tokens.\n *\n */\ncontract MintableToken is StandardTokenExt {\n\n using SafeMathLib for uint;\n\n bool public mintingFinished = false;\n\n /** List of agents that are allowed to create new tokens */\n mapping (address => bool) public mintAgents;\n\n event MintingAgentChanged(address addr, bool state);\n event Minted(address receiver, uint amount);\n\n /**\n * Create new tokens and allocate them to an address..\n *\n * Only callably by a crowdsale contract (mint agent).\n */\n function mint(address receiver, uint amount) onlyMintAgent canMint public {\n totalSupply_ = totalSupply_.plus(amount);\n balances[receiver] = balances[receiver].plus(amount);\n\n // This will make the mint transaction apper in EtherScan.io\n // We can remove this after there is a standardized minting event\n Transfer(0, receiver, amount);\n }\n\n /**\n * Owner can allow a crowdsale contract to mint new tokens.\n */\n function setMintAgent(address addr, bool state) onlyOwner canMint public {\n mintAgents[addr] = state;\n MintingAgentChanged(addr, state);\n }\n\n modifier onlyMintAgent() {\n // Only crowdsale contracts are allowed to mint new tokens\n if(!mintAgents[msg.sender]) {\n throw;\n }\n _;\n }\n\n /** Make sure we are not done yet. */\n modifier canMint() {\n if(mintingFinished) throw;\n _;\n }\n}\n\n\n\n/**\n * A crowdsaled token.\n *\n * An ERC-20 token designed specifically for crowdsales with investor protection and further development path.\n *\n * - The token transfer() is disabled until the crowdsale is over\n * - The token contract gives an opt-in upgrade path to a new contract\n * - The same token can be part of several crowdsales through approve() mechanism\n * - The token can be capped (supply set in the constructor) or uncapped (crowdsale contract can mint new tokens)\n *\n */\ncontract CrowdsaleToken is ReleasableToken, MintableToken, UpgradeableToken {\n\n /** Name and symbol were updated. */\n event UpdatedTokenInformation(string newName, string newSymbol);\n\n string public name;\n\n string public symbol;\n\n uint public decimals;\n\n /**\n * Construct the token.\n *\n * This token must be created through a team multisig wallet, so that it is owned by that wallet.\n *\n * @param _name Token name\n * @param _symbol Token symbol - should be all caps\n * @param _initialSupply How many tokens we start with\n * @param _decimals Number of decimal places\n * @param _mintable Are new tokens created over the crowdsale or do we distribute only the initial supply? Note that when the token becomes transferable the minting always ends.\n */\n function CrowdsaleToken(string _name, string _symbol, uint _initialSupply, uint _decimals, bool _mintable)\n UpgradeableToken(msg.sender) {\n\n // Create any address, can be transferred\n // to team multisig via changeOwner(),\n // also remember to call setUpgradeMaster()\n owner = msg.sender;\n\n name = _name;\n symbol = _symbol;\n\n totalSupply_ = _initialSupply;\n\n decimals = _decimals;\n\n // Create initially all balance on the team multisig\n balances[owner] = totalSupply_;\n\n if(totalSupply_ > 0) {\n Minted(owner, totalSupply_);\n }\n\n // No more new supply allowed after the token creation\n if(!_mintable) {\n mintingFinished = true;\n if(totalSupply_ == 0) {\n throw; // Cannot create a token without supply and no minting\n }\n }\n }\n\n /**\n * When token is released to be transferable, enforce no new tokens can be created.\n */\n function releaseTokenTransfer() public onlyReleaseAgent {\n mintingFinished = true;\n super.releaseTokenTransfer();\n }\n\n /**\n * Allow upgrade agent functionality kick in only if the crowdsale was success.\n */\n function canUpgrade() public constant returns(bool) {\n return released && super.canUpgrade();\n }\n\n /**\n * Owner can update token information here.\n *\n * It is often useful to conceal the actual token association, until\n * the token operations, like central issuance or reissuance have been completed.\n *\n * This function allows the token owner to rename the token after the operations\n * have been completed and then point the audience to use the token contract.\n */\n function setTokenInformation(string _name, string _symbol) onlyOwner {\n name = _name;\n symbol = _symbol;\n\n UpdatedTokenInformation(name, symbol);\n }\n\n}\n\n\ninterface SecurityTransferAgent {\n function verify(address from, address to, uint256 value) public view returns (uint256 newValue);\n}\n\n\n\n\n\n\n\n/**\n * @title Whitelist\n * @dev The Whitelist contract has a whitelist of addresses, and provides basic authorization control functions.\n * @dev This simplifies the implementation of \"user permissions\".\n */\ncontract Whitelist is Ownable {\n mapping(address => bool) public whitelist;\n \n event WhitelistedAddressAdded(address addr);\n event WhitelistedAddressRemoved(address addr);\n\n /**\n * @dev Throws if called by any account that's not whitelisted.\n */\n modifier onlyWhitelisted() {\n require(whitelist[msg.sender]);\n _;\n }\n\n /**\n * @dev add an address to the whitelist\n * @param addr address\n * @return true if the address was added to the whitelist, false if the address was already in the whitelist \n */\n function addAddressToWhitelist(address addr) onlyOwner public returns(bool success) {\n if (!whitelist[addr]) {\n whitelist[addr] = true;\n WhitelistedAddressAdded(addr);\n success = true; \n }\n }\n\n /**\n * @dev add addresses to the whitelist\n * @param addrs addresses\n * @return true if at least one address was added to the whitelist, \n * false if all addresses were already in the whitelist \n */\n function addAddressesToWhitelist(address[] addrs) onlyOwner public returns(bool success) {\n for (uint256 i = 0; i < addrs.length; i++) {\n if (addAddressToWhitelist(addrs[i])) {\n success = true;\n }\n }\n }\n\n /**\n * @dev remove an address from the whitelist\n * @param addr address\n * @return true if the address was removed from the whitelist, \n * false if the address wasn't in the whitelist in the first place \n */\n function removeAddressFromWhitelist(address addr) onlyOwner public returns(bool success) {\n if (whitelist[addr]) {\n whitelist[addr] = false;\n WhitelistedAddressRemoved(addr);\n success = true;\n }\n }\n\n /**\n * @dev remove addresses from the whitelist\n * @param addrs addresses\n * @return true if at least one address was removed from the whitelist, \n * false if all addresses weren't in the whitelist in the first place\n */\n function removeAddressesFromWhitelist(address[] addrs) onlyOwner public returns(bool success) {\n for (uint256 i = 0; i < addrs.length; i++) {\n if (removeAddressFromWhitelist(addrs[i])) {\n success = true;\n }\n }\n }\n\n}\n\n\n\n\n\ninterface ERC677Receiver {\n function tokenFallback(address from, uint256 amount, bytes data) returns (bool success);\n}\n\ninterface ERC677 {\n\n // TODO: Have a different event name to make sure that tools with bad APIs do not mix this with ERC-20 Transfer() event that lacks data parameter\n event ERC677Transfer(address from, address receiver, uint256 amount, bytes data);\n\n function transferAndCall(ERC677Receiver receiver, uint amount, bytes data) returns (bool success);\n}\n\n\n\ncontract ERC677Token is ERC20, ERC677 {\n function transferAndCall(ERC677Receiver receiver, uint amount, bytes data) returns (bool success) {\n require(transfer(address(receiver), amount));\n\n ERC677Transfer(msg.sender, address(receiver), amount, data);\n\n require(receiver.tokenFallback(msg.sender, amount, data));\n }\n}\n\n\n/**\n * @author TokenMarket / Ville Sundell \n */\ncontract CheckpointToken is ERC677Token {\n using SafeMath for uint256; // We use only uint256 for safety reasons (no boxing)\n\n /// @dev Name of the token, usually the company and/or series (like \"TokenMeerkat Ltd. Series A\"):\n string public name;\n /// @dev Ticker symbol, usually bases on the \"name\" above (like \"MEER\"):\n string public symbol;\n /// @dev Decimals are usually set to 18 for EIP-20 tokens:\n uint256 public decimals;\n /// @dev If transferVerifier is set, that contract will be queried upon every token transaction:\n SecurityTransferAgent public transferVerifier;\n\n /// @dev Checkpoint is the fundamental unit for our internal accounting\n /// (who owns what, and at what moment in time)\n struct Checkpoint {\n uint256 blockNumber;\n uint256 value;\n }\n /// @dev This mapping contains checkpoints for every address:\n mapping (address => Checkpoint[]) public tokenBalances;\n /// @dev This is a one dimensional Checkpoint mapping of the overall token supply:\n Checkpoint[] public tokensTotal;\n\n /// @dev This mapping keeps account for approve() -> fransferFrom() pattern:\n mapping (address => mapping (address => uint256)) public allowed;\n\n /**\n * @dev Constructor for CheckpointToken, initializing the token\n *\n * Here we define initial values for name, symbol and decimals.\n *\n * @param _name Initial name of the token\n * @param _symbol Initial symbol of the token\n * @param _decimals Number of decimals for the token, industry standard is 18\n */\n function CheckpointToken(string _name, string _symbol, uint256 _decimals) public {\n name = _name;\n symbol = _symbol;\n decimals = _decimals;\n }\n\n /** PUBLIC FUNCTIONS\n ****************************************/\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param owner address The address which owns the funds.\n * @param spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address owner, address spender) public view returns (uint256) {\n return allowed[owner][spender];\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n *\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param spender The address which will spend the funds.\n * @param value The amount of tokens to be spent.\n * @return true if the call function was executed successfully\n */\n function approve(address spender, uint256 value) public returns (bool) {\n allowed[msg.sender][spender] = value;\n Approval(msg.sender, spender, value);\n return true;\n }\n\n /**\n * @dev Transfer tokens from one address to another\n * @param from address The address which you want to send tokens from\n * @param to address The address which you want to transfer to\n * @param value uint256 the amount of tokens to be transferred\n * @return true if the call function was executed successfully\n */\n function transferFrom(address from, address to, uint256 value) public returns (bool) {\n require(value <= allowed[from][msg.sender]);\n\n transferInternal(from, to, value);\n Transfer(from, to, value);\n return true;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param to The address to transfer to.\n * @param value The amount to be transferred.\n * @return true if the call function was executed successfully\n */\n function transfer(address to, uint256 value) public returns (bool) {\n transferInternal(msg.sender, to, value);\n Transfer(msg.sender, to, value);\n return true;\n }\n\n /**\n * @dev total number of tokens in existence\n * @return A uint256 specifying the total number of tokens in existence\n */\n function totalSupply() public view returns (uint256 tokenCount) {\n tokenCount = balanceAtBlock(tokensTotal, block.number);\n }\n\n /**\n * @dev total number of tokens in existence at the given block\n * @param blockNumber The block number we want to query for the total supply\n * @return A uint256 specifying the total number of tokens at a given block\n */\n function totalSupplyAt(uint256 blockNumber) public view returns (uint256 tokenCount) {\n tokenCount = balanceAtBlock(tokensTotal, blockNumber);\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address owner) public view returns (uint256 balance) {\n balance = balanceAtBlock(tokenBalances[owner], block.number);\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param owner The address to query the the balance of.\n * @param blockNumber The block number we want to query for the balance.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceAt(address owner, uint256 blockNumber) public view returns (uint256 balance) {\n balance = balanceAtBlock(tokenBalances[owner], blockNumber);\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param spender The address which will spend the funds.\n * @param addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(address spender, uint addedValue) public returns (bool) {\n allowed[msg.sender][spender] = allowed[msg.sender][spender].add(addedValue);\n Approval(msg.sender, spender, allowed[msg.sender][spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param spender The address which will spend the funds.\n * @param subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(address spender, uint subtractedValue) public returns (bool) {\n uint oldValue = allowed[msg.sender][spender];\n if (subtractedValue > oldValue) {\n allowed[msg.sender][spender] = 0;\n } else {\n allowed[msg.sender][spender] = oldValue.sub(subtractedValue);\n }\n Approval(msg.sender, spender, allowed[msg.sender][spender]);\n return true;\n }\n\n /**\n * @dev Addition to StandardToken methods. Increase the amount of tokens that\n * an owner allowed to a spender and execute a call with the sent data.\n *\n * This is originally from OpenZeppelin.\n *\n * approve should be called when allowed[spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param spender The address which will spend the funds.\n * @param addedValue The amount of tokens to increase the allowance by.\n * @param data ABI-encoded contract call to call `spender` address.\n */\n function increaseApproval(address spender, uint addedValue, bytes data) public returns (bool) {\n require(spender != address(this));\n\n increaseApproval(spender, addedValue);\n\n require(spender.call(data));\n\n return true;\n }\n\n /**\n * @dev Addition to StandardToken methods. Decrease the amount of tokens that\n * an owner allowed to a spender and execute a call with the sent data.\n *\n * This is originally from OpenZeppelin.\n *\n * approve should be called when allowed[spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param spender The address which will spend the funds.\n * @param subtractedValue The amount of tokens to decrease the allowance by.\n * @param data ABI-encoded contract call to call `spender` address.\n */\n function decreaseApproval(address spender, uint subtractedValue, bytes data) public returns (bool) {\n require(spender != address(this));\n\n decreaseApproval(spender, subtractedValue);\n\n require(spender.call(data));\n\n return true;\n }\n\n /** INTERNALS\n ****************************************/\n\n function balanceAtBlock(Checkpoint[] storage checkpoints, uint256 blockNumber) internal returns (uint256 balance) {\n uint256 currentBlockNumber;\n (currentBlockNumber, balance) = getCheckpoint(checkpoints, blockNumber);\n }\n\n function transferInternal(address from, address to, uint256 value) internal {\n uint256 fromBalance = balanceOf(from);\n uint256 toBalance = balanceOf(to);\n\n if (address(transferVerifier) != address(0)) {\n value = transferVerifier.verify(from, to, value);\n require(value > 0);\n }\n\n setCheckpoint(tokenBalances[from], fromBalance.sub(value));\n setCheckpoint(tokenBalances[to], toBalance.add(value));\n }\n\n\n /** CORE\n ** The Magic happens below:\n ***************************************/\n\n function setCheckpoint(Checkpoint[] storage checkpoints, uint256 newValue) internal {\n if ((checkpoints.length == 0) || (checkpoints[checkpoints.length.sub(1)].blockNumber < block.number)) {\n checkpoints.push(Checkpoint(block.number, newValue));\n } else {\n checkpoints[checkpoints.length.sub(1)] = Checkpoint(block.number, newValue);\n }\n }\n\n function getCheckpoint(Checkpoint[] storage checkpoints, uint256 blockNumber) internal returns (uint256 blockNumber_, uint256 value) {\n if (checkpoints.length == 0) {\n return (0, 0);\n }\n\n // Shortcut for the actual value\n if (blockNumber >= checkpoints[checkpoints.length.sub(1)].blockNumber) {\n return (checkpoints[checkpoints.length.sub(1)].blockNumber, checkpoints[checkpoints.length.sub(1)].value);\n }\n\n if (blockNumber < checkpoints[0].blockNumber) {\n return (0, 0);\n }\n\n // Binary search of the value in the array\n uint256 min = 0;\n uint256 max = checkpoints.length.sub(1);\n while (max > min) {\n uint256 mid = (max.add(min.add(1))).div(2);\n if (checkpoints[mid].blockNumber <= blockNumber) {\n min = mid;\n } else {\n max = mid.sub(1);\n }\n }\n\n return (checkpoints[min].blockNumber, checkpoints[min].value);\n }\n}\n\n\n\n\n/* Largely copied from https://github.com/OpenZeppelin/openzeppelin-solidity/pull/741/files */\n\ncontract ERC865 is CheckpointToken {\n /** @dev This is used to prevent nonce reuse: */\n mapping(bytes => bool) signatures;\n\n event TransferPreSigned(address indexed from, address indexed to, address indexed delegate, uint256 amount, uint256 fee);\n event Debug(address from, bytes32 hash);\n\n /**\n * @notice Submit a presigned transfer\n * @param _signature bytes The signature, issued by the owner.\n * @param _to address The address which you want to transfer to.\n * @param _value uint256 The amount of tokens to be transferred.\n * @param _fee uint256 The amount of tokens paid to msg.sender, by the person who used to own the tokens.\n * @param _nonce uint256 Presigned transaction number\n */\n function transferPreSigned(\n bytes _signature,\n address _to,\n uint256 _value,\n uint256 _fee,\n uint256 _nonce\n )\n public\n returns (bool)\n {\n require(_to != address(0));\n require(signatures[_signature] == false);\n bytes32 hashedTx = transferPreSignedHashing(address(this), _to, _value, _fee, _nonce);\n address from = recover(hashedTx, _signature);\n require(from != address(0));\n\n transferInternal(from, _to, _value);\n transferInternal(from, msg.sender, _fee);\n\n signatures[_signature] = true;\n TransferPreSigned(from, _to, msg.sender, _value, _fee);\n Transfer(from, _to, _value);\n Transfer(from, msg.sender, _fee);\n return true;\n }\n\n /**\n * @notice Hash (keccak256) of the payload used by transferPreSigned\n * @param _token address The address of the token.\n * @param _to address The address which you want to transfer to.\n * @param _value uint256 The amount of tokens to be transferred.\n * @param _fee uint256 The amount of tokens paid to msg.sender, by the owner.\n * @param _nonce uint256 Presigned transaction number.\n */\n function transferPreSignedHashing(\n address _token,\n address _to,\n uint256 _value,\n uint256 _fee,\n uint256 _nonce\n )\n public\n pure\n returns (bytes32)\n {\n /* \"48664c16\": transferPreSignedHashing(address,address,address,uint256,uint256,uint256) */\n return keccak256(bytes4(0x48664c16), _token, _to, _value, _fee, _nonce);\n }\n\n /**\n * @notice Recover signer address from a message by using his signature.\n * Signature is delivered as a byte array, hence need for this\n * implementation.\n * @param hash bytes32 message, the hash is the signed message. What is recovered is the signer address.\n * @param sig bytes signature, the signature is generated using web3.eth.sign()\n */\n function recover(bytes32 hash, bytes sig) public pure returns (address) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n\n /* Check the signature length */\n if (sig.length != 65) {\n return (address(0));\n }\n\n /* Divide the signature in r, s and v variables */\n assembly {\n r := mload(add(sig, 32))\n s := mload(add(sig, 64))\n v := byte(0, mload(add(sig, 96)))\n }\n\n /* Version of signature should be 27 or 28, but 0 and 1 are also possible versions */\n if (v < 27) {\n v += 27;\n }\n\n /* If the version is correct return the signer address */\n if (v != 27 && v != 28) {\n return (address(0));\n } else {\n return ecrecover(hash, v, r, s);\n }\n }\n\n}\n\n\n\ncontract InvestorInteractionContract is BogusAnnouncement, CheckpointToken, ERC865 {\n uint256 public blockNumber;\n CheckpointToken public token;\n mapping(address => bool) public balanceImported;\n\n KYCInterface public KYC;\n\n mapping(address => bytes32) public options;\n mapping(address => mapping(address => uint256)) public used;\n uint256 public optionsTotal;\n uint256 public maximumSupply;\n\n event OptionAdded(address option, bytes32 description);\n event IICCreated(address token, address KYC, uint256 blockNumber, uint256 maximumSupply);\n\n function InvestorInteractionContract(CheckpointToken _token, KYCInterface _KYC, bytes32 name, bytes32 URI, uint256 _type, uint256 _hash, uint256 _blockNumber, bytes32[] _options) CheckpointToken(\"\", \"\", 18) BogusAnnouncement(name, URI, _type, _hash) public {\n token = _token;\n if (_blockNumber > 0) {\n blockNumber = _blockNumber;\n } else {\n blockNumber = block.number;\n }\n KYC = _KYC;\n\n for(uint i=0; i<_options.length; i++) {\n address optionAddress = address(100 + i);\n options[optionAddress] = _options[i];\n\n OptionAdded(optionAddress, _options[i]);\n }\n\n maximumSupply = token.totalSupplyAt(blockNumber);\n\n IICCreated(_token, _KYC, _blockNumber, maximumSupply);\n }\n\n function importInvestor(address investor) public {\n // Anyone can invoke this for failsafe reasons\n\n require(balanceImported[investor] == false);\n\n uint256 value = token.balanceAt(investor, blockNumber);\n uint256 blackHoleBalance = balanceOf(address(0));\n uint256 totalSupplyNow = totalSupply();\n\n setCheckpoint(tokenBalances[address(0)], blackHoleBalance.add(value));\n transferInternal(address(0), investor, value);\n setCheckpoint(tokensTotal, totalSupplyNow.add(value));\n\n balanceImported[investor] = true;\n Transfer(address(0), investor, value);\n }\n\n function transferTrigger(address from, address to, uint256 amount) internal {\n used[to][from] += amount;\n }\n\n function transfer(address _to, uint256 _value) public returns (bool) {\n if (balanceImported[msg.sender] == false) {\n importInvestor(msg.sender);\n }\n\n if (options[_to] != 0) {\n require(KYC.isWhitelisted(msg.sender));\n transferTrigger(msg.sender, _to, _value);\n }\n\n // Doing this as msg.sender:\n return super.transfer(_to, _value);\n }\n\n function transferInvestorTokens(address to, uint256 amount) {\n transfer(to, amount);\n }\n\n function act(uint256 amount) external {\n // This is for the default action, address 100\n transferInvestorTokens(address(100), amount);\n }\n}\n\n\n\ncontract PayoutContract is InvestorInteractionContract {\n ERC20 payoutToken;\n address from;\n uint256 initialBalance;\n uint256 oneUnit;\n\n function PayoutContract(CheckpointToken _token, ERC20 _payoutToken, KYCInterface _KYC, bytes32 name, bytes32 URI, uint256 _type, uint256 _hash, bytes32[] _options) InvestorInteractionContract(_token, _KYC, name, URI, _type, _hash, 0, _options) {\n payoutToken = _payoutToken;\n from = msg.sender;\n }\n\n function fetchTokens() external {\n require(initialBalance == 0);\n\n uint256 allowed = payoutToken.allowance(from, address(this));\n payoutToken.transferFrom(from, address(this), allowed);\n\n initialBalance = payoutToken.balanceOf(address(this));\n oneUnit = initialBalance / maximumSupply;\n }\n\n function transferTrigger(address from, address to, uint256 amount) internal {\n payoutToken.transfer(from, amount * oneUnit);\n super.transferTrigger(from, to, amount);\n }\n\n}\n"}, "PreICOProxyBuyer": {"abi": [{"constant": true, "inputs": [], "name": "weiMinimumLimit", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "getState", "outputs": [{"name": "", "type": "uint8"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "getToken", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "balances", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "amount", "type": "uint256"}], "name": "claim", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "investor", "type": "address"}], "name": "getClaimLeft", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "uint256"}], "name": "investors", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "weiRaised", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_crowdsale", "type": "address"}], "name": "setCrowdsale", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "refund", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_timeLock", "type": "uint256"}], "name": "setTimeLock", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "halt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "freezeEndsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "tokensBought", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "weiCap", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "loadRefund", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "claimCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isPresale", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}], "name": "buyWithCustomerId", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "crowdsale", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "buy", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "weiMaximumLimit", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "halted", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "forceRefund", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "claimed", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "unhalt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "timeLock", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "claimAll", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "buyForEverybody", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalClaimed", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "investorCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "forcedRefund", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "investor", "type": "address"}], "name": "getClaimAmount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [{"name": "_owner", "type": "address"}, {"name": "_freezeEndsAt", "type": "uint256"}, {"name": "_weiMinimumLimit", "type": "uint256"}, {"name": "_weiMaximumLimit", "type": "uint256"}, {"name": "_weiCap", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"payable": true, "stateMutability": "payable", "type": "fallback"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}, {"indexed": false, "name": "tokenAmount", "type": "uint256"}, {"indexed": false, "name": "customerId", "type": "uint128"}], "name": "Invested", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Refunded", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "count", "type": "uint256"}], "name": "TokensBoughts", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "count", "type": "uint256"}], "name": "Distributed", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "bytecode": "0x608060405234801561001057600080fd5b5060405160a080611204833981016040908152815160208301519183015160608401516080909401516000805433600160a060020a03199182161716600160a060020a0385161790559193909183151561006957600080fd5b82151561007557600080fd5b81151561008157600080fd5b60079290925560085560095560065550611164806100a06000396000f3006080604052600436106101b65763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416631540fe2281146101bb5780631865c57d146101e257806321df0da71461021b57806327e235e31461024c578063379607f51461026d5780633c67b6b7146102875780633feb5f2b146102a85780634042b66f146102c0578063483a20b2146102d5578063590e1ae3146102f65780635bcb318a1461030b5780635ed7ca5b146103235780636962b01014610338578063732783ac1461034d57806384fe50291461036257806387612102146103775780638da4d3c91461037f5780638da5cb5b1461039457806395364a84146103a957806399e9376c146103d25780639c1e03a0146103ef578063a6f2ae3a14610404578063aa5581ef1461040c578063b9b8af0b14610421578063bd7427f814610436578063c884ef831461044b578063cb3e64fd1461046c578063d085835a14610481578063d1058e5914610496578063d4607048146104ab578063d54ad2a1146104c0578063d7e64c00146104d5578063dba2d875146104ea578063dde070e8146104ff578063f2fde38b14610520575b600080fd5b3480156101c757600080fd5b506101d0610541565b60408051918252519081900360200190f35b3480156101ee57600080fd5b506101f7610547565b6040518082600381111561020757fe5b60ff16815260200191505060405180910390f35b34801561022757600080fd5b50610230610586565b60408051600160a060020a039092168252519081900360200190f35b34801561025857600080fd5b506101d0600160a060020a0360043516610642565b34801561027957600080fd5b50610285600435610654565b005b34801561029357600080fd5b506101d0600160a060020a0360043516610826565b3480156102b457600080fd5b5061023060043561085e565b3480156102cc57600080fd5b506101d0610886565b3480156102e157600080fd5b50610285600160a060020a036004351661088c565b34801561030257600080fd5b50610285610966565b34801561031757600080fd5b50610285600435610a54565b34801561032f57600080fd5b50610285610a70565b34801561034457600080fd5b506101d0610abe565b34801561035957600080fd5b506101d0610ac4565b34801561036e57600080fd5b506101d0610aca565b610285610ad0565b34801561038b57600080fd5b506101d0610af1565b3480156103a057600080fd5b50610230610af7565b3480156103b557600080fd5b506103be610b06565b604080519115158252519081900360200190f35b6102856fffffffffffffffffffffffffffffffff60043516610b0b565b3480156103fb57600080fd5b50610230610b3c565b610285610b50565b34801561041857600080fd5b506101d0610b82565b34801561042d57600080fd5b506103be610b88565b34801561044257600080fd5b50610285610ba9565b34801561045757600080fd5b506101d0600160a060020a0360043516610bcf565b34801561047857600080fd5b50610285610be1565b34801561048d57600080fd5b506101d0610c41565b3480156104a257600080fd5b50610285610c47565b3480156104b757600080fd5b50610285610c58565b3480156104cc57600080fd5b506101d0610e46565b3480156104e157600080fd5b506101d0610e4c565b3480156104f657600080fd5b506103be610e52565b34801561050b57600080fd5b506101d0600160a060020a0360043516610e5b565b34801561052c57600080fd5b50610285600160a060020a0360043516610eba565b60075481565b600e5460009060ff161561055d57506003610583565b600a54151561057f57600654421061057757506003610583565b506001610583565b5060025b90565b600e546000906101009004600160a060020a031615156105a557600080fd5b600e60019054906101000a9004600160a060020a0316600160a060020a031663fc0c546a6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561061157600080fd5b505af1158015610625573d6000803e3d6000fd5b505050506040513d602081101561063b57600080fd5b5051905090565b60046020526000908152604090205481565b6000805474010000000000000000000000000000000000000000900460ff161561067d57600080fd5b600d54421161068b57600080fd5b503381151561069957600080fd5b816106a382610826565b10156106ae57600080fd5b600160a060020a03811660009081526005602052604090205415156106d757600b805460010190555b600160a060020a038116600090815260056020526040902054610700908363ffffffff610f4e16565b600160a060020a038216600090815260056020526040902055600c5461072c908363ffffffff610f4e16565b600c55610737610586565b600160a060020a031663a9059cbb82846040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b1580156107b257600080fd5b505af11580156107c6573d6000803e3d6000fd5b505050506040513d60208110156107dc57600080fd5b505060408051600160a060020a03831681526020810184905281517fb649c98f58055c520df0dcb5709eff2e931217ff2fb1e21376130d31bbb1c0af929181900390910190a15050565b600160a060020a0381166000908152600560205260408120546108589061084c84610e5b565b9063ffffffff610f6816565b92915050565b600380548290811061086c57fe5b600091825260209091200154600160a060020a0316905081565b60025481565b600054600160a060020a031633146108a357600080fd5b80600e60016101000a815481600160a060020a030219169083600160a060020a03160217905550600e60019054906101000a9004600160a060020a0316600160a060020a0316634551dd596040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561093657600080fd5b505af115801561094a573d6000803e3d6000fd5b505050506040513d602081101561096057600080fd5b50505b50565b60008054819074010000000000000000000000000000000000000000900460ff161561099157600080fd5b600361099b610547565b60038111156109a657fe5b146109b057600080fd5b3360008181526004602052604090205490925015156109ce57600080fd5b50600160a060020a038116600081815260046020526040808220805490839055905190929183919081818185875af1925050501515610a0c57600080fd5b60408051600160a060020a03841681526020810183905281517fd7dee2702d63ad89917b6a4da9981c90c4d24f8c2bdfd64c604ecae57d8d0651929181900390910190a15050565b600054600160a060020a03163314610a6b57600080fd5b600d55565b600054600160a060020a03163314610a8757600080fd5b6000805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b60065481565b600a5481565b60095481565b6003610ada610547565b6003811115610ae557fe5b14610aef57600080fd5b565b600b5481565b600054600160a060020a031681565b600190565b60005474010000000000000000000000000000000000000000900460ff1615610b3357600080fd5b61096381610f7a565b600e546101009004600160a060020a031681565b60005474010000000000000000000000000000000000000000900460ff1615610b7857600080fd5b610aef6000610f7a565b60085481565b60005474010000000000000000000000000000000000000000900460ff1681565b600054600160a060020a03163314610bc057600080fd5b600e805460ff19166001179055565b60056020526000908152604090205481565b600054600160a060020a03163314610bf857600080fd5b60005474010000000000000000000000000000000000000000900460ff161515610c2157600080fd5b6000805474ff000000000000000000000000000000000000000019169055565b600d5481565b610aef610c5333610826565b610654565b60005474010000000000000000000000000000000000000000900460ff168015610c8d5750600054600160a060020a03163314155b15610c9757600080fd5b6001610ca1610547565b6003811115610cac57fe5b14610cb657600080fd5b600e546101009004600160a060020a03161515610cd257600080fd5b600e54600254604080517f03f9c7930000000000000000000000000000000000000000000000000000000081523060048201529051610100909304600160a060020a0316926303f9c793929160248082019260009290919082900301818588803b158015610d3f57600080fd5b505af1158015610d53573d6000803e3d6000fd5b5050505050610d60610586565b600160a060020a03166370a08231306040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018082600160a060020a0316600160a060020a03168152602001915050602060405180830381600087803b158015610dd357600080fd5b505af1158015610de7573d6000803e3d6000fd5b505050506040513d6020811015610dfd57600080fd5b5051600a8190551515610e0f57600080fd5b600a5460408051918252517f6e1e34c7e3c3bcd68cb35ee1352c9d7320d7d1ab8ff8402c789a235f368a993e9181900360200190a1565b600c5481565b60015481565b600e5460ff1681565b60006002610e67610547565b6003811115610e7257fe5b14610e7c57600080fd5b600254600a54600160a060020a038416600090815260046020526040902054610eaa9163ffffffff61110d16565b811515610eb357fe5b0492915050565b600054600160a060020a03163314610ed157600080fd5b600160a060020a0381161515610ee657600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600082820183811015610f5d57fe5b8091505b5092915050565b600082821115610f7457fe5b50900390565b6000806001610f87610547565b6003811115610f9257fe5b14610f9c57600080fd5b341515610fa857600080fd5b50503360008181526004602052604081205490811190610fce903463ffffffff610f4e16565b600160a060020a038316600090815260046020526040902081905560075411806110115750600854600160a060020a038316600090815260046020526040902054115b1561101b57600080fd5b8015156110825760038054600180820183556000929092527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0385161790558054810190555b600254611095903463ffffffff610f4e16565b600281905560095410156110a857600080fd5b60408051600160a060020a03841681523460208201526000818301526fffffffffffffffffffffffffffffffff8516606082015290517f0396f60aaad038749091d273dc13aaabc63db6e2271c7bad442d5cf25cc433509181900360800190a1505050565b6000808315156111205760009150610f61565b5082820282848281151561113057fe5b0414610f5d57fe00a165627a7a723058200501a220feb2ade8970d1f8882ce10d49d7476e710086b8554a9d6504a3fc4c50029", "bytecode_runtime": "0x6080604052600436106101b65763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416631540fe2281146101bb5780631865c57d146101e257806321df0da71461021b57806327e235e31461024c578063379607f51461026d5780633c67b6b7146102875780633feb5f2b146102a85780634042b66f146102c0578063483a20b2146102d5578063590e1ae3146102f65780635bcb318a1461030b5780635ed7ca5b146103235780636962b01014610338578063732783ac1461034d57806384fe50291461036257806387612102146103775780638da4d3c91461037f5780638da5cb5b1461039457806395364a84146103a957806399e9376c146103d25780639c1e03a0146103ef578063a6f2ae3a14610404578063aa5581ef1461040c578063b9b8af0b14610421578063bd7427f814610436578063c884ef831461044b578063cb3e64fd1461046c578063d085835a14610481578063d1058e5914610496578063d4607048146104ab578063d54ad2a1146104c0578063d7e64c00146104d5578063dba2d875146104ea578063dde070e8146104ff578063f2fde38b14610520575b600080fd5b3480156101c757600080fd5b506101d0610541565b60408051918252519081900360200190f35b3480156101ee57600080fd5b506101f7610547565b6040518082600381111561020757fe5b60ff16815260200191505060405180910390f35b34801561022757600080fd5b50610230610586565b60408051600160a060020a039092168252519081900360200190f35b34801561025857600080fd5b506101d0600160a060020a0360043516610642565b34801561027957600080fd5b50610285600435610654565b005b34801561029357600080fd5b506101d0600160a060020a0360043516610826565b3480156102b457600080fd5b5061023060043561085e565b3480156102cc57600080fd5b506101d0610886565b3480156102e157600080fd5b50610285600160a060020a036004351661088c565b34801561030257600080fd5b50610285610966565b34801561031757600080fd5b50610285600435610a54565b34801561032f57600080fd5b50610285610a70565b34801561034457600080fd5b506101d0610abe565b34801561035957600080fd5b506101d0610ac4565b34801561036e57600080fd5b506101d0610aca565b610285610ad0565b34801561038b57600080fd5b506101d0610af1565b3480156103a057600080fd5b50610230610af7565b3480156103b557600080fd5b506103be610b06565b604080519115158252519081900360200190f35b6102856fffffffffffffffffffffffffffffffff60043516610b0b565b3480156103fb57600080fd5b50610230610b3c565b610285610b50565b34801561041857600080fd5b506101d0610b82565b34801561042d57600080fd5b506103be610b88565b34801561044257600080fd5b50610285610ba9565b34801561045757600080fd5b506101d0600160a060020a0360043516610bcf565b34801561047857600080fd5b50610285610be1565b34801561048d57600080fd5b506101d0610c41565b3480156104a257600080fd5b50610285610c47565b3480156104b757600080fd5b50610285610c58565b3480156104cc57600080fd5b506101d0610e46565b3480156104e157600080fd5b506101d0610e4c565b3480156104f657600080fd5b506103be610e52565b34801561050b57600080fd5b506101d0600160a060020a0360043516610e5b565b34801561052c57600080fd5b50610285600160a060020a0360043516610eba565b60075481565b600e5460009060ff161561055d57506003610583565b600a54151561057f57600654421061057757506003610583565b506001610583565b5060025b90565b600e546000906101009004600160a060020a031615156105a557600080fd5b600e60019054906101000a9004600160a060020a0316600160a060020a031663fc0c546a6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561061157600080fd5b505af1158015610625573d6000803e3d6000fd5b505050506040513d602081101561063b57600080fd5b5051905090565b60046020526000908152604090205481565b6000805474010000000000000000000000000000000000000000900460ff161561067d57600080fd5b600d54421161068b57600080fd5b503381151561069957600080fd5b816106a382610826565b10156106ae57600080fd5b600160a060020a03811660009081526005602052604090205415156106d757600b805460010190555b600160a060020a038116600090815260056020526040902054610700908363ffffffff610f4e16565b600160a060020a038216600090815260056020526040902055600c5461072c908363ffffffff610f4e16565b600c55610737610586565b600160a060020a031663a9059cbb82846040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b1580156107b257600080fd5b505af11580156107c6573d6000803e3d6000fd5b505050506040513d60208110156107dc57600080fd5b505060408051600160a060020a03831681526020810184905281517fb649c98f58055c520df0dcb5709eff2e931217ff2fb1e21376130d31bbb1c0af929181900390910190a15050565b600160a060020a0381166000908152600560205260408120546108589061084c84610e5b565b9063ffffffff610f6816565b92915050565b600380548290811061086c57fe5b600091825260209091200154600160a060020a0316905081565b60025481565b600054600160a060020a031633146108a357600080fd5b80600e60016101000a815481600160a060020a030219169083600160a060020a03160217905550600e60019054906101000a9004600160a060020a0316600160a060020a0316634551dd596040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561093657600080fd5b505af115801561094a573d6000803e3d6000fd5b505050506040513d602081101561096057600080fd5b50505b50565b60008054819074010000000000000000000000000000000000000000900460ff161561099157600080fd5b600361099b610547565b60038111156109a657fe5b146109b057600080fd5b3360008181526004602052604090205490925015156109ce57600080fd5b50600160a060020a038116600081815260046020526040808220805490839055905190929183919081818185875af1925050501515610a0c57600080fd5b60408051600160a060020a03841681526020810183905281517fd7dee2702d63ad89917b6a4da9981c90c4d24f8c2bdfd64c604ecae57d8d0651929181900390910190a15050565b600054600160a060020a03163314610a6b57600080fd5b600d55565b600054600160a060020a03163314610a8757600080fd5b6000805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b60065481565b600a5481565b60095481565b6003610ada610547565b6003811115610ae557fe5b14610aef57600080fd5b565b600b5481565b600054600160a060020a031681565b600190565b60005474010000000000000000000000000000000000000000900460ff1615610b3357600080fd5b61096381610f7a565b600e546101009004600160a060020a031681565b60005474010000000000000000000000000000000000000000900460ff1615610b7857600080fd5b610aef6000610f7a565b60085481565b60005474010000000000000000000000000000000000000000900460ff1681565b600054600160a060020a03163314610bc057600080fd5b600e805460ff19166001179055565b60056020526000908152604090205481565b600054600160a060020a03163314610bf857600080fd5b60005474010000000000000000000000000000000000000000900460ff161515610c2157600080fd5b6000805474ff000000000000000000000000000000000000000019169055565b600d5481565b610aef610c5333610826565b610654565b60005474010000000000000000000000000000000000000000900460ff168015610c8d5750600054600160a060020a03163314155b15610c9757600080fd5b6001610ca1610547565b6003811115610cac57fe5b14610cb657600080fd5b600e546101009004600160a060020a03161515610cd257600080fd5b600e54600254604080517f03f9c7930000000000000000000000000000000000000000000000000000000081523060048201529051610100909304600160a060020a0316926303f9c793929160248082019260009290919082900301818588803b158015610d3f57600080fd5b505af1158015610d53573d6000803e3d6000fd5b5050505050610d60610586565b600160a060020a03166370a08231306040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018082600160a060020a0316600160a060020a03168152602001915050602060405180830381600087803b158015610dd357600080fd5b505af1158015610de7573d6000803e3d6000fd5b505050506040513d6020811015610dfd57600080fd5b5051600a8190551515610e0f57600080fd5b600a5460408051918252517f6e1e34c7e3c3bcd68cb35ee1352c9d7320d7d1ab8ff8402c789a235f368a993e9181900360200190a1565b600c5481565b60015481565b600e5460ff1681565b60006002610e67610547565b6003811115610e7257fe5b14610e7c57600080fd5b600254600a54600160a060020a038416600090815260046020526040902054610eaa9163ffffffff61110d16565b811515610eb357fe5b0492915050565b600054600160a060020a03163314610ed157600080fd5b600160a060020a0381161515610ee657600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600082820183811015610f5d57fe5b8091505b5092915050565b600082821115610f7457fe5b50900390565b6000806001610f87610547565b6003811115610f9257fe5b14610f9c57600080fd5b341515610fa857600080fd5b50503360008181526004602052604081205490811190610fce903463ffffffff610f4e16565b600160a060020a038316600090815260046020526040902081905560075411806110115750600854600160a060020a038316600090815260046020526040902054115b1561101b57600080fd5b8015156110825760038054600180820183556000929092527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0385161790558054810190555b600254611095903463ffffffff610f4e16565b600281905560095410156110a857600080fd5b60408051600160a060020a03841681523460208201526000818301526fffffffffffffffffffffffffffffffff8516606082015290517f0396f60aaad038749091d273dc13aaabc63db6e2271c7bad442d5cf25cc433509181900360800190a1505050565b6000808315156111205760009150610f61565b5082820282848281151561113057fe5b0414610f5d57fe00a165627a7a723058200501a220feb2ade8970d1f8882ce10d49d7476e710086b8554a9d6504a3fc4c50029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": true, "inputs": [], "name": "weiMinimumLimit", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "getState", "outputs": [{"name": "", "type": "uint8"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "getToken", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "balances", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "amount", "type": "uint256"}], "name": "claim", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "investor", "type": "address"}], "name": "getClaimLeft", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "uint256"}], "name": "investors", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "weiRaised", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_crowdsale", "type": "address"}], "name": "setCrowdsale", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "refund", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_timeLock", "type": "uint256"}], "name": "setTimeLock", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "halt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "freezeEndsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "tokensBought", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "weiCap", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "loadRefund", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "claimCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isPresale", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}], "name": "buyWithCustomerId", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "crowdsale", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "buy", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "weiMaximumLimit", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "halted", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "forceRefund", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "claimed", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "unhalt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "timeLock", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "claimAll", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "buyForEverybody", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalClaimed", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "investorCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "forcedRefund", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "investor", "type": "address"}], "name": "getClaimAmount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [{"name": "_owner", "type": "address"}, {"name": "_freezeEndsAt", "type": "uint256"}, {"name": "_weiMinimumLimit", "type": "uint256"}, {"name": "_weiMaximumLimit", "type": "uint256"}, {"name": "_weiCap", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"payable": true, "stateMutability": "payable", "type": "fallback"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}, {"indexed": false, "name": "tokenAmount", "type": "uint256"}, {"indexed": false, "name": "customerId", "type": "uint128"}], "name": "Invested", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Refunded", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "count", "type": "uint256"}], "name": "TokensBoughts", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "count", "type": "uint256"}], "name": "Distributed", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "devdoc": {"methods": {"forceRefund()": {"details": "This is used in the first case scenario, this will force the state to refunding. This can be also used when the ICO fails to meet the cap."}, "loadRefund()": {"details": "This should be used if the Crowdsale fails, to receive the refuld money. we can't use Crowdsale's refund, since our default function does not accept money in."}, "setTimeLock(uint256)": {"details": "Setting timelock (delay) for claiming", "params": {"_timeLock": "Time after which claiming is possible"}}, "transferOwnership(address)": {"details": "Allows the current owner to transfer control of the contract to a newOwner.", "params": {"newOwner": "The address to transfer ownership to."}}}}, "userdoc": {"methods": {"buyForEverybody()": {"notice": "Load funds to the crowdsale for all investors. *"}, "claim(uint256)": {"notice": "Claim N bought tokens to the investor as the msg sender. "}, "claimAll()": {"notice": "Claim all remaining tokens for this investor."}, "getClaimAmount(address)": {"notice": "How may tokens each investor gets."}, "getClaimLeft(address)": {"notice": "How many tokens remain unclaimed for an investor."}, "getState()": {"notice": "Resolve the contract umambigious state."}, "getToken()": {"notice": "Get the token we are distributing."}, "isPresale()": {"notice": "Interface marker. "}, "refund()": {"notice": "ICO never happened. Allow refund."}, "setCrowdsale(address)": {"notice": "Set the target crowdsale where we will move presale funds when the crowdsale opens."}}}}, "settings": {"compilationTarget": {"contracts/PreICOProxyBuyer.sol": "PreICOProxyBuyer"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/Crowdsale.sol": {"keccak256": "0x2697c26528f64bb954a7c2547d3b43317d2d2b02c7d9d05a7b1ab388cd79f65d", "urls": ["bzzr://f28b280794222114141c51dd5c388d403a7c98d8b51e04170a0e294246d5164b"]}, "contracts/CrowdsaleBase.sol": {"keccak256": "0xe2c9ed11183ce705616980df7b02544d72fe18b40395da7d9d4bcb621fb87871", "urls": ["bzzr://07f3887ba0d0eb3248b1ad3581480ed71a2fe70a47dcc283c4e97c8c92e0790a"]}, "contracts/FinalizeAgent.sol": {"keccak256": "0x309fd0510e0b3e2b5044e33f7c80cfb2d6f2a5697e41a5f185931d65770cfea9", "urls": ["bzzr://4e7ed6f82c0f542e92e56c12566b2ecd7666730865bf12566c27587ec64160ac"]}, "contracts/FractionalERC20.sol": {"keccak256": "0x75bc4ad90a8b13ce961c89b1bf405776f616e019d3a2720168f8e52be223198f", "urls": ["bzzr://6a3688f12da1a5c890ef06f80f883f6c5370886092d38a1b33cd4219b718478b"]}, "contracts/Haltable.sol": {"keccak256": "0x265dcf25e7c9ab4b6eecd2181f1b71334a1b5381a60f8db7d9526dab120f4b70", "urls": ["bzzr://d522e00fa9e075941469dd81738b59fdb99ce3c12cdc39e33abe40b588c4da9b"]}, "contracts/PreICOProxyBuyer.sol": {"keccak256": "0x71ff0ea56115ab9b898a2cd599017e4fa0c02df2e862883ec967c4e821a5dec6", "urls": ["bzzr://7b244f1e8f508017f3d7d2682c7ae3d6920a8b9efb6d3c04baa3262a5fe40608"]}, "contracts/PricingStrategy.sol": {"keccak256": "0x8df5093b7d07168ad994f9176de0bd2268f6563b1e8a3a448d8cfe7fe246c628", "urls": ["bzzr://ef5c944d51f739ab34e2c951d6ac82a7152e6bb844058a8e57bae52c14cbe16b"]}, "contracts/SafeMathLib.sol": {"keccak256": "0x501bfe31e274b9a5591f7c540bdced4d4312e27d4f19599147c9bbca3d9c6b18", "urls": ["bzzr://a80935ebddb06c247d71372d4e5833ee029f08633bd0fe4a274a57009567e5b9"]}, "zeppelin/contracts/math/SafeMath.sol": {"keccak256": "0x341ba8cb467a3623e819ba1a683ac1d264005186f308505214e5f6bc89446a08", "urls": ["bzzr://59b5652ee4e4a1b5a8f1a8906e14c84af43d636cf5ca0725cc1813aabe4c8c17"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}}, "version": 1}, "name": "PreICOProxyBuyer", "ordered_full_dependencies": [], "source_path": "contracts/PreICOProxyBuyer.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n assert(c / a == b);\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Safe unsigned safe math.\n *\n * https://blog.aragon.one/library-driven-development-in-solidity-2bebcaf88736#.750gwtwli\n *\n * Originally from https://raw.githubusercontent.com/AragonOne/zeppelin-solidity/master/contracts/SafeMathLib.sol\n *\n * Maintained here until merged to mainline zeppelin-solidity.\n *\n */\nlibrary SafeMathLib {\n\n function times(uint a, uint b) returns (uint) {\n uint c = a * b;\n assert(a == 0 || c / a == b);\n return c;\n }\n\n function minus(uint a, uint b) returns (uint) {\n assert(b <= a);\n return a - b;\n }\n\n function plus(uint a, uint b) returns (uint) {\n uint c = a + b;\n assert(c>=a);\n return c;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Interface for defining crowdsale pricing.\n */\ncontract PricingStrategy {\n\n /** Interface declaration. */\n function isPricingStrategy() public constant returns (bool) {\n return true;\n }\n\n /** Self check if all references are correctly set.\n *\n * Checks that pricing strategy matches crowdsale parameters.\n */\n function isSane(address crowdsale) public constant returns (bool) {\n return true;\n }\n\n /**\n * @dev Pricing tells if this is a presale purchase or not.\n @param purchaser Address of the purchaser\n @return False by default, true if a presale purchaser\n */\n function isPresalePurchase(address purchaser) public constant returns (bool) {\n return false;\n }\n\n /**\n * When somebody tries to buy tokens for X eth, calculate how many tokens they get.\n *\n *\n * @param value - What is the value of the transaction send in as wei\n * @param tokensSold - how much tokens have been sold this far\n * @param weiRaised - how much money has been raised this far in the main token sale - this number excludes presale\n * @param msgSender - who is the investor of this transaction\n * @param decimals - how many decimal units the token has\n * @return Amount of tokens the investor receives\n */\n function calculatePrice(uint value, uint weiRaised, uint tokensSold, address msgSender, uint decimals) public constant returns (uint tokenAmount);\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Finalize agent defines what happens at the end of succeseful crowdsale.\n *\n * - Allocate tokens for founders, bounties and community\n * - Make tokens transferable\n * - etc.\n */\ncontract FinalizeAgent {\n\n function isFinalizeAgent() public constant returns(bool) {\n return true;\n }\n\n /** Return true if we can run finalizeCrowdsale() properly.\n *\n * This is a safety check function that doesn't allow crowdsale to begin\n * unless the finalizer has been set up properly.\n */\n function isSane() public constant returns (bool);\n\n /** Called once by crowdsale finalize() if the sale was success. */\n function finalizeCrowdsale();\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n\n/**\n * A token that defines fractional units as decimals.\n */\ncontract FractionalERC20 is ERC20 {\n\n uint public decimals;\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n/*\n * Haltable\n *\n * Abstract contract that allows children to implement an\n * emergency stop mechanism. Differs from Pausable by causing a throw when in halt mode.\n *\n *\n * Originally envisioned in FirstBlood ICO contract.\n */\ncontract Haltable is Ownable {\n bool public halted;\n\n modifier stopInEmergency {\n if (halted) throw;\n _;\n }\n\n modifier stopNonOwnersInEmergency {\n if (halted && msg.sender != owner) throw;\n _;\n }\n\n modifier onlyInEmergency {\n if (!halted) throw;\n _;\n }\n\n // called by the owner on emergency, triggers stopped state\n function halt() external onlyOwner {\n halted = true;\n }\n\n // called by the owner on end of emergency, returns to normal state\n function unhalt() external onlyOwner onlyInEmergency {\n halted = false;\n }\n\n}\n\n\n\n\n\n\n\n/**\n * Crowdsale state machine without buy functionality.\n *\n * Implements basic state machine logic, but leaves out all buy functions,\n * so that subclasses can implement their own buying logic.\n *\n *\n * For the default buy() implementation see Crowdsale.sol.\n */\ncontract CrowdsaleBase is Haltable {\n\n /* Max investment count when we are still allowed to change the multisig address */\n uint public MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE = 5;\n\n using SafeMathLib for uint;\n\n /* The token we are selling */\n FractionalERC20 public token;\n\n /* How we are going to price our offering */\n PricingStrategy public pricingStrategy;\n\n /* Post-success callback */\n FinalizeAgent public finalizeAgent;\n\n /* tokens will be transfered from this address */\n address public multisigWallet;\n\n /* if the funding goal is not reached, investors may withdraw their funds */\n uint public minimumFundingGoal;\n\n /* the UNIX timestamp start date of the crowdsale */\n uint public startsAt;\n\n /* the UNIX timestamp end date of the crowdsale */\n uint public endsAt;\n\n /* the number of tokens already sold through this contract*/\n uint public tokensSold = 0;\n\n /* How many wei of funding we have raised */\n uint public weiRaised = 0;\n\n /* Calculate incoming funds from presale contracts and addresses */\n uint public presaleWeiRaised = 0;\n\n /* How many distinct addresses have invested */\n uint public investorCount = 0;\n\n /* How much wei we have returned back to the contract after a failed crowdfund. */\n uint public loadedRefund = 0;\n\n /* How much wei we have given back to investors.*/\n uint public weiRefunded = 0;\n\n /* Has this crowdsale been finalized */\n bool public finalized;\n\n /** How much ETH each address has invested to this crowdsale */\n mapping (address => uint256) public investedAmountOf;\n\n /** How much tokens this crowdsale has credited for each investor address */\n mapping (address => uint256) public tokenAmountOf;\n\n /** Addresses that are allowed to invest even before ICO offical opens. For testing, for ICO partners, etc. */\n mapping (address => bool) public earlyParticipantWhitelist;\n\n /** This is for manul testing for the interaction from owner wallet. You can set it to any value and inspect this in blockchain explorer to see that crowdsale interaction works. */\n uint public ownerTestValue;\n\n /** State machine\n *\n * - Preparing: All contract initialization calls and variables have not been set yet\n * - Prefunding: We have not passed start time yet\n * - Funding: Active crowdsale\n * - Success: Minimum funding goal reached\n * - Failure: Minimum funding goal not reached before ending time\n * - Finalized: The finalized has been called and succesfully executed\n * - Refunding: Refunds are loaded on the contract for reclaim.\n */\n enum State{Unknown, Preparing, PreFunding, Funding, Success, Failure, Finalized, Refunding}\n\n // A new investment was made\n event Invested(address investor, uint weiAmount, uint tokenAmount, uint128 customerId);\n\n // Refund was processed for a contributor\n event Refund(address investor, uint weiAmount);\n\n // The rules were changed what kind of investments we accept\n event InvestmentPolicyChanged(bool newRequireCustomerId, bool newRequiredSignedAddress, address newSignerAddress);\n\n // Address early participation whitelist status changed\n event Whitelisted(address addr, bool status);\n\n // Crowdsale end time has been changed\n event EndsAtChanged(uint newEndsAt);\n\n function CrowdsaleBase(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal) {\n\n owner = msg.sender;\n\n token = FractionalERC20(_token);\n setPricingStrategy(_pricingStrategy);\n\n multisigWallet = _multisigWallet;\n if(multisigWallet == 0) {\n throw;\n }\n\n if(_start == 0) {\n throw;\n }\n\n startsAt = _start;\n\n if(_end == 0) {\n throw;\n }\n\n endsAt = _end;\n\n // Don't mess the dates\n if(startsAt >= endsAt) {\n throw;\n }\n\n // Minimum funding goal can be zero\n minimumFundingGoal = _minimumFundingGoal;\n }\n\n /**\n * Don't expect to just send in money and get tokens.\n */\n function() payable {\n throw;\n }\n\n /**\n * @dev Make an investment.\n *\n * Crowdsale must be running for one to invest.\n * We must have not pressed the emergency brake.\n *\n * @param receiver The Ethereum address who receives the tokens\n * @param customerId (optional) UUID v4 to track the successful payments on the server side'\n * @param tokenAmount Amount of tokens which be credited to receiver\n *\n * @return tokensBought How mony tokens were bought\n */\n function buyTokens(address receiver, uint128 customerId, uint256 tokenAmount) stopInEmergency internal returns(uint tokensBought) {\n\n // Determine if it's a good time to accept investment from this participant\n if(getState() == State.PreFunding) {\n // Are we whitelisted for early deposit\n if(!earlyParticipantWhitelist[receiver]) {\n throw;\n }\n } else if(getState() == State.Funding) {\n // Retail participants can only come in when the crowdsale is running\n // pass\n } else {\n // Unwanted state\n throw;\n }\n\n uint weiAmount = msg.value;\n\n // Dust transaction\n require(tokenAmount != 0);\n\n if(investedAmountOf[receiver] == 0) {\n // A new investor\n investorCount++;\n }\n\n // Update investor\n investedAmountOf[receiver] = investedAmountOf[receiver].plus(weiAmount);\n tokenAmountOf[receiver] = tokenAmountOf[receiver].plus(tokenAmount);\n\n // Update totals\n weiRaised = weiRaised.plus(weiAmount);\n tokensSold = tokensSold.plus(tokenAmount);\n\n if(pricingStrategy.isPresalePurchase(receiver)) {\n presaleWeiRaised = presaleWeiRaised.plus(weiAmount);\n }\n\n // Check that we did not bust the cap\n require(!isBreakingCap(weiAmount, tokenAmount, weiRaised, tokensSold));\n\n assignTokens(receiver, tokenAmount);\n\n // Pocket the money, or fail the crowdsale if we for some reason cannot send the money to our multisig\n if(!multisigWallet.send(weiAmount)) throw;\n\n // Tell us invest was success\n Invested(receiver, weiAmount, tokenAmount, customerId);\n\n return tokenAmount;\n }\n\n /**\n * @dev Make an investment based on pricing strategy\n *\n * This is a wrapper for buyTokens(), but the amount of tokens receiver will\n * have depends on the pricing strategy used.\n *\n * @param receiver The Ethereum address who receives the tokens\n * @param customerId (optional) UUID v4 to track the successful payments on the server side'\n *\n * @return tokensBought How mony tokens were bought\n */\n function investInternal(address receiver, uint128 customerId) stopInEmergency internal returns(uint tokensBought) {\n return buyTokens(receiver, customerId, pricingStrategy.calculatePrice(msg.value, weiRaised - presaleWeiRaised, tokensSold, msg.sender, token.decimals()));\n }\n\n /**\n * @dev Calculate tokens user will have for their purchase\n *\n * @param weisTotal How much ethers (in wei) the user putssssss in\n * @param pricePerToken What is the price for one token\n *\n * @return tokensTotal which is received tokens, token decimals included\n */\n function calculateTokens(uint256 weisTotal, uint256 pricePerToken) public constant returns(uint tokensTotal) {\n // pricePerToken is how many full tokens, token decimal place included, you get for wei amount.\n // Because, in theory, decimal amount can vary, we do the exponent calculation here,\n // though gas wise using 10**18 constant would be much simpler.\n // Furthermore we could use rough amounts and take in raw wei per tokens amount,\n // but we lose too much accuracy for generic calculations, thus all these are\n // practically implemented as 10**18 fixed points.\n uint multiplier = 10 ** token.decimals();\n return weisTotal.times(multiplier)/pricePerToken;\n }\n\n /**\n * Finalize a succcesful crowdsale.\n *\n * The owner can triggre a call the contract that provides post-crowdsale actions, like releasing the tokens.\n */\n function finalize() public inState(State.Success) onlyOwner stopInEmergency {\n\n // Already finalized\n if(finalized) {\n throw;\n }\n\n // Finalizing is optional. We only call it if we are given a finalizing agent.\n if(address(finalizeAgent) != 0) {\n finalizeAgent.finalizeCrowdsale();\n }\n\n finalized = true;\n }\n\n /**\n * Allow to (re)set finalize agent.\n *\n * Design choice: no state restrictions on setting this, so that we can fix fat finger mistakes.\n */\n function setFinalizeAgent(FinalizeAgent addr) onlyOwner {\n finalizeAgent = addr;\n\n // Don't allow setting bad agent\n if(!finalizeAgent.isFinalizeAgent()) {\n throw;\n }\n }\n\n /**\n * Allow crowdsale owner to close early or extend the crowdsale.\n *\n * This is useful e.g. for a manual soft cap implementation:\n * - after X amount is reached determine manual closing\n *\n * This may put the crowdsale to an invalid state,\n * but we trust owners know what they are doing.\n *\n */\n function setEndsAt(uint time) onlyOwner {\n\n if(now > time) {\n throw; // Don't change past\n }\n\n if(startsAt > time) {\n throw; // Prevent human mistakes\n }\n\n endsAt = time;\n EndsAtChanged(endsAt);\n }\n\n /**\n * Allow to (re)set pricing strategy.\n *\n * Design choice: no state restrictions on the set, so that we can fix fat finger mistakes.\n */\n function setPricingStrategy(PricingStrategy _pricingStrategy) onlyOwner {\n pricingStrategy = _pricingStrategy;\n\n // Don't allow setting bad agent\n if(!pricingStrategy.isPricingStrategy()) {\n throw;\n }\n }\n\n /**\n * Allow to change the team multisig address in the case of emergency.\n *\n * This allows to save a deployed crowdsale wallet in the case the crowdsale has not yet begun\n * (we have done only few test transactions). After the crowdsale is going\n * then multisig address stays locked for the safety reasons.\n */\n function setMultisig(address addr) public onlyOwner {\n\n // Change\n if(investorCount > MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE) {\n throw;\n }\n\n multisigWallet = addr;\n }\n\n /**\n * Allow load refunds back on the contract for the refunding.\n *\n * The team can transfer the funds back on the smart contract in the case the minimum goal was not reached..\n */\n function loadRefund() public payable inState(State.Failure) {\n if(msg.value == 0) throw;\n loadedRefund = loadedRefund.plus(msg.value);\n }\n\n /**\n * Investors can claim refund.\n *\n * Note that any refunds from proxy buyers should be handled separately,\n * and not through this contract.\n */\n function refund() public inState(State.Refunding) {\n uint256 weiValue = investedAmountOf[msg.sender];\n if (weiValue == 0) throw;\n investedAmountOf[msg.sender] = 0;\n weiRefunded = weiRefunded.plus(weiValue);\n Refund(msg.sender, weiValue);\n if (!msg.sender.send(weiValue)) throw;\n }\n\n /**\n * @return true if the crowdsale has raised enough money to be a successful.\n */\n function isMinimumGoalReached() public constant returns (bool reached) {\n return weiRaised >= minimumFundingGoal;\n }\n\n /**\n * Check if the contract relationship looks good.\n */\n function isFinalizerSane() public constant returns (bool sane) {\n return finalizeAgent.isSane();\n }\n\n /**\n * Check if the contract relationship looks good.\n */\n function isPricingSane() public constant returns (bool sane) {\n return pricingStrategy.isSane(address(this));\n }\n\n /**\n * Crowdfund state machine management.\n *\n * We make it a function and do not assign the result to a variable, so there is no chance of the variable being stale.\n */\n function getState() public constant returns (State) {\n if(finalized) return State.Finalized;\n else if (address(finalizeAgent) == 0) return State.Preparing;\n else if (!finalizeAgent.isSane()) return State.Preparing;\n else if (!pricingStrategy.isSane(address(this))) return State.Preparing;\n else if (block.timestamp < startsAt) return State.PreFunding;\n else if (block.timestamp <= endsAt && !isCrowdsaleFull()) return State.Funding;\n else if (isMinimumGoalReached()) return State.Success;\n else if (!isMinimumGoalReached() && weiRaised > 0 && loadedRefund >= weiRaised) return State.Refunding;\n else return State.Failure;\n }\n\n /** This is for manual testing of multisig wallet interaction */\n function setOwnerTestValue(uint val) onlyOwner {\n ownerTestValue = val;\n }\n\n /**\n * Allow addresses to do early participation.\n *\n * TODO: Fix spelling error in the name\n */\n function setEarlyParicipantWhitelist(address addr, bool status) onlyOwner {\n earlyParticipantWhitelist[addr] = status;\n Whitelisted(addr, status);\n }\n\n\n /** Interface marker. */\n function isCrowdsale() public constant returns (bool) {\n return true;\n }\n\n //\n // Modifiers\n //\n\n /** Modified allowing execution only if the crowdsale is currently running. */\n modifier inState(State state) {\n if(getState() != state) throw;\n _;\n }\n\n\n //\n // Abstract functions\n //\n\n /**\n * Check if the current invested breaks our cap rules.\n *\n *\n * The child contract must define their own cap setting rules.\n * We allow a lot of flexibility through different capping strategies (ETH, token count)\n * Called from invest().\n *\n * @param weiAmount The amount of wei the investor tries to invest in the current transaction\n * @param tokenAmount The amount of tokens we try to give to the investor in the current transaction\n * @param weiRaisedTotal What would be our total raised balance after this transaction\n * @param tokensSoldTotal What would be our total sold tokens count after this transaction\n *\n * @return true if taking this investment would break our cap rules\n */\n function isBreakingCap(uint weiAmount, uint tokenAmount, uint weiRaisedTotal, uint tokensSoldTotal) constant returns (bool limitBroken);\n\n /**\n * Check if the current crowdsale is full and we can no longer sell any tokens.\n */\n function isCrowdsaleFull() public constant returns (bool);\n\n /**\n * Create new tokens or transfer issued tokens to the investor depending on the cap model.\n */\n function assignTokens(address receiver, uint tokenAmount) internal;\n}\n\n\n\n/**\n * Abstract base contract for token sales with the default buy entry points.\n *\n * Handle\n * - start and end dates\n * - accepting investments\n * - minimum funding goal and refund\n * - various statistics during the crowdfund\n * - different pricing strategies\n * - different investment policies (require server side customer id, allow only whitelisted addresses)\n *\n * Does not Handle\n *\n * - Token allocation (minting vs. transfer)\n * - Cap rules\n *\n */\ncontract Crowdsale is CrowdsaleBase {\n\n /* Do we need to have unique contributor id for each customer */\n bool public requireCustomerId;\n\n /**\n * Do we verify that contributor has been cleared on the server side (accredited investors only).\n * This method was first used in FirstBlood crowdsale to ensure all contributors have accepted terms on sale (on the web).\n */\n bool public requiredSignedAddress;\n\n /* Server side address that signed allowed contributors (Ethereum addresses) that can participate the crowdsale */\n address public signerAddress;\n\n function Crowdsale(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal) CrowdsaleBase(_token, _pricingStrategy, _multisigWallet, _start, _end, _minimumFundingGoal) {\n }\n\n /**\n * Preallocate tokens for the early investors.\n *\n * Preallocated tokens have been sold before the actual crowdsale opens.\n * This function mints the tokens and moves the crowdsale needle.\n *\n * Investor count is not handled; it is assumed this goes for multiple investors\n * and the token distribution happens outside the smart contract flow.\n *\n * No money is exchanged, as the crowdsale team already have received the payment.\n *\n * @param fullTokens tokens as full tokens - decimal places added internally\n * @param weiPrice Price of a single full token in wei\n *\n */\n function preallocate(address receiver, uint fullTokens, uint weiPrice) public onlyOwner {\n\n uint tokenAmount = fullTokens * 10**token.decimals();\n uint weiAmount = weiPrice * fullTokens; // This can be also 0, we give out tokens for free\n\n weiRaised = weiRaised.plus(weiAmount);\n tokensSold = tokensSold.plus(tokenAmount);\n\n investedAmountOf[receiver] = investedAmountOf[receiver].plus(weiAmount);\n tokenAmountOf[receiver] = tokenAmountOf[receiver].plus(tokenAmount);\n\n assignTokens(receiver, tokenAmount);\n\n // Tell us invest was success\n Invested(receiver, weiAmount, tokenAmount, 0);\n }\n\n /**\n * Allow anonymous contributions to this crowdsale.\n */\n function investWithSignedAddress(address addr, uint128 customerId, uint8 v, bytes32 r, bytes32 s) public payable {\n bytes32 hash = sha256(addr);\n if (ecrecover(hash, v, r, s) != signerAddress) throw;\n if(customerId == 0) throw; // UUIDv4 sanity check\n investInternal(addr, customerId);\n }\n\n /**\n * Track who is the customer making the payment so we can send thank you email.\n */\n function investWithCustomerId(address addr, uint128 customerId) public payable {\n if(requiredSignedAddress) throw; // Crowdsale allows only server-side signed participants\n if(customerId == 0) throw; // UUIDv4 sanity check\n investInternal(addr, customerId);\n }\n\n /**\n * Allow anonymous contributions to this crowdsale.\n */\n function invest(address addr) public payable {\n if(requireCustomerId) throw; // Crowdsale needs to track participants for thank you email\n if(requiredSignedAddress) throw; // Crowdsale allows only server-side signed participants\n investInternal(addr, 0);\n }\n\n /**\n * Invest to tokens, recognize the payer and clear his address.\n *\n */\n function buyWithSignedAddress(uint128 customerId, uint8 v, bytes32 r, bytes32 s) public payable {\n investWithSignedAddress(msg.sender, customerId, v, r, s);\n }\n\n /**\n * Invest to tokens, recognize the payer.\n *\n */\n function buyWithCustomerIdWithChecksum(uint128 customerId, bytes1 checksum) public payable {\n // see customerid.py\n if (bytes1(sha3(customerId)) != checksum) throw;\n investWithCustomerId(msg.sender, customerId);\n }\n\n /**\n * Legacy API signature.\n */\n function buyWithCustomerId(uint128 customerId) public payable {\n investWithCustomerId(msg.sender, customerId);\n }\n\n /**\n * The basic entry point to participate the crowdsale process.\n *\n * Pay for funding, get invested tokens back in the sender address.\n */\n function buy() public payable {\n invest(msg.sender);\n }\n\n /**\n * Set policy do we need to have server-side customer ids for the investments.\n *\n */\n function setRequireCustomerId(bool value) onlyOwner {\n requireCustomerId = value;\n InvestmentPolicyChanged(requireCustomerId, requiredSignedAddress, signerAddress);\n }\n\n /**\n * Set policy if all investors must be cleared on the server side first.\n *\n * This is e.g. for the accredited investor clearing.\n *\n */\n function setRequireSignedAddress(bool value, address _signerAddress) onlyOwner {\n requiredSignedAddress = value;\n signerAddress = _signerAddress;\n InvestmentPolicyChanged(requireCustomerId, requiredSignedAddress, signerAddress);\n }\n\n}\n\n\n\n/**\n * Collect funds from presale investors, buy tokens for them in a single transaction and distribute out tokens.\n *\n * - Collect funds from pre-sale investors\n * - Send funds to the crowdsale when it opens\n * - Allow owner to set the crowdsale\n * - Have refund after X days as a safety hatch if the crowdsale doesn't materilize\n * - Allow unlimited investors\n * - Tokens are distributed on PreICOProxyBuyer smart contract first\n * - The original investors can claim their tokens from the smart contract after the token transfer has been released\n * - All functions can be halted by owner if something goes wrong\n *\n */\ncontract PreICOProxyBuyer is Ownable, Haltable {\n using SafeMath for uint;\n\n /** How many investors we have now */\n uint public investorCount;\n\n /** How many wei we have raised totla. */\n uint public weiRaised;\n\n /** Who are our investors (iterable) */\n address[] public investors;\n\n /** How much they have invested */\n mapping(address => uint) public balances;\n\n /** How many tokens investors have claimed */\n mapping(address => uint) public claimed;\n\n /** When our refund freeze is over (UNIT timestamp) */\n uint public freezeEndsAt;\n\n /** What is the minimum buy in */\n uint public weiMinimumLimit;\n\n /** What is the maximum buy in */\n uint public weiMaximumLimit;\n\n /** How many weis total we are allowed to collect. */\n uint public weiCap;\n\n /** How many tokens were bought */\n uint public tokensBought;\n\n /** How many investors have claimed their tokens */\n uint public claimCount;\n\n uint public totalClaimed;\n\n /** If timeLock > 0, claiming is possible only after the time has passed **/\n uint public timeLock;\n\n /** This is used to signal that we want the refund **/\n bool public forcedRefund;\n\n /** Our ICO contract where we will move the funds */\n Crowdsale public crowdsale;\n\n /** What is our current state. */\n enum State{Unknown, Funding, Distributing, Refunding}\n\n /** Somebody loaded their investment money */\n event Invested(address investor, uint weiAmount, uint tokenAmount, uint128 customerId);\n\n /** Refund claimed */\n event Refunded(address investor, uint value);\n\n /** We executed our buy */\n event TokensBoughts(uint count);\n\n /** We distributed tokens to an investor */\n event Distributed(address investor, uint count);\n\n /**\n * Create presale contract where lock up period is given days\n */\n function PreICOProxyBuyer(address _owner, uint _freezeEndsAt, uint _weiMinimumLimit, uint _weiMaximumLimit, uint _weiCap) {\n\n owner = _owner;\n\n // Give argument\n if(_freezeEndsAt == 0) {\n throw;\n }\n\n // Give argument\n if(_weiMinimumLimit == 0) {\n throw;\n }\n\n if(_weiMaximumLimit == 0) {\n throw;\n }\n\n weiMinimumLimit = _weiMinimumLimit;\n weiMaximumLimit = _weiMaximumLimit;\n weiCap = _weiCap;\n freezeEndsAt = _freezeEndsAt;\n }\n\n /**\n * Get the token we are distributing.\n */\n function getToken() public constant returns(FractionalERC20) {\n if(address(crowdsale) == 0) {\n throw;\n }\n\n return crowdsale.token();\n }\n\n /**\n * Participate to a presale.\n */\n function invest(uint128 customerId) private {\n\n // Cannot invest anymore through crowdsale when moving has begun\n if(getState() != State.Funding) throw;\n\n if(msg.value == 0) throw; // No empty buys\n\n address investor = msg.sender;\n\n bool existing = balances[investor] > 0;\n\n balances[investor] = balances[investor].add(msg.value);\n\n // Need to satisfy minimum and maximum limits\n if(balances[investor] < weiMinimumLimit || balances[investor] > weiMaximumLimit) {\n throw;\n }\n\n // This is a new investor\n if(!existing) {\n investors.push(investor);\n investorCount++;\n }\n\n weiRaised = weiRaised.add(msg.value);\n if(weiRaised > weiCap) {\n throw;\n }\n\n // We will use the same event form the Crowdsale for compatibility reasons\n // despite not having a token amount.\n Invested(investor, msg.value, 0, customerId);\n }\n\n function buyWithCustomerId(uint128 customerId) public stopInEmergency payable {\n invest(customerId);\n }\n\n function buy() public stopInEmergency payable {\n invest(0x0);\n }\n\n\n /**\n * Load funds to the crowdsale for all investors.\n *\n *\n */\n function buyForEverybody() stopNonOwnersInEmergency public {\n\n if(getState() != State.Funding) {\n // Only allow buy once\n throw;\n }\n\n // Crowdsale not yet set\n if(address(crowdsale) == 0) throw;\n\n // Buy tokens on the contract\n crowdsale.invest.value(weiRaised)(address(this));\n\n // Record how many tokens we got\n tokensBought = getToken().balanceOf(address(this));\n\n if(tokensBought == 0) {\n // Did not get any tokens\n throw;\n }\n\n TokensBoughts(tokensBought);\n }\n\n /**\n * How may tokens each investor gets.\n */\n function getClaimAmount(address investor) public constant returns (uint) {\n\n // Claims can be only made if we manage to buy tokens\n if(getState() != State.Distributing) {\n throw;\n }\n return balances[investor].mul(tokensBought) / weiRaised;\n }\n\n /**\n * How many tokens remain unclaimed for an investor.\n */\n function getClaimLeft(address investor) public constant returns (uint) {\n return getClaimAmount(investor).sub(claimed[investor]);\n }\n\n /**\n * Claim all remaining tokens for this investor.\n */\n function claimAll() {\n claim(getClaimLeft(msg.sender));\n }\n\n /**\n * Claim N bought tokens to the investor as the msg sender.\n *\n */\n function claim(uint amount) stopInEmergency {\n require (now > timeLock);\n\n address investor = msg.sender;\n\n if(amount == 0) {\n throw;\n }\n\n if(getClaimLeft(investor) < amount) {\n // Woops we cannot get more than we have left\n throw;\n }\n\n // We track who many investor have (partially) claimed their tokens\n if(claimed[investor] == 0) {\n claimCount++;\n }\n\n claimed[investor] = claimed[investor].add(amount);\n totalClaimed = totalClaimed.add(amount);\n getToken().transfer(investor, amount);\n\n Distributed(investor, amount);\n }\n\n /**\n * ICO never happened. Allow refund.\n */\n function refund() stopInEmergency {\n\n // Trying to ask refund too soon\n if(getState() != State.Refunding) throw;\n\n address investor = msg.sender;\n if(balances[investor] == 0) throw;\n uint amount = balances[investor];\n delete balances[investor];\n if(!(investor.call.value(amount)())) throw;\n Refunded(investor, amount);\n }\n\n /**\n * Set the target crowdsale where we will move presale funds when the crowdsale opens.\n */\n function setCrowdsale(Crowdsale _crowdsale) public onlyOwner {\n crowdsale = _crowdsale;\n\n // Check interface\n if(!crowdsale.isCrowdsale()) true;\n }\n\n /// @dev Setting timelock (delay) for claiming\n /// @param _timeLock Time after which claiming is possible\n function setTimeLock(uint _timeLock) public onlyOwner {\n timeLock = _timeLock;\n }\n\n /// @dev This is used in the first case scenario, this will force the state\n /// to refunding. This can be also used when the ICO fails to meet the cap.\n function forceRefund() public onlyOwner {\n forcedRefund = true;\n }\n\n /// @dev This should be used if the Crowdsale fails, to receive the refuld money.\n /// we can't use Crowdsale's refund, since our default function does not\n /// accept money in.\n function loadRefund() public payable {\n if(getState() != State.Refunding) throw;\n }\n\n /**\n * Resolve the contract umambigious state.\n */\n function getState() public returns(State) {\n if (forcedRefund)\n return State.Refunding;\n\n if(tokensBought == 0) {\n if(now >= freezeEndsAt) {\n return State.Refunding;\n } else {\n return State.Funding;\n }\n } else {\n return State.Distributing;\n }\n }\n\n /** Interface marker. */\n function isPresale() public constant returns (bool) {\n return true;\n }\n\n /** Explicitly call function from your wallet. */\n function() payable {\n throw;\n }\n}\n"}, "PreICOProxyBuyer_EventCompatibility": {"abi": [{"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}, {"indexed": false, "name": "customerId", "type": "uint128"}], "name": "Invested", "type": "event"}], "bytecode": "0x6080604052348015600f57600080fd5b50603580601d6000396000f3006080604052600080fd00a165627a7a723058201403684205ddb2937a620fe8f22720d78660448a61a8aac626fcf51627b7231a0029", "bytecode_runtime": "0x6080604052600080fd00a165627a7a723058201403684205ddb2937a620fe8f22720d78660448a61a8aac626fcf51627b7231a0029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}, {"indexed": false, "name": "customerId", "type": "uint128"}], "name": "Invested", "type": "event"}], "devdoc": {"methods": {}}, "userdoc": {"methods": {}}}, "settings": {"compilationTarget": {"contracts/PreICOProxyBuyer_EventCompatibility.sol": "PreICOProxyBuyer_EventCompatibility"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/PreICOProxyBuyer_EventCompatibility.sol": {"keccak256": "0xcdba01bfcc55ac11283149b002015cd1aa9c70f847e8824a3718f072a6fad4ba", "urls": ["bzzr://068ad1a2d54d6330ee66f091d2da29f4b7eb5720892d013fb40378c359397114"]}}, "version": 1}, "name": "PreICOProxyBuyer_EventCompatibility", "ordered_full_dependencies": [], "source_path": "contracts/PreICOProxyBuyer_EventCompatibility.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * ABI compatibility shim to get.\n *\n * You can use this shim to get events out of old PreICOProxyBuyer contracts.\n */\ncontract PreICOProxyBuyer_EventCompatibility {\n\n /** Somebody loaded their investment money */\n event Invested(address investor, uint weiAmount, uint128 customerId);\n\n}\n"}, "PresaleFundCollector": {"abi": [{"constant": true, "inputs": [], "name": "weiMinimumLimit", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "investor", "type": "address"}], "name": "participateCrowdsaleInvestor", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "balances", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "uint256"}], "name": "investors", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_crowdsale", "type": "address"}], "name": "setCrowdsale", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "refund", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "freezeEndsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "MAX_INVESTORS", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "crowdsale", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "participateCrowdsaleAll", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "moving", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "investorCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "invest", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [{"name": "_owner", "type": "address"}, {"name": "_freezeEndsAt", "type": "uint256"}, {"name": "_weiMinimumLimit", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"payable": true, "stateMutability": "payable", "type": "fallback"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Invested", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Refunded", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "bytecode": "0x6080604052602060015534801561001557600080fd5b506040516060806108398339810160409081528151602083015191909201516000805433600160a060020a03199182161716600160a060020a03851617905581151561006057600080fd5b80151561006c57600080fd5b600655600555506107b7806100826000396000f3006080604052600436106100da5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416631540fe2281146100df57806324ae84cc1461010657806327e235e3146101295780633feb5f2b1461014a578063483a20b21461017e578063590e1ae31461019f5780636962b010146101b45780636a34480b146101c95780638da5cb5b146101de5780639c1e03a0146101f3578063b8e3e6da14610208578063cb11526d1461021d578063d7e64c0014610246578063e8b5e51f1461025b578063f2fde38b14610263575b600080fd5b3480156100eb57600080fd5b506100f4610284565b60408051918252519081900360200190f35b34801561011257600080fd5b50610127600160a060020a036004351661028a565b005b34801561013557600080fd5b506100f4600160a060020a0360043516610377565b34801561015657600080fd5b50610162600435610389565b60408051600160a060020a039092168252519081900360200190f35b34801561018a57600080fd5b50610127600160a060020a03600435166103b1565b3480156101ab57600080fd5b506101276103fd565b3480156101c057600080fd5b506100f46104c7565b3480156101d557600080fd5b506100f46104cd565b3480156101ea57600080fd5b506101626104d3565b3480156101ff57600080fd5b506101626104e2565b34801561021457600080fd5b506101276104f6565b34801561022957600080fd5b5061023261053a565b604080519115158252519081900360200190f35b34801561025257600080fd5b506100f4610543565b610127610549565b34801561026f57600080fd5b50610127600160a060020a03600435166106f7565b60065481565b6007546000906101009004600160a060020a031615156102a957600080fd5b6007805460ff19166001179055600160a060020a03821660009081526004602052604081205411156103735750600160a060020a03808216600081815260046020819052604080832080549084905560075482517f03f9c7930000000000000000000000000000000000000000000000000000000081529384019590955290519094610100909404909316926303f9c7939285926024808201939182900301818588803b15801561035957600080fd5b505af115801561036d573d6000803e3d6000fd5b50505050505b5050565b60046020526000908152604090205481565b600380548290811061039757fe5b600091825260209091200154600160a060020a0316905081565b600054600160a060020a031633146103c857600080fd5b60078054600160a060020a039092166101000274ffffffffffffffffffffffffffffffffffffffff0019909216919091179055565b60008060055442101561040f57600080fd5b6007805460ff1916600117905533600081815260046020526040902054909250151561043a57600080fd5b50600160a060020a038116600081815260046020526040808220805490839055905190929183156108fc02918491818181858888f19350505050151561047f57600080fd5b60408051600160a060020a03841681526020810183905281517fd7dee2702d63ad89917b6a4da9981c90c4d24f8c2bdfd64c604ecae57d8d0651929181900390910190a15050565b60055481565b60015481565b600054600160a060020a031681565b6007546101009004600160a060020a031681565b60005b6003548110156105375761052f60038281548110151561051557fe5b600091825260209091200154600160a060020a031661028a565b6001016104f9565b50565b60075460ff1681565b60025481565b600754600090819060ff161561055e57600080fd5b50503360008181526004602081815260408084205481517f66098d4f000000000000000000000000000000000000000000000000000000008152938401819052346024850152905193109273__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b1580156105e157600080fd5b505af41580156105f5573d6000803e3d6000fd5b505050506040513d602081101561060b57600080fd5b5051600160a060020a0383166000908152600460205260409020819055600654111561063657600080fd5b8015156106b0576001546002541061064d57600080fd5b60038054600180820183556000929092527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0385161790556002805490910190555b60408051600160a060020a038416815234602082015281517fc3f75dfc78f6efac88ad5abb5e606276b903647d97b2a62a1ef89840a658bbc3929181900390910190a15050565b600054600160a060020a0316331461070e57600080fd5b600160a060020a038116151561072357600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790555600a165627a7a72305820a4eb307d8bb79f882d5ae13b82bb5a660d65dc4a79bc8689f97101e5ab9257a30029", "bytecode_runtime": "0x6080604052600436106100da5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416631540fe2281146100df57806324ae84cc1461010657806327e235e3146101295780633feb5f2b1461014a578063483a20b21461017e578063590e1ae31461019f5780636962b010146101b45780636a34480b146101c95780638da5cb5b146101de5780639c1e03a0146101f3578063b8e3e6da14610208578063cb11526d1461021d578063d7e64c0014610246578063e8b5e51f1461025b578063f2fde38b14610263575b600080fd5b3480156100eb57600080fd5b506100f4610284565b60408051918252519081900360200190f35b34801561011257600080fd5b50610127600160a060020a036004351661028a565b005b34801561013557600080fd5b506100f4600160a060020a0360043516610377565b34801561015657600080fd5b50610162600435610389565b60408051600160a060020a039092168252519081900360200190f35b34801561018a57600080fd5b50610127600160a060020a03600435166103b1565b3480156101ab57600080fd5b506101276103fd565b3480156101c057600080fd5b506100f46104c7565b3480156101d557600080fd5b506100f46104cd565b3480156101ea57600080fd5b506101626104d3565b3480156101ff57600080fd5b506101626104e2565b34801561021457600080fd5b506101276104f6565b34801561022957600080fd5b5061023261053a565b604080519115158252519081900360200190f35b34801561025257600080fd5b506100f4610543565b610127610549565b34801561026f57600080fd5b50610127600160a060020a03600435166106f7565b60065481565b6007546000906101009004600160a060020a031615156102a957600080fd5b6007805460ff19166001179055600160a060020a03821660009081526004602052604081205411156103735750600160a060020a03808216600081815260046020819052604080832080549084905560075482517f03f9c7930000000000000000000000000000000000000000000000000000000081529384019590955290519094610100909404909316926303f9c7939285926024808201939182900301818588803b15801561035957600080fd5b505af115801561036d573d6000803e3d6000fd5b50505050505b5050565b60046020526000908152604090205481565b600380548290811061039757fe5b600091825260209091200154600160a060020a0316905081565b600054600160a060020a031633146103c857600080fd5b60078054600160a060020a039092166101000274ffffffffffffffffffffffffffffffffffffffff0019909216919091179055565b60008060055442101561040f57600080fd5b6007805460ff1916600117905533600081815260046020526040902054909250151561043a57600080fd5b50600160a060020a038116600081815260046020526040808220805490839055905190929183156108fc02918491818181858888f19350505050151561047f57600080fd5b60408051600160a060020a03841681526020810183905281517fd7dee2702d63ad89917b6a4da9981c90c4d24f8c2bdfd64c604ecae57d8d0651929181900390910190a15050565b60055481565b60015481565b600054600160a060020a031681565b6007546101009004600160a060020a031681565b60005b6003548110156105375761052f60038281548110151561051557fe5b600091825260209091200154600160a060020a031661028a565b6001016104f9565b50565b60075460ff1681565b60025481565b600754600090819060ff161561055e57600080fd5b50503360008181526004602081815260408084205481517f66098d4f000000000000000000000000000000000000000000000000000000008152938401819052346024850152905193109273__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b1580156105e157600080fd5b505af41580156105f5573d6000803e3d6000fd5b505050506040513d602081101561060b57600080fd5b5051600160a060020a0383166000908152600460205260409020819055600654111561063657600080fd5b8015156106b0576001546002541061064d57600080fd5b60038054600180820183556000929092527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0385161790556002805490910190555b60408051600160a060020a038416815234602082015281517fc3f75dfc78f6efac88ad5abb5e606276b903647d97b2a62a1ef89840a658bbc3929181900390910190a15050565b600054600160a060020a0316331461070e57600080fd5b600160a060020a038116151561072357600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790555600a165627a7a72305820a4eb307d8bb79f882d5ae13b82bb5a660d65dc4a79bc8689f97101e5ab9257a30029", "direct_dependencies": ["SafeMathLib"], "full_dependencies": ["SafeMathLib"], "linkrefs": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 3162}], "linkrefs_runtime": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 2902}], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": true, "inputs": [], "name": "weiMinimumLimit", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "investor", "type": "address"}], "name": "participateCrowdsaleInvestor", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "balances", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "uint256"}], "name": "investors", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_crowdsale", "type": "address"}], "name": "setCrowdsale", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "refund", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "freezeEndsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "MAX_INVESTORS", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "crowdsale", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "participateCrowdsaleAll", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "moving", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "investorCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "invest", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [{"name": "_owner", "type": "address"}, {"name": "_freezeEndsAt", "type": "uint256"}, {"name": "_weiMinimumLimit", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"payable": true, "stateMutability": "payable", "type": "fallback"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Invested", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Refunded", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "devdoc": {"methods": {"transferOwnership(address)": {"details": "Allows the current owner to transfer control of the contract to a newOwner.", "params": {"newOwner": "The address to transfer ownership to."}}}}, "userdoc": {"methods": {"invest()": {"notice": "Participate to a presale."}, "participateCrowdsaleAll()": {"notice": "Load funds to the crowdsale for all investor. "}, "participateCrowdsaleInvestor(address)": {"notice": "Load funds to the crowdsale for a single investor."}, "refund()": {"notice": "ICO never happened. Allow refund."}, "setCrowdsale(address)": {"notice": "Set the target crowdsale where we will move presale funds when the crowdsale opens."}}}}, "settings": {"compilationTarget": {"contracts/PresaleFundCollector.sol": "PresaleFundCollector"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/Crowdsale.sol": {"keccak256": "0x2697c26528f64bb954a7c2547d3b43317d2d2b02c7d9d05a7b1ab388cd79f65d", "urls": ["bzzr://f28b280794222114141c51dd5c388d403a7c98d8b51e04170a0e294246d5164b"]}, "contracts/CrowdsaleBase.sol": {"keccak256": "0xe2c9ed11183ce705616980df7b02544d72fe18b40395da7d9d4bcb621fb87871", "urls": ["bzzr://07f3887ba0d0eb3248b1ad3581480ed71a2fe70a47dcc283c4e97c8c92e0790a"]}, "contracts/FinalizeAgent.sol": {"keccak256": "0x309fd0510e0b3e2b5044e33f7c80cfb2d6f2a5697e41a5f185931d65770cfea9", "urls": ["bzzr://4e7ed6f82c0f542e92e56c12566b2ecd7666730865bf12566c27587ec64160ac"]}, "contracts/FractionalERC20.sol": {"keccak256": "0x75bc4ad90a8b13ce961c89b1bf405776f616e019d3a2720168f8e52be223198f", "urls": ["bzzr://6a3688f12da1a5c890ef06f80f883f6c5370886092d38a1b33cd4219b718478b"]}, "contracts/Haltable.sol": {"keccak256": "0x265dcf25e7c9ab4b6eecd2181f1b71334a1b5381a60f8db7d9526dab120f4b70", "urls": ["bzzr://d522e00fa9e075941469dd81738b59fdb99ce3c12cdc39e33abe40b588c4da9b"]}, "contracts/PresaleFundCollector.sol": {"keccak256": "0xfb15ce89ad0b78b5efb7d8f133d2f399c96246d8dd2548d563e41844e3b8239f", "urls": ["bzzr://1b2a4847f49a63cce5e01d2357e23822bf7cdb668e9ad8e7cea8315d0a15a579"]}, "contracts/PricingStrategy.sol": {"keccak256": "0x8df5093b7d07168ad994f9176de0bd2268f6563b1e8a3a448d8cfe7fe246c628", "urls": ["bzzr://ef5c944d51f739ab34e2c951d6ac82a7152e6bb844058a8e57bae52c14cbe16b"]}, "contracts/SafeMathLib.sol": {"keccak256": "0x501bfe31e274b9a5591f7c540bdced4d4312e27d4f19599147c9bbca3d9c6b18", "urls": ["bzzr://a80935ebddb06c247d71372d4e5833ee029f08633bd0fe4a274a57009567e5b9"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}}, "version": 1}, "name": "PresaleFundCollector", "ordered_full_dependencies": ["SafeMathLib"], "source_path": "contracts/PresaleFundCollector.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Safe unsigned safe math.\n *\n * https://blog.aragon.one/library-driven-development-in-solidity-2bebcaf88736#.750gwtwli\n *\n * Originally from https://raw.githubusercontent.com/AragonOne/zeppelin-solidity/master/contracts/SafeMathLib.sol\n *\n * Maintained here until merged to mainline zeppelin-solidity.\n *\n */\nlibrary SafeMathLib {\n\n function times(uint a, uint b) returns (uint) {\n uint c = a * b;\n assert(a == 0 || c / a == b);\n return c;\n }\n\n function minus(uint a, uint b) returns (uint) {\n assert(b <= a);\n return a - b;\n }\n\n function plus(uint a, uint b) returns (uint) {\n uint c = a + b;\n assert(c>=a);\n return c;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Interface for defining crowdsale pricing.\n */\ncontract PricingStrategy {\n\n /** Interface declaration. */\n function isPricingStrategy() public constant returns (bool) {\n return true;\n }\n\n /** Self check if all references are correctly set.\n *\n * Checks that pricing strategy matches crowdsale parameters.\n */\n function isSane(address crowdsale) public constant returns (bool) {\n return true;\n }\n\n /**\n * @dev Pricing tells if this is a presale purchase or not.\n @param purchaser Address of the purchaser\n @return False by default, true if a presale purchaser\n */\n function isPresalePurchase(address purchaser) public constant returns (bool) {\n return false;\n }\n\n /**\n * When somebody tries to buy tokens for X eth, calculate how many tokens they get.\n *\n *\n * @param value - What is the value of the transaction send in as wei\n * @param tokensSold - how much tokens have been sold this far\n * @param weiRaised - how much money has been raised this far in the main token sale - this number excludes presale\n * @param msgSender - who is the investor of this transaction\n * @param decimals - how many decimal units the token has\n * @return Amount of tokens the investor receives\n */\n function calculatePrice(uint value, uint weiRaised, uint tokensSold, address msgSender, uint decimals) public constant returns (uint tokenAmount);\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Finalize agent defines what happens at the end of succeseful crowdsale.\n *\n * - Allocate tokens for founders, bounties and community\n * - Make tokens transferable\n * - etc.\n */\ncontract FinalizeAgent {\n\n function isFinalizeAgent() public constant returns(bool) {\n return true;\n }\n\n /** Return true if we can run finalizeCrowdsale() properly.\n *\n * This is a safety check function that doesn't allow crowdsale to begin\n * unless the finalizer has been set up properly.\n */\n function isSane() public constant returns (bool);\n\n /** Called once by crowdsale finalize() if the sale was success. */\n function finalizeCrowdsale();\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n\n/**\n * A token that defines fractional units as decimals.\n */\ncontract FractionalERC20 is ERC20 {\n\n uint public decimals;\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n/*\n * Haltable\n *\n * Abstract contract that allows children to implement an\n * emergency stop mechanism. Differs from Pausable by causing a throw when in halt mode.\n *\n *\n * Originally envisioned in FirstBlood ICO contract.\n */\ncontract Haltable is Ownable {\n bool public halted;\n\n modifier stopInEmergency {\n if (halted) throw;\n _;\n }\n\n modifier stopNonOwnersInEmergency {\n if (halted && msg.sender != owner) throw;\n _;\n }\n\n modifier onlyInEmergency {\n if (!halted) throw;\n _;\n }\n\n // called by the owner on emergency, triggers stopped state\n function halt() external onlyOwner {\n halted = true;\n }\n\n // called by the owner on end of emergency, returns to normal state\n function unhalt() external onlyOwner onlyInEmergency {\n halted = false;\n }\n\n}\n\n\n\n\n\n\n\n/**\n * Crowdsale state machine without buy functionality.\n *\n * Implements basic state machine logic, but leaves out all buy functions,\n * so that subclasses can implement their own buying logic.\n *\n *\n * For the default buy() implementation see Crowdsale.sol.\n */\ncontract CrowdsaleBase is Haltable {\n\n /* Max investment count when we are still allowed to change the multisig address */\n uint public MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE = 5;\n\n using SafeMathLib for uint;\n\n /* The token we are selling */\n FractionalERC20 public token;\n\n /* How we are going to price our offering */\n PricingStrategy public pricingStrategy;\n\n /* Post-success callback */\n FinalizeAgent public finalizeAgent;\n\n /* tokens will be transfered from this address */\n address public multisigWallet;\n\n /* if the funding goal is not reached, investors may withdraw their funds */\n uint public minimumFundingGoal;\n\n /* the UNIX timestamp start date of the crowdsale */\n uint public startsAt;\n\n /* the UNIX timestamp end date of the crowdsale */\n uint public endsAt;\n\n /* the number of tokens already sold through this contract*/\n uint public tokensSold = 0;\n\n /* How many wei of funding we have raised */\n uint public weiRaised = 0;\n\n /* Calculate incoming funds from presale contracts and addresses */\n uint public presaleWeiRaised = 0;\n\n /* How many distinct addresses have invested */\n uint public investorCount = 0;\n\n /* How much wei we have returned back to the contract after a failed crowdfund. */\n uint public loadedRefund = 0;\n\n /* How much wei we have given back to investors.*/\n uint public weiRefunded = 0;\n\n /* Has this crowdsale been finalized */\n bool public finalized;\n\n /** How much ETH each address has invested to this crowdsale */\n mapping (address => uint256) public investedAmountOf;\n\n /** How much tokens this crowdsale has credited for each investor address */\n mapping (address => uint256) public tokenAmountOf;\n\n /** Addresses that are allowed to invest even before ICO offical opens. For testing, for ICO partners, etc. */\n mapping (address => bool) public earlyParticipantWhitelist;\n\n /** This is for manul testing for the interaction from owner wallet. You can set it to any value and inspect this in blockchain explorer to see that crowdsale interaction works. */\n uint public ownerTestValue;\n\n /** State machine\n *\n * - Preparing: All contract initialization calls and variables have not been set yet\n * - Prefunding: We have not passed start time yet\n * - Funding: Active crowdsale\n * - Success: Minimum funding goal reached\n * - Failure: Minimum funding goal not reached before ending time\n * - Finalized: The finalized has been called and succesfully executed\n * - Refunding: Refunds are loaded on the contract for reclaim.\n */\n enum State{Unknown, Preparing, PreFunding, Funding, Success, Failure, Finalized, Refunding}\n\n // A new investment was made\n event Invested(address investor, uint weiAmount, uint tokenAmount, uint128 customerId);\n\n // Refund was processed for a contributor\n event Refund(address investor, uint weiAmount);\n\n // The rules were changed what kind of investments we accept\n event InvestmentPolicyChanged(bool newRequireCustomerId, bool newRequiredSignedAddress, address newSignerAddress);\n\n // Address early participation whitelist status changed\n event Whitelisted(address addr, bool status);\n\n // Crowdsale end time has been changed\n event EndsAtChanged(uint newEndsAt);\n\n function CrowdsaleBase(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal) {\n\n owner = msg.sender;\n\n token = FractionalERC20(_token);\n setPricingStrategy(_pricingStrategy);\n\n multisigWallet = _multisigWallet;\n if(multisigWallet == 0) {\n throw;\n }\n\n if(_start == 0) {\n throw;\n }\n\n startsAt = _start;\n\n if(_end == 0) {\n throw;\n }\n\n endsAt = _end;\n\n // Don't mess the dates\n if(startsAt >= endsAt) {\n throw;\n }\n\n // Minimum funding goal can be zero\n minimumFundingGoal = _minimumFundingGoal;\n }\n\n /**\n * Don't expect to just send in money and get tokens.\n */\n function() payable {\n throw;\n }\n\n /**\n * @dev Make an investment.\n *\n * Crowdsale must be running for one to invest.\n * We must have not pressed the emergency brake.\n *\n * @param receiver The Ethereum address who receives the tokens\n * @param customerId (optional) UUID v4 to track the successful payments on the server side'\n * @param tokenAmount Amount of tokens which be credited to receiver\n *\n * @return tokensBought How mony tokens were bought\n */\n function buyTokens(address receiver, uint128 customerId, uint256 tokenAmount) stopInEmergency internal returns(uint tokensBought) {\n\n // Determine if it's a good time to accept investment from this participant\n if(getState() == State.PreFunding) {\n // Are we whitelisted for early deposit\n if(!earlyParticipantWhitelist[receiver]) {\n throw;\n }\n } else if(getState() == State.Funding) {\n // Retail participants can only come in when the crowdsale is running\n // pass\n } else {\n // Unwanted state\n throw;\n }\n\n uint weiAmount = msg.value;\n\n // Dust transaction\n require(tokenAmount != 0);\n\n if(investedAmountOf[receiver] == 0) {\n // A new investor\n investorCount++;\n }\n\n // Update investor\n investedAmountOf[receiver] = investedAmountOf[receiver].plus(weiAmount);\n tokenAmountOf[receiver] = tokenAmountOf[receiver].plus(tokenAmount);\n\n // Update totals\n weiRaised = weiRaised.plus(weiAmount);\n tokensSold = tokensSold.plus(tokenAmount);\n\n if(pricingStrategy.isPresalePurchase(receiver)) {\n presaleWeiRaised = presaleWeiRaised.plus(weiAmount);\n }\n\n // Check that we did not bust the cap\n require(!isBreakingCap(weiAmount, tokenAmount, weiRaised, tokensSold));\n\n assignTokens(receiver, tokenAmount);\n\n // Pocket the money, or fail the crowdsale if we for some reason cannot send the money to our multisig\n if(!multisigWallet.send(weiAmount)) throw;\n\n // Tell us invest was success\n Invested(receiver, weiAmount, tokenAmount, customerId);\n\n return tokenAmount;\n }\n\n /**\n * @dev Make an investment based on pricing strategy\n *\n * This is a wrapper for buyTokens(), but the amount of tokens receiver will\n * have depends on the pricing strategy used.\n *\n * @param receiver The Ethereum address who receives the tokens\n * @param customerId (optional) UUID v4 to track the successful payments on the server side'\n *\n * @return tokensBought How mony tokens were bought\n */\n function investInternal(address receiver, uint128 customerId) stopInEmergency internal returns(uint tokensBought) {\n return buyTokens(receiver, customerId, pricingStrategy.calculatePrice(msg.value, weiRaised - presaleWeiRaised, tokensSold, msg.sender, token.decimals()));\n }\n\n /**\n * @dev Calculate tokens user will have for their purchase\n *\n * @param weisTotal How much ethers (in wei) the user putssssss in\n * @param pricePerToken What is the price for one token\n *\n * @return tokensTotal which is received tokens, token decimals included\n */\n function calculateTokens(uint256 weisTotal, uint256 pricePerToken) public constant returns(uint tokensTotal) {\n // pricePerToken is how many full tokens, token decimal place included, you get for wei amount.\n // Because, in theory, decimal amount can vary, we do the exponent calculation here,\n // though gas wise using 10**18 constant would be much simpler.\n // Furthermore we could use rough amounts and take in raw wei per tokens amount,\n // but we lose too much accuracy for generic calculations, thus all these are\n // practically implemented as 10**18 fixed points.\n uint multiplier = 10 ** token.decimals();\n return weisTotal.times(multiplier)/pricePerToken;\n }\n\n /**\n * Finalize a succcesful crowdsale.\n *\n * The owner can triggre a call the contract that provides post-crowdsale actions, like releasing the tokens.\n */\n function finalize() public inState(State.Success) onlyOwner stopInEmergency {\n\n // Already finalized\n if(finalized) {\n throw;\n }\n\n // Finalizing is optional. We only call it if we are given a finalizing agent.\n if(address(finalizeAgent) != 0) {\n finalizeAgent.finalizeCrowdsale();\n }\n\n finalized = true;\n }\n\n /**\n * Allow to (re)set finalize agent.\n *\n * Design choice: no state restrictions on setting this, so that we can fix fat finger mistakes.\n */\n function setFinalizeAgent(FinalizeAgent addr) onlyOwner {\n finalizeAgent = addr;\n\n // Don't allow setting bad agent\n if(!finalizeAgent.isFinalizeAgent()) {\n throw;\n }\n }\n\n /**\n * Allow crowdsale owner to close early or extend the crowdsale.\n *\n * This is useful e.g. for a manual soft cap implementation:\n * - after X amount is reached determine manual closing\n *\n * This may put the crowdsale to an invalid state,\n * but we trust owners know what they are doing.\n *\n */\n function setEndsAt(uint time) onlyOwner {\n\n if(now > time) {\n throw; // Don't change past\n }\n\n if(startsAt > time) {\n throw; // Prevent human mistakes\n }\n\n endsAt = time;\n EndsAtChanged(endsAt);\n }\n\n /**\n * Allow to (re)set pricing strategy.\n *\n * Design choice: no state restrictions on the set, so that we can fix fat finger mistakes.\n */\n function setPricingStrategy(PricingStrategy _pricingStrategy) onlyOwner {\n pricingStrategy = _pricingStrategy;\n\n // Don't allow setting bad agent\n if(!pricingStrategy.isPricingStrategy()) {\n throw;\n }\n }\n\n /**\n * Allow to change the team multisig address in the case of emergency.\n *\n * This allows to save a deployed crowdsale wallet in the case the crowdsale has not yet begun\n * (we have done only few test transactions). After the crowdsale is going\n * then multisig address stays locked for the safety reasons.\n */\n function setMultisig(address addr) public onlyOwner {\n\n // Change\n if(investorCount > MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE) {\n throw;\n }\n\n multisigWallet = addr;\n }\n\n /**\n * Allow load refunds back on the contract for the refunding.\n *\n * The team can transfer the funds back on the smart contract in the case the minimum goal was not reached..\n */\n function loadRefund() public payable inState(State.Failure) {\n if(msg.value == 0) throw;\n loadedRefund = loadedRefund.plus(msg.value);\n }\n\n /**\n * Investors can claim refund.\n *\n * Note that any refunds from proxy buyers should be handled separately,\n * and not through this contract.\n */\n function refund() public inState(State.Refunding) {\n uint256 weiValue = investedAmountOf[msg.sender];\n if (weiValue == 0) throw;\n investedAmountOf[msg.sender] = 0;\n weiRefunded = weiRefunded.plus(weiValue);\n Refund(msg.sender, weiValue);\n if (!msg.sender.send(weiValue)) throw;\n }\n\n /**\n * @return true if the crowdsale has raised enough money to be a successful.\n */\n function isMinimumGoalReached() public constant returns (bool reached) {\n return weiRaised >= minimumFundingGoal;\n }\n\n /**\n * Check if the contract relationship looks good.\n */\n function isFinalizerSane() public constant returns (bool sane) {\n return finalizeAgent.isSane();\n }\n\n /**\n * Check if the contract relationship looks good.\n */\n function isPricingSane() public constant returns (bool sane) {\n return pricingStrategy.isSane(address(this));\n }\n\n /**\n * Crowdfund state machine management.\n *\n * We make it a function and do not assign the result to a variable, so there is no chance of the variable being stale.\n */\n function getState() public constant returns (State) {\n if(finalized) return State.Finalized;\n else if (address(finalizeAgent) == 0) return State.Preparing;\n else if (!finalizeAgent.isSane()) return State.Preparing;\n else if (!pricingStrategy.isSane(address(this))) return State.Preparing;\n else if (block.timestamp < startsAt) return State.PreFunding;\n else if (block.timestamp <= endsAt && !isCrowdsaleFull()) return State.Funding;\n else if (isMinimumGoalReached()) return State.Success;\n else if (!isMinimumGoalReached() && weiRaised > 0 && loadedRefund >= weiRaised) return State.Refunding;\n else return State.Failure;\n }\n\n /** This is for manual testing of multisig wallet interaction */\n function setOwnerTestValue(uint val) onlyOwner {\n ownerTestValue = val;\n }\n\n /**\n * Allow addresses to do early participation.\n *\n * TODO: Fix spelling error in the name\n */\n function setEarlyParicipantWhitelist(address addr, bool status) onlyOwner {\n earlyParticipantWhitelist[addr] = status;\n Whitelisted(addr, status);\n }\n\n\n /** Interface marker. */\n function isCrowdsale() public constant returns (bool) {\n return true;\n }\n\n //\n // Modifiers\n //\n\n /** Modified allowing execution only if the crowdsale is currently running. */\n modifier inState(State state) {\n if(getState() != state) throw;\n _;\n }\n\n\n //\n // Abstract functions\n //\n\n /**\n * Check if the current invested breaks our cap rules.\n *\n *\n * The child contract must define their own cap setting rules.\n * We allow a lot of flexibility through different capping strategies (ETH, token count)\n * Called from invest().\n *\n * @param weiAmount The amount of wei the investor tries to invest in the current transaction\n * @param tokenAmount The amount of tokens we try to give to the investor in the current transaction\n * @param weiRaisedTotal What would be our total raised balance after this transaction\n * @param tokensSoldTotal What would be our total sold tokens count after this transaction\n *\n * @return true if taking this investment would break our cap rules\n */\n function isBreakingCap(uint weiAmount, uint tokenAmount, uint weiRaisedTotal, uint tokensSoldTotal) constant returns (bool limitBroken);\n\n /**\n * Check if the current crowdsale is full and we can no longer sell any tokens.\n */\n function isCrowdsaleFull() public constant returns (bool);\n\n /**\n * Create new tokens or transfer issued tokens to the investor depending on the cap model.\n */\n function assignTokens(address receiver, uint tokenAmount) internal;\n}\n\n\n\n/**\n * Abstract base contract for token sales with the default buy entry points.\n *\n * Handle\n * - start and end dates\n * - accepting investments\n * - minimum funding goal and refund\n * - various statistics during the crowdfund\n * - different pricing strategies\n * - different investment policies (require server side customer id, allow only whitelisted addresses)\n *\n * Does not Handle\n *\n * - Token allocation (minting vs. transfer)\n * - Cap rules\n *\n */\ncontract Crowdsale is CrowdsaleBase {\n\n /* Do we need to have unique contributor id for each customer */\n bool public requireCustomerId;\n\n /**\n * Do we verify that contributor has been cleared on the server side (accredited investors only).\n * This method was first used in FirstBlood crowdsale to ensure all contributors have accepted terms on sale (on the web).\n */\n bool public requiredSignedAddress;\n\n /* Server side address that signed allowed contributors (Ethereum addresses) that can participate the crowdsale */\n address public signerAddress;\n\n function Crowdsale(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal) CrowdsaleBase(_token, _pricingStrategy, _multisigWallet, _start, _end, _minimumFundingGoal) {\n }\n\n /**\n * Preallocate tokens for the early investors.\n *\n * Preallocated tokens have been sold before the actual crowdsale opens.\n * This function mints the tokens and moves the crowdsale needle.\n *\n * Investor count is not handled; it is assumed this goes for multiple investors\n * and the token distribution happens outside the smart contract flow.\n *\n * No money is exchanged, as the crowdsale team already have received the payment.\n *\n * @param fullTokens tokens as full tokens - decimal places added internally\n * @param weiPrice Price of a single full token in wei\n *\n */\n function preallocate(address receiver, uint fullTokens, uint weiPrice) public onlyOwner {\n\n uint tokenAmount = fullTokens * 10**token.decimals();\n uint weiAmount = weiPrice * fullTokens; // This can be also 0, we give out tokens for free\n\n weiRaised = weiRaised.plus(weiAmount);\n tokensSold = tokensSold.plus(tokenAmount);\n\n investedAmountOf[receiver] = investedAmountOf[receiver].plus(weiAmount);\n tokenAmountOf[receiver] = tokenAmountOf[receiver].plus(tokenAmount);\n\n assignTokens(receiver, tokenAmount);\n\n // Tell us invest was success\n Invested(receiver, weiAmount, tokenAmount, 0);\n }\n\n /**\n * Allow anonymous contributions to this crowdsale.\n */\n function investWithSignedAddress(address addr, uint128 customerId, uint8 v, bytes32 r, bytes32 s) public payable {\n bytes32 hash = sha256(addr);\n if (ecrecover(hash, v, r, s) != signerAddress) throw;\n if(customerId == 0) throw; // UUIDv4 sanity check\n investInternal(addr, customerId);\n }\n\n /**\n * Track who is the customer making the payment so we can send thank you email.\n */\n function investWithCustomerId(address addr, uint128 customerId) public payable {\n if(requiredSignedAddress) throw; // Crowdsale allows only server-side signed participants\n if(customerId == 0) throw; // UUIDv4 sanity check\n investInternal(addr, customerId);\n }\n\n /**\n * Allow anonymous contributions to this crowdsale.\n */\n function invest(address addr) public payable {\n if(requireCustomerId) throw; // Crowdsale needs to track participants for thank you email\n if(requiredSignedAddress) throw; // Crowdsale allows only server-side signed participants\n investInternal(addr, 0);\n }\n\n /**\n * Invest to tokens, recognize the payer and clear his address.\n *\n */\n function buyWithSignedAddress(uint128 customerId, uint8 v, bytes32 r, bytes32 s) public payable {\n investWithSignedAddress(msg.sender, customerId, v, r, s);\n }\n\n /**\n * Invest to tokens, recognize the payer.\n *\n */\n function buyWithCustomerIdWithChecksum(uint128 customerId, bytes1 checksum) public payable {\n // see customerid.py\n if (bytes1(sha3(customerId)) != checksum) throw;\n investWithCustomerId(msg.sender, customerId);\n }\n\n /**\n * Legacy API signature.\n */\n function buyWithCustomerId(uint128 customerId) public payable {\n investWithCustomerId(msg.sender, customerId);\n }\n\n /**\n * The basic entry point to participate the crowdsale process.\n *\n * Pay for funding, get invested tokens back in the sender address.\n */\n function buy() public payable {\n invest(msg.sender);\n }\n\n /**\n * Set policy do we need to have server-side customer ids for the investments.\n *\n */\n function setRequireCustomerId(bool value) onlyOwner {\n requireCustomerId = value;\n InvestmentPolicyChanged(requireCustomerId, requiredSignedAddress, signerAddress);\n }\n\n /**\n * Set policy if all investors must be cleared on the server side first.\n *\n * This is e.g. for the accredited investor clearing.\n *\n */\n function setRequireSignedAddress(bool value, address _signerAddress) onlyOwner {\n requiredSignedAddress = value;\n signerAddress = _signerAddress;\n InvestmentPolicyChanged(requireCustomerId, requiredSignedAddress, signerAddress);\n }\n\n}\n\n\n\n/**\n * Collect funds from presale investors to be send to the crowdsale smart contract later.\n *\n * - Collect funds from pre-sale investors\n * - Send funds to the crowdsale when it opens\n * - Allow owner to set the crowdsale\n * - Have refund after X days as a safety hatch if the crowdsale doesn't materilize\n *\n */\ncontract PresaleFundCollector is Ownable {\n\n using SafeMathLib for uint;\n\n /** How many investors when can carry per a single contract */\n uint public MAX_INVESTORS = 32;\n\n /** How many investors we have now */\n uint public investorCount;\n\n /** Who are our investors (iterable) */\n address[] public investors;\n\n /** How much they have invested */\n mapping(address => uint) public balances;\n\n /** When our refund freeze is over (UNIX timestamp) */\n uint public freezeEndsAt;\n\n /** What is the minimum buy in */\n uint public weiMinimumLimit;\n\n /** Have we begun to move funds */\n bool public moving;\n\n /** Our ICO contract where we will move the funds */\n Crowdsale public crowdsale;\n\n event Invested(address investor, uint value);\n event Refunded(address investor, uint value);\n\n /**\n * Create presale contract where lock up period is given days\n */\n function PresaleFundCollector(address _owner, uint _freezeEndsAt, uint _weiMinimumLimit) {\n\n owner = _owner;\n\n // Give argument\n if(_freezeEndsAt == 0) {\n throw;\n }\n\n // Give argument\n if(_weiMinimumLimit == 0) {\n throw;\n }\n\n weiMinimumLimit = _weiMinimumLimit;\n freezeEndsAt = _freezeEndsAt;\n }\n\n /**\n * Participate to a presale.\n */\n function invest() public payable {\n\n // Cannot invest anymore through crowdsale when moving has begun\n if(moving) throw;\n\n address investor = msg.sender;\n\n bool existing = balances[investor] > 0;\n\n balances[investor] = balances[investor].plus(msg.value);\n\n // Need to fulfill minimum limit\n if(balances[investor] < weiMinimumLimit) {\n throw;\n }\n\n // This is a new investor\n if(!existing) {\n\n // Limit number of investors to prevent too long loops\n if(investorCount >= MAX_INVESTORS) throw;\n\n investors.push(investor);\n investorCount++;\n }\n\n Invested(investor, msg.value);\n }\n\n /**\n * Load funds to the crowdsale for a single investor.\n */\n function participateCrowdsaleInvestor(address investor) public {\n\n // Crowdsale not yet set\n if(address(crowdsale) == 0) throw;\n\n moving = true;\n\n if(balances[investor] > 0) {\n uint amount = balances[investor];\n delete balances[investor];\n crowdsale.invest.value(amount)(investor);\n }\n }\n\n /**\n * Load funds to the crowdsale for all investor.\n *\n */\n function participateCrowdsaleAll() public {\n\n // We might hit a max gas limit in this loop,\n // and in this case you can simply call participateCrowdsaleInvestor() for all investors\n for(uint i=0; i bool) bearer;\n }\n\n /**\n * @dev give an address access to this role\n */\n function add(Role storage role, address addr)\n internal\n {\n role.bearer[addr] = true;\n }\n\n /**\n * @dev remove an address' access to this role\n */\n function remove(Role storage role, address addr)\n internal\n {\n role.bearer[addr] = false;\n }\n\n /**\n * @dev check if an address has this role\n * // reverts\n */\n function check(Role storage role, address addr)\n view\n internal\n {\n require(has(role, addr));\n }\n\n /**\n * @dev check if an address has this role\n * @return bool\n */\n function has(Role storage role, address addr)\n view\n internal\n returns (bool)\n {\n return role.bearer[addr];\n }\n}\n\n\n\n/**\n * @title RBAC (Role-Based Access Control)\n * @author Matt Condon (@Shrugs)\n * @dev Stores and provides setters and getters for roles and addresses.\n * Supports unlimited numbers of roles and addresses.\n * See //contracts/mocks/RBACMock.sol for an example of usage.\n * This RBAC method uses strings to key roles. It may be beneficial\n * for you to write your own implementation of this interface using Enums or similar.\n * It's also recommended that you define constants in the contract, like ROLE_ADMIN below,\n * to avoid typos.\n */\ncontract RBAC {\n using Roles for Roles.Role;\n\n mapping (string => Roles.Role) private roles;\n\n event RoleAdded(address addr, string roleName);\n event RoleRemoved(address addr, string roleName);\n\n /**\n * A constant role name for indicating admins.\n */\n string public constant ROLE_ADMIN = \"admin\";\n\n /**\n * @dev constructor. Sets msg.sender as admin by default\n */\n function RBAC()\n public\n {\n addRole(msg.sender, ROLE_ADMIN);\n }\n\n /**\n * @dev reverts if addr does not have role\n * @param addr address\n * @param roleName the name of the role\n * // reverts\n */\n function checkRole(address addr, string roleName)\n view\n public\n {\n roles[roleName].check(addr);\n }\n\n /**\n * @dev determine if addr has role\n * @param addr address\n * @param roleName the name of the role\n * @return bool\n */\n function hasRole(address addr, string roleName)\n view\n public\n returns (bool)\n {\n return roles[roleName].has(addr);\n }\n\n /**\n * @dev add a role to an address\n * @param addr address\n * @param roleName the name of the role\n */\n function adminAddRole(address addr, string roleName)\n onlyAdmin\n public\n {\n addRole(addr, roleName);\n }\n\n /**\n * @dev remove a role from an address\n * @param addr address\n * @param roleName the name of the role\n */\n function adminRemoveRole(address addr, string roleName)\n onlyAdmin\n public\n {\n removeRole(addr, roleName);\n }\n\n /**\n * @dev add a role to an address\n * @param addr address\n * @param roleName the name of the role\n */\n function addRole(address addr, string roleName)\n internal\n {\n roles[roleName].add(addr);\n RoleAdded(addr, roleName);\n }\n\n /**\n * @dev remove a role from an address\n * @param addr address\n * @param roleName the name of the role\n */\n function removeRole(address addr, string roleName)\n internal\n {\n roles[roleName].remove(addr);\n RoleRemoved(addr, roleName);\n }\n\n /**\n * @dev modifier to scope access to a single role (uses msg.sender as addr)\n * @param roleName the name of the role\n * // reverts\n */\n modifier onlyRole(string roleName)\n {\n checkRole(msg.sender, roleName);\n _;\n }\n\n /**\n * @dev modifier to scope access to admins\n * // reverts\n */\n modifier onlyAdmin()\n {\n checkRole(msg.sender, ROLE_ADMIN);\n _;\n }\n\n /**\n * @dev modifier to scope access to a set of roles (uses msg.sender as addr)\n * @param roleNames the names of the roles to scope access to\n * // reverts\n *\n * @TODO - when solidity supports dynamic arrays as arguments to modifiers, provide this\n * see: https://github.com/ethereum/solidity/issues/2467\n */\n // modifier onlyRoles(string[] roleNames) {\n // bool hasAnyRole = false;\n // for (uint8 i = 0; i < roleNames.length; i++) {\n // if (hasRole(msg.sender, roleNames[i])) {\n // hasAnyRole = true;\n // break;\n // }\n // }\n\n // require(hasAnyRole);\n\n // _;\n // }\n}\n"}, "Recoverable": {"abi": [{"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "recoverTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "tokensToBeReturned", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "bytecode": "0x608060405234801561001057600080fd5b5060008054600160a060020a031916331790556103f9806100326000396000f3006080604052600436106100615763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166316114acd81146100665780638da5cb5b14610096578063c45d19db146100d4578063f2fde38b14610114575b600080fd5b34801561007257600080fd5b5061009473ffffffffffffffffffffffffffffffffffffffff60043516610142565b005b3480156100a257600080fd5b506100ab610246565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b3480156100e057600080fd5b5061010273ffffffffffffffffffffffffffffffffffffffff60043516610262565b60408051918252519081900360200190f35b34801561012057600080fd5b5061009473ffffffffffffffffffffffffffffffffffffffff60043516610305565b60005473ffffffffffffffffffffffffffffffffffffffff16331461016657600080fd5b60005473ffffffffffffffffffffffffffffffffffffffff8083169163a9059cbb911661019284610262565b6040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561021757600080fd5b505af115801561022b573d6000803e3d6000fd5b505050506040513d602081101561024157600080fd5b505050565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905160009173ffffffffffffffffffffffffffffffffffffffff8416916370a082319160248082019260209290919082900301818787803b1580156102d357600080fd5b505af11580156102e7573d6000803e3d6000fd5b505050506040513d60208110156102fd57600080fd5b505192915050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461032957600080fd5b73ffffffffffffffffffffffffffffffffffffffff8116151561034b57600080fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff191673ffffffffffffffffffffffffffffffffffffffff929092169190911790555600a165627a7a7230582033246ccce11761e81fd21f9366984525779e2df75d872573e2952fd4013df6c30029", "bytecode_runtime": "0x6080604052600436106100615763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166316114acd81146100665780638da5cb5b14610096578063c45d19db146100d4578063f2fde38b14610114575b600080fd5b34801561007257600080fd5b5061009473ffffffffffffffffffffffffffffffffffffffff60043516610142565b005b3480156100a257600080fd5b506100ab610246565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b3480156100e057600080fd5b5061010273ffffffffffffffffffffffffffffffffffffffff60043516610262565b60408051918252519081900360200190f35b34801561012057600080fd5b5061009473ffffffffffffffffffffffffffffffffffffffff60043516610305565b60005473ffffffffffffffffffffffffffffffffffffffff16331461016657600080fd5b60005473ffffffffffffffffffffffffffffffffffffffff8083169163a9059cbb911661019284610262565b6040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561021757600080fd5b505af115801561022b573d6000803e3d6000fd5b505050506040513d602081101561024157600080fd5b505050565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905160009173ffffffffffffffffffffffffffffffffffffffff8416916370a082319160248082019260209290919082900301818787803b1580156102d357600080fd5b505af11580156102e7573d6000803e3d6000fd5b505050506040513d60208110156102fd57600080fd5b505192915050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461032957600080fd5b73ffffffffffffffffffffffffffffffffffffffff8116151561034b57600080fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff191673ffffffffffffffffffffffffffffffffffffffff929092169190911790555600a165627a7a7230582033246ccce11761e81fd21f9366984525779e2df75d872573e2952fd4013df6c30029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "recoverTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "tokensToBeReturned", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "devdoc": {"methods": {"recoverTokens(address)": {"details": "This will be invoked by the owner, when owner wants to rescue tokens", "params": {"token": "Token which will we rescue to the owner from the contract"}}, "tokensToBeReturned(address)": {"details": "Interface function, can be overwritten by the superclass", "params": {"token": "Token which balance we will check and return"}, "return": "The amount of tokens (in smallest denominator) the contract owns"}, "transferOwnership(address)": {"details": "Allows the current owner to transfer control of the contract to a newOwner.", "params": {"newOwner": "The address to transfer ownership to."}}}}, "userdoc": {"methods": {}}}, "settings": {"compilationTarget": {"contracts/Recoverable.sol": "Recoverable"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/Recoverable.sol": {"keccak256": "0x311a332cdd87df6e00057f5455f4e68b043b5dbe211f6d68bc64e20817515635", "urls": ["bzzr://4fd99bcfb93baed6e7c8d22ee9ecc5c8346a1aa98288e77b01333b2c5d3f582d"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}}, "version": 1}, "name": "Recoverable", "ordered_full_dependencies": [], "source_path": "contracts/Recoverable.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\ncontract Recoverable is Ownable {\n\n /// @dev Empty constructor (for now)\n function Recoverable() {\n }\n\n /// @dev This will be invoked by the owner, when owner wants to rescue tokens\n /// @param token Token which will we rescue to the owner from the contract\n function recoverTokens(ERC20Basic token) onlyOwner public {\n token.transfer(owner, tokensToBeReturned(token));\n }\n\n /// @dev Interface function, can be overwritten by the superclass\n /// @param token Token which balance we will check and return\n /// @return The amount of tokens (in smallest denominator) the contract owns\n function tokensToBeReturned(ERC20Basic token) public returns (uint) {\n return token.balanceOf(this);\n }\n}\n"}, "RelaunchedCrowdsale": {"abi": [{"constant": true, "inputs": [], "name": "ownerTestValue", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "requireCustomerId", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "invest", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "isPricingSane", "outputs": [{"name": "sane", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "endsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "minimumFundingGoal", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_addr", "type": "address"}, {"name": "_weiAmount", "type": "uint256"}, {"name": "_tokenAmount", "type": "uint256"}, {"name": "_originalTxHash", "type": "uint256"}], "name": "setInvestorData", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "getState", "outputs": [{"name": "", "type": "uint8"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setFinalizeAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "customerId", "type": "uint128"}, {"name": "v", "type": "uint8"}, {"name": "r", "type": "bytes32"}, {"name": "s", "type": "bytes32"}], "name": "investWithSignedAddress", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "investedAmountOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "finalizeAgent", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "receiver", "type": "address"}, {"name": "fullTokens", "type": "uint256"}, {"name": "weiPrice", "type": "uint256"}], "name": "preallocate", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "maximumSellableTokens", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "weiRaised", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isCrowdsale", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "finalize", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_pricingStrategy", "type": "address"}], "name": "setPricingStrategy", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "tokensSold", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "refund", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "signerAddress", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "uint256"}], "name": "reissuedTransactions", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "weiRefunded", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "halt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}, {"name": "checksum", "type": "bytes1"}], "name": "buyWithCustomerIdWithChecksum", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "time", "type": "uint256"}], "name": "setEndsAt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "pricingStrategy", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "loadedRefund", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isMinimumGoalReached", "outputs": [{"name": "reached", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "bool"}], "name": "setRequireCustomerId", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "loadRefund", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "val", "type": "uint256"}], "name": "setOwnerTestValue", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "weisTotal", "type": "uint256"}, {"name": "pricePerToken", "type": "uint256"}], "name": "calculateTokens", "outputs": [{"name": "tokensTotal", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "multisigWallet", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "tokenAmountOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}], "name": "buyWithCustomerId", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [{"name": "weiAmount", "type": "uint256"}, {"name": "tokenAmount", "type": "uint256"}, {"name": "weiRaisedTotal", "type": "uint256"}, {"name": "tokensSoldTotal", "type": "uint256"}], "name": "isBreakingCap", "outputs": [{"name": "limitBroken", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "buy", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "isFinalizerSane", "outputs": [{"name": "sane", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "startsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "finalized", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "halted", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "earlyParticipantWhitelist", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "unhalt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "requiredSignedAddress", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isCrowdsaleFull", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "investorCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "status", "type": "bool"}], "name": "setEarlyParicipantWhitelist", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_originalTxHash", "type": "uint256"}], "name": "getRestoredTransactionStatus", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "bool"}, {"name": "_signerAddress", "type": "address"}], "name": "setRequireSignedAddress", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "customerId", "type": "uint128"}], "name": "investWithCustomerId", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "_addr", "type": "address"}, {"name": "_weiAmount", "type": "uint256"}, {"name": "_tokenAmount", "type": "uint256"}, {"name": "_originalTxHash", "type": "uint256"}], "name": "setInvestorDataAndIssueNewToken", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setMultisig", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}, {"name": "v", "type": "uint8"}, {"name": "r", "type": "bytes32"}, {"name": "s", "type": "bytes32"}], "name": "buyWithSignedAddress", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "presaleWeiRaised", "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": "_token", "type": "address"}, {"name": "_pricingStrategy", "type": "address"}, {"name": "_multisigWallet", "type": "address"}, {"name": "_start", "type": "uint256"}, {"name": "_end", "type": "uint256"}, {"name": "_minimumFundingGoal", "type": "uint256"}, {"name": "_maximumSellableTokens", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"payable": true, "stateMutability": "payable", "type": "fallback"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "addr", "type": "address"}, {"indexed": false, "name": "originalTxHash", "type": "uint256"}], "name": "RestoredInvestment", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}, {"indexed": false, "name": "tokenAmount", "type": "uint256"}, {"indexed": false, "name": "customerId", "type": "uint128"}], "name": "Invested", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}], "name": "Refund", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newRequireCustomerId", "type": "bool"}, {"indexed": false, "name": "newRequiredSignedAddress", "type": "bool"}, {"indexed": false, "name": "newSignerAddress", "type": "address"}], "name": "InvestmentPolicyChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "addr", "type": "address"}, {"indexed": false, "name": "status", "type": "bool"}], "name": "Whitelisted", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newEndsAt", "type": "uint256"}], "name": "EndsAtChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "bytecode": "0x6080604052600560015560006009556000600a556000600b556000600c556000600d556000600e553480156200003457600080fd5b5060405160e0806200293a83398101604090815281516020830151918301516060840151608085015160a086015160c0909601516000805433600160a060020a0319918216811782161790915560028054909116600160a060020a038716179055939592939192909186868686868686868686868686858585858585620000c48564010000000062000153810204565b60058054600160a060020a031916600160a060020a038681169190911791829055161515620000f257600080fd5b821515620000ff57600080fd5b60078390558115156200011157600080fd5b600882905560075482116200012557600080fd5b8060068190555050505050505050505050505080601581905550505050505050505050505050505062000220565b600054600160a060020a031633146200016b57600080fd5b60038054600160a060020a031916600160a060020a038381169190911791829055604080517f04bbc255000000000000000000000000000000000000000000000000000000008152905192909116916304bbc255916004808201926020929091908290030181600087803b158015620001e357600080fd5b505af1158015620001f8573d6000803e3d6000fd5b505050506040513d60208110156200020f57600080fd5b505115156200021d57600080fd5b50565b61270a80620002306000396000f3006080604052600436106102be5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630226401d81146102c357806303ca0eed146102ea57806303f9c79314610313578063062b01ce146103295780630a09284a1461033e57806313f4e9771461035357806316164e15146103685780631865c57d1461039257806319b667da146103cb5780631a49803b146103ec5780631aae34601461042157806321d5c0f61461044257806332013ac3146104735780633ad075ea1461049a5780634042b66f146104af5780634551dd59146104c45780634bb278f3146104d957806350c67734146104ee578063518ab2a81461050f578063590e1ae3146105245780635b7633d0146105395780635d2fea9d1461054e5780635da89ac0146105665780635ed7ca5b1461057b5780636203f09f1461059057806363c6082f146105a55780636e50eb3f146105e757806378b99c24146105ff578063797d9437146106145780637c2e08a3146106295780637f7d711e1461063e57806387612102146106585780638d51faec146106605780638da5cb5b14610678578063903cc5831461068d5780639075becf146106a857806397b150ca146106bd57806399e9376c146106de5780639d3c663f146106fb578063a6f2ae3a1461071c578063a7ba44c314610724578063af46868214610739578063b3f05b971461074e578063b9b8af0b14610763578063cb16e6d014610778578063cb3e64fd14610799578063d222dc04146107ae578063d5d09021146107c3578063d7e64c00146107d8578063eac24932146107ed578063ed2f5b1a14610813578063ed68ff2c1461082b578063ef86944314610851578063f04cb80c1461087a578063f2fde38b146108a4578063f3283fba146108c5578063f4869726146108e6578063f7c00e2f1461090f578063fc0c546a14610924575b600080fd5b3480156102cf57600080fd5b506102d8610939565b60408051918252519081900360200190f35b3480156102f657600080fd5b506102ff61093f565b604080519115158252519081900360200190f35b610327600160a060020a0360043516610948565b005b34801561033557600080fd5b506102ff61097c565b34801561034a57600080fd5b506102d8610a13565b34801561035f57600080fd5b506102d8610a19565b34801561037457600080fd5b50610327600160a060020a0360043516602435604435606435610a1f565b34801561039e57600080fd5b506103a7610b2b565b604051808260078111156103b757fe5b60ff16815260200191505060405180910390f35b3480156103d757600080fd5b50610327600160a060020a0360043516610d19565b610327600160a060020a03600435166fffffffffffffffffffffffffffffffff6024351660ff60443516606435608435610dea565b34801561042d57600080fd5b506102d8600160a060020a0360043516610f12565b34801561044e57600080fd5b50610457610f24565b60408051600160a060020a039092168252519081900360200190f35b34801561047f57600080fd5b50610327600160a060020a0360043516602435604435610f33565b3480156104a657600080fd5b506102d86112e9565b3480156104bb57600080fd5b506102d86112ef565b3480156104d057600080fd5b506102ff6112f5565b3480156104e557600080fd5b506103276112fa565b3480156104fa57600080fd5b50610327600160a060020a03600435166113ff565b34801561051b57600080fd5b506102d861149a565b34801561053057600080fd5b506103276114a0565b34801561054557600080fd5b506104576115e6565b34801561055a57600080fd5b506102ff6004356115fb565b34801561057257600080fd5b506102d8611610565b34801561058757600080fd5b50610327611616565b34801561059c57600080fd5b506102d8611664565b6103276fffffffffffffffffffffffffffffffff600435167fff000000000000000000000000000000000000000000000000000000000000006024351661166a565b3480156105f357600080fd5b506103276004356116dc565b34801561060b57600080fd5b5061045761174a565b34801561062057600080fd5b506102d8611759565b34801561063557600080fd5b506102ff61175f565b34801561064a57600080fd5b50610327600435151561176a565b6103276117ee565b34801561066c57600080fd5b506103276004356118ae565b34801561068457600080fd5b506104576118ca565b34801561069957600080fd5b506102d86004356024356118d9565b3480156106b457600080fd5b50610457611a30565b3480156106c957600080fd5b506102d8600160a060020a0360043516611a3f565b6103276fffffffffffffffffffffffffffffffff60043516611a51565b34801561070757600080fd5b506102ff600435602435604435606435611a5b565b610327611a66565b34801561073057600080fd5b506102ff611a71565b34801561074557600080fd5b506102d8611adf565b34801561075a57600080fd5b506102ff611ae5565b34801561076f57600080fd5b506102ff611aee565b34801561078457600080fd5b506102ff600160a060020a0360043516611b0f565b3480156107a557600080fd5b50610327611b24565b3480156107ba57600080fd5b506102ff611b84565b3480156107cf57600080fd5b506102ff611b92565b3480156107e457600080fd5b506102d8611b9d565b3480156107f957600080fd5b50610327600160a060020a03600435166024351515611ba3565b34801561081f57600080fd5b506102ff600435611c1e565b34801561083757600080fd5b506103276004351515600160a060020a0360243516611c33565b610327600160a060020a03600435166fffffffffffffffffffffffffffffffff60243516611ce3565b34801561088657600080fd5b50610327600160a060020a0360043516602435604435606435611d25565b3480156108b057600080fd5b50610327600160a060020a0360043516611e24565b3480156108d157600080fd5b50610327600160a060020a0360043516611eb8565b6103276fffffffffffffffffffffffffffffffff6004351660ff60243516604435606435611f0f565b34801561091b57600080fd5b506102d8611f22565b34801561093057600080fd5b50610457611f28565b60135481565b60145460ff1681565b60145460ff161561095857600080fd5b601454610100900460ff161561096d57600080fd5b610978816000611f37565b5050565b600354604080517f8e7682880000000000000000000000000000000000000000000000000000000081523060048201529051600092600160a060020a031691638e76828891602480830192602092919082900301818787803b1580156109e157600080fd5b505af11580156109f5573d6000803e3d6000fd5b505050506040513d6020811015610a0b57600080fd5b505190505b90565b60085481565b60065481565b600054600160a060020a03163314610a3657600080fd5b600160a060020a0384166000908152601060205260409020541515610a5f57600c805460010190555b600160a060020a038416600081815260106020908152604080832080548801905560118252808320805487019055600a805488019055600980548701905580519384529083018690528281018590526060830191909152517f0396f60aaad038749091d273dc13aaabc63db6e2271c7bad442d5cf25cc433509181900360800190a160408051600160a060020a03861681526020810183905281517f08b1adf3440f557bc3ad64e718e68b3656a43fdde2a00cbecf89765352b76cb6929181900390910190a150505050565b600f5460009060ff1615610b4157506006610a10565b600454600160a060020a03161515610b5b57506001610a10565b60048054604080517f82771c8e0000000000000000000000000000000000000000000000000000000081529051600160a060020a03909216926382771c8e9282820192602092908290030181600087803b158015610bb857600080fd5b505af1158015610bcc573d6000803e3d6000fd5b505050506040513d6020811015610be257600080fd5b50511515610bf257506001610a10565b600354604080517f8e7682880000000000000000000000000000000000000000000000000000000081523060048201529051600160a060020a0390921691638e768288916024808201926020929091908290030181600087803b158015610c5857600080fd5b505af1158015610c6c573d6000803e3d6000fd5b505050506040513d6020811015610c8257600080fd5b50511515610c9257506001610a10565b600754421015610ca457506002610a10565b6008544211158015610cbb5750610cb9611b92565b155b15610cc857506003610a10565b610cd061175f565b15610cdd57506004610a10565b610ce561175f565b158015610cf457506000600a54115b8015610d045750600a54600d5410155b15610d1157506007610a10565b506005610a10565b600054600160a060020a03163314610d3057600080fd5b6004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383811691909117808355604080517f614cb9040000000000000000000000000000000000000000000000000000000081529051919092169263614cb904928082019260209290918290030181600087803b158015610db057600080fd5b505af1158015610dc4573d6000803e3d6000fd5b505050506040513d6020811015610dda57600080fd5b50511515610de757600080fd5b50565b60006002866040518082600160a060020a0316600160a060020a03166c010000000000000000000000000281526014019150506020604051808303816000865af1158015610e3c573d6000803e3d6000fd5b5050506040513d6020811015610e5157600080fd5b5051601454604080516000808252602080830180855286905260ff8a16838501526060830189905260808301889052925194955062010000909304600160a060020a03169360019360a08084019493601f198401939081900390910191865af1158015610ec2573d6000803e3d6000fd5b50505060206040510351600160a060020a0316141515610ee157600080fd5b6fffffffffffffffffffffffffffffffff85161515610eff57600080fd5b610f098686611f37565b50505050505050565b60106020526000908152604090205481565b600454600160a060020a031681565b600080548190600160a060020a03163314610f4d57600080fd5b600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610fb957600080fd5b505af1158015610fcd573d6000803e3d6000fd5b505050506040513d6020811015610fe357600080fd5b5051600a8054604080516000805160206126bf833981519152815260048101929092528688026024830181905290519390920a8702945090925073__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f91604480820192602092909190829003018186803b15801561105957600080fd5b505af415801561106d573d6000803e3d6000fd5b505050506040513d602081101561108357600080fd5b5051600a55600954604080516000805160206126bf83398151915281526004810192909252602482018490525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b1580156110eb57600080fd5b505af41580156110ff573d6000803e3d6000fd5b505050506040513d602081101561111557600080fd5b5051600955600160a060020a0385166000908152601060209081526040918290205482516000805160206126bf8339815191528152600481019190915260248101849052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561119357600080fd5b505af41580156111a7573d6000803e3d6000fd5b505050506040513d60208110156111bd57600080fd5b5051600160a060020a03861660009081526010602090815260408083209390935560118152908290205482516000805160206126bf8339815191528152600481019190915260248101859052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561124357600080fd5b505af4158015611257573d6000803e3d6000fd5b505050506040513d602081101561126d57600080fd5b5051600160a060020a03861660009081526011602052604090205561129285836120de565b60408051600160a060020a0387168152602081018390528082018490526000606082015290517f0396f60aaad038749091d273dc13aaabc63db6e2271c7bad442d5cf25cc433509181900360800190a15050505050565b60155481565b600a5481565b600190565b600480611305610b2b565b600781111561131057fe5b1461131a57600080fd5b600054600160a060020a0316331461133157600080fd5b60005474010000000000000000000000000000000000000000900460ff161561135957600080fd5b600f5460ff161561136957600080fd5b600454600160a060020a0316156113ef5760048054604080517f0bf318a30000000000000000000000000000000000000000000000000000000081529051600160a060020a0390921692630bf318a392828201926000929082900301818387803b1580156113d657600080fd5b505af11580156113ea573d6000803e3d6000fd5b505050505b50600f805460ff19166001179055565b600054600160a060020a0316331461141657600080fd5b6003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038381169190911791829055604080517f04bbc255000000000000000000000000000000000000000000000000000000008152905192909116916304bbc255916004808201926020929091908290030181600087803b158015610db057600080fd5b60095481565b60006007806114ad610b2b565b60078111156114b857fe5b146114c257600080fd5b3360009081526010602052604090205491508115156114e057600080fd5b33600090815260106020908152604080832092909255600e5482516000805160206126bf8339815191528152600481019190915260248101859052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561155557600080fd5b505af4158015611569573d6000803e3d6000fd5b505050506040513d602081101561157f57600080fd5b5051600e55604080513381526020810184905281517fbb28353e4598c3b9199101a66e0989549b659a59a54d2c27fbb183f1932c8e6d929181900390910190a1604051339083156108fc029084906000818181858888f19350505050151561097857600080fd5b601454620100009004600160a060020a031681565b60166020526000908152604090205460ff1681565b600e5481565b600054600160a060020a0316331461162d57600080fd5b6000805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b60015481565b604080517001000000000000000000000000000000006fffffffffffffffffffffffffffffffff851602815290519081900360100190207fff00000000000000000000000000000000000000000000000000000000000000908116908216146116d257600080fd5b6109783383611ce3565b600054600160a060020a031633146116f357600080fd5b8042111561170057600080fd5b80600754111561170f57600080fd5b60088190556040805182815290517fd34bb772c4ae9baa99db852f622773b31c7827e8ee818449fef20d30980bd3109181900360200190a150565b600354600160a060020a031681565b600d5481565b600654600a54101590565b600054600160a060020a0316331461178157600080fd5b6014805460ff191682151517908190556040805160ff808416151582526101008404161515602082015262010000909204600160a060020a031682820152517f48d826081348f5f00e8a33c9ae8ce89ed4c6e88400b585a478bc203d9e8177d3916060908290030190a150565b6005806117f9610b2b565b600781111561180457fe5b1461180e57600080fd5b34151561181a57600080fd5b600d54604080516000805160206126bf833981519152815260048101929092523460248301525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b15801561187c57600080fd5b505af4158015611890573d6000803e3d6000fd5b505050506040513d60208110156118a657600080fd5b5051600d5550565b600054600160a060020a031633146118c557600080fd5b601355565b600054600160a060020a031681565b600080600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561194857600080fd5b505af115801561195c573d6000803e3d6000fd5b505050506040513d602081101561197257600080fd5b5051604080517f1d3b9edf00000000000000000000000000000000000000000000000000000000815260048101879052600a9290920a602483018190529051909250849173__contracts/SafeMathLib.sol:SafeMathLi__91631d3b9edf91604480820192602092909190829003018186803b1580156119f257600080fd5b505af4158015611a06573d6000803e3d6000fd5b505050506040513d6020811015611a1c57600080fd5b5051811515611a2757fe5b04949350505050565b600554600160a060020a031681565b60116020526000908152604090205481565b610de73382611ce3565b601554109392505050565b611a6f33610948565b565b6000600460009054906101000a9004600160a060020a0316600160a060020a03166382771c8e6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156109e157600080fd5b60075481565b600f5460ff1681565b60005474010000000000000000000000000000000000000000900460ff1681565b60126020526000908152604090205460ff1681565b600054600160a060020a03163314611b3b57600080fd5b60005474010000000000000000000000000000000000000000900460ff161515611b6457600080fd5b6000805474ff000000000000000000000000000000000000000019169055565b601454610100900460ff1681565b601554600954101590565b600c5481565b600054600160a060020a03163314611bba57600080fd5b600160a060020a038216600081815260126020908152604091829020805460ff191685151590811790915582519384529083015280517fa54714518c5d275fdcd3d2a461e4858e4e8cb04fb93cd0bca9d6d34115f264409281900390910190a15050565b60009081526016602052604090205460ff1690565b600054600160a060020a03163314611c4a57600080fd5b60148054600160a060020a038084166201000090810275ffffffffffffffffffffffffffffffffffffffff00001987151561010090810261ff0019909616959095171617938490556040805160ff86811615158252948604909416151560208501529304168183015290517f48d826081348f5f00e8a33c9ae8ce89ed4c6e88400b585a478bc203d9e8177d39181900360600190a15050565b601454610100900460ff1615611cf857600080fd5b6fffffffffffffffffffffffffffffffff81161515611d1657600080fd5b611d208282611f37565b505050565b60008054600160a060020a03163314611d3d57600080fd5b60008281526016602052604090205460ff1615611d5957600080fd5b611d6585858585610a1f565b611d758484600a54600954611a5b565b15611d7f57600080fd5b50600081815260166020526040808220805460ff1916600117905560025481517f40c10f19000000000000000000000000000000000000000000000000000000008152600160a060020a038881166004830152602482018790529251929091169283926340c10f1992604480820193929182900301818387803b158015611e0557600080fd5b505af1158015611e19573d6000803e3d6000fd5b505050505050505050565b600054600160a060020a03163314611e3b57600080fd5b600160a060020a0381161515611e5057600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600054600160a060020a03163314611ecf57600080fd5b600154600c541115611ee057600080fd5b6005805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b611f1c3385858585610dea565b50505050565b600b5481565b600254600160a060020a031681565b6000805474010000000000000000000000000000000000000000900460ff1615611f6057600080fd5b6120d78383600360009054906101000a9004600160a060020a0316600160a060020a03166318a4155e34600b54600a540360095433600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561200157600080fd5b505af1158015612015573d6000803e3d6000fd5b505050506040513d602081101561202b57600080fd5b5051604080517c010000000000000000000000000000000000000000000000000000000063ffffffff8916028152600481019690965260248601949094526044850192909252600160a060020a0316606484015260848301525160a48083019260209291908290030181600087803b1580156120a657600080fd5b505af11580156120ba573d6000803e3d6000fd5b505050506040513d60208110156120d057600080fd5b5051612163565b9392505050565b600254604080517f40c10f19000000000000000000000000000000000000000000000000000000008152600160a060020a038581166004830152602482018590529151919092169182916340c10f199160448082019260009290919082900301818387803b15801561214f57600080fd5b505af1158015610f09573d6000803e3d6000fd5b60008054819074010000000000000000000000000000000000000000900460ff161561218e57600080fd5b6002612198610b2b565b60078111156121a357fe5b14156121d557600160a060020a03851660009081526012602052604090205460ff1615156121d057600080fd5b6121f1565b60036121df610b2b565b60078111156121ea57fe5b14156102be575b50348215156121ff57600080fd5b600160a060020a038516600090815260106020526040902054151561222857600c805460010190555b600160a060020a0385166000908152601060209081526040918290205482516000805160206126bf8339815191528152600481019190915260248101849052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b1580156122a157600080fd5b505af41580156122b5573d6000803e3d6000fd5b505050506040513d60208110156122cb57600080fd5b5051600160a060020a03861660009081526010602090815260408083209390935560118152908290205482516000805160206126bf8339815191528152600481019190915260248101869052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561235157600080fd5b505af4158015612365573d6000803e3d6000fd5b505050506040513d602081101561237b57600080fd5b5051600160a060020a03861660009081526011602090815260409182902092909255600a5481516000805160206126bf8339815191528152600481019190915260248101849052905173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f9260448082019391829003018186803b1580156123fb57600080fd5b505af415801561240f573d6000803e3d6000fd5b505050506040513d602081101561242557600080fd5b5051600a55600954604080516000805160206126bf83398151915281526004810192909252602482018590525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b15801561248d57600080fd5b505af41580156124a1573d6000803e3d6000fd5b505050506040513d60208110156124b757600080fd5b5051600955600354604080517ff14ae17d000000000000000000000000000000000000000000000000000000008152600160a060020a0388811660048301529151919092169163f14ae17d9160248083019260209291908290030181600087803b15801561252457600080fd5b505af1158015612538573d6000803e3d6000fd5b505050506040513d602081101561254e57600080fd5b5051156125fc57600b5473__contracts/SafeMathLib.sol:SafeMathLi__6366098d4f9091836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b1580156125cc57600080fd5b505af41580156125e0573d6000803e3d6000fd5b505050506040513d60208110156125f657600080fd5b5051600b555b61260c8184600a54600954611a5b565b1561261657600080fd5b61262085846120de565b600554604051600160a060020a039091169082156108fc029083906000818181858888f19350505050151561265457600080fd5b60408051600160a060020a0387168152602081018390528082018590526fffffffffffffffffffffffffffffffff8616606082015290517f0396f60aaad038749091d273dc13aaabc63db6e2271c7bad442d5cf25cc433509181900360800190a150909392505050560066098d4f00000000000000000000000000000000000000000000000000000000a165627a7a72305820537e20e1f4e1a8ba39ab38b36b061dd9a767870fe94ab2d6ff1875238f42624e0029", "bytecode_runtime": "0x6080604052600436106102be5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630226401d81146102c357806303ca0eed146102ea57806303f9c79314610313578063062b01ce146103295780630a09284a1461033e57806313f4e9771461035357806316164e15146103685780631865c57d1461039257806319b667da146103cb5780631a49803b146103ec5780631aae34601461042157806321d5c0f61461044257806332013ac3146104735780633ad075ea1461049a5780634042b66f146104af5780634551dd59146104c45780634bb278f3146104d957806350c67734146104ee578063518ab2a81461050f578063590e1ae3146105245780635b7633d0146105395780635d2fea9d1461054e5780635da89ac0146105665780635ed7ca5b1461057b5780636203f09f1461059057806363c6082f146105a55780636e50eb3f146105e757806378b99c24146105ff578063797d9437146106145780637c2e08a3146106295780637f7d711e1461063e57806387612102146106585780638d51faec146106605780638da5cb5b14610678578063903cc5831461068d5780639075becf146106a857806397b150ca146106bd57806399e9376c146106de5780639d3c663f146106fb578063a6f2ae3a1461071c578063a7ba44c314610724578063af46868214610739578063b3f05b971461074e578063b9b8af0b14610763578063cb16e6d014610778578063cb3e64fd14610799578063d222dc04146107ae578063d5d09021146107c3578063d7e64c00146107d8578063eac24932146107ed578063ed2f5b1a14610813578063ed68ff2c1461082b578063ef86944314610851578063f04cb80c1461087a578063f2fde38b146108a4578063f3283fba146108c5578063f4869726146108e6578063f7c00e2f1461090f578063fc0c546a14610924575b600080fd5b3480156102cf57600080fd5b506102d8610939565b60408051918252519081900360200190f35b3480156102f657600080fd5b506102ff61093f565b604080519115158252519081900360200190f35b610327600160a060020a0360043516610948565b005b34801561033557600080fd5b506102ff61097c565b34801561034a57600080fd5b506102d8610a13565b34801561035f57600080fd5b506102d8610a19565b34801561037457600080fd5b50610327600160a060020a0360043516602435604435606435610a1f565b34801561039e57600080fd5b506103a7610b2b565b604051808260078111156103b757fe5b60ff16815260200191505060405180910390f35b3480156103d757600080fd5b50610327600160a060020a0360043516610d19565b610327600160a060020a03600435166fffffffffffffffffffffffffffffffff6024351660ff60443516606435608435610dea565b34801561042d57600080fd5b506102d8600160a060020a0360043516610f12565b34801561044e57600080fd5b50610457610f24565b60408051600160a060020a039092168252519081900360200190f35b34801561047f57600080fd5b50610327600160a060020a0360043516602435604435610f33565b3480156104a657600080fd5b506102d86112e9565b3480156104bb57600080fd5b506102d86112ef565b3480156104d057600080fd5b506102ff6112f5565b3480156104e557600080fd5b506103276112fa565b3480156104fa57600080fd5b50610327600160a060020a03600435166113ff565b34801561051b57600080fd5b506102d861149a565b34801561053057600080fd5b506103276114a0565b34801561054557600080fd5b506104576115e6565b34801561055a57600080fd5b506102ff6004356115fb565b34801561057257600080fd5b506102d8611610565b34801561058757600080fd5b50610327611616565b34801561059c57600080fd5b506102d8611664565b6103276fffffffffffffffffffffffffffffffff600435167fff000000000000000000000000000000000000000000000000000000000000006024351661166a565b3480156105f357600080fd5b506103276004356116dc565b34801561060b57600080fd5b5061045761174a565b34801561062057600080fd5b506102d8611759565b34801561063557600080fd5b506102ff61175f565b34801561064a57600080fd5b50610327600435151561176a565b6103276117ee565b34801561066c57600080fd5b506103276004356118ae565b34801561068457600080fd5b506104576118ca565b34801561069957600080fd5b506102d86004356024356118d9565b3480156106b457600080fd5b50610457611a30565b3480156106c957600080fd5b506102d8600160a060020a0360043516611a3f565b6103276fffffffffffffffffffffffffffffffff60043516611a51565b34801561070757600080fd5b506102ff600435602435604435606435611a5b565b610327611a66565b34801561073057600080fd5b506102ff611a71565b34801561074557600080fd5b506102d8611adf565b34801561075a57600080fd5b506102ff611ae5565b34801561076f57600080fd5b506102ff611aee565b34801561078457600080fd5b506102ff600160a060020a0360043516611b0f565b3480156107a557600080fd5b50610327611b24565b3480156107ba57600080fd5b506102ff611b84565b3480156107cf57600080fd5b506102ff611b92565b3480156107e457600080fd5b506102d8611b9d565b3480156107f957600080fd5b50610327600160a060020a03600435166024351515611ba3565b34801561081f57600080fd5b506102ff600435611c1e565b34801561083757600080fd5b506103276004351515600160a060020a0360243516611c33565b610327600160a060020a03600435166fffffffffffffffffffffffffffffffff60243516611ce3565b34801561088657600080fd5b50610327600160a060020a0360043516602435604435606435611d25565b3480156108b057600080fd5b50610327600160a060020a0360043516611e24565b3480156108d157600080fd5b50610327600160a060020a0360043516611eb8565b6103276fffffffffffffffffffffffffffffffff6004351660ff60243516604435606435611f0f565b34801561091b57600080fd5b506102d8611f22565b34801561093057600080fd5b50610457611f28565b60135481565b60145460ff1681565b60145460ff161561095857600080fd5b601454610100900460ff161561096d57600080fd5b610978816000611f37565b5050565b600354604080517f8e7682880000000000000000000000000000000000000000000000000000000081523060048201529051600092600160a060020a031691638e76828891602480830192602092919082900301818787803b1580156109e157600080fd5b505af11580156109f5573d6000803e3d6000fd5b505050506040513d6020811015610a0b57600080fd5b505190505b90565b60085481565b60065481565b600054600160a060020a03163314610a3657600080fd5b600160a060020a0384166000908152601060205260409020541515610a5f57600c805460010190555b600160a060020a038416600081815260106020908152604080832080548801905560118252808320805487019055600a805488019055600980548701905580519384529083018690528281018590526060830191909152517f0396f60aaad038749091d273dc13aaabc63db6e2271c7bad442d5cf25cc433509181900360800190a160408051600160a060020a03861681526020810183905281517f08b1adf3440f557bc3ad64e718e68b3656a43fdde2a00cbecf89765352b76cb6929181900390910190a150505050565b600f5460009060ff1615610b4157506006610a10565b600454600160a060020a03161515610b5b57506001610a10565b60048054604080517f82771c8e0000000000000000000000000000000000000000000000000000000081529051600160a060020a03909216926382771c8e9282820192602092908290030181600087803b158015610bb857600080fd5b505af1158015610bcc573d6000803e3d6000fd5b505050506040513d6020811015610be257600080fd5b50511515610bf257506001610a10565b600354604080517f8e7682880000000000000000000000000000000000000000000000000000000081523060048201529051600160a060020a0390921691638e768288916024808201926020929091908290030181600087803b158015610c5857600080fd5b505af1158015610c6c573d6000803e3d6000fd5b505050506040513d6020811015610c8257600080fd5b50511515610c9257506001610a10565b600754421015610ca457506002610a10565b6008544211158015610cbb5750610cb9611b92565b155b15610cc857506003610a10565b610cd061175f565b15610cdd57506004610a10565b610ce561175f565b158015610cf457506000600a54115b8015610d045750600a54600d5410155b15610d1157506007610a10565b506005610a10565b600054600160a060020a03163314610d3057600080fd5b6004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383811691909117808355604080517f614cb9040000000000000000000000000000000000000000000000000000000081529051919092169263614cb904928082019260209290918290030181600087803b158015610db057600080fd5b505af1158015610dc4573d6000803e3d6000fd5b505050506040513d6020811015610dda57600080fd5b50511515610de757600080fd5b50565b60006002866040518082600160a060020a0316600160a060020a03166c010000000000000000000000000281526014019150506020604051808303816000865af1158015610e3c573d6000803e3d6000fd5b5050506040513d6020811015610e5157600080fd5b5051601454604080516000808252602080830180855286905260ff8a16838501526060830189905260808301889052925194955062010000909304600160a060020a03169360019360a08084019493601f198401939081900390910191865af1158015610ec2573d6000803e3d6000fd5b50505060206040510351600160a060020a0316141515610ee157600080fd5b6fffffffffffffffffffffffffffffffff85161515610eff57600080fd5b610f098686611f37565b50505050505050565b60106020526000908152604090205481565b600454600160a060020a031681565b600080548190600160a060020a03163314610f4d57600080fd5b600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610fb957600080fd5b505af1158015610fcd573d6000803e3d6000fd5b505050506040513d6020811015610fe357600080fd5b5051600a8054604080516000805160206126bf833981519152815260048101929092528688026024830181905290519390920a8702945090925073__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f91604480820192602092909190829003018186803b15801561105957600080fd5b505af415801561106d573d6000803e3d6000fd5b505050506040513d602081101561108357600080fd5b5051600a55600954604080516000805160206126bf83398151915281526004810192909252602482018490525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b1580156110eb57600080fd5b505af41580156110ff573d6000803e3d6000fd5b505050506040513d602081101561111557600080fd5b5051600955600160a060020a0385166000908152601060209081526040918290205482516000805160206126bf8339815191528152600481019190915260248101849052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561119357600080fd5b505af41580156111a7573d6000803e3d6000fd5b505050506040513d60208110156111bd57600080fd5b5051600160a060020a03861660009081526010602090815260408083209390935560118152908290205482516000805160206126bf8339815191528152600481019190915260248101859052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561124357600080fd5b505af4158015611257573d6000803e3d6000fd5b505050506040513d602081101561126d57600080fd5b5051600160a060020a03861660009081526011602052604090205561129285836120de565b60408051600160a060020a0387168152602081018390528082018490526000606082015290517f0396f60aaad038749091d273dc13aaabc63db6e2271c7bad442d5cf25cc433509181900360800190a15050505050565b60155481565b600a5481565b600190565b600480611305610b2b565b600781111561131057fe5b1461131a57600080fd5b600054600160a060020a0316331461133157600080fd5b60005474010000000000000000000000000000000000000000900460ff161561135957600080fd5b600f5460ff161561136957600080fd5b600454600160a060020a0316156113ef5760048054604080517f0bf318a30000000000000000000000000000000000000000000000000000000081529051600160a060020a0390921692630bf318a392828201926000929082900301818387803b1580156113d657600080fd5b505af11580156113ea573d6000803e3d6000fd5b505050505b50600f805460ff19166001179055565b600054600160a060020a0316331461141657600080fd5b6003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038381169190911791829055604080517f04bbc255000000000000000000000000000000000000000000000000000000008152905192909116916304bbc255916004808201926020929091908290030181600087803b158015610db057600080fd5b60095481565b60006007806114ad610b2b565b60078111156114b857fe5b146114c257600080fd5b3360009081526010602052604090205491508115156114e057600080fd5b33600090815260106020908152604080832092909255600e5482516000805160206126bf8339815191528152600481019190915260248101859052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561155557600080fd5b505af4158015611569573d6000803e3d6000fd5b505050506040513d602081101561157f57600080fd5b5051600e55604080513381526020810184905281517fbb28353e4598c3b9199101a66e0989549b659a59a54d2c27fbb183f1932c8e6d929181900390910190a1604051339083156108fc029084906000818181858888f19350505050151561097857600080fd5b601454620100009004600160a060020a031681565b60166020526000908152604090205460ff1681565b600e5481565b600054600160a060020a0316331461162d57600080fd5b6000805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b60015481565b604080517001000000000000000000000000000000006fffffffffffffffffffffffffffffffff851602815290519081900360100190207fff00000000000000000000000000000000000000000000000000000000000000908116908216146116d257600080fd5b6109783383611ce3565b600054600160a060020a031633146116f357600080fd5b8042111561170057600080fd5b80600754111561170f57600080fd5b60088190556040805182815290517fd34bb772c4ae9baa99db852f622773b31c7827e8ee818449fef20d30980bd3109181900360200190a150565b600354600160a060020a031681565b600d5481565b600654600a54101590565b600054600160a060020a0316331461178157600080fd5b6014805460ff191682151517908190556040805160ff808416151582526101008404161515602082015262010000909204600160a060020a031682820152517f48d826081348f5f00e8a33c9ae8ce89ed4c6e88400b585a478bc203d9e8177d3916060908290030190a150565b6005806117f9610b2b565b600781111561180457fe5b1461180e57600080fd5b34151561181a57600080fd5b600d54604080516000805160206126bf833981519152815260048101929092523460248301525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b15801561187c57600080fd5b505af4158015611890573d6000803e3d6000fd5b505050506040513d60208110156118a657600080fd5b5051600d5550565b600054600160a060020a031633146118c557600080fd5b601355565b600054600160a060020a031681565b600080600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561194857600080fd5b505af115801561195c573d6000803e3d6000fd5b505050506040513d602081101561197257600080fd5b5051604080517f1d3b9edf00000000000000000000000000000000000000000000000000000000815260048101879052600a9290920a602483018190529051909250849173__contracts/SafeMathLib.sol:SafeMathLi__91631d3b9edf91604480820192602092909190829003018186803b1580156119f257600080fd5b505af4158015611a06573d6000803e3d6000fd5b505050506040513d6020811015611a1c57600080fd5b5051811515611a2757fe5b04949350505050565b600554600160a060020a031681565b60116020526000908152604090205481565b610de73382611ce3565b601554109392505050565b611a6f33610948565b565b6000600460009054906101000a9004600160a060020a0316600160a060020a03166382771c8e6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156109e157600080fd5b60075481565b600f5460ff1681565b60005474010000000000000000000000000000000000000000900460ff1681565b60126020526000908152604090205460ff1681565b600054600160a060020a03163314611b3b57600080fd5b60005474010000000000000000000000000000000000000000900460ff161515611b6457600080fd5b6000805474ff000000000000000000000000000000000000000019169055565b601454610100900460ff1681565b601554600954101590565b600c5481565b600054600160a060020a03163314611bba57600080fd5b600160a060020a038216600081815260126020908152604091829020805460ff191685151590811790915582519384529083015280517fa54714518c5d275fdcd3d2a461e4858e4e8cb04fb93cd0bca9d6d34115f264409281900390910190a15050565b60009081526016602052604090205460ff1690565b600054600160a060020a03163314611c4a57600080fd5b60148054600160a060020a038084166201000090810275ffffffffffffffffffffffffffffffffffffffff00001987151561010090810261ff0019909616959095171617938490556040805160ff86811615158252948604909416151560208501529304168183015290517f48d826081348f5f00e8a33c9ae8ce89ed4c6e88400b585a478bc203d9e8177d39181900360600190a15050565b601454610100900460ff1615611cf857600080fd5b6fffffffffffffffffffffffffffffffff81161515611d1657600080fd5b611d208282611f37565b505050565b60008054600160a060020a03163314611d3d57600080fd5b60008281526016602052604090205460ff1615611d5957600080fd5b611d6585858585610a1f565b611d758484600a54600954611a5b565b15611d7f57600080fd5b50600081815260166020526040808220805460ff1916600117905560025481517f40c10f19000000000000000000000000000000000000000000000000000000008152600160a060020a038881166004830152602482018790529251929091169283926340c10f1992604480820193929182900301818387803b158015611e0557600080fd5b505af1158015611e19573d6000803e3d6000fd5b505050505050505050565b600054600160a060020a03163314611e3b57600080fd5b600160a060020a0381161515611e5057600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600054600160a060020a03163314611ecf57600080fd5b600154600c541115611ee057600080fd5b6005805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b611f1c3385858585610dea565b50505050565b600b5481565b600254600160a060020a031681565b6000805474010000000000000000000000000000000000000000900460ff1615611f6057600080fd5b6120d78383600360009054906101000a9004600160a060020a0316600160a060020a03166318a4155e34600b54600a540360095433600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561200157600080fd5b505af1158015612015573d6000803e3d6000fd5b505050506040513d602081101561202b57600080fd5b5051604080517c010000000000000000000000000000000000000000000000000000000063ffffffff8916028152600481019690965260248601949094526044850192909252600160a060020a0316606484015260848301525160a48083019260209291908290030181600087803b1580156120a657600080fd5b505af11580156120ba573d6000803e3d6000fd5b505050506040513d60208110156120d057600080fd5b5051612163565b9392505050565b600254604080517f40c10f19000000000000000000000000000000000000000000000000000000008152600160a060020a038581166004830152602482018590529151919092169182916340c10f199160448082019260009290919082900301818387803b15801561214f57600080fd5b505af1158015610f09573d6000803e3d6000fd5b60008054819074010000000000000000000000000000000000000000900460ff161561218e57600080fd5b6002612198610b2b565b60078111156121a357fe5b14156121d557600160a060020a03851660009081526012602052604090205460ff1615156121d057600080fd5b6121f1565b60036121df610b2b565b60078111156121ea57fe5b14156102be575b50348215156121ff57600080fd5b600160a060020a038516600090815260106020526040902054151561222857600c805460010190555b600160a060020a0385166000908152601060209081526040918290205482516000805160206126bf8339815191528152600481019190915260248101849052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b1580156122a157600080fd5b505af41580156122b5573d6000803e3d6000fd5b505050506040513d60208110156122cb57600080fd5b5051600160a060020a03861660009081526010602090815260408083209390935560118152908290205482516000805160206126bf8339815191528152600481019190915260248101869052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561235157600080fd5b505af4158015612365573d6000803e3d6000fd5b505050506040513d602081101561237b57600080fd5b5051600160a060020a03861660009081526011602090815260409182902092909255600a5481516000805160206126bf8339815191528152600481019190915260248101849052905173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f9260448082019391829003018186803b1580156123fb57600080fd5b505af415801561240f573d6000803e3d6000fd5b505050506040513d602081101561242557600080fd5b5051600a55600954604080516000805160206126bf83398151915281526004810192909252602482018590525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b15801561248d57600080fd5b505af41580156124a1573d6000803e3d6000fd5b505050506040513d60208110156124b757600080fd5b5051600955600354604080517ff14ae17d000000000000000000000000000000000000000000000000000000008152600160a060020a0388811660048301529151919092169163f14ae17d9160248083019260209291908290030181600087803b15801561252457600080fd5b505af1158015612538573d6000803e3d6000fd5b505050506040513d602081101561254e57600080fd5b5051156125fc57600b5473__contracts/SafeMathLib.sol:SafeMathLi__6366098d4f9091836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b1580156125cc57600080fd5b505af41580156125e0573d6000803e3d6000fd5b505050506040513d60208110156125f657600080fd5b5051600b555b61260c8184600a54600954611a5b565b1561261657600080fd5b61262085846120de565b600554604051600160a060020a039091169082156108fc029083906000818181858888f19350505050151561265457600080fd5b60408051600160a060020a0387168152602081018390528082018590526fffffffffffffffffffffffffffffffff8616606082015290517f0396f60aaad038749091d273dc13aaabc63db6e2271c7bad442d5cf25cc433509181900360800190a150909392505050560066098d4f00000000000000000000000000000000000000000000000000000000a165627a7a72305820537e20e1f4e1a8ba39ab38b36b061dd9a767870fe94ab2d6ff1875238f42624e0029", "direct_dependencies": ["SafeMathLib"], "full_dependencies": ["SafeMathLib"], "linkrefs": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 9374}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 9668}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 10010}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 10362}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 11934}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 13542}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 14288}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 18742}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 19094}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 19436}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 19720}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 20244}], "linkrefs_runtime": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 8254}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 8548}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 8890}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 9242}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 10814}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 12422}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 13168}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 17622}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 17974}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 18316}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 18600}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 19124}], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": true, "inputs": [], "name": "ownerTestValue", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "requireCustomerId", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "invest", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "isPricingSane", "outputs": [{"name": "sane", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "endsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "minimumFundingGoal", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_addr", "type": "address"}, {"name": "_weiAmount", "type": "uint256"}, {"name": "_tokenAmount", "type": "uint256"}, {"name": "_originalTxHash", "type": "uint256"}], "name": "setInvestorData", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "getState", "outputs": [{"name": "", "type": "uint8"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setFinalizeAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "customerId", "type": "uint128"}, {"name": "v", "type": "uint8"}, {"name": "r", "type": "bytes32"}, {"name": "s", "type": "bytes32"}], "name": "investWithSignedAddress", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "investedAmountOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "finalizeAgent", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "receiver", "type": "address"}, {"name": "fullTokens", "type": "uint256"}, {"name": "weiPrice", "type": "uint256"}], "name": "preallocate", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "maximumSellableTokens", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "weiRaised", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isCrowdsale", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "finalize", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_pricingStrategy", "type": "address"}], "name": "setPricingStrategy", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "tokensSold", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "refund", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "signerAddress", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "uint256"}], "name": "reissuedTransactions", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "weiRefunded", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "halt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}, {"name": "checksum", "type": "bytes1"}], "name": "buyWithCustomerIdWithChecksum", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "time", "type": "uint256"}], "name": "setEndsAt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "pricingStrategy", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "loadedRefund", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isMinimumGoalReached", "outputs": [{"name": "reached", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "bool"}], "name": "setRequireCustomerId", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "loadRefund", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "val", "type": "uint256"}], "name": "setOwnerTestValue", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "weisTotal", "type": "uint256"}, {"name": "pricePerToken", "type": "uint256"}], "name": "calculateTokens", "outputs": [{"name": "tokensTotal", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "multisigWallet", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "tokenAmountOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}], "name": "buyWithCustomerId", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [{"name": "weiAmount", "type": "uint256"}, {"name": "tokenAmount", "type": "uint256"}, {"name": "weiRaisedTotal", "type": "uint256"}, {"name": "tokensSoldTotal", "type": "uint256"}], "name": "isBreakingCap", "outputs": [{"name": "limitBroken", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "buy", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "isFinalizerSane", "outputs": [{"name": "sane", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "startsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "finalized", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "halted", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "earlyParticipantWhitelist", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "unhalt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "requiredSignedAddress", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isCrowdsaleFull", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "investorCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "status", "type": "bool"}], "name": "setEarlyParicipantWhitelist", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_originalTxHash", "type": "uint256"}], "name": "getRestoredTransactionStatus", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "bool"}, {"name": "_signerAddress", "type": "address"}], "name": "setRequireSignedAddress", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "customerId", "type": "uint128"}], "name": "investWithCustomerId", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "_addr", "type": "address"}, {"name": "_weiAmount", "type": "uint256"}, {"name": "_tokenAmount", "type": "uint256"}, {"name": "_originalTxHash", "type": "uint256"}], "name": "setInvestorDataAndIssueNewToken", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setMultisig", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}, {"name": "v", "type": "uint8"}, {"name": "r", "type": "bytes32"}, {"name": "s", "type": "bytes32"}], "name": "buyWithSignedAddress", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "presaleWeiRaised", "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": "_token", "type": "address"}, {"name": "_pricingStrategy", "type": "address"}, {"name": "_multisigWallet", "type": "address"}, {"name": "_start", "type": "uint256"}, {"name": "_end", "type": "uint256"}, {"name": "_minimumFundingGoal", "type": "uint256"}, {"name": "_maximumSellableTokens", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"payable": true, "stateMutability": "payable", "type": "fallback"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "addr", "type": "address"}, {"indexed": false, "name": "originalTxHash", "type": "uint256"}], "name": "RestoredInvestment", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}, {"indexed": false, "name": "tokenAmount", "type": "uint256"}, {"indexed": false, "name": "customerId", "type": "uint128"}], "name": "Invested", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}], "name": "Refund", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newRequireCustomerId", "type": "bool"}, {"indexed": false, "name": "newRequiredSignedAddress", "type": "bool"}, {"indexed": false, "name": "newSignerAddress", "type": "address"}], "name": "InvestmentPolicyChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "addr", "type": "address"}, {"indexed": false, "name": "status", "type": "bool"}], "name": "Whitelisted", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newEndsAt", "type": "uint256"}], "name": "EndsAtChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "devdoc": {"methods": {"calculateTokens(uint256,uint256)": {"details": "Calculate tokens user will have for their purchase", "params": {"pricePerToken": "What is the price for one token", "weisTotal": "How much ethers (in wei) the user putssssss in"}, "return": "tokensTotal which is received tokens, token decimals included"}, "isMinimumGoalReached()": {"return": "true if the crowdsale has raised enough money to be a successful."}, "preallocate(address,uint256,uint256)": {"params": {"fullTokens": "tokens as full tokens - decimal places added internally", "weiPrice": "Price of a single full token in wei "}}, "transferOwnership(address)": {"details": "Allows the current owner to transfer control of the contract to a newOwner.", "params": {"newOwner": "The address to transfer ownership to."}}}}, "userdoc": {"methods": {"buy()": {"notice": "The basic entry point to participate the crowdsale process. * Pay for funding, get invested tokens back in the sender address."}, "buyWithCustomerId(uint128)": {"notice": "Legacy API signature."}, "buyWithCustomerIdWithChecksum(uint128,bytes1)": {"notice": "Invest to tokens, recognize the payer. "}, "buyWithSignedAddress(uint128,uint8,bytes32,bytes32)": {"notice": "Invest to tokens, recognize the payer and clear his address. "}, "finalize()": {"notice": "Finalize a succcesful crowdsale. * The owner can triggre a call the contract that provides post-crowdsale actions, like releasing the tokens."}, "getRestoredTransactionStatus(uint256)": {"notice": "Check if a particular transaction has already been written."}, "getState()": {"notice": "Crowdfund state machine management. * We make it a function and do not assign the result to a variable, so there is no chance of the variable being stale."}, "invest(address)": {"notice": "Allow anonymous contributions to this crowdsale."}, "investWithCustomerId(address,uint128)": {"notice": "Track who is the customer making the payment so we can send thank you email."}, "investWithSignedAddress(address,uint128,uint8,bytes32,bytes32)": {"notice": "Allow anonymous contributions to this crowdsale."}, "isBreakingCap(uint256,uint256,uint256,uint256)": {"notice": "Called from invest() to confirm if the curret investment does not break our cap rule."}, "isCrowdsale()": {"notice": "Interface marker. "}, "isFinalizerSane()": {"notice": "Check if the contract relationship looks good."}, "isPricingSane()": {"notice": "Check if the contract relationship looks good."}, "loadRefund()": {"notice": "Allow load refunds back on the contract for the refunding. * The team can transfer the funds back on the smart contract in the case the minimum goal was not reached.."}, "preallocate(address,uint256,uint256)": {"notice": "Preallocate tokens for the early investors. * Preallocated tokens have been sold before the actual crowdsale opens. This function mints the tokens and moves the crowdsale needle. * Investor count is not handled; it is assumed this goes for multiple investors and the token distribution happens outside the smart contract flow. * No money is exchanged, as the crowdsale team already have received the payment."}, "refund()": {"notice": "Investors can claim refund. * Note that any refunds from proxy buyers should be handled separately, and not through this contract."}, "setEarlyParicipantWhitelist(address,bool)": {"notice": "Allow addresses to do early participation. * TODO: Fix spelling error in the name"}, "setEndsAt(uint256)": {"notice": "Allow crowdsale owner to close early or extend the crowdsale. * This is useful e.g. for a manual soft cap implementation: - after X amount is reached determine manual closing * This may put the crowdsale to an invalid state, but we trust owners know what they are doing. "}, "setFinalizeAgent(address)": {"notice": "Allow to (re)set finalize agent. * Design choice: no state restrictions on setting this, so that we can fix fat finger mistakes."}, "setInvestorData(address,uint256,uint256,uint256)": {"notice": "Rebuild the previous invest data back to the crowdsale."}, "setInvestorDataAndIssueNewToken(address,uint256,uint256,uint256)": {"notice": "Rebuild the previous invest data and do a token reissuance."}, "setMultisig(address)": {"notice": "Allow to change the team multisig address in the case of emergency. * This allows to save a deployed crowdsale wallet in the case the crowdsale has not yet begun (we have done only few test transactions). After the crowdsale is going then multisig address stays locked for the safety reasons."}, "setOwnerTestValue(uint256)": {"notice": "This is for manual testing of multisig wallet interaction "}, "setPricingStrategy(address)": {"notice": "Allow to (re)set pricing strategy. * Design choice: no state restrictions on the set, so that we can fix fat finger mistakes."}, "setRequireCustomerId(bool)": {"notice": "Set policy do we need to have server-side customer ids for the investments. "}, "setRequireSignedAddress(bool,address)": {"notice": "Set policy if all investors must be cleared on the server side first. * This is e.g. for the accredited investor clearing. "}}}}, "settings": {"compilationTarget": {"contracts/RelaunchedCrowdsale.sol": "RelaunchedCrowdsale"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/Crowdsale.sol": {"keccak256": "0x2697c26528f64bb954a7c2547d3b43317d2d2b02c7d9d05a7b1ab388cd79f65d", "urls": ["bzzr://f28b280794222114141c51dd5c388d403a7c98d8b51e04170a0e294246d5164b"]}, "contracts/CrowdsaleBase.sol": {"keccak256": "0xe2c9ed11183ce705616980df7b02544d72fe18b40395da7d9d4bcb621fb87871", "urls": ["bzzr://07f3887ba0d0eb3248b1ad3581480ed71a2fe70a47dcc283c4e97c8c92e0790a"]}, "contracts/FinalizeAgent.sol": {"keccak256": "0x309fd0510e0b3e2b5044e33f7c80cfb2d6f2a5697e41a5f185931d65770cfea9", "urls": ["bzzr://4e7ed6f82c0f542e92e56c12566b2ecd7666730865bf12566c27587ec64160ac"]}, "contracts/FractionalERC20.sol": {"keccak256": "0x75bc4ad90a8b13ce961c89b1bf405776f616e019d3a2720168f8e52be223198f", "urls": ["bzzr://6a3688f12da1a5c890ef06f80f883f6c5370886092d38a1b33cd4219b718478b"]}, "contracts/Haltable.sol": {"keccak256": "0x265dcf25e7c9ab4b6eecd2181f1b71334a1b5381a60f8db7d9526dab120f4b70", "urls": ["bzzr://d522e00fa9e075941469dd81738b59fdb99ce3c12cdc39e33abe40b588c4da9b"]}, "contracts/MintableToken.sol": {"keccak256": "0x650e1d6b2bedcd36508918357c7cf4f36fdd093cd0c4d6342f4dcd3bdcdd7578", "urls": ["bzzr://7ba2ac0480d428066a18727e2adb76ba56856ecd37b4420e801131ec8f8f4be3"]}, "contracts/MintedTokenCappedCrowdsale.sol": {"keccak256": "0xcbf855529729f71de827a444174aca4b9ea24afd98732a1b1676e1e40002b3cd", "urls": ["bzzr://2f5eb43ec94474c403930e5230551d1e78b8501efbde429e3dc65a00e8c683ee"]}, "contracts/PricingStrategy.sol": {"keccak256": "0x8df5093b7d07168ad994f9176de0bd2268f6563b1e8a3a448d8cfe7fe246c628", "urls": ["bzzr://ef5c944d51f739ab34e2c951d6ac82a7152e6bb844058a8e57bae52c14cbe16b"]}, "contracts/Recoverable.sol": {"keccak256": "0x311a332cdd87df6e00057f5455f4e68b043b5dbe211f6d68bc64e20817515635", "urls": ["bzzr://4fd99bcfb93baed6e7c8d22ee9ecc5c8346a1aa98288e77b01333b2c5d3f582d"]}, "contracts/RelaunchedCrowdsale.sol": {"keccak256": "0xbfef650ef850ce660cbcdd7575fec4f52e17b65ae67f7dec3e932e6aac70adf8", "urls": ["bzzr://8c579bbf22ecbc5445323d7a012be9735c8a376f7abb4cdeb43a6dd05f69681f"]}, "contracts/SafeMathLib.sol": {"keccak256": "0x501bfe31e274b9a5591f7c540bdced4d4312e27d4f19599147c9bbca3d9c6b18", "urls": ["bzzr://a80935ebddb06c247d71372d4e5833ee029f08633bd0fe4a274a57009567e5b9"]}, "contracts/StandardTokenExt.sol": {"keccak256": "0x9ea2d4cec4dccd5639c05e6c23dd027d80b5e5a20abd99b280ab7b2631b5a5fc", "urls": ["bzzr://a52d8fc5a21bd83997aff19128e00dceb251df712207b61223894c8b7f42d5ff"]}, "zeppelin/contracts/math/SafeMath.sol": {"keccak256": "0x341ba8cb467a3623e819ba1a683ac1d264005186f308505214e5f6bc89446a08", "urls": ["bzzr://59b5652ee4e4a1b5a8f1a8906e14c84af43d636cf5ca0725cc1813aabe4c8c17"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}, "zeppelin/contracts/token/ERC20/BasicToken.sol": {"keccak256": "0x948404468d61ff35ea4194650670408dabd65da7f905a1c16888ab84520bf39e", "urls": ["bzzr://ea75e20f95d7e4e10394fe6bfaa8eee56b4757c2a6f1e8df4180d33afa621935"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}, "zeppelin/contracts/token/ERC20/StandardToken.sol": {"keccak256": "0xd2b344a5259e19ec143074cfa65637a10c40b68395c59808c4af13bccbb2de55", "urls": ["bzzr://d61a01175a7ca1ba9f4403de603c20b897e33ec425aef2d9f8a7f9ddfdfaf5b2"]}}, "version": 1}, "name": "RelaunchedCrowdsale", "ordered_full_dependencies": ["SafeMathLib"], "source_path": "contracts/RelaunchedCrowdsale.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Safe unsigned safe math.\n *\n * https://blog.aragon.one/library-driven-development-in-solidity-2bebcaf88736#.750gwtwli\n *\n * Originally from https://raw.githubusercontent.com/AragonOne/zeppelin-solidity/master/contracts/SafeMathLib.sol\n *\n * Maintained here until merged to mainline zeppelin-solidity.\n *\n */\nlibrary SafeMathLib {\n\n function times(uint a, uint b) returns (uint) {\n uint c = a * b;\n assert(a == 0 || c / a == b);\n return c;\n }\n\n function minus(uint a, uint b) returns (uint) {\n assert(b <= a);\n return a - b;\n }\n\n function plus(uint a, uint b) returns (uint) {\n uint c = a + b;\n assert(c>=a);\n return c;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Interface for defining crowdsale pricing.\n */\ncontract PricingStrategy {\n\n /** Interface declaration. */\n function isPricingStrategy() public constant returns (bool) {\n return true;\n }\n\n /** Self check if all references are correctly set.\n *\n * Checks that pricing strategy matches crowdsale parameters.\n */\n function isSane(address crowdsale) public constant returns (bool) {\n return true;\n }\n\n /**\n * @dev Pricing tells if this is a presale purchase or not.\n @param purchaser Address of the purchaser\n @return False by default, true if a presale purchaser\n */\n function isPresalePurchase(address purchaser) public constant returns (bool) {\n return false;\n }\n\n /**\n * When somebody tries to buy tokens for X eth, calculate how many tokens they get.\n *\n *\n * @param value - What is the value of the transaction send in as wei\n * @param tokensSold - how much tokens have been sold this far\n * @param weiRaised - how much money has been raised this far in the main token sale - this number excludes presale\n * @param msgSender - who is the investor of this transaction\n * @param decimals - how many decimal units the token has\n * @return Amount of tokens the investor receives\n */\n function calculatePrice(uint value, uint weiRaised, uint tokensSold, address msgSender, uint decimals) public constant returns (uint tokenAmount);\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Finalize agent defines what happens at the end of succeseful crowdsale.\n *\n * - Allocate tokens for founders, bounties and community\n * - Make tokens transferable\n * - etc.\n */\ncontract FinalizeAgent {\n\n function isFinalizeAgent() public constant returns(bool) {\n return true;\n }\n\n /** Return true if we can run finalizeCrowdsale() properly.\n *\n * This is a safety check function that doesn't allow crowdsale to begin\n * unless the finalizer has been set up properly.\n */\n function isSane() public constant returns (bool);\n\n /** Called once by crowdsale finalize() if the sale was success. */\n function finalizeCrowdsale();\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n\n/**\n * A token that defines fractional units as decimals.\n */\ncontract FractionalERC20 is ERC20 {\n\n uint public decimals;\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n/*\n * Haltable\n *\n * Abstract contract that allows children to implement an\n * emergency stop mechanism. Differs from Pausable by causing a throw when in halt mode.\n *\n *\n * Originally envisioned in FirstBlood ICO contract.\n */\ncontract Haltable is Ownable {\n bool public halted;\n\n modifier stopInEmergency {\n if (halted) throw;\n _;\n }\n\n modifier stopNonOwnersInEmergency {\n if (halted && msg.sender != owner) throw;\n _;\n }\n\n modifier onlyInEmergency {\n if (!halted) throw;\n _;\n }\n\n // called by the owner on emergency, triggers stopped state\n function halt() external onlyOwner {\n halted = true;\n }\n\n // called by the owner on end of emergency, returns to normal state\n function unhalt() external onlyOwner onlyInEmergency {\n halted = false;\n }\n\n}\n\n\n\n\n\n\n\n/**\n * Crowdsale state machine without buy functionality.\n *\n * Implements basic state machine logic, but leaves out all buy functions,\n * so that subclasses can implement their own buying logic.\n *\n *\n * For the default buy() implementation see Crowdsale.sol.\n */\ncontract CrowdsaleBase is Haltable {\n\n /* Max investment count when we are still allowed to change the multisig address */\n uint public MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE = 5;\n\n using SafeMathLib for uint;\n\n /* The token we are selling */\n FractionalERC20 public token;\n\n /* How we are going to price our offering */\n PricingStrategy public pricingStrategy;\n\n /* Post-success callback */\n FinalizeAgent public finalizeAgent;\n\n /* tokens will be transfered from this address */\n address public multisigWallet;\n\n /* if the funding goal is not reached, investors may withdraw their funds */\n uint public minimumFundingGoal;\n\n /* the UNIX timestamp start date of the crowdsale */\n uint public startsAt;\n\n /* the UNIX timestamp end date of the crowdsale */\n uint public endsAt;\n\n /* the number of tokens already sold through this contract*/\n uint public tokensSold = 0;\n\n /* How many wei of funding we have raised */\n uint public weiRaised = 0;\n\n /* Calculate incoming funds from presale contracts and addresses */\n uint public presaleWeiRaised = 0;\n\n /* How many distinct addresses have invested */\n uint public investorCount = 0;\n\n /* How much wei we have returned back to the contract after a failed crowdfund. */\n uint public loadedRefund = 0;\n\n /* How much wei we have given back to investors.*/\n uint public weiRefunded = 0;\n\n /* Has this crowdsale been finalized */\n bool public finalized;\n\n /** How much ETH each address has invested to this crowdsale */\n mapping (address => uint256) public investedAmountOf;\n\n /** How much tokens this crowdsale has credited for each investor address */\n mapping (address => uint256) public tokenAmountOf;\n\n /** Addresses that are allowed to invest even before ICO offical opens. For testing, for ICO partners, etc. */\n mapping (address => bool) public earlyParticipantWhitelist;\n\n /** This is for manul testing for the interaction from owner wallet. You can set it to any value and inspect this in blockchain explorer to see that crowdsale interaction works. */\n uint public ownerTestValue;\n\n /** State machine\n *\n * - Preparing: All contract initialization calls and variables have not been set yet\n * - Prefunding: We have not passed start time yet\n * - Funding: Active crowdsale\n * - Success: Minimum funding goal reached\n * - Failure: Minimum funding goal not reached before ending time\n * - Finalized: The finalized has been called and succesfully executed\n * - Refunding: Refunds are loaded on the contract for reclaim.\n */\n enum State{Unknown, Preparing, PreFunding, Funding, Success, Failure, Finalized, Refunding}\n\n // A new investment was made\n event Invested(address investor, uint weiAmount, uint tokenAmount, uint128 customerId);\n\n // Refund was processed for a contributor\n event Refund(address investor, uint weiAmount);\n\n // The rules were changed what kind of investments we accept\n event InvestmentPolicyChanged(bool newRequireCustomerId, bool newRequiredSignedAddress, address newSignerAddress);\n\n // Address early participation whitelist status changed\n event Whitelisted(address addr, bool status);\n\n // Crowdsale end time has been changed\n event EndsAtChanged(uint newEndsAt);\n\n function CrowdsaleBase(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal) {\n\n owner = msg.sender;\n\n token = FractionalERC20(_token);\n setPricingStrategy(_pricingStrategy);\n\n multisigWallet = _multisigWallet;\n if(multisigWallet == 0) {\n throw;\n }\n\n if(_start == 0) {\n throw;\n }\n\n startsAt = _start;\n\n if(_end == 0) {\n throw;\n }\n\n endsAt = _end;\n\n // Don't mess the dates\n if(startsAt >= endsAt) {\n throw;\n }\n\n // Minimum funding goal can be zero\n minimumFundingGoal = _minimumFundingGoal;\n }\n\n /**\n * Don't expect to just send in money and get tokens.\n */\n function() payable {\n throw;\n }\n\n /**\n * @dev Make an investment.\n *\n * Crowdsale must be running for one to invest.\n * We must have not pressed the emergency brake.\n *\n * @param receiver The Ethereum address who receives the tokens\n * @param customerId (optional) UUID v4 to track the successful payments on the server side'\n * @param tokenAmount Amount of tokens which be credited to receiver\n *\n * @return tokensBought How mony tokens were bought\n */\n function buyTokens(address receiver, uint128 customerId, uint256 tokenAmount) stopInEmergency internal returns(uint tokensBought) {\n\n // Determine if it's a good time to accept investment from this participant\n if(getState() == State.PreFunding) {\n // Are we whitelisted for early deposit\n if(!earlyParticipantWhitelist[receiver]) {\n throw;\n }\n } else if(getState() == State.Funding) {\n // Retail participants can only come in when the crowdsale is running\n // pass\n } else {\n // Unwanted state\n throw;\n }\n\n uint weiAmount = msg.value;\n\n // Dust transaction\n require(tokenAmount != 0);\n\n if(investedAmountOf[receiver] == 0) {\n // A new investor\n investorCount++;\n }\n\n // Update investor\n investedAmountOf[receiver] = investedAmountOf[receiver].plus(weiAmount);\n tokenAmountOf[receiver] = tokenAmountOf[receiver].plus(tokenAmount);\n\n // Update totals\n weiRaised = weiRaised.plus(weiAmount);\n tokensSold = tokensSold.plus(tokenAmount);\n\n if(pricingStrategy.isPresalePurchase(receiver)) {\n presaleWeiRaised = presaleWeiRaised.plus(weiAmount);\n }\n\n // Check that we did not bust the cap\n require(!isBreakingCap(weiAmount, tokenAmount, weiRaised, tokensSold));\n\n assignTokens(receiver, tokenAmount);\n\n // Pocket the money, or fail the crowdsale if we for some reason cannot send the money to our multisig\n if(!multisigWallet.send(weiAmount)) throw;\n\n // Tell us invest was success\n Invested(receiver, weiAmount, tokenAmount, customerId);\n\n return tokenAmount;\n }\n\n /**\n * @dev Make an investment based on pricing strategy\n *\n * This is a wrapper for buyTokens(), but the amount of tokens receiver will\n * have depends on the pricing strategy used.\n *\n * @param receiver The Ethereum address who receives the tokens\n * @param customerId (optional) UUID v4 to track the successful payments on the server side'\n *\n * @return tokensBought How mony tokens were bought\n */\n function investInternal(address receiver, uint128 customerId) stopInEmergency internal returns(uint tokensBought) {\n return buyTokens(receiver, customerId, pricingStrategy.calculatePrice(msg.value, weiRaised - presaleWeiRaised, tokensSold, msg.sender, token.decimals()));\n }\n\n /**\n * @dev Calculate tokens user will have for their purchase\n *\n * @param weisTotal How much ethers (in wei) the user putssssss in\n * @param pricePerToken What is the price for one token\n *\n * @return tokensTotal which is received tokens, token decimals included\n */\n function calculateTokens(uint256 weisTotal, uint256 pricePerToken) public constant returns(uint tokensTotal) {\n // pricePerToken is how many full tokens, token decimal place included, you get for wei amount.\n // Because, in theory, decimal amount can vary, we do the exponent calculation here,\n // though gas wise using 10**18 constant would be much simpler.\n // Furthermore we could use rough amounts and take in raw wei per tokens amount,\n // but we lose too much accuracy for generic calculations, thus all these are\n // practically implemented as 10**18 fixed points.\n uint multiplier = 10 ** token.decimals();\n return weisTotal.times(multiplier)/pricePerToken;\n }\n\n /**\n * Finalize a succcesful crowdsale.\n *\n * The owner can triggre a call the contract that provides post-crowdsale actions, like releasing the tokens.\n */\n function finalize() public inState(State.Success) onlyOwner stopInEmergency {\n\n // Already finalized\n if(finalized) {\n throw;\n }\n\n // Finalizing is optional. We only call it if we are given a finalizing agent.\n if(address(finalizeAgent) != 0) {\n finalizeAgent.finalizeCrowdsale();\n }\n\n finalized = true;\n }\n\n /**\n * Allow to (re)set finalize agent.\n *\n * Design choice: no state restrictions on setting this, so that we can fix fat finger mistakes.\n */\n function setFinalizeAgent(FinalizeAgent addr) onlyOwner {\n finalizeAgent = addr;\n\n // Don't allow setting bad agent\n if(!finalizeAgent.isFinalizeAgent()) {\n throw;\n }\n }\n\n /**\n * Allow crowdsale owner to close early or extend the crowdsale.\n *\n * This is useful e.g. for a manual soft cap implementation:\n * - after X amount is reached determine manual closing\n *\n * This may put the crowdsale to an invalid state,\n * but we trust owners know what they are doing.\n *\n */\n function setEndsAt(uint time) onlyOwner {\n\n if(now > time) {\n throw; // Don't change past\n }\n\n if(startsAt > time) {\n throw; // Prevent human mistakes\n }\n\n endsAt = time;\n EndsAtChanged(endsAt);\n }\n\n /**\n * Allow to (re)set pricing strategy.\n *\n * Design choice: no state restrictions on the set, so that we can fix fat finger mistakes.\n */\n function setPricingStrategy(PricingStrategy _pricingStrategy) onlyOwner {\n pricingStrategy = _pricingStrategy;\n\n // Don't allow setting bad agent\n if(!pricingStrategy.isPricingStrategy()) {\n throw;\n }\n }\n\n /**\n * Allow to change the team multisig address in the case of emergency.\n *\n * This allows to save a deployed crowdsale wallet in the case the crowdsale has not yet begun\n * (we have done only few test transactions). After the crowdsale is going\n * then multisig address stays locked for the safety reasons.\n */\n function setMultisig(address addr) public onlyOwner {\n\n // Change\n if(investorCount > MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE) {\n throw;\n }\n\n multisigWallet = addr;\n }\n\n /**\n * Allow load refunds back on the contract for the refunding.\n *\n * The team can transfer the funds back on the smart contract in the case the minimum goal was not reached..\n */\n function loadRefund() public payable inState(State.Failure) {\n if(msg.value == 0) throw;\n loadedRefund = loadedRefund.plus(msg.value);\n }\n\n /**\n * Investors can claim refund.\n *\n * Note that any refunds from proxy buyers should be handled separately,\n * and not through this contract.\n */\n function refund() public inState(State.Refunding) {\n uint256 weiValue = investedAmountOf[msg.sender];\n if (weiValue == 0) throw;\n investedAmountOf[msg.sender] = 0;\n weiRefunded = weiRefunded.plus(weiValue);\n Refund(msg.sender, weiValue);\n if (!msg.sender.send(weiValue)) throw;\n }\n\n /**\n * @return true if the crowdsale has raised enough money to be a successful.\n */\n function isMinimumGoalReached() public constant returns (bool reached) {\n return weiRaised >= minimumFundingGoal;\n }\n\n /**\n * Check if the contract relationship looks good.\n */\n function isFinalizerSane() public constant returns (bool sane) {\n return finalizeAgent.isSane();\n }\n\n /**\n * Check if the contract relationship looks good.\n */\n function isPricingSane() public constant returns (bool sane) {\n return pricingStrategy.isSane(address(this));\n }\n\n /**\n * Crowdfund state machine management.\n *\n * We make it a function and do not assign the result to a variable, so there is no chance of the variable being stale.\n */\n function getState() public constant returns (State) {\n if(finalized) return State.Finalized;\n else if (address(finalizeAgent) == 0) return State.Preparing;\n else if (!finalizeAgent.isSane()) return State.Preparing;\n else if (!pricingStrategy.isSane(address(this))) return State.Preparing;\n else if (block.timestamp < startsAt) return State.PreFunding;\n else if (block.timestamp <= endsAt && !isCrowdsaleFull()) return State.Funding;\n else if (isMinimumGoalReached()) return State.Success;\n else if (!isMinimumGoalReached() && weiRaised > 0 && loadedRefund >= weiRaised) return State.Refunding;\n else return State.Failure;\n }\n\n /** This is for manual testing of multisig wallet interaction */\n function setOwnerTestValue(uint val) onlyOwner {\n ownerTestValue = val;\n }\n\n /**\n * Allow addresses to do early participation.\n *\n * TODO: Fix spelling error in the name\n */\n function setEarlyParicipantWhitelist(address addr, bool status) onlyOwner {\n earlyParticipantWhitelist[addr] = status;\n Whitelisted(addr, status);\n }\n\n\n /** Interface marker. */\n function isCrowdsale() public constant returns (bool) {\n return true;\n }\n\n //\n // Modifiers\n //\n\n /** Modified allowing execution only if the crowdsale is currently running. */\n modifier inState(State state) {\n if(getState() != state) throw;\n _;\n }\n\n\n //\n // Abstract functions\n //\n\n /**\n * Check if the current invested breaks our cap rules.\n *\n *\n * The child contract must define their own cap setting rules.\n * We allow a lot of flexibility through different capping strategies (ETH, token count)\n * Called from invest().\n *\n * @param weiAmount The amount of wei the investor tries to invest in the current transaction\n * @param tokenAmount The amount of tokens we try to give to the investor in the current transaction\n * @param weiRaisedTotal What would be our total raised balance after this transaction\n * @param tokensSoldTotal What would be our total sold tokens count after this transaction\n *\n * @return true if taking this investment would break our cap rules\n */\n function isBreakingCap(uint weiAmount, uint tokenAmount, uint weiRaisedTotal, uint tokensSoldTotal) constant returns (bool limitBroken);\n\n /**\n * Check if the current crowdsale is full and we can no longer sell any tokens.\n */\n function isCrowdsaleFull() public constant returns (bool);\n\n /**\n * Create new tokens or transfer issued tokens to the investor depending on the cap model.\n */\n function assignTokens(address receiver, uint tokenAmount) internal;\n}\n\n\n\n/**\n * Abstract base contract for token sales with the default buy entry points.\n *\n * Handle\n * - start and end dates\n * - accepting investments\n * - minimum funding goal and refund\n * - various statistics during the crowdfund\n * - different pricing strategies\n * - different investment policies (require server side customer id, allow only whitelisted addresses)\n *\n * Does not Handle\n *\n * - Token allocation (minting vs. transfer)\n * - Cap rules\n *\n */\ncontract Crowdsale is CrowdsaleBase {\n\n /* Do we need to have unique contributor id for each customer */\n bool public requireCustomerId;\n\n /**\n * Do we verify that contributor has been cleared on the server side (accredited investors only).\n * This method was first used in FirstBlood crowdsale to ensure all contributors have accepted terms on sale (on the web).\n */\n bool public requiredSignedAddress;\n\n /* Server side address that signed allowed contributors (Ethereum addresses) that can participate the crowdsale */\n address public signerAddress;\n\n function Crowdsale(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal) CrowdsaleBase(_token, _pricingStrategy, _multisigWallet, _start, _end, _minimumFundingGoal) {\n }\n\n /**\n * Preallocate tokens for the early investors.\n *\n * Preallocated tokens have been sold before the actual crowdsale opens.\n * This function mints the tokens and moves the crowdsale needle.\n *\n * Investor count is not handled; it is assumed this goes for multiple investors\n * and the token distribution happens outside the smart contract flow.\n *\n * No money is exchanged, as the crowdsale team already have received the payment.\n *\n * @param fullTokens tokens as full tokens - decimal places added internally\n * @param weiPrice Price of a single full token in wei\n *\n */\n function preallocate(address receiver, uint fullTokens, uint weiPrice) public onlyOwner {\n\n uint tokenAmount = fullTokens * 10**token.decimals();\n uint weiAmount = weiPrice * fullTokens; // This can be also 0, we give out tokens for free\n\n weiRaised = weiRaised.plus(weiAmount);\n tokensSold = tokensSold.plus(tokenAmount);\n\n investedAmountOf[receiver] = investedAmountOf[receiver].plus(weiAmount);\n tokenAmountOf[receiver] = tokenAmountOf[receiver].plus(tokenAmount);\n\n assignTokens(receiver, tokenAmount);\n\n // Tell us invest was success\n Invested(receiver, weiAmount, tokenAmount, 0);\n }\n\n /**\n * Allow anonymous contributions to this crowdsale.\n */\n function investWithSignedAddress(address addr, uint128 customerId, uint8 v, bytes32 r, bytes32 s) public payable {\n bytes32 hash = sha256(addr);\n if (ecrecover(hash, v, r, s) != signerAddress) throw;\n if(customerId == 0) throw; // UUIDv4 sanity check\n investInternal(addr, customerId);\n }\n\n /**\n * Track who is the customer making the payment so we can send thank you email.\n */\n function investWithCustomerId(address addr, uint128 customerId) public payable {\n if(requiredSignedAddress) throw; // Crowdsale allows only server-side signed participants\n if(customerId == 0) throw; // UUIDv4 sanity check\n investInternal(addr, customerId);\n }\n\n /**\n * Allow anonymous contributions to this crowdsale.\n */\n function invest(address addr) public payable {\n if(requireCustomerId) throw; // Crowdsale needs to track participants for thank you email\n if(requiredSignedAddress) throw; // Crowdsale allows only server-side signed participants\n investInternal(addr, 0);\n }\n\n /**\n * Invest to tokens, recognize the payer and clear his address.\n *\n */\n function buyWithSignedAddress(uint128 customerId, uint8 v, bytes32 r, bytes32 s) public payable {\n investWithSignedAddress(msg.sender, customerId, v, r, s);\n }\n\n /**\n * Invest to tokens, recognize the payer.\n *\n */\n function buyWithCustomerIdWithChecksum(uint128 customerId, bytes1 checksum) public payable {\n // see customerid.py\n if (bytes1(sha3(customerId)) != checksum) throw;\n investWithCustomerId(msg.sender, customerId);\n }\n\n /**\n * Legacy API signature.\n */\n function buyWithCustomerId(uint128 customerId) public payable {\n investWithCustomerId(msg.sender, customerId);\n }\n\n /**\n * The basic entry point to participate the crowdsale process.\n *\n * Pay for funding, get invested tokens back in the sender address.\n */\n function buy() public payable {\n invest(msg.sender);\n }\n\n /**\n * Set policy do we need to have server-side customer ids for the investments.\n *\n */\n function setRequireCustomerId(bool value) onlyOwner {\n requireCustomerId = value;\n InvestmentPolicyChanged(requireCustomerId, requiredSignedAddress, signerAddress);\n }\n\n /**\n * Set policy if all investors must be cleared on the server side first.\n *\n * This is e.g. for the accredited investor clearing.\n *\n */\n function setRequireSignedAddress(bool value, address _signerAddress) onlyOwner {\n requiredSignedAddress = value;\n signerAddress = _signerAddress;\n InvestmentPolicyChanged(requireCustomerId, requiredSignedAddress, signerAddress);\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n assert(c / a == b);\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n\n\n\n/**\n * @title Basic token\n * @dev Basic version of StandardToken, with no allowances.\n */\ncontract BasicToken is ERC20Basic {\n using SafeMath for uint256;\n\n mapping(address => uint256) balances;\n\n uint256 totalSupply_;\n\n /**\n * @dev total number of tokens in existence\n */\n function totalSupply() public view returns (uint256) {\n return totalSupply_;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param _to The address to transfer to.\n * @param _value The amount to be transferred.\n */\n function transfer(address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[msg.sender]);\n\n // SafeMath.sub will throw if there is not enough balance.\n balances[msg.sender] = balances[msg.sender].sub(_value);\n balances[_to] = balances[_to].add(_value);\n Transfer(msg.sender, _to, _value);\n return true;\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param _owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address _owner) public view returns (uint256 balance) {\n return balances[_owner];\n }\n\n}\n\n\n\n\n/**\n * @title Standard ERC20 token\n *\n * @dev Implementation of the basic standard token.\n * @dev https://github.com/ethereum/EIPs/issues/20\n * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol\n */\ncontract StandardToken is ERC20, BasicToken {\n\n mapping (address => mapping (address => uint256)) internal allowed;\n\n\n /**\n * @dev Transfer tokens from one address to another\n * @param _from address The address which you want to send tokens from\n * @param _to address The address which you want to transfer to\n * @param _value uint256 the amount of tokens to be transferred\n */\n function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[_from]);\n require(_value <= allowed[_from][msg.sender]);\n\n balances[_from] = balances[_from].sub(_value);\n balances[_to] = balances[_to].add(_value);\n allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);\n Transfer(_from, _to, _value);\n return true;\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n *\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param _spender The address which will spend the funds.\n * @param _value The amount of tokens to be spent.\n */\n function approve(address _spender, uint256 _value) public returns (bool) {\n allowed[msg.sender][_spender] = _value;\n Approval(msg.sender, _spender, _value);\n return true;\n }\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param _owner address The address which owns the funds.\n * @param _spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address _owner, address _spender) public view returns (uint256) {\n return allowed[_owner][_spender];\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(address _spender, uint _addedValue) public returns (bool) {\n allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {\n uint oldValue = allowed[msg.sender][_spender];\n if (_subtractedValue > oldValue) {\n allowed[msg.sender][_spender] = 0;\n } else {\n allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);\n }\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\ncontract Recoverable is Ownable {\n\n /// @dev Empty constructor (for now)\n function Recoverable() {\n }\n\n /// @dev This will be invoked by the owner, when owner wants to rescue tokens\n /// @param token Token which will we rescue to the owner from the contract\n function recoverTokens(ERC20Basic token) onlyOwner public {\n token.transfer(owner, tokensToBeReturned(token));\n }\n\n /// @dev Interface function, can be overwritten by the superclass\n /// @param token Token which balance we will check and return\n /// @return The amount of tokens (in smallest denominator) the contract owns\n function tokensToBeReturned(ERC20Basic token) public returns (uint) {\n return token.balanceOf(this);\n }\n}\n\n\n\n/**\n * Standard EIP-20 token with an interface marker.\n *\n * @notice Interface marker is used by crowdsale contracts to validate that addresses point a good token contract.\n *\n */\ncontract StandardTokenExt is StandardToken, Recoverable {\n\n /* Interface declaration */\n function isToken() public constant returns (bool weAre) {\n return true;\n }\n}\n\n\n\n\n/**\n * A token that can increase its supply by another contract.\n *\n * This allows uncapped crowdsale by dynamically increasing the supply when money pours in.\n * Only mint agents, contracts whitelisted by owner, can mint new tokens.\n *\n */\ncontract MintableToken is StandardTokenExt {\n\n using SafeMathLib for uint;\n\n bool public mintingFinished = false;\n\n /** List of agents that are allowed to create new tokens */\n mapping (address => bool) public mintAgents;\n\n event MintingAgentChanged(address addr, bool state);\n event Minted(address receiver, uint amount);\n\n /**\n * Create new tokens and allocate them to an address..\n *\n * Only callably by a crowdsale contract (mint agent).\n */\n function mint(address receiver, uint amount) onlyMintAgent canMint public {\n totalSupply_ = totalSupply_.plus(amount);\n balances[receiver] = balances[receiver].plus(amount);\n\n // This will make the mint transaction apper in EtherScan.io\n // We can remove this after there is a standardized minting event\n Transfer(0, receiver, amount);\n }\n\n /**\n * Owner can allow a crowdsale contract to mint new tokens.\n */\n function setMintAgent(address addr, bool state) onlyOwner canMint public {\n mintAgents[addr] = state;\n MintingAgentChanged(addr, state);\n }\n\n modifier onlyMintAgent() {\n // Only crowdsale contracts are allowed to mint new tokens\n if(!mintAgents[msg.sender]) {\n throw;\n }\n _;\n }\n\n /** Make sure we are not done yet. */\n modifier canMint() {\n if(mintingFinished) throw;\n _;\n }\n}\n\n\n/**\n * ICO crowdsale contract that is capped by amout of tokens.\n *\n * - Tokens are dynamically created during the crowdsale\n *\n *\n */\ncontract MintedTokenCappedCrowdsale is Crowdsale {\n\n /* Maximum amount of tokens this crowdsale can sell. */\n uint public maximumSellableTokens;\n\n function MintedTokenCappedCrowdsale(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal, uint _maximumSellableTokens) Crowdsale(_token, _pricingStrategy, _multisigWallet, _start, _end, _minimumFundingGoal) {\n maximumSellableTokens = _maximumSellableTokens;\n }\n\n /**\n * Called from invest() to confirm if the curret investment does not break our cap rule.\n */\n function isBreakingCap(uint weiAmount, uint tokenAmount, uint weiRaisedTotal, uint tokensSoldTotal) constant returns (bool limitBroken) {\n return tokensSoldTotal > maximumSellableTokens;\n }\n\n function isCrowdsaleFull() public constant returns (bool) {\n return tokensSold >= maximumSellableTokens;\n }\n\n /**\n * Dynamically create tokens and assign them to the investor.\n */\n function assignTokens(address receiver, uint tokenAmount) internal {\n MintableToken mintableToken = MintableToken(token);\n mintableToken.mint(receiver, tokenAmount);\n }\n}\n\n\n\n/**\n * A crowdsale that retains the previous token, but changes some parameters.\n *\n * Investor data can be manually fed in.\n *\n * Mostly useful as a hot fix.\n *\n */\ncontract RelaunchedCrowdsale is MintedTokenCappedCrowdsale {\n\n // This transaction was restored from a previous crowdsale\n event RestoredInvestment(address addr, uint originalTxHash);\n\n mapping(uint => bool) public reissuedTransactions;\n\n function RelaunchedCrowdsale(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal, uint _maximumSellableTokens) MintedTokenCappedCrowdsale(_token, _pricingStrategy, _multisigWallet, _start, _end, _minimumFundingGoal, _maximumSellableTokens) {\n }\n\n /**\n * Check if a particular transaction has already been written.\n */\n function getRestoredTransactionStatus(uint _originalTxHash) public constant returns(bool) {\n return reissuedTransactions[_originalTxHash];\n }\n\n /**\n * Rebuild the previous invest data back to the crowdsale.\n */\n function setInvestorData(address _addr, uint _weiAmount, uint _tokenAmount, uint _originalTxHash) onlyOwner public {\n\n if(investedAmountOf[_addr] == 0) {\n investorCount++;\n }\n\n investedAmountOf[_addr] += _weiAmount;\n tokenAmountOf[_addr] += _tokenAmount;\n\n weiRaised += _weiAmount;\n tokensSold += _tokenAmount;\n\n Invested(_addr, _weiAmount, _tokenAmount, 0);\n RestoredInvestment(_addr, _originalTxHash);\n }\n\n /**\n * Rebuild the previous invest data and do a token reissuance.\n */\n function setInvestorDataAndIssueNewToken(address _addr, uint _weiAmount, uint _tokenAmount, uint _originalTxHash) onlyOwner public {\n\n // This transaction has already been rebuild\n if(reissuedTransactions[_originalTxHash]) {\n throw;\n }\n\n setInvestorData(_addr, _weiAmount, _tokenAmount, _originalTxHash);\n\n // Check that we did not bust the cap in the restoration process\n if(isBreakingCap(_weiAmount, _tokenAmount, weiRaised, tokensSold)) {\n throw;\n }\n\n // Mark transaction processed\n reissuedTransactions[_originalTxHash] = true;\n\n // Mint new token to give it to the original investor\n MintableToken mintableToken = MintableToken(token);\n mintableToken.mint(_addr, _tokenAmount);\n }\n\n}\n"}, "ReleasableToken": {"abi": [{"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "state", "type": "bool"}], "name": "setTransferAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "approve", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "recoverTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_from", "type": "address"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setReleaseAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "releaseTokenTransfer", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_subtractedValue", "type": "uint256"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "transferAgents", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "released", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "tokensToBeReturned", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "releaseAgent", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_addedValue", "type": "uint256"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}, {"name": "_spender", "type": "address"}], "name": "allowance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isToken", "outputs": [{"name": "weAre", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}, {"indexed": true, "name": "spender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "bytecode": "0x60806040526004805460a060020a60ff021916905560038054600160a060020a03191633179055610cc9806100356000396000f3006080604052600436106101065763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166302f652a3811461010b578063095ea7b31461013357806316114acd1461016b57806318160ddd1461018c57806323b872dd146101b357806329ff4f53146101dd5780635f412d4f146101fe578063661884631461021357806370a0823114610237578063867c2857146102585780638da5cb5b1461027957806396132521146102aa578063a9059cbb146102bf578063c45d19db146102e3578063d1f276d314610304578063d73dd62314610319578063dd62ed3e1461033d578063eefa597b14610364578063f2fde38b14610379575b600080fd5b34801561011757600080fd5b50610131600160a060020a0360043516602435151561039a565b005b34801561013f57600080fd5b50610157600160a060020a0360043516602435610408565b604080519115158252519081900360200190f35b34801561017757600080fd5b50610131600160a060020a036004351661046e565b34801561019857600080fd5b506101a161053e565b60408051918252519081900360200190f35b3480156101bf57600080fd5b50610157600160a060020a0360043581169060243516604435610544565b3480156101e957600080fd5b50610131600160a060020a03600435166105a8565b34801561020a57600080fd5b5061013161061a565b34801561021f57600080fd5b50610157600160a060020a0360043516602435610668565b34801561024357600080fd5b506101a1600160a060020a0360043516610758565b34801561026457600080fd5b50610157600160a060020a0360043516610773565b34801561028557600080fd5b5061028e610788565b60408051600160a060020a039092168252519081900360200190f35b3480156102b657600080fd5b50610157610797565b3480156102cb57600080fd5b50610157600160a060020a03600435166024356107b8565b3480156102ef57600080fd5b506101a1600160a060020a036004351661081a565b34801561031057600080fd5b5061028e6108b0565b34801561032557600080fd5b50610157600160a060020a03600435166024356108bf565b34801561034957600080fd5b506101a1600160a060020a0360043581169060243516610958565b34801561037057600080fd5b50610157610983565b34801561038557600080fd5b50610131600160a060020a0360043516610988565b600354600160a060020a031633146103b157600080fd5b60045460009074010000000000000000000000000000000000000000900460ff16156103dc57600080fd5b50600160a060020a03919091166000908152600560205260409020805460ff1916911515919091179055565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b600354600160a060020a0316331461048557600080fd5b600354600160a060020a038083169163a9059cbb91166104a48461081a565b6040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b15801561050f57600080fd5b505af1158015610523573d6000803e3d6000fd5b505050506040513d602081101561053957600080fd5b505050565b60015490565b600454600090849074010000000000000000000000000000000000000000900460ff16151561059457600160a060020a03811660009081526005602052604090205460ff16151561059457600080fd5b61059f858585610a1d565b95945050505050565b600354600160a060020a031633146105bf57600080fd5b60045460009074010000000000000000000000000000000000000000900460ff16156105ea57600080fd5b506004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600454600160a060020a0316331461063157600080fd5b6004805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b336000908152600260209081526040808320600160a060020a0386168452909152812054808311156106bd57336000908152600260209081526040808320600160a060020a03881684529091528120556106f2565b6106cd818463ffffffff610b9416565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a031660009081526020819052604090205490565b60056020526000908152604090205460ff1681565b600354600160a060020a031681565b60045474010000000000000000000000000000000000000000900460ff1681565b600454600090339074010000000000000000000000000000000000000000900460ff16151561080857600160a060020a03811660009081526005602052604090205460ff16151561080857600080fd5b6108128484610ba6565b949350505050565b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600091600160a060020a038416916370a082319160248082019260209290919082900301818787803b15801561087e57600080fd5b505af1158015610892573d6000803e3d6000fd5b505050506040513d60208110156108a857600080fd5b505192915050565b600454600160a060020a031681565b336000908152600260209081526040808320600160a060020a03861684529091528120546108f3908363ffffffff610c8716565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600190565b600354600160a060020a0316331461099f57600080fd5b600160a060020a03811615156109b457600080fd5b600354604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6000600160a060020a0383161515610a3457600080fd5b600160a060020a038416600090815260208190526040902054821115610a5957600080fd5b600160a060020a0384166000908152600260209081526040808320338452909152902054821115610a8957600080fd5b600160a060020a038416600090815260208190526040902054610ab2908363ffffffff610b9416565b600160a060020a038086166000908152602081905260408082209390935590851681522054610ae7908363ffffffff610c8716565b600160a060020a03808516600090815260208181526040808320949094559187168152600282528281203382529091522054610b29908363ffffffff610b9416565b600160a060020a03808616600081815260026020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b600082821115610ba057fe5b50900390565b6000600160a060020a0383161515610bbd57600080fd5b33600090815260208190526040902054821115610bd957600080fd5b33600090815260208190526040902054610bf9908363ffffffff610b9416565b3360009081526020819052604080822092909255600160a060020a03851681522054610c2b908363ffffffff610c8716565b600160a060020a038416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b600082820183811015610c9657fe5b93925050505600a165627a7a72305820027b3e806c7779a98106f964ebb311fc74ea801b7a47a3c6c75a2ecc0b723eaf0029", "bytecode_runtime": "0x6080604052600436106101065763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166302f652a3811461010b578063095ea7b31461013357806316114acd1461016b57806318160ddd1461018c57806323b872dd146101b357806329ff4f53146101dd5780635f412d4f146101fe578063661884631461021357806370a0823114610237578063867c2857146102585780638da5cb5b1461027957806396132521146102aa578063a9059cbb146102bf578063c45d19db146102e3578063d1f276d314610304578063d73dd62314610319578063dd62ed3e1461033d578063eefa597b14610364578063f2fde38b14610379575b600080fd5b34801561011757600080fd5b50610131600160a060020a0360043516602435151561039a565b005b34801561013f57600080fd5b50610157600160a060020a0360043516602435610408565b604080519115158252519081900360200190f35b34801561017757600080fd5b50610131600160a060020a036004351661046e565b34801561019857600080fd5b506101a161053e565b60408051918252519081900360200190f35b3480156101bf57600080fd5b50610157600160a060020a0360043581169060243516604435610544565b3480156101e957600080fd5b50610131600160a060020a03600435166105a8565b34801561020a57600080fd5b5061013161061a565b34801561021f57600080fd5b50610157600160a060020a0360043516602435610668565b34801561024357600080fd5b506101a1600160a060020a0360043516610758565b34801561026457600080fd5b50610157600160a060020a0360043516610773565b34801561028557600080fd5b5061028e610788565b60408051600160a060020a039092168252519081900360200190f35b3480156102b657600080fd5b50610157610797565b3480156102cb57600080fd5b50610157600160a060020a03600435166024356107b8565b3480156102ef57600080fd5b506101a1600160a060020a036004351661081a565b34801561031057600080fd5b5061028e6108b0565b34801561032557600080fd5b50610157600160a060020a03600435166024356108bf565b34801561034957600080fd5b506101a1600160a060020a0360043581169060243516610958565b34801561037057600080fd5b50610157610983565b34801561038557600080fd5b50610131600160a060020a0360043516610988565b600354600160a060020a031633146103b157600080fd5b60045460009074010000000000000000000000000000000000000000900460ff16156103dc57600080fd5b50600160a060020a03919091166000908152600560205260409020805460ff1916911515919091179055565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b600354600160a060020a0316331461048557600080fd5b600354600160a060020a038083169163a9059cbb91166104a48461081a565b6040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b15801561050f57600080fd5b505af1158015610523573d6000803e3d6000fd5b505050506040513d602081101561053957600080fd5b505050565b60015490565b600454600090849074010000000000000000000000000000000000000000900460ff16151561059457600160a060020a03811660009081526005602052604090205460ff16151561059457600080fd5b61059f858585610a1d565b95945050505050565b600354600160a060020a031633146105bf57600080fd5b60045460009074010000000000000000000000000000000000000000900460ff16156105ea57600080fd5b506004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600454600160a060020a0316331461063157600080fd5b6004805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b336000908152600260209081526040808320600160a060020a0386168452909152812054808311156106bd57336000908152600260209081526040808320600160a060020a03881684529091528120556106f2565b6106cd818463ffffffff610b9416565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a031660009081526020819052604090205490565b60056020526000908152604090205460ff1681565b600354600160a060020a031681565b60045474010000000000000000000000000000000000000000900460ff1681565b600454600090339074010000000000000000000000000000000000000000900460ff16151561080857600160a060020a03811660009081526005602052604090205460ff16151561080857600080fd5b6108128484610ba6565b949350505050565b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600091600160a060020a038416916370a082319160248082019260209290919082900301818787803b15801561087e57600080fd5b505af1158015610892573d6000803e3d6000fd5b505050506040513d60208110156108a857600080fd5b505192915050565b600454600160a060020a031681565b336000908152600260209081526040808320600160a060020a03861684529091528120546108f3908363ffffffff610c8716565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600190565b600354600160a060020a0316331461099f57600080fd5b600160a060020a03811615156109b457600080fd5b600354604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6000600160a060020a0383161515610a3457600080fd5b600160a060020a038416600090815260208190526040902054821115610a5957600080fd5b600160a060020a0384166000908152600260209081526040808320338452909152902054821115610a8957600080fd5b600160a060020a038416600090815260208190526040902054610ab2908363ffffffff610b9416565b600160a060020a038086166000908152602081905260408082209390935590851681522054610ae7908363ffffffff610c8716565b600160a060020a03808516600090815260208181526040808320949094559187168152600282528281203382529091522054610b29908363ffffffff610b9416565b600160a060020a03808616600081815260026020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b600082821115610ba057fe5b50900390565b6000600160a060020a0383161515610bbd57600080fd5b33600090815260208190526040902054821115610bd957600080fd5b33600090815260208190526040902054610bf9908363ffffffff610b9416565b3360009081526020819052604080822092909255600160a060020a03851681522054610c2b908363ffffffff610c8716565b600160a060020a038416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b600082820183811015610c9657fe5b93925050505600a165627a7a72305820027b3e806c7779a98106f964ebb311fc74ea801b7a47a3c6c75a2ecc0b723eaf0029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "state", "type": "bool"}], "name": "setTransferAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "approve", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "recoverTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_from", "type": "address"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setReleaseAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "releaseTokenTransfer", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_subtractedValue", "type": "uint256"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "transferAgents", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "released", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "tokensToBeReturned", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "releaseAgent", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_addedValue", "type": "uint256"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}, {"name": "_spender", "type": "address"}], "name": "allowance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isToken", "outputs": [{"name": "weAre", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}, {"indexed": true, "name": "spender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "devdoc": {"methods": {"allowance(address,address)": {"details": "Function to check the amount of tokens that an owner allowed to a spender.", "params": {"_owner": "address The address which owns the funds.", "_spender": "address The address which will spend the funds."}, "return": "A uint256 specifying the amount of tokens still available for the spender."}, "approve(address,uint256)": {"details": "Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729", "params": {"_spender": "The address which will spend the funds.", "_value": "The amount of tokens to be spent."}}, "balanceOf(address)": {"details": "Gets the balance of the specified address.", "params": {"_owner": "The address to query the the balance of."}, "return": "An uint256 representing the amount owned by the passed address."}, "decreaseApproval(address,uint256)": {"details": "Decrease the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[_spender] == 0. To decrement allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"_spender": "The address which will spend the funds.", "_subtractedValue": "The amount of tokens to decrease the allowance by."}}, "increaseApproval(address,uint256)": {"details": "Increase the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[_spender] == 0. To increment allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"_addedValue": "The amount of tokens to increase the allowance by.", "_spender": "The address which will spend the funds."}}, "recoverTokens(address)": {"details": "This will be invoked by the owner, when owner wants to rescue tokens", "params": {"token": "Token which will we rescue to the owner from the contract"}}, "tokensToBeReturned(address)": {"details": "Interface function, can be overwritten by the superclass", "params": {"token": "Token which balance we will check and return"}, "return": "The amount of tokens (in smallest denominator) the contract owns"}, "totalSupply()": {"details": "total number of tokens in existence"}, "transferOwnership(address)": {"details": "Allows the current owner to transfer control of the contract to a newOwner.", "params": {"newOwner": "The address to transfer ownership to."}}}}, "userdoc": {"methods": {"releaseTokenTransfer()": {"notice": "One way function to release the tokens to the wild. * Can be called only from the release agent that is the final ICO contract. It is only called if the crowdsale has been success (first milestone reached)."}, "setReleaseAgent(address)": {"notice": "Set the contract that can call release and make the token transferable. * Design choice. Allow reset the release agent to fix fat finger mistakes."}, "setTransferAgent(address,bool)": {"notice": "Owner can allow a particular address (a crowdsale contract) to transfer tokens despite the lock up period."}}}}, "settings": {"compilationTarget": {"contracts/ReleasableToken.sol": "ReleasableToken"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/Recoverable.sol": {"keccak256": "0x311a332cdd87df6e00057f5455f4e68b043b5dbe211f6d68bc64e20817515635", "urls": ["bzzr://4fd99bcfb93baed6e7c8d22ee9ecc5c8346a1aa98288e77b01333b2c5d3f582d"]}, "contracts/ReleasableToken.sol": {"keccak256": "0x2c50180d0c1eab1aa63a04da3ae87ee2c482665d2a1a42c5f05b11234a7edaf4", "urls": ["bzzr://10752c317eba5c42e2848722689cfee4fffb7bcb42f3346e1a20715d843798e8"]}, "contracts/StandardTokenExt.sol": {"keccak256": "0x9ea2d4cec4dccd5639c05e6c23dd027d80b5e5a20abd99b280ab7b2631b5a5fc", "urls": ["bzzr://a52d8fc5a21bd83997aff19128e00dceb251df712207b61223894c8b7f42d5ff"]}, "zeppelin/contracts/math/SafeMath.sol": {"keccak256": "0x341ba8cb467a3623e819ba1a683ac1d264005186f308505214e5f6bc89446a08", "urls": ["bzzr://59b5652ee4e4a1b5a8f1a8906e14c84af43d636cf5ca0725cc1813aabe4c8c17"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}, "zeppelin/contracts/token/ERC20/BasicToken.sol": {"keccak256": "0x948404468d61ff35ea4194650670408dabd65da7f905a1c16888ab84520bf39e", "urls": ["bzzr://ea75e20f95d7e4e10394fe6bfaa8eee56b4757c2a6f1e8df4180d33afa621935"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}, "zeppelin/contracts/token/ERC20/StandardToken.sol": {"keccak256": "0xd2b344a5259e19ec143074cfa65637a10c40b68395c59808c4af13bccbb2de55", "urls": ["bzzr://d61a01175a7ca1ba9f4403de603c20b897e33ec425aef2d9f8a7f9ddfdfaf5b2"]}}, "version": 1}, "name": "ReleasableToken", "ordered_full_dependencies": [], "source_path": "contracts/ReleasableToken.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n assert(c / a == b);\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n\n\n\n/**\n * @title Basic token\n * @dev Basic version of StandardToken, with no allowances.\n */\ncontract BasicToken is ERC20Basic {\n using SafeMath for uint256;\n\n mapping(address => uint256) balances;\n\n uint256 totalSupply_;\n\n /**\n * @dev total number of tokens in existence\n */\n function totalSupply() public view returns (uint256) {\n return totalSupply_;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param _to The address to transfer to.\n * @param _value The amount to be transferred.\n */\n function transfer(address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[msg.sender]);\n\n // SafeMath.sub will throw if there is not enough balance.\n balances[msg.sender] = balances[msg.sender].sub(_value);\n balances[_to] = balances[_to].add(_value);\n Transfer(msg.sender, _to, _value);\n return true;\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param _owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address _owner) public view returns (uint256 balance) {\n return balances[_owner];\n }\n\n}\n\n\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n\n\n/**\n * @title Standard ERC20 token\n *\n * @dev Implementation of the basic standard token.\n * @dev https://github.com/ethereum/EIPs/issues/20\n * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol\n */\ncontract StandardToken is ERC20, BasicToken {\n\n mapping (address => mapping (address => uint256)) internal allowed;\n\n\n /**\n * @dev Transfer tokens from one address to another\n * @param _from address The address which you want to send tokens from\n * @param _to address The address which you want to transfer to\n * @param _value uint256 the amount of tokens to be transferred\n */\n function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[_from]);\n require(_value <= allowed[_from][msg.sender]);\n\n balances[_from] = balances[_from].sub(_value);\n balances[_to] = balances[_to].add(_value);\n allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);\n Transfer(_from, _to, _value);\n return true;\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n *\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param _spender The address which will spend the funds.\n * @param _value The amount of tokens to be spent.\n */\n function approve(address _spender, uint256 _value) public returns (bool) {\n allowed[msg.sender][_spender] = _value;\n Approval(msg.sender, _spender, _value);\n return true;\n }\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param _owner address The address which owns the funds.\n * @param _spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address _owner, address _spender) public view returns (uint256) {\n return allowed[_owner][_spender];\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(address _spender, uint _addedValue) public returns (bool) {\n allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {\n uint oldValue = allowed[msg.sender][_spender];\n if (_subtractedValue > oldValue) {\n allowed[msg.sender][_spender] = 0;\n } else {\n allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);\n }\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n\ncontract Recoverable is Ownable {\n\n /// @dev Empty constructor (for now)\n function Recoverable() {\n }\n\n /// @dev This will be invoked by the owner, when owner wants to rescue tokens\n /// @param token Token which will we rescue to the owner from the contract\n function recoverTokens(ERC20Basic token) onlyOwner public {\n token.transfer(owner, tokensToBeReturned(token));\n }\n\n /// @dev Interface function, can be overwritten by the superclass\n /// @param token Token which balance we will check and return\n /// @return The amount of tokens (in smallest denominator) the contract owns\n function tokensToBeReturned(ERC20Basic token) public returns (uint) {\n return token.balanceOf(this);\n }\n}\n\n\n\n/**\n * Standard EIP-20 token with an interface marker.\n *\n * @notice Interface marker is used by crowdsale contracts to validate that addresses point a good token contract.\n *\n */\ncontract StandardTokenExt is StandardToken, Recoverable {\n\n /* Interface declaration */\n function isToken() public constant returns (bool weAre) {\n return true;\n }\n}\n\n\n\n/**\n * Define interface for releasing the token transfer after a successful crowdsale.\n */\ncontract ReleasableToken is StandardTokenExt {\n\n /* The finalizer contract that allows unlift the transfer limits on this token */\n address public releaseAgent;\n\n /** A crowdsale contract can release us to the wild if ICO success. If false we are are in transfer lock up period.*/\n bool public released = false;\n\n /** Map of agents that are allowed to transfer tokens regardless of the lock down period. These are crowdsale contracts and possible the team multisig itself. */\n mapping (address => bool) public transferAgents;\n\n /**\n * Limit token transfer until the crowdsale is over.\n *\n */\n modifier canTransfer(address _sender) {\n\n if(!released) {\n if(!transferAgents[_sender]) {\n throw;\n }\n }\n\n _;\n }\n\n /**\n * Set the contract that can call release and make the token transferable.\n *\n * Design choice. Allow reset the release agent to fix fat finger mistakes.\n */\n function setReleaseAgent(address addr) onlyOwner inReleaseState(false) public {\n\n // We don't do interface check here as we might want to a normal wallet address to act as a release agent\n releaseAgent = addr;\n }\n\n /**\n * Owner can allow a particular address (a crowdsale contract) to transfer tokens despite the lock up period.\n */\n function setTransferAgent(address addr, bool state) onlyOwner inReleaseState(false) public {\n transferAgents[addr] = state;\n }\n\n /**\n * One way function to release the tokens to the wild.\n *\n * Can be called only from the release agent that is the final ICO contract. It is only called if the crowdsale has been success (first milestone reached).\n */\n function releaseTokenTransfer() public onlyReleaseAgent {\n released = true;\n }\n\n /** The function can be called only before or after the tokens have been releasesd */\n modifier inReleaseState(bool releaseState) {\n if(releaseState != released) {\n throw;\n }\n _;\n }\n\n /** The function can be called only by a whitelisted release agent. */\n modifier onlyReleaseAgent() {\n if(msg.sender != releaseAgent) {\n throw;\n }\n _;\n }\n\n function transfer(address _to, uint _value) canTransfer(msg.sender) returns (bool success) {\n // Call StandardToken.transfer()\n return super.transfer(_to, _value);\n }\n\n function transferFrom(address _from, address _to, uint _value) canTransfer(_from) returns (bool success) {\n // Call StandardToken.transferForm()\n return super.transferFrom(_from, _to, _value);\n }\n\n}\n"}, "RestrictedTransferAgent": {"abi": [{"constant": true, "inputs": [{"name": "from", "type": "address"}, {"name": "to", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "verify", "outputs": [{"name": "newValue", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [{"name": "_KYC", "type": "address"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}], "bytecode": "0x608060405234801561001057600080fd5b506040516020806101ee833981016040525160008054600160a060020a03909216600160a060020a031990921691909117905561019c806100526000396000f3006080604052600436106100405763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663ad0769948114610045575b600080fd5b34801561005157600080fd5b5061007c73ffffffffffffffffffffffffffffffffffffffff6004358116906024351660443561008e565b60408051918252519081900360200190f35b6000805473ffffffffffffffffffffffffffffffffffffffff1615156100b5575080610169565b60008054604080517f3af32abf00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff878116600483015291519190921692633af32abf92602480820193602093909283900390910190829087803b15801561012d57600080fd5b505af1158015610141573d6000803e3d6000fd5b505050506040513d602081101561015757600080fd5b505115610165575080610169565b5060005b93925050505600a165627a7a723058201fa310ff27be74f550eb78f19826144aa5061f3400b56eb8d6e6ef7fc66a17970029", "bytecode_runtime": "0x6080604052600436106100405763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663ad0769948114610045575b600080fd5b34801561005157600080fd5b5061007c73ffffffffffffffffffffffffffffffffffffffff6004358116906024351660443561008e565b60408051918252519081900360200190f35b6000805473ffffffffffffffffffffffffffffffffffffffff1615156100b5575080610169565b60008054604080517f3af32abf00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff878116600483015291519190921692633af32abf92602480820193602093909283900390910190829087803b15801561012d57600080fd5b505af1158015610141573d6000803e3d6000fd5b505050506040513d602081101561015757600080fd5b505115610165575080610169565b5060005b93925050505600a165627a7a723058201fa310ff27be74f550eb78f19826144aa5061f3400b56eb8d6e6ef7fc66a17970029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": true, "inputs": [{"name": "from", "type": "address"}, {"name": "to", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "verify", "outputs": [{"name": "newValue", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [{"name": "_KYC", "type": "address"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}], "devdoc": {"methods": {"verify(address,address,uint256)": {"details": "Checking if transfer can happen, and if so, what is the right amount", "params": {"from": "The account sending the tokens", "to": "The account receiving the tokens", "value": "The indended amount"}, "return": "The actual amount permitted"}}}, "userdoc": {"methods": {}}}, "settings": {"compilationTarget": {"contracts/security-token/RestrictedTransferAgent.sol": "RestrictedTransferAgent"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/security-token/KYCInterface.sol": {"keccak256": "0x29b1037cfb17f26421589f64eb271362aa9fbfd1f975e68df8071fd98be2052c", "urls": ["bzzr://f815559e1245fd3603a1baf5f3ad7ed7d571690b35f131cb27e0fcf8246c34a4"]}, "contracts/security-token/RestrictedTransferAgent.sol": {"keccak256": "0x34786dd1f88a4ee10875ae8477cdc80c3501813094ab1d9bfe9e49ed6ec0b394", "urls": ["bzzr://d176aac0b77abed04029368f80348ed739f8984de586fb988a4f1822a5a3a825"]}, "contracts/security-token/SecurityTransferAgent.sol": {"keccak256": "0x23b8a61926435e2c583480c0de72a99b4f7ec8a4213ffc46711f83ecdeaf9186", "urls": ["bzzr://36be13b6cf1389357679705bd18969409ecde684ace2d9c5b606d8986e0231cd"]}}, "version": 1}, "name": "RestrictedTransferAgent", "ordered_full_dependencies": [], "source_path": "contracts/security-token/RestrictedTransferAgent.sol", "source": "\n\ninterface KYCInterface {\n event Whitelisted(address who, uint128 nonce);\n\n function isWhitelisted(address who) external view returns(bool);\n}\n\n\ninterface SecurityTransferAgent {\n function verify(address from, address to, uint256 value) public view returns (uint256 newValue);\n}\n\n\ncontract RestrictedTransferAgent is SecurityTransferAgent {\n\n KYCInterface KYC;\n\n function RestrictedTransferAgent(KYCInterface _KYC) {\n KYC = _KYC;\n }\n\n /**\n * @dev Checking if transfer can happen, and if so, what is the right amount\n *\n * @param from The account sending the tokens\n * @param to The account receiving the tokens\n * @param value The indended amount\n * @return The actual amount permitted\n */\n function verify(address from, address to, uint256 value) public view returns (uint256 newValue) {\n if (address(KYC) == address(0)) {\n return value;\n }\n\n if (KYC.isWhitelisted(to)) {\n return value;\n } else {\n return 0;\n }\n }\n}\n"}, "Roles": {"abi": [], "bytecode": "0x604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600080fd00a165627a7a72305820454b2ed1ab7179358549ecb27f4fc7360fa94e7d2fd6be354bae7674cb11038c0029", "bytecode_runtime": "0x73000000000000000000000000000000000000000030146080604052600080fd00a165627a7a72305820454b2ed1ab7179358549ecb27f4fc7360fa94e7d2fd6be354bae7674cb11038c0029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [], "devdoc": {"author": "Francisco Giordano (@frangio)", "methods": {}, "title": "Roles"}, "userdoc": {"methods": {}}}, "settings": {"compilationTarget": {"zeppelin/contracts/ownership/rbac/Roles.sol": "Roles"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"zeppelin/contracts/ownership/rbac/Roles.sol": {"keccak256": "0xbab0d0ae15daca818349ead8040dd1794327e2b9a616749fc69a29a5ad85be58", "urls": ["bzzr://5443bb48b0678d3c6cbb48869517d004564ad35e20d96ac9727738b5f8bc45e4"]}}, "version": 1}, "name": "Roles", "ordered_full_dependencies": [], "source_path": "zeppelin/contracts/ownership/rbac/Roles.sol", "source": "\n\n/**\n * @title Roles\n * @author Francisco Giordano (@frangio)\n * @dev Library for managing addresses assigned to a Role.\n * See RBAC.sol for example usage.\n */\nlibrary Roles {\n struct Role {\n mapping (address => bool) bearer;\n }\n\n /**\n * @dev give an address access to this role\n */\n function add(Role storage role, address addr)\n internal\n {\n role.bearer[addr] = true;\n }\n\n /**\n * @dev remove an address' access to this role\n */\n function remove(Role storage role, address addr)\n internal\n {\n role.bearer[addr] = false;\n }\n\n /**\n * @dev check if an address has this role\n * // reverts\n */\n function check(Role storage role, address addr)\n view\n internal\n {\n require(has(role, addr));\n }\n\n /**\n * @dev check if an address has this role\n * @return bool\n */\n function has(Role storage role, address addr)\n view\n internal\n returns (bool)\n {\n return role.bearer[addr];\n }\n}\n"}, "SafeMath": {"abi": [], "bytecode": "0x604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600080fd00a165627a7a723058204341d26a4e3577ffacdeae015a23d15ef6797c43c52b9b2ae29f6f3f384fb1c70029", "bytecode_runtime": "0x73000000000000000000000000000000000000000030146080604052600080fd00a165627a7a723058204341d26a4e3577ffacdeae015a23d15ef6797c43c52b9b2ae29f6f3f384fb1c70029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [], "devdoc": {"methods": {}, "title": "SafeMath"}, "userdoc": {"methods": {}}}, "settings": {"compilationTarget": {"zeppelin/contracts/math/SafeMath.sol": "SafeMath"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"zeppelin/contracts/math/SafeMath.sol": {"keccak256": "0x341ba8cb467a3623e819ba1a683ac1d264005186f308505214e5f6bc89446a08", "urls": ["bzzr://59b5652ee4e4a1b5a8f1a8906e14c84af43d636cf5ca0725cc1813aabe4c8c17"]}}, "version": 1}, "name": "SafeMath", "ordered_full_dependencies": [], "source_path": "zeppelin/contracts/math/SafeMath.sol", "source": "\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n assert(c / a == b);\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n"}, "SafeMathLib": {"abi": [{"constant": false, "inputs": [{"name": "a", "type": "uint256"}, {"name": "b", "type": "uint256"}], "name": "times", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "a", "type": "uint256"}, {"name": "b", "type": "uint256"}], "name": "plus", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "a", "type": "uint256"}, {"name": "b", "type": "uint256"}], "name": "minus", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}], "bytecode": "0x61014d610030600b82828239805160001a6073146000811461002057610022565bfe5b5030600052607381538281f300730000000000000000000000000000000000000000301460806040526004361061006d5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416631d3b9edf811461007257806366098d4f1461009f578063f4f3bdc1146100ba575b600080fd5b81801561007e57600080fd5b5061008d6004356024356100d5565b60408051918252519081900360200190f35b8180156100ab57600080fd5b5061008d600435602435610100565b8180156100c657600080fd5b5061008d60043560243561010f565b60008282028315806100f157508284828115156100ee57fe5b04145b15156100f957fe5b9392505050565b6000828201838110156100f957fe5b60008282111561011b57fe5b509003905600a165627a7a72305820a82a698ff7591b80a6dfbe5c85ceece5c3afecad975cc3a15dd0de62722265e70029", "bytecode_runtime": "0x730000000000000000000000000000000000000000301460806040526004361061006d5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416631d3b9edf811461007257806366098d4f1461009f578063f4f3bdc1146100ba575b600080fd5b81801561007e57600080fd5b5061008d6004356024356100d5565b60408051918252519081900360200190f35b8180156100ab57600080fd5b5061008d600435602435610100565b8180156100c657600080fd5b5061008d60043560243561010f565b60008282028315806100f157508284828115156100ee57fe5b04145b15156100f957fe5b9392505050565b6000828201838110156100f957fe5b60008282111561011b57fe5b509003905600a165627a7a72305820a82a698ff7591b80a6dfbe5c85ceece5c3afecad975cc3a15dd0de62722265e70029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": false, "inputs": [{"name": "a", "type": "uint256"}, {"name": "b", "type": "uint256"}], "name": "times", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "a", "type": "uint256"}, {"name": "b", "type": "uint256"}], "name": "plus", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "a", "type": "uint256"}, {"name": "b", "type": "uint256"}], "name": "minus", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}], "devdoc": {"methods": {}}, "userdoc": {"methods": {}}}, "settings": {"compilationTarget": {"contracts/SafeMathLib.sol": "SafeMathLib"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/SafeMathLib.sol": {"keccak256": "0x501bfe31e274b9a5591f7c540bdced4d4312e27d4f19599147c9bbca3d9c6b18", "urls": ["bzzr://a80935ebddb06c247d71372d4e5833ee029f08633bd0fe4a274a57009567e5b9"]}}, "version": 1}, "name": "SafeMathLib", "ordered_full_dependencies": [], "source_path": "contracts/SafeMathLib.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Safe unsigned safe math.\n *\n * https://blog.aragon.one/library-driven-development-in-solidity-2bebcaf88736#.750gwtwli\n *\n * Originally from https://raw.githubusercontent.com/AragonOne/zeppelin-solidity/master/contracts/SafeMathLib.sol\n *\n * Maintained here until merged to mainline zeppelin-solidity.\n *\n */\nlibrary SafeMathLib {\n\n function times(uint a, uint b) returns (uint) {\n uint c = a * b;\n assert(a == 0 || c / a == b);\n return c;\n }\n\n function minus(uint a, uint b) returns (uint) {\n assert(b <= a);\n return a - b;\n }\n\n function plus(uint a, uint b) returns (uint) {\n uint c = a + b;\n assert(c>=a);\n return c;\n }\n\n}\n"}, "SecurityToken": {"abi": [{"constant": true, "inputs": [], "name": "name", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "approve", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "addr", "type": "address"}, {"name": "roleName", "type": "string"}], "name": "checkRole", "outputs": [], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_signature", "type": "bytes"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}, {"name": "_fee", "type": "uint256"}, {"name": "_nonce", "type": "uint256"}], "name": "transferPreSigned", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_token", "type": "address"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}, {"name": "_fee", "type": "uint256"}, {"name": "_nonce", "type": "uint256"}], "name": "transferPreSignedHashing", "outputs": [{"name": "", "type": "bytes32"}], "payable": false, "stateMutability": "pure", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "recoverTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "addedValue", "type": "uint256"}, {"name": "data", "type": "bytes"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "tokenCount", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "announcement", "type": "address"}], "name": "announce", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "hash", "type": "bytes32"}, {"name": "sig", "type": "bytes"}], "name": "recover", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "pure", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "uint256"}], "name": "announcements", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "addr", "type": "address"}, {"name": "roleName", "type": "string"}], "name": "hasRole", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "from", "type": "address"}, {"name": "to", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "decimals", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "from", "type": "address"}, {"name": "to", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "forceTransfer", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "owner", "type": "address"}, {"name": "blockNumber", "type": "uint256"}], "name": "balanceAt", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "announcementsByAddress", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "receiver", "type": "address"}, {"name": "amount", "type": "uint256"}, {"name": "data", "type": "bytes"}], "name": "transferAndCall", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}, {"name": "", "type": "uint256"}], "name": "tokenBalances", "outputs": [{"name": "blockNumber", "type": "uint256"}, {"name": "value", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "uint256"}], "name": "tokensTotal", "outputs": [{"name": "blockNumber", "type": "uint256"}, {"name": "value", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "version", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "url", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}, {"name": "", "type": "address"}], "name": "allowed", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_name", "type": "string"}, {"name": "_symbol", "type": "string"}, {"name": "_url", "type": "string"}], "name": "setTokenInformation", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "subtractedValue", "type": "uint256"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "uint256"}], "name": "burnTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "owner", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "subtractedValue", "type": "uint256"}, {"name": "data", "type": "bytes"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "roleName", "type": "string"}], "name": "adminRemoveRole", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "transferVerifier", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "symbol", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "blockNumber", "type": "uint256"}], "name": "totalSupplyAt", "outputs": [{"name": "tokenCount", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "uint256"}], "name": "issueTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "to", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "roleName", "type": "string"}], "name": "adminAddRole", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "tokensToBeReturned", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "ROLE_ADMIN", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "addedValue", "type": "uint256"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "owner", "type": "address"}, {"name": "spender", "type": "address"}], "name": "allowance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newVerifier", "type": "address"}], "name": "setTransactionVerifier", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [{"name": "_name", "type": "string"}, {"name": "_symbol", "type": "string"}, {"name": "_url", "type": "string"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Issued", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "burner", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Burned", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Forced", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "announcement", "type": "address"}, {"indexed": true, "name": "announcementType", "type": "uint256"}, {"indexed": true, "name": "announcementName", "type": "bytes32"}, {"indexed": false, "name": "announcementURI", "type": "bytes32"}, {"indexed": false, "name": "announcementHash", "type": "uint256"}], "name": "Announced", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newName", "type": "string"}, {"indexed": false, "name": "newSymbol", "type": "string"}, {"indexed": false, "name": "newUrl", "type": "string"}], "name": "UpdatedTokenInformation", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newVerifier", "type": "address"}], "name": "UpdatedTransactionVerifier", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": true, "name": "delegate", "type": "address"}, {"indexed": false, "name": "amount", "type": "uint256"}, {"indexed": false, "name": "fee", "type": "uint256"}], "name": "TransferPreSigned", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "from", "type": "address"}, {"indexed": false, "name": "hash", "type": "bytes32"}], "name": "Debug", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "addr", "type": "address"}, {"indexed": false, "name": "roleName", "type": "string"}], "name": "RoleAdded", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "addr", "type": "address"}, {"indexed": false, "name": "roleName", "type": "string"}], "name": "RoleRemoved", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "from", "type": "address"}, {"indexed": false, "name": "receiver", "type": "address"}, {"indexed": false, "name": "amount", "type": "uint256"}, {"indexed": false, "name": "data", "type": "bytes"}], "name": "ERC677Transfer", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}, {"indexed": true, "name": "spender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "bytecode": "0x60c0604052600960808190527f544d2d303120302e31000000000000000000000000000000000000000000000060a09081526200004091600a91906200046c565b503480156200004e57600080fd5b5060405162002f4538038062002f4583398101604090815281516020808401519284015191840180519094938401939290920191849184916012916200009a916000918601906200046c565b508151620000b09060019060208501906200046c565b50600255505060408051808201909152600581527f61646d696e00000000000000000000000000000000000000000000000000000060208201526200010090339064010000000062000311810204565b60088054600160a060020a0319163317905580516200012790600b9060208401906200046c565b5062000178336040805190810160405280600a81526020017f616e6e6f756e636528290000000000000000000000000000000000000000000081525062000311640100000000026401000000009004565b620001c8336040805190810160405280600f81526020017f666f7263655472616e736665722829000000000000000000000000000000000081525062000311640100000000026401000000009004565b62000218336040805190810160405280600d81526020017f6973737565546f6b656e7328290000000000000000000000000000000000000081525062000311640100000000026401000000009004565b62000268336040805190810160405280600c81526020017f6275726e546f6b656e732829000000000000000000000000000000000000000081525062000311640100000000026401000000009004565b620002b8336040805190810160405280601581526020017f736574546f6b656e496e666f726d6174696f6e2829000000000000000000000081525062000311640100000000026401000000009004565b62000308336040805190810160405280601881526020017f7365745472616e73616374696f6e56657269666965722829000000000000000081525062000311640100000000026401000000009004565b50505062000511565b6200038d826007836040518082805190602001908083835b602083106200034a5780518252601f19909201916020918201910162000329565b51815160209384036101000a6000190180199092169116179052920194855250604051938490030190922092915050640100000000620004478102620029211704565b7fbfec83d64eaa953f2708271a023ab9ee82057f8f3578d548c1a4ba0b5b70048982826040518083600160a060020a0316600160a060020a0316815260200180602001828103825283818151815260200191508051906020019080838360005b8381101562000407578181015183820152602001620003ed565b50505050905090810190601f168015620004355780820380516001836020036101000a031916815260200191505b50935050505060405180910390a15050565b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620004af57805160ff1916838001178555620004df565b82800160010185558215620004df579182015b82811115620004df578251825591602001919060010190620004c2565b50620004ed929150620004f1565b5090565b6200050e91905b80821115620004ed5760008155600101620004f8565b90565b612a2480620005216000396000f3006080604052600436106102035763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde038114610208578063095ea7b3146102925780630988ca8c146102ca5780631296830d1461033357806315420b71146103a657806316114acd146103e857806316ca3b631461040957806318160ddd1461047257806318913e211461048757806319045a25146104a85780631bcfbe3114610522578063217fe6c61461053a57806323b872dd146105a1578063313ce567146105cb57806333bebb77146105e05780633b8e6f2e1461060a5780633f9ed88c1461062e5780634000aea01461064f57806348ff5665146106b85780634f0092ab146106f557806354fd4d501461070d5780635600f04f146107225780635c658165146107375780635c7181bc1461075e57806366188463146107965780636d1b229d146107ba57806370a08231146107d25780637272ad49146107f357806388cee87e1461085c5780638da5cb5b146108c35780638daed528146108d857806395d89b41146108ed578063981b24d014610902578063a5820daa1461091a578063a9059cbb14610932578063b25fa92c14610956578063c45d19db146109bd578063d391014b146109de578063d73dd623146109f3578063dd62ed3e14610a17578063eeac096914610a3e578063f2fde38b14610a5f575b600080fd5b34801561021457600080fd5b5061021d610a80565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561025757818101518382015260200161023f565b50505050905090810190601f1680156102845780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561029e57600080fd5b506102b6600160a060020a0360043516602435610b0e565b604080519115158252519081900360200190f35b3480156102d657600080fd5b5060408051602060046024803582810135601f8101859004850286018501909652858552610331958335600160a060020a0316953695604494919390910191908190840183828082843750949750610b749650505050505050565b005b34801561033f57600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526102b694369492936024939284019190819084018382808284375094975050508335600160a060020a0316945050506020820135916040810135915060600135610be2565b3480156103b257600080fd5b506103d6600160a060020a0360043581169060243516604435606435608435610e02565b60408051918252519081900360200190f35b3480156103f457600080fd5b50610331600160a060020a0360043516610e74565b34801561041557600080fd5b50604080516020600460443581810135601f81018490048402850184019095528484526102b6948235600160a060020a0316946024803595369594606494920191908190840183828082843750949750610f449650505050505050565b34801561047e57600080fd5b506103d6610ff4565b34801561049357600080fd5b50610331600160a060020a0360043516611006565b3480156104b457600080fd5b5060408051602060046024803582810135601f81018590048502860185019096528585526105069583359536956044949193909101919081908401838280828437509497506112fb9650505050505050565b60408051600160a060020a039092168252519081900360200190f35b34801561052e57600080fd5b506105066004356113d0565b34801561054657600080fd5b5060408051602060046024803582810135601f81018590048502860185019096528585526102b6958335600160a060020a03169536956044949193909101919081908401838280828437509497506113f89650505050505050565b3480156105ad57600080fd5b506102b6600160a060020a0360043581169060243516604435611464565b3480156105d757600080fd5b506103d66114f4565b3480156105ec57600080fd5b50610331600160a060020a03600435811690602435166044356114fa565b34801561061657600080fd5b506103d6600160a060020a0360043516602435611594565b34801561063a57600080fd5b506103d6600160a060020a03600435166115b6565b34801561065b57600080fd5b50604080516020600460443581810135601f81018490048402850184019095528484526102b6948235600160a060020a03169460248035953695946064949201919081908401838280828437509497506115c89650505050505050565b3480156106c457600080fd5b506106dc600160a060020a03600435166024356117d1565b6040805192835260208301919091528051918290030190f35b34801561070157600080fd5b506106dc60043561180c565b34801561071957600080fd5b5061021d611838565b34801561072e57600080fd5b5061021d611893565b34801561074357600080fd5b506103d6600160a060020a03600435811690602435166118ee565b34801561076a57600080fd5b50610331602460048035828101929082013591813580830192908201359160443591820191013561190b565b3480156107a257600080fd5b506102b6600160a060020a0360043516602435611b2b565b3480156107c657600080fd5b50610331600435611c1b565b3480156107de57600080fd5b506103d6600160a060020a0360043516611d21565b3480156107ff57600080fd5b50604080516020600460443581810135601f81018490048402850184019095528484526102b6948235600160a060020a0316946024803595369594606494920191908190840183828082843750949750611d499650505050505050565b34801561086857600080fd5b5060408051602060046024803582810135601f8101859004850286018501909652858552610331958335600160a060020a0316953695604494919390910191908190840183828082843750949750611d6b9650505050505050565b3480156108cf57600080fd5b50610506611db4565b3480156108e457600080fd5b50610506611dc3565b3480156108f957600080fd5b5061021d611dd2565b34801561090e57600080fd5b506103d6600435611e2c565b34801561092657600080fd5b50610331600435611e39565b34801561093e57600080fd5b506102b6600160a060020a0360043516602435611f3b565b34801561096257600080fd5b5060408051602060046024803582810135601f8101859004850286018501909652858552610331958335600160a060020a0316953695604494919390910191908190840183828082843750949750611f919650505050505050565b3480156109c957600080fd5b506103d6600160a060020a0360043516611fda565b3480156109ea57600080fd5b5061021d612070565b3480156109ff57600080fd5b506102b6600160a060020a03600435166024356120a7565b348015610a2357600080fd5b506103d6600160a060020a0360043581169060243516612140565b348015610a4a57600080fd5b50610331600160a060020a036004351661216b565b348015610a6b57600080fd5b50610331600160a060020a036004351661220b565b6000805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610b065780601f10610adb57610100808354040283529160200191610b06565b820191906000526020600020905b815481529060010190602001808311610ae957829003601f168201915b505050505081565b336000818152600660209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b610bde826007836040518082805190602001908083835b60208310610baa5780518252601f199092019160209182019101610b8b565b51815160209384036101000a60001901801990921691161790529201948552506040519384900301909220929150506122a0565b5050565b60008080600160a060020a0387161515610bfb57600080fd5b6009886040518082805190602001908083835b60208310610c2d5780518252601f199092019160209182019101610c0e565b51815160209384036101000a600019018019909216911617905292019485525060405193849003019092205460ff16159150610c6a905057600080fd5b610c773088888888610e02565b9150610c8382896112fb565b9050600160a060020a0381161515610c9a57600080fd5b610ca58188886122b5565b610cb08133876122b5565b60016009896040518082805190602001908083835b60208310610ce45780518252601f199092019160209182019101610cc5565b51815160209384036101000a6000190180199092169116179052920194855250604080519485900382018520805460ff1916961515969096179095558a84528301899052505081513392600160a060020a038b811693908616927fec5a73fd1f178be20c1bca1b406cbf4b5c20d833b66e582fc122fb4baa0fc2a4929181900390910190a486600160a060020a031681600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef886040518082815260200191505060405180910390a36040805186815290513391600160a060020a038416917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a3506001979650505050505050565b604080517f48664c160000000000000000000000000000000000000000000000000000000081526c01000000000000000000000000600160a060020a0397881681026004830152959096169094026018860152602c850192909252604c840152606c8301525190819003608c01902090565b600854600160a060020a03163314610e8b57600080fd5b600854600160a060020a038083169163a9059cbb9116610eaa84611fda565b6040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b158015610f1557600080fd5b505af1158015610f29573d6000803e3d6000fd5b505050506040513d6020811015610f3f57600080fd5b505050565b6000600160a060020a038416301415610f5c57600080fd5b610f6684846120a7565b5083600160a060020a03168260405180828051906020019080838360005b83811015610f9c578181015183820152602001610f84565b50505050905090810190601f168015610fc95780820380516001836020036101000a031916815260200191505b509150506000604051808303816000865af19150501515610fe957600080fd5b5060015b9392505050565b60006110016005436123f1565b905090565b60408051808201909152600a81527f616e6e6f756e636528290000000000000000000000000000000000000000000060208201526110443382610b74565b600c80546001810182557fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c701805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03851690811790915590546000828152600d602090815260408083209390935582517f9ea0c08c0000000000000000000000000000000000000000000000000000000081529251639ea0c08c93600480820194918390030190829087803b1580156110fa57600080fd5b505af115801561110e573d6000803e3d6000fd5b505050506040513d602081101561112457600080fd5b5051604080517f5fcce2790000000000000000000000000000000000000000000000000000000081529051600160a060020a03851691635fcce2799160048083019260209291908290030181600087803b15801561118157600080fd5b505af1158015611195573d6000803e3d6000fd5b505050506040513d60208110156111ab57600080fd5b5051604080517ff31294a40000000000000000000000000000000000000000000000000000000081529051600160a060020a038616917fecae36ae461af9b3746319bfdbfefc7de682e71e22dd901cbec95ad177c33db491839163f31294a49160048083019260209291908290030181600087803b15801561122c57600080fd5b505af1158015611240573d6000803e3d6000fd5b505050506040513d602081101561125657600080fd5b5051604080517f1274c3f30000000000000000000000000000000000000000000000000000000081529051600160a060020a03891691631274c3f39160048083019260209291908290030181600087803b1580156112b357600080fd5b505af11580156112c7573d6000803e3d6000fd5b505050506040513d60208110156112dd57600080fd5b50516040805192835260208301919091528051918290030190a45050565b6000806000808451604114151561131557600093506113c7565b50505060208201516040830151606084015160001a601b60ff8216101561133a57601b015b8060ff16601b1415801561135257508060ff16601c14155b1561136057600093506113c7565b60408051600080825260208083018085528a905260ff8516838501526060830187905260808301869052925160019360a0808501949193601f19840193928390039091019190865af11580156113ba573d6000803e3d6000fd5b5050506020604051035193505b50505092915050565b600c8054829081106113de57fe5b600091825260209091200154600160a060020a0316905081565b6000610fed836007846040518082805190602001908083835b602083106114305780518252601f199092019160209182019101611411565b51815160209384036101000a6000190180199092169116179052920194855250604051938490030190922092915050612407565b600160a060020a038316600090815260066020908152604080832033845290915281205482111561149457600080fd5b61149f8484846122b5565b82600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a35060019392505050565b60025481565b60408051808201909152600f81527f666f7263655472616e736665722829000000000000000000000000000000000060208201526115383382610b74565b6115438484846122b5565b82600160a060020a031684600160a060020a03167f768ff242747198c58dcb1136fb640adf7a199de1789b75bc95b6f787668b51b7846040518082815260200191505060405180910390a350505050565b600160a060020a0382166000908152600460205260408120610fed90836123f1565b600d6020526000908152604090205481565b60006115d48484611f3b565b15156115df57600080fd5b7f72db2339068fd324bbc28f2944e01064da539ac76064b6ce4a97a5f81de43dd6338585856040518085600160a060020a0316600160a060020a0316815260200184600160a060020a0316600160a060020a0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561167757818101518382015260200161165f565b50505050905090810190601f1680156116a45780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a183600160a060020a031663c0ee0b8a3385856040518463ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018084600160a060020a0316600160a060020a0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561174c578181015183820152602001611734565b50505050905090810190601f1680156117795780820380516001836020036101000a031916815260200191505b50945050505050602060405180830381600087803b15801561179a57600080fd5b505af11580156117ae573d6000803e3d6000fd5b505050506040513d60208110156117c457600080fd5b50511515610fed57600080fd5b6004602052816000526040600020818154811015156117ec57fe5b600091825260209091206002909102018054600190910154909250905082565b600580548290811061181a57fe5b60009182526020909120600290910201805460019091015490915082565b600a805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610b065780601f10610adb57610100808354040283529160200191610b06565b600b805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610b065780601f10610adb57610100808354040283529160200191610b06565b600660209081526000928352604080842090915290825290205481565b60408051808201909152601581527f736574546f6b656e496e666f726d6174696f6e2829000000000000000000000060208201526119493382610b74565b6119556000888861295d565b506119626001868661295d565b5061196f600b848461295d565b507fe7be9e386976ab29f9c6b6277a4bb92fe29d2ce986625e4bd063d90b5b4e986960006001600b60405180806020018060200180602001848103845287818154600181600116156101000203166002900481526020019150805460018160011615610100020316600290048015611a285780601f106119fd57610100808354040283529160200191611a28565b820191906000526020600020905b815481529060010190602001808311611a0b57829003601f168201915b5050848103835286546002600019610100600184161502019091160480825260209091019087908015611a9c5780601f10611a7157610100808354040283529160200191611a9c565b820191906000526020600020905b815481529060010190602001808311611a7f57829003601f168201915b5050848103825285546002600019610100600184161502019091160480825260209091019086908015611b105780601f10611ae557610100808354040283529160200191611b10565b820191906000526020600020905b815481529060010190602001808311611af357829003601f168201915b5050965050505050505060405180910390a150505050505050565b336000908152600660209081526040808320600160a060020a038616845290915281205480831115611b8057336000908152600660209081526040808320600160a060020a0388168452909152812055611bb5565b611b90818463ffffffff61242616565b336000908152600660209081526040808320600160a060020a03891684529091529020555b336000818152600660209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b60008060006040805190810160405280600c81526020017f6275726e546f6b656e7328290000000000000000000000000000000000000000815250611c603382610b74565b309350611c6c84611d21565b9250611c76610ff4565b9150611c84846000876122b5565b600080526004602052611cc67f17ef568e3e12ab5b9c7254a8d58478811de00f9e6eb34345acd53bf8fd09d3ec611cc1858863ffffffff61242616565b612438565b611cdb6005611cc1848863ffffffff61242616565b604080518681529051600160a060020a038616917f696de425f79f4a40bc6d2122ca50507f0efbeabbff86a84871b7196ab8ea8df7919081900360200190a25050505050565b600160a060020a0381166000908152600460205260408120611d4390436123f1565b92915050565b6000600160a060020a038416301415611d6157600080fd5b610f668484611b2b565b611daa336040805190810160405280600581526020017f61646d696e000000000000000000000000000000000000000000000000000000815250610b74565b610bde828261250e565b600854600160a060020a031681565b600354600160a060020a031681565b60018054604080516020600284861615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610b065780601f10610adb57610100808354040283529160200191610b06565b6000611d436005836123f1565b60008060006040805190810160405280600d81526020017f6973737565546f6b656e73282900000000000000000000000000000000000000815250611e7e3382610b74565b339350611e8b6000611d21565b9250611e95610ff4565b6000805260046020529150611ed47f17ef568e3e12ab5b9c7254a8d58478811de00f9e6eb34345acd53bf8fd09d3ec611cc1858863ffffffff61262f16565b611ee0600085876122b5565b611ef56005611cc1848863ffffffff61262f16565b604080518681529051600160a060020a038616917fa59f12e354e8cd10bb74c559844c2dd69a5458e31fe56c7594c62ca57480509a919081900360200190a25050505050565b6000611f483384846122b5565b604080518381529051600160a060020a0385169133917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a350600192915050565b611fd0336040805190810160405280600581526020017f61646d696e000000000000000000000000000000000000000000000000000000815250610b74565b610bde828261263e565b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600091600160a060020a038416916370a082319160248082019260209290919082900301818787803b15801561203e57600080fd5b505af1158015612052573d6000803e3d6000fd5b505050506040513d602081101561206857600080fd5b505192915050565b60408051808201909152600581527f61646d696e000000000000000000000000000000000000000000000000000000602082015281565b336000908152600660209081526040808320600160a060020a03861684529091528120546120db908363ffffffff61262f16565b336000818152600660209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a03918216600090815260066020908152604080832093909416825291909152205490565b60408051808201909152601881527f7365745472616e73616374696f6e56657269666965722829000000000000000060208201526121a93382610b74565b60038054600160a060020a03841673ffffffffffffffffffffffffffffffffffffffff19909116811790915560408051918252517fe87a0b647188a1482a1a619a8d3eaba4275e36eed81b5247a12e24a4df2032fb9181900360200190a15050565b600854600160a060020a0316331461222257600080fd5b600160a060020a038116151561223757600080fd5b600854604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36008805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6122aa8282612407565b1515610bde57600080fd5b6000806122c185611d21565b91506122cc84611d21565b600354909150600160a060020a03161561239257600354604080517fad076994000000000000000000000000000000000000000000000000000000008152600160a060020a0388811660048301528781166024830152604482018790529151919092169163ad0769949160648083019260209291908290030181600087803b15801561235757600080fd5b505af115801561236b573d6000803e3d6000fd5b505050506040513d602081101561238157600080fd5b505192506000831161239257600080fd5b600160a060020a03851660009081526004602052604090206123be90611cc1848663ffffffff61242616565b600160a060020a03841660009081526004602052604090206123ea90611cc1838663ffffffff61262f16565b5050505050565b6000806123fe848461271f565b95945050505050565b600160a060020a03166000908152602091909152604090205460ff1690565b60008282111561243257fe5b50900390565b81541580612476575081544390839061245890600163ffffffff61242616565b8154811061246257fe5b906000526020600020906002020160000154105b156124b8576040805180820190915243815260208082018381528454600181810187556000878152939093209351600290910290930192835551910155610bde565b6040805180820190915243815260208101829052825483906124e190600163ffffffff61242616565b815481106124eb57fe5b600091825260209182902083516002909202019081559101516001909101555050565b612578826007836040518082805190602001908083835b602083106125445780518252601f199092019160209182019101612525565b51815160209384036101000a60001901801990921691161790529201948552506040519384900301909220929150506128ff565b7fd211483f91fc6eff862467f8de606587a30c8fc9981056f051b897a418df803a82826040518083600160a060020a0316600160a060020a0316815260200180602001828103825283818151815260200191508051906020019080838360005b838110156125f05781810151838201526020016125d8565b50505050905090810190601f16801561261d5780820380516001836020036101000a031916815260200191505b50935050505060405180910390a15050565b600082820183811015610fed57fe5b6126a8826007836040518082805190602001908083835b602083106126745780518252601f199092019160209182019101612655565b51815160209384036101000a6000190180199092169116179052920194855250604051938490030190922092915050612921565b7fbfec83d64eaa953f2708271a023ab9ee82057f8f3578d548c1a4ba0b5b70048982826040518083600160a060020a0316600160a060020a031681526020018060200182810382528381815181526020019150805190602001908083836000838110156125f05781810151838201526020016125d8565b600080600080600086805490506000141561274057600094508493506128f5565b8654879061275590600163ffffffff61242616565b8154811061275f57fe5b600091825260209091206002909102015486106127e0578654879061278b90600163ffffffff61242616565b8154811061279557fe5b6000918252602090912060029091020154875488906127bb90600163ffffffff61242616565b815481106127c557fe5b906000526020600020906002020160010154945094506128f5565b8660008154811015156127ef57fe5b90600052602060002090600202016000015486101561281457600094508493506128f5565b86546000935061282b90600163ffffffff61242616565b91505b828211156128b057612868600261285c61284f86600163ffffffff61262f16565b859063ffffffff61262f16565b9063ffffffff61294616565b905085878281548110151561287957fe5b600091825260209091206002909102015411612897578092506128ab565b6128a881600163ffffffff61242616565b91505b61282e565b86838154811015156128be57fe5b90600052602060002090600202016000015487848154811015156128de57fe5b906000526020600020906002020160010154945094505b5050509250929050565b600160a060020a0316600090815260209190915260409020805460ff19169055565b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b600080828481151561295457fe5b04949350505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061299e5782800160ff198235161785556129cb565b828001600101855582156129cb579182015b828111156129cb5782358255916020019190600101906129b0565b506129d79291506129db565b5090565b6129f591905b808211156129d757600081556001016129e1565b905600a165627a7a723058200dea2fbf0f4f54ee4ab66b548c190dbe319f67e65b10b5a4687904032735a1860029", "bytecode_runtime": "0x6080604052600436106102035763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde038114610208578063095ea7b3146102925780630988ca8c146102ca5780631296830d1461033357806315420b71146103a657806316114acd146103e857806316ca3b631461040957806318160ddd1461047257806318913e211461048757806319045a25146104a85780631bcfbe3114610522578063217fe6c61461053a57806323b872dd146105a1578063313ce567146105cb57806333bebb77146105e05780633b8e6f2e1461060a5780633f9ed88c1461062e5780634000aea01461064f57806348ff5665146106b85780634f0092ab146106f557806354fd4d501461070d5780635600f04f146107225780635c658165146107375780635c7181bc1461075e57806366188463146107965780636d1b229d146107ba57806370a08231146107d25780637272ad49146107f357806388cee87e1461085c5780638da5cb5b146108c35780638daed528146108d857806395d89b41146108ed578063981b24d014610902578063a5820daa1461091a578063a9059cbb14610932578063b25fa92c14610956578063c45d19db146109bd578063d391014b146109de578063d73dd623146109f3578063dd62ed3e14610a17578063eeac096914610a3e578063f2fde38b14610a5f575b600080fd5b34801561021457600080fd5b5061021d610a80565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561025757818101518382015260200161023f565b50505050905090810190601f1680156102845780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561029e57600080fd5b506102b6600160a060020a0360043516602435610b0e565b604080519115158252519081900360200190f35b3480156102d657600080fd5b5060408051602060046024803582810135601f8101859004850286018501909652858552610331958335600160a060020a0316953695604494919390910191908190840183828082843750949750610b749650505050505050565b005b34801561033f57600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526102b694369492936024939284019190819084018382808284375094975050508335600160a060020a0316945050506020820135916040810135915060600135610be2565b3480156103b257600080fd5b506103d6600160a060020a0360043581169060243516604435606435608435610e02565b60408051918252519081900360200190f35b3480156103f457600080fd5b50610331600160a060020a0360043516610e74565b34801561041557600080fd5b50604080516020600460443581810135601f81018490048402850184019095528484526102b6948235600160a060020a0316946024803595369594606494920191908190840183828082843750949750610f449650505050505050565b34801561047e57600080fd5b506103d6610ff4565b34801561049357600080fd5b50610331600160a060020a0360043516611006565b3480156104b457600080fd5b5060408051602060046024803582810135601f81018590048502860185019096528585526105069583359536956044949193909101919081908401838280828437509497506112fb9650505050505050565b60408051600160a060020a039092168252519081900360200190f35b34801561052e57600080fd5b506105066004356113d0565b34801561054657600080fd5b5060408051602060046024803582810135601f81018590048502860185019096528585526102b6958335600160a060020a03169536956044949193909101919081908401838280828437509497506113f89650505050505050565b3480156105ad57600080fd5b506102b6600160a060020a0360043581169060243516604435611464565b3480156105d757600080fd5b506103d66114f4565b3480156105ec57600080fd5b50610331600160a060020a03600435811690602435166044356114fa565b34801561061657600080fd5b506103d6600160a060020a0360043516602435611594565b34801561063a57600080fd5b506103d6600160a060020a03600435166115b6565b34801561065b57600080fd5b50604080516020600460443581810135601f81018490048402850184019095528484526102b6948235600160a060020a03169460248035953695946064949201919081908401838280828437509497506115c89650505050505050565b3480156106c457600080fd5b506106dc600160a060020a03600435166024356117d1565b6040805192835260208301919091528051918290030190f35b34801561070157600080fd5b506106dc60043561180c565b34801561071957600080fd5b5061021d611838565b34801561072e57600080fd5b5061021d611893565b34801561074357600080fd5b506103d6600160a060020a03600435811690602435166118ee565b34801561076a57600080fd5b50610331602460048035828101929082013591813580830192908201359160443591820191013561190b565b3480156107a257600080fd5b506102b6600160a060020a0360043516602435611b2b565b3480156107c657600080fd5b50610331600435611c1b565b3480156107de57600080fd5b506103d6600160a060020a0360043516611d21565b3480156107ff57600080fd5b50604080516020600460443581810135601f81018490048402850184019095528484526102b6948235600160a060020a0316946024803595369594606494920191908190840183828082843750949750611d499650505050505050565b34801561086857600080fd5b5060408051602060046024803582810135601f8101859004850286018501909652858552610331958335600160a060020a0316953695604494919390910191908190840183828082843750949750611d6b9650505050505050565b3480156108cf57600080fd5b50610506611db4565b3480156108e457600080fd5b50610506611dc3565b3480156108f957600080fd5b5061021d611dd2565b34801561090e57600080fd5b506103d6600435611e2c565b34801561092657600080fd5b50610331600435611e39565b34801561093e57600080fd5b506102b6600160a060020a0360043516602435611f3b565b34801561096257600080fd5b5060408051602060046024803582810135601f8101859004850286018501909652858552610331958335600160a060020a0316953695604494919390910191908190840183828082843750949750611f919650505050505050565b3480156109c957600080fd5b506103d6600160a060020a0360043516611fda565b3480156109ea57600080fd5b5061021d612070565b3480156109ff57600080fd5b506102b6600160a060020a03600435166024356120a7565b348015610a2357600080fd5b506103d6600160a060020a0360043581169060243516612140565b348015610a4a57600080fd5b50610331600160a060020a036004351661216b565b348015610a6b57600080fd5b50610331600160a060020a036004351661220b565b6000805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610b065780601f10610adb57610100808354040283529160200191610b06565b820191906000526020600020905b815481529060010190602001808311610ae957829003601f168201915b505050505081565b336000818152600660209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b610bde826007836040518082805190602001908083835b60208310610baa5780518252601f199092019160209182019101610b8b565b51815160209384036101000a60001901801990921691161790529201948552506040519384900301909220929150506122a0565b5050565b60008080600160a060020a0387161515610bfb57600080fd5b6009886040518082805190602001908083835b60208310610c2d5780518252601f199092019160209182019101610c0e565b51815160209384036101000a600019018019909216911617905292019485525060405193849003019092205460ff16159150610c6a905057600080fd5b610c773088888888610e02565b9150610c8382896112fb565b9050600160a060020a0381161515610c9a57600080fd5b610ca58188886122b5565b610cb08133876122b5565b60016009896040518082805190602001908083835b60208310610ce45780518252601f199092019160209182019101610cc5565b51815160209384036101000a6000190180199092169116179052920194855250604080519485900382018520805460ff1916961515969096179095558a84528301899052505081513392600160a060020a038b811693908616927fec5a73fd1f178be20c1bca1b406cbf4b5c20d833b66e582fc122fb4baa0fc2a4929181900390910190a486600160a060020a031681600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef886040518082815260200191505060405180910390a36040805186815290513391600160a060020a038416917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a3506001979650505050505050565b604080517f48664c160000000000000000000000000000000000000000000000000000000081526c01000000000000000000000000600160a060020a0397881681026004830152959096169094026018860152602c850192909252604c840152606c8301525190819003608c01902090565b600854600160a060020a03163314610e8b57600080fd5b600854600160a060020a038083169163a9059cbb9116610eaa84611fda565b6040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b158015610f1557600080fd5b505af1158015610f29573d6000803e3d6000fd5b505050506040513d6020811015610f3f57600080fd5b505050565b6000600160a060020a038416301415610f5c57600080fd5b610f6684846120a7565b5083600160a060020a03168260405180828051906020019080838360005b83811015610f9c578181015183820152602001610f84565b50505050905090810190601f168015610fc95780820380516001836020036101000a031916815260200191505b509150506000604051808303816000865af19150501515610fe957600080fd5b5060015b9392505050565b60006110016005436123f1565b905090565b60408051808201909152600a81527f616e6e6f756e636528290000000000000000000000000000000000000000000060208201526110443382610b74565b600c80546001810182557fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c701805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03851690811790915590546000828152600d602090815260408083209390935582517f9ea0c08c0000000000000000000000000000000000000000000000000000000081529251639ea0c08c93600480820194918390030190829087803b1580156110fa57600080fd5b505af115801561110e573d6000803e3d6000fd5b505050506040513d602081101561112457600080fd5b5051604080517f5fcce2790000000000000000000000000000000000000000000000000000000081529051600160a060020a03851691635fcce2799160048083019260209291908290030181600087803b15801561118157600080fd5b505af1158015611195573d6000803e3d6000fd5b505050506040513d60208110156111ab57600080fd5b5051604080517ff31294a40000000000000000000000000000000000000000000000000000000081529051600160a060020a038616917fecae36ae461af9b3746319bfdbfefc7de682e71e22dd901cbec95ad177c33db491839163f31294a49160048083019260209291908290030181600087803b15801561122c57600080fd5b505af1158015611240573d6000803e3d6000fd5b505050506040513d602081101561125657600080fd5b5051604080517f1274c3f30000000000000000000000000000000000000000000000000000000081529051600160a060020a03891691631274c3f39160048083019260209291908290030181600087803b1580156112b357600080fd5b505af11580156112c7573d6000803e3d6000fd5b505050506040513d60208110156112dd57600080fd5b50516040805192835260208301919091528051918290030190a45050565b6000806000808451604114151561131557600093506113c7565b50505060208201516040830151606084015160001a601b60ff8216101561133a57601b015b8060ff16601b1415801561135257508060ff16601c14155b1561136057600093506113c7565b60408051600080825260208083018085528a905260ff8516838501526060830187905260808301869052925160019360a0808501949193601f19840193928390039091019190865af11580156113ba573d6000803e3d6000fd5b5050506020604051035193505b50505092915050565b600c8054829081106113de57fe5b600091825260209091200154600160a060020a0316905081565b6000610fed836007846040518082805190602001908083835b602083106114305780518252601f199092019160209182019101611411565b51815160209384036101000a6000190180199092169116179052920194855250604051938490030190922092915050612407565b600160a060020a038316600090815260066020908152604080832033845290915281205482111561149457600080fd5b61149f8484846122b5565b82600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a35060019392505050565b60025481565b60408051808201909152600f81527f666f7263655472616e736665722829000000000000000000000000000000000060208201526115383382610b74565b6115438484846122b5565b82600160a060020a031684600160a060020a03167f768ff242747198c58dcb1136fb640adf7a199de1789b75bc95b6f787668b51b7846040518082815260200191505060405180910390a350505050565b600160a060020a0382166000908152600460205260408120610fed90836123f1565b600d6020526000908152604090205481565b60006115d48484611f3b565b15156115df57600080fd5b7f72db2339068fd324bbc28f2944e01064da539ac76064b6ce4a97a5f81de43dd6338585856040518085600160a060020a0316600160a060020a0316815260200184600160a060020a0316600160a060020a0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561167757818101518382015260200161165f565b50505050905090810190601f1680156116a45780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a183600160a060020a031663c0ee0b8a3385856040518463ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018084600160a060020a0316600160a060020a0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561174c578181015183820152602001611734565b50505050905090810190601f1680156117795780820380516001836020036101000a031916815260200191505b50945050505050602060405180830381600087803b15801561179a57600080fd5b505af11580156117ae573d6000803e3d6000fd5b505050506040513d60208110156117c457600080fd5b50511515610fed57600080fd5b6004602052816000526040600020818154811015156117ec57fe5b600091825260209091206002909102018054600190910154909250905082565b600580548290811061181a57fe5b60009182526020909120600290910201805460019091015490915082565b600a805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610b065780601f10610adb57610100808354040283529160200191610b06565b600b805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610b065780601f10610adb57610100808354040283529160200191610b06565b600660209081526000928352604080842090915290825290205481565b60408051808201909152601581527f736574546f6b656e496e666f726d6174696f6e2829000000000000000000000060208201526119493382610b74565b6119556000888861295d565b506119626001868661295d565b5061196f600b848461295d565b507fe7be9e386976ab29f9c6b6277a4bb92fe29d2ce986625e4bd063d90b5b4e986960006001600b60405180806020018060200180602001848103845287818154600181600116156101000203166002900481526020019150805460018160011615610100020316600290048015611a285780601f106119fd57610100808354040283529160200191611a28565b820191906000526020600020905b815481529060010190602001808311611a0b57829003601f168201915b5050848103835286546002600019610100600184161502019091160480825260209091019087908015611a9c5780601f10611a7157610100808354040283529160200191611a9c565b820191906000526020600020905b815481529060010190602001808311611a7f57829003601f168201915b5050848103825285546002600019610100600184161502019091160480825260209091019086908015611b105780601f10611ae557610100808354040283529160200191611b10565b820191906000526020600020905b815481529060010190602001808311611af357829003601f168201915b5050965050505050505060405180910390a150505050505050565b336000908152600660209081526040808320600160a060020a038616845290915281205480831115611b8057336000908152600660209081526040808320600160a060020a0388168452909152812055611bb5565b611b90818463ffffffff61242616565b336000908152600660209081526040808320600160a060020a03891684529091529020555b336000818152600660209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b60008060006040805190810160405280600c81526020017f6275726e546f6b656e7328290000000000000000000000000000000000000000815250611c603382610b74565b309350611c6c84611d21565b9250611c76610ff4565b9150611c84846000876122b5565b600080526004602052611cc67f17ef568e3e12ab5b9c7254a8d58478811de00f9e6eb34345acd53bf8fd09d3ec611cc1858863ffffffff61242616565b612438565b611cdb6005611cc1848863ffffffff61242616565b604080518681529051600160a060020a038616917f696de425f79f4a40bc6d2122ca50507f0efbeabbff86a84871b7196ab8ea8df7919081900360200190a25050505050565b600160a060020a0381166000908152600460205260408120611d4390436123f1565b92915050565b6000600160a060020a038416301415611d6157600080fd5b610f668484611b2b565b611daa336040805190810160405280600581526020017f61646d696e000000000000000000000000000000000000000000000000000000815250610b74565b610bde828261250e565b600854600160a060020a031681565b600354600160a060020a031681565b60018054604080516020600284861615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610b065780601f10610adb57610100808354040283529160200191610b06565b6000611d436005836123f1565b60008060006040805190810160405280600d81526020017f6973737565546f6b656e73282900000000000000000000000000000000000000815250611e7e3382610b74565b339350611e8b6000611d21565b9250611e95610ff4565b6000805260046020529150611ed47f17ef568e3e12ab5b9c7254a8d58478811de00f9e6eb34345acd53bf8fd09d3ec611cc1858863ffffffff61262f16565b611ee0600085876122b5565b611ef56005611cc1848863ffffffff61262f16565b604080518681529051600160a060020a038616917fa59f12e354e8cd10bb74c559844c2dd69a5458e31fe56c7594c62ca57480509a919081900360200190a25050505050565b6000611f483384846122b5565b604080518381529051600160a060020a0385169133917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a350600192915050565b611fd0336040805190810160405280600581526020017f61646d696e000000000000000000000000000000000000000000000000000000815250610b74565b610bde828261263e565b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600091600160a060020a038416916370a082319160248082019260209290919082900301818787803b15801561203e57600080fd5b505af1158015612052573d6000803e3d6000fd5b505050506040513d602081101561206857600080fd5b505192915050565b60408051808201909152600581527f61646d696e000000000000000000000000000000000000000000000000000000602082015281565b336000908152600660209081526040808320600160a060020a03861684529091528120546120db908363ffffffff61262f16565b336000818152600660209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a03918216600090815260066020908152604080832093909416825291909152205490565b60408051808201909152601881527f7365745472616e73616374696f6e56657269666965722829000000000000000060208201526121a93382610b74565b60038054600160a060020a03841673ffffffffffffffffffffffffffffffffffffffff19909116811790915560408051918252517fe87a0b647188a1482a1a619a8d3eaba4275e36eed81b5247a12e24a4df2032fb9181900360200190a15050565b600854600160a060020a0316331461222257600080fd5b600160a060020a038116151561223757600080fd5b600854604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36008805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6122aa8282612407565b1515610bde57600080fd5b6000806122c185611d21565b91506122cc84611d21565b600354909150600160a060020a03161561239257600354604080517fad076994000000000000000000000000000000000000000000000000000000008152600160a060020a0388811660048301528781166024830152604482018790529151919092169163ad0769949160648083019260209291908290030181600087803b15801561235757600080fd5b505af115801561236b573d6000803e3d6000fd5b505050506040513d602081101561238157600080fd5b505192506000831161239257600080fd5b600160a060020a03851660009081526004602052604090206123be90611cc1848663ffffffff61242616565b600160a060020a03841660009081526004602052604090206123ea90611cc1838663ffffffff61262f16565b5050505050565b6000806123fe848461271f565b95945050505050565b600160a060020a03166000908152602091909152604090205460ff1690565b60008282111561243257fe5b50900390565b81541580612476575081544390839061245890600163ffffffff61242616565b8154811061246257fe5b906000526020600020906002020160000154105b156124b8576040805180820190915243815260208082018381528454600181810187556000878152939093209351600290910290930192835551910155610bde565b6040805180820190915243815260208101829052825483906124e190600163ffffffff61242616565b815481106124eb57fe5b600091825260209182902083516002909202019081559101516001909101555050565b612578826007836040518082805190602001908083835b602083106125445780518252601f199092019160209182019101612525565b51815160209384036101000a60001901801990921691161790529201948552506040519384900301909220929150506128ff565b7fd211483f91fc6eff862467f8de606587a30c8fc9981056f051b897a418df803a82826040518083600160a060020a0316600160a060020a0316815260200180602001828103825283818151815260200191508051906020019080838360005b838110156125f05781810151838201526020016125d8565b50505050905090810190601f16801561261d5780820380516001836020036101000a031916815260200191505b50935050505060405180910390a15050565b600082820183811015610fed57fe5b6126a8826007836040518082805190602001908083835b602083106126745780518252601f199092019160209182019101612655565b51815160209384036101000a6000190180199092169116179052920194855250604051938490030190922092915050612921565b7fbfec83d64eaa953f2708271a023ab9ee82057f8f3578d548c1a4ba0b5b70048982826040518083600160a060020a0316600160a060020a031681526020018060200182810382528381815181526020019150805190602001908083836000838110156125f05781810151838201526020016125d8565b600080600080600086805490506000141561274057600094508493506128f5565b8654879061275590600163ffffffff61242616565b8154811061275f57fe5b600091825260209091206002909102015486106127e0578654879061278b90600163ffffffff61242616565b8154811061279557fe5b6000918252602090912060029091020154875488906127bb90600163ffffffff61242616565b815481106127c557fe5b906000526020600020906002020160010154945094506128f5565b8660008154811015156127ef57fe5b90600052602060002090600202016000015486101561281457600094508493506128f5565b86546000935061282b90600163ffffffff61242616565b91505b828211156128b057612868600261285c61284f86600163ffffffff61262f16565b859063ffffffff61262f16565b9063ffffffff61294616565b905085878281548110151561287957fe5b600091825260209091206002909102015411612897578092506128ab565b6128a881600163ffffffff61242616565b91505b61282e565b86838154811015156128be57fe5b90600052602060002090600202016000015487848154811015156128de57fe5b906000526020600020906002020160010154945094505b5050509250929050565b600160a060020a0316600090815260209190915260409020805460ff19169055565b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b600080828481151561295457fe5b04949350505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061299e5782800160ff198235161785556129cb565b828001600101855582156129cb579182015b828111156129cb5782358255916020019190600101906129b0565b506129d79291506129db565b5090565b6129f591905b808211156129d757600081556001016129e1565b905600a165627a7a723058200dea2fbf0f4f54ee4ab66b548c190dbe319f67e65b10b5a4687904032735a1860029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": true, "inputs": [], "name": "name", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "approve", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "addr", "type": "address"}, {"name": "roleName", "type": "string"}], "name": "checkRole", "outputs": [], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_signature", "type": "bytes"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}, {"name": "_fee", "type": "uint256"}, {"name": "_nonce", "type": "uint256"}], "name": "transferPreSigned", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_token", "type": "address"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}, {"name": "_fee", "type": "uint256"}, {"name": "_nonce", "type": "uint256"}], "name": "transferPreSignedHashing", "outputs": [{"name": "", "type": "bytes32"}], "payable": false, "stateMutability": "pure", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "recoverTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "addedValue", "type": "uint256"}, {"name": "data", "type": "bytes"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "tokenCount", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "announcement", "type": "address"}], "name": "announce", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "hash", "type": "bytes32"}, {"name": "sig", "type": "bytes"}], "name": "recover", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "pure", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "uint256"}], "name": "announcements", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "addr", "type": "address"}, {"name": "roleName", "type": "string"}], "name": "hasRole", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "from", "type": "address"}, {"name": "to", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "decimals", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "from", "type": "address"}, {"name": "to", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "forceTransfer", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "owner", "type": "address"}, {"name": "blockNumber", "type": "uint256"}], "name": "balanceAt", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "announcementsByAddress", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "receiver", "type": "address"}, {"name": "amount", "type": "uint256"}, {"name": "data", "type": "bytes"}], "name": "transferAndCall", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}, {"name": "", "type": "uint256"}], "name": "tokenBalances", "outputs": [{"name": "blockNumber", "type": "uint256"}, {"name": "value", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "uint256"}], "name": "tokensTotal", "outputs": [{"name": "blockNumber", "type": "uint256"}, {"name": "value", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "version", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "url", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}, {"name": "", "type": "address"}], "name": "allowed", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_name", "type": "string"}, {"name": "_symbol", "type": "string"}, {"name": "_url", "type": "string"}], "name": "setTokenInformation", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "subtractedValue", "type": "uint256"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "uint256"}], "name": "burnTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "owner", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "subtractedValue", "type": "uint256"}, {"name": "data", "type": "bytes"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "roleName", "type": "string"}], "name": "adminRemoveRole", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "transferVerifier", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "symbol", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "blockNumber", "type": "uint256"}], "name": "totalSupplyAt", "outputs": [{"name": "tokenCount", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "uint256"}], "name": "issueTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "to", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "roleName", "type": "string"}], "name": "adminAddRole", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "tokensToBeReturned", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "ROLE_ADMIN", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "addedValue", "type": "uint256"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "owner", "type": "address"}, {"name": "spender", "type": "address"}], "name": "allowance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newVerifier", "type": "address"}], "name": "setTransactionVerifier", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [{"name": "_name", "type": "string"}, {"name": "_symbol", "type": "string"}, {"name": "_url", "type": "string"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Issued", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "burner", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Burned", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Forced", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "announcement", "type": "address"}, {"indexed": true, "name": "announcementType", "type": "uint256"}, {"indexed": true, "name": "announcementName", "type": "bytes32"}, {"indexed": false, "name": "announcementURI", "type": "bytes32"}, {"indexed": false, "name": "announcementHash", "type": "uint256"}], "name": "Announced", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newName", "type": "string"}, {"indexed": false, "name": "newSymbol", "type": "string"}, {"indexed": false, "name": "newUrl", "type": "string"}], "name": "UpdatedTokenInformation", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newVerifier", "type": "address"}], "name": "UpdatedTransactionVerifier", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": true, "name": "delegate", "type": "address"}, {"indexed": false, "name": "amount", "type": "uint256"}, {"indexed": false, "name": "fee", "type": "uint256"}], "name": "TransferPreSigned", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "from", "type": "address"}, {"indexed": false, "name": "hash", "type": "bytes32"}], "name": "Debug", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "addr", "type": "address"}, {"indexed": false, "name": "roleName", "type": "string"}], "name": "RoleAdded", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "addr", "type": "address"}, {"indexed": false, "name": "roleName", "type": "string"}], "name": "RoleRemoved", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "from", "type": "address"}, {"indexed": false, "name": "receiver", "type": "address"}, {"indexed": false, "name": "amount", "type": "uint256"}, {"indexed": false, "name": "data", "type": "bytes"}], "name": "ERC677Transfer", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}, {"indexed": true, "name": "spender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "devdoc": {"author": "TokenMarket / Ville Sundell ", "methods": {"adminAddRole(address,string)": {"details": "add a role to an address", "params": {"addr": "address", "roleName": "the name of the role"}}, "adminRemoveRole(address,string)": {"details": "remove a role from an address", "params": {"addr": "address", "roleName": "the name of the role"}}, "allowance(address,address)": {"details": "Function to check the amount of tokens that an owner allowed to a spender.", "params": {"owner": "address The address which owns the funds.", "spender": "address The address which will spend the funds."}, "return": "A uint256 specifying the amount of tokens still available for the spender."}, "announce(address)": {"details": "Function to announce Announcements. * Announcements can be for instance for dividend sharing, voting, or just for general announcements. * Instead of storing the announcement details, we just broadcast them as an event, and store only the address.", "params": {"announcement": "Address of the Announcement"}}, "approve(address,uint256)": {"details": "Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729", "params": {"spender": "The address which will spend the funds.", "value": "The amount of tokens to be spent."}, "return": "true if the call function was executed successfully"}, "balanceAt(address,uint256)": {"details": "Gets the balance of the specified address.", "params": {"blockNumber": "The block number we want to query for the balance.", "owner": "The address to query the the balance of."}, "return": "An uint256 representing the amount owned by the passed address."}, "balanceOf(address)": {"details": "Gets the balance of the specified address.", "params": {"owner": "The address to query the the balance of."}, "return": "An uint256 representing the amount owned by the passed address."}, "burnTokens(uint256)": {"details": "Burn tokens from contract's own balance by a board decission * Burn tokens from contract's own balance to prevent accidental burnings. This is intended to be called by the BAC (The Board), hence the whitelisting.", "params": {"value": "Token amount to burn from this contract's balance"}}, "checkRole(address,string)": {"details": "reverts if addr does not have role", "params": {"addr": "address", "roleName": "the name of the role // reverts"}}, "decreaseApproval(address,uint256)": {"details": "Decrease the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[spender] == 0. To decrement allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"spender": "The address which will spend the funds.", "subtractedValue": "The amount of tokens to decrease the allowance by."}}, "decreaseApproval(address,uint256,bytes)": {"details": "Addition to StandardToken methods. Decrease the amount of tokens that an owner allowed to a spender and execute a call with the sent data. * This is originally from OpenZeppelin. * approve should be called when allowed[spender] == 0. To decrement allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"data": "ABI-encoded contract call to call `spender` address.", "spender": "The address which will spend the funds.", "subtractedValue": "The amount of tokens to decrease the allowance by."}}, "forceTransfer(address,address,uint256)": {"details": "Function to forcefully transfer tokens from A to B by board decission * This must be implemented carefully, since this is a very critical part to ensure investor safety. * This is intended to be called by the BAC (The Board), hence the whitelisting.", "params": {"from": "Address of the account to confisticate the tokens from", "to": "Address to deposit the confisticated token to", "value": "amount of tokens to be confisticated"}}, "hasRole(address,string)": {"details": "determine if addr has role", "params": {"addr": "address", "roleName": "the name of the role"}, "return": "bool"}, "increaseApproval(address,uint256)": {"details": "Increase the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[spender] == 0. To increment allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"addedValue": "The amount of tokens to increase the allowance by.", "spender": "The address which will spend the funds."}}, "increaseApproval(address,uint256,bytes)": {"details": "Addition to StandardToken methods. Increase the amount of tokens that an owner allowed to a spender and execute a call with the sent data. * This is originally from OpenZeppelin. * approve should be called when allowed[spender] == 0. To increment allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"addedValue": "The amount of tokens to increase the allowance by.", "data": "ABI-encoded contract call to call `spender` address.", "spender": "The address which will spend the funds."}}, "issueTokens(uint256)": {"details": "Issue new tokens to the board by a board decission * Issue new tokens. This is intended to be called by the BAC (The Board), hence the whitelisting.", "params": {"value": "Token amount to issue"}}, "recover(bytes32,bytes)": {"params": {"hash": "bytes32 message, the hash is the signed message. What is recovered is the signer address.", "sig": "bytes signature, the signature is generated using web3.eth.sign()"}}, "recoverTokens(address)": {"details": "This will be invoked by the owner, when owner wants to rescue tokens", "params": {"token": "Token which will we rescue to the owner from the contract"}}, "setTokenInformation(string,string,string)": {"details": "Whitelisted users (The Board, BAC) can update token information here. * It is often useful to conceal the actual token association, until the token operations, like central issuance or reissuance have been completed. * This function allows the token owner to rename the token after the operations have been completed and then point the audience to use the token contract.", "params": {"_name": "New name of the token", "_symbol": "New symbol of the token", "_url": "New URL of the token"}}, "setTransactionVerifier(address)": {"details": "Set transaction verifier * This sets a SecurityTransferAgent to be used as a transaction verifier for each transfer. This is implemented for possible regulatory requirements.", "params": {"newVerifier": "Address of the SecurityTransferAgent used as verifier"}}, "tokensToBeReturned(address)": {"details": "Interface function, can be overwritten by the superclass", "params": {"token": "Token which balance we will check and return"}, "return": "The amount of tokens (in smallest denominator) the contract owns"}, "totalSupply()": {"details": "total number of tokens in existence", "return": "A uint256 specifying the total number of tokens in existence"}, "totalSupplyAt(uint256)": {"details": "total number of tokens in existence at the given block", "params": {"blockNumber": "The block number we want to query for the total supply"}, "return": "A uint256 specifying the total number of tokens at a given block"}, "transfer(address,uint256)": {"details": "transfer token for a specified address", "params": {"to": "The address to transfer to.", "value": "The amount to be transferred."}, "return": "true if the call function was executed successfully"}, "transferFrom(address,address,uint256)": {"details": "Transfer tokens from one address to another", "params": {"from": "address The address which you want to send tokens from", "to": "address The address which you want to transfer to", "value": "uint256 the amount of tokens to be transferred"}, "return": "true if the call function was executed successfully"}, "transferOwnership(address)": {"details": "Allows the current owner to transfer control of the contract to a newOwner.", "params": {"newOwner": "The address to transfer ownership to."}}, "transferPreSigned(bytes,address,uint256,uint256,uint256)": {"params": {"_fee": "uint256 The amount of tokens paid to msg.sender, by the person who used to own the tokens.", "_nonce": "uint256 Presigned transaction number", "_signature": "bytes The signature, issued by the owner.", "_to": "address The address which you want to transfer to.", "_value": "uint256 The amount of tokens to be transferred."}}, "transferPreSignedHashing(address,address,uint256,uint256,uint256)": {"params": {"_fee": "uint256 The amount of tokens paid to msg.sender, by the owner.", "_nonce": "uint256 Presigned transaction number.", "_to": "address The address which you want to transfer to.", "_token": "address The address of the token.", "_value": "uint256 The amount of tokens to be transferred."}}}}, "userdoc": {"methods": {"recover(bytes32,bytes)": {"notice": "Recover signer address from a message by using his signature. Signature is delivered as a byte array, hence need for this implementation."}, "transferPreSigned(bytes,address,uint256,uint256,uint256)": {"notice": "Submit a presigned transfer"}, "transferPreSignedHashing(address,address,uint256,uint256,uint256)": {"notice": "Hash (keccak256) of the payload used by transferPreSigned"}}}}, "settings": {"compilationTarget": {"contracts/security-token/SecurityToken.sol": "SecurityToken"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/CrowdsaleToken.sol": {"keccak256": "0xa812687ac327cd19fac64667980e70d4fb72ef7f61dce477818d085cf0a915df", "urls": ["bzzr://826d9dda00ce341794e5bb05c78b1abb2728e3c631f7a542345dcfa9f3bd9c50"]}, "contracts/MintableToken.sol": {"keccak256": "0x650e1d6b2bedcd36508918357c7cf4f36fdd093cd0c4d6342f4dcd3bdcdd7578", "urls": ["bzzr://7ba2ac0480d428066a18727e2adb76ba56856ecd37b4420e801131ec8f8f4be3"]}, "contracts/Recoverable.sol": {"keccak256": "0x311a332cdd87df6e00057f5455f4e68b043b5dbe211f6d68bc64e20817515635", "urls": ["bzzr://4fd99bcfb93baed6e7c8d22ee9ecc5c8346a1aa98288e77b01333b2c5d3f582d"]}, "contracts/ReleasableToken.sol": {"keccak256": "0x2c50180d0c1eab1aa63a04da3ae87ee2c482665d2a1a42c5f05b11234a7edaf4", "urls": ["bzzr://10752c317eba5c42e2848722689cfee4fffb7bcb42f3346e1a20715d843798e8"]}, "contracts/SafeMathLib.sol": {"keccak256": "0x501bfe31e274b9a5591f7c540bdced4d4312e27d4f19599147c9bbca3d9c6b18", "urls": ["bzzr://a80935ebddb06c247d71372d4e5833ee029f08633bd0fe4a274a57009567e5b9"]}, "contracts/StandardTokenExt.sol": {"keccak256": "0x9ea2d4cec4dccd5639c05e6c23dd027d80b5e5a20abd99b280ab7b2631b5a5fc", "urls": ["bzzr://a52d8fc5a21bd83997aff19128e00dceb251df712207b61223894c8b7f42d5ff"]}, "contracts/UpgradeAgent.sol": {"keccak256": "0x88e793f72feca4a18d2cd06e6037c1413d7b963eabcf5626d60bfb9d04d6e8e6", "urls": ["bzzr://87e39a65cf25d539ab49ad7e759b3298b8a19272964e69e3f2432f0323f30025"]}, "contracts/UpgradeableToken.sol": {"keccak256": "0xa74fc300c514564ece81c86905502c2de674b69c0633b133af19c1ba027da2c9", "urls": ["bzzr://55bc0b908c94781462b8959f051c6dbb53c35641b0f8cb38d74632ad6bf95e52"]}, "contracts/security-token/CheckpointToken.sol": {"keccak256": "0x6df7f71b8c4d9edd19c9c8fbc5dadb6d03c62ad2840f3b4a1d11f558e64ab8c1", "urls": ["bzzr://cd1c4b5351981664ef90752d33c5230d61f1a15664b7f465f8e260778abb944a"]}, "contracts/security-token/ERC677.sol": {"keccak256": "0xf557f3e12aa7f5a23d40957d9ac216db0902997f70f856697529d55e9823e50a", "urls": ["bzzr://c924011b4a57d2eb355c276255fc7af284c2f5b20ece36957d23a2e058975349"]}, "contracts/security-token/ERC677Token.sol": {"keccak256": "0xd67b6b0d3c7e9def09554b11c35f3b609a87ae2ea0f5853f0ca745f7f6366866", "urls": ["bzzr://bcd0f5e4bad7064ea5d8fe4e4e8a276af4ebddc4c7c25703c2dd32ca9ff715f7"]}, "contracts/security-token/ERC865.sol": {"keccak256": "0x326ad6a9d49740439036de2eb866edeabde2e12710ad03d4a3709a41e827ea96", "urls": ["bzzr://1a82e221a8da7446b644300d00183eefe1015f4a9ecd3d2ccbfa99c6bc68f9f3"]}, "contracts/security-token/SecurityToken.sol": {"keccak256": "0xfa5c7125b39800545085845f3ebba567e40948415122d14f6744d283c2c54c50", "urls": ["bzzr://9c151aa367acfa165367cf549f0165e5e62f280d95fb56d42b9cd5e6f3517d18"]}, "contracts/security-token/SecurityTransferAgent.sol": {"keccak256": "0x23b8a61926435e2c583480c0de72a99b4f7ec8a4213ffc46711f83ecdeaf9186", "urls": ["bzzr://36be13b6cf1389357679705bd18969409ecde684ace2d9c5b606d8986e0231cd"]}, "zeppelin/contracts/math/SafeMath.sol": {"keccak256": "0x341ba8cb467a3623e819ba1a683ac1d264005186f308505214e5f6bc89446a08", "urls": ["bzzr://59b5652ee4e4a1b5a8f1a8906e14c84af43d636cf5ca0725cc1813aabe4c8c17"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}, "zeppelin/contracts/ownership/Whitelist.sol": {"keccak256": "0x0b451cac6e2d6be139bd652fcaf0d31f4abd34fadd1d078db7089eb1f5519267", "urls": ["bzzr://42126e694194a0e1b616a90422905d50a1a19242110e33abecfe2bcb820b4beb"]}, "zeppelin/contracts/ownership/rbac/RBAC.sol": {"keccak256": "0xb650bc4db8fdafa9105e3bf30d349f3a0b3100f1fe154f1bdf7731b0f3399559", "urls": ["bzzr://76284fb23a5f9ecd9737c37582046224a32079263a05be7d5ccef91e678959c9"]}, "zeppelin/contracts/ownership/rbac/Roles.sol": {"keccak256": "0xbab0d0ae15daca818349ead8040dd1794327e2b9a616749fc69a29a5ad85be58", "urls": ["bzzr://5443bb48b0678d3c6cbb48869517d004564ad35e20d96ac9727738b5f8bc45e4"]}, "zeppelin/contracts/token/ERC20/BasicToken.sol": {"keccak256": "0x948404468d61ff35ea4194650670408dabd65da7f905a1c16888ab84520bf39e", "urls": ["bzzr://ea75e20f95d7e4e10394fe6bfaa8eee56b4757c2a6f1e8df4180d33afa621935"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}, "zeppelin/contracts/token/ERC20/StandardToken.sol": {"keccak256": "0xd2b344a5259e19ec143074cfa65637a10c40b68395c59808c4af13bccbb2de55", "urls": ["bzzr://d61a01175a7ca1ba9f4403de603c20b897e33ec425aef2d9f8a7f9ddfdfaf5b2"]}}, "version": 1}, "name": "SecurityToken", "ordered_full_dependencies": [], "source_path": "contracts/security-token/SecurityToken.sol", "source": "/**\n * This smart contract code is Copyright 2018 TokenMarket Ltd. For more information see https://tokenmarket.net\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n * NatSpec is used intentionally to cover also other than public functions\n * Solidity 0.4.18 is intentionally used: it's stable, and our framework is\n * based on that.\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n assert(c / a == b);\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n\n\n\n/**\n * @title Basic token\n * @dev Basic version of StandardToken, with no allowances.\n */\ncontract BasicToken is ERC20Basic {\n using SafeMath for uint256;\n\n mapping(address => uint256) balances;\n\n uint256 totalSupply_;\n\n /**\n * @dev total number of tokens in existence\n */\n function totalSupply() public view returns (uint256) {\n return totalSupply_;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param _to The address to transfer to.\n * @param _value The amount to be transferred.\n */\n function transfer(address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[msg.sender]);\n\n // SafeMath.sub will throw if there is not enough balance.\n balances[msg.sender] = balances[msg.sender].sub(_value);\n balances[_to] = balances[_to].add(_value);\n Transfer(msg.sender, _to, _value);\n return true;\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param _owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address _owner) public view returns (uint256 balance) {\n return balances[_owner];\n }\n\n}\n\n\n\n\n/**\n * @title Standard ERC20 token\n *\n * @dev Implementation of the basic standard token.\n * @dev https://github.com/ethereum/EIPs/issues/20\n * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol\n */\ncontract StandardToken is ERC20, BasicToken {\n\n mapping (address => mapping (address => uint256)) internal allowed;\n\n\n /**\n * @dev Transfer tokens from one address to another\n * @param _from address The address which you want to send tokens from\n * @param _to address The address which you want to transfer to\n * @param _value uint256 the amount of tokens to be transferred\n */\n function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[_from]);\n require(_value <= allowed[_from][msg.sender]);\n\n balances[_from] = balances[_from].sub(_value);\n balances[_to] = balances[_to].add(_value);\n allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);\n Transfer(_from, _to, _value);\n return true;\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n *\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param _spender The address which will spend the funds.\n * @param _value The amount of tokens to be spent.\n */\n function approve(address _spender, uint256 _value) public returns (bool) {\n allowed[msg.sender][_spender] = _value;\n Approval(msg.sender, _spender, _value);\n return true;\n }\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param _owner address The address which owns the funds.\n * @param _spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address _owner, address _spender) public view returns (uint256) {\n return allowed[_owner][_spender];\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(address _spender, uint _addedValue) public returns (bool) {\n allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {\n uint oldValue = allowed[msg.sender][_spender];\n if (_subtractedValue > oldValue) {\n allowed[msg.sender][_spender] = 0;\n } else {\n allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);\n }\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n\ncontract Recoverable is Ownable {\n\n /// @dev Empty constructor (for now)\n function Recoverable() {\n }\n\n /// @dev This will be invoked by the owner, when owner wants to rescue tokens\n /// @param token Token which will we rescue to the owner from the contract\n function recoverTokens(ERC20Basic token) onlyOwner public {\n token.transfer(owner, tokensToBeReturned(token));\n }\n\n /// @dev Interface function, can be overwritten by the superclass\n /// @param token Token which balance we will check and return\n /// @return The amount of tokens (in smallest denominator) the contract owns\n function tokensToBeReturned(ERC20Basic token) public returns (uint) {\n return token.balanceOf(this);\n }\n}\n\n\n\n/**\n * Standard EIP-20 token with an interface marker.\n *\n * @notice Interface marker is used by crowdsale contracts to validate that addresses point a good token contract.\n *\n */\ncontract StandardTokenExt is StandardToken, Recoverable {\n\n /* Interface declaration */\n function isToken() public constant returns (bool weAre) {\n return true;\n }\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Upgrade agent interface inspired by Lunyr.\n *\n * Upgrade agent transfers tokens to a new contract.\n * Upgrade agent itself can be the token contract, or just a middle man contract doing the heavy lifting.\n */\ncontract UpgradeAgent {\n\n uint public originalSupply;\n\n /** Interface marker */\n function isUpgradeAgent() public constant returns (bool) {\n return true;\n }\n\n function upgradeFrom(address _from, uint256 _value) public;\n\n}\n\n\n/**\n * A token upgrade mechanism where users can opt-in amount of tokens to the next smart contract revision.\n *\n * First envisioned by Golem and Lunyr projects.\n */\ncontract UpgradeableToken is StandardTokenExt {\n\n /** Contract / person who can set the upgrade path. This can be the same as team multisig wallet, as what it is with its default value. */\n address public upgradeMaster;\n\n /** The next contract where the tokens will be migrated. */\n UpgradeAgent public upgradeAgent;\n\n /** How many tokens we have upgraded by now. */\n uint256 public totalUpgraded;\n\n /**\n * Upgrade states.\n *\n * - NotAllowed: The child contract has not reached a condition where the upgrade can bgun\n * - WaitingForAgent: Token allows upgrade, but we don't have a new agent yet\n * - ReadyToUpgrade: The agent is set, but not a single token has been upgraded yet\n * - Upgrading: Upgrade agent is set and the balance holders can upgrade their tokens\n *\n */\n enum UpgradeState {Unknown, NotAllowed, WaitingForAgent, ReadyToUpgrade, Upgrading}\n\n /**\n * Somebody has upgraded some of his tokens.\n */\n event Upgrade(address indexed _from, address indexed _to, uint256 _value);\n\n /**\n * New upgrade agent available.\n */\n event UpgradeAgentSet(address agent);\n\n /**\n * Do not allow construction without upgrade master set.\n */\n function UpgradeableToken(address _upgradeMaster) {\n upgradeMaster = _upgradeMaster;\n }\n\n /**\n * Allow the token holder to upgrade some of their tokens to a new contract.\n */\n function upgrade(uint256 value) public {\n\n UpgradeState state = getUpgradeState();\n if(!(state == UpgradeState.ReadyToUpgrade || state == UpgradeState.Upgrading)) {\n // Called in a bad state\n throw;\n }\n\n // Validate input value.\n if (value == 0) throw;\n\n balances[msg.sender] = balances[msg.sender].sub(value);\n\n // Take tokens out from circulation\n totalSupply_ = totalSupply_.sub(value);\n totalUpgraded = totalUpgraded.add(value);\n\n // Upgrade agent reissues the tokens\n upgradeAgent.upgradeFrom(msg.sender, value);\n Upgrade(msg.sender, upgradeAgent, value);\n }\n\n /**\n * Set an upgrade agent that handles\n */\n function setUpgradeAgent(address agent) external {\n\n if(!canUpgrade()) {\n // The token is not yet in a state that we could think upgrading\n throw;\n }\n\n if (agent == 0x0) throw;\n // Only a master can designate the next agent\n if (msg.sender != upgradeMaster) throw;\n // Upgrade has already begun for an agent\n if (getUpgradeState() == UpgradeState.Upgrading) throw;\n\n upgradeAgent = UpgradeAgent(agent);\n\n // Bad interface\n if(!upgradeAgent.isUpgradeAgent()) throw;\n // Make sure that token supplies match in source and target\n if (upgradeAgent.originalSupply() != totalSupply_) throw;\n\n UpgradeAgentSet(upgradeAgent);\n }\n\n /**\n * Get the state of the token upgrade.\n */\n function getUpgradeState() public constant returns(UpgradeState) {\n if(!canUpgrade()) return UpgradeState.NotAllowed;\n else if(address(upgradeAgent) == 0x00) return UpgradeState.WaitingForAgent;\n else if(totalUpgraded == 0) return UpgradeState.ReadyToUpgrade;\n else return UpgradeState.Upgrading;\n }\n\n /**\n * Change the upgrade master.\n *\n * This allows us to set a new owner for the upgrade mechanism.\n */\n function setUpgradeMaster(address master) public {\n if (master == 0x0) throw;\n if (msg.sender != upgradeMaster) throw;\n upgradeMaster = master;\n }\n\n /**\n * Child contract can enable to provide the condition when the upgrade can begun.\n */\n function canUpgrade() public constant returns(bool) {\n return true;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n/**\n * Define interface for releasing the token transfer after a successful crowdsale.\n */\ncontract ReleasableToken is StandardTokenExt {\n\n /* The finalizer contract that allows unlift the transfer limits on this token */\n address public releaseAgent;\n\n /** A crowdsale contract can release us to the wild if ICO success. If false we are are in transfer lock up period.*/\n bool public released = false;\n\n /** Map of agents that are allowed to transfer tokens regardless of the lock down period. These are crowdsale contracts and possible the team multisig itself. */\n mapping (address => bool) public transferAgents;\n\n /**\n * Limit token transfer until the crowdsale is over.\n *\n */\n modifier canTransfer(address _sender) {\n\n if(!released) {\n if(!transferAgents[_sender]) {\n throw;\n }\n }\n\n _;\n }\n\n /**\n * Set the contract that can call release and make the token transferable.\n *\n * Design choice. Allow reset the release agent to fix fat finger mistakes.\n */\n function setReleaseAgent(address addr) onlyOwner inReleaseState(false) public {\n\n // We don't do interface check here as we might want to a normal wallet address to act as a release agent\n releaseAgent = addr;\n }\n\n /**\n * Owner can allow a particular address (a crowdsale contract) to transfer tokens despite the lock up period.\n */\n function setTransferAgent(address addr, bool state) onlyOwner inReleaseState(false) public {\n transferAgents[addr] = state;\n }\n\n /**\n * One way function to release the tokens to the wild.\n *\n * Can be called only from the release agent that is the final ICO contract. It is only called if the crowdsale has been success (first milestone reached).\n */\n function releaseTokenTransfer() public onlyReleaseAgent {\n released = true;\n }\n\n /** The function can be called only before or after the tokens have been releasesd */\n modifier inReleaseState(bool releaseState) {\n if(releaseState != released) {\n throw;\n }\n _;\n }\n\n /** The function can be called only by a whitelisted release agent. */\n modifier onlyReleaseAgent() {\n if(msg.sender != releaseAgent) {\n throw;\n }\n _;\n }\n\n function transfer(address _to, uint _value) canTransfer(msg.sender) returns (bool success) {\n // Call StandardToken.transfer()\n return super.transfer(_to, _value);\n }\n\n function transferFrom(address _from, address _to, uint _value) canTransfer(_from) returns (bool success) {\n // Call StandardToken.transferForm()\n return super.transferFrom(_from, _to, _value);\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Safe unsigned safe math.\n *\n * https://blog.aragon.one/library-driven-development-in-solidity-2bebcaf88736#.750gwtwli\n *\n * Originally from https://raw.githubusercontent.com/AragonOne/zeppelin-solidity/master/contracts/SafeMathLib.sol\n *\n * Maintained here until merged to mainline zeppelin-solidity.\n *\n */\nlibrary SafeMathLib {\n\n function times(uint a, uint b) returns (uint) {\n uint c = a * b;\n assert(a == 0 || c / a == b);\n return c;\n }\n\n function minus(uint a, uint b) returns (uint) {\n assert(b <= a);\n return a - b;\n }\n\n function plus(uint a, uint b) returns (uint) {\n uint c = a + b;\n assert(c>=a);\n return c;\n }\n\n}\n\n\n\n/**\n * A token that can increase its supply by another contract.\n *\n * This allows uncapped crowdsale by dynamically increasing the supply when money pours in.\n * Only mint agents, contracts whitelisted by owner, can mint new tokens.\n *\n */\ncontract MintableToken is StandardTokenExt {\n\n using SafeMathLib for uint;\n\n bool public mintingFinished = false;\n\n /** List of agents that are allowed to create new tokens */\n mapping (address => bool) public mintAgents;\n\n event MintingAgentChanged(address addr, bool state);\n event Minted(address receiver, uint amount);\n\n /**\n * Create new tokens and allocate them to an address..\n *\n * Only callably by a crowdsale contract (mint agent).\n */\n function mint(address receiver, uint amount) onlyMintAgent canMint public {\n totalSupply_ = totalSupply_.plus(amount);\n balances[receiver] = balances[receiver].plus(amount);\n\n // This will make the mint transaction apper in EtherScan.io\n // We can remove this after there is a standardized minting event\n Transfer(0, receiver, amount);\n }\n\n /**\n * Owner can allow a crowdsale contract to mint new tokens.\n */\n function setMintAgent(address addr, bool state) onlyOwner canMint public {\n mintAgents[addr] = state;\n MintingAgentChanged(addr, state);\n }\n\n modifier onlyMintAgent() {\n // Only crowdsale contracts are allowed to mint new tokens\n if(!mintAgents[msg.sender]) {\n throw;\n }\n _;\n }\n\n /** Make sure we are not done yet. */\n modifier canMint() {\n if(mintingFinished) throw;\n _;\n }\n}\n\n\n\n/**\n * A crowdsaled token.\n *\n * An ERC-20 token designed specifically for crowdsales with investor protection and further development path.\n *\n * - The token transfer() is disabled until the crowdsale is over\n * - The token contract gives an opt-in upgrade path to a new contract\n * - The same token can be part of several crowdsales through approve() mechanism\n * - The token can be capped (supply set in the constructor) or uncapped (crowdsale contract can mint new tokens)\n *\n */\ncontract CrowdsaleToken is ReleasableToken, MintableToken, UpgradeableToken {\n\n /** Name and symbol were updated. */\n event UpdatedTokenInformation(string newName, string newSymbol);\n\n string public name;\n\n string public symbol;\n\n uint public decimals;\n\n /**\n * Construct the token.\n *\n * This token must be created through a team multisig wallet, so that it is owned by that wallet.\n *\n * @param _name Token name\n * @param _symbol Token symbol - should be all caps\n * @param _initialSupply How many tokens we start with\n * @param _decimals Number of decimal places\n * @param _mintable Are new tokens created over the crowdsale or do we distribute only the initial supply? Note that when the token becomes transferable the minting always ends.\n */\n function CrowdsaleToken(string _name, string _symbol, uint _initialSupply, uint _decimals, bool _mintable)\n UpgradeableToken(msg.sender) {\n\n // Create any address, can be transferred\n // to team multisig via changeOwner(),\n // also remember to call setUpgradeMaster()\n owner = msg.sender;\n\n name = _name;\n symbol = _symbol;\n\n totalSupply_ = _initialSupply;\n\n decimals = _decimals;\n\n // Create initially all balance on the team multisig\n balances[owner] = totalSupply_;\n\n if(totalSupply_ > 0) {\n Minted(owner, totalSupply_);\n }\n\n // No more new supply allowed after the token creation\n if(!_mintable) {\n mintingFinished = true;\n if(totalSupply_ == 0) {\n throw; // Cannot create a token without supply and no minting\n }\n }\n }\n\n /**\n * When token is released to be transferable, enforce no new tokens can be created.\n */\n function releaseTokenTransfer() public onlyReleaseAgent {\n mintingFinished = true;\n super.releaseTokenTransfer();\n }\n\n /**\n * Allow upgrade agent functionality kick in only if the crowdsale was success.\n */\n function canUpgrade() public constant returns(bool) {\n return released && super.canUpgrade();\n }\n\n /**\n * Owner can update token information here.\n *\n * It is often useful to conceal the actual token association, until\n * the token operations, like central issuance or reissuance have been completed.\n *\n * This function allows the token owner to rename the token after the operations\n * have been completed and then point the audience to use the token contract.\n */\n function setTokenInformation(string _name, string _symbol) onlyOwner {\n name = _name;\n symbol = _symbol;\n\n UpdatedTokenInformation(name, symbol);\n }\n\n}\n\n\n/**\n * This smart contract code is Copyright 2018 TokenMarket Ltd. For more information see https://tokenmarket.net\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n * NatSpec is used intentionally to cover also other than public functions\n * Solidity 0.4.18 is intentionally used: it's stable, and our framework is\n * based on that.\n */\n\n\n\n\ninterface SecurityTransferAgent {\n function verify(address from, address to, uint256 value) public view returns (uint256 newValue);\n}\n\n\n\n\n\n\n\n/**\n * @title Whitelist\n * @dev The Whitelist contract has a whitelist of addresses, and provides basic authorization control functions.\n * @dev This simplifies the implementation of \"user permissions\".\n */\ncontract Whitelist is Ownable {\n mapping(address => bool) public whitelist;\n \n event WhitelistedAddressAdded(address addr);\n event WhitelistedAddressRemoved(address addr);\n\n /**\n * @dev Throws if called by any account that's not whitelisted.\n */\n modifier onlyWhitelisted() {\n require(whitelist[msg.sender]);\n _;\n }\n\n /**\n * @dev add an address to the whitelist\n * @param addr address\n * @return true if the address was added to the whitelist, false if the address was already in the whitelist \n */\n function addAddressToWhitelist(address addr) onlyOwner public returns(bool success) {\n if (!whitelist[addr]) {\n whitelist[addr] = true;\n WhitelistedAddressAdded(addr);\n success = true; \n }\n }\n\n /**\n * @dev add addresses to the whitelist\n * @param addrs addresses\n * @return true if at least one address was added to the whitelist, \n * false if all addresses were already in the whitelist \n */\n function addAddressesToWhitelist(address[] addrs) onlyOwner public returns(bool success) {\n for (uint256 i = 0; i < addrs.length; i++) {\n if (addAddressToWhitelist(addrs[i])) {\n success = true;\n }\n }\n }\n\n /**\n * @dev remove an address from the whitelist\n * @param addr address\n * @return true if the address was removed from the whitelist, \n * false if the address wasn't in the whitelist in the first place \n */\n function removeAddressFromWhitelist(address addr) onlyOwner public returns(bool success) {\n if (whitelist[addr]) {\n whitelist[addr] = false;\n WhitelistedAddressRemoved(addr);\n success = true;\n }\n }\n\n /**\n * @dev remove addresses from the whitelist\n * @param addrs addresses\n * @return true if at least one address was removed from the whitelist, \n * false if all addresses weren't in the whitelist in the first place\n */\n function removeAddressesFromWhitelist(address[] addrs) onlyOwner public returns(bool success) {\n for (uint256 i = 0; i < addrs.length; i++) {\n if (removeAddressFromWhitelist(addrs[i])) {\n success = true;\n }\n }\n }\n\n}\n\n\n\n\n\ninterface ERC677Receiver {\n function tokenFallback(address from, uint256 amount, bytes data) returns (bool success);\n}\n\ninterface ERC677 {\n\n // TODO: Have a different event name to make sure that tools with bad APIs do not mix this with ERC-20 Transfer() event that lacks data parameter\n event ERC677Transfer(address from, address receiver, uint256 amount, bytes data);\n\n function transferAndCall(ERC677Receiver receiver, uint amount, bytes data) returns (bool success);\n}\n\n\n\ncontract ERC677Token is ERC20, ERC677 {\n function transferAndCall(ERC677Receiver receiver, uint amount, bytes data) returns (bool success) {\n require(transfer(address(receiver), amount));\n\n ERC677Transfer(msg.sender, address(receiver), amount, data);\n\n require(receiver.tokenFallback(msg.sender, amount, data));\n }\n}\n\n\n/**\n * @author TokenMarket / Ville Sundell \n */\ncontract CheckpointToken is ERC677Token {\n using SafeMath for uint256; // We use only uint256 for safety reasons (no boxing)\n\n /// @dev Name of the token, usually the company and/or series (like \"TokenMeerkat Ltd. Series A\"):\n string public name;\n /// @dev Ticker symbol, usually bases on the \"name\" above (like \"MEER\"):\n string public symbol;\n /// @dev Decimals are usually set to 18 for EIP-20 tokens:\n uint256 public decimals;\n /// @dev If transferVerifier is set, that contract will be queried upon every token transaction:\n SecurityTransferAgent public transferVerifier;\n\n /// @dev Checkpoint is the fundamental unit for our internal accounting\n /// (who owns what, and at what moment in time)\n struct Checkpoint {\n uint256 blockNumber;\n uint256 value;\n }\n /// @dev This mapping contains checkpoints for every address:\n mapping (address => Checkpoint[]) public tokenBalances;\n /// @dev This is a one dimensional Checkpoint mapping of the overall token supply:\n Checkpoint[] public tokensTotal;\n\n /// @dev This mapping keeps account for approve() -> fransferFrom() pattern:\n mapping (address => mapping (address => uint256)) public allowed;\n\n /**\n * @dev Constructor for CheckpointToken, initializing the token\n *\n * Here we define initial values for name, symbol and decimals.\n *\n * @param _name Initial name of the token\n * @param _symbol Initial symbol of the token\n * @param _decimals Number of decimals for the token, industry standard is 18\n */\n function CheckpointToken(string _name, string _symbol, uint256 _decimals) public {\n name = _name;\n symbol = _symbol;\n decimals = _decimals;\n }\n\n /** PUBLIC FUNCTIONS\n ****************************************/\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param owner address The address which owns the funds.\n * @param spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address owner, address spender) public view returns (uint256) {\n return allowed[owner][spender];\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n *\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param spender The address which will spend the funds.\n * @param value The amount of tokens to be spent.\n * @return true if the call function was executed successfully\n */\n function approve(address spender, uint256 value) public returns (bool) {\n allowed[msg.sender][spender] = value;\n Approval(msg.sender, spender, value);\n return true;\n }\n\n /**\n * @dev Transfer tokens from one address to another\n * @param from address The address which you want to send tokens from\n * @param to address The address which you want to transfer to\n * @param value uint256 the amount of tokens to be transferred\n * @return true if the call function was executed successfully\n */\n function transferFrom(address from, address to, uint256 value) public returns (bool) {\n require(value <= allowed[from][msg.sender]);\n\n transferInternal(from, to, value);\n Transfer(from, to, value);\n return true;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param to The address to transfer to.\n * @param value The amount to be transferred.\n * @return true if the call function was executed successfully\n */\n function transfer(address to, uint256 value) public returns (bool) {\n transferInternal(msg.sender, to, value);\n Transfer(msg.sender, to, value);\n return true;\n }\n\n /**\n * @dev total number of tokens in existence\n * @return A uint256 specifying the total number of tokens in existence\n */\n function totalSupply() public view returns (uint256 tokenCount) {\n tokenCount = balanceAtBlock(tokensTotal, block.number);\n }\n\n /**\n * @dev total number of tokens in existence at the given block\n * @param blockNumber The block number we want to query for the total supply\n * @return A uint256 specifying the total number of tokens at a given block\n */\n function totalSupplyAt(uint256 blockNumber) public view returns (uint256 tokenCount) {\n tokenCount = balanceAtBlock(tokensTotal, blockNumber);\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address owner) public view returns (uint256 balance) {\n balance = balanceAtBlock(tokenBalances[owner], block.number);\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param owner The address to query the the balance of.\n * @param blockNumber The block number we want to query for the balance.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceAt(address owner, uint256 blockNumber) public view returns (uint256 balance) {\n balance = balanceAtBlock(tokenBalances[owner], blockNumber);\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param spender The address which will spend the funds.\n * @param addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(address spender, uint addedValue) public returns (bool) {\n allowed[msg.sender][spender] = allowed[msg.sender][spender].add(addedValue);\n Approval(msg.sender, spender, allowed[msg.sender][spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param spender The address which will spend the funds.\n * @param subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(address spender, uint subtractedValue) public returns (bool) {\n uint oldValue = allowed[msg.sender][spender];\n if (subtractedValue > oldValue) {\n allowed[msg.sender][spender] = 0;\n } else {\n allowed[msg.sender][spender] = oldValue.sub(subtractedValue);\n }\n Approval(msg.sender, spender, allowed[msg.sender][spender]);\n return true;\n }\n\n /**\n * @dev Addition to StandardToken methods. Increase the amount of tokens that\n * an owner allowed to a spender and execute a call with the sent data.\n *\n * This is originally from OpenZeppelin.\n *\n * approve should be called when allowed[spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param spender The address which will spend the funds.\n * @param addedValue The amount of tokens to increase the allowance by.\n * @param data ABI-encoded contract call to call `spender` address.\n */\n function increaseApproval(address spender, uint addedValue, bytes data) public returns (bool) {\n require(spender != address(this));\n\n increaseApproval(spender, addedValue);\n\n require(spender.call(data));\n\n return true;\n }\n\n /**\n * @dev Addition to StandardToken methods. Decrease the amount of tokens that\n * an owner allowed to a spender and execute a call with the sent data.\n *\n * This is originally from OpenZeppelin.\n *\n * approve should be called when allowed[spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param spender The address which will spend the funds.\n * @param subtractedValue The amount of tokens to decrease the allowance by.\n * @param data ABI-encoded contract call to call `spender` address.\n */\n function decreaseApproval(address spender, uint subtractedValue, bytes data) public returns (bool) {\n require(spender != address(this));\n\n decreaseApproval(spender, subtractedValue);\n\n require(spender.call(data));\n\n return true;\n }\n\n /** INTERNALS\n ****************************************/\n\n function balanceAtBlock(Checkpoint[] storage checkpoints, uint256 blockNumber) internal returns (uint256 balance) {\n uint256 currentBlockNumber;\n (currentBlockNumber, balance) = getCheckpoint(checkpoints, blockNumber);\n }\n\n function transferInternal(address from, address to, uint256 value) internal {\n uint256 fromBalance = balanceOf(from);\n uint256 toBalance = balanceOf(to);\n\n if (address(transferVerifier) != address(0)) {\n value = transferVerifier.verify(from, to, value);\n require(value > 0);\n }\n\n setCheckpoint(tokenBalances[from], fromBalance.sub(value));\n setCheckpoint(tokenBalances[to], toBalance.add(value));\n }\n\n\n /** CORE\n ** The Magic happens below:\n ***************************************/\n\n function setCheckpoint(Checkpoint[] storage checkpoints, uint256 newValue) internal {\n if ((checkpoints.length == 0) || (checkpoints[checkpoints.length.sub(1)].blockNumber < block.number)) {\n checkpoints.push(Checkpoint(block.number, newValue));\n } else {\n checkpoints[checkpoints.length.sub(1)] = Checkpoint(block.number, newValue);\n }\n }\n\n function getCheckpoint(Checkpoint[] storage checkpoints, uint256 blockNumber) internal returns (uint256 blockNumber_, uint256 value) {\n if (checkpoints.length == 0) {\n return (0, 0);\n }\n\n // Shortcut for the actual value\n if (blockNumber >= checkpoints[checkpoints.length.sub(1)].blockNumber) {\n return (checkpoints[checkpoints.length.sub(1)].blockNumber, checkpoints[checkpoints.length.sub(1)].value);\n }\n\n if (blockNumber < checkpoints[0].blockNumber) {\n return (0, 0);\n }\n\n // Binary search of the value in the array\n uint256 min = 0;\n uint256 max = checkpoints.length.sub(1);\n while (max > min) {\n uint256 mid = (max.add(min.add(1))).div(2);\n if (checkpoints[mid].blockNumber <= blockNumber) {\n min = mid;\n } else {\n max = mid.sub(1);\n }\n }\n\n return (checkpoints[min].blockNumber, checkpoints[min].value);\n }\n}\n\n\n\n\n/* Largely copied from https://github.com/OpenZeppelin/openzeppelin-solidity/pull/741/files */\n\ncontract ERC865 is CheckpointToken {\n /** @dev This is used to prevent nonce reuse: */\n mapping(bytes => bool) signatures;\n\n event TransferPreSigned(address indexed from, address indexed to, address indexed delegate, uint256 amount, uint256 fee);\n event Debug(address from, bytes32 hash);\n\n /**\n * @notice Submit a presigned transfer\n * @param _signature bytes The signature, issued by the owner.\n * @param _to address The address which you want to transfer to.\n * @param _value uint256 The amount of tokens to be transferred.\n * @param _fee uint256 The amount of tokens paid to msg.sender, by the person who used to own the tokens.\n * @param _nonce uint256 Presigned transaction number\n */\n function transferPreSigned(\n bytes _signature,\n address _to,\n uint256 _value,\n uint256 _fee,\n uint256 _nonce\n )\n public\n returns (bool)\n {\n require(_to != address(0));\n require(signatures[_signature] == false);\n bytes32 hashedTx = transferPreSignedHashing(address(this), _to, _value, _fee, _nonce);\n address from = recover(hashedTx, _signature);\n require(from != address(0));\n\n transferInternal(from, _to, _value);\n transferInternal(from, msg.sender, _fee);\n\n signatures[_signature] = true;\n TransferPreSigned(from, _to, msg.sender, _value, _fee);\n Transfer(from, _to, _value);\n Transfer(from, msg.sender, _fee);\n return true;\n }\n\n /**\n * @notice Hash (keccak256) of the payload used by transferPreSigned\n * @param _token address The address of the token.\n * @param _to address The address which you want to transfer to.\n * @param _value uint256 The amount of tokens to be transferred.\n * @param _fee uint256 The amount of tokens paid to msg.sender, by the owner.\n * @param _nonce uint256 Presigned transaction number.\n */\n function transferPreSignedHashing(\n address _token,\n address _to,\n uint256 _value,\n uint256 _fee,\n uint256 _nonce\n )\n public\n pure\n returns (bytes32)\n {\n /* \"48664c16\": transferPreSignedHashing(address,address,address,uint256,uint256,uint256) */\n return keccak256(bytes4(0x48664c16), _token, _to, _value, _fee, _nonce);\n }\n\n /**\n * @notice Recover signer address from a message by using his signature.\n * Signature is delivered as a byte array, hence need for this\n * implementation.\n * @param hash bytes32 message, the hash is the signed message. What is recovered is the signer address.\n * @param sig bytes signature, the signature is generated using web3.eth.sign()\n */\n function recover(bytes32 hash, bytes sig) public pure returns (address) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n\n /* Check the signature length */\n if (sig.length != 65) {\n return (address(0));\n }\n\n /* Divide the signature in r, s and v variables */\n assembly {\n r := mload(add(sig, 32))\n s := mload(add(sig, 64))\n v := byte(0, mload(add(sig, 96)))\n }\n\n /* Version of signature should be 27 or 28, but 0 and 1 are also possible versions */\n if (v < 27) {\n v += 27;\n }\n\n /* If the version is correct return the signer address */\n if (v != 27 && v != 28) {\n return (address(0));\n } else {\n return ecrecover(hash, v, r, s);\n }\n }\n\n}\n\n\n\n\n\n\n/**\n * @title Roles\n * @author Francisco Giordano (@frangio)\n * @dev Library for managing addresses assigned to a Role.\n * See RBAC.sol for example usage.\n */\nlibrary Roles {\n struct Role {\n mapping (address => bool) bearer;\n }\n\n /**\n * @dev give an address access to this role\n */\n function add(Role storage role, address addr)\n internal\n {\n role.bearer[addr] = true;\n }\n\n /**\n * @dev remove an address' access to this role\n */\n function remove(Role storage role, address addr)\n internal\n {\n role.bearer[addr] = false;\n }\n\n /**\n * @dev check if an address has this role\n * // reverts\n */\n function check(Role storage role, address addr)\n view\n internal\n {\n require(has(role, addr));\n }\n\n /**\n * @dev check if an address has this role\n * @return bool\n */\n function has(Role storage role, address addr)\n view\n internal\n returns (bool)\n {\n return role.bearer[addr];\n }\n}\n\n\n\n/**\n * @title RBAC (Role-Based Access Control)\n * @author Matt Condon (@Shrugs)\n * @dev Stores and provides setters and getters for roles and addresses.\n * Supports unlimited numbers of roles and addresses.\n * See //contracts/mocks/RBACMock.sol for an example of usage.\n * This RBAC method uses strings to key roles. It may be beneficial\n * for you to write your own implementation of this interface using Enums or similar.\n * It's also recommended that you define constants in the contract, like ROLE_ADMIN below,\n * to avoid typos.\n */\ncontract RBAC {\n using Roles for Roles.Role;\n\n mapping (string => Roles.Role) private roles;\n\n event RoleAdded(address addr, string roleName);\n event RoleRemoved(address addr, string roleName);\n\n /**\n * A constant role name for indicating admins.\n */\n string public constant ROLE_ADMIN = \"admin\";\n\n /**\n * @dev constructor. Sets msg.sender as admin by default\n */\n function RBAC()\n public\n {\n addRole(msg.sender, ROLE_ADMIN);\n }\n\n /**\n * @dev reverts if addr does not have role\n * @param addr address\n * @param roleName the name of the role\n * // reverts\n */\n function checkRole(address addr, string roleName)\n view\n public\n {\n roles[roleName].check(addr);\n }\n\n /**\n * @dev determine if addr has role\n * @param addr address\n * @param roleName the name of the role\n * @return bool\n */\n function hasRole(address addr, string roleName)\n view\n public\n returns (bool)\n {\n return roles[roleName].has(addr);\n }\n\n /**\n * @dev add a role to an address\n * @param addr address\n * @param roleName the name of the role\n */\n function adminAddRole(address addr, string roleName)\n onlyAdmin\n public\n {\n addRole(addr, roleName);\n }\n\n /**\n * @dev remove a role from an address\n * @param addr address\n * @param roleName the name of the role\n */\n function adminRemoveRole(address addr, string roleName)\n onlyAdmin\n public\n {\n removeRole(addr, roleName);\n }\n\n /**\n * @dev add a role to an address\n * @param addr address\n * @param roleName the name of the role\n */\n function addRole(address addr, string roleName)\n internal\n {\n roles[roleName].add(addr);\n RoleAdded(addr, roleName);\n }\n\n /**\n * @dev remove a role from an address\n * @param addr address\n * @param roleName the name of the role\n */\n function removeRole(address addr, string roleName)\n internal\n {\n roles[roleName].remove(addr);\n RoleRemoved(addr, roleName);\n }\n\n /**\n * @dev modifier to scope access to a single role (uses msg.sender as addr)\n * @param roleName the name of the role\n * // reverts\n */\n modifier onlyRole(string roleName)\n {\n checkRole(msg.sender, roleName);\n _;\n }\n\n /**\n * @dev modifier to scope access to admins\n * // reverts\n */\n modifier onlyAdmin()\n {\n checkRole(msg.sender, ROLE_ADMIN);\n _;\n }\n\n /**\n * @dev modifier to scope access to a set of roles (uses msg.sender as addr)\n * @param roleNames the names of the roles to scope access to\n * // reverts\n *\n * @TODO - when solidity supports dynamic arrays as arguments to modifiers, provide this\n * see: https://github.com/ethereum/solidity/issues/2467\n */\n // modifier onlyRoles(string[] roleNames) {\n // bool hasAnyRole = false;\n // for (uint8 i = 0; i < roleNames.length; i++) {\n // if (hasRole(msg.sender, roleNames[i])) {\n // hasAnyRole = true;\n // break;\n // }\n // }\n\n // require(hasAnyRole);\n\n // _;\n // }\n}\n\n\n/**\n * @dev Interface for general announcements about the security.\n *\n * Announcements can be for instance for dividend sharing, voting, or\n * just for general announcements.\n */\ninterface Announcement {\n function announcementName() public view returns (bytes32);\n function announcementURI() public view returns (bytes32);\n function announcementType() public view returns (uint256);\n function announcementHash() public view returns (uint256);\n}\n\n/**\n * @author TokenMarket / Ville Sundell \n */\ncontract SecurityToken is CheckpointToken, RBAC, Recoverable, ERC865 {\n using SafeMath for uint256; // We use only uint256 for safety reasons (no boxing)\n\n string constant ROLE_ANNOUNCE = \"announce()\";\n string constant ROLE_FORCE = \"forceTransfer()\";\n string constant ROLE_ISSUE = \"issueTokens()\";\n string constant ROLE_BURN = \"burnTokens()\";\n string constant ROLE_INFO = \"setTokenInformation()\";\n string constant ROLE_SETVERIFIER = \"setTransactionVerifier()\";\n\n /// @dev Version string telling the token is TM-01, and its version:\n string public version = 'TM-01 0.1';\n\n /// @dev URL where you can get more information about the security\n /// (for example company website or investor interface):\n string public url;\n\n /** SecurityToken specific events **/\n /// @dev This is emitted when new tokens are created:\n event Issued(address indexed to, uint256 value);\n /// @dev This is emitted when tokens are burned from token's own stash:\n event Burned(address indexed burner, uint256 value);\n /// @dev This is emitted upon forceful transfer of tokens by the Board:\n event Forced(address indexed from, address indexed to, uint256 value);\n /// @dev This is emitted when new announcements (like dividends, voting, etc.) are issued by the Board:\n event Announced(address indexed announcement, uint256 indexed announcementType, bytes32 indexed announcementName, bytes32 announcementURI, uint256 announcementHash);\n /// @dev This is emitted when token information is changed:\n event UpdatedTokenInformation(string newName, string newSymbol, string newUrl);\n /// @dev This is emitted when transaction verifier (the contract which would check KYC, etc.):\n event UpdatedTransactionVerifier(address newVerifier);\n\n /// @dev Address list of Announcements (see \"interface Announcement\").\n /// Announcements are things like votings, dividends, or any kind of\n /// smart contract:\n address[] public announcements;\n /// @dev For performance reasons, we also maintain address based mapping of\n /// Announcements:\n mapping(address => uint256) public announcementsByAddress;\n\n /**\n * @dev Contructor to create SecurityToken, and subsequent CheckpointToken.\n *\n * CheckpointToken will be created with hardcoded 18 decimals.\n *\n * @param _name Initial name of the token\n * @param _symbol Initial symbol of the token\n */\n function SecurityToken(string _name, string _symbol, string _url) CheckpointToken(_name, _symbol, 18) public {\n url = _url;\n\n addRole(msg.sender, ROLE_ANNOUNCE);\n addRole(msg.sender, ROLE_FORCE);\n addRole(msg.sender, ROLE_ISSUE);\n addRole(msg.sender, ROLE_BURN);\n addRole(msg.sender, ROLE_INFO);\n addRole(msg.sender, ROLE_SETVERIFIER);\n }\n\n /**\n * @dev Function to announce Announcements.\n *\n * Announcements can be for instance for dividend sharing, voting, or\n * just for general announcements.\n *\n * Instead of storing the announcement details, we just broadcast them as an\n * event, and store only the address.\n *\n * @param announcement Address of the Announcement\n */\n function announce(Announcement announcement) external onlyRole(ROLE_ANNOUNCE) {\n announcements.push(announcement);\n announcementsByAddress[address(announcement)] = announcements.length;\n Announced(address(announcement), announcement.announcementType(), announcement.announcementName(), announcement.announcementURI(), announcement.announcementHash());\n }\n\n /**\n * @dev Function to forcefully transfer tokens from A to B by board decission\n *\n * This must be implemented carefully, since this is a very critical part\n * to ensure investor safety.\n *\n * This is intended to be called by the BAC (The Board), hence the whitelisting.\n *\n * @param from Address of the account to confisticate the tokens from\n * @param to Address to deposit the confisticated token to\n * @param value amount of tokens to be confisticated\n */\n function forceTransfer(address from, address to, uint256 value) external onlyRole(ROLE_FORCE) {\n transferInternal(from, to, value);\n\n Forced(from, to, value);\n }\n\n /**\n * @dev Issue new tokens to the board by a board decission\n *\n * Issue new tokens. This is intended to be called by the BAC (The Board),\n * hence the whitelisting.\n *\n * @param value Token amount to issue\n */\n function issueTokens(uint256 value) external onlyRole(ROLE_ISSUE) {\n address issuer = msg.sender;\n uint256 blackHoleBalance = balanceOf(address(0));\n uint256 totalSupplyNow = totalSupply();\n\n setCheckpoint(tokenBalances[address(0)], blackHoleBalance.add(value));\n transferInternal(address(0), issuer, value);\n setCheckpoint(tokensTotal, totalSupplyNow.add(value));\n\n Issued(issuer, value);\n }\n\n /**\n * @dev Burn tokens from contract's own balance by a board decission\n *\n * Burn tokens from contract's own balance to prevent accidental burnings.\n * This is intended to be called by the BAC (The Board), hence the whitelisting.\n *\n * @param value Token amount to burn from this contract's balance\n */\n function burnTokens(uint256 value) external onlyRole(ROLE_BURN) {\n address burner = address(this);\n uint256 burnerBalance = balanceOf(burner);\n uint256 totalSupplyNow = totalSupply();\n\n transferInternal(burner, address(0), value);\n setCheckpoint(tokenBalances[address(0)], burnerBalance.sub(value));\n setCheckpoint(tokensTotal, totalSupplyNow.sub(value));\n\n Burned(burner, value);\n }\n\n /**\n * @dev Whitelisted users (The Board, BAC) can update token information here.\n *\n * It is often useful to conceal the actual token association, until\n * the token operations, like central issuance or reissuance have been completed.\n *\n * This function allows the token owner to rename the token after the operations\n * have been completed and then point the audience to use the token contract.\n *\n * @param _name New name of the token\n * @param _symbol New symbol of the token\n * @param _url New URL of the token\n */\n function setTokenInformation(string _name, string _symbol, string _url) external onlyRole(ROLE_INFO) {\n name = _name;\n symbol = _symbol;\n url = _url;\n\n UpdatedTokenInformation(name, symbol, url);\n }\n\n /**\n * @dev Set transaction verifier\n *\n * This sets a SecurityTransferAgent to be used as a transaction verifier for\n * each transfer. This is implemented for possible regulatory requirements.\n *\n * @param newVerifier Address of the SecurityTransferAgent used as verifier\n */\n function setTransactionVerifier(SecurityTransferAgent newVerifier) external onlyRole(ROLE_SETVERIFIER) {\n transferVerifier = newVerifier;\n\n UpdatedTransactionVerifier(newVerifier);\n }\n}\n"}, "SecurityTransferAgent": {"abi": [{"constant": true, "inputs": [{"name": "from", "type": "address"}, {"name": "to", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "verify", "outputs": [{"name": "newValue", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}], "bytecode": "0x", "bytecode_runtime": "0x", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": null, "name": "SecurityTransferAgent", "ordered_full_dependencies": [], "source_path": "contracts/security-token/SecurityTransferAgent.sol"}, "SimpleReleaseAgent": {"abi": [{"constant": false, "inputs": [], "name": "release", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [{"name": "_token", "type": "address"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}], "bytecode": "0x608060405234801561001057600080fd5b50604051602080610154833981016040525160008054600160a060020a03909216600160a060020a0319909216919091179055610102806100526000396000f300608060405260043610603e5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166386d1a69f81146043575b600080fd5b348015604e57600080fd5b5060556057565b005b60008054604080517f5f412d4f000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff90921692635f412d4f9260048084019382900301818387803b15801560bd57600080fd5b505af115801560d0573d6000803e3d6000fd5b505050505600a165627a7a72305820c58bc47425c0f1f89ec1a7f178a674f4cba748a93a6922472396251a5679e1a60029", "bytecode_runtime": "0x608060405260043610603e5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166386d1a69f81146043575b600080fd5b348015604e57600080fd5b5060556057565b005b60008054604080517f5f412d4f000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff90921692635f412d4f9260048084019382900301818387803b15801560bd57600080fd5b505af115801560d0573d6000803e3d6000fd5b505050505600a165627a7a72305820c58bc47425c0f1f89ec1a7f178a674f4cba748a93a6922472396251a5679e1a60029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": false, "inputs": [], "name": "release", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [{"name": "_token", "type": "address"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}], "devdoc": {"methods": {}}, "userdoc": {"methods": {}}}, "settings": {"compilationTarget": {"contracts/test/SimpleReleaseAgent.sol": "SimpleReleaseAgent"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/Recoverable.sol": {"keccak256": "0x311a332cdd87df6e00057f5455f4e68b043b5dbe211f6d68bc64e20817515635", "urls": ["bzzr://4fd99bcfb93baed6e7c8d22ee9ecc5c8346a1aa98288e77b01333b2c5d3f582d"]}, "contracts/ReleasableToken.sol": {"keccak256": "0x2c50180d0c1eab1aa63a04da3ae87ee2c482665d2a1a42c5f05b11234a7edaf4", "urls": ["bzzr://10752c317eba5c42e2848722689cfee4fffb7bcb42f3346e1a20715d843798e8"]}, "contracts/StandardTokenExt.sol": {"keccak256": "0x9ea2d4cec4dccd5639c05e6c23dd027d80b5e5a20abd99b280ab7b2631b5a5fc", "urls": ["bzzr://a52d8fc5a21bd83997aff19128e00dceb251df712207b61223894c8b7f42d5ff"]}, "contracts/test/SimpleReleaseAgent.sol": {"keccak256": "0x750f2db486d31b8aa3aeebd4ea427984c4f0268f56a7aa7524c2f43aac1382e3", "urls": ["bzzr://c529081777e40389dfc7142f3fe41bb4ecf213078d202a0df20295ae89c3291a"]}, "zeppelin/contracts/math/SafeMath.sol": {"keccak256": "0x341ba8cb467a3623e819ba1a683ac1d264005186f308505214e5f6bc89446a08", "urls": ["bzzr://59b5652ee4e4a1b5a8f1a8906e14c84af43d636cf5ca0725cc1813aabe4c8c17"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}, "zeppelin/contracts/token/ERC20/BasicToken.sol": {"keccak256": "0x948404468d61ff35ea4194650670408dabd65da7f905a1c16888ab84520bf39e", "urls": ["bzzr://ea75e20f95d7e4e10394fe6bfaa8eee56b4757c2a6f1e8df4180d33afa621935"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}, "zeppelin/contracts/token/ERC20/StandardToken.sol": {"keccak256": "0xd2b344a5259e19ec143074cfa65637a10c40b68395c59808c4af13bccbb2de55", "urls": ["bzzr://d61a01175a7ca1ba9f4403de603c20b897e33ec425aef2d9f8a7f9ddfdfaf5b2"]}}, "version": 1}, "name": "SimpleReleaseAgent", "ordered_full_dependencies": [], "source_path": "contracts/test/SimpleReleaseAgent.sol", "source": "\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n assert(c / a == b);\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n\n\n\n/**\n * @title Basic token\n * @dev Basic version of StandardToken, with no allowances.\n */\ncontract BasicToken is ERC20Basic {\n using SafeMath for uint256;\n\n mapping(address => uint256) balances;\n\n uint256 totalSupply_;\n\n /**\n * @dev total number of tokens in existence\n */\n function totalSupply() public view returns (uint256) {\n return totalSupply_;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param _to The address to transfer to.\n * @param _value The amount to be transferred.\n */\n function transfer(address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[msg.sender]);\n\n // SafeMath.sub will throw if there is not enough balance.\n balances[msg.sender] = balances[msg.sender].sub(_value);\n balances[_to] = balances[_to].add(_value);\n Transfer(msg.sender, _to, _value);\n return true;\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param _owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address _owner) public view returns (uint256 balance) {\n return balances[_owner];\n }\n\n}\n\n\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n\n\n/**\n * @title Standard ERC20 token\n *\n * @dev Implementation of the basic standard token.\n * @dev https://github.com/ethereum/EIPs/issues/20\n * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol\n */\ncontract StandardToken is ERC20, BasicToken {\n\n mapping (address => mapping (address => uint256)) internal allowed;\n\n\n /**\n * @dev Transfer tokens from one address to another\n * @param _from address The address which you want to send tokens from\n * @param _to address The address which you want to transfer to\n * @param _value uint256 the amount of tokens to be transferred\n */\n function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[_from]);\n require(_value <= allowed[_from][msg.sender]);\n\n balances[_from] = balances[_from].sub(_value);\n balances[_to] = balances[_to].add(_value);\n allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);\n Transfer(_from, _to, _value);\n return true;\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n *\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param _spender The address which will spend the funds.\n * @param _value The amount of tokens to be spent.\n */\n function approve(address _spender, uint256 _value) public returns (bool) {\n allowed[msg.sender][_spender] = _value;\n Approval(msg.sender, _spender, _value);\n return true;\n }\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param _owner address The address which owns the funds.\n * @param _spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address _owner, address _spender) public view returns (uint256) {\n return allowed[_owner][_spender];\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(address _spender, uint _addedValue) public returns (bool) {\n allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {\n uint oldValue = allowed[msg.sender][_spender];\n if (_subtractedValue > oldValue) {\n allowed[msg.sender][_spender] = 0;\n } else {\n allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);\n }\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n\ncontract Recoverable is Ownable {\n\n /// @dev Empty constructor (for now)\n function Recoverable() {\n }\n\n /// @dev This will be invoked by the owner, when owner wants to rescue tokens\n /// @param token Token which will we rescue to the owner from the contract\n function recoverTokens(ERC20Basic token) onlyOwner public {\n token.transfer(owner, tokensToBeReturned(token));\n }\n\n /// @dev Interface function, can be overwritten by the superclass\n /// @param token Token which balance we will check and return\n /// @return The amount of tokens (in smallest denominator) the contract owns\n function tokensToBeReturned(ERC20Basic token) public returns (uint) {\n return token.balanceOf(this);\n }\n}\n\n\n\n/**\n * Standard EIP-20 token with an interface marker.\n *\n * @notice Interface marker is used by crowdsale contracts to validate that addresses point a good token contract.\n *\n */\ncontract StandardTokenExt is StandardToken, Recoverable {\n\n /* Interface declaration */\n function isToken() public constant returns (bool weAre) {\n return true;\n }\n}\n\n\n\n/**\n * Define interface for releasing the token transfer after a successful crowdsale.\n */\ncontract ReleasableToken is StandardTokenExt {\n\n /* The finalizer contract that allows unlift the transfer limits on this token */\n address public releaseAgent;\n\n /** A crowdsale contract can release us to the wild if ICO success. If false we are are in transfer lock up period.*/\n bool public released = false;\n\n /** Map of agents that are allowed to transfer tokens regardless of the lock down period. These are crowdsale contracts and possible the team multisig itself. */\n mapping (address => bool) public transferAgents;\n\n /**\n * Limit token transfer until the crowdsale is over.\n *\n */\n modifier canTransfer(address _sender) {\n\n if(!released) {\n if(!transferAgents[_sender]) {\n throw;\n }\n }\n\n _;\n }\n\n /**\n * Set the contract that can call release and make the token transferable.\n *\n * Design choice. Allow reset the release agent to fix fat finger mistakes.\n */\n function setReleaseAgent(address addr) onlyOwner inReleaseState(false) public {\n\n // We don't do interface check here as we might want to a normal wallet address to act as a release agent\n releaseAgent = addr;\n }\n\n /**\n * Owner can allow a particular address (a crowdsale contract) to transfer tokens despite the lock up period.\n */\n function setTransferAgent(address addr, bool state) onlyOwner inReleaseState(false) public {\n transferAgents[addr] = state;\n }\n\n /**\n * One way function to release the tokens to the wild.\n *\n * Can be called only from the release agent that is the final ICO contract. It is only called if the crowdsale has been success (first milestone reached).\n */\n function releaseTokenTransfer() public onlyReleaseAgent {\n released = true;\n }\n\n /** The function can be called only before or after the tokens have been releasesd */\n modifier inReleaseState(bool releaseState) {\n if(releaseState != released) {\n throw;\n }\n _;\n }\n\n /** The function can be called only by a whitelisted release agent. */\n modifier onlyReleaseAgent() {\n if(msg.sender != releaseAgent) {\n throw;\n }\n _;\n }\n\n function transfer(address _to, uint _value) canTransfer(msg.sender) returns (bool success) {\n // Call StandardToken.transfer()\n return super.transfer(_to, _value);\n }\n\n function transferFrom(address _from, address _to, uint _value) canTransfer(_from) returns (bool success) {\n // Call StandardToken.transferForm()\n return super.transferFrom(_from, _to, _value);\n }\n\n}\n\n\n\n/**\n * To test transfer lock up release.\n */\ncontract SimpleReleaseAgent {\n\n ReleasableToken token;\n\n function SimpleReleaseAgent(ReleasableToken _token) {\n token = _token;\n }\n\n function release() {\n token.releaseTokenTransfer();\n }\n}\n"}, "StandardToken": {"abi": [{"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "approve", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_from", "type": "address"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_subtractedValue", "type": "uint256"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_addedValue", "type": "uint256"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}, {"name": "_spender", "type": "address"}], "name": "allowance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}, {"indexed": true, "name": "spender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "bytecode": "0x608060405234801561001057600080fd5b506106b6806100206000396000f30060806040526004361061008d5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663095ea7b3811461009257806318160ddd146100ca57806323b872dd146100f1578063661884631461011b57806370a082311461013f578063a9059cbb14610160578063d73dd62314610184578063dd62ed3e146101a8575b600080fd5b34801561009e57600080fd5b506100b6600160a060020a03600435166024356101cf565b604080519115158252519081900360200190f35b3480156100d657600080fd5b506100df610235565b60408051918252519081900360200190f35b3480156100fd57600080fd5b506100b6600160a060020a036004358116906024351660443561023b565b34801561012757600080fd5b506100b6600160a060020a03600435166024356103b2565b34801561014b57600080fd5b506100df600160a060020a03600435166104a2565b34801561016c57600080fd5b506100b6600160a060020a03600435166024356104bd565b34801561019057600080fd5b506100b6600160a060020a036004351660243561059e565b3480156101b457600080fd5b506100df600160a060020a0360043581169060243516610637565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b60015490565b6000600160a060020a038316151561025257600080fd5b600160a060020a03841660009081526020819052604090205482111561027757600080fd5b600160a060020a03841660009081526002602090815260408083203384529091529020548211156102a757600080fd5b600160a060020a0384166000908152602081905260409020546102d0908363ffffffff61066216565b600160a060020a038086166000908152602081905260408082209390935590851681522054610305908363ffffffff61067416565b600160a060020a03808516600090815260208181526040808320949094559187168152600282528281203382529091522054610347908363ffffffff61066216565b600160a060020a03808616600081815260026020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b336000908152600260209081526040808320600160a060020a03861684529091528120548083111561040757336000908152600260209081526040808320600160a060020a038816845290915281205561043c565b610417818463ffffffff61066216565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a031660009081526020819052604090205490565b6000600160a060020a03831615156104d457600080fd5b336000908152602081905260409020548211156104f057600080fd5b33600090815260208190526040902054610510908363ffffffff61066216565b3360009081526020819052604080822092909255600160a060020a03851681522054610542908363ffffffff61067416565b600160a060020a038416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b336000908152600260209081526040808320600160a060020a03861684529091528120546105d2908363ffffffff61067416565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b60008282111561066e57fe5b50900390565b60008282018381101561068357fe5b93925050505600a165627a7a723058206203fafd36d4444c52e80e7e105864295b1b8096ffc13d27f7715248d3b35df80029", "bytecode_runtime": "0x60806040526004361061008d5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663095ea7b3811461009257806318160ddd146100ca57806323b872dd146100f1578063661884631461011b57806370a082311461013f578063a9059cbb14610160578063d73dd62314610184578063dd62ed3e146101a8575b600080fd5b34801561009e57600080fd5b506100b6600160a060020a03600435166024356101cf565b604080519115158252519081900360200190f35b3480156100d657600080fd5b506100df610235565b60408051918252519081900360200190f35b3480156100fd57600080fd5b506100b6600160a060020a036004358116906024351660443561023b565b34801561012757600080fd5b506100b6600160a060020a03600435166024356103b2565b34801561014b57600080fd5b506100df600160a060020a03600435166104a2565b34801561016c57600080fd5b506100b6600160a060020a03600435166024356104bd565b34801561019057600080fd5b506100b6600160a060020a036004351660243561059e565b3480156101b457600080fd5b506100df600160a060020a0360043581169060243516610637565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b60015490565b6000600160a060020a038316151561025257600080fd5b600160a060020a03841660009081526020819052604090205482111561027757600080fd5b600160a060020a03841660009081526002602090815260408083203384529091529020548211156102a757600080fd5b600160a060020a0384166000908152602081905260409020546102d0908363ffffffff61066216565b600160a060020a038086166000908152602081905260408082209390935590851681522054610305908363ffffffff61067416565b600160a060020a03808516600090815260208181526040808320949094559187168152600282528281203382529091522054610347908363ffffffff61066216565b600160a060020a03808616600081815260026020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b336000908152600260209081526040808320600160a060020a03861684529091528120548083111561040757336000908152600260209081526040808320600160a060020a038816845290915281205561043c565b610417818463ffffffff61066216565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a031660009081526020819052604090205490565b6000600160a060020a03831615156104d457600080fd5b336000908152602081905260409020548211156104f057600080fd5b33600090815260208190526040902054610510908363ffffffff61066216565b3360009081526020819052604080822092909255600160a060020a03851681522054610542908363ffffffff61067416565b600160a060020a038416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b336000908152600260209081526040808320600160a060020a03861684529091528120546105d2908363ffffffff61067416565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b60008282111561066e57fe5b50900390565b60008282018381101561068357fe5b93925050505600a165627a7a723058206203fafd36d4444c52e80e7e105864295b1b8096ffc13d27f7715248d3b35df80029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "approve", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_from", "type": "address"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_subtractedValue", "type": "uint256"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_addedValue", "type": "uint256"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}, {"name": "_spender", "type": "address"}], "name": "allowance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}, {"indexed": true, "name": "spender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "devdoc": {"methods": {"allowance(address,address)": {"details": "Function to check the amount of tokens that an owner allowed to a spender.", "params": {"_owner": "address The address which owns the funds.", "_spender": "address The address which will spend the funds."}, "return": "A uint256 specifying the amount of tokens still available for the spender."}, "approve(address,uint256)": {"details": "Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729", "params": {"_spender": "The address which will spend the funds.", "_value": "The amount of tokens to be spent."}}, "balanceOf(address)": {"details": "Gets the balance of the specified address.", "params": {"_owner": "The address to query the the balance of."}, "return": "An uint256 representing the amount owned by the passed address."}, "decreaseApproval(address,uint256)": {"details": "Decrease the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[_spender] == 0. To decrement allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"_spender": "The address which will spend the funds.", "_subtractedValue": "The amount of tokens to decrease the allowance by."}}, "increaseApproval(address,uint256)": {"details": "Increase the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[_spender] == 0. To increment allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"_addedValue": "The amount of tokens to increase the allowance by.", "_spender": "The address which will spend the funds."}}, "totalSupply()": {"details": "total number of tokens in existence"}, "transfer(address,uint256)": {"details": "transfer token for a specified address", "params": {"_to": "The address to transfer to.", "_value": "The amount to be transferred."}}, "transferFrom(address,address,uint256)": {"details": "Transfer tokens from one address to another", "params": {"_from": "address The address which you want to send tokens from", "_to": "address The address which you want to transfer to", "_value": "uint256 the amount of tokens to be transferred"}}}, "title": "Standard ERC20 token"}, "userdoc": {"methods": {}}}, "settings": {"compilationTarget": {"zeppelin/contracts/token/ERC20/StandardToken.sol": "StandardToken"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"zeppelin/contracts/math/SafeMath.sol": {"keccak256": "0x341ba8cb467a3623e819ba1a683ac1d264005186f308505214e5f6bc89446a08", "urls": ["bzzr://59b5652ee4e4a1b5a8f1a8906e14c84af43d636cf5ca0725cc1813aabe4c8c17"]}, "zeppelin/contracts/token/ERC20/BasicToken.sol": {"keccak256": "0x948404468d61ff35ea4194650670408dabd65da7f905a1c16888ab84520bf39e", "urls": ["bzzr://ea75e20f95d7e4e10394fe6bfaa8eee56b4757c2a6f1e8df4180d33afa621935"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}, "zeppelin/contracts/token/ERC20/StandardToken.sol": {"keccak256": "0xd2b344a5259e19ec143074cfa65637a10c40b68395c59808c4af13bccbb2de55", "urls": ["bzzr://d61a01175a7ca1ba9f4403de603c20b897e33ec425aef2d9f8a7f9ddfdfaf5b2"]}}, "version": 1}, "name": "StandardToken", "ordered_full_dependencies": [], "source_path": "zeppelin/contracts/token/ERC20/StandardToken.sol", "source": "\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n assert(c / a == b);\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n\n\n\n/**\n * @title Basic token\n * @dev Basic version of StandardToken, with no allowances.\n */\ncontract BasicToken is ERC20Basic {\n using SafeMath for uint256;\n\n mapping(address => uint256) balances;\n\n uint256 totalSupply_;\n\n /**\n * @dev total number of tokens in existence\n */\n function totalSupply() public view returns (uint256) {\n return totalSupply_;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param _to The address to transfer to.\n * @param _value The amount to be transferred.\n */\n function transfer(address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[msg.sender]);\n\n // SafeMath.sub will throw if there is not enough balance.\n balances[msg.sender] = balances[msg.sender].sub(_value);\n balances[_to] = balances[_to].add(_value);\n Transfer(msg.sender, _to, _value);\n return true;\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param _owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address _owner) public view returns (uint256 balance) {\n return balances[_owner];\n }\n\n}\n\n\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n\n\n/**\n * @title Standard ERC20 token\n *\n * @dev Implementation of the basic standard token.\n * @dev https://github.com/ethereum/EIPs/issues/20\n * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol\n */\ncontract StandardToken is ERC20, BasicToken {\n\n mapping (address => mapping (address => uint256)) internal allowed;\n\n\n /**\n * @dev Transfer tokens from one address to another\n * @param _from address The address which you want to send tokens from\n * @param _to address The address which you want to transfer to\n * @param _value uint256 the amount of tokens to be transferred\n */\n function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[_from]);\n require(_value <= allowed[_from][msg.sender]);\n\n balances[_from] = balances[_from].sub(_value);\n balances[_to] = balances[_to].add(_value);\n allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);\n Transfer(_from, _to, _value);\n return true;\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n *\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param _spender The address which will spend the funds.\n * @param _value The amount of tokens to be spent.\n */\n function approve(address _spender, uint256 _value) public returns (bool) {\n allowed[msg.sender][_spender] = _value;\n Approval(msg.sender, _spender, _value);\n return true;\n }\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param _owner address The address which owns the funds.\n * @param _spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address _owner, address _spender) public view returns (uint256) {\n return allowed[_owner][_spender];\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(address _spender, uint _addedValue) public returns (bool) {\n allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {\n uint oldValue = allowed[msg.sender][_spender];\n if (_subtractedValue > oldValue) {\n allowed[msg.sender][_spender] = 0;\n } else {\n allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);\n }\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n}\n"}, "StandardTokenExt": {"abi": [{"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "approve", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "recoverTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_from", "type": "address"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_subtractedValue", "type": "uint256"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "tokensToBeReturned", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_addedValue", "type": "uint256"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}, {"name": "_spender", "type": "address"}], "name": "allowance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isToken", "outputs": [{"name": "weAre", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}, {"indexed": true, "name": "spender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "bytecode": "0x608060405260038054600160a060020a031916331790556109a7806100256000396000f3006080604052600436106100c45763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663095ea7b381146100c957806316114acd1461010157806318160ddd1461012457806323b872dd1461014b578063661884631461017557806370a08231146101995780638da5cb5b146101ba578063a9059cbb146101eb578063c45d19db1461020f578063d73dd62314610230578063dd62ed3e14610254578063eefa597b1461027b578063f2fde38b14610290575b600080fd5b3480156100d557600080fd5b506100ed600160a060020a03600435166024356102b1565b604080519115158252519081900360200190f35b34801561010d57600080fd5b50610122600160a060020a0360043516610317565b005b34801561013057600080fd5b506101396103e7565b60408051918252519081900360200190f35b34801561015757600080fd5b506100ed600160a060020a03600435811690602435166044356103ed565b34801561018157600080fd5b506100ed600160a060020a0360043516602435610564565b3480156101a557600080fd5b50610139600160a060020a0360043516610654565b3480156101c657600080fd5b506101cf61066f565b60408051600160a060020a039092168252519081900360200190f35b3480156101f757600080fd5b506100ed600160a060020a036004351660243561067e565b34801561021b57600080fd5b50610139600160a060020a036004351661075f565b34801561023c57600080fd5b506100ed600160a060020a03600435166024356107f5565b34801561026057600080fd5b50610139600160a060020a036004358116906024351661088e565b34801561028757600080fd5b506100ed6108b9565b34801561029c57600080fd5b50610122600160a060020a03600435166108be565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b600354600160a060020a0316331461032e57600080fd5b600354600160a060020a038083169163a9059cbb911661034d8461075f565b6040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b1580156103b857600080fd5b505af11580156103cc573d6000803e3d6000fd5b505050506040513d60208110156103e257600080fd5b505050565b60015490565b6000600160a060020a038316151561040457600080fd5b600160a060020a03841660009081526020819052604090205482111561042957600080fd5b600160a060020a038416600090815260026020908152604080832033845290915290205482111561045957600080fd5b600160a060020a038416600090815260208190526040902054610482908363ffffffff61095316565b600160a060020a0380861660009081526020819052604080822093909355908516815220546104b7908363ffffffff61096516565b600160a060020a038085166000908152602081815260408083209490945591871681526002825282812033825290915220546104f9908363ffffffff61095316565b600160a060020a03808616600081815260026020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b336000908152600260209081526040808320600160a060020a0386168452909152812054808311156105b957336000908152600260209081526040808320600160a060020a03881684529091528120556105ee565b6105c9818463ffffffff61095316565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a031660009081526020819052604090205490565b600354600160a060020a031681565b6000600160a060020a038316151561069557600080fd5b336000908152602081905260409020548211156106b157600080fd5b336000908152602081905260409020546106d1908363ffffffff61095316565b3360009081526020819052604080822092909255600160a060020a03851681522054610703908363ffffffff61096516565b600160a060020a038416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600091600160a060020a038416916370a082319160248082019260209290919082900301818787803b1580156107c357600080fd5b505af11580156107d7573d6000803e3d6000fd5b505050506040513d60208110156107ed57600080fd5b505192915050565b336000908152600260209081526040808320600160a060020a0386168452909152812054610829908363ffffffff61096516565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600190565b600354600160a060020a031633146108d557600080fd5b600160a060020a03811615156108ea57600080fd5b600354604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60008282111561095f57fe5b50900390565b60008282018381101561097457fe5b93925050505600a165627a7a72305820285f247a9929c9aeec7184efa843cec0387d3fbb8120cc837d3fad108790cb780029", "bytecode_runtime": "0x6080604052600436106100c45763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663095ea7b381146100c957806316114acd1461010157806318160ddd1461012457806323b872dd1461014b578063661884631461017557806370a08231146101995780638da5cb5b146101ba578063a9059cbb146101eb578063c45d19db1461020f578063d73dd62314610230578063dd62ed3e14610254578063eefa597b1461027b578063f2fde38b14610290575b600080fd5b3480156100d557600080fd5b506100ed600160a060020a03600435166024356102b1565b604080519115158252519081900360200190f35b34801561010d57600080fd5b50610122600160a060020a0360043516610317565b005b34801561013057600080fd5b506101396103e7565b60408051918252519081900360200190f35b34801561015757600080fd5b506100ed600160a060020a03600435811690602435166044356103ed565b34801561018157600080fd5b506100ed600160a060020a0360043516602435610564565b3480156101a557600080fd5b50610139600160a060020a0360043516610654565b3480156101c657600080fd5b506101cf61066f565b60408051600160a060020a039092168252519081900360200190f35b3480156101f757600080fd5b506100ed600160a060020a036004351660243561067e565b34801561021b57600080fd5b50610139600160a060020a036004351661075f565b34801561023c57600080fd5b506100ed600160a060020a03600435166024356107f5565b34801561026057600080fd5b50610139600160a060020a036004358116906024351661088e565b34801561028757600080fd5b506100ed6108b9565b34801561029c57600080fd5b50610122600160a060020a03600435166108be565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b600354600160a060020a0316331461032e57600080fd5b600354600160a060020a038083169163a9059cbb911661034d8461075f565b6040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b1580156103b857600080fd5b505af11580156103cc573d6000803e3d6000fd5b505050506040513d60208110156103e257600080fd5b505050565b60015490565b6000600160a060020a038316151561040457600080fd5b600160a060020a03841660009081526020819052604090205482111561042957600080fd5b600160a060020a038416600090815260026020908152604080832033845290915290205482111561045957600080fd5b600160a060020a038416600090815260208190526040902054610482908363ffffffff61095316565b600160a060020a0380861660009081526020819052604080822093909355908516815220546104b7908363ffffffff61096516565b600160a060020a038085166000908152602081815260408083209490945591871681526002825282812033825290915220546104f9908363ffffffff61095316565b600160a060020a03808616600081815260026020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b336000908152600260209081526040808320600160a060020a0386168452909152812054808311156105b957336000908152600260209081526040808320600160a060020a03881684529091528120556105ee565b6105c9818463ffffffff61095316565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a031660009081526020819052604090205490565b600354600160a060020a031681565b6000600160a060020a038316151561069557600080fd5b336000908152602081905260409020548211156106b157600080fd5b336000908152602081905260409020546106d1908363ffffffff61095316565b3360009081526020819052604080822092909255600160a060020a03851681522054610703908363ffffffff61096516565b600160a060020a038416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600091600160a060020a038416916370a082319160248082019260209290919082900301818787803b1580156107c357600080fd5b505af11580156107d7573d6000803e3d6000fd5b505050506040513d60208110156107ed57600080fd5b505192915050565b336000908152600260209081526040808320600160a060020a0386168452909152812054610829908363ffffffff61096516565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600190565b600354600160a060020a031633146108d557600080fd5b600160a060020a03811615156108ea57600080fd5b600354604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60008282111561095f57fe5b50900390565b60008282018381101561097457fe5b93925050505600a165627a7a72305820285f247a9929c9aeec7184efa843cec0387d3fbb8120cc837d3fad108790cb780029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "approve", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "recoverTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_from", "type": "address"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_subtractedValue", "type": "uint256"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "tokensToBeReturned", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_addedValue", "type": "uint256"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}, {"name": "_spender", "type": "address"}], "name": "allowance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isToken", "outputs": [{"name": "weAre", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}, {"indexed": true, "name": "spender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "devdoc": {"methods": {"allowance(address,address)": {"details": "Function to check the amount of tokens that an owner allowed to a spender.", "params": {"_owner": "address The address which owns the funds.", "_spender": "address The address which will spend the funds."}, "return": "A uint256 specifying the amount of tokens still available for the spender."}, "approve(address,uint256)": {"details": "Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729", "params": {"_spender": "The address which will spend the funds.", "_value": "The amount of tokens to be spent."}}, "balanceOf(address)": {"details": "Gets the balance of the specified address.", "params": {"_owner": "The address to query the the balance of."}, "return": "An uint256 representing the amount owned by the passed address."}, "decreaseApproval(address,uint256)": {"details": "Decrease the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[_spender] == 0. To decrement allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"_spender": "The address which will spend the funds.", "_subtractedValue": "The amount of tokens to decrease the allowance by."}}, "increaseApproval(address,uint256)": {"details": "Increase the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[_spender] == 0. To increment allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"_addedValue": "The amount of tokens to increase the allowance by.", "_spender": "The address which will spend the funds."}}, "recoverTokens(address)": {"details": "This will be invoked by the owner, when owner wants to rescue tokens", "params": {"token": "Token which will we rescue to the owner from the contract"}}, "tokensToBeReturned(address)": {"details": "Interface function, can be overwritten by the superclass", "params": {"token": "Token which balance we will check and return"}, "return": "The amount of tokens (in smallest denominator) the contract owns"}, "totalSupply()": {"details": "total number of tokens in existence"}, "transfer(address,uint256)": {"details": "transfer token for a specified address", "params": {"_to": "The address to transfer to.", "_value": "The amount to be transferred."}}, "transferFrom(address,address,uint256)": {"details": "Transfer tokens from one address to another", "params": {"_from": "address The address which you want to send tokens from", "_to": "address The address which you want to transfer to", "_value": "uint256 the amount of tokens to be transferred"}}, "transferOwnership(address)": {"details": "Allows the current owner to transfer control of the contract to a newOwner.", "params": {"newOwner": "The address to transfer ownership to."}}}}, "userdoc": {"methods": {}}}, "settings": {"compilationTarget": {"contracts/StandardTokenExt.sol": "StandardTokenExt"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/Recoverable.sol": {"keccak256": "0x311a332cdd87df6e00057f5455f4e68b043b5dbe211f6d68bc64e20817515635", "urls": ["bzzr://4fd99bcfb93baed6e7c8d22ee9ecc5c8346a1aa98288e77b01333b2c5d3f582d"]}, "contracts/StandardTokenExt.sol": {"keccak256": "0x9ea2d4cec4dccd5639c05e6c23dd027d80b5e5a20abd99b280ab7b2631b5a5fc", "urls": ["bzzr://a52d8fc5a21bd83997aff19128e00dceb251df712207b61223894c8b7f42d5ff"]}, "zeppelin/contracts/math/SafeMath.sol": {"keccak256": "0x341ba8cb467a3623e819ba1a683ac1d264005186f308505214e5f6bc89446a08", "urls": ["bzzr://59b5652ee4e4a1b5a8f1a8906e14c84af43d636cf5ca0725cc1813aabe4c8c17"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}, "zeppelin/contracts/token/ERC20/BasicToken.sol": {"keccak256": "0x948404468d61ff35ea4194650670408dabd65da7f905a1c16888ab84520bf39e", "urls": ["bzzr://ea75e20f95d7e4e10394fe6bfaa8eee56b4757c2a6f1e8df4180d33afa621935"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}, "zeppelin/contracts/token/ERC20/StandardToken.sol": {"keccak256": "0xd2b344a5259e19ec143074cfa65637a10c40b68395c59808c4af13bccbb2de55", "urls": ["bzzr://d61a01175a7ca1ba9f4403de603c20b897e33ec425aef2d9f8a7f9ddfdfaf5b2"]}}, "version": 1}, "name": "StandardTokenExt", "ordered_full_dependencies": [], "source_path": "contracts/StandardTokenExt.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n assert(c / a == b);\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n\n\n\n/**\n * @title Basic token\n * @dev Basic version of StandardToken, with no allowances.\n */\ncontract BasicToken is ERC20Basic {\n using SafeMath for uint256;\n\n mapping(address => uint256) balances;\n\n uint256 totalSupply_;\n\n /**\n * @dev total number of tokens in existence\n */\n function totalSupply() public view returns (uint256) {\n return totalSupply_;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param _to The address to transfer to.\n * @param _value The amount to be transferred.\n */\n function transfer(address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[msg.sender]);\n\n // SafeMath.sub will throw if there is not enough balance.\n balances[msg.sender] = balances[msg.sender].sub(_value);\n balances[_to] = balances[_to].add(_value);\n Transfer(msg.sender, _to, _value);\n return true;\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param _owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address _owner) public view returns (uint256 balance) {\n return balances[_owner];\n }\n\n}\n\n\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n\n\n/**\n * @title Standard ERC20 token\n *\n * @dev Implementation of the basic standard token.\n * @dev https://github.com/ethereum/EIPs/issues/20\n * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol\n */\ncontract StandardToken is ERC20, BasicToken {\n\n mapping (address => mapping (address => uint256)) internal allowed;\n\n\n /**\n * @dev Transfer tokens from one address to another\n * @param _from address The address which you want to send tokens from\n * @param _to address The address which you want to transfer to\n * @param _value uint256 the amount of tokens to be transferred\n */\n function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[_from]);\n require(_value <= allowed[_from][msg.sender]);\n\n balances[_from] = balances[_from].sub(_value);\n balances[_to] = balances[_to].add(_value);\n allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);\n Transfer(_from, _to, _value);\n return true;\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n *\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param _spender The address which will spend the funds.\n * @param _value The amount of tokens to be spent.\n */\n function approve(address _spender, uint256 _value) public returns (bool) {\n allowed[msg.sender][_spender] = _value;\n Approval(msg.sender, _spender, _value);\n return true;\n }\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param _owner address The address which owns the funds.\n * @param _spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address _owner, address _spender) public view returns (uint256) {\n return allowed[_owner][_spender];\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(address _spender, uint _addedValue) public returns (bool) {\n allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {\n uint oldValue = allowed[msg.sender][_spender];\n if (_subtractedValue > oldValue) {\n allowed[msg.sender][_spender] = 0;\n } else {\n allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);\n }\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n\ncontract Recoverable is Ownable {\n\n /// @dev Empty constructor (for now)\n function Recoverable() {\n }\n\n /// @dev This will be invoked by the owner, when owner wants to rescue tokens\n /// @param token Token which will we rescue to the owner from the contract\n function recoverTokens(ERC20Basic token) onlyOwner public {\n token.transfer(owner, tokensToBeReturned(token));\n }\n\n /// @dev Interface function, can be overwritten by the superclass\n /// @param token Token which balance we will check and return\n /// @return The amount of tokens (in smallest denominator) the contract owns\n function tokensToBeReturned(ERC20Basic token) public returns (uint) {\n return token.balanceOf(this);\n }\n}\n\n\n\n/**\n * Standard EIP-20 token with an interface marker.\n *\n * @notice Interface marker is used by crowdsale contracts to validate that addresses point a good token contract.\n *\n */\ncontract StandardTokenExt is StandardToken, Recoverable {\n\n /* Interface declaration */\n function isToken() public constant returns (bool weAre) {\n return true;\n }\n}\n"}, "TestBytesDeserializer": {"abi": [{"constant": true, "inputs": [{"name": "b", "type": "bytes"}, {"name": "offset", "type": "uint256"}], "name": "getUint32", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "b", "type": "bytes"}, {"name": "offset", "type": "uint256"}], "name": "getBytes32", "outputs": [{"name": "", "type": "bytes32"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "b", "type": "bytes"}, {"name": "offset", "type": "uint256"}], "name": "getUint256", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "b", "type": "bytes"}, {"name": "offset", "type": "uint256"}], "name": "getAddress", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "b", "type": "bytes"}, {"name": "offset", "type": "uint256"}], "name": "getUint16", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "b", "type": "bytes"}, {"name": "offset", "type": "uint256"}], "name": "getUint128", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}], "bytecode": "0x608060405234801561001057600080fd5b506107ca806100206000396000f3006080604052600436106100775763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416631de8e96a811461007c578063510a6cca146100e9578063816b9d85146100e957806394ca2cb51461014457806395adae4f146101c8578063c804796a14610223575b600080fd5b34801561008857600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526100d7943694929360249392840191908190840183828082843750949750509335945061027e9350505050565b60408051918252519081900360200190f35b3480156100f557600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526100d794369492936024939284019190819084018382808284375094975050933594506103ad9350505050565b34801561015057600080fd5b506040805160206004803580820135601f810184900484028501840190955284845261019f94369492936024939284019190819084018382808284375094975050933594506104b69350505050565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b3480156101d457600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526100d794369492936024939284019190819084018382808284375094975050933594506105409350505050565b34801561022f57600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526100d7943694929360249392840191908190840183828082843750949750509335945061066f9350505050565b604080517fd54dd8f9000000000000000000000000000000000000000000000000000000008152602481018390526004810191825283516044820152835160009273__contracts/BytesDeserializer.sol:Byte__9263d54dd8f99287928792909182916064019060208601908083838c5b838110156103095781810151838201526020016102f1565b50505050905090810190601f1680156103365780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b15801561035457600080fd5b505af4158015610368573d6000803e3d6000fd5b505050506040513d602081101561037e57600080fd5b50517c0100000000000000000000000000000000000000000000000000000000900463ffffffff169392505050565b604080517f2e1eb7fe000000000000000000000000000000000000000000000000000000008152602481018390526004810191825283516044820152835160009273__contracts/BytesDeserializer.sol:Byte__92632e1eb7fe9287928792909182916064019060208601908083838c5b83811015610438578181015183820152602001610420565b50505050905090810190601f1680156104655780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b15801561048357600080fd5b505af4158015610497573d6000803e3d6000fd5b505050506040513d60208110156104ad57600080fd5b50519392505050565b604080517fb655e138000000000000000000000000000000000000000000000000000000008152602481018390526004810191825283516044820152835160009273__contracts/BytesDeserializer.sol:Byte__9263b655e1389287928792909182916064019060208601908083838c83811015610438578181015183820152602001610420565b604080517f20956341000000000000000000000000000000000000000000000000000000008152602481018390526004810191825283516044820152835160009273__contracts/BytesDeserializer.sol:Byte__9263209563419287928792909182916064019060208601908083838c5b838110156105cb5781810151838201526020016105b3565b50505050905090810190601f1680156105f85780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b15801561061657600080fd5b505af415801561062a573d6000803e3d6000fd5b505050506040513d602081101561064057600080fd5b50517e01000000000000000000000000000000000000000000000000000000000000900461ffff169392505050565b604080517f16419aa7000000000000000000000000000000000000000000000000000000008152602481018390526004810191825283516044820152835160009273__contracts/BytesDeserializer.sol:Byte__926316419aa79287928792909182916064019060208601908083838c5b838110156106fa5781810151838201526020016106e2565b50505050905090810190601f1680156107275780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b15801561074557600080fd5b505af4158015610759573d6000803e3d6000fd5b505050506040513d602081101561076f57600080fd5b505170010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff1693925050505600a165627a7a7230582029d391725229c06b3cf053ddb1c15523ae99445c678d03fe19c25a4c0f336beb0029", "bytecode_runtime": "0x6080604052600436106100775763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416631de8e96a811461007c578063510a6cca146100e9578063816b9d85146100e957806394ca2cb51461014457806395adae4f146101c8578063c804796a14610223575b600080fd5b34801561008857600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526100d7943694929360249392840191908190840183828082843750949750509335945061027e9350505050565b60408051918252519081900360200190f35b3480156100f557600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526100d794369492936024939284019190819084018382808284375094975050933594506103ad9350505050565b34801561015057600080fd5b506040805160206004803580820135601f810184900484028501840190955284845261019f94369492936024939284019190819084018382808284375094975050933594506104b69350505050565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b3480156101d457600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526100d794369492936024939284019190819084018382808284375094975050933594506105409350505050565b34801561022f57600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526100d7943694929360249392840191908190840183828082843750949750509335945061066f9350505050565b604080517fd54dd8f9000000000000000000000000000000000000000000000000000000008152602481018390526004810191825283516044820152835160009273__contracts/BytesDeserializer.sol:Byte__9263d54dd8f99287928792909182916064019060208601908083838c5b838110156103095781810151838201526020016102f1565b50505050905090810190601f1680156103365780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b15801561035457600080fd5b505af4158015610368573d6000803e3d6000fd5b505050506040513d602081101561037e57600080fd5b50517c0100000000000000000000000000000000000000000000000000000000900463ffffffff169392505050565b604080517f2e1eb7fe000000000000000000000000000000000000000000000000000000008152602481018390526004810191825283516044820152835160009273__contracts/BytesDeserializer.sol:Byte__92632e1eb7fe9287928792909182916064019060208601908083838c5b83811015610438578181015183820152602001610420565b50505050905090810190601f1680156104655780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b15801561048357600080fd5b505af4158015610497573d6000803e3d6000fd5b505050506040513d60208110156104ad57600080fd5b50519392505050565b604080517fb655e138000000000000000000000000000000000000000000000000000000008152602481018390526004810191825283516044820152835160009273__contracts/BytesDeserializer.sol:Byte__9263b655e1389287928792909182916064019060208601908083838c83811015610438578181015183820152602001610420565b604080517f20956341000000000000000000000000000000000000000000000000000000008152602481018390526004810191825283516044820152835160009273__contracts/BytesDeserializer.sol:Byte__9263209563419287928792909182916064019060208601908083838c5b838110156105cb5781810151838201526020016105b3565b50505050905090810190601f1680156105f85780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b15801561061657600080fd5b505af415801561062a573d6000803e3d6000fd5b505050506040513d602081101561064057600080fd5b50517e01000000000000000000000000000000000000000000000000000000000000900461ffff169392505050565b604080517f16419aa7000000000000000000000000000000000000000000000000000000008152602481018390526004810191825283516044820152835160009273__contracts/BytesDeserializer.sol:Byte__926316419aa79287928792909182916064019060208601908083838c5b838110156106fa5781810151838201526020016106e2565b50505050905090810190601f1680156107275780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b15801561074557600080fd5b505af4158015610759573d6000803e3d6000fd5b505050506040513d602081101561076f57600080fd5b505170010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff1693925050505600a165627a7a7230582029d391725229c06b3cf053ddb1c15523ae99445c678d03fe19c25a4c0f336beb0029", "direct_dependencies": ["BytesDeserializer"], "full_dependencies": ["BytesDeserializer"], "linkrefs": [{"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 1474}, {"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 2080}, {"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 2610}, {"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 2886}, {"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 3492}], "linkrefs_runtime": [{"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 1410}, {"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 2016}, {"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 2546}, {"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 2822}, {"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 3428}], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": true, "inputs": [{"name": "b", "type": "bytes"}, {"name": "offset", "type": "uint256"}], "name": "getUint32", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "b", "type": "bytes"}, {"name": "offset", "type": "uint256"}], "name": "getBytes32", "outputs": [{"name": "", "type": "bytes32"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "b", "type": "bytes"}, {"name": "offset", "type": "uint256"}], "name": "getUint256", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "b", "type": "bytes"}, {"name": "offset", "type": "uint256"}], "name": "getAddress", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "b", "type": "bytes"}, {"name": "offset", "type": "uint256"}], "name": "getUint16", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "b", "type": "bytes"}, {"name": "offset", "type": "uint256"}], "name": "getUint128", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}], "devdoc": {"methods": {}}, "userdoc": {"methods": {}}}, "settings": {"compilationTarget": {"contracts/test/TestBytesDeserializer.sol": "TestBytesDeserializer"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/BytesDeserializer.sol": {"keccak256": "0xdd1718e5ea778d4dd36ccb98336360536beffdffd152bd9fb035124835fa4765", "urls": ["bzzr://ee94acd8149a77baf3f6881b995d1e9eba68c3225b2fe666dc0d402e0b68c5ce"]}, "contracts/test/TestBytesDeserializer.sol": {"keccak256": "0x68e742c290f49846fc6be2614628c4c77f4c32516f66457ed0971b7a812e1292", "urls": ["bzzr://54d75c8f326b75f8d963df2805ce0678facd1b5cd7c81a5a96df24ef42047cc9"]}}, "version": 1}, "name": "TestBytesDeserializer", "ordered_full_dependencies": ["BytesDeserializer"], "source_path": "contracts/test/TestBytesDeserializer.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n/**\n * Deserialize bytes payloads.\n *\n * Values are in big-endian byte order.\n *\n */\nlibrary BytesDeserializer {\n\n /**\n * Extract 256-bit worth of data from the bytes stream.\n */\n function slice32(bytes b, uint offset) constant returns (bytes32) {\n bytes32 out;\n\n for (uint i = 0; i < 32; i++) {\n out |= bytes32(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n /**\n * Extract Ethereum address worth of data from the bytes stream.\n */\n function sliceAddress(bytes b, uint offset) constant returns (address) {\n bytes32 out;\n\n for (uint i = 0; i < 20; i++) {\n out |= bytes32(b[offset + i] & 0xFF) >> ((i+12) * 8);\n }\n return address(uint(out));\n }\n\n /**\n * Extract 128-bit worth of data from the bytes stream.\n */\n function slice16(bytes b, uint offset) constant returns (bytes16) {\n bytes16 out;\n\n for (uint i = 0; i < 16; i++) {\n out |= bytes16(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n /**\n * Extract 32-bit worth of data from the bytes stream.\n */\n function slice4(bytes b, uint offset) constant returns (bytes4) {\n bytes4 out;\n\n for (uint i = 0; i < 4; i++) {\n out |= bytes4(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n /**\n * Extract 16-bit worth of data from the bytes stream.\n */\n function slice2(bytes b, uint offset) constant returns (bytes2) {\n bytes2 out;\n\n for (uint i = 0; i < 2; i++) {\n out |= bytes2(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n\n\n}\n\n\ncontract TestBytesDeserializer {\n\n using BytesDeserializer for bytes;\n\n function getUint256(bytes b, uint offset) public constant returns (uint256) {\n return uint256(b.slice32(offset));\n }\n\n function getUint128(bytes b, uint offset) public constant returns (uint256) {\n return uint128(b.slice16(offset));\n }\n\n function getUint32(bytes b, uint offset) public constant returns (uint256) {\n return uint32(b.slice4(offset));\n }\n\n function getUint16(bytes b, uint offset) public constant returns (uint256) {\n return uint16(b.slice2(offset));\n }\n\n function getBytes32(bytes b, uint offset) public constant returns (bytes32) {\n return b.slice32(offset);\n }\n\n function getAddress(bytes b, uint offset) public constant returns (address) {\n return b.sliceAddress(offset);\n }\n\n}\n"}, "TestCheckpointFailsafe": {"abi": [{"constant": true, "inputs": [{"name": "token", "type": "address"}, {"name": "blockNumber", "type": "uint256"}, {"name": "who", "type": "address"}, {"name": "index", "type": "uint256"}], "name": "getTokenBalance", "outputs": [{"name": "result", "type": "bool"}, {"name": "balance", "type": "uint256"}, {"name": "latestBlock", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}], "bytecode": "0x608060405234801561001057600080fd5b5061028b806100206000396000f3006080604052600436106100405763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166304e9827a8114610045575b600080fd5b34801561005157600080fd5b5061008073ffffffffffffffffffffffffffffffffffffffff60043581169060243590604435166064356100a0565b604080519315158452602084019290925282820152519081900360600190f35b60008060008060008873ffffffffffffffffffffffffffffffffffffffff166348ff566588886040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828152602001925050506040805180830381600087803b15801561014a57600080fd5b505af115801561015e573d6000803e3d6000fd5b505050506040513d604081101561017457600080fd5b508051602090910151604080517f48ff566500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b8116600483015260018b0160248301528251939850939650928c16926348ff566592604480830193928290030181600087803b1580156101f957600080fd5b505af115801561020d573d6000803e3d6000fd5b505050506040513d604081101561022357600080fd5b508051602090910151909250905087831080159061024057508188105b1561024e5760019450610253565b600094505b505094509450949150505600a165627a7a72305820d1fc6656aeed06dcb307135b5d71f7be2951cf07c90b799dd8cd0d9c8d9f1b8c0029", "bytecode_runtime": "0x6080604052600436106100405763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166304e9827a8114610045575b600080fd5b34801561005157600080fd5b5061008073ffffffffffffffffffffffffffffffffffffffff60043581169060243590604435166064356100a0565b604080519315158452602084019290925282820152519081900360600190f35b60008060008060008873ffffffffffffffffffffffffffffffffffffffff166348ff566588886040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828152602001925050506040805180830381600087803b15801561014a57600080fd5b505af115801561015e573d6000803e3d6000fd5b505050506040513d604081101561017457600080fd5b508051602090910151604080517f48ff566500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b8116600483015260018b0160248301528251939850939650928c16926348ff566592604480830193928290030181600087803b1580156101f957600080fd5b505af115801561020d573d6000803e3d6000fd5b505050506040513d604081101561022357600080fd5b508051602090910151909250905087831080159061024057508188105b1561024e5760019450610253565b600094505b505094509450949150505600a165627a7a72305820d1fc6656aeed06dcb307135b5d71f7be2951cf07c90b799dd8cd0d9c8d9f1b8c0029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": true, "inputs": [{"name": "token", "type": "address"}, {"name": "blockNumber", "type": "uint256"}, {"name": "who", "type": "address"}, {"name": "index", "type": "uint256"}], "name": "getTokenBalance", "outputs": [{"name": "result", "type": "bool"}, {"name": "balance", "type": "uint256"}, {"name": "latestBlock", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}], "devdoc": {"methods": {}}, "userdoc": {"methods": {}}}, "settings": {"compilationTarget": {"contracts/security-token/tests/TestCheckpointFailsafe.sol": "TestCheckpointFailsafe"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/CrowdsaleToken.sol": {"keccak256": "0xa812687ac327cd19fac64667980e70d4fb72ef7f61dce477818d085cf0a915df", "urls": ["bzzr://826d9dda00ce341794e5bb05c78b1abb2728e3c631f7a542345dcfa9f3bd9c50"]}, "contracts/MintableToken.sol": {"keccak256": "0x650e1d6b2bedcd36508918357c7cf4f36fdd093cd0c4d6342f4dcd3bdcdd7578", "urls": ["bzzr://7ba2ac0480d428066a18727e2adb76ba56856ecd37b4420e801131ec8f8f4be3"]}, "contracts/Recoverable.sol": {"keccak256": "0x311a332cdd87df6e00057f5455f4e68b043b5dbe211f6d68bc64e20817515635", "urls": ["bzzr://4fd99bcfb93baed6e7c8d22ee9ecc5c8346a1aa98288e77b01333b2c5d3f582d"]}, "contracts/ReleasableToken.sol": {"keccak256": "0x2c50180d0c1eab1aa63a04da3ae87ee2c482665d2a1a42c5f05b11234a7edaf4", "urls": ["bzzr://10752c317eba5c42e2848722689cfee4fffb7bcb42f3346e1a20715d843798e8"]}, "contracts/SafeMathLib.sol": {"keccak256": "0x501bfe31e274b9a5591f7c540bdced4d4312e27d4f19599147c9bbca3d9c6b18", "urls": ["bzzr://a80935ebddb06c247d71372d4e5833ee029f08633bd0fe4a274a57009567e5b9"]}, "contracts/StandardTokenExt.sol": {"keccak256": "0x9ea2d4cec4dccd5639c05e6c23dd027d80b5e5a20abd99b280ab7b2631b5a5fc", "urls": ["bzzr://a52d8fc5a21bd83997aff19128e00dceb251df712207b61223894c8b7f42d5ff"]}, "contracts/UpgradeAgent.sol": {"keccak256": "0x88e793f72feca4a18d2cd06e6037c1413d7b963eabcf5626d60bfb9d04d6e8e6", "urls": ["bzzr://87e39a65cf25d539ab49ad7e759b3298b8a19272964e69e3f2432f0323f30025"]}, "contracts/UpgradeableToken.sol": {"keccak256": "0xa74fc300c514564ece81c86905502c2de674b69c0633b133af19c1ba027da2c9", "urls": ["bzzr://55bc0b908c94781462b8959f051c6dbb53c35641b0f8cb38d74632ad6bf95e52"]}, "contracts/security-token/CheckpointToken.sol": {"keccak256": "0x6df7f71b8c4d9edd19c9c8fbc5dadb6d03c62ad2840f3b4a1d11f558e64ab8c1", "urls": ["bzzr://cd1c4b5351981664ef90752d33c5230d61f1a15664b7f465f8e260778abb944a"]}, "contracts/security-token/ERC677.sol": {"keccak256": "0xf557f3e12aa7f5a23d40957d9ac216db0902997f70f856697529d55e9823e50a", "urls": ["bzzr://c924011b4a57d2eb355c276255fc7af284c2f5b20ece36957d23a2e058975349"]}, "contracts/security-token/ERC677Token.sol": {"keccak256": "0xd67b6b0d3c7e9def09554b11c35f3b609a87ae2ea0f5853f0ca745f7f6366866", "urls": ["bzzr://bcd0f5e4bad7064ea5d8fe4e4e8a276af4ebddc4c7c25703c2dd32ca9ff715f7"]}, "contracts/security-token/SecurityTransferAgent.sol": {"keccak256": "0x23b8a61926435e2c583480c0de72a99b4f7ec8a4213ffc46711f83ecdeaf9186", "urls": ["bzzr://36be13b6cf1389357679705bd18969409ecde684ace2d9c5b606d8986e0231cd"]}, "contracts/security-token/tests/TestCheckpointFailsafe.sol": {"keccak256": "0x48beb1d85156cfd47e145e7aa84aabec823cc71bdce5a5653ac272f7ae796b7e", "urls": ["bzzr://bd1e4c35cd54c7d6da5ae2121a6a32a30cb04734cf2e9072513cc485b754f3e9"]}, "zeppelin/contracts/math/SafeMath.sol": {"keccak256": "0x341ba8cb467a3623e819ba1a683ac1d264005186f308505214e5f6bc89446a08", "urls": ["bzzr://59b5652ee4e4a1b5a8f1a8906e14c84af43d636cf5ca0725cc1813aabe4c8c17"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}, "zeppelin/contracts/ownership/Whitelist.sol": {"keccak256": "0x0b451cac6e2d6be139bd652fcaf0d31f4abd34fadd1d078db7089eb1f5519267", "urls": ["bzzr://42126e694194a0e1b616a90422905d50a1a19242110e33abecfe2bcb820b4beb"]}, "zeppelin/contracts/token/ERC20/BasicToken.sol": {"keccak256": "0x948404468d61ff35ea4194650670408dabd65da7f905a1c16888ab84520bf39e", "urls": ["bzzr://ea75e20f95d7e4e10394fe6bfaa8eee56b4757c2a6f1e8df4180d33afa621935"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}, "zeppelin/contracts/token/ERC20/StandardToken.sol": {"keccak256": "0xd2b344a5259e19ec143074cfa65637a10c40b68395c59808c4af13bccbb2de55", "urls": ["bzzr://d61a01175a7ca1ba9f4403de603c20b897e33ec425aef2d9f8a7f9ddfdfaf5b2"]}}, "version": 1}, "name": "TestCheckpointFailsafe", "ordered_full_dependencies": [], "source_path": "contracts/security-token/tests/TestCheckpointFailsafe.sol", "source": "\n/**\n * This smart contract code is Copyright 2018 TokenMarket Ltd. For more information see https://tokenmarket.net\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n * NatSpec is used intentionally to cover also other than public functions\n * Solidity 0.4.18 is intentionally used: it's stable, and our framework is\n * based on that.\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n assert(c / a == b);\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n\n\n\n/**\n * @title Basic token\n * @dev Basic version of StandardToken, with no allowances.\n */\ncontract BasicToken is ERC20Basic {\n using SafeMath for uint256;\n\n mapping(address => uint256) balances;\n\n uint256 totalSupply_;\n\n /**\n * @dev total number of tokens in existence\n */\n function totalSupply() public view returns (uint256) {\n return totalSupply_;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param _to The address to transfer to.\n * @param _value The amount to be transferred.\n */\n function transfer(address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[msg.sender]);\n\n // SafeMath.sub will throw if there is not enough balance.\n balances[msg.sender] = balances[msg.sender].sub(_value);\n balances[_to] = balances[_to].add(_value);\n Transfer(msg.sender, _to, _value);\n return true;\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param _owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address _owner) public view returns (uint256 balance) {\n return balances[_owner];\n }\n\n}\n\n\n\n\n/**\n * @title Standard ERC20 token\n *\n * @dev Implementation of the basic standard token.\n * @dev https://github.com/ethereum/EIPs/issues/20\n * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol\n */\ncontract StandardToken is ERC20, BasicToken {\n\n mapping (address => mapping (address => uint256)) internal allowed;\n\n\n /**\n * @dev Transfer tokens from one address to another\n * @param _from address The address which you want to send tokens from\n * @param _to address The address which you want to transfer to\n * @param _value uint256 the amount of tokens to be transferred\n */\n function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[_from]);\n require(_value <= allowed[_from][msg.sender]);\n\n balances[_from] = balances[_from].sub(_value);\n balances[_to] = balances[_to].add(_value);\n allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);\n Transfer(_from, _to, _value);\n return true;\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n *\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param _spender The address which will spend the funds.\n * @param _value The amount of tokens to be spent.\n */\n function approve(address _spender, uint256 _value) public returns (bool) {\n allowed[msg.sender][_spender] = _value;\n Approval(msg.sender, _spender, _value);\n return true;\n }\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param _owner address The address which owns the funds.\n * @param _spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address _owner, address _spender) public view returns (uint256) {\n return allowed[_owner][_spender];\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(address _spender, uint _addedValue) public returns (bool) {\n allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {\n uint oldValue = allowed[msg.sender][_spender];\n if (_subtractedValue > oldValue) {\n allowed[msg.sender][_spender] = 0;\n } else {\n allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);\n }\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n\ncontract Recoverable is Ownable {\n\n /// @dev Empty constructor (for now)\n function Recoverable() {\n }\n\n /// @dev This will be invoked by the owner, when owner wants to rescue tokens\n /// @param token Token which will we rescue to the owner from the contract\n function recoverTokens(ERC20Basic token) onlyOwner public {\n token.transfer(owner, tokensToBeReturned(token));\n }\n\n /// @dev Interface function, can be overwritten by the superclass\n /// @param token Token which balance we will check and return\n /// @return The amount of tokens (in smallest denominator) the contract owns\n function tokensToBeReturned(ERC20Basic token) public returns (uint) {\n return token.balanceOf(this);\n }\n}\n\n\n\n/**\n * Standard EIP-20 token with an interface marker.\n *\n * @notice Interface marker is used by crowdsale contracts to validate that addresses point a good token contract.\n *\n */\ncontract StandardTokenExt is StandardToken, Recoverable {\n\n /* Interface declaration */\n function isToken() public constant returns (bool weAre) {\n return true;\n }\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Upgrade agent interface inspired by Lunyr.\n *\n * Upgrade agent transfers tokens to a new contract.\n * Upgrade agent itself can be the token contract, or just a middle man contract doing the heavy lifting.\n */\ncontract UpgradeAgent {\n\n uint public originalSupply;\n\n /** Interface marker */\n function isUpgradeAgent() public constant returns (bool) {\n return true;\n }\n\n function upgradeFrom(address _from, uint256 _value) public;\n\n}\n\n\n/**\n * A token upgrade mechanism where users can opt-in amount of tokens to the next smart contract revision.\n *\n * First envisioned by Golem and Lunyr projects.\n */\ncontract UpgradeableToken is StandardTokenExt {\n\n /** Contract / person who can set the upgrade path. This can be the same as team multisig wallet, as what it is with its default value. */\n address public upgradeMaster;\n\n /** The next contract where the tokens will be migrated. */\n UpgradeAgent public upgradeAgent;\n\n /** How many tokens we have upgraded by now. */\n uint256 public totalUpgraded;\n\n /**\n * Upgrade states.\n *\n * - NotAllowed: The child contract has not reached a condition where the upgrade can bgun\n * - WaitingForAgent: Token allows upgrade, but we don't have a new agent yet\n * - ReadyToUpgrade: The agent is set, but not a single token has been upgraded yet\n * - Upgrading: Upgrade agent is set and the balance holders can upgrade their tokens\n *\n */\n enum UpgradeState {Unknown, NotAllowed, WaitingForAgent, ReadyToUpgrade, Upgrading}\n\n /**\n * Somebody has upgraded some of his tokens.\n */\n event Upgrade(address indexed _from, address indexed _to, uint256 _value);\n\n /**\n * New upgrade agent available.\n */\n event UpgradeAgentSet(address agent);\n\n /**\n * Do not allow construction without upgrade master set.\n */\n function UpgradeableToken(address _upgradeMaster) {\n upgradeMaster = _upgradeMaster;\n }\n\n /**\n * Allow the token holder to upgrade some of their tokens to a new contract.\n */\n function upgrade(uint256 value) public {\n\n UpgradeState state = getUpgradeState();\n if(!(state == UpgradeState.ReadyToUpgrade || state == UpgradeState.Upgrading)) {\n // Called in a bad state\n throw;\n }\n\n // Validate input value.\n if (value == 0) throw;\n\n balances[msg.sender] = balances[msg.sender].sub(value);\n\n // Take tokens out from circulation\n totalSupply_ = totalSupply_.sub(value);\n totalUpgraded = totalUpgraded.add(value);\n\n // Upgrade agent reissues the tokens\n upgradeAgent.upgradeFrom(msg.sender, value);\n Upgrade(msg.sender, upgradeAgent, value);\n }\n\n /**\n * Set an upgrade agent that handles\n */\n function setUpgradeAgent(address agent) external {\n\n if(!canUpgrade()) {\n // The token is not yet in a state that we could think upgrading\n throw;\n }\n\n if (agent == 0x0) throw;\n // Only a master can designate the next agent\n if (msg.sender != upgradeMaster) throw;\n // Upgrade has already begun for an agent\n if (getUpgradeState() == UpgradeState.Upgrading) throw;\n\n upgradeAgent = UpgradeAgent(agent);\n\n // Bad interface\n if(!upgradeAgent.isUpgradeAgent()) throw;\n // Make sure that token supplies match in source and target\n if (upgradeAgent.originalSupply() != totalSupply_) throw;\n\n UpgradeAgentSet(upgradeAgent);\n }\n\n /**\n * Get the state of the token upgrade.\n */\n function getUpgradeState() public constant returns(UpgradeState) {\n if(!canUpgrade()) return UpgradeState.NotAllowed;\n else if(address(upgradeAgent) == 0x00) return UpgradeState.WaitingForAgent;\n else if(totalUpgraded == 0) return UpgradeState.ReadyToUpgrade;\n else return UpgradeState.Upgrading;\n }\n\n /**\n * Change the upgrade master.\n *\n * This allows us to set a new owner for the upgrade mechanism.\n */\n function setUpgradeMaster(address master) public {\n if (master == 0x0) throw;\n if (msg.sender != upgradeMaster) throw;\n upgradeMaster = master;\n }\n\n /**\n * Child contract can enable to provide the condition when the upgrade can begun.\n */\n function canUpgrade() public constant returns(bool) {\n return true;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n/**\n * Define interface for releasing the token transfer after a successful crowdsale.\n */\ncontract ReleasableToken is StandardTokenExt {\n\n /* The finalizer contract that allows unlift the transfer limits on this token */\n address public releaseAgent;\n\n /** A crowdsale contract can release us to the wild if ICO success. If false we are are in transfer lock up period.*/\n bool public released = false;\n\n /** Map of agents that are allowed to transfer tokens regardless of the lock down period. These are crowdsale contracts and possible the team multisig itself. */\n mapping (address => bool) public transferAgents;\n\n /**\n * Limit token transfer until the crowdsale is over.\n *\n */\n modifier canTransfer(address _sender) {\n\n if(!released) {\n if(!transferAgents[_sender]) {\n throw;\n }\n }\n\n _;\n }\n\n /**\n * Set the contract that can call release and make the token transferable.\n *\n * Design choice. Allow reset the release agent to fix fat finger mistakes.\n */\n function setReleaseAgent(address addr) onlyOwner inReleaseState(false) public {\n\n // We don't do interface check here as we might want to a normal wallet address to act as a release agent\n releaseAgent = addr;\n }\n\n /**\n * Owner can allow a particular address (a crowdsale contract) to transfer tokens despite the lock up period.\n */\n function setTransferAgent(address addr, bool state) onlyOwner inReleaseState(false) public {\n transferAgents[addr] = state;\n }\n\n /**\n * One way function to release the tokens to the wild.\n *\n * Can be called only from the release agent that is the final ICO contract. It is only called if the crowdsale has been success (first milestone reached).\n */\n function releaseTokenTransfer() public onlyReleaseAgent {\n released = true;\n }\n\n /** The function can be called only before or after the tokens have been releasesd */\n modifier inReleaseState(bool releaseState) {\n if(releaseState != released) {\n throw;\n }\n _;\n }\n\n /** The function can be called only by a whitelisted release agent. */\n modifier onlyReleaseAgent() {\n if(msg.sender != releaseAgent) {\n throw;\n }\n _;\n }\n\n function transfer(address _to, uint _value) canTransfer(msg.sender) returns (bool success) {\n // Call StandardToken.transfer()\n return super.transfer(_to, _value);\n }\n\n function transferFrom(address _from, address _to, uint _value) canTransfer(_from) returns (bool success) {\n // Call StandardToken.transferForm()\n return super.transferFrom(_from, _to, _value);\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Safe unsigned safe math.\n *\n * https://blog.aragon.one/library-driven-development-in-solidity-2bebcaf88736#.750gwtwli\n *\n * Originally from https://raw.githubusercontent.com/AragonOne/zeppelin-solidity/master/contracts/SafeMathLib.sol\n *\n * Maintained here until merged to mainline zeppelin-solidity.\n *\n */\nlibrary SafeMathLib {\n\n function times(uint a, uint b) returns (uint) {\n uint c = a * b;\n assert(a == 0 || c / a == b);\n return c;\n }\n\n function minus(uint a, uint b) returns (uint) {\n assert(b <= a);\n return a - b;\n }\n\n function plus(uint a, uint b) returns (uint) {\n uint c = a + b;\n assert(c>=a);\n return c;\n }\n\n}\n\n\n\n/**\n * A token that can increase its supply by another contract.\n *\n * This allows uncapped crowdsale by dynamically increasing the supply when money pours in.\n * Only mint agents, contracts whitelisted by owner, can mint new tokens.\n *\n */\ncontract MintableToken is StandardTokenExt {\n\n using SafeMathLib for uint;\n\n bool public mintingFinished = false;\n\n /** List of agents that are allowed to create new tokens */\n mapping (address => bool) public mintAgents;\n\n event MintingAgentChanged(address addr, bool state);\n event Minted(address receiver, uint amount);\n\n /**\n * Create new tokens and allocate them to an address..\n *\n * Only callably by a crowdsale contract (mint agent).\n */\n function mint(address receiver, uint amount) onlyMintAgent canMint public {\n totalSupply_ = totalSupply_.plus(amount);\n balances[receiver] = balances[receiver].plus(amount);\n\n // This will make the mint transaction apper in EtherScan.io\n // We can remove this after there is a standardized minting event\n Transfer(0, receiver, amount);\n }\n\n /**\n * Owner can allow a crowdsale contract to mint new tokens.\n */\n function setMintAgent(address addr, bool state) onlyOwner canMint public {\n mintAgents[addr] = state;\n MintingAgentChanged(addr, state);\n }\n\n modifier onlyMintAgent() {\n // Only crowdsale contracts are allowed to mint new tokens\n if(!mintAgents[msg.sender]) {\n throw;\n }\n _;\n }\n\n /** Make sure we are not done yet. */\n modifier canMint() {\n if(mintingFinished) throw;\n _;\n }\n}\n\n\n\n/**\n * A crowdsaled token.\n *\n * An ERC-20 token designed specifically for crowdsales with investor protection and further development path.\n *\n * - The token transfer() is disabled until the crowdsale is over\n * - The token contract gives an opt-in upgrade path to a new contract\n * - The same token can be part of several crowdsales through approve() mechanism\n * - The token can be capped (supply set in the constructor) or uncapped (crowdsale contract can mint new tokens)\n *\n */\ncontract CrowdsaleToken is ReleasableToken, MintableToken, UpgradeableToken {\n\n /** Name and symbol were updated. */\n event UpdatedTokenInformation(string newName, string newSymbol);\n\n string public name;\n\n string public symbol;\n\n uint public decimals;\n\n /**\n * Construct the token.\n *\n * This token must be created through a team multisig wallet, so that it is owned by that wallet.\n *\n * @param _name Token name\n * @param _symbol Token symbol - should be all caps\n * @param _initialSupply How many tokens we start with\n * @param _decimals Number of decimal places\n * @param _mintable Are new tokens created over the crowdsale or do we distribute only the initial supply? Note that when the token becomes transferable the minting always ends.\n */\n function CrowdsaleToken(string _name, string _symbol, uint _initialSupply, uint _decimals, bool _mintable)\n UpgradeableToken(msg.sender) {\n\n // Create any address, can be transferred\n // to team multisig via changeOwner(),\n // also remember to call setUpgradeMaster()\n owner = msg.sender;\n\n name = _name;\n symbol = _symbol;\n\n totalSupply_ = _initialSupply;\n\n decimals = _decimals;\n\n // Create initially all balance on the team multisig\n balances[owner] = totalSupply_;\n\n if(totalSupply_ > 0) {\n Minted(owner, totalSupply_);\n }\n\n // No more new supply allowed after the token creation\n if(!_mintable) {\n mintingFinished = true;\n if(totalSupply_ == 0) {\n throw; // Cannot create a token without supply and no minting\n }\n }\n }\n\n /**\n * When token is released to be transferable, enforce no new tokens can be created.\n */\n function releaseTokenTransfer() public onlyReleaseAgent {\n mintingFinished = true;\n super.releaseTokenTransfer();\n }\n\n /**\n * Allow upgrade agent functionality kick in only if the crowdsale was success.\n */\n function canUpgrade() public constant returns(bool) {\n return released && super.canUpgrade();\n }\n\n /**\n * Owner can update token information here.\n *\n * It is often useful to conceal the actual token association, until\n * the token operations, like central issuance or reissuance have been completed.\n *\n * This function allows the token owner to rename the token after the operations\n * have been completed and then point the audience to use the token contract.\n */\n function setTokenInformation(string _name, string _symbol) onlyOwner {\n name = _name;\n symbol = _symbol;\n\n UpdatedTokenInformation(name, symbol);\n }\n\n}\n\n\ninterface SecurityTransferAgent {\n function verify(address from, address to, uint256 value) public view returns (uint256 newValue);\n}\n\n\n\n\n\n\n\n/**\n * @title Whitelist\n * @dev The Whitelist contract has a whitelist of addresses, and provides basic authorization control functions.\n * @dev This simplifies the implementation of \"user permissions\".\n */\ncontract Whitelist is Ownable {\n mapping(address => bool) public whitelist;\n \n event WhitelistedAddressAdded(address addr);\n event WhitelistedAddressRemoved(address addr);\n\n /**\n * @dev Throws if called by any account that's not whitelisted.\n */\n modifier onlyWhitelisted() {\n require(whitelist[msg.sender]);\n _;\n }\n\n /**\n * @dev add an address to the whitelist\n * @param addr address\n * @return true if the address was added to the whitelist, false if the address was already in the whitelist \n */\n function addAddressToWhitelist(address addr) onlyOwner public returns(bool success) {\n if (!whitelist[addr]) {\n whitelist[addr] = true;\n WhitelistedAddressAdded(addr);\n success = true; \n }\n }\n\n /**\n * @dev add addresses to the whitelist\n * @param addrs addresses\n * @return true if at least one address was added to the whitelist, \n * false if all addresses were already in the whitelist \n */\n function addAddressesToWhitelist(address[] addrs) onlyOwner public returns(bool success) {\n for (uint256 i = 0; i < addrs.length; i++) {\n if (addAddressToWhitelist(addrs[i])) {\n success = true;\n }\n }\n }\n\n /**\n * @dev remove an address from the whitelist\n * @param addr address\n * @return true if the address was removed from the whitelist, \n * false if the address wasn't in the whitelist in the first place \n */\n function removeAddressFromWhitelist(address addr) onlyOwner public returns(bool success) {\n if (whitelist[addr]) {\n whitelist[addr] = false;\n WhitelistedAddressRemoved(addr);\n success = true;\n }\n }\n\n /**\n * @dev remove addresses from the whitelist\n * @param addrs addresses\n * @return true if at least one address was removed from the whitelist, \n * false if all addresses weren't in the whitelist in the first place\n */\n function removeAddressesFromWhitelist(address[] addrs) onlyOwner public returns(bool success) {\n for (uint256 i = 0; i < addrs.length; i++) {\n if (removeAddressFromWhitelist(addrs[i])) {\n success = true;\n }\n }\n }\n\n}\n\n\n\n\n\ninterface ERC677Receiver {\n function tokenFallback(address from, uint256 amount, bytes data) returns (bool success);\n}\n\ninterface ERC677 {\n\n // TODO: Have a different event name to make sure that tools with bad APIs do not mix this with ERC-20 Transfer() event that lacks data parameter\n event ERC677Transfer(address from, address receiver, uint256 amount, bytes data);\n\n function transferAndCall(ERC677Receiver receiver, uint amount, bytes data) returns (bool success);\n}\n\n\n\ncontract ERC677Token is ERC20, ERC677 {\n function transferAndCall(ERC677Receiver receiver, uint amount, bytes data) returns (bool success) {\n require(transfer(address(receiver), amount));\n\n ERC677Transfer(msg.sender, address(receiver), amount, data);\n\n require(receiver.tokenFallback(msg.sender, amount, data));\n }\n}\n\n\n/**\n * @author TokenMarket / Ville Sundell \n */\ncontract CheckpointToken is ERC677Token {\n using SafeMath for uint256; // We use only uint256 for safety reasons (no boxing)\n\n /// @dev Name of the token, usually the company and/or series (like \"TokenMeerkat Ltd. Series A\"):\n string public name;\n /// @dev Ticker symbol, usually bases on the \"name\" above (like \"MEER\"):\n string public symbol;\n /// @dev Decimals are usually set to 18 for EIP-20 tokens:\n uint256 public decimals;\n /// @dev If transferVerifier is set, that contract will be queried upon every token transaction:\n SecurityTransferAgent public transferVerifier;\n\n /// @dev Checkpoint is the fundamental unit for our internal accounting\n /// (who owns what, and at what moment in time)\n struct Checkpoint {\n uint256 blockNumber;\n uint256 value;\n }\n /// @dev This mapping contains checkpoints for every address:\n mapping (address => Checkpoint[]) public tokenBalances;\n /// @dev This is a one dimensional Checkpoint mapping of the overall token supply:\n Checkpoint[] public tokensTotal;\n\n /// @dev This mapping keeps account for approve() -> fransferFrom() pattern:\n mapping (address => mapping (address => uint256)) public allowed;\n\n /**\n * @dev Constructor for CheckpointToken, initializing the token\n *\n * Here we define initial values for name, symbol and decimals.\n *\n * @param _name Initial name of the token\n * @param _symbol Initial symbol of the token\n * @param _decimals Number of decimals for the token, industry standard is 18\n */\n function CheckpointToken(string _name, string _symbol, uint256 _decimals) public {\n name = _name;\n symbol = _symbol;\n decimals = _decimals;\n }\n\n /** PUBLIC FUNCTIONS\n ****************************************/\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param owner address The address which owns the funds.\n * @param spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address owner, address spender) public view returns (uint256) {\n return allowed[owner][spender];\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n *\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param spender The address which will spend the funds.\n * @param value The amount of tokens to be spent.\n * @return true if the call function was executed successfully\n */\n function approve(address spender, uint256 value) public returns (bool) {\n allowed[msg.sender][spender] = value;\n Approval(msg.sender, spender, value);\n return true;\n }\n\n /**\n * @dev Transfer tokens from one address to another\n * @param from address The address which you want to send tokens from\n * @param to address The address which you want to transfer to\n * @param value uint256 the amount of tokens to be transferred\n * @return true if the call function was executed successfully\n */\n function transferFrom(address from, address to, uint256 value) public returns (bool) {\n require(value <= allowed[from][msg.sender]);\n\n transferInternal(from, to, value);\n Transfer(from, to, value);\n return true;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param to The address to transfer to.\n * @param value The amount to be transferred.\n * @return true if the call function was executed successfully\n */\n function transfer(address to, uint256 value) public returns (bool) {\n transferInternal(msg.sender, to, value);\n Transfer(msg.sender, to, value);\n return true;\n }\n\n /**\n * @dev total number of tokens in existence\n * @return A uint256 specifying the total number of tokens in existence\n */\n function totalSupply() public view returns (uint256 tokenCount) {\n tokenCount = balanceAtBlock(tokensTotal, block.number);\n }\n\n /**\n * @dev total number of tokens in existence at the given block\n * @param blockNumber The block number we want to query for the total supply\n * @return A uint256 specifying the total number of tokens at a given block\n */\n function totalSupplyAt(uint256 blockNumber) public view returns (uint256 tokenCount) {\n tokenCount = balanceAtBlock(tokensTotal, blockNumber);\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address owner) public view returns (uint256 balance) {\n balance = balanceAtBlock(tokenBalances[owner], block.number);\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param owner The address to query the the balance of.\n * @param blockNumber The block number we want to query for the balance.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceAt(address owner, uint256 blockNumber) public view returns (uint256 balance) {\n balance = balanceAtBlock(tokenBalances[owner], blockNumber);\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param spender The address which will spend the funds.\n * @param addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(address spender, uint addedValue) public returns (bool) {\n allowed[msg.sender][spender] = allowed[msg.sender][spender].add(addedValue);\n Approval(msg.sender, spender, allowed[msg.sender][spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param spender The address which will spend the funds.\n * @param subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(address spender, uint subtractedValue) public returns (bool) {\n uint oldValue = allowed[msg.sender][spender];\n if (subtractedValue > oldValue) {\n allowed[msg.sender][spender] = 0;\n } else {\n allowed[msg.sender][spender] = oldValue.sub(subtractedValue);\n }\n Approval(msg.sender, spender, allowed[msg.sender][spender]);\n return true;\n }\n\n /**\n * @dev Addition to StandardToken methods. Increase the amount of tokens that\n * an owner allowed to a spender and execute a call with the sent data.\n *\n * This is originally from OpenZeppelin.\n *\n * approve should be called when allowed[spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param spender The address which will spend the funds.\n * @param addedValue The amount of tokens to increase the allowance by.\n * @param data ABI-encoded contract call to call `spender` address.\n */\n function increaseApproval(address spender, uint addedValue, bytes data) public returns (bool) {\n require(spender != address(this));\n\n increaseApproval(spender, addedValue);\n\n require(spender.call(data));\n\n return true;\n }\n\n /**\n * @dev Addition to StandardToken methods. Decrease the amount of tokens that\n * an owner allowed to a spender and execute a call with the sent data.\n *\n * This is originally from OpenZeppelin.\n *\n * approve should be called when allowed[spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param spender The address which will spend the funds.\n * @param subtractedValue The amount of tokens to decrease the allowance by.\n * @param data ABI-encoded contract call to call `spender` address.\n */\n function decreaseApproval(address spender, uint subtractedValue, bytes data) public returns (bool) {\n require(spender != address(this));\n\n decreaseApproval(spender, subtractedValue);\n\n require(spender.call(data));\n\n return true;\n }\n\n /** INTERNALS\n ****************************************/\n\n function balanceAtBlock(Checkpoint[] storage checkpoints, uint256 blockNumber) internal returns (uint256 balance) {\n uint256 currentBlockNumber;\n (currentBlockNumber, balance) = getCheckpoint(checkpoints, blockNumber);\n }\n\n function transferInternal(address from, address to, uint256 value) internal {\n uint256 fromBalance = balanceOf(from);\n uint256 toBalance = balanceOf(to);\n\n if (address(transferVerifier) != address(0)) {\n value = transferVerifier.verify(from, to, value);\n require(value > 0);\n }\n\n setCheckpoint(tokenBalances[from], fromBalance.sub(value));\n setCheckpoint(tokenBalances[to], toBalance.add(value));\n }\n\n\n /** CORE\n ** The Magic happens below:\n ***************************************/\n\n function setCheckpoint(Checkpoint[] storage checkpoints, uint256 newValue) internal {\n if ((checkpoints.length == 0) || (checkpoints[checkpoints.length.sub(1)].blockNumber < block.number)) {\n checkpoints.push(Checkpoint(block.number, newValue));\n } else {\n checkpoints[checkpoints.length.sub(1)] = Checkpoint(block.number, newValue);\n }\n }\n\n function getCheckpoint(Checkpoint[] storage checkpoints, uint256 blockNumber) internal returns (uint256 blockNumber_, uint256 value) {\n if (checkpoints.length == 0) {\n return (0, 0);\n }\n\n // Shortcut for the actual value\n if (blockNumber >= checkpoints[checkpoints.length.sub(1)].blockNumber) {\n return (checkpoints[checkpoints.length.sub(1)].blockNumber, checkpoints[checkpoints.length.sub(1)].value);\n }\n\n if (blockNumber < checkpoints[0].blockNumber) {\n return (0, 0);\n }\n\n // Binary search of the value in the array\n uint256 min = 0;\n uint256 max = checkpoints.length.sub(1);\n while (max > min) {\n uint256 mid = (max.add(min.add(1))).div(2);\n if (checkpoints[mid].blockNumber <= blockNumber) {\n min = mid;\n } else {\n max = mid.sub(1);\n }\n }\n\n return (checkpoints[min].blockNumber, checkpoints[min].value);\n }\n}\n\n\ncontract TestCheckpointFailsafe {\n function getTokenBalance(CheckpointToken token, uint blockNumber, address who, uint index) public constant returns (bool result, uint balance, uint latestBlock) {\n uint tmpBlock;\n uint tmpBalance;\n\n (latestBlock, balance) = token.tokenBalances(who, index);\n (tmpBlock, tmpBalance) = token.tokenBalances(who, index+1);\n\n if (latestBlock >= blockNumber && blockNumber < tmpBlock) {\n result = true;\n } else {\n result = false;\n }\n }\n}\n"}, "TestMigrationTarget": {"abi": [{"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "approve", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "recoverTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_from", "type": "address"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "originalSupply", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isUpgradeAgent", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_subtractedValue", "type": "uint256"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_from", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "upgradeFrom", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "oldToken", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "tokensToBeReturned", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_addedValue", "type": "uint256"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}, {"name": "_spender", "type": "address"}], "name": "allowance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isToken", "outputs": [{"name": "weAre", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [{"name": "_oldToken", "type": "address"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"payable": true, "stateMutability": "payable", "type": "fallback"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}, {"indexed": true, "name": "spender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "bytecode": "0x608060405234801561001057600080fd5b50604051602080610cfc833981016040525160038054600160a060020a0319908116331790915560058054600160a060020a0380851691909316179081905516151561005b57600080fd5b80600160a060020a03166318160ddd6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156100b257600080fd5b505af11580156100c6573d6000803e3d6000fd5b505050506040513d60208110156100dc57600080fd5b5051600681905515156100ee57600080fd5b50610bfe806100fe6000396000f3006080604052600436106100f05763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663095ea7b381146100f557806316114acd1461012d57806318160ddd1461015057806323b872dd146101775780634b2ba0dd146101a157806361d3d7a6146101b657806366188463146101cb57806370a08231146101ef578063753e88e5146102105780638da5cb5b14610234578063a9059cbb14610265578063b31c710a14610289578063c45d19db1461029e578063d73dd623146102bf578063dd62ed3e146102e3578063eefa597b146101b6578063f2fde38b1461030a575b600080fd5b34801561010157600080fd5b50610119600160a060020a036004351660243561032b565b604080519115158252519081900360200190f35b34801561013957600080fd5b5061014e600160a060020a0360043516610391565b005b34801561015c57600080fd5b50610165610461565b60408051918252519081900360200190f35b34801561018357600080fd5b50610119600160a060020a0360043581169060243516604435610467565b3480156101ad57600080fd5b506101656105de565b3480156101c257600080fd5b506101196105e4565b3480156101d757600080fd5b50610119600160a060020a03600435166024356105e9565b3480156101fb57600080fd5b50610165600160a060020a03600435166106d9565b34801561021c57600080fd5b5061014e600160a060020a03600435166024356106f4565b34801561024057600080fd5b506102496108bc565b60408051600160a060020a039092168252519081900360200190f35b34801561027157600080fd5b50610119600160a060020a03600435166024356108cb565b34801561029557600080fd5b506102496109ac565b3480156102aa57600080fd5b50610165600160a060020a03600435166109bb565b3480156102cb57600080fd5b50610119600160a060020a0360043516602435610a51565b3480156102ef57600080fd5b50610165600160a060020a0360043581169060243516610aea565b34801561031657600080fd5b5061014e600160a060020a0360043516610b15565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b600354600160a060020a031633146103a857600080fd5b600354600160a060020a038083169163a9059cbb91166103c7846109bb565b6040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b15801561043257600080fd5b505af1158015610446573d6000803e3d6000fd5b505050506040513d602081101561045c57600080fd5b505050565b60015490565b6000600160a060020a038316151561047e57600080fd5b600160a060020a0384166000908152602081905260409020548211156104a357600080fd5b600160a060020a03841660009081526002602090815260408083203384529091529020548211156104d357600080fd5b600160a060020a0384166000908152602081905260409020546104fc908363ffffffff610baa16565b600160a060020a038086166000908152602081905260408082209390935590851681522054610531908363ffffffff610bbc16565b600160a060020a03808516600090815260208181526040808320949094559187168152600282528281203382529091522054610573908363ffffffff610baa16565b600160a060020a03808616600081815260026020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b60065481565b600190565b336000908152600260209081526040808320600160a060020a03861684529091528120548083111561063e57336000908152600260209081526040808320600160a060020a0388168452909152812055610673565b61064e818463ffffffff610baa16565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a031660009081526020819052604090205490565b600554600160a060020a0316331461070b57600080fd5b60015473__contracts/SafeMathLib.sol:SafeMathLi__6366098d4f9091836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b15801561078257600080fd5b505af4158015610796573d6000803e3d6000fd5b505050506040513d60208110156107ac57600080fd5b5051600155600160a060020a038216600090815260208181526040918290205482517f66098d4f000000000000000000000000000000000000000000000000000000008152600481019190915260248101849052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561083a57600080fd5b505af415801561084e573d6000803e3d6000fd5b505050506040513d602081101561086457600080fd5b5051600160a060020a0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b600354600160a060020a031681565b6000600160a060020a03831615156108e257600080fd5b336000908152602081905260409020548211156108fe57600080fd5b3360009081526020819052604090205461091e908363ffffffff610baa16565b3360009081526020819052604080822092909255600160a060020a03851681522054610950908363ffffffff610bbc16565b600160a060020a038416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b600554600160a060020a031681565b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600091600160a060020a038416916370a082319160248082019260209290919082900301818787803b158015610a1f57600080fd5b505af1158015610a33573d6000803e3d6000fd5b505050506040513d6020811015610a4957600080fd5b505192915050565b336000908152600260209081526040808320600160a060020a0386168452909152812054610a85908363ffffffff610bbc16565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600354600160a060020a03163314610b2c57600080fd5b600160a060020a0381161515610b4157600080fd5b600354604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600082821115610bb657fe5b50900390565b600082820183811015610bcb57fe5b93925050505600a165627a7a723058201028c1c13f458cb553a8dc31899dbfe16ebedf48201e2f7da738cee28234f9910029", "bytecode_runtime": "0x6080604052600436106100f05763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663095ea7b381146100f557806316114acd1461012d57806318160ddd1461015057806323b872dd146101775780634b2ba0dd146101a157806361d3d7a6146101b657806366188463146101cb57806370a08231146101ef578063753e88e5146102105780638da5cb5b14610234578063a9059cbb14610265578063b31c710a14610289578063c45d19db1461029e578063d73dd623146102bf578063dd62ed3e146102e3578063eefa597b146101b6578063f2fde38b1461030a575b600080fd5b34801561010157600080fd5b50610119600160a060020a036004351660243561032b565b604080519115158252519081900360200190f35b34801561013957600080fd5b5061014e600160a060020a0360043516610391565b005b34801561015c57600080fd5b50610165610461565b60408051918252519081900360200190f35b34801561018357600080fd5b50610119600160a060020a0360043581169060243516604435610467565b3480156101ad57600080fd5b506101656105de565b3480156101c257600080fd5b506101196105e4565b3480156101d757600080fd5b50610119600160a060020a03600435166024356105e9565b3480156101fb57600080fd5b50610165600160a060020a03600435166106d9565b34801561021c57600080fd5b5061014e600160a060020a03600435166024356106f4565b34801561024057600080fd5b506102496108bc565b60408051600160a060020a039092168252519081900360200190f35b34801561027157600080fd5b50610119600160a060020a03600435166024356108cb565b34801561029557600080fd5b506102496109ac565b3480156102aa57600080fd5b50610165600160a060020a03600435166109bb565b3480156102cb57600080fd5b50610119600160a060020a0360043516602435610a51565b3480156102ef57600080fd5b50610165600160a060020a0360043581169060243516610aea565b34801561031657600080fd5b5061014e600160a060020a0360043516610b15565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b600354600160a060020a031633146103a857600080fd5b600354600160a060020a038083169163a9059cbb91166103c7846109bb565b6040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b15801561043257600080fd5b505af1158015610446573d6000803e3d6000fd5b505050506040513d602081101561045c57600080fd5b505050565b60015490565b6000600160a060020a038316151561047e57600080fd5b600160a060020a0384166000908152602081905260409020548211156104a357600080fd5b600160a060020a03841660009081526002602090815260408083203384529091529020548211156104d357600080fd5b600160a060020a0384166000908152602081905260409020546104fc908363ffffffff610baa16565b600160a060020a038086166000908152602081905260408082209390935590851681522054610531908363ffffffff610bbc16565b600160a060020a03808516600090815260208181526040808320949094559187168152600282528281203382529091522054610573908363ffffffff610baa16565b600160a060020a03808616600081815260026020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b60065481565b600190565b336000908152600260209081526040808320600160a060020a03861684529091528120548083111561063e57336000908152600260209081526040808320600160a060020a0388168452909152812055610673565b61064e818463ffffffff610baa16565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a031660009081526020819052604090205490565b600554600160a060020a0316331461070b57600080fd5b60015473__contracts/SafeMathLib.sol:SafeMathLi__6366098d4f9091836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b15801561078257600080fd5b505af4158015610796573d6000803e3d6000fd5b505050506040513d60208110156107ac57600080fd5b5051600155600160a060020a038216600090815260208181526040918290205482517f66098d4f000000000000000000000000000000000000000000000000000000008152600481019190915260248101849052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561083a57600080fd5b505af415801561084e573d6000803e3d6000fd5b505050506040513d602081101561086457600080fd5b5051600160a060020a0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b600354600160a060020a031681565b6000600160a060020a03831615156108e257600080fd5b336000908152602081905260409020548211156108fe57600080fd5b3360009081526020819052604090205461091e908363ffffffff610baa16565b3360009081526020819052604080822092909255600160a060020a03851681522054610950908363ffffffff610bbc16565b600160a060020a038416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b600554600160a060020a031681565b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600091600160a060020a038416916370a082319160248082019260209290919082900301818787803b158015610a1f57600080fd5b505af1158015610a33573d6000803e3d6000fd5b505050506040513d6020811015610a4957600080fd5b505192915050565b336000908152600260209081526040808320600160a060020a0386168452909152812054610a85908363ffffffff610bbc16565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600354600160a060020a03163314610b2c57600080fd5b600160a060020a0381161515610b4157600080fd5b600354604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600082821115610bb657fe5b50900390565b600082820183811015610bcb57fe5b93925050505600a165627a7a723058201028c1c13f458cb553a8dc31899dbfe16ebedf48201e2f7da738cee28234f9910029", "direct_dependencies": ["SafeMathLib"], "full_dependencies": ["SafeMathLib"], "linkrefs": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 4124}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 4612}], "linkrefs_runtime": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 3616}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 4104}], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "approve", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "recoverTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_from", "type": "address"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "originalSupply", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isUpgradeAgent", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_subtractedValue", "type": "uint256"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_from", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "upgradeFrom", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "oldToken", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "tokensToBeReturned", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_addedValue", "type": "uint256"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}, {"name": "_spender", "type": "address"}], "name": "allowance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isToken", "outputs": [{"name": "weAre", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [{"name": "_oldToken", "type": "address"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"payable": true, "stateMutability": "payable", "type": "fallback"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}, {"indexed": true, "name": "spender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "devdoc": {"methods": {"allowance(address,address)": {"details": "Function to check the amount of tokens that an owner allowed to a spender.", "params": {"_owner": "address The address which owns the funds.", "_spender": "address The address which will spend the funds."}, "return": "A uint256 specifying the amount of tokens still available for the spender."}, "approve(address,uint256)": {"details": "Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729", "params": {"_spender": "The address which will spend the funds.", "_value": "The amount of tokens to be spent."}}, "balanceOf(address)": {"details": "Gets the balance of the specified address.", "params": {"_owner": "The address to query the the balance of."}, "return": "An uint256 representing the amount owned by the passed address."}, "decreaseApproval(address,uint256)": {"details": "Decrease the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[_spender] == 0. To decrement allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"_spender": "The address which will spend the funds.", "_subtractedValue": "The amount of tokens to decrease the allowance by."}}, "increaseApproval(address,uint256)": {"details": "Increase the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[_spender] == 0. To increment allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"_addedValue": "The amount of tokens to increase the allowance by.", "_spender": "The address which will spend the funds."}}, "recoverTokens(address)": {"details": "This will be invoked by the owner, when owner wants to rescue tokens", "params": {"token": "Token which will we rescue to the owner from the contract"}}, "tokensToBeReturned(address)": {"details": "Interface function, can be overwritten by the superclass", "params": {"token": "Token which balance we will check and return"}, "return": "The amount of tokens (in smallest denominator) the contract owns"}, "totalSupply()": {"details": "total number of tokens in existence"}, "transfer(address,uint256)": {"details": "transfer token for a specified address", "params": {"_to": "The address to transfer to.", "_value": "The amount to be transferred."}}, "transferFrom(address,address,uint256)": {"details": "Transfer tokens from one address to another", "params": {"_from": "address The address which you want to send tokens from", "_to": "address The address which you want to transfer to", "_value": "uint256 the amount of tokens to be transferred"}}, "transferOwnership(address)": {"details": "Allows the current owner to transfer control of the contract to a newOwner.", "params": {"newOwner": "The address to transfer ownership to."}}}}, "userdoc": {"methods": {"isUpgradeAgent()": {"notice": "Interface marker "}}}}, "settings": {"compilationTarget": {"contracts/test/TestMigrationTarget.sol": "TestMigrationTarget"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/MintableToken.sol": {"keccak256": "0x650e1d6b2bedcd36508918357c7cf4f36fdd093cd0c4d6342f4dcd3bdcdd7578", "urls": ["bzzr://7ba2ac0480d428066a18727e2adb76ba56856ecd37b4420e801131ec8f8f4be3"]}, "contracts/Recoverable.sol": {"keccak256": "0x311a332cdd87df6e00057f5455f4e68b043b5dbe211f6d68bc64e20817515635", "urls": ["bzzr://4fd99bcfb93baed6e7c8d22ee9ecc5c8346a1aa98288e77b01333b2c5d3f582d"]}, "contracts/SafeMathLib.sol": {"keccak256": "0x501bfe31e274b9a5591f7c540bdced4d4312e27d4f19599147c9bbca3d9c6b18", "urls": ["bzzr://a80935ebddb06c247d71372d4e5833ee029f08633bd0fe4a274a57009567e5b9"]}, "contracts/StandardTokenExt.sol": {"keccak256": "0x9ea2d4cec4dccd5639c05e6c23dd027d80b5e5a20abd99b280ab7b2631b5a5fc", "urls": ["bzzr://a52d8fc5a21bd83997aff19128e00dceb251df712207b61223894c8b7f42d5ff"]}, "contracts/UpgradeAgent.sol": {"keccak256": "0x88e793f72feca4a18d2cd06e6037c1413d7b963eabcf5626d60bfb9d04d6e8e6", "urls": ["bzzr://87e39a65cf25d539ab49ad7e759b3298b8a19272964e69e3f2432f0323f30025"]}, "contracts/UpgradeableToken.sol": {"keccak256": "0xa74fc300c514564ece81c86905502c2de674b69c0633b133af19c1ba027da2c9", "urls": ["bzzr://55bc0b908c94781462b8959f051c6dbb53c35641b0f8cb38d74632ad6bf95e52"]}, "contracts/test/TestMigrationTarget.sol": {"keccak256": "0x513d13f3ce0df07833d65d0623e7abb333fd7c3b2108a0fe2ac2858c779d5f43", "urls": ["bzzr://5746677c3b6f2f23846dbdb584058ee097ab4520016a33aaaa9914b8329aa22e"]}, "zeppelin/contracts/math/SafeMath.sol": {"keccak256": "0x341ba8cb467a3623e819ba1a683ac1d264005186f308505214e5f6bc89446a08", "urls": ["bzzr://59b5652ee4e4a1b5a8f1a8906e14c84af43d636cf5ca0725cc1813aabe4c8c17"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}, "zeppelin/contracts/token/ERC20/BasicToken.sol": {"keccak256": "0x948404468d61ff35ea4194650670408dabd65da7f905a1c16888ab84520bf39e", "urls": ["bzzr://ea75e20f95d7e4e10394fe6bfaa8eee56b4757c2a6f1e8df4180d33afa621935"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}, "zeppelin/contracts/token/ERC20/StandardToken.sol": {"keccak256": "0xd2b344a5259e19ec143074cfa65637a10c40b68395c59808c4af13bccbb2de55", "urls": ["bzzr://d61a01175a7ca1ba9f4403de603c20b897e33ec425aef2d9f8a7f9ddfdfaf5b2"]}}, "version": 1}, "name": "TestMigrationTarget", "ordered_full_dependencies": ["SafeMathLib"], "source_path": "contracts/test/TestMigrationTarget.sol", "source": "\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Safe unsigned safe math.\n *\n * https://blog.aragon.one/library-driven-development-in-solidity-2bebcaf88736#.750gwtwli\n *\n * Originally from https://raw.githubusercontent.com/AragonOne/zeppelin-solidity/master/contracts/SafeMathLib.sol\n *\n * Maintained here until merged to mainline zeppelin-solidity.\n *\n */\nlibrary SafeMathLib {\n\n function times(uint a, uint b) returns (uint) {\n uint c = a * b;\n assert(a == 0 || c / a == b);\n return c;\n }\n\n function minus(uint a, uint b) returns (uint) {\n assert(b <= a);\n return a - b;\n }\n\n function plus(uint a, uint b) returns (uint) {\n uint c = a + b;\n assert(c>=a);\n return c;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n assert(c / a == b);\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n\n\n\n/**\n * @title Basic token\n * @dev Basic version of StandardToken, with no allowances.\n */\ncontract BasicToken is ERC20Basic {\n using SafeMath for uint256;\n\n mapping(address => uint256) balances;\n\n uint256 totalSupply_;\n\n /**\n * @dev total number of tokens in existence\n */\n function totalSupply() public view returns (uint256) {\n return totalSupply_;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param _to The address to transfer to.\n * @param _value The amount to be transferred.\n */\n function transfer(address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[msg.sender]);\n\n // SafeMath.sub will throw if there is not enough balance.\n balances[msg.sender] = balances[msg.sender].sub(_value);\n balances[_to] = balances[_to].add(_value);\n Transfer(msg.sender, _to, _value);\n return true;\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param _owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address _owner) public view returns (uint256 balance) {\n return balances[_owner];\n }\n\n}\n\n\n\n\n/**\n * @title Standard ERC20 token\n *\n * @dev Implementation of the basic standard token.\n * @dev https://github.com/ethereum/EIPs/issues/20\n * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol\n */\ncontract StandardToken is ERC20, BasicToken {\n\n mapping (address => mapping (address => uint256)) internal allowed;\n\n\n /**\n * @dev Transfer tokens from one address to another\n * @param _from address The address which you want to send tokens from\n * @param _to address The address which you want to transfer to\n * @param _value uint256 the amount of tokens to be transferred\n */\n function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[_from]);\n require(_value <= allowed[_from][msg.sender]);\n\n balances[_from] = balances[_from].sub(_value);\n balances[_to] = balances[_to].add(_value);\n allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);\n Transfer(_from, _to, _value);\n return true;\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n *\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param _spender The address which will spend the funds.\n * @param _value The amount of tokens to be spent.\n */\n function approve(address _spender, uint256 _value) public returns (bool) {\n allowed[msg.sender][_spender] = _value;\n Approval(msg.sender, _spender, _value);\n return true;\n }\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param _owner address The address which owns the funds.\n * @param _spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address _owner, address _spender) public view returns (uint256) {\n return allowed[_owner][_spender];\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(address _spender, uint _addedValue) public returns (bool) {\n allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {\n uint oldValue = allowed[msg.sender][_spender];\n if (_subtractedValue > oldValue) {\n allowed[msg.sender][_spender] = 0;\n } else {\n allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);\n }\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n\ncontract Recoverable is Ownable {\n\n /// @dev Empty constructor (for now)\n function Recoverable() {\n }\n\n /// @dev This will be invoked by the owner, when owner wants to rescue tokens\n /// @param token Token which will we rescue to the owner from the contract\n function recoverTokens(ERC20Basic token) onlyOwner public {\n token.transfer(owner, tokensToBeReturned(token));\n }\n\n /// @dev Interface function, can be overwritten by the superclass\n /// @param token Token which balance we will check and return\n /// @return The amount of tokens (in smallest denominator) the contract owns\n function tokensToBeReturned(ERC20Basic token) public returns (uint) {\n return token.balanceOf(this);\n }\n}\n\n\n\n/**\n * Standard EIP-20 token with an interface marker.\n *\n * @notice Interface marker is used by crowdsale contracts to validate that addresses point a good token contract.\n *\n */\ncontract StandardTokenExt is StandardToken, Recoverable {\n\n /* Interface declaration */\n function isToken() public constant returns (bool weAre) {\n return true;\n }\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Upgrade agent interface inspired by Lunyr.\n *\n * Upgrade agent transfers tokens to a new contract.\n * Upgrade agent itself can be the token contract, or just a middle man contract doing the heavy lifting.\n */\ncontract UpgradeAgent {\n\n uint public originalSupply;\n\n /** Interface marker */\n function isUpgradeAgent() public constant returns (bool) {\n return true;\n }\n\n function upgradeFrom(address _from, uint256 _value) public;\n\n}\n\n\n/**\n * A token upgrade mechanism where users can opt-in amount of tokens to the next smart contract revision.\n *\n * First envisioned by Golem and Lunyr projects.\n */\ncontract UpgradeableToken is StandardTokenExt {\n\n /** Contract / person who can set the upgrade path. This can be the same as team multisig wallet, as what it is with its default value. */\n address public upgradeMaster;\n\n /** The next contract where the tokens will be migrated. */\n UpgradeAgent public upgradeAgent;\n\n /** How many tokens we have upgraded by now. */\n uint256 public totalUpgraded;\n\n /**\n * Upgrade states.\n *\n * - NotAllowed: The child contract has not reached a condition where the upgrade can bgun\n * - WaitingForAgent: Token allows upgrade, but we don't have a new agent yet\n * - ReadyToUpgrade: The agent is set, but not a single token has been upgraded yet\n * - Upgrading: Upgrade agent is set and the balance holders can upgrade their tokens\n *\n */\n enum UpgradeState {Unknown, NotAllowed, WaitingForAgent, ReadyToUpgrade, Upgrading}\n\n /**\n * Somebody has upgraded some of his tokens.\n */\n event Upgrade(address indexed _from, address indexed _to, uint256 _value);\n\n /**\n * New upgrade agent available.\n */\n event UpgradeAgentSet(address agent);\n\n /**\n * Do not allow construction without upgrade master set.\n */\n function UpgradeableToken(address _upgradeMaster) {\n upgradeMaster = _upgradeMaster;\n }\n\n /**\n * Allow the token holder to upgrade some of their tokens to a new contract.\n */\n function upgrade(uint256 value) public {\n\n UpgradeState state = getUpgradeState();\n if(!(state == UpgradeState.ReadyToUpgrade || state == UpgradeState.Upgrading)) {\n // Called in a bad state\n throw;\n }\n\n // Validate input value.\n if (value == 0) throw;\n\n balances[msg.sender] = balances[msg.sender].sub(value);\n\n // Take tokens out from circulation\n totalSupply_ = totalSupply_.sub(value);\n totalUpgraded = totalUpgraded.add(value);\n\n // Upgrade agent reissues the tokens\n upgradeAgent.upgradeFrom(msg.sender, value);\n Upgrade(msg.sender, upgradeAgent, value);\n }\n\n /**\n * Set an upgrade agent that handles\n */\n function setUpgradeAgent(address agent) external {\n\n if(!canUpgrade()) {\n // The token is not yet in a state that we could think upgrading\n throw;\n }\n\n if (agent == 0x0) throw;\n // Only a master can designate the next agent\n if (msg.sender != upgradeMaster) throw;\n // Upgrade has already begun for an agent\n if (getUpgradeState() == UpgradeState.Upgrading) throw;\n\n upgradeAgent = UpgradeAgent(agent);\n\n // Bad interface\n if(!upgradeAgent.isUpgradeAgent()) throw;\n // Make sure that token supplies match in source and target\n if (upgradeAgent.originalSupply() != totalSupply_) throw;\n\n UpgradeAgentSet(upgradeAgent);\n }\n\n /**\n * Get the state of the token upgrade.\n */\n function getUpgradeState() public constant returns(UpgradeState) {\n if(!canUpgrade()) return UpgradeState.NotAllowed;\n else if(address(upgradeAgent) == 0x00) return UpgradeState.WaitingForAgent;\n else if(totalUpgraded == 0) return UpgradeState.ReadyToUpgrade;\n else return UpgradeState.Upgrading;\n }\n\n /**\n * Change the upgrade master.\n *\n * This allows us to set a new owner for the upgrade mechanism.\n */\n function setUpgradeMaster(address master) public {\n if (master == 0x0) throw;\n if (msg.sender != upgradeMaster) throw;\n upgradeMaster = master;\n }\n\n /**\n * Child contract can enable to provide the condition when the upgrade can begun.\n */\n function canUpgrade() public constant returns(bool) {\n return true;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n\n/**\n * A token that can increase its supply by another contract.\n *\n * This allows uncapped crowdsale by dynamically increasing the supply when money pours in.\n * Only mint agents, contracts whitelisted by owner, can mint new tokens.\n *\n */\ncontract MintableToken is StandardTokenExt {\n\n using SafeMathLib for uint;\n\n bool public mintingFinished = false;\n\n /** List of agents that are allowed to create new tokens */\n mapping (address => bool) public mintAgents;\n\n event MintingAgentChanged(address addr, bool state);\n event Minted(address receiver, uint amount);\n\n /**\n * Create new tokens and allocate them to an address..\n *\n * Only callably by a crowdsale contract (mint agent).\n */\n function mint(address receiver, uint amount) onlyMintAgent canMint public {\n totalSupply_ = totalSupply_.plus(amount);\n balances[receiver] = balances[receiver].plus(amount);\n\n // This will make the mint transaction apper in EtherScan.io\n // We can remove this after there is a standardized minting event\n Transfer(0, receiver, amount);\n }\n\n /**\n * Owner can allow a crowdsale contract to mint new tokens.\n */\n function setMintAgent(address addr, bool state) onlyOwner canMint public {\n mintAgents[addr] = state;\n MintingAgentChanged(addr, state);\n }\n\n modifier onlyMintAgent() {\n // Only crowdsale contracts are allowed to mint new tokens\n if(!mintAgents[msg.sender]) {\n throw;\n }\n _;\n }\n\n /** Make sure we are not done yet. */\n modifier canMint() {\n if(mintingFinished) throw;\n _;\n }\n}\n\n\n/**\n * A sample token that is used as a migration testing target.\n *\n * This is not an actual token, but just a stub used in testing.\n */\ncontract TestMigrationTarget is StandardTokenExt, UpgradeAgent {\n\n using SafeMathLib for uint;\n\n UpgradeableToken public oldToken;\n\n uint public originalSupply;\n\n function TestMigrationTarget(UpgradeableToken _oldToken) {\n\n oldToken = _oldToken;\n\n // Let's not set bad old token\n if(address(oldToken) == 0) {\n throw;\n }\n\n // Let's make sure we have something to migrate\n originalSupply = _oldToken.totalSupply();\n if(originalSupply == 0) {\n throw;\n }\n }\n\n function upgradeFrom(address _from, uint256 _value) public {\n if (msg.sender != address(oldToken)) throw; // only upgrade from oldToken\n\n // Mint new tokens to the migrator\n totalSupply_ = totalSupply_.plus(_value);\n balances[_from] = balances[_from].plus(_value);\n Transfer(0, _from, _value);\n }\n\n function() public payable {\n throw;\n }\n\n}\n"}, "TestSolidityAddressHash": {"abi": [{"constant": true, "inputs": [], "name": "leftPad", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getHashLeftPad", "outputs": [{"name": "", "type": "bytes32"}], "payable": false, "stateMutability": "view", "type": "function"}], "bytecode": "0x608060405260008054600160a060020a03191672b5557397b157a17fb1abca97a38e4646bedb8817905534801561003557600080fd5b50610176806100456000396000f30060806040526004361061004b5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663b2d55f6c8114610050578063ceb413851461008e575b600080fd5b34801561005c57600080fd5b506100656100b5565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561009a57600080fd5b506100a36100d1565b60408051918252519081900360200190f35b60005473ffffffffffffffffffffffffffffffffffffffff1681565b600080546040805173ffffffffffffffffffffffffffffffffffffffff9092166c010000000000000000000000000282525182916002916014808301926020929190829003018186865af115801561012d573d6000803e3d6000fd5b5050506040513d602081101561014257600080fd5b5051929150505600a165627a7a72305820b39c24d5e7475f7976a9e9ad9a77d939c28b7616a9adb938ea191dc3a79841aa0029", "bytecode_runtime": "0x60806040526004361061004b5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663b2d55f6c8114610050578063ceb413851461008e575b600080fd5b34801561005c57600080fd5b506100656100b5565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561009a57600080fd5b506100a36100d1565b60408051918252519081900360200190f35b60005473ffffffffffffffffffffffffffffffffffffffff1681565b600080546040805173ffffffffffffffffffffffffffffffffffffffff9092166c010000000000000000000000000282525182916002916014808301926020929190829003018186865af115801561012d573d6000803e3d6000fd5b5050506040513d602081101561014257600080fd5b5051929150505600a165627a7a72305820b39c24d5e7475f7976a9e9ad9a77d939c28b7616a9adb938ea191dc3a79841aa0029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": true, "inputs": [], "name": "leftPad", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getHashLeftPad", "outputs": [{"name": "", "type": "bytes32"}], "payable": false, "stateMutability": "view", "type": "function"}], "devdoc": {"methods": {}}, "userdoc": {"methods": {}}}, "settings": {"compilationTarget": {"contracts/test/TestSolidityAddressHash.sol": "TestSolidityAddressHash"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/test/TestSolidityAddressHash.sol": {"keccak256": "0x07ac47cbce4a8d8752f055bb69b40d68a23be63e0979445a9cb24d9647cf467d", "urls": ["bzzr://8b7238513d31a339ebdf3d2cf3070ac4899b7bd8e1e590f7dc8408bccc593ed8"]}}, "version": 1}, "name": "TestSolidityAddressHash", "ordered_full_dependencies": [], "source_path": "contracts/test/TestSolidityAddressHash.sol", "source": "\n/**\n * Test address hash behavior with left and right padded zeroes.\n */\ncontract TestSolidityAddressHash {\n\n address public leftPad = 0x00b5557397B157a17fb1AbCa97a38e4646BEDb88;\n\n // Solidity 0.4.11+ needs a valid address here\n //address public rightPad = 00x88b5557397B157a17fb1AbCa97a38e4646BEDb00;\n\n function getHashLeftPad() public constant returns (bytes32) {\n bytes32 hash = sha256(leftPad);\n return hash;\n }\n\n /*\n function getHashRightPad() public constant returns (bytes32) {\n bytes32 hash = sha256(rightPad);\n return hash;\n }*/\n\n}\n"}, "TimeVault": {"abi": [{"constant": true, "inputs": [], "name": "getTokenBalance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isTimeVault", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "unlockedAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "unlock", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "teamMultisig", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "token", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [{"name": "_teamMultisig", "type": "address"}, {"name": "_token", "type": "address"}, {"name": "_unlockedAt", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"payable": false, "stateMutability": "nonpayable", "type": "fallback"}, {"anonymous": false, "inputs": [], "name": "Unlocked", "type": "event"}], "bytecode": "0x60806040526000805460ff1916600117905534801561001d57600080fd5b5060405160608061044b83398101604090815281516020830151919092015160018054600160a060020a031916600160a060020a0380861691909117918290556000805461010060a860020a03191661010083871602179055600283905516151561008757600080fd5b6000546101009004600160a060020a031615156100a357600080fd5b505050610396806100b56000396000f3006080604052600436106100775763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166382b2e257811461008957806389c1108d146100b05780638cb1e9c1146100d9578063a69df4b5146100ee578063dbc0c08514610105578063fc0c546a14610143575b34801561008357600080fd5b50600080fd5b34801561009557600080fd5b5061009e610158565b60408051918252519081900360200190f35b3480156100bc57600080fd5b506100c5610200565b604080519115158252519081900360200190f35b3480156100e557600080fd5b5061009e610209565b3480156100fa57600080fd5b5061010361020f565b005b34801561011157600080fd5b5061011a61032d565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561014f57600080fd5b5061011a610349565b60008054604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905161010090920473ffffffffffffffffffffffffffffffffffffffff16916370a082319160248082019260209290919082900301818787803b1580156101cf57600080fd5b505af11580156101e3573d6000803e3d6000fd5b505050506040513d60208110156101f957600080fd5b5051905090565b60005460ff1681565b60025481565b60025442101561021e57600080fd5b60005460015473ffffffffffffffffffffffffffffffffffffffff61010090920482169163a9059cbb9116610251610158565b6040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156102d657600080fd5b505af11580156102ea573d6000803e3d6000fd5b505050506040513d602081101561030057600080fd5b50506040517f19aad37188a1d3921e29eb3c66acf43d81975e107cb650d58cca878627955fd690600090a1565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b600054610100900473ffffffffffffffffffffffffffffffffffffffff16815600a165627a7a72305820cf8b7c079444960b2d41bf50cc5e31d9507812ccc7a11dd6758238d9a0d565ce0029", "bytecode_runtime": "0x6080604052600436106100775763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166382b2e257811461008957806389c1108d146100b05780638cb1e9c1146100d9578063a69df4b5146100ee578063dbc0c08514610105578063fc0c546a14610143575b34801561008357600080fd5b50600080fd5b34801561009557600080fd5b5061009e610158565b60408051918252519081900360200190f35b3480156100bc57600080fd5b506100c5610200565b604080519115158252519081900360200190f35b3480156100e557600080fd5b5061009e610209565b3480156100fa57600080fd5b5061010361020f565b005b34801561011157600080fd5b5061011a61032d565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561014f57600080fd5b5061011a610349565b60008054604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905161010090920473ffffffffffffffffffffffffffffffffffffffff16916370a082319160248082019260209290919082900301818787803b1580156101cf57600080fd5b505af11580156101e3573d6000803e3d6000fd5b505050506040513d60208110156101f957600080fd5b5051905090565b60005460ff1681565b60025481565b60025442101561021e57600080fd5b60005460015473ffffffffffffffffffffffffffffffffffffffff61010090920482169163a9059cbb9116610251610158565b6040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156102d657600080fd5b505af11580156102ea573d6000803e3d6000fd5b505050506040513d602081101561030057600080fd5b50506040517f19aad37188a1d3921e29eb3c66acf43d81975e107cb650d58cca878627955fd690600090a1565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b600054610100900473ffffffffffffffffffffffffffffffffffffffff16815600a165627a7a72305820cf8b7c079444960b2d41bf50cc5e31d9507812ccc7a11dd6758238d9a0d565ce0029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": true, "inputs": [], "name": "getTokenBalance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isTimeVault", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "unlockedAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "unlock", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "teamMultisig", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "token", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [{"name": "_teamMultisig", "type": "address"}, {"name": "_token", "type": "address"}, {"name": "_unlockedAt", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"payable": false, "stateMutability": "nonpayable", "type": "fallback"}, {"anonymous": false, "inputs": [], "name": "Unlocked", "type": "event"}], "devdoc": {"methods": {}}, "userdoc": {"methods": {}}}, "settings": {"compilationTarget": {"contracts/TimeVault.sol": "TimeVault"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/Recoverable.sol": {"keccak256": "0x311a332cdd87df6e00057f5455f4e68b043b5dbe211f6d68bc64e20817515635", "urls": ["bzzr://4fd99bcfb93baed6e7c8d22ee9ecc5c8346a1aa98288e77b01333b2c5d3f582d"]}, "contracts/StandardTokenExt.sol": {"keccak256": "0x9ea2d4cec4dccd5639c05e6c23dd027d80b5e5a20abd99b280ab7b2631b5a5fc", "urls": ["bzzr://a52d8fc5a21bd83997aff19128e00dceb251df712207b61223894c8b7f42d5ff"]}, "contracts/TimeVault.sol": {"keccak256": "0xa18e04c4f5f8e45712d8fba67ec5296eefeeb716ab70b59465e64678f00c82bd", "urls": ["bzzr://8b279a3ab2afb95d8e0c993f54014b4c1a08019fc177ce8240456ca8391e0aa2"]}, "zeppelin/contracts/math/SafeMath.sol": {"keccak256": "0x341ba8cb467a3623e819ba1a683ac1d264005186f308505214e5f6bc89446a08", "urls": ["bzzr://59b5652ee4e4a1b5a8f1a8906e14c84af43d636cf5ca0725cc1813aabe4c8c17"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}, "zeppelin/contracts/token/ERC20/BasicToken.sol": {"keccak256": "0x948404468d61ff35ea4194650670408dabd65da7f905a1c16888ab84520bf39e", "urls": ["bzzr://ea75e20f95d7e4e10394fe6bfaa8eee56b4757c2a6f1e8df4180d33afa621935"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}, "zeppelin/contracts/token/ERC20/StandardToken.sol": {"keccak256": "0xd2b344a5259e19ec143074cfa65637a10c40b68395c59808c4af13bccbb2de55", "urls": ["bzzr://d61a01175a7ca1ba9f4403de603c20b897e33ec425aef2d9f8a7f9ddfdfaf5b2"]}}, "version": 1}, "name": "TimeVault", "ordered_full_dependencies": [], "source_path": "contracts/TimeVault.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n assert(c / a == b);\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n\n\n\n/**\n * @title Basic token\n * @dev Basic version of StandardToken, with no allowances.\n */\ncontract BasicToken is ERC20Basic {\n using SafeMath for uint256;\n\n mapping(address => uint256) balances;\n\n uint256 totalSupply_;\n\n /**\n * @dev total number of tokens in existence\n */\n function totalSupply() public view returns (uint256) {\n return totalSupply_;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param _to The address to transfer to.\n * @param _value The amount to be transferred.\n */\n function transfer(address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[msg.sender]);\n\n // SafeMath.sub will throw if there is not enough balance.\n balances[msg.sender] = balances[msg.sender].sub(_value);\n balances[_to] = balances[_to].add(_value);\n Transfer(msg.sender, _to, _value);\n return true;\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param _owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address _owner) public view returns (uint256 balance) {\n return balances[_owner];\n }\n\n}\n\n\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n\n\n/**\n * @title Standard ERC20 token\n *\n * @dev Implementation of the basic standard token.\n * @dev https://github.com/ethereum/EIPs/issues/20\n * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol\n */\ncontract StandardToken is ERC20, BasicToken {\n\n mapping (address => mapping (address => uint256)) internal allowed;\n\n\n /**\n * @dev Transfer tokens from one address to another\n * @param _from address The address which you want to send tokens from\n * @param _to address The address which you want to transfer to\n * @param _value uint256 the amount of tokens to be transferred\n */\n function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[_from]);\n require(_value <= allowed[_from][msg.sender]);\n\n balances[_from] = balances[_from].sub(_value);\n balances[_to] = balances[_to].add(_value);\n allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);\n Transfer(_from, _to, _value);\n return true;\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n *\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param _spender The address which will spend the funds.\n * @param _value The amount of tokens to be spent.\n */\n function approve(address _spender, uint256 _value) public returns (bool) {\n allowed[msg.sender][_spender] = _value;\n Approval(msg.sender, _spender, _value);\n return true;\n }\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param _owner address The address which owns the funds.\n * @param _spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address _owner, address _spender) public view returns (uint256) {\n return allowed[_owner][_spender];\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(address _spender, uint _addedValue) public returns (bool) {\n allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {\n uint oldValue = allowed[msg.sender][_spender];\n if (_subtractedValue > oldValue) {\n allowed[msg.sender][_spender] = 0;\n } else {\n allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);\n }\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n\ncontract Recoverable is Ownable {\n\n /// @dev Empty constructor (for now)\n function Recoverable() {\n }\n\n /// @dev This will be invoked by the owner, when owner wants to rescue tokens\n /// @param token Token which will we rescue to the owner from the contract\n function recoverTokens(ERC20Basic token) onlyOwner public {\n token.transfer(owner, tokensToBeReturned(token));\n }\n\n /// @dev Interface function, can be overwritten by the superclass\n /// @param token Token which balance we will check and return\n /// @return The amount of tokens (in smallest denominator) the contract owns\n function tokensToBeReturned(ERC20Basic token) public returns (uint) {\n return token.balanceOf(this);\n }\n}\n\n\n\n/**\n * Standard EIP-20 token with an interface marker.\n *\n * @notice Interface marker is used by crowdsale contracts to validate that addresses point a good token contract.\n *\n */\ncontract StandardTokenExt is StandardToken, Recoverable {\n\n /* Interface declaration */\n function isToken() public constant returns (bool weAre) {\n return true;\n }\n}\n\n\n/**\n *\n * Time-locked token vault of allocated founder tokens.\n *\n * First used by Lunyr https://github.com/Lunyr/crowdsale-contracts\n *\n *\n * See TokenVault for multi user implementation.\n */\ncontract TimeVault {\n\n /** Interface flag to determine if address is for a real contract or not */\n bool public isTimeVault = true;\n\n /** Token we are holding */\n StandardTokenExt public token;\n\n /** Address that can claim tokens */\n address public teamMultisig;\n\n /** UNIX timestamp when tokens can be claimed. */\n uint256 public unlockedAt;\n\n event Unlocked();\n\n function TimeVault(address _teamMultisig, StandardTokenExt _token, uint _unlockedAt) {\n\n teamMultisig = _teamMultisig;\n token = _token;\n unlockedAt = _unlockedAt;\n\n // Sanity check\n if (teamMultisig == 0x0) throw;\n if (address(token) == 0x0) throw;\n }\n\n function getTokenBalance() public constant returns (uint) {\n return token.balanceOf(address(this));\n }\n\n function unlock() public {\n // Wait your turn!\n if (now < unlockedAt) throw;\n\n // StandardToken will throw in the case of transaction fails\n token.transfer(teamMultisig, getTokenBalance());\n\n Unlocked();\n }\n\n // disallow ETH payment for this vault\n function () { throw; }\n\n}\n"}, "TokenTranchePricing": {"abi": [{"constant": true, "inputs": [], "name": "isPricingStrategy", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "value", "type": "uint256"}, {"name": "weiRaised", "type": "uint256"}, {"name": "tokensSold", "type": "uint256"}, {"name": "msgSender", "type": "address"}, {"name": "decimals", "type": "uint256"}], "name": "calculatePrice", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "uint256"}], "name": "tranches", "outputs": [{"name": "amount", "type": "uint256"}, {"name": "price", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getPricingStartsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "trancheCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getPricingEndsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "MAX_TRANCHES", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "_crowdsale", "type": "address"}], "name": "isSane", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "tokensSold", "type": "uint256"}], "name": "getCurrentPrice", "outputs": [{"name": "result", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "n", "type": "uint256"}], "name": "getTranche", "outputs": [{"name": "", "type": "uint256"}, {"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "preicoAddress", "type": "address"}, {"name": "pricePerToken", "type": "uint256"}], "name": "setPreicoAddress", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "purchaser", "type": "address"}], "name": "isPresalePurchase", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "preicoAddresses", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [{"name": "_tranches", "type": "uint256[]"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"payable": true, "stateMutability": "payable", "type": "fallback"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "bytecode": "0x608060405234801561001057600080fd5b5060405161088738038061088783398101604052805160008054600160a060020a03191633178155910180519091908190600290066001148061005557508251601411155b1561005f57600080fd5b50508051600290046016556000805b82516002900481101561012c57828160020281518110151561008c57fe5b60209081029091010151600282600a81106100a357fe5b600202016000018190555082816002026001018151811015156100c257fe5b60209081029091010151600282600a81106100d957fe5b600202016001018190555081600014158015610106575081600282600a81106100fe57fe5b600202015411155b1561011057600080fd5b600281600a811061011d57fe5b6002020154915060010161006e565b60165460029060001901600a811061014057fe5b6002020160010154600014151561015657600080fd5b50505061071f806101686000396000f3006080604052600436106100da5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166304bbc25581146100df57806318a4155e1461010857806326c25962146101475780632c9a0a951461017857806359eb82241461018d5780636f079f90146101a257806389506a44146101b75780638da5cb5b146101cc5780638e768288146101fd578063c55d0f561461021e578063d972e8ad14610236578063e474f97a1461024e578063f14ae17d14610274578063f1ef9a0814610295578063f2fde38b146102b6575b600080fd5b3480156100eb57600080fd5b506100f46102d7565b604080519115158252519081900360200190f35b34801561011457600080fd5b50610135600435602435604435600160a060020a03606435166084356102dc565b60408051918252519081900360200190f35b34801561015357600080fd5b5061015f600435610490565b6040805192835260208301919091528051918290030190f35b34801561018457600080fd5b506101356104af565b34801561019957600080fd5b506101356104bf565b3480156101ae57600080fd5b506101356104c5565b3480156101c357600080fd5b506101356104cf565b3480156101d857600080fd5b506101e16104d4565b60408051600160a060020a039092168252519081900360200190f35b34801561020957600080fd5b506100f4600160a060020a03600435166104e3565b34801561022a57600080fd5b506101356004356104e9565b34801561024257600080fd5b5061015f6004356104fe565b34801561025a57600080fd5b50610272600160a060020a0360043516602435610536565b005b34801561028057600080fd5b506100f4600160a060020a0360043516610569565b3480156102a157600080fd5b50610135600160a060020a036004351661056f565b3480156102c257600080fd5b50610272600160a060020a0360043516610581565b600190565b600160a060020a038216600090815260016020526040812054600a83900a9082908110156103cb57600160a060020a0385166000908152600160209081526040918290205482517f1d3b9edf000000000000000000000000000000000000000000000000000000008152600481018c9052602481018690529251909273__contracts/SafeMathLib.sol:SafeMathLi__92631d3b9edf92604480840193829003018186803b15801561038e57600080fd5b505af41580156103a2573d6000803e3d6000fd5b505050506040513d60208110156103b857600080fd5b50518115156103c357fe5b049250610485565b6103d4866104e9565b9050808873__contracts/SafeMathLib.sol:SafeMathLi__631d3b9edf9091856040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b15801561044c57600080fd5b505af4158015610460573d6000803e3d6000fd5b505050506040513d602081101561047657600080fd5b505181151561048157fe5b0492505b505095945050505050565b600281600a811061049d57fe5b60020201805460019091015490915082565b60006104b9610615565b51905090565b60165481565b60006104b961064a565b600a81565b600054600160a060020a031681565b50600190565b60006104f482610666565b6020015192915050565b600080600283600a811061050e57fe5b6002020160000154600284600a8110151561052557fe5b600202016001015491509150915091565b600054600160a060020a0316331461054d57600080fd5b600160a060020a03909116600090815260016020526040902055565b50600090565b60016020526000908152604090205481565b600054600160a060020a0316331461059857600080fd5b600160a060020a03811615156105ad57600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b61061d6106dc565b600260005b6002020160408051908101604052908160008201548152602001600182015481525050905090565b6106526106dc565b60165460029060001901600a811061062257fe5b61066e6106dc565b60005b600a8110156106d657600281600a811061068757fe5b60020201548310156106ce5760026000198201600a81106106a457fe5b600202016040805190810160405290816000820154815260200160018201548152505091506106d6565b600101610671565b50919050565b6040805180820190915260008082526020820152905600a165627a7a72305820f0db255245865908b2777e82e39f41fe1a35748bc607b649a73911012cceb1490029", "bytecode_runtime": "0x6080604052600436106100da5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166304bbc25581146100df57806318a4155e1461010857806326c25962146101475780632c9a0a951461017857806359eb82241461018d5780636f079f90146101a257806389506a44146101b75780638da5cb5b146101cc5780638e768288146101fd578063c55d0f561461021e578063d972e8ad14610236578063e474f97a1461024e578063f14ae17d14610274578063f1ef9a0814610295578063f2fde38b146102b6575b600080fd5b3480156100eb57600080fd5b506100f46102d7565b604080519115158252519081900360200190f35b34801561011457600080fd5b50610135600435602435604435600160a060020a03606435166084356102dc565b60408051918252519081900360200190f35b34801561015357600080fd5b5061015f600435610490565b6040805192835260208301919091528051918290030190f35b34801561018457600080fd5b506101356104af565b34801561019957600080fd5b506101356104bf565b3480156101ae57600080fd5b506101356104c5565b3480156101c357600080fd5b506101356104cf565b3480156101d857600080fd5b506101e16104d4565b60408051600160a060020a039092168252519081900360200190f35b34801561020957600080fd5b506100f4600160a060020a03600435166104e3565b34801561022a57600080fd5b506101356004356104e9565b34801561024257600080fd5b5061015f6004356104fe565b34801561025a57600080fd5b50610272600160a060020a0360043516602435610536565b005b34801561028057600080fd5b506100f4600160a060020a0360043516610569565b3480156102a157600080fd5b50610135600160a060020a036004351661056f565b3480156102c257600080fd5b50610272600160a060020a0360043516610581565b600190565b600160a060020a038216600090815260016020526040812054600a83900a9082908110156103cb57600160a060020a0385166000908152600160209081526040918290205482517f1d3b9edf000000000000000000000000000000000000000000000000000000008152600481018c9052602481018690529251909273__contracts/SafeMathLib.sol:SafeMathLi__92631d3b9edf92604480840193829003018186803b15801561038e57600080fd5b505af41580156103a2573d6000803e3d6000fd5b505050506040513d60208110156103b857600080fd5b50518115156103c357fe5b049250610485565b6103d4866104e9565b9050808873__contracts/SafeMathLib.sol:SafeMathLi__631d3b9edf9091856040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b15801561044c57600080fd5b505af4158015610460573d6000803e3d6000fd5b505050506040513d602081101561047657600080fd5b505181151561048157fe5b0492505b505095945050505050565b600281600a811061049d57fe5b60020201805460019091015490915082565b60006104b9610615565b51905090565b60165481565b60006104b961064a565b600a81565b600054600160a060020a031681565b50600190565b60006104f482610666565b6020015192915050565b600080600283600a811061050e57fe5b6002020160000154600284600a8110151561052557fe5b600202016001015491509150915091565b600054600160a060020a0316331461054d57600080fd5b600160a060020a03909116600090815260016020526040902055565b50600090565b60016020526000908152604090205481565b600054600160a060020a0316331461059857600080fd5b600160a060020a03811615156105ad57600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b61061d6106dc565b600260005b6002020160408051908101604052908160008201548152602001600182015481525050905090565b6106526106dc565b60165460029060001901600a811061062257fe5b61066e6106dc565b60005b600a8110156106d657600281600a811061068757fe5b60020201548310156106ce5760026000198201600a81106106a457fe5b600202016040805190810160405290816000820154815260200160018201548152505091506106d6565b600101610671565b50919050565b6040805180820190915260008082526020820152905600a165627a7a72305820f0db255245865908b2777e82e39f41fe1a35748bc607b649a73911012cceb1490029", "direct_dependencies": ["SafeMathLib"], "full_dependencies": ["SafeMathLib"], "linkrefs": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 2436}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 2692}], "linkrefs_runtime": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 1716}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 1972}], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": true, "inputs": [], "name": "isPricingStrategy", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "value", "type": "uint256"}, {"name": "weiRaised", "type": "uint256"}, {"name": "tokensSold", "type": "uint256"}, {"name": "msgSender", "type": "address"}, {"name": "decimals", "type": "uint256"}], "name": "calculatePrice", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "uint256"}], "name": "tranches", "outputs": [{"name": "amount", "type": "uint256"}, {"name": "price", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getPricingStartsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "trancheCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getPricingEndsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "MAX_TRANCHES", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "_crowdsale", "type": "address"}], "name": "isSane", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "tokensSold", "type": "uint256"}], "name": "getCurrentPrice", "outputs": [{"name": "result", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "n", "type": "uint256"}], "name": "getTranche", "outputs": [{"name": "", "type": "uint256"}, {"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "preicoAddress", "type": "address"}, {"name": "pricePerToken", "type": "uint256"}], "name": "setPreicoAddress", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "purchaser", "type": "address"}], "name": "isPresalePurchase", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "preicoAddresses", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [{"name": "_tranches", "type": "uint256[]"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"payable": true, "stateMutability": "payable", "type": "fallback"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "devdoc": {"methods": {"calculatePrice(uint256,uint256,uint256,address,uint256)": {"details": "Calculate the current price for buy in amount."}, "getCurrentPrice(uint256)": {"details": "Get the current price.", "params": {"tokensSold": "total amount of tokens sold, for calculating the current tranche"}, "return": "The current price or 0 if we are outside trache ranges"}, "getTranche(uint256)": {"details": "Iterate through tranches. You reach end of tranches when price = 0", "return": "tuple (time, price)"}, "isPresalePurchase(address)": {"details": "Pricing tells if this is a presale purchase or not.", "params": {"purchaser": "Address of the purchaser"}, "return": "False by default, true if a presale purchaser"}, "setPreicoAddress(address,uint256)": {"details": "This is invoked once for every pre-ICO address, set pricePerToken to 0 to disable", "params": {"preicoAddress": "PresaleFundCollector address", "pricePerToken": "How many weis one token cost for pre-ico investors"}}, "transferOwnership(address)": {"details": "Allows the current owner to transfer control of the contract to a newOwner.", "params": {"newOwner": "The address to transfer ownership to."}}}}, "userdoc": {"methods": {"isPricingStrategy()": {"notice": "Interface declaration. "}}}}, "settings": {"compilationTarget": {"contracts/TokenTranchePricing.sol": "TokenTranchePricing"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/Crowdsale.sol": {"keccak256": "0x2697c26528f64bb954a7c2547d3b43317d2d2b02c7d9d05a7b1ab388cd79f65d", "urls": ["bzzr://f28b280794222114141c51dd5c388d403a7c98d8b51e04170a0e294246d5164b"]}, "contracts/CrowdsaleBase.sol": {"keccak256": "0xe2c9ed11183ce705616980df7b02544d72fe18b40395da7d9d4bcb621fb87871", "urls": ["bzzr://07f3887ba0d0eb3248b1ad3581480ed71a2fe70a47dcc283c4e97c8c92e0790a"]}, "contracts/FinalizeAgent.sol": {"keccak256": "0x309fd0510e0b3e2b5044e33f7c80cfb2d6f2a5697e41a5f185931d65770cfea9", "urls": ["bzzr://4e7ed6f82c0f542e92e56c12566b2ecd7666730865bf12566c27587ec64160ac"]}, "contracts/FractionalERC20.sol": {"keccak256": "0x75bc4ad90a8b13ce961c89b1bf405776f616e019d3a2720168f8e52be223198f", "urls": ["bzzr://6a3688f12da1a5c890ef06f80f883f6c5370886092d38a1b33cd4219b718478b"]}, "contracts/Haltable.sol": {"keccak256": "0x265dcf25e7c9ab4b6eecd2181f1b71334a1b5381a60f8db7d9526dab120f4b70", "urls": ["bzzr://d522e00fa9e075941469dd81738b59fdb99ce3c12cdc39e33abe40b588c4da9b"]}, "contracts/PricingStrategy.sol": {"keccak256": "0x8df5093b7d07168ad994f9176de0bd2268f6563b1e8a3a448d8cfe7fe246c628", "urls": ["bzzr://ef5c944d51f739ab34e2c951d6ac82a7152e6bb844058a8e57bae52c14cbe16b"]}, "contracts/SafeMathLib.sol": {"keccak256": "0x501bfe31e274b9a5591f7c540bdced4d4312e27d4f19599147c9bbca3d9c6b18", "urls": ["bzzr://a80935ebddb06c247d71372d4e5833ee029f08633bd0fe4a274a57009567e5b9"]}, "contracts/TokenTranchePricing.sol": {"keccak256": "0xb141f1583a49d484cd165b59f69688b404ede1abf0c7eb75f773fff78a0b22ff", "urls": ["bzzr://44a8680817476a5c8fdf69f959f37bee0e9c66bb94ba5f4d344872e5ce22bfe1"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}}, "version": 1}, "name": "TokenTranchePricing", "ordered_full_dependencies": ["SafeMathLib"], "source_path": "contracts/TokenTranchePricing.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Interface for defining crowdsale pricing.\n */\ncontract PricingStrategy {\n\n /** Interface declaration. */\n function isPricingStrategy() public constant returns (bool) {\n return true;\n }\n\n /** Self check if all references are correctly set.\n *\n * Checks that pricing strategy matches crowdsale parameters.\n */\n function isSane(address crowdsale) public constant returns (bool) {\n return true;\n }\n\n /**\n * @dev Pricing tells if this is a presale purchase or not.\n @param purchaser Address of the purchaser\n @return False by default, true if a presale purchaser\n */\n function isPresalePurchase(address purchaser) public constant returns (bool) {\n return false;\n }\n\n /**\n * When somebody tries to buy tokens for X eth, calculate how many tokens they get.\n *\n *\n * @param value - What is the value of the transaction send in as wei\n * @param tokensSold - how much tokens have been sold this far\n * @param weiRaised - how much money has been raised this far in the main token sale - this number excludes presale\n * @param msgSender - who is the investor of this transaction\n * @param decimals - how many decimal units the token has\n * @return Amount of tokens the investor receives\n */\n function calculatePrice(uint value, uint weiRaised, uint tokensSold, address msgSender, uint decimals) public constant returns (uint tokenAmount);\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Safe unsigned safe math.\n *\n * https://blog.aragon.one/library-driven-development-in-solidity-2bebcaf88736#.750gwtwli\n *\n * Originally from https://raw.githubusercontent.com/AragonOne/zeppelin-solidity/master/contracts/SafeMathLib.sol\n *\n * Maintained here until merged to mainline zeppelin-solidity.\n *\n */\nlibrary SafeMathLib {\n\n function times(uint a, uint b) returns (uint) {\n uint c = a * b;\n assert(a == 0 || c / a == b);\n return c;\n }\n\n function minus(uint a, uint b) returns (uint) {\n assert(b <= a);\n return a - b;\n }\n\n function plus(uint a, uint b) returns (uint) {\n uint c = a + b;\n assert(c>=a);\n return c;\n }\n\n}\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Finalize agent defines what happens at the end of succeseful crowdsale.\n *\n * - Allocate tokens for founders, bounties and community\n * - Make tokens transferable\n * - etc.\n */\ncontract FinalizeAgent {\n\n function isFinalizeAgent() public constant returns(bool) {\n return true;\n }\n\n /** Return true if we can run finalizeCrowdsale() properly.\n *\n * This is a safety check function that doesn't allow crowdsale to begin\n * unless the finalizer has been set up properly.\n */\n function isSane() public constant returns (bool);\n\n /** Called once by crowdsale finalize() if the sale was success. */\n function finalizeCrowdsale();\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n\n/**\n * A token that defines fractional units as decimals.\n */\ncontract FractionalERC20 is ERC20 {\n\n uint public decimals;\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n/*\n * Haltable\n *\n * Abstract contract that allows children to implement an\n * emergency stop mechanism. Differs from Pausable by causing a throw when in halt mode.\n *\n *\n * Originally envisioned in FirstBlood ICO contract.\n */\ncontract Haltable is Ownable {\n bool public halted;\n\n modifier stopInEmergency {\n if (halted) throw;\n _;\n }\n\n modifier stopNonOwnersInEmergency {\n if (halted && msg.sender != owner) throw;\n _;\n }\n\n modifier onlyInEmergency {\n if (!halted) throw;\n _;\n }\n\n // called by the owner on emergency, triggers stopped state\n function halt() external onlyOwner {\n halted = true;\n }\n\n // called by the owner on end of emergency, returns to normal state\n function unhalt() external onlyOwner onlyInEmergency {\n halted = false;\n }\n\n}\n\n\n\n\n\n\n\n/**\n * Crowdsale state machine without buy functionality.\n *\n * Implements basic state machine logic, but leaves out all buy functions,\n * so that subclasses can implement their own buying logic.\n *\n *\n * For the default buy() implementation see Crowdsale.sol.\n */\ncontract CrowdsaleBase is Haltable {\n\n /* Max investment count when we are still allowed to change the multisig address */\n uint public MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE = 5;\n\n using SafeMathLib for uint;\n\n /* The token we are selling */\n FractionalERC20 public token;\n\n /* How we are going to price our offering */\n PricingStrategy public pricingStrategy;\n\n /* Post-success callback */\n FinalizeAgent public finalizeAgent;\n\n /* tokens will be transfered from this address */\n address public multisigWallet;\n\n /* if the funding goal is not reached, investors may withdraw their funds */\n uint public minimumFundingGoal;\n\n /* the UNIX timestamp start date of the crowdsale */\n uint public startsAt;\n\n /* the UNIX timestamp end date of the crowdsale */\n uint public endsAt;\n\n /* the number of tokens already sold through this contract*/\n uint public tokensSold = 0;\n\n /* How many wei of funding we have raised */\n uint public weiRaised = 0;\n\n /* Calculate incoming funds from presale contracts and addresses */\n uint public presaleWeiRaised = 0;\n\n /* How many distinct addresses have invested */\n uint public investorCount = 0;\n\n /* How much wei we have returned back to the contract after a failed crowdfund. */\n uint public loadedRefund = 0;\n\n /* How much wei we have given back to investors.*/\n uint public weiRefunded = 0;\n\n /* Has this crowdsale been finalized */\n bool public finalized;\n\n /** How much ETH each address has invested to this crowdsale */\n mapping (address => uint256) public investedAmountOf;\n\n /** How much tokens this crowdsale has credited for each investor address */\n mapping (address => uint256) public tokenAmountOf;\n\n /** Addresses that are allowed to invest even before ICO offical opens. For testing, for ICO partners, etc. */\n mapping (address => bool) public earlyParticipantWhitelist;\n\n /** This is for manul testing for the interaction from owner wallet. You can set it to any value and inspect this in blockchain explorer to see that crowdsale interaction works. */\n uint public ownerTestValue;\n\n /** State machine\n *\n * - Preparing: All contract initialization calls and variables have not been set yet\n * - Prefunding: We have not passed start time yet\n * - Funding: Active crowdsale\n * - Success: Minimum funding goal reached\n * - Failure: Minimum funding goal not reached before ending time\n * - Finalized: The finalized has been called and succesfully executed\n * - Refunding: Refunds are loaded on the contract for reclaim.\n */\n enum State{Unknown, Preparing, PreFunding, Funding, Success, Failure, Finalized, Refunding}\n\n // A new investment was made\n event Invested(address investor, uint weiAmount, uint tokenAmount, uint128 customerId);\n\n // Refund was processed for a contributor\n event Refund(address investor, uint weiAmount);\n\n // The rules were changed what kind of investments we accept\n event InvestmentPolicyChanged(bool newRequireCustomerId, bool newRequiredSignedAddress, address newSignerAddress);\n\n // Address early participation whitelist status changed\n event Whitelisted(address addr, bool status);\n\n // Crowdsale end time has been changed\n event EndsAtChanged(uint newEndsAt);\n\n function CrowdsaleBase(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal) {\n\n owner = msg.sender;\n\n token = FractionalERC20(_token);\n setPricingStrategy(_pricingStrategy);\n\n multisigWallet = _multisigWallet;\n if(multisigWallet == 0) {\n throw;\n }\n\n if(_start == 0) {\n throw;\n }\n\n startsAt = _start;\n\n if(_end == 0) {\n throw;\n }\n\n endsAt = _end;\n\n // Don't mess the dates\n if(startsAt >= endsAt) {\n throw;\n }\n\n // Minimum funding goal can be zero\n minimumFundingGoal = _minimumFundingGoal;\n }\n\n /**\n * Don't expect to just send in money and get tokens.\n */\n function() payable {\n throw;\n }\n\n /**\n * @dev Make an investment.\n *\n * Crowdsale must be running for one to invest.\n * We must have not pressed the emergency brake.\n *\n * @param receiver The Ethereum address who receives the tokens\n * @param customerId (optional) UUID v4 to track the successful payments on the server side'\n * @param tokenAmount Amount of tokens which be credited to receiver\n *\n * @return tokensBought How mony tokens were bought\n */\n function buyTokens(address receiver, uint128 customerId, uint256 tokenAmount) stopInEmergency internal returns(uint tokensBought) {\n\n // Determine if it's a good time to accept investment from this participant\n if(getState() == State.PreFunding) {\n // Are we whitelisted for early deposit\n if(!earlyParticipantWhitelist[receiver]) {\n throw;\n }\n } else if(getState() == State.Funding) {\n // Retail participants can only come in when the crowdsale is running\n // pass\n } else {\n // Unwanted state\n throw;\n }\n\n uint weiAmount = msg.value;\n\n // Dust transaction\n require(tokenAmount != 0);\n\n if(investedAmountOf[receiver] == 0) {\n // A new investor\n investorCount++;\n }\n\n // Update investor\n investedAmountOf[receiver] = investedAmountOf[receiver].plus(weiAmount);\n tokenAmountOf[receiver] = tokenAmountOf[receiver].plus(tokenAmount);\n\n // Update totals\n weiRaised = weiRaised.plus(weiAmount);\n tokensSold = tokensSold.plus(tokenAmount);\n\n if(pricingStrategy.isPresalePurchase(receiver)) {\n presaleWeiRaised = presaleWeiRaised.plus(weiAmount);\n }\n\n // Check that we did not bust the cap\n require(!isBreakingCap(weiAmount, tokenAmount, weiRaised, tokensSold));\n\n assignTokens(receiver, tokenAmount);\n\n // Pocket the money, or fail the crowdsale if we for some reason cannot send the money to our multisig\n if(!multisigWallet.send(weiAmount)) throw;\n\n // Tell us invest was success\n Invested(receiver, weiAmount, tokenAmount, customerId);\n\n return tokenAmount;\n }\n\n /**\n * @dev Make an investment based on pricing strategy\n *\n * This is a wrapper for buyTokens(), but the amount of tokens receiver will\n * have depends on the pricing strategy used.\n *\n * @param receiver The Ethereum address who receives the tokens\n * @param customerId (optional) UUID v4 to track the successful payments on the server side'\n *\n * @return tokensBought How mony tokens were bought\n */\n function investInternal(address receiver, uint128 customerId) stopInEmergency internal returns(uint tokensBought) {\n return buyTokens(receiver, customerId, pricingStrategy.calculatePrice(msg.value, weiRaised - presaleWeiRaised, tokensSold, msg.sender, token.decimals()));\n }\n\n /**\n * @dev Calculate tokens user will have for their purchase\n *\n * @param weisTotal How much ethers (in wei) the user putssssss in\n * @param pricePerToken What is the price for one token\n *\n * @return tokensTotal which is received tokens, token decimals included\n */\n function calculateTokens(uint256 weisTotal, uint256 pricePerToken) public constant returns(uint tokensTotal) {\n // pricePerToken is how many full tokens, token decimal place included, you get for wei amount.\n // Because, in theory, decimal amount can vary, we do the exponent calculation here,\n // though gas wise using 10**18 constant would be much simpler.\n // Furthermore we could use rough amounts and take in raw wei per tokens amount,\n // but we lose too much accuracy for generic calculations, thus all these are\n // practically implemented as 10**18 fixed points.\n uint multiplier = 10 ** token.decimals();\n return weisTotal.times(multiplier)/pricePerToken;\n }\n\n /**\n * Finalize a succcesful crowdsale.\n *\n * The owner can triggre a call the contract that provides post-crowdsale actions, like releasing the tokens.\n */\n function finalize() public inState(State.Success) onlyOwner stopInEmergency {\n\n // Already finalized\n if(finalized) {\n throw;\n }\n\n // Finalizing is optional. We only call it if we are given a finalizing agent.\n if(address(finalizeAgent) != 0) {\n finalizeAgent.finalizeCrowdsale();\n }\n\n finalized = true;\n }\n\n /**\n * Allow to (re)set finalize agent.\n *\n * Design choice: no state restrictions on setting this, so that we can fix fat finger mistakes.\n */\n function setFinalizeAgent(FinalizeAgent addr) onlyOwner {\n finalizeAgent = addr;\n\n // Don't allow setting bad agent\n if(!finalizeAgent.isFinalizeAgent()) {\n throw;\n }\n }\n\n /**\n * Allow crowdsale owner to close early or extend the crowdsale.\n *\n * This is useful e.g. for a manual soft cap implementation:\n * - after X amount is reached determine manual closing\n *\n * This may put the crowdsale to an invalid state,\n * but we trust owners know what they are doing.\n *\n */\n function setEndsAt(uint time) onlyOwner {\n\n if(now > time) {\n throw; // Don't change past\n }\n\n if(startsAt > time) {\n throw; // Prevent human mistakes\n }\n\n endsAt = time;\n EndsAtChanged(endsAt);\n }\n\n /**\n * Allow to (re)set pricing strategy.\n *\n * Design choice: no state restrictions on the set, so that we can fix fat finger mistakes.\n */\n function setPricingStrategy(PricingStrategy _pricingStrategy) onlyOwner {\n pricingStrategy = _pricingStrategy;\n\n // Don't allow setting bad agent\n if(!pricingStrategy.isPricingStrategy()) {\n throw;\n }\n }\n\n /**\n * Allow to change the team multisig address in the case of emergency.\n *\n * This allows to save a deployed crowdsale wallet in the case the crowdsale has not yet begun\n * (we have done only few test transactions). After the crowdsale is going\n * then multisig address stays locked for the safety reasons.\n */\n function setMultisig(address addr) public onlyOwner {\n\n // Change\n if(investorCount > MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE) {\n throw;\n }\n\n multisigWallet = addr;\n }\n\n /**\n * Allow load refunds back on the contract for the refunding.\n *\n * The team can transfer the funds back on the smart contract in the case the minimum goal was not reached..\n */\n function loadRefund() public payable inState(State.Failure) {\n if(msg.value == 0) throw;\n loadedRefund = loadedRefund.plus(msg.value);\n }\n\n /**\n * Investors can claim refund.\n *\n * Note that any refunds from proxy buyers should be handled separately,\n * and not through this contract.\n */\n function refund() public inState(State.Refunding) {\n uint256 weiValue = investedAmountOf[msg.sender];\n if (weiValue == 0) throw;\n investedAmountOf[msg.sender] = 0;\n weiRefunded = weiRefunded.plus(weiValue);\n Refund(msg.sender, weiValue);\n if (!msg.sender.send(weiValue)) throw;\n }\n\n /**\n * @return true if the crowdsale has raised enough money to be a successful.\n */\n function isMinimumGoalReached() public constant returns (bool reached) {\n return weiRaised >= minimumFundingGoal;\n }\n\n /**\n * Check if the contract relationship looks good.\n */\n function isFinalizerSane() public constant returns (bool sane) {\n return finalizeAgent.isSane();\n }\n\n /**\n * Check if the contract relationship looks good.\n */\n function isPricingSane() public constant returns (bool sane) {\n return pricingStrategy.isSane(address(this));\n }\n\n /**\n * Crowdfund state machine management.\n *\n * We make it a function and do not assign the result to a variable, so there is no chance of the variable being stale.\n */\n function getState() public constant returns (State) {\n if(finalized) return State.Finalized;\n else if (address(finalizeAgent) == 0) return State.Preparing;\n else if (!finalizeAgent.isSane()) return State.Preparing;\n else if (!pricingStrategy.isSane(address(this))) return State.Preparing;\n else if (block.timestamp < startsAt) return State.PreFunding;\n else if (block.timestamp <= endsAt && !isCrowdsaleFull()) return State.Funding;\n else if (isMinimumGoalReached()) return State.Success;\n else if (!isMinimumGoalReached() && weiRaised > 0 && loadedRefund >= weiRaised) return State.Refunding;\n else return State.Failure;\n }\n\n /** This is for manual testing of multisig wallet interaction */\n function setOwnerTestValue(uint val) onlyOwner {\n ownerTestValue = val;\n }\n\n /**\n * Allow addresses to do early participation.\n *\n * TODO: Fix spelling error in the name\n */\n function setEarlyParicipantWhitelist(address addr, bool status) onlyOwner {\n earlyParticipantWhitelist[addr] = status;\n Whitelisted(addr, status);\n }\n\n\n /** Interface marker. */\n function isCrowdsale() public constant returns (bool) {\n return true;\n }\n\n //\n // Modifiers\n //\n\n /** Modified allowing execution only if the crowdsale is currently running. */\n modifier inState(State state) {\n if(getState() != state) throw;\n _;\n }\n\n\n //\n // Abstract functions\n //\n\n /**\n * Check if the current invested breaks our cap rules.\n *\n *\n * The child contract must define their own cap setting rules.\n * We allow a lot of flexibility through different capping strategies (ETH, token count)\n * Called from invest().\n *\n * @param weiAmount The amount of wei the investor tries to invest in the current transaction\n * @param tokenAmount The amount of tokens we try to give to the investor in the current transaction\n * @param weiRaisedTotal What would be our total raised balance after this transaction\n * @param tokensSoldTotal What would be our total sold tokens count after this transaction\n *\n * @return true if taking this investment would break our cap rules\n */\n function isBreakingCap(uint weiAmount, uint tokenAmount, uint weiRaisedTotal, uint tokensSoldTotal) constant returns (bool limitBroken);\n\n /**\n * Check if the current crowdsale is full and we can no longer sell any tokens.\n */\n function isCrowdsaleFull() public constant returns (bool);\n\n /**\n * Create new tokens or transfer issued tokens to the investor depending on the cap model.\n */\n function assignTokens(address receiver, uint tokenAmount) internal;\n}\n\n\n\n/**\n * Abstract base contract for token sales with the default buy entry points.\n *\n * Handle\n * - start and end dates\n * - accepting investments\n * - minimum funding goal and refund\n * - various statistics during the crowdfund\n * - different pricing strategies\n * - different investment policies (require server side customer id, allow only whitelisted addresses)\n *\n * Does not Handle\n *\n * - Token allocation (minting vs. transfer)\n * - Cap rules\n *\n */\ncontract Crowdsale is CrowdsaleBase {\n\n /* Do we need to have unique contributor id for each customer */\n bool public requireCustomerId;\n\n /**\n * Do we verify that contributor has been cleared on the server side (accredited investors only).\n * This method was first used in FirstBlood crowdsale to ensure all contributors have accepted terms on sale (on the web).\n */\n bool public requiredSignedAddress;\n\n /* Server side address that signed allowed contributors (Ethereum addresses) that can participate the crowdsale */\n address public signerAddress;\n\n function Crowdsale(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal) CrowdsaleBase(_token, _pricingStrategy, _multisigWallet, _start, _end, _minimumFundingGoal) {\n }\n\n /**\n * Preallocate tokens for the early investors.\n *\n * Preallocated tokens have been sold before the actual crowdsale opens.\n * This function mints the tokens and moves the crowdsale needle.\n *\n * Investor count is not handled; it is assumed this goes for multiple investors\n * and the token distribution happens outside the smart contract flow.\n *\n * No money is exchanged, as the crowdsale team already have received the payment.\n *\n * @param fullTokens tokens as full tokens - decimal places added internally\n * @param weiPrice Price of a single full token in wei\n *\n */\n function preallocate(address receiver, uint fullTokens, uint weiPrice) public onlyOwner {\n\n uint tokenAmount = fullTokens * 10**token.decimals();\n uint weiAmount = weiPrice * fullTokens; // This can be also 0, we give out tokens for free\n\n weiRaised = weiRaised.plus(weiAmount);\n tokensSold = tokensSold.plus(tokenAmount);\n\n investedAmountOf[receiver] = investedAmountOf[receiver].plus(weiAmount);\n tokenAmountOf[receiver] = tokenAmountOf[receiver].plus(tokenAmount);\n\n assignTokens(receiver, tokenAmount);\n\n // Tell us invest was success\n Invested(receiver, weiAmount, tokenAmount, 0);\n }\n\n /**\n * Allow anonymous contributions to this crowdsale.\n */\n function investWithSignedAddress(address addr, uint128 customerId, uint8 v, bytes32 r, bytes32 s) public payable {\n bytes32 hash = sha256(addr);\n if (ecrecover(hash, v, r, s) != signerAddress) throw;\n if(customerId == 0) throw; // UUIDv4 sanity check\n investInternal(addr, customerId);\n }\n\n /**\n * Track who is the customer making the payment so we can send thank you email.\n */\n function investWithCustomerId(address addr, uint128 customerId) public payable {\n if(requiredSignedAddress) throw; // Crowdsale allows only server-side signed participants\n if(customerId == 0) throw; // UUIDv4 sanity check\n investInternal(addr, customerId);\n }\n\n /**\n * Allow anonymous contributions to this crowdsale.\n */\n function invest(address addr) public payable {\n if(requireCustomerId) throw; // Crowdsale needs to track participants for thank you email\n if(requiredSignedAddress) throw; // Crowdsale allows only server-side signed participants\n investInternal(addr, 0);\n }\n\n /**\n * Invest to tokens, recognize the payer and clear his address.\n *\n */\n function buyWithSignedAddress(uint128 customerId, uint8 v, bytes32 r, bytes32 s) public payable {\n investWithSignedAddress(msg.sender, customerId, v, r, s);\n }\n\n /**\n * Invest to tokens, recognize the payer.\n *\n */\n function buyWithCustomerIdWithChecksum(uint128 customerId, bytes1 checksum) public payable {\n // see customerid.py\n if (bytes1(sha3(customerId)) != checksum) throw;\n investWithCustomerId(msg.sender, customerId);\n }\n\n /**\n * Legacy API signature.\n */\n function buyWithCustomerId(uint128 customerId) public payable {\n investWithCustomerId(msg.sender, customerId);\n }\n\n /**\n * The basic entry point to participate the crowdsale process.\n *\n * Pay for funding, get invested tokens back in the sender address.\n */\n function buy() public payable {\n invest(msg.sender);\n }\n\n /**\n * Set policy do we need to have server-side customer ids for the investments.\n *\n */\n function setRequireCustomerId(bool value) onlyOwner {\n requireCustomerId = value;\n InvestmentPolicyChanged(requireCustomerId, requiredSignedAddress, signerAddress);\n }\n\n /**\n * Set policy if all investors must be cleared on the server side first.\n *\n * This is e.g. for the accredited investor clearing.\n *\n */\n function setRequireSignedAddress(bool value, address _signerAddress) onlyOwner {\n requiredSignedAddress = value;\n signerAddress = _signerAddress;\n InvestmentPolicyChanged(requireCustomerId, requiredSignedAddress, signerAddress);\n }\n\n}\n\n\n\n\n/// @dev Tranche based pricing with special support for pre-ico deals.\n/// Implementing \"first price\" tranches, meaning, that if buyers order is\n/// covering more than one tranche, the price of the lowest tranche will apply\n/// to the whole order.\ncontract TokenTranchePricing is PricingStrategy, Ownable {\n\n using SafeMathLib for uint;\n\n uint public constant MAX_TRANCHES = 10;\n\n // This contains all pre-ICO addresses, and their prices (weis per token)\n mapping (address => uint) public preicoAddresses;\n\n /**\n * Define pricing schedule using tranches.\n */\n struct Tranche {\n\n // Amount in weis when this tranche becomes active\n uint amount;\n\n // How many tokens per satoshi you will get while this tranche is active\n uint price;\n }\n\n // Store tranches in a fixed array, so that it can be seen in a blockchain explorer\n // Tranche 0 is always (0, 0)\n // (TODO: change this when we confirm dynamic arrays are explorable)\n Tranche[10] public tranches;\n\n // How many active tranches we have\n uint public trancheCount;\n\n /// @dev Contruction, creating a list of tranches\n /// @param _tranches uint[] tranches Pairs of (start amount, price)\n function TokenTranchePricing(uint[] _tranches) {\n // Need to have tuples, length check\n if(_tranches.length % 2 == 1 || _tranches.length >= MAX_TRANCHES*2) {\n throw;\n }\n\n trancheCount = _tranches.length / 2;\n\n uint highestAmount = 0;\n\n for(uint i=0; i<_tranches.length/2; i++) {\n tranches[i].amount = _tranches[i*2];\n tranches[i].price = _tranches[i*2+1];\n\n // No invalid steps\n if((highestAmount != 0) && (tranches[i].amount <= highestAmount)) {\n throw;\n }\n\n highestAmount = tranches[i].amount;\n }\n\n // Last tranche price must be zero, terminating the crowdale\n if(tranches[trancheCount-1].price != 0) {\n throw;\n }\n }\n\n /// @dev This is invoked once for every pre-ICO address, set pricePerToken\n /// to 0 to disable\n /// @param preicoAddress PresaleFundCollector address\n /// @param pricePerToken How many weis one token cost for pre-ico investors\n function setPreicoAddress(address preicoAddress, uint pricePerToken)\n public\n onlyOwner\n {\n preicoAddresses[preicoAddress] = pricePerToken;\n }\n\n /// @dev Iterate through tranches. You reach end of tranches when price = 0\n /// @return tuple (time, price)\n function getTranche(uint n) public constant returns (uint, uint) {\n return (tranches[n].amount, tranches[n].price);\n }\n\n function getFirstTranche() private constant returns (Tranche) {\n return tranches[0];\n }\n\n function getLastTranche() private constant returns (Tranche) {\n return tranches[trancheCount-1];\n }\n\n function getPricingStartsAt() public constant returns (uint) {\n return getFirstTranche().amount;\n }\n\n function getPricingEndsAt() public constant returns (uint) {\n return getLastTranche().amount;\n }\n\n function isSane(address _crowdsale) public constant returns(bool) {\n // Our tranches are not bound by time, so we can't really check are we sane\n // so we presume we are ;)\n // In the future we could save and track raised tokens, and compare it to\n // the Crowdsale contract.\n return true;\n }\n\n /// @dev Get the current tranche or bail out if we are not in the tranche periods.\n /// @param tokensSold total amount of tokens sold, for calculating the current tranche\n /// @return {[type]} [description]\n function getCurrentTranche(uint tokensSold) private constant returns (Tranche) {\n uint i;\n\n for(i=0; i < tranches.length; i++) {\n if(tokensSold < tranches[i].amount) {\n return tranches[i-1];\n }\n }\n }\n\n /// @dev Get the current price.\n /// @param tokensSold total amount of tokens sold, for calculating the current tranche\n /// @return The current price or 0 if we are outside trache ranges\n function getCurrentPrice(uint tokensSold) public constant returns (uint result) {\n return getCurrentTranche(tokensSold).price;\n }\n\n /// @dev Calculate the current price for buy in amount.\n function calculatePrice(uint value, uint weiRaised, uint tokensSold, address msgSender, uint decimals) public constant returns (uint) {\n\n uint multiplier = 10 ** decimals;\n\n // This investor is coming through pre-ico\n if(preicoAddresses[msgSender] > 0) {\n return value.times(multiplier) / preicoAddresses[msgSender];\n }\n\n uint price = getCurrentPrice(tokensSold);\n return value.times(multiplier) / price;\n }\n\n function() payable {\n throw; // No money on this contract\n }\n\n}\n"}, "TokenVault": {"abi": [{"constant": true, "inputs": [], "name": "tokensAllocatedTotal", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getBalance", "outputs": [{"name": "howManyTokensCurrentlyInVault", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "recoverTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "getState", "outputs": [{"name": "", "type": "uint8"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "lastClaimedAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "balances", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "tokensPerSecond", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "claim", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "freezeEndsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "investor", "type": "address"}, {"name": "amount", "type": "uint256"}], "name": "setInvestor", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "tokensToBeAllocated", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "lockedAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "tokenToClaim", "type": "address"}], "name": "tokensToBeReturned", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "investor", "type": "address"}], "name": "getCurrentlyClaimableAmount", "outputs": [{"name": "claimableAmount", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "claimed", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "totalClaimed", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "investorCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "lock", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "recoverFailedLock", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "token", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [{"name": "_owner", "type": "address"}, {"name": "_freezeEndsAt", "type": "uint256"}, {"name": "_token", "type": "address"}, {"name": "_tokensToBeAllocated", "type": "uint256"}, {"name": "_tokensPerSecond", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Allocated", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investors", "type": "address"}, {"indexed": false, "name": "count", "type": "uint256"}], "name": "Distributed", "type": "event"}, {"anonymous": false, "inputs": [], "name": "Locked", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "bytecode": "0x608060405234801561001057600080fd5b5060405160a080610e58833981016040908152815160208301519183015160608401516080909401516000805433600160a060020a03199182161716600160a060020a0380861691909117918290559395929316151561006f57600080fd5b600b8054600160a060020a031916600160a060020a038581169190911791829055604080517feefa597b0000000000000000000000000000000000000000000000000000000081529051929091169163eefa597b916004808201926020929091908290030181600087803b1580156100e657600080fd5b505af11580156100fa573d6000803e3d6000fd5b505050506040513d602081101561011057600080fd5b5051151561011d57600080fd5b83151561012957600080fd5b81151561013557600080fd5b42841015610146574260085561014c565b60088490555b600291909155600a55505050610cf1806101676000396000f3006080604052600436106101275763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166311e48cdf811461012c57806312065fe01461015357806316114acd146101685780631865c57d1461018b57806326a40c99146101c457806327e235e3146101e55780634d8d9e92146102065780634e71d92d1461021b5780636962b010146102305780638da5cb5b146102455780638e327dd314610276578063990ca3ff1461029a578063b2163482146102af578063c45d19db146102c4578063c828e6ee146102e5578063c884ef8314610306578063d54ad2a114610327578063d7e64c001461033c578063f2fde38b14610351578063f83d08ba14610372578063f85b216014610387578063fc0c546a1461039c575b600080fd5b34801561013857600080fd5b506101416103b1565b60408051918252519081900360200190f35b34801561015f57600080fd5b506101416103b7565b34801561017457600080fd5b50610189600160a060020a036004351661044e565b005b34801561019757600080fd5b506101a061051e565b604051808260038111156101b057fe5b60ff16815260200191505060405180910390f35b3480156101d057600080fd5b50610141600160a060020a036004351661054d565b3480156101f157600080fd5b50610141600160a060020a036004351661055f565b34801561021257600080fd5b50610141610571565b34801561022757600080fd5b50610189610577565b34801561023c57600080fd5b506101416106dc565b34801561025157600080fd5b5061025a6106e2565b60408051600160a060020a039092168252519081900360200190f35b34801561028257600080fd5b50610189600160a060020a03600435166024356106f1565b3480156102a657600080fd5b506101416107b1565b3480156102bb57600080fd5b506101416107b7565b3480156102d057600080fd5b50610141600160a060020a03600435166107bd565b3480156102f157600080fd5b50610141600160a060020a0360043516610901565b34801561031257600080fd5b50610141600160a060020a03600435166109a0565b34801561033357600080fd5b506101416109b2565b34801561034857600080fd5b506101416109b8565b34801561035d57600080fd5b50610189600160a060020a03600435166109be565b34801561037e57600080fd5b50610189610a52565b34801561039357600080fd5b50610189610b5b565b3480156103a857600080fd5b5061025a610cb6565b60045481565b600b54604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600092600160a060020a0316916370a0823191602480830192602092919082900301818787803b15801561041c57600080fd5b505af1158015610430573d6000803e3d6000fd5b505050506040513d602081101561044657600080fd5b505190505b90565b600054600160a060020a0316331461046557600080fd5b600054600160a060020a038083169163a9059cbb9116610484846107bd565b6040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b1580156104ef57600080fd5b505af1158015610503573d6000803e3d6000fd5b505050506040513d602081101561051957600080fd5b505050565b6000600954600014156105335750600161044b565b6008544211156105455750600361044b565b50600261044b565b60076020526000908152604090205481565b60056020526000908152604090205481565b600a5481565b6009543390600090151561058a57600080fd5b60085442101561059957600080fd5b600160a060020a03821660009081526005602052604090205415156105bd57600080fd5b6105c682610901565b9050600081116105d557600080fd5b600160a060020a038083166000818152600760209081526040808320429055600682528083208054870190556003805487019055600b5481517fa9059cbb000000000000000000000000000000000000000000000000000000008152600481019590955260248501879052905194169363a9059cbb93604480820194918390030190829087803b15801561066857600080fd5b505af115801561067c573d6000803e3d6000fd5b505050506040513d602081101561069257600080fd5b505060408051600160a060020a03841681526020810183905281517fb649c98f58055c520df0dcb5709eff2e931217ff2fb1e21376130d31bbb1c0af929181900390910190a15050565b60085481565b600054600160a060020a031681565b600054600160a060020a0316331461070857600080fd5b6000600954111561071857600080fd5b80151561072457600080fd5b600160a060020a038216600090815260056020526040812054111561074857600080fd5b600160a060020a038216600081815260056020908152604091829020849055600180548101905560048054850190558151928352820183905280517f472f36e28bb47edb7c69c9e2ac00a77c66b505df54e9c818ac57110b0629e8c39281900390910190a15050565b60025481565b60095481565b600b54600090600160a060020a0383811691161415610887576107de6103b7565b73__contracts/SafeMathLib.sol:SafeMathLi__63f4f3bdc190916004546040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b15801561085457600080fd5b505af4158015610868573d6000803e3d6000fd5b505050506040513d602081101561087e57600080fd5b505190506108fc565b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600160a060020a038416916370a082319160248083019260209291908290030181600087803b1580156108e857600080fd5b505af1158015610868573d6000803e3d6000fd5b919050565b600160a060020a038116600090815260066020908152604080832054600590925282205460085491900390829081904210156109405760009350610998565b6000600a54111561099457600160a060020a03851660009081526007602052604090205491508115156109735760085491505b600a548242030290508281111561098c57829350610998565b809350610998565b8293505b505050919050565b60066020526000908152604090205481565b60035481565b60015481565b600054600160a060020a031633146109d557600080fd5b600160a060020a03811615156109ea57600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600054600160a060020a03163314610a6957600080fd5b60006009541115610a7957600080fd5b60025460045414610a8957600080fd5b60048054600b54604080517f70a082310000000000000000000000000000000000000000000000000000000081523094810194909452519192600160a060020a03909116916370a08231916024808201926020929091908290030181600087803b158015610af657600080fd5b505af1158015610b0a573d6000803e3d6000fd5b505050506040513d6020811015610b2057600080fd5b505114610b2c57600080fd5b426009556040517f0f2e5b6c72c6a4491efd919a9f9a409f324ef0708c11ee57d410c2cb06c0992b90600090a1565b600054600160a060020a03163314610b7257600080fd5b60006009541115610b8257600080fd5b600b5460008054604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600160a060020a039485169463a9059cbb9493169285926370a082319260248083019360209383900390910190829087803b158015610bf657600080fd5b505af1158015610c0a573d6000803e3d6000fd5b505050506040513d6020811015610c2057600080fd5b5051604080517c010000000000000000000000000000000000000000000000000000000063ffffffff8616028152600160a060020a03909316600484015260248301919091525160448083019260209291908290030181600087803b158015610c8857600080fd5b505af1158015610c9c573d6000803e3d6000fd5b505050506040513d6020811015610cb257600080fd5b5050565b600b54600160a060020a0316815600a165627a7a72305820d144dc8b35d12fbdee8be9cc74d422f49346796b9efae12a2b116a5c4c786b3b0029", "bytecode_runtime": "0x6080604052600436106101275763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166311e48cdf811461012c57806312065fe01461015357806316114acd146101685780631865c57d1461018b57806326a40c99146101c457806327e235e3146101e55780634d8d9e92146102065780634e71d92d1461021b5780636962b010146102305780638da5cb5b146102455780638e327dd314610276578063990ca3ff1461029a578063b2163482146102af578063c45d19db146102c4578063c828e6ee146102e5578063c884ef8314610306578063d54ad2a114610327578063d7e64c001461033c578063f2fde38b14610351578063f83d08ba14610372578063f85b216014610387578063fc0c546a1461039c575b600080fd5b34801561013857600080fd5b506101416103b1565b60408051918252519081900360200190f35b34801561015f57600080fd5b506101416103b7565b34801561017457600080fd5b50610189600160a060020a036004351661044e565b005b34801561019757600080fd5b506101a061051e565b604051808260038111156101b057fe5b60ff16815260200191505060405180910390f35b3480156101d057600080fd5b50610141600160a060020a036004351661054d565b3480156101f157600080fd5b50610141600160a060020a036004351661055f565b34801561021257600080fd5b50610141610571565b34801561022757600080fd5b50610189610577565b34801561023c57600080fd5b506101416106dc565b34801561025157600080fd5b5061025a6106e2565b60408051600160a060020a039092168252519081900360200190f35b34801561028257600080fd5b50610189600160a060020a03600435166024356106f1565b3480156102a657600080fd5b506101416107b1565b3480156102bb57600080fd5b506101416107b7565b3480156102d057600080fd5b50610141600160a060020a03600435166107bd565b3480156102f157600080fd5b50610141600160a060020a0360043516610901565b34801561031257600080fd5b50610141600160a060020a03600435166109a0565b34801561033357600080fd5b506101416109b2565b34801561034857600080fd5b506101416109b8565b34801561035d57600080fd5b50610189600160a060020a03600435166109be565b34801561037e57600080fd5b50610189610a52565b34801561039357600080fd5b50610189610b5b565b3480156103a857600080fd5b5061025a610cb6565b60045481565b600b54604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600092600160a060020a0316916370a0823191602480830192602092919082900301818787803b15801561041c57600080fd5b505af1158015610430573d6000803e3d6000fd5b505050506040513d602081101561044657600080fd5b505190505b90565b600054600160a060020a0316331461046557600080fd5b600054600160a060020a038083169163a9059cbb9116610484846107bd565b6040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b1580156104ef57600080fd5b505af1158015610503573d6000803e3d6000fd5b505050506040513d602081101561051957600080fd5b505050565b6000600954600014156105335750600161044b565b6008544211156105455750600361044b565b50600261044b565b60076020526000908152604090205481565b60056020526000908152604090205481565b600a5481565b6009543390600090151561058a57600080fd5b60085442101561059957600080fd5b600160a060020a03821660009081526005602052604090205415156105bd57600080fd5b6105c682610901565b9050600081116105d557600080fd5b600160a060020a038083166000818152600760209081526040808320429055600682528083208054870190556003805487019055600b5481517fa9059cbb000000000000000000000000000000000000000000000000000000008152600481019590955260248501879052905194169363a9059cbb93604480820194918390030190829087803b15801561066857600080fd5b505af115801561067c573d6000803e3d6000fd5b505050506040513d602081101561069257600080fd5b505060408051600160a060020a03841681526020810183905281517fb649c98f58055c520df0dcb5709eff2e931217ff2fb1e21376130d31bbb1c0af929181900390910190a15050565b60085481565b600054600160a060020a031681565b600054600160a060020a0316331461070857600080fd5b6000600954111561071857600080fd5b80151561072457600080fd5b600160a060020a038216600090815260056020526040812054111561074857600080fd5b600160a060020a038216600081815260056020908152604091829020849055600180548101905560048054850190558151928352820183905280517f472f36e28bb47edb7c69c9e2ac00a77c66b505df54e9c818ac57110b0629e8c39281900390910190a15050565b60025481565b60095481565b600b54600090600160a060020a0383811691161415610887576107de6103b7565b73__contracts/SafeMathLib.sol:SafeMathLi__63f4f3bdc190916004546040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b15801561085457600080fd5b505af4158015610868573d6000803e3d6000fd5b505050506040513d602081101561087e57600080fd5b505190506108fc565b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600160a060020a038416916370a082319160248083019260209291908290030181600087803b1580156108e857600080fd5b505af1158015610868573d6000803e3d6000fd5b919050565b600160a060020a038116600090815260066020908152604080832054600590925282205460085491900390829081904210156109405760009350610998565b6000600a54111561099457600160a060020a03851660009081526007602052604090205491508115156109735760085491505b600a548242030290508281111561098c57829350610998565b809350610998565b8293505b505050919050565b60066020526000908152604090205481565b60035481565b60015481565b600054600160a060020a031633146109d557600080fd5b600160a060020a03811615156109ea57600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600054600160a060020a03163314610a6957600080fd5b60006009541115610a7957600080fd5b60025460045414610a8957600080fd5b60048054600b54604080517f70a082310000000000000000000000000000000000000000000000000000000081523094810194909452519192600160a060020a03909116916370a08231916024808201926020929091908290030181600087803b158015610af657600080fd5b505af1158015610b0a573d6000803e3d6000fd5b505050506040513d6020811015610b2057600080fd5b505114610b2c57600080fd5b426009556040517f0f2e5b6c72c6a4491efd919a9f9a409f324ef0708c11ee57d410c2cb06c0992b90600090a1565b600054600160a060020a03163314610b7257600080fd5b60006009541115610b8257600080fd5b600b5460008054604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600160a060020a039485169463a9059cbb9493169285926370a082319260248083019360209383900390910190829087803b158015610bf657600080fd5b505af1158015610c0a573d6000803e3d6000fd5b505050506040513d6020811015610c2057600080fd5b5051604080517c010000000000000000000000000000000000000000000000000000000063ffffffff8616028152600160a060020a03909316600484015260248301919091525160448083019260209291908290030181600087803b158015610c8857600080fd5b505af1158015610c9c573d6000803e3d6000fd5b505050506040513d6020811015610cb257600080fd5b5050565b600b54600160a060020a0316815600a165627a7a72305820d144dc8b35d12fbdee8be9cc74d422f49346796b9efae12a2b116a5c4c786b3b0029", "direct_dependencies": ["SafeMathLib"], "full_dependencies": ["SafeMathLib"], "linkrefs": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 4750}], "linkrefs_runtime": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 4032}], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": true, "inputs": [], "name": "tokensAllocatedTotal", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getBalance", "outputs": [{"name": "howManyTokensCurrentlyInVault", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "recoverTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "getState", "outputs": [{"name": "", "type": "uint8"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "lastClaimedAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "balances", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "tokensPerSecond", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "claim", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "freezeEndsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "investor", "type": "address"}, {"name": "amount", "type": "uint256"}], "name": "setInvestor", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "tokensToBeAllocated", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "lockedAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "tokenToClaim", "type": "address"}], "name": "tokensToBeReturned", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "investor", "type": "address"}], "name": "getCurrentlyClaimableAmount", "outputs": [{"name": "claimableAmount", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "claimed", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "totalClaimed", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "investorCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "lock", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "recoverFailedLock", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "token", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [{"name": "_owner", "type": "address"}, {"name": "_freezeEndsAt", "type": "uint256"}, {"name": "_token", "type": "address"}, {"name": "_tokensToBeAllocated", "type": "uint256"}, {"name": "_tokensPerSecond", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Allocated", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investors", "type": "address"}, {"indexed": false, "name": "count", "type": "uint256"}], "name": "Distributed", "type": "event"}, {"anonymous": false, "inputs": [], "name": "Locked", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "devdoc": {"methods": {"claim()": {"details": "Claim N bought tokens to the investor as the msg sender"}, "getBalance()": {"details": "Get the current balance of tokens in the vault", "return": "uint How many tokens there are currently in vault"}, "getCurrentlyClaimableAmount(address)": {"details": "Check how many tokens \"investor\" can claim", "params": {"investor": "Address of the investor"}, "return": "uint How many tokens the investor can claim now"}, "getState()": {"details": "Resolve the contract umambigious state"}, "lock()": {"details": "Lock the vault - All balances have been loaded in correctly - Tokens are transferred on this vault correctly - Checks are in place to prevent creating a vault that is locked with incorrect token balances."}, "recoverFailedLock()": {"details": "In the case locking failed, then allow the owner to reclaim the tokens on the contract."}, "recoverTokens(address)": {"details": "This will be invoked by the owner, when owner wants to rescue tokens", "params": {"token": "Token which will we rescue to the owner from the contract"}}, "setInvestor(address,uint256)": {"details": "Add a presale participating allocation"}, "tokensToBeReturned(address)": {"details": "This function is prototyped in Recoverable contract"}, "transferOwnership(address)": {"details": "Allows the current owner to transfer control of the contract to a newOwner.", "params": {"newOwner": "The address to transfer ownership to."}}}}, "userdoc": {"methods": {}}}, "settings": {"compilationTarget": {"contracts/TokenVault.sol": "TokenVault"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/Recoverable.sol": {"keccak256": "0x311a332cdd87df6e00057f5455f4e68b043b5dbe211f6d68bc64e20817515635", "urls": ["bzzr://4fd99bcfb93baed6e7c8d22ee9ecc5c8346a1aa98288e77b01333b2c5d3f582d"]}, "contracts/SafeMathLib.sol": {"keccak256": "0x501bfe31e274b9a5591f7c540bdced4d4312e27d4f19599147c9bbca3d9c6b18", "urls": ["bzzr://a80935ebddb06c247d71372d4e5833ee029f08633bd0fe4a274a57009567e5b9"]}, "contracts/StandardTokenExt.sol": {"keccak256": "0x9ea2d4cec4dccd5639c05e6c23dd027d80b5e5a20abd99b280ab7b2631b5a5fc", "urls": ["bzzr://a52d8fc5a21bd83997aff19128e00dceb251df712207b61223894c8b7f42d5ff"]}, "contracts/TokenVault.sol": {"keccak256": "0x673db419ee8b9964c7f64fbc78262546fa57838badbeda8ace4c198df21fa0f2", "urls": ["bzzr://07022a847bdb8a3e185917774ad3c0ffb1ee88318b26fbfc58c8ba091b81df0a"]}, "zeppelin/contracts/math/SafeMath.sol": {"keccak256": "0x341ba8cb467a3623e819ba1a683ac1d264005186f308505214e5f6bc89446a08", "urls": ["bzzr://59b5652ee4e4a1b5a8f1a8906e14c84af43d636cf5ca0725cc1813aabe4c8c17"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}, "zeppelin/contracts/token/ERC20/BasicToken.sol": {"keccak256": "0x948404468d61ff35ea4194650670408dabd65da7f905a1c16888ab84520bf39e", "urls": ["bzzr://ea75e20f95d7e4e10394fe6bfaa8eee56b4757c2a6f1e8df4180d33afa621935"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}, "zeppelin/contracts/token/ERC20/StandardToken.sol": {"keccak256": "0xd2b344a5259e19ec143074cfa65637a10c40b68395c59808c4af13bccbb2de55", "urls": ["bzzr://d61a01175a7ca1ba9f4403de603c20b897e33ec425aef2d9f8a7f9ddfdfaf5b2"]}}, "version": 1}, "name": "TokenVault", "ordered_full_dependencies": ["SafeMathLib"], "source_path": "contracts/TokenVault.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\ncontract Recoverable is Ownable {\n\n /// @dev Empty constructor (for now)\n function Recoverable() {\n }\n\n /// @dev This will be invoked by the owner, when owner wants to rescue tokens\n /// @param token Token which will we rescue to the owner from the contract\n function recoverTokens(ERC20Basic token) onlyOwner public {\n token.transfer(owner, tokensToBeReturned(token));\n }\n\n /// @dev Interface function, can be overwritten by the superclass\n /// @param token Token which balance we will check and return\n /// @return The amount of tokens (in smallest denominator) the contract owns\n function tokensToBeReturned(ERC20Basic token) public returns (uint) {\n return token.balanceOf(this);\n }\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Safe unsigned safe math.\n *\n * https://blog.aragon.one/library-driven-development-in-solidity-2bebcaf88736#.750gwtwli\n *\n * Originally from https://raw.githubusercontent.com/AragonOne/zeppelin-solidity/master/contracts/SafeMathLib.sol\n *\n * Maintained here until merged to mainline zeppelin-solidity.\n *\n */\nlibrary SafeMathLib {\n\n function times(uint a, uint b) returns (uint) {\n uint c = a * b;\n assert(a == 0 || c / a == b);\n return c;\n }\n\n function minus(uint a, uint b) returns (uint) {\n assert(b <= a);\n return a - b;\n }\n\n function plus(uint a, uint b) returns (uint) {\n uint c = a + b;\n assert(c>=a);\n return c;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n assert(c / a == b);\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n\n\n\n/**\n * @title Basic token\n * @dev Basic version of StandardToken, with no allowances.\n */\ncontract BasicToken is ERC20Basic {\n using SafeMath for uint256;\n\n mapping(address => uint256) balances;\n\n uint256 totalSupply_;\n\n /**\n * @dev total number of tokens in existence\n */\n function totalSupply() public view returns (uint256) {\n return totalSupply_;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param _to The address to transfer to.\n * @param _value The amount to be transferred.\n */\n function transfer(address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[msg.sender]);\n\n // SafeMath.sub will throw if there is not enough balance.\n balances[msg.sender] = balances[msg.sender].sub(_value);\n balances[_to] = balances[_to].add(_value);\n Transfer(msg.sender, _to, _value);\n return true;\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param _owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address _owner) public view returns (uint256 balance) {\n return balances[_owner];\n }\n\n}\n\n\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n\n\n/**\n * @title Standard ERC20 token\n *\n * @dev Implementation of the basic standard token.\n * @dev https://github.com/ethereum/EIPs/issues/20\n * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol\n */\ncontract StandardToken is ERC20, BasicToken {\n\n mapping (address => mapping (address => uint256)) internal allowed;\n\n\n /**\n * @dev Transfer tokens from one address to another\n * @param _from address The address which you want to send tokens from\n * @param _to address The address which you want to transfer to\n * @param _value uint256 the amount of tokens to be transferred\n */\n function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[_from]);\n require(_value <= allowed[_from][msg.sender]);\n\n balances[_from] = balances[_from].sub(_value);\n balances[_to] = balances[_to].add(_value);\n allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);\n Transfer(_from, _to, _value);\n return true;\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n *\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param _spender The address which will spend the funds.\n * @param _value The amount of tokens to be spent.\n */\n function approve(address _spender, uint256 _value) public returns (bool) {\n allowed[msg.sender][_spender] = _value;\n Approval(msg.sender, _spender, _value);\n return true;\n }\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param _owner address The address which owns the funds.\n * @param _spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address _owner, address _spender) public view returns (uint256) {\n return allowed[_owner][_spender];\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(address _spender, uint _addedValue) public returns (bool) {\n allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {\n uint oldValue = allowed[msg.sender][_spender];\n if (_subtractedValue > oldValue) {\n allowed[msg.sender][_spender] = 0;\n } else {\n allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);\n }\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n}\n\n\n\n\n/**\n * Standard EIP-20 token with an interface marker.\n *\n * @notice Interface marker is used by crowdsale contracts to validate that addresses point a good token contract.\n *\n */\ncontract StandardTokenExt is StandardToken, Recoverable {\n\n /* Interface declaration */\n function isToken() public constant returns (bool weAre) {\n return true;\n }\n}\n\n\n\n/**\n * Hold tokens for a group investor of investors until the unlock date.\n *\n * After the unlock date the investor can claim their tokens.\n *\n * Steps\n *\n * - Prepare a spreadsheet for token allocation\n * - Deploy this contract, with the sum to tokens to be distributed, from the owner account\n * - Call setInvestor for all investors from the owner account using a local script and CSV input\n * - Move tokensToBeAllocated in this contract using StandardToken.transfer()\n * - Call lock from the owner account\n * - Wait until the freeze period is over\n * - After the freeze time is over investors can call claim() from their address to get their tokens\n *\n */\ncontract TokenVault is Ownable, Recoverable {\n using SafeMathLib for uint;\n\n /** How many investors we have now */\n uint public investorCount;\n\n /** Sum from the spreadsheet how much tokens we should get on the contract. If the sum does not match at the time of the lock the vault is faulty and must be recreated.*/\n uint public tokensToBeAllocated;\n\n /** How many tokens investors have claimed so far */\n uint public totalClaimed;\n\n /** How many tokens our internal book keeping tells us to have at the time of lock() when all investor data has been loaded */\n uint public tokensAllocatedTotal;\n\n /** How much we have allocated to the investors invested */\n mapping(address => uint) public balances;\n\n /** How many tokens investors have claimed */\n mapping(address => uint) public claimed;\n\n /** When was the last claim by an investor **/\n mapping(address => uint) public lastClaimedAt;\n\n /** When our claim freeze is over (UNIX timestamp) */\n uint public freezeEndsAt;\n\n /** When this vault was locked (UNIX timestamp) */\n uint public lockedAt;\n\n /** defining the tap **/\n uint public tokensPerSecond;\n\n /** We can also define our own token, which will override the ICO one ***/\n StandardTokenExt public token;\n\n /** What is our current state.\n *\n * Loading: Investor data is being loaded and contract not yet locked\n * Holding: Holding tokens for investors\n * Distributing: Freeze time is over, investors can claim their tokens\n */\n enum State{Unknown, Loading, Holding, Distributing}\n\n /** We allocated tokens for investor */\n event Allocated(address investor, uint value);\n\n /** We distributed tokens to an investor */\n event Distributed(address investors, uint count);\n\n event Locked();\n\n /**\n * Create presale contract where lock up period is given days\n *\n * @param _owner Who can load investor data and lock\n * @param _freezeEndsAt UNIX timestamp when the vault unlocks\n * @param _token Token contract address we are distributing\n * @param _tokensToBeAllocated Total number of tokens this vault will hold - including decimal multiplication\n * @param _tokensPerSecond Define the tap: how many tokens we permit an user to withdraw per second, 0 to disable\n */\n function TokenVault(address _owner, uint _freezeEndsAt, StandardTokenExt _token, uint _tokensToBeAllocated, uint _tokensPerSecond) {\n\n owner = _owner;\n\n // Invalid owner\n if(owner == 0) {\n throw;\n }\n\n token = _token;\n\n // Check the address looks like a token contract\n if(!token.isToken()) {\n throw;\n }\n\n // Give argument\n if(_freezeEndsAt == 0) {\n throw;\n }\n\n // Sanity check on _tokensToBeAllocated\n if(_tokensToBeAllocated == 0) {\n throw;\n }\n\n if (_freezeEndsAt < now) {\n freezeEndsAt = now;\n } else {\n freezeEndsAt = _freezeEndsAt;\n }\n tokensToBeAllocated = _tokensToBeAllocated;\n tokensPerSecond = _tokensPerSecond;\n }\n\n /// @dev Add a presale participating allocation\n function setInvestor(address investor, uint amount) public onlyOwner {\n\n if(lockedAt > 0) {\n // Cannot add new investors after the vault is locked\n throw;\n }\n\n if(amount == 0) throw; // No empty buys\n\n // Don't allow reset\n if(balances[investor] > 0) {\n throw;\n }\n\n balances[investor] = amount;\n\n investorCount++;\n\n tokensAllocatedTotal += amount;\n\n Allocated(investor, amount);\n }\n\n /// @dev Lock the vault\n /// - All balances have been loaded in correctly\n /// - Tokens are transferred on this vault correctly\n /// - Checks are in place to prevent creating a vault that is locked with incorrect token balances.\n function lock() onlyOwner {\n\n if(lockedAt > 0) {\n throw; // Already locked\n }\n\n // Spreadsheet sum does not match to what we have loaded to the investor data\n if(tokensAllocatedTotal != tokensToBeAllocated) {\n throw;\n }\n\n // Do not lock the vault if the given tokens are not on this contract\n if(token.balanceOf(address(this)) != tokensAllocatedTotal) {\n throw;\n }\n\n lockedAt = now;\n\n Locked();\n }\n\n /// @dev In the case locking failed, then allow the owner to reclaim the tokens on the contract.\n function recoverFailedLock() onlyOwner {\n if(lockedAt > 0) {\n throw;\n }\n\n // Transfer all tokens on this contract back to the owner\n token.transfer(owner, token.balanceOf(address(this)));\n }\n\n /// @dev Get the current balance of tokens in the vault\n /// @return uint How many tokens there are currently in vault\n function getBalance() public constant returns (uint howManyTokensCurrentlyInVault) {\n return token.balanceOf(address(this));\n }\n\n /// @dev Check how many tokens \"investor\" can claim\n /// @param investor Address of the investor\n /// @return uint How many tokens the investor can claim now\n function getCurrentlyClaimableAmount(address investor) public constant returns (uint claimableAmount) {\n uint maxTokensLeft = balances[investor] - claimed[investor];\n\n if (now < freezeEndsAt) {\n return 0;\n }\n\n if (tokensPerSecond > 0) {\n uint previousClaimAt = lastClaimedAt[investor];\n uint maxClaim;\n\n if (previousClaimAt == 0) {\n previousClaimAt = freezeEndsAt;\n }\n\n maxClaim = (now - previousClaimAt) * tokensPerSecond;\n\n if (maxClaim > maxTokensLeft) {\n return maxTokensLeft;\n } else {\n return maxClaim;\n }\n } else {\n return maxTokensLeft;\n }\n }\n\n /// @dev Claim N bought tokens to the investor as the msg sender\n function claim() {\n\n address investor = msg.sender;\n\n if(lockedAt == 0) {\n throw; // We were never locked\n }\n\n if(now < freezeEndsAt) {\n throw; // Trying to claim early\n }\n\n if(balances[investor] == 0) {\n // Not our investor\n throw;\n }\n\n uint amount = getCurrentlyClaimableAmount(investor);\n require (amount > 0);\n\n lastClaimedAt[investor] = now;\n\n claimed[investor] += amount;\n\n totalClaimed += amount;\n\n token.transfer(investor, amount);\n\n Distributed(investor, amount);\n }\n\n /// @dev This function is prototyped in Recoverable contract\n function tokensToBeReturned(ERC20Basic tokenToClaim) public returns (uint) {\n if (address(tokenToClaim) == address(token)) {\n return getBalance().minus(tokensAllocatedTotal);\n } else {\n return tokenToClaim.balanceOf(this);\n }\n }\n\n /// @dev Resolve the contract umambigious state\n function getState() public constant returns(State) {\n if(lockedAt == 0) {\n return State.Loading;\n } else if(now > freezeEndsAt) {\n return State.Distributing;\n } else {\n return State.Holding;\n }\n }\n\n}\n"}, "UncappedCrowdsale": {"abi": [{"constant": true, "inputs": [], "name": "ownerTestValue", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "requireCustomerId", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "invest", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "isPricingSane", "outputs": [{"name": "sane", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "endsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "minimumFundingGoal", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getState", "outputs": [{"name": "", "type": "uint8"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setFinalizeAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "customerId", "type": "uint128"}, {"name": "v", "type": "uint8"}, {"name": "r", "type": "bytes32"}, {"name": "s", "type": "bytes32"}], "name": "investWithSignedAddress", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "investedAmountOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "finalizeAgent", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "receiver", "type": "address"}, {"name": "fullTokens", "type": "uint256"}, {"name": "weiPrice", "type": "uint256"}], "name": "preallocate", "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": "isCrowdsale", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "finalize", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_pricingStrategy", "type": "address"}], "name": "setPricingStrategy", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "tokensSold", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "refund", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "signerAddress", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "weiRefunded", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "halt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}, {"name": "checksum", "type": "bytes1"}], "name": "buyWithCustomerIdWithChecksum", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "time", "type": "uint256"}], "name": "setEndsAt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "pricingStrategy", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "loadedRefund", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isMinimumGoalReached", "outputs": [{"name": "reached", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "bool"}], "name": "setRequireCustomerId", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "loadRefund", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "val", "type": "uint256"}], "name": "setOwnerTestValue", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "weisTotal", "type": "uint256"}, {"name": "pricePerToken", "type": "uint256"}], "name": "calculateTokens", "outputs": [{"name": "tokensTotal", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "multisigWallet", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "tokenAmountOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}], "name": "buyWithCustomerId", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [{"name": "weiAmount", "type": "uint256"}, {"name": "tokenAmount", "type": "uint256"}, {"name": "weiRaisedTotal", "type": "uint256"}, {"name": "tokensSoldTotal", "type": "uint256"}], "name": "isBreakingCap", "outputs": [{"name": "limitBroken", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "buy", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "isFinalizerSane", "outputs": [{"name": "sane", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "startsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "finalized", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "halted", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "earlyParticipantWhitelist", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "unhalt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "requiredSignedAddress", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isCrowdsaleFull", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "investorCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "status", "type": "bool"}], "name": "setEarlyParicipantWhitelist", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "bool"}, {"name": "_signerAddress", "type": "address"}], "name": "setRequireSignedAddress", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "customerId", "type": "uint128"}], "name": "investWithCustomerId", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setMultisig", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}, {"name": "v", "type": "uint8"}, {"name": "r", "type": "bytes32"}, {"name": "s", "type": "bytes32"}], "name": "buyWithSignedAddress", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "presaleWeiRaised", "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": "_token", "type": "address"}, {"name": "_pricingStrategy", "type": "address"}, {"name": "_multisigWallet", "type": "address"}, {"name": "_start", "type": "uint256"}, {"name": "_end", "type": "uint256"}, {"name": "_minimumFundingGoal", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"payable": true, "stateMutability": "payable", "type": "fallback"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}, {"indexed": false, "name": "tokenAmount", "type": "uint256"}, {"indexed": false, "name": "customerId", "type": "uint128"}], "name": "Invested", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}], "name": "Refund", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newRequireCustomerId", "type": "bool"}, {"indexed": false, "name": "newRequiredSignedAddress", "type": "bool"}, {"indexed": false, "name": "newSignerAddress", "type": "address"}], "name": "InvestmentPolicyChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "addr", "type": "address"}, {"indexed": false, "name": "status", "type": "bool"}], "name": "Whitelisted", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newEndsAt", "type": "uint256"}], "name": "EndsAtChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "bytecode": "0x6080604052600560015560006009556000600a556000600b556000600c556000600d556000600e553480156200003457600080fd5b5060405160c0806200260883398101604090815281516020830151918301516060840151608085015160a0909501516000805433600160a060020a0319918216811782161790915560028054909116600160a060020a03861617905592949192909190858585858585858585858585620000b78564010000000062000133810204565b60058054600160a060020a031916600160a060020a038681169190911791829055161515620000e557600080fd5b821515620000f257600080fd5b60078390558115156200010457600080fd5b600882905560075482116200011857600080fd5b60065550620002009f50505050505050505050505050505050565b600054600160a060020a031633146200014b57600080fd5b60038054600160a060020a031916600160a060020a038381169190911791829055604080517f04bbc255000000000000000000000000000000000000000000000000000000008152905192909116916304bbc255916004808201926020929091908290030181600087803b158015620001c357600080fd5b505af1158015620001d8573d6000803e3d6000fd5b505050506040513d6020811015620001ef57600080fd5b50511515620001fd57600080fd5b50565b6123f880620002106000396000f3006080604052600436106102875763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630226401d811461028c57806303ca0eed146102b357806303f9c793146102dc578063062b01ce146102f25780630a09284a1461030757806313f4e9771461031c5780631865c57d1461033157806319b667da1461036a5780631a49803b1461038b5780631aae3460146103c057806321d5c0f6146103e157806332013ac3146104125780634042b66f146104395780634551dd591461044e5780634bb278f31461046357806350c6773414610478578063518ab2a814610499578063590e1ae3146104ae5780635b7633d0146104c35780635da89ac0146104d85780635ed7ca5b146104ed5780636203f09f1461050257806363c6082f146105175780636e50eb3f1461055957806378b99c2414610571578063797d9437146105865780637c2e08a31461059b5780637f7d711e146105b057806387612102146105ca5780638d51faec146105d25780638da5cb5b146105ea578063903cc583146105ff5780639075becf1461061a57806397b150ca1461062f57806399e9376c146106505780639d3c663f1461066d578063a6f2ae3a1461068e578063a7ba44c314610696578063af468682146106ab578063b3f05b97146106c0578063b9b8af0b146106d5578063cb16e6d0146106ea578063cb3e64fd1461070b578063d222dc0414610720578063d5d0902114610735578063d7e64c001461074a578063eac249321461075f578063ed68ff2c14610785578063ef869443146107ab578063f2fde38b146107d4578063f3283fba146107f5578063f486972614610816578063f7c00e2f1461083f578063fc0c546a14610854575b600080fd5b34801561029857600080fd5b506102a1610869565b60408051918252519081900360200190f35b3480156102bf57600080fd5b506102c861086f565b604080519115158252519081900360200190f35b6102f0600160a060020a0360043516610878565b005b3480156102fe57600080fd5b506102c86108ac565b34801561031357600080fd5b506102a1610943565b34801561032857600080fd5b506102a1610949565b34801561033d57600080fd5b5061034661094f565b6040518082600781111561035657fe5b60ff16815260200191505060405180910390f35b34801561037657600080fd5b506102f0600160a060020a0360043516610b3d565b6102f0600160a060020a03600435166fffffffffffffffffffffffffffffffff6024351660ff60443516606435608435610c0e565b3480156103cc57600080fd5b506102a1600160a060020a0360043516610d36565b3480156103ed57600080fd5b506103f6610d48565b60408051600160a060020a039092168252519081900360200190f35b34801561041e57600080fd5b506102f0600160a060020a0360043516602435604435610d57565b34801561044557600080fd5b506102a161110d565b34801561045a57600080fd5b506102c8611113565b34801561046f57600080fd5b506102f0611118565b34801561048457600080fd5b506102f0600160a060020a036004351661121d565b3480156104a557600080fd5b506102a16112b8565b3480156104ba57600080fd5b506102f06112be565b3480156104cf57600080fd5b506103f6611404565b3480156104e457600080fd5b506102a1611419565b3480156104f957600080fd5b506102f061141f565b34801561050e57600080fd5b506102a161146d565b6102f06fffffffffffffffffffffffffffffffff600435167fff0000000000000000000000000000000000000000000000000000000000000060243516611473565b34801561056557600080fd5b506102f06004356114e5565b34801561057d57600080fd5b506103f6611553565b34801561059257600080fd5b506102a1611562565b3480156105a757600080fd5b506102c8611568565b3480156105bc57600080fd5b506102f06004351515611573565b6102f06115f7565b3480156105de57600080fd5b506102f06004356116b7565b3480156105f657600080fd5b506103f66116d3565b34801561060b57600080fd5b506102a16004356024356116e2565b34801561062657600080fd5b506103f6611839565b34801561063b57600080fd5b506102a1600160a060020a0360043516611848565b6102f06fffffffffffffffffffffffffffffffff6004351661185a565b34801561067957600080fd5b506102c8600435602435604435606435611864565b6102f061186e565b3480156106a257600080fd5b506102c8611879565b3480156106b757600080fd5b506102a16118e7565b3480156106cc57600080fd5b506102c86118ed565b3480156106e157600080fd5b506102c86118f6565b3480156106f657600080fd5b506102c8600160a060020a0360043516611917565b34801561071757600080fd5b506102f061192c565b34801561072c57600080fd5b506102c861198c565b34801561074157600080fd5b506102c861199a565b34801561075657600080fd5b506102a161199f565b34801561076b57600080fd5b506102f0600160a060020a036004351660243515156119a5565b34801561079157600080fd5b506102f06004351515600160a060020a0360243516611a20565b6102f0600160a060020a03600435166fffffffffffffffffffffffffffffffff60243516611ad0565b3480156107e057600080fd5b506102f0600160a060020a0360043516611b12565b34801561080157600080fd5b506102f0600160a060020a0360043516611ba6565b6102f06fffffffffffffffffffffffffffffffff6004351660ff60243516604435606435611bfd565b34801561084b57600080fd5b506102a1611c10565b34801561086057600080fd5b506103f6611c16565b60135481565b60145460ff1681565b60145460ff161561088857600080fd5b601454610100900460ff161561089d57600080fd5b6108a8816000611c25565b5050565b600354604080517f8e7682880000000000000000000000000000000000000000000000000000000081523060048201529051600092600160a060020a031691638e76828891602480830192602092919082900301818787803b15801561091157600080fd5b505af1158015610925573d6000803e3d6000fd5b505050506040513d602081101561093b57600080fd5b505190505b90565b60085481565b60065481565b600f5460009060ff161561096557506006610940565b600454600160a060020a0316151561097f57506001610940565b60048054604080517f82771c8e0000000000000000000000000000000000000000000000000000000081529051600160a060020a03909216926382771c8e9282820192602092908290030181600087803b1580156109dc57600080fd5b505af11580156109f0573d6000803e3d6000fd5b505050506040513d6020811015610a0657600080fd5b50511515610a1657506001610940565b600354604080517f8e7682880000000000000000000000000000000000000000000000000000000081523060048201529051600160a060020a0390921691638e768288916024808201926020929091908290030181600087803b158015610a7c57600080fd5b505af1158015610a90573d6000803e3d6000fd5b505050506040513d6020811015610aa657600080fd5b50511515610ab657506001610940565b600754421015610ac857506002610940565b6008544211158015610adf5750610add61199a565b155b15610aec57506003610940565b610af4611568565b15610b0157506004610940565b610b09611568565b158015610b1857506000600a54115b8015610b285750600a54600d5410155b15610b3557506007610940565b506005610940565b600054600160a060020a03163314610b5457600080fd5b6004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383811691909117808355604080517f614cb9040000000000000000000000000000000000000000000000000000000081529051919092169263614cb904928082019260209290918290030181600087803b158015610bd457600080fd5b505af1158015610be8573d6000803e3d6000fd5b505050506040513d6020811015610bfe57600080fd5b50511515610c0b57600080fd5b50565b60006002866040518082600160a060020a0316600160a060020a03166c010000000000000000000000000281526014019150506020604051808303816000865af1158015610c60573d6000803e3d6000fd5b5050506040513d6020811015610c7557600080fd5b5051601454604080516000808252602080830180855286905260ff8a16838501526060830189905260808301889052925194955062010000909304600160a060020a03169360019360a08084019493601f198401939081900390910191865af1158015610ce6573d6000803e3d6000fd5b50505060206040510351600160a060020a0316141515610d0557600080fd5b6fffffffffffffffffffffffffffffffff85161515610d2357600080fd5b610d2d8686611c25565b50505050505050565b60106020526000908152604090205481565b600454600160a060020a031681565b600080548190600160a060020a03163314610d7157600080fd5b600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610ddd57600080fd5b505af1158015610df1573d6000803e3d6000fd5b505050506040513d6020811015610e0757600080fd5b5051600a8054604080516000805160206123ad833981519152815260048101929092528688026024830181905290519390920a8702945090925073__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f91604480820192602092909190829003018186803b158015610e7d57600080fd5b505af4158015610e91573d6000803e3d6000fd5b505050506040513d6020811015610ea757600080fd5b5051600a55600954604080516000805160206123ad83398151915281526004810192909252602482018490525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b158015610f0f57600080fd5b505af4158015610f23573d6000803e3d6000fd5b505050506040513d6020811015610f3957600080fd5b5051600955600160a060020a0385166000908152601060209081526040918290205482516000805160206123ad8339815191528152600481019190915260248101849052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b158015610fb757600080fd5b505af4158015610fcb573d6000803e3d6000fd5b505050506040513d6020811015610fe157600080fd5b5051600160a060020a03861660009081526010602090815260408083209390935560118152908290205482516000805160206123ad8339815191528152600481019190915260248101859052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561106757600080fd5b505af415801561107b573d6000803e3d6000fd5b505050506040513d602081101561109157600080fd5b5051600160a060020a0386166000908152601160205260409020556110b68583611dcc565b60408051600160a060020a0387168152602081018390528082018490526000606082015290517f0396f60aaad038749091d273dc13aaabc63db6e2271c7bad442d5cf25cc433509181900360800190a15050505050565b600a5481565b600190565b60048061112361094f565b600781111561112e57fe5b1461113857600080fd5b600054600160a060020a0316331461114f57600080fd5b60005474010000000000000000000000000000000000000000900460ff161561117757600080fd5b600f5460ff161561118757600080fd5b600454600160a060020a03161561120d5760048054604080517f0bf318a30000000000000000000000000000000000000000000000000000000081529051600160a060020a0390921692630bf318a392828201926000929082900301818387803b1580156111f457600080fd5b505af1158015611208573d6000803e3d6000fd5b505050505b50600f805460ff19166001179055565b600054600160a060020a0316331461123457600080fd5b6003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038381169190911791829055604080517f04bbc255000000000000000000000000000000000000000000000000000000008152905192909116916304bbc255916004808201926020929091908290030181600087803b158015610bd457600080fd5b60095481565b60006007806112cb61094f565b60078111156112d657fe5b146112e057600080fd5b3360009081526010602052604090205491508115156112fe57600080fd5b33600090815260106020908152604080832092909255600e5482516000805160206123ad8339815191528152600481019190915260248101859052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561137357600080fd5b505af4158015611387573d6000803e3d6000fd5b505050506040513d602081101561139d57600080fd5b5051600e55604080513381526020810184905281517fbb28353e4598c3b9199101a66e0989549b659a59a54d2c27fbb183f1932c8e6d929181900390910190a1604051339083156108fc029084906000818181858888f1935050505015156108a857600080fd5b601454620100009004600160a060020a031681565b600e5481565b600054600160a060020a0316331461143657600080fd5b6000805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b60015481565b604080517001000000000000000000000000000000006fffffffffffffffffffffffffffffffff851602815290519081900360100190207fff00000000000000000000000000000000000000000000000000000000000000908116908216146114db57600080fd5b6108a83383611ad0565b600054600160a060020a031633146114fc57600080fd5b8042111561150957600080fd5b80600754111561151857600080fd5b60088190556040805182815290517fd34bb772c4ae9baa99db852f622773b31c7827e8ee818449fef20d30980bd3109181900360200190a150565b600354600160a060020a031681565b600d5481565b600654600a54101590565b600054600160a060020a0316331461158a57600080fd5b6014805460ff191682151517908190556040805160ff808416151582526101008404161515602082015262010000909204600160a060020a031682820152517f48d826081348f5f00e8a33c9ae8ce89ed4c6e88400b585a478bc203d9e8177d3916060908290030190a150565b60058061160261094f565b600781111561160d57fe5b1461161757600080fd5b34151561162357600080fd5b600d54604080516000805160206123ad833981519152815260048101929092523460248301525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b15801561168557600080fd5b505af4158015611699573d6000803e3d6000fd5b505050506040513d60208110156116af57600080fd5b5051600d5550565b600054600160a060020a031633146116ce57600080fd5b601355565b600054600160a060020a031681565b600080600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561175157600080fd5b505af1158015611765573d6000803e3d6000fd5b505050506040513d602081101561177b57600080fd5b5051604080517f1d3b9edf00000000000000000000000000000000000000000000000000000000815260048101879052600a9290920a602483018190529051909250849173__contracts/SafeMathLib.sol:SafeMathLi__91631d3b9edf91604480820192602092909190829003018186803b1580156117fb57600080fd5b505af415801561180f573d6000803e3d6000fd5b505050506040513d602081101561182557600080fd5b505181151561183057fe5b04949350505050565b600554600160a060020a031681565b60116020526000908152604090205481565b610c0b3382611ad0565b6000949350505050565b61187733610878565b565b6000600460009054906101000a9004600160a060020a0316600160a060020a03166382771c8e6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561091157600080fd5b60075481565b600f5460ff1681565b60005474010000000000000000000000000000000000000000900460ff1681565b60126020526000908152604090205460ff1681565b600054600160a060020a0316331461194357600080fd5b60005474010000000000000000000000000000000000000000900460ff16151561196c57600080fd5b6000805474ff000000000000000000000000000000000000000019169055565b601454610100900460ff1681565b600090565b600c5481565b600054600160a060020a031633146119bc57600080fd5b600160a060020a038216600081815260126020908152604091829020805460ff191685151590811790915582519384529083015280517fa54714518c5d275fdcd3d2a461e4858e4e8cb04fb93cd0bca9d6d34115f264409281900390910190a15050565b600054600160a060020a03163314611a3757600080fd5b60148054600160a060020a038084166201000090810275ffffffffffffffffffffffffffffffffffffffff00001987151561010090810261ff0019909616959095171617938490556040805160ff86811615158252948604909416151560208501529304168183015290517f48d826081348f5f00e8a33c9ae8ce89ed4c6e88400b585a478bc203d9e8177d39181900360600190a15050565b601454610100900460ff1615611ae557600080fd5b6fffffffffffffffffffffffffffffffff81161515611b0357600080fd5b611b0d8282611c25565b505050565b600054600160a060020a03163314611b2957600080fd5b600160a060020a0381161515611b3e57600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600054600160a060020a03163314611bbd57600080fd5b600154600c541115611bce57600080fd5b6005805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b611c0a3385858585610c0e565b50505050565b600b5481565b600254600160a060020a031681565b6000805474010000000000000000000000000000000000000000900460ff1615611c4e57600080fd5b611dc58383600360009054906101000a9004600160a060020a0316600160a060020a03166318a4155e34600b54600a540360095433600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015611cef57600080fd5b505af1158015611d03573d6000803e3d6000fd5b505050506040513d6020811015611d1957600080fd5b5051604080517c010000000000000000000000000000000000000000000000000000000063ffffffff8916028152600481019690965260248601949094526044850192909252600160a060020a0316606484015260848301525160a48083019260209291908290030181600087803b158015611d9457600080fd5b505af1158015611da8573d6000803e3d6000fd5b505050506040513d6020811015611dbe57600080fd5b5051611e51565b9392505050565b600254604080517f40c10f19000000000000000000000000000000000000000000000000000000008152600160a060020a038581166004830152602482018590529151919092169182916340c10f199160448082019260009290919082900301818387803b158015611e3d57600080fd5b505af1158015610d2d573d6000803e3d6000fd5b60008054819074010000000000000000000000000000000000000000900460ff1615611e7c57600080fd5b6002611e8661094f565b6007811115611e9157fe5b1415611ec357600160a060020a03851660009081526012602052604090205460ff161515611ebe57600080fd5b611edf565b6003611ecd61094f565b6007811115611ed857fe5b1415610287575b5034821515611eed57600080fd5b600160a060020a0385166000908152601060205260409020541515611f1657600c805460010190555b600160a060020a0385166000908152601060209081526040918290205482516000805160206123ad8339815191528152600481019190915260248101849052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b158015611f8f57600080fd5b505af4158015611fa3573d6000803e3d6000fd5b505050506040513d6020811015611fb957600080fd5b5051600160a060020a03861660009081526010602090815260408083209390935560118152908290205482516000805160206123ad8339815191528152600481019190915260248101869052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561203f57600080fd5b505af4158015612053573d6000803e3d6000fd5b505050506040513d602081101561206957600080fd5b5051600160a060020a03861660009081526011602090815260409182902092909255600a5481516000805160206123ad8339815191528152600481019190915260248101849052905173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f9260448082019391829003018186803b1580156120e957600080fd5b505af41580156120fd573d6000803e3d6000fd5b505050506040513d602081101561211357600080fd5b5051600a55600954604080516000805160206123ad83398151915281526004810192909252602482018590525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b15801561217b57600080fd5b505af415801561218f573d6000803e3d6000fd5b505050506040513d60208110156121a557600080fd5b5051600955600354604080517ff14ae17d000000000000000000000000000000000000000000000000000000008152600160a060020a0388811660048301529151919092169163f14ae17d9160248083019260209291908290030181600087803b15801561221257600080fd5b505af1158015612226573d6000803e3d6000fd5b505050506040513d602081101561223c57600080fd5b5051156122ea57600b5473__contracts/SafeMathLib.sol:SafeMathLi__6366098d4f9091836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b1580156122ba57600080fd5b505af41580156122ce573d6000803e3d6000fd5b505050506040513d60208110156122e457600080fd5b5051600b555b6122fa8184600a54600954611864565b1561230457600080fd5b61230e8584611dcc565b600554604051600160a060020a039091169082156108fc029083906000818181858888f19350505050151561234257600080fd5b60408051600160a060020a0387168152602081018390528082018590526fffffffffffffffffffffffffffffffff8616606082015290517f0396f60aaad038749091d273dc13aaabc63db6e2271c7bad442d5cf25cc433509181900360800190a150909392505050560066098d4f00000000000000000000000000000000000000000000000000000000a165627a7a72305820118c4fedd39f95cf3aa895d2f13ce2e11c5e9c8574679b8f8c347a1baea69f600029", "bytecode_runtime": "0x6080604052600436106102875763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630226401d811461028c57806303ca0eed146102b357806303f9c793146102dc578063062b01ce146102f25780630a09284a1461030757806313f4e9771461031c5780631865c57d1461033157806319b667da1461036a5780631a49803b1461038b5780631aae3460146103c057806321d5c0f6146103e157806332013ac3146104125780634042b66f146104395780634551dd591461044e5780634bb278f31461046357806350c6773414610478578063518ab2a814610499578063590e1ae3146104ae5780635b7633d0146104c35780635da89ac0146104d85780635ed7ca5b146104ed5780636203f09f1461050257806363c6082f146105175780636e50eb3f1461055957806378b99c2414610571578063797d9437146105865780637c2e08a31461059b5780637f7d711e146105b057806387612102146105ca5780638d51faec146105d25780638da5cb5b146105ea578063903cc583146105ff5780639075becf1461061a57806397b150ca1461062f57806399e9376c146106505780639d3c663f1461066d578063a6f2ae3a1461068e578063a7ba44c314610696578063af468682146106ab578063b3f05b97146106c0578063b9b8af0b146106d5578063cb16e6d0146106ea578063cb3e64fd1461070b578063d222dc0414610720578063d5d0902114610735578063d7e64c001461074a578063eac249321461075f578063ed68ff2c14610785578063ef869443146107ab578063f2fde38b146107d4578063f3283fba146107f5578063f486972614610816578063f7c00e2f1461083f578063fc0c546a14610854575b600080fd5b34801561029857600080fd5b506102a1610869565b60408051918252519081900360200190f35b3480156102bf57600080fd5b506102c861086f565b604080519115158252519081900360200190f35b6102f0600160a060020a0360043516610878565b005b3480156102fe57600080fd5b506102c86108ac565b34801561031357600080fd5b506102a1610943565b34801561032857600080fd5b506102a1610949565b34801561033d57600080fd5b5061034661094f565b6040518082600781111561035657fe5b60ff16815260200191505060405180910390f35b34801561037657600080fd5b506102f0600160a060020a0360043516610b3d565b6102f0600160a060020a03600435166fffffffffffffffffffffffffffffffff6024351660ff60443516606435608435610c0e565b3480156103cc57600080fd5b506102a1600160a060020a0360043516610d36565b3480156103ed57600080fd5b506103f6610d48565b60408051600160a060020a039092168252519081900360200190f35b34801561041e57600080fd5b506102f0600160a060020a0360043516602435604435610d57565b34801561044557600080fd5b506102a161110d565b34801561045a57600080fd5b506102c8611113565b34801561046f57600080fd5b506102f0611118565b34801561048457600080fd5b506102f0600160a060020a036004351661121d565b3480156104a557600080fd5b506102a16112b8565b3480156104ba57600080fd5b506102f06112be565b3480156104cf57600080fd5b506103f6611404565b3480156104e457600080fd5b506102a1611419565b3480156104f957600080fd5b506102f061141f565b34801561050e57600080fd5b506102a161146d565b6102f06fffffffffffffffffffffffffffffffff600435167fff0000000000000000000000000000000000000000000000000000000000000060243516611473565b34801561056557600080fd5b506102f06004356114e5565b34801561057d57600080fd5b506103f6611553565b34801561059257600080fd5b506102a1611562565b3480156105a757600080fd5b506102c8611568565b3480156105bc57600080fd5b506102f06004351515611573565b6102f06115f7565b3480156105de57600080fd5b506102f06004356116b7565b3480156105f657600080fd5b506103f66116d3565b34801561060b57600080fd5b506102a16004356024356116e2565b34801561062657600080fd5b506103f6611839565b34801561063b57600080fd5b506102a1600160a060020a0360043516611848565b6102f06fffffffffffffffffffffffffffffffff6004351661185a565b34801561067957600080fd5b506102c8600435602435604435606435611864565b6102f061186e565b3480156106a257600080fd5b506102c8611879565b3480156106b757600080fd5b506102a16118e7565b3480156106cc57600080fd5b506102c86118ed565b3480156106e157600080fd5b506102c86118f6565b3480156106f657600080fd5b506102c8600160a060020a0360043516611917565b34801561071757600080fd5b506102f061192c565b34801561072c57600080fd5b506102c861198c565b34801561074157600080fd5b506102c861199a565b34801561075657600080fd5b506102a161199f565b34801561076b57600080fd5b506102f0600160a060020a036004351660243515156119a5565b34801561079157600080fd5b506102f06004351515600160a060020a0360243516611a20565b6102f0600160a060020a03600435166fffffffffffffffffffffffffffffffff60243516611ad0565b3480156107e057600080fd5b506102f0600160a060020a0360043516611b12565b34801561080157600080fd5b506102f0600160a060020a0360043516611ba6565b6102f06fffffffffffffffffffffffffffffffff6004351660ff60243516604435606435611bfd565b34801561084b57600080fd5b506102a1611c10565b34801561086057600080fd5b506103f6611c16565b60135481565b60145460ff1681565b60145460ff161561088857600080fd5b601454610100900460ff161561089d57600080fd5b6108a8816000611c25565b5050565b600354604080517f8e7682880000000000000000000000000000000000000000000000000000000081523060048201529051600092600160a060020a031691638e76828891602480830192602092919082900301818787803b15801561091157600080fd5b505af1158015610925573d6000803e3d6000fd5b505050506040513d602081101561093b57600080fd5b505190505b90565b60085481565b60065481565b600f5460009060ff161561096557506006610940565b600454600160a060020a0316151561097f57506001610940565b60048054604080517f82771c8e0000000000000000000000000000000000000000000000000000000081529051600160a060020a03909216926382771c8e9282820192602092908290030181600087803b1580156109dc57600080fd5b505af11580156109f0573d6000803e3d6000fd5b505050506040513d6020811015610a0657600080fd5b50511515610a1657506001610940565b600354604080517f8e7682880000000000000000000000000000000000000000000000000000000081523060048201529051600160a060020a0390921691638e768288916024808201926020929091908290030181600087803b158015610a7c57600080fd5b505af1158015610a90573d6000803e3d6000fd5b505050506040513d6020811015610aa657600080fd5b50511515610ab657506001610940565b600754421015610ac857506002610940565b6008544211158015610adf5750610add61199a565b155b15610aec57506003610940565b610af4611568565b15610b0157506004610940565b610b09611568565b158015610b1857506000600a54115b8015610b285750600a54600d5410155b15610b3557506007610940565b506005610940565b600054600160a060020a03163314610b5457600080fd5b6004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383811691909117808355604080517f614cb9040000000000000000000000000000000000000000000000000000000081529051919092169263614cb904928082019260209290918290030181600087803b158015610bd457600080fd5b505af1158015610be8573d6000803e3d6000fd5b505050506040513d6020811015610bfe57600080fd5b50511515610c0b57600080fd5b50565b60006002866040518082600160a060020a0316600160a060020a03166c010000000000000000000000000281526014019150506020604051808303816000865af1158015610c60573d6000803e3d6000fd5b5050506040513d6020811015610c7557600080fd5b5051601454604080516000808252602080830180855286905260ff8a16838501526060830189905260808301889052925194955062010000909304600160a060020a03169360019360a08084019493601f198401939081900390910191865af1158015610ce6573d6000803e3d6000fd5b50505060206040510351600160a060020a0316141515610d0557600080fd5b6fffffffffffffffffffffffffffffffff85161515610d2357600080fd5b610d2d8686611c25565b50505050505050565b60106020526000908152604090205481565b600454600160a060020a031681565b600080548190600160a060020a03163314610d7157600080fd5b600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610ddd57600080fd5b505af1158015610df1573d6000803e3d6000fd5b505050506040513d6020811015610e0757600080fd5b5051600a8054604080516000805160206123ad833981519152815260048101929092528688026024830181905290519390920a8702945090925073__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f91604480820192602092909190829003018186803b158015610e7d57600080fd5b505af4158015610e91573d6000803e3d6000fd5b505050506040513d6020811015610ea757600080fd5b5051600a55600954604080516000805160206123ad83398151915281526004810192909252602482018490525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b158015610f0f57600080fd5b505af4158015610f23573d6000803e3d6000fd5b505050506040513d6020811015610f3957600080fd5b5051600955600160a060020a0385166000908152601060209081526040918290205482516000805160206123ad8339815191528152600481019190915260248101849052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b158015610fb757600080fd5b505af4158015610fcb573d6000803e3d6000fd5b505050506040513d6020811015610fe157600080fd5b5051600160a060020a03861660009081526010602090815260408083209390935560118152908290205482516000805160206123ad8339815191528152600481019190915260248101859052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561106757600080fd5b505af415801561107b573d6000803e3d6000fd5b505050506040513d602081101561109157600080fd5b5051600160a060020a0386166000908152601160205260409020556110b68583611dcc565b60408051600160a060020a0387168152602081018390528082018490526000606082015290517f0396f60aaad038749091d273dc13aaabc63db6e2271c7bad442d5cf25cc433509181900360800190a15050505050565b600a5481565b600190565b60048061112361094f565b600781111561112e57fe5b1461113857600080fd5b600054600160a060020a0316331461114f57600080fd5b60005474010000000000000000000000000000000000000000900460ff161561117757600080fd5b600f5460ff161561118757600080fd5b600454600160a060020a03161561120d5760048054604080517f0bf318a30000000000000000000000000000000000000000000000000000000081529051600160a060020a0390921692630bf318a392828201926000929082900301818387803b1580156111f457600080fd5b505af1158015611208573d6000803e3d6000fd5b505050505b50600f805460ff19166001179055565b600054600160a060020a0316331461123457600080fd5b6003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038381169190911791829055604080517f04bbc255000000000000000000000000000000000000000000000000000000008152905192909116916304bbc255916004808201926020929091908290030181600087803b158015610bd457600080fd5b60095481565b60006007806112cb61094f565b60078111156112d657fe5b146112e057600080fd5b3360009081526010602052604090205491508115156112fe57600080fd5b33600090815260106020908152604080832092909255600e5482516000805160206123ad8339815191528152600481019190915260248101859052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561137357600080fd5b505af4158015611387573d6000803e3d6000fd5b505050506040513d602081101561139d57600080fd5b5051600e55604080513381526020810184905281517fbb28353e4598c3b9199101a66e0989549b659a59a54d2c27fbb183f1932c8e6d929181900390910190a1604051339083156108fc029084906000818181858888f1935050505015156108a857600080fd5b601454620100009004600160a060020a031681565b600e5481565b600054600160a060020a0316331461143657600080fd5b6000805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b60015481565b604080517001000000000000000000000000000000006fffffffffffffffffffffffffffffffff851602815290519081900360100190207fff00000000000000000000000000000000000000000000000000000000000000908116908216146114db57600080fd5b6108a83383611ad0565b600054600160a060020a031633146114fc57600080fd5b8042111561150957600080fd5b80600754111561151857600080fd5b60088190556040805182815290517fd34bb772c4ae9baa99db852f622773b31c7827e8ee818449fef20d30980bd3109181900360200190a150565b600354600160a060020a031681565b600d5481565b600654600a54101590565b600054600160a060020a0316331461158a57600080fd5b6014805460ff191682151517908190556040805160ff808416151582526101008404161515602082015262010000909204600160a060020a031682820152517f48d826081348f5f00e8a33c9ae8ce89ed4c6e88400b585a478bc203d9e8177d3916060908290030190a150565b60058061160261094f565b600781111561160d57fe5b1461161757600080fd5b34151561162357600080fd5b600d54604080516000805160206123ad833981519152815260048101929092523460248301525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b15801561168557600080fd5b505af4158015611699573d6000803e3d6000fd5b505050506040513d60208110156116af57600080fd5b5051600d5550565b600054600160a060020a031633146116ce57600080fd5b601355565b600054600160a060020a031681565b600080600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561175157600080fd5b505af1158015611765573d6000803e3d6000fd5b505050506040513d602081101561177b57600080fd5b5051604080517f1d3b9edf00000000000000000000000000000000000000000000000000000000815260048101879052600a9290920a602483018190529051909250849173__contracts/SafeMathLib.sol:SafeMathLi__91631d3b9edf91604480820192602092909190829003018186803b1580156117fb57600080fd5b505af415801561180f573d6000803e3d6000fd5b505050506040513d602081101561182557600080fd5b505181151561183057fe5b04949350505050565b600554600160a060020a031681565b60116020526000908152604090205481565b610c0b3382611ad0565b6000949350505050565b61187733610878565b565b6000600460009054906101000a9004600160a060020a0316600160a060020a03166382771c8e6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561091157600080fd5b60075481565b600f5460ff1681565b60005474010000000000000000000000000000000000000000900460ff1681565b60126020526000908152604090205460ff1681565b600054600160a060020a0316331461194357600080fd5b60005474010000000000000000000000000000000000000000900460ff16151561196c57600080fd5b6000805474ff000000000000000000000000000000000000000019169055565b601454610100900460ff1681565b600090565b600c5481565b600054600160a060020a031633146119bc57600080fd5b600160a060020a038216600081815260126020908152604091829020805460ff191685151590811790915582519384529083015280517fa54714518c5d275fdcd3d2a461e4858e4e8cb04fb93cd0bca9d6d34115f264409281900390910190a15050565b600054600160a060020a03163314611a3757600080fd5b60148054600160a060020a038084166201000090810275ffffffffffffffffffffffffffffffffffffffff00001987151561010090810261ff0019909616959095171617938490556040805160ff86811615158252948604909416151560208501529304168183015290517f48d826081348f5f00e8a33c9ae8ce89ed4c6e88400b585a478bc203d9e8177d39181900360600190a15050565b601454610100900460ff1615611ae557600080fd5b6fffffffffffffffffffffffffffffffff81161515611b0357600080fd5b611b0d8282611c25565b505050565b600054600160a060020a03163314611b2957600080fd5b600160a060020a0381161515611b3e57600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600054600160a060020a03163314611bbd57600080fd5b600154600c541115611bce57600080fd5b6005805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b611c0a3385858585610c0e565b50505050565b600b5481565b600254600160a060020a031681565b6000805474010000000000000000000000000000000000000000900460ff1615611c4e57600080fd5b611dc58383600360009054906101000a9004600160a060020a0316600160a060020a03166318a4155e34600b54600a540360095433600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015611cef57600080fd5b505af1158015611d03573d6000803e3d6000fd5b505050506040513d6020811015611d1957600080fd5b5051604080517c010000000000000000000000000000000000000000000000000000000063ffffffff8916028152600481019690965260248601949094526044850192909252600160a060020a0316606484015260848301525160a48083019260209291908290030181600087803b158015611d9457600080fd5b505af1158015611da8573d6000803e3d6000fd5b505050506040513d6020811015611dbe57600080fd5b5051611e51565b9392505050565b600254604080517f40c10f19000000000000000000000000000000000000000000000000000000008152600160a060020a038581166004830152602482018590529151919092169182916340c10f199160448082019260009290919082900301818387803b158015611e3d57600080fd5b505af1158015610d2d573d6000803e3d6000fd5b60008054819074010000000000000000000000000000000000000000900460ff1615611e7c57600080fd5b6002611e8661094f565b6007811115611e9157fe5b1415611ec357600160a060020a03851660009081526012602052604090205460ff161515611ebe57600080fd5b611edf565b6003611ecd61094f565b6007811115611ed857fe5b1415610287575b5034821515611eed57600080fd5b600160a060020a0385166000908152601060205260409020541515611f1657600c805460010190555b600160a060020a0385166000908152601060209081526040918290205482516000805160206123ad8339815191528152600481019190915260248101849052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b158015611f8f57600080fd5b505af4158015611fa3573d6000803e3d6000fd5b505050506040513d6020811015611fb957600080fd5b5051600160a060020a03861660009081526010602090815260408083209390935560118152908290205482516000805160206123ad8339815191528152600481019190915260248101869052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561203f57600080fd5b505af4158015612053573d6000803e3d6000fd5b505050506040513d602081101561206957600080fd5b5051600160a060020a03861660009081526011602090815260409182902092909255600a5481516000805160206123ad8339815191528152600481019190915260248101849052905173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f9260448082019391829003018186803b1580156120e957600080fd5b505af41580156120fd573d6000803e3d6000fd5b505050506040513d602081101561211357600080fd5b5051600a55600954604080516000805160206123ad83398151915281526004810192909252602482018590525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b15801561217b57600080fd5b505af415801561218f573d6000803e3d6000fd5b505050506040513d60208110156121a557600080fd5b5051600955600354604080517ff14ae17d000000000000000000000000000000000000000000000000000000008152600160a060020a0388811660048301529151919092169163f14ae17d9160248083019260209291908290030181600087803b15801561221257600080fd5b505af1158015612226573d6000803e3d6000fd5b505050506040513d602081101561223c57600080fd5b5051156122ea57600b5473__contracts/SafeMathLib.sol:SafeMathLi__6366098d4f9091836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b1580156122ba57600080fd5b505af41580156122ce573d6000803e3d6000fd5b505050506040513d60208110156122e457600080fd5b5051600b555b6122fa8184600a54600954611864565b1561230457600080fd5b61230e8584611dcc565b600554604051600160a060020a039091169082156108fc029083906000818181858888f19350505050151561234257600080fd5b60408051600160a060020a0387168152602081018390528082018590526fffffffffffffffffffffffffffffffff8616606082015290517f0396f60aaad038749091d273dc13aaabc63db6e2271c7bad442d5cf25cc433509181900360800190a150909392505050560066098d4f00000000000000000000000000000000000000000000000000000000a165627a7a72305820118c4fedd39f95cf3aa895d2f13ce2e11c5e9c8574679b8f8c347a1baea69f600029", "direct_dependencies": ["SafeMathLib"], "full_dependencies": ["SafeMathLib"], "linkrefs": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 8358}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 8652}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 8994}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 9346}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 10906}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 12472}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 13218}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 17106}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 17458}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 17800}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 18084}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 18608}], "linkrefs_runtime": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 7302}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 7596}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 7938}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 8290}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 9850}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 11416}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 12162}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 16050}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 16402}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 16744}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 17028}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 17552}], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": true, "inputs": [], "name": "ownerTestValue", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "requireCustomerId", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "invest", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "isPricingSane", "outputs": [{"name": "sane", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "endsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "minimumFundingGoal", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getState", "outputs": [{"name": "", "type": "uint8"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setFinalizeAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "customerId", "type": "uint128"}, {"name": "v", "type": "uint8"}, {"name": "r", "type": "bytes32"}, {"name": "s", "type": "bytes32"}], "name": "investWithSignedAddress", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "investedAmountOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "finalizeAgent", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "receiver", "type": "address"}, {"name": "fullTokens", "type": "uint256"}, {"name": "weiPrice", "type": "uint256"}], "name": "preallocate", "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": "isCrowdsale", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "finalize", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_pricingStrategy", "type": "address"}], "name": "setPricingStrategy", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "tokensSold", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "refund", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "signerAddress", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "weiRefunded", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "halt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}, {"name": "checksum", "type": "bytes1"}], "name": "buyWithCustomerIdWithChecksum", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "time", "type": "uint256"}], "name": "setEndsAt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "pricingStrategy", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "loadedRefund", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isMinimumGoalReached", "outputs": [{"name": "reached", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "bool"}], "name": "setRequireCustomerId", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "loadRefund", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "val", "type": "uint256"}], "name": "setOwnerTestValue", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "weisTotal", "type": "uint256"}, {"name": "pricePerToken", "type": "uint256"}], "name": "calculateTokens", "outputs": [{"name": "tokensTotal", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "multisigWallet", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "tokenAmountOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}], "name": "buyWithCustomerId", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [{"name": "weiAmount", "type": "uint256"}, {"name": "tokenAmount", "type": "uint256"}, {"name": "weiRaisedTotal", "type": "uint256"}, {"name": "tokensSoldTotal", "type": "uint256"}], "name": "isBreakingCap", "outputs": [{"name": "limitBroken", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "buy", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "isFinalizerSane", "outputs": [{"name": "sane", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "startsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "finalized", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "halted", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "earlyParticipantWhitelist", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "unhalt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "requiredSignedAddress", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isCrowdsaleFull", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "investorCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "status", "type": "bool"}], "name": "setEarlyParicipantWhitelist", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "bool"}, {"name": "_signerAddress", "type": "address"}], "name": "setRequireSignedAddress", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "customerId", "type": "uint128"}], "name": "investWithCustomerId", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setMultisig", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}, {"name": "v", "type": "uint8"}, {"name": "r", "type": "bytes32"}, {"name": "s", "type": "bytes32"}], "name": "buyWithSignedAddress", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "presaleWeiRaised", "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": "_token", "type": "address"}, {"name": "_pricingStrategy", "type": "address"}, {"name": "_multisigWallet", "type": "address"}, {"name": "_start", "type": "uint256"}, {"name": "_end", "type": "uint256"}, {"name": "_minimumFundingGoal", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"payable": true, "stateMutability": "payable", "type": "fallback"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}, {"indexed": false, "name": "tokenAmount", "type": "uint256"}, {"indexed": false, "name": "customerId", "type": "uint128"}], "name": "Invested", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}], "name": "Refund", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newRequireCustomerId", "type": "bool"}, {"indexed": false, "name": "newRequiredSignedAddress", "type": "bool"}, {"indexed": false, "name": "newSignerAddress", "type": "address"}], "name": "InvestmentPolicyChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "addr", "type": "address"}, {"indexed": false, "name": "status", "type": "bool"}], "name": "Whitelisted", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newEndsAt", "type": "uint256"}], "name": "EndsAtChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "devdoc": {"methods": {"calculateTokens(uint256,uint256)": {"details": "Calculate tokens user will have for their purchase", "params": {"pricePerToken": "What is the price for one token", "weisTotal": "How much ethers (in wei) the user putssssss in"}, "return": "tokensTotal which is received tokens, token decimals included"}, "isMinimumGoalReached()": {"return": "true if the crowdsale has raised enough money to be a successful."}, "preallocate(address,uint256,uint256)": {"params": {"fullTokens": "tokens as full tokens - decimal places added internally", "weiPrice": "Price of a single full token in wei "}}, "transferOwnership(address)": {"details": "Allows the current owner to transfer control of the contract to a newOwner.", "params": {"newOwner": "The address to transfer ownership to."}}}}, "userdoc": {"methods": {"buy()": {"notice": "The basic entry point to participate the crowdsale process. * Pay for funding, get invested tokens back in the sender address."}, "buyWithCustomerId(uint128)": {"notice": "Legacy API signature."}, "buyWithCustomerIdWithChecksum(uint128,bytes1)": {"notice": "Invest to tokens, recognize the payer. "}, "buyWithSignedAddress(uint128,uint8,bytes32,bytes32)": {"notice": "Invest to tokens, recognize the payer and clear his address. "}, "finalize()": {"notice": "Finalize a succcesful crowdsale. * The owner can triggre a call the contract that provides post-crowdsale actions, like releasing the tokens."}, "getState()": {"notice": "Crowdfund state machine management. * We make it a function and do not assign the result to a variable, so there is no chance of the variable being stale."}, "invest(address)": {"notice": "Allow anonymous contributions to this crowdsale."}, "investWithCustomerId(address,uint128)": {"notice": "Track who is the customer making the payment so we can send thank you email."}, "investWithSignedAddress(address,uint128,uint8,bytes32,bytes32)": {"notice": "Allow anonymous contributions to this crowdsale."}, "isBreakingCap(uint256,uint256,uint256,uint256)": {"notice": "Called from invest() to confirm if the curret investment does not break our cap rule."}, "isCrowdsale()": {"notice": "Interface marker. "}, "isFinalizerSane()": {"notice": "Check if the contract relationship looks good."}, "isPricingSane()": {"notice": "Check if the contract relationship looks good."}, "loadRefund()": {"notice": "Allow load refunds back on the contract for the refunding. * The team can transfer the funds back on the smart contract in the case the minimum goal was not reached.."}, "preallocate(address,uint256,uint256)": {"notice": "Preallocate tokens for the early investors. * Preallocated tokens have been sold before the actual crowdsale opens. This function mints the tokens and moves the crowdsale needle. * Investor count is not handled; it is assumed this goes for multiple investors and the token distribution happens outside the smart contract flow. * No money is exchanged, as the crowdsale team already have received the payment."}, "refund()": {"notice": "Investors can claim refund. * Note that any refunds from proxy buyers should be handled separately, and not through this contract."}, "setEarlyParicipantWhitelist(address,bool)": {"notice": "Allow addresses to do early participation. * TODO: Fix spelling error in the name"}, "setEndsAt(uint256)": {"notice": "Allow crowdsale owner to close early or extend the crowdsale. * This is useful e.g. for a manual soft cap implementation: - after X amount is reached determine manual closing * This may put the crowdsale to an invalid state, but we trust owners know what they are doing. "}, "setFinalizeAgent(address)": {"notice": "Allow to (re)set finalize agent. * Design choice: no state restrictions on setting this, so that we can fix fat finger mistakes."}, "setMultisig(address)": {"notice": "Allow to change the team multisig address in the case of emergency. * This allows to save a deployed crowdsale wallet in the case the crowdsale has not yet begun (we have done only few test transactions). After the crowdsale is going then multisig address stays locked for the safety reasons."}, "setOwnerTestValue(uint256)": {"notice": "This is for manual testing of multisig wallet interaction "}, "setPricingStrategy(address)": {"notice": "Allow to (re)set pricing strategy. * Design choice: no state restrictions on the set, so that we can fix fat finger mistakes."}, "setRequireCustomerId(bool)": {"notice": "Set policy do we need to have server-side customer ids for the investments. "}, "setRequireSignedAddress(bool,address)": {"notice": "Set policy if all investors must be cleared on the server side first. * This is e.g. for the accredited investor clearing. "}}}}, "settings": {"compilationTarget": {"contracts/UncappedCrowdsale.sol": "UncappedCrowdsale"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/Crowdsale.sol": {"keccak256": "0x2697c26528f64bb954a7c2547d3b43317d2d2b02c7d9d05a7b1ab388cd79f65d", "urls": ["bzzr://f28b280794222114141c51dd5c388d403a7c98d8b51e04170a0e294246d5164b"]}, "contracts/CrowdsaleBase.sol": {"keccak256": "0xe2c9ed11183ce705616980df7b02544d72fe18b40395da7d9d4bcb621fb87871", "urls": ["bzzr://07f3887ba0d0eb3248b1ad3581480ed71a2fe70a47dcc283c4e97c8c92e0790a"]}, "contracts/FinalizeAgent.sol": {"keccak256": "0x309fd0510e0b3e2b5044e33f7c80cfb2d6f2a5697e41a5f185931d65770cfea9", "urls": ["bzzr://4e7ed6f82c0f542e92e56c12566b2ecd7666730865bf12566c27587ec64160ac"]}, "contracts/FractionalERC20.sol": {"keccak256": "0x75bc4ad90a8b13ce961c89b1bf405776f616e019d3a2720168f8e52be223198f", "urls": ["bzzr://6a3688f12da1a5c890ef06f80f883f6c5370886092d38a1b33cd4219b718478b"]}, "contracts/Haltable.sol": {"keccak256": "0x265dcf25e7c9ab4b6eecd2181f1b71334a1b5381a60f8db7d9526dab120f4b70", "urls": ["bzzr://d522e00fa9e075941469dd81738b59fdb99ce3c12cdc39e33abe40b588c4da9b"]}, "contracts/MintableToken.sol": {"keccak256": "0x650e1d6b2bedcd36508918357c7cf4f36fdd093cd0c4d6342f4dcd3bdcdd7578", "urls": ["bzzr://7ba2ac0480d428066a18727e2adb76ba56856ecd37b4420e801131ec8f8f4be3"]}, "contracts/PricingStrategy.sol": {"keccak256": "0x8df5093b7d07168ad994f9176de0bd2268f6563b1e8a3a448d8cfe7fe246c628", "urls": ["bzzr://ef5c944d51f739ab34e2c951d6ac82a7152e6bb844058a8e57bae52c14cbe16b"]}, "contracts/Recoverable.sol": {"keccak256": "0x311a332cdd87df6e00057f5455f4e68b043b5dbe211f6d68bc64e20817515635", "urls": ["bzzr://4fd99bcfb93baed6e7c8d22ee9ecc5c8346a1aa98288e77b01333b2c5d3f582d"]}, "contracts/SafeMathLib.sol": {"keccak256": "0x501bfe31e274b9a5591f7c540bdced4d4312e27d4f19599147c9bbca3d9c6b18", "urls": ["bzzr://a80935ebddb06c247d71372d4e5833ee029f08633bd0fe4a274a57009567e5b9"]}, "contracts/StandardTokenExt.sol": {"keccak256": "0x9ea2d4cec4dccd5639c05e6c23dd027d80b5e5a20abd99b280ab7b2631b5a5fc", "urls": ["bzzr://a52d8fc5a21bd83997aff19128e00dceb251df712207b61223894c8b7f42d5ff"]}, "contracts/UncappedCrowdsale.sol": {"keccak256": "0xba56ad309742dffe5ff5fd759e19623483d772869314a1a82ed30adb6a784cb3", "urls": ["bzzr://af4e7e11ee75dc4ae2af5d95d01a8da056bb9b4e47259c2e651706e2c7a10da4"]}, "zeppelin/contracts/math/SafeMath.sol": {"keccak256": "0x341ba8cb467a3623e819ba1a683ac1d264005186f308505214e5f6bc89446a08", "urls": ["bzzr://59b5652ee4e4a1b5a8f1a8906e14c84af43d636cf5ca0725cc1813aabe4c8c17"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}, "zeppelin/contracts/token/ERC20/BasicToken.sol": {"keccak256": "0x948404468d61ff35ea4194650670408dabd65da7f905a1c16888ab84520bf39e", "urls": ["bzzr://ea75e20f95d7e4e10394fe6bfaa8eee56b4757c2a6f1e8df4180d33afa621935"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}, "zeppelin/contracts/token/ERC20/StandardToken.sol": {"keccak256": "0xd2b344a5259e19ec143074cfa65637a10c40b68395c59808c4af13bccbb2de55", "urls": ["bzzr://d61a01175a7ca1ba9f4403de603c20b897e33ec425aef2d9f8a7f9ddfdfaf5b2"]}}, "version": 1}, "name": "UncappedCrowdsale", "ordered_full_dependencies": ["SafeMathLib"], "source_path": "contracts/UncappedCrowdsale.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Safe unsigned safe math.\n *\n * https://blog.aragon.one/library-driven-development-in-solidity-2bebcaf88736#.750gwtwli\n *\n * Originally from https://raw.githubusercontent.com/AragonOne/zeppelin-solidity/master/contracts/SafeMathLib.sol\n *\n * Maintained here until merged to mainline zeppelin-solidity.\n *\n */\nlibrary SafeMathLib {\n\n function times(uint a, uint b) returns (uint) {\n uint c = a * b;\n assert(a == 0 || c / a == b);\n return c;\n }\n\n function minus(uint a, uint b) returns (uint) {\n assert(b <= a);\n return a - b;\n }\n\n function plus(uint a, uint b) returns (uint) {\n uint c = a + b;\n assert(c>=a);\n return c;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Interface for defining crowdsale pricing.\n */\ncontract PricingStrategy {\n\n /** Interface declaration. */\n function isPricingStrategy() public constant returns (bool) {\n return true;\n }\n\n /** Self check if all references are correctly set.\n *\n * Checks that pricing strategy matches crowdsale parameters.\n */\n function isSane(address crowdsale) public constant returns (bool) {\n return true;\n }\n\n /**\n * @dev Pricing tells if this is a presale purchase or not.\n @param purchaser Address of the purchaser\n @return False by default, true if a presale purchaser\n */\n function isPresalePurchase(address purchaser) public constant returns (bool) {\n return false;\n }\n\n /**\n * When somebody tries to buy tokens for X eth, calculate how many tokens they get.\n *\n *\n * @param value - What is the value of the transaction send in as wei\n * @param tokensSold - how much tokens have been sold this far\n * @param weiRaised - how much money has been raised this far in the main token sale - this number excludes presale\n * @param msgSender - who is the investor of this transaction\n * @param decimals - how many decimal units the token has\n * @return Amount of tokens the investor receives\n */\n function calculatePrice(uint value, uint weiRaised, uint tokensSold, address msgSender, uint decimals) public constant returns (uint tokenAmount);\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Finalize agent defines what happens at the end of succeseful crowdsale.\n *\n * - Allocate tokens for founders, bounties and community\n * - Make tokens transferable\n * - etc.\n */\ncontract FinalizeAgent {\n\n function isFinalizeAgent() public constant returns(bool) {\n return true;\n }\n\n /** Return true if we can run finalizeCrowdsale() properly.\n *\n * This is a safety check function that doesn't allow crowdsale to begin\n * unless the finalizer has been set up properly.\n */\n function isSane() public constant returns (bool);\n\n /** Called once by crowdsale finalize() if the sale was success. */\n function finalizeCrowdsale();\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n\n/**\n * A token that defines fractional units as decimals.\n */\ncontract FractionalERC20 is ERC20 {\n\n uint public decimals;\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n/*\n * Haltable\n *\n * Abstract contract that allows children to implement an\n * emergency stop mechanism. Differs from Pausable by causing a throw when in halt mode.\n *\n *\n * Originally envisioned in FirstBlood ICO contract.\n */\ncontract Haltable is Ownable {\n bool public halted;\n\n modifier stopInEmergency {\n if (halted) throw;\n _;\n }\n\n modifier stopNonOwnersInEmergency {\n if (halted && msg.sender != owner) throw;\n _;\n }\n\n modifier onlyInEmergency {\n if (!halted) throw;\n _;\n }\n\n // called by the owner on emergency, triggers stopped state\n function halt() external onlyOwner {\n halted = true;\n }\n\n // called by the owner on end of emergency, returns to normal state\n function unhalt() external onlyOwner onlyInEmergency {\n halted = false;\n }\n\n}\n\n\n\n\n\n\n\n/**\n * Crowdsale state machine without buy functionality.\n *\n * Implements basic state machine logic, but leaves out all buy functions,\n * so that subclasses can implement their own buying logic.\n *\n *\n * For the default buy() implementation see Crowdsale.sol.\n */\ncontract CrowdsaleBase is Haltable {\n\n /* Max investment count when we are still allowed to change the multisig address */\n uint public MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE = 5;\n\n using SafeMathLib for uint;\n\n /* The token we are selling */\n FractionalERC20 public token;\n\n /* How we are going to price our offering */\n PricingStrategy public pricingStrategy;\n\n /* Post-success callback */\n FinalizeAgent public finalizeAgent;\n\n /* tokens will be transfered from this address */\n address public multisigWallet;\n\n /* if the funding goal is not reached, investors may withdraw their funds */\n uint public minimumFundingGoal;\n\n /* the UNIX timestamp start date of the crowdsale */\n uint public startsAt;\n\n /* the UNIX timestamp end date of the crowdsale */\n uint public endsAt;\n\n /* the number of tokens already sold through this contract*/\n uint public tokensSold = 0;\n\n /* How many wei of funding we have raised */\n uint public weiRaised = 0;\n\n /* Calculate incoming funds from presale contracts and addresses */\n uint public presaleWeiRaised = 0;\n\n /* How many distinct addresses have invested */\n uint public investorCount = 0;\n\n /* How much wei we have returned back to the contract after a failed crowdfund. */\n uint public loadedRefund = 0;\n\n /* How much wei we have given back to investors.*/\n uint public weiRefunded = 0;\n\n /* Has this crowdsale been finalized */\n bool public finalized;\n\n /** How much ETH each address has invested to this crowdsale */\n mapping (address => uint256) public investedAmountOf;\n\n /** How much tokens this crowdsale has credited for each investor address */\n mapping (address => uint256) public tokenAmountOf;\n\n /** Addresses that are allowed to invest even before ICO offical opens. For testing, for ICO partners, etc. */\n mapping (address => bool) public earlyParticipantWhitelist;\n\n /** This is for manul testing for the interaction from owner wallet. You can set it to any value and inspect this in blockchain explorer to see that crowdsale interaction works. */\n uint public ownerTestValue;\n\n /** State machine\n *\n * - Preparing: All contract initialization calls and variables have not been set yet\n * - Prefunding: We have not passed start time yet\n * - Funding: Active crowdsale\n * - Success: Minimum funding goal reached\n * - Failure: Minimum funding goal not reached before ending time\n * - Finalized: The finalized has been called and succesfully executed\n * - Refunding: Refunds are loaded on the contract for reclaim.\n */\n enum State{Unknown, Preparing, PreFunding, Funding, Success, Failure, Finalized, Refunding}\n\n // A new investment was made\n event Invested(address investor, uint weiAmount, uint tokenAmount, uint128 customerId);\n\n // Refund was processed for a contributor\n event Refund(address investor, uint weiAmount);\n\n // The rules were changed what kind of investments we accept\n event InvestmentPolicyChanged(bool newRequireCustomerId, bool newRequiredSignedAddress, address newSignerAddress);\n\n // Address early participation whitelist status changed\n event Whitelisted(address addr, bool status);\n\n // Crowdsale end time has been changed\n event EndsAtChanged(uint newEndsAt);\n\n function CrowdsaleBase(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal) {\n\n owner = msg.sender;\n\n token = FractionalERC20(_token);\n setPricingStrategy(_pricingStrategy);\n\n multisigWallet = _multisigWallet;\n if(multisigWallet == 0) {\n throw;\n }\n\n if(_start == 0) {\n throw;\n }\n\n startsAt = _start;\n\n if(_end == 0) {\n throw;\n }\n\n endsAt = _end;\n\n // Don't mess the dates\n if(startsAt >= endsAt) {\n throw;\n }\n\n // Minimum funding goal can be zero\n minimumFundingGoal = _minimumFundingGoal;\n }\n\n /**\n * Don't expect to just send in money and get tokens.\n */\n function() payable {\n throw;\n }\n\n /**\n * @dev Make an investment.\n *\n * Crowdsale must be running for one to invest.\n * We must have not pressed the emergency brake.\n *\n * @param receiver The Ethereum address who receives the tokens\n * @param customerId (optional) UUID v4 to track the successful payments on the server side'\n * @param tokenAmount Amount of tokens which be credited to receiver\n *\n * @return tokensBought How mony tokens were bought\n */\n function buyTokens(address receiver, uint128 customerId, uint256 tokenAmount) stopInEmergency internal returns(uint tokensBought) {\n\n // Determine if it's a good time to accept investment from this participant\n if(getState() == State.PreFunding) {\n // Are we whitelisted for early deposit\n if(!earlyParticipantWhitelist[receiver]) {\n throw;\n }\n } else if(getState() == State.Funding) {\n // Retail participants can only come in when the crowdsale is running\n // pass\n } else {\n // Unwanted state\n throw;\n }\n\n uint weiAmount = msg.value;\n\n // Dust transaction\n require(tokenAmount != 0);\n\n if(investedAmountOf[receiver] == 0) {\n // A new investor\n investorCount++;\n }\n\n // Update investor\n investedAmountOf[receiver] = investedAmountOf[receiver].plus(weiAmount);\n tokenAmountOf[receiver] = tokenAmountOf[receiver].plus(tokenAmount);\n\n // Update totals\n weiRaised = weiRaised.plus(weiAmount);\n tokensSold = tokensSold.plus(tokenAmount);\n\n if(pricingStrategy.isPresalePurchase(receiver)) {\n presaleWeiRaised = presaleWeiRaised.plus(weiAmount);\n }\n\n // Check that we did not bust the cap\n require(!isBreakingCap(weiAmount, tokenAmount, weiRaised, tokensSold));\n\n assignTokens(receiver, tokenAmount);\n\n // Pocket the money, or fail the crowdsale if we for some reason cannot send the money to our multisig\n if(!multisigWallet.send(weiAmount)) throw;\n\n // Tell us invest was success\n Invested(receiver, weiAmount, tokenAmount, customerId);\n\n return tokenAmount;\n }\n\n /**\n * @dev Make an investment based on pricing strategy\n *\n * This is a wrapper for buyTokens(), but the amount of tokens receiver will\n * have depends on the pricing strategy used.\n *\n * @param receiver The Ethereum address who receives the tokens\n * @param customerId (optional) UUID v4 to track the successful payments on the server side'\n *\n * @return tokensBought How mony tokens were bought\n */\n function investInternal(address receiver, uint128 customerId) stopInEmergency internal returns(uint tokensBought) {\n return buyTokens(receiver, customerId, pricingStrategy.calculatePrice(msg.value, weiRaised - presaleWeiRaised, tokensSold, msg.sender, token.decimals()));\n }\n\n /**\n * @dev Calculate tokens user will have for their purchase\n *\n * @param weisTotal How much ethers (in wei) the user putssssss in\n * @param pricePerToken What is the price for one token\n *\n * @return tokensTotal which is received tokens, token decimals included\n */\n function calculateTokens(uint256 weisTotal, uint256 pricePerToken) public constant returns(uint tokensTotal) {\n // pricePerToken is how many full tokens, token decimal place included, you get for wei amount.\n // Because, in theory, decimal amount can vary, we do the exponent calculation here,\n // though gas wise using 10**18 constant would be much simpler.\n // Furthermore we could use rough amounts and take in raw wei per tokens amount,\n // but we lose too much accuracy for generic calculations, thus all these are\n // practically implemented as 10**18 fixed points.\n uint multiplier = 10 ** token.decimals();\n return weisTotal.times(multiplier)/pricePerToken;\n }\n\n /**\n * Finalize a succcesful crowdsale.\n *\n * The owner can triggre a call the contract that provides post-crowdsale actions, like releasing the tokens.\n */\n function finalize() public inState(State.Success) onlyOwner stopInEmergency {\n\n // Already finalized\n if(finalized) {\n throw;\n }\n\n // Finalizing is optional. We only call it if we are given a finalizing agent.\n if(address(finalizeAgent) != 0) {\n finalizeAgent.finalizeCrowdsale();\n }\n\n finalized = true;\n }\n\n /**\n * Allow to (re)set finalize agent.\n *\n * Design choice: no state restrictions on setting this, so that we can fix fat finger mistakes.\n */\n function setFinalizeAgent(FinalizeAgent addr) onlyOwner {\n finalizeAgent = addr;\n\n // Don't allow setting bad agent\n if(!finalizeAgent.isFinalizeAgent()) {\n throw;\n }\n }\n\n /**\n * Allow crowdsale owner to close early or extend the crowdsale.\n *\n * This is useful e.g. for a manual soft cap implementation:\n * - after X amount is reached determine manual closing\n *\n * This may put the crowdsale to an invalid state,\n * but we trust owners know what they are doing.\n *\n */\n function setEndsAt(uint time) onlyOwner {\n\n if(now > time) {\n throw; // Don't change past\n }\n\n if(startsAt > time) {\n throw; // Prevent human mistakes\n }\n\n endsAt = time;\n EndsAtChanged(endsAt);\n }\n\n /**\n * Allow to (re)set pricing strategy.\n *\n * Design choice: no state restrictions on the set, so that we can fix fat finger mistakes.\n */\n function setPricingStrategy(PricingStrategy _pricingStrategy) onlyOwner {\n pricingStrategy = _pricingStrategy;\n\n // Don't allow setting bad agent\n if(!pricingStrategy.isPricingStrategy()) {\n throw;\n }\n }\n\n /**\n * Allow to change the team multisig address in the case of emergency.\n *\n * This allows to save a deployed crowdsale wallet in the case the crowdsale has not yet begun\n * (we have done only few test transactions). After the crowdsale is going\n * then multisig address stays locked for the safety reasons.\n */\n function setMultisig(address addr) public onlyOwner {\n\n // Change\n if(investorCount > MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE) {\n throw;\n }\n\n multisigWallet = addr;\n }\n\n /**\n * Allow load refunds back on the contract for the refunding.\n *\n * The team can transfer the funds back on the smart contract in the case the minimum goal was not reached..\n */\n function loadRefund() public payable inState(State.Failure) {\n if(msg.value == 0) throw;\n loadedRefund = loadedRefund.plus(msg.value);\n }\n\n /**\n * Investors can claim refund.\n *\n * Note that any refunds from proxy buyers should be handled separately,\n * and not through this contract.\n */\n function refund() public inState(State.Refunding) {\n uint256 weiValue = investedAmountOf[msg.sender];\n if (weiValue == 0) throw;\n investedAmountOf[msg.sender] = 0;\n weiRefunded = weiRefunded.plus(weiValue);\n Refund(msg.sender, weiValue);\n if (!msg.sender.send(weiValue)) throw;\n }\n\n /**\n * @return true if the crowdsale has raised enough money to be a successful.\n */\n function isMinimumGoalReached() public constant returns (bool reached) {\n return weiRaised >= minimumFundingGoal;\n }\n\n /**\n * Check if the contract relationship looks good.\n */\n function isFinalizerSane() public constant returns (bool sane) {\n return finalizeAgent.isSane();\n }\n\n /**\n * Check if the contract relationship looks good.\n */\n function isPricingSane() public constant returns (bool sane) {\n return pricingStrategy.isSane(address(this));\n }\n\n /**\n * Crowdfund state machine management.\n *\n * We make it a function and do not assign the result to a variable, so there is no chance of the variable being stale.\n */\n function getState() public constant returns (State) {\n if(finalized) return State.Finalized;\n else if (address(finalizeAgent) == 0) return State.Preparing;\n else if (!finalizeAgent.isSane()) return State.Preparing;\n else if (!pricingStrategy.isSane(address(this))) return State.Preparing;\n else if (block.timestamp < startsAt) return State.PreFunding;\n else if (block.timestamp <= endsAt && !isCrowdsaleFull()) return State.Funding;\n else if (isMinimumGoalReached()) return State.Success;\n else if (!isMinimumGoalReached() && weiRaised > 0 && loadedRefund >= weiRaised) return State.Refunding;\n else return State.Failure;\n }\n\n /** This is for manual testing of multisig wallet interaction */\n function setOwnerTestValue(uint val) onlyOwner {\n ownerTestValue = val;\n }\n\n /**\n * Allow addresses to do early participation.\n *\n * TODO: Fix spelling error in the name\n */\n function setEarlyParicipantWhitelist(address addr, bool status) onlyOwner {\n earlyParticipantWhitelist[addr] = status;\n Whitelisted(addr, status);\n }\n\n\n /** Interface marker. */\n function isCrowdsale() public constant returns (bool) {\n return true;\n }\n\n //\n // Modifiers\n //\n\n /** Modified allowing execution only if the crowdsale is currently running. */\n modifier inState(State state) {\n if(getState() != state) throw;\n _;\n }\n\n\n //\n // Abstract functions\n //\n\n /**\n * Check if the current invested breaks our cap rules.\n *\n *\n * The child contract must define their own cap setting rules.\n * We allow a lot of flexibility through different capping strategies (ETH, token count)\n * Called from invest().\n *\n * @param weiAmount The amount of wei the investor tries to invest in the current transaction\n * @param tokenAmount The amount of tokens we try to give to the investor in the current transaction\n * @param weiRaisedTotal What would be our total raised balance after this transaction\n * @param tokensSoldTotal What would be our total sold tokens count after this transaction\n *\n * @return true if taking this investment would break our cap rules\n */\n function isBreakingCap(uint weiAmount, uint tokenAmount, uint weiRaisedTotal, uint tokensSoldTotal) constant returns (bool limitBroken);\n\n /**\n * Check if the current crowdsale is full and we can no longer sell any tokens.\n */\n function isCrowdsaleFull() public constant returns (bool);\n\n /**\n * Create new tokens or transfer issued tokens to the investor depending on the cap model.\n */\n function assignTokens(address receiver, uint tokenAmount) internal;\n}\n\n\n\n/**\n * Abstract base contract for token sales with the default buy entry points.\n *\n * Handle\n * - start and end dates\n * - accepting investments\n * - minimum funding goal and refund\n * - various statistics during the crowdfund\n * - different pricing strategies\n * - different investment policies (require server side customer id, allow only whitelisted addresses)\n *\n * Does not Handle\n *\n * - Token allocation (minting vs. transfer)\n * - Cap rules\n *\n */\ncontract Crowdsale is CrowdsaleBase {\n\n /* Do we need to have unique contributor id for each customer */\n bool public requireCustomerId;\n\n /**\n * Do we verify that contributor has been cleared on the server side (accredited investors only).\n * This method was first used in FirstBlood crowdsale to ensure all contributors have accepted terms on sale (on the web).\n */\n bool public requiredSignedAddress;\n\n /* Server side address that signed allowed contributors (Ethereum addresses) that can participate the crowdsale */\n address public signerAddress;\n\n function Crowdsale(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal) CrowdsaleBase(_token, _pricingStrategy, _multisigWallet, _start, _end, _minimumFundingGoal) {\n }\n\n /**\n * Preallocate tokens for the early investors.\n *\n * Preallocated tokens have been sold before the actual crowdsale opens.\n * This function mints the tokens and moves the crowdsale needle.\n *\n * Investor count is not handled; it is assumed this goes for multiple investors\n * and the token distribution happens outside the smart contract flow.\n *\n * No money is exchanged, as the crowdsale team already have received the payment.\n *\n * @param fullTokens tokens as full tokens - decimal places added internally\n * @param weiPrice Price of a single full token in wei\n *\n */\n function preallocate(address receiver, uint fullTokens, uint weiPrice) public onlyOwner {\n\n uint tokenAmount = fullTokens * 10**token.decimals();\n uint weiAmount = weiPrice * fullTokens; // This can be also 0, we give out tokens for free\n\n weiRaised = weiRaised.plus(weiAmount);\n tokensSold = tokensSold.plus(tokenAmount);\n\n investedAmountOf[receiver] = investedAmountOf[receiver].plus(weiAmount);\n tokenAmountOf[receiver] = tokenAmountOf[receiver].plus(tokenAmount);\n\n assignTokens(receiver, tokenAmount);\n\n // Tell us invest was success\n Invested(receiver, weiAmount, tokenAmount, 0);\n }\n\n /**\n * Allow anonymous contributions to this crowdsale.\n */\n function investWithSignedAddress(address addr, uint128 customerId, uint8 v, bytes32 r, bytes32 s) public payable {\n bytes32 hash = sha256(addr);\n if (ecrecover(hash, v, r, s) != signerAddress) throw;\n if(customerId == 0) throw; // UUIDv4 sanity check\n investInternal(addr, customerId);\n }\n\n /**\n * Track who is the customer making the payment so we can send thank you email.\n */\n function investWithCustomerId(address addr, uint128 customerId) public payable {\n if(requiredSignedAddress) throw; // Crowdsale allows only server-side signed participants\n if(customerId == 0) throw; // UUIDv4 sanity check\n investInternal(addr, customerId);\n }\n\n /**\n * Allow anonymous contributions to this crowdsale.\n */\n function invest(address addr) public payable {\n if(requireCustomerId) throw; // Crowdsale needs to track participants for thank you email\n if(requiredSignedAddress) throw; // Crowdsale allows only server-side signed participants\n investInternal(addr, 0);\n }\n\n /**\n * Invest to tokens, recognize the payer and clear his address.\n *\n */\n function buyWithSignedAddress(uint128 customerId, uint8 v, bytes32 r, bytes32 s) public payable {\n investWithSignedAddress(msg.sender, customerId, v, r, s);\n }\n\n /**\n * Invest to tokens, recognize the payer.\n *\n */\n function buyWithCustomerIdWithChecksum(uint128 customerId, bytes1 checksum) public payable {\n // see customerid.py\n if (bytes1(sha3(customerId)) != checksum) throw;\n investWithCustomerId(msg.sender, customerId);\n }\n\n /**\n * Legacy API signature.\n */\n function buyWithCustomerId(uint128 customerId) public payable {\n investWithCustomerId(msg.sender, customerId);\n }\n\n /**\n * The basic entry point to participate the crowdsale process.\n *\n * Pay for funding, get invested tokens back in the sender address.\n */\n function buy() public payable {\n invest(msg.sender);\n }\n\n /**\n * Set policy do we need to have server-side customer ids for the investments.\n *\n */\n function setRequireCustomerId(bool value) onlyOwner {\n requireCustomerId = value;\n InvestmentPolicyChanged(requireCustomerId, requiredSignedAddress, signerAddress);\n }\n\n /**\n * Set policy if all investors must be cleared on the server side first.\n *\n * This is e.g. for the accredited investor clearing.\n *\n */\n function setRequireSignedAddress(bool value, address _signerAddress) onlyOwner {\n requiredSignedAddress = value;\n signerAddress = _signerAddress;\n InvestmentPolicyChanged(requireCustomerId, requiredSignedAddress, signerAddress);\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n assert(c / a == b);\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n\n\n\n/**\n * @title Basic token\n * @dev Basic version of StandardToken, with no allowances.\n */\ncontract BasicToken is ERC20Basic {\n using SafeMath for uint256;\n\n mapping(address => uint256) balances;\n\n uint256 totalSupply_;\n\n /**\n * @dev total number of tokens in existence\n */\n function totalSupply() public view returns (uint256) {\n return totalSupply_;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param _to The address to transfer to.\n * @param _value The amount to be transferred.\n */\n function transfer(address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[msg.sender]);\n\n // SafeMath.sub will throw if there is not enough balance.\n balances[msg.sender] = balances[msg.sender].sub(_value);\n balances[_to] = balances[_to].add(_value);\n Transfer(msg.sender, _to, _value);\n return true;\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param _owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address _owner) public view returns (uint256 balance) {\n return balances[_owner];\n }\n\n}\n\n\n\n\n/**\n * @title Standard ERC20 token\n *\n * @dev Implementation of the basic standard token.\n * @dev https://github.com/ethereum/EIPs/issues/20\n * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol\n */\ncontract StandardToken is ERC20, BasicToken {\n\n mapping (address => mapping (address => uint256)) internal allowed;\n\n\n /**\n * @dev Transfer tokens from one address to another\n * @param _from address The address which you want to send tokens from\n * @param _to address The address which you want to transfer to\n * @param _value uint256 the amount of tokens to be transferred\n */\n function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[_from]);\n require(_value <= allowed[_from][msg.sender]);\n\n balances[_from] = balances[_from].sub(_value);\n balances[_to] = balances[_to].add(_value);\n allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);\n Transfer(_from, _to, _value);\n return true;\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n *\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param _spender The address which will spend the funds.\n * @param _value The amount of tokens to be spent.\n */\n function approve(address _spender, uint256 _value) public returns (bool) {\n allowed[msg.sender][_spender] = _value;\n Approval(msg.sender, _spender, _value);\n return true;\n }\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param _owner address The address which owns the funds.\n * @param _spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address _owner, address _spender) public view returns (uint256) {\n return allowed[_owner][_spender];\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(address _spender, uint _addedValue) public returns (bool) {\n allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {\n uint oldValue = allowed[msg.sender][_spender];\n if (_subtractedValue > oldValue) {\n allowed[msg.sender][_spender] = 0;\n } else {\n allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);\n }\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\ncontract Recoverable is Ownable {\n\n /// @dev Empty constructor (for now)\n function Recoverable() {\n }\n\n /// @dev This will be invoked by the owner, when owner wants to rescue tokens\n /// @param token Token which will we rescue to the owner from the contract\n function recoverTokens(ERC20Basic token) onlyOwner public {\n token.transfer(owner, tokensToBeReturned(token));\n }\n\n /// @dev Interface function, can be overwritten by the superclass\n /// @param token Token which balance we will check and return\n /// @return The amount of tokens (in smallest denominator) the contract owns\n function tokensToBeReturned(ERC20Basic token) public returns (uint) {\n return token.balanceOf(this);\n }\n}\n\n\n\n/**\n * Standard EIP-20 token with an interface marker.\n *\n * @notice Interface marker is used by crowdsale contracts to validate that addresses point a good token contract.\n *\n */\ncontract StandardTokenExt is StandardToken, Recoverable {\n\n /* Interface declaration */\n function isToken() public constant returns (bool weAre) {\n return true;\n }\n}\n\n\n\n\n/**\n * A token that can increase its supply by another contract.\n *\n * This allows uncapped crowdsale by dynamically increasing the supply when money pours in.\n * Only mint agents, contracts whitelisted by owner, can mint new tokens.\n *\n */\ncontract MintableToken is StandardTokenExt {\n\n using SafeMathLib for uint;\n\n bool public mintingFinished = false;\n\n /** List of agents that are allowed to create new tokens */\n mapping (address => bool) public mintAgents;\n\n event MintingAgentChanged(address addr, bool state);\n event Minted(address receiver, uint amount);\n\n /**\n * Create new tokens and allocate them to an address..\n *\n * Only callably by a crowdsale contract (mint agent).\n */\n function mint(address receiver, uint amount) onlyMintAgent canMint public {\n totalSupply_ = totalSupply_.plus(amount);\n balances[receiver] = balances[receiver].plus(amount);\n\n // This will make the mint transaction apper in EtherScan.io\n // We can remove this after there is a standardized minting event\n Transfer(0, receiver, amount);\n }\n\n /**\n * Owner can allow a crowdsale contract to mint new tokens.\n */\n function setMintAgent(address addr, bool state) onlyOwner canMint public {\n mintAgents[addr] = state;\n MintingAgentChanged(addr, state);\n }\n\n modifier onlyMintAgent() {\n // Only crowdsale contracts are allowed to mint new tokens\n if(!mintAgents[msg.sender]) {\n throw;\n }\n _;\n }\n\n /** Make sure we are not done yet. */\n modifier canMint() {\n if(mintingFinished) throw;\n _;\n }\n}\n\n\n\n/**\n * Uncapped ICO crowdsale contract.\n *\n *\n * Intended usage\n *\n * - A short time window\n * - Flat price\n * - No cap\n *\n */\ncontract UncappedCrowdsale is Crowdsale {\n\n function UncappedCrowdsale(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal) Crowdsale(_token, _pricingStrategy, _multisigWallet, _start, _end, _minimumFundingGoal) {\n\n }\n\n /**\n * Called from invest() to confirm if the curret investment does not break our cap rule.\n */\n function isBreakingCap(uint weiAmount, uint tokenAmount, uint weiRaisedTotal, uint tokensSoldTotal) constant returns (bool limitBroken) {\n return false;\n }\n\n function isCrowdsaleFull() public constant returns (bool) {\n // Uncle Scrooge\n return false;\n }\n\n function assignTokens(address receiver, uint tokenAmount) internal {\n MintableToken mintableToken = MintableToken(token);\n mintableToken.mint(receiver, tokenAmount);\n }\n}\n"}, "UnrestrictedTransferAgent": {"abi": [{"constant": true, "inputs": [{"name": "from", "type": "address"}, {"name": "to", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "verify", "outputs": [{"name": "newValue", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}], "bytecode": "0x608060405234801561001057600080fd5b5060bb8061001f6000396000f300608060405260043610603e5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663ad07699481146043575b600080fd5b348015604e57600080fd5b50607773ffffffffffffffffffffffffffffffffffffffff600435811690602435166044356089565b60408051918252519081900360200190f35b929150505600a165627a7a723058200bd628f40591b211b246aa9567e9e9a74f58f66b9088a1e0bcad6f8199f8fd4b0029", "bytecode_runtime": "0x608060405260043610603e5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663ad07699481146043575b600080fd5b348015604e57600080fd5b50607773ffffffffffffffffffffffffffffffffffffffff600435811690602435166044356089565b60408051918252519081900360200190f35b929150505600a165627a7a723058200bd628f40591b211b246aa9567e9e9a74f58f66b9088a1e0bcad6f8199f8fd4b0029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": true, "inputs": [{"name": "from", "type": "address"}, {"name": "to", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "verify", "outputs": [{"name": "newValue", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}], "devdoc": {"methods": {"verify(address,address,uint256)": {"details": "Checking if transfer can happen, and if so, what is the right amount", "params": {"from": "The account sending the tokens", "to": "The account receiving the tokens", "value": "The indended amount"}, "return": "The actual amount permitted"}}}, "userdoc": {"methods": {}}}, "settings": {"compilationTarget": {"contracts/security-token/UnrestrictedTransferAgent.sol": "UnrestrictedTransferAgent"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/security-token/SecurityTransferAgent.sol": {"keccak256": "0x23b8a61926435e2c583480c0de72a99b4f7ec8a4213ffc46711f83ecdeaf9186", "urls": ["bzzr://36be13b6cf1389357679705bd18969409ecde684ace2d9c5b606d8986e0231cd"]}, "contracts/security-token/UnrestrictedTransferAgent.sol": {"keccak256": "0xe2964b64728cdef8a1d6b2ca6eb769a697fe91dc670e4ca7f3b35d4dc01155d4", "urls": ["bzzr://b7de5abcb0440c92f56846ac5ab554b510a1c6ffce8a2db1bb2d8283b52eb658"]}}, "version": 1}, "name": "UnrestrictedTransferAgent", "ordered_full_dependencies": [], "source_path": "contracts/security-token/UnrestrictedTransferAgent.sol", "source": "\n\ninterface SecurityTransferAgent {\n function verify(address from, address to, uint256 value) public view returns (uint256 newValue);\n}\n\n\n/** Transfer agent for a security token that does not limit transfers any way */\ncontract UnrestrictedTransferAgent is SecurityTransferAgent {\n\n function UnrestrictedTransferAgent() {\n }\n\n /**\n * @dev Checking if transfer can happen, and if so, what is the right amount\n *\n * @param from The account sending the tokens\n * @param to The account receiving the tokens\n * @param value The indended amount\n * @return The actual amount permitted\n */\n function verify(address from, address to, uint256 value) public view returns (uint256 newValue) {\n return value;\n }\n}\n"}, "UpgradeAgent": {"abi": [{"constant": true, "inputs": [], "name": "originalSupply", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isUpgradeAgent", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_from", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "upgradeFrom", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}], "bytecode": "0x", "bytecode_runtime": "0x", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": null, "name": "UpgradeAgent", "ordered_full_dependencies": [], "source_path": "contracts/UpgradeAgent.sol"}, "UpgradeableToken": {"abi": [{"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "approve", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "recoverTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_from", "type": "address"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "uint256"}], "name": "upgrade", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "upgradeAgent", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "upgradeMaster", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_subtractedValue", "type": "uint256"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getUpgradeState", "outputs": [{"name": "", "type": "uint8"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "canUpgrade", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "tokensToBeReturned", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalUpgraded", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_addedValue", "type": "uint256"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "agent", "type": "address"}], "name": "setUpgradeAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}, {"name": "_spender", "type": "address"}], "name": "allowance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isToken", "outputs": [{"name": "weAre", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "master", "type": "address"}], "name": "setUpgradeMaster", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [{"name": "_upgradeMaster", "type": "address"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "_from", "type": "address"}, {"indexed": true, "name": "_to", "type": "address"}, {"indexed": false, "name": "_value", "type": "uint256"}], "name": "Upgrade", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "agent", "type": "address"}], "name": "UpgradeAgentSet", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}, {"indexed": true, "name": "spender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "bytecode": "0x608060405234801561001057600080fd5b50604051602080610f6c83398101604052516003805433600160a060020a03199182161790915560048054909116600160a060020a03909216919091179055610f0e8061005e6000396000f30060806040526004361061011c5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663095ea7b3811461012157806316114acd1461015957806318160ddd1461017c57806323b872dd146101a357806345977d03146101cd5780635de4ccb0146101e5578063600440cb14610216578063661884631461022b57806370a082311461024f5780638444b391146102705780638da5cb5b146102a95780639738968c146102be578063a9059cbb146102d3578063c45d19db146102f7578063c752ff6214610318578063d73dd6231461032d578063d7e7088a14610351578063dd62ed3e14610372578063eefa597b146102be578063f2fde38b14610399578063ffeb7d75146103ba575b600080fd5b34801561012d57600080fd5b50610145600160a060020a03600435166024356103db565b604080519115158252519081900360200190f35b34801561016557600080fd5b5061017a600160a060020a0360043516610441565b005b34801561018857600080fd5b50610191610511565b60408051918252519081900360200190f35b3480156101af57600080fd5b50610145600160a060020a0360043581169060243516604435610518565b3480156101d957600080fd5b5061017a60043561068f565b3480156101f157600080fd5b506101fa610800565b60408051600160a060020a039092168252519081900360200190f35b34801561022257600080fd5b506101fa61080f565b34801561023757600080fd5b50610145600160a060020a036004351660243561081e565b34801561025b57600080fd5b50610191600160a060020a036004351661090e565b34801561027c57600080fd5b50610285610929565b6040518082600481111561029557fe5b60ff16815260200191505060405180910390f35b3480156102b557600080fd5b506101fa610974565b3480156102ca57600080fd5b50610145610983565b3480156102df57600080fd5b50610145600160a060020a0360043516602435610988565b34801561030357600080fd5b50610191600160a060020a0360043516610a69565b34801561032457600080fd5b50610191610aff565b34801561033957600080fd5b50610145600160a060020a0360043516602435610b05565b34801561035d57600080fd5b5061017a600160a060020a0360043516610b9e565b34801561037e57600080fd5b50610191600160a060020a0360043581169060243516610d9f565b3480156103a557600080fd5b5061017a600160a060020a0360043516610dca565b3480156103c657600080fd5b5061017a600160a060020a0360043516610e5f565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b600354600160a060020a0316331461045857600080fd5b600354600160a060020a038083169163a9059cbb911661047784610a69565b6040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b1580156104e257600080fd5b505af11580156104f6573d6000803e3d6000fd5b505050506040513d602081101561050c57600080fd5b505050565b6001545b90565b6000600160a060020a038316151561052f57600080fd5b600160a060020a03841660009081526020819052604090205482111561055457600080fd5b600160a060020a038416600090815260026020908152604080832033845290915290205482111561058457600080fd5b600160a060020a0384166000908152602081905260409020546105ad908363ffffffff610eba16565b600160a060020a0380861660009081526020819052604080822093909355908516815220546105e2908363ffffffff610ecc16565b600160a060020a03808516600090815260208181526040808320949094559187168152600282528281203382529091522054610624908363ffffffff610eba16565b600160a060020a03808616600081815260026020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b6000610699610929565b905060038160048111156106a957fe5b14806106c0575060048160048111156106be57fe5b145b15156106cb57600080fd5b8115156106d757600080fd5b336000908152602081905260409020546106f7908363ffffffff610eba16565b3360009081526020819052604090205560015461071a908363ffffffff610eba16565b600155600654610730908363ffffffff610ecc16565b600655600554604080517f753e88e5000000000000000000000000000000000000000000000000000000008152336004820152602481018590529051600160a060020a039092169163753e88e59160448082019260009290919082900301818387803b15801561079f57600080fd5b505af11580156107b3573d6000803e3d6000fd5b5050600554604080518681529051600160a060020a0390921693503392507f7e5c344a8141a805725cb476f76c6953b842222b967edd1f78ddb6e8b3f397ac919081900360200190a35050565b600554600160a060020a031681565b600454600160a060020a031681565b336000908152600260209081526040808320600160a060020a03861684529091528120548083111561087357336000908152600260209081526040808320600160a060020a03881684529091528120556108a8565b610883818463ffffffff610eba16565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a031660009081526020819052604090205490565b6000610933610983565b151561094157506001610515565b600554600160a060020a0316151561095b57506002610515565b600654151561096c57506003610515565b506004610515565b600354600160a060020a031681565b600190565b6000600160a060020a038316151561099f57600080fd5b336000908152602081905260409020548211156109bb57600080fd5b336000908152602081905260409020546109db908363ffffffff610eba16565b3360009081526020819052604080822092909255600160a060020a03851681522054610a0d908363ffffffff610ecc16565b600160a060020a038416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600091600160a060020a038416916370a082319160248082019260209290919082900301818787803b158015610acd57600080fd5b505af1158015610ae1573d6000803e3d6000fd5b505050506040513d6020811015610af757600080fd5b505192915050565b60065481565b336000908152600260209081526040808320600160a060020a0386168452909152812054610b39908363ffffffff610ecc16565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b610ba6610983565b1515610bb157600080fd5b600160a060020a0381161515610bc657600080fd5b600454600160a060020a03163314610bdd57600080fd5b6004610be7610929565b6004811115610bf257fe5b1415610bfd57600080fd5b6005805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038381169190911791829055604080517f61d3d7a6000000000000000000000000000000000000000000000000000000008152905192909116916361d3d7a6916004808201926020929091908290030181600087803b158015610c8157600080fd5b505af1158015610c95573d6000803e3d6000fd5b505050506040513d6020811015610cab57600080fd5b50511515610cb857600080fd5b600154600560009054906101000a9004600160a060020a0316600160a060020a0316634b2ba0dd6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610d2757600080fd5b505af1158015610d3b573d6000803e3d6000fd5b505050506040513d6020811015610d5157600080fd5b505114610d5d57600080fd5b60055460408051600160a060020a039092168252517f7845d5aa74cc410e35571258d954f23b82276e160fe8c188fa80566580f279cc9181900360200190a150565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600354600160a060020a03163314610de157600080fd5b600160a060020a0381161515610df657600080fd5b600354604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600160a060020a0381161515610e7457600080fd5b600454600160a060020a03163314610e8b57600080fd5b6004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600082821115610ec657fe5b50900390565b600082820183811015610edb57fe5b93925050505600a165627a7a7230582082879722ab70821c8489841842c27232f04b658f588b83672247a30a5e2236250029", "bytecode_runtime": "0x60806040526004361061011c5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663095ea7b3811461012157806316114acd1461015957806318160ddd1461017c57806323b872dd146101a357806345977d03146101cd5780635de4ccb0146101e5578063600440cb14610216578063661884631461022b57806370a082311461024f5780638444b391146102705780638da5cb5b146102a95780639738968c146102be578063a9059cbb146102d3578063c45d19db146102f7578063c752ff6214610318578063d73dd6231461032d578063d7e7088a14610351578063dd62ed3e14610372578063eefa597b146102be578063f2fde38b14610399578063ffeb7d75146103ba575b600080fd5b34801561012d57600080fd5b50610145600160a060020a03600435166024356103db565b604080519115158252519081900360200190f35b34801561016557600080fd5b5061017a600160a060020a0360043516610441565b005b34801561018857600080fd5b50610191610511565b60408051918252519081900360200190f35b3480156101af57600080fd5b50610145600160a060020a0360043581169060243516604435610518565b3480156101d957600080fd5b5061017a60043561068f565b3480156101f157600080fd5b506101fa610800565b60408051600160a060020a039092168252519081900360200190f35b34801561022257600080fd5b506101fa61080f565b34801561023757600080fd5b50610145600160a060020a036004351660243561081e565b34801561025b57600080fd5b50610191600160a060020a036004351661090e565b34801561027c57600080fd5b50610285610929565b6040518082600481111561029557fe5b60ff16815260200191505060405180910390f35b3480156102b557600080fd5b506101fa610974565b3480156102ca57600080fd5b50610145610983565b3480156102df57600080fd5b50610145600160a060020a0360043516602435610988565b34801561030357600080fd5b50610191600160a060020a0360043516610a69565b34801561032457600080fd5b50610191610aff565b34801561033957600080fd5b50610145600160a060020a0360043516602435610b05565b34801561035d57600080fd5b5061017a600160a060020a0360043516610b9e565b34801561037e57600080fd5b50610191600160a060020a0360043581169060243516610d9f565b3480156103a557600080fd5b5061017a600160a060020a0360043516610dca565b3480156103c657600080fd5b5061017a600160a060020a0360043516610e5f565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b600354600160a060020a0316331461045857600080fd5b600354600160a060020a038083169163a9059cbb911661047784610a69565b6040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b1580156104e257600080fd5b505af11580156104f6573d6000803e3d6000fd5b505050506040513d602081101561050c57600080fd5b505050565b6001545b90565b6000600160a060020a038316151561052f57600080fd5b600160a060020a03841660009081526020819052604090205482111561055457600080fd5b600160a060020a038416600090815260026020908152604080832033845290915290205482111561058457600080fd5b600160a060020a0384166000908152602081905260409020546105ad908363ffffffff610eba16565b600160a060020a0380861660009081526020819052604080822093909355908516815220546105e2908363ffffffff610ecc16565b600160a060020a03808516600090815260208181526040808320949094559187168152600282528281203382529091522054610624908363ffffffff610eba16565b600160a060020a03808616600081815260026020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b6000610699610929565b905060038160048111156106a957fe5b14806106c0575060048160048111156106be57fe5b145b15156106cb57600080fd5b8115156106d757600080fd5b336000908152602081905260409020546106f7908363ffffffff610eba16565b3360009081526020819052604090205560015461071a908363ffffffff610eba16565b600155600654610730908363ffffffff610ecc16565b600655600554604080517f753e88e5000000000000000000000000000000000000000000000000000000008152336004820152602481018590529051600160a060020a039092169163753e88e59160448082019260009290919082900301818387803b15801561079f57600080fd5b505af11580156107b3573d6000803e3d6000fd5b5050600554604080518681529051600160a060020a0390921693503392507f7e5c344a8141a805725cb476f76c6953b842222b967edd1f78ddb6e8b3f397ac919081900360200190a35050565b600554600160a060020a031681565b600454600160a060020a031681565b336000908152600260209081526040808320600160a060020a03861684529091528120548083111561087357336000908152600260209081526040808320600160a060020a03881684529091528120556108a8565b610883818463ffffffff610eba16565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a031660009081526020819052604090205490565b6000610933610983565b151561094157506001610515565b600554600160a060020a0316151561095b57506002610515565b600654151561096c57506003610515565b506004610515565b600354600160a060020a031681565b600190565b6000600160a060020a038316151561099f57600080fd5b336000908152602081905260409020548211156109bb57600080fd5b336000908152602081905260409020546109db908363ffffffff610eba16565b3360009081526020819052604080822092909255600160a060020a03851681522054610a0d908363ffffffff610ecc16565b600160a060020a038416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600091600160a060020a038416916370a082319160248082019260209290919082900301818787803b158015610acd57600080fd5b505af1158015610ae1573d6000803e3d6000fd5b505050506040513d6020811015610af757600080fd5b505192915050565b60065481565b336000908152600260209081526040808320600160a060020a0386168452909152812054610b39908363ffffffff610ecc16565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b610ba6610983565b1515610bb157600080fd5b600160a060020a0381161515610bc657600080fd5b600454600160a060020a03163314610bdd57600080fd5b6004610be7610929565b6004811115610bf257fe5b1415610bfd57600080fd5b6005805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038381169190911791829055604080517f61d3d7a6000000000000000000000000000000000000000000000000000000008152905192909116916361d3d7a6916004808201926020929091908290030181600087803b158015610c8157600080fd5b505af1158015610c95573d6000803e3d6000fd5b505050506040513d6020811015610cab57600080fd5b50511515610cb857600080fd5b600154600560009054906101000a9004600160a060020a0316600160a060020a0316634b2ba0dd6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610d2757600080fd5b505af1158015610d3b573d6000803e3d6000fd5b505050506040513d6020811015610d5157600080fd5b505114610d5d57600080fd5b60055460408051600160a060020a039092168252517f7845d5aa74cc410e35571258d954f23b82276e160fe8c188fa80566580f279cc9181900360200190a150565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600354600160a060020a03163314610de157600080fd5b600160a060020a0381161515610df657600080fd5b600354604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600160a060020a0381161515610e7457600080fd5b600454600160a060020a03163314610e8b57600080fd5b6004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600082821115610ec657fe5b50900390565b600082820183811015610edb57fe5b93925050505600a165627a7a7230582082879722ab70821c8489841842c27232f04b658f588b83672247a30a5e2236250029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "approve", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "recoverTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_from", "type": "address"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "uint256"}], "name": "upgrade", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "upgradeAgent", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "upgradeMaster", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_subtractedValue", "type": "uint256"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getUpgradeState", "outputs": [{"name": "", "type": "uint8"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "canUpgrade", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "tokensToBeReturned", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalUpgraded", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_addedValue", "type": "uint256"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "agent", "type": "address"}], "name": "setUpgradeAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}, {"name": "_spender", "type": "address"}], "name": "allowance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isToken", "outputs": [{"name": "weAre", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "master", "type": "address"}], "name": "setUpgradeMaster", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [{"name": "_upgradeMaster", "type": "address"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "_from", "type": "address"}, {"indexed": true, "name": "_to", "type": "address"}, {"indexed": false, "name": "_value", "type": "uint256"}], "name": "Upgrade", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "agent", "type": "address"}], "name": "UpgradeAgentSet", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}, {"indexed": true, "name": "spender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "devdoc": {"methods": {"allowance(address,address)": {"details": "Function to check the amount of tokens that an owner allowed to a spender.", "params": {"_owner": "address The address which owns the funds.", "_spender": "address The address which will spend the funds."}, "return": "A uint256 specifying the amount of tokens still available for the spender."}, "approve(address,uint256)": {"details": "Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729", "params": {"_spender": "The address which will spend the funds.", "_value": "The amount of tokens to be spent."}}, "balanceOf(address)": {"details": "Gets the balance of the specified address.", "params": {"_owner": "The address to query the the balance of."}, "return": "An uint256 representing the amount owned by the passed address."}, "decreaseApproval(address,uint256)": {"details": "Decrease the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[_spender] == 0. To decrement allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"_spender": "The address which will spend the funds.", "_subtractedValue": "The amount of tokens to decrease the allowance by."}}, "increaseApproval(address,uint256)": {"details": "Increase the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[_spender] == 0. To increment allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"_addedValue": "The amount of tokens to increase the allowance by.", "_spender": "The address which will spend the funds."}}, "recoverTokens(address)": {"details": "This will be invoked by the owner, when owner wants to rescue tokens", "params": {"token": "Token which will we rescue to the owner from the contract"}}, "tokensToBeReturned(address)": {"details": "Interface function, can be overwritten by the superclass", "params": {"token": "Token which balance we will check and return"}, "return": "The amount of tokens (in smallest denominator) the contract owns"}, "totalSupply()": {"details": "total number of tokens in existence"}, "transfer(address,uint256)": {"details": "transfer token for a specified address", "params": {"_to": "The address to transfer to.", "_value": "The amount to be transferred."}}, "transferFrom(address,address,uint256)": {"details": "Transfer tokens from one address to another", "params": {"_from": "address The address which you want to send tokens from", "_to": "address The address which you want to transfer to", "_value": "uint256 the amount of tokens to be transferred"}}, "transferOwnership(address)": {"details": "Allows the current owner to transfer control of the contract to a newOwner.", "params": {"newOwner": "The address to transfer ownership to."}}}}, "userdoc": {"methods": {"canUpgrade()": {"notice": "Child contract can enable to provide the condition when the upgrade can begun."}, "getUpgradeState()": {"notice": "Get the state of the token upgrade."}, "setUpgradeAgent(address)": {"notice": "Set an upgrade agent that handles"}, "setUpgradeMaster(address)": {"notice": "Change the upgrade master. * This allows us to set a new owner for the upgrade mechanism."}, "upgrade(uint256)": {"notice": "Allow the token holder to upgrade some of their tokens to a new contract."}}}}, "settings": {"compilationTarget": {"contracts/UpgradeableToken.sol": "UpgradeableToken"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/Recoverable.sol": {"keccak256": "0x311a332cdd87df6e00057f5455f4e68b043b5dbe211f6d68bc64e20817515635", "urls": ["bzzr://4fd99bcfb93baed6e7c8d22ee9ecc5c8346a1aa98288e77b01333b2c5d3f582d"]}, "contracts/StandardTokenExt.sol": {"keccak256": "0x9ea2d4cec4dccd5639c05e6c23dd027d80b5e5a20abd99b280ab7b2631b5a5fc", "urls": ["bzzr://a52d8fc5a21bd83997aff19128e00dceb251df712207b61223894c8b7f42d5ff"]}, "contracts/UpgradeAgent.sol": {"keccak256": "0x88e793f72feca4a18d2cd06e6037c1413d7b963eabcf5626d60bfb9d04d6e8e6", "urls": ["bzzr://87e39a65cf25d539ab49ad7e759b3298b8a19272964e69e3f2432f0323f30025"]}, "contracts/UpgradeableToken.sol": {"keccak256": "0xa74fc300c514564ece81c86905502c2de674b69c0633b133af19c1ba027da2c9", "urls": ["bzzr://55bc0b908c94781462b8959f051c6dbb53c35641b0f8cb38d74632ad6bf95e52"]}, "zeppelin/contracts/math/SafeMath.sol": {"keccak256": "0x341ba8cb467a3623e819ba1a683ac1d264005186f308505214e5f6bc89446a08", "urls": ["bzzr://59b5652ee4e4a1b5a8f1a8906e14c84af43d636cf5ca0725cc1813aabe4c8c17"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}, "zeppelin/contracts/token/ERC20/BasicToken.sol": {"keccak256": "0x948404468d61ff35ea4194650670408dabd65da7f905a1c16888ab84520bf39e", "urls": ["bzzr://ea75e20f95d7e4e10394fe6bfaa8eee56b4757c2a6f1e8df4180d33afa621935"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}, "zeppelin/contracts/token/ERC20/StandardToken.sol": {"keccak256": "0xd2b344a5259e19ec143074cfa65637a10c40b68395c59808c4af13bccbb2de55", "urls": ["bzzr://d61a01175a7ca1ba9f4403de603c20b897e33ec425aef2d9f8a7f9ddfdfaf5b2"]}}, "version": 1}, "name": "UpgradeableToken", "ordered_full_dependencies": [], "source_path": "contracts/UpgradeableToken.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n assert(c / a == b);\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n\n\n\n/**\n * @title Basic token\n * @dev Basic version of StandardToken, with no allowances.\n */\ncontract BasicToken is ERC20Basic {\n using SafeMath for uint256;\n\n mapping(address => uint256) balances;\n\n uint256 totalSupply_;\n\n /**\n * @dev total number of tokens in existence\n */\n function totalSupply() public view returns (uint256) {\n return totalSupply_;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param _to The address to transfer to.\n * @param _value The amount to be transferred.\n */\n function transfer(address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[msg.sender]);\n\n // SafeMath.sub will throw if there is not enough balance.\n balances[msg.sender] = balances[msg.sender].sub(_value);\n balances[_to] = balances[_to].add(_value);\n Transfer(msg.sender, _to, _value);\n return true;\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param _owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address _owner) public view returns (uint256 balance) {\n return balances[_owner];\n }\n\n}\n\n\n\n\n/**\n * @title Standard ERC20 token\n *\n * @dev Implementation of the basic standard token.\n * @dev https://github.com/ethereum/EIPs/issues/20\n * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol\n */\ncontract StandardToken is ERC20, BasicToken {\n\n mapping (address => mapping (address => uint256)) internal allowed;\n\n\n /**\n * @dev Transfer tokens from one address to another\n * @param _from address The address which you want to send tokens from\n * @param _to address The address which you want to transfer to\n * @param _value uint256 the amount of tokens to be transferred\n */\n function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[_from]);\n require(_value <= allowed[_from][msg.sender]);\n\n balances[_from] = balances[_from].sub(_value);\n balances[_to] = balances[_to].add(_value);\n allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);\n Transfer(_from, _to, _value);\n return true;\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n *\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param _spender The address which will spend the funds.\n * @param _value The amount of tokens to be spent.\n */\n function approve(address _spender, uint256 _value) public returns (bool) {\n allowed[msg.sender][_spender] = _value;\n Approval(msg.sender, _spender, _value);\n return true;\n }\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param _owner address The address which owns the funds.\n * @param _spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address _owner, address _spender) public view returns (uint256) {\n return allowed[_owner][_spender];\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(address _spender, uint _addedValue) public returns (bool) {\n allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {\n uint oldValue = allowed[msg.sender][_spender];\n if (_subtractedValue > oldValue) {\n allowed[msg.sender][_spender] = 0;\n } else {\n allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);\n }\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n\ncontract Recoverable is Ownable {\n\n /// @dev Empty constructor (for now)\n function Recoverable() {\n }\n\n /// @dev This will be invoked by the owner, when owner wants to rescue tokens\n /// @param token Token which will we rescue to the owner from the contract\n function recoverTokens(ERC20Basic token) onlyOwner public {\n token.transfer(owner, tokensToBeReturned(token));\n }\n\n /// @dev Interface function, can be overwritten by the superclass\n /// @param token Token which balance we will check and return\n /// @return The amount of tokens (in smallest denominator) the contract owns\n function tokensToBeReturned(ERC20Basic token) public returns (uint) {\n return token.balanceOf(this);\n }\n}\n\n\n\n/**\n * Standard EIP-20 token with an interface marker.\n *\n * @notice Interface marker is used by crowdsale contracts to validate that addresses point a good token contract.\n *\n */\ncontract StandardTokenExt is StandardToken, Recoverable {\n\n /* Interface declaration */\n function isToken() public constant returns (bool weAre) {\n return true;\n }\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Upgrade agent interface inspired by Lunyr.\n *\n * Upgrade agent transfers tokens to a new contract.\n * Upgrade agent itself can be the token contract, or just a middle man contract doing the heavy lifting.\n */\ncontract UpgradeAgent {\n\n uint public originalSupply;\n\n /** Interface marker */\n function isUpgradeAgent() public constant returns (bool) {\n return true;\n }\n\n function upgradeFrom(address _from, uint256 _value) public;\n\n}\n\n\n/**\n * A token upgrade mechanism where users can opt-in amount of tokens to the next smart contract revision.\n *\n * First envisioned by Golem and Lunyr projects.\n */\ncontract UpgradeableToken is StandardTokenExt {\n\n /** Contract / person who can set the upgrade path. This can be the same as team multisig wallet, as what it is with its default value. */\n address public upgradeMaster;\n\n /** The next contract where the tokens will be migrated. */\n UpgradeAgent public upgradeAgent;\n\n /** How many tokens we have upgraded by now. */\n uint256 public totalUpgraded;\n\n /**\n * Upgrade states.\n *\n * - NotAllowed: The child contract has not reached a condition where the upgrade can bgun\n * - WaitingForAgent: Token allows upgrade, but we don't have a new agent yet\n * - ReadyToUpgrade: The agent is set, but not a single token has been upgraded yet\n * - Upgrading: Upgrade agent is set and the balance holders can upgrade their tokens\n *\n */\n enum UpgradeState {Unknown, NotAllowed, WaitingForAgent, ReadyToUpgrade, Upgrading}\n\n /**\n * Somebody has upgraded some of his tokens.\n */\n event Upgrade(address indexed _from, address indexed _to, uint256 _value);\n\n /**\n * New upgrade agent available.\n */\n event UpgradeAgentSet(address agent);\n\n /**\n * Do not allow construction without upgrade master set.\n */\n function UpgradeableToken(address _upgradeMaster) {\n upgradeMaster = _upgradeMaster;\n }\n\n /**\n * Allow the token holder to upgrade some of their tokens to a new contract.\n */\n function upgrade(uint256 value) public {\n\n UpgradeState state = getUpgradeState();\n if(!(state == UpgradeState.ReadyToUpgrade || state == UpgradeState.Upgrading)) {\n // Called in a bad state\n throw;\n }\n\n // Validate input value.\n if (value == 0) throw;\n\n balances[msg.sender] = balances[msg.sender].sub(value);\n\n // Take tokens out from circulation\n totalSupply_ = totalSupply_.sub(value);\n totalUpgraded = totalUpgraded.add(value);\n\n // Upgrade agent reissues the tokens\n upgradeAgent.upgradeFrom(msg.sender, value);\n Upgrade(msg.sender, upgradeAgent, value);\n }\n\n /**\n * Set an upgrade agent that handles\n */\n function setUpgradeAgent(address agent) external {\n\n if(!canUpgrade()) {\n // The token is not yet in a state that we could think upgrading\n throw;\n }\n\n if (agent == 0x0) throw;\n // Only a master can designate the next agent\n if (msg.sender != upgradeMaster) throw;\n // Upgrade has already begun for an agent\n if (getUpgradeState() == UpgradeState.Upgrading) throw;\n\n upgradeAgent = UpgradeAgent(agent);\n\n // Bad interface\n if(!upgradeAgent.isUpgradeAgent()) throw;\n // Make sure that token supplies match in source and target\n if (upgradeAgent.originalSupply() != totalSupply_) throw;\n\n UpgradeAgentSet(upgradeAgent);\n }\n\n /**\n * Get the state of the token upgrade.\n */\n function getUpgradeState() public constant returns(UpgradeState) {\n if(!canUpgrade()) return UpgradeState.NotAllowed;\n else if(address(upgradeAgent) == 0x00) return UpgradeState.WaitingForAgent;\n else if(totalUpgraded == 0) return UpgradeState.ReadyToUpgrade;\n else return UpgradeState.Upgrading;\n }\n\n /**\n * Change the upgrade master.\n *\n * This allows us to set a new owner for the upgrade mechanism.\n */\n function setUpgradeMaster(address master) public {\n if (master == 0x0) throw;\n if (msg.sender != upgradeMaster) throw;\n upgradeMaster = master;\n }\n\n /**\n * Child contract can enable to provide the condition when the upgrade can begun.\n */\n function canUpgrade() public constant returns(bool) {\n return true;\n }\n\n}\n"}, "VotingContract": {"abi": [{"constant": true, "inputs": [], "name": "maximumSupply", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "name", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "approve", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "announcementHash", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_signature", "type": "bytes"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}, {"name": "_fee", "type": "uint256"}, {"name": "_nonce", "type": "uint256"}], "name": "transferPreSigned", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_token", "type": "address"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}, {"name": "_fee", "type": "uint256"}, {"name": "_nonce", "type": "uint256"}], "name": "transferPreSignedHashing", "outputs": [{"name": "", "type": "bytes32"}], "payable": false, "stateMutability": "pure", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "addedValue", "type": "uint256"}, {"name": "data", "type": "bytes"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "tokenCount", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "hash", "type": "bytes32"}, {"name": "sig", "type": "bytes"}], "name": "recover", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "pure", "type": "function"}, {"constant": false, "inputs": [{"name": "from", "type": "address"}, {"name": "to", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "investor", "type": "address"}], "name": "importInvestor", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "decimals", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "owner", "type": "address"}, {"name": "blockNumber", "type": "uint256"}], "name": "balanceAt", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "receiver", "type": "address"}, {"name": "amount", "type": "uint256"}, {"name": "data", "type": "bytes"}], "name": "transferAndCall", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}, {"name": "", "type": "uint256"}], "name": "tokenBalances", "outputs": [{"name": "blockNumber", "type": "uint256"}, {"name": "value", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "uint256"}], "name": "tokensTotal", "outputs": [{"name": "blockNumber", "type": "uint256"}, {"name": "value", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}, {"name": "", "type": "address"}], "name": "used", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "blockNumber", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}, {"name": "", "type": "address"}], "name": "allowed", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "announcementType", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "subtractedValue", "type": "uint256"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "owner", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "subtractedValue", "type": "uint256"}, {"name": "data", "type": "bytes"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "balanceImported", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "options", "outputs": [{"name": "", "type": "bytes32"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "to", "type": "address"}, {"name": "amount", "type": "uint256"}], "name": "transferInvestorTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "transferVerifier", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "symbol", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "blockNumber", "type": "uint256"}], "name": "totalSupplyAt", "outputs": [{"name": "tokenCount", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "announcementName", "outputs": [{"name": "", "type": "bytes32"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "KYC", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "optionsTotal", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "amount", "type": "uint256"}], "name": "act", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "addedValue", "type": "uint256"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "owner", "type": "address"}, {"name": "spender", "type": "address"}], "name": "allowance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "announcementURI", "outputs": [{"name": "", "type": "bytes32"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "token", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [{"name": "_token", "type": "address"}, {"name": "_KYC", "type": "address"}, {"name": "name", "type": "bytes32"}, {"name": "URI", "type": "bytes32"}, {"name": "_type", "type": "uint256"}, {"name": "_hash", "type": "uint256"}, {"name": "_options", "type": "bytes32[]"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "option", "type": "address"}, {"indexed": false, "name": "description", "type": "bytes32"}], "name": "OptionAdded", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "token", "type": "address"}, {"indexed": false, "name": "KYC", "type": "address"}, {"indexed": false, "name": "blockNumber", "type": "uint256"}, {"indexed": false, "name": "maximumSupply", "type": "uint256"}], "name": "IICCreated", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": true, "name": "delegate", "type": "address"}, {"indexed": false, "name": "amount", "type": "uint256"}, {"indexed": false, "name": "fee", "type": "uint256"}], "name": "TransferPreSigned", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "from", "type": "address"}, {"indexed": false, "name": "hash", "type": "bytes32"}], "name": "Debug", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "from", "type": "address"}, {"indexed": false, "name": "receiver", "type": "address"}, {"indexed": false, "name": "amount", "type": "uint256"}, {"indexed": false, "name": "data", "type": "bytes"}], "name": "ERC677Transfer", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}, {"indexed": true, "name": "spender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "bytecode": "0x60806040523480156200001157600080fd5b5060405162001f0138038062001f018339810160408181528251602080850151838601516060870151608088015160a089015160c08a0151868a01808a526000808c528a51988901909a52898852858a556001859055600284905560038390558a51989b969a959994989397929691909101948b948b948b948b948b948b94938b938593849392601291620000aa9160049190620002cd565b508151620000c0906005906020850190620002cd565b506006555050600d8054600160a060020a031916600160a060020a038c161790556000841115620000f657600c849055620000fb565b43600c555b600f8054600160a060020a031916600160a060020a038b16179055600091505b8251821015620001c75781606401905082828151811015156200013a57fe5b6020908102909101810151600160a060020a0383166000908152601090925260409091205582517f4657af31f793f7106e2139bb6d8ae7293c2af46cf8c457b73c33d316f78bb24f9082908590859081106200019257fe5b602090810290910181015160408051600160a060020a039094168452918301528051918290030190a16001909101906200011b565b600d54600c54604080517f981b24d0000000000000000000000000000000000000000000000000000000008152600481019290925251600160a060020a039092169163981b24d0916024808201926020929091908290030181600087803b1580156200023257600080fd5b505af115801562000247573d6000803e3d6000fd5b505050506040513d60208110156200025e57600080fd5b5051601381905560408051600160a060020a03808e1682528c1660208201528082018790526060810192909252517fe7c73ce173192d0e4ea6632e934e4df90b0a61a55086c4dc27534581a54518d69181900360800190a1505050505050505050505050505050505062000372565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200031057805160ff191683800117855562000340565b8280016001018555821562000340579182015b828111156200034057825182559160200191906001019062000323565b506200034e92915062000352565b5090565b6200036f91905b808211156200034e576000815560010162000359565b90565b611b7f80620003826000396000f3006080604052600436106101d75763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630480e58b81146101dc57806306fdde0314610203578063095ea7b31461028d5780631274c3f3146102c55780631296830d146102da57806315420b711461034d57806316ca3b631461037d57806318160ddd146103e657806319045a25146103fb57806323b872dd146104755780632eb0236a1461049f578063313ce567146104c25780633b8e6f2e146104d75780634000aea0146104fb57806348ff5665146105645780634f0092ab146105a15780635195afa5146105b957806357e871e7146105e05780635c658165146105f55780635fcce2791461061c578063661884631461063157806370a08231146106555780637272ad4914610676578063755d76b7146106df57806382fae9c1146107005780638cd98ee3146107215780638daed5281461074557806395d89b411461075a578063981b24d01461076f5780639ea0c08c14610787578063a12a6bb01461079c578063a9059cbb146107b1578063a9ec80d8146107d5578063c9ee7e02146107ea578063d73dd62314610802578063dd62ed3e14610826578063f31294a41461084d578063fc0c546a14610862575b600080fd5b3480156101e857600080fd5b506101f1610877565b60408051918252519081900360200190f35b34801561020f57600080fd5b5061021861087d565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561025257818101518382015260200161023a565b50505050905090810190601f16801561027f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561029957600080fd5b506102b1600160a060020a036004351660243561090b565b604080519115158252519081900360200190f35b3480156102d157600080fd5b506101f1610971565b3480156102e657600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526102b194369492936024939284019190819084018382808284375094975050508335600160a060020a0316945050506020820135916040810135915060600135610977565b34801561035957600080fd5b506101f1600160a060020a0360043581169060243516604435606435608435610b97565b34801561038957600080fd5b50604080516020600460443581810135601f81018490048402850184019095528484526102b1948235600160a060020a0316946024803595369594606494920191908190840183828082843750949750610c099650505050505050565b3480156103f257600080fd5b506101f1610cb9565b34801561040757600080fd5b5060408051602060046024803582810135601f8101859004850286018501909652858552610459958335953695604494919390910191908190840183828082843750949750610ccb9650505050505050565b60408051600160a060020a039092168252519081900360200190f35b34801561048157600080fd5b506102b1600160a060020a0360043581169060243516604435610da0565b3480156104ab57600080fd5b506104c0600160a060020a0360043516610e30565b005b3480156104ce57600080fd5b506101f1610fd2565b3480156104e357600080fd5b506101f1600160a060020a0360043516602435610fd8565b34801561050757600080fd5b50604080516020600460443581810135601f81018490048402850184019095528484526102b1948235600160a060020a0316946024803595369594606494920191908190840183828082843750949750610ffa9650505050505050565b34801561057057600080fd5b50610588600160a060020a0360043516602435611203565b6040805192835260208301919091528051918290030190f35b3480156105ad57600080fd5b5061058860043561123e565b3480156105c557600080fd5b506101f1600160a060020a036004358116906024351661126a565b3480156105ec57600080fd5b506101f1611287565b34801561060157600080fd5b506101f1600160a060020a036004358116906024351661128d565b34801561062857600080fd5b506101f16112aa565b34801561063d57600080fd5b506102b1600160a060020a03600435166024356112b0565b34801561066157600080fd5b506101f1600160a060020a03600435166113a0565b34801561068257600080fd5b50604080516020600460443581810135601f81018490048402850184019095528484526102b1948235600160a060020a03169460248035953695946064949201919081908401838280828437509497506113c89650505050505050565b3480156106eb57600080fd5b506102b1600160a060020a03600435166113ea565b34801561070c57600080fd5b506101f1600160a060020a03600435166113ff565b34801561072d57600080fd5b506104c0600160a060020a0360043516602435611411565b34801561075157600080fd5b50610459611420565b34801561076657600080fd5b5061021861142f565b34801561077b57600080fd5b506101f160043561148a565b34801561079357600080fd5b506101f1611497565b3480156107a857600080fd5b5061045961149d565b3480156107bd57600080fd5b506102b1600160a060020a03600435166024356114ac565b3480156107e157600080fd5b506101f161159e565b3480156107f657600080fd5b506104c06004356115a4565b34801561080e57600080fd5b506102b1600160a060020a03600435166024356115b2565b34801561083257600080fd5b506101f1600160a060020a036004358116906024351661164b565b34801561085957600080fd5b506101f1611676565b34801561086e57600080fd5b5061045961167c565b60135481565b6004805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156109035780601f106108d857610100808354040283529160200191610903565b820191906000526020600020905b8154815290600101906020018083116108e657829003601f168201915b505050505081565b336000818152600a60209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b60035481565b60008080600160a060020a038716151561099057600080fd5b600b886040518082805190602001908083835b602083106109c25780518252601f1990920191602091820191016109a3565b51815160209384036101000a600019018019909216911617905292019485525060405193849003019092205460ff161591506109ff905057600080fd5b610a0c3088888888610b97565b9150610a188289610ccb565b9050600160a060020a0381161515610a2f57600080fd5b610a3a81888861168b565b610a4581338761168b565b6001600b896040518082805190602001908083835b60208310610a795780518252601f199092019160209182019101610a5a565b51815160209384036101000a6000190180199092169116179052920194855250604080519485900382018520805460ff1916961515969096179095558a84528301899052505081513392600160a060020a038b811693908616927fec5a73fd1f178be20c1bca1b406cbf4b5c20d833b66e582fc122fb4baa0fc2a4929181900390910190a486600160a060020a031681600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef886040518082815260200191505060405180910390a36040805186815290513391600160a060020a038416917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a3506001979650505050505050565b604080517f48664c160000000000000000000000000000000000000000000000000000000081526c01000000000000000000000000600160a060020a0397881681026004830152959096169094026018860152602c850192909252604c840152606c8301525190819003608c01902090565b6000600160a060020a038416301415610c2157600080fd5b610c2b84846115b2565b5083600160a060020a03168260405180828051906020019080838360005b83811015610c61578181015183820152602001610c49565b50505050905090810190601f168015610c8e5780820380516001836020036101000a031916815260200191505b509150506000604051808303816000865af19150501515610cae57600080fd5b5060015b9392505050565b6000610cc66009436117c7565b905090565b60008060008084516041141515610ce55760009350610d97565b50505060208201516040830151606084015160001a601b60ff82161015610d0a57601b015b8060ff16601b14158015610d2257508060ff16601c14155b15610d305760009350610d97565b60408051600080825260208083018085528a905260ff8516838501526060830187905260808301869052925160019360a0808501949193601f19840193928390039091019190865af1158015610d8a573d6000803e3d6000fd5b5050506020604051035193505b50505092915050565b600160a060020a0383166000908152600a60209081526040808320338452909152812054821115610dd057600080fd5b610ddb84848461168b565b82600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a35060019392505050565b600160a060020a0381166000908152600e60205260408120548190819060ff1615610e5a57600080fd5b600d54600c54604080517f3b8e6f2e000000000000000000000000000000000000000000000000000000008152600160a060020a038881166004830152602482019390935290519190921691633b8e6f2e9160448083019260209291908290030181600087803b158015610ecd57600080fd5b505af1158015610ee1573d6000803e3d6000fd5b505050506040513d6020811015610ef757600080fd5b50519250610f0560006113a0565b9150610f0f610cb9565b6000805260086020529050610f537f5eff886ea0ce6ca488a3d6e336d6c0f75f46d19b42c06ce5ee98e42c96d256c7610f4e848663ffffffff6117dd16565b6117ec565b610f5f6000858561168b565b610f746009610f4e838663ffffffff6117dd16565b600160a060020a0384166000818152600e60209081526040808320805460ff19166001179055805187815290517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a350505050565b60065481565b600160a060020a0382166000908152600860205260408120610cb290836117c7565b600061100684846114ac565b151561101157600080fd5b7f72db2339068fd324bbc28f2944e01064da539ac76064b6ce4a97a5f81de43dd6338585856040518085600160a060020a0316600160a060020a0316815260200184600160a060020a0316600160a060020a0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156110a9578181015183820152602001611091565b50505050905090810190601f1680156110d65780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a183600160a060020a031663c0ee0b8a3385856040518463ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018084600160a060020a0316600160a060020a0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561117e578181015183820152602001611166565b50505050905090810190601f1680156111ab5780820380516001836020036101000a031916815260200191505b50945050505050602060405180830381600087803b1580156111cc57600080fd5b505af11580156111e0573d6000803e3d6000fd5b505050506040513d60208110156111f657600080fd5b50511515610cb257600080fd5b60086020528160005260406000208181548110151561121e57fe5b600091825260209091206002909102018054600190910154909250905082565b600980548290811061124c57fe5b60009182526020909120600290910201805460019091015490915082565b601160209081526000928352604080842090915290825290205481565b600c5481565b600a60209081526000928352604080842090915290825290205481565b60025481565b336000908152600a60209081526040808320600160a060020a03861684529091528120548083111561130557336000908152600a60209081526040808320600160a060020a038816845290915281205561133a565b611315818463ffffffff6118c316565b336000908152600a60209081526040808320600160a060020a03891684529091529020555b336000818152600a60209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a03811660009081526008602052604081206113c290436117c7565b92915050565b6000600160a060020a0384163014156113e057600080fd5b610c2b84846112b0565b600e6020526000908152604090205460ff1681565b60106020526000908152604090205481565b61141b82826114ac565b505050565b600754600160a060020a031681565b6005805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156109035780601f106108d857610100808354040283529160200191610903565b60006113c26009836117c7565b60005481565b600f54600160a060020a031681565b336000908152600e602052604081205460ff1615156114ce576114ce33610e30565b600160a060020a0383166000908152601060205260409020541561159457600f54604080517f3af32abf0000000000000000000000000000000000000000000000000000000081523360048201529051600160a060020a0390921691633af32abf916024808201926020929091908290030181600087803b15801561155257600080fd5b505af1158015611566573d6000803e3d6000fd5b505050506040513d602081101561157c57600080fd5b5051151561158957600080fd5b6115943384846118d5565b610cb28383611906565b60125481565b6115af606482611411565b50565b336000908152600a60209081526040808320600160a060020a03861684529091528120546115e6908363ffffffff6117dd16565b336000818152600a60209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a039182166000908152600a6020908152604080832093909416825291909152205490565b60015481565b600d54600160a060020a031681565b600080611697856113a0565b91506116a2846113a0565b600754909150600160a060020a03161561176857600754604080517fad076994000000000000000000000000000000000000000000000000000000008152600160a060020a0388811660048301528781166024830152604482018790529151919092169163ad0769949160648083019260209291908290030181600087803b15801561172d57600080fd5b505af1158015611741573d6000803e3d6000fd5b505050506040513d602081101561175757600080fd5b505192506000831161176857600080fd5b600160a060020a038516600090815260086020526040902061179490610f4e848663ffffffff6118c316565b600160a060020a03841660009081526008602052604090206117c090610f4e838663ffffffff6117dd16565b5050505050565b6000806117d4848461195c565b95945050505050565b600082820183811015610cb257fe5b8154158061182a575081544390839061180c90600163ffffffff6118c316565b8154811061181657fe5b906000526020600020906002020160000154105b1561186c5760408051808201909152438152602080820183815284546001818101875560008781529390932093516002909102909301928355519101556118bf565b60408051808201909152438152602081018290528254839061189590600163ffffffff6118c316565b8154811061189f57fe5b600091825260209182902083516002909202019081559101516001909101555b5050565b6000828211156118cf57fe5b50900390565b600160a060020a03918216600090815260116020908152604080832095909416825293909352912080549091019055565b600061191333848461168b565b604080518381529051600160a060020a0385169133917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a350600192915050565b600080600080600086805490506000141561197d5760009450849350611b32565b8654879061199290600163ffffffff6118c316565b8154811061199c57fe5b60009182526020909120600290910201548610611a1d57865487906119c890600163ffffffff6118c316565b815481106119d257fe5b6000918252602090912060029091020154875488906119f890600163ffffffff6118c316565b81548110611a0257fe5b90600052602060002090600202016001015494509450611b32565b866000815481101515611a2c57fe5b906000526020600020906002020160000154861015611a515760009450849350611b32565b865460009350611a6890600163ffffffff6118c316565b91505b82821115611aed57611aa56002611a99611a8c86600163ffffffff6117dd16565b859063ffffffff6117dd16565b9063ffffffff611b3c16565b9050858782815481101515611ab657fe5b600091825260209091206002909102015411611ad457809250611ae8565b611ae581600163ffffffff6118c316565b91505b611a6b565b8683815481101515611afb57fe5b9060005260206000209060020201600001548784815481101515611b1b57fe5b906000526020600020906002020160010154945094505b5050509250929050565b6000808284811515611b4a57fe5b049493505050505600a165627a7a723058203cfee6a66489fe951a913db15cba5ba2f5569c3f105fde44fed05cb02798cf630029", "bytecode_runtime": "0x6080604052600436106101d75763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630480e58b81146101dc57806306fdde0314610203578063095ea7b31461028d5780631274c3f3146102c55780631296830d146102da57806315420b711461034d57806316ca3b631461037d57806318160ddd146103e657806319045a25146103fb57806323b872dd146104755780632eb0236a1461049f578063313ce567146104c25780633b8e6f2e146104d75780634000aea0146104fb57806348ff5665146105645780634f0092ab146105a15780635195afa5146105b957806357e871e7146105e05780635c658165146105f55780635fcce2791461061c578063661884631461063157806370a08231146106555780637272ad4914610676578063755d76b7146106df57806382fae9c1146107005780638cd98ee3146107215780638daed5281461074557806395d89b411461075a578063981b24d01461076f5780639ea0c08c14610787578063a12a6bb01461079c578063a9059cbb146107b1578063a9ec80d8146107d5578063c9ee7e02146107ea578063d73dd62314610802578063dd62ed3e14610826578063f31294a41461084d578063fc0c546a14610862575b600080fd5b3480156101e857600080fd5b506101f1610877565b60408051918252519081900360200190f35b34801561020f57600080fd5b5061021861087d565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561025257818101518382015260200161023a565b50505050905090810190601f16801561027f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561029957600080fd5b506102b1600160a060020a036004351660243561090b565b604080519115158252519081900360200190f35b3480156102d157600080fd5b506101f1610971565b3480156102e657600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526102b194369492936024939284019190819084018382808284375094975050508335600160a060020a0316945050506020820135916040810135915060600135610977565b34801561035957600080fd5b506101f1600160a060020a0360043581169060243516604435606435608435610b97565b34801561038957600080fd5b50604080516020600460443581810135601f81018490048402850184019095528484526102b1948235600160a060020a0316946024803595369594606494920191908190840183828082843750949750610c099650505050505050565b3480156103f257600080fd5b506101f1610cb9565b34801561040757600080fd5b5060408051602060046024803582810135601f8101859004850286018501909652858552610459958335953695604494919390910191908190840183828082843750949750610ccb9650505050505050565b60408051600160a060020a039092168252519081900360200190f35b34801561048157600080fd5b506102b1600160a060020a0360043581169060243516604435610da0565b3480156104ab57600080fd5b506104c0600160a060020a0360043516610e30565b005b3480156104ce57600080fd5b506101f1610fd2565b3480156104e357600080fd5b506101f1600160a060020a0360043516602435610fd8565b34801561050757600080fd5b50604080516020600460443581810135601f81018490048402850184019095528484526102b1948235600160a060020a0316946024803595369594606494920191908190840183828082843750949750610ffa9650505050505050565b34801561057057600080fd5b50610588600160a060020a0360043516602435611203565b6040805192835260208301919091528051918290030190f35b3480156105ad57600080fd5b5061058860043561123e565b3480156105c557600080fd5b506101f1600160a060020a036004358116906024351661126a565b3480156105ec57600080fd5b506101f1611287565b34801561060157600080fd5b506101f1600160a060020a036004358116906024351661128d565b34801561062857600080fd5b506101f16112aa565b34801561063d57600080fd5b506102b1600160a060020a03600435166024356112b0565b34801561066157600080fd5b506101f1600160a060020a03600435166113a0565b34801561068257600080fd5b50604080516020600460443581810135601f81018490048402850184019095528484526102b1948235600160a060020a03169460248035953695946064949201919081908401838280828437509497506113c89650505050505050565b3480156106eb57600080fd5b506102b1600160a060020a03600435166113ea565b34801561070c57600080fd5b506101f1600160a060020a03600435166113ff565b34801561072d57600080fd5b506104c0600160a060020a0360043516602435611411565b34801561075157600080fd5b50610459611420565b34801561076657600080fd5b5061021861142f565b34801561077b57600080fd5b506101f160043561148a565b34801561079357600080fd5b506101f1611497565b3480156107a857600080fd5b5061045961149d565b3480156107bd57600080fd5b506102b1600160a060020a03600435166024356114ac565b3480156107e157600080fd5b506101f161159e565b3480156107f657600080fd5b506104c06004356115a4565b34801561080e57600080fd5b506102b1600160a060020a03600435166024356115b2565b34801561083257600080fd5b506101f1600160a060020a036004358116906024351661164b565b34801561085957600080fd5b506101f1611676565b34801561086e57600080fd5b5061045961167c565b60135481565b6004805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156109035780601f106108d857610100808354040283529160200191610903565b820191906000526020600020905b8154815290600101906020018083116108e657829003601f168201915b505050505081565b336000818152600a60209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b60035481565b60008080600160a060020a038716151561099057600080fd5b600b886040518082805190602001908083835b602083106109c25780518252601f1990920191602091820191016109a3565b51815160209384036101000a600019018019909216911617905292019485525060405193849003019092205460ff161591506109ff905057600080fd5b610a0c3088888888610b97565b9150610a188289610ccb565b9050600160a060020a0381161515610a2f57600080fd5b610a3a81888861168b565b610a4581338761168b565b6001600b896040518082805190602001908083835b60208310610a795780518252601f199092019160209182019101610a5a565b51815160209384036101000a6000190180199092169116179052920194855250604080519485900382018520805460ff1916961515969096179095558a84528301899052505081513392600160a060020a038b811693908616927fec5a73fd1f178be20c1bca1b406cbf4b5c20d833b66e582fc122fb4baa0fc2a4929181900390910190a486600160a060020a031681600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef886040518082815260200191505060405180910390a36040805186815290513391600160a060020a038416917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a3506001979650505050505050565b604080517f48664c160000000000000000000000000000000000000000000000000000000081526c01000000000000000000000000600160a060020a0397881681026004830152959096169094026018860152602c850192909252604c840152606c8301525190819003608c01902090565b6000600160a060020a038416301415610c2157600080fd5b610c2b84846115b2565b5083600160a060020a03168260405180828051906020019080838360005b83811015610c61578181015183820152602001610c49565b50505050905090810190601f168015610c8e5780820380516001836020036101000a031916815260200191505b509150506000604051808303816000865af19150501515610cae57600080fd5b5060015b9392505050565b6000610cc66009436117c7565b905090565b60008060008084516041141515610ce55760009350610d97565b50505060208201516040830151606084015160001a601b60ff82161015610d0a57601b015b8060ff16601b14158015610d2257508060ff16601c14155b15610d305760009350610d97565b60408051600080825260208083018085528a905260ff8516838501526060830187905260808301869052925160019360a0808501949193601f19840193928390039091019190865af1158015610d8a573d6000803e3d6000fd5b5050506020604051035193505b50505092915050565b600160a060020a0383166000908152600a60209081526040808320338452909152812054821115610dd057600080fd5b610ddb84848461168b565b82600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a35060019392505050565b600160a060020a0381166000908152600e60205260408120548190819060ff1615610e5a57600080fd5b600d54600c54604080517f3b8e6f2e000000000000000000000000000000000000000000000000000000008152600160a060020a038881166004830152602482019390935290519190921691633b8e6f2e9160448083019260209291908290030181600087803b158015610ecd57600080fd5b505af1158015610ee1573d6000803e3d6000fd5b505050506040513d6020811015610ef757600080fd5b50519250610f0560006113a0565b9150610f0f610cb9565b6000805260086020529050610f537f5eff886ea0ce6ca488a3d6e336d6c0f75f46d19b42c06ce5ee98e42c96d256c7610f4e848663ffffffff6117dd16565b6117ec565b610f5f6000858561168b565b610f746009610f4e838663ffffffff6117dd16565b600160a060020a0384166000818152600e60209081526040808320805460ff19166001179055805187815290517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a350505050565b60065481565b600160a060020a0382166000908152600860205260408120610cb290836117c7565b600061100684846114ac565b151561101157600080fd5b7f72db2339068fd324bbc28f2944e01064da539ac76064b6ce4a97a5f81de43dd6338585856040518085600160a060020a0316600160a060020a0316815260200184600160a060020a0316600160a060020a0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156110a9578181015183820152602001611091565b50505050905090810190601f1680156110d65780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a183600160a060020a031663c0ee0b8a3385856040518463ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018084600160a060020a0316600160a060020a0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561117e578181015183820152602001611166565b50505050905090810190601f1680156111ab5780820380516001836020036101000a031916815260200191505b50945050505050602060405180830381600087803b1580156111cc57600080fd5b505af11580156111e0573d6000803e3d6000fd5b505050506040513d60208110156111f657600080fd5b50511515610cb257600080fd5b60086020528160005260406000208181548110151561121e57fe5b600091825260209091206002909102018054600190910154909250905082565b600980548290811061124c57fe5b60009182526020909120600290910201805460019091015490915082565b601160209081526000928352604080842090915290825290205481565b600c5481565b600a60209081526000928352604080842090915290825290205481565b60025481565b336000908152600a60209081526040808320600160a060020a03861684529091528120548083111561130557336000908152600a60209081526040808320600160a060020a038816845290915281205561133a565b611315818463ffffffff6118c316565b336000908152600a60209081526040808320600160a060020a03891684529091529020555b336000818152600a60209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a03811660009081526008602052604081206113c290436117c7565b92915050565b6000600160a060020a0384163014156113e057600080fd5b610c2b84846112b0565b600e6020526000908152604090205460ff1681565b60106020526000908152604090205481565b61141b82826114ac565b505050565b600754600160a060020a031681565b6005805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156109035780601f106108d857610100808354040283529160200191610903565b60006113c26009836117c7565b60005481565b600f54600160a060020a031681565b336000908152600e602052604081205460ff1615156114ce576114ce33610e30565b600160a060020a0383166000908152601060205260409020541561159457600f54604080517f3af32abf0000000000000000000000000000000000000000000000000000000081523360048201529051600160a060020a0390921691633af32abf916024808201926020929091908290030181600087803b15801561155257600080fd5b505af1158015611566573d6000803e3d6000fd5b505050506040513d602081101561157c57600080fd5b5051151561158957600080fd5b6115943384846118d5565b610cb28383611906565b60125481565b6115af606482611411565b50565b336000908152600a60209081526040808320600160a060020a03861684529091528120546115e6908363ffffffff6117dd16565b336000818152600a60209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a039182166000908152600a6020908152604080832093909416825291909152205490565b60015481565b600d54600160a060020a031681565b600080611697856113a0565b91506116a2846113a0565b600754909150600160a060020a03161561176857600754604080517fad076994000000000000000000000000000000000000000000000000000000008152600160a060020a0388811660048301528781166024830152604482018790529151919092169163ad0769949160648083019260209291908290030181600087803b15801561172d57600080fd5b505af1158015611741573d6000803e3d6000fd5b505050506040513d602081101561175757600080fd5b505192506000831161176857600080fd5b600160a060020a038516600090815260086020526040902061179490610f4e848663ffffffff6118c316565b600160a060020a03841660009081526008602052604090206117c090610f4e838663ffffffff6117dd16565b5050505050565b6000806117d4848461195c565b95945050505050565b600082820183811015610cb257fe5b8154158061182a575081544390839061180c90600163ffffffff6118c316565b8154811061181657fe5b906000526020600020906002020160000154105b1561186c5760408051808201909152438152602080820183815284546001818101875560008781529390932093516002909102909301928355519101556118bf565b60408051808201909152438152602081018290528254839061189590600163ffffffff6118c316565b8154811061189f57fe5b600091825260209182902083516002909202019081559101516001909101555b5050565b6000828211156118cf57fe5b50900390565b600160a060020a03918216600090815260116020908152604080832095909416825293909352912080549091019055565b600061191333848461168b565b604080518381529051600160a060020a0385169133917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a350600192915050565b600080600080600086805490506000141561197d5760009450849350611b32565b8654879061199290600163ffffffff6118c316565b8154811061199c57fe5b60009182526020909120600290910201548610611a1d57865487906119c890600163ffffffff6118c316565b815481106119d257fe5b6000918252602090912060029091020154875488906119f890600163ffffffff6118c316565b81548110611a0257fe5b90600052602060002090600202016001015494509450611b32565b866000815481101515611a2c57fe5b906000526020600020906002020160000154861015611a515760009450849350611b32565b865460009350611a6890600163ffffffff6118c316565b91505b82821115611aed57611aa56002611a99611a8c86600163ffffffff6117dd16565b859063ffffffff6117dd16565b9063ffffffff611b3c16565b9050858782815481101515611ab657fe5b600091825260209091206002909102015411611ad457809250611ae8565b611ae581600163ffffffff6118c316565b91505b611a6b565b8683815481101515611afb57fe5b9060005260206000209060020201600001548784815481101515611b1b57fe5b906000526020600020906002020160010154945094505b5050509250929050565b6000808284811515611b4a57fe5b049493505050505600a165627a7a723058203cfee6a66489fe951a913db15cba5ba2f5569c3f105fde44fed05cb02798cf630029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": true, "inputs": [], "name": "maximumSupply", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "name", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "approve", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "announcementHash", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_signature", "type": "bytes"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}, {"name": "_fee", "type": "uint256"}, {"name": "_nonce", "type": "uint256"}], "name": "transferPreSigned", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_token", "type": "address"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}, {"name": "_fee", "type": "uint256"}, {"name": "_nonce", "type": "uint256"}], "name": "transferPreSignedHashing", "outputs": [{"name": "", "type": "bytes32"}], "payable": false, "stateMutability": "pure", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "addedValue", "type": "uint256"}, {"name": "data", "type": "bytes"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "tokenCount", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "hash", "type": "bytes32"}, {"name": "sig", "type": "bytes"}], "name": "recover", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "pure", "type": "function"}, {"constant": false, "inputs": [{"name": "from", "type": "address"}, {"name": "to", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "investor", "type": "address"}], "name": "importInvestor", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "decimals", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "owner", "type": "address"}, {"name": "blockNumber", "type": "uint256"}], "name": "balanceAt", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "receiver", "type": "address"}, {"name": "amount", "type": "uint256"}, {"name": "data", "type": "bytes"}], "name": "transferAndCall", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}, {"name": "", "type": "uint256"}], "name": "tokenBalances", "outputs": [{"name": "blockNumber", "type": "uint256"}, {"name": "value", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "uint256"}], "name": "tokensTotal", "outputs": [{"name": "blockNumber", "type": "uint256"}, {"name": "value", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}, {"name": "", "type": "address"}], "name": "used", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "blockNumber", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}, {"name": "", "type": "address"}], "name": "allowed", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "announcementType", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "subtractedValue", "type": "uint256"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "owner", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "subtractedValue", "type": "uint256"}, {"name": "data", "type": "bytes"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "balanceImported", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "options", "outputs": [{"name": "", "type": "bytes32"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "to", "type": "address"}, {"name": "amount", "type": "uint256"}], "name": "transferInvestorTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "transferVerifier", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "symbol", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "blockNumber", "type": "uint256"}], "name": "totalSupplyAt", "outputs": [{"name": "tokenCount", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "announcementName", "outputs": [{"name": "", "type": "bytes32"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "KYC", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "optionsTotal", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "amount", "type": "uint256"}], "name": "act", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "addedValue", "type": "uint256"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "owner", "type": "address"}, {"name": "spender", "type": "address"}], "name": "allowance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "announcementURI", "outputs": [{"name": "", "type": "bytes32"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "token", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [{"name": "_token", "type": "address"}, {"name": "_KYC", "type": "address"}, {"name": "name", "type": "bytes32"}, {"name": "URI", "type": "bytes32"}, {"name": "_type", "type": "uint256"}, {"name": "_hash", "type": "uint256"}, {"name": "_options", "type": "bytes32[]"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "option", "type": "address"}, {"indexed": false, "name": "description", "type": "bytes32"}], "name": "OptionAdded", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "token", "type": "address"}, {"indexed": false, "name": "KYC", "type": "address"}, {"indexed": false, "name": "blockNumber", "type": "uint256"}, {"indexed": false, "name": "maximumSupply", "type": "uint256"}], "name": "IICCreated", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": true, "name": "delegate", "type": "address"}, {"indexed": false, "name": "amount", "type": "uint256"}, {"indexed": false, "name": "fee", "type": "uint256"}], "name": "TransferPreSigned", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "from", "type": "address"}, {"indexed": false, "name": "hash", "type": "bytes32"}], "name": "Debug", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "from", "type": "address"}, {"indexed": false, "name": "receiver", "type": "address"}, {"indexed": false, "name": "amount", "type": "uint256"}, {"indexed": false, "name": "data", "type": "bytes"}], "name": "ERC677Transfer", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}, {"indexed": true, "name": "spender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "devdoc": {"methods": {"allowance(address,address)": {"details": "Function to check the amount of tokens that an owner allowed to a spender.", "params": {"owner": "address The address which owns the funds.", "spender": "address The address which will spend the funds."}, "return": "A uint256 specifying the amount of tokens still available for the spender."}, "approve(address,uint256)": {"details": "Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729", "params": {"spender": "The address which will spend the funds.", "value": "The amount of tokens to be spent."}, "return": "true if the call function was executed successfully"}, "balanceAt(address,uint256)": {"details": "Gets the balance of the specified address.", "params": {"blockNumber": "The block number we want to query for the balance.", "owner": "The address to query the the balance of."}, "return": "An uint256 representing the amount owned by the passed address."}, "balanceOf(address)": {"details": "Gets the balance of the specified address.", "params": {"owner": "The address to query the the balance of."}, "return": "An uint256 representing the amount owned by the passed address."}, "decreaseApproval(address,uint256)": {"details": "Decrease the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[spender] == 0. To decrement allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"spender": "The address which will spend the funds.", "subtractedValue": "The amount of tokens to decrease the allowance by."}}, "decreaseApproval(address,uint256,bytes)": {"details": "Addition to StandardToken methods. Decrease the amount of tokens that an owner allowed to a spender and execute a call with the sent data. * This is originally from OpenZeppelin. * approve should be called when allowed[spender] == 0. To decrement allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"data": "ABI-encoded contract call to call `spender` address.", "spender": "The address which will spend the funds.", "subtractedValue": "The amount of tokens to decrease the allowance by."}}, "increaseApproval(address,uint256)": {"details": "Increase the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[spender] == 0. To increment allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"addedValue": "The amount of tokens to increase the allowance by.", "spender": "The address which will spend the funds."}}, "increaseApproval(address,uint256,bytes)": {"details": "Addition to StandardToken methods. Increase the amount of tokens that an owner allowed to a spender and execute a call with the sent data. * This is originally from OpenZeppelin. * approve should be called when allowed[spender] == 0. To increment allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"addedValue": "The amount of tokens to increase the allowance by.", "data": "ABI-encoded contract call to call `spender` address.", "spender": "The address which will spend the funds."}}, "recover(bytes32,bytes)": {"params": {"hash": "bytes32 message, the hash is the signed message. What is recovered is the signer address.", "sig": "bytes signature, the signature is generated using web3.eth.sign()"}}, "totalSupply()": {"details": "total number of tokens in existence", "return": "A uint256 specifying the total number of tokens in existence"}, "totalSupplyAt(uint256)": {"details": "total number of tokens in existence at the given block", "params": {"blockNumber": "The block number we want to query for the total supply"}, "return": "A uint256 specifying the total number of tokens at a given block"}, "transferFrom(address,address,uint256)": {"details": "Transfer tokens from one address to another", "params": {"from": "address The address which you want to send tokens from", "to": "address The address which you want to transfer to", "value": "uint256 the amount of tokens to be transferred"}, "return": "true if the call function was executed successfully"}, "transferPreSigned(bytes,address,uint256,uint256,uint256)": {"params": {"_fee": "uint256 The amount of tokens paid to msg.sender, by the person who used to own the tokens.", "_nonce": "uint256 Presigned transaction number", "_signature": "bytes The signature, issued by the owner.", "_to": "address The address which you want to transfer to.", "_value": "uint256 The amount of tokens to be transferred."}}, "transferPreSignedHashing(address,address,uint256,uint256,uint256)": {"params": {"_fee": "uint256 The amount of tokens paid to msg.sender, by the owner.", "_nonce": "uint256 Presigned transaction number.", "_to": "address The address which you want to transfer to.", "_token": "address The address of the token.", "_value": "uint256 The amount of tokens to be transferred."}}}}, "userdoc": {"methods": {"recover(bytes32,bytes)": {"notice": "Recover signer address from a message by using his signature. Signature is delivered as a byte array, hence need for this implementation."}, "transferPreSigned(bytes,address,uint256,uint256,uint256)": {"notice": "Submit a presigned transfer"}, "transferPreSignedHashing(address,address,uint256,uint256,uint256)": {"notice": "Hash (keccak256) of the payload used by transferPreSigned"}}}}, "settings": {"compilationTarget": {"contracts/security-token/tests/VotingContract.sol": "VotingContract"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/CrowdsaleToken.sol": {"keccak256": "0xa812687ac327cd19fac64667980e70d4fb72ef7f61dce477818d085cf0a915df", "urls": ["bzzr://826d9dda00ce341794e5bb05c78b1abb2728e3c631f7a542345dcfa9f3bd9c50"]}, "contracts/MintableToken.sol": {"keccak256": "0x650e1d6b2bedcd36508918357c7cf4f36fdd093cd0c4d6342f4dcd3bdcdd7578", "urls": ["bzzr://7ba2ac0480d428066a18727e2adb76ba56856ecd37b4420e801131ec8f8f4be3"]}, "contracts/Recoverable.sol": {"keccak256": "0x311a332cdd87df6e00057f5455f4e68b043b5dbe211f6d68bc64e20817515635", "urls": ["bzzr://4fd99bcfb93baed6e7c8d22ee9ecc5c8346a1aa98288e77b01333b2c5d3f582d"]}, "contracts/ReleasableToken.sol": {"keccak256": "0x2c50180d0c1eab1aa63a04da3ae87ee2c482665d2a1a42c5f05b11234a7edaf4", "urls": ["bzzr://10752c317eba5c42e2848722689cfee4fffb7bcb42f3346e1a20715d843798e8"]}, "contracts/SafeMathLib.sol": {"keccak256": "0x501bfe31e274b9a5591f7c540bdced4d4312e27d4f19599147c9bbca3d9c6b18", "urls": ["bzzr://a80935ebddb06c247d71372d4e5833ee029f08633bd0fe4a274a57009567e5b9"]}, "contracts/StandardTokenExt.sol": {"keccak256": "0x9ea2d4cec4dccd5639c05e6c23dd027d80b5e5a20abd99b280ab7b2631b5a5fc", "urls": ["bzzr://a52d8fc5a21bd83997aff19128e00dceb251df712207b61223894c8b7f42d5ff"]}, "contracts/UpgradeAgent.sol": {"keccak256": "0x88e793f72feca4a18d2cd06e6037c1413d7b963eabcf5626d60bfb9d04d6e8e6", "urls": ["bzzr://87e39a65cf25d539ab49ad7e759b3298b8a19272964e69e3f2432f0323f30025"]}, "contracts/UpgradeableToken.sol": {"keccak256": "0xa74fc300c514564ece81c86905502c2de674b69c0633b133af19c1ba027da2c9", "urls": ["bzzr://55bc0b908c94781462b8959f051c6dbb53c35641b0f8cb38d74632ad6bf95e52"]}, "contracts/security-token/CheckpointToken.sol": {"keccak256": "0x6df7f71b8c4d9edd19c9c8fbc5dadb6d03c62ad2840f3b4a1d11f558e64ab8c1", "urls": ["bzzr://cd1c4b5351981664ef90752d33c5230d61f1a15664b7f465f8e260778abb944a"]}, "contracts/security-token/ERC677.sol": {"keccak256": "0xf557f3e12aa7f5a23d40957d9ac216db0902997f70f856697529d55e9823e50a", "urls": ["bzzr://c924011b4a57d2eb355c276255fc7af284c2f5b20ece36957d23a2e058975349"]}, "contracts/security-token/ERC677Token.sol": {"keccak256": "0xd67b6b0d3c7e9def09554b11c35f3b609a87ae2ea0f5853f0ca745f7f6366866", "urls": ["bzzr://bcd0f5e4bad7064ea5d8fe4e4e8a276af4ebddc4c7c25703c2dd32ca9ff715f7"]}, "contracts/security-token/ERC865.sol": {"keccak256": "0x326ad6a9d49740439036de2eb866edeabde2e12710ad03d4a3709a41e827ea96", "urls": ["bzzr://1a82e221a8da7446b644300d00183eefe1015f4a9ecd3d2ccbfa99c6bc68f9f3"]}, "contracts/security-token/KYCInterface.sol": {"keccak256": "0x29b1037cfb17f26421589f64eb271362aa9fbfd1f975e68df8071fd98be2052c", "urls": ["bzzr://f815559e1245fd3603a1baf5f3ad7ed7d571690b35f131cb27e0fcf8246c34a4"]}, "contracts/security-token/SecurityTransferAgent.sol": {"keccak256": "0x23b8a61926435e2c583480c0de72a99b4f7ec8a4213ffc46711f83ecdeaf9186", "urls": ["bzzr://36be13b6cf1389357679705bd18969409ecde684ace2d9c5b606d8986e0231cd"]}, "contracts/security-token/tests/BogusAnnouncement.sol": {"keccak256": "0x2acace3c803b98f5aa174ddf3eb1af7dec2b67c4d6c34d1ef69fa88a2851a68b", "urls": ["bzzr://74b212027437f6f197cc0d9cd06f056e02be9595cf7b45582b41f14a080d51d3"]}, "contracts/security-token/tests/InvestorInteractionContract.sol": {"keccak256": "0x2a4149dfcef2c7a3e9327ea07cce094bb8bda4ff2f18506e8054788bedf741ff", "urls": ["bzzr://343e1ebb08208bffd6c6b0a5a41d9cbb081c1f200b534cd01e0c67d29b163543"]}, "contracts/security-token/tests/VotingContract.sol": {"keccak256": "0xfc6723f114c20b91e41d9ace0e2df875780e6f3cc13650ea3fe2b0a516eeb031", "urls": ["bzzr://ecddbce4c10cd494cac4870f805fd902e16c9ee9fdd44e2731bf4a204750eefe"]}, "zeppelin/contracts/math/SafeMath.sol": {"keccak256": "0x341ba8cb467a3623e819ba1a683ac1d264005186f308505214e5f6bc89446a08", "urls": ["bzzr://59b5652ee4e4a1b5a8f1a8906e14c84af43d636cf5ca0725cc1813aabe4c8c17"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}, "zeppelin/contracts/ownership/Whitelist.sol": {"keccak256": "0x0b451cac6e2d6be139bd652fcaf0d31f4abd34fadd1d078db7089eb1f5519267", "urls": ["bzzr://42126e694194a0e1b616a90422905d50a1a19242110e33abecfe2bcb820b4beb"]}, "zeppelin/contracts/token/ERC20/BasicToken.sol": {"keccak256": "0x948404468d61ff35ea4194650670408dabd65da7f905a1c16888ab84520bf39e", "urls": ["bzzr://ea75e20f95d7e4e10394fe6bfaa8eee56b4757c2a6f1e8df4180d33afa621935"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}, "zeppelin/contracts/token/ERC20/StandardToken.sol": {"keccak256": "0xd2b344a5259e19ec143074cfa65637a10c40b68395c59808c4af13bccbb2de55", "urls": ["bzzr://d61a01175a7ca1ba9f4403de603c20b897e33ec425aef2d9f8a7f9ddfdfaf5b2"]}}, "version": 1}, "name": "VotingContract", "ordered_full_dependencies": [], "source_path": "contracts/security-token/tests/VotingContract.sol", "source": "\n\n\ncontract BogusAnnouncement {\n bytes32 public announcementName;\n bytes32 public announcementURI;\n uint256 public announcementType;\n uint256 public announcementHash;\n\n function BogusAnnouncement(bytes32 _announcementName, bytes32 _announcementURI, uint256 _announcementType, uint256 _announcementHash) public {\n announcementName = _announcementName;\n announcementURI = _announcementURI;\n announcementType = _announcementType;\n announcementHash = _announcementHash;\n }\n}\n\n\ninterface KYCInterface {\n event Whitelisted(address who, uint128 nonce);\n\n function isWhitelisted(address who) external view returns(bool);\n}\n\n/**\n * This smart contract code is Copyright 2018 TokenMarket Ltd. For more information see https://tokenmarket.net\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n * NatSpec is used intentionally to cover also other than public functions\n * Solidity 0.4.18 is intentionally used: it's stable, and our framework is\n * based on that.\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n assert(c / a == b);\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n\n\n\n/**\n * @title Basic token\n * @dev Basic version of StandardToken, with no allowances.\n */\ncontract BasicToken is ERC20Basic {\n using SafeMath for uint256;\n\n mapping(address => uint256) balances;\n\n uint256 totalSupply_;\n\n /**\n * @dev total number of tokens in existence\n */\n function totalSupply() public view returns (uint256) {\n return totalSupply_;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param _to The address to transfer to.\n * @param _value The amount to be transferred.\n */\n function transfer(address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[msg.sender]);\n\n // SafeMath.sub will throw if there is not enough balance.\n balances[msg.sender] = balances[msg.sender].sub(_value);\n balances[_to] = balances[_to].add(_value);\n Transfer(msg.sender, _to, _value);\n return true;\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param _owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address _owner) public view returns (uint256 balance) {\n return balances[_owner];\n }\n\n}\n\n\n\n\n/**\n * @title Standard ERC20 token\n *\n * @dev Implementation of the basic standard token.\n * @dev https://github.com/ethereum/EIPs/issues/20\n * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol\n */\ncontract StandardToken is ERC20, BasicToken {\n\n mapping (address => mapping (address => uint256)) internal allowed;\n\n\n /**\n * @dev Transfer tokens from one address to another\n * @param _from address The address which you want to send tokens from\n * @param _to address The address which you want to transfer to\n * @param _value uint256 the amount of tokens to be transferred\n */\n function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[_from]);\n require(_value <= allowed[_from][msg.sender]);\n\n balances[_from] = balances[_from].sub(_value);\n balances[_to] = balances[_to].add(_value);\n allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);\n Transfer(_from, _to, _value);\n return true;\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n *\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param _spender The address which will spend the funds.\n * @param _value The amount of tokens to be spent.\n */\n function approve(address _spender, uint256 _value) public returns (bool) {\n allowed[msg.sender][_spender] = _value;\n Approval(msg.sender, _spender, _value);\n return true;\n }\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param _owner address The address which owns the funds.\n * @param _spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address _owner, address _spender) public view returns (uint256) {\n return allowed[_owner][_spender];\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(address _spender, uint _addedValue) public returns (bool) {\n allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {\n uint oldValue = allowed[msg.sender][_spender];\n if (_subtractedValue > oldValue) {\n allowed[msg.sender][_spender] = 0;\n } else {\n allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);\n }\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n\ncontract Recoverable is Ownable {\n\n /// @dev Empty constructor (for now)\n function Recoverable() {\n }\n\n /// @dev This will be invoked by the owner, when owner wants to rescue tokens\n /// @param token Token which will we rescue to the owner from the contract\n function recoverTokens(ERC20Basic token) onlyOwner public {\n token.transfer(owner, tokensToBeReturned(token));\n }\n\n /// @dev Interface function, can be overwritten by the superclass\n /// @param token Token which balance we will check and return\n /// @return The amount of tokens (in smallest denominator) the contract owns\n function tokensToBeReturned(ERC20Basic token) public returns (uint) {\n return token.balanceOf(this);\n }\n}\n\n\n\n/**\n * Standard EIP-20 token with an interface marker.\n *\n * @notice Interface marker is used by crowdsale contracts to validate that addresses point a good token contract.\n *\n */\ncontract StandardTokenExt is StandardToken, Recoverable {\n\n /* Interface declaration */\n function isToken() public constant returns (bool weAre) {\n return true;\n }\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Upgrade agent interface inspired by Lunyr.\n *\n * Upgrade agent transfers tokens to a new contract.\n * Upgrade agent itself can be the token contract, or just a middle man contract doing the heavy lifting.\n */\ncontract UpgradeAgent {\n\n uint public originalSupply;\n\n /** Interface marker */\n function isUpgradeAgent() public constant returns (bool) {\n return true;\n }\n\n function upgradeFrom(address _from, uint256 _value) public;\n\n}\n\n\n/**\n * A token upgrade mechanism where users can opt-in amount of tokens to the next smart contract revision.\n *\n * First envisioned by Golem and Lunyr projects.\n */\ncontract UpgradeableToken is StandardTokenExt {\n\n /** Contract / person who can set the upgrade path. This can be the same as team multisig wallet, as what it is with its default value. */\n address public upgradeMaster;\n\n /** The next contract where the tokens will be migrated. */\n UpgradeAgent public upgradeAgent;\n\n /** How many tokens we have upgraded by now. */\n uint256 public totalUpgraded;\n\n /**\n * Upgrade states.\n *\n * - NotAllowed: The child contract has not reached a condition where the upgrade can bgun\n * - WaitingForAgent: Token allows upgrade, but we don't have a new agent yet\n * - ReadyToUpgrade: The agent is set, but not a single token has been upgraded yet\n * - Upgrading: Upgrade agent is set and the balance holders can upgrade their tokens\n *\n */\n enum UpgradeState {Unknown, NotAllowed, WaitingForAgent, ReadyToUpgrade, Upgrading}\n\n /**\n * Somebody has upgraded some of his tokens.\n */\n event Upgrade(address indexed _from, address indexed _to, uint256 _value);\n\n /**\n * New upgrade agent available.\n */\n event UpgradeAgentSet(address agent);\n\n /**\n * Do not allow construction without upgrade master set.\n */\n function UpgradeableToken(address _upgradeMaster) {\n upgradeMaster = _upgradeMaster;\n }\n\n /**\n * Allow the token holder to upgrade some of their tokens to a new contract.\n */\n function upgrade(uint256 value) public {\n\n UpgradeState state = getUpgradeState();\n if(!(state == UpgradeState.ReadyToUpgrade || state == UpgradeState.Upgrading)) {\n // Called in a bad state\n throw;\n }\n\n // Validate input value.\n if (value == 0) throw;\n\n balances[msg.sender] = balances[msg.sender].sub(value);\n\n // Take tokens out from circulation\n totalSupply_ = totalSupply_.sub(value);\n totalUpgraded = totalUpgraded.add(value);\n\n // Upgrade agent reissues the tokens\n upgradeAgent.upgradeFrom(msg.sender, value);\n Upgrade(msg.sender, upgradeAgent, value);\n }\n\n /**\n * Set an upgrade agent that handles\n */\n function setUpgradeAgent(address agent) external {\n\n if(!canUpgrade()) {\n // The token is not yet in a state that we could think upgrading\n throw;\n }\n\n if (agent == 0x0) throw;\n // Only a master can designate the next agent\n if (msg.sender != upgradeMaster) throw;\n // Upgrade has already begun for an agent\n if (getUpgradeState() == UpgradeState.Upgrading) throw;\n\n upgradeAgent = UpgradeAgent(agent);\n\n // Bad interface\n if(!upgradeAgent.isUpgradeAgent()) throw;\n // Make sure that token supplies match in source and target\n if (upgradeAgent.originalSupply() != totalSupply_) throw;\n\n UpgradeAgentSet(upgradeAgent);\n }\n\n /**\n * Get the state of the token upgrade.\n */\n function getUpgradeState() public constant returns(UpgradeState) {\n if(!canUpgrade()) return UpgradeState.NotAllowed;\n else if(address(upgradeAgent) == 0x00) return UpgradeState.WaitingForAgent;\n else if(totalUpgraded == 0) return UpgradeState.ReadyToUpgrade;\n else return UpgradeState.Upgrading;\n }\n\n /**\n * Change the upgrade master.\n *\n * This allows us to set a new owner for the upgrade mechanism.\n */\n function setUpgradeMaster(address master) public {\n if (master == 0x0) throw;\n if (msg.sender != upgradeMaster) throw;\n upgradeMaster = master;\n }\n\n /**\n * Child contract can enable to provide the condition when the upgrade can begun.\n */\n function canUpgrade() public constant returns(bool) {\n return true;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n/**\n * Define interface for releasing the token transfer after a successful crowdsale.\n */\ncontract ReleasableToken is StandardTokenExt {\n\n /* The finalizer contract that allows unlift the transfer limits on this token */\n address public releaseAgent;\n\n /** A crowdsale contract can release us to the wild if ICO success. If false we are are in transfer lock up period.*/\n bool public released = false;\n\n /** Map of agents that are allowed to transfer tokens regardless of the lock down period. These are crowdsale contracts and possible the team multisig itself. */\n mapping (address => bool) public transferAgents;\n\n /**\n * Limit token transfer until the crowdsale is over.\n *\n */\n modifier canTransfer(address _sender) {\n\n if(!released) {\n if(!transferAgents[_sender]) {\n throw;\n }\n }\n\n _;\n }\n\n /**\n * Set the contract that can call release and make the token transferable.\n *\n * Design choice. Allow reset the release agent to fix fat finger mistakes.\n */\n function setReleaseAgent(address addr) onlyOwner inReleaseState(false) public {\n\n // We don't do interface check here as we might want to a normal wallet address to act as a release agent\n releaseAgent = addr;\n }\n\n /**\n * Owner can allow a particular address (a crowdsale contract) to transfer tokens despite the lock up period.\n */\n function setTransferAgent(address addr, bool state) onlyOwner inReleaseState(false) public {\n transferAgents[addr] = state;\n }\n\n /**\n * One way function to release the tokens to the wild.\n *\n * Can be called only from the release agent that is the final ICO contract. It is only called if the crowdsale has been success (first milestone reached).\n */\n function releaseTokenTransfer() public onlyReleaseAgent {\n released = true;\n }\n\n /** The function can be called only before or after the tokens have been releasesd */\n modifier inReleaseState(bool releaseState) {\n if(releaseState != released) {\n throw;\n }\n _;\n }\n\n /** The function can be called only by a whitelisted release agent. */\n modifier onlyReleaseAgent() {\n if(msg.sender != releaseAgent) {\n throw;\n }\n _;\n }\n\n function transfer(address _to, uint _value) canTransfer(msg.sender) returns (bool success) {\n // Call StandardToken.transfer()\n return super.transfer(_to, _value);\n }\n\n function transferFrom(address _from, address _to, uint _value) canTransfer(_from) returns (bool success) {\n // Call StandardToken.transferForm()\n return super.transferFrom(_from, _to, _value);\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Safe unsigned safe math.\n *\n * https://blog.aragon.one/library-driven-development-in-solidity-2bebcaf88736#.750gwtwli\n *\n * Originally from https://raw.githubusercontent.com/AragonOne/zeppelin-solidity/master/contracts/SafeMathLib.sol\n *\n * Maintained here until merged to mainline zeppelin-solidity.\n *\n */\nlibrary SafeMathLib {\n\n function times(uint a, uint b) returns (uint) {\n uint c = a * b;\n assert(a == 0 || c / a == b);\n return c;\n }\n\n function minus(uint a, uint b) returns (uint) {\n assert(b <= a);\n return a - b;\n }\n\n function plus(uint a, uint b) returns (uint) {\n uint c = a + b;\n assert(c>=a);\n return c;\n }\n\n}\n\n\n\n/**\n * A token that can increase its supply by another contract.\n *\n * This allows uncapped crowdsale by dynamically increasing the supply when money pours in.\n * Only mint agents, contracts whitelisted by owner, can mint new tokens.\n *\n */\ncontract MintableToken is StandardTokenExt {\n\n using SafeMathLib for uint;\n\n bool public mintingFinished = false;\n\n /** List of agents that are allowed to create new tokens */\n mapping (address => bool) public mintAgents;\n\n event MintingAgentChanged(address addr, bool state);\n event Minted(address receiver, uint amount);\n\n /**\n * Create new tokens and allocate them to an address..\n *\n * Only callably by a crowdsale contract (mint agent).\n */\n function mint(address receiver, uint amount) onlyMintAgent canMint public {\n totalSupply_ = totalSupply_.plus(amount);\n balances[receiver] = balances[receiver].plus(amount);\n\n // This will make the mint transaction apper in EtherScan.io\n // We can remove this after there is a standardized minting event\n Transfer(0, receiver, amount);\n }\n\n /**\n * Owner can allow a crowdsale contract to mint new tokens.\n */\n function setMintAgent(address addr, bool state) onlyOwner canMint public {\n mintAgents[addr] = state;\n MintingAgentChanged(addr, state);\n }\n\n modifier onlyMintAgent() {\n // Only crowdsale contracts are allowed to mint new tokens\n if(!mintAgents[msg.sender]) {\n throw;\n }\n _;\n }\n\n /** Make sure we are not done yet. */\n modifier canMint() {\n if(mintingFinished) throw;\n _;\n }\n}\n\n\n\n/**\n * A crowdsaled token.\n *\n * An ERC-20 token designed specifically for crowdsales with investor protection and further development path.\n *\n * - The token transfer() is disabled until the crowdsale is over\n * - The token contract gives an opt-in upgrade path to a new contract\n * - The same token can be part of several crowdsales through approve() mechanism\n * - The token can be capped (supply set in the constructor) or uncapped (crowdsale contract can mint new tokens)\n *\n */\ncontract CrowdsaleToken is ReleasableToken, MintableToken, UpgradeableToken {\n\n /** Name and symbol were updated. */\n event UpdatedTokenInformation(string newName, string newSymbol);\n\n string public name;\n\n string public symbol;\n\n uint public decimals;\n\n /**\n * Construct the token.\n *\n * This token must be created through a team multisig wallet, so that it is owned by that wallet.\n *\n * @param _name Token name\n * @param _symbol Token symbol - should be all caps\n * @param _initialSupply How many tokens we start with\n * @param _decimals Number of decimal places\n * @param _mintable Are new tokens created over the crowdsale or do we distribute only the initial supply? Note that when the token becomes transferable the minting always ends.\n */\n function CrowdsaleToken(string _name, string _symbol, uint _initialSupply, uint _decimals, bool _mintable)\n UpgradeableToken(msg.sender) {\n\n // Create any address, can be transferred\n // to team multisig via changeOwner(),\n // also remember to call setUpgradeMaster()\n owner = msg.sender;\n\n name = _name;\n symbol = _symbol;\n\n totalSupply_ = _initialSupply;\n\n decimals = _decimals;\n\n // Create initially all balance on the team multisig\n balances[owner] = totalSupply_;\n\n if(totalSupply_ > 0) {\n Minted(owner, totalSupply_);\n }\n\n // No more new supply allowed after the token creation\n if(!_mintable) {\n mintingFinished = true;\n if(totalSupply_ == 0) {\n throw; // Cannot create a token without supply and no minting\n }\n }\n }\n\n /**\n * When token is released to be transferable, enforce no new tokens can be created.\n */\n function releaseTokenTransfer() public onlyReleaseAgent {\n mintingFinished = true;\n super.releaseTokenTransfer();\n }\n\n /**\n * Allow upgrade agent functionality kick in only if the crowdsale was success.\n */\n function canUpgrade() public constant returns(bool) {\n return released && super.canUpgrade();\n }\n\n /**\n * Owner can update token information here.\n *\n * It is often useful to conceal the actual token association, until\n * the token operations, like central issuance or reissuance have been completed.\n *\n * This function allows the token owner to rename the token after the operations\n * have been completed and then point the audience to use the token contract.\n */\n function setTokenInformation(string _name, string _symbol) onlyOwner {\n name = _name;\n symbol = _symbol;\n\n UpdatedTokenInformation(name, symbol);\n }\n\n}\n\n\ninterface SecurityTransferAgent {\n function verify(address from, address to, uint256 value) public view returns (uint256 newValue);\n}\n\n\n\n\n\n\n\n/**\n * @title Whitelist\n * @dev The Whitelist contract has a whitelist of addresses, and provides basic authorization control functions.\n * @dev This simplifies the implementation of \"user permissions\".\n */\ncontract Whitelist is Ownable {\n mapping(address => bool) public whitelist;\n \n event WhitelistedAddressAdded(address addr);\n event WhitelistedAddressRemoved(address addr);\n\n /**\n * @dev Throws if called by any account that's not whitelisted.\n */\n modifier onlyWhitelisted() {\n require(whitelist[msg.sender]);\n _;\n }\n\n /**\n * @dev add an address to the whitelist\n * @param addr address\n * @return true if the address was added to the whitelist, false if the address was already in the whitelist \n */\n function addAddressToWhitelist(address addr) onlyOwner public returns(bool success) {\n if (!whitelist[addr]) {\n whitelist[addr] = true;\n WhitelistedAddressAdded(addr);\n success = true; \n }\n }\n\n /**\n * @dev add addresses to the whitelist\n * @param addrs addresses\n * @return true if at least one address was added to the whitelist, \n * false if all addresses were already in the whitelist \n */\n function addAddressesToWhitelist(address[] addrs) onlyOwner public returns(bool success) {\n for (uint256 i = 0; i < addrs.length; i++) {\n if (addAddressToWhitelist(addrs[i])) {\n success = true;\n }\n }\n }\n\n /**\n * @dev remove an address from the whitelist\n * @param addr address\n * @return true if the address was removed from the whitelist, \n * false if the address wasn't in the whitelist in the first place \n */\n function removeAddressFromWhitelist(address addr) onlyOwner public returns(bool success) {\n if (whitelist[addr]) {\n whitelist[addr] = false;\n WhitelistedAddressRemoved(addr);\n success = true;\n }\n }\n\n /**\n * @dev remove addresses from the whitelist\n * @param addrs addresses\n * @return true if at least one address was removed from the whitelist, \n * false if all addresses weren't in the whitelist in the first place\n */\n function removeAddressesFromWhitelist(address[] addrs) onlyOwner public returns(bool success) {\n for (uint256 i = 0; i < addrs.length; i++) {\n if (removeAddressFromWhitelist(addrs[i])) {\n success = true;\n }\n }\n }\n\n}\n\n\n\n\n\ninterface ERC677Receiver {\n function tokenFallback(address from, uint256 amount, bytes data) returns (bool success);\n}\n\ninterface ERC677 {\n\n // TODO: Have a different event name to make sure that tools with bad APIs do not mix this with ERC-20 Transfer() event that lacks data parameter\n event ERC677Transfer(address from, address receiver, uint256 amount, bytes data);\n\n function transferAndCall(ERC677Receiver receiver, uint amount, bytes data) returns (bool success);\n}\n\n\n\ncontract ERC677Token is ERC20, ERC677 {\n function transferAndCall(ERC677Receiver receiver, uint amount, bytes data) returns (bool success) {\n require(transfer(address(receiver), amount));\n\n ERC677Transfer(msg.sender, address(receiver), amount, data);\n\n require(receiver.tokenFallback(msg.sender, amount, data));\n }\n}\n\n\n/**\n * @author TokenMarket / Ville Sundell \n */\ncontract CheckpointToken is ERC677Token {\n using SafeMath for uint256; // We use only uint256 for safety reasons (no boxing)\n\n /// @dev Name of the token, usually the company and/or series (like \"TokenMeerkat Ltd. Series A\"):\n string public name;\n /// @dev Ticker symbol, usually bases on the \"name\" above (like \"MEER\"):\n string public symbol;\n /// @dev Decimals are usually set to 18 for EIP-20 tokens:\n uint256 public decimals;\n /// @dev If transferVerifier is set, that contract will be queried upon every token transaction:\n SecurityTransferAgent public transferVerifier;\n\n /// @dev Checkpoint is the fundamental unit for our internal accounting\n /// (who owns what, and at what moment in time)\n struct Checkpoint {\n uint256 blockNumber;\n uint256 value;\n }\n /// @dev This mapping contains checkpoints for every address:\n mapping (address => Checkpoint[]) public tokenBalances;\n /// @dev This is a one dimensional Checkpoint mapping of the overall token supply:\n Checkpoint[] public tokensTotal;\n\n /// @dev This mapping keeps account for approve() -> fransferFrom() pattern:\n mapping (address => mapping (address => uint256)) public allowed;\n\n /**\n * @dev Constructor for CheckpointToken, initializing the token\n *\n * Here we define initial values for name, symbol and decimals.\n *\n * @param _name Initial name of the token\n * @param _symbol Initial symbol of the token\n * @param _decimals Number of decimals for the token, industry standard is 18\n */\n function CheckpointToken(string _name, string _symbol, uint256 _decimals) public {\n name = _name;\n symbol = _symbol;\n decimals = _decimals;\n }\n\n /** PUBLIC FUNCTIONS\n ****************************************/\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param owner address The address which owns the funds.\n * @param spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address owner, address spender) public view returns (uint256) {\n return allowed[owner][spender];\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n *\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param spender The address which will spend the funds.\n * @param value The amount of tokens to be spent.\n * @return true if the call function was executed successfully\n */\n function approve(address spender, uint256 value) public returns (bool) {\n allowed[msg.sender][spender] = value;\n Approval(msg.sender, spender, value);\n return true;\n }\n\n /**\n * @dev Transfer tokens from one address to another\n * @param from address The address which you want to send tokens from\n * @param to address The address which you want to transfer to\n * @param value uint256 the amount of tokens to be transferred\n * @return true if the call function was executed successfully\n */\n function transferFrom(address from, address to, uint256 value) public returns (bool) {\n require(value <= allowed[from][msg.sender]);\n\n transferInternal(from, to, value);\n Transfer(from, to, value);\n return true;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param to The address to transfer to.\n * @param value The amount to be transferred.\n * @return true if the call function was executed successfully\n */\n function transfer(address to, uint256 value) public returns (bool) {\n transferInternal(msg.sender, to, value);\n Transfer(msg.sender, to, value);\n return true;\n }\n\n /**\n * @dev total number of tokens in existence\n * @return A uint256 specifying the total number of tokens in existence\n */\n function totalSupply() public view returns (uint256 tokenCount) {\n tokenCount = balanceAtBlock(tokensTotal, block.number);\n }\n\n /**\n * @dev total number of tokens in existence at the given block\n * @param blockNumber The block number we want to query for the total supply\n * @return A uint256 specifying the total number of tokens at a given block\n */\n function totalSupplyAt(uint256 blockNumber) public view returns (uint256 tokenCount) {\n tokenCount = balanceAtBlock(tokensTotal, blockNumber);\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address owner) public view returns (uint256 balance) {\n balance = balanceAtBlock(tokenBalances[owner], block.number);\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param owner The address to query the the balance of.\n * @param blockNumber The block number we want to query for the balance.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceAt(address owner, uint256 blockNumber) public view returns (uint256 balance) {\n balance = balanceAtBlock(tokenBalances[owner], blockNumber);\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param spender The address which will spend the funds.\n * @param addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(address spender, uint addedValue) public returns (bool) {\n allowed[msg.sender][spender] = allowed[msg.sender][spender].add(addedValue);\n Approval(msg.sender, spender, allowed[msg.sender][spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param spender The address which will spend the funds.\n * @param subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(address spender, uint subtractedValue) public returns (bool) {\n uint oldValue = allowed[msg.sender][spender];\n if (subtractedValue > oldValue) {\n allowed[msg.sender][spender] = 0;\n } else {\n allowed[msg.sender][spender] = oldValue.sub(subtractedValue);\n }\n Approval(msg.sender, spender, allowed[msg.sender][spender]);\n return true;\n }\n\n /**\n * @dev Addition to StandardToken methods. Increase the amount of tokens that\n * an owner allowed to a spender and execute a call with the sent data.\n *\n * This is originally from OpenZeppelin.\n *\n * approve should be called when allowed[spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param spender The address which will spend the funds.\n * @param addedValue The amount of tokens to increase the allowance by.\n * @param data ABI-encoded contract call to call `spender` address.\n */\n function increaseApproval(address spender, uint addedValue, bytes data) public returns (bool) {\n require(spender != address(this));\n\n increaseApproval(spender, addedValue);\n\n require(spender.call(data));\n\n return true;\n }\n\n /**\n * @dev Addition to StandardToken methods. Decrease the amount of tokens that\n * an owner allowed to a spender and execute a call with the sent data.\n *\n * This is originally from OpenZeppelin.\n *\n * approve should be called when allowed[spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param spender The address which will spend the funds.\n * @param subtractedValue The amount of tokens to decrease the allowance by.\n * @param data ABI-encoded contract call to call `spender` address.\n */\n function decreaseApproval(address spender, uint subtractedValue, bytes data) public returns (bool) {\n require(spender != address(this));\n\n decreaseApproval(spender, subtractedValue);\n\n require(spender.call(data));\n\n return true;\n }\n\n /** INTERNALS\n ****************************************/\n\n function balanceAtBlock(Checkpoint[] storage checkpoints, uint256 blockNumber) internal returns (uint256 balance) {\n uint256 currentBlockNumber;\n (currentBlockNumber, balance) = getCheckpoint(checkpoints, blockNumber);\n }\n\n function transferInternal(address from, address to, uint256 value) internal {\n uint256 fromBalance = balanceOf(from);\n uint256 toBalance = balanceOf(to);\n\n if (address(transferVerifier) != address(0)) {\n value = transferVerifier.verify(from, to, value);\n require(value > 0);\n }\n\n setCheckpoint(tokenBalances[from], fromBalance.sub(value));\n setCheckpoint(tokenBalances[to], toBalance.add(value));\n }\n\n\n /** CORE\n ** The Magic happens below:\n ***************************************/\n\n function setCheckpoint(Checkpoint[] storage checkpoints, uint256 newValue) internal {\n if ((checkpoints.length == 0) || (checkpoints[checkpoints.length.sub(1)].blockNumber < block.number)) {\n checkpoints.push(Checkpoint(block.number, newValue));\n } else {\n checkpoints[checkpoints.length.sub(1)] = Checkpoint(block.number, newValue);\n }\n }\n\n function getCheckpoint(Checkpoint[] storage checkpoints, uint256 blockNumber) internal returns (uint256 blockNumber_, uint256 value) {\n if (checkpoints.length == 0) {\n return (0, 0);\n }\n\n // Shortcut for the actual value\n if (blockNumber >= checkpoints[checkpoints.length.sub(1)].blockNumber) {\n return (checkpoints[checkpoints.length.sub(1)].blockNumber, checkpoints[checkpoints.length.sub(1)].value);\n }\n\n if (blockNumber < checkpoints[0].blockNumber) {\n return (0, 0);\n }\n\n // Binary search of the value in the array\n uint256 min = 0;\n uint256 max = checkpoints.length.sub(1);\n while (max > min) {\n uint256 mid = (max.add(min.add(1))).div(2);\n if (checkpoints[mid].blockNumber <= blockNumber) {\n min = mid;\n } else {\n max = mid.sub(1);\n }\n }\n\n return (checkpoints[min].blockNumber, checkpoints[min].value);\n }\n}\n\n\n\n\n/* Largely copied from https://github.com/OpenZeppelin/openzeppelin-solidity/pull/741/files */\n\ncontract ERC865 is CheckpointToken {\n /** @dev This is used to prevent nonce reuse: */\n mapping(bytes => bool) signatures;\n\n event TransferPreSigned(address indexed from, address indexed to, address indexed delegate, uint256 amount, uint256 fee);\n event Debug(address from, bytes32 hash);\n\n /**\n * @notice Submit a presigned transfer\n * @param _signature bytes The signature, issued by the owner.\n * @param _to address The address which you want to transfer to.\n * @param _value uint256 The amount of tokens to be transferred.\n * @param _fee uint256 The amount of tokens paid to msg.sender, by the person who used to own the tokens.\n * @param _nonce uint256 Presigned transaction number\n */\n function transferPreSigned(\n bytes _signature,\n address _to,\n uint256 _value,\n uint256 _fee,\n uint256 _nonce\n )\n public\n returns (bool)\n {\n require(_to != address(0));\n require(signatures[_signature] == false);\n bytes32 hashedTx = transferPreSignedHashing(address(this), _to, _value, _fee, _nonce);\n address from = recover(hashedTx, _signature);\n require(from != address(0));\n\n transferInternal(from, _to, _value);\n transferInternal(from, msg.sender, _fee);\n\n signatures[_signature] = true;\n TransferPreSigned(from, _to, msg.sender, _value, _fee);\n Transfer(from, _to, _value);\n Transfer(from, msg.sender, _fee);\n return true;\n }\n\n /**\n * @notice Hash (keccak256) of the payload used by transferPreSigned\n * @param _token address The address of the token.\n * @param _to address The address which you want to transfer to.\n * @param _value uint256 The amount of tokens to be transferred.\n * @param _fee uint256 The amount of tokens paid to msg.sender, by the owner.\n * @param _nonce uint256 Presigned transaction number.\n */\n function transferPreSignedHashing(\n address _token,\n address _to,\n uint256 _value,\n uint256 _fee,\n uint256 _nonce\n )\n public\n pure\n returns (bytes32)\n {\n /* \"48664c16\": transferPreSignedHashing(address,address,address,uint256,uint256,uint256) */\n return keccak256(bytes4(0x48664c16), _token, _to, _value, _fee, _nonce);\n }\n\n /**\n * @notice Recover signer address from a message by using his signature.\n * Signature is delivered as a byte array, hence need for this\n * implementation.\n * @param hash bytes32 message, the hash is the signed message. What is recovered is the signer address.\n * @param sig bytes signature, the signature is generated using web3.eth.sign()\n */\n function recover(bytes32 hash, bytes sig) public pure returns (address) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n\n /* Check the signature length */\n if (sig.length != 65) {\n return (address(0));\n }\n\n /* Divide the signature in r, s and v variables */\n assembly {\n r := mload(add(sig, 32))\n s := mload(add(sig, 64))\n v := byte(0, mload(add(sig, 96)))\n }\n\n /* Version of signature should be 27 or 28, but 0 and 1 are also possible versions */\n if (v < 27) {\n v += 27;\n }\n\n /* If the version is correct return the signer address */\n if (v != 27 && v != 28) {\n return (address(0));\n } else {\n return ecrecover(hash, v, r, s);\n }\n }\n\n}\n\n\n\ncontract InvestorInteractionContract is BogusAnnouncement, CheckpointToken, ERC865 {\n uint256 public blockNumber;\n CheckpointToken public token;\n mapping(address => bool) public balanceImported;\n\n KYCInterface public KYC;\n\n mapping(address => bytes32) public options;\n mapping(address => mapping(address => uint256)) public used;\n uint256 public optionsTotal;\n uint256 public maximumSupply;\n\n event OptionAdded(address option, bytes32 description);\n event IICCreated(address token, address KYC, uint256 blockNumber, uint256 maximumSupply);\n\n function InvestorInteractionContract(CheckpointToken _token, KYCInterface _KYC, bytes32 name, bytes32 URI, uint256 _type, uint256 _hash, uint256 _blockNumber, bytes32[] _options) CheckpointToken(\"\", \"\", 18) BogusAnnouncement(name, URI, _type, _hash) public {\n token = _token;\n if (_blockNumber > 0) {\n blockNumber = _blockNumber;\n } else {\n blockNumber = block.number;\n }\n KYC = _KYC;\n\n for(uint i=0; i<_options.length; i++) {\n address optionAddress = address(100 + i);\n options[optionAddress] = _options[i];\n\n OptionAdded(optionAddress, _options[i]);\n }\n\n maximumSupply = token.totalSupplyAt(blockNumber);\n\n IICCreated(_token, _KYC, _blockNumber, maximumSupply);\n }\n\n function importInvestor(address investor) public {\n // Anyone can invoke this for failsafe reasons\n\n require(balanceImported[investor] == false);\n\n uint256 value = token.balanceAt(investor, blockNumber);\n uint256 blackHoleBalance = balanceOf(address(0));\n uint256 totalSupplyNow = totalSupply();\n\n setCheckpoint(tokenBalances[address(0)], blackHoleBalance.add(value));\n transferInternal(address(0), investor, value);\n setCheckpoint(tokensTotal, totalSupplyNow.add(value));\n\n balanceImported[investor] = true;\n Transfer(address(0), investor, value);\n }\n\n function transferTrigger(address from, address to, uint256 amount) internal {\n used[to][from] += amount;\n }\n\n function transfer(address _to, uint256 _value) public returns (bool) {\n if (balanceImported[msg.sender] == false) {\n importInvestor(msg.sender);\n }\n\n if (options[_to] != 0) {\n require(KYC.isWhitelisted(msg.sender));\n transferTrigger(msg.sender, _to, _value);\n }\n\n // Doing this as msg.sender:\n return super.transfer(_to, _value);\n }\n\n function transferInvestorTokens(address to, uint256 amount) {\n transfer(to, amount);\n }\n\n function act(uint256 amount) external {\n // This is for the default action, address 100\n transferInvestorTokens(address(100), amount);\n }\n}\n\n\n\ncontract VotingContract is InvestorInteractionContract {\n\n function VotingContract(CheckpointToken _token, KYCInterface _KYC, bytes32 name, bytes32 URI, uint256 _type, uint256 _hash, bytes32[] _options) InvestorInteractionContract(_token, _KYC, name, URI, _type, _hash, 0, _options) {\n\n }\n}\n"}, "Whitelist": {"abi": [{"constant": false, "inputs": [{"name": "addrs", "type": "address[]"}], "name": "removeAddressesFromWhitelist", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "removeAddressFromWhitelist", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "addAddressToWhitelist", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "whitelist", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addrs", "type": "address[]"}], "name": "addAddressesToWhitelist", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "addr", "type": "address"}], "name": "WhitelistedAddressAdded", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "addr", "type": "address"}], "name": "WhitelistedAddressRemoved", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "bytecode": "0x608060405260008054600160a060020a031916331790556104ca806100256000396000f3006080604052600436106100825763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166324953eaa8114610087578063286dd3f5146100f05780637b9417c8146101115780638da5cb5b146101325780639b19251a14610163578063e2ec6ec314610184578063f2fde38b146101d9575b600080fd5b34801561009357600080fd5b50604080516020600480358082013583810280860185019096528085526100dc953695939460249493850192918291850190849080828437509497506101fc9650505050505050565b604080519115158252519081900360200190f35b3480156100fc57600080fd5b506100dc600160a060020a036004351661025b565b34801561011d57600080fd5b506100dc600160a060020a03600435166102f2565b34801561013e57600080fd5b5061014761038d565b60408051600160a060020a039092168252519081900360200190f35b34801561016f57600080fd5b506100dc600160a060020a036004351661039c565b34801561019057600080fd5b50604080516020600480358082013583810280860185019096528085526100dc953695939460249493850192918291850190849080828437509497506103b19650505050505050565b3480156101e557600080fd5b506101fa600160a060020a036004351661040a565b005b600080548190600160a060020a0316331461021657600080fd5b5060005b825181101561025557610243838281518110151561023457fe5b9060200190602002015161025b565b1561024d57600191505b60010161021a565b50919050565b60008054600160a060020a0316331461027357600080fd5b600160a060020a03821660009081526001602052604090205460ff16156102ed57600160a060020a038216600081815260016020908152604091829020805460ff19169055815192835290517ff1abf01a1043b7c244d128e8595cf0c1d10743b022b03a02dffd8ca3bf729f5a9281900390910190a15060015b919050565b60008054600160a060020a0316331461030a57600080fd5b600160a060020a03821660009081526001602052604090205460ff1615156102ed57600160a060020a038216600081815260016020818152604092839020805460ff1916909217909155815192835290517fd1bba68c128cc3f427e5831b3c6f99f480b6efa6b9e80c757768f6124158cc3f9281900390910190a1506001919050565b600054600160a060020a031681565b60016020526000908152604090205460ff1681565b600080548190600160a060020a031633146103cb57600080fd5b5060005b8251811015610255576103f883828151811015156103e957fe5b906020019060200201516102f2565b1561040257600191505b6001016103cf565b600054600160a060020a0316331461042157600080fd5b600160a060020a038116151561043657600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790555600a165627a7a72305820a9a9496083c85db3faa6f92dac97f547dc0594ec5c850dce25e13946f5be2c450029", "bytecode_runtime": "0x6080604052600436106100825763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166324953eaa8114610087578063286dd3f5146100f05780637b9417c8146101115780638da5cb5b146101325780639b19251a14610163578063e2ec6ec314610184578063f2fde38b146101d9575b600080fd5b34801561009357600080fd5b50604080516020600480358082013583810280860185019096528085526100dc953695939460249493850192918291850190849080828437509497506101fc9650505050505050565b604080519115158252519081900360200190f35b3480156100fc57600080fd5b506100dc600160a060020a036004351661025b565b34801561011d57600080fd5b506100dc600160a060020a03600435166102f2565b34801561013e57600080fd5b5061014761038d565b60408051600160a060020a039092168252519081900360200190f35b34801561016f57600080fd5b506100dc600160a060020a036004351661039c565b34801561019057600080fd5b50604080516020600480358082013583810280860185019096528085526100dc953695939460249493850192918291850190849080828437509497506103b19650505050505050565b3480156101e557600080fd5b506101fa600160a060020a036004351661040a565b005b600080548190600160a060020a0316331461021657600080fd5b5060005b825181101561025557610243838281518110151561023457fe5b9060200190602002015161025b565b1561024d57600191505b60010161021a565b50919050565b60008054600160a060020a0316331461027357600080fd5b600160a060020a03821660009081526001602052604090205460ff16156102ed57600160a060020a038216600081815260016020908152604091829020805460ff19169055815192835290517ff1abf01a1043b7c244d128e8595cf0c1d10743b022b03a02dffd8ca3bf729f5a9281900390910190a15060015b919050565b60008054600160a060020a0316331461030a57600080fd5b600160a060020a03821660009081526001602052604090205460ff1615156102ed57600160a060020a038216600081815260016020818152604092839020805460ff1916909217909155815192835290517fd1bba68c128cc3f427e5831b3c6f99f480b6efa6b9e80c757768f6124158cc3f9281900390910190a1506001919050565b600054600160a060020a031681565b60016020526000908152604090205460ff1681565b600080548190600160a060020a031633146103cb57600080fd5b5060005b8251811015610255576103f883828151811015156103e957fe5b906020019060200201516102f2565b1561040257600191505b6001016103cf565b600054600160a060020a0316331461042157600080fd5b600160a060020a038116151561043657600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790555600a165627a7a72305820a9a9496083c85db3faa6f92dac97f547dc0594ec5c850dce25e13946f5be2c450029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": false, "inputs": [{"name": "addrs", "type": "address[]"}], "name": "removeAddressesFromWhitelist", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "removeAddressFromWhitelist", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "addAddressToWhitelist", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "whitelist", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addrs", "type": "address[]"}], "name": "addAddressesToWhitelist", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "addr", "type": "address"}], "name": "WhitelistedAddressAdded", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "addr", "type": "address"}], "name": "WhitelistedAddressRemoved", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "devdoc": {"methods": {"addAddressToWhitelist(address)": {"details": "add an address to the whitelist", "params": {"addr": "address"}, "return": "true if the address was added to the whitelist, false if the address was already in the whitelist "}, "addAddressesToWhitelist(address[])": {"details": "add addresses to the whitelist", "params": {"addrs": "addresses"}, "return": "true if at least one address was added to the whitelist, false if all addresses were already in the whitelist "}, "removeAddressFromWhitelist(address)": {"details": "remove an address from the whitelist", "params": {"addr": "address"}, "return": "true if the address was removed from the whitelist, false if the address wasn't in the whitelist in the first place "}, "removeAddressesFromWhitelist(address[])": {"details": "remove addresses from the whitelist", "params": {"addrs": "addresses"}, "return": "true if at least one address was removed from the whitelist, false if all addresses weren't in the whitelist in the first place"}, "transferOwnership(address)": {"details": "Allows the current owner to transfer control of the contract to a newOwner.", "params": {"newOwner": "The address to transfer ownership to."}}}, "title": "Whitelist"}, "userdoc": {"methods": {}}}, "settings": {"compilationTarget": {"zeppelin/contracts/ownership/Whitelist.sol": "Whitelist"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}, "zeppelin/contracts/ownership/Whitelist.sol": {"keccak256": "0x0b451cac6e2d6be139bd652fcaf0d31f4abd34fadd1d078db7089eb1f5519267", "urls": ["bzzr://42126e694194a0e1b616a90422905d50a1a19242110e33abecfe2bcb820b4beb"]}}, "version": 1}, "name": "Whitelist", "ordered_full_dependencies": [], "source_path": "zeppelin/contracts/ownership/Whitelist.sol", "source": "\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n\n/**\n * @title Whitelist\n * @dev The Whitelist contract has a whitelist of addresses, and provides basic authorization control functions.\n * @dev This simplifies the implementation of \"user permissions\".\n */\ncontract Whitelist is Ownable {\n mapping(address => bool) public whitelist;\n \n event WhitelistedAddressAdded(address addr);\n event WhitelistedAddressRemoved(address addr);\n\n /**\n * @dev Throws if called by any account that's not whitelisted.\n */\n modifier onlyWhitelisted() {\n require(whitelist[msg.sender]);\n _;\n }\n\n /**\n * @dev add an address to the whitelist\n * @param addr address\n * @return true if the address was added to the whitelist, false if the address was already in the whitelist \n */\n function addAddressToWhitelist(address addr) onlyOwner public returns(bool success) {\n if (!whitelist[addr]) {\n whitelist[addr] = true;\n WhitelistedAddressAdded(addr);\n success = true; \n }\n }\n\n /**\n * @dev add addresses to the whitelist\n * @param addrs addresses\n * @return true if at least one address was added to the whitelist, \n * false if all addresses were already in the whitelist \n */\n function addAddressesToWhitelist(address[] addrs) onlyOwner public returns(bool success) {\n for (uint256 i = 0; i < addrs.length; i++) {\n if (addAddressToWhitelist(addrs[i])) {\n success = true;\n }\n }\n }\n\n /**\n * @dev remove an address from the whitelist\n * @param addr address\n * @return true if the address was removed from the whitelist, \n * false if the address wasn't in the whitelist in the first place \n */\n function removeAddressFromWhitelist(address addr) onlyOwner public returns(bool success) {\n if (whitelist[addr]) {\n whitelist[addr] = false;\n WhitelistedAddressRemoved(addr);\n success = true;\n }\n }\n\n /**\n * @dev remove addresses from the whitelist\n * @param addrs addresses\n * @return true if at least one address was removed from the whitelist, \n * false if all addresses weren't in the whitelist in the first place\n */\n function removeAddressesFromWhitelist(address[] addrs) onlyOwner public returns(bool success) {\n for (uint256 i = 0; i < addrs.length; i++) {\n if (removeAddressFromWhitelist(addrs[i])) {\n success = true;\n }\n }\n }\n\n}\n"}} \ No newline at end of file +{"AMLToken": {"abi": [{"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "state", "type": "bool"}], "name": "setTransferAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "mintingFinished", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "name", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "approve", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "recoverTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_from", "type": "address"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setReleaseAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "decimals", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "receiver", "type": "address"}, {"name": "amount", "type": "uint256"}], "name": "mint", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "burnAmount", "type": "uint256"}], "name": "burn", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "mintAgents", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "state", "type": "bool"}], "name": "setMintAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "uint256"}], "name": "upgrade", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_name", "type": "string"}, {"name": "_symbol", "type": "string"}], "name": "setTokenInformation", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "upgradeAgent", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "releaseTokenTransfer", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "upgradeMaster", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_subtractedValue", "type": "uint256"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "fromWhom", "type": "address"}], "name": "transferToOwner", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "getUpgradeState", "outputs": [{"name": "", "type": "uint8"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "transferAgents", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "symbol", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "released", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "canUpgrade", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "tokensToBeReturned", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalUpgraded", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "releaseAgent", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_addedValue", "type": "uint256"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "agent", "type": "address"}], "name": "setUpgradeAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}, {"name": "_spender", "type": "address"}], "name": "allowance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isToken", "outputs": [{"name": "weAre", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "BURN_ADDRESS", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "master", "type": "address"}], "name": "setUpgradeMaster", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [{"name": "_name", "type": "string"}, {"name": "_symbol", "type": "string"}, {"name": "_initialSupply", "type": "uint256"}, {"name": "_decimals", "type": "uint256"}, {"name": "_mintable", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "fromWhom", "type": "address"}, {"indexed": false, "name": "amount", "type": "uint256"}], "name": "OwnerReclaim", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newName", "type": "string"}, {"indexed": false, "name": "newSymbol", "type": "string"}], "name": "UpdatedTokenInformation", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "_from", "type": "address"}, {"indexed": true, "name": "_to", "type": "address"}, {"indexed": false, "name": "_value", "type": "uint256"}], "name": "Upgrade", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "agent", "type": "address"}], "name": "UpgradeAgentSet", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "addr", "type": "address"}, {"indexed": false, "name": "state", "type": "bool"}], "name": "MintingAgentChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "receiver", "type": "address"}, {"indexed": false, "name": "amount", "type": "uint256"}], "name": "Minted", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "burner", "type": "address"}, {"indexed": false, "name": "burnedAmount", "type": "uint256"}], "name": "Burned", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}, {"indexed": true, "name": "spender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "bytecode": "0x60806040526004805460a060020a60ff02191690556006805460ff191690553480156200002b57600080fd5b5060405162001f1e38038062001f1e83398101604090815281516020808401519284015160608501516080860151600380546008805433600160a060020a0319918216811790925591821681179091161790559386018051909695909501949193909290918691869186918691869186918691869186918691620000b691600b919088019062000182565b508351620000cc90600c90602087019062000182565b506001839055600d829055600354600160a060020a03166000908152602081905260408120849055831115620001485760035460015460408051600160a060020a039093168352602083019190915280517f30385c845b448a36257a6a1716e6ad2e1bc2cbe333cde1e69fe849ad6511adfe9281900390910190a15b8015156200016d576006805460ff191660019081179091555415156200016d57600080fd5b50505050505050505050505050505062000227565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620001c557805160ff1916838001178555620001f5565b82800160010185558215620001f5579182015b82811115620001f5578251825591602001919060010190620001d8565b506200020392915062000207565b5090565b6200022491905b808211156200020357600081556001016200020e565b90565b611ce780620002376000396000f3006080604052600436106101d75763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166302f652a381146101dc57806305d2035b1461020457806306fdde031461022d578063095ea7b3146102b757806316114acd146102db57806318160ddd146102fc57806323b872dd1461032357806329ff4f531461034d578063313ce5671461036e57806340c10f191461038357806342966c68146103a757806342c1867b146103bf57806343214675146103e057806345977d03146104065780634eee966f1461041e5780635de4ccb0146104b55780635f412d4f146104e6578063600440cb146104fb578063661884631461051057806370a0823114610534578063812d504d146105555780638444b39114610576578063867c2857146105af5780638da5cb5b146105d057806395d89b41146105e557806396132521146105fa5780639738968c1461060f578063a9059cbb14610624578063c45d19db14610648578063c752ff6214610669578063d1f276d31461067e578063d73dd62314610693578063d7e7088a146106b7578063dd62ed3e146106d8578063eefa597b146106ff578063f2fde38b14610714578063fccc281314610735578063ffeb7d751461074a575b600080fd5b3480156101e857600080fd5b50610202600160a060020a0360043516602435151561076b565b005b34801561021057600080fd5b506102196107d9565b604080519115158252519081900360200190f35b34801561023957600080fd5b506102426107e2565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561027c578181015183820152602001610264565b50505050905090810190601f1680156102a95780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156102c357600080fd5b50610219600160a060020a0360043516602435610870565b3480156102e757600080fd5b50610202600160a060020a03600435166108d6565b34801561030857600080fd5b506103116109a6565b60408051918252519081900360200190f35b34801561032f57600080fd5b50610219600160a060020a03600435811690602435166044356109ad565b34801561035957600080fd5b50610202600160a060020a0360043516610a11565b34801561037a57600080fd5b50610311610a83565b34801561038f57600080fd5b50610202600160a060020a0360043516602435610a89565b3480156103b357600080fd5b50610202600435610c68565b3480156103cb57600080fd5b50610219600160a060020a0360043516610d40565b3480156103ec57600080fd5b50610202600160a060020a03600435166024351515610d55565b34801561041257600080fd5b50610202600435610de0565b34801561042a57600080fd5b506040805160206004803580820135601f810184900484028501840190955284845261020294369492936024939284019190819084018382808284375050604080516020601f89358b018035918201839004830284018301909452808352979a999881019791965091820194509250829150840183828082843750949750610f519650505050505050565b3480156104c157600080fd5b506104ca6110be565b60408051600160a060020a039092168252519081900360200190f35b3480156104f257600080fd5b506102026110cd565b34801561050757600080fd5b506104ca6110fb565b34801561051c57600080fd5b50610219600160a060020a036004351660243561110a565b34801561054057600080fd5b50610311600160a060020a03600435166111fa565b34801561056157600080fd5b50610202600160a060020a0360043516611215565b34801561058257600080fd5b5061058b611369565b6040518082600481111561059b57fe5b60ff16815260200191505060405180910390f35b3480156105bb57600080fd5b50610219600160a060020a03600435166113b4565b3480156105dc57600080fd5b506104ca6113c9565b3480156105f157600080fd5b506102426113d8565b34801561060657600080fd5b50610219611433565b34801561061b57600080fd5b50610219611454565b34801561063057600080fd5b50610219600160a060020a0360043516602435611489565b34801561065457600080fd5b50610311600160a060020a03600435166114eb565b34801561067557600080fd5b50610311611581565b34801561068a57600080fd5b506104ca611587565b34801561069f57600080fd5b50610219600160a060020a0360043516602435611596565b3480156106c357600080fd5b50610202600160a060020a036004351661162f565b3480156106e457600080fd5b50610311600160a060020a0360043581169060243516611830565b34801561070b57600080fd5b5061021961185b565b34801561072057600080fd5b50610202600160a060020a0360043516611860565b34801561074157600080fd5b506104ca6118f5565b34801561075657600080fd5b50610202600160a060020a03600435166118fa565b600354600160a060020a0316331461078257600080fd5b60045460009074010000000000000000000000000000000000000000900460ff16156107ad57600080fd5b50600160a060020a03919091166000908152600560205260409020805460ff1916911515919091179055565b60065460ff1681565b600b805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156108685780601f1061083d57610100808354040283529160200191610868565b820191906000526020600020905b81548152906001019060200180831161084b57829003601f168201915b505050505081565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b600354600160a060020a031633146108ed57600080fd5b600354600160a060020a038083169163a9059cbb911661090c846114eb565b6040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b15801561097757600080fd5b505af115801561098b573d6000803e3d6000fd5b505050506040513d60208110156109a157600080fd5b505050565b6001545b90565b600454600090849074010000000000000000000000000000000000000000900460ff1615156109fd57600160a060020a03811660009081526005602052604090205460ff1615156109fd57600080fd5b610a08858585611955565b95945050505050565b600354600160a060020a03163314610a2857600080fd5b60045460009074010000000000000000000000000000000000000000900460ff1615610a5357600080fd5b506004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600d5481565b3360009081526007602052604090205460ff161515610aa757600080fd5b60065460ff1615610ab757600080fd5b60015473__contracts/SafeMathLib.sol:SafeMathLi__6366098d4f9091836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b158015610b2e57600080fd5b505af4158015610b42573d6000803e3d6000fd5b505050506040513d6020811015610b5857600080fd5b5051600155600160a060020a038216600090815260208181526040918290205482517f66098d4f000000000000000000000000000000000000000000000000000000008152600481019190915260248101849052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b158015610be657600080fd5b505af4158015610bfa573d6000803e3d6000fd5b505050506040513d6020811015610c1057600080fd5b5051600160a060020a0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b33600081815260208190526040902054610c88908363ffffffff611acc16565b600160a060020a038216600090815260208190526040902055600154610cb4908363ffffffff611acc16565b60015560408051600160a060020a03831681526020810184905281517f696de425f79f4a40bc6d2122ca50507f0efbeabbff86a84871b7196ab8ea8df7929181900390910190a1604080518381529051600091600160a060020a038416917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b60076020526000908152604090205460ff1681565b600354600160a060020a03163314610d6c57600080fd5b60065460ff1615610d7c57600080fd5b600160a060020a038216600081815260076020908152604091829020805460ff191685151590811790915582519384529083015280517f4b0adf6c802794c7dde28a08a4e07131abcff3bf9603cd71f14f90bec7865efa9281900390910190a15050565b6000610dea611369565b90506003816004811115610dfa57fe5b1480610e1157506004816004811115610e0f57fe5b145b1515610e1c57600080fd5b811515610e2857600080fd5b33600090815260208190526040902054610e48908363ffffffff611acc16565b33600090815260208190526040902055600154610e6b908363ffffffff611acc16565b600155600a54610e81908363ffffffff611ade16565b600a55600954604080517f753e88e5000000000000000000000000000000000000000000000000000000008152336004820152602481018590529051600160a060020a039092169163753e88e59160448082019260009290919082900301818387803b158015610ef057600080fd5b505af1158015610f04573d6000803e3d6000fd5b5050600954604080518681529051600160a060020a0390921693503392507f7e5c344a8141a805725cb476f76c6953b842222b967edd1f78ddb6e8b3f397ac919081900360200190a35050565b600354600160a060020a03163314610f6857600080fd5b8151610f7b90600b906020850190611c23565b508051610f8f90600c906020840190611c23565b5060408051818152600b8054600260001961010060018416150201909116049282018390527fd131ab1e6f279deea74e13a18477e13e2107deb6dc8ae955648948be5841fb46929091600c91819060208201906060830190869080156110365780601f1061100b57610100808354040283529160200191611036565b820191906000526020600020905b81548152906001019060200180831161101957829003601f168201915b50508381038252845460026000196101006001841615020190911604808252602090910190859080156110aa5780601f1061107f576101008083540402835291602001916110aa565b820191906000526020600020905b81548152906001019060200180831161108d57829003601f168201915b505094505050505060405180910390a15050565b600954600160a060020a031681565b600454600160a060020a031633146110e457600080fd5b6006805460ff191660011790556110f9611af4565b565b600854600160a060020a031681565b336000908152600260209081526040808320600160a060020a03861684529091528120548083111561115f57336000908152600260209081526040808320600160a060020a0388168452909152812055611194565b61116f818463ffffffff611acc16565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a031660009081526020819052604090205490565b600354600090600160a060020a0316331461122f57600080fd5b60045474010000000000000000000000000000000000000000900460ff161561125757600080fd5b611260826111fa565b600160a060020a03831660009081526020819052604090205490915061128c908263ffffffff611acc16565b600160a060020a0380841660009081526020819052604080822093909355600354909116815220546112c4908263ffffffff611ade16565b60038054600160a060020a03908116600090815260208181526040918290209490945591548251858152925190821693918616927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92908290030190a360408051600160a060020a03841681526020810183905281517f6b3f5f84a24147dab46359bf96b628286e8962759491b8c0e11e50770c8cc136929181900390910190a15050565b6000611373611454565b1515611381575060016109aa565b600954600160a060020a0316151561139b575060026109aa565b600a5415156113ac575060036109aa565b5060046109aa565b60056020526000908152604090205460ff1681565b600354600160a060020a031681565b600c805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156108685780601f1061083d57610100808354040283529160200191610868565b60045474010000000000000000000000000000000000000000900460ff1681565b60045460009074010000000000000000000000000000000000000000900460ff168015611484575061148461185b565b905090565b600454600090339074010000000000000000000000000000000000000000900460ff1615156114d957600160a060020a03811660009081526005602052604090205460ff1615156114d957600080fd5b6114e38484611b42565b949350505050565b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600091600160a060020a038416916370a082319160248082019260209290919082900301818787803b15801561154f57600080fd5b505af1158015611563573d6000803e3d6000fd5b505050506040513d602081101561157957600080fd5b505192915050565b600a5481565b600454600160a060020a031681565b336000908152600260209081526040808320600160a060020a03861684529091528120546115ca908363ffffffff611ade16565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b611637611454565b151561164257600080fd5b600160a060020a038116151561165757600080fd5b600854600160a060020a0316331461166e57600080fd5b6004611678611369565b600481111561168357fe5b141561168e57600080fd5b6009805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038381169190911791829055604080517f61d3d7a6000000000000000000000000000000000000000000000000000000008152905192909116916361d3d7a6916004808201926020929091908290030181600087803b15801561171257600080fd5b505af1158015611726573d6000803e3d6000fd5b505050506040513d602081101561173c57600080fd5b5051151561174957600080fd5b600154600960009054906101000a9004600160a060020a0316600160a060020a0316634b2ba0dd6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156117b857600080fd5b505af11580156117cc573d6000803e3d6000fd5b505050506040513d60208110156117e257600080fd5b5051146117ee57600080fd5b60095460408051600160a060020a039092168252517f7845d5aa74cc410e35571258d954f23b82276e160fe8c188fa80566580f279cc9181900360200190a150565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600190565b600354600160a060020a0316331461187757600080fd5b600160a060020a038116151561188c57600080fd5b600354604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600081565b600160a060020a038116151561190f57600080fd5b600854600160a060020a0316331461192657600080fd5b6008805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6000600160a060020a038316151561196c57600080fd5b600160a060020a03841660009081526020819052604090205482111561199157600080fd5b600160a060020a03841660009081526002602090815260408083203384529091529020548211156119c157600080fd5b600160a060020a0384166000908152602081905260409020546119ea908363ffffffff611acc16565b600160a060020a038086166000908152602081905260408082209390935590851681522054611a1f908363ffffffff611ade16565b600160a060020a03808516600090815260208181526040808320949094559187168152600282528281203382529091522054611a61908363ffffffff611acc16565b600160a060020a03808616600081815260026020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b600082821115611ad857fe5b50900390565b600082820183811015611aed57fe5b9392505050565b600454600160a060020a03163314611b0b57600080fd5b6004805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b6000600160a060020a0383161515611b5957600080fd5b33600090815260208190526040902054821115611b7557600080fd5b33600090815260208190526040902054611b95908363ffffffff611acc16565b3360009081526020819052604080822092909255600160a060020a03851681522054611bc7908363ffffffff611ade16565b600160a060020a038416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10611c6457805160ff1916838001178555611c91565b82800160010185558215611c91579182015b82811115611c91578251825591602001919060010190611c76565b50611c9d929150611ca1565b5090565b6109aa91905b80821115611c9d5760008155600101611ca75600a165627a7a7230582087718b612167d2fe4829deb1d7ab0b4ede3913ba1487f06b55a5d6a1a4dc1f730029", "bytecode_runtime": "0x6080604052600436106101d75763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166302f652a381146101dc57806305d2035b1461020457806306fdde031461022d578063095ea7b3146102b757806316114acd146102db57806318160ddd146102fc57806323b872dd1461032357806329ff4f531461034d578063313ce5671461036e57806340c10f191461038357806342966c68146103a757806342c1867b146103bf57806343214675146103e057806345977d03146104065780634eee966f1461041e5780635de4ccb0146104b55780635f412d4f146104e6578063600440cb146104fb578063661884631461051057806370a0823114610534578063812d504d146105555780638444b39114610576578063867c2857146105af5780638da5cb5b146105d057806395d89b41146105e557806396132521146105fa5780639738968c1461060f578063a9059cbb14610624578063c45d19db14610648578063c752ff6214610669578063d1f276d31461067e578063d73dd62314610693578063d7e7088a146106b7578063dd62ed3e146106d8578063eefa597b146106ff578063f2fde38b14610714578063fccc281314610735578063ffeb7d751461074a575b600080fd5b3480156101e857600080fd5b50610202600160a060020a0360043516602435151561076b565b005b34801561021057600080fd5b506102196107d9565b604080519115158252519081900360200190f35b34801561023957600080fd5b506102426107e2565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561027c578181015183820152602001610264565b50505050905090810190601f1680156102a95780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156102c357600080fd5b50610219600160a060020a0360043516602435610870565b3480156102e757600080fd5b50610202600160a060020a03600435166108d6565b34801561030857600080fd5b506103116109a6565b60408051918252519081900360200190f35b34801561032f57600080fd5b50610219600160a060020a03600435811690602435166044356109ad565b34801561035957600080fd5b50610202600160a060020a0360043516610a11565b34801561037a57600080fd5b50610311610a83565b34801561038f57600080fd5b50610202600160a060020a0360043516602435610a89565b3480156103b357600080fd5b50610202600435610c68565b3480156103cb57600080fd5b50610219600160a060020a0360043516610d40565b3480156103ec57600080fd5b50610202600160a060020a03600435166024351515610d55565b34801561041257600080fd5b50610202600435610de0565b34801561042a57600080fd5b506040805160206004803580820135601f810184900484028501840190955284845261020294369492936024939284019190819084018382808284375050604080516020601f89358b018035918201839004830284018301909452808352979a999881019791965091820194509250829150840183828082843750949750610f519650505050505050565b3480156104c157600080fd5b506104ca6110be565b60408051600160a060020a039092168252519081900360200190f35b3480156104f257600080fd5b506102026110cd565b34801561050757600080fd5b506104ca6110fb565b34801561051c57600080fd5b50610219600160a060020a036004351660243561110a565b34801561054057600080fd5b50610311600160a060020a03600435166111fa565b34801561056157600080fd5b50610202600160a060020a0360043516611215565b34801561058257600080fd5b5061058b611369565b6040518082600481111561059b57fe5b60ff16815260200191505060405180910390f35b3480156105bb57600080fd5b50610219600160a060020a03600435166113b4565b3480156105dc57600080fd5b506104ca6113c9565b3480156105f157600080fd5b506102426113d8565b34801561060657600080fd5b50610219611433565b34801561061b57600080fd5b50610219611454565b34801561063057600080fd5b50610219600160a060020a0360043516602435611489565b34801561065457600080fd5b50610311600160a060020a03600435166114eb565b34801561067557600080fd5b50610311611581565b34801561068a57600080fd5b506104ca611587565b34801561069f57600080fd5b50610219600160a060020a0360043516602435611596565b3480156106c357600080fd5b50610202600160a060020a036004351661162f565b3480156106e457600080fd5b50610311600160a060020a0360043581169060243516611830565b34801561070b57600080fd5b5061021961185b565b34801561072057600080fd5b50610202600160a060020a0360043516611860565b34801561074157600080fd5b506104ca6118f5565b34801561075657600080fd5b50610202600160a060020a03600435166118fa565b600354600160a060020a0316331461078257600080fd5b60045460009074010000000000000000000000000000000000000000900460ff16156107ad57600080fd5b50600160a060020a03919091166000908152600560205260409020805460ff1916911515919091179055565b60065460ff1681565b600b805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156108685780601f1061083d57610100808354040283529160200191610868565b820191906000526020600020905b81548152906001019060200180831161084b57829003601f168201915b505050505081565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b600354600160a060020a031633146108ed57600080fd5b600354600160a060020a038083169163a9059cbb911661090c846114eb565b6040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b15801561097757600080fd5b505af115801561098b573d6000803e3d6000fd5b505050506040513d60208110156109a157600080fd5b505050565b6001545b90565b600454600090849074010000000000000000000000000000000000000000900460ff1615156109fd57600160a060020a03811660009081526005602052604090205460ff1615156109fd57600080fd5b610a08858585611955565b95945050505050565b600354600160a060020a03163314610a2857600080fd5b60045460009074010000000000000000000000000000000000000000900460ff1615610a5357600080fd5b506004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600d5481565b3360009081526007602052604090205460ff161515610aa757600080fd5b60065460ff1615610ab757600080fd5b60015473__contracts/SafeMathLib.sol:SafeMathLi__6366098d4f9091836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b158015610b2e57600080fd5b505af4158015610b42573d6000803e3d6000fd5b505050506040513d6020811015610b5857600080fd5b5051600155600160a060020a038216600090815260208181526040918290205482517f66098d4f000000000000000000000000000000000000000000000000000000008152600481019190915260248101849052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b158015610be657600080fd5b505af4158015610bfa573d6000803e3d6000fd5b505050506040513d6020811015610c1057600080fd5b5051600160a060020a0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b33600081815260208190526040902054610c88908363ffffffff611acc16565b600160a060020a038216600090815260208190526040902055600154610cb4908363ffffffff611acc16565b60015560408051600160a060020a03831681526020810184905281517f696de425f79f4a40bc6d2122ca50507f0efbeabbff86a84871b7196ab8ea8df7929181900390910190a1604080518381529051600091600160a060020a038416917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b60076020526000908152604090205460ff1681565b600354600160a060020a03163314610d6c57600080fd5b60065460ff1615610d7c57600080fd5b600160a060020a038216600081815260076020908152604091829020805460ff191685151590811790915582519384529083015280517f4b0adf6c802794c7dde28a08a4e07131abcff3bf9603cd71f14f90bec7865efa9281900390910190a15050565b6000610dea611369565b90506003816004811115610dfa57fe5b1480610e1157506004816004811115610e0f57fe5b145b1515610e1c57600080fd5b811515610e2857600080fd5b33600090815260208190526040902054610e48908363ffffffff611acc16565b33600090815260208190526040902055600154610e6b908363ffffffff611acc16565b600155600a54610e81908363ffffffff611ade16565b600a55600954604080517f753e88e5000000000000000000000000000000000000000000000000000000008152336004820152602481018590529051600160a060020a039092169163753e88e59160448082019260009290919082900301818387803b158015610ef057600080fd5b505af1158015610f04573d6000803e3d6000fd5b5050600954604080518681529051600160a060020a0390921693503392507f7e5c344a8141a805725cb476f76c6953b842222b967edd1f78ddb6e8b3f397ac919081900360200190a35050565b600354600160a060020a03163314610f6857600080fd5b8151610f7b90600b906020850190611c23565b508051610f8f90600c906020840190611c23565b5060408051818152600b8054600260001961010060018416150201909116049282018390527fd131ab1e6f279deea74e13a18477e13e2107deb6dc8ae955648948be5841fb46929091600c91819060208201906060830190869080156110365780601f1061100b57610100808354040283529160200191611036565b820191906000526020600020905b81548152906001019060200180831161101957829003601f168201915b50508381038252845460026000196101006001841615020190911604808252602090910190859080156110aa5780601f1061107f576101008083540402835291602001916110aa565b820191906000526020600020905b81548152906001019060200180831161108d57829003601f168201915b505094505050505060405180910390a15050565b600954600160a060020a031681565b600454600160a060020a031633146110e457600080fd5b6006805460ff191660011790556110f9611af4565b565b600854600160a060020a031681565b336000908152600260209081526040808320600160a060020a03861684529091528120548083111561115f57336000908152600260209081526040808320600160a060020a0388168452909152812055611194565b61116f818463ffffffff611acc16565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a031660009081526020819052604090205490565b600354600090600160a060020a0316331461122f57600080fd5b60045474010000000000000000000000000000000000000000900460ff161561125757600080fd5b611260826111fa565b600160a060020a03831660009081526020819052604090205490915061128c908263ffffffff611acc16565b600160a060020a0380841660009081526020819052604080822093909355600354909116815220546112c4908263ffffffff611ade16565b60038054600160a060020a03908116600090815260208181526040918290209490945591548251858152925190821693918616927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92908290030190a360408051600160a060020a03841681526020810183905281517f6b3f5f84a24147dab46359bf96b628286e8962759491b8c0e11e50770c8cc136929181900390910190a15050565b6000611373611454565b1515611381575060016109aa565b600954600160a060020a0316151561139b575060026109aa565b600a5415156113ac575060036109aa565b5060046109aa565b60056020526000908152604090205460ff1681565b600354600160a060020a031681565b600c805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156108685780601f1061083d57610100808354040283529160200191610868565b60045474010000000000000000000000000000000000000000900460ff1681565b60045460009074010000000000000000000000000000000000000000900460ff168015611484575061148461185b565b905090565b600454600090339074010000000000000000000000000000000000000000900460ff1615156114d957600160a060020a03811660009081526005602052604090205460ff1615156114d957600080fd5b6114e38484611b42565b949350505050565b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600091600160a060020a038416916370a082319160248082019260209290919082900301818787803b15801561154f57600080fd5b505af1158015611563573d6000803e3d6000fd5b505050506040513d602081101561157957600080fd5b505192915050565b600a5481565b600454600160a060020a031681565b336000908152600260209081526040808320600160a060020a03861684529091528120546115ca908363ffffffff611ade16565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b611637611454565b151561164257600080fd5b600160a060020a038116151561165757600080fd5b600854600160a060020a0316331461166e57600080fd5b6004611678611369565b600481111561168357fe5b141561168e57600080fd5b6009805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038381169190911791829055604080517f61d3d7a6000000000000000000000000000000000000000000000000000000008152905192909116916361d3d7a6916004808201926020929091908290030181600087803b15801561171257600080fd5b505af1158015611726573d6000803e3d6000fd5b505050506040513d602081101561173c57600080fd5b5051151561174957600080fd5b600154600960009054906101000a9004600160a060020a0316600160a060020a0316634b2ba0dd6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156117b857600080fd5b505af11580156117cc573d6000803e3d6000fd5b505050506040513d60208110156117e257600080fd5b5051146117ee57600080fd5b60095460408051600160a060020a039092168252517f7845d5aa74cc410e35571258d954f23b82276e160fe8c188fa80566580f279cc9181900360200190a150565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600190565b600354600160a060020a0316331461187757600080fd5b600160a060020a038116151561188c57600080fd5b600354604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600081565b600160a060020a038116151561190f57600080fd5b600854600160a060020a0316331461192657600080fd5b6008805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6000600160a060020a038316151561196c57600080fd5b600160a060020a03841660009081526020819052604090205482111561199157600080fd5b600160a060020a03841660009081526002602090815260408083203384529091529020548211156119c157600080fd5b600160a060020a0384166000908152602081905260409020546119ea908363ffffffff611acc16565b600160a060020a038086166000908152602081905260408082209390935590851681522054611a1f908363ffffffff611ade16565b600160a060020a03808516600090815260208181526040808320949094559187168152600282528281203382529091522054611a61908363ffffffff611acc16565b600160a060020a03808616600081815260026020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b600082821115611ad857fe5b50900390565b600082820183811015611aed57fe5b9392505050565b600454600160a060020a03163314611b0b57600080fd5b6004805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b6000600160a060020a0383161515611b5957600080fd5b33600090815260208190526040902054821115611b7557600080fd5b33600090815260208190526040902054611b95908363ffffffff611acc16565b3360009081526020819052604080822092909255600160a060020a03851681522054611bc7908363ffffffff611ade16565b600160a060020a038416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10611c6457805160ff1916838001178555611c91565b82800160010185558215611c91579182015b82811115611c91578251825591602001919060010190611c76565b50611c9d929150611ca1565b5090565b6109aa91905b80821115611c9d5760008155600101611ca75600a165627a7a7230582087718b612167d2fe4829deb1d7ab0b4ede3913ba1487f06b55a5d6a1a4dc1f730029", "direct_dependencies": ["SafeMathLib"], "full_dependencies": ["SafeMathLib"], "linkrefs": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 6630}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 7118}], "linkrefs_runtime": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 5496}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 5984}], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "state", "type": "bool"}], "name": "setTransferAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "mintingFinished", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "name", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "approve", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "recoverTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_from", "type": "address"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setReleaseAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "decimals", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "receiver", "type": "address"}, {"name": "amount", "type": "uint256"}], "name": "mint", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "burnAmount", "type": "uint256"}], "name": "burn", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "mintAgents", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "state", "type": "bool"}], "name": "setMintAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "uint256"}], "name": "upgrade", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_name", "type": "string"}, {"name": "_symbol", "type": "string"}], "name": "setTokenInformation", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "upgradeAgent", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "releaseTokenTransfer", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "upgradeMaster", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_subtractedValue", "type": "uint256"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "fromWhom", "type": "address"}], "name": "transferToOwner", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "getUpgradeState", "outputs": [{"name": "", "type": "uint8"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "transferAgents", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "symbol", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "released", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "canUpgrade", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "tokensToBeReturned", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalUpgraded", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "releaseAgent", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_addedValue", "type": "uint256"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "agent", "type": "address"}], "name": "setUpgradeAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}, {"name": "_spender", "type": "address"}], "name": "allowance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isToken", "outputs": [{"name": "weAre", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "BURN_ADDRESS", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "master", "type": "address"}], "name": "setUpgradeMaster", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [{"name": "_name", "type": "string"}, {"name": "_symbol", "type": "string"}, {"name": "_initialSupply", "type": "uint256"}, {"name": "_decimals", "type": "uint256"}, {"name": "_mintable", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "fromWhom", "type": "address"}, {"indexed": false, "name": "amount", "type": "uint256"}], "name": "OwnerReclaim", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newName", "type": "string"}, {"indexed": false, "name": "newSymbol", "type": "string"}], "name": "UpdatedTokenInformation", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "_from", "type": "address"}, {"indexed": true, "name": "_to", "type": "address"}, {"indexed": false, "name": "_value", "type": "uint256"}], "name": "Upgrade", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "agent", "type": "address"}], "name": "UpgradeAgentSet", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "addr", "type": "address"}, {"indexed": false, "name": "state", "type": "bool"}], "name": "MintingAgentChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "receiver", "type": "address"}, {"indexed": false, "name": "amount", "type": "uint256"}], "name": "Minted", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "burner", "type": "address"}, {"indexed": false, "name": "burnedAmount", "type": "uint256"}], "name": "Burned", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}, {"indexed": true, "name": "spender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "devdoc": {"methods": {"allowance(address,address)": {"details": "Function to check the amount of tokens that an owner allowed to a spender.", "params": {"_owner": "address The address which owns the funds.", "_spender": "address The address which will spend the funds."}, "return": "A uint256 specifying the amount of tokens still available for the spender."}, "approve(address,uint256)": {"details": "Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729", "params": {"_spender": "The address which will spend the funds.", "_value": "The amount of tokens to be spent."}}, "balanceOf(address)": {"details": "Gets the balance of the specified address.", "params": {"_owner": "The address to query the the balance of."}, "return": "An uint256 representing the amount owned by the passed address."}, "decreaseApproval(address,uint256)": {"details": "Decrease the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[_spender] == 0. To decrement allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"_spender": "The address which will spend the funds.", "_subtractedValue": "The amount of tokens to decrease the allowance by."}}, "increaseApproval(address,uint256)": {"details": "Increase the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[_spender] == 0. To increment allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"_addedValue": "The amount of tokens to increase the allowance by.", "_spender": "The address which will spend the funds."}}, "recoverTokens(address)": {"details": "This will be invoked by the owner, when owner wants to rescue tokens", "params": {"token": "Token which will we rescue to the owner from the contract"}}, "tokensToBeReturned(address)": {"details": "Interface function, can be overwritten by the superclass", "params": {"token": "Token which balance we will check and return"}, "return": "The amount of tokens (in smallest denominator) the contract owns"}, "totalSupply()": {"details": "total number of tokens in existence"}, "transferOwnership(address)": {"details": "Allows the current owner to transfer control of the contract to a newOwner.", "params": {"newOwner": "The address to transfer ownership to."}}, "transferToOwner(address)": {"details": "Here the owner can reclaim the tokens from a participant if the token is not released yet. Refund will be handled offband.", "params": {"fromWhom": "address of the participant whose tokens we want to claim"}}}}, "userdoc": {"methods": {"burn(uint256)": {"notice": "Burn extra tokens from a balance. "}, "canUpgrade()": {"notice": "Allow upgrade agent functionality kick in only if the crowdsale was success."}, "getUpgradeState()": {"notice": "Get the state of the token upgrade."}, "mint(address,uint256)": {"notice": "Create new tokens and allocate them to an address.. * Only callably by a crowdsale contract (mint agent)."}, "releaseTokenTransfer()": {"notice": "When token is released to be transferable, enforce no new tokens can be created."}, "setMintAgent(address,bool)": {"notice": "Owner can allow a crowdsale contract to mint new tokens."}, "setReleaseAgent(address)": {"notice": "Set the contract that can call release and make the token transferable. * Design choice. Allow reset the release agent to fix fat finger mistakes."}, "setTokenInformation(string,string)": {"notice": "Owner can update token information here. * It is often useful to conceal the actual token association, until the token operations, like central issuance or reissuance have been completed. * This function allows the token owner to rename the token after the operations have been completed and then point the audience to use the token contract."}, "setTransferAgent(address,bool)": {"notice": "Owner can allow a particular address (a crowdsale contract) to transfer tokens despite the lock up period."}, "setUpgradeAgent(address)": {"notice": "Set an upgrade agent that handles"}, "setUpgradeMaster(address)": {"notice": "Change the upgrade master. * This allows us to set a new owner for the upgrade mechanism."}, "upgrade(uint256)": {"notice": "Allow the token holder to upgrade some of their tokens to a new contract."}}}}, "settings": {"compilationTarget": {"contracts/AMLToken.sol": "AMLToken"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/AMLToken.sol": {"keccak256": "0x5fd8cb89c45e2e8cca4af557a8ed60d6b922591f44b1d18d058eb1f14481995a", "urls": ["bzzr://b935edf727e8e30daa7b63b0db5ed87b8e65ae97d499ad1bd6085490084a8c5f"]}, "contracts/BurnableCrowdsaleToken.sol": {"keccak256": "0x675958952b65781d10a687151f84f5164b4c92bb5893070c6a2ffc9e32875a00", "urls": ["bzzr://444b37bcc9479485ba287995cf667781a659c883a3a7102611f7557c21a2ffbc"]}, "contracts/BurnableToken.sol": {"keccak256": "0xb97707de2018141fb22482d7ad4faa35cd471ae2ed992343bbcc1be0d3b95218", "urls": ["bzzr://a8b275d0ee25a96664f613d48339250b11d5140d7b74122d74482c3a94cc5295"]}, "contracts/CrowdsaleToken.sol": {"keccak256": "0xa812687ac327cd19fac64667980e70d4fb72ef7f61dce477818d085cf0a915df", "urls": ["bzzr://826d9dda00ce341794e5bb05c78b1abb2728e3c631f7a542345dcfa9f3bd9c50"]}, "contracts/MintableToken.sol": {"keccak256": "0x650e1d6b2bedcd36508918357c7cf4f36fdd093cd0c4d6342f4dcd3bdcdd7578", "urls": ["bzzr://7ba2ac0480d428066a18727e2adb76ba56856ecd37b4420e801131ec8f8f4be3"]}, "contracts/Recoverable.sol": {"keccak256": "0x311a332cdd87df6e00057f5455f4e68b043b5dbe211f6d68bc64e20817515635", "urls": ["bzzr://4fd99bcfb93baed6e7c8d22ee9ecc5c8346a1aa98288e77b01333b2c5d3f582d"]}, "contracts/ReleasableToken.sol": {"keccak256": "0x2c50180d0c1eab1aa63a04da3ae87ee2c482665d2a1a42c5f05b11234a7edaf4", "urls": ["bzzr://10752c317eba5c42e2848722689cfee4fffb7bcb42f3346e1a20715d843798e8"]}, "contracts/SafeMathLib.sol": {"keccak256": "0x501bfe31e274b9a5591f7c540bdced4d4312e27d4f19599147c9bbca3d9c6b18", "urls": ["bzzr://a80935ebddb06c247d71372d4e5833ee029f08633bd0fe4a274a57009567e5b9"]}, "contracts/StandardTokenExt.sol": {"keccak256": "0x9ea2d4cec4dccd5639c05e6c23dd027d80b5e5a20abd99b280ab7b2631b5a5fc", "urls": ["bzzr://a52d8fc5a21bd83997aff19128e00dceb251df712207b61223894c8b7f42d5ff"]}, "contracts/UpgradeAgent.sol": {"keccak256": "0x88e793f72feca4a18d2cd06e6037c1413d7b963eabcf5626d60bfb9d04d6e8e6", "urls": ["bzzr://87e39a65cf25d539ab49ad7e759b3298b8a19272964e69e3f2432f0323f30025"]}, "contracts/UpgradeableToken.sol": {"keccak256": "0xa74fc300c514564ece81c86905502c2de674b69c0633b133af19c1ba027da2c9", "urls": ["bzzr://55bc0b908c94781462b8959f051c6dbb53c35641b0f8cb38d74632ad6bf95e52"]}, "zeppelin/contracts/math/SafeMath.sol": {"keccak256": "0x341ba8cb467a3623e819ba1a683ac1d264005186f308505214e5f6bc89446a08", "urls": ["bzzr://59b5652ee4e4a1b5a8f1a8906e14c84af43d636cf5ca0725cc1813aabe4c8c17"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}, "zeppelin/contracts/token/ERC20/BasicToken.sol": {"keccak256": "0x948404468d61ff35ea4194650670408dabd65da7f905a1c16888ab84520bf39e", "urls": ["bzzr://ea75e20f95d7e4e10394fe6bfaa8eee56b4757c2a6f1e8df4180d33afa621935"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}, "zeppelin/contracts/token/ERC20/StandardToken.sol": {"keccak256": "0xd2b344a5259e19ec143074cfa65637a10c40b68395c59808c4af13bccbb2de55", "urls": ["bzzr://d61a01175a7ca1ba9f4403de603c20b897e33ec425aef2d9f8a7f9ddfdfaf5b2"]}}, "version": 1}, "name": "AMLToken", "ordered_full_dependencies": ["SafeMathLib"], "source_path": "contracts/AMLToken.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n assert(c / a == b);\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n\n\n\n/**\n * @title Basic token\n * @dev Basic version of StandardToken, with no allowances.\n */\ncontract BasicToken is ERC20Basic {\n using SafeMath for uint256;\n\n mapping(address => uint256) balances;\n\n uint256 totalSupply_;\n\n /**\n * @dev total number of tokens in existence\n */\n function totalSupply() public view returns (uint256) {\n return totalSupply_;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param _to The address to transfer to.\n * @param _value The amount to be transferred.\n */\n function transfer(address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[msg.sender]);\n\n // SafeMath.sub will throw if there is not enough balance.\n balances[msg.sender] = balances[msg.sender].sub(_value);\n balances[_to] = balances[_to].add(_value);\n Transfer(msg.sender, _to, _value);\n return true;\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param _owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address _owner) public view returns (uint256 balance) {\n return balances[_owner];\n }\n\n}\n\n\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n\n\n/**\n * @title Standard ERC20 token\n *\n * @dev Implementation of the basic standard token.\n * @dev https://github.com/ethereum/EIPs/issues/20\n * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol\n */\ncontract StandardToken is ERC20, BasicToken {\n\n mapping (address => mapping (address => uint256)) internal allowed;\n\n\n /**\n * @dev Transfer tokens from one address to another\n * @param _from address The address which you want to send tokens from\n * @param _to address The address which you want to transfer to\n * @param _value uint256 the amount of tokens to be transferred\n */\n function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[_from]);\n require(_value <= allowed[_from][msg.sender]);\n\n balances[_from] = balances[_from].sub(_value);\n balances[_to] = balances[_to].add(_value);\n allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);\n Transfer(_from, _to, _value);\n return true;\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n *\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param _spender The address which will spend the funds.\n * @param _value The amount of tokens to be spent.\n */\n function approve(address _spender, uint256 _value) public returns (bool) {\n allowed[msg.sender][_spender] = _value;\n Approval(msg.sender, _spender, _value);\n return true;\n }\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param _owner address The address which owns the funds.\n * @param _spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address _owner, address _spender) public view returns (uint256) {\n return allowed[_owner][_spender];\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(address _spender, uint _addedValue) public returns (bool) {\n allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {\n uint oldValue = allowed[msg.sender][_spender];\n if (_subtractedValue > oldValue) {\n allowed[msg.sender][_spender] = 0;\n } else {\n allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);\n }\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n\ncontract Recoverable is Ownable {\n\n /// @dev Empty constructor (for now)\n function Recoverable() {\n }\n\n /// @dev This will be invoked by the owner, when owner wants to rescue tokens\n /// @param token Token which will we rescue to the owner from the contract\n function recoverTokens(ERC20Basic token) onlyOwner public {\n token.transfer(owner, tokensToBeReturned(token));\n }\n\n /// @dev Interface function, can be overwritten by the superclass\n /// @param token Token which balance we will check and return\n /// @return The amount of tokens (in smallest denominator) the contract owns\n function tokensToBeReturned(ERC20Basic token) public returns (uint) {\n return token.balanceOf(this);\n }\n}\n\n\n\n/**\n * Standard EIP-20 token with an interface marker.\n *\n * @notice Interface marker is used by crowdsale contracts to validate that addresses point a good token contract.\n *\n */\ncontract StandardTokenExt is StandardToken, Recoverable {\n\n /* Interface declaration */\n function isToken() public constant returns (bool weAre) {\n return true;\n }\n}\n\n\ncontract BurnableToken is StandardTokenExt {\n\n // @notice An address for the transfer event where the burned tokens are transferred in a faux Transfer event\n address public constant BURN_ADDRESS = 0;\n\n /** How many tokens we burned */\n event Burned(address burner, uint burnedAmount);\n\n /**\n * Burn extra tokens from a balance.\n *\n */\n function burn(uint burnAmount) {\n address burner = msg.sender;\n balances[burner] = balances[burner].sub(burnAmount);\n totalSupply_ = totalSupply_.sub(burnAmount);\n Burned(burner, burnAmount);\n\n // Inform the blockchain explores that track the\n // balances only by a transfer event that the balance in this\n // address has decreased\n Transfer(burner, BURN_ADDRESS, burnAmount);\n }\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Upgrade agent interface inspired by Lunyr.\n *\n * Upgrade agent transfers tokens to a new contract.\n * Upgrade agent itself can be the token contract, or just a middle man contract doing the heavy lifting.\n */\ncontract UpgradeAgent {\n\n uint public originalSupply;\n\n /** Interface marker */\n function isUpgradeAgent() public constant returns (bool) {\n return true;\n }\n\n function upgradeFrom(address _from, uint256 _value) public;\n\n}\n\n\n/**\n * A token upgrade mechanism where users can opt-in amount of tokens to the next smart contract revision.\n *\n * First envisioned by Golem and Lunyr projects.\n */\ncontract UpgradeableToken is StandardTokenExt {\n\n /** Contract / person who can set the upgrade path. This can be the same as team multisig wallet, as what it is with its default value. */\n address public upgradeMaster;\n\n /** The next contract where the tokens will be migrated. */\n UpgradeAgent public upgradeAgent;\n\n /** How many tokens we have upgraded by now. */\n uint256 public totalUpgraded;\n\n /**\n * Upgrade states.\n *\n * - NotAllowed: The child contract has not reached a condition where the upgrade can bgun\n * - WaitingForAgent: Token allows upgrade, but we don't have a new agent yet\n * - ReadyToUpgrade: The agent is set, but not a single token has been upgraded yet\n * - Upgrading: Upgrade agent is set and the balance holders can upgrade their tokens\n *\n */\n enum UpgradeState {Unknown, NotAllowed, WaitingForAgent, ReadyToUpgrade, Upgrading}\n\n /**\n * Somebody has upgraded some of his tokens.\n */\n event Upgrade(address indexed _from, address indexed _to, uint256 _value);\n\n /**\n * New upgrade agent available.\n */\n event UpgradeAgentSet(address agent);\n\n /**\n * Do not allow construction without upgrade master set.\n */\n function UpgradeableToken(address _upgradeMaster) {\n upgradeMaster = _upgradeMaster;\n }\n\n /**\n * Allow the token holder to upgrade some of their tokens to a new contract.\n */\n function upgrade(uint256 value) public {\n\n UpgradeState state = getUpgradeState();\n if(!(state == UpgradeState.ReadyToUpgrade || state == UpgradeState.Upgrading)) {\n // Called in a bad state\n throw;\n }\n\n // Validate input value.\n if (value == 0) throw;\n\n balances[msg.sender] = balances[msg.sender].sub(value);\n\n // Take tokens out from circulation\n totalSupply_ = totalSupply_.sub(value);\n totalUpgraded = totalUpgraded.add(value);\n\n // Upgrade agent reissues the tokens\n upgradeAgent.upgradeFrom(msg.sender, value);\n Upgrade(msg.sender, upgradeAgent, value);\n }\n\n /**\n * Set an upgrade agent that handles\n */\n function setUpgradeAgent(address agent) external {\n\n if(!canUpgrade()) {\n // The token is not yet in a state that we could think upgrading\n throw;\n }\n\n if (agent == 0x0) throw;\n // Only a master can designate the next agent\n if (msg.sender != upgradeMaster) throw;\n // Upgrade has already begun for an agent\n if (getUpgradeState() == UpgradeState.Upgrading) throw;\n\n upgradeAgent = UpgradeAgent(agent);\n\n // Bad interface\n if(!upgradeAgent.isUpgradeAgent()) throw;\n // Make sure that token supplies match in source and target\n if (upgradeAgent.originalSupply() != totalSupply_) throw;\n\n UpgradeAgentSet(upgradeAgent);\n }\n\n /**\n * Get the state of the token upgrade.\n */\n function getUpgradeState() public constant returns(UpgradeState) {\n if(!canUpgrade()) return UpgradeState.NotAllowed;\n else if(address(upgradeAgent) == 0x00) return UpgradeState.WaitingForAgent;\n else if(totalUpgraded == 0) return UpgradeState.ReadyToUpgrade;\n else return UpgradeState.Upgrading;\n }\n\n /**\n * Change the upgrade master.\n *\n * This allows us to set a new owner for the upgrade mechanism.\n */\n function setUpgradeMaster(address master) public {\n if (master == 0x0) throw;\n if (msg.sender != upgradeMaster) throw;\n upgradeMaster = master;\n }\n\n /**\n * Child contract can enable to provide the condition when the upgrade can begun.\n */\n function canUpgrade() public constant returns(bool) {\n return true;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n/**\n * Define interface for releasing the token transfer after a successful crowdsale.\n */\ncontract ReleasableToken is StandardTokenExt {\n\n /* The finalizer contract that allows unlift the transfer limits on this token */\n address public releaseAgent;\n\n /** A crowdsale contract can release us to the wild if ICO success. If false we are are in transfer lock up period.*/\n bool public released = false;\n\n /** Map of agents that are allowed to transfer tokens regardless of the lock down period. These are crowdsale contracts and possible the team multisig itself. */\n mapping (address => bool) public transferAgents;\n\n /**\n * Limit token transfer until the crowdsale is over.\n *\n */\n modifier canTransfer(address _sender) {\n\n if(!released) {\n if(!transferAgents[_sender]) {\n throw;\n }\n }\n\n _;\n }\n\n /**\n * Set the contract that can call release and make the token transferable.\n *\n * Design choice. Allow reset the release agent to fix fat finger mistakes.\n */\n function setReleaseAgent(address addr) onlyOwner inReleaseState(false) public {\n\n // We don't do interface check here as we might want to a normal wallet address to act as a release agent\n releaseAgent = addr;\n }\n\n /**\n * Owner can allow a particular address (a crowdsale contract) to transfer tokens despite the lock up period.\n */\n function setTransferAgent(address addr, bool state) onlyOwner inReleaseState(false) public {\n transferAgents[addr] = state;\n }\n\n /**\n * One way function to release the tokens to the wild.\n *\n * Can be called only from the release agent that is the final ICO contract. It is only called if the crowdsale has been success (first milestone reached).\n */\n function releaseTokenTransfer() public onlyReleaseAgent {\n released = true;\n }\n\n /** The function can be called only before or after the tokens have been releasesd */\n modifier inReleaseState(bool releaseState) {\n if(releaseState != released) {\n throw;\n }\n _;\n }\n\n /** The function can be called only by a whitelisted release agent. */\n modifier onlyReleaseAgent() {\n if(msg.sender != releaseAgent) {\n throw;\n }\n _;\n }\n\n function transfer(address _to, uint _value) canTransfer(msg.sender) returns (bool success) {\n // Call StandardToken.transfer()\n return super.transfer(_to, _value);\n }\n\n function transferFrom(address _from, address _to, uint _value) canTransfer(_from) returns (bool success) {\n // Call StandardToken.transferForm()\n return super.transferFrom(_from, _to, _value);\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Safe unsigned safe math.\n *\n * https://blog.aragon.one/library-driven-development-in-solidity-2bebcaf88736#.750gwtwli\n *\n * Originally from https://raw.githubusercontent.com/AragonOne/zeppelin-solidity/master/contracts/SafeMathLib.sol\n *\n * Maintained here until merged to mainline zeppelin-solidity.\n *\n */\nlibrary SafeMathLib {\n\n function times(uint a, uint b) returns (uint) {\n uint c = a * b;\n assert(a == 0 || c / a == b);\n return c;\n }\n\n function minus(uint a, uint b) returns (uint) {\n assert(b <= a);\n return a - b;\n }\n\n function plus(uint a, uint b) returns (uint) {\n uint c = a + b;\n assert(c>=a);\n return c;\n }\n\n}\n\n\n\n/**\n * A token that can increase its supply by another contract.\n *\n * This allows uncapped crowdsale by dynamically increasing the supply when money pours in.\n * Only mint agents, contracts whitelisted by owner, can mint new tokens.\n *\n */\ncontract MintableToken is StandardTokenExt {\n\n using SafeMathLib for uint;\n\n bool public mintingFinished = false;\n\n /** List of agents that are allowed to create new tokens */\n mapping (address => bool) public mintAgents;\n\n event MintingAgentChanged(address addr, bool state);\n event Minted(address receiver, uint amount);\n\n /**\n * Create new tokens and allocate them to an address..\n *\n * Only callably by a crowdsale contract (mint agent).\n */\n function mint(address receiver, uint amount) onlyMintAgent canMint public {\n totalSupply_ = totalSupply_.plus(amount);\n balances[receiver] = balances[receiver].plus(amount);\n\n // This will make the mint transaction apper in EtherScan.io\n // We can remove this after there is a standardized minting event\n Transfer(0, receiver, amount);\n }\n\n /**\n * Owner can allow a crowdsale contract to mint new tokens.\n */\n function setMintAgent(address addr, bool state) onlyOwner canMint public {\n mintAgents[addr] = state;\n MintingAgentChanged(addr, state);\n }\n\n modifier onlyMintAgent() {\n // Only crowdsale contracts are allowed to mint new tokens\n if(!mintAgents[msg.sender]) {\n throw;\n }\n _;\n }\n\n /** Make sure we are not done yet. */\n modifier canMint() {\n if(mintingFinished) throw;\n _;\n }\n}\n\n\n\n/**\n * A crowdsaled token.\n *\n * An ERC-20 token designed specifically for crowdsales with investor protection and further development path.\n *\n * - The token transfer() is disabled until the crowdsale is over\n * - The token contract gives an opt-in upgrade path to a new contract\n * - The same token can be part of several crowdsales through approve() mechanism\n * - The token can be capped (supply set in the constructor) or uncapped (crowdsale contract can mint new tokens)\n *\n */\ncontract CrowdsaleToken is ReleasableToken, MintableToken, UpgradeableToken {\n\n /** Name and symbol were updated. */\n event UpdatedTokenInformation(string newName, string newSymbol);\n\n string public name;\n\n string public symbol;\n\n uint public decimals;\n\n /**\n * Construct the token.\n *\n * This token must be created through a team multisig wallet, so that it is owned by that wallet.\n *\n * @param _name Token name\n * @param _symbol Token symbol - should be all caps\n * @param _initialSupply How many tokens we start with\n * @param _decimals Number of decimal places\n * @param _mintable Are new tokens created over the crowdsale or do we distribute only the initial supply? Note that when the token becomes transferable the minting always ends.\n */\n function CrowdsaleToken(string _name, string _symbol, uint _initialSupply, uint _decimals, bool _mintable)\n UpgradeableToken(msg.sender) {\n\n // Create any address, can be transferred\n // to team multisig via changeOwner(),\n // also remember to call setUpgradeMaster()\n owner = msg.sender;\n\n name = _name;\n symbol = _symbol;\n\n totalSupply_ = _initialSupply;\n\n decimals = _decimals;\n\n // Create initially all balance on the team multisig\n balances[owner] = totalSupply_;\n\n if(totalSupply_ > 0) {\n Minted(owner, totalSupply_);\n }\n\n // No more new supply allowed after the token creation\n if(!_mintable) {\n mintingFinished = true;\n if(totalSupply_ == 0) {\n throw; // Cannot create a token without supply and no minting\n }\n }\n }\n\n /**\n * When token is released to be transferable, enforce no new tokens can be created.\n */\n function releaseTokenTransfer() public onlyReleaseAgent {\n mintingFinished = true;\n super.releaseTokenTransfer();\n }\n\n /**\n * Allow upgrade agent functionality kick in only if the crowdsale was success.\n */\n function canUpgrade() public constant returns(bool) {\n return released && super.canUpgrade();\n }\n\n /**\n * Owner can update token information here.\n *\n * It is often useful to conceal the actual token association, until\n * the token operations, like central issuance or reissuance have been completed.\n *\n * This function allows the token owner to rename the token after the operations\n * have been completed and then point the audience to use the token contract.\n */\n function setTokenInformation(string _name, string _symbol) onlyOwner {\n name = _name;\n symbol = _symbol;\n\n UpdatedTokenInformation(name, symbol);\n }\n\n}\n\n\n/**\n * A crowdsaled token that you can also burn.\n *\n */\ncontract BurnableCrowdsaleToken is BurnableToken, CrowdsaleToken {\n\n function BurnableCrowdsaleToken(string _name, string _symbol, uint _initialSupply, uint _decimals, bool _mintable)\n CrowdsaleToken(_name, _symbol, _initialSupply, _decimals, _mintable) {\n\n }\n}\n\n\n\n/**\n * The AML Token\n *\n * This subset of BurnableCrowdsaleToken gives the Owner a possibility to\n * reclaim tokens from a participant before the token is released\n * after a participant has failed a prolonged AML process.\n *\n * It is assumed that the anti-money laundering process depends on blockchain data.\n * The data is not available before the transaction and not for the smart contract.\n * Thus, we need to implement logic to handle AML failure cases post payment.\n * We give a time window before the token release for the token sale owners to\n * complete the AML and claw back all token transactions that were\n * caused by rejected purchases.\n */\ncontract AMLToken is BurnableCrowdsaleToken {\n\n // An event when the owner has reclaimed non-released tokens\n event OwnerReclaim(address fromWhom, uint amount);\n\n function AMLToken(string _name, string _symbol, uint _initialSupply, uint _decimals, bool _mintable) BurnableCrowdsaleToken(_name, _symbol, _initialSupply, _decimals, _mintable) {\n\n }\n\n /// @dev Here the owner can reclaim the tokens from a participant if\n /// the token is not released yet. Refund will be handled offband.\n /// @param fromWhom address of the participant whose tokens we want to claim\n function transferToOwner(address fromWhom) onlyOwner {\n if (released) revert();\n\n uint amount = balanceOf(fromWhom);\n balances[fromWhom] = balances[fromWhom].sub(amount);\n balances[owner] = balances[owner].add(amount);\n Transfer(fromWhom, owner, amount);\n OwnerReclaim(fromWhom, amount);\n }\n}\n"}, "AdvancedTransferAgent": {"abi": [{"constant": false, "inputs": [{"name": "who", "type": "address"}, {"name": "status", "type": "bool"}], "name": "setBlacklist", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_KYC", "type": "address"}], "name": "setKYC", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "who", "type": "address"}, {"name": "status", "type": "bool"}], "name": "setWhitelist", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "from", "type": "address"}, {"name": "to", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "verify", "outputs": [{"name": "newValue", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [{"name": "_KYC", "type": "address"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "who", "type": "address"}, {"indexed": false, "name": "status", "type": "bool"}], "name": "Whitelisted", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "who", "type": "address"}, {"indexed": false, "name": "status", "type": "bool"}], "name": "Blacklisted", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newKYC", "type": "address"}], "name": "ChangedKYC", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "bytecode": "0x608060405234801561001057600080fd5b50604051602080610588833981016040525160008054600160a060020a03909216600160a060020a0319928316179055600180549091163317905561052e8061005a6000396000f3006080604052600436106100775763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663153b0d1e811461007c578063483a83df146100a457806353d6fd59146100c55780638da5cb5b146100eb578063ad0769941461011c578063f2fde38b14610158575b600080fd5b34801561008857600080fd5b506100a2600160a060020a03600435166024351515610179565b005b3480156100b057600080fd5b506100a2600160a060020a03600435166101f4565b3480156100d157600080fd5b506100a2600160a060020a03600435166024351515610272565b3480156100f757600080fd5b506101006102ed565b60408051600160a060020a039092168252519081900360200190f35b34801561012857600080fd5b50610146600160a060020a03600435811690602435166044356102fc565b60408051918252519081900360200190f35b34801561016457600080fd5b506100a2600160a060020a03600435166103a8565b600154600160a060020a0316331461019057600080fd5b600160a060020a038216600081815260036020908152604091829020805460ff191685151590811790915582519384529083015280517fcf3473b85df1594d47b6958f29a32bea0abff9dd68296f7bf33443646793cfd89281900390910190a15050565b600154600160a060020a0316331461020b57600080fd5b6000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03838116919091179182905560408051929091168252517ff5b5fa8c9579deead24efc57404c831108a42aeb01f6a75828d9b8c6a37589ad916020908290030190a150565b600154600160a060020a0316331461028957600080fd5b600160a060020a038216600081815260026020908152604091829020805460ff191685151590811790915582519384529083015280517fa54714518c5d275fdcd3d2a461e4858e4e8cb04fb93cd0bca9d6d34115f264409281900390910190a15050565b600154600160a060020a031681565b600160a060020a03831660009081526003602052604081205460ff168061033b5750600160a060020a03831660009081526003602052604090205460ff165b15610348575060006103a1565b600160a060020a03841660009081526002602052604090205460ff16806103875750600160a060020a03831660009081526002602052604090205460ff165b156103935750806103a1565b61039e84848461043d565b90505b9392505050565b600154600160a060020a031633146103bf57600080fd5b600160a060020a03811615156103d457600080fd5b600154604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60008054600160a060020a031615156104575750806103a1565b60008054604080517f3af32abf000000000000000000000000000000000000000000000000000000008152600160a060020a03878116600483015291519190921692633af32abf92602480820193602093909283900390910190829087803b1580156104c257600080fd5b505af11580156104d6573d6000803e3d6000fd5b505050506040513d60208110156104ec57600080fd5b5051156104fa5750806103a1565b5060006103a15600a165627a7a7230582059b0e5f645722958c47e4ffc7ee615277771140db3b90224f9c8648581f0550d0029", "bytecode_runtime": "0x6080604052600436106100775763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663153b0d1e811461007c578063483a83df146100a457806353d6fd59146100c55780638da5cb5b146100eb578063ad0769941461011c578063f2fde38b14610158575b600080fd5b34801561008857600080fd5b506100a2600160a060020a03600435166024351515610179565b005b3480156100b057600080fd5b506100a2600160a060020a03600435166101f4565b3480156100d157600080fd5b506100a2600160a060020a03600435166024351515610272565b3480156100f757600080fd5b506101006102ed565b60408051600160a060020a039092168252519081900360200190f35b34801561012857600080fd5b50610146600160a060020a03600435811690602435166044356102fc565b60408051918252519081900360200190f35b34801561016457600080fd5b506100a2600160a060020a03600435166103a8565b600154600160a060020a0316331461019057600080fd5b600160a060020a038216600081815260036020908152604091829020805460ff191685151590811790915582519384529083015280517fcf3473b85df1594d47b6958f29a32bea0abff9dd68296f7bf33443646793cfd89281900390910190a15050565b600154600160a060020a0316331461020b57600080fd5b6000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03838116919091179182905560408051929091168252517ff5b5fa8c9579deead24efc57404c831108a42aeb01f6a75828d9b8c6a37589ad916020908290030190a150565b600154600160a060020a0316331461028957600080fd5b600160a060020a038216600081815260026020908152604091829020805460ff191685151590811790915582519384529083015280517fa54714518c5d275fdcd3d2a461e4858e4e8cb04fb93cd0bca9d6d34115f264409281900390910190a15050565b600154600160a060020a031681565b600160a060020a03831660009081526003602052604081205460ff168061033b5750600160a060020a03831660009081526003602052604090205460ff165b15610348575060006103a1565b600160a060020a03841660009081526002602052604090205460ff16806103875750600160a060020a03831660009081526002602052604090205460ff165b156103935750806103a1565b61039e84848461043d565b90505b9392505050565b600154600160a060020a031633146103bf57600080fd5b600160a060020a03811615156103d457600080fd5b600154604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60008054600160a060020a031615156104575750806103a1565b60008054604080517f3af32abf000000000000000000000000000000000000000000000000000000008152600160a060020a03878116600483015291519190921692633af32abf92602480820193602093909283900390910190829087803b1580156104c257600080fd5b505af11580156104d6573d6000803e3d6000fd5b505050506040513d60208110156104ec57600080fd5b5051156104fa5750806103a1565b5060006103a15600a165627a7a7230582059b0e5f645722958c47e4ffc7ee615277771140db3b90224f9c8648581f0550d0029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": false, "inputs": [{"name": "who", "type": "address"}, {"name": "status", "type": "bool"}], "name": "setBlacklist", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_KYC", "type": "address"}], "name": "setKYC", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "who", "type": "address"}, {"name": "status", "type": "bool"}], "name": "setWhitelist", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "from", "type": "address"}, {"name": "to", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "verify", "outputs": [{"name": "newValue", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [{"name": "_KYC", "type": "address"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "who", "type": "address"}, {"indexed": false, "name": "status", "type": "bool"}], "name": "Whitelisted", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "who", "type": "address"}, {"indexed": false, "name": "status", "type": "bool"}], "name": "Blacklisted", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newKYC", "type": "address"}], "name": "ChangedKYC", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "devdoc": {"methods": {"setBlacklist(address,bool)": {"details": "Setting the blacklist status for an address", "params": {"status": "True, if the address is blacklisted, false otherwise", "who": "Whose blacklist status will be changed"}}, "setKYC(address)": {"details": "Setting KYC contract address", "params": {"_KYC": "Address of the new Know Your Customer contract"}}, "setWhitelist(address,bool)": {"details": "Setting the whitelist status for an address", "params": {"status": "True, if the address is whitelisted, false otherwise", "who": "Whose whitelist status will be changed"}}, "transferOwnership(address)": {"details": "Allows the current owner to transfer control of the contract to a newOwner.", "params": {"newOwner": "The address to transfer ownership to."}}, "verify(address,address,uint256)": {"details": "Checking if transfer can happen, and if so, what is the right amount", "params": {"from": "The account sending the tokens", "to": "The account receiving the tokens", "value": "The indended amount"}, "return": "The actual amount permitted"}}}, "userdoc": {"methods": {}}}, "settings": {"compilationTarget": {"contracts/security-token/AdvancedTransferAgent.sol": "AdvancedTransferAgent"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/security-token/AdvancedTransferAgent.sol": {"keccak256": "0x5201fb9366b0f58587eb6668bbc04892f6e889e9135262f368ba2595a65a5ff8", "urls": ["bzzr://c4a71df3d56bd87e7104450a5ddc3cb9d312d381c6e88fbdffb56ef93c9d1ee4"]}, "contracts/security-token/KYCInterface.sol": {"keccak256": "0x29b1037cfb17f26421589f64eb271362aa9fbfd1f975e68df8071fd98be2052c", "urls": ["bzzr://f815559e1245fd3603a1baf5f3ad7ed7d571690b35f131cb27e0fcf8246c34a4"]}, "contracts/security-token/RestrictedTransferAgent.sol": {"keccak256": "0x4b240be52a599b8e850756a3d1ef2c3fc6ef8e059d8c3a90776fea658df045ec", "urls": ["bzzr://616b9b9cc0f7addefdbf352cb8ffa5c10f81e6ceee88a13dbd436dd9097db7dd"]}, "contracts/security-token/SecurityTransferAgentInterface.sol": {"keccak256": "0x23b8a61926435e2c583480c0de72a99b4f7ec8a4213ffc46711f83ecdeaf9186", "urls": ["bzzr://36be13b6cf1389357679705bd18969409ecde684ace2d9c5b606d8986e0231cd"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}}, "version": 1}, "name": "AdvancedTransferAgent", "ordered_full_dependencies": [], "source_path": "contracts/security-token/AdvancedTransferAgent.sol", "source": "\n\ninterface KYCInterface {\n event Whitelisted(address who, uint128 nonce);\n\n function isWhitelisted(address who) external view returns(bool);\n}\n\n\n\n\ninterface SecurityTransferAgent {\n function verify(address from, address to, uint256 value) public view returns (uint256 newValue);\n}\n\n\ncontract RestrictedTransferAgent is SecurityTransferAgent {\n\n KYCInterface KYC;\n\n function RestrictedTransferAgent(KYCInterface _KYC) {\n KYC = _KYC;\n }\n\n /**\n * @dev Checking if transfer can happen, and if so, what is the right amount\n *\n * @param from The account sending the tokens\n * @param to The account receiving the tokens\n * @param value The indended amount\n * @return The actual amount permitted\n */\n function verify(address from, address to, uint256 value) public view returns (uint256 newValue) {\n if (address(KYC) == address(0)) {\n return value;\n }\n\n if (KYC.isWhitelisted(to)) {\n return value;\n } else {\n return 0;\n }\n }\n}\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\ncontract AdvancedTransferAgent is RestrictedTransferAgent, Ownable {\n /** @dev Mapping of addresses which are permitted to make a transfer in any situation: */\n mapping(address => bool) whitelist;\n /** @dev Mapping of addresses which are prohibited to make a transfer in any situation: */\n mapping(address => bool) blacklist;\n\n /** @dev This event is emitted when whitelisting status (true/false) of an address changes: */\n event Whitelisted(address who, bool status);\n /** @dev This event is emitted when blackilisting status (true/false) of an address changes: */\n event Blacklisted(address who, bool status);\n /** @dev This event is emitted when KYC verifier contract address is changed: */\n event ChangedKYC(address newKYC);\n\n /**\n * @dev Constructor taking a contract implementing KYCInterface as the argument\n * @param _KYC a contract implementing KYCInterface for KYC checking\n */\n function AdvancedTransferAgent(KYCInterface _KYC) RestrictedTransferAgent(_KYC) {\n }\n\n /**\n * @dev Setting the whitelist status for an address\n *\n * @param who Whose whitelist status will be changed\n * @param status True, if the address is whitelisted, false otherwise\n */\n function setWhitelist(address who, bool status) public onlyOwner {\n whitelist[who] = status;\n Whitelisted(who, status);\n }\n\n /**\n * @dev Setting KYC contract address\n *\n * @param _KYC Address of the new Know Your Customer contract\n */\n function setKYC(KYCInterface _KYC) public onlyOwner {\n KYC = _KYC;\n\n ChangedKYC(KYC);\n }\n\n /**\n * @dev Setting the blacklist status for an address\n *\n * @param who Whose blacklist status will be changed\n * @param status True, if the address is blacklisted, false otherwise\n */\n function setBlacklist(address who, bool status) public onlyOwner {\n blacklist[who] = status;\n Blacklisted(who, status);\n }\n\n /**\n * @dev Checking if transfer can happen, and if so, what is the right amount\n *\n * @param from The account sending the tokens\n * @param to The account receiving the tokens\n * @param value The indended amount\n * @return The actual amount permitted\n */\n function verify(address from, address to, uint256 value) public view returns (uint256 newValue) {\n /* We invoke RestrictedTransferAgent here, because whatever it wants to do\n (like KYC checks if KYC is specified), we want to do too. */\n if (blacklist[from] || blacklist[to]) {\n return 0;\n } else {\n if (whitelist[from] || whitelist[to]) {\n return value;\n } else {\n return RestrictedTransferAgent.verify(from, to, value);\n }\n }\n }\n}\n"}, "AllocatedCrowdsale": {"abi": [{"constant": true, "inputs": [], "name": "ownerTestValue", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "requireCustomerId", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "invest", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "isPricingSane", "outputs": [{"name": "sane", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "endsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "minimumFundingGoal", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getState", "outputs": [{"name": "", "type": "uint8"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setFinalizeAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "customerId", "type": "uint128"}, {"name": "v", "type": "uint8"}, {"name": "r", "type": "bytes32"}, {"name": "s", "type": "bytes32"}], "name": "investWithSignedAddress", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "investedAmountOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "finalizeAgent", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "receiver", "type": "address"}, {"name": "fullTokens", "type": "uint256"}, {"name": "weiPrice", "type": "uint256"}], "name": "preallocate", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "beneficiary", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "weiRaised", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isCrowdsale", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "finalize", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_pricingStrategy", "type": "address"}], "name": "setPricingStrategy", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "tokensSold", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "refund", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "signerAddress", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "weiRefunded", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "halt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}, {"name": "checksum", "type": "bytes1"}], "name": "buyWithCustomerIdWithChecksum", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "time", "type": "uint256"}], "name": "setEndsAt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "pricingStrategy", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "loadedRefund", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isMinimumGoalReached", "outputs": [{"name": "reached", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "bool"}], "name": "setRequireCustomerId", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "loadRefund", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "val", "type": "uint256"}], "name": "setOwnerTestValue", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "weisTotal", "type": "uint256"}, {"name": "pricePerToken", "type": "uint256"}], "name": "calculateTokens", "outputs": [{"name": "tokensTotal", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "multisigWallet", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "tokenAmountOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}], "name": "buyWithCustomerId", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [{"name": "weiAmount", "type": "uint256"}, {"name": "tokenAmount", "type": "uint256"}, {"name": "weiRaisedTotal", "type": "uint256"}, {"name": "tokensSoldTotal", "type": "uint256"}], "name": "isBreakingCap", "outputs": [{"name": "limitBroken", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "buy", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "isFinalizerSane", "outputs": [{"name": "sane", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "startsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "finalized", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "halted", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "earlyParticipantWhitelist", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "unhalt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "requiredSignedAddress", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isCrowdsaleFull", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "investorCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getTokensLeft", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "status", "type": "bool"}], "name": "setEarlyParicipantWhitelist", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "bool"}, {"name": "_signerAddress", "type": "address"}], "name": "setRequireSignedAddress", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "customerId", "type": "uint128"}], "name": "investWithCustomerId", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setMultisig", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}, {"name": "v", "type": "uint8"}, {"name": "r", "type": "bytes32"}, {"name": "s", "type": "bytes32"}], "name": "buyWithSignedAddress", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "presaleWeiRaised", "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": "_token", "type": "address"}, {"name": "_pricingStrategy", "type": "address"}, {"name": "_multisigWallet", "type": "address"}, {"name": "_start", "type": "uint256"}, {"name": "_end", "type": "uint256"}, {"name": "_minimumFundingGoal", "type": "uint256"}, {"name": "_beneficiary", "type": "address"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"payable": true, "stateMutability": "payable", "type": "fallback"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}, {"indexed": false, "name": "tokenAmount", "type": "uint256"}, {"indexed": false, "name": "customerId", "type": "uint128"}], "name": "Invested", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}], "name": "Refund", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newRequireCustomerId", "type": "bool"}, {"indexed": false, "name": "newRequiredSignedAddress", "type": "bool"}, {"indexed": false, "name": "newSignerAddress", "type": "address"}], "name": "InvestmentPolicyChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "addr", "type": "address"}, {"indexed": false, "name": "status", "type": "bool"}], "name": "Whitelisted", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newEndsAt", "type": "uint256"}], "name": "EndsAtChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "bytecode": "0x6080604052600560015560006009556000600a556000600b556000600c556000600d556000600e553480156200003457600080fd5b5060405160e0806200282883398101604090815281516020830151918301516060840151608085015160a086015160c0909601516000805433600160a060020a0319918216811782161790915560028054909116600160a060020a038716179055939592939192909186868686868686868686868686620000be856401000000006200015c810204565b60058054600160a060020a031916600160a060020a038681169190911791829055161515620000ec57600080fd5b821515620000f957600080fd5b60078390558115156200010b57600080fd5b600882905560075482116200011f57600080fd5b600655505060148054600160a060020a031916600160a060020a03959095169490941790935550620002299e505050505050505050505050505050565b600054600160a060020a031633146200017457600080fd5b60038054600160a060020a031916600160a060020a038381169190911791829055604080517f04bbc255000000000000000000000000000000000000000000000000000000008152905192909116916304bbc255916004808201926020929091908290030181600087803b158015620001ec57600080fd5b505af115801562000201573d6000803e3d6000fd5b505050506040513d60208110156200021857600080fd5b505115156200022657600080fd5b50565b6125ef80620002396000396000f30060806040526004361061029d5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630226401d81146102a257806303ca0eed146102c957806303f9c793146102f2578063062b01ce146103085780630a09284a1461031d57806313f4e977146103325780631865c57d1461034757806319b667da146103805780631a49803b146103a15780631aae3460146103d657806321d5c0f6146103f757806332013ac31461042857806338af3eed1461044f5780634042b66f146104645780634551dd59146104795780634bb278f31461048e57806350c67734146104a3578063518ab2a8146104c4578063590e1ae3146104d95780635b7633d0146104ee5780635da89ac0146105035780635ed7ca5b146105185780636203f09f1461052d57806363c6082f146105425780636e50eb3f1461058457806378b99c241461059c578063797d9437146105b15780637c2e08a3146105c65780637f7d711e146105db57806387612102146105f55780638d51faec146105fd5780638da5cb5b14610615578063903cc5831461062a5780639075becf1461064557806397b150ca1461065a57806399e9376c1461067b5780639d3c663f14610698578063a6f2ae3a146106b9578063a7ba44c3146106c1578063af468682146106d6578063b3f05b97146106eb578063b9b8af0b14610700578063cb16e6d014610715578063cb3e64fd14610736578063d222dc041461074b578063d5d0902114610760578063d7e64c0014610775578063de5f98661461078a578063eac249321461079f578063ed68ff2c146107c5578063ef869443146107eb578063f2fde38b14610814578063f3283fba14610835578063f486972614610856578063f7c00e2f1461087f578063fc0c546a14610894575b600080fd5b3480156102ae57600080fd5b506102b76108a9565b60408051918252519081900360200190f35b3480156102d557600080fd5b506102de6108af565b604080519115158252519081900360200190f35b610306600160a060020a03600435166108d0565b005b34801561031457600080fd5b506102de610930565b34801561032957600080fd5b506102b76109c7565b34801561033e57600080fd5b506102b76109cd565b34801561035357600080fd5b5061035c6109d3565b6040518082600781111561036c57fe5b60ff16815260200191505060405180910390f35b34801561038c57600080fd5b50610306600160a060020a0360043516610bc1565b610306600160a060020a03600435166fffffffffffffffffffffffffffffffff6024351660ff60443516606435608435610c92565b3480156103e257600080fd5b506102b7600160a060020a0360043516610db5565b34801561040357600080fd5b5061040c610dc7565b60408051600160a060020a039092168252519081900360200190f35b34801561043457600080fd5b50610306600160a060020a0360043516602435604435610dd6565b34801561045b57600080fd5b5061040c61118c565b34801561047057600080fd5b506102b761119b565b34801561048557600080fd5b506102de6111a1565b34801561049a57600080fd5b506103066111a6565b3480156104af57600080fd5b50610306600160a060020a03600435166112ab565b3480156104d057600080fd5b506102b7611346565b3480156104e557600080fd5b5061030661134c565b3480156104fa57600080fd5b5061040c611492565b34801561050f57600080fd5b506102b76114a1565b34801561052457600080fd5b506103066114a7565b34801561053957600080fd5b506102b76114f5565b6103066fffffffffffffffffffffffffffffffff600435167fff00000000000000000000000000000000000000000000000000000000000000602435166114fb565b34801561059057600080fd5b5061030660043561156d565b3480156105a857600080fd5b5061040c6115db565b3480156105bd57600080fd5b506102b76115ea565b3480156105d257600080fd5b506102de6115f0565b3480156105e757600080fd5b5061030660043515156115fb565b6103066116c3565b34801561060957600080fd5b50610306600435611783565b34801561062157600080fd5b5061040c61179f565b34801561063657600080fd5b506102b76004356024356117ae565b34801561065157600080fd5b5061040c611905565b34801561066657600080fd5b506102b7600160a060020a0360043516611914565b6103066fffffffffffffffffffffffffffffffff60043516611926565b3480156106a457600080fd5b506102de600435602435604435606435611930565b610306611955565b3480156106cd57600080fd5b506102de611960565b3480156106e257600080fd5b506102b76119ce565b3480156106f757600080fd5b506102de6119d4565b34801561070c57600080fd5b506102de6119dd565b34801561072157600080fd5b506102de600160a060020a03600435166119fe565b34801561074257600080fd5b50610306611a13565b34801561075757600080fd5b506102de611a73565b34801561076c57600080fd5b506102de611a95565b34801561078157600080fd5b506102b7611aa5565b34801561079657600080fd5b506102b7611aab565b3480156107ab57600080fd5b50610306600160a060020a03600435166024351515611b1f565b3480156107d157600080fd5b506103066004351515600160a060020a0360243516611b9a565b610306600160a060020a03600435166fffffffffffffffffffffffffffffffff60243516611c87565b34801561082057600080fd5b50610306600160a060020a0360043516611cdd565b34801561084157600080fd5b50610306600160a060020a0360043516611d71565b6103066fffffffffffffffffffffffffffffffff6004351660ff60243516604435606435611dc8565b34801561088b57600080fd5b506102b7611ddb565b3480156108a057600080fd5b5061040c611de1565b60135481565b60145474010000000000000000000000000000000000000000900460ff1681565b60145474010000000000000000000000000000000000000000900460ff16156108f857600080fd5b6014547501000000000000000000000000000000000000000000900460ff161561092157600080fd5b61092c816000611df0565b5050565b600354604080517f8e7682880000000000000000000000000000000000000000000000000000000081523060048201529051600092600160a060020a031691638e76828891602480830192602092919082900301818787803b15801561099557600080fd5b505af11580156109a9573d6000803e3d6000fd5b505050506040513d60208110156109bf57600080fd5b505190505b90565b60085481565b60065481565b600f5460009060ff16156109e9575060066109c4565b600454600160a060020a03161515610a03575060016109c4565b60048054604080517f82771c8e0000000000000000000000000000000000000000000000000000000081529051600160a060020a03909216926382771c8e9282820192602092908290030181600087803b158015610a6057600080fd5b505af1158015610a74573d6000803e3d6000fd5b505050506040513d6020811015610a8a57600080fd5b50511515610a9a575060016109c4565b600354604080517f8e7682880000000000000000000000000000000000000000000000000000000081523060048201529051600160a060020a0390921691638e768288916024808201926020929091908290030181600087803b158015610b0057600080fd5b505af1158015610b14573d6000803e3d6000fd5b505050506040513d6020811015610b2a57600080fd5b50511515610b3a575060016109c4565b600754421015610b4c575060026109c4565b6008544211158015610b635750610b61611a95565b155b15610b70575060036109c4565b610b786115f0565b15610b85575060046109c4565b610b8d6115f0565b158015610b9c57506000600a54115b8015610bac5750600a54600d5410155b15610bb9575060076109c4565b5060056109c4565b600054600160a060020a03163314610bd857600080fd5b6004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383811691909117808355604080517f614cb9040000000000000000000000000000000000000000000000000000000081529051919092169263614cb904928082019260209290918290030181600087803b158015610c5857600080fd5b505af1158015610c6c573d6000803e3d6000fd5b505050506040513d6020811015610c8257600080fd5b50511515610c8f57600080fd5b50565b60006002866040518082600160a060020a0316600160a060020a03166c010000000000000000000000000281526014019150506020604051808303816000865af1158015610ce4573d6000803e3d6000fd5b5050506040513d6020811015610cf957600080fd5b5051601554604080516000808252602082810180855286905260ff8a168385015260608301899052608083018890529251949550600160a060020a039093169360019360a08084019493601f198401939081900390910191865af1158015610d65573d6000803e3d6000fd5b50505060206040510351600160a060020a0316141515610d8457600080fd5b6fffffffffffffffffffffffffffffffff85161515610da257600080fd5b610dac8686611df0565b50505050505050565b60106020526000908152604090205481565b600454600160a060020a031681565b600080548190600160a060020a03163314610df057600080fd5b600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610e5c57600080fd5b505af1158015610e70573d6000803e3d6000fd5b505050506040513d6020811015610e8657600080fd5b5051600a8054604080516000805160206125a4833981519152815260048101929092528688026024830181905290519390920a8702945090925073__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f91604480820192602092909190829003018186803b158015610efc57600080fd5b505af4158015610f10573d6000803e3d6000fd5b505050506040513d6020811015610f2657600080fd5b5051600a55600954604080516000805160206125a483398151915281526004810192909252602482018490525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b158015610f8e57600080fd5b505af4158015610fa2573d6000803e3d6000fd5b505050506040513d6020811015610fb857600080fd5b5051600955600160a060020a0385166000908152601060209081526040918290205482516000805160206125a48339815191528152600481019190915260248101849052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561103657600080fd5b505af415801561104a573d6000803e3d6000fd5b505050506040513d602081101561106057600080fd5b5051600160a060020a03861660009081526010602090815260408083209390935560118152908290205482516000805160206125a48339815191528152600481019190915260248101859052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b1580156110e657600080fd5b505af41580156110fa573d6000803e3d6000fd5b505050506040513d602081101561111057600080fd5b5051600160a060020a0386166000908152601160205260409020556111358583611f97565b60408051600160a060020a0387168152602081018390528082018490526000606082015290517f0396f60aaad038749091d273dc13aaabc63db6e2271c7bad442d5cf25cc433509181900360800190a15050505050565b601454600160a060020a031681565b600a5481565b600190565b6004806111b16109d3565b60078111156111bc57fe5b146111c657600080fd5b600054600160a060020a031633146111dd57600080fd5b60005474010000000000000000000000000000000000000000900460ff161561120557600080fd5b600f5460ff161561121557600080fd5b600454600160a060020a03161561129b5760048054604080517f0bf318a30000000000000000000000000000000000000000000000000000000081529051600160a060020a0390921692630bf318a392828201926000929082900301818387803b15801561128257600080fd5b505af1158015611296573d6000803e3d6000fd5b505050505b50600f805460ff19166001179055565b600054600160a060020a031633146112c257600080fd5b6003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038381169190911791829055604080517f04bbc255000000000000000000000000000000000000000000000000000000008152905192909116916304bbc255916004808201926020929091908290030181600087803b158015610c5857600080fd5b60095481565b60006007806113596109d3565b600781111561136457fe5b1461136e57600080fd5b33600090815260106020526040902054915081151561138c57600080fd5b33600090815260106020908152604080832092909255600e5482516000805160206125a48339815191528152600481019190915260248101859052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561140157600080fd5b505af4158015611415573d6000803e3d6000fd5b505050506040513d602081101561142b57600080fd5b5051600e55604080513381526020810184905281517fbb28353e4598c3b9199101a66e0989549b659a59a54d2c27fbb183f1932c8e6d929181900390910190a1604051339083156108fc029084906000818181858888f19350505050151561092c57600080fd5b601554600160a060020a031681565b600e5481565b600054600160a060020a031633146114be57600080fd5b6000805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b60015481565b604080517001000000000000000000000000000000006fffffffffffffffffffffffffffffffff851602815290519081900360100190207fff000000000000000000000000000000000000000000000000000000000000009081169082161461156357600080fd5b61092c3383611c87565b600054600160a060020a0316331461158457600080fd5b8042111561159157600080fd5b8060075411156115a057600080fd5b60088190556040805182815290517fd34bb772c4ae9baa99db852f622773b31c7827e8ee818449fef20d30980bd3109181900360200190a150565b600354600160a060020a031681565b600d5481565b600654600a54101590565b600054600160a060020a0316331461161257600080fd5b6014805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000831515810291909117918290556015546040805160ff938504841615158152750100000000000000000000000000000000000000000090940490921615156020840152600160a060020a031682820152517f48d826081348f5f00e8a33c9ae8ce89ed4c6e88400b585a478bc203d9e8177d3916060908290030190a150565b6005806116ce6109d3565b60078111156116d957fe5b146116e357600080fd5b3415156116ef57600080fd5b600d54604080516000805160206125a4833981519152815260048101929092523460248301525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b15801561175157600080fd5b505af4158015611765573d6000803e3d6000fd5b505050506040513d602081101561177b57600080fd5b5051600d5550565b600054600160a060020a0316331461179a57600080fd5b601355565b600054600160a060020a031681565b600080600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561181d57600080fd5b505af1158015611831573d6000803e3d6000fd5b505050506040513d602081101561184757600080fd5b5051604080517f1d3b9edf00000000000000000000000000000000000000000000000000000000815260048101879052600a9290920a602483018190529051909250849173__contracts/SafeMathLib.sol:SafeMathLi__91631d3b9edf91604480820192602092909190829003018186803b1580156118c757600080fd5b505af41580156118db573d6000803e3d6000fd5b505050506040513d60208110156118f157600080fd5b50518115156118fc57fe5b04949350505050565b600554600160a060020a031681565b60116020526000908152604090205481565b610c8f3382611c87565b600061193a611aab565b8411156119495750600161194d565b5060005b949350505050565b61195e336108d0565b565b6000600460009054906101000a9004600160a060020a0316600160a060020a03166382771c8e6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561099557600080fd5b60075481565b600f5460ff1681565b60005474010000000000000000000000000000000000000000900460ff1681565b60126020526000908152604090205460ff1681565b600054600160a060020a03163314611a2a57600080fd5b60005474010000000000000000000000000000000000000000900460ff161515611a5357600080fd5b6000805474ff000000000000000000000000000000000000000019169055565b6014547501000000000000000000000000000000000000000000900460ff1681565b6000611a9f611aab565b15905090565b600c5481565b60025460008054604080517fdd62ed3e000000000000000000000000000000000000000000000000000000008152600160a060020a03928316600482015230602482015290519293919091169163dd62ed3e9160448082019260209290919082900301818787803b15801561099557600080fd5b600054600160a060020a03163314611b3657600080fd5b600160a060020a038216600081815260126020908152604091829020805460ff191685151590811790915582519384529083015280517fa54714518c5d275fdcd3d2a461e4858e4e8cb04fb93cd0bca9d6d34115f264409281900390910190a15050565b600054600160a060020a03163314611bb157600080fd5b6014805475ff00000000000000000000000000000000000000000019167501000000000000000000000000000000000000000000841515810291909117918290556015805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0385811691909117918290556040805160ff74010000000000000000000000000000000000000000870481161515825294909504909316151560208501521682820152517f48d826081348f5f00e8a33c9ae8ce89ed4c6e88400b585a478bc203d9e8177d3916060908290030190a15050565b6014547501000000000000000000000000000000000000000000900460ff1615611cb057600080fd5b6fffffffffffffffffffffffffffffffff81161515611cce57600080fd5b611cd88282611df0565b505050565b600054600160a060020a03163314611cf457600080fd5b600160a060020a0381161515611d0957600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600054600160a060020a03163314611d8857600080fd5b600154600c541115611d9957600080fd5b6005805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b611dd53385858585610c92565b50505050565b600b5481565b600254600160a060020a031681565b6000805474010000000000000000000000000000000000000000900460ff1615611e1957600080fd5b611f908383600360009054906101000a9004600160a060020a0316600160a060020a03166318a4155e34600b54600a540360095433600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015611eba57600080fd5b505af1158015611ece573d6000803e3d6000fd5b505050506040513d6020811015611ee457600080fd5b5051604080517c010000000000000000000000000000000000000000000000000000000063ffffffff8916028152600481019690965260248601949094526044850192909252600160a060020a0316606484015260848301525160a48083019260209291908290030181600087803b158015611f5f57600080fd5b505af1158015611f73573d6000803e3d6000fd5b505050506040513d6020811015611f8957600080fd5b5051612048565b9392505050565b600254601454604080517f23b872dd000000000000000000000000000000000000000000000000000000008152600160a060020a039283166004820152858316602482015260448101859052905191909216916323b872dd9160648083019260209291908290030181600087803b15801561201157600080fd5b505af1158015612025573d6000803e3d6000fd5b505050506040513d602081101561203b57600080fd5b5051151561092c57600080fd5b60008054819074010000000000000000000000000000000000000000900460ff161561207357600080fd5b600261207d6109d3565b600781111561208857fe5b14156120ba57600160a060020a03851660009081526012602052604090205460ff1615156120b557600080fd5b6120d6565b60036120c46109d3565b60078111156120cf57fe5b141561029d575b50348215156120e457600080fd5b600160a060020a038516600090815260106020526040902054151561210d57600c805460010190555b600160a060020a0385166000908152601060209081526040918290205482516000805160206125a48339815191528152600481019190915260248101849052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561218657600080fd5b505af415801561219a573d6000803e3d6000fd5b505050506040513d60208110156121b057600080fd5b5051600160a060020a03861660009081526010602090815260408083209390935560118152908290205482516000805160206125a48339815191528152600481019190915260248101869052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561223657600080fd5b505af415801561224a573d6000803e3d6000fd5b505050506040513d602081101561226057600080fd5b5051600160a060020a03861660009081526011602090815260409182902092909255600a5481516000805160206125a48339815191528152600481019190915260248101849052905173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f9260448082019391829003018186803b1580156122e057600080fd5b505af41580156122f4573d6000803e3d6000fd5b505050506040513d602081101561230a57600080fd5b5051600a55600954604080516000805160206125a483398151915281526004810192909252602482018590525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b15801561237257600080fd5b505af4158015612386573d6000803e3d6000fd5b505050506040513d602081101561239c57600080fd5b5051600955600354604080517ff14ae17d000000000000000000000000000000000000000000000000000000008152600160a060020a0388811660048301529151919092169163f14ae17d9160248083019260209291908290030181600087803b15801561240957600080fd5b505af115801561241d573d6000803e3d6000fd5b505050506040513d602081101561243357600080fd5b5051156124e157600b5473__contracts/SafeMathLib.sol:SafeMathLi__6366098d4f9091836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b1580156124b157600080fd5b505af41580156124c5573d6000803e3d6000fd5b505050506040513d60208110156124db57600080fd5b5051600b555b6124f18184600a54600954611930565b156124fb57600080fd5b6125058584611f97565b600554604051600160a060020a039091169082156108fc029083906000818181858888f19350505050151561253957600080fd5b60408051600160a060020a0387168152602081018390528082018590526fffffffffffffffffffffffffffffffff8616606082015290517f0396f60aaad038749091d273dc13aaabc63db6e2271c7bad442d5cf25cc433509181900360800190a150909392505050560066098d4f00000000000000000000000000000000000000000000000000000000a165627a7a723058201d3c976e51bf33951a89b23c90d24b0970825cf30c97d2cec529d0ad116500b00029", "bytecode_runtime": "0x60806040526004361061029d5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630226401d81146102a257806303ca0eed146102c957806303f9c793146102f2578063062b01ce146103085780630a09284a1461031d57806313f4e977146103325780631865c57d1461034757806319b667da146103805780631a49803b146103a15780631aae3460146103d657806321d5c0f6146103f757806332013ac31461042857806338af3eed1461044f5780634042b66f146104645780634551dd59146104795780634bb278f31461048e57806350c67734146104a3578063518ab2a8146104c4578063590e1ae3146104d95780635b7633d0146104ee5780635da89ac0146105035780635ed7ca5b146105185780636203f09f1461052d57806363c6082f146105425780636e50eb3f1461058457806378b99c241461059c578063797d9437146105b15780637c2e08a3146105c65780637f7d711e146105db57806387612102146105f55780638d51faec146105fd5780638da5cb5b14610615578063903cc5831461062a5780639075becf1461064557806397b150ca1461065a57806399e9376c1461067b5780639d3c663f14610698578063a6f2ae3a146106b9578063a7ba44c3146106c1578063af468682146106d6578063b3f05b97146106eb578063b9b8af0b14610700578063cb16e6d014610715578063cb3e64fd14610736578063d222dc041461074b578063d5d0902114610760578063d7e64c0014610775578063de5f98661461078a578063eac249321461079f578063ed68ff2c146107c5578063ef869443146107eb578063f2fde38b14610814578063f3283fba14610835578063f486972614610856578063f7c00e2f1461087f578063fc0c546a14610894575b600080fd5b3480156102ae57600080fd5b506102b76108a9565b60408051918252519081900360200190f35b3480156102d557600080fd5b506102de6108af565b604080519115158252519081900360200190f35b610306600160a060020a03600435166108d0565b005b34801561031457600080fd5b506102de610930565b34801561032957600080fd5b506102b76109c7565b34801561033e57600080fd5b506102b76109cd565b34801561035357600080fd5b5061035c6109d3565b6040518082600781111561036c57fe5b60ff16815260200191505060405180910390f35b34801561038c57600080fd5b50610306600160a060020a0360043516610bc1565b610306600160a060020a03600435166fffffffffffffffffffffffffffffffff6024351660ff60443516606435608435610c92565b3480156103e257600080fd5b506102b7600160a060020a0360043516610db5565b34801561040357600080fd5b5061040c610dc7565b60408051600160a060020a039092168252519081900360200190f35b34801561043457600080fd5b50610306600160a060020a0360043516602435604435610dd6565b34801561045b57600080fd5b5061040c61118c565b34801561047057600080fd5b506102b761119b565b34801561048557600080fd5b506102de6111a1565b34801561049a57600080fd5b506103066111a6565b3480156104af57600080fd5b50610306600160a060020a03600435166112ab565b3480156104d057600080fd5b506102b7611346565b3480156104e557600080fd5b5061030661134c565b3480156104fa57600080fd5b5061040c611492565b34801561050f57600080fd5b506102b76114a1565b34801561052457600080fd5b506103066114a7565b34801561053957600080fd5b506102b76114f5565b6103066fffffffffffffffffffffffffffffffff600435167fff00000000000000000000000000000000000000000000000000000000000000602435166114fb565b34801561059057600080fd5b5061030660043561156d565b3480156105a857600080fd5b5061040c6115db565b3480156105bd57600080fd5b506102b76115ea565b3480156105d257600080fd5b506102de6115f0565b3480156105e757600080fd5b5061030660043515156115fb565b6103066116c3565b34801561060957600080fd5b50610306600435611783565b34801561062157600080fd5b5061040c61179f565b34801561063657600080fd5b506102b76004356024356117ae565b34801561065157600080fd5b5061040c611905565b34801561066657600080fd5b506102b7600160a060020a0360043516611914565b6103066fffffffffffffffffffffffffffffffff60043516611926565b3480156106a457600080fd5b506102de600435602435604435606435611930565b610306611955565b3480156106cd57600080fd5b506102de611960565b3480156106e257600080fd5b506102b76119ce565b3480156106f757600080fd5b506102de6119d4565b34801561070c57600080fd5b506102de6119dd565b34801561072157600080fd5b506102de600160a060020a03600435166119fe565b34801561074257600080fd5b50610306611a13565b34801561075757600080fd5b506102de611a73565b34801561076c57600080fd5b506102de611a95565b34801561078157600080fd5b506102b7611aa5565b34801561079657600080fd5b506102b7611aab565b3480156107ab57600080fd5b50610306600160a060020a03600435166024351515611b1f565b3480156107d157600080fd5b506103066004351515600160a060020a0360243516611b9a565b610306600160a060020a03600435166fffffffffffffffffffffffffffffffff60243516611c87565b34801561082057600080fd5b50610306600160a060020a0360043516611cdd565b34801561084157600080fd5b50610306600160a060020a0360043516611d71565b6103066fffffffffffffffffffffffffffffffff6004351660ff60243516604435606435611dc8565b34801561088b57600080fd5b506102b7611ddb565b3480156108a057600080fd5b5061040c611de1565b60135481565b60145474010000000000000000000000000000000000000000900460ff1681565b60145474010000000000000000000000000000000000000000900460ff16156108f857600080fd5b6014547501000000000000000000000000000000000000000000900460ff161561092157600080fd5b61092c816000611df0565b5050565b600354604080517f8e7682880000000000000000000000000000000000000000000000000000000081523060048201529051600092600160a060020a031691638e76828891602480830192602092919082900301818787803b15801561099557600080fd5b505af11580156109a9573d6000803e3d6000fd5b505050506040513d60208110156109bf57600080fd5b505190505b90565b60085481565b60065481565b600f5460009060ff16156109e9575060066109c4565b600454600160a060020a03161515610a03575060016109c4565b60048054604080517f82771c8e0000000000000000000000000000000000000000000000000000000081529051600160a060020a03909216926382771c8e9282820192602092908290030181600087803b158015610a6057600080fd5b505af1158015610a74573d6000803e3d6000fd5b505050506040513d6020811015610a8a57600080fd5b50511515610a9a575060016109c4565b600354604080517f8e7682880000000000000000000000000000000000000000000000000000000081523060048201529051600160a060020a0390921691638e768288916024808201926020929091908290030181600087803b158015610b0057600080fd5b505af1158015610b14573d6000803e3d6000fd5b505050506040513d6020811015610b2a57600080fd5b50511515610b3a575060016109c4565b600754421015610b4c575060026109c4565b6008544211158015610b635750610b61611a95565b155b15610b70575060036109c4565b610b786115f0565b15610b85575060046109c4565b610b8d6115f0565b158015610b9c57506000600a54115b8015610bac5750600a54600d5410155b15610bb9575060076109c4565b5060056109c4565b600054600160a060020a03163314610bd857600080fd5b6004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383811691909117808355604080517f614cb9040000000000000000000000000000000000000000000000000000000081529051919092169263614cb904928082019260209290918290030181600087803b158015610c5857600080fd5b505af1158015610c6c573d6000803e3d6000fd5b505050506040513d6020811015610c8257600080fd5b50511515610c8f57600080fd5b50565b60006002866040518082600160a060020a0316600160a060020a03166c010000000000000000000000000281526014019150506020604051808303816000865af1158015610ce4573d6000803e3d6000fd5b5050506040513d6020811015610cf957600080fd5b5051601554604080516000808252602082810180855286905260ff8a168385015260608301899052608083018890529251949550600160a060020a039093169360019360a08084019493601f198401939081900390910191865af1158015610d65573d6000803e3d6000fd5b50505060206040510351600160a060020a0316141515610d8457600080fd5b6fffffffffffffffffffffffffffffffff85161515610da257600080fd5b610dac8686611df0565b50505050505050565b60106020526000908152604090205481565b600454600160a060020a031681565b600080548190600160a060020a03163314610df057600080fd5b600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610e5c57600080fd5b505af1158015610e70573d6000803e3d6000fd5b505050506040513d6020811015610e8657600080fd5b5051600a8054604080516000805160206125a4833981519152815260048101929092528688026024830181905290519390920a8702945090925073__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f91604480820192602092909190829003018186803b158015610efc57600080fd5b505af4158015610f10573d6000803e3d6000fd5b505050506040513d6020811015610f2657600080fd5b5051600a55600954604080516000805160206125a483398151915281526004810192909252602482018490525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b158015610f8e57600080fd5b505af4158015610fa2573d6000803e3d6000fd5b505050506040513d6020811015610fb857600080fd5b5051600955600160a060020a0385166000908152601060209081526040918290205482516000805160206125a48339815191528152600481019190915260248101849052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561103657600080fd5b505af415801561104a573d6000803e3d6000fd5b505050506040513d602081101561106057600080fd5b5051600160a060020a03861660009081526010602090815260408083209390935560118152908290205482516000805160206125a48339815191528152600481019190915260248101859052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b1580156110e657600080fd5b505af41580156110fa573d6000803e3d6000fd5b505050506040513d602081101561111057600080fd5b5051600160a060020a0386166000908152601160205260409020556111358583611f97565b60408051600160a060020a0387168152602081018390528082018490526000606082015290517f0396f60aaad038749091d273dc13aaabc63db6e2271c7bad442d5cf25cc433509181900360800190a15050505050565b601454600160a060020a031681565b600a5481565b600190565b6004806111b16109d3565b60078111156111bc57fe5b146111c657600080fd5b600054600160a060020a031633146111dd57600080fd5b60005474010000000000000000000000000000000000000000900460ff161561120557600080fd5b600f5460ff161561121557600080fd5b600454600160a060020a03161561129b5760048054604080517f0bf318a30000000000000000000000000000000000000000000000000000000081529051600160a060020a0390921692630bf318a392828201926000929082900301818387803b15801561128257600080fd5b505af1158015611296573d6000803e3d6000fd5b505050505b50600f805460ff19166001179055565b600054600160a060020a031633146112c257600080fd5b6003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038381169190911791829055604080517f04bbc255000000000000000000000000000000000000000000000000000000008152905192909116916304bbc255916004808201926020929091908290030181600087803b158015610c5857600080fd5b60095481565b60006007806113596109d3565b600781111561136457fe5b1461136e57600080fd5b33600090815260106020526040902054915081151561138c57600080fd5b33600090815260106020908152604080832092909255600e5482516000805160206125a48339815191528152600481019190915260248101859052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561140157600080fd5b505af4158015611415573d6000803e3d6000fd5b505050506040513d602081101561142b57600080fd5b5051600e55604080513381526020810184905281517fbb28353e4598c3b9199101a66e0989549b659a59a54d2c27fbb183f1932c8e6d929181900390910190a1604051339083156108fc029084906000818181858888f19350505050151561092c57600080fd5b601554600160a060020a031681565b600e5481565b600054600160a060020a031633146114be57600080fd5b6000805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b60015481565b604080517001000000000000000000000000000000006fffffffffffffffffffffffffffffffff851602815290519081900360100190207fff000000000000000000000000000000000000000000000000000000000000009081169082161461156357600080fd5b61092c3383611c87565b600054600160a060020a0316331461158457600080fd5b8042111561159157600080fd5b8060075411156115a057600080fd5b60088190556040805182815290517fd34bb772c4ae9baa99db852f622773b31c7827e8ee818449fef20d30980bd3109181900360200190a150565b600354600160a060020a031681565b600d5481565b600654600a54101590565b600054600160a060020a0316331461161257600080fd5b6014805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000831515810291909117918290556015546040805160ff938504841615158152750100000000000000000000000000000000000000000090940490921615156020840152600160a060020a031682820152517f48d826081348f5f00e8a33c9ae8ce89ed4c6e88400b585a478bc203d9e8177d3916060908290030190a150565b6005806116ce6109d3565b60078111156116d957fe5b146116e357600080fd5b3415156116ef57600080fd5b600d54604080516000805160206125a4833981519152815260048101929092523460248301525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b15801561175157600080fd5b505af4158015611765573d6000803e3d6000fd5b505050506040513d602081101561177b57600080fd5b5051600d5550565b600054600160a060020a0316331461179a57600080fd5b601355565b600054600160a060020a031681565b600080600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561181d57600080fd5b505af1158015611831573d6000803e3d6000fd5b505050506040513d602081101561184757600080fd5b5051604080517f1d3b9edf00000000000000000000000000000000000000000000000000000000815260048101879052600a9290920a602483018190529051909250849173__contracts/SafeMathLib.sol:SafeMathLi__91631d3b9edf91604480820192602092909190829003018186803b1580156118c757600080fd5b505af41580156118db573d6000803e3d6000fd5b505050506040513d60208110156118f157600080fd5b50518115156118fc57fe5b04949350505050565b600554600160a060020a031681565b60116020526000908152604090205481565b610c8f3382611c87565b600061193a611aab565b8411156119495750600161194d565b5060005b949350505050565b61195e336108d0565b565b6000600460009054906101000a9004600160a060020a0316600160a060020a03166382771c8e6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561099557600080fd5b60075481565b600f5460ff1681565b60005474010000000000000000000000000000000000000000900460ff1681565b60126020526000908152604090205460ff1681565b600054600160a060020a03163314611a2a57600080fd5b60005474010000000000000000000000000000000000000000900460ff161515611a5357600080fd5b6000805474ff000000000000000000000000000000000000000019169055565b6014547501000000000000000000000000000000000000000000900460ff1681565b6000611a9f611aab565b15905090565b600c5481565b60025460008054604080517fdd62ed3e000000000000000000000000000000000000000000000000000000008152600160a060020a03928316600482015230602482015290519293919091169163dd62ed3e9160448082019260209290919082900301818787803b15801561099557600080fd5b600054600160a060020a03163314611b3657600080fd5b600160a060020a038216600081815260126020908152604091829020805460ff191685151590811790915582519384529083015280517fa54714518c5d275fdcd3d2a461e4858e4e8cb04fb93cd0bca9d6d34115f264409281900390910190a15050565b600054600160a060020a03163314611bb157600080fd5b6014805475ff00000000000000000000000000000000000000000019167501000000000000000000000000000000000000000000841515810291909117918290556015805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0385811691909117918290556040805160ff74010000000000000000000000000000000000000000870481161515825294909504909316151560208501521682820152517f48d826081348f5f00e8a33c9ae8ce89ed4c6e88400b585a478bc203d9e8177d3916060908290030190a15050565b6014547501000000000000000000000000000000000000000000900460ff1615611cb057600080fd5b6fffffffffffffffffffffffffffffffff81161515611cce57600080fd5b611cd88282611df0565b505050565b600054600160a060020a03163314611cf457600080fd5b600160a060020a0381161515611d0957600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600054600160a060020a03163314611d8857600080fd5b600154600c541115611d9957600080fd5b6005805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b611dd53385858585610c92565b50505050565b600b5481565b600254600160a060020a031681565b6000805474010000000000000000000000000000000000000000900460ff1615611e1957600080fd5b611f908383600360009054906101000a9004600160a060020a0316600160a060020a03166318a4155e34600b54600a540360095433600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015611eba57600080fd5b505af1158015611ece573d6000803e3d6000fd5b505050506040513d6020811015611ee457600080fd5b5051604080517c010000000000000000000000000000000000000000000000000000000063ffffffff8916028152600481019690965260248601949094526044850192909252600160a060020a0316606484015260848301525160a48083019260209291908290030181600087803b158015611f5f57600080fd5b505af1158015611f73573d6000803e3d6000fd5b505050506040513d6020811015611f8957600080fd5b5051612048565b9392505050565b600254601454604080517f23b872dd000000000000000000000000000000000000000000000000000000008152600160a060020a039283166004820152858316602482015260448101859052905191909216916323b872dd9160648083019260209291908290030181600087803b15801561201157600080fd5b505af1158015612025573d6000803e3d6000fd5b505050506040513d602081101561203b57600080fd5b5051151561092c57600080fd5b60008054819074010000000000000000000000000000000000000000900460ff161561207357600080fd5b600261207d6109d3565b600781111561208857fe5b14156120ba57600160a060020a03851660009081526012602052604090205460ff1615156120b557600080fd5b6120d6565b60036120c46109d3565b60078111156120cf57fe5b141561029d575b50348215156120e457600080fd5b600160a060020a038516600090815260106020526040902054151561210d57600c805460010190555b600160a060020a0385166000908152601060209081526040918290205482516000805160206125a48339815191528152600481019190915260248101849052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561218657600080fd5b505af415801561219a573d6000803e3d6000fd5b505050506040513d60208110156121b057600080fd5b5051600160a060020a03861660009081526010602090815260408083209390935560118152908290205482516000805160206125a48339815191528152600481019190915260248101869052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561223657600080fd5b505af415801561224a573d6000803e3d6000fd5b505050506040513d602081101561226057600080fd5b5051600160a060020a03861660009081526011602090815260409182902092909255600a5481516000805160206125a48339815191528152600481019190915260248101849052905173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f9260448082019391829003018186803b1580156122e057600080fd5b505af41580156122f4573d6000803e3d6000fd5b505050506040513d602081101561230a57600080fd5b5051600a55600954604080516000805160206125a483398151915281526004810192909252602482018590525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b15801561237257600080fd5b505af4158015612386573d6000803e3d6000fd5b505050506040513d602081101561239c57600080fd5b5051600955600354604080517ff14ae17d000000000000000000000000000000000000000000000000000000008152600160a060020a0388811660048301529151919092169163f14ae17d9160248083019260209291908290030181600087803b15801561240957600080fd5b505af115801561241d573d6000803e3d6000fd5b505050506040513d602081101561243357600080fd5b5051156124e157600b5473__contracts/SafeMathLib.sol:SafeMathLi__6366098d4f9091836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b1580156124b157600080fd5b505af41580156124c5573d6000803e3d6000fd5b505050506040513d60208110156124db57600080fd5b5051600b555b6124f18184600a54600954611930565b156124fb57600080fd5b6125058584611f97565b600554604051600160a060020a039091169082156108fc029083906000818181858888f19350505050151561253957600080fd5b60408051600160a060020a0387168152602081018390528082018590526fffffffffffffffffffffffffffffffff8616606082015290517f0396f60aaad038749091d273dc13aaabc63db6e2271c7bad442d5cf25cc433509181900360800190a150909392505050560066098d4f00000000000000000000000000000000000000000000000000000000a165627a7a723058201d3c976e51bf33951a89b23c90d24b0970825cf30c97d2cec529d0ad116500b00029", "direct_dependencies": ["SafeMathLib"], "full_dependencies": ["SafeMathLib"], "linkrefs": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 8694}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 8988}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 9330}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 9682}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 11272}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 12962}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 13708}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 18194}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 18546}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 18888}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 19172}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 19696}], "linkrefs_runtime": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 7556}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 7850}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 8192}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 8544}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 10134}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 11824}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 12570}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 17056}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 17408}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 17750}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 18034}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 18558}], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": true, "inputs": [], "name": "ownerTestValue", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "requireCustomerId", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "invest", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "isPricingSane", "outputs": [{"name": "sane", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "endsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "minimumFundingGoal", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getState", "outputs": [{"name": "", "type": "uint8"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setFinalizeAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "customerId", "type": "uint128"}, {"name": "v", "type": "uint8"}, {"name": "r", "type": "bytes32"}, {"name": "s", "type": "bytes32"}], "name": "investWithSignedAddress", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "investedAmountOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "finalizeAgent", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "receiver", "type": "address"}, {"name": "fullTokens", "type": "uint256"}, {"name": "weiPrice", "type": "uint256"}], "name": "preallocate", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "beneficiary", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "weiRaised", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isCrowdsale", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "finalize", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_pricingStrategy", "type": "address"}], "name": "setPricingStrategy", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "tokensSold", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "refund", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "signerAddress", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "weiRefunded", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "halt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}, {"name": "checksum", "type": "bytes1"}], "name": "buyWithCustomerIdWithChecksum", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "time", "type": "uint256"}], "name": "setEndsAt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "pricingStrategy", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "loadedRefund", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isMinimumGoalReached", "outputs": [{"name": "reached", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "bool"}], "name": "setRequireCustomerId", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "loadRefund", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "val", "type": "uint256"}], "name": "setOwnerTestValue", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "weisTotal", "type": "uint256"}, {"name": "pricePerToken", "type": "uint256"}], "name": "calculateTokens", "outputs": [{"name": "tokensTotal", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "multisigWallet", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "tokenAmountOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}], "name": "buyWithCustomerId", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [{"name": "weiAmount", "type": "uint256"}, {"name": "tokenAmount", "type": "uint256"}, {"name": "weiRaisedTotal", "type": "uint256"}, {"name": "tokensSoldTotal", "type": "uint256"}], "name": "isBreakingCap", "outputs": [{"name": "limitBroken", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "buy", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "isFinalizerSane", "outputs": [{"name": "sane", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "startsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "finalized", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "halted", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "earlyParticipantWhitelist", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "unhalt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "requiredSignedAddress", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isCrowdsaleFull", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "investorCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getTokensLeft", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "status", "type": "bool"}], "name": "setEarlyParicipantWhitelist", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "bool"}, {"name": "_signerAddress", "type": "address"}], "name": "setRequireSignedAddress", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "customerId", "type": "uint128"}], "name": "investWithCustomerId", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setMultisig", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}, {"name": "v", "type": "uint8"}, {"name": "r", "type": "bytes32"}, {"name": "s", "type": "bytes32"}], "name": "buyWithSignedAddress", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "presaleWeiRaised", "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": "_token", "type": "address"}, {"name": "_pricingStrategy", "type": "address"}, {"name": "_multisigWallet", "type": "address"}, {"name": "_start", "type": "uint256"}, {"name": "_end", "type": "uint256"}, {"name": "_minimumFundingGoal", "type": "uint256"}, {"name": "_beneficiary", "type": "address"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"payable": true, "stateMutability": "payable", "type": "fallback"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}, {"indexed": false, "name": "tokenAmount", "type": "uint256"}, {"indexed": false, "name": "customerId", "type": "uint128"}], "name": "Invested", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}], "name": "Refund", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newRequireCustomerId", "type": "bool"}, {"indexed": false, "name": "newRequiredSignedAddress", "type": "bool"}, {"indexed": false, "name": "newSignerAddress", "type": "address"}], "name": "InvestmentPolicyChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "addr", "type": "address"}, {"indexed": false, "name": "status", "type": "bool"}], "name": "Whitelisted", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newEndsAt", "type": "uint256"}], "name": "EndsAtChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "devdoc": {"methods": {"calculateTokens(uint256,uint256)": {"details": "Calculate tokens user will have for their purchase", "params": {"pricePerToken": "What is the price for one token", "weisTotal": "How much ethers (in wei) the user putssssss in"}, "return": "tokensTotal which is received tokens, token decimals included"}, "isMinimumGoalReached()": {"return": "true if the crowdsale has raised enough money to be a successful."}, "preallocate(address,uint256,uint256)": {"params": {"fullTokens": "tokens as full tokens - decimal places added internally", "weiPrice": "Price of a single full token in wei "}}, "transferOwnership(address)": {"details": "Allows the current owner to transfer control of the contract to a newOwner.", "params": {"newOwner": "The address to transfer ownership to."}}}}, "userdoc": {"methods": {"buy()": {"notice": "The basic entry point to participate the crowdsale process. * Pay for funding, get invested tokens back in the sender address."}, "buyWithCustomerId(uint128)": {"notice": "Legacy API signature."}, "buyWithCustomerIdWithChecksum(uint128,bytes1)": {"notice": "Invest to tokens, recognize the payer. "}, "buyWithSignedAddress(uint128,uint8,bytes32,bytes32)": {"notice": "Invest to tokens, recognize the payer and clear his address. "}, "finalize()": {"notice": "Finalize a succcesful crowdsale. * The owner can triggre a call the contract that provides post-crowdsale actions, like releasing the tokens."}, "getState()": {"notice": "Crowdfund state machine management. * We make it a function and do not assign the result to a variable, so there is no chance of the variable being stale."}, "getTokensLeft()": {"notice": "Get the amount of unsold tokens allocated to this contract;"}, "invest(address)": {"notice": "Allow anonymous contributions to this crowdsale."}, "investWithCustomerId(address,uint128)": {"notice": "Track who is the customer making the payment so we can send thank you email."}, "investWithSignedAddress(address,uint128,uint8,bytes32,bytes32)": {"notice": "Allow anonymous contributions to this crowdsale."}, "isBreakingCap(uint256,uint256,uint256,uint256)": {"notice": "Called from invest() to confirm if the curret investment does not break our cap rule."}, "isCrowdsale()": {"notice": "Interface marker. "}, "isCrowdsaleFull()": {"notice": "We are sold out when our approve pool becomes empty."}, "isFinalizerSane()": {"notice": "Check if the contract relationship looks good."}, "isPricingSane()": {"notice": "Check if the contract relationship looks good."}, "loadRefund()": {"notice": "Allow load refunds back on the contract for the refunding. * The team can transfer the funds back on the smart contract in the case the minimum goal was not reached.."}, "preallocate(address,uint256,uint256)": {"notice": "Preallocate tokens for the early investors. * Preallocated tokens have been sold before the actual crowdsale opens. This function mints the tokens and moves the crowdsale needle. * Investor count is not handled; it is assumed this goes for multiple investors and the token distribution happens outside the smart contract flow. * No money is exchanged, as the crowdsale team already have received the payment."}, "refund()": {"notice": "Investors can claim refund. * Note that any refunds from proxy buyers should be handled separately, and not through this contract."}, "setEarlyParicipantWhitelist(address,bool)": {"notice": "Allow addresses to do early participation. * TODO: Fix spelling error in the name"}, "setEndsAt(uint256)": {"notice": "Allow crowdsale owner to close early or extend the crowdsale. * This is useful e.g. for a manual soft cap implementation: - after X amount is reached determine manual closing * This may put the crowdsale to an invalid state, but we trust owners know what they are doing. "}, "setFinalizeAgent(address)": {"notice": "Allow to (re)set finalize agent. * Design choice: no state restrictions on setting this, so that we can fix fat finger mistakes."}, "setMultisig(address)": {"notice": "Allow to change the team multisig address in the case of emergency. * This allows to save a deployed crowdsale wallet in the case the crowdsale has not yet begun (we have done only few test transactions). After the crowdsale is going then multisig address stays locked for the safety reasons."}, "setOwnerTestValue(uint256)": {"notice": "This is for manual testing of multisig wallet interaction "}, "setPricingStrategy(address)": {"notice": "Allow to (re)set pricing strategy. * Design choice: no state restrictions on the set, so that we can fix fat finger mistakes."}, "setRequireCustomerId(bool)": {"notice": "Set policy do we need to have server-side customer ids for the investments. "}, "setRequireSignedAddress(bool,address)": {"notice": "Set policy if all investors must be cleared on the server side first. * This is e.g. for the accredited investor clearing. "}}}}, "settings": {"compilationTarget": {"contracts/AllocatedCrowdsale.sol": "AllocatedCrowdsale"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/AllocatedCrowdsale.sol": {"keccak256": "0x372bc2a112cc03ceedadd84590c9a3bcd6cec3e80ff31f77c9fc24935b67e8ef", "urls": ["bzzr://074dd9cf92ee40b8232c72f88f85a0cd2f33fb50b3a65ec69ef48ce8f240559f"]}, "contracts/AllocatedCrowdsaleMixin.sol": {"keccak256": "0xb0f304a6316b4dd97ae57cbb99962b474f6bf14d90b5ff20d6d61d3b4f363da0", "urls": ["bzzr://342e3e02fb4570a64954190dff8a3664b6c11b9d01807e90a0a71be4c4a975ce"]}, "contracts/Crowdsale.sol": {"keccak256": "0x2697c26528f64bb954a7c2547d3b43317d2d2b02c7d9d05a7b1ab388cd79f65d", "urls": ["bzzr://f28b280794222114141c51dd5c388d403a7c98d8b51e04170a0e294246d5164b"]}, "contracts/CrowdsaleBase.sol": {"keccak256": "0xe2c9ed11183ce705616980df7b02544d72fe18b40395da7d9d4bcb621fb87871", "urls": ["bzzr://07f3887ba0d0eb3248b1ad3581480ed71a2fe70a47dcc283c4e97c8c92e0790a"]}, "contracts/FinalizeAgent.sol": {"keccak256": "0x309fd0510e0b3e2b5044e33f7c80cfb2d6f2a5697e41a5f185931d65770cfea9", "urls": ["bzzr://4e7ed6f82c0f542e92e56c12566b2ecd7666730865bf12566c27587ec64160ac"]}, "contracts/FractionalERC20.sol": {"keccak256": "0x75bc4ad90a8b13ce961c89b1bf405776f616e019d3a2720168f8e52be223198f", "urls": ["bzzr://6a3688f12da1a5c890ef06f80f883f6c5370886092d38a1b33cd4219b718478b"]}, "contracts/Haltable.sol": {"keccak256": "0x265dcf25e7c9ab4b6eecd2181f1b71334a1b5381a60f8db7d9526dab120f4b70", "urls": ["bzzr://d522e00fa9e075941469dd81738b59fdb99ce3c12cdc39e33abe40b588c4da9b"]}, "contracts/PricingStrategy.sol": {"keccak256": "0x8df5093b7d07168ad994f9176de0bd2268f6563b1e8a3a448d8cfe7fe246c628", "urls": ["bzzr://ef5c944d51f739ab34e2c951d6ac82a7152e6bb844058a8e57bae52c14cbe16b"]}, "contracts/SafeMathLib.sol": {"keccak256": "0x501bfe31e274b9a5591f7c540bdced4d4312e27d4f19599147c9bbca3d9c6b18", "urls": ["bzzr://a80935ebddb06c247d71372d4e5833ee029f08633bd0fe4a274a57009567e5b9"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}}, "version": 1}, "name": "AllocatedCrowdsale", "ordered_full_dependencies": ["SafeMathLib"], "source_path": "contracts/AllocatedCrowdsale.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n/*\n * Haltable\n *\n * Abstract contract that allows children to implement an\n * emergency stop mechanism. Differs from Pausable by causing a throw when in halt mode.\n *\n *\n * Originally envisioned in FirstBlood ICO contract.\n */\ncontract Haltable is Ownable {\n bool public halted;\n\n modifier stopInEmergency {\n if (halted) throw;\n _;\n }\n\n modifier stopNonOwnersInEmergency {\n if (halted && msg.sender != owner) throw;\n _;\n }\n\n modifier onlyInEmergency {\n if (!halted) throw;\n _;\n }\n\n // called by the owner on emergency, triggers stopped state\n function halt() external onlyOwner {\n halted = true;\n }\n\n // called by the owner on end of emergency, returns to normal state\n function unhalt() external onlyOwner onlyInEmergency {\n halted = false;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Safe unsigned safe math.\n *\n * https://blog.aragon.one/library-driven-development-in-solidity-2bebcaf88736#.750gwtwli\n *\n * Originally from https://raw.githubusercontent.com/AragonOne/zeppelin-solidity/master/contracts/SafeMathLib.sol\n *\n * Maintained here until merged to mainline zeppelin-solidity.\n *\n */\nlibrary SafeMathLib {\n\n function times(uint a, uint b) returns (uint) {\n uint c = a * b;\n assert(a == 0 || c / a == b);\n return c;\n }\n\n function minus(uint a, uint b) returns (uint) {\n assert(b <= a);\n return a - b;\n }\n\n function plus(uint a, uint b) returns (uint) {\n uint c = a + b;\n assert(c>=a);\n return c;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n\n/**\n * A token that defines fractional units as decimals.\n */\ncontract FractionalERC20 is ERC20 {\n\n uint public decimals;\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Interface for defining crowdsale pricing.\n */\ncontract PricingStrategy {\n\n /** Interface declaration. */\n function isPricingStrategy() public constant returns (bool) {\n return true;\n }\n\n /** Self check if all references are correctly set.\n *\n * Checks that pricing strategy matches crowdsale parameters.\n */\n function isSane(address crowdsale) public constant returns (bool) {\n return true;\n }\n\n /**\n * @dev Pricing tells if this is a presale purchase or not.\n @param purchaser Address of the purchaser\n @return False by default, true if a presale purchaser\n */\n function isPresalePurchase(address purchaser) public constant returns (bool) {\n return false;\n }\n\n /**\n * When somebody tries to buy tokens for X eth, calculate how many tokens they get.\n *\n *\n * @param value - What is the value of the transaction send in as wei\n * @param tokensSold - how much tokens have been sold this far\n * @param weiRaised - how much money has been raised this far in the main token sale - this number excludes presale\n * @param msgSender - who is the investor of this transaction\n * @param decimals - how many decimal units the token has\n * @return Amount of tokens the investor receives\n */\n function calculatePrice(uint value, uint weiRaised, uint tokensSold, address msgSender, uint decimals) public constant returns (uint tokenAmount);\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Finalize agent defines what happens at the end of succeseful crowdsale.\n *\n * - Allocate tokens for founders, bounties and community\n * - Make tokens transferable\n * - etc.\n */\ncontract FinalizeAgent {\n\n function isFinalizeAgent() public constant returns(bool) {\n return true;\n }\n\n /** Return true if we can run finalizeCrowdsale() properly.\n *\n * This is a safety check function that doesn't allow crowdsale to begin\n * unless the finalizer has been set up properly.\n */\n function isSane() public constant returns (bool);\n\n /** Called once by crowdsale finalize() if the sale was success. */\n function finalizeCrowdsale();\n\n}\n\n\n\n/**\n * Crowdsale state machine without buy functionality.\n *\n * Implements basic state machine logic, but leaves out all buy functions,\n * so that subclasses can implement their own buying logic.\n *\n *\n * For the default buy() implementation see Crowdsale.sol.\n */\ncontract CrowdsaleBase is Haltable {\n\n /* Max investment count when we are still allowed to change the multisig address */\n uint public MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE = 5;\n\n using SafeMathLib for uint;\n\n /* The token we are selling */\n FractionalERC20 public token;\n\n /* How we are going to price our offering */\n PricingStrategy public pricingStrategy;\n\n /* Post-success callback */\n FinalizeAgent public finalizeAgent;\n\n /* tokens will be transfered from this address */\n address public multisigWallet;\n\n /* if the funding goal is not reached, investors may withdraw their funds */\n uint public minimumFundingGoal;\n\n /* the UNIX timestamp start date of the crowdsale */\n uint public startsAt;\n\n /* the UNIX timestamp end date of the crowdsale */\n uint public endsAt;\n\n /* the number of tokens already sold through this contract*/\n uint public tokensSold = 0;\n\n /* How many wei of funding we have raised */\n uint public weiRaised = 0;\n\n /* Calculate incoming funds from presale contracts and addresses */\n uint public presaleWeiRaised = 0;\n\n /* How many distinct addresses have invested */\n uint public investorCount = 0;\n\n /* How much wei we have returned back to the contract after a failed crowdfund. */\n uint public loadedRefund = 0;\n\n /* How much wei we have given back to investors.*/\n uint public weiRefunded = 0;\n\n /* Has this crowdsale been finalized */\n bool public finalized;\n\n /** How much ETH each address has invested to this crowdsale */\n mapping (address => uint256) public investedAmountOf;\n\n /** How much tokens this crowdsale has credited for each investor address */\n mapping (address => uint256) public tokenAmountOf;\n\n /** Addresses that are allowed to invest even before ICO offical opens. For testing, for ICO partners, etc. */\n mapping (address => bool) public earlyParticipantWhitelist;\n\n /** This is for manul testing for the interaction from owner wallet. You can set it to any value and inspect this in blockchain explorer to see that crowdsale interaction works. */\n uint public ownerTestValue;\n\n /** State machine\n *\n * - Preparing: All contract initialization calls and variables have not been set yet\n * - Prefunding: We have not passed start time yet\n * - Funding: Active crowdsale\n * - Success: Minimum funding goal reached\n * - Failure: Minimum funding goal not reached before ending time\n * - Finalized: The finalized has been called and succesfully executed\n * - Refunding: Refunds are loaded on the contract for reclaim.\n */\n enum State{Unknown, Preparing, PreFunding, Funding, Success, Failure, Finalized, Refunding}\n\n // A new investment was made\n event Invested(address investor, uint weiAmount, uint tokenAmount, uint128 customerId);\n\n // Refund was processed for a contributor\n event Refund(address investor, uint weiAmount);\n\n // The rules were changed what kind of investments we accept\n event InvestmentPolicyChanged(bool newRequireCustomerId, bool newRequiredSignedAddress, address newSignerAddress);\n\n // Address early participation whitelist status changed\n event Whitelisted(address addr, bool status);\n\n // Crowdsale end time has been changed\n event EndsAtChanged(uint newEndsAt);\n\n function CrowdsaleBase(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal) {\n\n owner = msg.sender;\n\n token = FractionalERC20(_token);\n setPricingStrategy(_pricingStrategy);\n\n multisigWallet = _multisigWallet;\n if(multisigWallet == 0) {\n throw;\n }\n\n if(_start == 0) {\n throw;\n }\n\n startsAt = _start;\n\n if(_end == 0) {\n throw;\n }\n\n endsAt = _end;\n\n // Don't mess the dates\n if(startsAt >= endsAt) {\n throw;\n }\n\n // Minimum funding goal can be zero\n minimumFundingGoal = _minimumFundingGoal;\n }\n\n /**\n * Don't expect to just send in money and get tokens.\n */\n function() payable {\n throw;\n }\n\n /**\n * @dev Make an investment.\n *\n * Crowdsale must be running for one to invest.\n * We must have not pressed the emergency brake.\n *\n * @param receiver The Ethereum address who receives the tokens\n * @param customerId (optional) UUID v4 to track the successful payments on the server side'\n * @param tokenAmount Amount of tokens which be credited to receiver\n *\n * @return tokensBought How mony tokens were bought\n */\n function buyTokens(address receiver, uint128 customerId, uint256 tokenAmount) stopInEmergency internal returns(uint tokensBought) {\n\n // Determine if it's a good time to accept investment from this participant\n if(getState() == State.PreFunding) {\n // Are we whitelisted for early deposit\n if(!earlyParticipantWhitelist[receiver]) {\n throw;\n }\n } else if(getState() == State.Funding) {\n // Retail participants can only come in when the crowdsale is running\n // pass\n } else {\n // Unwanted state\n throw;\n }\n\n uint weiAmount = msg.value;\n\n // Dust transaction\n require(tokenAmount != 0);\n\n if(investedAmountOf[receiver] == 0) {\n // A new investor\n investorCount++;\n }\n\n // Update investor\n investedAmountOf[receiver] = investedAmountOf[receiver].plus(weiAmount);\n tokenAmountOf[receiver] = tokenAmountOf[receiver].plus(tokenAmount);\n\n // Update totals\n weiRaised = weiRaised.plus(weiAmount);\n tokensSold = tokensSold.plus(tokenAmount);\n\n if(pricingStrategy.isPresalePurchase(receiver)) {\n presaleWeiRaised = presaleWeiRaised.plus(weiAmount);\n }\n\n // Check that we did not bust the cap\n require(!isBreakingCap(weiAmount, tokenAmount, weiRaised, tokensSold));\n\n assignTokens(receiver, tokenAmount);\n\n // Pocket the money, or fail the crowdsale if we for some reason cannot send the money to our multisig\n if(!multisigWallet.send(weiAmount)) throw;\n\n // Tell us invest was success\n Invested(receiver, weiAmount, tokenAmount, customerId);\n\n return tokenAmount;\n }\n\n /**\n * @dev Make an investment based on pricing strategy\n *\n * This is a wrapper for buyTokens(), but the amount of tokens receiver will\n * have depends on the pricing strategy used.\n *\n * @param receiver The Ethereum address who receives the tokens\n * @param customerId (optional) UUID v4 to track the successful payments on the server side'\n *\n * @return tokensBought How mony tokens were bought\n */\n function investInternal(address receiver, uint128 customerId) stopInEmergency internal returns(uint tokensBought) {\n return buyTokens(receiver, customerId, pricingStrategy.calculatePrice(msg.value, weiRaised - presaleWeiRaised, tokensSold, msg.sender, token.decimals()));\n }\n\n /**\n * @dev Calculate tokens user will have for their purchase\n *\n * @param weisTotal How much ethers (in wei) the user putssssss in\n * @param pricePerToken What is the price for one token\n *\n * @return tokensTotal which is received tokens, token decimals included\n */\n function calculateTokens(uint256 weisTotal, uint256 pricePerToken) public constant returns(uint tokensTotal) {\n // pricePerToken is how many full tokens, token decimal place included, you get for wei amount.\n // Because, in theory, decimal amount can vary, we do the exponent calculation here,\n // though gas wise using 10**18 constant would be much simpler.\n // Furthermore we could use rough amounts and take in raw wei per tokens amount,\n // but we lose too much accuracy for generic calculations, thus all these are\n // practically implemented as 10**18 fixed points.\n uint multiplier = 10 ** token.decimals();\n return weisTotal.times(multiplier)/pricePerToken;\n }\n\n /**\n * Finalize a succcesful crowdsale.\n *\n * The owner can triggre a call the contract that provides post-crowdsale actions, like releasing the tokens.\n */\n function finalize() public inState(State.Success) onlyOwner stopInEmergency {\n\n // Already finalized\n if(finalized) {\n throw;\n }\n\n // Finalizing is optional. We only call it if we are given a finalizing agent.\n if(address(finalizeAgent) != 0) {\n finalizeAgent.finalizeCrowdsale();\n }\n\n finalized = true;\n }\n\n /**\n * Allow to (re)set finalize agent.\n *\n * Design choice: no state restrictions on setting this, so that we can fix fat finger mistakes.\n */\n function setFinalizeAgent(FinalizeAgent addr) onlyOwner {\n finalizeAgent = addr;\n\n // Don't allow setting bad agent\n if(!finalizeAgent.isFinalizeAgent()) {\n throw;\n }\n }\n\n /**\n * Allow crowdsale owner to close early or extend the crowdsale.\n *\n * This is useful e.g. for a manual soft cap implementation:\n * - after X amount is reached determine manual closing\n *\n * This may put the crowdsale to an invalid state,\n * but we trust owners know what they are doing.\n *\n */\n function setEndsAt(uint time) onlyOwner {\n\n if(now > time) {\n throw; // Don't change past\n }\n\n if(startsAt > time) {\n throw; // Prevent human mistakes\n }\n\n endsAt = time;\n EndsAtChanged(endsAt);\n }\n\n /**\n * Allow to (re)set pricing strategy.\n *\n * Design choice: no state restrictions on the set, so that we can fix fat finger mistakes.\n */\n function setPricingStrategy(PricingStrategy _pricingStrategy) onlyOwner {\n pricingStrategy = _pricingStrategy;\n\n // Don't allow setting bad agent\n if(!pricingStrategy.isPricingStrategy()) {\n throw;\n }\n }\n\n /**\n * Allow to change the team multisig address in the case of emergency.\n *\n * This allows to save a deployed crowdsale wallet in the case the crowdsale has not yet begun\n * (we have done only few test transactions). After the crowdsale is going\n * then multisig address stays locked for the safety reasons.\n */\n function setMultisig(address addr) public onlyOwner {\n\n // Change\n if(investorCount > MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE) {\n throw;\n }\n\n multisigWallet = addr;\n }\n\n /**\n * Allow load refunds back on the contract for the refunding.\n *\n * The team can transfer the funds back on the smart contract in the case the minimum goal was not reached..\n */\n function loadRefund() public payable inState(State.Failure) {\n if(msg.value == 0) throw;\n loadedRefund = loadedRefund.plus(msg.value);\n }\n\n /**\n * Investors can claim refund.\n *\n * Note that any refunds from proxy buyers should be handled separately,\n * and not through this contract.\n */\n function refund() public inState(State.Refunding) {\n uint256 weiValue = investedAmountOf[msg.sender];\n if (weiValue == 0) throw;\n investedAmountOf[msg.sender] = 0;\n weiRefunded = weiRefunded.plus(weiValue);\n Refund(msg.sender, weiValue);\n if (!msg.sender.send(weiValue)) throw;\n }\n\n /**\n * @return true if the crowdsale has raised enough money to be a successful.\n */\n function isMinimumGoalReached() public constant returns (bool reached) {\n return weiRaised >= minimumFundingGoal;\n }\n\n /**\n * Check if the contract relationship looks good.\n */\n function isFinalizerSane() public constant returns (bool sane) {\n return finalizeAgent.isSane();\n }\n\n /**\n * Check if the contract relationship looks good.\n */\n function isPricingSane() public constant returns (bool sane) {\n return pricingStrategy.isSane(address(this));\n }\n\n /**\n * Crowdfund state machine management.\n *\n * We make it a function and do not assign the result to a variable, so there is no chance of the variable being stale.\n */\n function getState() public constant returns (State) {\n if(finalized) return State.Finalized;\n else if (address(finalizeAgent) == 0) return State.Preparing;\n else if (!finalizeAgent.isSane()) return State.Preparing;\n else if (!pricingStrategy.isSane(address(this))) return State.Preparing;\n else if (block.timestamp < startsAt) return State.PreFunding;\n else if (block.timestamp <= endsAt && !isCrowdsaleFull()) return State.Funding;\n else if (isMinimumGoalReached()) return State.Success;\n else if (!isMinimumGoalReached() && weiRaised > 0 && loadedRefund >= weiRaised) return State.Refunding;\n else return State.Failure;\n }\n\n /** This is for manual testing of multisig wallet interaction */\n function setOwnerTestValue(uint val) onlyOwner {\n ownerTestValue = val;\n }\n\n /**\n * Allow addresses to do early participation.\n *\n * TODO: Fix spelling error in the name\n */\n function setEarlyParicipantWhitelist(address addr, bool status) onlyOwner {\n earlyParticipantWhitelist[addr] = status;\n Whitelisted(addr, status);\n }\n\n\n /** Interface marker. */\n function isCrowdsale() public constant returns (bool) {\n return true;\n }\n\n //\n // Modifiers\n //\n\n /** Modified allowing execution only if the crowdsale is currently running. */\n modifier inState(State state) {\n if(getState() != state) throw;\n _;\n }\n\n\n //\n // Abstract functions\n //\n\n /**\n * Check if the current invested breaks our cap rules.\n *\n *\n * The child contract must define their own cap setting rules.\n * We allow a lot of flexibility through different capping strategies (ETH, token count)\n * Called from invest().\n *\n * @param weiAmount The amount of wei the investor tries to invest in the current transaction\n * @param tokenAmount The amount of tokens we try to give to the investor in the current transaction\n * @param weiRaisedTotal What would be our total raised balance after this transaction\n * @param tokensSoldTotal What would be our total sold tokens count after this transaction\n *\n * @return true if taking this investment would break our cap rules\n */\n function isBreakingCap(uint weiAmount, uint tokenAmount, uint weiRaisedTotal, uint tokensSoldTotal) constant returns (bool limitBroken);\n\n /**\n * Check if the current crowdsale is full and we can no longer sell any tokens.\n */\n function isCrowdsaleFull() public constant returns (bool);\n\n /**\n * Create new tokens or transfer issued tokens to the investor depending on the cap model.\n */\n function assignTokens(address receiver, uint tokenAmount) internal;\n}\n\n\n/**\n * A mixin that is selling tokens from a preallocated pool\n *\n * - Tokens have precreated supply \"premined\"\n *\n * - Token owner must transfer sellable tokens to the crowdsale contract using ERC20.approve()\n *\n * - The mixin does not implement buy entry point.\n *\n */\ncontract AllocatedCrowdsaleMixin is CrowdsaleBase {\n\n /* The party who holds the full token pool and has approve()'ed tokens for this crowdsale */\n address public beneficiary;\n\n /**\n * @param _beneficiary The account who has performed approve() to allocate tokens for the token sale.\n *\n */\n function AllocatedCrowdsaleMixin(address _beneficiary) {\n beneficiary = _beneficiary;\n }\n\n /**\n * Called from invest() to confirm if the curret investment does not break our cap rule.\n */\n function isBreakingCap(uint weiAmount, uint tokenAmount, uint weiRaisedTotal, uint tokensSoldTotal) constant returns (bool limitBroken) {\n if(tokenAmount > getTokensLeft()) {\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * We are sold out when our approve pool becomes empty.\n */\n function isCrowdsaleFull() public constant returns (bool) {\n return getTokensLeft() == 0;\n }\n\n /**\n * Get the amount of unsold tokens allocated to this contract;\n */\n function getTokensLeft() public constant returns (uint) {\n return token.allowance(owner, this);\n }\n\n /**\n * Transfer tokens from approve() pool to the buyer.\n *\n * Use approve() given to this crowdsale to distribute the tokens.\n */\n function assignTokens(address receiver, uint tokenAmount) internal {\n if(!token.transferFrom(beneficiary, receiver, tokenAmount)) throw;\n }\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n\n\n\n\n/**\n * Abstract base contract for token sales with the default buy entry points.\n *\n * Handle\n * - start and end dates\n * - accepting investments\n * - minimum funding goal and refund\n * - various statistics during the crowdfund\n * - different pricing strategies\n * - different investment policies (require server side customer id, allow only whitelisted addresses)\n *\n * Does not Handle\n *\n * - Token allocation (minting vs. transfer)\n * - Cap rules\n *\n */\ncontract Crowdsale is CrowdsaleBase {\n\n /* Do we need to have unique contributor id for each customer */\n bool public requireCustomerId;\n\n /**\n * Do we verify that contributor has been cleared on the server side (accredited investors only).\n * This method was first used in FirstBlood crowdsale to ensure all contributors have accepted terms on sale (on the web).\n */\n bool public requiredSignedAddress;\n\n /* Server side address that signed allowed contributors (Ethereum addresses) that can participate the crowdsale */\n address public signerAddress;\n\n function Crowdsale(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal) CrowdsaleBase(_token, _pricingStrategy, _multisigWallet, _start, _end, _minimumFundingGoal) {\n }\n\n /**\n * Preallocate tokens for the early investors.\n *\n * Preallocated tokens have been sold before the actual crowdsale opens.\n * This function mints the tokens and moves the crowdsale needle.\n *\n * Investor count is not handled; it is assumed this goes for multiple investors\n * and the token distribution happens outside the smart contract flow.\n *\n * No money is exchanged, as the crowdsale team already have received the payment.\n *\n * @param fullTokens tokens as full tokens - decimal places added internally\n * @param weiPrice Price of a single full token in wei\n *\n */\n function preallocate(address receiver, uint fullTokens, uint weiPrice) public onlyOwner {\n\n uint tokenAmount = fullTokens * 10**token.decimals();\n uint weiAmount = weiPrice * fullTokens; // This can be also 0, we give out tokens for free\n\n weiRaised = weiRaised.plus(weiAmount);\n tokensSold = tokensSold.plus(tokenAmount);\n\n investedAmountOf[receiver] = investedAmountOf[receiver].plus(weiAmount);\n tokenAmountOf[receiver] = tokenAmountOf[receiver].plus(tokenAmount);\n\n assignTokens(receiver, tokenAmount);\n\n // Tell us invest was success\n Invested(receiver, weiAmount, tokenAmount, 0);\n }\n\n /**\n * Allow anonymous contributions to this crowdsale.\n */\n function investWithSignedAddress(address addr, uint128 customerId, uint8 v, bytes32 r, bytes32 s) public payable {\n bytes32 hash = sha256(addr);\n if (ecrecover(hash, v, r, s) != signerAddress) throw;\n if(customerId == 0) throw; // UUIDv4 sanity check\n investInternal(addr, customerId);\n }\n\n /**\n * Track who is the customer making the payment so we can send thank you email.\n */\n function investWithCustomerId(address addr, uint128 customerId) public payable {\n if(requiredSignedAddress) throw; // Crowdsale allows only server-side signed participants\n if(customerId == 0) throw; // UUIDv4 sanity check\n investInternal(addr, customerId);\n }\n\n /**\n * Allow anonymous contributions to this crowdsale.\n */\n function invest(address addr) public payable {\n if(requireCustomerId) throw; // Crowdsale needs to track participants for thank you email\n if(requiredSignedAddress) throw; // Crowdsale allows only server-side signed participants\n investInternal(addr, 0);\n }\n\n /**\n * Invest to tokens, recognize the payer and clear his address.\n *\n */\n function buyWithSignedAddress(uint128 customerId, uint8 v, bytes32 r, bytes32 s) public payable {\n investWithSignedAddress(msg.sender, customerId, v, r, s);\n }\n\n /**\n * Invest to tokens, recognize the payer.\n *\n */\n function buyWithCustomerIdWithChecksum(uint128 customerId, bytes1 checksum) public payable {\n // see customerid.py\n if (bytes1(sha3(customerId)) != checksum) throw;\n investWithCustomerId(msg.sender, customerId);\n }\n\n /**\n * Legacy API signature.\n */\n function buyWithCustomerId(uint128 customerId) public payable {\n investWithCustomerId(msg.sender, customerId);\n }\n\n /**\n * The basic entry point to participate the crowdsale process.\n *\n * Pay for funding, get invested tokens back in the sender address.\n */\n function buy() public payable {\n invest(msg.sender);\n }\n\n /**\n * Set policy do we need to have server-side customer ids for the investments.\n *\n */\n function setRequireCustomerId(bool value) onlyOwner {\n requireCustomerId = value;\n InvestmentPolicyChanged(requireCustomerId, requiredSignedAddress, signerAddress);\n }\n\n /**\n * Set policy if all investors must be cleared on the server side first.\n *\n * This is e.g. for the accredited investor clearing.\n *\n */\n function setRequireSignedAddress(bool value, address _signerAddress) onlyOwner {\n requiredSignedAddress = value;\n signerAddress = _signerAddress;\n InvestmentPolicyChanged(requireCustomerId, requiredSignedAddress, signerAddress);\n }\n\n}\n\n\n\n/**\n * An implementation of allocated crowdsale.\n *\n * This implementation does not have KYC logic (vs. KYCCrowdsale).\n *\n */\ncontract AllocatedCrowdsale is AllocatedCrowdsaleMixin, Crowdsale {\n\n function AllocatedCrowdsale(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal, address _beneficiary) Crowdsale(_token, _pricingStrategy, _multisigWallet, _start, _end, _minimumFundingGoal) AllocatedCrowdsaleMixin(_beneficiary) {\n\n }\n\n}\n"}, "AllocatedCrowdsaleMixin": {"abi": [{"constant": true, "inputs": [], "name": "ownerTestValue", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isPricingSane", "outputs": [{"name": "sane", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "endsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "minimumFundingGoal", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getState", "outputs": [{"name": "", "type": "uint8"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setFinalizeAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "investedAmountOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "finalizeAgent", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "beneficiary", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "weiRaised", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isCrowdsale", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "finalize", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_pricingStrategy", "type": "address"}], "name": "setPricingStrategy", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "tokensSold", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "refund", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "weiRefunded", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "halt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "time", "type": "uint256"}], "name": "setEndsAt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "pricingStrategy", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "loadedRefund", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isMinimumGoalReached", "outputs": [{"name": "reached", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "loadRefund", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "val", "type": "uint256"}], "name": "setOwnerTestValue", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "weisTotal", "type": "uint256"}, {"name": "pricePerToken", "type": "uint256"}], "name": "calculateTokens", "outputs": [{"name": "tokensTotal", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "multisigWallet", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "tokenAmountOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "weiAmount", "type": "uint256"}, {"name": "tokenAmount", "type": "uint256"}, {"name": "weiRaisedTotal", "type": "uint256"}, {"name": "tokensSoldTotal", "type": "uint256"}], "name": "isBreakingCap", "outputs": [{"name": "limitBroken", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isFinalizerSane", "outputs": [{"name": "sane", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "startsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "finalized", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "halted", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "earlyParticipantWhitelist", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "unhalt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "isCrowdsaleFull", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "investorCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getTokensLeft", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "status", "type": "bool"}], "name": "setEarlyParicipantWhitelist", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setMultisig", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "presaleWeiRaised", "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": "_beneficiary", "type": "address"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"payable": true, "stateMutability": "payable", "type": "fallback"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}, {"indexed": false, "name": "tokenAmount", "type": "uint256"}, {"indexed": false, "name": "customerId", "type": "uint128"}], "name": "Invested", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}], "name": "Refund", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newRequireCustomerId", "type": "bool"}, {"indexed": false, "name": "newRequiredSignedAddress", "type": "bool"}, {"indexed": false, "name": "newSignerAddress", "type": "address"}], "name": "InvestmentPolicyChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "addr", "type": "address"}, {"indexed": false, "name": "status", "type": "bool"}], "name": "Whitelisted", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newEndsAt", "type": "uint256"}], "name": "EndsAtChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "bytecode": "0x", "bytecode_runtime": "0x", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": null, "name": "AllocatedCrowdsaleMixin", "ordered_full_dependencies": [], "source_path": "contracts/AllocatedCrowdsaleMixin.sol"}, "Announcement": {"abi": [{"constant": true, "inputs": [], "name": "announcementHash", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "announcementType", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "announcementName", "outputs": [{"name": "", "type": "bytes32"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "announcementURI", "outputs": [{"name": "", "type": "bytes32"}], "payable": false, "stateMutability": "view", "type": "function"}], "bytecode": "0x", "bytecode_runtime": "0x", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": null, "name": "Announcement", "ordered_full_dependencies": [], "source_path": "contracts/security-token/AnnouncementInterface.sol"}, "BasicKYC": {"abi": [{"constant": true, "inputs": [{"name": "who", "type": "address"}], "name": "isWhitelisted", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "whitelist", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "who", "type": "address"}, {"name": "status", "type": "bool"}], "name": "whitelistUser", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "nonce", "type": "uint128"}, {"name": "v", "type": "uint8"}, {"name": "r", "type": "bytes32"}, {"name": "s", "type": "bytes32"}], "name": "whitelistMe", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "bytes32"}], "name": "hashes", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "who", "type": "address"}, {"indexed": false, "name": "status", "type": "bool"}], "name": "Whitelisted", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "who", "type": "address"}, {"indexed": false, "name": "nonce", "type": "uint128"}], "name": "Whitelisted", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "bytecode": "0x608060405234801561001057600080fd5b5060008054600160a060020a03191633179055610524806100326000396000f3006080604052600436106100825763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416633af32abf81146100875780638da5cb5b146100c95780639b19251a14610107578063a0ca3ee114610135578063bda9b45c1461016a578063d658d2e9146101a0578063f2fde38b146101b8575b600080fd5b34801561009357600080fd5b506100b573ffffffffffffffffffffffffffffffffffffffff600435166101e6565b604080519115158252519081900360200190f35b3480156100d557600080fd5b506100de610211565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561011357600080fd5b506100b573ffffffffffffffffffffffffffffffffffffffff6004351661022d565b34801561014157600080fd5b5061016873ffffffffffffffffffffffffffffffffffffffff600435166024351515610242565b005b34801561017657600080fd5b506101686fffffffffffffffffffffffffffffffff6004351660ff60243516604435606435610274565b3480156101ac57600080fd5b506100b56004356103aa565b3480156101c457600080fd5b5061016873ffffffffffffffffffffffffffffffffffffffff600435166103bf565b73ffffffffffffffffffffffffffffffffffffffff1660009081526001602052604090205460ff1690565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60016020526000908152604090205460ff1681565b60005473ffffffffffffffffffffffffffffffffffffffff16331461026657600080fd5b6102708282610487565b5050565b604080516c01000000000000000000000000330281527001000000000000000000000000000000006fffffffffffffffffffffffffffffffff8716026014820152815190819003602401902060008181526002602052919091205460ff16156102dc57600080fd5b6000805460408051838152602080820180845286905260ff8916828401526060820188905260808201879052915173ffffffffffffffffffffffffffffffffffffffff9093169360019360a08084019493601f19830193908390039091019190865af1158015610350573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff1614151561037c57600080fd5b6000818152600260205260409020805460ff191660019081179091556103a3903390610487565b5050505050565b60026020526000908152604090205460ff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1633146103e357600080fd5b73ffffffffffffffffffffffffffffffffffffffff8116151561040557600080fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff191673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b73ffffffffffffffffffffffffffffffffffffffff8216600081815260016020908152604091829020805460ff191685151590811790915582519384529083015280517fa54714518c5d275fdcd3d2a461e4858e4e8cb04fb93cd0bca9d6d34115f264409281900390910190a150505600a165627a7a7230582004fe75ea66e5ae4344247a416501d10eb5e9ae457c421d9ffbbb0924e89159c20029", "bytecode_runtime": "0x6080604052600436106100825763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416633af32abf81146100875780638da5cb5b146100c95780639b19251a14610107578063a0ca3ee114610135578063bda9b45c1461016a578063d658d2e9146101a0578063f2fde38b146101b8575b600080fd5b34801561009357600080fd5b506100b573ffffffffffffffffffffffffffffffffffffffff600435166101e6565b604080519115158252519081900360200190f35b3480156100d557600080fd5b506100de610211565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561011357600080fd5b506100b573ffffffffffffffffffffffffffffffffffffffff6004351661022d565b34801561014157600080fd5b5061016873ffffffffffffffffffffffffffffffffffffffff600435166024351515610242565b005b34801561017657600080fd5b506101686fffffffffffffffffffffffffffffffff6004351660ff60243516604435606435610274565b3480156101ac57600080fd5b506100b56004356103aa565b3480156101c457600080fd5b5061016873ffffffffffffffffffffffffffffffffffffffff600435166103bf565b73ffffffffffffffffffffffffffffffffffffffff1660009081526001602052604090205460ff1690565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60016020526000908152604090205460ff1681565b60005473ffffffffffffffffffffffffffffffffffffffff16331461026657600080fd5b6102708282610487565b5050565b604080516c01000000000000000000000000330281527001000000000000000000000000000000006fffffffffffffffffffffffffffffffff8716026014820152815190819003602401902060008181526002602052919091205460ff16156102dc57600080fd5b6000805460408051838152602080820180845286905260ff8916828401526060820188905260808201879052915173ffffffffffffffffffffffffffffffffffffffff9093169360019360a08084019493601f19830193908390039091019190865af1158015610350573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff1614151561037c57600080fd5b6000818152600260205260409020805460ff191660019081179091556103a3903390610487565b5050505050565b60026020526000908152604090205460ff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1633146103e357600080fd5b73ffffffffffffffffffffffffffffffffffffffff8116151561040557600080fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff191673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b73ffffffffffffffffffffffffffffffffffffffff8216600081815260016020908152604091829020805460ff191685151590811790915582519384529083015280517fa54714518c5d275fdcd3d2a461e4858e4e8cb04fb93cd0bca9d6d34115f264409281900390910190a150505600a165627a7a7230582004fe75ea66e5ae4344247a416501d10eb5e9ae457c421d9ffbbb0924e89159c20029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": true, "inputs": [{"name": "who", "type": "address"}], "name": "isWhitelisted", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "whitelist", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "who", "type": "address"}, {"name": "status", "type": "bool"}], "name": "whitelistUser", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "nonce", "type": "uint128"}, {"name": "v", "type": "uint8"}, {"name": "r", "type": "bytes32"}, {"name": "s", "type": "bytes32"}], "name": "whitelistMe", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "bytes32"}], "name": "hashes", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "who", "type": "address"}, {"indexed": false, "name": "status", "type": "bool"}], "name": "Whitelisted", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "who", "type": "address"}, {"indexed": false, "name": "nonce", "type": "uint128"}], "name": "Whitelisted", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "devdoc": {"author": "TokenMarket / Ville Sundell ", "methods": {"isWhitelisted(address)": {"details": "Check the whitelisting status of an address. Although \"whitelist\" is a public mapping, we provide this \"external\" function to optimize gas usage.", "params": {"who": "Address of the user whose whitelist status we want to check"}}, "transferOwnership(address)": {"details": "Allows the current owner to transfer control of the contract to a newOwner.", "params": {"newOwner": "The address to transfer ownership to."}}, "whitelistMe(uint128,uint8,bytes32,bytes32)": {"details": "Whitelist an address. User can whitelist themselves by using a signed message from server side.", "params": {"nonce": "Value to prevent re-use of the server side signed data", "r": "R of the server's key which was used to sign this transfer", "s": "S of the server's key which was used to sign this transfer", "v": "V of the server's key which was used to sign this transfer"}}, "whitelistUser(address,bool)": {"details": "Whitelist an address.", "params": {"status": "True for whitelisting, False for de-whitelisting", "who": "Address being whitelisted"}}}}, "userdoc": {"methods": {}}}, "settings": {"compilationTarget": {"contracts/security-token/BasicKYC.sol": "BasicKYC"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/security-token/BasicKYC.sol": {"keccak256": "0xb8493e83c6d5b18b71fe6abf34dd933896ae45a4e9d90ea8ae4bd484c8bf8eb0", "urls": ["bzzr://2eaaabfb18c4684acdd02bc56d4c26b5fb2ddfb6d26e2cbaa3182554b8baaa5f"]}, "contracts/security-token/KYCInterface.sol": {"keccak256": "0x29b1037cfb17f26421589f64eb271362aa9fbfd1f975e68df8071fd98be2052c", "urls": ["bzzr://f815559e1245fd3603a1baf5f3ad7ed7d571690b35f131cb27e0fcf8246c34a4"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}}, "version": 1}, "name": "BasicKYC", "ordered_full_dependencies": [], "source_path": "contracts/security-token/BasicKYC.sol", "source": "/**\n * This smart contract code is Copyright 2019 TokenMarket Ltd. For more information see https://tokenmarket.net\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n * NatSpec is used intentionally to cover also other than public functions\n * Solidity 0.4.18 is intentionally used: it's stable, and our framework is\n * based on that.\n */\n\n\n\ninterface KYCInterface {\n event Whitelisted(address who, uint128 nonce);\n\n function isWhitelisted(address who) external view returns(bool);\n}\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n/**\n * @author TokenMarket / Ville Sundell \n */\ncontract BasicKYC is Ownable, KYCInterface {\n /** @dev This mapping contains address which have completed the KYC: */\n mapping (address => bool) public whitelist;\n /** @dev This mapping contains signature hashes which have been already used: */\n mapping (bytes32 => bool) public hashes;\n\n /** @dev this event is emitted when address is whitelisted, including the nonce:*/\n event Whitelisted(address who, bool status);\n\n /** @dev Simple contructor, mainly because of a Populus bug. */\n function BasicKYC() Ownable() {\n // This is here for our verification code only\n }\n\n /**\n * @dev Whitelist an address.\n * @param who Address being whitelisted\n * @param status True for whitelisting, False for de-whitelisting\n */\n function setWhitelisting(address who, bool status) internal {\n whitelist[who] = status;\n\n Whitelisted(who, status);\n }\n\n /**\n * @dev Whitelist an address.\n * @param who Address being whitelisted\n * @param status True for whitelisting, False for de-whitelisting\n */\n function whitelistUser(address who, bool status) external onlyOwner {\n setWhitelisting(who, status);\n }\n\n /**\n * @dev Whitelist an address. User can whitelist themselves by using a\n * signed message from server side.\n * @param nonce Value to prevent re-use of the server side signed data\n * @param v V of the server's key which was used to sign this transfer\n * @param r R of the server's key which was used to sign this transfer\n * @param s S of the server's key which was used to sign this transfer\n */\n function whitelistMe(uint128 nonce, uint8 v, bytes32 r, bytes32 s) external {\n bytes32 hash = keccak256(msg.sender, nonce);\n require(hashes[hash] == false);\n require(ecrecover(hash, v, r, s) == owner);\n\n hashes[hash] = true;\n setWhitelisting(msg.sender, true);\n }\n\n /**\n * @dev Check the whitelisting status of an address.\n * Although \"whitelist\" is a public mapping, we provide this \"external\"\n * function to optimize gas usage.\n * @param who Address of the user whose whitelist status we want to check\n */\n function isWhitelisted(address who) external view returns(bool) {\n return whitelist[who];\n }\n}\n"}, "BasicToken": {"abi": [{"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "bytecode": "0x608060405234801561001057600080fd5b5061027f806100206000396000f3006080604052600436106100565763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166318160ddd811461005b57806370a0823114610082578063a9059cbb146100b0575b600080fd5b34801561006757600080fd5b506100706100f5565b60408051918252519081900360200190f35b34801561008e57600080fd5b5061007073ffffffffffffffffffffffffffffffffffffffff600435166100fb565b3480156100bc57600080fd5b506100e173ffffffffffffffffffffffffffffffffffffffff60043516602435610123565b604080519115158252519081900360200190f35b60015490565b73ffffffffffffffffffffffffffffffffffffffff1660009081526020819052604090205490565b600073ffffffffffffffffffffffffffffffffffffffff8316151561014757600080fd5b3360009081526020819052604090205482111561016357600080fd5b33600090815260208190526040902054610183908363ffffffff61022b16565b336000908152602081905260408082209290925573ffffffffffffffffffffffffffffffffffffffff8516815220546101c2908363ffffffff61023d16565b73ffffffffffffffffffffffffffffffffffffffff8416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b60008282111561023757fe5b50900390565b60008282018381101561024c57fe5b93925050505600a165627a7a72305820b0271c191dfed30f2c56d22549eda32c3232cba9c26b3437594ee49e1b7c46560029", "bytecode_runtime": "0x6080604052600436106100565763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166318160ddd811461005b57806370a0823114610082578063a9059cbb146100b0575b600080fd5b34801561006757600080fd5b506100706100f5565b60408051918252519081900360200190f35b34801561008e57600080fd5b5061007073ffffffffffffffffffffffffffffffffffffffff600435166100fb565b3480156100bc57600080fd5b506100e173ffffffffffffffffffffffffffffffffffffffff60043516602435610123565b604080519115158252519081900360200190f35b60015490565b73ffffffffffffffffffffffffffffffffffffffff1660009081526020819052604090205490565b600073ffffffffffffffffffffffffffffffffffffffff8316151561014757600080fd5b3360009081526020819052604090205482111561016357600080fd5b33600090815260208190526040902054610183908363ffffffff61022b16565b336000908152602081905260408082209290925573ffffffffffffffffffffffffffffffffffffffff8516815220546101c2908363ffffffff61023d16565b73ffffffffffffffffffffffffffffffffffffffff8416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b60008282111561023757fe5b50900390565b60008282018381101561024c57fe5b93925050505600a165627a7a72305820b0271c191dfed30f2c56d22549eda32c3232cba9c26b3437594ee49e1b7c46560029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "devdoc": {"methods": {"balanceOf(address)": {"details": "Gets the balance of the specified address.", "params": {"_owner": "The address to query the the balance of."}, "return": "An uint256 representing the amount owned by the passed address."}, "totalSupply()": {"details": "total number of tokens in existence"}, "transfer(address,uint256)": {"details": "transfer token for a specified address", "params": {"_to": "The address to transfer to.", "_value": "The amount to be transferred."}}}, "title": "Basic token"}, "userdoc": {"methods": {}}}, "settings": {"compilationTarget": {"zeppelin/contracts/token/ERC20/BasicToken.sol": "BasicToken"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"zeppelin/contracts/math/SafeMath.sol": {"keccak256": "0x341ba8cb467a3623e819ba1a683ac1d264005186f308505214e5f6bc89446a08", "urls": ["bzzr://59b5652ee4e4a1b5a8f1a8906e14c84af43d636cf5ca0725cc1813aabe4c8c17"]}, "zeppelin/contracts/token/ERC20/BasicToken.sol": {"keccak256": "0x948404468d61ff35ea4194650670408dabd65da7f905a1c16888ab84520bf39e", "urls": ["bzzr://ea75e20f95d7e4e10394fe6bfaa8eee56b4757c2a6f1e8df4180d33afa621935"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}}, "version": 1}, "name": "BasicToken", "ordered_full_dependencies": [], "source_path": "zeppelin/contracts/token/ERC20/BasicToken.sol", "source": "\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n assert(c / a == b);\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n\n\n\n/**\n * @title Basic token\n * @dev Basic version of StandardToken, with no allowances.\n */\ncontract BasicToken is ERC20Basic {\n using SafeMath for uint256;\n\n mapping(address => uint256) balances;\n\n uint256 totalSupply_;\n\n /**\n * @dev total number of tokens in existence\n */\n function totalSupply() public view returns (uint256) {\n return totalSupply_;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param _to The address to transfer to.\n * @param _value The amount to be transferred.\n */\n function transfer(address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[msg.sender]);\n\n // SafeMath.sub will throw if there is not enough balance.\n balances[msg.sender] = balances[msg.sender].sub(_value);\n balances[_to] = balances[_to].add(_value);\n Transfer(msg.sender, _to, _value);\n return true;\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param _owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address _owner) public view returns (uint256 balance) {\n return balances[_owner];\n }\n\n}\n"}, "BogusAnnouncement": {"abi": [{"constant": true, "inputs": [], "name": "announcementHash", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "announcementType", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "announcementName", "outputs": [{"name": "", "type": "bytes32"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "announcementURI", "outputs": [{"name": "", "type": "bytes32"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [{"name": "_announcementName", "type": "bytes32"}, {"name": "_announcementURI", "type": "bytes32"}, {"name": "_announcementType", "type": "uint256"}, {"name": "_announcementHash", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}], "bytecode": "0x608060405234801561001057600080fd5b50604051608080610156833981016040908152815160208301519183015160609093015160009190915560019190915560029190915560035560ff806100576000396000f300608060405260043610605c5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416631274c3f3811460615780635fcce2791460855780639ea0c08c146097578063f31294a41460a9575b600080fd5b348015606c57600080fd5b50607360bb565b60408051918252519081900360200190f35b348015609057600080fd5b50607360c1565b34801560a257600080fd5b50607360c7565b34801560b457600080fd5b50607360cd565b60035481565b60025481565b60005481565b600154815600a165627a7a72305820beabd9120ed9158857828e2e8fb1f905a15d61b9f66c7744b6b8cf644245051f0029", "bytecode_runtime": "0x608060405260043610605c5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416631274c3f3811460615780635fcce2791460855780639ea0c08c146097578063f31294a41460a9575b600080fd5b348015606c57600080fd5b50607360bb565b60408051918252519081900360200190f35b348015609057600080fd5b50607360c1565b34801560a257600080fd5b50607360c7565b34801560b457600080fd5b50607360cd565b60035481565b60025481565b60005481565b600154815600a165627a7a72305820beabd9120ed9158857828e2e8fb1f905a15d61b9f66c7744b6b8cf644245051f0029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": true, "inputs": [], "name": "announcementHash", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "announcementType", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "announcementName", "outputs": [{"name": "", "type": "bytes32"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "announcementURI", "outputs": [{"name": "", "type": "bytes32"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [{"name": "_announcementName", "type": "bytes32"}, {"name": "_announcementURI", "type": "bytes32"}, {"name": "_announcementType", "type": "uint256"}, {"name": "_announcementHash", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}], "devdoc": {"methods": {}}, "userdoc": {"methods": {}}}, "settings": {"compilationTarget": {"contracts/security-token/tests/BogusAnnouncement.sol": "BogusAnnouncement"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/security-token/tests/BogusAnnouncement.sol": {"keccak256": "0x2acace3c803b98f5aa174ddf3eb1af7dec2b67c4d6c34d1ef69fa88a2851a68b", "urls": ["bzzr://74b212027437f6f197cc0d9cd06f056e02be9595cf7b45582b41f14a080d51d3"]}}, "version": 1}, "name": "BogusAnnouncement", "ordered_full_dependencies": [], "source_path": "contracts/security-token/tests/BogusAnnouncement.sol", "source": "\ncontract BogusAnnouncement {\n bytes32 public announcementName;\n bytes32 public announcementURI;\n uint256 public announcementType;\n uint256 public announcementHash;\n\n function BogusAnnouncement(bytes32 _announcementName, bytes32 _announcementURI, uint256 _announcementType, uint256 _announcementHash) public {\n announcementName = _announcementName;\n announcementURI = _announcementURI;\n announcementType = _announcementType;\n announcementHash = _announcementHash;\n }\n}\n"}, "BonusFinalizeAgent": {"abi": [{"constant": false, "inputs": [], "name": "finalizeCrowdsale", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "isFinalizeAgent", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "allocatedBonus", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "bonusBasePoints", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isSane", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "crowdsale", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "teamMultisig", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "token", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [{"name": "_token", "type": "address"}, {"name": "_crowdsale", "type": "address"}, {"name": "_bonusBasePoints", "type": "uint256"}, {"name": "_teamMultisig", "type": "address"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}], "bytecode": "0x608060405234801561001057600080fd5b5060405160808061070a833981016040908152815160208301519183015160609093015160008054600160a060020a03808516600160a060020a031992831617909255600180548387169216919091179081905592949216151561007357600080fd5b60038054600160a060020a031916600160a060020a0383811691909117918290551615156100a057600080fd5b506002555050610655806100b56000396000f30060806040526004361061008d5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630bf318a38114610092578063614cb904146100a95780636a457ee9146100d25780637424bebc146100f957806382771c8e1461010e5780639c1e03a014610123578063dbc0c08514610161578063fc0c546a14610176575b600080fd5b34801561009e57600080fd5b506100a761018b565b005b3480156100b557600080fd5b506100be610434565b604080519115158252519081900360200190f35b3480156100de57600080fd5b506100e7610439565b60408051918252519081900360200190f35b34801561010557600080fd5b506100e761043f565b34801561011a57600080fd5b506100be610445565b34801561012f57600080fd5b506101386105d5565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561016d57600080fd5b506101386105f1565b34801561018257600080fd5b5061013861060d565b60015460009073ffffffffffffffffffffffffffffffffffffffff1633146101b257600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663518ab2a86040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561023857600080fd5b505af115801561024c573d6000803e3d6000fd5b505050506040513d602081101561026257600080fd5b5051600254604080517f1d3b9edf000000000000000000000000000000000000000000000000000000008152600481018490526024810192909252519192506127109173__contracts/SafeMathLib.sol:SafeMathLi__91631d3b9edf916044808301926020929190829003018186803b1580156102e057600080fd5b505af41580156102f4573d6000803e3d6000fd5b505050506040513d602081101561030a57600080fd5b505181151561031557fe5b04600481815560008054600354604080517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff92831695810195909552602485019590955293519316926340c10f1992604480820193929182900301818387803b15801561039857600080fd5b505af11580156103ac573d6000803e3d6000fd5b505060008054604080517f5f412d4f000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff9092169450635f412d4f9350600480820193929182900301818387803b15801561041957600080fd5b505af115801561042d573d6000803e3d6000fd5b5050505050565b600190565b60045481565b60025481565b60008054604080517f42c1867b000000000000000000000000000000000000000000000000000000008152306004820152905173ffffffffffffffffffffffffffffffffffffffff909216916342c1867b9160248082019260209290919082900301818787803b1580156104b857600080fd5b505af11580156104cc573d6000803e3d6000fd5b505050506040513d60208110156104e257600080fd5b5051151560011480156105d057503073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d1f276d36040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561058c57600080fd5b505af11580156105a0573d6000803e3d6000fd5b505050506040513d60208110156105b657600080fd5b505173ffffffffffffffffffffffffffffffffffffffff16145b905090565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff16815600a165627a7a7230582019d70dfba80c263654d1902f80a2780ab21de68666092d44c42939339e2f9de00029", "bytecode_runtime": "0x60806040526004361061008d5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630bf318a38114610092578063614cb904146100a95780636a457ee9146100d25780637424bebc146100f957806382771c8e1461010e5780639c1e03a014610123578063dbc0c08514610161578063fc0c546a14610176575b600080fd5b34801561009e57600080fd5b506100a761018b565b005b3480156100b557600080fd5b506100be610434565b604080519115158252519081900360200190f35b3480156100de57600080fd5b506100e7610439565b60408051918252519081900360200190f35b34801561010557600080fd5b506100e761043f565b34801561011a57600080fd5b506100be610445565b34801561012f57600080fd5b506101386105d5565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561016d57600080fd5b506101386105f1565b34801561018257600080fd5b5061013861060d565b60015460009073ffffffffffffffffffffffffffffffffffffffff1633146101b257600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663518ab2a86040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561023857600080fd5b505af115801561024c573d6000803e3d6000fd5b505050506040513d602081101561026257600080fd5b5051600254604080517f1d3b9edf000000000000000000000000000000000000000000000000000000008152600481018490526024810192909252519192506127109173__contracts/SafeMathLib.sol:SafeMathLi__91631d3b9edf916044808301926020929190829003018186803b1580156102e057600080fd5b505af41580156102f4573d6000803e3d6000fd5b505050506040513d602081101561030a57600080fd5b505181151561031557fe5b04600481815560008054600354604080517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff92831695810195909552602485019590955293519316926340c10f1992604480820193929182900301818387803b15801561039857600080fd5b505af11580156103ac573d6000803e3d6000fd5b505060008054604080517f5f412d4f000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff9092169450635f412d4f9350600480820193929182900301818387803b15801561041957600080fd5b505af115801561042d573d6000803e3d6000fd5b5050505050565b600190565b60045481565b60025481565b60008054604080517f42c1867b000000000000000000000000000000000000000000000000000000008152306004820152905173ffffffffffffffffffffffffffffffffffffffff909216916342c1867b9160248082019260209290919082900301818787803b1580156104b857600080fd5b505af11580156104cc573d6000803e3d6000fd5b505050506040513d60208110156104e257600080fd5b5051151560011480156105d057503073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d1f276d36040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561058c57600080fd5b505af11580156105a0573d6000803e3d6000fd5b505050506040513d60208110156105b657600080fd5b505173ffffffffffffffffffffffffffffffffffffffff16145b905090565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff16815600a165627a7a7230582019d70dfba80c263654d1902f80a2780ab21de68666092d44c42939339e2f9de00029", "direct_dependencies": ["SafeMathLib"], "full_dependencies": ["SafeMathLib"], "linkrefs": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 1720}], "linkrefs_runtime": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 1358}], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": false, "inputs": [], "name": "finalizeCrowdsale", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "isFinalizeAgent", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "allocatedBonus", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "bonusBasePoints", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isSane", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "crowdsale", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "teamMultisig", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "token", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [{"name": "_token", "type": "address"}, {"name": "_crowdsale", "type": "address"}, {"name": "_bonusBasePoints", "type": "uint256"}, {"name": "_teamMultisig", "type": "address"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}], "devdoc": {"methods": {}}, "userdoc": {"methods": {"finalizeCrowdsale()": {"notice": "Called once by crowdsale finalize() if the sale was success. "}}}}, "settings": {"compilationTarget": {"contracts/BonusFinalizeAgent.sol": "BonusFinalizeAgent"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/BonusFinalizeAgent.sol": {"keccak256": "0xb69e8580f1bc298dd3e1c0bea75175f6f9b5e53909e9e1414011b1cad3864274", "urls": ["bzzr://ef9419d0e13ec54843214aaf25623b11c7a39a231cd576ca3f34d53bbdaa89ba"]}, "contracts/Crowdsale.sol": {"keccak256": "0x2697c26528f64bb954a7c2547d3b43317d2d2b02c7d9d05a7b1ab388cd79f65d", "urls": ["bzzr://f28b280794222114141c51dd5c388d403a7c98d8b51e04170a0e294246d5164b"]}, "contracts/CrowdsaleBase.sol": {"keccak256": "0xe2c9ed11183ce705616980df7b02544d72fe18b40395da7d9d4bcb621fb87871", "urls": ["bzzr://07f3887ba0d0eb3248b1ad3581480ed71a2fe70a47dcc283c4e97c8c92e0790a"]}, "contracts/CrowdsaleToken.sol": {"keccak256": "0xa812687ac327cd19fac64667980e70d4fb72ef7f61dce477818d085cf0a915df", "urls": ["bzzr://826d9dda00ce341794e5bb05c78b1abb2728e3c631f7a542345dcfa9f3bd9c50"]}, "contracts/FinalizeAgent.sol": {"keccak256": "0x309fd0510e0b3e2b5044e33f7c80cfb2d6f2a5697e41a5f185931d65770cfea9", "urls": ["bzzr://4e7ed6f82c0f542e92e56c12566b2ecd7666730865bf12566c27587ec64160ac"]}, "contracts/FractionalERC20.sol": {"keccak256": "0x75bc4ad90a8b13ce961c89b1bf405776f616e019d3a2720168f8e52be223198f", "urls": ["bzzr://6a3688f12da1a5c890ef06f80f883f6c5370886092d38a1b33cd4219b718478b"]}, "contracts/Haltable.sol": {"keccak256": "0x265dcf25e7c9ab4b6eecd2181f1b71334a1b5381a60f8db7d9526dab120f4b70", "urls": ["bzzr://d522e00fa9e075941469dd81738b59fdb99ce3c12cdc39e33abe40b588c4da9b"]}, "contracts/MintableToken.sol": {"keccak256": "0x650e1d6b2bedcd36508918357c7cf4f36fdd093cd0c4d6342f4dcd3bdcdd7578", "urls": ["bzzr://7ba2ac0480d428066a18727e2adb76ba56856ecd37b4420e801131ec8f8f4be3"]}, "contracts/PricingStrategy.sol": {"keccak256": "0x8df5093b7d07168ad994f9176de0bd2268f6563b1e8a3a448d8cfe7fe246c628", "urls": ["bzzr://ef5c944d51f739ab34e2c951d6ac82a7152e6bb844058a8e57bae52c14cbe16b"]}, "contracts/Recoverable.sol": {"keccak256": "0x311a332cdd87df6e00057f5455f4e68b043b5dbe211f6d68bc64e20817515635", "urls": ["bzzr://4fd99bcfb93baed6e7c8d22ee9ecc5c8346a1aa98288e77b01333b2c5d3f582d"]}, "contracts/ReleasableToken.sol": {"keccak256": "0x2c50180d0c1eab1aa63a04da3ae87ee2c482665d2a1a42c5f05b11234a7edaf4", "urls": ["bzzr://10752c317eba5c42e2848722689cfee4fffb7bcb42f3346e1a20715d843798e8"]}, "contracts/SafeMathLib.sol": {"keccak256": "0x501bfe31e274b9a5591f7c540bdced4d4312e27d4f19599147c9bbca3d9c6b18", "urls": ["bzzr://a80935ebddb06c247d71372d4e5833ee029f08633bd0fe4a274a57009567e5b9"]}, "contracts/StandardTokenExt.sol": {"keccak256": "0x9ea2d4cec4dccd5639c05e6c23dd027d80b5e5a20abd99b280ab7b2631b5a5fc", "urls": ["bzzr://a52d8fc5a21bd83997aff19128e00dceb251df712207b61223894c8b7f42d5ff"]}, "contracts/UpgradeAgent.sol": {"keccak256": "0x88e793f72feca4a18d2cd06e6037c1413d7b963eabcf5626d60bfb9d04d6e8e6", "urls": ["bzzr://87e39a65cf25d539ab49ad7e759b3298b8a19272964e69e3f2432f0323f30025"]}, "contracts/UpgradeableToken.sol": {"keccak256": "0xa74fc300c514564ece81c86905502c2de674b69c0633b133af19c1ba027da2c9", "urls": ["bzzr://55bc0b908c94781462b8959f051c6dbb53c35641b0f8cb38d74632ad6bf95e52"]}, "zeppelin/contracts/math/SafeMath.sol": {"keccak256": "0x341ba8cb467a3623e819ba1a683ac1d264005186f308505214e5f6bc89446a08", "urls": ["bzzr://59b5652ee4e4a1b5a8f1a8906e14c84af43d636cf5ca0725cc1813aabe4c8c17"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}, "zeppelin/contracts/token/ERC20/BasicToken.sol": {"keccak256": "0x948404468d61ff35ea4194650670408dabd65da7f905a1c16888ab84520bf39e", "urls": ["bzzr://ea75e20f95d7e4e10394fe6bfaa8eee56b4757c2a6f1e8df4180d33afa621935"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}, "zeppelin/contracts/token/ERC20/StandardToken.sol": {"keccak256": "0xd2b344a5259e19ec143074cfa65637a10c40b68395c59808c4af13bccbb2de55", "urls": ["bzzr://d61a01175a7ca1ba9f4403de603c20b897e33ec425aef2d9f8a7f9ddfdfaf5b2"]}}, "version": 1}, "name": "BonusFinalizeAgent", "ordered_full_dependencies": ["SafeMathLib"], "source_path": "contracts/BonusFinalizeAgent.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Safe unsigned safe math.\n *\n * https://blog.aragon.one/library-driven-development-in-solidity-2bebcaf88736#.750gwtwli\n *\n * Originally from https://raw.githubusercontent.com/AragonOne/zeppelin-solidity/master/contracts/SafeMathLib.sol\n *\n * Maintained here until merged to mainline zeppelin-solidity.\n *\n */\nlibrary SafeMathLib {\n\n function times(uint a, uint b) returns (uint) {\n uint c = a * b;\n assert(a == 0 || c / a == b);\n return c;\n }\n\n function minus(uint a, uint b) returns (uint) {\n assert(b <= a);\n return a - b;\n }\n\n function plus(uint a, uint b) returns (uint) {\n uint c = a + b;\n assert(c>=a);\n return c;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Interface for defining crowdsale pricing.\n */\ncontract PricingStrategy {\n\n /** Interface declaration. */\n function isPricingStrategy() public constant returns (bool) {\n return true;\n }\n\n /** Self check if all references are correctly set.\n *\n * Checks that pricing strategy matches crowdsale parameters.\n */\n function isSane(address crowdsale) public constant returns (bool) {\n return true;\n }\n\n /**\n * @dev Pricing tells if this is a presale purchase or not.\n @param purchaser Address of the purchaser\n @return False by default, true if a presale purchaser\n */\n function isPresalePurchase(address purchaser) public constant returns (bool) {\n return false;\n }\n\n /**\n * When somebody tries to buy tokens for X eth, calculate how many tokens they get.\n *\n *\n * @param value - What is the value of the transaction send in as wei\n * @param tokensSold - how much tokens have been sold this far\n * @param weiRaised - how much money has been raised this far in the main token sale - this number excludes presale\n * @param msgSender - who is the investor of this transaction\n * @param decimals - how many decimal units the token has\n * @return Amount of tokens the investor receives\n */\n function calculatePrice(uint value, uint weiRaised, uint tokensSold, address msgSender, uint decimals) public constant returns (uint tokenAmount);\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Finalize agent defines what happens at the end of succeseful crowdsale.\n *\n * - Allocate tokens for founders, bounties and community\n * - Make tokens transferable\n * - etc.\n */\ncontract FinalizeAgent {\n\n function isFinalizeAgent() public constant returns(bool) {\n return true;\n }\n\n /** Return true if we can run finalizeCrowdsale() properly.\n *\n * This is a safety check function that doesn't allow crowdsale to begin\n * unless the finalizer has been set up properly.\n */\n function isSane() public constant returns (bool);\n\n /** Called once by crowdsale finalize() if the sale was success. */\n function finalizeCrowdsale();\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n\n/**\n * A token that defines fractional units as decimals.\n */\ncontract FractionalERC20 is ERC20 {\n\n uint public decimals;\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n/*\n * Haltable\n *\n * Abstract contract that allows children to implement an\n * emergency stop mechanism. Differs from Pausable by causing a throw when in halt mode.\n *\n *\n * Originally envisioned in FirstBlood ICO contract.\n */\ncontract Haltable is Ownable {\n bool public halted;\n\n modifier stopInEmergency {\n if (halted) throw;\n _;\n }\n\n modifier stopNonOwnersInEmergency {\n if (halted && msg.sender != owner) throw;\n _;\n }\n\n modifier onlyInEmergency {\n if (!halted) throw;\n _;\n }\n\n // called by the owner on emergency, triggers stopped state\n function halt() external onlyOwner {\n halted = true;\n }\n\n // called by the owner on end of emergency, returns to normal state\n function unhalt() external onlyOwner onlyInEmergency {\n halted = false;\n }\n\n}\n\n\n\n\n\n\n\n/**\n * Crowdsale state machine without buy functionality.\n *\n * Implements basic state machine logic, but leaves out all buy functions,\n * so that subclasses can implement their own buying logic.\n *\n *\n * For the default buy() implementation see Crowdsale.sol.\n */\ncontract CrowdsaleBase is Haltable {\n\n /* Max investment count when we are still allowed to change the multisig address */\n uint public MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE = 5;\n\n using SafeMathLib for uint;\n\n /* The token we are selling */\n FractionalERC20 public token;\n\n /* How we are going to price our offering */\n PricingStrategy public pricingStrategy;\n\n /* Post-success callback */\n FinalizeAgent public finalizeAgent;\n\n /* tokens will be transfered from this address */\n address public multisigWallet;\n\n /* if the funding goal is not reached, investors may withdraw their funds */\n uint public minimumFundingGoal;\n\n /* the UNIX timestamp start date of the crowdsale */\n uint public startsAt;\n\n /* the UNIX timestamp end date of the crowdsale */\n uint public endsAt;\n\n /* the number of tokens already sold through this contract*/\n uint public tokensSold = 0;\n\n /* How many wei of funding we have raised */\n uint public weiRaised = 0;\n\n /* Calculate incoming funds from presale contracts and addresses */\n uint public presaleWeiRaised = 0;\n\n /* How many distinct addresses have invested */\n uint public investorCount = 0;\n\n /* How much wei we have returned back to the contract after a failed crowdfund. */\n uint public loadedRefund = 0;\n\n /* How much wei we have given back to investors.*/\n uint public weiRefunded = 0;\n\n /* Has this crowdsale been finalized */\n bool public finalized;\n\n /** How much ETH each address has invested to this crowdsale */\n mapping (address => uint256) public investedAmountOf;\n\n /** How much tokens this crowdsale has credited for each investor address */\n mapping (address => uint256) public tokenAmountOf;\n\n /** Addresses that are allowed to invest even before ICO offical opens. For testing, for ICO partners, etc. */\n mapping (address => bool) public earlyParticipantWhitelist;\n\n /** This is for manul testing for the interaction from owner wallet. You can set it to any value and inspect this in blockchain explorer to see that crowdsale interaction works. */\n uint public ownerTestValue;\n\n /** State machine\n *\n * - Preparing: All contract initialization calls and variables have not been set yet\n * - Prefunding: We have not passed start time yet\n * - Funding: Active crowdsale\n * - Success: Minimum funding goal reached\n * - Failure: Minimum funding goal not reached before ending time\n * - Finalized: The finalized has been called and succesfully executed\n * - Refunding: Refunds are loaded on the contract for reclaim.\n */\n enum State{Unknown, Preparing, PreFunding, Funding, Success, Failure, Finalized, Refunding}\n\n // A new investment was made\n event Invested(address investor, uint weiAmount, uint tokenAmount, uint128 customerId);\n\n // Refund was processed for a contributor\n event Refund(address investor, uint weiAmount);\n\n // The rules were changed what kind of investments we accept\n event InvestmentPolicyChanged(bool newRequireCustomerId, bool newRequiredSignedAddress, address newSignerAddress);\n\n // Address early participation whitelist status changed\n event Whitelisted(address addr, bool status);\n\n // Crowdsale end time has been changed\n event EndsAtChanged(uint newEndsAt);\n\n function CrowdsaleBase(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal) {\n\n owner = msg.sender;\n\n token = FractionalERC20(_token);\n setPricingStrategy(_pricingStrategy);\n\n multisigWallet = _multisigWallet;\n if(multisigWallet == 0) {\n throw;\n }\n\n if(_start == 0) {\n throw;\n }\n\n startsAt = _start;\n\n if(_end == 0) {\n throw;\n }\n\n endsAt = _end;\n\n // Don't mess the dates\n if(startsAt >= endsAt) {\n throw;\n }\n\n // Minimum funding goal can be zero\n minimumFundingGoal = _minimumFundingGoal;\n }\n\n /**\n * Don't expect to just send in money and get tokens.\n */\n function() payable {\n throw;\n }\n\n /**\n * @dev Make an investment.\n *\n * Crowdsale must be running for one to invest.\n * We must have not pressed the emergency brake.\n *\n * @param receiver The Ethereum address who receives the tokens\n * @param customerId (optional) UUID v4 to track the successful payments on the server side'\n * @param tokenAmount Amount of tokens which be credited to receiver\n *\n * @return tokensBought How mony tokens were bought\n */\n function buyTokens(address receiver, uint128 customerId, uint256 tokenAmount) stopInEmergency internal returns(uint tokensBought) {\n\n // Determine if it's a good time to accept investment from this participant\n if(getState() == State.PreFunding) {\n // Are we whitelisted for early deposit\n if(!earlyParticipantWhitelist[receiver]) {\n throw;\n }\n } else if(getState() == State.Funding) {\n // Retail participants can only come in when the crowdsale is running\n // pass\n } else {\n // Unwanted state\n throw;\n }\n\n uint weiAmount = msg.value;\n\n // Dust transaction\n require(tokenAmount != 0);\n\n if(investedAmountOf[receiver] == 0) {\n // A new investor\n investorCount++;\n }\n\n // Update investor\n investedAmountOf[receiver] = investedAmountOf[receiver].plus(weiAmount);\n tokenAmountOf[receiver] = tokenAmountOf[receiver].plus(tokenAmount);\n\n // Update totals\n weiRaised = weiRaised.plus(weiAmount);\n tokensSold = tokensSold.plus(tokenAmount);\n\n if(pricingStrategy.isPresalePurchase(receiver)) {\n presaleWeiRaised = presaleWeiRaised.plus(weiAmount);\n }\n\n // Check that we did not bust the cap\n require(!isBreakingCap(weiAmount, tokenAmount, weiRaised, tokensSold));\n\n assignTokens(receiver, tokenAmount);\n\n // Pocket the money, or fail the crowdsale if we for some reason cannot send the money to our multisig\n if(!multisigWallet.send(weiAmount)) throw;\n\n // Tell us invest was success\n Invested(receiver, weiAmount, tokenAmount, customerId);\n\n return tokenAmount;\n }\n\n /**\n * @dev Make an investment based on pricing strategy\n *\n * This is a wrapper for buyTokens(), but the amount of tokens receiver will\n * have depends on the pricing strategy used.\n *\n * @param receiver The Ethereum address who receives the tokens\n * @param customerId (optional) UUID v4 to track the successful payments on the server side'\n *\n * @return tokensBought How mony tokens were bought\n */\n function investInternal(address receiver, uint128 customerId) stopInEmergency internal returns(uint tokensBought) {\n return buyTokens(receiver, customerId, pricingStrategy.calculatePrice(msg.value, weiRaised - presaleWeiRaised, tokensSold, msg.sender, token.decimals()));\n }\n\n /**\n * @dev Calculate tokens user will have for their purchase\n *\n * @param weisTotal How much ethers (in wei) the user putssssss in\n * @param pricePerToken What is the price for one token\n *\n * @return tokensTotal which is received tokens, token decimals included\n */\n function calculateTokens(uint256 weisTotal, uint256 pricePerToken) public constant returns(uint tokensTotal) {\n // pricePerToken is how many full tokens, token decimal place included, you get for wei amount.\n // Because, in theory, decimal amount can vary, we do the exponent calculation here,\n // though gas wise using 10**18 constant would be much simpler.\n // Furthermore we could use rough amounts and take in raw wei per tokens amount,\n // but we lose too much accuracy for generic calculations, thus all these are\n // practically implemented as 10**18 fixed points.\n uint multiplier = 10 ** token.decimals();\n return weisTotal.times(multiplier)/pricePerToken;\n }\n\n /**\n * Finalize a succcesful crowdsale.\n *\n * The owner can triggre a call the contract that provides post-crowdsale actions, like releasing the tokens.\n */\n function finalize() public inState(State.Success) onlyOwner stopInEmergency {\n\n // Already finalized\n if(finalized) {\n throw;\n }\n\n // Finalizing is optional. We only call it if we are given a finalizing agent.\n if(address(finalizeAgent) != 0) {\n finalizeAgent.finalizeCrowdsale();\n }\n\n finalized = true;\n }\n\n /**\n * Allow to (re)set finalize agent.\n *\n * Design choice: no state restrictions on setting this, so that we can fix fat finger mistakes.\n */\n function setFinalizeAgent(FinalizeAgent addr) onlyOwner {\n finalizeAgent = addr;\n\n // Don't allow setting bad agent\n if(!finalizeAgent.isFinalizeAgent()) {\n throw;\n }\n }\n\n /**\n * Allow crowdsale owner to close early or extend the crowdsale.\n *\n * This is useful e.g. for a manual soft cap implementation:\n * - after X amount is reached determine manual closing\n *\n * This may put the crowdsale to an invalid state,\n * but we trust owners know what they are doing.\n *\n */\n function setEndsAt(uint time) onlyOwner {\n\n if(now > time) {\n throw; // Don't change past\n }\n\n if(startsAt > time) {\n throw; // Prevent human mistakes\n }\n\n endsAt = time;\n EndsAtChanged(endsAt);\n }\n\n /**\n * Allow to (re)set pricing strategy.\n *\n * Design choice: no state restrictions on the set, so that we can fix fat finger mistakes.\n */\n function setPricingStrategy(PricingStrategy _pricingStrategy) onlyOwner {\n pricingStrategy = _pricingStrategy;\n\n // Don't allow setting bad agent\n if(!pricingStrategy.isPricingStrategy()) {\n throw;\n }\n }\n\n /**\n * Allow to change the team multisig address in the case of emergency.\n *\n * This allows to save a deployed crowdsale wallet in the case the crowdsale has not yet begun\n * (we have done only few test transactions). After the crowdsale is going\n * then multisig address stays locked for the safety reasons.\n */\n function setMultisig(address addr) public onlyOwner {\n\n // Change\n if(investorCount > MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE) {\n throw;\n }\n\n multisigWallet = addr;\n }\n\n /**\n * Allow load refunds back on the contract for the refunding.\n *\n * The team can transfer the funds back on the smart contract in the case the minimum goal was not reached..\n */\n function loadRefund() public payable inState(State.Failure) {\n if(msg.value == 0) throw;\n loadedRefund = loadedRefund.plus(msg.value);\n }\n\n /**\n * Investors can claim refund.\n *\n * Note that any refunds from proxy buyers should be handled separately,\n * and not through this contract.\n */\n function refund() public inState(State.Refunding) {\n uint256 weiValue = investedAmountOf[msg.sender];\n if (weiValue == 0) throw;\n investedAmountOf[msg.sender] = 0;\n weiRefunded = weiRefunded.plus(weiValue);\n Refund(msg.sender, weiValue);\n if (!msg.sender.send(weiValue)) throw;\n }\n\n /**\n * @return true if the crowdsale has raised enough money to be a successful.\n */\n function isMinimumGoalReached() public constant returns (bool reached) {\n return weiRaised >= minimumFundingGoal;\n }\n\n /**\n * Check if the contract relationship looks good.\n */\n function isFinalizerSane() public constant returns (bool sane) {\n return finalizeAgent.isSane();\n }\n\n /**\n * Check if the contract relationship looks good.\n */\n function isPricingSane() public constant returns (bool sane) {\n return pricingStrategy.isSane(address(this));\n }\n\n /**\n * Crowdfund state machine management.\n *\n * We make it a function and do not assign the result to a variable, so there is no chance of the variable being stale.\n */\n function getState() public constant returns (State) {\n if(finalized) return State.Finalized;\n else if (address(finalizeAgent) == 0) return State.Preparing;\n else if (!finalizeAgent.isSane()) return State.Preparing;\n else if (!pricingStrategy.isSane(address(this))) return State.Preparing;\n else if (block.timestamp < startsAt) return State.PreFunding;\n else if (block.timestamp <= endsAt && !isCrowdsaleFull()) return State.Funding;\n else if (isMinimumGoalReached()) return State.Success;\n else if (!isMinimumGoalReached() && weiRaised > 0 && loadedRefund >= weiRaised) return State.Refunding;\n else return State.Failure;\n }\n\n /** This is for manual testing of multisig wallet interaction */\n function setOwnerTestValue(uint val) onlyOwner {\n ownerTestValue = val;\n }\n\n /**\n * Allow addresses to do early participation.\n *\n * TODO: Fix spelling error in the name\n */\n function setEarlyParicipantWhitelist(address addr, bool status) onlyOwner {\n earlyParticipantWhitelist[addr] = status;\n Whitelisted(addr, status);\n }\n\n\n /** Interface marker. */\n function isCrowdsale() public constant returns (bool) {\n return true;\n }\n\n //\n // Modifiers\n //\n\n /** Modified allowing execution only if the crowdsale is currently running. */\n modifier inState(State state) {\n if(getState() != state) throw;\n _;\n }\n\n\n //\n // Abstract functions\n //\n\n /**\n * Check if the current invested breaks our cap rules.\n *\n *\n * The child contract must define their own cap setting rules.\n * We allow a lot of flexibility through different capping strategies (ETH, token count)\n * Called from invest().\n *\n * @param weiAmount The amount of wei the investor tries to invest in the current transaction\n * @param tokenAmount The amount of tokens we try to give to the investor in the current transaction\n * @param weiRaisedTotal What would be our total raised balance after this transaction\n * @param tokensSoldTotal What would be our total sold tokens count after this transaction\n *\n * @return true if taking this investment would break our cap rules\n */\n function isBreakingCap(uint weiAmount, uint tokenAmount, uint weiRaisedTotal, uint tokensSoldTotal) constant returns (bool limitBroken);\n\n /**\n * Check if the current crowdsale is full and we can no longer sell any tokens.\n */\n function isCrowdsaleFull() public constant returns (bool);\n\n /**\n * Create new tokens or transfer issued tokens to the investor depending on the cap model.\n */\n function assignTokens(address receiver, uint tokenAmount) internal;\n}\n\n\n\n/**\n * Abstract base contract for token sales with the default buy entry points.\n *\n * Handle\n * - start and end dates\n * - accepting investments\n * - minimum funding goal and refund\n * - various statistics during the crowdfund\n * - different pricing strategies\n * - different investment policies (require server side customer id, allow only whitelisted addresses)\n *\n * Does not Handle\n *\n * - Token allocation (minting vs. transfer)\n * - Cap rules\n *\n */\ncontract Crowdsale is CrowdsaleBase {\n\n /* Do we need to have unique contributor id for each customer */\n bool public requireCustomerId;\n\n /**\n * Do we verify that contributor has been cleared on the server side (accredited investors only).\n * This method was first used in FirstBlood crowdsale to ensure all contributors have accepted terms on sale (on the web).\n */\n bool public requiredSignedAddress;\n\n /* Server side address that signed allowed contributors (Ethereum addresses) that can participate the crowdsale */\n address public signerAddress;\n\n function Crowdsale(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal) CrowdsaleBase(_token, _pricingStrategy, _multisigWallet, _start, _end, _minimumFundingGoal) {\n }\n\n /**\n * Preallocate tokens for the early investors.\n *\n * Preallocated tokens have been sold before the actual crowdsale opens.\n * This function mints the tokens and moves the crowdsale needle.\n *\n * Investor count is not handled; it is assumed this goes for multiple investors\n * and the token distribution happens outside the smart contract flow.\n *\n * No money is exchanged, as the crowdsale team already have received the payment.\n *\n * @param fullTokens tokens as full tokens - decimal places added internally\n * @param weiPrice Price of a single full token in wei\n *\n */\n function preallocate(address receiver, uint fullTokens, uint weiPrice) public onlyOwner {\n\n uint tokenAmount = fullTokens * 10**token.decimals();\n uint weiAmount = weiPrice * fullTokens; // This can be also 0, we give out tokens for free\n\n weiRaised = weiRaised.plus(weiAmount);\n tokensSold = tokensSold.plus(tokenAmount);\n\n investedAmountOf[receiver] = investedAmountOf[receiver].plus(weiAmount);\n tokenAmountOf[receiver] = tokenAmountOf[receiver].plus(tokenAmount);\n\n assignTokens(receiver, tokenAmount);\n\n // Tell us invest was success\n Invested(receiver, weiAmount, tokenAmount, 0);\n }\n\n /**\n * Allow anonymous contributions to this crowdsale.\n */\n function investWithSignedAddress(address addr, uint128 customerId, uint8 v, bytes32 r, bytes32 s) public payable {\n bytes32 hash = sha256(addr);\n if (ecrecover(hash, v, r, s) != signerAddress) throw;\n if(customerId == 0) throw; // UUIDv4 sanity check\n investInternal(addr, customerId);\n }\n\n /**\n * Track who is the customer making the payment so we can send thank you email.\n */\n function investWithCustomerId(address addr, uint128 customerId) public payable {\n if(requiredSignedAddress) throw; // Crowdsale allows only server-side signed participants\n if(customerId == 0) throw; // UUIDv4 sanity check\n investInternal(addr, customerId);\n }\n\n /**\n * Allow anonymous contributions to this crowdsale.\n */\n function invest(address addr) public payable {\n if(requireCustomerId) throw; // Crowdsale needs to track participants for thank you email\n if(requiredSignedAddress) throw; // Crowdsale allows only server-side signed participants\n investInternal(addr, 0);\n }\n\n /**\n * Invest to tokens, recognize the payer and clear his address.\n *\n */\n function buyWithSignedAddress(uint128 customerId, uint8 v, bytes32 r, bytes32 s) public payable {\n investWithSignedAddress(msg.sender, customerId, v, r, s);\n }\n\n /**\n * Invest to tokens, recognize the payer.\n *\n */\n function buyWithCustomerIdWithChecksum(uint128 customerId, bytes1 checksum) public payable {\n // see customerid.py\n if (bytes1(sha3(customerId)) != checksum) throw;\n investWithCustomerId(msg.sender, customerId);\n }\n\n /**\n * Legacy API signature.\n */\n function buyWithCustomerId(uint128 customerId) public payable {\n investWithCustomerId(msg.sender, customerId);\n }\n\n /**\n * The basic entry point to participate the crowdsale process.\n *\n * Pay for funding, get invested tokens back in the sender address.\n */\n function buy() public payable {\n invest(msg.sender);\n }\n\n /**\n * Set policy do we need to have server-side customer ids for the investments.\n *\n */\n function setRequireCustomerId(bool value) onlyOwner {\n requireCustomerId = value;\n InvestmentPolicyChanged(requireCustomerId, requiredSignedAddress, signerAddress);\n }\n\n /**\n * Set policy if all investors must be cleared on the server side first.\n *\n * This is e.g. for the accredited investor clearing.\n *\n */\n function setRequireSignedAddress(bool value, address _signerAddress) onlyOwner {\n requiredSignedAddress = value;\n signerAddress = _signerAddress;\n InvestmentPolicyChanged(requireCustomerId, requiredSignedAddress, signerAddress);\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n assert(c / a == b);\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n\n\n\n/**\n * @title Basic token\n * @dev Basic version of StandardToken, with no allowances.\n */\ncontract BasicToken is ERC20Basic {\n using SafeMath for uint256;\n\n mapping(address => uint256) balances;\n\n uint256 totalSupply_;\n\n /**\n * @dev total number of tokens in existence\n */\n function totalSupply() public view returns (uint256) {\n return totalSupply_;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param _to The address to transfer to.\n * @param _value The amount to be transferred.\n */\n function transfer(address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[msg.sender]);\n\n // SafeMath.sub will throw if there is not enough balance.\n balances[msg.sender] = balances[msg.sender].sub(_value);\n balances[_to] = balances[_to].add(_value);\n Transfer(msg.sender, _to, _value);\n return true;\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param _owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address _owner) public view returns (uint256 balance) {\n return balances[_owner];\n }\n\n}\n\n\n\n\n/**\n * @title Standard ERC20 token\n *\n * @dev Implementation of the basic standard token.\n * @dev https://github.com/ethereum/EIPs/issues/20\n * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol\n */\ncontract StandardToken is ERC20, BasicToken {\n\n mapping (address => mapping (address => uint256)) internal allowed;\n\n\n /**\n * @dev Transfer tokens from one address to another\n * @param _from address The address which you want to send tokens from\n * @param _to address The address which you want to transfer to\n * @param _value uint256 the amount of tokens to be transferred\n */\n function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[_from]);\n require(_value <= allowed[_from][msg.sender]);\n\n balances[_from] = balances[_from].sub(_value);\n balances[_to] = balances[_to].add(_value);\n allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);\n Transfer(_from, _to, _value);\n return true;\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n *\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param _spender The address which will spend the funds.\n * @param _value The amount of tokens to be spent.\n */\n function approve(address _spender, uint256 _value) public returns (bool) {\n allowed[msg.sender][_spender] = _value;\n Approval(msg.sender, _spender, _value);\n return true;\n }\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param _owner address The address which owns the funds.\n * @param _spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address _owner, address _spender) public view returns (uint256) {\n return allowed[_owner][_spender];\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(address _spender, uint _addedValue) public returns (bool) {\n allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {\n uint oldValue = allowed[msg.sender][_spender];\n if (_subtractedValue > oldValue) {\n allowed[msg.sender][_spender] = 0;\n } else {\n allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);\n }\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\ncontract Recoverable is Ownable {\n\n /// @dev Empty constructor (for now)\n function Recoverable() {\n }\n\n /// @dev This will be invoked by the owner, when owner wants to rescue tokens\n /// @param token Token which will we rescue to the owner from the contract\n function recoverTokens(ERC20Basic token) onlyOwner public {\n token.transfer(owner, tokensToBeReturned(token));\n }\n\n /// @dev Interface function, can be overwritten by the superclass\n /// @param token Token which balance we will check and return\n /// @return The amount of tokens (in smallest denominator) the contract owns\n function tokensToBeReturned(ERC20Basic token) public returns (uint) {\n return token.balanceOf(this);\n }\n}\n\n\n\n/**\n * Standard EIP-20 token with an interface marker.\n *\n * @notice Interface marker is used by crowdsale contracts to validate that addresses point a good token contract.\n *\n */\ncontract StandardTokenExt is StandardToken, Recoverable {\n\n /* Interface declaration */\n function isToken() public constant returns (bool weAre) {\n return true;\n }\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Upgrade agent interface inspired by Lunyr.\n *\n * Upgrade agent transfers tokens to a new contract.\n * Upgrade agent itself can be the token contract, or just a middle man contract doing the heavy lifting.\n */\ncontract UpgradeAgent {\n\n uint public originalSupply;\n\n /** Interface marker */\n function isUpgradeAgent() public constant returns (bool) {\n return true;\n }\n\n function upgradeFrom(address _from, uint256 _value) public;\n\n}\n\n\n/**\n * A token upgrade mechanism where users can opt-in amount of tokens to the next smart contract revision.\n *\n * First envisioned by Golem and Lunyr projects.\n */\ncontract UpgradeableToken is StandardTokenExt {\n\n /** Contract / person who can set the upgrade path. This can be the same as team multisig wallet, as what it is with its default value. */\n address public upgradeMaster;\n\n /** The next contract where the tokens will be migrated. */\n UpgradeAgent public upgradeAgent;\n\n /** How many tokens we have upgraded by now. */\n uint256 public totalUpgraded;\n\n /**\n * Upgrade states.\n *\n * - NotAllowed: The child contract has not reached a condition where the upgrade can bgun\n * - WaitingForAgent: Token allows upgrade, but we don't have a new agent yet\n * - ReadyToUpgrade: The agent is set, but not a single token has been upgraded yet\n * - Upgrading: Upgrade agent is set and the balance holders can upgrade their tokens\n *\n */\n enum UpgradeState {Unknown, NotAllowed, WaitingForAgent, ReadyToUpgrade, Upgrading}\n\n /**\n * Somebody has upgraded some of his tokens.\n */\n event Upgrade(address indexed _from, address indexed _to, uint256 _value);\n\n /**\n * New upgrade agent available.\n */\n event UpgradeAgentSet(address agent);\n\n /**\n * Do not allow construction without upgrade master set.\n */\n function UpgradeableToken(address _upgradeMaster) {\n upgradeMaster = _upgradeMaster;\n }\n\n /**\n * Allow the token holder to upgrade some of their tokens to a new contract.\n */\n function upgrade(uint256 value) public {\n\n UpgradeState state = getUpgradeState();\n if(!(state == UpgradeState.ReadyToUpgrade || state == UpgradeState.Upgrading)) {\n // Called in a bad state\n throw;\n }\n\n // Validate input value.\n if (value == 0) throw;\n\n balances[msg.sender] = balances[msg.sender].sub(value);\n\n // Take tokens out from circulation\n totalSupply_ = totalSupply_.sub(value);\n totalUpgraded = totalUpgraded.add(value);\n\n // Upgrade agent reissues the tokens\n upgradeAgent.upgradeFrom(msg.sender, value);\n Upgrade(msg.sender, upgradeAgent, value);\n }\n\n /**\n * Set an upgrade agent that handles\n */\n function setUpgradeAgent(address agent) external {\n\n if(!canUpgrade()) {\n // The token is not yet in a state that we could think upgrading\n throw;\n }\n\n if (agent == 0x0) throw;\n // Only a master can designate the next agent\n if (msg.sender != upgradeMaster) throw;\n // Upgrade has already begun for an agent\n if (getUpgradeState() == UpgradeState.Upgrading) throw;\n\n upgradeAgent = UpgradeAgent(agent);\n\n // Bad interface\n if(!upgradeAgent.isUpgradeAgent()) throw;\n // Make sure that token supplies match in source and target\n if (upgradeAgent.originalSupply() != totalSupply_) throw;\n\n UpgradeAgentSet(upgradeAgent);\n }\n\n /**\n * Get the state of the token upgrade.\n */\n function getUpgradeState() public constant returns(UpgradeState) {\n if(!canUpgrade()) return UpgradeState.NotAllowed;\n else if(address(upgradeAgent) == 0x00) return UpgradeState.WaitingForAgent;\n else if(totalUpgraded == 0) return UpgradeState.ReadyToUpgrade;\n else return UpgradeState.Upgrading;\n }\n\n /**\n * Change the upgrade master.\n *\n * This allows us to set a new owner for the upgrade mechanism.\n */\n function setUpgradeMaster(address master) public {\n if (master == 0x0) throw;\n if (msg.sender != upgradeMaster) throw;\n upgradeMaster = master;\n }\n\n /**\n * Child contract can enable to provide the condition when the upgrade can begun.\n */\n function canUpgrade() public constant returns(bool) {\n return true;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n/**\n * Define interface for releasing the token transfer after a successful crowdsale.\n */\ncontract ReleasableToken is StandardTokenExt {\n\n /* The finalizer contract that allows unlift the transfer limits on this token */\n address public releaseAgent;\n\n /** A crowdsale contract can release us to the wild if ICO success. If false we are are in transfer lock up period.*/\n bool public released = false;\n\n /** Map of agents that are allowed to transfer tokens regardless of the lock down period. These are crowdsale contracts and possible the team multisig itself. */\n mapping (address => bool) public transferAgents;\n\n /**\n * Limit token transfer until the crowdsale is over.\n *\n */\n modifier canTransfer(address _sender) {\n\n if(!released) {\n if(!transferAgents[_sender]) {\n throw;\n }\n }\n\n _;\n }\n\n /**\n * Set the contract that can call release and make the token transferable.\n *\n * Design choice. Allow reset the release agent to fix fat finger mistakes.\n */\n function setReleaseAgent(address addr) onlyOwner inReleaseState(false) public {\n\n // We don't do interface check here as we might want to a normal wallet address to act as a release agent\n releaseAgent = addr;\n }\n\n /**\n * Owner can allow a particular address (a crowdsale contract) to transfer tokens despite the lock up period.\n */\n function setTransferAgent(address addr, bool state) onlyOwner inReleaseState(false) public {\n transferAgents[addr] = state;\n }\n\n /**\n * One way function to release the tokens to the wild.\n *\n * Can be called only from the release agent that is the final ICO contract. It is only called if the crowdsale has been success (first milestone reached).\n */\n function releaseTokenTransfer() public onlyReleaseAgent {\n released = true;\n }\n\n /** The function can be called only before or after the tokens have been releasesd */\n modifier inReleaseState(bool releaseState) {\n if(releaseState != released) {\n throw;\n }\n _;\n }\n\n /** The function can be called only by a whitelisted release agent. */\n modifier onlyReleaseAgent() {\n if(msg.sender != releaseAgent) {\n throw;\n }\n _;\n }\n\n function transfer(address _to, uint _value) canTransfer(msg.sender) returns (bool success) {\n // Call StandardToken.transfer()\n return super.transfer(_to, _value);\n }\n\n function transferFrom(address _from, address _to, uint _value) canTransfer(_from) returns (bool success) {\n // Call StandardToken.transferForm()\n return super.transferFrom(_from, _to, _value);\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n\n/**\n * A token that can increase its supply by another contract.\n *\n * This allows uncapped crowdsale by dynamically increasing the supply when money pours in.\n * Only mint agents, contracts whitelisted by owner, can mint new tokens.\n *\n */\ncontract MintableToken is StandardTokenExt {\n\n using SafeMathLib for uint;\n\n bool public mintingFinished = false;\n\n /** List of agents that are allowed to create new tokens */\n mapping (address => bool) public mintAgents;\n\n event MintingAgentChanged(address addr, bool state);\n event Minted(address receiver, uint amount);\n\n /**\n * Create new tokens and allocate them to an address..\n *\n * Only callably by a crowdsale contract (mint agent).\n */\n function mint(address receiver, uint amount) onlyMintAgent canMint public {\n totalSupply_ = totalSupply_.plus(amount);\n balances[receiver] = balances[receiver].plus(amount);\n\n // This will make the mint transaction apper in EtherScan.io\n // We can remove this after there is a standardized minting event\n Transfer(0, receiver, amount);\n }\n\n /**\n * Owner can allow a crowdsale contract to mint new tokens.\n */\n function setMintAgent(address addr, bool state) onlyOwner canMint public {\n mintAgents[addr] = state;\n MintingAgentChanged(addr, state);\n }\n\n modifier onlyMintAgent() {\n // Only crowdsale contracts are allowed to mint new tokens\n if(!mintAgents[msg.sender]) {\n throw;\n }\n _;\n }\n\n /** Make sure we are not done yet. */\n modifier canMint() {\n if(mintingFinished) throw;\n _;\n }\n}\n\n\n\n/**\n * A crowdsaled token.\n *\n * An ERC-20 token designed specifically for crowdsales with investor protection and further development path.\n *\n * - The token transfer() is disabled until the crowdsale is over\n * - The token contract gives an opt-in upgrade path to a new contract\n * - The same token can be part of several crowdsales through approve() mechanism\n * - The token can be capped (supply set in the constructor) or uncapped (crowdsale contract can mint new tokens)\n *\n */\ncontract CrowdsaleToken is ReleasableToken, MintableToken, UpgradeableToken {\n\n /** Name and symbol were updated. */\n event UpdatedTokenInformation(string newName, string newSymbol);\n\n string public name;\n\n string public symbol;\n\n uint public decimals;\n\n /**\n * Construct the token.\n *\n * This token must be created through a team multisig wallet, so that it is owned by that wallet.\n *\n * @param _name Token name\n * @param _symbol Token symbol - should be all caps\n * @param _initialSupply How many tokens we start with\n * @param _decimals Number of decimal places\n * @param _mintable Are new tokens created over the crowdsale or do we distribute only the initial supply? Note that when the token becomes transferable the minting always ends.\n */\n function CrowdsaleToken(string _name, string _symbol, uint _initialSupply, uint _decimals, bool _mintable)\n UpgradeableToken(msg.sender) {\n\n // Create any address, can be transferred\n // to team multisig via changeOwner(),\n // also remember to call setUpgradeMaster()\n owner = msg.sender;\n\n name = _name;\n symbol = _symbol;\n\n totalSupply_ = _initialSupply;\n\n decimals = _decimals;\n\n // Create initially all balance on the team multisig\n balances[owner] = totalSupply_;\n\n if(totalSupply_ > 0) {\n Minted(owner, totalSupply_);\n }\n\n // No more new supply allowed after the token creation\n if(!_mintable) {\n mintingFinished = true;\n if(totalSupply_ == 0) {\n throw; // Cannot create a token without supply and no minting\n }\n }\n }\n\n /**\n * When token is released to be transferable, enforce no new tokens can be created.\n */\n function releaseTokenTransfer() public onlyReleaseAgent {\n mintingFinished = true;\n super.releaseTokenTransfer();\n }\n\n /**\n * Allow upgrade agent functionality kick in only if the crowdsale was success.\n */\n function canUpgrade() public constant returns(bool) {\n return released && super.canUpgrade();\n }\n\n /**\n * Owner can update token information here.\n *\n * It is often useful to conceal the actual token association, until\n * the token operations, like central issuance or reissuance have been completed.\n *\n * This function allows the token owner to rename the token after the operations\n * have been completed and then point the audience to use the token contract.\n */\n function setTokenInformation(string _name, string _symbol) onlyOwner {\n name = _name;\n symbol = _symbol;\n\n UpdatedTokenInformation(name, symbol);\n }\n\n}\n\n\n\n/**\n * At the end of the successful crowdsale allocate % bonus of tokens to the team.\n *\n * Unlock tokens.\n *\n * BonusAllocationFinal must be set as the minting agent for the MintableToken.\n *\n */\ncontract BonusFinalizeAgent is FinalizeAgent {\n\n using SafeMathLib for uint;\n\n CrowdsaleToken public token;\n Crowdsale public crowdsale;\n\n /** Total percent of tokens minted to the team at the end of the sale as base points (0.0001) */\n uint public bonusBasePoints;\n\n /** Where we move the tokens at the end of the sale. */\n address public teamMultisig;\n\n /* How much bonus tokens we allocated */\n uint public allocatedBonus;\n\n function BonusFinalizeAgent(CrowdsaleToken _token, Crowdsale _crowdsale, uint _bonusBasePoints, address _teamMultisig) {\n token = _token;\n crowdsale = _crowdsale;\n if(address(crowdsale) == 0) {\n throw;\n }\n\n teamMultisig = _teamMultisig;\n if(address(teamMultisig) == 0) {\n throw;\n }\n\n bonusBasePoints = _bonusBasePoints;\n }\n\n /* Can we run finalize properly */\n function isSane() public constant returns (bool) {\n return (token.mintAgents(address(this)) == true) && (token.releaseAgent() == address(this));\n }\n\n /** Called once by crowdsale finalize() if the sale was success. */\n function finalizeCrowdsale() {\n if(msg.sender != address(crowdsale)) {\n throw;\n }\n\n // How many % of tokens the founders and others get\n uint tokensSold = crowdsale.tokensSold();\n allocatedBonus = tokensSold.times(bonusBasePoints) / 10000;\n\n // move tokens to the team multisig wallet\n token.mint(teamMultisig, allocatedBonus);\n\n // Make token transferable\n token.releaseTokenTransfer();\n }\n\n}\n"}, "BurnableCrowdsaleToken": {"abi": [{"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "state", "type": "bool"}], "name": "setTransferAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "mintingFinished", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "name", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "approve", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "recoverTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_from", "type": "address"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setReleaseAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "decimals", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "receiver", "type": "address"}, {"name": "amount", "type": "uint256"}], "name": "mint", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "burnAmount", "type": "uint256"}], "name": "burn", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "mintAgents", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "state", "type": "bool"}], "name": "setMintAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "uint256"}], "name": "upgrade", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_name", "type": "string"}, {"name": "_symbol", "type": "string"}], "name": "setTokenInformation", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "upgradeAgent", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "releaseTokenTransfer", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "upgradeMaster", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_subtractedValue", "type": "uint256"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getUpgradeState", "outputs": [{"name": "", "type": "uint8"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "transferAgents", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "symbol", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "released", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "canUpgrade", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "tokensToBeReturned", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalUpgraded", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "releaseAgent", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_addedValue", "type": "uint256"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "agent", "type": "address"}], "name": "setUpgradeAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}, {"name": "_spender", "type": "address"}], "name": "allowance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isToken", "outputs": [{"name": "weAre", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "BURN_ADDRESS", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "master", "type": "address"}], "name": "setUpgradeMaster", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [{"name": "_name", "type": "string"}, {"name": "_symbol", "type": "string"}, {"name": "_initialSupply", "type": "uint256"}, {"name": "_decimals", "type": "uint256"}, {"name": "_mintable", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newName", "type": "string"}, {"indexed": false, "name": "newSymbol", "type": "string"}], "name": "UpdatedTokenInformation", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "_from", "type": "address"}, {"indexed": true, "name": "_to", "type": "address"}, {"indexed": false, "name": "_value", "type": "uint256"}], "name": "Upgrade", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "agent", "type": "address"}], "name": "UpgradeAgentSet", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "addr", "type": "address"}, {"indexed": false, "name": "state", "type": "bool"}], "name": "MintingAgentChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "receiver", "type": "address"}, {"indexed": false, "name": "amount", "type": "uint256"}], "name": "Minted", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "burner", "type": "address"}, {"indexed": false, "name": "burnedAmount", "type": "uint256"}], "name": "Burned", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}, {"indexed": true, "name": "spender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "bytecode": "0x60806040526004805460a060020a60ff02191690556006805460ff191690553480156200002b57600080fd5b5060405162001d8e38038062001d8e83398101604090815281516020808401519284015160608501516080860151600380546008805433600160a060020a03199182168117909255918216811790911617905593860180519096959095019491939092909186918691869186918691620000ab91600b9188019062000172565b508351620000c190600c90602087019062000172565b506001839055600d829055600354600160a060020a031660009081526020819052604081208490558311156200013d5760035460015460408051600160a060020a039093168352602083019190915280517f30385c845b448a36257a6a1716e6ad2e1bc2cbe333cde1e69fe849ad6511adfe9281900390910190a15b80151562000162576006805460ff191660019081179091555415156200016257600080fd5b5050505050505050505062000217565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620001b557805160ff1916838001178555620001e5565b82800160010185558215620001e5579182015b82811115620001e5578251825591602001919060010190620001c8565b50620001f3929150620001f7565b5090565b6200021491905b80821115620001f35760008155600101620001fe565b90565b611b6780620002276000396000f3006080604052600436106101cc5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166302f652a381146101d157806305d2035b146101f957806306fdde0314610222578063095ea7b3146102ac57806316114acd146102d057806318160ddd146102f157806323b872dd1461031857806329ff4f5314610342578063313ce5671461036357806340c10f191461037857806342966c681461039c57806342c1867b146103b457806343214675146103d557806345977d03146103fb5780634eee966f146104135780635de4ccb0146104aa5780635f412d4f146104db578063600440cb146104f0578063661884631461050557806370a08231146105295780638444b3911461054a578063867c2857146105835780638da5cb5b146105a457806395d89b41146105b957806396132521146105ce5780639738968c146105e3578063a9059cbb146105f8578063c45d19db1461061c578063c752ff621461063d578063d1f276d314610652578063d73dd62314610667578063d7e7088a1461068b578063dd62ed3e146106ac578063eefa597b146106d3578063f2fde38b146106e8578063fccc281314610709578063ffeb7d751461071e575b600080fd5b3480156101dd57600080fd5b506101f7600160a060020a0360043516602435151561073f565b005b34801561020557600080fd5b5061020e6107ad565b604080519115158252519081900360200190f35b34801561022e57600080fd5b506102376107b6565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610271578181015183820152602001610259565b50505050905090810190601f16801561029e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156102b857600080fd5b5061020e600160a060020a0360043516602435610844565b3480156102dc57600080fd5b506101f7600160a060020a03600435166108aa565b3480156102fd57600080fd5b5061030661097a565b60408051918252519081900360200190f35b34801561032457600080fd5b5061020e600160a060020a0360043581169060243516604435610981565b34801561034e57600080fd5b506101f7600160a060020a03600435166109e5565b34801561036f57600080fd5b50610306610a57565b34801561038457600080fd5b506101f7600160a060020a0360043516602435610a5d565b3480156103a857600080fd5b506101f7600435610c3c565b3480156103c057600080fd5b5061020e600160a060020a0360043516610d14565b3480156103e157600080fd5b506101f7600160a060020a03600435166024351515610d29565b34801561040757600080fd5b506101f7600435610db4565b34801561041f57600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526101f794369492936024939284019190819084018382808284375050604080516020601f89358b018035918201839004830284018301909452808352979a999881019791965091820194509250829150840183828082843750949750610f259650505050505050565b3480156104b657600080fd5b506104bf611092565b60408051600160a060020a039092168252519081900360200190f35b3480156104e757600080fd5b506101f76110a1565b3480156104fc57600080fd5b506104bf6110cf565b34801561051157600080fd5b5061020e600160a060020a03600435166024356110de565b34801561053557600080fd5b50610306600160a060020a03600435166111ce565b34801561055657600080fd5b5061055f6111e9565b6040518082600481111561056f57fe5b60ff16815260200191505060405180910390f35b34801561058f57600080fd5b5061020e600160a060020a0360043516611234565b3480156105b057600080fd5b506104bf611249565b3480156105c557600080fd5b50610237611258565b3480156105da57600080fd5b5061020e6112b3565b3480156105ef57600080fd5b5061020e6112d4565b34801561060457600080fd5b5061020e600160a060020a0360043516602435611309565b34801561062857600080fd5b50610306600160a060020a036004351661136b565b34801561064957600080fd5b50610306611401565b34801561065e57600080fd5b506104bf611407565b34801561067357600080fd5b5061020e600160a060020a0360043516602435611416565b34801561069757600080fd5b506101f7600160a060020a03600435166114af565b3480156106b857600080fd5b50610306600160a060020a03600435811690602435166116b0565b3480156106df57600080fd5b5061020e6116db565b3480156106f457600080fd5b506101f7600160a060020a03600435166116e0565b34801561071557600080fd5b506104bf611775565b34801561072a57600080fd5b506101f7600160a060020a036004351661177a565b600354600160a060020a0316331461075657600080fd5b60045460009074010000000000000000000000000000000000000000900460ff161561078157600080fd5b50600160a060020a03919091166000908152600560205260409020805460ff1916911515919091179055565b60065460ff1681565b600b805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561083c5780601f106108115761010080835404028352916020019161083c565b820191906000526020600020905b81548152906001019060200180831161081f57829003601f168201915b505050505081565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b600354600160a060020a031633146108c157600080fd5b600354600160a060020a038083169163a9059cbb91166108e08461136b565b6040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b15801561094b57600080fd5b505af115801561095f573d6000803e3d6000fd5b505050506040513d602081101561097557600080fd5b505050565b6001545b90565b600454600090849074010000000000000000000000000000000000000000900460ff1615156109d157600160a060020a03811660009081526005602052604090205460ff1615156109d157600080fd5b6109dc8585856117d5565b95945050505050565b600354600160a060020a031633146109fc57600080fd5b60045460009074010000000000000000000000000000000000000000900460ff1615610a2757600080fd5b506004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600d5481565b3360009081526007602052604090205460ff161515610a7b57600080fd5b60065460ff1615610a8b57600080fd5b60015473__contracts/SafeMathLib.sol:SafeMathLi__6366098d4f9091836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b158015610b0257600080fd5b505af4158015610b16573d6000803e3d6000fd5b505050506040513d6020811015610b2c57600080fd5b5051600155600160a060020a038216600090815260208181526040918290205482517f66098d4f000000000000000000000000000000000000000000000000000000008152600481019190915260248101849052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b158015610bba57600080fd5b505af4158015610bce573d6000803e3d6000fd5b505050506040513d6020811015610be457600080fd5b5051600160a060020a0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b33600081815260208190526040902054610c5c908363ffffffff61194c16565b600160a060020a038216600090815260208190526040902055600154610c88908363ffffffff61194c16565b60015560408051600160a060020a03831681526020810184905281517f696de425f79f4a40bc6d2122ca50507f0efbeabbff86a84871b7196ab8ea8df7929181900390910190a1604080518381529051600091600160a060020a038416917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b60076020526000908152604090205460ff1681565b600354600160a060020a03163314610d4057600080fd5b60065460ff1615610d5057600080fd5b600160a060020a038216600081815260076020908152604091829020805460ff191685151590811790915582519384529083015280517f4b0adf6c802794c7dde28a08a4e07131abcff3bf9603cd71f14f90bec7865efa9281900390910190a15050565b6000610dbe6111e9565b90506003816004811115610dce57fe5b1480610de557506004816004811115610de357fe5b145b1515610df057600080fd5b811515610dfc57600080fd5b33600090815260208190526040902054610e1c908363ffffffff61194c16565b33600090815260208190526040902055600154610e3f908363ffffffff61194c16565b600155600a54610e55908363ffffffff61195e16565b600a55600954604080517f753e88e5000000000000000000000000000000000000000000000000000000008152336004820152602481018590529051600160a060020a039092169163753e88e59160448082019260009290919082900301818387803b158015610ec457600080fd5b505af1158015610ed8573d6000803e3d6000fd5b5050600954604080518681529051600160a060020a0390921693503392507f7e5c344a8141a805725cb476f76c6953b842222b967edd1f78ddb6e8b3f397ac919081900360200190a35050565b600354600160a060020a03163314610f3c57600080fd5b8151610f4f90600b906020850190611aa3565b508051610f6390600c906020840190611aa3565b5060408051818152600b8054600260001961010060018416150201909116049282018390527fd131ab1e6f279deea74e13a18477e13e2107deb6dc8ae955648948be5841fb46929091600c918190602082019060608301908690801561100a5780601f10610fdf5761010080835404028352916020019161100a565b820191906000526020600020905b815481529060010190602001808311610fed57829003601f168201915b505083810382528454600260001961010060018416150201909116048082526020909101908590801561107e5780601f106110535761010080835404028352916020019161107e565b820191906000526020600020905b81548152906001019060200180831161106157829003601f168201915b505094505050505060405180910390a15050565b600954600160a060020a031681565b600454600160a060020a031633146110b857600080fd5b6006805460ff191660011790556110cd611974565b565b600854600160a060020a031681565b336000908152600260209081526040808320600160a060020a03861684529091528120548083111561113357336000908152600260209081526040808320600160a060020a0388168452909152812055611168565b611143818463ffffffff61194c16565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a031660009081526020819052604090205490565b60006111f36112d4565b15156112015750600161097e565b600954600160a060020a0316151561121b5750600261097e565b600a54151561122c5750600361097e565b50600461097e565b60056020526000908152604090205460ff1681565b600354600160a060020a031681565b600c805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561083c5780601f106108115761010080835404028352916020019161083c565b60045474010000000000000000000000000000000000000000900460ff1681565b60045460009074010000000000000000000000000000000000000000900460ff16801561130457506113046116db565b905090565b600454600090339074010000000000000000000000000000000000000000900460ff16151561135957600160a060020a03811660009081526005602052604090205460ff16151561135957600080fd5b61136384846119c2565b949350505050565b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600091600160a060020a038416916370a082319160248082019260209290919082900301818787803b1580156113cf57600080fd5b505af11580156113e3573d6000803e3d6000fd5b505050506040513d60208110156113f957600080fd5b505192915050565b600a5481565b600454600160a060020a031681565b336000908152600260209081526040808320600160a060020a038616845290915281205461144a908363ffffffff61195e16565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b6114b76112d4565b15156114c257600080fd5b600160a060020a03811615156114d757600080fd5b600854600160a060020a031633146114ee57600080fd5b60046114f86111e9565b600481111561150357fe5b141561150e57600080fd5b6009805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038381169190911791829055604080517f61d3d7a6000000000000000000000000000000000000000000000000000000008152905192909116916361d3d7a6916004808201926020929091908290030181600087803b15801561159257600080fd5b505af11580156115a6573d6000803e3d6000fd5b505050506040513d60208110156115bc57600080fd5b505115156115c957600080fd5b600154600960009054906101000a9004600160a060020a0316600160a060020a0316634b2ba0dd6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561163857600080fd5b505af115801561164c573d6000803e3d6000fd5b505050506040513d602081101561166257600080fd5b50511461166e57600080fd5b60095460408051600160a060020a039092168252517f7845d5aa74cc410e35571258d954f23b82276e160fe8c188fa80566580f279cc9181900360200190a150565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600190565b600354600160a060020a031633146116f757600080fd5b600160a060020a038116151561170c57600080fd5b600354604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600081565b600160a060020a038116151561178f57600080fd5b600854600160a060020a031633146117a657600080fd5b6008805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6000600160a060020a03831615156117ec57600080fd5b600160a060020a03841660009081526020819052604090205482111561181157600080fd5b600160a060020a038416600090815260026020908152604080832033845290915290205482111561184157600080fd5b600160a060020a03841660009081526020819052604090205461186a908363ffffffff61194c16565b600160a060020a03808616600090815260208190526040808220939093559085168152205461189f908363ffffffff61195e16565b600160a060020a038085166000908152602081815260408083209490945591871681526002825282812033825290915220546118e1908363ffffffff61194c16565b600160a060020a03808616600081815260026020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b60008282111561195857fe5b50900390565b60008282018381101561196d57fe5b9392505050565b600454600160a060020a0316331461198b57600080fd5b6004805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b6000600160a060020a03831615156119d957600080fd5b336000908152602081905260409020548211156119f557600080fd5b33600090815260208190526040902054611a15908363ffffffff61194c16565b3360009081526020819052604080822092909255600160a060020a03851681522054611a47908363ffffffff61195e16565b600160a060020a038416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10611ae457805160ff1916838001178555611b11565b82800160010185558215611b11579182015b82811115611b11578251825591602001919060010190611af6565b50611b1d929150611b21565b5090565b61097e91905b80821115611b1d5760008155600101611b275600a165627a7a72305820ea139161e6388df5aba2e906031cd2d29897c110d345cca522f6ea1086be1bfb0029", "bytecode_runtime": "0x6080604052600436106101cc5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166302f652a381146101d157806305d2035b146101f957806306fdde0314610222578063095ea7b3146102ac57806316114acd146102d057806318160ddd146102f157806323b872dd1461031857806329ff4f5314610342578063313ce5671461036357806340c10f191461037857806342966c681461039c57806342c1867b146103b457806343214675146103d557806345977d03146103fb5780634eee966f146104135780635de4ccb0146104aa5780635f412d4f146104db578063600440cb146104f0578063661884631461050557806370a08231146105295780638444b3911461054a578063867c2857146105835780638da5cb5b146105a457806395d89b41146105b957806396132521146105ce5780639738968c146105e3578063a9059cbb146105f8578063c45d19db1461061c578063c752ff621461063d578063d1f276d314610652578063d73dd62314610667578063d7e7088a1461068b578063dd62ed3e146106ac578063eefa597b146106d3578063f2fde38b146106e8578063fccc281314610709578063ffeb7d751461071e575b600080fd5b3480156101dd57600080fd5b506101f7600160a060020a0360043516602435151561073f565b005b34801561020557600080fd5b5061020e6107ad565b604080519115158252519081900360200190f35b34801561022e57600080fd5b506102376107b6565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610271578181015183820152602001610259565b50505050905090810190601f16801561029e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156102b857600080fd5b5061020e600160a060020a0360043516602435610844565b3480156102dc57600080fd5b506101f7600160a060020a03600435166108aa565b3480156102fd57600080fd5b5061030661097a565b60408051918252519081900360200190f35b34801561032457600080fd5b5061020e600160a060020a0360043581169060243516604435610981565b34801561034e57600080fd5b506101f7600160a060020a03600435166109e5565b34801561036f57600080fd5b50610306610a57565b34801561038457600080fd5b506101f7600160a060020a0360043516602435610a5d565b3480156103a857600080fd5b506101f7600435610c3c565b3480156103c057600080fd5b5061020e600160a060020a0360043516610d14565b3480156103e157600080fd5b506101f7600160a060020a03600435166024351515610d29565b34801561040757600080fd5b506101f7600435610db4565b34801561041f57600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526101f794369492936024939284019190819084018382808284375050604080516020601f89358b018035918201839004830284018301909452808352979a999881019791965091820194509250829150840183828082843750949750610f259650505050505050565b3480156104b657600080fd5b506104bf611092565b60408051600160a060020a039092168252519081900360200190f35b3480156104e757600080fd5b506101f76110a1565b3480156104fc57600080fd5b506104bf6110cf565b34801561051157600080fd5b5061020e600160a060020a03600435166024356110de565b34801561053557600080fd5b50610306600160a060020a03600435166111ce565b34801561055657600080fd5b5061055f6111e9565b6040518082600481111561056f57fe5b60ff16815260200191505060405180910390f35b34801561058f57600080fd5b5061020e600160a060020a0360043516611234565b3480156105b057600080fd5b506104bf611249565b3480156105c557600080fd5b50610237611258565b3480156105da57600080fd5b5061020e6112b3565b3480156105ef57600080fd5b5061020e6112d4565b34801561060457600080fd5b5061020e600160a060020a0360043516602435611309565b34801561062857600080fd5b50610306600160a060020a036004351661136b565b34801561064957600080fd5b50610306611401565b34801561065e57600080fd5b506104bf611407565b34801561067357600080fd5b5061020e600160a060020a0360043516602435611416565b34801561069757600080fd5b506101f7600160a060020a03600435166114af565b3480156106b857600080fd5b50610306600160a060020a03600435811690602435166116b0565b3480156106df57600080fd5b5061020e6116db565b3480156106f457600080fd5b506101f7600160a060020a03600435166116e0565b34801561071557600080fd5b506104bf611775565b34801561072a57600080fd5b506101f7600160a060020a036004351661177a565b600354600160a060020a0316331461075657600080fd5b60045460009074010000000000000000000000000000000000000000900460ff161561078157600080fd5b50600160a060020a03919091166000908152600560205260409020805460ff1916911515919091179055565b60065460ff1681565b600b805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561083c5780601f106108115761010080835404028352916020019161083c565b820191906000526020600020905b81548152906001019060200180831161081f57829003601f168201915b505050505081565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b600354600160a060020a031633146108c157600080fd5b600354600160a060020a038083169163a9059cbb91166108e08461136b565b6040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b15801561094b57600080fd5b505af115801561095f573d6000803e3d6000fd5b505050506040513d602081101561097557600080fd5b505050565b6001545b90565b600454600090849074010000000000000000000000000000000000000000900460ff1615156109d157600160a060020a03811660009081526005602052604090205460ff1615156109d157600080fd5b6109dc8585856117d5565b95945050505050565b600354600160a060020a031633146109fc57600080fd5b60045460009074010000000000000000000000000000000000000000900460ff1615610a2757600080fd5b506004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600d5481565b3360009081526007602052604090205460ff161515610a7b57600080fd5b60065460ff1615610a8b57600080fd5b60015473__contracts/SafeMathLib.sol:SafeMathLi__6366098d4f9091836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b158015610b0257600080fd5b505af4158015610b16573d6000803e3d6000fd5b505050506040513d6020811015610b2c57600080fd5b5051600155600160a060020a038216600090815260208181526040918290205482517f66098d4f000000000000000000000000000000000000000000000000000000008152600481019190915260248101849052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b158015610bba57600080fd5b505af4158015610bce573d6000803e3d6000fd5b505050506040513d6020811015610be457600080fd5b5051600160a060020a0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b33600081815260208190526040902054610c5c908363ffffffff61194c16565b600160a060020a038216600090815260208190526040902055600154610c88908363ffffffff61194c16565b60015560408051600160a060020a03831681526020810184905281517f696de425f79f4a40bc6d2122ca50507f0efbeabbff86a84871b7196ab8ea8df7929181900390910190a1604080518381529051600091600160a060020a038416917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b60076020526000908152604090205460ff1681565b600354600160a060020a03163314610d4057600080fd5b60065460ff1615610d5057600080fd5b600160a060020a038216600081815260076020908152604091829020805460ff191685151590811790915582519384529083015280517f4b0adf6c802794c7dde28a08a4e07131abcff3bf9603cd71f14f90bec7865efa9281900390910190a15050565b6000610dbe6111e9565b90506003816004811115610dce57fe5b1480610de557506004816004811115610de357fe5b145b1515610df057600080fd5b811515610dfc57600080fd5b33600090815260208190526040902054610e1c908363ffffffff61194c16565b33600090815260208190526040902055600154610e3f908363ffffffff61194c16565b600155600a54610e55908363ffffffff61195e16565b600a55600954604080517f753e88e5000000000000000000000000000000000000000000000000000000008152336004820152602481018590529051600160a060020a039092169163753e88e59160448082019260009290919082900301818387803b158015610ec457600080fd5b505af1158015610ed8573d6000803e3d6000fd5b5050600954604080518681529051600160a060020a0390921693503392507f7e5c344a8141a805725cb476f76c6953b842222b967edd1f78ddb6e8b3f397ac919081900360200190a35050565b600354600160a060020a03163314610f3c57600080fd5b8151610f4f90600b906020850190611aa3565b508051610f6390600c906020840190611aa3565b5060408051818152600b8054600260001961010060018416150201909116049282018390527fd131ab1e6f279deea74e13a18477e13e2107deb6dc8ae955648948be5841fb46929091600c918190602082019060608301908690801561100a5780601f10610fdf5761010080835404028352916020019161100a565b820191906000526020600020905b815481529060010190602001808311610fed57829003601f168201915b505083810382528454600260001961010060018416150201909116048082526020909101908590801561107e5780601f106110535761010080835404028352916020019161107e565b820191906000526020600020905b81548152906001019060200180831161106157829003601f168201915b505094505050505060405180910390a15050565b600954600160a060020a031681565b600454600160a060020a031633146110b857600080fd5b6006805460ff191660011790556110cd611974565b565b600854600160a060020a031681565b336000908152600260209081526040808320600160a060020a03861684529091528120548083111561113357336000908152600260209081526040808320600160a060020a0388168452909152812055611168565b611143818463ffffffff61194c16565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a031660009081526020819052604090205490565b60006111f36112d4565b15156112015750600161097e565b600954600160a060020a0316151561121b5750600261097e565b600a54151561122c5750600361097e565b50600461097e565b60056020526000908152604090205460ff1681565b600354600160a060020a031681565b600c805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561083c5780601f106108115761010080835404028352916020019161083c565b60045474010000000000000000000000000000000000000000900460ff1681565b60045460009074010000000000000000000000000000000000000000900460ff16801561130457506113046116db565b905090565b600454600090339074010000000000000000000000000000000000000000900460ff16151561135957600160a060020a03811660009081526005602052604090205460ff16151561135957600080fd5b61136384846119c2565b949350505050565b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600091600160a060020a038416916370a082319160248082019260209290919082900301818787803b1580156113cf57600080fd5b505af11580156113e3573d6000803e3d6000fd5b505050506040513d60208110156113f957600080fd5b505192915050565b600a5481565b600454600160a060020a031681565b336000908152600260209081526040808320600160a060020a038616845290915281205461144a908363ffffffff61195e16565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b6114b76112d4565b15156114c257600080fd5b600160a060020a03811615156114d757600080fd5b600854600160a060020a031633146114ee57600080fd5b60046114f86111e9565b600481111561150357fe5b141561150e57600080fd5b6009805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038381169190911791829055604080517f61d3d7a6000000000000000000000000000000000000000000000000000000008152905192909116916361d3d7a6916004808201926020929091908290030181600087803b15801561159257600080fd5b505af11580156115a6573d6000803e3d6000fd5b505050506040513d60208110156115bc57600080fd5b505115156115c957600080fd5b600154600960009054906101000a9004600160a060020a0316600160a060020a0316634b2ba0dd6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561163857600080fd5b505af115801561164c573d6000803e3d6000fd5b505050506040513d602081101561166257600080fd5b50511461166e57600080fd5b60095460408051600160a060020a039092168252517f7845d5aa74cc410e35571258d954f23b82276e160fe8c188fa80566580f279cc9181900360200190a150565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600190565b600354600160a060020a031633146116f757600080fd5b600160a060020a038116151561170c57600080fd5b600354604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600081565b600160a060020a038116151561178f57600080fd5b600854600160a060020a031633146117a657600080fd5b6008805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6000600160a060020a03831615156117ec57600080fd5b600160a060020a03841660009081526020819052604090205482111561181157600080fd5b600160a060020a038416600090815260026020908152604080832033845290915290205482111561184157600080fd5b600160a060020a03841660009081526020819052604090205461186a908363ffffffff61194c16565b600160a060020a03808616600090815260208190526040808220939093559085168152205461189f908363ffffffff61195e16565b600160a060020a038085166000908152602081815260408083209490945591871681526002825282812033825290915220546118e1908363ffffffff61194c16565b600160a060020a03808616600081815260026020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b60008282111561195857fe5b50900390565b60008282018381101561196d57fe5b9392505050565b600454600160a060020a0316331461198b57600080fd5b6004805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b6000600160a060020a03831615156119d957600080fd5b336000908152602081905260409020548211156119f557600080fd5b33600090815260208190526040902054611a15908363ffffffff61194c16565b3360009081526020819052604080822092909255600160a060020a03851681522054611a47908363ffffffff61195e16565b600160a060020a038416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10611ae457805160ff1916838001178555611b11565b82800160010185558215611b11579182015b82811115611b11578251825591602001919060010190611af6565b50611b1d929150611b21565b5090565b61097e91905b80821115611b1d5760008155600101611b275600a165627a7a72305820ea139161e6388df5aba2e906031cd2d29897c110d345cca522f6ea1086be1bfb0029", "direct_dependencies": ["SafeMathLib"], "full_dependencies": ["SafeMathLib"], "linkrefs": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 6510}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 6998}], "linkrefs_runtime": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 5408}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 5896}], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "state", "type": "bool"}], "name": "setTransferAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "mintingFinished", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "name", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "approve", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "recoverTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_from", "type": "address"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setReleaseAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "decimals", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "receiver", "type": "address"}, {"name": "amount", "type": "uint256"}], "name": "mint", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "burnAmount", "type": "uint256"}], "name": "burn", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "mintAgents", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "state", "type": "bool"}], "name": "setMintAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "uint256"}], "name": "upgrade", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_name", "type": "string"}, {"name": "_symbol", "type": "string"}], "name": "setTokenInformation", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "upgradeAgent", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "releaseTokenTransfer", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "upgradeMaster", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_subtractedValue", "type": "uint256"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getUpgradeState", "outputs": [{"name": "", "type": "uint8"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "transferAgents", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "symbol", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "released", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "canUpgrade", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "tokensToBeReturned", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalUpgraded", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "releaseAgent", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_addedValue", "type": "uint256"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "agent", "type": "address"}], "name": "setUpgradeAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}, {"name": "_spender", "type": "address"}], "name": "allowance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isToken", "outputs": [{"name": "weAre", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "BURN_ADDRESS", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "master", "type": "address"}], "name": "setUpgradeMaster", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [{"name": "_name", "type": "string"}, {"name": "_symbol", "type": "string"}, {"name": "_initialSupply", "type": "uint256"}, {"name": "_decimals", "type": "uint256"}, {"name": "_mintable", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newName", "type": "string"}, {"indexed": false, "name": "newSymbol", "type": "string"}], "name": "UpdatedTokenInformation", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "_from", "type": "address"}, {"indexed": true, "name": "_to", "type": "address"}, {"indexed": false, "name": "_value", "type": "uint256"}], "name": "Upgrade", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "agent", "type": "address"}], "name": "UpgradeAgentSet", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "addr", "type": "address"}, {"indexed": false, "name": "state", "type": "bool"}], "name": "MintingAgentChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "receiver", "type": "address"}, {"indexed": false, "name": "amount", "type": "uint256"}], "name": "Minted", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "burner", "type": "address"}, {"indexed": false, "name": "burnedAmount", "type": "uint256"}], "name": "Burned", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}, {"indexed": true, "name": "spender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "devdoc": {"methods": {"allowance(address,address)": {"details": "Function to check the amount of tokens that an owner allowed to a spender.", "params": {"_owner": "address The address which owns the funds.", "_spender": "address The address which will spend the funds."}, "return": "A uint256 specifying the amount of tokens still available for the spender."}, "approve(address,uint256)": {"details": "Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729", "params": {"_spender": "The address which will spend the funds.", "_value": "The amount of tokens to be spent."}}, "balanceOf(address)": {"details": "Gets the balance of the specified address.", "params": {"_owner": "The address to query the the balance of."}, "return": "An uint256 representing the amount owned by the passed address."}, "decreaseApproval(address,uint256)": {"details": "Decrease the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[_spender] == 0. To decrement allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"_spender": "The address which will spend the funds.", "_subtractedValue": "The amount of tokens to decrease the allowance by."}}, "increaseApproval(address,uint256)": {"details": "Increase the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[_spender] == 0. To increment allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"_addedValue": "The amount of tokens to increase the allowance by.", "_spender": "The address which will spend the funds."}}, "recoverTokens(address)": {"details": "This will be invoked by the owner, when owner wants to rescue tokens", "params": {"token": "Token which will we rescue to the owner from the contract"}}, "tokensToBeReturned(address)": {"details": "Interface function, can be overwritten by the superclass", "params": {"token": "Token which balance we will check and return"}, "return": "The amount of tokens (in smallest denominator) the contract owns"}, "totalSupply()": {"details": "total number of tokens in existence"}, "transferOwnership(address)": {"details": "Allows the current owner to transfer control of the contract to a newOwner.", "params": {"newOwner": "The address to transfer ownership to."}}}}, "userdoc": {"methods": {"burn(uint256)": {"notice": "Burn extra tokens from a balance. "}, "canUpgrade()": {"notice": "Allow upgrade agent functionality kick in only if the crowdsale was success."}, "getUpgradeState()": {"notice": "Get the state of the token upgrade."}, "mint(address,uint256)": {"notice": "Create new tokens and allocate them to an address.. * Only callably by a crowdsale contract (mint agent)."}, "releaseTokenTransfer()": {"notice": "When token is released to be transferable, enforce no new tokens can be created."}, "setMintAgent(address,bool)": {"notice": "Owner can allow a crowdsale contract to mint new tokens."}, "setReleaseAgent(address)": {"notice": "Set the contract that can call release and make the token transferable. * Design choice. Allow reset the release agent to fix fat finger mistakes."}, "setTokenInformation(string,string)": {"notice": "Owner can update token information here. * It is often useful to conceal the actual token association, until the token operations, like central issuance or reissuance have been completed. * This function allows the token owner to rename the token after the operations have been completed and then point the audience to use the token contract."}, "setTransferAgent(address,bool)": {"notice": "Owner can allow a particular address (a crowdsale contract) to transfer tokens despite the lock up period."}, "setUpgradeAgent(address)": {"notice": "Set an upgrade agent that handles"}, "setUpgradeMaster(address)": {"notice": "Change the upgrade master. * This allows us to set a new owner for the upgrade mechanism."}, "upgrade(uint256)": {"notice": "Allow the token holder to upgrade some of their tokens to a new contract."}}}}, "settings": {"compilationTarget": {"contracts/BurnableCrowdsaleToken.sol": "BurnableCrowdsaleToken"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/BurnableCrowdsaleToken.sol": {"keccak256": "0x675958952b65781d10a687151f84f5164b4c92bb5893070c6a2ffc9e32875a00", "urls": ["bzzr://444b37bcc9479485ba287995cf667781a659c883a3a7102611f7557c21a2ffbc"]}, "contracts/BurnableToken.sol": {"keccak256": "0xb97707de2018141fb22482d7ad4faa35cd471ae2ed992343bbcc1be0d3b95218", "urls": ["bzzr://a8b275d0ee25a96664f613d48339250b11d5140d7b74122d74482c3a94cc5295"]}, "contracts/CrowdsaleToken.sol": {"keccak256": "0xa812687ac327cd19fac64667980e70d4fb72ef7f61dce477818d085cf0a915df", "urls": ["bzzr://826d9dda00ce341794e5bb05c78b1abb2728e3c631f7a542345dcfa9f3bd9c50"]}, "contracts/MintableToken.sol": {"keccak256": "0x650e1d6b2bedcd36508918357c7cf4f36fdd093cd0c4d6342f4dcd3bdcdd7578", "urls": ["bzzr://7ba2ac0480d428066a18727e2adb76ba56856ecd37b4420e801131ec8f8f4be3"]}, "contracts/Recoverable.sol": {"keccak256": "0x311a332cdd87df6e00057f5455f4e68b043b5dbe211f6d68bc64e20817515635", "urls": ["bzzr://4fd99bcfb93baed6e7c8d22ee9ecc5c8346a1aa98288e77b01333b2c5d3f582d"]}, "contracts/ReleasableToken.sol": {"keccak256": "0x2c50180d0c1eab1aa63a04da3ae87ee2c482665d2a1a42c5f05b11234a7edaf4", "urls": ["bzzr://10752c317eba5c42e2848722689cfee4fffb7bcb42f3346e1a20715d843798e8"]}, "contracts/SafeMathLib.sol": {"keccak256": "0x501bfe31e274b9a5591f7c540bdced4d4312e27d4f19599147c9bbca3d9c6b18", "urls": ["bzzr://a80935ebddb06c247d71372d4e5833ee029f08633bd0fe4a274a57009567e5b9"]}, "contracts/StandardTokenExt.sol": {"keccak256": "0x9ea2d4cec4dccd5639c05e6c23dd027d80b5e5a20abd99b280ab7b2631b5a5fc", "urls": ["bzzr://a52d8fc5a21bd83997aff19128e00dceb251df712207b61223894c8b7f42d5ff"]}, "contracts/UpgradeAgent.sol": {"keccak256": "0x88e793f72feca4a18d2cd06e6037c1413d7b963eabcf5626d60bfb9d04d6e8e6", "urls": ["bzzr://87e39a65cf25d539ab49ad7e759b3298b8a19272964e69e3f2432f0323f30025"]}, "contracts/UpgradeableToken.sol": {"keccak256": "0xa74fc300c514564ece81c86905502c2de674b69c0633b133af19c1ba027da2c9", "urls": ["bzzr://55bc0b908c94781462b8959f051c6dbb53c35641b0f8cb38d74632ad6bf95e52"]}, "zeppelin/contracts/math/SafeMath.sol": {"keccak256": "0x341ba8cb467a3623e819ba1a683ac1d264005186f308505214e5f6bc89446a08", "urls": ["bzzr://59b5652ee4e4a1b5a8f1a8906e14c84af43d636cf5ca0725cc1813aabe4c8c17"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}, "zeppelin/contracts/token/ERC20/BasicToken.sol": {"keccak256": "0x948404468d61ff35ea4194650670408dabd65da7f905a1c16888ab84520bf39e", "urls": ["bzzr://ea75e20f95d7e4e10394fe6bfaa8eee56b4757c2a6f1e8df4180d33afa621935"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}, "zeppelin/contracts/token/ERC20/StandardToken.sol": {"keccak256": "0xd2b344a5259e19ec143074cfa65637a10c40b68395c59808c4af13bccbb2de55", "urls": ["bzzr://d61a01175a7ca1ba9f4403de603c20b897e33ec425aef2d9f8a7f9ddfdfaf5b2"]}}, "version": 1}, "name": "BurnableCrowdsaleToken", "ordered_full_dependencies": ["SafeMathLib"], "source_path": "contracts/BurnableCrowdsaleToken.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n assert(c / a == b);\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n\n\n\n/**\n * @title Basic token\n * @dev Basic version of StandardToken, with no allowances.\n */\ncontract BasicToken is ERC20Basic {\n using SafeMath for uint256;\n\n mapping(address => uint256) balances;\n\n uint256 totalSupply_;\n\n /**\n * @dev total number of tokens in existence\n */\n function totalSupply() public view returns (uint256) {\n return totalSupply_;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param _to The address to transfer to.\n * @param _value The amount to be transferred.\n */\n function transfer(address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[msg.sender]);\n\n // SafeMath.sub will throw if there is not enough balance.\n balances[msg.sender] = balances[msg.sender].sub(_value);\n balances[_to] = balances[_to].add(_value);\n Transfer(msg.sender, _to, _value);\n return true;\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param _owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address _owner) public view returns (uint256 balance) {\n return balances[_owner];\n }\n\n}\n\n\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n\n\n/**\n * @title Standard ERC20 token\n *\n * @dev Implementation of the basic standard token.\n * @dev https://github.com/ethereum/EIPs/issues/20\n * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol\n */\ncontract StandardToken is ERC20, BasicToken {\n\n mapping (address => mapping (address => uint256)) internal allowed;\n\n\n /**\n * @dev Transfer tokens from one address to another\n * @param _from address The address which you want to send tokens from\n * @param _to address The address which you want to transfer to\n * @param _value uint256 the amount of tokens to be transferred\n */\n function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[_from]);\n require(_value <= allowed[_from][msg.sender]);\n\n balances[_from] = balances[_from].sub(_value);\n balances[_to] = balances[_to].add(_value);\n allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);\n Transfer(_from, _to, _value);\n return true;\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n *\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param _spender The address which will spend the funds.\n * @param _value The amount of tokens to be spent.\n */\n function approve(address _spender, uint256 _value) public returns (bool) {\n allowed[msg.sender][_spender] = _value;\n Approval(msg.sender, _spender, _value);\n return true;\n }\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param _owner address The address which owns the funds.\n * @param _spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address _owner, address _spender) public view returns (uint256) {\n return allowed[_owner][_spender];\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(address _spender, uint _addedValue) public returns (bool) {\n allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {\n uint oldValue = allowed[msg.sender][_spender];\n if (_subtractedValue > oldValue) {\n allowed[msg.sender][_spender] = 0;\n } else {\n allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);\n }\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n\ncontract Recoverable is Ownable {\n\n /// @dev Empty constructor (for now)\n function Recoverable() {\n }\n\n /// @dev This will be invoked by the owner, when owner wants to rescue tokens\n /// @param token Token which will we rescue to the owner from the contract\n function recoverTokens(ERC20Basic token) onlyOwner public {\n token.transfer(owner, tokensToBeReturned(token));\n }\n\n /// @dev Interface function, can be overwritten by the superclass\n /// @param token Token which balance we will check and return\n /// @return The amount of tokens (in smallest denominator) the contract owns\n function tokensToBeReturned(ERC20Basic token) public returns (uint) {\n return token.balanceOf(this);\n }\n}\n\n\n\n/**\n * Standard EIP-20 token with an interface marker.\n *\n * @notice Interface marker is used by crowdsale contracts to validate that addresses point a good token contract.\n *\n */\ncontract StandardTokenExt is StandardToken, Recoverable {\n\n /* Interface declaration */\n function isToken() public constant returns (bool weAre) {\n return true;\n }\n}\n\n\ncontract BurnableToken is StandardTokenExt {\n\n // @notice An address for the transfer event where the burned tokens are transferred in a faux Transfer event\n address public constant BURN_ADDRESS = 0;\n\n /** How many tokens we burned */\n event Burned(address burner, uint burnedAmount);\n\n /**\n * Burn extra tokens from a balance.\n *\n */\n function burn(uint burnAmount) {\n address burner = msg.sender;\n balances[burner] = balances[burner].sub(burnAmount);\n totalSupply_ = totalSupply_.sub(burnAmount);\n Burned(burner, burnAmount);\n\n // Inform the blockchain explores that track the\n // balances only by a transfer event that the balance in this\n // address has decreased\n Transfer(burner, BURN_ADDRESS, burnAmount);\n }\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Upgrade agent interface inspired by Lunyr.\n *\n * Upgrade agent transfers tokens to a new contract.\n * Upgrade agent itself can be the token contract, or just a middle man contract doing the heavy lifting.\n */\ncontract UpgradeAgent {\n\n uint public originalSupply;\n\n /** Interface marker */\n function isUpgradeAgent() public constant returns (bool) {\n return true;\n }\n\n function upgradeFrom(address _from, uint256 _value) public;\n\n}\n\n\n/**\n * A token upgrade mechanism where users can opt-in amount of tokens to the next smart contract revision.\n *\n * First envisioned by Golem and Lunyr projects.\n */\ncontract UpgradeableToken is StandardTokenExt {\n\n /** Contract / person who can set the upgrade path. This can be the same as team multisig wallet, as what it is with its default value. */\n address public upgradeMaster;\n\n /** The next contract where the tokens will be migrated. */\n UpgradeAgent public upgradeAgent;\n\n /** How many tokens we have upgraded by now. */\n uint256 public totalUpgraded;\n\n /**\n * Upgrade states.\n *\n * - NotAllowed: The child contract has not reached a condition where the upgrade can bgun\n * - WaitingForAgent: Token allows upgrade, but we don't have a new agent yet\n * - ReadyToUpgrade: The agent is set, but not a single token has been upgraded yet\n * - Upgrading: Upgrade agent is set and the balance holders can upgrade their tokens\n *\n */\n enum UpgradeState {Unknown, NotAllowed, WaitingForAgent, ReadyToUpgrade, Upgrading}\n\n /**\n * Somebody has upgraded some of his tokens.\n */\n event Upgrade(address indexed _from, address indexed _to, uint256 _value);\n\n /**\n * New upgrade agent available.\n */\n event UpgradeAgentSet(address agent);\n\n /**\n * Do not allow construction without upgrade master set.\n */\n function UpgradeableToken(address _upgradeMaster) {\n upgradeMaster = _upgradeMaster;\n }\n\n /**\n * Allow the token holder to upgrade some of their tokens to a new contract.\n */\n function upgrade(uint256 value) public {\n\n UpgradeState state = getUpgradeState();\n if(!(state == UpgradeState.ReadyToUpgrade || state == UpgradeState.Upgrading)) {\n // Called in a bad state\n throw;\n }\n\n // Validate input value.\n if (value == 0) throw;\n\n balances[msg.sender] = balances[msg.sender].sub(value);\n\n // Take tokens out from circulation\n totalSupply_ = totalSupply_.sub(value);\n totalUpgraded = totalUpgraded.add(value);\n\n // Upgrade agent reissues the tokens\n upgradeAgent.upgradeFrom(msg.sender, value);\n Upgrade(msg.sender, upgradeAgent, value);\n }\n\n /**\n * Set an upgrade agent that handles\n */\n function setUpgradeAgent(address agent) external {\n\n if(!canUpgrade()) {\n // The token is not yet in a state that we could think upgrading\n throw;\n }\n\n if (agent == 0x0) throw;\n // Only a master can designate the next agent\n if (msg.sender != upgradeMaster) throw;\n // Upgrade has already begun for an agent\n if (getUpgradeState() == UpgradeState.Upgrading) throw;\n\n upgradeAgent = UpgradeAgent(agent);\n\n // Bad interface\n if(!upgradeAgent.isUpgradeAgent()) throw;\n // Make sure that token supplies match in source and target\n if (upgradeAgent.originalSupply() != totalSupply_) throw;\n\n UpgradeAgentSet(upgradeAgent);\n }\n\n /**\n * Get the state of the token upgrade.\n */\n function getUpgradeState() public constant returns(UpgradeState) {\n if(!canUpgrade()) return UpgradeState.NotAllowed;\n else if(address(upgradeAgent) == 0x00) return UpgradeState.WaitingForAgent;\n else if(totalUpgraded == 0) return UpgradeState.ReadyToUpgrade;\n else return UpgradeState.Upgrading;\n }\n\n /**\n * Change the upgrade master.\n *\n * This allows us to set a new owner for the upgrade mechanism.\n */\n function setUpgradeMaster(address master) public {\n if (master == 0x0) throw;\n if (msg.sender != upgradeMaster) throw;\n upgradeMaster = master;\n }\n\n /**\n * Child contract can enable to provide the condition when the upgrade can begun.\n */\n function canUpgrade() public constant returns(bool) {\n return true;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n/**\n * Define interface for releasing the token transfer after a successful crowdsale.\n */\ncontract ReleasableToken is StandardTokenExt {\n\n /* The finalizer contract that allows unlift the transfer limits on this token */\n address public releaseAgent;\n\n /** A crowdsale contract can release us to the wild if ICO success. If false we are are in transfer lock up period.*/\n bool public released = false;\n\n /** Map of agents that are allowed to transfer tokens regardless of the lock down period. These are crowdsale contracts and possible the team multisig itself. */\n mapping (address => bool) public transferAgents;\n\n /**\n * Limit token transfer until the crowdsale is over.\n *\n */\n modifier canTransfer(address _sender) {\n\n if(!released) {\n if(!transferAgents[_sender]) {\n throw;\n }\n }\n\n _;\n }\n\n /**\n * Set the contract that can call release and make the token transferable.\n *\n * Design choice. Allow reset the release agent to fix fat finger mistakes.\n */\n function setReleaseAgent(address addr) onlyOwner inReleaseState(false) public {\n\n // We don't do interface check here as we might want to a normal wallet address to act as a release agent\n releaseAgent = addr;\n }\n\n /**\n * Owner can allow a particular address (a crowdsale contract) to transfer tokens despite the lock up period.\n */\n function setTransferAgent(address addr, bool state) onlyOwner inReleaseState(false) public {\n transferAgents[addr] = state;\n }\n\n /**\n * One way function to release the tokens to the wild.\n *\n * Can be called only from the release agent that is the final ICO contract. It is only called if the crowdsale has been success (first milestone reached).\n */\n function releaseTokenTransfer() public onlyReleaseAgent {\n released = true;\n }\n\n /** The function can be called only before or after the tokens have been releasesd */\n modifier inReleaseState(bool releaseState) {\n if(releaseState != released) {\n throw;\n }\n _;\n }\n\n /** The function can be called only by a whitelisted release agent. */\n modifier onlyReleaseAgent() {\n if(msg.sender != releaseAgent) {\n throw;\n }\n _;\n }\n\n function transfer(address _to, uint _value) canTransfer(msg.sender) returns (bool success) {\n // Call StandardToken.transfer()\n return super.transfer(_to, _value);\n }\n\n function transferFrom(address _from, address _to, uint _value) canTransfer(_from) returns (bool success) {\n // Call StandardToken.transferForm()\n return super.transferFrom(_from, _to, _value);\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Safe unsigned safe math.\n *\n * https://blog.aragon.one/library-driven-development-in-solidity-2bebcaf88736#.750gwtwli\n *\n * Originally from https://raw.githubusercontent.com/AragonOne/zeppelin-solidity/master/contracts/SafeMathLib.sol\n *\n * Maintained here until merged to mainline zeppelin-solidity.\n *\n */\nlibrary SafeMathLib {\n\n function times(uint a, uint b) returns (uint) {\n uint c = a * b;\n assert(a == 0 || c / a == b);\n return c;\n }\n\n function minus(uint a, uint b) returns (uint) {\n assert(b <= a);\n return a - b;\n }\n\n function plus(uint a, uint b) returns (uint) {\n uint c = a + b;\n assert(c>=a);\n return c;\n }\n\n}\n\n\n\n/**\n * A token that can increase its supply by another contract.\n *\n * This allows uncapped crowdsale by dynamically increasing the supply when money pours in.\n * Only mint agents, contracts whitelisted by owner, can mint new tokens.\n *\n */\ncontract MintableToken is StandardTokenExt {\n\n using SafeMathLib for uint;\n\n bool public mintingFinished = false;\n\n /** List of agents that are allowed to create new tokens */\n mapping (address => bool) public mintAgents;\n\n event MintingAgentChanged(address addr, bool state);\n event Minted(address receiver, uint amount);\n\n /**\n * Create new tokens and allocate them to an address..\n *\n * Only callably by a crowdsale contract (mint agent).\n */\n function mint(address receiver, uint amount) onlyMintAgent canMint public {\n totalSupply_ = totalSupply_.plus(amount);\n balances[receiver] = balances[receiver].plus(amount);\n\n // This will make the mint transaction apper in EtherScan.io\n // We can remove this after there is a standardized minting event\n Transfer(0, receiver, amount);\n }\n\n /**\n * Owner can allow a crowdsale contract to mint new tokens.\n */\n function setMintAgent(address addr, bool state) onlyOwner canMint public {\n mintAgents[addr] = state;\n MintingAgentChanged(addr, state);\n }\n\n modifier onlyMintAgent() {\n // Only crowdsale contracts are allowed to mint new tokens\n if(!mintAgents[msg.sender]) {\n throw;\n }\n _;\n }\n\n /** Make sure we are not done yet. */\n modifier canMint() {\n if(mintingFinished) throw;\n _;\n }\n}\n\n\n\n/**\n * A crowdsaled token.\n *\n * An ERC-20 token designed specifically for crowdsales with investor protection and further development path.\n *\n * - The token transfer() is disabled until the crowdsale is over\n * - The token contract gives an opt-in upgrade path to a new contract\n * - The same token can be part of several crowdsales through approve() mechanism\n * - The token can be capped (supply set in the constructor) or uncapped (crowdsale contract can mint new tokens)\n *\n */\ncontract CrowdsaleToken is ReleasableToken, MintableToken, UpgradeableToken {\n\n /** Name and symbol were updated. */\n event UpdatedTokenInformation(string newName, string newSymbol);\n\n string public name;\n\n string public symbol;\n\n uint public decimals;\n\n /**\n * Construct the token.\n *\n * This token must be created through a team multisig wallet, so that it is owned by that wallet.\n *\n * @param _name Token name\n * @param _symbol Token symbol - should be all caps\n * @param _initialSupply How many tokens we start with\n * @param _decimals Number of decimal places\n * @param _mintable Are new tokens created over the crowdsale or do we distribute only the initial supply? Note that when the token becomes transferable the minting always ends.\n */\n function CrowdsaleToken(string _name, string _symbol, uint _initialSupply, uint _decimals, bool _mintable)\n UpgradeableToken(msg.sender) {\n\n // Create any address, can be transferred\n // to team multisig via changeOwner(),\n // also remember to call setUpgradeMaster()\n owner = msg.sender;\n\n name = _name;\n symbol = _symbol;\n\n totalSupply_ = _initialSupply;\n\n decimals = _decimals;\n\n // Create initially all balance on the team multisig\n balances[owner] = totalSupply_;\n\n if(totalSupply_ > 0) {\n Minted(owner, totalSupply_);\n }\n\n // No more new supply allowed after the token creation\n if(!_mintable) {\n mintingFinished = true;\n if(totalSupply_ == 0) {\n throw; // Cannot create a token without supply and no minting\n }\n }\n }\n\n /**\n * When token is released to be transferable, enforce no new tokens can be created.\n */\n function releaseTokenTransfer() public onlyReleaseAgent {\n mintingFinished = true;\n super.releaseTokenTransfer();\n }\n\n /**\n * Allow upgrade agent functionality kick in only if the crowdsale was success.\n */\n function canUpgrade() public constant returns(bool) {\n return released && super.canUpgrade();\n }\n\n /**\n * Owner can update token information here.\n *\n * It is often useful to conceal the actual token association, until\n * the token operations, like central issuance or reissuance have been completed.\n *\n * This function allows the token owner to rename the token after the operations\n * have been completed and then point the audience to use the token contract.\n */\n function setTokenInformation(string _name, string _symbol) onlyOwner {\n name = _name;\n symbol = _symbol;\n\n UpdatedTokenInformation(name, symbol);\n }\n\n}\n\n\n/**\n * A crowdsaled token that you can also burn.\n *\n */\ncontract BurnableCrowdsaleToken is BurnableToken, CrowdsaleToken {\n\n function BurnableCrowdsaleToken(string _name, string _symbol, uint _initialSupply, uint _decimals, bool _mintable)\n CrowdsaleToken(_name, _symbol, _initialSupply, _decimals, _mintable) {\n\n }\n}\n"}, "BurnableToken": {"abi": [{"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "approve", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "recoverTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_from", "type": "address"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "burnAmount", "type": "uint256"}], "name": "burn", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_subtractedValue", "type": "uint256"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "tokensToBeReturned", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_addedValue", "type": "uint256"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}, {"name": "_spender", "type": "address"}], "name": "allowance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isToken", "outputs": [{"name": "weAre", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "BURN_ADDRESS", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "burner", "type": "address"}, {"indexed": false, "name": "burnedAmount", "type": "uint256"}], "name": "Burned", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}, {"indexed": true, "name": "spender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "bytecode": "0x608060405260038054600160a060020a03191633179055610ac7806100256000396000f3006080604052600436106100da5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663095ea7b381146100df57806316114acd1461011757806318160ddd1461013a57806323b872dd1461016157806342966c681461018b57806366188463146101a357806370a08231146101c75780638da5cb5b146101e8578063a9059cbb14610219578063c45d19db1461023d578063d73dd6231461025e578063dd62ed3e14610282578063eefa597b146102a9578063f2fde38b146102be578063fccc2813146102df575b600080fd5b3480156100eb57600080fd5b50610103600160a060020a03600435166024356102f4565b604080519115158252519081900360200190f35b34801561012357600080fd5b50610138600160a060020a036004351661035a565b005b34801561014657600080fd5b5061014f61042a565b60408051918252519081900360200190f35b34801561016d57600080fd5b50610103600160a060020a0360043581169060243516604435610430565b34801561019757600080fd5b506101386004356105a7565b3480156101af57600080fd5b50610103600160a060020a036004351660243561067f565b3480156101d357600080fd5b5061014f600160a060020a036004351661076f565b3480156101f457600080fd5b506101fd61078a565b60408051600160a060020a039092168252519081900360200190f35b34801561022557600080fd5b50610103600160a060020a0360043516602435610799565b34801561024957600080fd5b5061014f600160a060020a036004351661087a565b34801561026a57600080fd5b50610103600160a060020a0360043516602435610910565b34801561028e57600080fd5b5061014f600160a060020a03600435811690602435166109a9565b3480156102b557600080fd5b506101036109d4565b3480156102ca57600080fd5b50610138600160a060020a03600435166109d9565b3480156102eb57600080fd5b506101fd610a6e565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b600354600160a060020a0316331461037157600080fd5b600354600160a060020a038083169163a9059cbb91166103908461087a565b6040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b1580156103fb57600080fd5b505af115801561040f573d6000803e3d6000fd5b505050506040513d602081101561042557600080fd5b505050565b60015490565b6000600160a060020a038316151561044757600080fd5b600160a060020a03841660009081526020819052604090205482111561046c57600080fd5b600160a060020a038416600090815260026020908152604080832033845290915290205482111561049c57600080fd5b600160a060020a0384166000908152602081905260409020546104c5908363ffffffff610a7316565b600160a060020a0380861660009081526020819052604080822093909355908516815220546104fa908363ffffffff610a8516565b600160a060020a0380851660009081526020818152604080832094909455918716815260028252828120338252909152205461053c908363ffffffff610a7316565b600160a060020a03808616600081815260026020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b336000818152602081905260409020546105c7908363ffffffff610a7316565b600160a060020a0382166000908152602081905260409020556001546105f3908363ffffffff610a7316565b60015560408051600160a060020a03831681526020810184905281517f696de425f79f4a40bc6d2122ca50507f0efbeabbff86a84871b7196ab8ea8df7929181900390910190a1604080518381529051600091600160a060020a038416917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b336000908152600260209081526040808320600160a060020a0386168452909152812054808311156106d457336000908152600260209081526040808320600160a060020a0388168452909152812055610709565b6106e4818463ffffffff610a7316565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a031660009081526020819052604090205490565b600354600160a060020a031681565b6000600160a060020a03831615156107b057600080fd5b336000908152602081905260409020548211156107cc57600080fd5b336000908152602081905260409020546107ec908363ffffffff610a7316565b3360009081526020819052604080822092909255600160a060020a0385168152205461081e908363ffffffff610a8516565b600160a060020a038416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600091600160a060020a038416916370a082319160248082019260209290919082900301818787803b1580156108de57600080fd5b505af11580156108f2573d6000803e3d6000fd5b505050506040513d602081101561090857600080fd5b505192915050565b336000908152600260209081526040808320600160a060020a0386168452909152812054610944908363ffffffff610a8516565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600190565b600354600160a060020a031633146109f057600080fd5b600160a060020a0381161515610a0557600080fd5b600354604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600081565b600082821115610a7f57fe5b50900390565b600082820183811015610a9457fe5b93925050505600a165627a7a72305820546158f762971e05ee7b823b00328fdcde3255e17a50553e190eef4268522a550029", "bytecode_runtime": "0x6080604052600436106100da5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663095ea7b381146100df57806316114acd1461011757806318160ddd1461013a57806323b872dd1461016157806342966c681461018b57806366188463146101a357806370a08231146101c75780638da5cb5b146101e8578063a9059cbb14610219578063c45d19db1461023d578063d73dd6231461025e578063dd62ed3e14610282578063eefa597b146102a9578063f2fde38b146102be578063fccc2813146102df575b600080fd5b3480156100eb57600080fd5b50610103600160a060020a03600435166024356102f4565b604080519115158252519081900360200190f35b34801561012357600080fd5b50610138600160a060020a036004351661035a565b005b34801561014657600080fd5b5061014f61042a565b60408051918252519081900360200190f35b34801561016d57600080fd5b50610103600160a060020a0360043581169060243516604435610430565b34801561019757600080fd5b506101386004356105a7565b3480156101af57600080fd5b50610103600160a060020a036004351660243561067f565b3480156101d357600080fd5b5061014f600160a060020a036004351661076f565b3480156101f457600080fd5b506101fd61078a565b60408051600160a060020a039092168252519081900360200190f35b34801561022557600080fd5b50610103600160a060020a0360043516602435610799565b34801561024957600080fd5b5061014f600160a060020a036004351661087a565b34801561026a57600080fd5b50610103600160a060020a0360043516602435610910565b34801561028e57600080fd5b5061014f600160a060020a03600435811690602435166109a9565b3480156102b557600080fd5b506101036109d4565b3480156102ca57600080fd5b50610138600160a060020a03600435166109d9565b3480156102eb57600080fd5b506101fd610a6e565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b600354600160a060020a0316331461037157600080fd5b600354600160a060020a038083169163a9059cbb91166103908461087a565b6040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b1580156103fb57600080fd5b505af115801561040f573d6000803e3d6000fd5b505050506040513d602081101561042557600080fd5b505050565b60015490565b6000600160a060020a038316151561044757600080fd5b600160a060020a03841660009081526020819052604090205482111561046c57600080fd5b600160a060020a038416600090815260026020908152604080832033845290915290205482111561049c57600080fd5b600160a060020a0384166000908152602081905260409020546104c5908363ffffffff610a7316565b600160a060020a0380861660009081526020819052604080822093909355908516815220546104fa908363ffffffff610a8516565b600160a060020a0380851660009081526020818152604080832094909455918716815260028252828120338252909152205461053c908363ffffffff610a7316565b600160a060020a03808616600081815260026020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b336000818152602081905260409020546105c7908363ffffffff610a7316565b600160a060020a0382166000908152602081905260409020556001546105f3908363ffffffff610a7316565b60015560408051600160a060020a03831681526020810184905281517f696de425f79f4a40bc6d2122ca50507f0efbeabbff86a84871b7196ab8ea8df7929181900390910190a1604080518381529051600091600160a060020a038416917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b336000908152600260209081526040808320600160a060020a0386168452909152812054808311156106d457336000908152600260209081526040808320600160a060020a0388168452909152812055610709565b6106e4818463ffffffff610a7316565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a031660009081526020819052604090205490565b600354600160a060020a031681565b6000600160a060020a03831615156107b057600080fd5b336000908152602081905260409020548211156107cc57600080fd5b336000908152602081905260409020546107ec908363ffffffff610a7316565b3360009081526020819052604080822092909255600160a060020a0385168152205461081e908363ffffffff610a8516565b600160a060020a038416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600091600160a060020a038416916370a082319160248082019260209290919082900301818787803b1580156108de57600080fd5b505af11580156108f2573d6000803e3d6000fd5b505050506040513d602081101561090857600080fd5b505192915050565b336000908152600260209081526040808320600160a060020a0386168452909152812054610944908363ffffffff610a8516565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600190565b600354600160a060020a031633146109f057600080fd5b600160a060020a0381161515610a0557600080fd5b600354604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600081565b600082821115610a7f57fe5b50900390565b600082820183811015610a9457fe5b93925050505600a165627a7a72305820546158f762971e05ee7b823b00328fdcde3255e17a50553e190eef4268522a550029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "approve", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "recoverTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_from", "type": "address"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "burnAmount", "type": "uint256"}], "name": "burn", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_subtractedValue", "type": "uint256"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "tokensToBeReturned", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_addedValue", "type": "uint256"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}, {"name": "_spender", "type": "address"}], "name": "allowance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isToken", "outputs": [{"name": "weAre", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "BURN_ADDRESS", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "burner", "type": "address"}, {"indexed": false, "name": "burnedAmount", "type": "uint256"}], "name": "Burned", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}, {"indexed": true, "name": "spender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "devdoc": {"methods": {"allowance(address,address)": {"details": "Function to check the amount of tokens that an owner allowed to a spender.", "params": {"_owner": "address The address which owns the funds.", "_spender": "address The address which will spend the funds."}, "return": "A uint256 specifying the amount of tokens still available for the spender."}, "approve(address,uint256)": {"details": "Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729", "params": {"_spender": "The address which will spend the funds.", "_value": "The amount of tokens to be spent."}}, "balanceOf(address)": {"details": "Gets the balance of the specified address.", "params": {"_owner": "The address to query the the balance of."}, "return": "An uint256 representing the amount owned by the passed address."}, "decreaseApproval(address,uint256)": {"details": "Decrease the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[_spender] == 0. To decrement allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"_spender": "The address which will spend the funds.", "_subtractedValue": "The amount of tokens to decrease the allowance by."}}, "increaseApproval(address,uint256)": {"details": "Increase the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[_spender] == 0. To increment allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"_addedValue": "The amount of tokens to increase the allowance by.", "_spender": "The address which will spend the funds."}}, "recoverTokens(address)": {"details": "This will be invoked by the owner, when owner wants to rescue tokens", "params": {"token": "Token which will we rescue to the owner from the contract"}}, "tokensToBeReturned(address)": {"details": "Interface function, can be overwritten by the superclass", "params": {"token": "Token which balance we will check and return"}, "return": "The amount of tokens (in smallest denominator) the contract owns"}, "totalSupply()": {"details": "total number of tokens in existence"}, "transfer(address,uint256)": {"details": "transfer token for a specified address", "params": {"_to": "The address to transfer to.", "_value": "The amount to be transferred."}}, "transferFrom(address,address,uint256)": {"details": "Transfer tokens from one address to another", "params": {"_from": "address The address which you want to send tokens from", "_to": "address The address which you want to transfer to", "_value": "uint256 the amount of tokens to be transferred"}}, "transferOwnership(address)": {"details": "Allows the current owner to transfer control of the contract to a newOwner.", "params": {"newOwner": "The address to transfer ownership to."}}}}, "userdoc": {"methods": {"burn(uint256)": {"notice": "Burn extra tokens from a balance. "}}}}, "settings": {"compilationTarget": {"contracts/BurnableToken.sol": "BurnableToken"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/BurnableToken.sol": {"keccak256": "0xb97707de2018141fb22482d7ad4faa35cd471ae2ed992343bbcc1be0d3b95218", "urls": ["bzzr://a8b275d0ee25a96664f613d48339250b11d5140d7b74122d74482c3a94cc5295"]}, "contracts/Recoverable.sol": {"keccak256": "0x311a332cdd87df6e00057f5455f4e68b043b5dbe211f6d68bc64e20817515635", "urls": ["bzzr://4fd99bcfb93baed6e7c8d22ee9ecc5c8346a1aa98288e77b01333b2c5d3f582d"]}, "contracts/StandardTokenExt.sol": {"keccak256": "0x9ea2d4cec4dccd5639c05e6c23dd027d80b5e5a20abd99b280ab7b2631b5a5fc", "urls": ["bzzr://a52d8fc5a21bd83997aff19128e00dceb251df712207b61223894c8b7f42d5ff"]}, "zeppelin/contracts/math/SafeMath.sol": {"keccak256": "0x341ba8cb467a3623e819ba1a683ac1d264005186f308505214e5f6bc89446a08", "urls": ["bzzr://59b5652ee4e4a1b5a8f1a8906e14c84af43d636cf5ca0725cc1813aabe4c8c17"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}, "zeppelin/contracts/token/ERC20/BasicToken.sol": {"keccak256": "0x948404468d61ff35ea4194650670408dabd65da7f905a1c16888ab84520bf39e", "urls": ["bzzr://ea75e20f95d7e4e10394fe6bfaa8eee56b4757c2a6f1e8df4180d33afa621935"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}, "zeppelin/contracts/token/ERC20/StandardToken.sol": {"keccak256": "0xd2b344a5259e19ec143074cfa65637a10c40b68395c59808c4af13bccbb2de55", "urls": ["bzzr://d61a01175a7ca1ba9f4403de603c20b897e33ec425aef2d9f8a7f9ddfdfaf5b2"]}}, "version": 1}, "name": "BurnableToken", "ordered_full_dependencies": [], "source_path": "contracts/BurnableToken.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n assert(c / a == b);\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n\n\n\n/**\n * @title Basic token\n * @dev Basic version of StandardToken, with no allowances.\n */\ncontract BasicToken is ERC20Basic {\n using SafeMath for uint256;\n\n mapping(address => uint256) balances;\n\n uint256 totalSupply_;\n\n /**\n * @dev total number of tokens in existence\n */\n function totalSupply() public view returns (uint256) {\n return totalSupply_;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param _to The address to transfer to.\n * @param _value The amount to be transferred.\n */\n function transfer(address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[msg.sender]);\n\n // SafeMath.sub will throw if there is not enough balance.\n balances[msg.sender] = balances[msg.sender].sub(_value);\n balances[_to] = balances[_to].add(_value);\n Transfer(msg.sender, _to, _value);\n return true;\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param _owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address _owner) public view returns (uint256 balance) {\n return balances[_owner];\n }\n\n}\n\n\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n\n\n/**\n * @title Standard ERC20 token\n *\n * @dev Implementation of the basic standard token.\n * @dev https://github.com/ethereum/EIPs/issues/20\n * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol\n */\ncontract StandardToken is ERC20, BasicToken {\n\n mapping (address => mapping (address => uint256)) internal allowed;\n\n\n /**\n * @dev Transfer tokens from one address to another\n * @param _from address The address which you want to send tokens from\n * @param _to address The address which you want to transfer to\n * @param _value uint256 the amount of tokens to be transferred\n */\n function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[_from]);\n require(_value <= allowed[_from][msg.sender]);\n\n balances[_from] = balances[_from].sub(_value);\n balances[_to] = balances[_to].add(_value);\n allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);\n Transfer(_from, _to, _value);\n return true;\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n *\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param _spender The address which will spend the funds.\n * @param _value The amount of tokens to be spent.\n */\n function approve(address _spender, uint256 _value) public returns (bool) {\n allowed[msg.sender][_spender] = _value;\n Approval(msg.sender, _spender, _value);\n return true;\n }\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param _owner address The address which owns the funds.\n * @param _spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address _owner, address _spender) public view returns (uint256) {\n return allowed[_owner][_spender];\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(address _spender, uint _addedValue) public returns (bool) {\n allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {\n uint oldValue = allowed[msg.sender][_spender];\n if (_subtractedValue > oldValue) {\n allowed[msg.sender][_spender] = 0;\n } else {\n allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);\n }\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n\ncontract Recoverable is Ownable {\n\n /// @dev Empty constructor (for now)\n function Recoverable() {\n }\n\n /// @dev This will be invoked by the owner, when owner wants to rescue tokens\n /// @param token Token which will we rescue to the owner from the contract\n function recoverTokens(ERC20Basic token) onlyOwner public {\n token.transfer(owner, tokensToBeReturned(token));\n }\n\n /// @dev Interface function, can be overwritten by the superclass\n /// @param token Token which balance we will check and return\n /// @return The amount of tokens (in smallest denominator) the contract owns\n function tokensToBeReturned(ERC20Basic token) public returns (uint) {\n return token.balanceOf(this);\n }\n}\n\n\n\n/**\n * Standard EIP-20 token with an interface marker.\n *\n * @notice Interface marker is used by crowdsale contracts to validate that addresses point a good token contract.\n *\n */\ncontract StandardTokenExt is StandardToken, Recoverable {\n\n /* Interface declaration */\n function isToken() public constant returns (bool weAre) {\n return true;\n }\n}\n\n\ncontract BurnableToken is StandardTokenExt {\n\n // @notice An address for the transfer event where the burned tokens are transferred in a faux Transfer event\n address public constant BURN_ADDRESS = 0;\n\n /** How many tokens we burned */\n event Burned(address burner, uint burnedAmount);\n\n /**\n * Burn extra tokens from a balance.\n *\n */\n function burn(uint burnAmount) {\n address burner = msg.sender;\n balances[burner] = balances[burner].sub(burnAmount);\n totalSupply_ = totalSupply_.sub(burnAmount);\n Burned(burner, burnAmount);\n\n // Inform the blockchain explores that track the\n // balances only by a transfer event that the balance in this\n // address has decreased\n Transfer(burner, BURN_ADDRESS, burnAmount);\n }\n}\n"}, "BytesDeserializer": {"abi": [{"constant": true, "inputs": [{"name": "b", "type": "bytes"}, {"name": "offset", "type": "uint256"}], "name": "slice16", "outputs": [{"name": "", "type": "bytes16"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "b", "type": "bytes"}, {"name": "offset", "type": "uint256"}], "name": "slice2", "outputs": [{"name": "", "type": "bytes2"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "b", "type": "bytes"}, {"name": "offset", "type": "uint256"}], "name": "slice32", "outputs": [{"name": "", "type": "bytes32"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "b", "type": "bytes"}, {"name": "offset", "type": "uint256"}], "name": "sliceAddress", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "b", "type": "bytes"}, {"name": "offset", "type": "uint256"}], "name": "slice4", "outputs": [{"name": "", "type": "bytes4"}], "payable": false, "stateMutability": "view", "type": "function"}], "bytecode": "0x6105ae610030600b82828239805160001a6073146000811461002057610022565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600436106100835763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166316419aa7811461008857806320956341146100fc5780632e1eb7fe1461017f578063b655e138146101df578063d54dd8f914610256575b600080fd5b6040805160206004803580820135601f81018490048402850184019095528484526100d694369492936024939284019190819084018382808284375094975050933594506102d99350505050565b604080516fffffffffffffffffffffffffffffffff199092168252519081900360200190f35b6040805160206004803580820135601f810184900484028501840190955284845261014a94369492936024939284019190819084018382808284375094975050933594506103679350505050565b604080517fffff0000000000000000000000000000000000000000000000000000000000009092168252519081900360200190f35b6040805160206004803580820135601f81018490048402850184019095528484526101cd94369492936024939284019190819084018382808284375094975050933594506103ed9350505050565b60408051918252519081900360200190f35b6040805160206004803580820135601f810184900484028501840190955284845261022d94369492936024939284019190819084018382808284375094975050933594506104739350505050565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6040805160206004803580820135601f81018490048402850184019095528484526102a494369492936024939284019190819084018382808284375094975050933594506104fc9350505050565b604080517fffffffff000000000000000000000000000000000000000000000000000000009092168252519081900360200190f35b600080805b601081101561035f5780600802858286018151811015156102fb57fe5b60209101015160029190910a7f0100000000000000000000000000000000000000000000000000000000000000918290049091027fff00000000000000000000000000000000000000000000000000000000000000160491909117906001016102de565b509392505050565b600080805b600281101561035f57806008028582860181518110151561038957fe5b60209101015160029190910a7f0100000000000000000000000000000000000000000000000000000000000000918290049091027fff000000000000000000000000000000000000000000000000000000000000001604919091179060010161036c565b600080805b602081101561035f57806008028582860181518110151561040f57fe5b60209101015160029190910a7f0100000000000000000000000000000000000000000000000000000000000000918290049091027fff00000000000000000000000000000000000000000000000000000000000000160491909117906001016103f2565b600080805b601481101561035f5780600c016008028582860181518110151561049857fe5b60209101015160029190910a7f0100000000000000000000000000000000000000000000000000000000000000918290049091027fff0000000000000000000000000000000000000000000000000000000000000016049190911790600101610478565b600080805b600481101561035f57806008028582860181518110151561051e57fe5b60209101015160029190910a7f0100000000000000000000000000000000000000000000000000000000000000918290049091027fff00000000000000000000000000000000000000000000000000000000000000160491909117906001016105015600a165627a7a72305820ded35810d6367dabea61946ef5bfe732f17719ee3468bb63b9d0af48d80ce8910029", "bytecode_runtime": "0x73000000000000000000000000000000000000000030146080604052600436106100835763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166316419aa7811461008857806320956341146100fc5780632e1eb7fe1461017f578063b655e138146101df578063d54dd8f914610256575b600080fd5b6040805160206004803580820135601f81018490048402850184019095528484526100d694369492936024939284019190819084018382808284375094975050933594506102d99350505050565b604080516fffffffffffffffffffffffffffffffff199092168252519081900360200190f35b6040805160206004803580820135601f810184900484028501840190955284845261014a94369492936024939284019190819084018382808284375094975050933594506103679350505050565b604080517fffff0000000000000000000000000000000000000000000000000000000000009092168252519081900360200190f35b6040805160206004803580820135601f81018490048402850184019095528484526101cd94369492936024939284019190819084018382808284375094975050933594506103ed9350505050565b60408051918252519081900360200190f35b6040805160206004803580820135601f810184900484028501840190955284845261022d94369492936024939284019190819084018382808284375094975050933594506104739350505050565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6040805160206004803580820135601f81018490048402850184019095528484526102a494369492936024939284019190819084018382808284375094975050933594506104fc9350505050565b604080517fffffffff000000000000000000000000000000000000000000000000000000009092168252519081900360200190f35b600080805b601081101561035f5780600802858286018151811015156102fb57fe5b60209101015160029190910a7f0100000000000000000000000000000000000000000000000000000000000000918290049091027fff00000000000000000000000000000000000000000000000000000000000000160491909117906001016102de565b509392505050565b600080805b600281101561035f57806008028582860181518110151561038957fe5b60209101015160029190910a7f0100000000000000000000000000000000000000000000000000000000000000918290049091027fff000000000000000000000000000000000000000000000000000000000000001604919091179060010161036c565b600080805b602081101561035f57806008028582860181518110151561040f57fe5b60209101015160029190910a7f0100000000000000000000000000000000000000000000000000000000000000918290049091027fff00000000000000000000000000000000000000000000000000000000000000160491909117906001016103f2565b600080805b601481101561035f5780600c016008028582860181518110151561049857fe5b60209101015160029190910a7f0100000000000000000000000000000000000000000000000000000000000000918290049091027fff0000000000000000000000000000000000000000000000000000000000000016049190911790600101610478565b600080805b600481101561035f57806008028582860181518110151561051e57fe5b60209101015160029190910a7f0100000000000000000000000000000000000000000000000000000000000000918290049091027fff00000000000000000000000000000000000000000000000000000000000000160491909117906001016105015600a165627a7a72305820ded35810d6367dabea61946ef5bfe732f17719ee3468bb63b9d0af48d80ce8910029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": true, "inputs": [{"name": "b", "type": "bytes"}, {"name": "offset", "type": "uint256"}], "name": "slice16", "outputs": [{"name": "", "type": "bytes16"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "b", "type": "bytes"}, {"name": "offset", "type": "uint256"}], "name": "slice2", "outputs": [{"name": "", "type": "bytes2"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "b", "type": "bytes"}, {"name": "offset", "type": "uint256"}], "name": "slice32", "outputs": [{"name": "", "type": "bytes32"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "b", "type": "bytes"}, {"name": "offset", "type": "uint256"}], "name": "sliceAddress", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "b", "type": "bytes"}, {"name": "offset", "type": "uint256"}], "name": "slice4", "outputs": [{"name": "", "type": "bytes4"}], "payable": false, "stateMutability": "view", "type": "function"}], "devdoc": {"methods": {}}, "userdoc": {"methods": {"slice16(bytes,uint256)": {"notice": "Extract 128-bit worth of data from the bytes stream."}, "slice2(bytes,uint256)": {"notice": "Extract 16-bit worth of data from the bytes stream."}, "slice32(bytes,uint256)": {"notice": "Extract 256-bit worth of data from the bytes stream."}, "slice4(bytes,uint256)": {"notice": "Extract 32-bit worth of data from the bytes stream."}, "sliceAddress(bytes,uint256)": {"notice": "Extract Ethereum address worth of data from the bytes stream."}}}}, "settings": {"compilationTarget": {"contracts/BytesDeserializer.sol": "BytesDeserializer"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/BytesDeserializer.sol": {"keccak256": "0xdd1718e5ea778d4dd36ccb98336360536beffdffd152bd9fb035124835fa4765", "urls": ["bzzr://ee94acd8149a77baf3f6881b995d1e9eba68c3225b2fe666dc0d402e0b68c5ce"]}}, "version": 1}, "name": "BytesDeserializer", "ordered_full_dependencies": [], "source_path": "contracts/BytesDeserializer.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n/**\n * Deserialize bytes payloads.\n *\n * Values are in big-endian byte order.\n *\n */\nlibrary BytesDeserializer {\n\n /**\n * Extract 256-bit worth of data from the bytes stream.\n */\n function slice32(bytes b, uint offset) constant returns (bytes32) {\n bytes32 out;\n\n for (uint i = 0; i < 32; i++) {\n out |= bytes32(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n /**\n * Extract Ethereum address worth of data from the bytes stream.\n */\n function sliceAddress(bytes b, uint offset) constant returns (address) {\n bytes32 out;\n\n for (uint i = 0; i < 20; i++) {\n out |= bytes32(b[offset + i] & 0xFF) >> ((i+12) * 8);\n }\n return address(uint(out));\n }\n\n /**\n * Extract 128-bit worth of data from the bytes stream.\n */\n function slice16(bytes b, uint offset) constant returns (bytes16) {\n bytes16 out;\n\n for (uint i = 0; i < 16; i++) {\n out |= bytes16(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n /**\n * Extract 32-bit worth of data from the bytes stream.\n */\n function slice4(bytes b, uint offset) constant returns (bytes4) {\n bytes4 out;\n\n for (uint i = 0; i < 4; i++) {\n out |= bytes4(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n /**\n * Extract 16-bit worth of data from the bytes stream.\n */\n function slice2(bytes b, uint offset) constant returns (bytes2) {\n bytes2 out;\n\n for (uint i = 0; i < 2; i++) {\n out |= bytes2(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n\n\n}\n"}, "CentrallyIssuedToken": {"abi": [{"constant": true, "inputs": [], "name": "name", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "approve", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "recoverTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_from", "type": "address"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "decimals", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "burnAmount", "type": "uint256"}], "name": "burn", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "uint256"}], "name": "upgrade", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_name", "type": "string"}, {"name": "_symbol", "type": "string"}], "name": "setTokenInformation", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "upgradeAgent", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "releaseTokenTransfer", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "upgradeMaster", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_subtractedValue", "type": "uint256"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "releaseFinalizationDate", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getUpgradeState", "outputs": [{"name": "", "type": "uint8"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "symbol", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "released", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "canUpgrade", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "tokensToBeReturned", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalUpgraded", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_addedValue", "type": "uint256"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "agent", "type": "address"}], "name": "setUpgradeAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}, {"name": "_spender", "type": "address"}], "name": "allowance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isToken", "outputs": [{"name": "weAre", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "BURN_ADDRESS", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "master", "type": "address"}], "name": "setUpgradeMaster", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [{"name": "_owner", "type": "address"}, {"name": "_name", "type": "string"}, {"name": "_symbol", "type": "string"}, {"name": "_totalSupply", "type": "uint256"}, {"name": "_decimals", "type": "uint256"}, {"name": "_releaseFinalizationDate", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newName", "type": "string"}, {"indexed": false, "name": "newSymbol", "type": "string"}], "name": "UpdatedTokenInformation", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "_from", "type": "address"}, {"indexed": true, "name": "_to", "type": "address"}, {"indexed": false, "name": "_value", "type": "uint256"}], "name": "Upgrade", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "agent", "type": "address"}], "name": "UpgradeAgentSet", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "burner", "type": "address"}, {"indexed": false, "name": "burnedAmount", "type": "uint256"}], "name": "Burned", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}, {"indexed": true, "name": "spender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "bytecode": "0x6080604052600a805460ff191690553480156200001b57600080fd5b50604051620016eb380380620016eb8339810160409081528151602080840151928401516060850151608086015160a08701516003805433600160a060020a03199182161790915560048054909116600160a060020a03881617905595870180519597909693019491939092916200009a9160079190880190620000e1565b508351620000b0906008906020870190620000e1565b506001839055600991909155600160a060020a039094166000908152602081905260409020555050600b5562000186565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200012457805160ff191683800117855562000154565b8280016001018555821562000154579182015b828111156200015457825182559160200191906001019062000137565b506200016292915062000166565b5090565b6200018391905b808211156200016257600081556001016200016d565b90565b61155580620001966000396000f30060806040526004361061017f5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde038114610184578063095ea7b31461020e57806316114acd1461024657806318160ddd1461026957806323b872dd14610290578063313ce567146102ba57806342966c68146102cf57806345977d03146102e75780634eee966f146102ff5780635de4ccb0146103965780635f412d4f146103c7578063600440cb146103dc57806366188463146103f15780636748a0c61461041557806370a082311461042a5780638444b3911461044b5780638da5cb5b1461048457806395d89b411461049957806396132521146104ae5780639738968c146104c3578063a9059cbb146104d8578063c45d19db146104fc578063c752ff621461051d578063d73dd62314610532578063d7e7088a14610556578063dd62ed3e14610577578063eefa597b146104c3578063f2fde38b1461059e578063fccc2813146105bf578063ffeb7d75146105d4575b600080fd5b34801561019057600080fd5b506101996105f5565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101d35781810151838201526020016101bb565b50505050905090810190601f1680156102005780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561021a57600080fd5b50610232600160a060020a0360043516602435610683565b604080519115158252519081900360200190f35b34801561025257600080fd5b50610267600160a060020a03600435166106e9565b005b34801561027557600080fd5b5061027e6107b9565b60408051918252519081900360200190f35b34801561029c57600080fd5b50610232600160a060020a03600435811690602435166044356107c0565b3480156102c657600080fd5b5061027e610937565b3480156102db57600080fd5b5061026760043561093d565b3480156102f357600080fd5b50610267600435610a15565b34801561030b57600080fd5b506040805160206004803580820135601f810184900484028501840190955284845261026794369492936024939284019190819084018382808284375050604080516020601f89358b018035918201839004830284018301909452808352979a999881019791965091820194509250829150840183828082843750949750610b869650505050505050565b3480156103a257600080fd5b506103ab610cf3565b60408051600160a060020a039092168252519081900360200190f35b3480156103d357600080fd5b50610267610d02565b3480156103e857600080fd5b506103ab610d28565b3480156103fd57600080fd5b50610232600160a060020a0360043516602435610d37565b34801561042157600080fd5b5061027e610e27565b34801561043657600080fd5b5061027e600160a060020a0360043516610e2d565b34801561045757600080fd5b50610460610e48565b6040518082600481111561047057fe5b60ff16815260200191505060405180910390f35b34801561049057600080fd5b506103ab610e93565b3480156104a557600080fd5b50610199610ea2565b3480156104ba57600080fd5b50610232610efd565b3480156104cf57600080fd5b50610232610f06565b3480156104e457600080fd5b50610232600160a060020a0360043516602435610f0b565b34801561050857600080fd5b5061027e600160a060020a0360043516610f39565b34801561052957600080fd5b5061027e610fcf565b34801561053e57600080fd5b50610232600160a060020a0360043516602435610fd5565b34801561056257600080fd5b50610267600160a060020a036004351661106e565b34801561058357600080fd5b5061027e600160a060020a036004358116906024351661126f565b3480156105aa57600080fd5b50610267600160a060020a036004351661129a565b3480156105cb57600080fd5b506103ab61132f565b3480156105e057600080fd5b50610267600160a060020a0360043516611334565b6007805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561067b5780601f106106505761010080835404028352916020019161067b565b820191906000526020600020905b81548152906001019060200180831161065e57829003601f168201915b505050505081565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b600354600160a060020a0316331461070057600080fd5b600354600160a060020a038083169163a9059cbb911661071f84610f39565b6040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b15801561078a57600080fd5b505af115801561079e573d6000803e3d6000fd5b505050506040513d60208110156107b457600080fd5b505050565b6001545b90565b6000600160a060020a03831615156107d757600080fd5b600160a060020a0384166000908152602081905260409020548211156107fc57600080fd5b600160a060020a038416600090815260026020908152604080832033845290915290205482111561082c57600080fd5b600160a060020a038416600090815260208190526040902054610855908363ffffffff61138f16565b600160a060020a03808616600090815260208190526040808220939093559085168152205461088a908363ffffffff6113a116565b600160a060020a038085166000908152602081815260408083209490945591871681526002825282812033825290915220546108cc908363ffffffff61138f16565b600160a060020a03808616600081815260026020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b60095481565b3360008181526020819052604090205461095d908363ffffffff61138f16565b600160a060020a038216600090815260208190526040902055600154610989908363ffffffff61138f16565b60015560408051600160a060020a03831681526020810184905281517f696de425f79f4a40bc6d2122ca50507f0efbeabbff86a84871b7196ab8ea8df7929181900390910190a1604080518381529051600091600160a060020a038416917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b6000610a1f610e48565b90506003816004811115610a2f57fe5b1480610a4657506004816004811115610a4457fe5b145b1515610a5157600080fd5b811515610a5d57600080fd5b33600090815260208190526040902054610a7d908363ffffffff61138f16565b33600090815260208190526040902055600154610aa0908363ffffffff61138f16565b600155600654610ab6908363ffffffff6113a116565b600655600554604080517f753e88e5000000000000000000000000000000000000000000000000000000008152336004820152602481018590529051600160a060020a039092169163753e88e59160448082019260009290919082900301818387803b158015610b2557600080fd5b505af1158015610b39573d6000803e3d6000fd5b5050600554604080518681529051600160a060020a0390921693503392507f7e5c344a8141a805725cb476f76c6953b842222b967edd1f78ddb6e8b3f397ac919081900360200190a35050565b600454600160a060020a03163314610b9d57600080fd5b8151610bb0906007906020850190611491565b508051610bc4906008906020840190611491565b506040805181815260078054600260001961010060018416150201909116049282018390527fd131ab1e6f279deea74e13a18477e13e2107deb6dc8ae955648948be5841fb4692909160089181906020820190606083019086908015610c6b5780601f10610c4057610100808354040283529160200191610c6b565b820191906000526020600020905b815481529060010190602001808311610c4e57829003601f168201915b5050838103825284546002600019610100600184161502019091160480825260209091019085908015610cdf5780601f10610cb457610100808354040283529160200191610cdf565b820191906000526020600020905b815481529060010190602001808311610cc257829003601f168201915b505094505050505060405180910390a15050565b600554600160a060020a031681565b600454600160a060020a03163314610d1957600080fd5b600a805460ff19166001179055565b600454600160a060020a031681565b336000908152600260209081526040808320600160a060020a038616845290915281205480831115610d8c57336000908152600260209081526040808320600160a060020a0388168452909152812055610dc1565b610d9c818463ffffffff61138f16565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600b5481565b600160a060020a031660009081526020819052604090205490565b6000610e52610f06565b1515610e60575060016107bd565b600554600160a060020a03161515610e7a575060026107bd565b6006541515610e8b575060036107bd565b5060046107bd565b600354600160a060020a031681565b6008805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561067b5780601f106106505761010080835404028352916020019161067b565b600a5460ff1681565b600190565b6000600b54421115610f2857600a5460ff161515610f2857600080fd5b610f3283836113b0565b9392505050565b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600091600160a060020a038416916370a082319160248082019260209290919082900301818787803b158015610f9d57600080fd5b505af1158015610fb1573d6000803e3d6000fd5b505050506040513d6020811015610fc757600080fd5b505192915050565b60065481565b336000908152600260209081526040808320600160a060020a0386168452909152812054611009908363ffffffff6113a116565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b611076610f06565b151561108157600080fd5b600160a060020a038116151561109657600080fd5b600454600160a060020a031633146110ad57600080fd5b60046110b7610e48565b60048111156110c257fe5b14156110cd57600080fd5b6005805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038381169190911791829055604080517f61d3d7a6000000000000000000000000000000000000000000000000000000008152905192909116916361d3d7a6916004808201926020929091908290030181600087803b15801561115157600080fd5b505af1158015611165573d6000803e3d6000fd5b505050506040513d602081101561117b57600080fd5b5051151561118857600080fd5b600154600560009054906101000a9004600160a060020a0316600160a060020a0316634b2ba0dd6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156111f757600080fd5b505af115801561120b573d6000803e3d6000fd5b505050506040513d602081101561122157600080fd5b50511461122d57600080fd5b60055460408051600160a060020a039092168252517f7845d5aa74cc410e35571258d954f23b82276e160fe8c188fa80566580f279cc9181900360200190a150565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600354600160a060020a031633146112b157600080fd5b600160a060020a03811615156112c657600080fd5b600354604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600081565b600160a060020a038116151561134957600080fd5b600454600160a060020a0316331461136057600080fd5b6004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60008282111561139b57fe5b50900390565b600082820183811015610f3257fe5b6000600160a060020a03831615156113c757600080fd5b336000908152602081905260409020548211156113e357600080fd5b33600090815260208190526040902054611403908363ffffffff61138f16565b3360009081526020819052604080822092909255600160a060020a03851681522054611435908363ffffffff6113a116565b600160a060020a038416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106114d257805160ff19168380011785556114ff565b828001600101855582156114ff579182015b828111156114ff5782518255916020019190600101906114e4565b5061150b92915061150f565b5090565b6107bd91905b8082111561150b57600081556001016115155600a165627a7a72305820981ad25731f3d17d9ec3b135923e93a8ac04c1a3c80b6b63b2a0f046b9cae8d90029", "bytecode_runtime": "0x60806040526004361061017f5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde038114610184578063095ea7b31461020e57806316114acd1461024657806318160ddd1461026957806323b872dd14610290578063313ce567146102ba57806342966c68146102cf57806345977d03146102e75780634eee966f146102ff5780635de4ccb0146103965780635f412d4f146103c7578063600440cb146103dc57806366188463146103f15780636748a0c61461041557806370a082311461042a5780638444b3911461044b5780638da5cb5b1461048457806395d89b411461049957806396132521146104ae5780639738968c146104c3578063a9059cbb146104d8578063c45d19db146104fc578063c752ff621461051d578063d73dd62314610532578063d7e7088a14610556578063dd62ed3e14610577578063eefa597b146104c3578063f2fde38b1461059e578063fccc2813146105bf578063ffeb7d75146105d4575b600080fd5b34801561019057600080fd5b506101996105f5565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101d35781810151838201526020016101bb565b50505050905090810190601f1680156102005780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561021a57600080fd5b50610232600160a060020a0360043516602435610683565b604080519115158252519081900360200190f35b34801561025257600080fd5b50610267600160a060020a03600435166106e9565b005b34801561027557600080fd5b5061027e6107b9565b60408051918252519081900360200190f35b34801561029c57600080fd5b50610232600160a060020a03600435811690602435166044356107c0565b3480156102c657600080fd5b5061027e610937565b3480156102db57600080fd5b5061026760043561093d565b3480156102f357600080fd5b50610267600435610a15565b34801561030b57600080fd5b506040805160206004803580820135601f810184900484028501840190955284845261026794369492936024939284019190819084018382808284375050604080516020601f89358b018035918201839004830284018301909452808352979a999881019791965091820194509250829150840183828082843750949750610b869650505050505050565b3480156103a257600080fd5b506103ab610cf3565b60408051600160a060020a039092168252519081900360200190f35b3480156103d357600080fd5b50610267610d02565b3480156103e857600080fd5b506103ab610d28565b3480156103fd57600080fd5b50610232600160a060020a0360043516602435610d37565b34801561042157600080fd5b5061027e610e27565b34801561043657600080fd5b5061027e600160a060020a0360043516610e2d565b34801561045757600080fd5b50610460610e48565b6040518082600481111561047057fe5b60ff16815260200191505060405180910390f35b34801561049057600080fd5b506103ab610e93565b3480156104a557600080fd5b50610199610ea2565b3480156104ba57600080fd5b50610232610efd565b3480156104cf57600080fd5b50610232610f06565b3480156104e457600080fd5b50610232600160a060020a0360043516602435610f0b565b34801561050857600080fd5b5061027e600160a060020a0360043516610f39565b34801561052957600080fd5b5061027e610fcf565b34801561053e57600080fd5b50610232600160a060020a0360043516602435610fd5565b34801561056257600080fd5b50610267600160a060020a036004351661106e565b34801561058357600080fd5b5061027e600160a060020a036004358116906024351661126f565b3480156105aa57600080fd5b50610267600160a060020a036004351661129a565b3480156105cb57600080fd5b506103ab61132f565b3480156105e057600080fd5b50610267600160a060020a0360043516611334565b6007805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561067b5780601f106106505761010080835404028352916020019161067b565b820191906000526020600020905b81548152906001019060200180831161065e57829003601f168201915b505050505081565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b600354600160a060020a0316331461070057600080fd5b600354600160a060020a038083169163a9059cbb911661071f84610f39565b6040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b15801561078a57600080fd5b505af115801561079e573d6000803e3d6000fd5b505050506040513d60208110156107b457600080fd5b505050565b6001545b90565b6000600160a060020a03831615156107d757600080fd5b600160a060020a0384166000908152602081905260409020548211156107fc57600080fd5b600160a060020a038416600090815260026020908152604080832033845290915290205482111561082c57600080fd5b600160a060020a038416600090815260208190526040902054610855908363ffffffff61138f16565b600160a060020a03808616600090815260208190526040808220939093559085168152205461088a908363ffffffff6113a116565b600160a060020a038085166000908152602081815260408083209490945591871681526002825282812033825290915220546108cc908363ffffffff61138f16565b600160a060020a03808616600081815260026020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b60095481565b3360008181526020819052604090205461095d908363ffffffff61138f16565b600160a060020a038216600090815260208190526040902055600154610989908363ffffffff61138f16565b60015560408051600160a060020a03831681526020810184905281517f696de425f79f4a40bc6d2122ca50507f0efbeabbff86a84871b7196ab8ea8df7929181900390910190a1604080518381529051600091600160a060020a038416917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b6000610a1f610e48565b90506003816004811115610a2f57fe5b1480610a4657506004816004811115610a4457fe5b145b1515610a5157600080fd5b811515610a5d57600080fd5b33600090815260208190526040902054610a7d908363ffffffff61138f16565b33600090815260208190526040902055600154610aa0908363ffffffff61138f16565b600155600654610ab6908363ffffffff6113a116565b600655600554604080517f753e88e5000000000000000000000000000000000000000000000000000000008152336004820152602481018590529051600160a060020a039092169163753e88e59160448082019260009290919082900301818387803b158015610b2557600080fd5b505af1158015610b39573d6000803e3d6000fd5b5050600554604080518681529051600160a060020a0390921693503392507f7e5c344a8141a805725cb476f76c6953b842222b967edd1f78ddb6e8b3f397ac919081900360200190a35050565b600454600160a060020a03163314610b9d57600080fd5b8151610bb0906007906020850190611491565b508051610bc4906008906020840190611491565b506040805181815260078054600260001961010060018416150201909116049282018390527fd131ab1e6f279deea74e13a18477e13e2107deb6dc8ae955648948be5841fb4692909160089181906020820190606083019086908015610c6b5780601f10610c4057610100808354040283529160200191610c6b565b820191906000526020600020905b815481529060010190602001808311610c4e57829003601f168201915b5050838103825284546002600019610100600184161502019091160480825260209091019085908015610cdf5780601f10610cb457610100808354040283529160200191610cdf565b820191906000526020600020905b815481529060010190602001808311610cc257829003601f168201915b505094505050505060405180910390a15050565b600554600160a060020a031681565b600454600160a060020a03163314610d1957600080fd5b600a805460ff19166001179055565b600454600160a060020a031681565b336000908152600260209081526040808320600160a060020a038616845290915281205480831115610d8c57336000908152600260209081526040808320600160a060020a0388168452909152812055610dc1565b610d9c818463ffffffff61138f16565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600b5481565b600160a060020a031660009081526020819052604090205490565b6000610e52610f06565b1515610e60575060016107bd565b600554600160a060020a03161515610e7a575060026107bd565b6006541515610e8b575060036107bd565b5060046107bd565b600354600160a060020a031681565b6008805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561067b5780601f106106505761010080835404028352916020019161067b565b600a5460ff1681565b600190565b6000600b54421115610f2857600a5460ff161515610f2857600080fd5b610f3283836113b0565b9392505050565b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600091600160a060020a038416916370a082319160248082019260209290919082900301818787803b158015610f9d57600080fd5b505af1158015610fb1573d6000803e3d6000fd5b505050506040513d6020811015610fc757600080fd5b505192915050565b60065481565b336000908152600260209081526040808320600160a060020a0386168452909152812054611009908363ffffffff6113a116565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b611076610f06565b151561108157600080fd5b600160a060020a038116151561109657600080fd5b600454600160a060020a031633146110ad57600080fd5b60046110b7610e48565b60048111156110c257fe5b14156110cd57600080fd5b6005805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038381169190911791829055604080517f61d3d7a6000000000000000000000000000000000000000000000000000000008152905192909116916361d3d7a6916004808201926020929091908290030181600087803b15801561115157600080fd5b505af1158015611165573d6000803e3d6000fd5b505050506040513d602081101561117b57600080fd5b5051151561118857600080fd5b600154600560009054906101000a9004600160a060020a0316600160a060020a0316634b2ba0dd6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156111f757600080fd5b505af115801561120b573d6000803e3d6000fd5b505050506040513d602081101561122157600080fd5b50511461122d57600080fd5b60055460408051600160a060020a039092168252517f7845d5aa74cc410e35571258d954f23b82276e160fe8c188fa80566580f279cc9181900360200190a150565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600354600160a060020a031633146112b157600080fd5b600160a060020a03811615156112c657600080fd5b600354604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600081565b600160a060020a038116151561134957600080fd5b600454600160a060020a0316331461136057600080fd5b6004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60008282111561139b57fe5b50900390565b600082820183811015610f3257fe5b6000600160a060020a03831615156113c757600080fd5b336000908152602081905260409020548211156113e357600080fd5b33600090815260208190526040902054611403908363ffffffff61138f16565b3360009081526020819052604080822092909255600160a060020a03851681522054611435908363ffffffff6113a116565b600160a060020a038416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106114d257805160ff19168380011785556114ff565b828001600101855582156114ff579182015b828111156114ff5782518255916020019190600101906114e4565b5061150b92915061150f565b5090565b6107bd91905b8082111561150b57600081556001016115155600a165627a7a72305820981ad25731f3d17d9ec3b135923e93a8ac04c1a3c80b6b63b2a0f046b9cae8d90029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": true, "inputs": [], "name": "name", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "approve", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "recoverTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_from", "type": "address"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "decimals", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "burnAmount", "type": "uint256"}], "name": "burn", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "uint256"}], "name": "upgrade", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_name", "type": "string"}, {"name": "_symbol", "type": "string"}], "name": "setTokenInformation", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "upgradeAgent", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "releaseTokenTransfer", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "upgradeMaster", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_subtractedValue", "type": "uint256"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "releaseFinalizationDate", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getUpgradeState", "outputs": [{"name": "", "type": "uint8"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "symbol", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "released", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "canUpgrade", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "tokensToBeReturned", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalUpgraded", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_addedValue", "type": "uint256"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "agent", "type": "address"}], "name": "setUpgradeAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}, {"name": "_spender", "type": "address"}], "name": "allowance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isToken", "outputs": [{"name": "weAre", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "BURN_ADDRESS", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "master", "type": "address"}], "name": "setUpgradeMaster", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [{"name": "_owner", "type": "address"}, {"name": "_name", "type": "string"}, {"name": "_symbol", "type": "string"}, {"name": "_totalSupply", "type": "uint256"}, {"name": "_decimals", "type": "uint256"}, {"name": "_releaseFinalizationDate", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newName", "type": "string"}, {"indexed": false, "name": "newSymbol", "type": "string"}], "name": "UpdatedTokenInformation", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "_from", "type": "address"}, {"indexed": true, "name": "_to", "type": "address"}, {"indexed": false, "name": "_value", "type": "uint256"}], "name": "Upgrade", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "agent", "type": "address"}], "name": "UpgradeAgentSet", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "burner", "type": "address"}, {"indexed": false, "name": "burnedAmount", "type": "uint256"}], "name": "Burned", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}, {"indexed": true, "name": "spender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "devdoc": {"methods": {"allowance(address,address)": {"details": "Function to check the amount of tokens that an owner allowed to a spender.", "params": {"_owner": "address The address which owns the funds.", "_spender": "address The address which will spend the funds."}, "return": "A uint256 specifying the amount of tokens still available for the spender."}, "approve(address,uint256)": {"details": "Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729", "params": {"_spender": "The address which will spend the funds.", "_value": "The amount of tokens to be spent."}}, "balanceOf(address)": {"details": "Gets the balance of the specified address.", "params": {"_owner": "The address to query the the balance of."}, "return": "An uint256 representing the amount owned by the passed address."}, "decreaseApproval(address,uint256)": {"details": "Decrease the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[_spender] == 0. To decrement allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"_spender": "The address which will spend the funds.", "_subtractedValue": "The amount of tokens to decrease the allowance by."}}, "increaseApproval(address,uint256)": {"details": "Increase the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[_spender] == 0. To increment allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"_addedValue": "The amount of tokens to increase the allowance by.", "_spender": "The address which will spend the funds."}}, "recoverTokens(address)": {"details": "This will be invoked by the owner, when owner wants to rescue tokens", "params": {"token": "Token which will we rescue to the owner from the contract"}}, "tokensToBeReturned(address)": {"details": "Interface function, can be overwritten by the superclass", "params": {"token": "Token which balance we will check and return"}, "return": "The amount of tokens (in smallest denominator) the contract owns"}, "totalSupply()": {"details": "total number of tokens in existence"}, "transferFrom(address,address,uint256)": {"details": "Transfer tokens from one address to another", "params": {"_from": "address The address which you want to send tokens from", "_to": "address The address which you want to transfer to", "_value": "uint256 the amount of tokens to be transferred"}}, "transferOwnership(address)": {"details": "Allows the current owner to transfer control of the contract to a newOwner.", "params": {"newOwner": "The address to transfer ownership to."}}}}, "userdoc": {"methods": {"burn(uint256)": {"notice": "Burn extra tokens from a balance. "}, "canUpgrade()": {"notice": "Child contract can enable to provide the condition when the upgrade can begun."}, "getUpgradeState()": {"notice": "Get the state of the token upgrade."}, "releaseTokenTransfer()": {"notice": "One way function to perform the final token release."}, "setTokenInformation(string,string)": {"notice": "Owner can update token information here. * It is often useful to conceal the actual token association, until the token operations, like central issuance or reissuance have been completed. In this case the initial token can be supplied with empty name and symbol information. * This function allows the token owner to rename the token after the operations have been completed and then point the audience to use the token contract."}, "setUpgradeAgent(address)": {"notice": "Set an upgrade agent that handles"}, "setUpgradeMaster(address)": {"notice": "Change the upgrade master. * This allows us to set a new owner for the upgrade mechanism."}, "transfer(address,uint256)": {"notice": "Kill switch for the token in the case of distribution issue. "}, "upgrade(uint256)": {"notice": "Allow the token holder to upgrade some of their tokens to a new contract."}}}}, "settings": {"compilationTarget": {"contracts/CentrallyIssuedToken.sol": "CentrallyIssuedToken"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/BurnableToken.sol": {"keccak256": "0xb97707de2018141fb22482d7ad4faa35cd471ae2ed992343bbcc1be0d3b95218", "urls": ["bzzr://a8b275d0ee25a96664f613d48339250b11d5140d7b74122d74482c3a94cc5295"]}, "contracts/CentrallyIssuedToken.sol": {"keccak256": "0x352f64fa232126ae810d28a2d38fcae9edf8db0a10d42e8062294c2dd09def86", "urls": ["bzzr://1897a982b6e164c95ad34c77f4be36485525e1b74930ef6a5606a51bc05ba01e"]}, "contracts/Recoverable.sol": {"keccak256": "0x311a332cdd87df6e00057f5455f4e68b043b5dbe211f6d68bc64e20817515635", "urls": ["bzzr://4fd99bcfb93baed6e7c8d22ee9ecc5c8346a1aa98288e77b01333b2c5d3f582d"]}, "contracts/StandardTokenExt.sol": {"keccak256": "0x9ea2d4cec4dccd5639c05e6c23dd027d80b5e5a20abd99b280ab7b2631b5a5fc", "urls": ["bzzr://a52d8fc5a21bd83997aff19128e00dceb251df712207b61223894c8b7f42d5ff"]}, "contracts/UpgradeAgent.sol": {"keccak256": "0x88e793f72feca4a18d2cd06e6037c1413d7b963eabcf5626d60bfb9d04d6e8e6", "urls": ["bzzr://87e39a65cf25d539ab49ad7e759b3298b8a19272964e69e3f2432f0323f30025"]}, "contracts/UpgradeableToken.sol": {"keccak256": "0xa74fc300c514564ece81c86905502c2de674b69c0633b133af19c1ba027da2c9", "urls": ["bzzr://55bc0b908c94781462b8959f051c6dbb53c35641b0f8cb38d74632ad6bf95e52"]}, "zeppelin/contracts/math/SafeMath.sol": {"keccak256": "0x341ba8cb467a3623e819ba1a683ac1d264005186f308505214e5f6bc89446a08", "urls": ["bzzr://59b5652ee4e4a1b5a8f1a8906e14c84af43d636cf5ca0725cc1813aabe4c8c17"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}, "zeppelin/contracts/token/ERC20/BasicToken.sol": {"keccak256": "0x948404468d61ff35ea4194650670408dabd65da7f905a1c16888ab84520bf39e", "urls": ["bzzr://ea75e20f95d7e4e10394fe6bfaa8eee56b4757c2a6f1e8df4180d33afa621935"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}, "zeppelin/contracts/token/ERC20/StandardToken.sol": {"keccak256": "0xd2b344a5259e19ec143074cfa65637a10c40b68395c59808c4af13bccbb2de55", "urls": ["bzzr://d61a01175a7ca1ba9f4403de603c20b897e33ec425aef2d9f8a7f9ddfdfaf5b2"]}}, "version": 1}, "name": "CentrallyIssuedToken", "ordered_full_dependencies": [], "source_path": "contracts/CentrallyIssuedToken.sol", "source": "\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n assert(c / a == b);\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n\n\n\n/**\n * @title Basic token\n * @dev Basic version of StandardToken, with no allowances.\n */\ncontract BasicToken is ERC20Basic {\n using SafeMath for uint256;\n\n mapping(address => uint256) balances;\n\n uint256 totalSupply_;\n\n /**\n * @dev total number of tokens in existence\n */\n function totalSupply() public view returns (uint256) {\n return totalSupply_;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param _to The address to transfer to.\n * @param _value The amount to be transferred.\n */\n function transfer(address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[msg.sender]);\n\n // SafeMath.sub will throw if there is not enough balance.\n balances[msg.sender] = balances[msg.sender].sub(_value);\n balances[_to] = balances[_to].add(_value);\n Transfer(msg.sender, _to, _value);\n return true;\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param _owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address _owner) public view returns (uint256 balance) {\n return balances[_owner];\n }\n\n}\n\n\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n\n\n/**\n * @title Standard ERC20 token\n *\n * @dev Implementation of the basic standard token.\n * @dev https://github.com/ethereum/EIPs/issues/20\n * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol\n */\ncontract StandardToken is ERC20, BasicToken {\n\n mapping (address => mapping (address => uint256)) internal allowed;\n\n\n /**\n * @dev Transfer tokens from one address to another\n * @param _from address The address which you want to send tokens from\n * @param _to address The address which you want to transfer to\n * @param _value uint256 the amount of tokens to be transferred\n */\n function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[_from]);\n require(_value <= allowed[_from][msg.sender]);\n\n balances[_from] = balances[_from].sub(_value);\n balances[_to] = balances[_to].add(_value);\n allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);\n Transfer(_from, _to, _value);\n return true;\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n *\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param _spender The address which will spend the funds.\n * @param _value The amount of tokens to be spent.\n */\n function approve(address _spender, uint256 _value) public returns (bool) {\n allowed[msg.sender][_spender] = _value;\n Approval(msg.sender, _spender, _value);\n return true;\n }\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param _owner address The address which owns the funds.\n * @param _spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address _owner, address _spender) public view returns (uint256) {\n return allowed[_owner][_spender];\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(address _spender, uint _addedValue) public returns (bool) {\n allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {\n uint oldValue = allowed[msg.sender][_spender];\n if (_subtractedValue > oldValue) {\n allowed[msg.sender][_spender] = 0;\n } else {\n allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);\n }\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n\ncontract Recoverable is Ownable {\n\n /// @dev Empty constructor (for now)\n function Recoverable() {\n }\n\n /// @dev This will be invoked by the owner, when owner wants to rescue tokens\n /// @param token Token which will we rescue to the owner from the contract\n function recoverTokens(ERC20Basic token) onlyOwner public {\n token.transfer(owner, tokensToBeReturned(token));\n }\n\n /// @dev Interface function, can be overwritten by the superclass\n /// @param token Token which balance we will check and return\n /// @return The amount of tokens (in smallest denominator) the contract owns\n function tokensToBeReturned(ERC20Basic token) public returns (uint) {\n return token.balanceOf(this);\n }\n}\n\n\n\n/**\n * Standard EIP-20 token with an interface marker.\n *\n * @notice Interface marker is used by crowdsale contracts to validate that addresses point a good token contract.\n *\n */\ncontract StandardTokenExt is StandardToken, Recoverable {\n\n /* Interface declaration */\n function isToken() public constant returns (bool weAre) {\n return true;\n }\n}\n\n\ncontract BurnableToken is StandardTokenExt {\n\n // @notice An address for the transfer event where the burned tokens are transferred in a faux Transfer event\n address public constant BURN_ADDRESS = 0;\n\n /** How many tokens we burned */\n event Burned(address burner, uint burnedAmount);\n\n /**\n * Burn extra tokens from a balance.\n *\n */\n function burn(uint burnAmount) {\n address burner = msg.sender;\n balances[burner] = balances[burner].sub(burnAmount);\n totalSupply_ = totalSupply_.sub(burnAmount);\n Burned(burner, burnAmount);\n\n // Inform the blockchain explores that track the\n // balances only by a transfer event that the balance in this\n // address has decreased\n Transfer(burner, BURN_ADDRESS, burnAmount);\n }\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Upgrade agent interface inspired by Lunyr.\n *\n * Upgrade agent transfers tokens to a new contract.\n * Upgrade agent itself can be the token contract, or just a middle man contract doing the heavy lifting.\n */\ncontract UpgradeAgent {\n\n uint public originalSupply;\n\n /** Interface marker */\n function isUpgradeAgent() public constant returns (bool) {\n return true;\n }\n\n function upgradeFrom(address _from, uint256 _value) public;\n\n}\n\n\n/**\n * A token upgrade mechanism where users can opt-in amount of tokens to the next smart contract revision.\n *\n * First envisioned by Golem and Lunyr projects.\n */\ncontract UpgradeableToken is StandardTokenExt {\n\n /** Contract / person who can set the upgrade path. This can be the same as team multisig wallet, as what it is with its default value. */\n address public upgradeMaster;\n\n /** The next contract where the tokens will be migrated. */\n UpgradeAgent public upgradeAgent;\n\n /** How many tokens we have upgraded by now. */\n uint256 public totalUpgraded;\n\n /**\n * Upgrade states.\n *\n * - NotAllowed: The child contract has not reached a condition where the upgrade can bgun\n * - WaitingForAgent: Token allows upgrade, but we don't have a new agent yet\n * - ReadyToUpgrade: The agent is set, but not a single token has been upgraded yet\n * - Upgrading: Upgrade agent is set and the balance holders can upgrade their tokens\n *\n */\n enum UpgradeState {Unknown, NotAllowed, WaitingForAgent, ReadyToUpgrade, Upgrading}\n\n /**\n * Somebody has upgraded some of his tokens.\n */\n event Upgrade(address indexed _from, address indexed _to, uint256 _value);\n\n /**\n * New upgrade agent available.\n */\n event UpgradeAgentSet(address agent);\n\n /**\n * Do not allow construction without upgrade master set.\n */\n function UpgradeableToken(address _upgradeMaster) {\n upgradeMaster = _upgradeMaster;\n }\n\n /**\n * Allow the token holder to upgrade some of their tokens to a new contract.\n */\n function upgrade(uint256 value) public {\n\n UpgradeState state = getUpgradeState();\n if(!(state == UpgradeState.ReadyToUpgrade || state == UpgradeState.Upgrading)) {\n // Called in a bad state\n throw;\n }\n\n // Validate input value.\n if (value == 0) throw;\n\n balances[msg.sender] = balances[msg.sender].sub(value);\n\n // Take tokens out from circulation\n totalSupply_ = totalSupply_.sub(value);\n totalUpgraded = totalUpgraded.add(value);\n\n // Upgrade agent reissues the tokens\n upgradeAgent.upgradeFrom(msg.sender, value);\n Upgrade(msg.sender, upgradeAgent, value);\n }\n\n /**\n * Set an upgrade agent that handles\n */\n function setUpgradeAgent(address agent) external {\n\n if(!canUpgrade()) {\n // The token is not yet in a state that we could think upgrading\n throw;\n }\n\n if (agent == 0x0) throw;\n // Only a master can designate the next agent\n if (msg.sender != upgradeMaster) throw;\n // Upgrade has already begun for an agent\n if (getUpgradeState() == UpgradeState.Upgrading) throw;\n\n upgradeAgent = UpgradeAgent(agent);\n\n // Bad interface\n if(!upgradeAgent.isUpgradeAgent()) throw;\n // Make sure that token supplies match in source and target\n if (upgradeAgent.originalSupply() != totalSupply_) throw;\n\n UpgradeAgentSet(upgradeAgent);\n }\n\n /**\n * Get the state of the token upgrade.\n */\n function getUpgradeState() public constant returns(UpgradeState) {\n if(!canUpgrade()) return UpgradeState.NotAllowed;\n else if(address(upgradeAgent) == 0x00) return UpgradeState.WaitingForAgent;\n else if(totalUpgraded == 0) return UpgradeState.ReadyToUpgrade;\n else return UpgradeState.Upgrading;\n }\n\n /**\n * Change the upgrade master.\n *\n * This allows us to set a new owner for the upgrade mechanism.\n */\n function setUpgradeMaster(address master) public {\n if (master == 0x0) throw;\n if (msg.sender != upgradeMaster) throw;\n upgradeMaster = master;\n }\n\n /**\n * Child contract can enable to provide the condition when the upgrade can begun.\n */\n function canUpgrade() public constant returns(bool) {\n return true;\n }\n\n}\n\n\n\n/**\n * Centrally issued Ethereum token.\n *\n * We mix in burnable and upgradeable traits.\n *\n * Token supply is created in the token contract creation and allocated to owner.\n * The owner can then transfer from its supply to crowdsale participants.\n * The owner, or anybody, can burn any excessive tokens they are holding.\n *\n */\ncontract CentrallyIssuedToken is BurnableToken, UpgradeableToken {\n\n // Token meta information\n string public name;\n string public symbol;\n uint public decimals;\n\n // Token release switch\n bool public released = false;\n\n // The date before the release must be finalized or upgrade path will be forced\n uint public releaseFinalizationDate;\n\n /** Name and symbol were updated. */\n event UpdatedTokenInformation(string newName, string newSymbol);\n\n function CentrallyIssuedToken(address _owner, string _name, string _symbol, uint _totalSupply, uint _decimals, uint _releaseFinalizationDate) UpgradeableToken(_owner) {\n name = _name;\n symbol = _symbol;\n totalSupply_ = _totalSupply;\n decimals = _decimals;\n\n // Allocate initial balance to the owner\n balances[_owner] = _totalSupply;\n\n releaseFinalizationDate = _releaseFinalizationDate;\n }\n\n /**\n * Owner can update token information here.\n *\n * It is often useful to conceal the actual token association, until\n * the token operations, like central issuance or reissuance have been completed.\n * In this case the initial token can be supplied with empty name and symbol information.\n *\n * This function allows the token owner to rename the token after the operations\n * have been completed and then point the audience to use the token contract.\n */\n function setTokenInformation(string _name, string _symbol) {\n\n if(msg.sender != upgradeMaster) {\n throw;\n }\n\n name = _name;\n symbol = _symbol;\n UpdatedTokenInformation(name, symbol);\n }\n\n\n /**\n * Kill switch for the token in the case of distribution issue.\n *\n */\n function transfer(address _to, uint _value) returns (bool success) {\n\n if(now > releaseFinalizationDate) {\n if(!released) {\n throw;\n }\n }\n\n return super.transfer(_to, _value);\n }\n\n /**\n * One way function to perform the final token release.\n */\n function releaseTokenTransfer() {\n if(msg.sender != upgradeMaster) {\n throw;\n }\n\n released = true;\n }\n}\n"}, "CheckpointToken": {"abi": [{"constant": true, "inputs": [], "name": "name", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "approve", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "addedValue", "type": "uint256"}, {"name": "data", "type": "bytes"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "tokenCount", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "from", "type": "address"}, {"name": "to", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "decimals", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "owner", "type": "address"}, {"name": "blockNumber", "type": "uint256"}], "name": "balanceAt", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "receiver", "type": "address"}, {"name": "amount", "type": "uint256"}, {"name": "data", "type": "bytes"}], "name": "transferAndCall", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}, {"name": "", "type": "uint256"}], "name": "tokenBalances", "outputs": [{"name": "blockNumber", "type": "uint256"}, {"name": "value", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "uint256"}], "name": "tokensTotal", "outputs": [{"name": "blockNumber", "type": "uint256"}, {"name": "value", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}, {"name": "", "type": "address"}], "name": "allowed", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "subtractedValue", "type": "uint256"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "owner", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "subtractedValue", "type": "uint256"}, {"name": "data", "type": "bytes"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "transferVerifier", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "symbol", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "blockNumber", "type": "uint256"}], "name": "totalSupplyAt", "outputs": [{"name": "tokenCount", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "to", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "addedValue", "type": "uint256"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "owner", "type": "address"}, {"name": "spender", "type": "address"}], "name": "allowance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [{"name": "_name", "type": "string"}, {"name": "_symbol", "type": "string"}, {"name": "_decimals", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "from", "type": "address"}, {"indexed": false, "name": "receiver", "type": "address"}, {"indexed": false, "name": "amount", "type": "uint256"}, {"indexed": false, "name": "data", "type": "bytes"}], "name": "ERC677Transfer", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}, {"indexed": true, "name": "spender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "bytecode": "0x60806040523480156200001157600080fd5b506040516200128d3803806200128d83398101604090815281516020808401519284015191840180519094939093019262000053916000919086019062000076565b5081516200006990600190602085019062000076565b50600255506200011b9050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620000b957805160ff1916838001178555620000e9565b82800160010185558215620000e9579182015b82811115620000e9578251825591602001919060010190620000cc565b50620000f7929150620000fb565b5090565b6200011891905b80821115620000f7576000815560010162000102565b90565b611162806200012b6000396000f3006080604052600436106101115763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde038114610116578063095ea7b3146101a057806316ca3b63146101d857806318160ddd1461024157806323b872dd14610268578063313ce567146102925780633b8e6f2e146102a75780634000aea0146102cb57806348ff5665146103345780634f0092ab146103715780635c6581651461038957806366188463146103b057806370a08231146103d45780637272ad49146103f55780638daed5281461045e57806395d89b411461048f578063981b24d0146104a4578063a9059cbb146104bc578063d73dd623146104e0578063dd62ed3e14610504575b600080fd5b34801561012257600080fd5b5061012b61052b565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561016557818101518382015260200161014d565b50505050905090810190601f1680156101925780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101ac57600080fd5b506101c4600160a060020a03600435166024356105b9565b604080519115158252519081900360200190f35b3480156101e457600080fd5b50604080516020600460443581810135601f81018490048402850184019095528484526101c4948235600160a060020a031694602480359536959460649492019190819084018382808284375094975061061f9650505050505050565b34801561024d57600080fd5b506102566106cf565b60408051918252519081900360200190f35b34801561027457600080fd5b506101c4600160a060020a03600435811690602435166044356106e1565b34801561029e57600080fd5b50610256610771565b3480156102b357600080fd5b50610256600160a060020a0360043516602435610777565b3480156102d757600080fd5b50604080516020600460443581810135601f81018490048402850184019095528484526101c4948235600160a060020a03169460248035953695946064949201919081908401838280828437509497506107999650505050505050565b34801561034057600080fd5b50610358600160a060020a03600435166024356109a2565b6040805192835260208301919091528051918290030190f35b34801561037d57600080fd5b506103586004356109dd565b34801561039557600080fd5b50610256600160a060020a0360043581169060243516610a09565b3480156103bc57600080fd5b506101c4600160a060020a0360043516602435610a26565b3480156103e057600080fd5b50610256600160a060020a0360043516610b16565b34801561040157600080fd5b50604080516020600460443581810135601f81018490048402850184019095528484526101c4948235600160a060020a0316946024803595369594606494920191908190840183828082843750949750610b3e9650505050505050565b34801561046a57600080fd5b50610473610b60565b60408051600160a060020a039092168252519081900360200190f35b34801561049b57600080fd5b5061012b610b6f565b3480156104b057600080fd5b50610256600435610bc9565b3480156104c857600080fd5b506101c4600160a060020a0360043516602435610bd6565b3480156104ec57600080fd5b506101c4600160a060020a0360043516602435610c2c565b34801561051057600080fd5b50610256600160a060020a0360043581169060243516610cc5565b6000805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156105b15780601f10610586576101008083540402835291602001916105b1565b820191906000526020600020905b81548152906001019060200180831161059457829003601f168201915b505050505081565b336000818152600660209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b6000600160a060020a03841630141561063757600080fd5b6106418484610c2c565b5083600160a060020a03168260405180828051906020019080838360005b8381101561067757818101518382015260200161065f565b50505050905090810190601f1680156106a45780820380516001836020036101000a031916815260200191505b509150506000604051808303816000865af191505015156106c457600080fd5b5060015b9392505050565b60006106dc600543610cf0565b905090565b600160a060020a038316600090815260066020908152604080832033845290915281205482111561071157600080fd5b61071c848484610d06565b82600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a35060019392505050565b60025481565b600160a060020a03821660009081526004602052604081206106c89083610cf0565b60006107a58484610bd6565b15156107b057600080fd5b7f72db2339068fd324bbc28f2944e01064da539ac76064b6ce4a97a5f81de43dd6338585856040518085600160a060020a0316600160a060020a0316815260200184600160a060020a0316600160a060020a0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610848578181015183820152602001610830565b50505050905090810190601f1680156108755780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a183600160a060020a031663c0ee0b8a3385856040518463ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018084600160a060020a0316600160a060020a0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561091d578181015183820152602001610905565b50505050905090810190601f16801561094a5780820380516001836020036101000a031916815260200191505b50945050505050602060405180830381600087803b15801561096b57600080fd5b505af115801561097f573d6000803e3d6000fd5b505050506040513d602081101561099557600080fd5b505115156106c857600080fd5b6004602052816000526040600020818154811015156109bd57fe5b600091825260209091206002909102018054600190910154909250905082565b60058054829081106109eb57fe5b60009182526020909120600290910201805460019091015490915082565b600660209081526000928352604080842090915290825290205481565b336000908152600660209081526040808320600160a060020a038616845290915281205480831115610a7b57336000908152600660209081526040808320600160a060020a0388168452909152812055610ab0565b610a8b818463ffffffff610e4716565b336000908152600660209081526040808320600160a060020a03891684529091529020555b336000818152600660209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a0381166000908152600460205260408120610b389043610cf0565b92915050565b6000600160a060020a038416301415610b5657600080fd5b6106418484610a26565b600354600160a060020a031681565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156105b15780601f10610586576101008083540402835291602001916105b1565b6000610b38600583610cf0565b6000610be3338484610d06565b604080518381529051600160a060020a0385169133917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a350600192915050565b336000908152600660209081526040808320600160a060020a0386168452909152812054610c60908363ffffffff610e5916565b336000818152600660209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a03918216600090815260066020908152604080832093909416825291909152205490565b600080610cfd8484610e68565b95945050505050565b600080610d1285610b16565b9150610d1d84610b16565b600354909150600160a060020a031615610de357600354604080517fad076994000000000000000000000000000000000000000000000000000000008152600160a060020a0388811660048301528781166024830152604482018790529151919092169163ad0769949160648083019260209291908290030181600087803b158015610da857600080fd5b505af1158015610dbc573d6000803e3d6000fd5b505050506040513d6020811015610dd257600080fd5b5051925060008311610de357600080fd5b600160a060020a0385166000908152600460205260409020610e1490610e0f848663ffffffff610e4716565b611048565b600160a060020a0384166000908152600460205260409020610e4090610e0f838663ffffffff610e5916565b5050505050565b600082821115610e5357fe5b50900390565b6000828201838110156106c857fe5b6000806000806000868054905060001415610e89576000945084935061103e565b86548790610e9e90600163ffffffff610e4716565b81548110610ea857fe5b60009182526020909120600290910201548610610f295786548790610ed490600163ffffffff610e4716565b81548110610ede57fe5b600091825260209091206002909102015487548890610f0490600163ffffffff610e4716565b81548110610f0e57fe5b9060005260206000209060020201600101549450945061103e565b866000815481101515610f3857fe5b906000526020600020906002020160000154861015610f5d576000945084935061103e565b865460009350610f7490600163ffffffff610e4716565b91505b82821115610ff957610fb16002610fa5610f9886600163ffffffff610e5916565b859063ffffffff610e5916565b9063ffffffff61111f16565b9050858782815481101515610fc257fe5b600091825260209091206002909102015411610fe057809250610ff4565b610ff181600163ffffffff610e4716565b91505b610f77565b868381548110151561100757fe5b906000526020600020906002020160000154878481548110151561102757fe5b906000526020600020906002020160010154945094505b5050509250929050565b81541580611086575081544390839061106890600163ffffffff610e4716565b8154811061107257fe5b906000526020600020906002020160000154105b156110c857604080518082019091524381526020808201838152845460018181018755600087815293909320935160029091029093019283555191015561111b565b6040805180820190915243815260208101829052825483906110f190600163ffffffff610e4716565b815481106110fb57fe5b600091825260209182902083516002909202019081559101516001909101555b5050565b600080828481151561112d57fe5b049493505050505600a165627a7a723058200aa05e04d5099b9372f338353ca11eeb13c6fd41df5692d67f138c959d4012350029", "bytecode_runtime": "0x6080604052600436106101115763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde038114610116578063095ea7b3146101a057806316ca3b63146101d857806318160ddd1461024157806323b872dd14610268578063313ce567146102925780633b8e6f2e146102a75780634000aea0146102cb57806348ff5665146103345780634f0092ab146103715780635c6581651461038957806366188463146103b057806370a08231146103d45780637272ad49146103f55780638daed5281461045e57806395d89b411461048f578063981b24d0146104a4578063a9059cbb146104bc578063d73dd623146104e0578063dd62ed3e14610504575b600080fd5b34801561012257600080fd5b5061012b61052b565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561016557818101518382015260200161014d565b50505050905090810190601f1680156101925780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101ac57600080fd5b506101c4600160a060020a03600435166024356105b9565b604080519115158252519081900360200190f35b3480156101e457600080fd5b50604080516020600460443581810135601f81018490048402850184019095528484526101c4948235600160a060020a031694602480359536959460649492019190819084018382808284375094975061061f9650505050505050565b34801561024d57600080fd5b506102566106cf565b60408051918252519081900360200190f35b34801561027457600080fd5b506101c4600160a060020a03600435811690602435166044356106e1565b34801561029e57600080fd5b50610256610771565b3480156102b357600080fd5b50610256600160a060020a0360043516602435610777565b3480156102d757600080fd5b50604080516020600460443581810135601f81018490048402850184019095528484526101c4948235600160a060020a03169460248035953695946064949201919081908401838280828437509497506107999650505050505050565b34801561034057600080fd5b50610358600160a060020a03600435166024356109a2565b6040805192835260208301919091528051918290030190f35b34801561037d57600080fd5b506103586004356109dd565b34801561039557600080fd5b50610256600160a060020a0360043581169060243516610a09565b3480156103bc57600080fd5b506101c4600160a060020a0360043516602435610a26565b3480156103e057600080fd5b50610256600160a060020a0360043516610b16565b34801561040157600080fd5b50604080516020600460443581810135601f81018490048402850184019095528484526101c4948235600160a060020a0316946024803595369594606494920191908190840183828082843750949750610b3e9650505050505050565b34801561046a57600080fd5b50610473610b60565b60408051600160a060020a039092168252519081900360200190f35b34801561049b57600080fd5b5061012b610b6f565b3480156104b057600080fd5b50610256600435610bc9565b3480156104c857600080fd5b506101c4600160a060020a0360043516602435610bd6565b3480156104ec57600080fd5b506101c4600160a060020a0360043516602435610c2c565b34801561051057600080fd5b50610256600160a060020a0360043581169060243516610cc5565b6000805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156105b15780601f10610586576101008083540402835291602001916105b1565b820191906000526020600020905b81548152906001019060200180831161059457829003601f168201915b505050505081565b336000818152600660209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b6000600160a060020a03841630141561063757600080fd5b6106418484610c2c565b5083600160a060020a03168260405180828051906020019080838360005b8381101561067757818101518382015260200161065f565b50505050905090810190601f1680156106a45780820380516001836020036101000a031916815260200191505b509150506000604051808303816000865af191505015156106c457600080fd5b5060015b9392505050565b60006106dc600543610cf0565b905090565b600160a060020a038316600090815260066020908152604080832033845290915281205482111561071157600080fd5b61071c848484610d06565b82600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a35060019392505050565b60025481565b600160a060020a03821660009081526004602052604081206106c89083610cf0565b60006107a58484610bd6565b15156107b057600080fd5b7f72db2339068fd324bbc28f2944e01064da539ac76064b6ce4a97a5f81de43dd6338585856040518085600160a060020a0316600160a060020a0316815260200184600160a060020a0316600160a060020a0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610848578181015183820152602001610830565b50505050905090810190601f1680156108755780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a183600160a060020a031663c0ee0b8a3385856040518463ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018084600160a060020a0316600160a060020a0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561091d578181015183820152602001610905565b50505050905090810190601f16801561094a5780820380516001836020036101000a031916815260200191505b50945050505050602060405180830381600087803b15801561096b57600080fd5b505af115801561097f573d6000803e3d6000fd5b505050506040513d602081101561099557600080fd5b505115156106c857600080fd5b6004602052816000526040600020818154811015156109bd57fe5b600091825260209091206002909102018054600190910154909250905082565b60058054829081106109eb57fe5b60009182526020909120600290910201805460019091015490915082565b600660209081526000928352604080842090915290825290205481565b336000908152600660209081526040808320600160a060020a038616845290915281205480831115610a7b57336000908152600660209081526040808320600160a060020a0388168452909152812055610ab0565b610a8b818463ffffffff610e4716565b336000908152600660209081526040808320600160a060020a03891684529091529020555b336000818152600660209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a0381166000908152600460205260408120610b389043610cf0565b92915050565b6000600160a060020a038416301415610b5657600080fd5b6106418484610a26565b600354600160a060020a031681565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156105b15780601f10610586576101008083540402835291602001916105b1565b6000610b38600583610cf0565b6000610be3338484610d06565b604080518381529051600160a060020a0385169133917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a350600192915050565b336000908152600660209081526040808320600160a060020a0386168452909152812054610c60908363ffffffff610e5916565b336000818152600660209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a03918216600090815260066020908152604080832093909416825291909152205490565b600080610cfd8484610e68565b95945050505050565b600080610d1285610b16565b9150610d1d84610b16565b600354909150600160a060020a031615610de357600354604080517fad076994000000000000000000000000000000000000000000000000000000008152600160a060020a0388811660048301528781166024830152604482018790529151919092169163ad0769949160648083019260209291908290030181600087803b158015610da857600080fd5b505af1158015610dbc573d6000803e3d6000fd5b505050506040513d6020811015610dd257600080fd5b5051925060008311610de357600080fd5b600160a060020a0385166000908152600460205260409020610e1490610e0f848663ffffffff610e4716565b611048565b600160a060020a0384166000908152600460205260409020610e4090610e0f838663ffffffff610e5916565b5050505050565b600082821115610e5357fe5b50900390565b6000828201838110156106c857fe5b6000806000806000868054905060001415610e89576000945084935061103e565b86548790610e9e90600163ffffffff610e4716565b81548110610ea857fe5b60009182526020909120600290910201548610610f295786548790610ed490600163ffffffff610e4716565b81548110610ede57fe5b600091825260209091206002909102015487548890610f0490600163ffffffff610e4716565b81548110610f0e57fe5b9060005260206000209060020201600101549450945061103e565b866000815481101515610f3857fe5b906000526020600020906002020160000154861015610f5d576000945084935061103e565b865460009350610f7490600163ffffffff610e4716565b91505b82821115610ff957610fb16002610fa5610f9886600163ffffffff610e5916565b859063ffffffff610e5916565b9063ffffffff61111f16565b9050858782815481101515610fc257fe5b600091825260209091206002909102015411610fe057809250610ff4565b610ff181600163ffffffff610e4716565b91505b610f77565b868381548110151561100757fe5b906000526020600020906002020160000154878481548110151561102757fe5b906000526020600020906002020160010154945094505b5050509250929050565b81541580611086575081544390839061106890600163ffffffff610e4716565b8154811061107257fe5b906000526020600020906002020160000154105b156110c857604080518082019091524381526020808201838152845460018181018755600087815293909320935160029091029093019283555191015561111b565b6040805180820190915243815260208101829052825483906110f190600163ffffffff610e4716565b815481106110fb57fe5b600091825260209182902083516002909202019081559101516001909101555b5050565b600080828481151561112d57fe5b049493505050505600a165627a7a723058200aa05e04d5099b9372f338353ca11eeb13c6fd41df5692d67f138c959d4012350029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": true, "inputs": [], "name": "name", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "approve", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "addedValue", "type": "uint256"}, {"name": "data", "type": "bytes"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "tokenCount", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "from", "type": "address"}, {"name": "to", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "decimals", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "owner", "type": "address"}, {"name": "blockNumber", "type": "uint256"}], "name": "balanceAt", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "receiver", "type": "address"}, {"name": "amount", "type": "uint256"}, {"name": "data", "type": "bytes"}], "name": "transferAndCall", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}, {"name": "", "type": "uint256"}], "name": "tokenBalances", "outputs": [{"name": "blockNumber", "type": "uint256"}, {"name": "value", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "uint256"}], "name": "tokensTotal", "outputs": [{"name": "blockNumber", "type": "uint256"}, {"name": "value", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}, {"name": "", "type": "address"}], "name": "allowed", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "subtractedValue", "type": "uint256"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "owner", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "subtractedValue", "type": "uint256"}, {"name": "data", "type": "bytes"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "transferVerifier", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "symbol", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "blockNumber", "type": "uint256"}], "name": "totalSupplyAt", "outputs": [{"name": "tokenCount", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "to", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "addedValue", "type": "uint256"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "owner", "type": "address"}, {"name": "spender", "type": "address"}], "name": "allowance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [{"name": "_name", "type": "string"}, {"name": "_symbol", "type": "string"}, {"name": "_decimals", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "from", "type": "address"}, {"indexed": false, "name": "receiver", "type": "address"}, {"indexed": false, "name": "amount", "type": "uint256"}, {"indexed": false, "name": "data", "type": "bytes"}], "name": "ERC677Transfer", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}, {"indexed": true, "name": "spender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "devdoc": {"author": "TokenMarket / Ville Sundell ", "methods": {"allowance(address,address)": {"details": "Function to check the amount of tokens that an owner allowed to a spender.", "params": {"owner": "address The address which owns the funds.", "spender": "address The address which will spend the funds."}, "return": "A uint256 specifying the amount of tokens still available for the spender."}, "approve(address,uint256)": {"details": "Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729", "params": {"spender": "The address which will spend the funds.", "value": "The amount of tokens to be spent."}, "return": "true if the call function was executed successfully"}, "balanceAt(address,uint256)": {"details": "Gets the balance of the specified address.", "params": {"blockNumber": "The block number we want to query for the balance.", "owner": "The address to query the the balance of."}, "return": "An uint256 representing the amount owned by the passed address."}, "balanceOf(address)": {"details": "Gets the balance of the specified address.", "params": {"owner": "The address to query the the balance of."}, "return": "An uint256 representing the amount owned by the passed address."}, "decreaseApproval(address,uint256)": {"details": "Decrease the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[spender] == 0. To decrement allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"spender": "The address which will spend the funds.", "subtractedValue": "The amount of tokens to decrease the allowance by."}}, "decreaseApproval(address,uint256,bytes)": {"details": "Addition to StandardToken methods. Decrease the amount of tokens that an owner allowed to a spender and execute a call with the sent data. * This is originally from OpenZeppelin. * approve should be called when allowed[spender] == 0. To decrement allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"data": "ABI-encoded contract call to call `spender` address.", "spender": "The address which will spend the funds.", "subtractedValue": "The amount of tokens to decrease the allowance by."}}, "increaseApproval(address,uint256)": {"details": "Increase the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[spender] == 0. To increment allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"addedValue": "The amount of tokens to increase the allowance by.", "spender": "The address which will spend the funds."}}, "increaseApproval(address,uint256,bytes)": {"details": "Addition to StandardToken methods. Increase the amount of tokens that an owner allowed to a spender and execute a call with the sent data. * This is originally from OpenZeppelin. * approve should be called when allowed[spender] == 0. To increment allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"addedValue": "The amount of tokens to increase the allowance by.", "data": "ABI-encoded contract call to call `spender` address.", "spender": "The address which will spend the funds."}}, "totalSupply()": {"details": "total number of tokens in existence", "return": "A uint256 specifying the total number of tokens in existence"}, "totalSupplyAt(uint256)": {"details": "total number of tokens in existence at the given block", "params": {"blockNumber": "The block number we want to query for the total supply"}, "return": "A uint256 specifying the total number of tokens at a given block"}, "transfer(address,uint256)": {"details": "transfer token for a specified address", "params": {"to": "The address to transfer to.", "value": "The amount to be transferred."}, "return": "true if the call function was executed successfully"}, "transferFrom(address,address,uint256)": {"details": "Transfer tokens from one address to another", "params": {"from": "address The address which you want to send tokens from", "to": "address The address which you want to transfer to", "value": "uint256 the amount of tokens to be transferred"}, "return": "true if the call function was executed successfully"}}}, "userdoc": {"methods": {}}}, "settings": {"compilationTarget": {"contracts/security-token/CheckpointToken.sol": "CheckpointToken"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/security-token/CheckpointToken.sol": {"keccak256": "0xef922aeddfc702a53f7b2030a9737e375b7f6d34b56c5b144603dca1bcbdcc58", "urls": ["bzzr://9c4eeae60ae624abb2dfd48cb917e3e32f11f6dc2ac42fa65b17fc4ae157b75c"]}, "contracts/security-token/ERC677.sol": {"keccak256": "0xf557f3e12aa7f5a23d40957d9ac216db0902997f70f856697529d55e9823e50a", "urls": ["bzzr://c924011b4a57d2eb355c276255fc7af284c2f5b20ece36957d23a2e058975349"]}, "contracts/security-token/ERC677Token.sol": {"keccak256": "0xd67b6b0d3c7e9def09554b11c35f3b609a87ae2ea0f5853f0ca745f7f6366866", "urls": ["bzzr://bcd0f5e4bad7064ea5d8fe4e4e8a276af4ebddc4c7c25703c2dd32ca9ff715f7"]}, "contracts/security-token/SecurityTransferAgentInterface.sol": {"keccak256": "0x23b8a61926435e2c583480c0de72a99b4f7ec8a4213ffc46711f83ecdeaf9186", "urls": ["bzzr://36be13b6cf1389357679705bd18969409ecde684ace2d9c5b606d8986e0231cd"]}, "zeppelin/contracts/math/SafeMath.sol": {"keccak256": "0x341ba8cb467a3623e819ba1a683ac1d264005186f308505214e5f6bc89446a08", "urls": ["bzzr://59b5652ee4e4a1b5a8f1a8906e14c84af43d636cf5ca0725cc1813aabe4c8c17"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}}, "version": 1}, "name": "CheckpointToken", "ordered_full_dependencies": [], "source_path": "contracts/security-token/CheckpointToken.sol", "source": "/**\n * This smart contract code is Copyright 2018, 2019 TokenMarket Ltd. For more information see https://tokenmarket.net\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n * NatSpec is used intentionally to cover also other than public functions.\n * Solidity 0.4.18 is intentionally used: it's stable, and our framework is\n * based on that.\n */\n\n\n\ninterface SecurityTransferAgent {\n function verify(address from, address to, uint256 value) public view returns (uint256 newValue);\n}\n\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n\ninterface ERC677Receiver {\n function tokenFallback(address from, uint256 amount, bytes data) returns (bool success);\n}\n\ninterface ERC677 {\n\n // TODO: Have a different event name to make sure that tools with bad APIs do not mix this with ERC-20 Transfer() event that lacks data parameter\n event ERC677Transfer(address from, address receiver, uint256 amount, bytes data);\n\n function transferAndCall(ERC677Receiver receiver, uint amount, bytes data) returns (bool success);\n}\n\n\n\ncontract ERC677Token is ERC20, ERC677 {\n function transferAndCall(ERC677Receiver receiver, uint amount, bytes data) returns (bool success) {\n require(transfer(address(receiver), amount));\n\n ERC677Transfer(msg.sender, address(receiver), amount, data);\n\n require(receiver.tokenFallback(msg.sender, amount, data));\n }\n}\n\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n assert(c / a == b);\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n\n\n/**\n * @author TokenMarket / Ville Sundell \n */\ncontract CheckpointToken is ERC677Token {\n using SafeMath for uint256; // We use only uint256 for safety reasons (no boxing)\n\n /// @dev Name of the token, usually the company and/or series (like \"TokenMeerkat Ltd. Series A\"):\n string public name;\n /// @dev Ticker symbol, usually bases on the \"name\" above (like \"MEER\"):\n string public symbol;\n /// @dev Decimals are usually set to 18 for EIP-20 tokens:\n uint256 public decimals;\n /// @dev If transferVerifier is set, that contract will be queried upon every token transaction:\n SecurityTransferAgent public transferVerifier;\n\n /// @dev Checkpoint is the fundamental unit for our internal accounting\n /// (who owns what, and at what moment in time)\n struct Checkpoint {\n uint256 blockNumber;\n uint256 value;\n }\n /// @dev This mapping contains checkpoints for every address:\n mapping (address => Checkpoint[]) public tokenBalances;\n /// @dev This is a one dimensional Checkpoint mapping of the overall token supply:\n Checkpoint[] public tokensTotal;\n\n /// @dev This mapping keeps account for approve() -> fransferFrom() pattern:\n mapping (address => mapping (address => uint256)) public allowed;\n\n /**\n * @dev Constructor for CheckpointToken, initializing the token\n *\n * Here we define initial values for name, symbol and decimals.\n *\n * @param _name Initial name of the token\n * @param _symbol Initial symbol of the token\n * @param _decimals Number of decimals for the token, industry standard is 18\n */\n function CheckpointToken(string _name, string _symbol, uint256 _decimals) public {\n name = _name;\n symbol = _symbol;\n decimals = _decimals;\n }\n\n /** PUBLIC FUNCTIONS\n ****************************************/\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param owner address The address which owns the funds.\n * @param spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address owner, address spender) public view returns (uint256) {\n return allowed[owner][spender];\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n *\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param spender The address which will spend the funds.\n * @param value The amount of tokens to be spent.\n * @return true if the call function was executed successfully\n */\n function approve(address spender, uint256 value) public returns (bool) {\n allowed[msg.sender][spender] = value;\n Approval(msg.sender, spender, value);\n return true;\n }\n\n /**\n * @dev Transfer tokens from one address to another\n * @param from address The address which you want to send tokens from\n * @param to address The address which you want to transfer to\n * @param value uint256 the amount of tokens to be transferred\n * @return true if the call function was executed successfully\n */\n function transferFrom(address from, address to, uint256 value) public returns (bool) {\n require(value <= allowed[from][msg.sender]);\n\n transferInternal(from, to, value);\n Transfer(from, to, value);\n return true;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param to The address to transfer to.\n * @param value The amount to be transferred.\n * @return true if the call function was executed successfully\n */\n function transfer(address to, uint256 value) public returns (bool) {\n transferInternal(msg.sender, to, value);\n Transfer(msg.sender, to, value);\n return true;\n }\n\n /**\n * @dev total number of tokens in existence\n * @return A uint256 specifying the total number of tokens in existence\n */\n function totalSupply() public view returns (uint256 tokenCount) {\n tokenCount = balanceAtBlock(tokensTotal, block.number);\n }\n\n /**\n * @dev total number of tokens in existence at the given block\n * @param blockNumber The block number we want to query for the total supply\n * @return A uint256 specifying the total number of tokens at a given block\n */\n function totalSupplyAt(uint256 blockNumber) public view returns (uint256 tokenCount) {\n tokenCount = balanceAtBlock(tokensTotal, blockNumber);\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address owner) public view returns (uint256 balance) {\n balance = balanceAtBlock(tokenBalances[owner], block.number);\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param owner The address to query the the balance of.\n * @param blockNumber The block number we want to query for the balance.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceAt(address owner, uint256 blockNumber) public view returns (uint256 balance) {\n balance = balanceAtBlock(tokenBalances[owner], blockNumber);\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param spender The address which will spend the funds.\n * @param addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(address spender, uint addedValue) public returns (bool) {\n allowed[msg.sender][spender] = allowed[msg.sender][spender].add(addedValue);\n Approval(msg.sender, spender, allowed[msg.sender][spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param spender The address which will spend the funds.\n * @param subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(address spender, uint subtractedValue) public returns (bool) {\n uint oldValue = allowed[msg.sender][spender];\n if (subtractedValue > oldValue) {\n allowed[msg.sender][spender] = 0;\n } else {\n allowed[msg.sender][spender] = oldValue.sub(subtractedValue);\n }\n Approval(msg.sender, spender, allowed[msg.sender][spender]);\n return true;\n }\n\n /**\n * @dev Addition to StandardToken methods. Increase the amount of tokens that\n * an owner allowed to a spender and execute a call with the sent data.\n *\n * This is originally from OpenZeppelin.\n *\n * approve should be called when allowed[spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param spender The address which will spend the funds.\n * @param addedValue The amount of tokens to increase the allowance by.\n * @param data ABI-encoded contract call to call `spender` address.\n */\n function increaseApproval(address spender, uint addedValue, bytes data) public returns (bool) {\n require(spender != address(this));\n\n increaseApproval(spender, addedValue);\n\n require(spender.call(data));\n\n return true;\n }\n\n /**\n * @dev Addition to StandardToken methods. Decrease the amount of tokens that\n * an owner allowed to a spender and execute a call with the sent data.\n *\n * This is originally from OpenZeppelin.\n *\n * approve should be called when allowed[spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param spender The address which will spend the funds.\n * @param subtractedValue The amount of tokens to decrease the allowance by.\n * @param data ABI-encoded contract call to call `spender` address.\n */\n function decreaseApproval(address spender, uint subtractedValue, bytes data) public returns (bool) {\n require(spender != address(this));\n\n decreaseApproval(spender, subtractedValue);\n\n require(spender.call(data));\n\n return true;\n }\n\n /** INTERNALS\n ****************************************/\n\n function balanceAtBlock(Checkpoint[] storage checkpoints, uint256 blockNumber) internal returns (uint256 balance) {\n uint256 currentBlockNumber;\n (currentBlockNumber, balance) = getCheckpoint(checkpoints, blockNumber);\n }\n\n function transferInternal(address from, address to, uint256 value) internal {\n uint256 fromBalance = balanceOf(from);\n uint256 toBalance = balanceOf(to);\n\n if (address(transferVerifier) != address(0)) {\n value = transferVerifier.verify(from, to, value);\n require(value > 0);\n }\n\n setCheckpoint(tokenBalances[from], fromBalance.sub(value));\n setCheckpoint(tokenBalances[to], toBalance.add(value));\n }\n\n\n /** CORE\n ** The Magic happens below:\n ***************************************/\n\n function setCheckpoint(Checkpoint[] storage checkpoints, uint256 newValue) internal {\n if ((checkpoints.length == 0) || (checkpoints[checkpoints.length.sub(1)].blockNumber < block.number)) {\n checkpoints.push(Checkpoint(block.number, newValue));\n } else {\n checkpoints[checkpoints.length.sub(1)] = Checkpoint(block.number, newValue);\n }\n }\n\n function getCheckpoint(Checkpoint[] storage checkpoints, uint256 blockNumber) internal returns (uint256 blockNumber_, uint256 value) {\n if (checkpoints.length == 0) {\n return (0, 0);\n }\n\n // Shortcut for the actual value\n if (blockNumber >= checkpoints[checkpoints.length.sub(1)].blockNumber) {\n return (checkpoints[checkpoints.length.sub(1)].blockNumber, checkpoints[checkpoints.length.sub(1)].value);\n }\n\n if (blockNumber < checkpoints[0].blockNumber) {\n return (0, 0);\n }\n\n // Binary search of the value in the array\n uint256 min = 0;\n uint256 max = checkpoints.length.sub(1);\n while (max > min) {\n uint256 mid = (max.add(min.add(1))).div(2);\n if (checkpoints[mid].blockNumber <= blockNumber) {\n min = mid;\n } else {\n max = mid.sub(1);\n }\n }\n\n return (checkpoints[min].blockNumber, checkpoints[min].value);\n }\n}\n"}, "Crowdsale": {"abi": [{"constant": true, "inputs": [], "name": "ownerTestValue", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "requireCustomerId", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "invest", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "isPricingSane", "outputs": [{"name": "sane", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "endsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "minimumFundingGoal", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getState", "outputs": [{"name": "", "type": "uint8"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setFinalizeAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "customerId", "type": "uint128"}, {"name": "v", "type": "uint8"}, {"name": "r", "type": "bytes32"}, {"name": "s", "type": "bytes32"}], "name": "investWithSignedAddress", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "investedAmountOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "finalizeAgent", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "receiver", "type": "address"}, {"name": "fullTokens", "type": "uint256"}, {"name": "weiPrice", "type": "uint256"}], "name": "preallocate", "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": "isCrowdsale", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "finalize", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_pricingStrategy", "type": "address"}], "name": "setPricingStrategy", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "tokensSold", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "refund", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "signerAddress", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "weiRefunded", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "halt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}, {"name": "checksum", "type": "bytes1"}], "name": "buyWithCustomerIdWithChecksum", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "time", "type": "uint256"}], "name": "setEndsAt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "pricingStrategy", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "loadedRefund", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isMinimumGoalReached", "outputs": [{"name": "reached", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "bool"}], "name": "setRequireCustomerId", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "loadRefund", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "val", "type": "uint256"}], "name": "setOwnerTestValue", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "weisTotal", "type": "uint256"}, {"name": "pricePerToken", "type": "uint256"}], "name": "calculateTokens", "outputs": [{"name": "tokensTotal", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "multisigWallet", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "tokenAmountOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}], "name": "buyWithCustomerId", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [{"name": "weiAmount", "type": "uint256"}, {"name": "tokenAmount", "type": "uint256"}, {"name": "weiRaisedTotal", "type": "uint256"}, {"name": "tokensSoldTotal", "type": "uint256"}], "name": "isBreakingCap", "outputs": [{"name": "limitBroken", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "buy", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "isFinalizerSane", "outputs": [{"name": "sane", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "startsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "finalized", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "halted", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "earlyParticipantWhitelist", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "unhalt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "requiredSignedAddress", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isCrowdsaleFull", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "investorCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "status", "type": "bool"}], "name": "setEarlyParicipantWhitelist", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "bool"}, {"name": "_signerAddress", "type": "address"}], "name": "setRequireSignedAddress", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "customerId", "type": "uint128"}], "name": "investWithCustomerId", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setMultisig", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}, {"name": "v", "type": "uint8"}, {"name": "r", "type": "bytes32"}, {"name": "s", "type": "bytes32"}], "name": "buyWithSignedAddress", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "presaleWeiRaised", "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": "_token", "type": "address"}, {"name": "_pricingStrategy", "type": "address"}, {"name": "_multisigWallet", "type": "address"}, {"name": "_start", "type": "uint256"}, {"name": "_end", "type": "uint256"}, {"name": "_minimumFundingGoal", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"payable": true, "stateMutability": "payable", "type": "fallback"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}, {"indexed": false, "name": "tokenAmount", "type": "uint256"}, {"indexed": false, "name": "customerId", "type": "uint128"}], "name": "Invested", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}], "name": "Refund", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newRequireCustomerId", "type": "bool"}, {"indexed": false, "name": "newRequiredSignedAddress", "type": "bool"}, {"indexed": false, "name": "newSignerAddress", "type": "address"}], "name": "InvestmentPolicyChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "addr", "type": "address"}, {"indexed": false, "name": "status", "type": "bool"}], "name": "Whitelisted", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newEndsAt", "type": "uint256"}], "name": "EndsAtChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "bytecode": "0x", "bytecode_runtime": "0x", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": null, "name": "Crowdsale", "ordered_full_dependencies": [], "source_path": "contracts/Crowdsale.sol"}, "CrowdsaleBase": {"abi": [{"constant": true, "inputs": [], "name": "ownerTestValue", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isPricingSane", "outputs": [{"name": "sane", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "endsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "minimumFundingGoal", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getState", "outputs": [{"name": "", "type": "uint8"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setFinalizeAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "investedAmountOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "finalizeAgent", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "weiRaised", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isCrowdsale", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "finalize", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_pricingStrategy", "type": "address"}], "name": "setPricingStrategy", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "tokensSold", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "refund", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "weiRefunded", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "halt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "time", "type": "uint256"}], "name": "setEndsAt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "pricingStrategy", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "loadedRefund", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isMinimumGoalReached", "outputs": [{"name": "reached", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "loadRefund", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "val", "type": "uint256"}], "name": "setOwnerTestValue", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "weisTotal", "type": "uint256"}, {"name": "pricePerToken", "type": "uint256"}], "name": "calculateTokens", "outputs": [{"name": "tokensTotal", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "multisigWallet", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "tokenAmountOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "weiAmount", "type": "uint256"}, {"name": "tokenAmount", "type": "uint256"}, {"name": "weiRaisedTotal", "type": "uint256"}, {"name": "tokensSoldTotal", "type": "uint256"}], "name": "isBreakingCap", "outputs": [{"name": "limitBroken", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isFinalizerSane", "outputs": [{"name": "sane", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "startsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "finalized", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "halted", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "earlyParticipantWhitelist", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "unhalt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "isCrowdsaleFull", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "investorCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "status", "type": "bool"}], "name": "setEarlyParicipantWhitelist", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setMultisig", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "presaleWeiRaised", "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": "_token", "type": "address"}, {"name": "_pricingStrategy", "type": "address"}, {"name": "_multisigWallet", "type": "address"}, {"name": "_start", "type": "uint256"}, {"name": "_end", "type": "uint256"}, {"name": "_minimumFundingGoal", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"payable": true, "stateMutability": "payable", "type": "fallback"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}, {"indexed": false, "name": "tokenAmount", "type": "uint256"}, {"indexed": false, "name": "customerId", "type": "uint128"}], "name": "Invested", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}], "name": "Refund", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newRequireCustomerId", "type": "bool"}, {"indexed": false, "name": "newRequiredSignedAddress", "type": "bool"}, {"indexed": false, "name": "newSignerAddress", "type": "address"}], "name": "InvestmentPolicyChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "addr", "type": "address"}, {"indexed": false, "name": "status", "type": "bool"}], "name": "Whitelisted", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newEndsAt", "type": "uint256"}], "name": "EndsAtChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "bytecode": "0x", "bytecode_runtime": "0x", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": null, "name": "CrowdsaleBase", "ordered_full_dependencies": [], "source_path": "contracts/CrowdsaleBase.sol"}, "CrowdsaleToken": {"abi": [{"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "state", "type": "bool"}], "name": "setTransferAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "mintingFinished", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "name", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "approve", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "recoverTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_from", "type": "address"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setReleaseAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "decimals", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "receiver", "type": "address"}, {"name": "amount", "type": "uint256"}], "name": "mint", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "mintAgents", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "state", "type": "bool"}], "name": "setMintAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "uint256"}], "name": "upgrade", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_name", "type": "string"}, {"name": "_symbol", "type": "string"}], "name": "setTokenInformation", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "upgradeAgent", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "releaseTokenTransfer", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "upgradeMaster", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_subtractedValue", "type": "uint256"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getUpgradeState", "outputs": [{"name": "", "type": "uint8"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "transferAgents", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "symbol", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "released", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "canUpgrade", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "tokensToBeReturned", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalUpgraded", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "releaseAgent", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_addedValue", "type": "uint256"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "agent", "type": "address"}], "name": "setUpgradeAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}, {"name": "_spender", "type": "address"}], "name": "allowance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isToken", "outputs": [{"name": "weAre", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "master", "type": "address"}], "name": "setUpgradeMaster", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [{"name": "_name", "type": "string"}, {"name": "_symbol", "type": "string"}, {"name": "_initialSupply", "type": "uint256"}, {"name": "_decimals", "type": "uint256"}, {"name": "_mintable", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newName", "type": "string"}, {"indexed": false, "name": "newSymbol", "type": "string"}], "name": "UpdatedTokenInformation", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "_from", "type": "address"}, {"indexed": true, "name": "_to", "type": "address"}, {"indexed": false, "name": "_value", "type": "uint256"}], "name": "Upgrade", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "agent", "type": "address"}], "name": "UpgradeAgentSet", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "addr", "type": "address"}, {"indexed": false, "name": "state", "type": "bool"}], "name": "MintingAgentChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "receiver", "type": "address"}, {"indexed": false, "name": "amount", "type": "uint256"}], "name": "Minted", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}, {"indexed": true, "name": "spender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "bytecode": "0x60806040526004805460a060020a60ff02191690556006805460ff191690553480156200002b57600080fd5b5060405162001c6038038062001c6083398101604090815281516020808401519284015160608501516080860151600380546008805433600160a060020a031991821681179092559182168117909116179055938601805190969590950194919390929091620000a291600b919088019062000164565b508351620000b890600c90602087019062000164565b506001839055600d829055600354600160a060020a03166000908152602081905260408120849055831115620001345760035460015460408051600160a060020a039093168352602083019190915280517f30385c845b448a36257a6a1716e6ad2e1bc2cbe333cde1e69fe849ad6511adfe9281900390910190a15b80151562000159576006805460ff191660019081179091555415156200015957600080fd5b505050505062000209565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620001a757805160ff1916838001178555620001d7565b82800160010185558215620001d7579182015b82811115620001d7578251825591602001919060010190620001ba565b50620001e5929150620001e9565b5090565b6200020691905b80821115620001e55760008155600101620001f0565b90565b611a4780620002196000396000f3006080604052600436106101b65763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166302f652a381146101bb57806305d2035b146101e357806306fdde031461020c578063095ea7b31461029657806316114acd146102ba57806318160ddd146102db57806323b872dd1461030257806329ff4f531461032c578063313ce5671461034d57806340c10f191461036257806342c1867b1461038657806343214675146103a757806345977d03146103cd5780634eee966f146103e55780635de4ccb01461047c5780635f412d4f146104ad578063600440cb146104c257806366188463146104d757806370a08231146104fb5780638444b3911461051c578063867c2857146105555780638da5cb5b1461057657806395d89b411461058b57806396132521146105a05780639738968c146105b5578063a9059cbb146105ca578063c45d19db146105ee578063c752ff621461060f578063d1f276d314610624578063d73dd62314610639578063d7e7088a1461065d578063dd62ed3e1461067e578063eefa597b146106a5578063f2fde38b146106ba578063ffeb7d75146106db575b600080fd5b3480156101c757600080fd5b506101e1600160a060020a036004351660243515156106fc565b005b3480156101ef57600080fd5b506101f861076a565b604080519115158252519081900360200190f35b34801561021857600080fd5b50610221610773565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561025b578181015183820152602001610243565b50505050905090810190601f1680156102885780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156102a257600080fd5b506101f8600160a060020a0360043516602435610801565b3480156102c657600080fd5b506101e1600160a060020a0360043516610867565b3480156102e757600080fd5b506102f0610937565b60408051918252519081900360200190f35b34801561030e57600080fd5b506101f8600160a060020a036004358116906024351660443561093e565b34801561033857600080fd5b506101e1600160a060020a03600435166109a2565b34801561035957600080fd5b506102f0610a14565b34801561036e57600080fd5b506101e1600160a060020a0360043516602435610a1a565b34801561039257600080fd5b506101f8600160a060020a0360043516610bf9565b3480156103b357600080fd5b506101e1600160a060020a03600435166024351515610c0e565b3480156103d957600080fd5b506101e1600435610c99565b3480156103f157600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526101e194369492936024939284019190819084018382808284375050604080516020601f89358b018035918201839004830284018301909452808352979a999881019791965091820194509250829150840183828082843750949750610e0a9650505050505050565b34801561048857600080fd5b50610491610f77565b60408051600160a060020a039092168252519081900360200190f35b3480156104b957600080fd5b506101e1610f86565b3480156104ce57600080fd5b50610491610fb4565b3480156104e357600080fd5b506101f8600160a060020a0360043516602435610fc3565b34801561050757600080fd5b506102f0600160a060020a03600435166110b3565b34801561052857600080fd5b506105316110ce565b6040518082600481111561054157fe5b60ff16815260200191505060405180910390f35b34801561056157600080fd5b506101f8600160a060020a0360043516611119565b34801561058257600080fd5b5061049161112e565b34801561059757600080fd5b5061022161113d565b3480156105ac57600080fd5b506101f8611198565b3480156105c157600080fd5b506101f86111b9565b3480156105d657600080fd5b506101f8600160a060020a03600435166024356111ee565b3480156105fa57600080fd5b506102f0600160a060020a0360043516611250565b34801561061b57600080fd5b506102f06112e6565b34801561063057600080fd5b506104916112ec565b34801561064557600080fd5b506101f8600160a060020a03600435166024356112fb565b34801561066957600080fd5b506101e1600160a060020a0360043516611394565b34801561068a57600080fd5b506102f0600160a060020a0360043581169060243516611595565b3480156106b157600080fd5b506101f86115c0565b3480156106c657600080fd5b506101e1600160a060020a03600435166115c5565b3480156106e757600080fd5b506101e1600160a060020a036004351661165a565b600354600160a060020a0316331461071357600080fd5b60045460009074010000000000000000000000000000000000000000900460ff161561073e57600080fd5b50600160a060020a03919091166000908152600560205260409020805460ff1916911515919091179055565b60065460ff1681565b600b805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156107f95780601f106107ce576101008083540402835291602001916107f9565b820191906000526020600020905b8154815290600101906020018083116107dc57829003601f168201915b505050505081565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b600354600160a060020a0316331461087e57600080fd5b600354600160a060020a038083169163a9059cbb911661089d84611250565b6040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b15801561090857600080fd5b505af115801561091c573d6000803e3d6000fd5b505050506040513d602081101561093257600080fd5b505050565b6001545b90565b600454600090849074010000000000000000000000000000000000000000900460ff16151561098e57600160a060020a03811660009081526005602052604090205460ff16151561098e57600080fd5b6109998585856116b5565b95945050505050565b600354600160a060020a031633146109b957600080fd5b60045460009074010000000000000000000000000000000000000000900460ff16156109e457600080fd5b506004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600d5481565b3360009081526007602052604090205460ff161515610a3857600080fd5b60065460ff1615610a4857600080fd5b60015473__contracts/SafeMathLib.sol:SafeMathLi__6366098d4f9091836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b158015610abf57600080fd5b505af4158015610ad3573d6000803e3d6000fd5b505050506040513d6020811015610ae957600080fd5b5051600155600160a060020a038216600090815260208181526040918290205482517f66098d4f000000000000000000000000000000000000000000000000000000008152600481019190915260248101849052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b158015610b7757600080fd5b505af4158015610b8b573d6000803e3d6000fd5b505050506040513d6020811015610ba157600080fd5b5051600160a060020a0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b60076020526000908152604090205460ff1681565b600354600160a060020a03163314610c2557600080fd5b60065460ff1615610c3557600080fd5b600160a060020a038216600081815260076020908152604091829020805460ff191685151590811790915582519384529083015280517f4b0adf6c802794c7dde28a08a4e07131abcff3bf9603cd71f14f90bec7865efa9281900390910190a15050565b6000610ca36110ce565b90506003816004811115610cb357fe5b1480610cca57506004816004811115610cc857fe5b145b1515610cd557600080fd5b811515610ce157600080fd5b33600090815260208190526040902054610d01908363ffffffff61182c16565b33600090815260208190526040902055600154610d24908363ffffffff61182c16565b600155600a54610d3a908363ffffffff61183e16565b600a55600954604080517f753e88e5000000000000000000000000000000000000000000000000000000008152336004820152602481018590529051600160a060020a039092169163753e88e59160448082019260009290919082900301818387803b158015610da957600080fd5b505af1158015610dbd573d6000803e3d6000fd5b5050600954604080518681529051600160a060020a0390921693503392507f7e5c344a8141a805725cb476f76c6953b842222b967edd1f78ddb6e8b3f397ac919081900360200190a35050565b600354600160a060020a03163314610e2157600080fd5b8151610e3490600b906020850190611983565b508051610e4890600c906020840190611983565b5060408051818152600b8054600260001961010060018416150201909116049282018390527fd131ab1e6f279deea74e13a18477e13e2107deb6dc8ae955648948be5841fb46929091600c9181906020820190606083019086908015610eef5780601f10610ec457610100808354040283529160200191610eef565b820191906000526020600020905b815481529060010190602001808311610ed257829003601f168201915b5050838103825284546002600019610100600184161502019091160480825260209091019085908015610f635780601f10610f3857610100808354040283529160200191610f63565b820191906000526020600020905b815481529060010190602001808311610f4657829003601f168201915b505094505050505060405180910390a15050565b600954600160a060020a031681565b600454600160a060020a03163314610f9d57600080fd5b6006805460ff19166001179055610fb2611854565b565b600854600160a060020a031681565b336000908152600260209081526040808320600160a060020a03861684529091528120548083111561101857336000908152600260209081526040808320600160a060020a038816845290915281205561104d565b611028818463ffffffff61182c16565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a031660009081526020819052604090205490565b60006110d86111b9565b15156110e65750600161093b565b600954600160a060020a031615156111005750600261093b565b600a5415156111115750600361093b565b50600461093b565b60056020526000908152604090205460ff1681565b600354600160a060020a031681565b600c805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156107f95780601f106107ce576101008083540402835291602001916107f9565b60045474010000000000000000000000000000000000000000900460ff1681565b60045460009074010000000000000000000000000000000000000000900460ff1680156111e957506111e96115c0565b905090565b600454600090339074010000000000000000000000000000000000000000900460ff16151561123e57600160a060020a03811660009081526005602052604090205460ff16151561123e57600080fd5b61124884846118a2565b949350505050565b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600091600160a060020a038416916370a082319160248082019260209290919082900301818787803b1580156112b457600080fd5b505af11580156112c8573d6000803e3d6000fd5b505050506040513d60208110156112de57600080fd5b505192915050565b600a5481565b600454600160a060020a031681565b336000908152600260209081526040808320600160a060020a038616845290915281205461132f908363ffffffff61183e16565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b61139c6111b9565b15156113a757600080fd5b600160a060020a03811615156113bc57600080fd5b600854600160a060020a031633146113d357600080fd5b60046113dd6110ce565b60048111156113e857fe5b14156113f357600080fd5b6009805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038381169190911791829055604080517f61d3d7a6000000000000000000000000000000000000000000000000000000008152905192909116916361d3d7a6916004808201926020929091908290030181600087803b15801561147757600080fd5b505af115801561148b573d6000803e3d6000fd5b505050506040513d60208110156114a157600080fd5b505115156114ae57600080fd5b600154600960009054906101000a9004600160a060020a0316600160a060020a0316634b2ba0dd6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561151d57600080fd5b505af1158015611531573d6000803e3d6000fd5b505050506040513d602081101561154757600080fd5b50511461155357600080fd5b60095460408051600160a060020a039092168252517f7845d5aa74cc410e35571258d954f23b82276e160fe8c188fa80566580f279cc9181900360200190a150565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600190565b600354600160a060020a031633146115dc57600080fd5b600160a060020a03811615156115f157600080fd5b600354604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600160a060020a038116151561166f57600080fd5b600854600160a060020a0316331461168657600080fd5b6008805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6000600160a060020a03831615156116cc57600080fd5b600160a060020a0384166000908152602081905260409020548211156116f157600080fd5b600160a060020a038416600090815260026020908152604080832033845290915290205482111561172157600080fd5b600160a060020a03841660009081526020819052604090205461174a908363ffffffff61182c16565b600160a060020a03808616600090815260208190526040808220939093559085168152205461177f908363ffffffff61183e16565b600160a060020a038085166000908152602081815260408083209490945591871681526002825282812033825290915220546117c1908363ffffffff61182c16565b600160a060020a03808616600081815260026020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b60008282111561183857fe5b50900390565b60008282018381101561184d57fe5b9392505050565b600454600160a060020a0316331461186b57600080fd5b6004805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b6000600160a060020a03831615156118b957600080fd5b336000908152602081905260409020548211156118d557600080fd5b336000908152602081905260409020546118f5908363ffffffff61182c16565b3360009081526020819052604080822092909255600160a060020a03851681522054611927908363ffffffff61183e16565b600160a060020a038416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106119c457805160ff19168380011785556119f1565b828001600101855582156119f1579182015b828111156119f15782518255916020019190600101906119d6565b506119fd929150611a01565b5090565b61093b91905b808211156119fd5760008155600101611a075600a165627a7a723058203627fb1890407471551a072bd60617b7d15e4053faa6d2c7e1c51f57338f0e960029", "bytecode_runtime": "0x6080604052600436106101b65763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166302f652a381146101bb57806305d2035b146101e357806306fdde031461020c578063095ea7b31461029657806316114acd146102ba57806318160ddd146102db57806323b872dd1461030257806329ff4f531461032c578063313ce5671461034d57806340c10f191461036257806342c1867b1461038657806343214675146103a757806345977d03146103cd5780634eee966f146103e55780635de4ccb01461047c5780635f412d4f146104ad578063600440cb146104c257806366188463146104d757806370a08231146104fb5780638444b3911461051c578063867c2857146105555780638da5cb5b1461057657806395d89b411461058b57806396132521146105a05780639738968c146105b5578063a9059cbb146105ca578063c45d19db146105ee578063c752ff621461060f578063d1f276d314610624578063d73dd62314610639578063d7e7088a1461065d578063dd62ed3e1461067e578063eefa597b146106a5578063f2fde38b146106ba578063ffeb7d75146106db575b600080fd5b3480156101c757600080fd5b506101e1600160a060020a036004351660243515156106fc565b005b3480156101ef57600080fd5b506101f861076a565b604080519115158252519081900360200190f35b34801561021857600080fd5b50610221610773565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561025b578181015183820152602001610243565b50505050905090810190601f1680156102885780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156102a257600080fd5b506101f8600160a060020a0360043516602435610801565b3480156102c657600080fd5b506101e1600160a060020a0360043516610867565b3480156102e757600080fd5b506102f0610937565b60408051918252519081900360200190f35b34801561030e57600080fd5b506101f8600160a060020a036004358116906024351660443561093e565b34801561033857600080fd5b506101e1600160a060020a03600435166109a2565b34801561035957600080fd5b506102f0610a14565b34801561036e57600080fd5b506101e1600160a060020a0360043516602435610a1a565b34801561039257600080fd5b506101f8600160a060020a0360043516610bf9565b3480156103b357600080fd5b506101e1600160a060020a03600435166024351515610c0e565b3480156103d957600080fd5b506101e1600435610c99565b3480156103f157600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526101e194369492936024939284019190819084018382808284375050604080516020601f89358b018035918201839004830284018301909452808352979a999881019791965091820194509250829150840183828082843750949750610e0a9650505050505050565b34801561048857600080fd5b50610491610f77565b60408051600160a060020a039092168252519081900360200190f35b3480156104b957600080fd5b506101e1610f86565b3480156104ce57600080fd5b50610491610fb4565b3480156104e357600080fd5b506101f8600160a060020a0360043516602435610fc3565b34801561050757600080fd5b506102f0600160a060020a03600435166110b3565b34801561052857600080fd5b506105316110ce565b6040518082600481111561054157fe5b60ff16815260200191505060405180910390f35b34801561056157600080fd5b506101f8600160a060020a0360043516611119565b34801561058257600080fd5b5061049161112e565b34801561059757600080fd5b5061022161113d565b3480156105ac57600080fd5b506101f8611198565b3480156105c157600080fd5b506101f86111b9565b3480156105d657600080fd5b506101f8600160a060020a03600435166024356111ee565b3480156105fa57600080fd5b506102f0600160a060020a0360043516611250565b34801561061b57600080fd5b506102f06112e6565b34801561063057600080fd5b506104916112ec565b34801561064557600080fd5b506101f8600160a060020a03600435166024356112fb565b34801561066957600080fd5b506101e1600160a060020a0360043516611394565b34801561068a57600080fd5b506102f0600160a060020a0360043581169060243516611595565b3480156106b157600080fd5b506101f86115c0565b3480156106c657600080fd5b506101e1600160a060020a03600435166115c5565b3480156106e757600080fd5b506101e1600160a060020a036004351661165a565b600354600160a060020a0316331461071357600080fd5b60045460009074010000000000000000000000000000000000000000900460ff161561073e57600080fd5b50600160a060020a03919091166000908152600560205260409020805460ff1916911515919091179055565b60065460ff1681565b600b805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156107f95780601f106107ce576101008083540402835291602001916107f9565b820191906000526020600020905b8154815290600101906020018083116107dc57829003601f168201915b505050505081565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b600354600160a060020a0316331461087e57600080fd5b600354600160a060020a038083169163a9059cbb911661089d84611250565b6040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b15801561090857600080fd5b505af115801561091c573d6000803e3d6000fd5b505050506040513d602081101561093257600080fd5b505050565b6001545b90565b600454600090849074010000000000000000000000000000000000000000900460ff16151561098e57600160a060020a03811660009081526005602052604090205460ff16151561098e57600080fd5b6109998585856116b5565b95945050505050565b600354600160a060020a031633146109b957600080fd5b60045460009074010000000000000000000000000000000000000000900460ff16156109e457600080fd5b506004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600d5481565b3360009081526007602052604090205460ff161515610a3857600080fd5b60065460ff1615610a4857600080fd5b60015473__contracts/SafeMathLib.sol:SafeMathLi__6366098d4f9091836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b158015610abf57600080fd5b505af4158015610ad3573d6000803e3d6000fd5b505050506040513d6020811015610ae957600080fd5b5051600155600160a060020a038216600090815260208181526040918290205482517f66098d4f000000000000000000000000000000000000000000000000000000008152600481019190915260248101849052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b158015610b7757600080fd5b505af4158015610b8b573d6000803e3d6000fd5b505050506040513d6020811015610ba157600080fd5b5051600160a060020a0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b60076020526000908152604090205460ff1681565b600354600160a060020a03163314610c2557600080fd5b60065460ff1615610c3557600080fd5b600160a060020a038216600081815260076020908152604091829020805460ff191685151590811790915582519384529083015280517f4b0adf6c802794c7dde28a08a4e07131abcff3bf9603cd71f14f90bec7865efa9281900390910190a15050565b6000610ca36110ce565b90506003816004811115610cb357fe5b1480610cca57506004816004811115610cc857fe5b145b1515610cd557600080fd5b811515610ce157600080fd5b33600090815260208190526040902054610d01908363ffffffff61182c16565b33600090815260208190526040902055600154610d24908363ffffffff61182c16565b600155600a54610d3a908363ffffffff61183e16565b600a55600954604080517f753e88e5000000000000000000000000000000000000000000000000000000008152336004820152602481018590529051600160a060020a039092169163753e88e59160448082019260009290919082900301818387803b158015610da957600080fd5b505af1158015610dbd573d6000803e3d6000fd5b5050600954604080518681529051600160a060020a0390921693503392507f7e5c344a8141a805725cb476f76c6953b842222b967edd1f78ddb6e8b3f397ac919081900360200190a35050565b600354600160a060020a03163314610e2157600080fd5b8151610e3490600b906020850190611983565b508051610e4890600c906020840190611983565b5060408051818152600b8054600260001961010060018416150201909116049282018390527fd131ab1e6f279deea74e13a18477e13e2107deb6dc8ae955648948be5841fb46929091600c9181906020820190606083019086908015610eef5780601f10610ec457610100808354040283529160200191610eef565b820191906000526020600020905b815481529060010190602001808311610ed257829003601f168201915b5050838103825284546002600019610100600184161502019091160480825260209091019085908015610f635780601f10610f3857610100808354040283529160200191610f63565b820191906000526020600020905b815481529060010190602001808311610f4657829003601f168201915b505094505050505060405180910390a15050565b600954600160a060020a031681565b600454600160a060020a03163314610f9d57600080fd5b6006805460ff19166001179055610fb2611854565b565b600854600160a060020a031681565b336000908152600260209081526040808320600160a060020a03861684529091528120548083111561101857336000908152600260209081526040808320600160a060020a038816845290915281205561104d565b611028818463ffffffff61182c16565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a031660009081526020819052604090205490565b60006110d86111b9565b15156110e65750600161093b565b600954600160a060020a031615156111005750600261093b565b600a5415156111115750600361093b565b50600461093b565b60056020526000908152604090205460ff1681565b600354600160a060020a031681565b600c805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156107f95780601f106107ce576101008083540402835291602001916107f9565b60045474010000000000000000000000000000000000000000900460ff1681565b60045460009074010000000000000000000000000000000000000000900460ff1680156111e957506111e96115c0565b905090565b600454600090339074010000000000000000000000000000000000000000900460ff16151561123e57600160a060020a03811660009081526005602052604090205460ff16151561123e57600080fd5b61124884846118a2565b949350505050565b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600091600160a060020a038416916370a082319160248082019260209290919082900301818787803b1580156112b457600080fd5b505af11580156112c8573d6000803e3d6000fd5b505050506040513d60208110156112de57600080fd5b505192915050565b600a5481565b600454600160a060020a031681565b336000908152600260209081526040808320600160a060020a038616845290915281205461132f908363ffffffff61183e16565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b61139c6111b9565b15156113a757600080fd5b600160a060020a03811615156113bc57600080fd5b600854600160a060020a031633146113d357600080fd5b60046113dd6110ce565b60048111156113e857fe5b14156113f357600080fd5b6009805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038381169190911791829055604080517f61d3d7a6000000000000000000000000000000000000000000000000000000008152905192909116916361d3d7a6916004808201926020929091908290030181600087803b15801561147757600080fd5b505af115801561148b573d6000803e3d6000fd5b505050506040513d60208110156114a157600080fd5b505115156114ae57600080fd5b600154600960009054906101000a9004600160a060020a0316600160a060020a0316634b2ba0dd6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561151d57600080fd5b505af1158015611531573d6000803e3d6000fd5b505050506040513d602081101561154757600080fd5b50511461155357600080fd5b60095460408051600160a060020a039092168252517f7845d5aa74cc410e35571258d954f23b82276e160fe8c188fa80566580f279cc9181900360200190a150565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600190565b600354600160a060020a031633146115dc57600080fd5b600160a060020a03811615156115f157600080fd5b600354604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600160a060020a038116151561166f57600080fd5b600854600160a060020a0316331461168657600080fd5b6008805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6000600160a060020a03831615156116cc57600080fd5b600160a060020a0384166000908152602081905260409020548211156116f157600080fd5b600160a060020a038416600090815260026020908152604080832033845290915290205482111561172157600080fd5b600160a060020a03841660009081526020819052604090205461174a908363ffffffff61182c16565b600160a060020a03808616600090815260208190526040808220939093559085168152205461177f908363ffffffff61183e16565b600160a060020a038085166000908152602081815260408083209490945591871681526002825282812033825290915220546117c1908363ffffffff61182c16565b600160a060020a03808616600081815260026020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b60008282111561183857fe5b50900390565b60008282018381101561184d57fe5b9392505050565b600454600160a060020a0316331461186b57600080fd5b6004805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b6000600160a060020a03831615156118b957600080fd5b336000908152602081905260409020548211156118d557600080fd5b336000908152602081905260409020546118f5908363ffffffff61182c16565b3360009081526020819052604080822092909255600160a060020a03851681522054611927908363ffffffff61183e16565b600160a060020a038416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106119c457805160ff19168380011785556119f1565b828001600101855582156119f1579182015b828111156119f15782518255916020019190600101906119d6565b506119fd929150611a01565b5090565b61093b91905b808211156119fd5760008155600101611a075600a165627a7a723058203627fb1890407471551a072bd60617b7d15e4053faa6d2c7e1c51f57338f0e960029", "direct_dependencies": ["SafeMathLib"], "full_dependencies": ["SafeMathLib"], "linkrefs": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 6348}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 6836}], "linkrefs_runtime": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 5274}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 5762}], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "state", "type": "bool"}], "name": "setTransferAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "mintingFinished", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "name", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "approve", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "recoverTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_from", "type": "address"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setReleaseAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "decimals", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "receiver", "type": "address"}, {"name": "amount", "type": "uint256"}], "name": "mint", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "mintAgents", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "state", "type": "bool"}], "name": "setMintAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "uint256"}], "name": "upgrade", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_name", "type": "string"}, {"name": "_symbol", "type": "string"}], "name": "setTokenInformation", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "upgradeAgent", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "releaseTokenTransfer", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "upgradeMaster", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_subtractedValue", "type": "uint256"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getUpgradeState", "outputs": [{"name": "", "type": "uint8"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "transferAgents", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "symbol", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "released", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "canUpgrade", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "tokensToBeReturned", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalUpgraded", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "releaseAgent", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_addedValue", "type": "uint256"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "agent", "type": "address"}], "name": "setUpgradeAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}, {"name": "_spender", "type": "address"}], "name": "allowance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isToken", "outputs": [{"name": "weAre", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "master", "type": "address"}], "name": "setUpgradeMaster", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [{"name": "_name", "type": "string"}, {"name": "_symbol", "type": "string"}, {"name": "_initialSupply", "type": "uint256"}, {"name": "_decimals", "type": "uint256"}, {"name": "_mintable", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newName", "type": "string"}, {"indexed": false, "name": "newSymbol", "type": "string"}], "name": "UpdatedTokenInformation", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "_from", "type": "address"}, {"indexed": true, "name": "_to", "type": "address"}, {"indexed": false, "name": "_value", "type": "uint256"}], "name": "Upgrade", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "agent", "type": "address"}], "name": "UpgradeAgentSet", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "addr", "type": "address"}, {"indexed": false, "name": "state", "type": "bool"}], "name": "MintingAgentChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "receiver", "type": "address"}, {"indexed": false, "name": "amount", "type": "uint256"}], "name": "Minted", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}, {"indexed": true, "name": "spender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "devdoc": {"methods": {"allowance(address,address)": {"details": "Function to check the amount of tokens that an owner allowed to a spender.", "params": {"_owner": "address The address which owns the funds.", "_spender": "address The address which will spend the funds."}, "return": "A uint256 specifying the amount of tokens still available for the spender."}, "approve(address,uint256)": {"details": "Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729", "params": {"_spender": "The address which will spend the funds.", "_value": "The amount of tokens to be spent."}}, "balanceOf(address)": {"details": "Gets the balance of the specified address.", "params": {"_owner": "The address to query the the balance of."}, "return": "An uint256 representing the amount owned by the passed address."}, "decreaseApproval(address,uint256)": {"details": "Decrease the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[_spender] == 0. To decrement allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"_spender": "The address which will spend the funds.", "_subtractedValue": "The amount of tokens to decrease the allowance by."}}, "increaseApproval(address,uint256)": {"details": "Increase the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[_spender] == 0. To increment allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"_addedValue": "The amount of tokens to increase the allowance by.", "_spender": "The address which will spend the funds."}}, "recoverTokens(address)": {"details": "This will be invoked by the owner, when owner wants to rescue tokens", "params": {"token": "Token which will we rescue to the owner from the contract"}}, "tokensToBeReturned(address)": {"details": "Interface function, can be overwritten by the superclass", "params": {"token": "Token which balance we will check and return"}, "return": "The amount of tokens (in smallest denominator) the contract owns"}, "totalSupply()": {"details": "total number of tokens in existence"}, "transferOwnership(address)": {"details": "Allows the current owner to transfer control of the contract to a newOwner.", "params": {"newOwner": "The address to transfer ownership to."}}}}, "userdoc": {"methods": {"canUpgrade()": {"notice": "Allow upgrade agent functionality kick in only if the crowdsale was success."}, "getUpgradeState()": {"notice": "Get the state of the token upgrade."}, "mint(address,uint256)": {"notice": "Create new tokens and allocate them to an address.. * Only callably by a crowdsale contract (mint agent)."}, "releaseTokenTransfer()": {"notice": "When token is released to be transferable, enforce no new tokens can be created."}, "setMintAgent(address,bool)": {"notice": "Owner can allow a crowdsale contract to mint new tokens."}, "setReleaseAgent(address)": {"notice": "Set the contract that can call release and make the token transferable. * Design choice. Allow reset the release agent to fix fat finger mistakes."}, "setTokenInformation(string,string)": {"notice": "Owner can update token information here. * It is often useful to conceal the actual token association, until the token operations, like central issuance or reissuance have been completed. * This function allows the token owner to rename the token after the operations have been completed and then point the audience to use the token contract."}, "setTransferAgent(address,bool)": {"notice": "Owner can allow a particular address (a crowdsale contract) to transfer tokens despite the lock up period."}, "setUpgradeAgent(address)": {"notice": "Set an upgrade agent that handles"}, "setUpgradeMaster(address)": {"notice": "Change the upgrade master. * This allows us to set a new owner for the upgrade mechanism."}, "upgrade(uint256)": {"notice": "Allow the token holder to upgrade some of their tokens to a new contract."}}}}, "settings": {"compilationTarget": {"contracts/CrowdsaleToken.sol": "CrowdsaleToken"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/CrowdsaleToken.sol": {"keccak256": "0xa812687ac327cd19fac64667980e70d4fb72ef7f61dce477818d085cf0a915df", "urls": ["bzzr://826d9dda00ce341794e5bb05c78b1abb2728e3c631f7a542345dcfa9f3bd9c50"]}, "contracts/MintableToken.sol": {"keccak256": "0x650e1d6b2bedcd36508918357c7cf4f36fdd093cd0c4d6342f4dcd3bdcdd7578", "urls": ["bzzr://7ba2ac0480d428066a18727e2adb76ba56856ecd37b4420e801131ec8f8f4be3"]}, "contracts/Recoverable.sol": {"keccak256": "0x311a332cdd87df6e00057f5455f4e68b043b5dbe211f6d68bc64e20817515635", "urls": ["bzzr://4fd99bcfb93baed6e7c8d22ee9ecc5c8346a1aa98288e77b01333b2c5d3f582d"]}, "contracts/ReleasableToken.sol": {"keccak256": "0x2c50180d0c1eab1aa63a04da3ae87ee2c482665d2a1a42c5f05b11234a7edaf4", "urls": ["bzzr://10752c317eba5c42e2848722689cfee4fffb7bcb42f3346e1a20715d843798e8"]}, "contracts/SafeMathLib.sol": {"keccak256": "0x501bfe31e274b9a5591f7c540bdced4d4312e27d4f19599147c9bbca3d9c6b18", "urls": ["bzzr://a80935ebddb06c247d71372d4e5833ee029f08633bd0fe4a274a57009567e5b9"]}, "contracts/StandardTokenExt.sol": {"keccak256": "0x9ea2d4cec4dccd5639c05e6c23dd027d80b5e5a20abd99b280ab7b2631b5a5fc", "urls": ["bzzr://a52d8fc5a21bd83997aff19128e00dceb251df712207b61223894c8b7f42d5ff"]}, "contracts/UpgradeAgent.sol": {"keccak256": "0x88e793f72feca4a18d2cd06e6037c1413d7b963eabcf5626d60bfb9d04d6e8e6", "urls": ["bzzr://87e39a65cf25d539ab49ad7e759b3298b8a19272964e69e3f2432f0323f30025"]}, "contracts/UpgradeableToken.sol": {"keccak256": "0xa74fc300c514564ece81c86905502c2de674b69c0633b133af19c1ba027da2c9", "urls": ["bzzr://55bc0b908c94781462b8959f051c6dbb53c35641b0f8cb38d74632ad6bf95e52"]}, "zeppelin/contracts/math/SafeMath.sol": {"keccak256": "0x341ba8cb467a3623e819ba1a683ac1d264005186f308505214e5f6bc89446a08", "urls": ["bzzr://59b5652ee4e4a1b5a8f1a8906e14c84af43d636cf5ca0725cc1813aabe4c8c17"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}, "zeppelin/contracts/token/ERC20/BasicToken.sol": {"keccak256": "0x948404468d61ff35ea4194650670408dabd65da7f905a1c16888ab84520bf39e", "urls": ["bzzr://ea75e20f95d7e4e10394fe6bfaa8eee56b4757c2a6f1e8df4180d33afa621935"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}, "zeppelin/contracts/token/ERC20/StandardToken.sol": {"keccak256": "0xd2b344a5259e19ec143074cfa65637a10c40b68395c59808c4af13bccbb2de55", "urls": ["bzzr://d61a01175a7ca1ba9f4403de603c20b897e33ec425aef2d9f8a7f9ddfdfaf5b2"]}}, "version": 1}, "name": "CrowdsaleToken", "ordered_full_dependencies": ["SafeMathLib"], "source_path": "contracts/CrowdsaleToken.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n assert(c / a == b);\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n\n\n\n/**\n * @title Basic token\n * @dev Basic version of StandardToken, with no allowances.\n */\ncontract BasicToken is ERC20Basic {\n using SafeMath for uint256;\n\n mapping(address => uint256) balances;\n\n uint256 totalSupply_;\n\n /**\n * @dev total number of tokens in existence\n */\n function totalSupply() public view returns (uint256) {\n return totalSupply_;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param _to The address to transfer to.\n * @param _value The amount to be transferred.\n */\n function transfer(address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[msg.sender]);\n\n // SafeMath.sub will throw if there is not enough balance.\n balances[msg.sender] = balances[msg.sender].sub(_value);\n balances[_to] = balances[_to].add(_value);\n Transfer(msg.sender, _to, _value);\n return true;\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param _owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address _owner) public view returns (uint256 balance) {\n return balances[_owner];\n }\n\n}\n\n\n\n\n/**\n * @title Standard ERC20 token\n *\n * @dev Implementation of the basic standard token.\n * @dev https://github.com/ethereum/EIPs/issues/20\n * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol\n */\ncontract StandardToken is ERC20, BasicToken {\n\n mapping (address => mapping (address => uint256)) internal allowed;\n\n\n /**\n * @dev Transfer tokens from one address to another\n * @param _from address The address which you want to send tokens from\n * @param _to address The address which you want to transfer to\n * @param _value uint256 the amount of tokens to be transferred\n */\n function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[_from]);\n require(_value <= allowed[_from][msg.sender]);\n\n balances[_from] = balances[_from].sub(_value);\n balances[_to] = balances[_to].add(_value);\n allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);\n Transfer(_from, _to, _value);\n return true;\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n *\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param _spender The address which will spend the funds.\n * @param _value The amount of tokens to be spent.\n */\n function approve(address _spender, uint256 _value) public returns (bool) {\n allowed[msg.sender][_spender] = _value;\n Approval(msg.sender, _spender, _value);\n return true;\n }\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param _owner address The address which owns the funds.\n * @param _spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address _owner, address _spender) public view returns (uint256) {\n return allowed[_owner][_spender];\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(address _spender, uint _addedValue) public returns (bool) {\n allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {\n uint oldValue = allowed[msg.sender][_spender];\n if (_subtractedValue > oldValue) {\n allowed[msg.sender][_spender] = 0;\n } else {\n allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);\n }\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n\ncontract Recoverable is Ownable {\n\n /// @dev Empty constructor (for now)\n function Recoverable() {\n }\n\n /// @dev This will be invoked by the owner, when owner wants to rescue tokens\n /// @param token Token which will we rescue to the owner from the contract\n function recoverTokens(ERC20Basic token) onlyOwner public {\n token.transfer(owner, tokensToBeReturned(token));\n }\n\n /// @dev Interface function, can be overwritten by the superclass\n /// @param token Token which balance we will check and return\n /// @return The amount of tokens (in smallest denominator) the contract owns\n function tokensToBeReturned(ERC20Basic token) public returns (uint) {\n return token.balanceOf(this);\n }\n}\n\n\n\n/**\n * Standard EIP-20 token with an interface marker.\n *\n * @notice Interface marker is used by crowdsale contracts to validate that addresses point a good token contract.\n *\n */\ncontract StandardTokenExt is StandardToken, Recoverable {\n\n /* Interface declaration */\n function isToken() public constant returns (bool weAre) {\n return true;\n }\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Upgrade agent interface inspired by Lunyr.\n *\n * Upgrade agent transfers tokens to a new contract.\n * Upgrade agent itself can be the token contract, or just a middle man contract doing the heavy lifting.\n */\ncontract UpgradeAgent {\n\n uint public originalSupply;\n\n /** Interface marker */\n function isUpgradeAgent() public constant returns (bool) {\n return true;\n }\n\n function upgradeFrom(address _from, uint256 _value) public;\n\n}\n\n\n/**\n * A token upgrade mechanism where users can opt-in amount of tokens to the next smart contract revision.\n *\n * First envisioned by Golem and Lunyr projects.\n */\ncontract UpgradeableToken is StandardTokenExt {\n\n /** Contract / person who can set the upgrade path. This can be the same as team multisig wallet, as what it is with its default value. */\n address public upgradeMaster;\n\n /** The next contract where the tokens will be migrated. */\n UpgradeAgent public upgradeAgent;\n\n /** How many tokens we have upgraded by now. */\n uint256 public totalUpgraded;\n\n /**\n * Upgrade states.\n *\n * - NotAllowed: The child contract has not reached a condition where the upgrade can bgun\n * - WaitingForAgent: Token allows upgrade, but we don't have a new agent yet\n * - ReadyToUpgrade: The agent is set, but not a single token has been upgraded yet\n * - Upgrading: Upgrade agent is set and the balance holders can upgrade their tokens\n *\n */\n enum UpgradeState {Unknown, NotAllowed, WaitingForAgent, ReadyToUpgrade, Upgrading}\n\n /**\n * Somebody has upgraded some of his tokens.\n */\n event Upgrade(address indexed _from, address indexed _to, uint256 _value);\n\n /**\n * New upgrade agent available.\n */\n event UpgradeAgentSet(address agent);\n\n /**\n * Do not allow construction without upgrade master set.\n */\n function UpgradeableToken(address _upgradeMaster) {\n upgradeMaster = _upgradeMaster;\n }\n\n /**\n * Allow the token holder to upgrade some of their tokens to a new contract.\n */\n function upgrade(uint256 value) public {\n\n UpgradeState state = getUpgradeState();\n if(!(state == UpgradeState.ReadyToUpgrade || state == UpgradeState.Upgrading)) {\n // Called in a bad state\n throw;\n }\n\n // Validate input value.\n if (value == 0) throw;\n\n balances[msg.sender] = balances[msg.sender].sub(value);\n\n // Take tokens out from circulation\n totalSupply_ = totalSupply_.sub(value);\n totalUpgraded = totalUpgraded.add(value);\n\n // Upgrade agent reissues the tokens\n upgradeAgent.upgradeFrom(msg.sender, value);\n Upgrade(msg.sender, upgradeAgent, value);\n }\n\n /**\n * Set an upgrade agent that handles\n */\n function setUpgradeAgent(address agent) external {\n\n if(!canUpgrade()) {\n // The token is not yet in a state that we could think upgrading\n throw;\n }\n\n if (agent == 0x0) throw;\n // Only a master can designate the next agent\n if (msg.sender != upgradeMaster) throw;\n // Upgrade has already begun for an agent\n if (getUpgradeState() == UpgradeState.Upgrading) throw;\n\n upgradeAgent = UpgradeAgent(agent);\n\n // Bad interface\n if(!upgradeAgent.isUpgradeAgent()) throw;\n // Make sure that token supplies match in source and target\n if (upgradeAgent.originalSupply() != totalSupply_) throw;\n\n UpgradeAgentSet(upgradeAgent);\n }\n\n /**\n * Get the state of the token upgrade.\n */\n function getUpgradeState() public constant returns(UpgradeState) {\n if(!canUpgrade()) return UpgradeState.NotAllowed;\n else if(address(upgradeAgent) == 0x00) return UpgradeState.WaitingForAgent;\n else if(totalUpgraded == 0) return UpgradeState.ReadyToUpgrade;\n else return UpgradeState.Upgrading;\n }\n\n /**\n * Change the upgrade master.\n *\n * This allows us to set a new owner for the upgrade mechanism.\n */\n function setUpgradeMaster(address master) public {\n if (master == 0x0) throw;\n if (msg.sender != upgradeMaster) throw;\n upgradeMaster = master;\n }\n\n /**\n * Child contract can enable to provide the condition when the upgrade can begun.\n */\n function canUpgrade() public constant returns(bool) {\n return true;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n/**\n * Define interface for releasing the token transfer after a successful crowdsale.\n */\ncontract ReleasableToken is StandardTokenExt {\n\n /* The finalizer contract that allows unlift the transfer limits on this token */\n address public releaseAgent;\n\n /** A crowdsale contract can release us to the wild if ICO success. If false we are are in transfer lock up period.*/\n bool public released = false;\n\n /** Map of agents that are allowed to transfer tokens regardless of the lock down period. These are crowdsale contracts and possible the team multisig itself. */\n mapping (address => bool) public transferAgents;\n\n /**\n * Limit token transfer until the crowdsale is over.\n *\n */\n modifier canTransfer(address _sender) {\n\n if(!released) {\n if(!transferAgents[_sender]) {\n throw;\n }\n }\n\n _;\n }\n\n /**\n * Set the contract that can call release and make the token transferable.\n *\n * Design choice. Allow reset the release agent to fix fat finger mistakes.\n */\n function setReleaseAgent(address addr) onlyOwner inReleaseState(false) public {\n\n // We don't do interface check here as we might want to a normal wallet address to act as a release agent\n releaseAgent = addr;\n }\n\n /**\n * Owner can allow a particular address (a crowdsale contract) to transfer tokens despite the lock up period.\n */\n function setTransferAgent(address addr, bool state) onlyOwner inReleaseState(false) public {\n transferAgents[addr] = state;\n }\n\n /**\n * One way function to release the tokens to the wild.\n *\n * Can be called only from the release agent that is the final ICO contract. It is only called if the crowdsale has been success (first milestone reached).\n */\n function releaseTokenTransfer() public onlyReleaseAgent {\n released = true;\n }\n\n /** The function can be called only before or after the tokens have been releasesd */\n modifier inReleaseState(bool releaseState) {\n if(releaseState != released) {\n throw;\n }\n _;\n }\n\n /** The function can be called only by a whitelisted release agent. */\n modifier onlyReleaseAgent() {\n if(msg.sender != releaseAgent) {\n throw;\n }\n _;\n }\n\n function transfer(address _to, uint _value) canTransfer(msg.sender) returns (bool success) {\n // Call StandardToken.transfer()\n return super.transfer(_to, _value);\n }\n\n function transferFrom(address _from, address _to, uint _value) canTransfer(_from) returns (bool success) {\n // Call StandardToken.transferForm()\n return super.transferFrom(_from, _to, _value);\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Safe unsigned safe math.\n *\n * https://blog.aragon.one/library-driven-development-in-solidity-2bebcaf88736#.750gwtwli\n *\n * Originally from https://raw.githubusercontent.com/AragonOne/zeppelin-solidity/master/contracts/SafeMathLib.sol\n *\n * Maintained here until merged to mainline zeppelin-solidity.\n *\n */\nlibrary SafeMathLib {\n\n function times(uint a, uint b) returns (uint) {\n uint c = a * b;\n assert(a == 0 || c / a == b);\n return c;\n }\n\n function minus(uint a, uint b) returns (uint) {\n assert(b <= a);\n return a - b;\n }\n\n function plus(uint a, uint b) returns (uint) {\n uint c = a + b;\n assert(c>=a);\n return c;\n }\n\n}\n\n\n\n/**\n * A token that can increase its supply by another contract.\n *\n * This allows uncapped crowdsale by dynamically increasing the supply when money pours in.\n * Only mint agents, contracts whitelisted by owner, can mint new tokens.\n *\n */\ncontract MintableToken is StandardTokenExt {\n\n using SafeMathLib for uint;\n\n bool public mintingFinished = false;\n\n /** List of agents that are allowed to create new tokens */\n mapping (address => bool) public mintAgents;\n\n event MintingAgentChanged(address addr, bool state);\n event Minted(address receiver, uint amount);\n\n /**\n * Create new tokens and allocate them to an address..\n *\n * Only callably by a crowdsale contract (mint agent).\n */\n function mint(address receiver, uint amount) onlyMintAgent canMint public {\n totalSupply_ = totalSupply_.plus(amount);\n balances[receiver] = balances[receiver].plus(amount);\n\n // This will make the mint transaction apper in EtherScan.io\n // We can remove this after there is a standardized minting event\n Transfer(0, receiver, amount);\n }\n\n /**\n * Owner can allow a crowdsale contract to mint new tokens.\n */\n function setMintAgent(address addr, bool state) onlyOwner canMint public {\n mintAgents[addr] = state;\n MintingAgentChanged(addr, state);\n }\n\n modifier onlyMintAgent() {\n // Only crowdsale contracts are allowed to mint new tokens\n if(!mintAgents[msg.sender]) {\n throw;\n }\n _;\n }\n\n /** Make sure we are not done yet. */\n modifier canMint() {\n if(mintingFinished) throw;\n _;\n }\n}\n\n\n\n/**\n * A crowdsaled token.\n *\n * An ERC-20 token designed specifically for crowdsales with investor protection and further development path.\n *\n * - The token transfer() is disabled until the crowdsale is over\n * - The token contract gives an opt-in upgrade path to a new contract\n * - The same token can be part of several crowdsales through approve() mechanism\n * - The token can be capped (supply set in the constructor) or uncapped (crowdsale contract can mint new tokens)\n *\n */\ncontract CrowdsaleToken is ReleasableToken, MintableToken, UpgradeableToken {\n\n /** Name and symbol were updated. */\n event UpdatedTokenInformation(string newName, string newSymbol);\n\n string public name;\n\n string public symbol;\n\n uint public decimals;\n\n /**\n * Construct the token.\n *\n * This token must be created through a team multisig wallet, so that it is owned by that wallet.\n *\n * @param _name Token name\n * @param _symbol Token symbol - should be all caps\n * @param _initialSupply How many tokens we start with\n * @param _decimals Number of decimal places\n * @param _mintable Are new tokens created over the crowdsale or do we distribute only the initial supply? Note that when the token becomes transferable the minting always ends.\n */\n function CrowdsaleToken(string _name, string _symbol, uint _initialSupply, uint _decimals, bool _mintable)\n UpgradeableToken(msg.sender) {\n\n // Create any address, can be transferred\n // to team multisig via changeOwner(),\n // also remember to call setUpgradeMaster()\n owner = msg.sender;\n\n name = _name;\n symbol = _symbol;\n\n totalSupply_ = _initialSupply;\n\n decimals = _decimals;\n\n // Create initially all balance on the team multisig\n balances[owner] = totalSupply_;\n\n if(totalSupply_ > 0) {\n Minted(owner, totalSupply_);\n }\n\n // No more new supply allowed after the token creation\n if(!_mintable) {\n mintingFinished = true;\n if(totalSupply_ == 0) {\n throw; // Cannot create a token without supply and no minting\n }\n }\n }\n\n /**\n * When token is released to be transferable, enforce no new tokens can be created.\n */\n function releaseTokenTransfer() public onlyReleaseAgent {\n mintingFinished = true;\n super.releaseTokenTransfer();\n }\n\n /**\n * Allow upgrade agent functionality kick in only if the crowdsale was success.\n */\n function canUpgrade() public constant returns(bool) {\n return released && super.canUpgrade();\n }\n\n /**\n * Owner can update token information here.\n *\n * It is often useful to conceal the actual token association, until\n * the token operations, like central issuance or reissuance have been completed.\n *\n * This function allows the token owner to rename the token after the operations\n * have been completed and then point the audience to use the token contract.\n */\n function setTokenInformation(string _name, string _symbol) onlyOwner {\n name = _name;\n symbol = _symbol;\n\n UpdatedTokenInformation(name, symbol);\n }\n\n}\n"}, "DefaultFinalizeAgent": {"abi": [{"constant": false, "inputs": [], "name": "finalizeCrowdsale", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "isFinalizeAgent", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isSane", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "crowdsale", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "token", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [{"name": "_token", "type": "address"}, {"name": "_crowdsale", "type": "address"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}], "bytecode": "0x608060405234801561001057600080fd5b5060405160408061034283398101604052805160209091015160008054600160a060020a03938416600160a060020a031991821617909155600180549390921692169190911790556102db806100676000396000f30060806040526004361061006c5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630bf318a38114610071578063614cb9041461008857806382771c8e146100b15780639c1e03a0146100c6578063fc0c546a14610104575b600080fd5b34801561007d57600080fd5b50610086610119565b005b34801561009457600080fd5b5061009d6101be565b604080519115158252519081900360200190f35b3480156100bd57600080fd5b5061009d6101c3565b3480156100d257600080fd5b506100db610277565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561011057600080fd5b506100db610293565b60015473ffffffffffffffffffffffffffffffffffffffff16331461013d57600080fd5b60008054604080517f5f412d4f000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff90921692635f412d4f9260048084019382900301818387803b1580156101a457600080fd5b505af11580156101b8573d6000803e3d6000fd5b50505050565b600190565b60008054604080517fd1f276d30000000000000000000000000000000000000000000000000000000081529051309273ffffffffffffffffffffffffffffffffffffffff169163d1f276d391600480830192602092919082900301818887803b15801561022f57600080fd5b505af1158015610243573d6000803e3d6000fd5b505050506040513d602081101561025957600080fd5b505173ffffffffffffffffffffffffffffffffffffffff1614905090565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff16815600a165627a7a7230582057788df747bff06899cac0c36a190e00b7a9cd0dff59dbaf4badbd0bb1e67e850029", "bytecode_runtime": "0x60806040526004361061006c5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630bf318a38114610071578063614cb9041461008857806382771c8e146100b15780639c1e03a0146100c6578063fc0c546a14610104575b600080fd5b34801561007d57600080fd5b50610086610119565b005b34801561009457600080fd5b5061009d6101be565b604080519115158252519081900360200190f35b3480156100bd57600080fd5b5061009d6101c3565b3480156100d257600080fd5b506100db610277565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561011057600080fd5b506100db610293565b60015473ffffffffffffffffffffffffffffffffffffffff16331461013d57600080fd5b60008054604080517f5f412d4f000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff90921692635f412d4f9260048084019382900301818387803b1580156101a457600080fd5b505af11580156101b8573d6000803e3d6000fd5b50505050565b600190565b60008054604080517fd1f276d30000000000000000000000000000000000000000000000000000000081529051309273ffffffffffffffffffffffffffffffffffffffff169163d1f276d391600480830192602092919082900301818887803b15801561022f57600080fd5b505af1158015610243573d6000803e3d6000fd5b505050506040513d602081101561025957600080fd5b505173ffffffffffffffffffffffffffffffffffffffff1614905090565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff16815600a165627a7a7230582057788df747bff06899cac0c36a190e00b7a9cd0dff59dbaf4badbd0bb1e67e850029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": false, "inputs": [], "name": "finalizeCrowdsale", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "isFinalizeAgent", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isSane", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "crowdsale", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "token", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [{"name": "_token", "type": "address"}, {"name": "_crowdsale", "type": "address"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}], "devdoc": {"methods": {}}, "userdoc": {"methods": {"finalizeCrowdsale()": {"notice": "Called once by crowdsale finalize() if the sale was success. "}, "isSane()": {"notice": "Check that we can release the token "}}}}, "settings": {"compilationTarget": {"contracts/DefaultFinalizeAgent.sol": "DefaultFinalizeAgent"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/Crowdsale.sol": {"keccak256": "0x2697c26528f64bb954a7c2547d3b43317d2d2b02c7d9d05a7b1ab388cd79f65d", "urls": ["bzzr://f28b280794222114141c51dd5c388d403a7c98d8b51e04170a0e294246d5164b"]}, "contracts/CrowdsaleBase.sol": {"keccak256": "0xe2c9ed11183ce705616980df7b02544d72fe18b40395da7d9d4bcb621fb87871", "urls": ["bzzr://07f3887ba0d0eb3248b1ad3581480ed71a2fe70a47dcc283c4e97c8c92e0790a"]}, "contracts/DefaultFinalizeAgent.sol": {"keccak256": "0xbb8b3a1ed6bc82e5638ee652a23a860faaa989897cec37a6114d2d11e74238a0", "urls": ["bzzr://972b62e1346341c37202dd7615e9399095c3b1234b60471b8e502df2d766c9d9"]}, "contracts/FinalizeAgent.sol": {"keccak256": "0x309fd0510e0b3e2b5044e33f7c80cfb2d6f2a5697e41a5f185931d65770cfea9", "urls": ["bzzr://4e7ed6f82c0f542e92e56c12566b2ecd7666730865bf12566c27587ec64160ac"]}, "contracts/FractionalERC20.sol": {"keccak256": "0x75bc4ad90a8b13ce961c89b1bf405776f616e019d3a2720168f8e52be223198f", "urls": ["bzzr://6a3688f12da1a5c890ef06f80f883f6c5370886092d38a1b33cd4219b718478b"]}, "contracts/Haltable.sol": {"keccak256": "0x265dcf25e7c9ab4b6eecd2181f1b71334a1b5381a60f8db7d9526dab120f4b70", "urls": ["bzzr://d522e00fa9e075941469dd81738b59fdb99ce3c12cdc39e33abe40b588c4da9b"]}, "contracts/PricingStrategy.sol": {"keccak256": "0x8df5093b7d07168ad994f9176de0bd2268f6563b1e8a3a448d8cfe7fe246c628", "urls": ["bzzr://ef5c944d51f739ab34e2c951d6ac82a7152e6bb844058a8e57bae52c14cbe16b"]}, "contracts/Recoverable.sol": {"keccak256": "0x311a332cdd87df6e00057f5455f4e68b043b5dbe211f6d68bc64e20817515635", "urls": ["bzzr://4fd99bcfb93baed6e7c8d22ee9ecc5c8346a1aa98288e77b01333b2c5d3f582d"]}, "contracts/ReleasableToken.sol": {"keccak256": "0x2c50180d0c1eab1aa63a04da3ae87ee2c482665d2a1a42c5f05b11234a7edaf4", "urls": ["bzzr://10752c317eba5c42e2848722689cfee4fffb7bcb42f3346e1a20715d843798e8"]}, "contracts/SafeMathLib.sol": {"keccak256": "0x501bfe31e274b9a5591f7c540bdced4d4312e27d4f19599147c9bbca3d9c6b18", "urls": ["bzzr://a80935ebddb06c247d71372d4e5833ee029f08633bd0fe4a274a57009567e5b9"]}, "contracts/StandardTokenExt.sol": {"keccak256": "0x9ea2d4cec4dccd5639c05e6c23dd027d80b5e5a20abd99b280ab7b2631b5a5fc", "urls": ["bzzr://a52d8fc5a21bd83997aff19128e00dceb251df712207b61223894c8b7f42d5ff"]}, "zeppelin/contracts/math/SafeMath.sol": {"keccak256": "0x341ba8cb467a3623e819ba1a683ac1d264005186f308505214e5f6bc89446a08", "urls": ["bzzr://59b5652ee4e4a1b5a8f1a8906e14c84af43d636cf5ca0725cc1813aabe4c8c17"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}, "zeppelin/contracts/token/ERC20/BasicToken.sol": {"keccak256": "0x948404468d61ff35ea4194650670408dabd65da7f905a1c16888ab84520bf39e", "urls": ["bzzr://ea75e20f95d7e4e10394fe6bfaa8eee56b4757c2a6f1e8df4180d33afa621935"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}, "zeppelin/contracts/token/ERC20/StandardToken.sol": {"keccak256": "0xd2b344a5259e19ec143074cfa65637a10c40b68395c59808c4af13bccbb2de55", "urls": ["bzzr://d61a01175a7ca1ba9f4403de603c20b897e33ec425aef2d9f8a7f9ddfdfaf5b2"]}}, "version": 1}, "name": "DefaultFinalizeAgent", "ordered_full_dependencies": [], "source_path": "contracts/DefaultFinalizeAgent.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Safe unsigned safe math.\n *\n * https://blog.aragon.one/library-driven-development-in-solidity-2bebcaf88736#.750gwtwli\n *\n * Originally from https://raw.githubusercontent.com/AragonOne/zeppelin-solidity/master/contracts/SafeMathLib.sol\n *\n * Maintained here until merged to mainline zeppelin-solidity.\n *\n */\nlibrary SafeMathLib {\n\n function times(uint a, uint b) returns (uint) {\n uint c = a * b;\n assert(a == 0 || c / a == b);\n return c;\n }\n\n function minus(uint a, uint b) returns (uint) {\n assert(b <= a);\n return a - b;\n }\n\n function plus(uint a, uint b) returns (uint) {\n uint c = a + b;\n assert(c>=a);\n return c;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Interface for defining crowdsale pricing.\n */\ncontract PricingStrategy {\n\n /** Interface declaration. */\n function isPricingStrategy() public constant returns (bool) {\n return true;\n }\n\n /** Self check if all references are correctly set.\n *\n * Checks that pricing strategy matches crowdsale parameters.\n */\n function isSane(address crowdsale) public constant returns (bool) {\n return true;\n }\n\n /**\n * @dev Pricing tells if this is a presale purchase or not.\n @param purchaser Address of the purchaser\n @return False by default, true if a presale purchaser\n */\n function isPresalePurchase(address purchaser) public constant returns (bool) {\n return false;\n }\n\n /**\n * When somebody tries to buy tokens for X eth, calculate how many tokens they get.\n *\n *\n * @param value - What is the value of the transaction send in as wei\n * @param tokensSold - how much tokens have been sold this far\n * @param weiRaised - how much money has been raised this far in the main token sale - this number excludes presale\n * @param msgSender - who is the investor of this transaction\n * @param decimals - how many decimal units the token has\n * @return Amount of tokens the investor receives\n */\n function calculatePrice(uint value, uint weiRaised, uint tokensSold, address msgSender, uint decimals) public constant returns (uint tokenAmount);\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Finalize agent defines what happens at the end of succeseful crowdsale.\n *\n * - Allocate tokens for founders, bounties and community\n * - Make tokens transferable\n * - etc.\n */\ncontract FinalizeAgent {\n\n function isFinalizeAgent() public constant returns(bool) {\n return true;\n }\n\n /** Return true if we can run finalizeCrowdsale() properly.\n *\n * This is a safety check function that doesn't allow crowdsale to begin\n * unless the finalizer has been set up properly.\n */\n function isSane() public constant returns (bool);\n\n /** Called once by crowdsale finalize() if the sale was success. */\n function finalizeCrowdsale();\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n\n/**\n * A token that defines fractional units as decimals.\n */\ncontract FractionalERC20 is ERC20 {\n\n uint public decimals;\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n/*\n * Haltable\n *\n * Abstract contract that allows children to implement an\n * emergency stop mechanism. Differs from Pausable by causing a throw when in halt mode.\n *\n *\n * Originally envisioned in FirstBlood ICO contract.\n */\ncontract Haltable is Ownable {\n bool public halted;\n\n modifier stopInEmergency {\n if (halted) throw;\n _;\n }\n\n modifier stopNonOwnersInEmergency {\n if (halted && msg.sender != owner) throw;\n _;\n }\n\n modifier onlyInEmergency {\n if (!halted) throw;\n _;\n }\n\n // called by the owner on emergency, triggers stopped state\n function halt() external onlyOwner {\n halted = true;\n }\n\n // called by the owner on end of emergency, returns to normal state\n function unhalt() external onlyOwner onlyInEmergency {\n halted = false;\n }\n\n}\n\n\n\n\n\n\n\n/**\n * Crowdsale state machine without buy functionality.\n *\n * Implements basic state machine logic, but leaves out all buy functions,\n * so that subclasses can implement their own buying logic.\n *\n *\n * For the default buy() implementation see Crowdsale.sol.\n */\ncontract CrowdsaleBase is Haltable {\n\n /* Max investment count when we are still allowed to change the multisig address */\n uint public MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE = 5;\n\n using SafeMathLib for uint;\n\n /* The token we are selling */\n FractionalERC20 public token;\n\n /* How we are going to price our offering */\n PricingStrategy public pricingStrategy;\n\n /* Post-success callback */\n FinalizeAgent public finalizeAgent;\n\n /* tokens will be transfered from this address */\n address public multisigWallet;\n\n /* if the funding goal is not reached, investors may withdraw their funds */\n uint public minimumFundingGoal;\n\n /* the UNIX timestamp start date of the crowdsale */\n uint public startsAt;\n\n /* the UNIX timestamp end date of the crowdsale */\n uint public endsAt;\n\n /* the number of tokens already sold through this contract*/\n uint public tokensSold = 0;\n\n /* How many wei of funding we have raised */\n uint public weiRaised = 0;\n\n /* Calculate incoming funds from presale contracts and addresses */\n uint public presaleWeiRaised = 0;\n\n /* How many distinct addresses have invested */\n uint public investorCount = 0;\n\n /* How much wei we have returned back to the contract after a failed crowdfund. */\n uint public loadedRefund = 0;\n\n /* How much wei we have given back to investors.*/\n uint public weiRefunded = 0;\n\n /* Has this crowdsale been finalized */\n bool public finalized;\n\n /** How much ETH each address has invested to this crowdsale */\n mapping (address => uint256) public investedAmountOf;\n\n /** How much tokens this crowdsale has credited for each investor address */\n mapping (address => uint256) public tokenAmountOf;\n\n /** Addresses that are allowed to invest even before ICO offical opens. For testing, for ICO partners, etc. */\n mapping (address => bool) public earlyParticipantWhitelist;\n\n /** This is for manul testing for the interaction from owner wallet. You can set it to any value and inspect this in blockchain explorer to see that crowdsale interaction works. */\n uint public ownerTestValue;\n\n /** State machine\n *\n * - Preparing: All contract initialization calls and variables have not been set yet\n * - Prefunding: We have not passed start time yet\n * - Funding: Active crowdsale\n * - Success: Minimum funding goal reached\n * - Failure: Minimum funding goal not reached before ending time\n * - Finalized: The finalized has been called and succesfully executed\n * - Refunding: Refunds are loaded on the contract for reclaim.\n */\n enum State{Unknown, Preparing, PreFunding, Funding, Success, Failure, Finalized, Refunding}\n\n // A new investment was made\n event Invested(address investor, uint weiAmount, uint tokenAmount, uint128 customerId);\n\n // Refund was processed for a contributor\n event Refund(address investor, uint weiAmount);\n\n // The rules were changed what kind of investments we accept\n event InvestmentPolicyChanged(bool newRequireCustomerId, bool newRequiredSignedAddress, address newSignerAddress);\n\n // Address early participation whitelist status changed\n event Whitelisted(address addr, bool status);\n\n // Crowdsale end time has been changed\n event EndsAtChanged(uint newEndsAt);\n\n function CrowdsaleBase(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal) {\n\n owner = msg.sender;\n\n token = FractionalERC20(_token);\n setPricingStrategy(_pricingStrategy);\n\n multisigWallet = _multisigWallet;\n if(multisigWallet == 0) {\n throw;\n }\n\n if(_start == 0) {\n throw;\n }\n\n startsAt = _start;\n\n if(_end == 0) {\n throw;\n }\n\n endsAt = _end;\n\n // Don't mess the dates\n if(startsAt >= endsAt) {\n throw;\n }\n\n // Minimum funding goal can be zero\n minimumFundingGoal = _minimumFundingGoal;\n }\n\n /**\n * Don't expect to just send in money and get tokens.\n */\n function() payable {\n throw;\n }\n\n /**\n * @dev Make an investment.\n *\n * Crowdsale must be running for one to invest.\n * We must have not pressed the emergency brake.\n *\n * @param receiver The Ethereum address who receives the tokens\n * @param customerId (optional) UUID v4 to track the successful payments on the server side'\n * @param tokenAmount Amount of tokens which be credited to receiver\n *\n * @return tokensBought How mony tokens were bought\n */\n function buyTokens(address receiver, uint128 customerId, uint256 tokenAmount) stopInEmergency internal returns(uint tokensBought) {\n\n // Determine if it's a good time to accept investment from this participant\n if(getState() == State.PreFunding) {\n // Are we whitelisted for early deposit\n if(!earlyParticipantWhitelist[receiver]) {\n throw;\n }\n } else if(getState() == State.Funding) {\n // Retail participants can only come in when the crowdsale is running\n // pass\n } else {\n // Unwanted state\n throw;\n }\n\n uint weiAmount = msg.value;\n\n // Dust transaction\n require(tokenAmount != 0);\n\n if(investedAmountOf[receiver] == 0) {\n // A new investor\n investorCount++;\n }\n\n // Update investor\n investedAmountOf[receiver] = investedAmountOf[receiver].plus(weiAmount);\n tokenAmountOf[receiver] = tokenAmountOf[receiver].plus(tokenAmount);\n\n // Update totals\n weiRaised = weiRaised.plus(weiAmount);\n tokensSold = tokensSold.plus(tokenAmount);\n\n if(pricingStrategy.isPresalePurchase(receiver)) {\n presaleWeiRaised = presaleWeiRaised.plus(weiAmount);\n }\n\n // Check that we did not bust the cap\n require(!isBreakingCap(weiAmount, tokenAmount, weiRaised, tokensSold));\n\n assignTokens(receiver, tokenAmount);\n\n // Pocket the money, or fail the crowdsale if we for some reason cannot send the money to our multisig\n if(!multisigWallet.send(weiAmount)) throw;\n\n // Tell us invest was success\n Invested(receiver, weiAmount, tokenAmount, customerId);\n\n return tokenAmount;\n }\n\n /**\n * @dev Make an investment based on pricing strategy\n *\n * This is a wrapper for buyTokens(), but the amount of tokens receiver will\n * have depends on the pricing strategy used.\n *\n * @param receiver The Ethereum address who receives the tokens\n * @param customerId (optional) UUID v4 to track the successful payments on the server side'\n *\n * @return tokensBought How mony tokens were bought\n */\n function investInternal(address receiver, uint128 customerId) stopInEmergency internal returns(uint tokensBought) {\n return buyTokens(receiver, customerId, pricingStrategy.calculatePrice(msg.value, weiRaised - presaleWeiRaised, tokensSold, msg.sender, token.decimals()));\n }\n\n /**\n * @dev Calculate tokens user will have for their purchase\n *\n * @param weisTotal How much ethers (in wei) the user putssssss in\n * @param pricePerToken What is the price for one token\n *\n * @return tokensTotal which is received tokens, token decimals included\n */\n function calculateTokens(uint256 weisTotal, uint256 pricePerToken) public constant returns(uint tokensTotal) {\n // pricePerToken is how many full tokens, token decimal place included, you get for wei amount.\n // Because, in theory, decimal amount can vary, we do the exponent calculation here,\n // though gas wise using 10**18 constant would be much simpler.\n // Furthermore we could use rough amounts and take in raw wei per tokens amount,\n // but we lose too much accuracy for generic calculations, thus all these are\n // practically implemented as 10**18 fixed points.\n uint multiplier = 10 ** token.decimals();\n return weisTotal.times(multiplier)/pricePerToken;\n }\n\n /**\n * Finalize a succcesful crowdsale.\n *\n * The owner can triggre a call the contract that provides post-crowdsale actions, like releasing the tokens.\n */\n function finalize() public inState(State.Success) onlyOwner stopInEmergency {\n\n // Already finalized\n if(finalized) {\n throw;\n }\n\n // Finalizing is optional. We only call it if we are given a finalizing agent.\n if(address(finalizeAgent) != 0) {\n finalizeAgent.finalizeCrowdsale();\n }\n\n finalized = true;\n }\n\n /**\n * Allow to (re)set finalize agent.\n *\n * Design choice: no state restrictions on setting this, so that we can fix fat finger mistakes.\n */\n function setFinalizeAgent(FinalizeAgent addr) onlyOwner {\n finalizeAgent = addr;\n\n // Don't allow setting bad agent\n if(!finalizeAgent.isFinalizeAgent()) {\n throw;\n }\n }\n\n /**\n * Allow crowdsale owner to close early or extend the crowdsale.\n *\n * This is useful e.g. for a manual soft cap implementation:\n * - after X amount is reached determine manual closing\n *\n * This may put the crowdsale to an invalid state,\n * but we trust owners know what they are doing.\n *\n */\n function setEndsAt(uint time) onlyOwner {\n\n if(now > time) {\n throw; // Don't change past\n }\n\n if(startsAt > time) {\n throw; // Prevent human mistakes\n }\n\n endsAt = time;\n EndsAtChanged(endsAt);\n }\n\n /**\n * Allow to (re)set pricing strategy.\n *\n * Design choice: no state restrictions on the set, so that we can fix fat finger mistakes.\n */\n function setPricingStrategy(PricingStrategy _pricingStrategy) onlyOwner {\n pricingStrategy = _pricingStrategy;\n\n // Don't allow setting bad agent\n if(!pricingStrategy.isPricingStrategy()) {\n throw;\n }\n }\n\n /**\n * Allow to change the team multisig address in the case of emergency.\n *\n * This allows to save a deployed crowdsale wallet in the case the crowdsale has not yet begun\n * (we have done only few test transactions). After the crowdsale is going\n * then multisig address stays locked for the safety reasons.\n */\n function setMultisig(address addr) public onlyOwner {\n\n // Change\n if(investorCount > MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE) {\n throw;\n }\n\n multisigWallet = addr;\n }\n\n /**\n * Allow load refunds back on the contract for the refunding.\n *\n * The team can transfer the funds back on the smart contract in the case the minimum goal was not reached..\n */\n function loadRefund() public payable inState(State.Failure) {\n if(msg.value == 0) throw;\n loadedRefund = loadedRefund.plus(msg.value);\n }\n\n /**\n * Investors can claim refund.\n *\n * Note that any refunds from proxy buyers should be handled separately,\n * and not through this contract.\n */\n function refund() public inState(State.Refunding) {\n uint256 weiValue = investedAmountOf[msg.sender];\n if (weiValue == 0) throw;\n investedAmountOf[msg.sender] = 0;\n weiRefunded = weiRefunded.plus(weiValue);\n Refund(msg.sender, weiValue);\n if (!msg.sender.send(weiValue)) throw;\n }\n\n /**\n * @return true if the crowdsale has raised enough money to be a successful.\n */\n function isMinimumGoalReached() public constant returns (bool reached) {\n return weiRaised >= minimumFundingGoal;\n }\n\n /**\n * Check if the contract relationship looks good.\n */\n function isFinalizerSane() public constant returns (bool sane) {\n return finalizeAgent.isSane();\n }\n\n /**\n * Check if the contract relationship looks good.\n */\n function isPricingSane() public constant returns (bool sane) {\n return pricingStrategy.isSane(address(this));\n }\n\n /**\n * Crowdfund state machine management.\n *\n * We make it a function and do not assign the result to a variable, so there is no chance of the variable being stale.\n */\n function getState() public constant returns (State) {\n if(finalized) return State.Finalized;\n else if (address(finalizeAgent) == 0) return State.Preparing;\n else if (!finalizeAgent.isSane()) return State.Preparing;\n else if (!pricingStrategy.isSane(address(this))) return State.Preparing;\n else if (block.timestamp < startsAt) return State.PreFunding;\n else if (block.timestamp <= endsAt && !isCrowdsaleFull()) return State.Funding;\n else if (isMinimumGoalReached()) return State.Success;\n else if (!isMinimumGoalReached() && weiRaised > 0 && loadedRefund >= weiRaised) return State.Refunding;\n else return State.Failure;\n }\n\n /** This is for manual testing of multisig wallet interaction */\n function setOwnerTestValue(uint val) onlyOwner {\n ownerTestValue = val;\n }\n\n /**\n * Allow addresses to do early participation.\n *\n * TODO: Fix spelling error in the name\n */\n function setEarlyParicipantWhitelist(address addr, bool status) onlyOwner {\n earlyParticipantWhitelist[addr] = status;\n Whitelisted(addr, status);\n }\n\n\n /** Interface marker. */\n function isCrowdsale() public constant returns (bool) {\n return true;\n }\n\n //\n // Modifiers\n //\n\n /** Modified allowing execution only if the crowdsale is currently running. */\n modifier inState(State state) {\n if(getState() != state) throw;\n _;\n }\n\n\n //\n // Abstract functions\n //\n\n /**\n * Check if the current invested breaks our cap rules.\n *\n *\n * The child contract must define their own cap setting rules.\n * We allow a lot of flexibility through different capping strategies (ETH, token count)\n * Called from invest().\n *\n * @param weiAmount The amount of wei the investor tries to invest in the current transaction\n * @param tokenAmount The amount of tokens we try to give to the investor in the current transaction\n * @param weiRaisedTotal What would be our total raised balance after this transaction\n * @param tokensSoldTotal What would be our total sold tokens count after this transaction\n *\n * @return true if taking this investment would break our cap rules\n */\n function isBreakingCap(uint weiAmount, uint tokenAmount, uint weiRaisedTotal, uint tokensSoldTotal) constant returns (bool limitBroken);\n\n /**\n * Check if the current crowdsale is full and we can no longer sell any tokens.\n */\n function isCrowdsaleFull() public constant returns (bool);\n\n /**\n * Create new tokens or transfer issued tokens to the investor depending on the cap model.\n */\n function assignTokens(address receiver, uint tokenAmount) internal;\n}\n\n\n\n/**\n * Abstract base contract for token sales with the default buy entry points.\n *\n * Handle\n * - start and end dates\n * - accepting investments\n * - minimum funding goal and refund\n * - various statistics during the crowdfund\n * - different pricing strategies\n * - different investment policies (require server side customer id, allow only whitelisted addresses)\n *\n * Does not Handle\n *\n * - Token allocation (minting vs. transfer)\n * - Cap rules\n *\n */\ncontract Crowdsale is CrowdsaleBase {\n\n /* Do we need to have unique contributor id for each customer */\n bool public requireCustomerId;\n\n /**\n * Do we verify that contributor has been cleared on the server side (accredited investors only).\n * This method was first used in FirstBlood crowdsale to ensure all contributors have accepted terms on sale (on the web).\n */\n bool public requiredSignedAddress;\n\n /* Server side address that signed allowed contributors (Ethereum addresses) that can participate the crowdsale */\n address public signerAddress;\n\n function Crowdsale(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal) CrowdsaleBase(_token, _pricingStrategy, _multisigWallet, _start, _end, _minimumFundingGoal) {\n }\n\n /**\n * Preallocate tokens for the early investors.\n *\n * Preallocated tokens have been sold before the actual crowdsale opens.\n * This function mints the tokens and moves the crowdsale needle.\n *\n * Investor count is not handled; it is assumed this goes for multiple investors\n * and the token distribution happens outside the smart contract flow.\n *\n * No money is exchanged, as the crowdsale team already have received the payment.\n *\n * @param fullTokens tokens as full tokens - decimal places added internally\n * @param weiPrice Price of a single full token in wei\n *\n */\n function preallocate(address receiver, uint fullTokens, uint weiPrice) public onlyOwner {\n\n uint tokenAmount = fullTokens * 10**token.decimals();\n uint weiAmount = weiPrice * fullTokens; // This can be also 0, we give out tokens for free\n\n weiRaised = weiRaised.plus(weiAmount);\n tokensSold = tokensSold.plus(tokenAmount);\n\n investedAmountOf[receiver] = investedAmountOf[receiver].plus(weiAmount);\n tokenAmountOf[receiver] = tokenAmountOf[receiver].plus(tokenAmount);\n\n assignTokens(receiver, tokenAmount);\n\n // Tell us invest was success\n Invested(receiver, weiAmount, tokenAmount, 0);\n }\n\n /**\n * Allow anonymous contributions to this crowdsale.\n */\n function investWithSignedAddress(address addr, uint128 customerId, uint8 v, bytes32 r, bytes32 s) public payable {\n bytes32 hash = sha256(addr);\n if (ecrecover(hash, v, r, s) != signerAddress) throw;\n if(customerId == 0) throw; // UUIDv4 sanity check\n investInternal(addr, customerId);\n }\n\n /**\n * Track who is the customer making the payment so we can send thank you email.\n */\n function investWithCustomerId(address addr, uint128 customerId) public payable {\n if(requiredSignedAddress) throw; // Crowdsale allows only server-side signed participants\n if(customerId == 0) throw; // UUIDv4 sanity check\n investInternal(addr, customerId);\n }\n\n /**\n * Allow anonymous contributions to this crowdsale.\n */\n function invest(address addr) public payable {\n if(requireCustomerId) throw; // Crowdsale needs to track participants for thank you email\n if(requiredSignedAddress) throw; // Crowdsale allows only server-side signed participants\n investInternal(addr, 0);\n }\n\n /**\n * Invest to tokens, recognize the payer and clear his address.\n *\n */\n function buyWithSignedAddress(uint128 customerId, uint8 v, bytes32 r, bytes32 s) public payable {\n investWithSignedAddress(msg.sender, customerId, v, r, s);\n }\n\n /**\n * Invest to tokens, recognize the payer.\n *\n */\n function buyWithCustomerIdWithChecksum(uint128 customerId, bytes1 checksum) public payable {\n // see customerid.py\n if (bytes1(sha3(customerId)) != checksum) throw;\n investWithCustomerId(msg.sender, customerId);\n }\n\n /**\n * Legacy API signature.\n */\n function buyWithCustomerId(uint128 customerId) public payable {\n investWithCustomerId(msg.sender, customerId);\n }\n\n /**\n * The basic entry point to participate the crowdsale process.\n *\n * Pay for funding, get invested tokens back in the sender address.\n */\n function buy() public payable {\n invest(msg.sender);\n }\n\n /**\n * Set policy do we need to have server-side customer ids for the investments.\n *\n */\n function setRequireCustomerId(bool value) onlyOwner {\n requireCustomerId = value;\n InvestmentPolicyChanged(requireCustomerId, requiredSignedAddress, signerAddress);\n }\n\n /**\n * Set policy if all investors must be cleared on the server side first.\n *\n * This is e.g. for the accredited investor clearing.\n *\n */\n function setRequireSignedAddress(bool value, address _signerAddress) onlyOwner {\n requiredSignedAddress = value;\n signerAddress = _signerAddress;\n InvestmentPolicyChanged(requireCustomerId, requiredSignedAddress, signerAddress);\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n assert(c / a == b);\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n\n\n\n/**\n * @title Basic token\n * @dev Basic version of StandardToken, with no allowances.\n */\ncontract BasicToken is ERC20Basic {\n using SafeMath for uint256;\n\n mapping(address => uint256) balances;\n\n uint256 totalSupply_;\n\n /**\n * @dev total number of tokens in existence\n */\n function totalSupply() public view returns (uint256) {\n return totalSupply_;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param _to The address to transfer to.\n * @param _value The amount to be transferred.\n */\n function transfer(address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[msg.sender]);\n\n // SafeMath.sub will throw if there is not enough balance.\n balances[msg.sender] = balances[msg.sender].sub(_value);\n balances[_to] = balances[_to].add(_value);\n Transfer(msg.sender, _to, _value);\n return true;\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param _owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address _owner) public view returns (uint256 balance) {\n return balances[_owner];\n }\n\n}\n\n\n\n\n/**\n * @title Standard ERC20 token\n *\n * @dev Implementation of the basic standard token.\n * @dev https://github.com/ethereum/EIPs/issues/20\n * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol\n */\ncontract StandardToken is ERC20, BasicToken {\n\n mapping (address => mapping (address => uint256)) internal allowed;\n\n\n /**\n * @dev Transfer tokens from one address to another\n * @param _from address The address which you want to send tokens from\n * @param _to address The address which you want to transfer to\n * @param _value uint256 the amount of tokens to be transferred\n */\n function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[_from]);\n require(_value <= allowed[_from][msg.sender]);\n\n balances[_from] = balances[_from].sub(_value);\n balances[_to] = balances[_to].add(_value);\n allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);\n Transfer(_from, _to, _value);\n return true;\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n *\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param _spender The address which will spend the funds.\n * @param _value The amount of tokens to be spent.\n */\n function approve(address _spender, uint256 _value) public returns (bool) {\n allowed[msg.sender][_spender] = _value;\n Approval(msg.sender, _spender, _value);\n return true;\n }\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param _owner address The address which owns the funds.\n * @param _spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address _owner, address _spender) public view returns (uint256) {\n return allowed[_owner][_spender];\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(address _spender, uint _addedValue) public returns (bool) {\n allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {\n uint oldValue = allowed[msg.sender][_spender];\n if (_subtractedValue > oldValue) {\n allowed[msg.sender][_spender] = 0;\n } else {\n allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);\n }\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\ncontract Recoverable is Ownable {\n\n /// @dev Empty constructor (for now)\n function Recoverable() {\n }\n\n /// @dev This will be invoked by the owner, when owner wants to rescue tokens\n /// @param token Token which will we rescue to the owner from the contract\n function recoverTokens(ERC20Basic token) onlyOwner public {\n token.transfer(owner, tokensToBeReturned(token));\n }\n\n /// @dev Interface function, can be overwritten by the superclass\n /// @param token Token which balance we will check and return\n /// @return The amount of tokens (in smallest denominator) the contract owns\n function tokensToBeReturned(ERC20Basic token) public returns (uint) {\n return token.balanceOf(this);\n }\n}\n\n\n\n/**\n * Standard EIP-20 token with an interface marker.\n *\n * @notice Interface marker is used by crowdsale contracts to validate that addresses point a good token contract.\n *\n */\ncontract StandardTokenExt is StandardToken, Recoverable {\n\n /* Interface declaration */\n function isToken() public constant returns (bool weAre) {\n return true;\n }\n}\n\n\n\n/**\n * Define interface for releasing the token transfer after a successful crowdsale.\n */\ncontract ReleasableToken is StandardTokenExt {\n\n /* The finalizer contract that allows unlift the transfer limits on this token */\n address public releaseAgent;\n\n /** A crowdsale contract can release us to the wild if ICO success. If false we are are in transfer lock up period.*/\n bool public released = false;\n\n /** Map of agents that are allowed to transfer tokens regardless of the lock down period. These are crowdsale contracts and possible the team multisig itself. */\n mapping (address => bool) public transferAgents;\n\n /**\n * Limit token transfer until the crowdsale is over.\n *\n */\n modifier canTransfer(address _sender) {\n\n if(!released) {\n if(!transferAgents[_sender]) {\n throw;\n }\n }\n\n _;\n }\n\n /**\n * Set the contract that can call release and make the token transferable.\n *\n * Design choice. Allow reset the release agent to fix fat finger mistakes.\n */\n function setReleaseAgent(address addr) onlyOwner inReleaseState(false) public {\n\n // We don't do interface check here as we might want to a normal wallet address to act as a release agent\n releaseAgent = addr;\n }\n\n /**\n * Owner can allow a particular address (a crowdsale contract) to transfer tokens despite the lock up period.\n */\n function setTransferAgent(address addr, bool state) onlyOwner inReleaseState(false) public {\n transferAgents[addr] = state;\n }\n\n /**\n * One way function to release the tokens to the wild.\n *\n * Can be called only from the release agent that is the final ICO contract. It is only called if the crowdsale has been success (first milestone reached).\n */\n function releaseTokenTransfer() public onlyReleaseAgent {\n released = true;\n }\n\n /** The function can be called only before or after the tokens have been releasesd */\n modifier inReleaseState(bool releaseState) {\n if(releaseState != released) {\n throw;\n }\n _;\n }\n\n /** The function can be called only by a whitelisted release agent. */\n modifier onlyReleaseAgent() {\n if(msg.sender != releaseAgent) {\n throw;\n }\n _;\n }\n\n function transfer(address _to, uint _value) canTransfer(msg.sender) returns (bool success) {\n // Call StandardToken.transfer()\n return super.transfer(_to, _value);\n }\n\n function transferFrom(address _from, address _to, uint _value) canTransfer(_from) returns (bool success) {\n // Call StandardToken.transferForm()\n return super.transferFrom(_from, _to, _value);\n }\n\n}\n\n\n/**\n * The default behavior for the crowdsale end.\n *\n * Unlock tokens.\n */\ncontract DefaultFinalizeAgent is FinalizeAgent {\n\n ReleasableToken public token;\n Crowdsale public crowdsale;\n\n function DefaultFinalizeAgent(ReleasableToken _token, Crowdsale _crowdsale) {\n token = _token;\n crowdsale = _crowdsale;\n }\n\n /** Check that we can release the token */\n function isSane() public constant returns (bool) {\n return (token.releaseAgent() == address(this));\n }\n\n /** Called once by crowdsale finalize() if the sale was success. */\n function finalizeCrowdsale() public {\n if(msg.sender != address(crowdsale)) {\n throw;\n }\n token.releaseTokenTransfer();\n }\n\n}\n"}, "ERC20": {"abi": [{"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "approve", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "from", "type": "address"}, {"name": "to", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "who", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "to", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "owner", "type": "address"}, {"name": "spender", "type": "address"}], "name": "allowance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}, {"indexed": true, "name": "spender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "bytecode": "0x", "bytecode_runtime": "0x", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": null, "name": "ERC20", "ordered_full_dependencies": [], "source_path": "zeppelin/contracts/token/ERC20/ERC20.sol"}, "ERC20Basic": {"abi": [{"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "who", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "to", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "bytecode": "0x", "bytecode_runtime": "0x", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": null, "name": "ERC20Basic", "ordered_full_dependencies": [], "source_path": "zeppelin/contracts/token/ERC20/ERC20Basic.sol"}, "ERC677": {"abi": [{"constant": false, "inputs": [{"name": "receiver", "type": "address"}, {"name": "amount", "type": "uint256"}, {"name": "data", "type": "bytes"}], "name": "transferAndCall", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "from", "type": "address"}, {"indexed": false, "name": "receiver", "type": "address"}, {"indexed": false, "name": "amount", "type": "uint256"}, {"indexed": false, "name": "data", "type": "bytes"}], "name": "ERC677Transfer", "type": "event"}], "bytecode": "0x", "bytecode_runtime": "0x", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": null, "name": "ERC677", "ordered_full_dependencies": [], "source_path": "contracts/security-token/ERC677.sol"}, "ERC677Receiver": {"abi": [{"constant": false, "inputs": [{"name": "from", "type": "address"}, {"name": "amount", "type": "uint256"}, {"name": "data", "type": "bytes"}], "name": "tokenFallback", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}], "bytecode": "0x", "bytecode_runtime": "0x", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": null, "name": "ERC677Receiver", "ordered_full_dependencies": [], "source_path": "contracts/security-token/ERC677.sol"}, "ERC677Token": {"abi": [{"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "approve", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "from", "type": "address"}, {"name": "to", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "receiver", "type": "address"}, {"name": "amount", "type": "uint256"}, {"name": "data", "type": "bytes"}], "name": "transferAndCall", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "who", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "to", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "owner", "type": "address"}, {"name": "spender", "type": "address"}], "name": "allowance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "from", "type": "address"}, {"indexed": false, "name": "receiver", "type": "address"}, {"indexed": false, "name": "amount", "type": "uint256"}, {"indexed": false, "name": "data", "type": "bytes"}], "name": "ERC677Transfer", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}, {"indexed": true, "name": "spender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "bytecode": "0x", "bytecode_runtime": "0x", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": null, "name": "ERC677Token", "ordered_full_dependencies": [], "source_path": "contracts/security-token/ERC677Token.sol"}, "ERC865": {"abi": [{"constant": true, "inputs": [], "name": "name", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "approve", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_signature", "type": "bytes"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}, {"name": "_fee", "type": "uint256"}, {"name": "_nonce", "type": "uint256"}], "name": "transferPreSigned", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_token", "type": "address"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}, {"name": "_fee", "type": "uint256"}, {"name": "_nonce", "type": "uint256"}], "name": "transferPreSignedHashing", "outputs": [{"name": "", "type": "bytes32"}], "payable": false, "stateMutability": "pure", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "addedValue", "type": "uint256"}, {"name": "data", "type": "bytes"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "tokenCount", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "hash", "type": "bytes32"}, {"name": "sig", "type": "bytes"}], "name": "recover", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "pure", "type": "function"}, {"constant": false, "inputs": [{"name": "from", "type": "address"}, {"name": "to", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "decimals", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "owner", "type": "address"}, {"name": "blockNumber", "type": "uint256"}], "name": "balanceAt", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "receiver", "type": "address"}, {"name": "amount", "type": "uint256"}, {"name": "data", "type": "bytes"}], "name": "transferAndCall", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}, {"name": "", "type": "uint256"}], "name": "tokenBalances", "outputs": [{"name": "blockNumber", "type": "uint256"}, {"name": "value", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "uint256"}], "name": "tokensTotal", "outputs": [{"name": "blockNumber", "type": "uint256"}, {"name": "value", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}, {"name": "", "type": "address"}], "name": "allowed", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "subtractedValue", "type": "uint256"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "owner", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "subtractedValue", "type": "uint256"}, {"name": "data", "type": "bytes"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "transferVerifier", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "symbol", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "blockNumber", "type": "uint256"}], "name": "totalSupplyAt", "outputs": [{"name": "tokenCount", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "to", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "addedValue", "type": "uint256"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "owner", "type": "address"}, {"name": "spender", "type": "address"}], "name": "allowance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": true, "name": "delegate", "type": "address"}, {"indexed": false, "name": "amount", "type": "uint256"}, {"indexed": false, "name": "fee", "type": "uint256"}], "name": "TransferPreSigned", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "from", "type": "address"}, {"indexed": false, "name": "hash", "type": "bytes32"}], "name": "Debug", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "from", "type": "address"}, {"indexed": false, "name": "receiver", "type": "address"}, {"indexed": false, "name": "amount", "type": "uint256"}, {"indexed": false, "name": "data", "type": "bytes"}], "name": "ERC677Transfer", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}, {"indexed": true, "name": "spender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "bytecode": "0x", "bytecode_runtime": "0x", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": null, "name": "ERC865", "ordered_full_dependencies": [], "source_path": "contracts/security-token/ERC865.sol"}, "EthTranchePricing": {"abi": [{"constant": true, "inputs": [], "name": "isPricingStrategy", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "value", "type": "uint256"}, {"name": "weiRaised", "type": "uint256"}, {"name": "tokensSold", "type": "uint256"}, {"name": "msgSender", "type": "address"}, {"name": "decimals", "type": "uint256"}], "name": "calculatePrice", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "uint256"}], "name": "tranches", "outputs": [{"name": "amount", "type": "uint256"}, {"name": "price", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getPricingStartsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "trancheCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getPricingEndsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "MAX_TRANCHES", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "_crowdsale", "type": "address"}], "name": "isSane", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "weiRaised", "type": "uint256"}], "name": "getCurrentPrice", "outputs": [{"name": "result", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "n", "type": "uint256"}], "name": "getTranche", "outputs": [{"name": "", "type": "uint256"}, {"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "preicoAddress", "type": "address"}, {"name": "pricePerToken", "type": "uint256"}], "name": "setPreicoAddress", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "purchaser", "type": "address"}], "name": "isPresalePurchase", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "preicoAddresses", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [{"name": "_tranches", "type": "uint256[]"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"payable": true, "stateMutability": "payable", "type": "fallback"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "bytecode": "0x608060405234801561001057600080fd5b506040516108c03803806108c083398101604052805160008054600160a060020a03191633178155910180519091908190600290066001148061005557508251601411155b1561005f57600080fd5b50508051600290046016556000805b82516002900481101561012c57828160020281518110151561008c57fe5b60209081029091010151600282600a81106100a357fe5b600202016000018190555082816002026001018151811015156100c257fe5b60209081029091010151600282600a81106100d957fe5b600202016001018190555081600014158015610106575081600282600a81106100fe57fe5b600202015411155b1561011057600080fd5b600281600a811061011d57fe5b6002020154915060010161006e565b6002541561013957600080fd5b60165460029060001901600a811061014d57fe5b6002020160010154600014151561016357600080fd5b50505061074b806101756000396000f3006080604052600436106100da5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166304bbc25581146100df57806318a4155e1461010857806326c25962146101475780632c9a0a951461017857806359eb82241461018d5780636f079f90146101a257806389506a44146101b75780638da5cb5b146101cc5780638e768288146101fd578063c55d0f561461021e578063d972e8ad14610236578063e474f97a1461024e578063f14ae17d14610274578063f1ef9a0814610295578063f2fde38b146102b6575b600080fd5b3480156100eb57600080fd5b506100f46102d7565b604080519115158252519081900360200190f35b34801561011457600080fd5b50610135600435602435604435600160a060020a03606435166084356102dc565b60408051918252519081900360200190f35b34801561015357600080fd5b5061015f600435610490565b6040805192835260208301919091528051918290030190f35b34801561018457600080fd5b506101356104af565b34801561019957600080fd5b506101356104bf565b3480156101ae57600080fd5b506101356104c5565b3480156101c357600080fd5b506101356104cf565b3480156101d857600080fd5b506101e16104d4565b60408051600160a060020a039092168252519081900360200190f35b34801561020957600080fd5b506100f4600160a060020a03600435166104e3565b34801561022a57600080fd5b506101356004356104eb565b34801561024257600080fd5b5061015f600435610500565b34801561025a57600080fd5b50610272600160a060020a0360043516602435610538565b005b34801561028057600080fd5b506100f4600160a060020a036004351661056b565b3480156102a157600080fd5b50610135600160a060020a036004351661059b565b3480156102c257600080fd5b50610272600160a060020a03600435166105ad565b600190565b600160a060020a038216600090815260016020526040812054600a83900a9082908110156103cb57600160a060020a0385166000908152600160209081526040918290205482517f1d3b9edf000000000000000000000000000000000000000000000000000000008152600481018c9052602481018690529251909273__contracts/SafeMathLib.sol:SafeMathLi__92631d3b9edf92604480840193829003018186803b15801561038e57600080fd5b505af41580156103a2573d6000803e3d6000fd5b505050506040513d60208110156103b857600080fd5b50518115156103c357fe5b049250610485565b6103d4876104eb565b9050808873__contracts/SafeMathLib.sol:SafeMathLi__631d3b9edf9091856040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b15801561044c57600080fd5b505af4158015610460573d6000803e3d6000fd5b505050506040513d602081101561047657600080fd5b505181151561048157fe5b0492505b505095945050505050565b600281600a811061049d57fe5b60020201805460019091015490915082565b60006104b9610641565b51905090565b60165481565b60006104b9610676565b600a81565b600054600160a060020a031681565b60015b919050565b60006104f682610692565b6020015192915050565b600080600283600a811061051057fe5b6002020160000154600284600a8110151561052757fe5b600202016001015491509150915091565b600054600160a060020a0316331461054f57600080fd5b600160a060020a03909116600090815260016020526040902055565b600160a060020a038116600090815260016020526040812054811015610593575060016104e6565b5060006104e6565b60016020526000908152604090205481565b600054600160a060020a031633146105c457600080fd5b600160a060020a03811615156105d957600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b610649610708565b600260005b6002020160408051908101604052908160008201548152602001600182015481525050905090565b61067e610708565b60165460029060001901600a811061064e57fe5b61069a610708565b60005b600a81101561070257600281600a81106106b357fe5b60020201548310156106fa5760026000198201600a81106106d057fe5b60020201604080519081016040529081600082015481526020016001820154815250509150610702565b60010161069d565b50919050565b6040805180820190915260008082526020820152905600a165627a7a72305820d3be910c39d6128b0180ba58805623edb67f956e17910b4d1ff2f192207d6ec70029", "bytecode_runtime": "0x6080604052600436106100da5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166304bbc25581146100df57806318a4155e1461010857806326c25962146101475780632c9a0a951461017857806359eb82241461018d5780636f079f90146101a257806389506a44146101b75780638da5cb5b146101cc5780638e768288146101fd578063c55d0f561461021e578063d972e8ad14610236578063e474f97a1461024e578063f14ae17d14610274578063f1ef9a0814610295578063f2fde38b146102b6575b600080fd5b3480156100eb57600080fd5b506100f46102d7565b604080519115158252519081900360200190f35b34801561011457600080fd5b50610135600435602435604435600160a060020a03606435166084356102dc565b60408051918252519081900360200190f35b34801561015357600080fd5b5061015f600435610490565b6040805192835260208301919091528051918290030190f35b34801561018457600080fd5b506101356104af565b34801561019957600080fd5b506101356104bf565b3480156101ae57600080fd5b506101356104c5565b3480156101c357600080fd5b506101356104cf565b3480156101d857600080fd5b506101e16104d4565b60408051600160a060020a039092168252519081900360200190f35b34801561020957600080fd5b506100f4600160a060020a03600435166104e3565b34801561022a57600080fd5b506101356004356104eb565b34801561024257600080fd5b5061015f600435610500565b34801561025a57600080fd5b50610272600160a060020a0360043516602435610538565b005b34801561028057600080fd5b506100f4600160a060020a036004351661056b565b3480156102a157600080fd5b50610135600160a060020a036004351661059b565b3480156102c257600080fd5b50610272600160a060020a03600435166105ad565b600190565b600160a060020a038216600090815260016020526040812054600a83900a9082908110156103cb57600160a060020a0385166000908152600160209081526040918290205482517f1d3b9edf000000000000000000000000000000000000000000000000000000008152600481018c9052602481018690529251909273__contracts/SafeMathLib.sol:SafeMathLi__92631d3b9edf92604480840193829003018186803b15801561038e57600080fd5b505af41580156103a2573d6000803e3d6000fd5b505050506040513d60208110156103b857600080fd5b50518115156103c357fe5b049250610485565b6103d4876104eb565b9050808873__contracts/SafeMathLib.sol:SafeMathLi__631d3b9edf9091856040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b15801561044c57600080fd5b505af4158015610460573d6000803e3d6000fd5b505050506040513d602081101561047657600080fd5b505181151561048157fe5b0492505b505095945050505050565b600281600a811061049d57fe5b60020201805460019091015490915082565b60006104b9610641565b51905090565b60165481565b60006104b9610676565b600a81565b600054600160a060020a031681565b60015b919050565b60006104f682610692565b6020015192915050565b600080600283600a811061051057fe5b6002020160000154600284600a8110151561052757fe5b600202016001015491509150915091565b600054600160a060020a0316331461054f57600080fd5b600160a060020a03909116600090815260016020526040902055565b600160a060020a038116600090815260016020526040812054811015610593575060016104e6565b5060006104e6565b60016020526000908152604090205481565b600054600160a060020a031633146105c457600080fd5b600160a060020a03811615156105d957600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b610649610708565b600260005b6002020160408051908101604052908160008201548152602001600182015481525050905090565b61067e610708565b60165460029060001901600a811061064e57fe5b61069a610708565b60005b600a81101561070257600281600a81106106b357fe5b60020201548310156106fa5760026000198201600a81106106d057fe5b60020201604080519081016040529081600082015481526020016001820154815250509150610702565b60010161069d565b50919050565b6040805180820190915260008082526020820152905600a165627a7a72305820d3be910c39d6128b0180ba58805623edb67f956e17910b4d1ff2f192207d6ec70029", "direct_dependencies": ["SafeMathLib"], "full_dependencies": ["SafeMathLib"], "linkrefs": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 2462}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 2718}], "linkrefs_runtime": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 1716}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 1972}], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": true, "inputs": [], "name": "isPricingStrategy", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "value", "type": "uint256"}, {"name": "weiRaised", "type": "uint256"}, {"name": "tokensSold", "type": "uint256"}, {"name": "msgSender", "type": "address"}, {"name": "decimals", "type": "uint256"}], "name": "calculatePrice", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "uint256"}], "name": "tranches", "outputs": [{"name": "amount", "type": "uint256"}, {"name": "price", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getPricingStartsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "trancheCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getPricingEndsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "MAX_TRANCHES", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "_crowdsale", "type": "address"}], "name": "isSane", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "weiRaised", "type": "uint256"}], "name": "getCurrentPrice", "outputs": [{"name": "result", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "n", "type": "uint256"}], "name": "getTranche", "outputs": [{"name": "", "type": "uint256"}, {"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "preicoAddress", "type": "address"}, {"name": "pricePerToken", "type": "uint256"}], "name": "setPreicoAddress", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "purchaser", "type": "address"}], "name": "isPresalePurchase", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "preicoAddresses", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [{"name": "_tranches", "type": "uint256[]"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"payable": true, "stateMutability": "payable", "type": "fallback"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "devdoc": {"methods": {"calculatePrice(uint256,uint256,uint256,address,uint256)": {"details": "Calculate the current price for buy in amount."}, "getCurrentPrice(uint256)": {"details": "Get the current price.", "params": {"weiRaised": "total amount of weis raised, for calculating the current tranche"}, "return": "The current price or 0 if we are outside trache ranges"}, "getTranche(uint256)": {"details": "Iterate through tranches. You reach end of tranches when price = 0", "return": "tuple (time, price)"}, "setPreicoAddress(address,uint256)": {"details": "This is invoked once for every pre-ICO address, set pricePerToken to 0 to disable", "params": {"preicoAddress": "PresaleFundCollector address", "pricePerToken": "How many weis one token cost for pre-ico investors"}}, "transferOwnership(address)": {"details": "Allows the current owner to transfer control of the contract to a newOwner.", "params": {"newOwner": "The address to transfer ownership to."}}}}, "userdoc": {"methods": {"isPricingStrategy()": {"notice": "Interface declaration. "}}}}, "settings": {"compilationTarget": {"contracts/EthTranchePricing.sol": "EthTranchePricing"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/Crowdsale.sol": {"keccak256": "0x2697c26528f64bb954a7c2547d3b43317d2d2b02c7d9d05a7b1ab388cd79f65d", "urls": ["bzzr://f28b280794222114141c51dd5c388d403a7c98d8b51e04170a0e294246d5164b"]}, "contracts/CrowdsaleBase.sol": {"keccak256": "0xe2c9ed11183ce705616980df7b02544d72fe18b40395da7d9d4bcb621fb87871", "urls": ["bzzr://07f3887ba0d0eb3248b1ad3581480ed71a2fe70a47dcc283c4e97c8c92e0790a"]}, "contracts/EthTranchePricing.sol": {"keccak256": "0xc2a8df4ab0a04489847f79ab18a76a71cc2a93fde6b3f686a6e193c3c5045785", "urls": ["bzzr://8b69863e70dc60fb68991d5b90dbd09540d200f5f898adbc99a9d3a8c97501b9"]}, "contracts/FinalizeAgent.sol": {"keccak256": "0x309fd0510e0b3e2b5044e33f7c80cfb2d6f2a5697e41a5f185931d65770cfea9", "urls": ["bzzr://4e7ed6f82c0f542e92e56c12566b2ecd7666730865bf12566c27587ec64160ac"]}, "contracts/FractionalERC20.sol": {"keccak256": "0x75bc4ad90a8b13ce961c89b1bf405776f616e019d3a2720168f8e52be223198f", "urls": ["bzzr://6a3688f12da1a5c890ef06f80f883f6c5370886092d38a1b33cd4219b718478b"]}, "contracts/Haltable.sol": {"keccak256": "0x265dcf25e7c9ab4b6eecd2181f1b71334a1b5381a60f8db7d9526dab120f4b70", "urls": ["bzzr://d522e00fa9e075941469dd81738b59fdb99ce3c12cdc39e33abe40b588c4da9b"]}, "contracts/PricingStrategy.sol": {"keccak256": "0x8df5093b7d07168ad994f9176de0bd2268f6563b1e8a3a448d8cfe7fe246c628", "urls": ["bzzr://ef5c944d51f739ab34e2c951d6ac82a7152e6bb844058a8e57bae52c14cbe16b"]}, "contracts/SafeMathLib.sol": {"keccak256": "0x501bfe31e274b9a5591f7c540bdced4d4312e27d4f19599147c9bbca3d9c6b18", "urls": ["bzzr://a80935ebddb06c247d71372d4e5833ee029f08633bd0fe4a274a57009567e5b9"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}}, "version": 1}, "name": "EthTranchePricing", "ordered_full_dependencies": ["SafeMathLib"], "source_path": "contracts/EthTranchePricing.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Interface for defining crowdsale pricing.\n */\ncontract PricingStrategy {\n\n /** Interface declaration. */\n function isPricingStrategy() public constant returns (bool) {\n return true;\n }\n\n /** Self check if all references are correctly set.\n *\n * Checks that pricing strategy matches crowdsale parameters.\n */\n function isSane(address crowdsale) public constant returns (bool) {\n return true;\n }\n\n /**\n * @dev Pricing tells if this is a presale purchase or not.\n @param purchaser Address of the purchaser\n @return False by default, true if a presale purchaser\n */\n function isPresalePurchase(address purchaser) public constant returns (bool) {\n return false;\n }\n\n /**\n * When somebody tries to buy tokens for X eth, calculate how many tokens they get.\n *\n *\n * @param value - What is the value of the transaction send in as wei\n * @param tokensSold - how much tokens have been sold this far\n * @param weiRaised - how much money has been raised this far in the main token sale - this number excludes presale\n * @param msgSender - who is the investor of this transaction\n * @param decimals - how many decimal units the token has\n * @return Amount of tokens the investor receives\n */\n function calculatePrice(uint value, uint weiRaised, uint tokensSold, address msgSender, uint decimals) public constant returns (uint tokenAmount);\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Safe unsigned safe math.\n *\n * https://blog.aragon.one/library-driven-development-in-solidity-2bebcaf88736#.750gwtwli\n *\n * Originally from https://raw.githubusercontent.com/AragonOne/zeppelin-solidity/master/contracts/SafeMathLib.sol\n *\n * Maintained here until merged to mainline zeppelin-solidity.\n *\n */\nlibrary SafeMathLib {\n\n function times(uint a, uint b) returns (uint) {\n uint c = a * b;\n assert(a == 0 || c / a == b);\n return c;\n }\n\n function minus(uint a, uint b) returns (uint) {\n assert(b <= a);\n return a - b;\n }\n\n function plus(uint a, uint b) returns (uint) {\n uint c = a + b;\n assert(c>=a);\n return c;\n }\n\n}\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Finalize agent defines what happens at the end of succeseful crowdsale.\n *\n * - Allocate tokens for founders, bounties and community\n * - Make tokens transferable\n * - etc.\n */\ncontract FinalizeAgent {\n\n function isFinalizeAgent() public constant returns(bool) {\n return true;\n }\n\n /** Return true if we can run finalizeCrowdsale() properly.\n *\n * This is a safety check function that doesn't allow crowdsale to begin\n * unless the finalizer has been set up properly.\n */\n function isSane() public constant returns (bool);\n\n /** Called once by crowdsale finalize() if the sale was success. */\n function finalizeCrowdsale();\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n\n/**\n * A token that defines fractional units as decimals.\n */\ncontract FractionalERC20 is ERC20 {\n\n uint public decimals;\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n/*\n * Haltable\n *\n * Abstract contract that allows children to implement an\n * emergency stop mechanism. Differs from Pausable by causing a throw when in halt mode.\n *\n *\n * Originally envisioned in FirstBlood ICO contract.\n */\ncontract Haltable is Ownable {\n bool public halted;\n\n modifier stopInEmergency {\n if (halted) throw;\n _;\n }\n\n modifier stopNonOwnersInEmergency {\n if (halted && msg.sender != owner) throw;\n _;\n }\n\n modifier onlyInEmergency {\n if (!halted) throw;\n _;\n }\n\n // called by the owner on emergency, triggers stopped state\n function halt() external onlyOwner {\n halted = true;\n }\n\n // called by the owner on end of emergency, returns to normal state\n function unhalt() external onlyOwner onlyInEmergency {\n halted = false;\n }\n\n}\n\n\n\n\n\n\n\n/**\n * Crowdsale state machine without buy functionality.\n *\n * Implements basic state machine logic, but leaves out all buy functions,\n * so that subclasses can implement their own buying logic.\n *\n *\n * For the default buy() implementation see Crowdsale.sol.\n */\ncontract CrowdsaleBase is Haltable {\n\n /* Max investment count when we are still allowed to change the multisig address */\n uint public MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE = 5;\n\n using SafeMathLib for uint;\n\n /* The token we are selling */\n FractionalERC20 public token;\n\n /* How we are going to price our offering */\n PricingStrategy public pricingStrategy;\n\n /* Post-success callback */\n FinalizeAgent public finalizeAgent;\n\n /* tokens will be transfered from this address */\n address public multisigWallet;\n\n /* if the funding goal is not reached, investors may withdraw their funds */\n uint public minimumFundingGoal;\n\n /* the UNIX timestamp start date of the crowdsale */\n uint public startsAt;\n\n /* the UNIX timestamp end date of the crowdsale */\n uint public endsAt;\n\n /* the number of tokens already sold through this contract*/\n uint public tokensSold = 0;\n\n /* How many wei of funding we have raised */\n uint public weiRaised = 0;\n\n /* Calculate incoming funds from presale contracts and addresses */\n uint public presaleWeiRaised = 0;\n\n /* How many distinct addresses have invested */\n uint public investorCount = 0;\n\n /* How much wei we have returned back to the contract after a failed crowdfund. */\n uint public loadedRefund = 0;\n\n /* How much wei we have given back to investors.*/\n uint public weiRefunded = 0;\n\n /* Has this crowdsale been finalized */\n bool public finalized;\n\n /** How much ETH each address has invested to this crowdsale */\n mapping (address => uint256) public investedAmountOf;\n\n /** How much tokens this crowdsale has credited for each investor address */\n mapping (address => uint256) public tokenAmountOf;\n\n /** Addresses that are allowed to invest even before ICO offical opens. For testing, for ICO partners, etc. */\n mapping (address => bool) public earlyParticipantWhitelist;\n\n /** This is for manul testing for the interaction from owner wallet. You can set it to any value and inspect this in blockchain explorer to see that crowdsale interaction works. */\n uint public ownerTestValue;\n\n /** State machine\n *\n * - Preparing: All contract initialization calls and variables have not been set yet\n * - Prefunding: We have not passed start time yet\n * - Funding: Active crowdsale\n * - Success: Minimum funding goal reached\n * - Failure: Minimum funding goal not reached before ending time\n * - Finalized: The finalized has been called and succesfully executed\n * - Refunding: Refunds are loaded on the contract for reclaim.\n */\n enum State{Unknown, Preparing, PreFunding, Funding, Success, Failure, Finalized, Refunding}\n\n // A new investment was made\n event Invested(address investor, uint weiAmount, uint tokenAmount, uint128 customerId);\n\n // Refund was processed for a contributor\n event Refund(address investor, uint weiAmount);\n\n // The rules were changed what kind of investments we accept\n event InvestmentPolicyChanged(bool newRequireCustomerId, bool newRequiredSignedAddress, address newSignerAddress);\n\n // Address early participation whitelist status changed\n event Whitelisted(address addr, bool status);\n\n // Crowdsale end time has been changed\n event EndsAtChanged(uint newEndsAt);\n\n function CrowdsaleBase(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal) {\n\n owner = msg.sender;\n\n token = FractionalERC20(_token);\n setPricingStrategy(_pricingStrategy);\n\n multisigWallet = _multisigWallet;\n if(multisigWallet == 0) {\n throw;\n }\n\n if(_start == 0) {\n throw;\n }\n\n startsAt = _start;\n\n if(_end == 0) {\n throw;\n }\n\n endsAt = _end;\n\n // Don't mess the dates\n if(startsAt >= endsAt) {\n throw;\n }\n\n // Minimum funding goal can be zero\n minimumFundingGoal = _minimumFundingGoal;\n }\n\n /**\n * Don't expect to just send in money and get tokens.\n */\n function() payable {\n throw;\n }\n\n /**\n * @dev Make an investment.\n *\n * Crowdsale must be running for one to invest.\n * We must have not pressed the emergency brake.\n *\n * @param receiver The Ethereum address who receives the tokens\n * @param customerId (optional) UUID v4 to track the successful payments on the server side'\n * @param tokenAmount Amount of tokens which be credited to receiver\n *\n * @return tokensBought How mony tokens were bought\n */\n function buyTokens(address receiver, uint128 customerId, uint256 tokenAmount) stopInEmergency internal returns(uint tokensBought) {\n\n // Determine if it's a good time to accept investment from this participant\n if(getState() == State.PreFunding) {\n // Are we whitelisted for early deposit\n if(!earlyParticipantWhitelist[receiver]) {\n throw;\n }\n } else if(getState() == State.Funding) {\n // Retail participants can only come in when the crowdsale is running\n // pass\n } else {\n // Unwanted state\n throw;\n }\n\n uint weiAmount = msg.value;\n\n // Dust transaction\n require(tokenAmount != 0);\n\n if(investedAmountOf[receiver] == 0) {\n // A new investor\n investorCount++;\n }\n\n // Update investor\n investedAmountOf[receiver] = investedAmountOf[receiver].plus(weiAmount);\n tokenAmountOf[receiver] = tokenAmountOf[receiver].plus(tokenAmount);\n\n // Update totals\n weiRaised = weiRaised.plus(weiAmount);\n tokensSold = tokensSold.plus(tokenAmount);\n\n if(pricingStrategy.isPresalePurchase(receiver)) {\n presaleWeiRaised = presaleWeiRaised.plus(weiAmount);\n }\n\n // Check that we did not bust the cap\n require(!isBreakingCap(weiAmount, tokenAmount, weiRaised, tokensSold));\n\n assignTokens(receiver, tokenAmount);\n\n // Pocket the money, or fail the crowdsale if we for some reason cannot send the money to our multisig\n if(!multisigWallet.send(weiAmount)) throw;\n\n // Tell us invest was success\n Invested(receiver, weiAmount, tokenAmount, customerId);\n\n return tokenAmount;\n }\n\n /**\n * @dev Make an investment based on pricing strategy\n *\n * This is a wrapper for buyTokens(), but the amount of tokens receiver will\n * have depends on the pricing strategy used.\n *\n * @param receiver The Ethereum address who receives the tokens\n * @param customerId (optional) UUID v4 to track the successful payments on the server side'\n *\n * @return tokensBought How mony tokens were bought\n */\n function investInternal(address receiver, uint128 customerId) stopInEmergency internal returns(uint tokensBought) {\n return buyTokens(receiver, customerId, pricingStrategy.calculatePrice(msg.value, weiRaised - presaleWeiRaised, tokensSold, msg.sender, token.decimals()));\n }\n\n /**\n * @dev Calculate tokens user will have for their purchase\n *\n * @param weisTotal How much ethers (in wei) the user putssssss in\n * @param pricePerToken What is the price for one token\n *\n * @return tokensTotal which is received tokens, token decimals included\n */\n function calculateTokens(uint256 weisTotal, uint256 pricePerToken) public constant returns(uint tokensTotal) {\n // pricePerToken is how many full tokens, token decimal place included, you get for wei amount.\n // Because, in theory, decimal amount can vary, we do the exponent calculation here,\n // though gas wise using 10**18 constant would be much simpler.\n // Furthermore we could use rough amounts and take in raw wei per tokens amount,\n // but we lose too much accuracy for generic calculations, thus all these are\n // practically implemented as 10**18 fixed points.\n uint multiplier = 10 ** token.decimals();\n return weisTotal.times(multiplier)/pricePerToken;\n }\n\n /**\n * Finalize a succcesful crowdsale.\n *\n * The owner can triggre a call the contract that provides post-crowdsale actions, like releasing the tokens.\n */\n function finalize() public inState(State.Success) onlyOwner stopInEmergency {\n\n // Already finalized\n if(finalized) {\n throw;\n }\n\n // Finalizing is optional. We only call it if we are given a finalizing agent.\n if(address(finalizeAgent) != 0) {\n finalizeAgent.finalizeCrowdsale();\n }\n\n finalized = true;\n }\n\n /**\n * Allow to (re)set finalize agent.\n *\n * Design choice: no state restrictions on setting this, so that we can fix fat finger mistakes.\n */\n function setFinalizeAgent(FinalizeAgent addr) onlyOwner {\n finalizeAgent = addr;\n\n // Don't allow setting bad agent\n if(!finalizeAgent.isFinalizeAgent()) {\n throw;\n }\n }\n\n /**\n * Allow crowdsale owner to close early or extend the crowdsale.\n *\n * This is useful e.g. for a manual soft cap implementation:\n * - after X amount is reached determine manual closing\n *\n * This may put the crowdsale to an invalid state,\n * but we trust owners know what they are doing.\n *\n */\n function setEndsAt(uint time) onlyOwner {\n\n if(now > time) {\n throw; // Don't change past\n }\n\n if(startsAt > time) {\n throw; // Prevent human mistakes\n }\n\n endsAt = time;\n EndsAtChanged(endsAt);\n }\n\n /**\n * Allow to (re)set pricing strategy.\n *\n * Design choice: no state restrictions on the set, so that we can fix fat finger mistakes.\n */\n function setPricingStrategy(PricingStrategy _pricingStrategy) onlyOwner {\n pricingStrategy = _pricingStrategy;\n\n // Don't allow setting bad agent\n if(!pricingStrategy.isPricingStrategy()) {\n throw;\n }\n }\n\n /**\n * Allow to change the team multisig address in the case of emergency.\n *\n * This allows to save a deployed crowdsale wallet in the case the crowdsale has not yet begun\n * (we have done only few test transactions). After the crowdsale is going\n * then multisig address stays locked for the safety reasons.\n */\n function setMultisig(address addr) public onlyOwner {\n\n // Change\n if(investorCount > MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE) {\n throw;\n }\n\n multisigWallet = addr;\n }\n\n /**\n * Allow load refunds back on the contract for the refunding.\n *\n * The team can transfer the funds back on the smart contract in the case the minimum goal was not reached..\n */\n function loadRefund() public payable inState(State.Failure) {\n if(msg.value == 0) throw;\n loadedRefund = loadedRefund.plus(msg.value);\n }\n\n /**\n * Investors can claim refund.\n *\n * Note that any refunds from proxy buyers should be handled separately,\n * and not through this contract.\n */\n function refund() public inState(State.Refunding) {\n uint256 weiValue = investedAmountOf[msg.sender];\n if (weiValue == 0) throw;\n investedAmountOf[msg.sender] = 0;\n weiRefunded = weiRefunded.plus(weiValue);\n Refund(msg.sender, weiValue);\n if (!msg.sender.send(weiValue)) throw;\n }\n\n /**\n * @return true if the crowdsale has raised enough money to be a successful.\n */\n function isMinimumGoalReached() public constant returns (bool reached) {\n return weiRaised >= minimumFundingGoal;\n }\n\n /**\n * Check if the contract relationship looks good.\n */\n function isFinalizerSane() public constant returns (bool sane) {\n return finalizeAgent.isSane();\n }\n\n /**\n * Check if the contract relationship looks good.\n */\n function isPricingSane() public constant returns (bool sane) {\n return pricingStrategy.isSane(address(this));\n }\n\n /**\n * Crowdfund state machine management.\n *\n * We make it a function and do not assign the result to a variable, so there is no chance of the variable being stale.\n */\n function getState() public constant returns (State) {\n if(finalized) return State.Finalized;\n else if (address(finalizeAgent) == 0) return State.Preparing;\n else if (!finalizeAgent.isSane()) return State.Preparing;\n else if (!pricingStrategy.isSane(address(this))) return State.Preparing;\n else if (block.timestamp < startsAt) return State.PreFunding;\n else if (block.timestamp <= endsAt && !isCrowdsaleFull()) return State.Funding;\n else if (isMinimumGoalReached()) return State.Success;\n else if (!isMinimumGoalReached() && weiRaised > 0 && loadedRefund >= weiRaised) return State.Refunding;\n else return State.Failure;\n }\n\n /** This is for manual testing of multisig wallet interaction */\n function setOwnerTestValue(uint val) onlyOwner {\n ownerTestValue = val;\n }\n\n /**\n * Allow addresses to do early participation.\n *\n * TODO: Fix spelling error in the name\n */\n function setEarlyParicipantWhitelist(address addr, bool status) onlyOwner {\n earlyParticipantWhitelist[addr] = status;\n Whitelisted(addr, status);\n }\n\n\n /** Interface marker. */\n function isCrowdsale() public constant returns (bool) {\n return true;\n }\n\n //\n // Modifiers\n //\n\n /** Modified allowing execution only if the crowdsale is currently running. */\n modifier inState(State state) {\n if(getState() != state) throw;\n _;\n }\n\n\n //\n // Abstract functions\n //\n\n /**\n * Check if the current invested breaks our cap rules.\n *\n *\n * The child contract must define their own cap setting rules.\n * We allow a lot of flexibility through different capping strategies (ETH, token count)\n * Called from invest().\n *\n * @param weiAmount The amount of wei the investor tries to invest in the current transaction\n * @param tokenAmount The amount of tokens we try to give to the investor in the current transaction\n * @param weiRaisedTotal What would be our total raised balance after this transaction\n * @param tokensSoldTotal What would be our total sold tokens count after this transaction\n *\n * @return true if taking this investment would break our cap rules\n */\n function isBreakingCap(uint weiAmount, uint tokenAmount, uint weiRaisedTotal, uint tokensSoldTotal) constant returns (bool limitBroken);\n\n /**\n * Check if the current crowdsale is full and we can no longer sell any tokens.\n */\n function isCrowdsaleFull() public constant returns (bool);\n\n /**\n * Create new tokens or transfer issued tokens to the investor depending on the cap model.\n */\n function assignTokens(address receiver, uint tokenAmount) internal;\n}\n\n\n\n/**\n * Abstract base contract for token sales with the default buy entry points.\n *\n * Handle\n * - start and end dates\n * - accepting investments\n * - minimum funding goal and refund\n * - various statistics during the crowdfund\n * - different pricing strategies\n * - different investment policies (require server side customer id, allow only whitelisted addresses)\n *\n * Does not Handle\n *\n * - Token allocation (minting vs. transfer)\n * - Cap rules\n *\n */\ncontract Crowdsale is CrowdsaleBase {\n\n /* Do we need to have unique contributor id for each customer */\n bool public requireCustomerId;\n\n /**\n * Do we verify that contributor has been cleared on the server side (accredited investors only).\n * This method was first used in FirstBlood crowdsale to ensure all contributors have accepted terms on sale (on the web).\n */\n bool public requiredSignedAddress;\n\n /* Server side address that signed allowed contributors (Ethereum addresses) that can participate the crowdsale */\n address public signerAddress;\n\n function Crowdsale(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal) CrowdsaleBase(_token, _pricingStrategy, _multisigWallet, _start, _end, _minimumFundingGoal) {\n }\n\n /**\n * Preallocate tokens for the early investors.\n *\n * Preallocated tokens have been sold before the actual crowdsale opens.\n * This function mints the tokens and moves the crowdsale needle.\n *\n * Investor count is not handled; it is assumed this goes for multiple investors\n * and the token distribution happens outside the smart contract flow.\n *\n * No money is exchanged, as the crowdsale team already have received the payment.\n *\n * @param fullTokens tokens as full tokens - decimal places added internally\n * @param weiPrice Price of a single full token in wei\n *\n */\n function preallocate(address receiver, uint fullTokens, uint weiPrice) public onlyOwner {\n\n uint tokenAmount = fullTokens * 10**token.decimals();\n uint weiAmount = weiPrice * fullTokens; // This can be also 0, we give out tokens for free\n\n weiRaised = weiRaised.plus(weiAmount);\n tokensSold = tokensSold.plus(tokenAmount);\n\n investedAmountOf[receiver] = investedAmountOf[receiver].plus(weiAmount);\n tokenAmountOf[receiver] = tokenAmountOf[receiver].plus(tokenAmount);\n\n assignTokens(receiver, tokenAmount);\n\n // Tell us invest was success\n Invested(receiver, weiAmount, tokenAmount, 0);\n }\n\n /**\n * Allow anonymous contributions to this crowdsale.\n */\n function investWithSignedAddress(address addr, uint128 customerId, uint8 v, bytes32 r, bytes32 s) public payable {\n bytes32 hash = sha256(addr);\n if (ecrecover(hash, v, r, s) != signerAddress) throw;\n if(customerId == 0) throw; // UUIDv4 sanity check\n investInternal(addr, customerId);\n }\n\n /**\n * Track who is the customer making the payment so we can send thank you email.\n */\n function investWithCustomerId(address addr, uint128 customerId) public payable {\n if(requiredSignedAddress) throw; // Crowdsale allows only server-side signed participants\n if(customerId == 0) throw; // UUIDv4 sanity check\n investInternal(addr, customerId);\n }\n\n /**\n * Allow anonymous contributions to this crowdsale.\n */\n function invest(address addr) public payable {\n if(requireCustomerId) throw; // Crowdsale needs to track participants for thank you email\n if(requiredSignedAddress) throw; // Crowdsale allows only server-side signed participants\n investInternal(addr, 0);\n }\n\n /**\n * Invest to tokens, recognize the payer and clear his address.\n *\n */\n function buyWithSignedAddress(uint128 customerId, uint8 v, bytes32 r, bytes32 s) public payable {\n investWithSignedAddress(msg.sender, customerId, v, r, s);\n }\n\n /**\n * Invest to tokens, recognize the payer.\n *\n */\n function buyWithCustomerIdWithChecksum(uint128 customerId, bytes1 checksum) public payable {\n // see customerid.py\n if (bytes1(sha3(customerId)) != checksum) throw;\n investWithCustomerId(msg.sender, customerId);\n }\n\n /**\n * Legacy API signature.\n */\n function buyWithCustomerId(uint128 customerId) public payable {\n investWithCustomerId(msg.sender, customerId);\n }\n\n /**\n * The basic entry point to participate the crowdsale process.\n *\n * Pay for funding, get invested tokens back in the sender address.\n */\n function buy() public payable {\n invest(msg.sender);\n }\n\n /**\n * Set policy do we need to have server-side customer ids for the investments.\n *\n */\n function setRequireCustomerId(bool value) onlyOwner {\n requireCustomerId = value;\n InvestmentPolicyChanged(requireCustomerId, requiredSignedAddress, signerAddress);\n }\n\n /**\n * Set policy if all investors must be cleared on the server side first.\n *\n * This is e.g. for the accredited investor clearing.\n *\n */\n function setRequireSignedAddress(bool value, address _signerAddress) onlyOwner {\n requiredSignedAddress = value;\n signerAddress = _signerAddress;\n InvestmentPolicyChanged(requireCustomerId, requiredSignedAddress, signerAddress);\n }\n\n}\n\n\n\n\n/// @dev Tranche based pricing with special support for pre-ico deals.\n/// Implementing \"first price\" tranches, meaning, that if byers order is\n/// covering more than one tranche, the price of the lowest tranche will apply\n/// to the whole order.\ncontract EthTranchePricing is PricingStrategy, Ownable {\n\n using SafeMathLib for uint;\n\n uint public constant MAX_TRANCHES = 10;\n\n // This contains all pre-ICO addresses, and their prices (weis per token)\n mapping (address => uint) public preicoAddresses;\n\n /**\n * Define pricing schedule using tranches.\n */\n struct Tranche {\n\n // Amount in weis when this tranche becomes active\n uint amount;\n\n // How many tokens per satoshi you will get while this tranche is active\n uint price;\n }\n\n // Store tranches in a fixed array, so that it can be seen in a blockchain explorer\n // Tranche 0 is always (0, 0)\n // (TODO: change this when we confirm dynamic arrays are explorable)\n Tranche[10] public tranches;\n\n // How many active tranches we have\n uint public trancheCount;\n\n /// @dev Contruction, creating a list of tranches\n /// @param _tranches uint[] tranches Pairs of (start amount, price)\n function EthTranchePricing(uint[] _tranches) {\n // Need to have tuples, length check\n if(_tranches.length % 2 == 1 || _tranches.length >= MAX_TRANCHES*2) {\n throw;\n }\n\n trancheCount = _tranches.length / 2;\n\n uint highestAmount = 0;\n\n for(uint i=0; i<_tranches.length/2; i++) {\n tranches[i].amount = _tranches[i*2];\n tranches[i].price = _tranches[i*2+1];\n\n // No invalid steps\n if((highestAmount != 0) && (tranches[i].amount <= highestAmount)) {\n throw;\n }\n\n highestAmount = tranches[i].amount;\n }\n\n // We need to start from zero, otherwise we blow up our deployment\n if(tranches[0].amount != 0) {\n throw;\n }\n\n // Last tranche price must be zero, terminating the crowdale\n if(tranches[trancheCount-1].price != 0) {\n throw;\n }\n }\n\n /// @dev This is invoked once for every pre-ICO address, set pricePerToken\n /// to 0 to disable\n /// @param preicoAddress PresaleFundCollector address\n /// @param pricePerToken How many weis one token cost for pre-ico investors\n function setPreicoAddress(address preicoAddress, uint pricePerToken)\n public\n onlyOwner\n {\n preicoAddresses[preicoAddress] = pricePerToken;\n }\n\n /// @dev Iterate through tranches. You reach end of tranches when price = 0\n /// @return tuple (time, price)\n function getTranche(uint n) public constant returns (uint, uint) {\n return (tranches[n].amount, tranches[n].price);\n }\n\n function getFirstTranche() private constant returns (Tranche) {\n return tranches[0];\n }\n\n function getLastTranche() private constant returns (Tranche) {\n return tranches[trancheCount-1];\n }\n\n function getPricingStartsAt() public constant returns (uint) {\n return getFirstTranche().amount;\n }\n\n function getPricingEndsAt() public constant returns (uint) {\n return getLastTranche().amount;\n }\n\n function isSane(address _crowdsale) public constant returns(bool) {\n // Our tranches are not bound by time, so we can't really check are we sane\n // so we presume we are ;)\n // In the future we could save and track raised tokens, and compare it to\n // the Crowdsale contract.\n return true;\n }\n\n /// @dev Get the current tranche or bail out if we are not in the tranche periods.\n /// @param weiRaised total amount of weis raised, for calculating the current tranche\n /// @return {[type]} [description]\n function getCurrentTranche(uint weiRaised) private constant returns (Tranche) {\n uint i;\n\n for(i=0; i < tranches.length; i++) {\n if(weiRaised < tranches[i].amount) {\n return tranches[i-1];\n }\n }\n }\n\n /// @dev Get the current price.\n /// @param weiRaised total amount of weis raised, for calculating the current tranche\n /// @return The current price or 0 if we are outside trache ranges\n function getCurrentPrice(uint weiRaised) public constant returns (uint result) {\n return getCurrentTranche(weiRaised).price;\n }\n\n function isPresalePurchase(address purchaser) public constant returns (bool) {\n if(preicoAddresses[purchaser] > 0)\n return true;\n else\n return false;\n }\n\n /// @dev Calculate the current price for buy in amount.\n function calculatePrice(uint value, uint weiRaised, uint tokensSold, address msgSender, uint decimals) public constant returns (uint) {\n\n uint multiplier = 10 ** decimals;\n\n // This investor is coming through pre-ico\n if(preicoAddresses[msgSender] > 0) {\n return value.times(multiplier) / preicoAddresses[msgSender];\n }\n\n uint price = getCurrentPrice(weiRaised);\n return value.times(multiplier) / price;\n }\n\n function() payable {\n throw; // No money on this contract\n }\n\n}\n"}, "ExtraFinalizeAgent": {"abi": [{"constant": false, "inputs": [], "name": "finalizeCrowdsale", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "isFinalizeAgent", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "allocatedBonus", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "bonusBasePoints", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isSane", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "crowdsale", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "accountedTokenSales", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "teamMultisig", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "token", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [{"name": "_token", "type": "address"}, {"name": "_crowdsale", "type": "address"}, {"name": "_bonusBasePoints", "type": "uint256"}, {"name": "_teamMultisig", "type": "address"}, {"name": "_accountedTokenSales", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}], "bytecode": "0x608060405234801561001057600080fd5b5060405160a0806106718339810160409081528151602083015191830151606084015160809094015160008054600160a060020a03808616600160a060020a03199283161790925560018054838816921691909117908190559395929316151561007957600080fd5b60038054600160a060020a031916600160a060020a0384811691909117918290551615156100a657600080fd5b600555505050506105b5806100bc6000396000f3006080604052600436106100985763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630bf318a3811461009d578063614cb904146100b45780636a457ee9146100dd5780637424bebc1461010457806382771c8e146101195780639c1e03a01461012e578063bc129a981461016c578063dbc0c08514610181578063fc0c546a14610196575b600080fd5b3480156100a957600080fd5b506100b26101ab565b005b3480156100c057600080fd5b506100c9610475565b604080519115158252519081900360200190f35b3480156100e957600080fd5b506100f261047a565b60408051918252519081900360200190f35b34801561011057600080fd5b506100f2610480565b34801561012557600080fd5b506100c9610486565b34801561013a57600080fd5b5061014361052f565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561017857600080fd5b506100f261054b565b34801561018d57600080fd5b50610143610551565b3480156101a257600080fd5b5061014361056d565b60015460009073ffffffffffffffffffffffffffffffffffffffff1633146101d257600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663518ab2a86040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561025857600080fd5b505af115801561026c573d6000803e3d6000fd5b505050506040513d602081101561028257600080fd5b5051600554604080517ff4f3bdc1000000000000000000000000000000000000000000000000000000008152600481019390935260248301919091525173__contracts/SafeMathLib.sol:SafeMathLi__9163f4f3bdc1916044808301926020929190829003018186803b1580156102fa57600080fd5b505af415801561030e573d6000803e3d6000fd5b505050506040513d602081101561032457600080fd5b5051600254604080517f1d3b9edf000000000000000000000000000000000000000000000000000000008152600481018490526024810192909252519192506127109173__contracts/SafeMathLib.sol:SafeMathLi__91631d3b9edf916044808301926020929190829003018186803b1580156103a257600080fd5b505af41580156103b6573d6000803e3d6000fd5b505050506040513d60208110156103cc57600080fd5b50518115156103d757fe5b04600481815560008054600354604080517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff92831695810195909552602485019590955293519316926340c10f1992604480820193929182900301818387803b15801561045a57600080fd5b505af115801561046e573d6000803e3d6000fd5b5050505050565b600190565b60045481565b60025481565b60008054604080517f42c1867b000000000000000000000000000000000000000000000000000000008152306004820152905173ffffffffffffffffffffffffffffffffffffffff909216916342c1867b9160248082019260209290919082900301818787803b1580156104f957600080fd5b505af115801561050d573d6000803e3d6000fd5b505050506040513d602081101561052357600080fd5b50511515600114919050565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b60055481565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff16815600a165627a7a72305820b9b8a6f1b6ef33a76aae227c82080e330d3b248c1922e66c77c437058f5557a00029", "bytecode_runtime": "0x6080604052600436106100985763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630bf318a3811461009d578063614cb904146100b45780636a457ee9146100dd5780637424bebc1461010457806382771c8e146101195780639c1e03a01461012e578063bc129a981461016c578063dbc0c08514610181578063fc0c546a14610196575b600080fd5b3480156100a957600080fd5b506100b26101ab565b005b3480156100c057600080fd5b506100c9610475565b604080519115158252519081900360200190f35b3480156100e957600080fd5b506100f261047a565b60408051918252519081900360200190f35b34801561011057600080fd5b506100f2610480565b34801561012557600080fd5b506100c9610486565b34801561013a57600080fd5b5061014361052f565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561017857600080fd5b506100f261054b565b34801561018d57600080fd5b50610143610551565b3480156101a257600080fd5b5061014361056d565b60015460009073ffffffffffffffffffffffffffffffffffffffff1633146101d257600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663518ab2a86040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561025857600080fd5b505af115801561026c573d6000803e3d6000fd5b505050506040513d602081101561028257600080fd5b5051600554604080517ff4f3bdc1000000000000000000000000000000000000000000000000000000008152600481019390935260248301919091525173__contracts/SafeMathLib.sol:SafeMathLi__9163f4f3bdc1916044808301926020929190829003018186803b1580156102fa57600080fd5b505af415801561030e573d6000803e3d6000fd5b505050506040513d602081101561032457600080fd5b5051600254604080517f1d3b9edf000000000000000000000000000000000000000000000000000000008152600481018490526024810192909252519192506127109173__contracts/SafeMathLib.sol:SafeMathLi__91631d3b9edf916044808301926020929190829003018186803b1580156103a257600080fd5b505af41580156103b6573d6000803e3d6000fd5b505050506040513d60208110156103cc57600080fd5b50518115156103d757fe5b04600481815560008054600354604080517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff92831695810195909552602485019590955293519316926340c10f1992604480820193929182900301818387803b15801561045a57600080fd5b505af115801561046e573d6000803e3d6000fd5b5050505050565b600190565b60045481565b60025481565b60008054604080517f42c1867b000000000000000000000000000000000000000000000000000000008152306004820152905173ffffffffffffffffffffffffffffffffffffffff909216916342c1867b9160248082019260209290919082900301818787803b1580156104f957600080fd5b505af115801561050d573d6000803e3d6000fd5b505050506040513d602081101561052357600080fd5b50511515600114919050565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b60055481565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff16815600a165627a7a72305820b9b8a6f1b6ef33a76aae227c82080e330d3b248c1922e66c77c437058f5557a00029", "direct_dependencies": ["SafeMathLib"], "full_dependencies": ["SafeMathLib"], "linkrefs": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 1786}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 2122}], "linkrefs_runtime": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 1410}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 1746}], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": false, "inputs": [], "name": "finalizeCrowdsale", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "isFinalizeAgent", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "allocatedBonus", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "bonusBasePoints", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isSane", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "crowdsale", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "accountedTokenSales", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "teamMultisig", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "token", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [{"name": "_token", "type": "address"}, {"name": "_crowdsale", "type": "address"}, {"name": "_bonusBasePoints", "type": "uint256"}, {"name": "_teamMultisig", "type": "address"}, {"name": "_accountedTokenSales", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}], "devdoc": {"methods": {}}, "userdoc": {"methods": {"finalizeCrowdsale()": {"notice": "Called once by crowdsale finalize() if the sale was success. "}}}}, "settings": {"compilationTarget": {"contracts/ExtraFinalizeAgent.sol": "ExtraFinalizeAgent"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/Crowdsale.sol": {"keccak256": "0x2697c26528f64bb954a7c2547d3b43317d2d2b02c7d9d05a7b1ab388cd79f65d", "urls": ["bzzr://f28b280794222114141c51dd5c388d403a7c98d8b51e04170a0e294246d5164b"]}, "contracts/CrowdsaleBase.sol": {"keccak256": "0xe2c9ed11183ce705616980df7b02544d72fe18b40395da7d9d4bcb621fb87871", "urls": ["bzzr://07f3887ba0d0eb3248b1ad3581480ed71a2fe70a47dcc283c4e97c8c92e0790a"]}, "contracts/CrowdsaleToken.sol": {"keccak256": "0xa812687ac327cd19fac64667980e70d4fb72ef7f61dce477818d085cf0a915df", "urls": ["bzzr://826d9dda00ce341794e5bb05c78b1abb2728e3c631f7a542345dcfa9f3bd9c50"]}, "contracts/ExtraFinalizeAgent.sol": {"keccak256": "0x74db5270f5f58395810cca51b02240f5fd842570658b4740388e489c1c5abfca", "urls": ["bzzr://18b4f69b9afca469b72af3da6dac4bd3c240fc513ebdde9fc2f71fcd408092f3"]}, "contracts/FinalizeAgent.sol": {"keccak256": "0x309fd0510e0b3e2b5044e33f7c80cfb2d6f2a5697e41a5f185931d65770cfea9", "urls": ["bzzr://4e7ed6f82c0f542e92e56c12566b2ecd7666730865bf12566c27587ec64160ac"]}, "contracts/FractionalERC20.sol": {"keccak256": "0x75bc4ad90a8b13ce961c89b1bf405776f616e019d3a2720168f8e52be223198f", "urls": ["bzzr://6a3688f12da1a5c890ef06f80f883f6c5370886092d38a1b33cd4219b718478b"]}, "contracts/Haltable.sol": {"keccak256": "0x265dcf25e7c9ab4b6eecd2181f1b71334a1b5381a60f8db7d9526dab120f4b70", "urls": ["bzzr://d522e00fa9e075941469dd81738b59fdb99ce3c12cdc39e33abe40b588c4da9b"]}, "contracts/MintableToken.sol": {"keccak256": "0x650e1d6b2bedcd36508918357c7cf4f36fdd093cd0c4d6342f4dcd3bdcdd7578", "urls": ["bzzr://7ba2ac0480d428066a18727e2adb76ba56856ecd37b4420e801131ec8f8f4be3"]}, "contracts/PricingStrategy.sol": {"keccak256": "0x8df5093b7d07168ad994f9176de0bd2268f6563b1e8a3a448d8cfe7fe246c628", "urls": ["bzzr://ef5c944d51f739ab34e2c951d6ac82a7152e6bb844058a8e57bae52c14cbe16b"]}, "contracts/Recoverable.sol": {"keccak256": "0x311a332cdd87df6e00057f5455f4e68b043b5dbe211f6d68bc64e20817515635", "urls": ["bzzr://4fd99bcfb93baed6e7c8d22ee9ecc5c8346a1aa98288e77b01333b2c5d3f582d"]}, "contracts/ReleasableToken.sol": {"keccak256": "0x2c50180d0c1eab1aa63a04da3ae87ee2c482665d2a1a42c5f05b11234a7edaf4", "urls": ["bzzr://10752c317eba5c42e2848722689cfee4fffb7bcb42f3346e1a20715d843798e8"]}, "contracts/SafeMathLib.sol": {"keccak256": "0x501bfe31e274b9a5591f7c540bdced4d4312e27d4f19599147c9bbca3d9c6b18", "urls": ["bzzr://a80935ebddb06c247d71372d4e5833ee029f08633bd0fe4a274a57009567e5b9"]}, "contracts/StandardTokenExt.sol": {"keccak256": "0x9ea2d4cec4dccd5639c05e6c23dd027d80b5e5a20abd99b280ab7b2631b5a5fc", "urls": ["bzzr://a52d8fc5a21bd83997aff19128e00dceb251df712207b61223894c8b7f42d5ff"]}, "contracts/UpgradeAgent.sol": {"keccak256": "0x88e793f72feca4a18d2cd06e6037c1413d7b963eabcf5626d60bfb9d04d6e8e6", "urls": ["bzzr://87e39a65cf25d539ab49ad7e759b3298b8a19272964e69e3f2432f0323f30025"]}, "contracts/UpgradeableToken.sol": {"keccak256": "0xa74fc300c514564ece81c86905502c2de674b69c0633b133af19c1ba027da2c9", "urls": ["bzzr://55bc0b908c94781462b8959f051c6dbb53c35641b0f8cb38d74632ad6bf95e52"]}, "zeppelin/contracts/math/SafeMath.sol": {"keccak256": "0x341ba8cb467a3623e819ba1a683ac1d264005186f308505214e5f6bc89446a08", "urls": ["bzzr://59b5652ee4e4a1b5a8f1a8906e14c84af43d636cf5ca0725cc1813aabe4c8c17"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}, "zeppelin/contracts/token/ERC20/BasicToken.sol": {"keccak256": "0x948404468d61ff35ea4194650670408dabd65da7f905a1c16888ab84520bf39e", "urls": ["bzzr://ea75e20f95d7e4e10394fe6bfaa8eee56b4757c2a6f1e8df4180d33afa621935"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}, "zeppelin/contracts/token/ERC20/StandardToken.sol": {"keccak256": "0xd2b344a5259e19ec143074cfa65637a10c40b68395c59808c4af13bccbb2de55", "urls": ["bzzr://d61a01175a7ca1ba9f4403de603c20b897e33ec425aef2d9f8a7f9ddfdfaf5b2"]}}, "version": 1}, "name": "ExtraFinalizeAgent", "ordered_full_dependencies": ["SafeMathLib"], "source_path": "contracts/ExtraFinalizeAgent.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Safe unsigned safe math.\n *\n * https://blog.aragon.one/library-driven-development-in-solidity-2bebcaf88736#.750gwtwli\n *\n * Originally from https://raw.githubusercontent.com/AragonOne/zeppelin-solidity/master/contracts/SafeMathLib.sol\n *\n * Maintained here until merged to mainline zeppelin-solidity.\n *\n */\nlibrary SafeMathLib {\n\n function times(uint a, uint b) returns (uint) {\n uint c = a * b;\n assert(a == 0 || c / a == b);\n return c;\n }\n\n function minus(uint a, uint b) returns (uint) {\n assert(b <= a);\n return a - b;\n }\n\n function plus(uint a, uint b) returns (uint) {\n uint c = a + b;\n assert(c>=a);\n return c;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Interface for defining crowdsale pricing.\n */\ncontract PricingStrategy {\n\n /** Interface declaration. */\n function isPricingStrategy() public constant returns (bool) {\n return true;\n }\n\n /** Self check if all references are correctly set.\n *\n * Checks that pricing strategy matches crowdsale parameters.\n */\n function isSane(address crowdsale) public constant returns (bool) {\n return true;\n }\n\n /**\n * @dev Pricing tells if this is a presale purchase or not.\n @param purchaser Address of the purchaser\n @return False by default, true if a presale purchaser\n */\n function isPresalePurchase(address purchaser) public constant returns (bool) {\n return false;\n }\n\n /**\n * When somebody tries to buy tokens for X eth, calculate how many tokens they get.\n *\n *\n * @param value - What is the value of the transaction send in as wei\n * @param tokensSold - how much tokens have been sold this far\n * @param weiRaised - how much money has been raised this far in the main token sale - this number excludes presale\n * @param msgSender - who is the investor of this transaction\n * @param decimals - how many decimal units the token has\n * @return Amount of tokens the investor receives\n */\n function calculatePrice(uint value, uint weiRaised, uint tokensSold, address msgSender, uint decimals) public constant returns (uint tokenAmount);\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Finalize agent defines what happens at the end of succeseful crowdsale.\n *\n * - Allocate tokens for founders, bounties and community\n * - Make tokens transferable\n * - etc.\n */\ncontract FinalizeAgent {\n\n function isFinalizeAgent() public constant returns(bool) {\n return true;\n }\n\n /** Return true if we can run finalizeCrowdsale() properly.\n *\n * This is a safety check function that doesn't allow crowdsale to begin\n * unless the finalizer has been set up properly.\n */\n function isSane() public constant returns (bool);\n\n /** Called once by crowdsale finalize() if the sale was success. */\n function finalizeCrowdsale();\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n\n/**\n * A token that defines fractional units as decimals.\n */\ncontract FractionalERC20 is ERC20 {\n\n uint public decimals;\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n/*\n * Haltable\n *\n * Abstract contract that allows children to implement an\n * emergency stop mechanism. Differs from Pausable by causing a throw when in halt mode.\n *\n *\n * Originally envisioned in FirstBlood ICO contract.\n */\ncontract Haltable is Ownable {\n bool public halted;\n\n modifier stopInEmergency {\n if (halted) throw;\n _;\n }\n\n modifier stopNonOwnersInEmergency {\n if (halted && msg.sender != owner) throw;\n _;\n }\n\n modifier onlyInEmergency {\n if (!halted) throw;\n _;\n }\n\n // called by the owner on emergency, triggers stopped state\n function halt() external onlyOwner {\n halted = true;\n }\n\n // called by the owner on end of emergency, returns to normal state\n function unhalt() external onlyOwner onlyInEmergency {\n halted = false;\n }\n\n}\n\n\n\n\n\n\n\n/**\n * Crowdsale state machine without buy functionality.\n *\n * Implements basic state machine logic, but leaves out all buy functions,\n * so that subclasses can implement their own buying logic.\n *\n *\n * For the default buy() implementation see Crowdsale.sol.\n */\ncontract CrowdsaleBase is Haltable {\n\n /* Max investment count when we are still allowed to change the multisig address */\n uint public MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE = 5;\n\n using SafeMathLib for uint;\n\n /* The token we are selling */\n FractionalERC20 public token;\n\n /* How we are going to price our offering */\n PricingStrategy public pricingStrategy;\n\n /* Post-success callback */\n FinalizeAgent public finalizeAgent;\n\n /* tokens will be transfered from this address */\n address public multisigWallet;\n\n /* if the funding goal is not reached, investors may withdraw their funds */\n uint public minimumFundingGoal;\n\n /* the UNIX timestamp start date of the crowdsale */\n uint public startsAt;\n\n /* the UNIX timestamp end date of the crowdsale */\n uint public endsAt;\n\n /* the number of tokens already sold through this contract*/\n uint public tokensSold = 0;\n\n /* How many wei of funding we have raised */\n uint public weiRaised = 0;\n\n /* Calculate incoming funds from presale contracts and addresses */\n uint public presaleWeiRaised = 0;\n\n /* How many distinct addresses have invested */\n uint public investorCount = 0;\n\n /* How much wei we have returned back to the contract after a failed crowdfund. */\n uint public loadedRefund = 0;\n\n /* How much wei we have given back to investors.*/\n uint public weiRefunded = 0;\n\n /* Has this crowdsale been finalized */\n bool public finalized;\n\n /** How much ETH each address has invested to this crowdsale */\n mapping (address => uint256) public investedAmountOf;\n\n /** How much tokens this crowdsale has credited for each investor address */\n mapping (address => uint256) public tokenAmountOf;\n\n /** Addresses that are allowed to invest even before ICO offical opens. For testing, for ICO partners, etc. */\n mapping (address => bool) public earlyParticipantWhitelist;\n\n /** This is for manul testing for the interaction from owner wallet. You can set it to any value and inspect this in blockchain explorer to see that crowdsale interaction works. */\n uint public ownerTestValue;\n\n /** State machine\n *\n * - Preparing: All contract initialization calls and variables have not been set yet\n * - Prefunding: We have not passed start time yet\n * - Funding: Active crowdsale\n * - Success: Minimum funding goal reached\n * - Failure: Minimum funding goal not reached before ending time\n * - Finalized: The finalized has been called and succesfully executed\n * - Refunding: Refunds are loaded on the contract for reclaim.\n */\n enum State{Unknown, Preparing, PreFunding, Funding, Success, Failure, Finalized, Refunding}\n\n // A new investment was made\n event Invested(address investor, uint weiAmount, uint tokenAmount, uint128 customerId);\n\n // Refund was processed for a contributor\n event Refund(address investor, uint weiAmount);\n\n // The rules were changed what kind of investments we accept\n event InvestmentPolicyChanged(bool newRequireCustomerId, bool newRequiredSignedAddress, address newSignerAddress);\n\n // Address early participation whitelist status changed\n event Whitelisted(address addr, bool status);\n\n // Crowdsale end time has been changed\n event EndsAtChanged(uint newEndsAt);\n\n function CrowdsaleBase(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal) {\n\n owner = msg.sender;\n\n token = FractionalERC20(_token);\n setPricingStrategy(_pricingStrategy);\n\n multisigWallet = _multisigWallet;\n if(multisigWallet == 0) {\n throw;\n }\n\n if(_start == 0) {\n throw;\n }\n\n startsAt = _start;\n\n if(_end == 0) {\n throw;\n }\n\n endsAt = _end;\n\n // Don't mess the dates\n if(startsAt >= endsAt) {\n throw;\n }\n\n // Minimum funding goal can be zero\n minimumFundingGoal = _minimumFundingGoal;\n }\n\n /**\n * Don't expect to just send in money and get tokens.\n */\n function() payable {\n throw;\n }\n\n /**\n * @dev Make an investment.\n *\n * Crowdsale must be running for one to invest.\n * We must have not pressed the emergency brake.\n *\n * @param receiver The Ethereum address who receives the tokens\n * @param customerId (optional) UUID v4 to track the successful payments on the server side'\n * @param tokenAmount Amount of tokens which be credited to receiver\n *\n * @return tokensBought How mony tokens were bought\n */\n function buyTokens(address receiver, uint128 customerId, uint256 tokenAmount) stopInEmergency internal returns(uint tokensBought) {\n\n // Determine if it's a good time to accept investment from this participant\n if(getState() == State.PreFunding) {\n // Are we whitelisted for early deposit\n if(!earlyParticipantWhitelist[receiver]) {\n throw;\n }\n } else if(getState() == State.Funding) {\n // Retail participants can only come in when the crowdsale is running\n // pass\n } else {\n // Unwanted state\n throw;\n }\n\n uint weiAmount = msg.value;\n\n // Dust transaction\n require(tokenAmount != 0);\n\n if(investedAmountOf[receiver] == 0) {\n // A new investor\n investorCount++;\n }\n\n // Update investor\n investedAmountOf[receiver] = investedAmountOf[receiver].plus(weiAmount);\n tokenAmountOf[receiver] = tokenAmountOf[receiver].plus(tokenAmount);\n\n // Update totals\n weiRaised = weiRaised.plus(weiAmount);\n tokensSold = tokensSold.plus(tokenAmount);\n\n if(pricingStrategy.isPresalePurchase(receiver)) {\n presaleWeiRaised = presaleWeiRaised.plus(weiAmount);\n }\n\n // Check that we did not bust the cap\n require(!isBreakingCap(weiAmount, tokenAmount, weiRaised, tokensSold));\n\n assignTokens(receiver, tokenAmount);\n\n // Pocket the money, or fail the crowdsale if we for some reason cannot send the money to our multisig\n if(!multisigWallet.send(weiAmount)) throw;\n\n // Tell us invest was success\n Invested(receiver, weiAmount, tokenAmount, customerId);\n\n return tokenAmount;\n }\n\n /**\n * @dev Make an investment based on pricing strategy\n *\n * This is a wrapper for buyTokens(), but the amount of tokens receiver will\n * have depends on the pricing strategy used.\n *\n * @param receiver The Ethereum address who receives the tokens\n * @param customerId (optional) UUID v4 to track the successful payments on the server side'\n *\n * @return tokensBought How mony tokens were bought\n */\n function investInternal(address receiver, uint128 customerId) stopInEmergency internal returns(uint tokensBought) {\n return buyTokens(receiver, customerId, pricingStrategy.calculatePrice(msg.value, weiRaised - presaleWeiRaised, tokensSold, msg.sender, token.decimals()));\n }\n\n /**\n * @dev Calculate tokens user will have for their purchase\n *\n * @param weisTotal How much ethers (in wei) the user putssssss in\n * @param pricePerToken What is the price for one token\n *\n * @return tokensTotal which is received tokens, token decimals included\n */\n function calculateTokens(uint256 weisTotal, uint256 pricePerToken) public constant returns(uint tokensTotal) {\n // pricePerToken is how many full tokens, token decimal place included, you get for wei amount.\n // Because, in theory, decimal amount can vary, we do the exponent calculation here,\n // though gas wise using 10**18 constant would be much simpler.\n // Furthermore we could use rough amounts and take in raw wei per tokens amount,\n // but we lose too much accuracy for generic calculations, thus all these are\n // practically implemented as 10**18 fixed points.\n uint multiplier = 10 ** token.decimals();\n return weisTotal.times(multiplier)/pricePerToken;\n }\n\n /**\n * Finalize a succcesful crowdsale.\n *\n * The owner can triggre a call the contract that provides post-crowdsale actions, like releasing the tokens.\n */\n function finalize() public inState(State.Success) onlyOwner stopInEmergency {\n\n // Already finalized\n if(finalized) {\n throw;\n }\n\n // Finalizing is optional. We only call it if we are given a finalizing agent.\n if(address(finalizeAgent) != 0) {\n finalizeAgent.finalizeCrowdsale();\n }\n\n finalized = true;\n }\n\n /**\n * Allow to (re)set finalize agent.\n *\n * Design choice: no state restrictions on setting this, so that we can fix fat finger mistakes.\n */\n function setFinalizeAgent(FinalizeAgent addr) onlyOwner {\n finalizeAgent = addr;\n\n // Don't allow setting bad agent\n if(!finalizeAgent.isFinalizeAgent()) {\n throw;\n }\n }\n\n /**\n * Allow crowdsale owner to close early or extend the crowdsale.\n *\n * This is useful e.g. for a manual soft cap implementation:\n * - after X amount is reached determine manual closing\n *\n * This may put the crowdsale to an invalid state,\n * but we trust owners know what they are doing.\n *\n */\n function setEndsAt(uint time) onlyOwner {\n\n if(now > time) {\n throw; // Don't change past\n }\n\n if(startsAt > time) {\n throw; // Prevent human mistakes\n }\n\n endsAt = time;\n EndsAtChanged(endsAt);\n }\n\n /**\n * Allow to (re)set pricing strategy.\n *\n * Design choice: no state restrictions on the set, so that we can fix fat finger mistakes.\n */\n function setPricingStrategy(PricingStrategy _pricingStrategy) onlyOwner {\n pricingStrategy = _pricingStrategy;\n\n // Don't allow setting bad agent\n if(!pricingStrategy.isPricingStrategy()) {\n throw;\n }\n }\n\n /**\n * Allow to change the team multisig address in the case of emergency.\n *\n * This allows to save a deployed crowdsale wallet in the case the crowdsale has not yet begun\n * (we have done only few test transactions). After the crowdsale is going\n * then multisig address stays locked for the safety reasons.\n */\n function setMultisig(address addr) public onlyOwner {\n\n // Change\n if(investorCount > MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE) {\n throw;\n }\n\n multisigWallet = addr;\n }\n\n /**\n * Allow load refunds back on the contract for the refunding.\n *\n * The team can transfer the funds back on the smart contract in the case the minimum goal was not reached..\n */\n function loadRefund() public payable inState(State.Failure) {\n if(msg.value == 0) throw;\n loadedRefund = loadedRefund.plus(msg.value);\n }\n\n /**\n * Investors can claim refund.\n *\n * Note that any refunds from proxy buyers should be handled separately,\n * and not through this contract.\n */\n function refund() public inState(State.Refunding) {\n uint256 weiValue = investedAmountOf[msg.sender];\n if (weiValue == 0) throw;\n investedAmountOf[msg.sender] = 0;\n weiRefunded = weiRefunded.plus(weiValue);\n Refund(msg.sender, weiValue);\n if (!msg.sender.send(weiValue)) throw;\n }\n\n /**\n * @return true if the crowdsale has raised enough money to be a successful.\n */\n function isMinimumGoalReached() public constant returns (bool reached) {\n return weiRaised >= minimumFundingGoal;\n }\n\n /**\n * Check if the contract relationship looks good.\n */\n function isFinalizerSane() public constant returns (bool sane) {\n return finalizeAgent.isSane();\n }\n\n /**\n * Check if the contract relationship looks good.\n */\n function isPricingSane() public constant returns (bool sane) {\n return pricingStrategy.isSane(address(this));\n }\n\n /**\n * Crowdfund state machine management.\n *\n * We make it a function and do not assign the result to a variable, so there is no chance of the variable being stale.\n */\n function getState() public constant returns (State) {\n if(finalized) return State.Finalized;\n else if (address(finalizeAgent) == 0) return State.Preparing;\n else if (!finalizeAgent.isSane()) return State.Preparing;\n else if (!pricingStrategy.isSane(address(this))) return State.Preparing;\n else if (block.timestamp < startsAt) return State.PreFunding;\n else if (block.timestamp <= endsAt && !isCrowdsaleFull()) return State.Funding;\n else if (isMinimumGoalReached()) return State.Success;\n else if (!isMinimumGoalReached() && weiRaised > 0 && loadedRefund >= weiRaised) return State.Refunding;\n else return State.Failure;\n }\n\n /** This is for manual testing of multisig wallet interaction */\n function setOwnerTestValue(uint val) onlyOwner {\n ownerTestValue = val;\n }\n\n /**\n * Allow addresses to do early participation.\n *\n * TODO: Fix spelling error in the name\n */\n function setEarlyParicipantWhitelist(address addr, bool status) onlyOwner {\n earlyParticipantWhitelist[addr] = status;\n Whitelisted(addr, status);\n }\n\n\n /** Interface marker. */\n function isCrowdsale() public constant returns (bool) {\n return true;\n }\n\n //\n // Modifiers\n //\n\n /** Modified allowing execution only if the crowdsale is currently running. */\n modifier inState(State state) {\n if(getState() != state) throw;\n _;\n }\n\n\n //\n // Abstract functions\n //\n\n /**\n * Check if the current invested breaks our cap rules.\n *\n *\n * The child contract must define their own cap setting rules.\n * We allow a lot of flexibility through different capping strategies (ETH, token count)\n * Called from invest().\n *\n * @param weiAmount The amount of wei the investor tries to invest in the current transaction\n * @param tokenAmount The amount of tokens we try to give to the investor in the current transaction\n * @param weiRaisedTotal What would be our total raised balance after this transaction\n * @param tokensSoldTotal What would be our total sold tokens count after this transaction\n *\n * @return true if taking this investment would break our cap rules\n */\n function isBreakingCap(uint weiAmount, uint tokenAmount, uint weiRaisedTotal, uint tokensSoldTotal) constant returns (bool limitBroken);\n\n /**\n * Check if the current crowdsale is full and we can no longer sell any tokens.\n */\n function isCrowdsaleFull() public constant returns (bool);\n\n /**\n * Create new tokens or transfer issued tokens to the investor depending on the cap model.\n */\n function assignTokens(address receiver, uint tokenAmount) internal;\n}\n\n\n\n/**\n * Abstract base contract for token sales with the default buy entry points.\n *\n * Handle\n * - start and end dates\n * - accepting investments\n * - minimum funding goal and refund\n * - various statistics during the crowdfund\n * - different pricing strategies\n * - different investment policies (require server side customer id, allow only whitelisted addresses)\n *\n * Does not Handle\n *\n * - Token allocation (minting vs. transfer)\n * - Cap rules\n *\n */\ncontract Crowdsale is CrowdsaleBase {\n\n /* Do we need to have unique contributor id for each customer */\n bool public requireCustomerId;\n\n /**\n * Do we verify that contributor has been cleared on the server side (accredited investors only).\n * This method was first used in FirstBlood crowdsale to ensure all contributors have accepted terms on sale (on the web).\n */\n bool public requiredSignedAddress;\n\n /* Server side address that signed allowed contributors (Ethereum addresses) that can participate the crowdsale */\n address public signerAddress;\n\n function Crowdsale(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal) CrowdsaleBase(_token, _pricingStrategy, _multisigWallet, _start, _end, _minimumFundingGoal) {\n }\n\n /**\n * Preallocate tokens for the early investors.\n *\n * Preallocated tokens have been sold before the actual crowdsale opens.\n * This function mints the tokens and moves the crowdsale needle.\n *\n * Investor count is not handled; it is assumed this goes for multiple investors\n * and the token distribution happens outside the smart contract flow.\n *\n * No money is exchanged, as the crowdsale team already have received the payment.\n *\n * @param fullTokens tokens as full tokens - decimal places added internally\n * @param weiPrice Price of a single full token in wei\n *\n */\n function preallocate(address receiver, uint fullTokens, uint weiPrice) public onlyOwner {\n\n uint tokenAmount = fullTokens * 10**token.decimals();\n uint weiAmount = weiPrice * fullTokens; // This can be also 0, we give out tokens for free\n\n weiRaised = weiRaised.plus(weiAmount);\n tokensSold = tokensSold.plus(tokenAmount);\n\n investedAmountOf[receiver] = investedAmountOf[receiver].plus(weiAmount);\n tokenAmountOf[receiver] = tokenAmountOf[receiver].plus(tokenAmount);\n\n assignTokens(receiver, tokenAmount);\n\n // Tell us invest was success\n Invested(receiver, weiAmount, tokenAmount, 0);\n }\n\n /**\n * Allow anonymous contributions to this crowdsale.\n */\n function investWithSignedAddress(address addr, uint128 customerId, uint8 v, bytes32 r, bytes32 s) public payable {\n bytes32 hash = sha256(addr);\n if (ecrecover(hash, v, r, s) != signerAddress) throw;\n if(customerId == 0) throw; // UUIDv4 sanity check\n investInternal(addr, customerId);\n }\n\n /**\n * Track who is the customer making the payment so we can send thank you email.\n */\n function investWithCustomerId(address addr, uint128 customerId) public payable {\n if(requiredSignedAddress) throw; // Crowdsale allows only server-side signed participants\n if(customerId == 0) throw; // UUIDv4 sanity check\n investInternal(addr, customerId);\n }\n\n /**\n * Allow anonymous contributions to this crowdsale.\n */\n function invest(address addr) public payable {\n if(requireCustomerId) throw; // Crowdsale needs to track participants for thank you email\n if(requiredSignedAddress) throw; // Crowdsale allows only server-side signed participants\n investInternal(addr, 0);\n }\n\n /**\n * Invest to tokens, recognize the payer and clear his address.\n *\n */\n function buyWithSignedAddress(uint128 customerId, uint8 v, bytes32 r, bytes32 s) public payable {\n investWithSignedAddress(msg.sender, customerId, v, r, s);\n }\n\n /**\n * Invest to tokens, recognize the payer.\n *\n */\n function buyWithCustomerIdWithChecksum(uint128 customerId, bytes1 checksum) public payable {\n // see customerid.py\n if (bytes1(sha3(customerId)) != checksum) throw;\n investWithCustomerId(msg.sender, customerId);\n }\n\n /**\n * Legacy API signature.\n */\n function buyWithCustomerId(uint128 customerId) public payable {\n investWithCustomerId(msg.sender, customerId);\n }\n\n /**\n * The basic entry point to participate the crowdsale process.\n *\n * Pay for funding, get invested tokens back in the sender address.\n */\n function buy() public payable {\n invest(msg.sender);\n }\n\n /**\n * Set policy do we need to have server-side customer ids for the investments.\n *\n */\n function setRequireCustomerId(bool value) onlyOwner {\n requireCustomerId = value;\n InvestmentPolicyChanged(requireCustomerId, requiredSignedAddress, signerAddress);\n }\n\n /**\n * Set policy if all investors must be cleared on the server side first.\n *\n * This is e.g. for the accredited investor clearing.\n *\n */\n function setRequireSignedAddress(bool value, address _signerAddress) onlyOwner {\n requiredSignedAddress = value;\n signerAddress = _signerAddress;\n InvestmentPolicyChanged(requireCustomerId, requiredSignedAddress, signerAddress);\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n assert(c / a == b);\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n\n\n\n/**\n * @title Basic token\n * @dev Basic version of StandardToken, with no allowances.\n */\ncontract BasicToken is ERC20Basic {\n using SafeMath for uint256;\n\n mapping(address => uint256) balances;\n\n uint256 totalSupply_;\n\n /**\n * @dev total number of tokens in existence\n */\n function totalSupply() public view returns (uint256) {\n return totalSupply_;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param _to The address to transfer to.\n * @param _value The amount to be transferred.\n */\n function transfer(address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[msg.sender]);\n\n // SafeMath.sub will throw if there is not enough balance.\n balances[msg.sender] = balances[msg.sender].sub(_value);\n balances[_to] = balances[_to].add(_value);\n Transfer(msg.sender, _to, _value);\n return true;\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param _owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address _owner) public view returns (uint256 balance) {\n return balances[_owner];\n }\n\n}\n\n\n\n\n/**\n * @title Standard ERC20 token\n *\n * @dev Implementation of the basic standard token.\n * @dev https://github.com/ethereum/EIPs/issues/20\n * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol\n */\ncontract StandardToken is ERC20, BasicToken {\n\n mapping (address => mapping (address => uint256)) internal allowed;\n\n\n /**\n * @dev Transfer tokens from one address to another\n * @param _from address The address which you want to send tokens from\n * @param _to address The address which you want to transfer to\n * @param _value uint256 the amount of tokens to be transferred\n */\n function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[_from]);\n require(_value <= allowed[_from][msg.sender]);\n\n balances[_from] = balances[_from].sub(_value);\n balances[_to] = balances[_to].add(_value);\n allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);\n Transfer(_from, _to, _value);\n return true;\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n *\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param _spender The address which will spend the funds.\n * @param _value The amount of tokens to be spent.\n */\n function approve(address _spender, uint256 _value) public returns (bool) {\n allowed[msg.sender][_spender] = _value;\n Approval(msg.sender, _spender, _value);\n return true;\n }\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param _owner address The address which owns the funds.\n * @param _spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address _owner, address _spender) public view returns (uint256) {\n return allowed[_owner][_spender];\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(address _spender, uint _addedValue) public returns (bool) {\n allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {\n uint oldValue = allowed[msg.sender][_spender];\n if (_subtractedValue > oldValue) {\n allowed[msg.sender][_spender] = 0;\n } else {\n allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);\n }\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\ncontract Recoverable is Ownable {\n\n /// @dev Empty constructor (for now)\n function Recoverable() {\n }\n\n /// @dev This will be invoked by the owner, when owner wants to rescue tokens\n /// @param token Token which will we rescue to the owner from the contract\n function recoverTokens(ERC20Basic token) onlyOwner public {\n token.transfer(owner, tokensToBeReturned(token));\n }\n\n /// @dev Interface function, can be overwritten by the superclass\n /// @param token Token which balance we will check and return\n /// @return The amount of tokens (in smallest denominator) the contract owns\n function tokensToBeReturned(ERC20Basic token) public returns (uint) {\n return token.balanceOf(this);\n }\n}\n\n\n\n/**\n * Standard EIP-20 token with an interface marker.\n *\n * @notice Interface marker is used by crowdsale contracts to validate that addresses point a good token contract.\n *\n */\ncontract StandardTokenExt is StandardToken, Recoverable {\n\n /* Interface declaration */\n function isToken() public constant returns (bool weAre) {\n return true;\n }\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Upgrade agent interface inspired by Lunyr.\n *\n * Upgrade agent transfers tokens to a new contract.\n * Upgrade agent itself can be the token contract, or just a middle man contract doing the heavy lifting.\n */\ncontract UpgradeAgent {\n\n uint public originalSupply;\n\n /** Interface marker */\n function isUpgradeAgent() public constant returns (bool) {\n return true;\n }\n\n function upgradeFrom(address _from, uint256 _value) public;\n\n}\n\n\n/**\n * A token upgrade mechanism where users can opt-in amount of tokens to the next smart contract revision.\n *\n * First envisioned by Golem and Lunyr projects.\n */\ncontract UpgradeableToken is StandardTokenExt {\n\n /** Contract / person who can set the upgrade path. This can be the same as team multisig wallet, as what it is with its default value. */\n address public upgradeMaster;\n\n /** The next contract where the tokens will be migrated. */\n UpgradeAgent public upgradeAgent;\n\n /** How many tokens we have upgraded by now. */\n uint256 public totalUpgraded;\n\n /**\n * Upgrade states.\n *\n * - NotAllowed: The child contract has not reached a condition where the upgrade can bgun\n * - WaitingForAgent: Token allows upgrade, but we don't have a new agent yet\n * - ReadyToUpgrade: The agent is set, but not a single token has been upgraded yet\n * - Upgrading: Upgrade agent is set and the balance holders can upgrade their tokens\n *\n */\n enum UpgradeState {Unknown, NotAllowed, WaitingForAgent, ReadyToUpgrade, Upgrading}\n\n /**\n * Somebody has upgraded some of his tokens.\n */\n event Upgrade(address indexed _from, address indexed _to, uint256 _value);\n\n /**\n * New upgrade agent available.\n */\n event UpgradeAgentSet(address agent);\n\n /**\n * Do not allow construction without upgrade master set.\n */\n function UpgradeableToken(address _upgradeMaster) {\n upgradeMaster = _upgradeMaster;\n }\n\n /**\n * Allow the token holder to upgrade some of their tokens to a new contract.\n */\n function upgrade(uint256 value) public {\n\n UpgradeState state = getUpgradeState();\n if(!(state == UpgradeState.ReadyToUpgrade || state == UpgradeState.Upgrading)) {\n // Called in a bad state\n throw;\n }\n\n // Validate input value.\n if (value == 0) throw;\n\n balances[msg.sender] = balances[msg.sender].sub(value);\n\n // Take tokens out from circulation\n totalSupply_ = totalSupply_.sub(value);\n totalUpgraded = totalUpgraded.add(value);\n\n // Upgrade agent reissues the tokens\n upgradeAgent.upgradeFrom(msg.sender, value);\n Upgrade(msg.sender, upgradeAgent, value);\n }\n\n /**\n * Set an upgrade agent that handles\n */\n function setUpgradeAgent(address agent) external {\n\n if(!canUpgrade()) {\n // The token is not yet in a state that we could think upgrading\n throw;\n }\n\n if (agent == 0x0) throw;\n // Only a master can designate the next agent\n if (msg.sender != upgradeMaster) throw;\n // Upgrade has already begun for an agent\n if (getUpgradeState() == UpgradeState.Upgrading) throw;\n\n upgradeAgent = UpgradeAgent(agent);\n\n // Bad interface\n if(!upgradeAgent.isUpgradeAgent()) throw;\n // Make sure that token supplies match in source and target\n if (upgradeAgent.originalSupply() != totalSupply_) throw;\n\n UpgradeAgentSet(upgradeAgent);\n }\n\n /**\n * Get the state of the token upgrade.\n */\n function getUpgradeState() public constant returns(UpgradeState) {\n if(!canUpgrade()) return UpgradeState.NotAllowed;\n else if(address(upgradeAgent) == 0x00) return UpgradeState.WaitingForAgent;\n else if(totalUpgraded == 0) return UpgradeState.ReadyToUpgrade;\n else return UpgradeState.Upgrading;\n }\n\n /**\n * Change the upgrade master.\n *\n * This allows us to set a new owner for the upgrade mechanism.\n */\n function setUpgradeMaster(address master) public {\n if (master == 0x0) throw;\n if (msg.sender != upgradeMaster) throw;\n upgradeMaster = master;\n }\n\n /**\n * Child contract can enable to provide the condition when the upgrade can begun.\n */\n function canUpgrade() public constant returns(bool) {\n return true;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n/**\n * Define interface for releasing the token transfer after a successful crowdsale.\n */\ncontract ReleasableToken is StandardTokenExt {\n\n /* The finalizer contract that allows unlift the transfer limits on this token */\n address public releaseAgent;\n\n /** A crowdsale contract can release us to the wild if ICO success. If false we are are in transfer lock up period.*/\n bool public released = false;\n\n /** Map of agents that are allowed to transfer tokens regardless of the lock down period. These are crowdsale contracts and possible the team multisig itself. */\n mapping (address => bool) public transferAgents;\n\n /**\n * Limit token transfer until the crowdsale is over.\n *\n */\n modifier canTransfer(address _sender) {\n\n if(!released) {\n if(!transferAgents[_sender]) {\n throw;\n }\n }\n\n _;\n }\n\n /**\n * Set the contract that can call release and make the token transferable.\n *\n * Design choice. Allow reset the release agent to fix fat finger mistakes.\n */\n function setReleaseAgent(address addr) onlyOwner inReleaseState(false) public {\n\n // We don't do interface check here as we might want to a normal wallet address to act as a release agent\n releaseAgent = addr;\n }\n\n /**\n * Owner can allow a particular address (a crowdsale contract) to transfer tokens despite the lock up period.\n */\n function setTransferAgent(address addr, bool state) onlyOwner inReleaseState(false) public {\n transferAgents[addr] = state;\n }\n\n /**\n * One way function to release the tokens to the wild.\n *\n * Can be called only from the release agent that is the final ICO contract. It is only called if the crowdsale has been success (first milestone reached).\n */\n function releaseTokenTransfer() public onlyReleaseAgent {\n released = true;\n }\n\n /** The function can be called only before or after the tokens have been releasesd */\n modifier inReleaseState(bool releaseState) {\n if(releaseState != released) {\n throw;\n }\n _;\n }\n\n /** The function can be called only by a whitelisted release agent. */\n modifier onlyReleaseAgent() {\n if(msg.sender != releaseAgent) {\n throw;\n }\n _;\n }\n\n function transfer(address _to, uint _value) canTransfer(msg.sender) returns (bool success) {\n // Call StandardToken.transfer()\n return super.transfer(_to, _value);\n }\n\n function transferFrom(address _from, address _to, uint _value) canTransfer(_from) returns (bool success) {\n // Call StandardToken.transferForm()\n return super.transferFrom(_from, _to, _value);\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n\n/**\n * A token that can increase its supply by another contract.\n *\n * This allows uncapped crowdsale by dynamically increasing the supply when money pours in.\n * Only mint agents, contracts whitelisted by owner, can mint new tokens.\n *\n */\ncontract MintableToken is StandardTokenExt {\n\n using SafeMathLib for uint;\n\n bool public mintingFinished = false;\n\n /** List of agents that are allowed to create new tokens */\n mapping (address => bool) public mintAgents;\n\n event MintingAgentChanged(address addr, bool state);\n event Minted(address receiver, uint amount);\n\n /**\n * Create new tokens and allocate them to an address..\n *\n * Only callably by a crowdsale contract (mint agent).\n */\n function mint(address receiver, uint amount) onlyMintAgent canMint public {\n totalSupply_ = totalSupply_.plus(amount);\n balances[receiver] = balances[receiver].plus(amount);\n\n // This will make the mint transaction apper in EtherScan.io\n // We can remove this after there is a standardized minting event\n Transfer(0, receiver, amount);\n }\n\n /**\n * Owner can allow a crowdsale contract to mint new tokens.\n */\n function setMintAgent(address addr, bool state) onlyOwner canMint public {\n mintAgents[addr] = state;\n MintingAgentChanged(addr, state);\n }\n\n modifier onlyMintAgent() {\n // Only crowdsale contracts are allowed to mint new tokens\n if(!mintAgents[msg.sender]) {\n throw;\n }\n _;\n }\n\n /** Make sure we are not done yet. */\n modifier canMint() {\n if(mintingFinished) throw;\n _;\n }\n}\n\n\n\n/**\n * A crowdsaled token.\n *\n * An ERC-20 token designed specifically for crowdsales with investor protection and further development path.\n *\n * - The token transfer() is disabled until the crowdsale is over\n * - The token contract gives an opt-in upgrade path to a new contract\n * - The same token can be part of several crowdsales through approve() mechanism\n * - The token can be capped (supply set in the constructor) or uncapped (crowdsale contract can mint new tokens)\n *\n */\ncontract CrowdsaleToken is ReleasableToken, MintableToken, UpgradeableToken {\n\n /** Name and symbol were updated. */\n event UpdatedTokenInformation(string newName, string newSymbol);\n\n string public name;\n\n string public symbol;\n\n uint public decimals;\n\n /**\n * Construct the token.\n *\n * This token must be created through a team multisig wallet, so that it is owned by that wallet.\n *\n * @param _name Token name\n * @param _symbol Token symbol - should be all caps\n * @param _initialSupply How many tokens we start with\n * @param _decimals Number of decimal places\n * @param _mintable Are new tokens created over the crowdsale or do we distribute only the initial supply? Note that when the token becomes transferable the minting always ends.\n */\n function CrowdsaleToken(string _name, string _symbol, uint _initialSupply, uint _decimals, bool _mintable)\n UpgradeableToken(msg.sender) {\n\n // Create any address, can be transferred\n // to team multisig via changeOwner(),\n // also remember to call setUpgradeMaster()\n owner = msg.sender;\n\n name = _name;\n symbol = _symbol;\n\n totalSupply_ = _initialSupply;\n\n decimals = _decimals;\n\n // Create initially all balance on the team multisig\n balances[owner] = totalSupply_;\n\n if(totalSupply_ > 0) {\n Minted(owner, totalSupply_);\n }\n\n // No more new supply allowed after the token creation\n if(!_mintable) {\n mintingFinished = true;\n if(totalSupply_ == 0) {\n throw; // Cannot create a token without supply and no minting\n }\n }\n }\n\n /**\n * When token is released to be transferable, enforce no new tokens can be created.\n */\n function releaseTokenTransfer() public onlyReleaseAgent {\n mintingFinished = true;\n super.releaseTokenTransfer();\n }\n\n /**\n * Allow upgrade agent functionality kick in only if the crowdsale was success.\n */\n function canUpgrade() public constant returns(bool) {\n return released && super.canUpgrade();\n }\n\n /**\n * Owner can update token information here.\n *\n * It is often useful to conceal the actual token association, until\n * the token operations, like central issuance or reissuance have been completed.\n *\n * This function allows the token owner to rename the token after the operations\n * have been completed and then point the audience to use the token contract.\n */\n function setTokenInformation(string _name, string _symbol) onlyOwner {\n name = _name;\n symbol = _symbol;\n\n UpdatedTokenInformation(name, symbol);\n }\n\n}\n\n\n\n/**\n * At the end of the successful crowdsale allocate % bonus of tokens to the team.\n *\n * Do not unlock the tokens.\n *\n * BonusAllocationFinal must be set as the minting agent for the MintableToken.\n *\n */\ncontract ExtraFinalizeAgent is FinalizeAgent {\n\n using SafeMathLib for uint;\n\n CrowdsaleToken public token;\n Crowdsale public crowdsale;\n\n /** Total percent of tokens minted to the team at the end of the sale as base points (0.0001) */\n uint public bonusBasePoints;\n\n /** Where we move the tokens at the end of the sale. */\n address public teamMultisig;\n\n /* How much bonus tokens we allocated */\n uint public allocatedBonus;\n\n /* How many tokens other finalizers will allocate and we do not count these in */\n uint public accountedTokenSales;\n\n function ExtraFinalizeAgent(CrowdsaleToken _token, Crowdsale _crowdsale, uint _bonusBasePoints, address _teamMultisig, uint _accountedTokenSales) {\n token = _token;\n crowdsale = _crowdsale;\n\n if(address(crowdsale) == 0) {\n throw;\n }\n\n teamMultisig = _teamMultisig;\n if(address(teamMultisig) == 0) {\n throw;\n }\n\n accountedTokenSales = _accountedTokenSales;\n }\n\n /* Can we run finalize properly */\n function isSane() public constant returns (bool) {\n return (token.mintAgents(address(this)) == true);\n }\n\n /** Called once by crowdsale finalize() if the sale was success. */\n function finalizeCrowdsale() {\n if(msg.sender != address(crowdsale)) {\n throw;\n }\n\n // How many % of tokens the founders and others get\n uint tokensSold = crowdsale.tokensSold().minus(accountedTokenSales);\n allocatedBonus = tokensSold.times(bonusBasePoints) / 10000;\n\n // move tokens to the team multisig wallet\n token.mint(teamMultisig, allocatedBonus);\n\n }\n\n}\n"}, "FinalizeAgent": {"abi": [{"constant": false, "inputs": [], "name": "finalizeCrowdsale", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "isFinalizeAgent", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isSane", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}], "bytecode": "0x", "bytecode_runtime": "0x", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": null, "name": "FinalizeAgent", "ordered_full_dependencies": [], "source_path": "contracts/FinalizeAgent.sol"}, "FlatPricing": {"abi": [{"constant": true, "inputs": [], "name": "isPricingStrategy", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "value", "type": "uint256"}, {"name": "weiRaised", "type": "uint256"}, {"name": "tokensSold", "type": "uint256"}, {"name": "msgSender", "type": "address"}, {"name": "decimals", "type": "uint256"}], "name": "calculatePrice", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "oneTokenInWei", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "crowdsale", "type": "address"}], "name": "isSane", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "purchaser", "type": "address"}], "name": "isPresalePurchase", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [{"name": "_oneTokenInWei", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}], "bytecode": "0x608060405234801561001057600080fd5b5060405160208061029d83398101604052516000811161002f57600080fd5b60005561025c806100416000396000f30060806040526004361061006c5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166304bbc255811461007157806318a4155e1461009a57806384e3ac94146100e65780638e768288146100fb578063f14ae17d14610129575b600080fd5b34801561007d57600080fd5b50610086610157565b604080519115158252519081900360200190f35b3480156100a657600080fd5b506100d460043560243560443573ffffffffffffffffffffffffffffffffffffffff6064351660843561015c565b60408051918252519081900360200190f35b3480156100f257600080fd5b506100d461021e565b34801561010757600080fd5b5061008673ffffffffffffffffffffffffffffffffffffffff60043516610224565b34801561013557600080fd5b5061008673ffffffffffffffffffffffffffffffffffffffff6004351661022a565b600190565b60008082600a0a90506000548773__contracts/SafeMathLib.sol:SafeMathLi__631d3b9edf9091846040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b1580156101dd57600080fd5b505af41580156101f1573d6000803e3d6000fd5b505050506040513d602081101561020757600080fd5b505181151561021257fe5b04979650505050505050565b60005481565b50600190565b506000905600a165627a7a72305820f55a662027b31e3bcddbdc707b9eb49b47074100692dc0a03e04d7fefeae59ac0029", "bytecode_runtime": "0x60806040526004361061006c5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166304bbc255811461007157806318a4155e1461009a57806384e3ac94146100e65780638e768288146100fb578063f14ae17d14610129575b600080fd5b34801561007d57600080fd5b50610086610157565b604080519115158252519081900360200190f35b3480156100a657600080fd5b506100d460043560243560443573ffffffffffffffffffffffffffffffffffffffff6064351660843561015c565b60408051918252519081900360200190f35b3480156100f257600080fd5b506100d461021e565b34801561010757600080fd5b5061008673ffffffffffffffffffffffffffffffffffffffff60043516610224565b34801561013557600080fd5b5061008673ffffffffffffffffffffffffffffffffffffffff6004351661022a565b600190565b60008082600a0a90506000548773__contracts/SafeMathLib.sol:SafeMathLi__631d3b9edf9091846040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b1580156101dd57600080fd5b505af41580156101f1573d6000803e3d6000fd5b505050506040513d602081101561020757600080fd5b505181151561021257fe5b04979650505050505050565b60005481565b50600190565b506000905600a165627a7a72305820f55a662027b31e3bcddbdc707b9eb49b47074100692dc0a03e04d7fefeae59ac0029", "direct_dependencies": ["SafeMathLib"], "full_dependencies": ["SafeMathLib"], "linkrefs": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 856}], "linkrefs_runtime": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 726}], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": true, "inputs": [], "name": "isPricingStrategy", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "value", "type": "uint256"}, {"name": "weiRaised", "type": "uint256"}, {"name": "tokensSold", "type": "uint256"}, {"name": "msgSender", "type": "address"}, {"name": "decimals", "type": "uint256"}], "name": "calculatePrice", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "oneTokenInWei", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "crowdsale", "type": "address"}], "name": "isSane", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "purchaser", "type": "address"}], "name": "isPresalePurchase", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [{"name": "_oneTokenInWei", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}], "devdoc": {"methods": {"isPresalePurchase(address)": {"details": "Pricing tells if this is a presale purchase or not.", "params": {"purchaser": "Address of the purchaser"}, "return": "False by default, true if a presale purchaser"}}}, "userdoc": {"methods": {"calculatePrice(uint256,uint256,uint256,address,uint256)": {"notice": "Calculate the current price for buy in amount. "}, "isPricingStrategy()": {"notice": "Interface declaration. "}, "isSane(address)": {"notice": "Self check if all references are correctly set. * Checks that pricing strategy matches crowdsale parameters."}}}}, "settings": {"compilationTarget": {"contracts/FlatPricing.sol": "FlatPricing"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/FlatPricing.sol": {"keccak256": "0xaa3193a3c1759e4c9248c18c286c6b19e10d84f7a8dc535ae7ce31d523beb6ea", "urls": ["bzzr://4abe5f57bebd105778acadd3cee768b48c5af94909243f59aca6607567c45b14"]}, "contracts/PricingStrategy.sol": {"keccak256": "0x8df5093b7d07168ad994f9176de0bd2268f6563b1e8a3a448d8cfe7fe246c628", "urls": ["bzzr://ef5c944d51f739ab34e2c951d6ac82a7152e6bb844058a8e57bae52c14cbe16b"]}, "contracts/SafeMathLib.sol": {"keccak256": "0x501bfe31e274b9a5591f7c540bdced4d4312e27d4f19599147c9bbca3d9c6b18", "urls": ["bzzr://a80935ebddb06c247d71372d4e5833ee029f08633bd0fe4a274a57009567e5b9"]}}, "version": 1}, "name": "FlatPricing", "ordered_full_dependencies": ["SafeMathLib"], "source_path": "contracts/FlatPricing.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Interface for defining crowdsale pricing.\n */\ncontract PricingStrategy {\n\n /** Interface declaration. */\n function isPricingStrategy() public constant returns (bool) {\n return true;\n }\n\n /** Self check if all references are correctly set.\n *\n * Checks that pricing strategy matches crowdsale parameters.\n */\n function isSane(address crowdsale) public constant returns (bool) {\n return true;\n }\n\n /**\n * @dev Pricing tells if this is a presale purchase or not.\n @param purchaser Address of the purchaser\n @return False by default, true if a presale purchaser\n */\n function isPresalePurchase(address purchaser) public constant returns (bool) {\n return false;\n }\n\n /**\n * When somebody tries to buy tokens for X eth, calculate how many tokens they get.\n *\n *\n * @param value - What is the value of the transaction send in as wei\n * @param tokensSold - how much tokens have been sold this far\n * @param weiRaised - how much money has been raised this far in the main token sale - this number excludes presale\n * @param msgSender - who is the investor of this transaction\n * @param decimals - how many decimal units the token has\n * @return Amount of tokens the investor receives\n */\n function calculatePrice(uint value, uint weiRaised, uint tokensSold, address msgSender, uint decimals) public constant returns (uint tokenAmount);\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Safe unsigned safe math.\n *\n * https://blog.aragon.one/library-driven-development-in-solidity-2bebcaf88736#.750gwtwli\n *\n * Originally from https://raw.githubusercontent.com/AragonOne/zeppelin-solidity/master/contracts/SafeMathLib.sol\n *\n * Maintained here until merged to mainline zeppelin-solidity.\n *\n */\nlibrary SafeMathLib {\n\n function times(uint a, uint b) returns (uint) {\n uint c = a * b;\n assert(a == 0 || c / a == b);\n return c;\n }\n\n function minus(uint a, uint b) returns (uint) {\n assert(b <= a);\n return a - b;\n }\n\n function plus(uint a, uint b) returns (uint) {\n uint c = a + b;\n assert(c>=a);\n return c;\n }\n\n}\n\n\n/**\n * Fixed crowdsale pricing - everybody gets the same price.\n */\ncontract FlatPricing is PricingStrategy {\n\n using SafeMathLib for uint;\n\n /* How many weis one token costs */\n uint public oneTokenInWei;\n\n function FlatPricing(uint _oneTokenInWei) {\n require(_oneTokenInWei > 0);\n oneTokenInWei = _oneTokenInWei;\n }\n\n /**\n * Calculate the current price for buy in amount.\n *\n */\n function calculatePrice(uint value, uint weiRaised, uint tokensSold, address msgSender, uint decimals) public constant returns (uint) {\n uint multiplier = 10 ** decimals;\n return value.times(multiplier) / oneTokenInWei;\n }\n\n}\n"}, "FractionalERC20": {"abi": [{"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "approve", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "from", "type": "address"}, {"name": "to", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "decimals", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "who", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "to", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "owner", "type": "address"}, {"name": "spender", "type": "address"}], "name": "allowance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}, {"indexed": true, "name": "spender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "bytecode": "0x", "bytecode_runtime": "0x", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": null, "name": "FractionalERC20", "ordered_full_dependencies": [], "source_path": "contracts/FractionalERC20.sol"}, "GasStipendTester": {"abi": [{"constant": false, "inputs": [{"name": "target", "type": "address"}], "name": "transfer", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}], "bytecode": "0x608060405234801561001057600080fd5b5060d58061001f6000396000f300608060405260043610603e5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416631a69523081146043575b600080fd5b606273ffffffffffffffffffffffffffffffffffffffff600435166064565b005b60405173ffffffffffffffffffffffffffffffffffffffff8216903480156108fc02916000818181858888f1935050505015801560a5573d6000803e3d6000fd5b50505600a165627a7a723058205db514ece666d745fc9e88f2a3f9d782ea9269e2c772af99e4b0ffbcce79478e0029", "bytecode_runtime": "0x608060405260043610603e5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416631a69523081146043575b600080fd5b606273ffffffffffffffffffffffffffffffffffffffff600435166064565b005b60405173ffffffffffffffffffffffffffffffffffffffff8216903480156108fc02916000818181858888f1935050505015801560a5573d6000803e3d6000fd5b50505600a165627a7a723058205db514ece666d745fc9e88f2a3f9d782ea9269e2c772af99e4b0ffbcce79478e0029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": false, "inputs": [{"name": "target", "type": "address"}], "name": "transfer", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}], "devdoc": {"author": "TokenMarket Ltd. / Ville Sundell * This is for testing will the fallback function of \"target\" fit to the gas stipend.", "methods": {}}, "userdoc": {"methods": {}}}, "settings": {"compilationTarget": {"contracts/test/GasStipendTester.sol": "GasStipendTester"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/test/GasStipendTester.sol": {"keccak256": "0xdec947905b8993a22303c11c1c9422547c4f01501c4e7dc3df7827dcf1cc1001", "urls": ["bzzr://7d9227979a0730cdd3a7f7615baa52075a6d7bd90777054b00dece82306ac8d9"]}}, "version": 1}, "name": "GasStipendTester", "ordered_full_dependencies": [], "source_path": "contracts/test/GasStipendTester.sol", "source": "/**\n * This smart contract code is Copyright 2018 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * @dev Send ethers with transfer()\n * @author TokenMarket Ltd. / Ville Sundell \n *\n * This is for testing will the fallback function of \"target\" fit to the\n * gas stipend.\n */\n\ncontract GasStipendTester {\n function transfer(address target) external payable {\n target.transfer(msg.value);\n }\n}\n"}, "Haltable": {"abi": [{"constant": false, "inputs": [], "name": "halt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "halted", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "unhalt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "bytecode": "0x608060405260008054600160a060020a0319163317905561032b806100256000396000f30060806040526004361061006c5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416635ed7ca5b81146100715780638da5cb5b14610088578063b9b8af0b146100c6578063cb3e64fd146100ef578063f2fde38b14610104575b600080fd5b34801561007d57600080fd5b50610086610132565b005b34801561009457600080fd5b5061009d61018d565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b3480156100d257600080fd5b506100db6101a9565b604080519115158252519081900360200190f35b3480156100fb57600080fd5b506100866101ca565b34801561011057600080fd5b5061008673ffffffffffffffffffffffffffffffffffffffff60043516610237565b60005473ffffffffffffffffffffffffffffffffffffffff16331461015657600080fd5b6000805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60005474010000000000000000000000000000000000000000900460ff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1633146101ee57600080fd5b60005474010000000000000000000000000000000000000000900460ff16151561021757600080fd5b6000805474ff000000000000000000000000000000000000000019169055565b60005473ffffffffffffffffffffffffffffffffffffffff16331461025b57600080fd5b73ffffffffffffffffffffffffffffffffffffffff8116151561027d57600080fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff191673ffffffffffffffffffffffffffffffffffffffff929092169190911790555600a165627a7a72305820332a1e13909c008c1ec5c01e7bfda263f68a5146ff1cd054d7d4f7a21c3f1f670029", "bytecode_runtime": "0x60806040526004361061006c5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416635ed7ca5b81146100715780638da5cb5b14610088578063b9b8af0b146100c6578063cb3e64fd146100ef578063f2fde38b14610104575b600080fd5b34801561007d57600080fd5b50610086610132565b005b34801561009457600080fd5b5061009d61018d565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b3480156100d257600080fd5b506100db6101a9565b604080519115158252519081900360200190f35b3480156100fb57600080fd5b506100866101ca565b34801561011057600080fd5b5061008673ffffffffffffffffffffffffffffffffffffffff60043516610237565b60005473ffffffffffffffffffffffffffffffffffffffff16331461015657600080fd5b6000805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60005474010000000000000000000000000000000000000000900460ff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1633146101ee57600080fd5b60005474010000000000000000000000000000000000000000900460ff16151561021757600080fd5b6000805474ff000000000000000000000000000000000000000019169055565b60005473ffffffffffffffffffffffffffffffffffffffff16331461025b57600080fd5b73ffffffffffffffffffffffffffffffffffffffff8116151561027d57600080fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff191673ffffffffffffffffffffffffffffffffffffffff929092169190911790555600a165627a7a72305820332a1e13909c008c1ec5c01e7bfda263f68a5146ff1cd054d7d4f7a21c3f1f670029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": false, "inputs": [], "name": "halt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "halted", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "unhalt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "devdoc": {"methods": {"transferOwnership(address)": {"details": "Allows the current owner to transfer control of the contract to a newOwner.", "params": {"newOwner": "The address to transfer ownership to."}}}}, "userdoc": {"methods": {}}}, "settings": {"compilationTarget": {"contracts/Haltable.sol": "Haltable"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/Haltable.sol": {"keccak256": "0x265dcf25e7c9ab4b6eecd2181f1b71334a1b5381a60f8db7d9526dab120f4b70", "urls": ["bzzr://d522e00fa9e075941469dd81738b59fdb99ce3c12cdc39e33abe40b588c4da9b"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}}, "version": 1}, "name": "Haltable", "ordered_full_dependencies": [], "source_path": "contracts/Haltable.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n/*\n * Haltable\n *\n * Abstract contract that allows children to implement an\n * emergency stop mechanism. Differs from Pausable by causing a throw when in halt mode.\n *\n *\n * Originally envisioned in FirstBlood ICO contract.\n */\ncontract Haltable is Ownable {\n bool public halted;\n\n modifier stopInEmergency {\n if (halted) throw;\n _;\n }\n\n modifier stopNonOwnersInEmergency {\n if (halted && msg.sender != owner) throw;\n _;\n }\n\n modifier onlyInEmergency {\n if (!halted) throw;\n _;\n }\n\n // called by the owner on emergency, triggers stopped state\n function halt() external onlyOwner {\n halted = true;\n }\n\n // called by the owner on end of emergency, returns to normal state\n function unhalt() external onlyOwner onlyInEmergency {\n halted = false;\n }\n\n}\n"}, "InvestorInteractionContract": {"abi": [{"constant": true, "inputs": [], "name": "maximumSupply", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "name", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "approve", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "announcementHash", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_signature", "type": "bytes"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}, {"name": "_fee", "type": "uint256"}, {"name": "_nonce", "type": "uint256"}], "name": "transferPreSigned", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_token", "type": "address"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}, {"name": "_fee", "type": "uint256"}, {"name": "_nonce", "type": "uint256"}], "name": "transferPreSignedHashing", "outputs": [{"name": "", "type": "bytes32"}], "payable": false, "stateMutability": "pure", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "addedValue", "type": "uint256"}, {"name": "data", "type": "bytes"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "tokenCount", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "hash", "type": "bytes32"}, {"name": "sig", "type": "bytes"}], "name": "recover", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "pure", "type": "function"}, {"constant": false, "inputs": [{"name": "from", "type": "address"}, {"name": "to", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "investor", "type": "address"}], "name": "importInvestor", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "decimals", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "owner", "type": "address"}, {"name": "blockNumber", "type": "uint256"}], "name": "balanceAt", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "receiver", "type": "address"}, {"name": "amount", "type": "uint256"}, {"name": "data", "type": "bytes"}], "name": "transferAndCall", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}, {"name": "", "type": "uint256"}], "name": "tokenBalances", "outputs": [{"name": "blockNumber", "type": "uint256"}, {"name": "value", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "uint256"}], "name": "tokensTotal", "outputs": [{"name": "blockNumber", "type": "uint256"}, {"name": "value", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}, {"name": "", "type": "address"}], "name": "used", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "blockNumber", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}, {"name": "", "type": "address"}], "name": "allowed", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "announcementType", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "subtractedValue", "type": "uint256"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "owner", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "subtractedValue", "type": "uint256"}, {"name": "data", "type": "bytes"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "balanceImported", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "options", "outputs": [{"name": "", "type": "bytes32"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "to", "type": "address"}, {"name": "amount", "type": "uint256"}], "name": "transferInvestorTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "transferVerifier", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "symbol", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "blockNumber", "type": "uint256"}], "name": "totalSupplyAt", "outputs": [{"name": "tokenCount", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "announcementName", "outputs": [{"name": "", "type": "bytes32"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "KYC", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "optionsTotal", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "amount", "type": "uint256"}], "name": "act", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "addedValue", "type": "uint256"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "owner", "type": "address"}, {"name": "spender", "type": "address"}], "name": "allowance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "announcementURI", "outputs": [{"name": "", "type": "bytes32"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "token", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [{"name": "_token", "type": "address"}, {"name": "_KYC", "type": "address"}, {"name": "name", "type": "bytes32"}, {"name": "URI", "type": "bytes32"}, {"name": "_type", "type": "uint256"}, {"name": "_hash", "type": "uint256"}, {"name": "_blockNumber", "type": "uint256"}, {"name": "_options", "type": "bytes32[]"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "option", "type": "address"}, {"indexed": false, "name": "description", "type": "bytes32"}], "name": "OptionAdded", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "token", "type": "address"}, {"indexed": false, "name": "KYC", "type": "address"}, {"indexed": false, "name": "blockNumber", "type": "uint256"}, {"indexed": false, "name": "maximumSupply", "type": "uint256"}], "name": "IICCreated", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": true, "name": "delegate", "type": "address"}, {"indexed": false, "name": "amount", "type": "uint256"}, {"indexed": false, "name": "fee", "type": "uint256"}], "name": "TransferPreSigned", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "from", "type": "address"}, {"indexed": false, "name": "hash", "type": "bytes32"}], "name": "Debug", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "from", "type": "address"}, {"indexed": false, "name": "receiver", "type": "address"}, {"indexed": false, "name": "amount", "type": "uint256"}, {"indexed": false, "name": "data", "type": "bytes"}], "name": "ERC677Transfer", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}, {"indexed": true, "name": "spender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "bytecode": "0x60806040523480156200001157600080fd5b5060405162001ef138038062001ef18339810160408181528251602080850151838601516060870151608088015160a089015160c08a015160e08b0151878b01808b526000808d528b51998a01909b528a8952868b556001869055600285905560038490558b51999c979b969a959994989397929691909201949384939192601291620000a191600491620002bd565b508151620000b7906005906020850190620002bd565b506006555050600d8054600160a060020a031916600160a060020a038c161790556000841115620000ed57600c849055620000f2565b43600c555b600f8054600160a060020a031916600160a060020a038b16179055600091505b8251821015620001be5781606401905082828151811015156200013157fe5b6020908102909101810151600160a060020a0383166000908152601090925260409091205582517f4657af31f793f7106e2139bb6d8ae7293c2af46cf8c457b73c33d316f78bb24f9082908590859081106200018957fe5b602090810290910181015160408051600160a060020a039094168452918301528051918290030190a160019091019062000112565b600d54600c54604080517f981b24d0000000000000000000000000000000000000000000000000000000008152600481019290925251600160a060020a039092169163981b24d0916024808201926020929091908290030181600087803b1580156200022957600080fd5b505af11580156200023e573d6000803e3d6000fd5b505050506040513d60208110156200025557600080fd5b5051601381905560408051600160a060020a03808e1682528c1660208201528082018790526060810192909252517fe7c73ce173192d0e4ea6632e934e4df90b0a61a55086c4dc27534581a54518d69181900360800190a15050505050505050505062000362565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200030057805160ff191683800117855562000330565b8280016001018555821562000330579182015b828111156200033057825182559160200191906001019062000313565b506200033e92915062000342565b5090565b6200035f91905b808211156200033e576000815560010162000349565b90565b611b7f80620003726000396000f3006080604052600436106101d75763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630480e58b81146101dc57806306fdde0314610203578063095ea7b31461028d5780631274c3f3146102c55780631296830d146102da57806315420b711461034d57806316ca3b631461037d57806318160ddd146103e657806319045a25146103fb57806323b872dd146104755780632eb0236a1461049f578063313ce567146104c25780633b8e6f2e146104d75780634000aea0146104fb57806348ff5665146105645780634f0092ab146105a15780635195afa5146105b957806357e871e7146105e05780635c658165146105f55780635fcce2791461061c578063661884631461063157806370a08231146106555780637272ad4914610676578063755d76b7146106df57806382fae9c1146107005780638cd98ee3146107215780638daed5281461074557806395d89b411461075a578063981b24d01461076f5780639ea0c08c14610787578063a12a6bb01461079c578063a9059cbb146107b1578063a9ec80d8146107d5578063c9ee7e02146107ea578063d73dd62314610802578063dd62ed3e14610826578063f31294a41461084d578063fc0c546a14610862575b600080fd5b3480156101e857600080fd5b506101f1610877565b60408051918252519081900360200190f35b34801561020f57600080fd5b5061021861087d565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561025257818101518382015260200161023a565b50505050905090810190601f16801561027f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561029957600080fd5b506102b1600160a060020a036004351660243561090b565b604080519115158252519081900360200190f35b3480156102d157600080fd5b506101f1610971565b3480156102e657600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526102b194369492936024939284019190819084018382808284375094975050508335600160a060020a0316945050506020820135916040810135915060600135610977565b34801561035957600080fd5b506101f1600160a060020a0360043581169060243516604435606435608435610b97565b34801561038957600080fd5b50604080516020600460443581810135601f81018490048402850184019095528484526102b1948235600160a060020a0316946024803595369594606494920191908190840183828082843750949750610c099650505050505050565b3480156103f257600080fd5b506101f1610cb9565b34801561040757600080fd5b5060408051602060046024803582810135601f8101859004850286018501909652858552610459958335953695604494919390910191908190840183828082843750949750610ccb9650505050505050565b60408051600160a060020a039092168252519081900360200190f35b34801561048157600080fd5b506102b1600160a060020a0360043581169060243516604435610da0565b3480156104ab57600080fd5b506104c0600160a060020a0360043516610e30565b005b3480156104ce57600080fd5b506101f1610fd2565b3480156104e357600080fd5b506101f1600160a060020a0360043516602435610fd8565b34801561050757600080fd5b50604080516020600460443581810135601f81018490048402850184019095528484526102b1948235600160a060020a0316946024803595369594606494920191908190840183828082843750949750610ffa9650505050505050565b34801561057057600080fd5b50610588600160a060020a0360043516602435611203565b6040805192835260208301919091528051918290030190f35b3480156105ad57600080fd5b5061058860043561123e565b3480156105c557600080fd5b506101f1600160a060020a036004358116906024351661126a565b3480156105ec57600080fd5b506101f1611287565b34801561060157600080fd5b506101f1600160a060020a036004358116906024351661128d565b34801561062857600080fd5b506101f16112aa565b34801561063d57600080fd5b506102b1600160a060020a03600435166024356112b0565b34801561066157600080fd5b506101f1600160a060020a03600435166113a0565b34801561068257600080fd5b50604080516020600460443581810135601f81018490048402850184019095528484526102b1948235600160a060020a03169460248035953695946064949201919081908401838280828437509497506113c89650505050505050565b3480156106eb57600080fd5b506102b1600160a060020a03600435166113ea565b34801561070c57600080fd5b506101f1600160a060020a03600435166113ff565b34801561072d57600080fd5b506104c0600160a060020a0360043516602435611411565b34801561075157600080fd5b50610459611420565b34801561076657600080fd5b5061021861142f565b34801561077b57600080fd5b506101f160043561148a565b34801561079357600080fd5b506101f1611497565b3480156107a857600080fd5b5061045961149d565b3480156107bd57600080fd5b506102b1600160a060020a03600435166024356114ac565b3480156107e157600080fd5b506101f161159e565b3480156107f657600080fd5b506104c06004356115a4565b34801561080e57600080fd5b506102b1600160a060020a03600435166024356115b2565b34801561083257600080fd5b506101f1600160a060020a036004358116906024351661164b565b34801561085957600080fd5b506101f1611676565b34801561086e57600080fd5b5061045961167c565b60135481565b6004805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156109035780601f106108d857610100808354040283529160200191610903565b820191906000526020600020905b8154815290600101906020018083116108e657829003601f168201915b505050505081565b336000818152600a60209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b60035481565b60008080600160a060020a038716151561099057600080fd5b600b886040518082805190602001908083835b602083106109c25780518252601f1990920191602091820191016109a3565b51815160209384036101000a600019018019909216911617905292019485525060405193849003019092205460ff161591506109ff905057600080fd5b610a0c3088888888610b97565b9150610a188289610ccb565b9050600160a060020a0381161515610a2f57600080fd5b610a3a81888861168b565b610a4581338761168b565b6001600b896040518082805190602001908083835b60208310610a795780518252601f199092019160209182019101610a5a565b51815160209384036101000a6000190180199092169116179052920194855250604080519485900382018520805460ff1916961515969096179095558a84528301899052505081513392600160a060020a038b811693908616927fec5a73fd1f178be20c1bca1b406cbf4b5c20d833b66e582fc122fb4baa0fc2a4929181900390910190a486600160a060020a031681600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef886040518082815260200191505060405180910390a36040805186815290513391600160a060020a038416917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a3506001979650505050505050565b604080517f48664c160000000000000000000000000000000000000000000000000000000081526c01000000000000000000000000600160a060020a0397881681026004830152959096169094026018860152602c850192909252604c840152606c8301525190819003608c01902090565b6000600160a060020a038416301415610c2157600080fd5b610c2b84846115b2565b5083600160a060020a03168260405180828051906020019080838360005b83811015610c61578181015183820152602001610c49565b50505050905090810190601f168015610c8e5780820380516001836020036101000a031916815260200191505b509150506000604051808303816000865af19150501515610cae57600080fd5b5060015b9392505050565b6000610cc66009436117c7565b905090565b60008060008084516041141515610ce55760009350610d97565b50505060208201516040830151606084015160001a601b60ff82161015610d0a57601b015b8060ff16601b14158015610d2257508060ff16601c14155b15610d305760009350610d97565b60408051600080825260208083018085528a905260ff8516838501526060830187905260808301869052925160019360a0808501949193601f19840193928390039091019190865af1158015610d8a573d6000803e3d6000fd5b5050506020604051035193505b50505092915050565b600160a060020a0383166000908152600a60209081526040808320338452909152812054821115610dd057600080fd5b610ddb84848461168b565b82600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a35060019392505050565b600160a060020a0381166000908152600e60205260408120548190819060ff1615610e5a57600080fd5b600d54600c54604080517f3b8e6f2e000000000000000000000000000000000000000000000000000000008152600160a060020a038881166004830152602482019390935290519190921691633b8e6f2e9160448083019260209291908290030181600087803b158015610ecd57600080fd5b505af1158015610ee1573d6000803e3d6000fd5b505050506040513d6020811015610ef757600080fd5b50519250610f0560006113a0565b9150610f0f610cb9565b6000805260086020529050610f537f5eff886ea0ce6ca488a3d6e336d6c0f75f46d19b42c06ce5ee98e42c96d256c7610f4e848663ffffffff6117dd16565b6117ec565b610f5f6000858561168b565b610f746009610f4e838663ffffffff6117dd16565b600160a060020a0384166000818152600e60209081526040808320805460ff19166001179055805187815290517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a350505050565b60065481565b600160a060020a0382166000908152600860205260408120610cb290836117c7565b600061100684846114ac565b151561101157600080fd5b7f72db2339068fd324bbc28f2944e01064da539ac76064b6ce4a97a5f81de43dd6338585856040518085600160a060020a0316600160a060020a0316815260200184600160a060020a0316600160a060020a0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156110a9578181015183820152602001611091565b50505050905090810190601f1680156110d65780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a183600160a060020a031663c0ee0b8a3385856040518463ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018084600160a060020a0316600160a060020a0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561117e578181015183820152602001611166565b50505050905090810190601f1680156111ab5780820380516001836020036101000a031916815260200191505b50945050505050602060405180830381600087803b1580156111cc57600080fd5b505af11580156111e0573d6000803e3d6000fd5b505050506040513d60208110156111f657600080fd5b50511515610cb257600080fd5b60086020528160005260406000208181548110151561121e57fe5b600091825260209091206002909102018054600190910154909250905082565b600980548290811061124c57fe5b60009182526020909120600290910201805460019091015490915082565b601160209081526000928352604080842090915290825290205481565b600c5481565b600a60209081526000928352604080842090915290825290205481565b60025481565b336000908152600a60209081526040808320600160a060020a03861684529091528120548083111561130557336000908152600a60209081526040808320600160a060020a038816845290915281205561133a565b611315818463ffffffff6118c316565b336000908152600a60209081526040808320600160a060020a03891684529091529020555b336000818152600a60209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a03811660009081526008602052604081206113c290436117c7565b92915050565b6000600160a060020a0384163014156113e057600080fd5b610c2b84846112b0565b600e6020526000908152604090205460ff1681565b60106020526000908152604090205481565b61141b82826114ac565b505050565b600754600160a060020a031681565b6005805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156109035780601f106108d857610100808354040283529160200191610903565b60006113c26009836117c7565b60005481565b600f54600160a060020a031681565b336000908152600e602052604081205460ff1615156114ce576114ce33610e30565b600160a060020a0383166000908152601060205260409020541561159457600f54604080517f3af32abf0000000000000000000000000000000000000000000000000000000081523360048201529051600160a060020a0390921691633af32abf916024808201926020929091908290030181600087803b15801561155257600080fd5b505af1158015611566573d6000803e3d6000fd5b505050506040513d602081101561157c57600080fd5b5051151561158957600080fd5b6115943384846118d5565b610cb28383611906565b60125481565b6115af606482611411565b50565b336000908152600a60209081526040808320600160a060020a03861684529091528120546115e6908363ffffffff6117dd16565b336000818152600a60209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a039182166000908152600a6020908152604080832093909416825291909152205490565b60015481565b600d54600160a060020a031681565b600080611697856113a0565b91506116a2846113a0565b600754909150600160a060020a03161561176857600754604080517fad076994000000000000000000000000000000000000000000000000000000008152600160a060020a0388811660048301528781166024830152604482018790529151919092169163ad0769949160648083019260209291908290030181600087803b15801561172d57600080fd5b505af1158015611741573d6000803e3d6000fd5b505050506040513d602081101561175757600080fd5b505192506000831161176857600080fd5b600160a060020a038516600090815260086020526040902061179490610f4e848663ffffffff6118c316565b600160a060020a03841660009081526008602052604090206117c090610f4e838663ffffffff6117dd16565b5050505050565b6000806117d4848461195c565b95945050505050565b600082820183811015610cb257fe5b8154158061182a575081544390839061180c90600163ffffffff6118c316565b8154811061181657fe5b906000526020600020906002020160000154105b1561186c5760408051808201909152438152602080820183815284546001818101875560008781529390932093516002909102909301928355519101556118bf565b60408051808201909152438152602081018290528254839061189590600163ffffffff6118c316565b8154811061189f57fe5b600091825260209182902083516002909202019081559101516001909101555b5050565b6000828211156118cf57fe5b50900390565b600160a060020a03918216600090815260116020908152604080832095909416825293909352912080549091019055565b600061191333848461168b565b604080518381529051600160a060020a0385169133917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a350600192915050565b600080600080600086805490506000141561197d5760009450849350611b32565b8654879061199290600163ffffffff6118c316565b8154811061199c57fe5b60009182526020909120600290910201548610611a1d57865487906119c890600163ffffffff6118c316565b815481106119d257fe5b6000918252602090912060029091020154875488906119f890600163ffffffff6118c316565b81548110611a0257fe5b90600052602060002090600202016001015494509450611b32565b866000815481101515611a2c57fe5b906000526020600020906002020160000154861015611a515760009450849350611b32565b865460009350611a6890600163ffffffff6118c316565b91505b82821115611aed57611aa56002611a99611a8c86600163ffffffff6117dd16565b859063ffffffff6117dd16565b9063ffffffff611b3c16565b9050858782815481101515611ab657fe5b600091825260209091206002909102015411611ad457809250611ae8565b611ae581600163ffffffff6118c316565b91505b611a6b565b8683815481101515611afb57fe5b9060005260206000209060020201600001548784815481101515611b1b57fe5b906000526020600020906002020160010154945094505b5050509250929050565b6000808284811515611b4a57fe5b049493505050505600a165627a7a7230582006da968d0e1a7b3fe30f968df361d7fa0310e5eb4eb5faee448639461301785f0029", "bytecode_runtime": "0x6080604052600436106101d75763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630480e58b81146101dc57806306fdde0314610203578063095ea7b31461028d5780631274c3f3146102c55780631296830d146102da57806315420b711461034d57806316ca3b631461037d57806318160ddd146103e657806319045a25146103fb57806323b872dd146104755780632eb0236a1461049f578063313ce567146104c25780633b8e6f2e146104d75780634000aea0146104fb57806348ff5665146105645780634f0092ab146105a15780635195afa5146105b957806357e871e7146105e05780635c658165146105f55780635fcce2791461061c578063661884631461063157806370a08231146106555780637272ad4914610676578063755d76b7146106df57806382fae9c1146107005780638cd98ee3146107215780638daed5281461074557806395d89b411461075a578063981b24d01461076f5780639ea0c08c14610787578063a12a6bb01461079c578063a9059cbb146107b1578063a9ec80d8146107d5578063c9ee7e02146107ea578063d73dd62314610802578063dd62ed3e14610826578063f31294a41461084d578063fc0c546a14610862575b600080fd5b3480156101e857600080fd5b506101f1610877565b60408051918252519081900360200190f35b34801561020f57600080fd5b5061021861087d565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561025257818101518382015260200161023a565b50505050905090810190601f16801561027f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561029957600080fd5b506102b1600160a060020a036004351660243561090b565b604080519115158252519081900360200190f35b3480156102d157600080fd5b506101f1610971565b3480156102e657600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526102b194369492936024939284019190819084018382808284375094975050508335600160a060020a0316945050506020820135916040810135915060600135610977565b34801561035957600080fd5b506101f1600160a060020a0360043581169060243516604435606435608435610b97565b34801561038957600080fd5b50604080516020600460443581810135601f81018490048402850184019095528484526102b1948235600160a060020a0316946024803595369594606494920191908190840183828082843750949750610c099650505050505050565b3480156103f257600080fd5b506101f1610cb9565b34801561040757600080fd5b5060408051602060046024803582810135601f8101859004850286018501909652858552610459958335953695604494919390910191908190840183828082843750949750610ccb9650505050505050565b60408051600160a060020a039092168252519081900360200190f35b34801561048157600080fd5b506102b1600160a060020a0360043581169060243516604435610da0565b3480156104ab57600080fd5b506104c0600160a060020a0360043516610e30565b005b3480156104ce57600080fd5b506101f1610fd2565b3480156104e357600080fd5b506101f1600160a060020a0360043516602435610fd8565b34801561050757600080fd5b50604080516020600460443581810135601f81018490048402850184019095528484526102b1948235600160a060020a0316946024803595369594606494920191908190840183828082843750949750610ffa9650505050505050565b34801561057057600080fd5b50610588600160a060020a0360043516602435611203565b6040805192835260208301919091528051918290030190f35b3480156105ad57600080fd5b5061058860043561123e565b3480156105c557600080fd5b506101f1600160a060020a036004358116906024351661126a565b3480156105ec57600080fd5b506101f1611287565b34801561060157600080fd5b506101f1600160a060020a036004358116906024351661128d565b34801561062857600080fd5b506101f16112aa565b34801561063d57600080fd5b506102b1600160a060020a03600435166024356112b0565b34801561066157600080fd5b506101f1600160a060020a03600435166113a0565b34801561068257600080fd5b50604080516020600460443581810135601f81018490048402850184019095528484526102b1948235600160a060020a03169460248035953695946064949201919081908401838280828437509497506113c89650505050505050565b3480156106eb57600080fd5b506102b1600160a060020a03600435166113ea565b34801561070c57600080fd5b506101f1600160a060020a03600435166113ff565b34801561072d57600080fd5b506104c0600160a060020a0360043516602435611411565b34801561075157600080fd5b50610459611420565b34801561076657600080fd5b5061021861142f565b34801561077b57600080fd5b506101f160043561148a565b34801561079357600080fd5b506101f1611497565b3480156107a857600080fd5b5061045961149d565b3480156107bd57600080fd5b506102b1600160a060020a03600435166024356114ac565b3480156107e157600080fd5b506101f161159e565b3480156107f657600080fd5b506104c06004356115a4565b34801561080e57600080fd5b506102b1600160a060020a03600435166024356115b2565b34801561083257600080fd5b506101f1600160a060020a036004358116906024351661164b565b34801561085957600080fd5b506101f1611676565b34801561086e57600080fd5b5061045961167c565b60135481565b6004805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156109035780601f106108d857610100808354040283529160200191610903565b820191906000526020600020905b8154815290600101906020018083116108e657829003601f168201915b505050505081565b336000818152600a60209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b60035481565b60008080600160a060020a038716151561099057600080fd5b600b886040518082805190602001908083835b602083106109c25780518252601f1990920191602091820191016109a3565b51815160209384036101000a600019018019909216911617905292019485525060405193849003019092205460ff161591506109ff905057600080fd5b610a0c3088888888610b97565b9150610a188289610ccb565b9050600160a060020a0381161515610a2f57600080fd5b610a3a81888861168b565b610a4581338761168b565b6001600b896040518082805190602001908083835b60208310610a795780518252601f199092019160209182019101610a5a565b51815160209384036101000a6000190180199092169116179052920194855250604080519485900382018520805460ff1916961515969096179095558a84528301899052505081513392600160a060020a038b811693908616927fec5a73fd1f178be20c1bca1b406cbf4b5c20d833b66e582fc122fb4baa0fc2a4929181900390910190a486600160a060020a031681600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef886040518082815260200191505060405180910390a36040805186815290513391600160a060020a038416917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a3506001979650505050505050565b604080517f48664c160000000000000000000000000000000000000000000000000000000081526c01000000000000000000000000600160a060020a0397881681026004830152959096169094026018860152602c850192909252604c840152606c8301525190819003608c01902090565b6000600160a060020a038416301415610c2157600080fd5b610c2b84846115b2565b5083600160a060020a03168260405180828051906020019080838360005b83811015610c61578181015183820152602001610c49565b50505050905090810190601f168015610c8e5780820380516001836020036101000a031916815260200191505b509150506000604051808303816000865af19150501515610cae57600080fd5b5060015b9392505050565b6000610cc66009436117c7565b905090565b60008060008084516041141515610ce55760009350610d97565b50505060208201516040830151606084015160001a601b60ff82161015610d0a57601b015b8060ff16601b14158015610d2257508060ff16601c14155b15610d305760009350610d97565b60408051600080825260208083018085528a905260ff8516838501526060830187905260808301869052925160019360a0808501949193601f19840193928390039091019190865af1158015610d8a573d6000803e3d6000fd5b5050506020604051035193505b50505092915050565b600160a060020a0383166000908152600a60209081526040808320338452909152812054821115610dd057600080fd5b610ddb84848461168b565b82600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a35060019392505050565b600160a060020a0381166000908152600e60205260408120548190819060ff1615610e5a57600080fd5b600d54600c54604080517f3b8e6f2e000000000000000000000000000000000000000000000000000000008152600160a060020a038881166004830152602482019390935290519190921691633b8e6f2e9160448083019260209291908290030181600087803b158015610ecd57600080fd5b505af1158015610ee1573d6000803e3d6000fd5b505050506040513d6020811015610ef757600080fd5b50519250610f0560006113a0565b9150610f0f610cb9565b6000805260086020529050610f537f5eff886ea0ce6ca488a3d6e336d6c0f75f46d19b42c06ce5ee98e42c96d256c7610f4e848663ffffffff6117dd16565b6117ec565b610f5f6000858561168b565b610f746009610f4e838663ffffffff6117dd16565b600160a060020a0384166000818152600e60209081526040808320805460ff19166001179055805187815290517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a350505050565b60065481565b600160a060020a0382166000908152600860205260408120610cb290836117c7565b600061100684846114ac565b151561101157600080fd5b7f72db2339068fd324bbc28f2944e01064da539ac76064b6ce4a97a5f81de43dd6338585856040518085600160a060020a0316600160a060020a0316815260200184600160a060020a0316600160a060020a0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156110a9578181015183820152602001611091565b50505050905090810190601f1680156110d65780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a183600160a060020a031663c0ee0b8a3385856040518463ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018084600160a060020a0316600160a060020a0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561117e578181015183820152602001611166565b50505050905090810190601f1680156111ab5780820380516001836020036101000a031916815260200191505b50945050505050602060405180830381600087803b1580156111cc57600080fd5b505af11580156111e0573d6000803e3d6000fd5b505050506040513d60208110156111f657600080fd5b50511515610cb257600080fd5b60086020528160005260406000208181548110151561121e57fe5b600091825260209091206002909102018054600190910154909250905082565b600980548290811061124c57fe5b60009182526020909120600290910201805460019091015490915082565b601160209081526000928352604080842090915290825290205481565b600c5481565b600a60209081526000928352604080842090915290825290205481565b60025481565b336000908152600a60209081526040808320600160a060020a03861684529091528120548083111561130557336000908152600a60209081526040808320600160a060020a038816845290915281205561133a565b611315818463ffffffff6118c316565b336000908152600a60209081526040808320600160a060020a03891684529091529020555b336000818152600a60209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a03811660009081526008602052604081206113c290436117c7565b92915050565b6000600160a060020a0384163014156113e057600080fd5b610c2b84846112b0565b600e6020526000908152604090205460ff1681565b60106020526000908152604090205481565b61141b82826114ac565b505050565b600754600160a060020a031681565b6005805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156109035780601f106108d857610100808354040283529160200191610903565b60006113c26009836117c7565b60005481565b600f54600160a060020a031681565b336000908152600e602052604081205460ff1615156114ce576114ce33610e30565b600160a060020a0383166000908152601060205260409020541561159457600f54604080517f3af32abf0000000000000000000000000000000000000000000000000000000081523360048201529051600160a060020a0390921691633af32abf916024808201926020929091908290030181600087803b15801561155257600080fd5b505af1158015611566573d6000803e3d6000fd5b505050506040513d602081101561157c57600080fd5b5051151561158957600080fd5b6115943384846118d5565b610cb28383611906565b60125481565b6115af606482611411565b50565b336000908152600a60209081526040808320600160a060020a03861684529091528120546115e6908363ffffffff6117dd16565b336000818152600a60209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a039182166000908152600a6020908152604080832093909416825291909152205490565b60015481565b600d54600160a060020a031681565b600080611697856113a0565b91506116a2846113a0565b600754909150600160a060020a03161561176857600754604080517fad076994000000000000000000000000000000000000000000000000000000008152600160a060020a0388811660048301528781166024830152604482018790529151919092169163ad0769949160648083019260209291908290030181600087803b15801561172d57600080fd5b505af1158015611741573d6000803e3d6000fd5b505050506040513d602081101561175757600080fd5b505192506000831161176857600080fd5b600160a060020a038516600090815260086020526040902061179490610f4e848663ffffffff6118c316565b600160a060020a03841660009081526008602052604090206117c090610f4e838663ffffffff6117dd16565b5050505050565b6000806117d4848461195c565b95945050505050565b600082820183811015610cb257fe5b8154158061182a575081544390839061180c90600163ffffffff6118c316565b8154811061181657fe5b906000526020600020906002020160000154105b1561186c5760408051808201909152438152602080820183815284546001818101875560008781529390932093516002909102909301928355519101556118bf565b60408051808201909152438152602081018290528254839061189590600163ffffffff6118c316565b8154811061189f57fe5b600091825260209182902083516002909202019081559101516001909101555b5050565b6000828211156118cf57fe5b50900390565b600160a060020a03918216600090815260116020908152604080832095909416825293909352912080549091019055565b600061191333848461168b565b604080518381529051600160a060020a0385169133917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a350600192915050565b600080600080600086805490506000141561197d5760009450849350611b32565b8654879061199290600163ffffffff6118c316565b8154811061199c57fe5b60009182526020909120600290910201548610611a1d57865487906119c890600163ffffffff6118c316565b815481106119d257fe5b6000918252602090912060029091020154875488906119f890600163ffffffff6118c316565b81548110611a0257fe5b90600052602060002090600202016001015494509450611b32565b866000815481101515611a2c57fe5b906000526020600020906002020160000154861015611a515760009450849350611b32565b865460009350611a6890600163ffffffff6118c316565b91505b82821115611aed57611aa56002611a99611a8c86600163ffffffff6117dd16565b859063ffffffff6117dd16565b9063ffffffff611b3c16565b9050858782815481101515611ab657fe5b600091825260209091206002909102015411611ad457809250611ae8565b611ae581600163ffffffff6118c316565b91505b611a6b565b8683815481101515611afb57fe5b9060005260206000209060020201600001548784815481101515611b1b57fe5b906000526020600020906002020160010154945094505b5050509250929050565b6000808284811515611b4a57fe5b049493505050505600a165627a7a7230582006da968d0e1a7b3fe30f968df361d7fa0310e5eb4eb5faee448639461301785f0029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": true, "inputs": [], "name": "maximumSupply", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "name", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "approve", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "announcementHash", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_signature", "type": "bytes"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}, {"name": "_fee", "type": "uint256"}, {"name": "_nonce", "type": "uint256"}], "name": "transferPreSigned", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_token", "type": "address"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}, {"name": "_fee", "type": "uint256"}, {"name": "_nonce", "type": "uint256"}], "name": "transferPreSignedHashing", "outputs": [{"name": "", "type": "bytes32"}], "payable": false, "stateMutability": "pure", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "addedValue", "type": "uint256"}, {"name": "data", "type": "bytes"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "tokenCount", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "hash", "type": "bytes32"}, {"name": "sig", "type": "bytes"}], "name": "recover", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "pure", "type": "function"}, {"constant": false, "inputs": [{"name": "from", "type": "address"}, {"name": "to", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "investor", "type": "address"}], "name": "importInvestor", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "decimals", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "owner", "type": "address"}, {"name": "blockNumber", "type": "uint256"}], "name": "balanceAt", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "receiver", "type": "address"}, {"name": "amount", "type": "uint256"}, {"name": "data", "type": "bytes"}], "name": "transferAndCall", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}, {"name": "", "type": "uint256"}], "name": "tokenBalances", "outputs": [{"name": "blockNumber", "type": "uint256"}, {"name": "value", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "uint256"}], "name": "tokensTotal", "outputs": [{"name": "blockNumber", "type": "uint256"}, {"name": "value", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}, {"name": "", "type": "address"}], "name": "used", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "blockNumber", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}, {"name": "", "type": "address"}], "name": "allowed", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "announcementType", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "subtractedValue", "type": "uint256"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "owner", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "subtractedValue", "type": "uint256"}, {"name": "data", "type": "bytes"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "balanceImported", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "options", "outputs": [{"name": "", "type": "bytes32"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "to", "type": "address"}, {"name": "amount", "type": "uint256"}], "name": "transferInvestorTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "transferVerifier", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "symbol", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "blockNumber", "type": "uint256"}], "name": "totalSupplyAt", "outputs": [{"name": "tokenCount", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "announcementName", "outputs": [{"name": "", "type": "bytes32"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "KYC", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "optionsTotal", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "amount", "type": "uint256"}], "name": "act", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "addedValue", "type": "uint256"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "owner", "type": "address"}, {"name": "spender", "type": "address"}], "name": "allowance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "announcementURI", "outputs": [{"name": "", "type": "bytes32"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "token", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [{"name": "_token", "type": "address"}, {"name": "_KYC", "type": "address"}, {"name": "name", "type": "bytes32"}, {"name": "URI", "type": "bytes32"}, {"name": "_type", "type": "uint256"}, {"name": "_hash", "type": "uint256"}, {"name": "_blockNumber", "type": "uint256"}, {"name": "_options", "type": "bytes32[]"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "option", "type": "address"}, {"indexed": false, "name": "description", "type": "bytes32"}], "name": "OptionAdded", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "token", "type": "address"}, {"indexed": false, "name": "KYC", "type": "address"}, {"indexed": false, "name": "blockNumber", "type": "uint256"}, {"indexed": false, "name": "maximumSupply", "type": "uint256"}], "name": "IICCreated", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": true, "name": "delegate", "type": "address"}, {"indexed": false, "name": "amount", "type": "uint256"}, {"indexed": false, "name": "fee", "type": "uint256"}], "name": "TransferPreSigned", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "from", "type": "address"}, {"indexed": false, "name": "hash", "type": "bytes32"}], "name": "Debug", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "from", "type": "address"}, {"indexed": false, "name": "receiver", "type": "address"}, {"indexed": false, "name": "amount", "type": "uint256"}, {"indexed": false, "name": "data", "type": "bytes"}], "name": "ERC677Transfer", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}, {"indexed": true, "name": "spender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "devdoc": {"methods": {"allowance(address,address)": {"details": "Function to check the amount of tokens that an owner allowed to a spender.", "params": {"owner": "address The address which owns the funds.", "spender": "address The address which will spend the funds."}, "return": "A uint256 specifying the amount of tokens still available for the spender."}, "approve(address,uint256)": {"details": "Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729", "params": {"spender": "The address which will spend the funds.", "value": "The amount of tokens to be spent."}, "return": "true if the call function was executed successfully"}, "balanceAt(address,uint256)": {"details": "Gets the balance of the specified address.", "params": {"blockNumber": "The block number we want to query for the balance.", "owner": "The address to query the the balance of."}, "return": "An uint256 representing the amount owned by the passed address."}, "balanceOf(address)": {"details": "Gets the balance of the specified address.", "params": {"owner": "The address to query the the balance of."}, "return": "An uint256 representing the amount owned by the passed address."}, "decreaseApproval(address,uint256)": {"details": "Decrease the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[spender] == 0. To decrement allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"spender": "The address which will spend the funds.", "subtractedValue": "The amount of tokens to decrease the allowance by."}}, "decreaseApproval(address,uint256,bytes)": {"details": "Addition to StandardToken methods. Decrease the amount of tokens that an owner allowed to a spender and execute a call with the sent data. * This is originally from OpenZeppelin. * approve should be called when allowed[spender] == 0. To decrement allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"data": "ABI-encoded contract call to call `spender` address.", "spender": "The address which will spend the funds.", "subtractedValue": "The amount of tokens to decrease the allowance by."}}, "increaseApproval(address,uint256)": {"details": "Increase the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[spender] == 0. To increment allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"addedValue": "The amount of tokens to increase the allowance by.", "spender": "The address which will spend the funds."}}, "increaseApproval(address,uint256,bytes)": {"details": "Addition to StandardToken methods. Increase the amount of tokens that an owner allowed to a spender and execute a call with the sent data. * This is originally from OpenZeppelin. * approve should be called when allowed[spender] == 0. To increment allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"addedValue": "The amount of tokens to increase the allowance by.", "data": "ABI-encoded contract call to call `spender` address.", "spender": "The address which will spend the funds."}}, "recover(bytes32,bytes)": {"params": {"hash": "bytes32 message, the hash is the signed message. What is recovered is the signer address.", "sig": "bytes signature, the signature is generated using web3.eth.sign()"}}, "totalSupply()": {"details": "total number of tokens in existence", "return": "A uint256 specifying the total number of tokens in existence"}, "totalSupplyAt(uint256)": {"details": "total number of tokens in existence at the given block", "params": {"blockNumber": "The block number we want to query for the total supply"}, "return": "A uint256 specifying the total number of tokens at a given block"}, "transferFrom(address,address,uint256)": {"details": "Transfer tokens from one address to another", "params": {"from": "address The address which you want to send tokens from", "to": "address The address which you want to transfer to", "value": "uint256 the amount of tokens to be transferred"}, "return": "true if the call function was executed successfully"}, "transferPreSigned(bytes,address,uint256,uint256,uint256)": {"params": {"_fee": "uint256 The amount of tokens paid to msg.sender, by the person who used to own the tokens.", "_nonce": "uint256 Presigned transaction number", "_signature": "bytes The signature, issued by the owner.", "_to": "address The address which you want to transfer to.", "_value": "uint256 The amount of tokens to be transferred."}}, "transferPreSignedHashing(address,address,uint256,uint256,uint256)": {"params": {"_fee": "uint256 The amount of tokens paid to msg.sender, by the owner.", "_nonce": "uint256 Presigned transaction number.", "_to": "address The address which you want to transfer to.", "_token": "address The address of the token.", "_value": "uint256 The amount of tokens to be transferred."}}}}, "userdoc": {"methods": {"recover(bytes32,bytes)": {"notice": "Recover signer address from a message by using his signature. Signature is delivered as a byte array, hence need for this implementation."}, "transferPreSigned(bytes,address,uint256,uint256,uint256)": {"notice": "Submit a presigned transfer"}, "transferPreSignedHashing(address,address,uint256,uint256,uint256)": {"notice": "Hash (keccak256) of the payload used by transferPreSigned"}}}}, "settings": {"compilationTarget": {"contracts/security-token/tests/InvestorInteractionContract.sol": "InvestorInteractionContract"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/security-token/CheckpointToken.sol": {"keccak256": "0xef922aeddfc702a53f7b2030a9737e375b7f6d34b56c5b144603dca1bcbdcc58", "urls": ["bzzr://9c4eeae60ae624abb2dfd48cb917e3e32f11f6dc2ac42fa65b17fc4ae157b75c"]}, "contracts/security-token/ERC677.sol": {"keccak256": "0xf557f3e12aa7f5a23d40957d9ac216db0902997f70f856697529d55e9823e50a", "urls": ["bzzr://c924011b4a57d2eb355c276255fc7af284c2f5b20ece36957d23a2e058975349"]}, "contracts/security-token/ERC677Token.sol": {"keccak256": "0xd67b6b0d3c7e9def09554b11c35f3b609a87ae2ea0f5853f0ca745f7f6366866", "urls": ["bzzr://bcd0f5e4bad7064ea5d8fe4e4e8a276af4ebddc4c7c25703c2dd32ca9ff715f7"]}, "contracts/security-token/ERC865.sol": {"keccak256": "0x326ad6a9d49740439036de2eb866edeabde2e12710ad03d4a3709a41e827ea96", "urls": ["bzzr://1a82e221a8da7446b644300d00183eefe1015f4a9ecd3d2ccbfa99c6bc68f9f3"]}, "contracts/security-token/KYCInterface.sol": {"keccak256": "0x29b1037cfb17f26421589f64eb271362aa9fbfd1f975e68df8071fd98be2052c", "urls": ["bzzr://f815559e1245fd3603a1baf5f3ad7ed7d571690b35f131cb27e0fcf8246c34a4"]}, "contracts/security-token/SecurityTransferAgentInterface.sol": {"keccak256": "0x23b8a61926435e2c583480c0de72a99b4f7ec8a4213ffc46711f83ecdeaf9186", "urls": ["bzzr://36be13b6cf1389357679705bd18969409ecde684ace2d9c5b606d8986e0231cd"]}, "contracts/security-token/tests/BogusAnnouncement.sol": {"keccak256": "0x2acace3c803b98f5aa174ddf3eb1af7dec2b67c4d6c34d1ef69fa88a2851a68b", "urls": ["bzzr://74b212027437f6f197cc0d9cd06f056e02be9595cf7b45582b41f14a080d51d3"]}, "contracts/security-token/tests/InvestorInteractionContract.sol": {"keccak256": "0x2a4149dfcef2c7a3e9327ea07cce094bb8bda4ff2f18506e8054788bedf741ff", "urls": ["bzzr://343e1ebb08208bffd6c6b0a5a41d9cbb081c1f200b534cd01e0c67d29b163543"]}, "zeppelin/contracts/math/SafeMath.sol": {"keccak256": "0x341ba8cb467a3623e819ba1a683ac1d264005186f308505214e5f6bc89446a08", "urls": ["bzzr://59b5652ee4e4a1b5a8f1a8906e14c84af43d636cf5ca0725cc1813aabe4c8c17"]}, "zeppelin/contracts/token/ERC20/BasicToken.sol": {"keccak256": "0x948404468d61ff35ea4194650670408dabd65da7f905a1c16888ab84520bf39e", "urls": ["bzzr://ea75e20f95d7e4e10394fe6bfaa8eee56b4757c2a6f1e8df4180d33afa621935"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}, "zeppelin/contracts/token/ERC20/StandardToken.sol": {"keccak256": "0xd2b344a5259e19ec143074cfa65637a10c40b68395c59808c4af13bccbb2de55", "urls": ["bzzr://d61a01175a7ca1ba9f4403de603c20b897e33ec425aef2d9f8a7f9ddfdfaf5b2"]}}, "version": 1}, "name": "InvestorInteractionContract", "ordered_full_dependencies": [], "source_path": "contracts/security-token/tests/InvestorInteractionContract.sol", "source": "\n\ncontract BogusAnnouncement {\n bytes32 public announcementName;\n bytes32 public announcementURI;\n uint256 public announcementType;\n uint256 public announcementHash;\n\n function BogusAnnouncement(bytes32 _announcementName, bytes32 _announcementURI, uint256 _announcementType, uint256 _announcementHash) public {\n announcementName = _announcementName;\n announcementURI = _announcementURI;\n announcementType = _announcementType;\n announcementHash = _announcementHash;\n }\n}\n\n\ninterface KYCInterface {\n event Whitelisted(address who, uint128 nonce);\n\n function isWhitelisted(address who) external view returns(bool);\n}\n\n/**\n * This smart contract code is Copyright 2018, 2019 TokenMarket Ltd. For more information see https://tokenmarket.net\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n * NatSpec is used intentionally to cover also other than public functions.\n * Solidity 0.4.18 is intentionally used: it's stable, and our framework is\n * based on that.\n */\n\n\n\ninterface SecurityTransferAgent {\n function verify(address from, address to, uint256 value) public view returns (uint256 newValue);\n}\n\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n\ninterface ERC677Receiver {\n function tokenFallback(address from, uint256 amount, bytes data) returns (bool success);\n}\n\ninterface ERC677 {\n\n // TODO: Have a different event name to make sure that tools with bad APIs do not mix this with ERC-20 Transfer() event that lacks data parameter\n event ERC677Transfer(address from, address receiver, uint256 amount, bytes data);\n\n function transferAndCall(ERC677Receiver receiver, uint amount, bytes data) returns (bool success);\n}\n\n\n\ncontract ERC677Token is ERC20, ERC677 {\n function transferAndCall(ERC677Receiver receiver, uint amount, bytes data) returns (bool success) {\n require(transfer(address(receiver), amount));\n\n ERC677Transfer(msg.sender, address(receiver), amount, data);\n\n require(receiver.tokenFallback(msg.sender, amount, data));\n }\n}\n\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n assert(c / a == b);\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n\n\n/**\n * @author TokenMarket / Ville Sundell \n */\ncontract CheckpointToken is ERC677Token {\n using SafeMath for uint256; // We use only uint256 for safety reasons (no boxing)\n\n /// @dev Name of the token, usually the company and/or series (like \"TokenMeerkat Ltd. Series A\"):\n string public name;\n /// @dev Ticker symbol, usually bases on the \"name\" above (like \"MEER\"):\n string public symbol;\n /// @dev Decimals are usually set to 18 for EIP-20 tokens:\n uint256 public decimals;\n /// @dev If transferVerifier is set, that contract will be queried upon every token transaction:\n SecurityTransferAgent public transferVerifier;\n\n /// @dev Checkpoint is the fundamental unit for our internal accounting\n /// (who owns what, and at what moment in time)\n struct Checkpoint {\n uint256 blockNumber;\n uint256 value;\n }\n /// @dev This mapping contains checkpoints for every address:\n mapping (address => Checkpoint[]) public tokenBalances;\n /// @dev This is a one dimensional Checkpoint mapping of the overall token supply:\n Checkpoint[] public tokensTotal;\n\n /// @dev This mapping keeps account for approve() -> fransferFrom() pattern:\n mapping (address => mapping (address => uint256)) public allowed;\n\n /**\n * @dev Constructor for CheckpointToken, initializing the token\n *\n * Here we define initial values for name, symbol and decimals.\n *\n * @param _name Initial name of the token\n * @param _symbol Initial symbol of the token\n * @param _decimals Number of decimals for the token, industry standard is 18\n */\n function CheckpointToken(string _name, string _symbol, uint256 _decimals) public {\n name = _name;\n symbol = _symbol;\n decimals = _decimals;\n }\n\n /** PUBLIC FUNCTIONS\n ****************************************/\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param owner address The address which owns the funds.\n * @param spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address owner, address spender) public view returns (uint256) {\n return allowed[owner][spender];\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n *\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param spender The address which will spend the funds.\n * @param value The amount of tokens to be spent.\n * @return true if the call function was executed successfully\n */\n function approve(address spender, uint256 value) public returns (bool) {\n allowed[msg.sender][spender] = value;\n Approval(msg.sender, spender, value);\n return true;\n }\n\n /**\n * @dev Transfer tokens from one address to another\n * @param from address The address which you want to send tokens from\n * @param to address The address which you want to transfer to\n * @param value uint256 the amount of tokens to be transferred\n * @return true if the call function was executed successfully\n */\n function transferFrom(address from, address to, uint256 value) public returns (bool) {\n require(value <= allowed[from][msg.sender]);\n\n transferInternal(from, to, value);\n Transfer(from, to, value);\n return true;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param to The address to transfer to.\n * @param value The amount to be transferred.\n * @return true if the call function was executed successfully\n */\n function transfer(address to, uint256 value) public returns (bool) {\n transferInternal(msg.sender, to, value);\n Transfer(msg.sender, to, value);\n return true;\n }\n\n /**\n * @dev total number of tokens in existence\n * @return A uint256 specifying the total number of tokens in existence\n */\n function totalSupply() public view returns (uint256 tokenCount) {\n tokenCount = balanceAtBlock(tokensTotal, block.number);\n }\n\n /**\n * @dev total number of tokens in existence at the given block\n * @param blockNumber The block number we want to query for the total supply\n * @return A uint256 specifying the total number of tokens at a given block\n */\n function totalSupplyAt(uint256 blockNumber) public view returns (uint256 tokenCount) {\n tokenCount = balanceAtBlock(tokensTotal, blockNumber);\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address owner) public view returns (uint256 balance) {\n balance = balanceAtBlock(tokenBalances[owner], block.number);\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param owner The address to query the the balance of.\n * @param blockNumber The block number we want to query for the balance.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceAt(address owner, uint256 blockNumber) public view returns (uint256 balance) {\n balance = balanceAtBlock(tokenBalances[owner], blockNumber);\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param spender The address which will spend the funds.\n * @param addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(address spender, uint addedValue) public returns (bool) {\n allowed[msg.sender][spender] = allowed[msg.sender][spender].add(addedValue);\n Approval(msg.sender, spender, allowed[msg.sender][spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param spender The address which will spend the funds.\n * @param subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(address spender, uint subtractedValue) public returns (bool) {\n uint oldValue = allowed[msg.sender][spender];\n if (subtractedValue > oldValue) {\n allowed[msg.sender][spender] = 0;\n } else {\n allowed[msg.sender][spender] = oldValue.sub(subtractedValue);\n }\n Approval(msg.sender, spender, allowed[msg.sender][spender]);\n return true;\n }\n\n /**\n * @dev Addition to StandardToken methods. Increase the amount of tokens that\n * an owner allowed to a spender and execute a call with the sent data.\n *\n * This is originally from OpenZeppelin.\n *\n * approve should be called when allowed[spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param spender The address which will spend the funds.\n * @param addedValue The amount of tokens to increase the allowance by.\n * @param data ABI-encoded contract call to call `spender` address.\n */\n function increaseApproval(address spender, uint addedValue, bytes data) public returns (bool) {\n require(spender != address(this));\n\n increaseApproval(spender, addedValue);\n\n require(spender.call(data));\n\n return true;\n }\n\n /**\n * @dev Addition to StandardToken methods. Decrease the amount of tokens that\n * an owner allowed to a spender and execute a call with the sent data.\n *\n * This is originally from OpenZeppelin.\n *\n * approve should be called when allowed[spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param spender The address which will spend the funds.\n * @param subtractedValue The amount of tokens to decrease the allowance by.\n * @param data ABI-encoded contract call to call `spender` address.\n */\n function decreaseApproval(address spender, uint subtractedValue, bytes data) public returns (bool) {\n require(spender != address(this));\n\n decreaseApproval(spender, subtractedValue);\n\n require(spender.call(data));\n\n return true;\n }\n\n /** INTERNALS\n ****************************************/\n\n function balanceAtBlock(Checkpoint[] storage checkpoints, uint256 blockNumber) internal returns (uint256 balance) {\n uint256 currentBlockNumber;\n (currentBlockNumber, balance) = getCheckpoint(checkpoints, blockNumber);\n }\n\n function transferInternal(address from, address to, uint256 value) internal {\n uint256 fromBalance = balanceOf(from);\n uint256 toBalance = balanceOf(to);\n\n if (address(transferVerifier) != address(0)) {\n value = transferVerifier.verify(from, to, value);\n require(value > 0);\n }\n\n setCheckpoint(tokenBalances[from], fromBalance.sub(value));\n setCheckpoint(tokenBalances[to], toBalance.add(value));\n }\n\n\n /** CORE\n ** The Magic happens below:\n ***************************************/\n\n function setCheckpoint(Checkpoint[] storage checkpoints, uint256 newValue) internal {\n if ((checkpoints.length == 0) || (checkpoints[checkpoints.length.sub(1)].blockNumber < block.number)) {\n checkpoints.push(Checkpoint(block.number, newValue));\n } else {\n checkpoints[checkpoints.length.sub(1)] = Checkpoint(block.number, newValue);\n }\n }\n\n function getCheckpoint(Checkpoint[] storage checkpoints, uint256 blockNumber) internal returns (uint256 blockNumber_, uint256 value) {\n if (checkpoints.length == 0) {\n return (0, 0);\n }\n\n // Shortcut for the actual value\n if (blockNumber >= checkpoints[checkpoints.length.sub(1)].blockNumber) {\n return (checkpoints[checkpoints.length.sub(1)].blockNumber, checkpoints[checkpoints.length.sub(1)].value);\n }\n\n if (blockNumber < checkpoints[0].blockNumber) {\n return (0, 0);\n }\n\n // Binary search of the value in the array\n uint256 min = 0;\n uint256 max = checkpoints.length.sub(1);\n while (max > min) {\n uint256 mid = (max.add(min.add(1))).div(2);\n if (checkpoints[mid].blockNumber <= blockNumber) {\n min = mid;\n } else {\n max = mid.sub(1);\n }\n }\n\n return (checkpoints[min].blockNumber, checkpoints[min].value);\n }\n}\n\n\n\n\n/* Largely copied from https://github.com/OpenZeppelin/openzeppelin-solidity/pull/741/files */\n\ncontract ERC865 is CheckpointToken {\n /** @dev This is used to prevent nonce reuse: */\n mapping(bytes => bool) signatures;\n\n event TransferPreSigned(address indexed from, address indexed to, address indexed delegate, uint256 amount, uint256 fee);\n event Debug(address from, bytes32 hash);\n\n /**\n * @notice Submit a presigned transfer\n * @param _signature bytes The signature, issued by the owner.\n * @param _to address The address which you want to transfer to.\n * @param _value uint256 The amount of tokens to be transferred.\n * @param _fee uint256 The amount of tokens paid to msg.sender, by the person who used to own the tokens.\n * @param _nonce uint256 Presigned transaction number\n */\n function transferPreSigned(\n bytes _signature,\n address _to,\n uint256 _value,\n uint256 _fee,\n uint256 _nonce\n )\n public\n returns (bool)\n {\n require(_to != address(0));\n require(signatures[_signature] == false);\n bytes32 hashedTx = transferPreSignedHashing(address(this), _to, _value, _fee, _nonce);\n address from = recover(hashedTx, _signature);\n require(from != address(0));\n\n transferInternal(from, _to, _value);\n transferInternal(from, msg.sender, _fee);\n\n signatures[_signature] = true;\n TransferPreSigned(from, _to, msg.sender, _value, _fee);\n Transfer(from, _to, _value);\n Transfer(from, msg.sender, _fee);\n return true;\n }\n\n /**\n * @notice Hash (keccak256) of the payload used by transferPreSigned\n * @param _token address The address of the token.\n * @param _to address The address which you want to transfer to.\n * @param _value uint256 The amount of tokens to be transferred.\n * @param _fee uint256 The amount of tokens paid to msg.sender, by the owner.\n * @param _nonce uint256 Presigned transaction number.\n */\n function transferPreSignedHashing(\n address _token,\n address _to,\n uint256 _value,\n uint256 _fee,\n uint256 _nonce\n )\n public\n pure\n returns (bytes32)\n {\n /* \"48664c16\": transferPreSignedHashing(address,address,address,uint256,uint256,uint256) */\n return keccak256(bytes4(0x48664c16), _token, _to, _value, _fee, _nonce);\n }\n\n /**\n * @notice Recover signer address from a message by using his signature.\n * Signature is delivered as a byte array, hence need for this\n * implementation.\n * @param hash bytes32 message, the hash is the signed message. What is recovered is the signer address.\n * @param sig bytes signature, the signature is generated using web3.eth.sign()\n */\n function recover(bytes32 hash, bytes sig) public pure returns (address) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n\n /* Check the signature length */\n if (sig.length != 65) {\n return (address(0));\n }\n\n /* Divide the signature in r, s and v variables */\n assembly {\n r := mload(add(sig, 32))\n s := mload(add(sig, 64))\n v := byte(0, mload(add(sig, 96)))\n }\n\n /* Version of signature should be 27 or 28, but 0 and 1 are also possible versions */\n if (v < 27) {\n v += 27;\n }\n\n /* If the version is correct return the signer address */\n if (v != 27 && v != 28) {\n return (address(0));\n } else {\n return ecrecover(hash, v, r, s);\n }\n }\n\n}\n\n\n\n\n\n\n\n\n/**\n * @title Basic token\n * @dev Basic version of StandardToken, with no allowances.\n */\ncontract BasicToken is ERC20Basic {\n using SafeMath for uint256;\n\n mapping(address => uint256) balances;\n\n uint256 totalSupply_;\n\n /**\n * @dev total number of tokens in existence\n */\n function totalSupply() public view returns (uint256) {\n return totalSupply_;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param _to The address to transfer to.\n * @param _value The amount to be transferred.\n */\n function transfer(address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[msg.sender]);\n\n // SafeMath.sub will throw if there is not enough balance.\n balances[msg.sender] = balances[msg.sender].sub(_value);\n balances[_to] = balances[_to].add(_value);\n Transfer(msg.sender, _to, _value);\n return true;\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param _owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address _owner) public view returns (uint256 balance) {\n return balances[_owner];\n }\n\n}\n\n\n\n\n/**\n * @title Standard ERC20 token\n *\n * @dev Implementation of the basic standard token.\n * @dev https://github.com/ethereum/EIPs/issues/20\n * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol\n */\ncontract StandardToken is ERC20, BasicToken {\n\n mapping (address => mapping (address => uint256)) internal allowed;\n\n\n /**\n * @dev Transfer tokens from one address to another\n * @param _from address The address which you want to send tokens from\n * @param _to address The address which you want to transfer to\n * @param _value uint256 the amount of tokens to be transferred\n */\n function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[_from]);\n require(_value <= allowed[_from][msg.sender]);\n\n balances[_from] = balances[_from].sub(_value);\n balances[_to] = balances[_to].add(_value);\n allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);\n Transfer(_from, _to, _value);\n return true;\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n *\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param _spender The address which will spend the funds.\n * @param _value The amount of tokens to be spent.\n */\n function approve(address _spender, uint256 _value) public returns (bool) {\n allowed[msg.sender][_spender] = _value;\n Approval(msg.sender, _spender, _value);\n return true;\n }\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param _owner address The address which owns the funds.\n * @param _spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address _owner, address _spender) public view returns (uint256) {\n return allowed[_owner][_spender];\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(address _spender, uint _addedValue) public returns (bool) {\n allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {\n uint oldValue = allowed[msg.sender][_spender];\n if (_subtractedValue > oldValue) {\n allowed[msg.sender][_spender] = 0;\n } else {\n allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);\n }\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n}\n\n\ncontract InvestorInteractionContract is BogusAnnouncement, CheckpointToken, ERC865 {\n uint256 public blockNumber;\n CheckpointToken public token;\n mapping(address => bool) public balanceImported;\n\n KYCInterface public KYC;\n\n mapping(address => bytes32) public options;\n mapping(address => mapping(address => uint256)) public used;\n uint256 public optionsTotal;\n uint256 public maximumSupply;\n\n event OptionAdded(address option, bytes32 description);\n event IICCreated(address token, address KYC, uint256 blockNumber, uint256 maximumSupply);\n\n function InvestorInteractionContract(CheckpointToken _token, KYCInterface _KYC, bytes32 name, bytes32 URI, uint256 _type, uint256 _hash, uint256 _blockNumber, bytes32[] _options) CheckpointToken(\"\", \"\", 18) BogusAnnouncement(name, URI, _type, _hash) public {\n token = _token;\n if (_blockNumber > 0) {\n blockNumber = _blockNumber;\n } else {\n blockNumber = block.number;\n }\n KYC = _KYC;\n\n for(uint i=0; i<_options.length; i++) {\n address optionAddress = address(100 + i);\n options[optionAddress] = _options[i];\n\n OptionAdded(optionAddress, _options[i]);\n }\n\n maximumSupply = token.totalSupplyAt(blockNumber);\n\n IICCreated(_token, _KYC, _blockNumber, maximumSupply);\n }\n\n function importInvestor(address investor) public {\n // Anyone can invoke this for failsafe reasons\n\n require(balanceImported[investor] == false);\n\n uint256 value = token.balanceAt(investor, blockNumber);\n uint256 blackHoleBalance = balanceOf(address(0));\n uint256 totalSupplyNow = totalSupply();\n\n setCheckpoint(tokenBalances[address(0)], blackHoleBalance.add(value));\n transferInternal(address(0), investor, value);\n setCheckpoint(tokensTotal, totalSupplyNow.add(value));\n\n balanceImported[investor] = true;\n Transfer(address(0), investor, value);\n }\n\n function transferTrigger(address from, address to, uint256 amount) internal {\n used[to][from] += amount;\n }\n\n function transfer(address _to, uint256 _value) public returns (bool) {\n if (balanceImported[msg.sender] == false) {\n importInvestor(msg.sender);\n }\n\n if (options[_to] != 0) {\n require(KYC.isWhitelisted(msg.sender));\n transferTrigger(msg.sender, _to, _value);\n }\n\n // Doing this as msg.sender:\n return super.transfer(_to, _value);\n }\n\n function transferInvestorTokens(address to, uint256 amount) {\n transfer(to, amount);\n }\n\n function act(uint256 amount) external {\n // This is for the default action, address 100\n transferInvestorTokens(address(100), amount);\n }\n}\n"}, "Issuer": {"abi": [{"constant": true, "inputs": [], "name": "issuedCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "benefactor", "type": "address"}, {"name": "amount", "type": "uint256"}], "name": "issue", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "allower", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "issued", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "token", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [{"name": "_owner", "type": "address"}, {"name": "_allower", "type": "address"}, {"name": "_token", "type": "address"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "bytecode": "0x608060405234801561001057600080fd5b506040516060806104e78339810160409081528151602083015191909201516000805433600160a060020a0319918216178116600160a060020a0395861617825560038054821694861694909417909355600280549093169390911692909217905561046590819061008290396000f3006080604052600436106100825763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630b0f77438114610087578063867904b4146100ae5780638da5cb5b146100e1578063dd449a831461011f578063f02d7ef014610134578063f2fde38b14610176578063fc0c546a146101a4575b600080fd5b34801561009357600080fd5b5061009c6101b9565b60408051918252519081900360200190f35b3480156100ba57600080fd5b506100df73ffffffffffffffffffffffffffffffffffffffff600435166024356101bf565b005b3480156100ed57600080fd5b506100f6610308565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561012b57600080fd5b506100f6610324565b34801561014057600080fd5b5061016273ffffffffffffffffffffffffffffffffffffffff60043516610340565b604080519115158252519081900360200190f35b34801561018257600080fd5b506100df73ffffffffffffffffffffffffffffffffffffffff60043516610355565b3480156101b057600080fd5b506100f661041d565b60045481565b60005473ffffffffffffffffffffffffffffffffffffffff1633146101e357600080fd5b73ffffffffffffffffffffffffffffffffffffffff821660009081526001602052604090205460ff161561021657600080fd5b600254600354604080517f23b872dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9283166004820152858316602482015260448101859052905191909216916323b872dd9160648083019260209291908290030181600087803b15801561029d57600080fd5b505af11580156102b1573d6000803e3d6000fd5b505050506040513d60208110156102c757600080fd5b505073ffffffffffffffffffffffffffffffffffffffff9091166000908152600160208190526040909120805460ff19169091179055600480549091019055565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b60016020526000908152604090205460ff1681565b60005473ffffffffffffffffffffffffffffffffffffffff16331461037957600080fd5b73ffffffffffffffffffffffffffffffffffffffff8116151561039b57600080fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff191673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60025473ffffffffffffffffffffffffffffffffffffffff16815600a165627a7a7230582032a4153ec3bf191ebdf89b36b2d3dfeca9a67704a9b70f3cb7e066bcdf4f7ce10029", "bytecode_runtime": "0x6080604052600436106100825763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630b0f77438114610087578063867904b4146100ae5780638da5cb5b146100e1578063dd449a831461011f578063f02d7ef014610134578063f2fde38b14610176578063fc0c546a146101a4575b600080fd5b34801561009357600080fd5b5061009c6101b9565b60408051918252519081900360200190f35b3480156100ba57600080fd5b506100df73ffffffffffffffffffffffffffffffffffffffff600435166024356101bf565b005b3480156100ed57600080fd5b506100f6610308565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561012b57600080fd5b506100f6610324565b34801561014057600080fd5b5061016273ffffffffffffffffffffffffffffffffffffffff60043516610340565b604080519115158252519081900360200190f35b34801561018257600080fd5b506100df73ffffffffffffffffffffffffffffffffffffffff60043516610355565b3480156101b057600080fd5b506100f661041d565b60045481565b60005473ffffffffffffffffffffffffffffffffffffffff1633146101e357600080fd5b73ffffffffffffffffffffffffffffffffffffffff821660009081526001602052604090205460ff161561021657600080fd5b600254600354604080517f23b872dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9283166004820152858316602482015260448101859052905191909216916323b872dd9160648083019260209291908290030181600087803b15801561029d57600080fd5b505af11580156102b1573d6000803e3d6000fd5b505050506040513d60208110156102c757600080fd5b505073ffffffffffffffffffffffffffffffffffffffff9091166000908152600160208190526040909120805460ff19169091179055600480549091019055565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b60016020526000908152604090205460ff1681565b60005473ffffffffffffffffffffffffffffffffffffffff16331461037957600080fd5b73ffffffffffffffffffffffffffffffffffffffff8116151561039b57600080fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff191673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60025473ffffffffffffffffffffffffffffffffffffffff16815600a165627a7a7230582032a4153ec3bf191ebdf89b36b2d3dfeca9a67704a9b70f3cb7e066bcdf4f7ce10029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": true, "inputs": [], "name": "issuedCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "benefactor", "type": "address"}, {"name": "amount", "type": "uint256"}], "name": "issue", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "allower", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "issued", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "token", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [{"name": "_owner", "type": "address"}, {"name": "_allower", "type": "address"}, {"name": "_token", "type": "address"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "devdoc": {"methods": {"transferOwnership(address)": {"details": "Allows the current owner to transfer control of the contract to a newOwner.", "params": {"newOwner": "The address to transfer ownership to."}}}}, "userdoc": {"methods": {}}}, "settings": {"compilationTarget": {"contracts/Issuer.sol": "Issuer"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/Issuer.sol": {"keccak256": "0xb10a5f563c35e5037d0fcc11696f94176be7387b78170d3b3372782d616e4983", "urls": ["bzzr://ac4e8dadd19d713bc2ce1fac1939d79aa8b0cf100731f91d3e0f63fb86991fd7"]}, "contracts/Recoverable.sol": {"keccak256": "0x311a332cdd87df6e00057f5455f4e68b043b5dbe211f6d68bc64e20817515635", "urls": ["bzzr://4fd99bcfb93baed6e7c8d22ee9ecc5c8346a1aa98288e77b01333b2c5d3f582d"]}, "contracts/StandardTokenExt.sol": {"keccak256": "0x9ea2d4cec4dccd5639c05e6c23dd027d80b5e5a20abd99b280ab7b2631b5a5fc", "urls": ["bzzr://a52d8fc5a21bd83997aff19128e00dceb251df712207b61223894c8b7f42d5ff"]}, "zeppelin/contracts/math/SafeMath.sol": {"keccak256": "0x341ba8cb467a3623e819ba1a683ac1d264005186f308505214e5f6bc89446a08", "urls": ["bzzr://59b5652ee4e4a1b5a8f1a8906e14c84af43d636cf5ca0725cc1813aabe4c8c17"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}, "zeppelin/contracts/token/ERC20/BasicToken.sol": {"keccak256": "0x948404468d61ff35ea4194650670408dabd65da7f905a1c16888ab84520bf39e", "urls": ["bzzr://ea75e20f95d7e4e10394fe6bfaa8eee56b4757c2a6f1e8df4180d33afa621935"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}, "zeppelin/contracts/token/ERC20/StandardToken.sol": {"keccak256": "0xd2b344a5259e19ec143074cfa65637a10c40b68395c59808c4af13bccbb2de55", "urls": ["bzzr://d61a01175a7ca1ba9f4403de603c20b897e33ec425aef2d9f8a7f9ddfdfaf5b2"]}}, "version": 1}, "name": "Issuer", "ordered_full_dependencies": [], "source_path": "contracts/Issuer.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n assert(c / a == b);\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n\n\n\n/**\n * @title Basic token\n * @dev Basic version of StandardToken, with no allowances.\n */\ncontract BasicToken is ERC20Basic {\n using SafeMath for uint256;\n\n mapping(address => uint256) balances;\n\n uint256 totalSupply_;\n\n /**\n * @dev total number of tokens in existence\n */\n function totalSupply() public view returns (uint256) {\n return totalSupply_;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param _to The address to transfer to.\n * @param _value The amount to be transferred.\n */\n function transfer(address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[msg.sender]);\n\n // SafeMath.sub will throw if there is not enough balance.\n balances[msg.sender] = balances[msg.sender].sub(_value);\n balances[_to] = balances[_to].add(_value);\n Transfer(msg.sender, _to, _value);\n return true;\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param _owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address _owner) public view returns (uint256 balance) {\n return balances[_owner];\n }\n\n}\n\n\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n\n\n/**\n * @title Standard ERC20 token\n *\n * @dev Implementation of the basic standard token.\n * @dev https://github.com/ethereum/EIPs/issues/20\n * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol\n */\ncontract StandardToken is ERC20, BasicToken {\n\n mapping (address => mapping (address => uint256)) internal allowed;\n\n\n /**\n * @dev Transfer tokens from one address to another\n * @param _from address The address which you want to send tokens from\n * @param _to address The address which you want to transfer to\n * @param _value uint256 the amount of tokens to be transferred\n */\n function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[_from]);\n require(_value <= allowed[_from][msg.sender]);\n\n balances[_from] = balances[_from].sub(_value);\n balances[_to] = balances[_to].add(_value);\n allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);\n Transfer(_from, _to, _value);\n return true;\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n *\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param _spender The address which will spend the funds.\n * @param _value The amount of tokens to be spent.\n */\n function approve(address _spender, uint256 _value) public returns (bool) {\n allowed[msg.sender][_spender] = _value;\n Approval(msg.sender, _spender, _value);\n return true;\n }\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param _owner address The address which owns the funds.\n * @param _spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address _owner, address _spender) public view returns (uint256) {\n return allowed[_owner][_spender];\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(address _spender, uint _addedValue) public returns (bool) {\n allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {\n uint oldValue = allowed[msg.sender][_spender];\n if (_subtractedValue > oldValue) {\n allowed[msg.sender][_spender] = 0;\n } else {\n allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);\n }\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n\ncontract Recoverable is Ownable {\n\n /// @dev Empty constructor (for now)\n function Recoverable() {\n }\n\n /// @dev This will be invoked by the owner, when owner wants to rescue tokens\n /// @param token Token which will we rescue to the owner from the contract\n function recoverTokens(ERC20Basic token) onlyOwner public {\n token.transfer(owner, tokensToBeReturned(token));\n }\n\n /// @dev Interface function, can be overwritten by the superclass\n /// @param token Token which balance we will check and return\n /// @return The amount of tokens (in smallest denominator) the contract owns\n function tokensToBeReturned(ERC20Basic token) public returns (uint) {\n return token.balanceOf(this);\n }\n}\n\n\n\n/**\n * Standard EIP-20 token with an interface marker.\n *\n * @notice Interface marker is used by crowdsale contracts to validate that addresses point a good token contract.\n *\n */\ncontract StandardTokenExt is StandardToken, Recoverable {\n\n /* Interface declaration */\n function isToken() public constant returns (bool weAre) {\n return true;\n }\n}\n\n\n\n/**\n * Issuer manages token distribution after the crowdsale.\n *\n * This contract is fed a CSV file with Ethereum addresses and their\n * issued token balances.\n *\n * Issuer act as a gate keeper to ensure there is no double issuance\n * per address, in the case we need to do several issuance batches,\n * there is a race condition or there is a fat finger error.\n *\n * Issuer contract gets allowance from the team multisig to distribute tokens.\n *\n */\ncontract Issuer is Ownable {\n\n /** Map addresses whose tokens we have already issued. */\n mapping(address => bool) public issued;\n\n /** Centrally issued token we are distributing to our contributors */\n StandardTokenExt public token;\n\n /** Party (team multisig) who is in the control of the token pool. Note that this will be different from the owner address (scripted) that calls this contract. */\n address public allower;\n\n /** How many addresses have received their tokens. */\n uint public issuedCount;\n\n function Issuer(address _owner, address _allower, StandardTokenExt _token) {\n owner = _owner;\n allower = _allower;\n token = _token;\n }\n\n function issue(address benefactor, uint amount) onlyOwner {\n if(issued[benefactor]) throw;\n token.transferFrom(allower, benefactor, amount);\n issued[benefactor] = true;\n issuedCount += amount;\n }\n\n}\n"}, "IssuerWithId": {"abi": [{"constant": true, "inputs": [], "name": "issuedCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "uint256"}], "name": "issued", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "allower", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "benefactor", "type": "address"}, {"name": "amount", "type": "uint256"}, {"name": "id", "type": "uint256"}], "name": "issue", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "token", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [{"name": "_owner", "type": "address"}, {"name": "_allower", "type": "address"}, {"name": "_token", "type": "address"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "benefactor", "type": "address"}, {"indexed": false, "name": "amount", "type": "uint256"}, {"indexed": false, "name": "id", "type": "uint256"}], "name": "Issued", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "bytecode": "0x608060405234801561001057600080fd5b5060405160608061054683398101604090815281516020830151919092015160008054600160a060020a03191633179055600160a060020a038316151561005657600080fd5b600160a060020a038216151561006b57600080fd5b600160a060020a038116151561008057600080fd5b60008054600160a060020a03948516600160a060020a03199182161790915560038054938516938216939093179092556002805491909316911617905561047a806100cc6000396000f3006080604052600436106100825763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630b0f77438114610087578063647dfbed146100ae5780638da5cb5b146100da578063dd449a8314610118578063dfe5ef481461012d578063f2fde38b14610163578063fc0c546a14610191575b600080fd5b34801561009357600080fd5b5061009c6101a6565b60408051918252519081900360200190f35b3480156100ba57600080fd5b506100c66004356101ac565b604080519115158252519081900360200190f35b3480156100e657600080fd5b506100ef6101c1565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561012457600080fd5b506100ef6101dd565b34801561013957600080fd5b5061016173ffffffffffffffffffffffffffffffffffffffff600435166024356044356101f9565b005b34801561016f57600080fd5b5061016173ffffffffffffffffffffffffffffffffffffffff6004351661036a565b34801561019d57600080fd5b506100ef610432565b60045481565b60016020526000908152604090205460ff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff16331461021d57600080fd5b60008181526001602052604090205460ff161561023957600080fd5b600254600354604080517f23b872dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9283166004820152868316602482015260448101869052905191909216916323b872dd9160648083019260209291908290030181600087803b1580156102c057600080fd5b505af11580156102d4573d6000803e3d6000fd5b505050506040513d60208110156102ea57600080fd5b5050600081815260016020818152604092839020805460ff19169092179091556004805485019055815173ffffffffffffffffffffffffffffffffffffffff8616815290810184905280820183905290517f8269ee3da431ac4749e945c9753440ce6e9c96a9807c29e4228328cfab2722599181900360600190a1505050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461038e57600080fd5b73ffffffffffffffffffffffffffffffffffffffff811615156103b057600080fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff191673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60025473ffffffffffffffffffffffffffffffffffffffff16815600a165627a7a72305820c06114bb56be3998b65ee049ef6a9a07218443c83da04c4b768f722c0843b0700029", "bytecode_runtime": "0x6080604052600436106100825763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630b0f77438114610087578063647dfbed146100ae5780638da5cb5b146100da578063dd449a8314610118578063dfe5ef481461012d578063f2fde38b14610163578063fc0c546a14610191575b600080fd5b34801561009357600080fd5b5061009c6101a6565b60408051918252519081900360200190f35b3480156100ba57600080fd5b506100c66004356101ac565b604080519115158252519081900360200190f35b3480156100e657600080fd5b506100ef6101c1565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561012457600080fd5b506100ef6101dd565b34801561013957600080fd5b5061016173ffffffffffffffffffffffffffffffffffffffff600435166024356044356101f9565b005b34801561016f57600080fd5b5061016173ffffffffffffffffffffffffffffffffffffffff6004351661036a565b34801561019d57600080fd5b506100ef610432565b60045481565b60016020526000908152604090205460ff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff16331461021d57600080fd5b60008181526001602052604090205460ff161561023957600080fd5b600254600354604080517f23b872dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9283166004820152868316602482015260448101869052905191909216916323b872dd9160648083019260209291908290030181600087803b1580156102c057600080fd5b505af11580156102d4573d6000803e3d6000fd5b505050506040513d60208110156102ea57600080fd5b5050600081815260016020818152604092839020805460ff19169092179091556004805485019055815173ffffffffffffffffffffffffffffffffffffffff8616815290810184905280820183905290517f8269ee3da431ac4749e945c9753440ce6e9c96a9807c29e4228328cfab2722599181900360600190a1505050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461038e57600080fd5b73ffffffffffffffffffffffffffffffffffffffff811615156103b057600080fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff191673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60025473ffffffffffffffffffffffffffffffffffffffff16815600a165627a7a72305820c06114bb56be3998b65ee049ef6a9a07218443c83da04c4b768f722c0843b0700029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": true, "inputs": [], "name": "issuedCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "uint256"}], "name": "issued", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "allower", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "benefactor", "type": "address"}, {"name": "amount", "type": "uint256"}, {"name": "id", "type": "uint256"}], "name": "issue", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "token", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [{"name": "_owner", "type": "address"}, {"name": "_allower", "type": "address"}, {"name": "_token", "type": "address"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "benefactor", "type": "address"}, {"indexed": false, "name": "amount", "type": "uint256"}, {"indexed": false, "name": "id", "type": "uint256"}], "name": "Issued", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "devdoc": {"methods": {"transferOwnership(address)": {"details": "Allows the current owner to transfer control of the contract to a newOwner.", "params": {"newOwner": "The address to transfer ownership to."}}}}, "userdoc": {"methods": {}}}, "settings": {"compilationTarget": {"contracts/IssuerWithId.sol": "IssuerWithId"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/IssuerWithId.sol": {"keccak256": "0x4ff40abce06ca5bc0443461ce56d3af51732d917a85b6563bc0721bae8ef1f02", "urls": ["bzzr://16fd74efe32e22407cb37917b62eb38909f73119e7a154506fbfcb364cd20bb0"]}, "contracts/Recoverable.sol": {"keccak256": "0x311a332cdd87df6e00057f5455f4e68b043b5dbe211f6d68bc64e20817515635", "urls": ["bzzr://4fd99bcfb93baed6e7c8d22ee9ecc5c8346a1aa98288e77b01333b2c5d3f582d"]}, "contracts/StandardTokenExt.sol": {"keccak256": "0x9ea2d4cec4dccd5639c05e6c23dd027d80b5e5a20abd99b280ab7b2631b5a5fc", "urls": ["bzzr://a52d8fc5a21bd83997aff19128e00dceb251df712207b61223894c8b7f42d5ff"]}, "zeppelin/contracts/math/SafeMath.sol": {"keccak256": "0x341ba8cb467a3623e819ba1a683ac1d264005186f308505214e5f6bc89446a08", "urls": ["bzzr://59b5652ee4e4a1b5a8f1a8906e14c84af43d636cf5ca0725cc1813aabe4c8c17"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}, "zeppelin/contracts/token/ERC20/BasicToken.sol": {"keccak256": "0x948404468d61ff35ea4194650670408dabd65da7f905a1c16888ab84520bf39e", "urls": ["bzzr://ea75e20f95d7e4e10394fe6bfaa8eee56b4757c2a6f1e8df4180d33afa621935"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}, "zeppelin/contracts/token/ERC20/StandardToken.sol": {"keccak256": "0xd2b344a5259e19ec143074cfa65637a10c40b68395c59808c4af13bccbb2de55", "urls": ["bzzr://d61a01175a7ca1ba9f4403de603c20b897e33ec425aef2d9f8a7f9ddfdfaf5b2"]}}, "version": 1}, "name": "IssuerWithId", "ordered_full_dependencies": [], "source_path": "contracts/IssuerWithId.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n assert(c / a == b);\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n\n\n\n/**\n * @title Basic token\n * @dev Basic version of StandardToken, with no allowances.\n */\ncontract BasicToken is ERC20Basic {\n using SafeMath for uint256;\n\n mapping(address => uint256) balances;\n\n uint256 totalSupply_;\n\n /**\n * @dev total number of tokens in existence\n */\n function totalSupply() public view returns (uint256) {\n return totalSupply_;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param _to The address to transfer to.\n * @param _value The amount to be transferred.\n */\n function transfer(address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[msg.sender]);\n\n // SafeMath.sub will throw if there is not enough balance.\n balances[msg.sender] = balances[msg.sender].sub(_value);\n balances[_to] = balances[_to].add(_value);\n Transfer(msg.sender, _to, _value);\n return true;\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param _owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address _owner) public view returns (uint256 balance) {\n return balances[_owner];\n }\n\n}\n\n\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n\n\n/**\n * @title Standard ERC20 token\n *\n * @dev Implementation of the basic standard token.\n * @dev https://github.com/ethereum/EIPs/issues/20\n * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol\n */\ncontract StandardToken is ERC20, BasicToken {\n\n mapping (address => mapping (address => uint256)) internal allowed;\n\n\n /**\n * @dev Transfer tokens from one address to another\n * @param _from address The address which you want to send tokens from\n * @param _to address The address which you want to transfer to\n * @param _value uint256 the amount of tokens to be transferred\n */\n function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[_from]);\n require(_value <= allowed[_from][msg.sender]);\n\n balances[_from] = balances[_from].sub(_value);\n balances[_to] = balances[_to].add(_value);\n allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);\n Transfer(_from, _to, _value);\n return true;\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n *\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param _spender The address which will spend the funds.\n * @param _value The amount of tokens to be spent.\n */\n function approve(address _spender, uint256 _value) public returns (bool) {\n allowed[msg.sender][_spender] = _value;\n Approval(msg.sender, _spender, _value);\n return true;\n }\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param _owner address The address which owns the funds.\n * @param _spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address _owner, address _spender) public view returns (uint256) {\n return allowed[_owner][_spender];\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(address _spender, uint _addedValue) public returns (bool) {\n allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {\n uint oldValue = allowed[msg.sender][_spender];\n if (_subtractedValue > oldValue) {\n allowed[msg.sender][_spender] = 0;\n } else {\n allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);\n }\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n\ncontract Recoverable is Ownable {\n\n /// @dev Empty constructor (for now)\n function Recoverable() {\n }\n\n /// @dev This will be invoked by the owner, when owner wants to rescue tokens\n /// @param token Token which will we rescue to the owner from the contract\n function recoverTokens(ERC20Basic token) onlyOwner public {\n token.transfer(owner, tokensToBeReturned(token));\n }\n\n /// @dev Interface function, can be overwritten by the superclass\n /// @param token Token which balance we will check and return\n /// @return The amount of tokens (in smallest denominator) the contract owns\n function tokensToBeReturned(ERC20Basic token) public returns (uint) {\n return token.balanceOf(this);\n }\n}\n\n\n\n/**\n * Standard EIP-20 token with an interface marker.\n *\n * @notice Interface marker is used by crowdsale contracts to validate that addresses point a good token contract.\n *\n */\ncontract StandardTokenExt is StandardToken, Recoverable {\n\n /* Interface declaration */\n function isToken() public constant returns (bool weAre) {\n return true;\n }\n}\n\n\n\n/**\n * Issuer manages token distribution after the crowdsale.\n *\n * This contract is fed a CSV file with Ethereum addresses and their\n * issued token balances.\n *\n * Issuer act as a gate keeper to ensure there is no double issuance\n * per ID number, in the case we need to do several issuance batches,\n * there is a race condition or there is a fat finger error.\n *\n * Issuer contract gets allowance from the team multisig to distribute tokens.\n *\n */\ncontract IssuerWithId is Ownable {\n\n /** Map IDs whose tokens we have already issued. */\n mapping(uint => bool) public issued;\n\n /** Centrally issued token we are distributing to our contributors */\n StandardTokenExt public token;\n\n /** Party (team multisig) who is in the control of the token pool. Note that this will be different from the owner address (scripted) that calls this contract. */\n address public allower;\n\n /** How many tokens have been issued. */\n uint public issuedCount;\n\n /** Issue event **/\n event Issued(address benefactor, uint amount, uint id);\n\n function IssuerWithId(address _owner, address _allower, StandardTokenExt _token) {\n require(address(_owner) != address(0));\n require(address(_allower) != address(0));\n require(address(_token) != address(0));\n\n owner = _owner;\n allower = _allower;\n token = _token;\n }\n\n function issue(address benefactor, uint amount, uint id) onlyOwner {\n if(issued[id]) throw;\n token.transferFrom(allower, benefactor, amount);\n issued[id] = true;\n issuedCount += amount;\n\n Issued(benefactor, amount, id);\n }\n\n}\n"}, "KYCCrowdsale": {"abi": [{"constant": true, "inputs": [], "name": "ownerTestValue", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_signerAddress", "type": "address"}], "name": "setSignerAddress", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "isPricingSane", "outputs": [{"name": "sane", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "endsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "minimumFundingGoal", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getState", "outputs": [{"name": "", "type": "uint8"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setFinalizeAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "investedAmountOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "finalizeAgent", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "beneficiary", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "weiRaised", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isCrowdsale", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "finalize", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_pricingStrategy", "type": "address"}], "name": "setPricingStrategy", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "tokensSold", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "refund", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "signerAddress", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "weiRefunded", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "halt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "time", "type": "uint256"}], "name": "setEndsAt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "dataframe", "type": "bytes"}], "name": "getKYCPayload", "outputs": [{"name": "whitelistedAddress", "type": "address"}, {"name": "customerId", "type": "uint128"}, {"name": "minEth", "type": "uint32"}, {"name": "maxEth", "type": "uint32"}, {"name": "pricingInfo", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "pricingStrategy", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "loadedRefund", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isMinimumGoalReached", "outputs": [{"name": "reached", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "loadRefund", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "val", "type": "uint256"}], "name": "setOwnerTestValue", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "weisTotal", "type": "uint256"}, {"name": "pricePerToken", "type": "uint256"}], "name": "calculateTokens", "outputs": [{"name": "tokensTotal", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "multisigWallet", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "tokenAmountOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "weiAmount", "type": "uint256"}, {"name": "tokenAmount", "type": "uint256"}, {"name": "weiRaisedTotal", "type": "uint256"}, {"name": "tokensSoldTotal", "type": "uint256"}], "name": "isBreakingCap", "outputs": [{"name": "limitBroken", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isFinalizerSane", "outputs": [{"name": "sane", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "startsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "finalized", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "halted", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "earlyParticipantWhitelist", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "unhalt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "isCrowdsaleFull", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "dataframe", "type": "bytes"}, {"name": "v", "type": "uint8"}, {"name": "r", "type": "bytes32"}, {"name": "s", "type": "bytes32"}], "name": "buyWithKYCData", "outputs": [{"name": "tokenAmount", "type": "uint256"}], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "investorCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getTokensLeft", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "status", "type": "bool"}], "name": "setEarlyParicipantWhitelist", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setMultisig", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "presaleWeiRaised", "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": "_token", "type": "address"}, {"name": "_pricingStrategy", "type": "address"}, {"name": "_multisigWallet", "type": "address"}, {"name": "_start", "type": "uint256"}, {"name": "_end", "type": "uint256"}, {"name": "_minimumFundingGoal", "type": "uint256"}, {"name": "_beneficiary", "type": "address"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"payable": true, "stateMutability": "payable", "type": "fallback"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "signer", "type": "address"}], "name": "SignerChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}, {"indexed": false, "name": "tokenAmount", "type": "uint256"}, {"indexed": false, "name": "customerId", "type": "uint128"}], "name": "Invested", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}], "name": "Refund", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newRequireCustomerId", "type": "bool"}, {"indexed": false, "name": "newRequiredSignedAddress", "type": "bool"}, {"indexed": false, "name": "newSignerAddress", "type": "address"}], "name": "InvestmentPolicyChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "addr", "type": "address"}, {"indexed": false, "name": "status", "type": "bool"}], "name": "Whitelisted", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newEndsAt", "type": "uint256"}], "name": "EndsAtChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "bytecode": "0x6080604052600560015560006009556000600a556000600b556000600c556000600d556000600e553480156200003457600080fd5b5060405160e080620026c183398101604090815281516020830151918301516060840151608085015160a086015160c0909601516000805433600160a060020a0319918216811782161790915560028054909116600160a060020a038716179055939592939192909180878787878787620000b88564010000000062000150810204565b60058054600160a060020a031916600160a060020a038681169190911791829055161515620000e657600080fd5b821515620000f357600080fd5b60078390558115156200010557600080fd5b600882905560075482116200011957600080fd5b600655505060148054600160a060020a031916600160a060020a039590951694909417909355506200021d98505050505050505050565b600054600160a060020a031633146200016857600080fd5b60038054600160a060020a031916600160a060020a038381169190911791829055604080517f04bbc255000000000000000000000000000000000000000000000000000000008152905192909116916304bbc255916004808201926020929091908290030181600087803b158015620001e057600080fd5b505af1158015620001f5573d6000803e3d6000fd5b505050506040513d60208110156200020c57600080fd5b505115156200021a57600080fd5b50565b612494806200022d6000396000f3006080604052600436106102215763ffffffff60e060020a6000350416630226401d8114610226578063046dc1661461024d578063062b01ce146102705780630a09284a1461029957806313f4e977146102ae5780631865c57d146102c357806319b667da146102fc5780631aae34601461031d57806321d5c0f61461033e57806338af3eed1461036f5780634042b66f146103845780634551dd59146103995780634bb278f3146103ae57806350c67734146103c3578063518ab2a8146103e4578063590e1ae3146103f95780635b7633d01461040e5780635da89ac0146104235780635ed7ca5b146104385780636203f09f1461044d5780636e50eb3f1461046257806373752db41461047a57806378b99c2414610520578063797d9437146105355780637c2e08a31461054a578063876121021461055f5780638d51faec146105675780638da5cb5b1461057f578063903cc583146105945780639075becf146105af57806397b150ca146105c45780639d3c663f146105e5578063a7ba44c314610606578063af4686821461061b578063b3f05b9714610630578063b9b8af0b14610645578063cb16e6d01461065a578063cb3e64fd1461067b578063d5d0902114610690578063d7c7159c146106a5578063d7e64c0014610700578063de5f986614610715578063eac249321461072a578063f2fde38b14610750578063f3283fba14610771578063f7c00e2f14610792578063fc0c546a146107a7575b600080fd5b34801561023257600080fd5b5061023b6107bc565b60408051918252519081900360200190f35b34801561025957600080fd5b5061026e600160a060020a03600435166107c2565b005b34801561027c57600080fd5b50610285610840565b604080519115158252519081900360200190f35b3480156102a557600080fd5b5061023b6108d7565b3480156102ba57600080fd5b5061023b6108dd565b3480156102cf57600080fd5b506102d86108e3565b604051808260078111156102e857fe5b60ff16815260200191505060405180910390f35b34801561030857600080fd5b5061026e600160a060020a0360043516610ad1565b34801561032957600080fd5b5061023b600160a060020a0360043516610ba2565b34801561034a57600080fd5b50610353610bb4565b60408051600160a060020a039092168252519081900360200190f35b34801561037b57600080fd5b50610353610bc3565b34801561039057600080fd5b5061023b610bd2565b3480156103a557600080fd5b50610285610bd8565b3480156103ba57600080fd5b5061026e610bdd565b3480156103cf57600080fd5b5061026e600160a060020a0360043516610ce2565b3480156103f057600080fd5b5061023b610d7d565b34801561040557600080fd5b5061026e610d83565b34801561041a57600080fd5b50610353610edf565b34801561042f57600080fd5b5061023b610eee565b34801561044457600080fd5b5061026e610ef4565b34801561045957600080fd5b5061023b610f42565b34801561046e57600080fd5b5061026e600435610f48565b34801561048657600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526104d3943694929360249392840191908190840183828082843750949750610fb69650505050505050565b60408051600160a060020a0390961686526fffffffffffffffffffffffffffffffff909416602086015263ffffffff92831685850152911660608401526080830152519081900360a00190f35b34801561052c57600080fd5b506103536114d5565b34801561054157600080fd5b5061023b6114e4565b34801561055657600080fd5b506102856114ea565b61026e6114f5565b34801561057357600080fd5b5061026e6004356115c7565b34801561058b57600080fd5b506103536115e3565b3480156105a057600080fd5b5061023b6004356024356115f2565b3480156105bb57600080fd5b50610353611730565b3480156105d057600080fd5b5061023b600160a060020a036004351661173f565b3480156105f157600080fd5b50610285600435602435604435606435611751565b34801561061257600080fd5b50610285611776565b34801561062757600080fd5b5061023b6117cb565b34801561063c57600080fd5b506102856117d1565b34801561065157600080fd5b506102856117da565b34801561066657600080fd5b50610285600160a060020a03600435166117fb565b34801561068757600080fd5b5061026e611810565b34801561069c57600080fd5b50610285611870565b6040805160206004803580820135601f810184900484028501840190955284845261023b9436949293602493928401919081908401838280828437509497505050833560ff1694505050602082013591604001359050611880565b34801561070c57600080fd5b5061023b611ac3565b34801561072157600080fd5b5061023b611ac9565b34801561073657600080fd5b5061026e600160a060020a03600435166024351515611b3d565b34801561075c57600080fd5b5061026e600160a060020a0360043516611bb8565b34801561077d57600080fd5b5061026e600160a060020a0360043516611c4c565b34801561079e57600080fd5b5061023b611ca3565b3480156107b357600080fd5b50610353611ca9565b60135481565b600054600160a060020a031633146107d957600080fd5b6015805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03838116919091179182905560408051929091168252517f5719a5656c5cfdaafa148ecf366fd3b0a7fae06449ce2a46225977fb7417e29d916020908290030190a150565b600354604080517f8e7682880000000000000000000000000000000000000000000000000000000081523060048201529051600092600160a060020a031691638e76828891602480830192602092919082900301818787803b1580156108a557600080fd5b505af11580156108b9573d6000803e3d6000fd5b505050506040513d60208110156108cf57600080fd5b505190505b90565b60085481565b60065481565b600f5460009060ff16156108f9575060066108d4565b600454600160a060020a03161515610913575060016108d4565b60048054604080517f82771c8e0000000000000000000000000000000000000000000000000000000081529051600160a060020a03909216926382771c8e9282820192602092908290030181600087803b15801561097057600080fd5b505af1158015610984573d6000803e3d6000fd5b505050506040513d602081101561099a57600080fd5b505115156109aa575060016108d4565b600354604080517f8e7682880000000000000000000000000000000000000000000000000000000081523060048201529051600160a060020a0390921691638e768288916024808201926020929091908290030181600087803b158015610a1057600080fd5b505af1158015610a24573d6000803e3d6000fd5b505050506040513d6020811015610a3a57600080fd5b50511515610a4a575060016108d4565b600754421015610a5c575060026108d4565b6008544211158015610a735750610a71611870565b155b15610a80575060036108d4565b610a886114ea565b15610a95575060046108d4565b610a9d6114ea565b158015610aac57506000600a54115b8015610abc5750600a54600d5410155b15610ac9575060076108d4565b5060056108d4565b600054600160a060020a03163314610ae857600080fd5b6004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383811691909117808355604080517f614cb9040000000000000000000000000000000000000000000000000000000081529051919092169263614cb904928082019260209290918290030181600087803b158015610b6857600080fd5b505af1158015610b7c573d6000803e3d6000fd5b505050506040513d6020811015610b9257600080fd5b50511515610b9f57600080fd5b50565b60106020526000908152604090205481565b600454600160a060020a031681565b601454600160a060020a031681565b600a5481565b600190565b600480610be86108e3565b6007811115610bf357fe5b14610bfd57600080fd5b600054600160a060020a03163314610c1457600080fd5b60005474010000000000000000000000000000000000000000900460ff1615610c3c57600080fd5b600f5460ff1615610c4c57600080fd5b600454600160a060020a031615610cd25760048054604080517f0bf318a30000000000000000000000000000000000000000000000000000000081529051600160a060020a0390921692630bf318a392828201926000929082900301818387803b158015610cb957600080fd5b505af1158015610ccd573d6000803e3d6000fd5b505050505b50600f805460ff19166001179055565b600054600160a060020a03163314610cf957600080fd5b6003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038381169190911791829055604080517f04bbc255000000000000000000000000000000000000000000000000000000008152905192909116916304bbc255916004808201926020929091908290030181600087803b158015610b6857600080fd5b60095481565b6000600780610d906108e3565b6007811115610d9b57fe5b14610da557600080fd5b336000908152601060205260409020549150811515610dc357600080fd5b33600090815260106020908152604080832092909255600e5482517f66098d4f000000000000000000000000000000000000000000000000000000008152600481019190915260248101859052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b158015610e4a57600080fd5b505af4158015610e5e573d6000803e3d6000fd5b505050506040513d6020811015610e7457600080fd5b5051600e55604080513381526020810184905281517fbb28353e4598c3b9199101a66e0989549b659a59a54d2c27fbb183f1932c8e6d929181900390910190a1604051339083156108fc029084906000818181858888f193505050501515610edb57600080fd5b5050565b601554600160a060020a031681565b600e5481565b600054600160a060020a03163314610f0b57600080fd5b6000805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b60015481565b600054600160a060020a03163314610f5f57600080fd5b80421115610f6c57600080fd5b806007541115610f7b57600080fd5b60088190556040805182815290517fd34bb772c4ae9baa99db852f622773b31c7827e8ee818449fef20d30980bd3109181900360200190a150565b6000806000806000806000806000808a73__contracts/BytesDeserializer.sol:Byte__63b655e138909160006040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b83811015611039578181015183820152602001611021565b50505050905090810190601f1680156110665780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b15801561108457600080fd5b505af4158015611098573d6000803e3d6000fd5b505050506040513d60208110156110ae57600080fd5b810190808051906020019092919050505094508a73__contracts/BytesDeserializer.sol:Byte__6316419aa7909160146040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b8381101561113557818101518382015260200161111d565b50505050905090810190601f1680156111625780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b15801561118057600080fd5b505af4158015611194573d6000803e3d6000fd5b505050506040513d60208110156111aa57600080fd5b8101908080519060200190929190505050700100000000000000000000000000000000900493508a73__contracts/BytesDeserializer.sol:Byte__63d54dd8f9909160246040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b8381101561124557818101518382015260200161122d565b50505050905090810190601f1680156112725780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b15801561129057600080fd5b505af41580156112a4573d6000803e3d6000fd5b505050506040513d60208110156112ba57600080fd5b810190808051906020019092919050505060e060020a900492508a73__contracts/BytesDeserializer.sol:Byte__63d54dd8f9909160286040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b83811015611348578181015183820152602001611330565b50505050905090810190601f1680156113755780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b15801561139357600080fd5b505af41580156113a7573d6000803e3d6000fd5b505050506040513d60208110156113bd57600080fd5b810190808051906020019092919050505060e060020a900491508a73__contracts/BytesDeserializer.sol:Byte__632e1eb7fe9091602c6040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b8381101561144b578181015183820152602001611433565b50505050905090810190601f1680156114785780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b15801561149657600080fd5b505af41580156114aa573d6000803e3d6000fd5b505050506040513d60208110156114c057600080fd5b5051949b939a50919850965091945092505050565b600354600160a060020a031681565b600d5481565b600654600a54101590565b6005806115006108e3565b600781111561150b57fe5b1461151557600080fd5b34151561152157600080fd5b600d54604080517f66098d4f00000000000000000000000000000000000000000000000000000000815260048101929092523460248301525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b15801561159557600080fd5b505af41580156115a9573d6000803e3d6000fd5b505050506040513d60208110156115bf57600080fd5b5051600d5550565b600054600160a060020a031633146115de57600080fd5b601355565b600054600160a060020a031681565b600080600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561164857600080fd5b505af115801561165c573d6000803e3d6000fd5b505050506040513d602081101561167257600080fd5b5051604080517f1d3b9edf00000000000000000000000000000000000000000000000000000000815260048101879052600a9290920a602483018190529051909250849173__contracts/SafeMathLib.sol:SafeMathLi__91631d3b9edf91604480820192602092909190829003018186803b1580156116f257600080fd5b505af4158015611706573d6000803e3d6000fd5b505050506040513d602081101561171c57600080fd5b505181151561172757fe5b04949350505050565b600554600160a060020a031681565b60116020526000908152604090205481565b600061175b611ac9565b84111561176a5750600161176e565b5060005b949350505050565b6000600460009054906101000a9004600160a060020a0316600160a060020a03166382771c8e6040518163ffffffff1660e060020a028152600401602060405180830381600087803b1580156108a557600080fd5b60075481565b600f5460ff1681565b60005474010000000000000000000000000000000000000000900460ff1681565b60126020526000908152604090205460ff1681565b600054600160a060020a0316331461182757600080fd5b60005474010000000000000000000000000000000000000000900460ff16151561185057600080fd5b6000805474ff000000000000000000000000000000000000000019169055565b600061187a611ac9565b15905090565b336000908152601260205260408120548190670de0b6b3a764000090829081908190819081908190819060ff16156118c5576118be33611000611cb8565b9850611a48565b60028e6040518082805190602001908083835b602083106118f75780518252601f1990920191602091820191016118d8565b51815160209384036101000a600019018019909216911617905260405191909301945091925050808303816000865af1158015611938573d6000803e3d6000fd5b5050506040513d602081101561194d57600080fd5b5051965061195a8e610fb6565b95509550955095509550601560009054906101000a9004600160a060020a0316600160a060020a03166001888f8f8f604051600081526020016040526040518085600019166000191681526020018460ff1660ff1681526020018360001916600019168152602001826000191660001916815260200194505050505060206040516020810390808403906000865af11580156119fa573d6000803e3d6000fd5b50505060206040510351600160a060020a0316141515611a1957600080fd5b600160a060020a0386163314611a2e57600080fd5b611a3834836115f2565b9050611a45338683611e2d565b98505b3360009081526012602052604090205460ff161515611ab1573360009081526010602052604090205461271063ffffffff86168a02041115611a8957600080fd5b3360009081526010602052604090205461271063ffffffff85168a02041015611ab157600080fd5b50969c9b505050505050505050505050565b600c5481565b60025460008054604080517fdd62ed3e000000000000000000000000000000000000000000000000000000008152600160a060020a03928316600482015230602482015290519293919091169163dd62ed3e9160448082019260209290919082900301818787803b1580156108a557600080fd5b600054600160a060020a03163314611b5457600080fd5b600160a060020a038216600081815260126020908152604091829020805460ff191685151590811790915582519384529083015280517fa54714518c5d275fdcd3d2a461e4858e4e8cb04fb93cd0bca9d6d34115f264409281900390910190a15050565b600054600160a060020a03163314611bcf57600080fd5b600160a060020a0381161515611be457600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600054600160a060020a03163314611c6357600080fd5b600154600c541115611c7457600080fd5b6005805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600b5481565b600254600160a060020a031681565b6000805474010000000000000000000000000000000000000000900460ff1615611ce157600080fd5b611e268383600360009054906101000a9004600160a060020a0316600160a060020a03166318a4155e34600b54600a540360095433600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff1660e060020a028152600401602060405180830381600087803b158015611d6957600080fd5b505af1158015611d7d573d6000803e3d6000fd5b505050506040513d6020811015611d9357600080fd5b50516040805160e060020a63ffffffff8916028152600481019690965260248601949094526044850192909252600160a060020a0316606484015260848301525160a48083019260209291908290030181600087803b158015611df557600080fd5b505af1158015611e09573d6000803e3d6000fd5b505050506040513d6020811015611e1f57600080fd5b5051611e2d565b9392505050565b60008054819074010000000000000000000000000000000000000000900460ff1615611e5857600080fd5b6002611e626108e3565b6007811115611e6d57fe5b1415611e9f57600160a060020a03851660009081526012602052604090205460ff161515611e9a57600080fd5b611ebb565b6003611ea96108e3565b6007811115611eb457fe5b1415610221575b5034821515611ec957600080fd5b600160a060020a0385166000908152601060205260409020541515611ef257600c805460010190555b600160a060020a0385166000908152601060209081526040918290205482517f66098d4f000000000000000000000000000000000000000000000000000000008152600481019190915260248101849052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b158015611f7d57600080fd5b505af4158015611f91573d6000803e3d6000fd5b505050506040513d6020811015611fa757600080fd5b5051600160a060020a03861660009081526010602090815260408083209390935560118152908290205482517f66098d4f000000000000000000000000000000000000000000000000000000008152600481019190915260248101869052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561203f57600080fd5b505af4158015612053573d6000803e3d6000fd5b505050506040513d602081101561206957600080fd5b5051600160a060020a03861660009081526011602090815260409182902092909255600a5481517f66098d4f000000000000000000000000000000000000000000000000000000008152600481019190915260248101849052905173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f9260448082019391829003018186803b1580156120fb57600080fd5b505af415801561210f573d6000803e3d6000fd5b505050506040513d602081101561212557600080fd5b5051600a55600954604080517f66098d4f0000000000000000000000000000000000000000000000000000000081526004810192909252602482018590525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b15801561219f57600080fd5b505af41580156121b3573d6000803e3d6000fd5b505050506040513d60208110156121c957600080fd5b5051600955600354604080517ff14ae17d000000000000000000000000000000000000000000000000000000008152600160a060020a0388811660048301529151919092169163f14ae17d9160248083019260209291908290030181600087803b15801561223657600080fd5b505af115801561224a573d6000803e3d6000fd5b505050506040513d602081101561226057600080fd5b5051156122f557600b5473__contracts/SafeMathLib.sol:SafeMathLi__6366098d4f9091836040518363ffffffff1660e060020a028152600401808381526020018281526020019250505060206040518083038186803b1580156122c557600080fd5b505af41580156122d9573d6000803e3d6000fd5b505050506040513d60208110156122ef57600080fd5b5051600b555b6123058184600a54600954611751565b1561230f57600080fd5b61231985846123b7565b600554604051600160a060020a039091169082156108fc029083906000818181858888f19350505050151561234d57600080fd5b60408051600160a060020a0387168152602081018390528082018590526fffffffffffffffffffffffffffffffff8616606082015290517f0396f60aaad038749091d273dc13aaabc63db6e2271c7bad442d5cf25cc433509181900360800190a150909392505050565b600254601454604080517f23b872dd000000000000000000000000000000000000000000000000000000008152600160a060020a039283166004820152858316602482015260448101859052905191909216916323b872dd9160648083019260209291908290030181600087803b15801561243157600080fd5b505af1158015612445573d6000803e3d6000fd5b505050506040513d602081101561245b57600080fd5b50511515610edb57600080fd00a165627a7a72305820f450024a220fe4bf666d69f3205d2eb6ff8cbe2031500e416c2c8ebfe2ec42710029", "bytecode_runtime": "0x6080604052600436106102215763ffffffff60e060020a6000350416630226401d8114610226578063046dc1661461024d578063062b01ce146102705780630a09284a1461029957806313f4e977146102ae5780631865c57d146102c357806319b667da146102fc5780631aae34601461031d57806321d5c0f61461033e57806338af3eed1461036f5780634042b66f146103845780634551dd59146103995780634bb278f3146103ae57806350c67734146103c3578063518ab2a8146103e4578063590e1ae3146103f95780635b7633d01461040e5780635da89ac0146104235780635ed7ca5b146104385780636203f09f1461044d5780636e50eb3f1461046257806373752db41461047a57806378b99c2414610520578063797d9437146105355780637c2e08a31461054a578063876121021461055f5780638d51faec146105675780638da5cb5b1461057f578063903cc583146105945780639075becf146105af57806397b150ca146105c45780639d3c663f146105e5578063a7ba44c314610606578063af4686821461061b578063b3f05b9714610630578063b9b8af0b14610645578063cb16e6d01461065a578063cb3e64fd1461067b578063d5d0902114610690578063d7c7159c146106a5578063d7e64c0014610700578063de5f986614610715578063eac249321461072a578063f2fde38b14610750578063f3283fba14610771578063f7c00e2f14610792578063fc0c546a146107a7575b600080fd5b34801561023257600080fd5b5061023b6107bc565b60408051918252519081900360200190f35b34801561025957600080fd5b5061026e600160a060020a03600435166107c2565b005b34801561027c57600080fd5b50610285610840565b604080519115158252519081900360200190f35b3480156102a557600080fd5b5061023b6108d7565b3480156102ba57600080fd5b5061023b6108dd565b3480156102cf57600080fd5b506102d86108e3565b604051808260078111156102e857fe5b60ff16815260200191505060405180910390f35b34801561030857600080fd5b5061026e600160a060020a0360043516610ad1565b34801561032957600080fd5b5061023b600160a060020a0360043516610ba2565b34801561034a57600080fd5b50610353610bb4565b60408051600160a060020a039092168252519081900360200190f35b34801561037b57600080fd5b50610353610bc3565b34801561039057600080fd5b5061023b610bd2565b3480156103a557600080fd5b50610285610bd8565b3480156103ba57600080fd5b5061026e610bdd565b3480156103cf57600080fd5b5061026e600160a060020a0360043516610ce2565b3480156103f057600080fd5b5061023b610d7d565b34801561040557600080fd5b5061026e610d83565b34801561041a57600080fd5b50610353610edf565b34801561042f57600080fd5b5061023b610eee565b34801561044457600080fd5b5061026e610ef4565b34801561045957600080fd5b5061023b610f42565b34801561046e57600080fd5b5061026e600435610f48565b34801561048657600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526104d3943694929360249392840191908190840183828082843750949750610fb69650505050505050565b60408051600160a060020a0390961686526fffffffffffffffffffffffffffffffff909416602086015263ffffffff92831685850152911660608401526080830152519081900360a00190f35b34801561052c57600080fd5b506103536114d5565b34801561054157600080fd5b5061023b6114e4565b34801561055657600080fd5b506102856114ea565b61026e6114f5565b34801561057357600080fd5b5061026e6004356115c7565b34801561058b57600080fd5b506103536115e3565b3480156105a057600080fd5b5061023b6004356024356115f2565b3480156105bb57600080fd5b50610353611730565b3480156105d057600080fd5b5061023b600160a060020a036004351661173f565b3480156105f157600080fd5b50610285600435602435604435606435611751565b34801561061257600080fd5b50610285611776565b34801561062757600080fd5b5061023b6117cb565b34801561063c57600080fd5b506102856117d1565b34801561065157600080fd5b506102856117da565b34801561066657600080fd5b50610285600160a060020a03600435166117fb565b34801561068757600080fd5b5061026e611810565b34801561069c57600080fd5b50610285611870565b6040805160206004803580820135601f810184900484028501840190955284845261023b9436949293602493928401919081908401838280828437509497505050833560ff1694505050602082013591604001359050611880565b34801561070c57600080fd5b5061023b611ac3565b34801561072157600080fd5b5061023b611ac9565b34801561073657600080fd5b5061026e600160a060020a03600435166024351515611b3d565b34801561075c57600080fd5b5061026e600160a060020a0360043516611bb8565b34801561077d57600080fd5b5061026e600160a060020a0360043516611c4c565b34801561079e57600080fd5b5061023b611ca3565b3480156107b357600080fd5b50610353611ca9565b60135481565b600054600160a060020a031633146107d957600080fd5b6015805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03838116919091179182905560408051929091168252517f5719a5656c5cfdaafa148ecf366fd3b0a7fae06449ce2a46225977fb7417e29d916020908290030190a150565b600354604080517f8e7682880000000000000000000000000000000000000000000000000000000081523060048201529051600092600160a060020a031691638e76828891602480830192602092919082900301818787803b1580156108a557600080fd5b505af11580156108b9573d6000803e3d6000fd5b505050506040513d60208110156108cf57600080fd5b505190505b90565b60085481565b60065481565b600f5460009060ff16156108f9575060066108d4565b600454600160a060020a03161515610913575060016108d4565b60048054604080517f82771c8e0000000000000000000000000000000000000000000000000000000081529051600160a060020a03909216926382771c8e9282820192602092908290030181600087803b15801561097057600080fd5b505af1158015610984573d6000803e3d6000fd5b505050506040513d602081101561099a57600080fd5b505115156109aa575060016108d4565b600354604080517f8e7682880000000000000000000000000000000000000000000000000000000081523060048201529051600160a060020a0390921691638e768288916024808201926020929091908290030181600087803b158015610a1057600080fd5b505af1158015610a24573d6000803e3d6000fd5b505050506040513d6020811015610a3a57600080fd5b50511515610a4a575060016108d4565b600754421015610a5c575060026108d4565b6008544211158015610a735750610a71611870565b155b15610a80575060036108d4565b610a886114ea565b15610a95575060046108d4565b610a9d6114ea565b158015610aac57506000600a54115b8015610abc5750600a54600d5410155b15610ac9575060076108d4565b5060056108d4565b600054600160a060020a03163314610ae857600080fd5b6004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383811691909117808355604080517f614cb9040000000000000000000000000000000000000000000000000000000081529051919092169263614cb904928082019260209290918290030181600087803b158015610b6857600080fd5b505af1158015610b7c573d6000803e3d6000fd5b505050506040513d6020811015610b9257600080fd5b50511515610b9f57600080fd5b50565b60106020526000908152604090205481565b600454600160a060020a031681565b601454600160a060020a031681565b600a5481565b600190565b600480610be86108e3565b6007811115610bf357fe5b14610bfd57600080fd5b600054600160a060020a03163314610c1457600080fd5b60005474010000000000000000000000000000000000000000900460ff1615610c3c57600080fd5b600f5460ff1615610c4c57600080fd5b600454600160a060020a031615610cd25760048054604080517f0bf318a30000000000000000000000000000000000000000000000000000000081529051600160a060020a0390921692630bf318a392828201926000929082900301818387803b158015610cb957600080fd5b505af1158015610ccd573d6000803e3d6000fd5b505050505b50600f805460ff19166001179055565b600054600160a060020a03163314610cf957600080fd5b6003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038381169190911791829055604080517f04bbc255000000000000000000000000000000000000000000000000000000008152905192909116916304bbc255916004808201926020929091908290030181600087803b158015610b6857600080fd5b60095481565b6000600780610d906108e3565b6007811115610d9b57fe5b14610da557600080fd5b336000908152601060205260409020549150811515610dc357600080fd5b33600090815260106020908152604080832092909255600e5482517f66098d4f000000000000000000000000000000000000000000000000000000008152600481019190915260248101859052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b158015610e4a57600080fd5b505af4158015610e5e573d6000803e3d6000fd5b505050506040513d6020811015610e7457600080fd5b5051600e55604080513381526020810184905281517fbb28353e4598c3b9199101a66e0989549b659a59a54d2c27fbb183f1932c8e6d929181900390910190a1604051339083156108fc029084906000818181858888f193505050501515610edb57600080fd5b5050565b601554600160a060020a031681565b600e5481565b600054600160a060020a03163314610f0b57600080fd5b6000805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b60015481565b600054600160a060020a03163314610f5f57600080fd5b80421115610f6c57600080fd5b806007541115610f7b57600080fd5b60088190556040805182815290517fd34bb772c4ae9baa99db852f622773b31c7827e8ee818449fef20d30980bd3109181900360200190a150565b6000806000806000806000806000808a73__contracts/BytesDeserializer.sol:Byte__63b655e138909160006040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b83811015611039578181015183820152602001611021565b50505050905090810190601f1680156110665780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b15801561108457600080fd5b505af4158015611098573d6000803e3d6000fd5b505050506040513d60208110156110ae57600080fd5b810190808051906020019092919050505094508a73__contracts/BytesDeserializer.sol:Byte__6316419aa7909160146040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b8381101561113557818101518382015260200161111d565b50505050905090810190601f1680156111625780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b15801561118057600080fd5b505af4158015611194573d6000803e3d6000fd5b505050506040513d60208110156111aa57600080fd5b8101908080519060200190929190505050700100000000000000000000000000000000900493508a73__contracts/BytesDeserializer.sol:Byte__63d54dd8f9909160246040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b8381101561124557818101518382015260200161122d565b50505050905090810190601f1680156112725780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b15801561129057600080fd5b505af41580156112a4573d6000803e3d6000fd5b505050506040513d60208110156112ba57600080fd5b810190808051906020019092919050505060e060020a900492508a73__contracts/BytesDeserializer.sol:Byte__63d54dd8f9909160286040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b83811015611348578181015183820152602001611330565b50505050905090810190601f1680156113755780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b15801561139357600080fd5b505af41580156113a7573d6000803e3d6000fd5b505050506040513d60208110156113bd57600080fd5b810190808051906020019092919050505060e060020a900491508a73__contracts/BytesDeserializer.sol:Byte__632e1eb7fe9091602c6040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b8381101561144b578181015183820152602001611433565b50505050905090810190601f1680156114785780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b15801561149657600080fd5b505af41580156114aa573d6000803e3d6000fd5b505050506040513d60208110156114c057600080fd5b5051949b939a50919850965091945092505050565b600354600160a060020a031681565b600d5481565b600654600a54101590565b6005806115006108e3565b600781111561150b57fe5b1461151557600080fd5b34151561152157600080fd5b600d54604080517f66098d4f00000000000000000000000000000000000000000000000000000000815260048101929092523460248301525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b15801561159557600080fd5b505af41580156115a9573d6000803e3d6000fd5b505050506040513d60208110156115bf57600080fd5b5051600d5550565b600054600160a060020a031633146115de57600080fd5b601355565b600054600160a060020a031681565b600080600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561164857600080fd5b505af115801561165c573d6000803e3d6000fd5b505050506040513d602081101561167257600080fd5b5051604080517f1d3b9edf00000000000000000000000000000000000000000000000000000000815260048101879052600a9290920a602483018190529051909250849173__contracts/SafeMathLib.sol:SafeMathLi__91631d3b9edf91604480820192602092909190829003018186803b1580156116f257600080fd5b505af4158015611706573d6000803e3d6000fd5b505050506040513d602081101561171c57600080fd5b505181151561172757fe5b04949350505050565b600554600160a060020a031681565b60116020526000908152604090205481565b600061175b611ac9565b84111561176a5750600161176e565b5060005b949350505050565b6000600460009054906101000a9004600160a060020a0316600160a060020a03166382771c8e6040518163ffffffff1660e060020a028152600401602060405180830381600087803b1580156108a557600080fd5b60075481565b600f5460ff1681565b60005474010000000000000000000000000000000000000000900460ff1681565b60126020526000908152604090205460ff1681565b600054600160a060020a0316331461182757600080fd5b60005474010000000000000000000000000000000000000000900460ff16151561185057600080fd5b6000805474ff000000000000000000000000000000000000000019169055565b600061187a611ac9565b15905090565b336000908152601260205260408120548190670de0b6b3a764000090829081908190819081908190819060ff16156118c5576118be33611000611cb8565b9850611a48565b60028e6040518082805190602001908083835b602083106118f75780518252601f1990920191602091820191016118d8565b51815160209384036101000a600019018019909216911617905260405191909301945091925050808303816000865af1158015611938573d6000803e3d6000fd5b5050506040513d602081101561194d57600080fd5b5051965061195a8e610fb6565b95509550955095509550601560009054906101000a9004600160a060020a0316600160a060020a03166001888f8f8f604051600081526020016040526040518085600019166000191681526020018460ff1660ff1681526020018360001916600019168152602001826000191660001916815260200194505050505060206040516020810390808403906000865af11580156119fa573d6000803e3d6000fd5b50505060206040510351600160a060020a0316141515611a1957600080fd5b600160a060020a0386163314611a2e57600080fd5b611a3834836115f2565b9050611a45338683611e2d565b98505b3360009081526012602052604090205460ff161515611ab1573360009081526010602052604090205461271063ffffffff86168a02041115611a8957600080fd5b3360009081526010602052604090205461271063ffffffff85168a02041015611ab157600080fd5b50969c9b505050505050505050505050565b600c5481565b60025460008054604080517fdd62ed3e000000000000000000000000000000000000000000000000000000008152600160a060020a03928316600482015230602482015290519293919091169163dd62ed3e9160448082019260209290919082900301818787803b1580156108a557600080fd5b600054600160a060020a03163314611b5457600080fd5b600160a060020a038216600081815260126020908152604091829020805460ff191685151590811790915582519384529083015280517fa54714518c5d275fdcd3d2a461e4858e4e8cb04fb93cd0bca9d6d34115f264409281900390910190a15050565b600054600160a060020a03163314611bcf57600080fd5b600160a060020a0381161515611be457600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600054600160a060020a03163314611c6357600080fd5b600154600c541115611c7457600080fd5b6005805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600b5481565b600254600160a060020a031681565b6000805474010000000000000000000000000000000000000000900460ff1615611ce157600080fd5b611e268383600360009054906101000a9004600160a060020a0316600160a060020a03166318a4155e34600b54600a540360095433600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff1660e060020a028152600401602060405180830381600087803b158015611d6957600080fd5b505af1158015611d7d573d6000803e3d6000fd5b505050506040513d6020811015611d9357600080fd5b50516040805160e060020a63ffffffff8916028152600481019690965260248601949094526044850192909252600160a060020a0316606484015260848301525160a48083019260209291908290030181600087803b158015611df557600080fd5b505af1158015611e09573d6000803e3d6000fd5b505050506040513d6020811015611e1f57600080fd5b5051611e2d565b9392505050565b60008054819074010000000000000000000000000000000000000000900460ff1615611e5857600080fd5b6002611e626108e3565b6007811115611e6d57fe5b1415611e9f57600160a060020a03851660009081526012602052604090205460ff161515611e9a57600080fd5b611ebb565b6003611ea96108e3565b6007811115611eb457fe5b1415610221575b5034821515611ec957600080fd5b600160a060020a0385166000908152601060205260409020541515611ef257600c805460010190555b600160a060020a0385166000908152601060209081526040918290205482517f66098d4f000000000000000000000000000000000000000000000000000000008152600481019190915260248101849052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b158015611f7d57600080fd5b505af4158015611f91573d6000803e3d6000fd5b505050506040513d6020811015611fa757600080fd5b5051600160a060020a03861660009081526010602090815260408083209390935560118152908290205482517f66098d4f000000000000000000000000000000000000000000000000000000008152600481019190915260248101869052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561203f57600080fd5b505af4158015612053573d6000803e3d6000fd5b505050506040513d602081101561206957600080fd5b5051600160a060020a03861660009081526011602090815260409182902092909255600a5481517f66098d4f000000000000000000000000000000000000000000000000000000008152600481019190915260248101849052905173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f9260448082019391829003018186803b1580156120fb57600080fd5b505af415801561210f573d6000803e3d6000fd5b505050506040513d602081101561212557600080fd5b5051600a55600954604080517f66098d4f0000000000000000000000000000000000000000000000000000000081526004810192909252602482018590525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b15801561219f57600080fd5b505af41580156121b3573d6000803e3d6000fd5b505050506040513d60208110156121c957600080fd5b5051600955600354604080517ff14ae17d000000000000000000000000000000000000000000000000000000008152600160a060020a0388811660048301529151919092169163f14ae17d9160248083019260209291908290030181600087803b15801561223657600080fd5b505af115801561224a573d6000803e3d6000fd5b505050506040513d602081101561226057600080fd5b5051156122f557600b5473__contracts/SafeMathLib.sol:SafeMathLi__6366098d4f9091836040518363ffffffff1660e060020a028152600401808381526020018281526020019250505060206040518083038186803b1580156122c557600080fd5b505af41580156122d9573d6000803e3d6000fd5b505050506040513d60208110156122ef57600080fd5b5051600b555b6123058184600a54600954611751565b1561230f57600080fd5b61231985846123b7565b600554604051600160a060020a039091169082156108fc029083906000818181858888f19350505050151561234d57600080fd5b60408051600160a060020a0387168152602081018390528082018590526fffffffffffffffffffffffffffffffff8616606082015290517f0396f60aaad038749091d273dc13aaabc63db6e2271c7bad442d5cf25cc433509181900360800190a150909392505050565b600254601454604080517f23b872dd000000000000000000000000000000000000000000000000000000008152600160a060020a039283166004820152858316602482015260448101859052905191909216916323b872dd9160648083019260209291908290030181600087803b15801561243157600080fd5b505af1158015612445573d6000803e3d6000fd5b505050506040513d602081101561245b57600080fd5b50511515610edb57600080fd00a165627a7a72305820f450024a220fe4bf666d69f3205d2eb6ff8cbe2031500e416c2c8ebfe2ec42710029", "direct_dependencies": ["BytesDeserializer", "SafeMathLib"], "full_dependencies": ["BytesDeserializer", "SafeMathLib"], "linkrefs": [{"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 9194}, {"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 9698}, {"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 10242}, {"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 10760}, {"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 11278}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 8322}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 12050}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 12746}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 17128}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 17516}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 17894}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 18214}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 18738}], "linkrefs_runtime": [{"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 8080}, {"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 8584}, {"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 9128}, {"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 9646}, {"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 10164}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 7208}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 10936}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 11632}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 16014}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 16402}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 16780}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 17100}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 17624}], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": true, "inputs": [], "name": "ownerTestValue", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_signerAddress", "type": "address"}], "name": "setSignerAddress", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "isPricingSane", "outputs": [{"name": "sane", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "endsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "minimumFundingGoal", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getState", "outputs": [{"name": "", "type": "uint8"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setFinalizeAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "investedAmountOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "finalizeAgent", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "beneficiary", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "weiRaised", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isCrowdsale", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "finalize", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_pricingStrategy", "type": "address"}], "name": "setPricingStrategy", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "tokensSold", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "refund", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "signerAddress", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "weiRefunded", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "halt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "time", "type": "uint256"}], "name": "setEndsAt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "dataframe", "type": "bytes"}], "name": "getKYCPayload", "outputs": [{"name": "whitelistedAddress", "type": "address"}, {"name": "customerId", "type": "uint128"}, {"name": "minEth", "type": "uint32"}, {"name": "maxEth", "type": "uint32"}, {"name": "pricingInfo", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "pricingStrategy", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "loadedRefund", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isMinimumGoalReached", "outputs": [{"name": "reached", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "loadRefund", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "val", "type": "uint256"}], "name": "setOwnerTestValue", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "weisTotal", "type": "uint256"}, {"name": "pricePerToken", "type": "uint256"}], "name": "calculateTokens", "outputs": [{"name": "tokensTotal", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "multisigWallet", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "tokenAmountOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "weiAmount", "type": "uint256"}, {"name": "tokenAmount", "type": "uint256"}, {"name": "weiRaisedTotal", "type": "uint256"}, {"name": "tokensSoldTotal", "type": "uint256"}], "name": "isBreakingCap", "outputs": [{"name": "limitBroken", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isFinalizerSane", "outputs": [{"name": "sane", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "startsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "finalized", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "halted", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "earlyParticipantWhitelist", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "unhalt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "isCrowdsaleFull", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "dataframe", "type": "bytes"}, {"name": "v", "type": "uint8"}, {"name": "r", "type": "bytes32"}, {"name": "s", "type": "bytes32"}], "name": "buyWithKYCData", "outputs": [{"name": "tokenAmount", "type": "uint256"}], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "investorCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getTokensLeft", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "status", "type": "bool"}], "name": "setEarlyParicipantWhitelist", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setMultisig", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "presaleWeiRaised", "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": "_token", "type": "address"}, {"name": "_pricingStrategy", "type": "address"}, {"name": "_multisigWallet", "type": "address"}, {"name": "_start", "type": "uint256"}, {"name": "_end", "type": "uint256"}, {"name": "_minimumFundingGoal", "type": "uint256"}, {"name": "_beneficiary", "type": "address"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"payable": true, "stateMutability": "payable", "type": "fallback"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "signer", "type": "address"}], "name": "SignerChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}, {"indexed": false, "name": "tokenAmount", "type": "uint256"}, {"indexed": false, "name": "customerId", "type": "uint128"}], "name": "Invested", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}], "name": "Refund", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newRequireCustomerId", "type": "bool"}, {"indexed": false, "name": "newRequiredSignedAddress", "type": "bool"}, {"indexed": false, "name": "newSignerAddress", "type": "address"}], "name": "InvestmentPolicyChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "addr", "type": "address"}, {"indexed": false, "name": "status", "type": "bool"}], "name": "Whitelisted", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newEndsAt", "type": "uint256"}], "name": "EndsAtChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "devdoc": {"methods": {"calculateTokens(uint256,uint256)": {"details": "Calculate tokens user will have for their purchase", "params": {"pricePerToken": "What is the price for one token", "weisTotal": "How much ethers (in wei) the user putssssss in"}, "return": "tokensTotal which is received tokens, token decimals included"}, "isMinimumGoalReached()": {"return": "true if the crowdsale has raised enough money to be a successful."}, "setSignerAddress(address)": {"details": "This function can set the server side address", "params": {"_signerAddress": "The address derived from server's private key"}}, "transferOwnership(address)": {"details": "Allows the current owner to transfer control of the contract to a newOwner.", "params": {"newOwner": "The address to transfer ownership to."}}}}, "userdoc": {"methods": {"buyWithKYCData(bytes,uint8,bytes32,bytes32)": {"notice": "A token purchase with anti-money laundering * \u00a9return tokenAmount How many tokens where bought"}, "finalize()": {"notice": "Finalize a succcesful crowdsale. * The owner can triggre a call the contract that provides post-crowdsale actions, like releasing the tokens."}, "getKYCPayload(bytes)": {"notice": "Same as above, but with pricing information included in the payload as the last integer.In a long run, deprecate the legacy methods above and only use this payload."}, "getState()": {"notice": "Crowdfund state machine management. * We make it a function and do not assign the result to a variable, so there is no chance of the variable being stale."}, "getTokensLeft()": {"notice": "Get the amount of unsold tokens allocated to this contract;"}, "isBreakingCap(uint256,uint256,uint256,uint256)": {"notice": "Called from invest() to confirm if the curret investment does not break our cap rule."}, "isCrowdsale()": {"notice": "Interface marker. "}, "isCrowdsaleFull()": {"notice": "We are sold out when our approve pool becomes empty."}, "isFinalizerSane()": {"notice": "Check if the contract relationship looks good."}, "isPricingSane()": {"notice": "Check if the contract relationship looks good."}, "loadRefund()": {"notice": "Allow load refunds back on the contract for the refunding. * The team can transfer the funds back on the smart contract in the case the minimum goal was not reached.."}, "refund()": {"notice": "Investors can claim refund. * Note that any refunds from proxy buyers should be handled separately, and not through this contract."}, "setEarlyParicipantWhitelist(address,bool)": {"notice": "Allow addresses to do early participation. * TODO: Fix spelling error in the name"}, "setEndsAt(uint256)": {"notice": "Allow crowdsale owner to close early or extend the crowdsale. * This is useful e.g. for a manual soft cap implementation: - after X amount is reached determine manual closing * This may put the crowdsale to an invalid state, but we trust owners know what they are doing. "}, "setFinalizeAgent(address)": {"notice": "Allow to (re)set finalize agent. * Design choice: no state restrictions on setting this, so that we can fix fat finger mistakes."}, "setMultisig(address)": {"notice": "Allow to change the team multisig address in the case of emergency. * This allows to save a deployed crowdsale wallet in the case the crowdsale has not yet begun (we have done only few test transactions). After the crowdsale is going then multisig address stays locked for the safety reasons."}, "setOwnerTestValue(uint256)": {"notice": "This is for manual testing of multisig wallet interaction "}, "setPricingStrategy(address)": {"notice": "Allow to (re)set pricing strategy. * Design choice: no state restrictions on the set, so that we can fix fat finger mistakes."}}}}, "settings": {"compilationTarget": {"contracts/KYCCrowdsale.sol": "KYCCrowdsale"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/AllocatedCrowdsaleMixin.sol": {"keccak256": "0xb0f304a6316b4dd97ae57cbb99962b474f6bf14d90b5ff20d6d61d3b4f363da0", "urls": ["bzzr://342e3e02fb4570a64954190dff8a3664b6c11b9d01807e90a0a71be4c4a975ce"]}, "contracts/BytesDeserializer.sol": {"keccak256": "0xdd1718e5ea778d4dd36ccb98336360536beffdffd152bd9fb035124835fa4765", "urls": ["bzzr://ee94acd8149a77baf3f6881b995d1e9eba68c3225b2fe666dc0d402e0b68c5ce"]}, "contracts/CrowdsaleBase.sol": {"keccak256": "0xe2c9ed11183ce705616980df7b02544d72fe18b40395da7d9d4bcb621fb87871", "urls": ["bzzr://07f3887ba0d0eb3248b1ad3581480ed71a2fe70a47dcc283c4e97c8c92e0790a"]}, "contracts/FinalizeAgent.sol": {"keccak256": "0x309fd0510e0b3e2b5044e33f7c80cfb2d6f2a5697e41a5f185931d65770cfea9", "urls": ["bzzr://4e7ed6f82c0f542e92e56c12566b2ecd7666730865bf12566c27587ec64160ac"]}, "contracts/FractionalERC20.sol": {"keccak256": "0x75bc4ad90a8b13ce961c89b1bf405776f616e019d3a2720168f8e52be223198f", "urls": ["bzzr://6a3688f12da1a5c890ef06f80f883f6c5370886092d38a1b33cd4219b718478b"]}, "contracts/Haltable.sol": {"keccak256": "0x265dcf25e7c9ab4b6eecd2181f1b71334a1b5381a60f8db7d9526dab120f4b70", "urls": ["bzzr://d522e00fa9e075941469dd81738b59fdb99ce3c12cdc39e33abe40b588c4da9b"]}, "contracts/KYCCrowdsale.sol": {"keccak256": "0x57d211c61edcec07f527c07fa60fd82f822d0641cd2f79b9f3546c513bfca935", "urls": ["bzzr://52aeea60b0b3601c34a3a65d3b46759d15da2bc00cfbea9436d92ff7a2f01b89"]}, "contracts/KYCPayloadDeserializer.sol": {"keccak256": "0x4dbf491aa75393638028f16bedbc395bbec6beb6721ed5d569a18da089faf182", "urls": ["bzzr://a9b13fd13eda2199df6497108c1a0313d1ce91366a48f8650d647a0d86c43c6c"]}, "contracts/PricingStrategy.sol": {"keccak256": "0x8df5093b7d07168ad994f9176de0bd2268f6563b1e8a3a448d8cfe7fe246c628", "urls": ["bzzr://ef5c944d51f739ab34e2c951d6ac82a7152e6bb844058a8e57bae52c14cbe16b"]}, "contracts/SafeMathLib.sol": {"keccak256": "0x501bfe31e274b9a5591f7c540bdced4d4312e27d4f19599147c9bbca3d9c6b18", "urls": ["bzzr://a80935ebddb06c247d71372d4e5833ee029f08633bd0fe4a274a57009567e5b9"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}}, "version": 1}, "name": "KYCCrowdsale", "ordered_full_dependencies": ["BytesDeserializer", "SafeMathLib"], "source_path": "contracts/KYCCrowdsale.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n/*\n * Haltable\n *\n * Abstract contract that allows children to implement an\n * emergency stop mechanism. Differs from Pausable by causing a throw when in halt mode.\n *\n *\n * Originally envisioned in FirstBlood ICO contract.\n */\ncontract Haltable is Ownable {\n bool public halted;\n\n modifier stopInEmergency {\n if (halted) throw;\n _;\n }\n\n modifier stopNonOwnersInEmergency {\n if (halted && msg.sender != owner) throw;\n _;\n }\n\n modifier onlyInEmergency {\n if (!halted) throw;\n _;\n }\n\n // called by the owner on emergency, triggers stopped state\n function halt() external onlyOwner {\n halted = true;\n }\n\n // called by the owner on end of emergency, returns to normal state\n function unhalt() external onlyOwner onlyInEmergency {\n halted = false;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Safe unsigned safe math.\n *\n * https://blog.aragon.one/library-driven-development-in-solidity-2bebcaf88736#.750gwtwli\n *\n * Originally from https://raw.githubusercontent.com/AragonOne/zeppelin-solidity/master/contracts/SafeMathLib.sol\n *\n * Maintained here until merged to mainline zeppelin-solidity.\n *\n */\nlibrary SafeMathLib {\n\n function times(uint a, uint b) returns (uint) {\n uint c = a * b;\n assert(a == 0 || c / a == b);\n return c;\n }\n\n function minus(uint a, uint b) returns (uint) {\n assert(b <= a);\n return a - b;\n }\n\n function plus(uint a, uint b) returns (uint) {\n uint c = a + b;\n assert(c>=a);\n return c;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n\n/**\n * A token that defines fractional units as decimals.\n */\ncontract FractionalERC20 is ERC20 {\n\n uint public decimals;\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Interface for defining crowdsale pricing.\n */\ncontract PricingStrategy {\n\n /** Interface declaration. */\n function isPricingStrategy() public constant returns (bool) {\n return true;\n }\n\n /** Self check if all references are correctly set.\n *\n * Checks that pricing strategy matches crowdsale parameters.\n */\n function isSane(address crowdsale) public constant returns (bool) {\n return true;\n }\n\n /**\n * @dev Pricing tells if this is a presale purchase or not.\n @param purchaser Address of the purchaser\n @return False by default, true if a presale purchaser\n */\n function isPresalePurchase(address purchaser) public constant returns (bool) {\n return false;\n }\n\n /**\n * When somebody tries to buy tokens for X eth, calculate how many tokens they get.\n *\n *\n * @param value - What is the value of the transaction send in as wei\n * @param tokensSold - how much tokens have been sold this far\n * @param weiRaised - how much money has been raised this far in the main token sale - this number excludes presale\n * @param msgSender - who is the investor of this transaction\n * @param decimals - how many decimal units the token has\n * @return Amount of tokens the investor receives\n */\n function calculatePrice(uint value, uint weiRaised, uint tokensSold, address msgSender, uint decimals) public constant returns (uint tokenAmount);\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Finalize agent defines what happens at the end of succeseful crowdsale.\n *\n * - Allocate tokens for founders, bounties and community\n * - Make tokens transferable\n * - etc.\n */\ncontract FinalizeAgent {\n\n function isFinalizeAgent() public constant returns(bool) {\n return true;\n }\n\n /** Return true if we can run finalizeCrowdsale() properly.\n *\n * This is a safety check function that doesn't allow crowdsale to begin\n * unless the finalizer has been set up properly.\n */\n function isSane() public constant returns (bool);\n\n /** Called once by crowdsale finalize() if the sale was success. */\n function finalizeCrowdsale();\n\n}\n\n\n\n/**\n * Crowdsale state machine without buy functionality.\n *\n * Implements basic state machine logic, but leaves out all buy functions,\n * so that subclasses can implement their own buying logic.\n *\n *\n * For the default buy() implementation see Crowdsale.sol.\n */\ncontract CrowdsaleBase is Haltable {\n\n /* Max investment count when we are still allowed to change the multisig address */\n uint public MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE = 5;\n\n using SafeMathLib for uint;\n\n /* The token we are selling */\n FractionalERC20 public token;\n\n /* How we are going to price our offering */\n PricingStrategy public pricingStrategy;\n\n /* Post-success callback */\n FinalizeAgent public finalizeAgent;\n\n /* tokens will be transfered from this address */\n address public multisigWallet;\n\n /* if the funding goal is not reached, investors may withdraw their funds */\n uint public minimumFundingGoal;\n\n /* the UNIX timestamp start date of the crowdsale */\n uint public startsAt;\n\n /* the UNIX timestamp end date of the crowdsale */\n uint public endsAt;\n\n /* the number of tokens already sold through this contract*/\n uint public tokensSold = 0;\n\n /* How many wei of funding we have raised */\n uint public weiRaised = 0;\n\n /* Calculate incoming funds from presale contracts and addresses */\n uint public presaleWeiRaised = 0;\n\n /* How many distinct addresses have invested */\n uint public investorCount = 0;\n\n /* How much wei we have returned back to the contract after a failed crowdfund. */\n uint public loadedRefund = 0;\n\n /* How much wei we have given back to investors.*/\n uint public weiRefunded = 0;\n\n /* Has this crowdsale been finalized */\n bool public finalized;\n\n /** How much ETH each address has invested to this crowdsale */\n mapping (address => uint256) public investedAmountOf;\n\n /** How much tokens this crowdsale has credited for each investor address */\n mapping (address => uint256) public tokenAmountOf;\n\n /** Addresses that are allowed to invest even before ICO offical opens. For testing, for ICO partners, etc. */\n mapping (address => bool) public earlyParticipantWhitelist;\n\n /** This is for manul testing for the interaction from owner wallet. You can set it to any value and inspect this in blockchain explorer to see that crowdsale interaction works. */\n uint public ownerTestValue;\n\n /** State machine\n *\n * - Preparing: All contract initialization calls and variables have not been set yet\n * - Prefunding: We have not passed start time yet\n * - Funding: Active crowdsale\n * - Success: Minimum funding goal reached\n * - Failure: Minimum funding goal not reached before ending time\n * - Finalized: The finalized has been called and succesfully executed\n * - Refunding: Refunds are loaded on the contract for reclaim.\n */\n enum State{Unknown, Preparing, PreFunding, Funding, Success, Failure, Finalized, Refunding}\n\n // A new investment was made\n event Invested(address investor, uint weiAmount, uint tokenAmount, uint128 customerId);\n\n // Refund was processed for a contributor\n event Refund(address investor, uint weiAmount);\n\n // The rules were changed what kind of investments we accept\n event InvestmentPolicyChanged(bool newRequireCustomerId, bool newRequiredSignedAddress, address newSignerAddress);\n\n // Address early participation whitelist status changed\n event Whitelisted(address addr, bool status);\n\n // Crowdsale end time has been changed\n event EndsAtChanged(uint newEndsAt);\n\n function CrowdsaleBase(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal) {\n\n owner = msg.sender;\n\n token = FractionalERC20(_token);\n setPricingStrategy(_pricingStrategy);\n\n multisigWallet = _multisigWallet;\n if(multisigWallet == 0) {\n throw;\n }\n\n if(_start == 0) {\n throw;\n }\n\n startsAt = _start;\n\n if(_end == 0) {\n throw;\n }\n\n endsAt = _end;\n\n // Don't mess the dates\n if(startsAt >= endsAt) {\n throw;\n }\n\n // Minimum funding goal can be zero\n minimumFundingGoal = _minimumFundingGoal;\n }\n\n /**\n * Don't expect to just send in money and get tokens.\n */\n function() payable {\n throw;\n }\n\n /**\n * @dev Make an investment.\n *\n * Crowdsale must be running for one to invest.\n * We must have not pressed the emergency brake.\n *\n * @param receiver The Ethereum address who receives the tokens\n * @param customerId (optional) UUID v4 to track the successful payments on the server side'\n * @param tokenAmount Amount of tokens which be credited to receiver\n *\n * @return tokensBought How mony tokens were bought\n */\n function buyTokens(address receiver, uint128 customerId, uint256 tokenAmount) stopInEmergency internal returns(uint tokensBought) {\n\n // Determine if it's a good time to accept investment from this participant\n if(getState() == State.PreFunding) {\n // Are we whitelisted for early deposit\n if(!earlyParticipantWhitelist[receiver]) {\n throw;\n }\n } else if(getState() == State.Funding) {\n // Retail participants can only come in when the crowdsale is running\n // pass\n } else {\n // Unwanted state\n throw;\n }\n\n uint weiAmount = msg.value;\n\n // Dust transaction\n require(tokenAmount != 0);\n\n if(investedAmountOf[receiver] == 0) {\n // A new investor\n investorCount++;\n }\n\n // Update investor\n investedAmountOf[receiver] = investedAmountOf[receiver].plus(weiAmount);\n tokenAmountOf[receiver] = tokenAmountOf[receiver].plus(tokenAmount);\n\n // Update totals\n weiRaised = weiRaised.plus(weiAmount);\n tokensSold = tokensSold.plus(tokenAmount);\n\n if(pricingStrategy.isPresalePurchase(receiver)) {\n presaleWeiRaised = presaleWeiRaised.plus(weiAmount);\n }\n\n // Check that we did not bust the cap\n require(!isBreakingCap(weiAmount, tokenAmount, weiRaised, tokensSold));\n\n assignTokens(receiver, tokenAmount);\n\n // Pocket the money, or fail the crowdsale if we for some reason cannot send the money to our multisig\n if(!multisigWallet.send(weiAmount)) throw;\n\n // Tell us invest was success\n Invested(receiver, weiAmount, tokenAmount, customerId);\n\n return tokenAmount;\n }\n\n /**\n * @dev Make an investment based on pricing strategy\n *\n * This is a wrapper for buyTokens(), but the amount of tokens receiver will\n * have depends on the pricing strategy used.\n *\n * @param receiver The Ethereum address who receives the tokens\n * @param customerId (optional) UUID v4 to track the successful payments on the server side'\n *\n * @return tokensBought How mony tokens were bought\n */\n function investInternal(address receiver, uint128 customerId) stopInEmergency internal returns(uint tokensBought) {\n return buyTokens(receiver, customerId, pricingStrategy.calculatePrice(msg.value, weiRaised - presaleWeiRaised, tokensSold, msg.sender, token.decimals()));\n }\n\n /**\n * @dev Calculate tokens user will have for their purchase\n *\n * @param weisTotal How much ethers (in wei) the user putssssss in\n * @param pricePerToken What is the price for one token\n *\n * @return tokensTotal which is received tokens, token decimals included\n */\n function calculateTokens(uint256 weisTotal, uint256 pricePerToken) public constant returns(uint tokensTotal) {\n // pricePerToken is how many full tokens, token decimal place included, you get for wei amount.\n // Because, in theory, decimal amount can vary, we do the exponent calculation here,\n // though gas wise using 10**18 constant would be much simpler.\n // Furthermore we could use rough amounts and take in raw wei per tokens amount,\n // but we lose too much accuracy for generic calculations, thus all these are\n // practically implemented as 10**18 fixed points.\n uint multiplier = 10 ** token.decimals();\n return weisTotal.times(multiplier)/pricePerToken;\n }\n\n /**\n * Finalize a succcesful crowdsale.\n *\n * The owner can triggre a call the contract that provides post-crowdsale actions, like releasing the tokens.\n */\n function finalize() public inState(State.Success) onlyOwner stopInEmergency {\n\n // Already finalized\n if(finalized) {\n throw;\n }\n\n // Finalizing is optional. We only call it if we are given a finalizing agent.\n if(address(finalizeAgent) != 0) {\n finalizeAgent.finalizeCrowdsale();\n }\n\n finalized = true;\n }\n\n /**\n * Allow to (re)set finalize agent.\n *\n * Design choice: no state restrictions on setting this, so that we can fix fat finger mistakes.\n */\n function setFinalizeAgent(FinalizeAgent addr) onlyOwner {\n finalizeAgent = addr;\n\n // Don't allow setting bad agent\n if(!finalizeAgent.isFinalizeAgent()) {\n throw;\n }\n }\n\n /**\n * Allow crowdsale owner to close early or extend the crowdsale.\n *\n * This is useful e.g. for a manual soft cap implementation:\n * - after X amount is reached determine manual closing\n *\n * This may put the crowdsale to an invalid state,\n * but we trust owners know what they are doing.\n *\n */\n function setEndsAt(uint time) onlyOwner {\n\n if(now > time) {\n throw; // Don't change past\n }\n\n if(startsAt > time) {\n throw; // Prevent human mistakes\n }\n\n endsAt = time;\n EndsAtChanged(endsAt);\n }\n\n /**\n * Allow to (re)set pricing strategy.\n *\n * Design choice: no state restrictions on the set, so that we can fix fat finger mistakes.\n */\n function setPricingStrategy(PricingStrategy _pricingStrategy) onlyOwner {\n pricingStrategy = _pricingStrategy;\n\n // Don't allow setting bad agent\n if(!pricingStrategy.isPricingStrategy()) {\n throw;\n }\n }\n\n /**\n * Allow to change the team multisig address in the case of emergency.\n *\n * This allows to save a deployed crowdsale wallet in the case the crowdsale has not yet begun\n * (we have done only few test transactions). After the crowdsale is going\n * then multisig address stays locked for the safety reasons.\n */\n function setMultisig(address addr) public onlyOwner {\n\n // Change\n if(investorCount > MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE) {\n throw;\n }\n\n multisigWallet = addr;\n }\n\n /**\n * Allow load refunds back on the contract for the refunding.\n *\n * The team can transfer the funds back on the smart contract in the case the minimum goal was not reached..\n */\n function loadRefund() public payable inState(State.Failure) {\n if(msg.value == 0) throw;\n loadedRefund = loadedRefund.plus(msg.value);\n }\n\n /**\n * Investors can claim refund.\n *\n * Note that any refunds from proxy buyers should be handled separately,\n * and not through this contract.\n */\n function refund() public inState(State.Refunding) {\n uint256 weiValue = investedAmountOf[msg.sender];\n if (weiValue == 0) throw;\n investedAmountOf[msg.sender] = 0;\n weiRefunded = weiRefunded.plus(weiValue);\n Refund(msg.sender, weiValue);\n if (!msg.sender.send(weiValue)) throw;\n }\n\n /**\n * @return true if the crowdsale has raised enough money to be a successful.\n */\n function isMinimumGoalReached() public constant returns (bool reached) {\n return weiRaised >= minimumFundingGoal;\n }\n\n /**\n * Check if the contract relationship looks good.\n */\n function isFinalizerSane() public constant returns (bool sane) {\n return finalizeAgent.isSane();\n }\n\n /**\n * Check if the contract relationship looks good.\n */\n function isPricingSane() public constant returns (bool sane) {\n return pricingStrategy.isSane(address(this));\n }\n\n /**\n * Crowdfund state machine management.\n *\n * We make it a function and do not assign the result to a variable, so there is no chance of the variable being stale.\n */\n function getState() public constant returns (State) {\n if(finalized) return State.Finalized;\n else if (address(finalizeAgent) == 0) return State.Preparing;\n else if (!finalizeAgent.isSane()) return State.Preparing;\n else if (!pricingStrategy.isSane(address(this))) return State.Preparing;\n else if (block.timestamp < startsAt) return State.PreFunding;\n else if (block.timestamp <= endsAt && !isCrowdsaleFull()) return State.Funding;\n else if (isMinimumGoalReached()) return State.Success;\n else if (!isMinimumGoalReached() && weiRaised > 0 && loadedRefund >= weiRaised) return State.Refunding;\n else return State.Failure;\n }\n\n /** This is for manual testing of multisig wallet interaction */\n function setOwnerTestValue(uint val) onlyOwner {\n ownerTestValue = val;\n }\n\n /**\n * Allow addresses to do early participation.\n *\n * TODO: Fix spelling error in the name\n */\n function setEarlyParicipantWhitelist(address addr, bool status) onlyOwner {\n earlyParticipantWhitelist[addr] = status;\n Whitelisted(addr, status);\n }\n\n\n /** Interface marker. */\n function isCrowdsale() public constant returns (bool) {\n return true;\n }\n\n //\n // Modifiers\n //\n\n /** Modified allowing execution only if the crowdsale is currently running. */\n modifier inState(State state) {\n if(getState() != state) throw;\n _;\n }\n\n\n //\n // Abstract functions\n //\n\n /**\n * Check if the current invested breaks our cap rules.\n *\n *\n * The child contract must define their own cap setting rules.\n * We allow a lot of flexibility through different capping strategies (ETH, token count)\n * Called from invest().\n *\n * @param weiAmount The amount of wei the investor tries to invest in the current transaction\n * @param tokenAmount The amount of tokens we try to give to the investor in the current transaction\n * @param weiRaisedTotal What would be our total raised balance after this transaction\n * @param tokensSoldTotal What would be our total sold tokens count after this transaction\n *\n * @return true if taking this investment would break our cap rules\n */\n function isBreakingCap(uint weiAmount, uint tokenAmount, uint weiRaisedTotal, uint tokensSoldTotal) constant returns (bool limitBroken);\n\n /**\n * Check if the current crowdsale is full and we can no longer sell any tokens.\n */\n function isCrowdsaleFull() public constant returns (bool);\n\n /**\n * Create new tokens or transfer issued tokens to the investor depending on the cap model.\n */\n function assignTokens(address receiver, uint tokenAmount) internal;\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * A mixin that is selling tokens from a preallocated pool\n *\n * - Tokens have precreated supply \"premined\"\n *\n * - Token owner must transfer sellable tokens to the crowdsale contract using ERC20.approve()\n *\n * - The mixin does not implement buy entry point.\n *\n */\ncontract AllocatedCrowdsaleMixin is CrowdsaleBase {\n\n /* The party who holds the full token pool and has approve()'ed tokens for this crowdsale */\n address public beneficiary;\n\n /**\n * @param _beneficiary The account who has performed approve() to allocate tokens for the token sale.\n *\n */\n function AllocatedCrowdsaleMixin(address _beneficiary) {\n beneficiary = _beneficiary;\n }\n\n /**\n * Called from invest() to confirm if the curret investment does not break our cap rule.\n */\n function isBreakingCap(uint weiAmount, uint tokenAmount, uint weiRaisedTotal, uint tokensSoldTotal) constant returns (bool limitBroken) {\n if(tokenAmount > getTokensLeft()) {\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * We are sold out when our approve pool becomes empty.\n */\n function isCrowdsaleFull() public constant returns (bool) {\n return getTokensLeft() == 0;\n }\n\n /**\n * Get the amount of unsold tokens allocated to this contract;\n */\n function getTokensLeft() public constant returns (uint) {\n return token.allowance(owner, this);\n }\n\n /**\n * Transfer tokens from approve() pool to the buyer.\n *\n * Use approve() given to this crowdsale to distribute the tokens.\n */\n function assignTokens(address receiver, uint tokenAmount) internal {\n if(!token.transferFrom(beneficiary, receiver, tokenAmount)) throw;\n }\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n/**\n * Deserialize bytes payloads.\n *\n * Values are in big-endian byte order.\n *\n */\nlibrary BytesDeserializer {\n\n /**\n * Extract 256-bit worth of data from the bytes stream.\n */\n function slice32(bytes b, uint offset) constant returns (bytes32) {\n bytes32 out;\n\n for (uint i = 0; i < 32; i++) {\n out |= bytes32(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n /**\n * Extract Ethereum address worth of data from the bytes stream.\n */\n function sliceAddress(bytes b, uint offset) constant returns (address) {\n bytes32 out;\n\n for (uint i = 0; i < 20; i++) {\n out |= bytes32(b[offset + i] & 0xFF) >> ((i+12) * 8);\n }\n return address(uint(out));\n }\n\n /**\n * Extract 128-bit worth of data from the bytes stream.\n */\n function slice16(bytes b, uint offset) constant returns (bytes16) {\n bytes16 out;\n\n for (uint i = 0; i < 16; i++) {\n out |= bytes16(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n /**\n * Extract 32-bit worth of data from the bytes stream.\n */\n function slice4(bytes b, uint offset) constant returns (bytes4) {\n bytes4 out;\n\n for (uint i = 0; i < 4; i++) {\n out |= bytes4(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n /**\n * Extract 16-bit worth of data from the bytes stream.\n */\n function slice2(bytes b, uint offset) constant returns (bytes2) {\n bytes2 out;\n\n for (uint i = 0; i < 2; i++) {\n out |= bytes2(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n\n\n}\n\n\n/**\n * A mix-in contract to decode different signed KYC payloads.\n *\n * @notice This should be a library, but for the complexity and toolchain fragility risks involving of linking library inside library, we currently use this as a helper method mix-in.\n */\ncontract KYCPayloadDeserializer {\n\n using BytesDeserializer for bytes;\n\n // @notice this struct describes what kind of data we include in the payload, we do not use this directly\n // The bytes payload set on the server side\n // total 56 bytes\n struct KYCPayload {\n\n /** Customer whitelisted address where the deposit can come from */\n address whitelistedAddress; // 20 bytes\n\n /** Customer id, UUID v4 */\n uint128 customerId; // 16 bytes\n\n /**\n * Min amount this customer needs to invest in ETH. Set zero if no minimum. Expressed as parts of 10000. 1 ETH = 10000.\n * @notice Decided to use 32-bit words to make the copy-pasted Data field for the ICO transaction less lenghty.\n */\n uint32 minETH; // 4 bytes\n\n /** Max amount this customer can to invest in ETH. Set zero if no maximum. Expressed as parts of 10000. 1 ETH = 10000. */\n uint32 maxETH; // 4 bytes\n\n /**\n * Information about the price promised for this participant. It can be pricing tier id or directly one token price in weis.\n * @notice This is a later addition and not supported in all scenarios yet.\n */\n uint256 pricingInfo;\n }\n\n\n /**\n * Same as above, but with pricing information included in the payload as the last integer.\n *\n * @notice In a long run, deprecate the legacy methods above and only use this payload.\n */\n function getKYCPayload(bytes dataframe) public constant returns(address whitelistedAddress, uint128 customerId, uint32 minEth, uint32 maxEth, uint256 pricingInfo) {\n address _whitelistedAddress = dataframe.sliceAddress(0);\n uint128 _customerId = uint128(dataframe.slice16(20));\n uint32 _minETH = uint32(dataframe.slice4(36));\n uint32 _maxETH = uint32(dataframe.slice4(40));\n uint256 _pricingInfo = uint256(dataframe.slice32(44));\n return (_whitelistedAddress, _customerId, _minETH, _maxETH, _pricingInfo);\n }\n\n}\n\n\n/**\n * A crowdsale that allows buys only from signed payload with server-side specified limits and price.\n *\n * The token distribution happens as in the allocated crowdsale.\n *\n */\ncontract KYCCrowdsale is AllocatedCrowdsaleMixin, KYCPayloadDeserializer {\n\n /* Server holds the private key to this address to sign incoming buy payloads to signal we have KYC records in the books for these users. */\n address public signerAddress;\n\n /* A new server-side signer key was set to be effective */\n event SignerChanged(address signer);\n\n /**\n * Constructor.\n */\n function KYCCrowdsale(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal, address _beneficiary) CrowdsaleBase(_token, _pricingStrategy, _multisigWallet, _start, _end, _minimumFundingGoal) AllocatedCrowdsaleMixin(_beneficiary) {\n\n }\n\n /**\n * A token purchase with anti-money laundering\n *\n * \u00a9return tokenAmount How many tokens where bought\n */\n function buyWithKYCData(bytes dataframe, uint8 v, bytes32 r, bytes32 s) public payable returns(uint tokenAmount) {\n\n uint _tokenAmount;\n uint multiplier = 10 ** 18;\n\n // Perform signature check for normal addresses\n // (not deployment accounts, etc.)\n if(earlyParticipantWhitelist[msg.sender]) {\n // Deployment provided early participant list is for deployment and diagnostics\n // For test purchases use this faux customer id 0x1000\n _tokenAmount = investInternal(msg.sender, 0x1000);\n\n } else {\n // User comes through the server, check that the signature to ensure ther server\n // side KYC has passed for this customer id and whitelisted Ethereum address\n\n bytes32 hash = sha256(dataframe);\n\n var (whitelistedAddress, customerId, minETH, maxETH, pricingInfo) = getKYCPayload(dataframe);\n\n // Check that the KYC data is signed by our server\n require(ecrecover(hash, v, r, s) == signerAddress);\n\n // Only whitelisted address can participate the transaction\n require(whitelistedAddress == msg.sender);\n\n // Server gives us information what is the buy price for this user\n uint256 tokensTotal = calculateTokens(msg.value, pricingInfo);\n\n _tokenAmount = buyTokens(msg.sender, customerId, tokensTotal);\n }\n\n if(!earlyParticipantWhitelist[msg.sender]) {\n // We assume there is no serious min and max fluctuations for the customer, unless\n // especially set in the server side per customer manual override.\n // Otherwise the customer can reuse old data payload with different min or max value\n // to work around the per customer cap.\n require(investedAmountOf[msg.sender] >= minETH * multiplier / 10000);\n require(investedAmountOf[msg.sender] <= maxETH * multiplier / 10000);\n }\n\n return _tokenAmount;\n }\n\n /// @dev This function can set the server side address\n /// @param _signerAddress The address derived from server's private key\n function setSignerAddress(address _signerAddress) onlyOwner {\n signerAddress = _signerAddress;\n SignerChanged(signerAddress);\n }\n\n}\n"}, "KYCInterface": {"abi": [{"constant": true, "inputs": [{"name": "who", "type": "address"}], "name": "isWhitelisted", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "who", "type": "address"}, {"indexed": false, "name": "nonce", "type": "uint128"}], "name": "Whitelisted", "type": "event"}], "bytecode": "0x", "bytecode_runtime": "0x", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": null, "name": "KYCInterface", "ordered_full_dependencies": [], "source_path": "contracts/security-token/KYCInterface.sol"}, "KYCPayloadDeserializer": {"abi": [{"constant": true, "inputs": [{"name": "dataframe", "type": "bytes"}], "name": "getKYCPayload", "outputs": [{"name": "whitelistedAddress", "type": "address"}, {"name": "customerId", "type": "uint128"}, {"name": "minEth", "type": "uint32"}, {"name": "maxEth", "type": "uint32"}, {"name": "pricingInfo", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}], "bytecode": "0x608060405234801561001057600080fd5b5061062a806100206000396000f3006080604052600436106100275763ffffffff60e060020a60003504166373752db4811461002c575b600080fd5b34801561003857600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526100859436949293602493928401919081908401838280828437509497506100df9650505050505050565b6040805173ffffffffffffffffffffffffffffffffffffffff90961686526fffffffffffffffffffffffffffffffff909416602086015263ffffffff92831685850152911660608401526080830152519081900360a00190f35b6000806000806000806000806000808a73__contracts/BytesDeserializer.sol:Byte__63b655e138909160006040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b8381101561016257818101518382015260200161014a565b50505050905090810190601f16801561018f5780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b1580156101ad57600080fd5b505af41580156101c1573d6000803e3d6000fd5b505050506040513d60208110156101d757600080fd5b810190808051906020019092919050505094508a73__contracts/BytesDeserializer.sol:Byte__6316419aa7909160146040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b8381101561025e578181015183820152602001610246565b50505050905090810190601f16801561028b5780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b1580156102a957600080fd5b505af41580156102bd573d6000803e3d6000fd5b505050506040513d60208110156102d357600080fd5b8101908080519060200190929190505050700100000000000000000000000000000000900493508a73__contracts/BytesDeserializer.sol:Byte__63d54dd8f9909160246040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b8381101561036e578181015183820152602001610356565b50505050905090810190601f16801561039b5780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b1580156103b957600080fd5b505af41580156103cd573d6000803e3d6000fd5b505050506040513d60208110156103e357600080fd5b810190808051906020019092919050505060e060020a900492508a73__contracts/BytesDeserializer.sol:Byte__63d54dd8f9909160286040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b83811015610471578181015183820152602001610459565b50505050905090810190601f16801561049e5780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b1580156104bc57600080fd5b505af41580156104d0573d6000803e3d6000fd5b505050506040513d60208110156104e657600080fd5b810190808051906020019092919050505060e060020a900491508a73__contracts/BytesDeserializer.sol:Byte__632e1eb7fe9091602c6040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b8381101561057457818101518382015260200161055c565b50505050905090810190601f1680156105a15780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b1580156105bf57600080fd5b505af41580156105d3573d6000803e3d6000fd5b505050506040513d60208110156105e957600080fd5b5051949b939a509198509650919450925050505600a165627a7a723058202e8c6ae50b444d1ab055f9c1c2095c147299a0aa25e5a9633c301b2b9494e6770029", "bytecode_runtime": "0x6080604052600436106100275763ffffffff60e060020a60003504166373752db4811461002c575b600080fd5b34801561003857600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526100859436949293602493928401919081908401838280828437509497506100df9650505050505050565b6040805173ffffffffffffffffffffffffffffffffffffffff90961686526fffffffffffffffffffffffffffffffff909416602086015263ffffffff92831685850152911660608401526080830152519081900360a00190f35b6000806000806000806000806000808a73__contracts/BytesDeserializer.sol:Byte__63b655e138909160006040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b8381101561016257818101518382015260200161014a565b50505050905090810190601f16801561018f5780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b1580156101ad57600080fd5b505af41580156101c1573d6000803e3d6000fd5b505050506040513d60208110156101d757600080fd5b810190808051906020019092919050505094508a73__contracts/BytesDeserializer.sol:Byte__6316419aa7909160146040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b8381101561025e578181015183820152602001610246565b50505050905090810190601f16801561028b5780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b1580156102a957600080fd5b505af41580156102bd573d6000803e3d6000fd5b505050506040513d60208110156102d357600080fd5b8101908080519060200190929190505050700100000000000000000000000000000000900493508a73__contracts/BytesDeserializer.sol:Byte__63d54dd8f9909160246040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b8381101561036e578181015183820152602001610356565b50505050905090810190601f16801561039b5780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b1580156103b957600080fd5b505af41580156103cd573d6000803e3d6000fd5b505050506040513d60208110156103e357600080fd5b810190808051906020019092919050505060e060020a900492508a73__contracts/BytesDeserializer.sol:Byte__63d54dd8f9909160286040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b83811015610471578181015183820152602001610459565b50505050905090810190601f16801561049e5780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b1580156104bc57600080fd5b505af41580156104d0573d6000803e3d6000fd5b505050506040513d60208110156104e657600080fd5b810190808051906020019092919050505060e060020a900491508a73__contracts/BytesDeserializer.sol:Byte__632e1eb7fe9091602c6040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b8381101561057457818101518382015260200161055c565b50505050905090810190601f1680156105a15780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b1580156105bf57600080fd5b505af41580156105d3573d6000803e3d6000fd5b505050506040513d60208110156105e957600080fd5b5051949b939a509198509650919450925050505600a165627a7a723058202e8c6ae50b444d1ab055f9c1c2095c147299a0aa25e5a9633c301b2b9494e6770029", "direct_dependencies": ["BytesDeserializer"], "full_dependencies": ["BytesDeserializer"], "linkrefs": [{"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 546}, {"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 1050}, {"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 1594}, {"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 2112}, {"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 2630}], "linkrefs_runtime": [{"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 482}, {"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 986}, {"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 1530}, {"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 2048}, {"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 2566}], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": true, "inputs": [{"name": "dataframe", "type": "bytes"}], "name": "getKYCPayload", "outputs": [{"name": "whitelistedAddress", "type": "address"}, {"name": "customerId", "type": "uint128"}, {"name": "minEth", "type": "uint32"}, {"name": "maxEth", "type": "uint32"}, {"name": "pricingInfo", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}], "devdoc": {"methods": {}}, "userdoc": {"methods": {"getKYCPayload(bytes)": {"notice": "Same as above, but with pricing information included in the payload as the last integer.In a long run, deprecate the legacy methods above and only use this payload."}}}}, "settings": {"compilationTarget": {"contracts/KYCPayloadDeserializer.sol": "KYCPayloadDeserializer"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/BytesDeserializer.sol": {"keccak256": "0xdd1718e5ea778d4dd36ccb98336360536beffdffd152bd9fb035124835fa4765", "urls": ["bzzr://ee94acd8149a77baf3f6881b995d1e9eba68c3225b2fe666dc0d402e0b68c5ce"]}, "contracts/KYCPayloadDeserializer.sol": {"keccak256": "0x4dbf491aa75393638028f16bedbc395bbec6beb6721ed5d569a18da089faf182", "urls": ["bzzr://a9b13fd13eda2199df6497108c1a0313d1ce91366a48f8650d647a0d86c43c6c"]}}, "version": 1}, "name": "KYCPayloadDeserializer", "ordered_full_dependencies": ["BytesDeserializer"], "source_path": "contracts/KYCPayloadDeserializer.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n/**\n * Deserialize bytes payloads.\n *\n * Values are in big-endian byte order.\n *\n */\nlibrary BytesDeserializer {\n\n /**\n * Extract 256-bit worth of data from the bytes stream.\n */\n function slice32(bytes b, uint offset) constant returns (bytes32) {\n bytes32 out;\n\n for (uint i = 0; i < 32; i++) {\n out |= bytes32(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n /**\n * Extract Ethereum address worth of data from the bytes stream.\n */\n function sliceAddress(bytes b, uint offset) constant returns (address) {\n bytes32 out;\n\n for (uint i = 0; i < 20; i++) {\n out |= bytes32(b[offset + i] & 0xFF) >> ((i+12) * 8);\n }\n return address(uint(out));\n }\n\n /**\n * Extract 128-bit worth of data from the bytes stream.\n */\n function slice16(bytes b, uint offset) constant returns (bytes16) {\n bytes16 out;\n\n for (uint i = 0; i < 16; i++) {\n out |= bytes16(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n /**\n * Extract 32-bit worth of data from the bytes stream.\n */\n function slice4(bytes b, uint offset) constant returns (bytes4) {\n bytes4 out;\n\n for (uint i = 0; i < 4; i++) {\n out |= bytes4(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n /**\n * Extract 16-bit worth of data from the bytes stream.\n */\n function slice2(bytes b, uint offset) constant returns (bytes2) {\n bytes2 out;\n\n for (uint i = 0; i < 2; i++) {\n out |= bytes2(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n\n\n}\n\n\n/**\n * A mix-in contract to decode different signed KYC payloads.\n *\n * @notice This should be a library, but for the complexity and toolchain fragility risks involving of linking library inside library, we currently use this as a helper method mix-in.\n */\ncontract KYCPayloadDeserializer {\n\n using BytesDeserializer for bytes;\n\n // @notice this struct describes what kind of data we include in the payload, we do not use this directly\n // The bytes payload set on the server side\n // total 56 bytes\n struct KYCPayload {\n\n /** Customer whitelisted address where the deposit can come from */\n address whitelistedAddress; // 20 bytes\n\n /** Customer id, UUID v4 */\n uint128 customerId; // 16 bytes\n\n /**\n * Min amount this customer needs to invest in ETH. Set zero if no minimum. Expressed as parts of 10000. 1 ETH = 10000.\n * @notice Decided to use 32-bit words to make the copy-pasted Data field for the ICO transaction less lenghty.\n */\n uint32 minETH; // 4 bytes\n\n /** Max amount this customer can to invest in ETH. Set zero if no maximum. Expressed as parts of 10000. 1 ETH = 10000. */\n uint32 maxETH; // 4 bytes\n\n /**\n * Information about the price promised for this participant. It can be pricing tier id or directly one token price in weis.\n * @notice This is a later addition and not supported in all scenarios yet.\n */\n uint256 pricingInfo;\n }\n\n\n /**\n * Same as above, but with pricing information included in the payload as the last integer.\n *\n * @notice In a long run, deprecate the legacy methods above and only use this payload.\n */\n function getKYCPayload(bytes dataframe) public constant returns(address whitelistedAddress, uint128 customerId, uint32 minEth, uint32 maxEth, uint256 pricingInfo) {\n address _whitelistedAddress = dataframe.sliceAddress(0);\n uint128 _customerId = uint128(dataframe.slice16(20));\n uint32 _minETH = uint32(dataframe.slice4(36));\n uint32 _maxETH = uint32(dataframe.slice4(40));\n uint256 _pricingInfo = uint256(dataframe.slice32(44));\n return (_whitelistedAddress, _customerId, _minETH, _maxETH, _pricingInfo);\n }\n\n}\n"}, "KYCPresale": {"abi": [{"constant": false, "inputs": [{"name": "newCap", "type": "uint256"}], "name": "setWeiCap", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "ownerTestValue", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_signerAddress", "type": "address"}], "name": "setSignerAddress", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "isPricingSane", "outputs": [{"name": "sane", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "endsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "minimumFundingGoal", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getState", "outputs": [{"name": "", "type": "uint8"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setFinalizeAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "investedAmountOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "finalizeAgent", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "weiRaised", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isCrowdsale", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "finalize", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_pricingStrategy", "type": "address"}], "name": "setPricingStrategy", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "tokensSold", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "refund", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "signerAddress", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "weiRefunded", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "halt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "time", "type": "uint256"}], "name": "setEndsAt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "dataframe", "type": "bytes"}], "name": "getKYCPayload", "outputs": [{"name": "whitelistedAddress", "type": "address"}, {"name": "customerId", "type": "uint128"}, {"name": "minEth", "type": "uint32"}, {"name": "maxEth", "type": "uint32"}, {"name": "pricingInfo", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "pricingStrategy", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "loadedRefund", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isMinimumGoalReached", "outputs": [{"name": "reached", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "loadRefund", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "val", "type": "uint256"}], "name": "setOwnerTestValue", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "weisTotal", "type": "uint256"}, {"name": "pricePerToken", "type": "uint256"}], "name": "calculateTokens", "outputs": [{"name": "tokensTotal", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "multisigWallet", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "tokenAmountOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "weiAmount", "type": "uint256"}, {"name": "tokenAmount", "type": "uint256"}, {"name": "weiRaisedTotal", "type": "uint256"}, {"name": "tokensSoldTotal", "type": "uint256"}], "name": "isBreakingCap", "outputs": [{"name": "limitBroken", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isFinalizerSane", "outputs": [{"name": "sane", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "startsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "finalized", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "halted", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "saleWeiCap", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "earlyParticipantWhitelist", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "unhalt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "isCrowdsaleFull", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "dataframe", "type": "bytes"}, {"name": "v", "type": "uint8"}, {"name": "r", "type": "bytes32"}, {"name": "s", "type": "bytes32"}], "name": "buyWithKYCData", "outputs": [{"name": "tokenAmount", "type": "uint256"}], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "investorCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "status", "type": "bool"}], "name": "setEarlyParicipantWhitelist", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setMultisig", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "presaleWeiRaised", "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": "_multisigWallet", "type": "address"}, {"name": "_start", "type": "uint256"}, {"name": "_end", "type": "uint256"}, {"name": "_saleWeiCap", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"payable": true, "stateMutability": "payable", "type": "fallback"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "signer", "type": "address"}], "name": "SignerChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}, {"indexed": false, "name": "tokenAmount", "type": "uint256"}, {"indexed": false, "name": "customerId", "type": "uint128"}, {"indexed": false, "name": "pricingInfo", "type": "uint256"}], "name": "Prepurchased", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newCap", "type": "uint256"}], "name": "CapUpdated", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}, {"indexed": false, "name": "tokenAmount", "type": "uint256"}, {"indexed": false, "name": "customerId", "type": "uint128"}], "name": "Invested", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}], "name": "Refund", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newRequireCustomerId", "type": "bool"}, {"indexed": false, "name": "newRequiredSignedAddress", "type": "bool"}, {"indexed": false, "name": "newSignerAddress", "type": "address"}], "name": "InvestmentPolicyChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "addr", "type": "address"}, {"indexed": false, "name": "status", "type": "bool"}], "name": "Whitelisted", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newEndsAt", "type": "uint256"}], "name": "EndsAtChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "bytecode": "0x6080604052600560015560006009556000600a556000600b556000600c556000600d556000600e553480156200003457600080fd5b5060405160808062001e0883398101604090815281516020830151918301516060909301516000805433600160a060020a03199182168117821617825560028054909116600190811790915592949290858585836200009c8164010000000062000115810204565b60058054600160a060020a031916600160a060020a038681169190911791829055161515620000ca57600080fd5b821515620000d757600080fd5b6007839055811515620000e957600080fd5b60088290556007548211620000fd57600080fd5b60065550505060149290925550620001309350505050565b600054600160a060020a031633146200012d57600080fd5b50565b611cc880620001406000396000f3006080604052600436106102215763ffffffff60e060020a600035041663015fa6c181146102265780630226401d14610240578063046dc16614610267578063062b01ce146102885780630a09284a146102b157806313f4e977146102c65780631865c57d146102db57806319b667da146103145780631aae34601461033557806321d5c0f6146103565780634042b66f146103875780634551dd591461039c5780634bb278f3146103b157806350c67734146103c6578063518ab2a8146103e7578063590e1ae3146103fc5780635b7633d0146104115780635da89ac0146104265780635ed7ca5b1461043b5780636203f09f146104505780636e50eb3f1461046557806373752db41461047d57806378b99c2414610523578063797d9437146105385780637c2e08a31461054d57806387612102146105625780638d51faec1461056a5780638da5cb5b14610582578063903cc583146105975780639075becf146105b257806397b150ca146105c75780639d3c663f146105e8578063a7ba44c314610609578063af4686821461061e578063b3f05b9714610633578063b9b8af0b14610648578063c80d36941461065d578063cb16e6d014610672578063cb3e64fd14610693578063d5d09021146106a8578063d7c7159c146106bd578063d7e64c0014610718578063eac249321461072d578063f2fde38b14610753578063f3283fba14610774578063f7c00e2f14610795578063fc0c546a146107aa575b600080fd5b34801561023257600080fd5b5061023e6004356107bf565b005b34801561024c57600080fd5b50610255610811565b60408051918252519081900360200190f35b34801561027357600080fd5b5061023e600160a060020a0360043516610817565b34801561029457600080fd5b5061029d610895565b604080519115158252519081900360200190f35b3480156102bd57600080fd5b5061025561092c565b3480156102d257600080fd5b50610255610932565b3480156102e757600080fd5b506102f0610938565b6040518082600781111561030057fe5b60ff16815260200191505060405180910390f35b34801561032057600080fd5b5061023e600160a060020a0360043516610954565b34801561034157600080fd5b50610255600160a060020a0360043516610a25565b34801561036257600080fd5b5061036b610a37565b60408051600160a060020a039092168252519081900360200190f35b34801561039357600080fd5b50610255610a46565b3480156103a857600080fd5b5061029d610a4c565b3480156103bd57600080fd5b5061023e610a51565b3480156103d257600080fd5b5061023e600160a060020a0360043516610b56565b3480156103f357600080fd5b50610255610b6d565b34801561040857600080fd5b5061023e610b73565b34801561041d57600080fd5b5061036b610ccf565b34801561043257600080fd5b50610255610cde565b34801561044757600080fd5b5061023e610ce4565b34801561045c57600080fd5b50610255610d32565b34801561047157600080fd5b5061023e600435610d38565b34801561048957600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526104d6943694929360249392840191908190840183828082843750949750610da69650505050505050565b60408051600160a060020a0390961686526fffffffffffffffffffffffffffffffff909416602086015263ffffffff92831685850152911660608401526080830152519081900360a00190f35b34801561052f57600080fd5b5061036b6112c5565b34801561054457600080fd5b506102556112d4565b34801561055957600080fd5b5061029d6112da565b61023e6112e5565b34801561057657600080fd5b5061023e6004356113b7565b34801561058e57600080fd5b5061036b6113d3565b3480156105a357600080fd5b506102556004356024356113e2565b3480156105be57600080fd5b5061036b611520565b3480156105d357600080fd5b50610255600160a060020a036004351661152f565b3480156105f457600080fd5b5061029d600435602435604435606435611541565b34801561061557600080fd5b5061029d611561565b34801561062a57600080fd5b506102556115b6565b34801561063f57600080fd5b5061029d6115bc565b34801561065457600080fd5b5061029d6115c5565b34801561066957600080fd5b506102556115e6565b34801561067e57600080fd5b5061029d600160a060020a03600435166115ec565b34801561069f57600080fd5b5061023e611601565b3480156106b457600080fd5b5061029d611661565b6040805160206004803580820135601f81018490048402850184019095528484526102559436949293602493928401919081908401838280828437509497505050833560ff169450505060208201359160400135905061166c565b34801561072457600080fd5b50610255611b1b565b34801561073957600080fd5b5061023e600160a060020a03600435166024351515611b21565b34801561075f57600080fd5b5061023e600160a060020a0360043516611b9c565b34801561078057600080fd5b5061023e600160a060020a0360043516611c30565b3480156107a157600080fd5b50610255611c87565b3480156107b657600080fd5b5061036b611c8d565b600054600160a060020a031633146107d657600080fd5b60148190556040805182815290517f3c8eb7c49d332f4c1e4d92a27cda93c31cc9452f7a408e0c6109fcddbc9946ea9181900360200190a150565b60135481565b600054600160a060020a0316331461082e57600080fd5b6015805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03838116919091179182905560408051929091168252517f5719a5656c5cfdaafa148ecf366fd3b0a7fae06449ce2a46225977fb7417e29d916020908290030190a150565b600354604080517f8e7682880000000000000000000000000000000000000000000000000000000081523060048201529051600092600160a060020a031691638e76828891602480830192602092919082900301818787803b1580156108fa57600080fd5b505af115801561090e573d6000803e3d6000fd5b505050506040513d602081101561092457600080fd5b505190505b90565b60085481565b60065481565b600060075442101561094c57506002610929565b506003610929565b600054600160a060020a0316331461096b57600080fd5b6004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383811691909117808355604080517f614cb9040000000000000000000000000000000000000000000000000000000081529051919092169263614cb904928082019260209290918290030181600087803b1580156109eb57600080fd5b505af11580156109ff573d6000803e3d6000fd5b505050506040513d6020811015610a1557600080fd5b50511515610a2257600080fd5b50565b60106020526000908152604090205481565b600454600160a060020a031681565b600a5481565b600190565b600480610a5c610938565b6007811115610a6757fe5b14610a7157600080fd5b600054600160a060020a03163314610a8857600080fd5b60005474010000000000000000000000000000000000000000900460ff1615610ab057600080fd5b600f5460ff1615610ac057600080fd5b600454600160a060020a031615610b465760048054604080517f0bf318a30000000000000000000000000000000000000000000000000000000081529051600160a060020a0390921692630bf318a392828201926000929082900301818387803b158015610b2d57600080fd5b505af1158015610b41573d6000803e3d6000fd5b505050505b50600f805460ff19166001179055565b600054600160a060020a03163314610a2257600080fd5b60095481565b6000600780610b80610938565b6007811115610b8b57fe5b14610b9557600080fd5b336000908152601060205260409020549150811515610bb357600080fd5b33600090815260106020908152604080832092909255600e5482517f66098d4f000000000000000000000000000000000000000000000000000000008152600481019190915260248101859052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b158015610c3a57600080fd5b505af4158015610c4e573d6000803e3d6000fd5b505050506040513d6020811015610c6457600080fd5b5051600e55604080513381526020810184905281517fbb28353e4598c3b9199101a66e0989549b659a59a54d2c27fbb183f1932c8e6d929181900390910190a1604051339083156108fc029084906000818181858888f193505050501515610ccb57600080fd5b5050565b601554600160a060020a031681565b600e5481565b600054600160a060020a03163314610cfb57600080fd5b6000805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b60015481565b600054600160a060020a03163314610d4f57600080fd5b80421115610d5c57600080fd5b806007541115610d6b57600080fd5b60088190556040805182815290517fd34bb772c4ae9baa99db852f622773b31c7827e8ee818449fef20d30980bd3109181900360200190a150565b6000806000806000806000806000808a73__contracts/BytesDeserializer.sol:Byte__63b655e138909160006040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b83811015610e29578181015183820152602001610e11565b50505050905090810190601f168015610e565780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b158015610e7457600080fd5b505af4158015610e88573d6000803e3d6000fd5b505050506040513d6020811015610e9e57600080fd5b810190808051906020019092919050505094508a73__contracts/BytesDeserializer.sol:Byte__6316419aa7909160146040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b83811015610f25578181015183820152602001610f0d565b50505050905090810190601f168015610f525780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b158015610f7057600080fd5b505af4158015610f84573d6000803e3d6000fd5b505050506040513d6020811015610f9a57600080fd5b8101908080519060200190929190505050700100000000000000000000000000000000900493508a73__contracts/BytesDeserializer.sol:Byte__63d54dd8f9909160246040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b8381101561103557818101518382015260200161101d565b50505050905090810190601f1680156110625780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b15801561108057600080fd5b505af4158015611094573d6000803e3d6000fd5b505050506040513d60208110156110aa57600080fd5b810190808051906020019092919050505060e060020a900492508a73__contracts/BytesDeserializer.sol:Byte__63d54dd8f9909160286040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b83811015611138578181015183820152602001611120565b50505050905090810190601f1680156111655780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b15801561118357600080fd5b505af4158015611197573d6000803e3d6000fd5b505050506040513d60208110156111ad57600080fd5b810190808051906020019092919050505060e060020a900491508a73__contracts/BytesDeserializer.sol:Byte__632e1eb7fe9091602c6040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b8381101561123b578181015183820152602001611223565b50505050905090810190601f1680156112685780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b15801561128657600080fd5b505af415801561129a573d6000803e3d6000fd5b505050506040513d60208110156112b057600080fd5b5051949b939a50919850965091945092505050565b600354600160a060020a031681565b600d5481565b600654600a54101590565b6005806112f0610938565b60078111156112fb57fe5b1461130557600080fd5b34151561131157600080fd5b600d54604080517f66098d4f00000000000000000000000000000000000000000000000000000000815260048101929092523460248301525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b15801561138557600080fd5b505af4158015611399573d6000803e3d6000fd5b505050506040513d60208110156113af57600080fd5b5051600d5550565b600054600160a060020a031633146113ce57600080fd5b601355565b600054600160a060020a031681565b600080600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561143857600080fd5b505af115801561144c573d6000803e3d6000fd5b505050506040513d602081101561146257600080fd5b5051604080517f1d3b9edf00000000000000000000000000000000000000000000000000000000815260048101879052600a9290920a602483018190529051909250849173__contracts/SafeMathLib.sol:SafeMathLi__91631d3b9edf91604480820192602092909190829003018186803b1580156114e257600080fd5b505af41580156114f6573d6000803e3d6000fd5b505050506040513d602081101561150c57600080fd5b505181151561151757fe5b04949350505050565b600554600160a060020a031681565b60116020526000908152604090205481565b600060145483111561155557506001611559565b5060005b949350505050565b6000600460009054906101000a9004600160a060020a0316600160a060020a03166382771c8e6040518163ffffffff1660e060020a028152600401602060405180830381600087803b1580156108fa57600080fd5b60075481565b600f5460ff1681565b60005474010000000000000000000000000000000000000000900460ff1681565b60145481565b60126020526000908152604090205460ff1681565b600054600160a060020a0316331461161857600080fd5b60005474010000000000000000000000000000000000000000900460ff16151561164157600080fd5b6000805474ff000000000000000000000000000000000000000019169055565b601454600a54101590565b600080600080600080600080600080600060149054906101000a900460ff1615151561169757600080fd5b60028e6040518082805190602001908083835b602083106116c95780518252601f1990920191602091820191016116aa565b51815160209384036101000a600019018019909216911617905260405191909301945091925050808303816000865af115801561170a573d6000803e3d6000fd5b5050506040513d602081101561171f57600080fd5b5051985061172c8e610da6565b97509750975097509750670de0b6b3a76400009250339150349050601560009054906101000a9004600160a060020a0316600160a060020a031660018a8f8f8f604051600081526020016040526040518085600019166000191681526020018460ff1660ff1681526020018360001916600019168152602001826000191660001916815260200194505050505060206040516020810390808403906000865af11580156117dd573d6000803e3d6000fd5b50505060206040510351600160a060020a03161415156117fc57600080fd5b6002611806610938565b600781111561181157fe5b141561184357600160a060020a03821660009081526012602052604090205460ff16151561183e57600080fd5b61185f565b600361184d610938565b600781111561185857fe5b1415610221575b600160a060020a038216600090815260106020526040902054151561188857600c805460010190555b600160a060020a0382166000908152601060209081526040918290205482517f66098d4f000000000000000000000000000000000000000000000000000000008152600481019190915260248101849052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561191357600080fd5b505af4158015611927573d6000803e3d6000fd5b505050506040513d602081101561193d57600080fd5b5051600160a060020a03831660009081526010602090815260409182902092909255600a5481517f66098d4f000000000000000000000000000000000000000000000000000000008152600481019190915260248101849052905173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f9260448082019391829003018186803b1580156119cf57600080fd5b505af41580156119e3573d6000803e3d6000fd5b505050506040513d60208110156119f957600080fd5b5051600a819055600954611a119183918d9190611541565b15611a1b57600080fd5b3360009081526010602052604090205461271063ffffffff88168502041115611a4357600080fd5b3360009081526010602052604090205461271063ffffffff87168502041015611a6b57600080fd5b600554604051600160a060020a039091169082156108fc029083906000818181858888f193505050501515611a9f57600080fd5b60408051600160a060020a0384168152602081018390528082018c90526fffffffffffffffffffffffffffffffff891660608201526080810186905290517fb926bd06586c265869c2a70eaf4affb7b7b778b25883b85a123262d056f79c019181900360a00190a15060009d9c50505050505050505050505050565b600c5481565b600054600160a060020a03163314611b3857600080fd5b600160a060020a038216600081815260126020908152604091829020805460ff191685151590811790915582519384529083015280517fa54714518c5d275fdcd3d2a461e4858e4e8cb04fb93cd0bca9d6d34115f264409281900390910190a15050565b600054600160a060020a03163314611bb357600080fd5b600160a060020a0381161515611bc857600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600054600160a060020a03163314611c4757600080fd5b600154600c541115611c5857600080fd5b6005805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600b5481565b600254600160a060020a0316815600a165627a7a7230582005a68f2f1a7bf395ecb708187dfec7408bc250900ba183e4401870cbdb2acf960029", "bytecode_runtime": "0x6080604052600436106102215763ffffffff60e060020a600035041663015fa6c181146102265780630226401d14610240578063046dc16614610267578063062b01ce146102885780630a09284a146102b157806313f4e977146102c65780631865c57d146102db57806319b667da146103145780631aae34601461033557806321d5c0f6146103565780634042b66f146103875780634551dd591461039c5780634bb278f3146103b157806350c67734146103c6578063518ab2a8146103e7578063590e1ae3146103fc5780635b7633d0146104115780635da89ac0146104265780635ed7ca5b1461043b5780636203f09f146104505780636e50eb3f1461046557806373752db41461047d57806378b99c2414610523578063797d9437146105385780637c2e08a31461054d57806387612102146105625780638d51faec1461056a5780638da5cb5b14610582578063903cc583146105975780639075becf146105b257806397b150ca146105c75780639d3c663f146105e8578063a7ba44c314610609578063af4686821461061e578063b3f05b9714610633578063b9b8af0b14610648578063c80d36941461065d578063cb16e6d014610672578063cb3e64fd14610693578063d5d09021146106a8578063d7c7159c146106bd578063d7e64c0014610718578063eac249321461072d578063f2fde38b14610753578063f3283fba14610774578063f7c00e2f14610795578063fc0c546a146107aa575b600080fd5b34801561023257600080fd5b5061023e6004356107bf565b005b34801561024c57600080fd5b50610255610811565b60408051918252519081900360200190f35b34801561027357600080fd5b5061023e600160a060020a0360043516610817565b34801561029457600080fd5b5061029d610895565b604080519115158252519081900360200190f35b3480156102bd57600080fd5b5061025561092c565b3480156102d257600080fd5b50610255610932565b3480156102e757600080fd5b506102f0610938565b6040518082600781111561030057fe5b60ff16815260200191505060405180910390f35b34801561032057600080fd5b5061023e600160a060020a0360043516610954565b34801561034157600080fd5b50610255600160a060020a0360043516610a25565b34801561036257600080fd5b5061036b610a37565b60408051600160a060020a039092168252519081900360200190f35b34801561039357600080fd5b50610255610a46565b3480156103a857600080fd5b5061029d610a4c565b3480156103bd57600080fd5b5061023e610a51565b3480156103d257600080fd5b5061023e600160a060020a0360043516610b56565b3480156103f357600080fd5b50610255610b6d565b34801561040857600080fd5b5061023e610b73565b34801561041d57600080fd5b5061036b610ccf565b34801561043257600080fd5b50610255610cde565b34801561044757600080fd5b5061023e610ce4565b34801561045c57600080fd5b50610255610d32565b34801561047157600080fd5b5061023e600435610d38565b34801561048957600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526104d6943694929360249392840191908190840183828082843750949750610da69650505050505050565b60408051600160a060020a0390961686526fffffffffffffffffffffffffffffffff909416602086015263ffffffff92831685850152911660608401526080830152519081900360a00190f35b34801561052f57600080fd5b5061036b6112c5565b34801561054457600080fd5b506102556112d4565b34801561055957600080fd5b5061029d6112da565b61023e6112e5565b34801561057657600080fd5b5061023e6004356113b7565b34801561058e57600080fd5b5061036b6113d3565b3480156105a357600080fd5b506102556004356024356113e2565b3480156105be57600080fd5b5061036b611520565b3480156105d357600080fd5b50610255600160a060020a036004351661152f565b3480156105f457600080fd5b5061029d600435602435604435606435611541565b34801561061557600080fd5b5061029d611561565b34801561062a57600080fd5b506102556115b6565b34801561063f57600080fd5b5061029d6115bc565b34801561065457600080fd5b5061029d6115c5565b34801561066957600080fd5b506102556115e6565b34801561067e57600080fd5b5061029d600160a060020a03600435166115ec565b34801561069f57600080fd5b5061023e611601565b3480156106b457600080fd5b5061029d611661565b6040805160206004803580820135601f81018490048402850184019095528484526102559436949293602493928401919081908401838280828437509497505050833560ff169450505060208201359160400135905061166c565b34801561072457600080fd5b50610255611b1b565b34801561073957600080fd5b5061023e600160a060020a03600435166024351515611b21565b34801561075f57600080fd5b5061023e600160a060020a0360043516611b9c565b34801561078057600080fd5b5061023e600160a060020a0360043516611c30565b3480156107a157600080fd5b50610255611c87565b3480156107b657600080fd5b5061036b611c8d565b600054600160a060020a031633146107d657600080fd5b60148190556040805182815290517f3c8eb7c49d332f4c1e4d92a27cda93c31cc9452f7a408e0c6109fcddbc9946ea9181900360200190a150565b60135481565b600054600160a060020a0316331461082e57600080fd5b6015805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03838116919091179182905560408051929091168252517f5719a5656c5cfdaafa148ecf366fd3b0a7fae06449ce2a46225977fb7417e29d916020908290030190a150565b600354604080517f8e7682880000000000000000000000000000000000000000000000000000000081523060048201529051600092600160a060020a031691638e76828891602480830192602092919082900301818787803b1580156108fa57600080fd5b505af115801561090e573d6000803e3d6000fd5b505050506040513d602081101561092457600080fd5b505190505b90565b60085481565b60065481565b600060075442101561094c57506002610929565b506003610929565b600054600160a060020a0316331461096b57600080fd5b6004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383811691909117808355604080517f614cb9040000000000000000000000000000000000000000000000000000000081529051919092169263614cb904928082019260209290918290030181600087803b1580156109eb57600080fd5b505af11580156109ff573d6000803e3d6000fd5b505050506040513d6020811015610a1557600080fd5b50511515610a2257600080fd5b50565b60106020526000908152604090205481565b600454600160a060020a031681565b600a5481565b600190565b600480610a5c610938565b6007811115610a6757fe5b14610a7157600080fd5b600054600160a060020a03163314610a8857600080fd5b60005474010000000000000000000000000000000000000000900460ff1615610ab057600080fd5b600f5460ff1615610ac057600080fd5b600454600160a060020a031615610b465760048054604080517f0bf318a30000000000000000000000000000000000000000000000000000000081529051600160a060020a0390921692630bf318a392828201926000929082900301818387803b158015610b2d57600080fd5b505af1158015610b41573d6000803e3d6000fd5b505050505b50600f805460ff19166001179055565b600054600160a060020a03163314610a2257600080fd5b60095481565b6000600780610b80610938565b6007811115610b8b57fe5b14610b9557600080fd5b336000908152601060205260409020549150811515610bb357600080fd5b33600090815260106020908152604080832092909255600e5482517f66098d4f000000000000000000000000000000000000000000000000000000008152600481019190915260248101859052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b158015610c3a57600080fd5b505af4158015610c4e573d6000803e3d6000fd5b505050506040513d6020811015610c6457600080fd5b5051600e55604080513381526020810184905281517fbb28353e4598c3b9199101a66e0989549b659a59a54d2c27fbb183f1932c8e6d929181900390910190a1604051339083156108fc029084906000818181858888f193505050501515610ccb57600080fd5b5050565b601554600160a060020a031681565b600e5481565b600054600160a060020a03163314610cfb57600080fd5b6000805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b60015481565b600054600160a060020a03163314610d4f57600080fd5b80421115610d5c57600080fd5b806007541115610d6b57600080fd5b60088190556040805182815290517fd34bb772c4ae9baa99db852f622773b31c7827e8ee818449fef20d30980bd3109181900360200190a150565b6000806000806000806000806000808a73__contracts/BytesDeserializer.sol:Byte__63b655e138909160006040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b83811015610e29578181015183820152602001610e11565b50505050905090810190601f168015610e565780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b158015610e7457600080fd5b505af4158015610e88573d6000803e3d6000fd5b505050506040513d6020811015610e9e57600080fd5b810190808051906020019092919050505094508a73__contracts/BytesDeserializer.sol:Byte__6316419aa7909160146040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b83811015610f25578181015183820152602001610f0d565b50505050905090810190601f168015610f525780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b158015610f7057600080fd5b505af4158015610f84573d6000803e3d6000fd5b505050506040513d6020811015610f9a57600080fd5b8101908080519060200190929190505050700100000000000000000000000000000000900493508a73__contracts/BytesDeserializer.sol:Byte__63d54dd8f9909160246040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b8381101561103557818101518382015260200161101d565b50505050905090810190601f1680156110625780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b15801561108057600080fd5b505af4158015611094573d6000803e3d6000fd5b505050506040513d60208110156110aa57600080fd5b810190808051906020019092919050505060e060020a900492508a73__contracts/BytesDeserializer.sol:Byte__63d54dd8f9909160286040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b83811015611138578181015183820152602001611120565b50505050905090810190601f1680156111655780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b15801561118357600080fd5b505af4158015611197573d6000803e3d6000fd5b505050506040513d60208110156111ad57600080fd5b810190808051906020019092919050505060e060020a900491508a73__contracts/BytesDeserializer.sol:Byte__632e1eb7fe9091602c6040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b8381101561123b578181015183820152602001611223565b50505050905090810190601f1680156112685780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b15801561128657600080fd5b505af415801561129a573d6000803e3d6000fd5b505050506040513d60208110156112b057600080fd5b5051949b939a50919850965091945092505050565b600354600160a060020a031681565b600d5481565b600654600a54101590565b6005806112f0610938565b60078111156112fb57fe5b1461130557600080fd5b34151561131157600080fd5b600d54604080517f66098d4f00000000000000000000000000000000000000000000000000000000815260048101929092523460248301525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b15801561138557600080fd5b505af4158015611399573d6000803e3d6000fd5b505050506040513d60208110156113af57600080fd5b5051600d5550565b600054600160a060020a031633146113ce57600080fd5b601355565b600054600160a060020a031681565b600080600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561143857600080fd5b505af115801561144c573d6000803e3d6000fd5b505050506040513d602081101561146257600080fd5b5051604080517f1d3b9edf00000000000000000000000000000000000000000000000000000000815260048101879052600a9290920a602483018190529051909250849173__contracts/SafeMathLib.sol:SafeMathLi__91631d3b9edf91604480820192602092909190829003018186803b1580156114e257600080fd5b505af41580156114f6573d6000803e3d6000fd5b505050506040513d602081101561150c57600080fd5b505181151561151757fe5b04949350505050565b600554600160a060020a031681565b60116020526000908152604090205481565b600060145483111561155557506001611559565b5060005b949350505050565b6000600460009054906101000a9004600160a060020a0316600160a060020a03166382771c8e6040518163ffffffff1660e060020a028152600401602060405180830381600087803b1580156108fa57600080fd5b60075481565b600f5460ff1681565b60005474010000000000000000000000000000000000000000900460ff1681565b60145481565b60126020526000908152604090205460ff1681565b600054600160a060020a0316331461161857600080fd5b60005474010000000000000000000000000000000000000000900460ff16151561164157600080fd5b6000805474ff000000000000000000000000000000000000000019169055565b601454600a54101590565b600080600080600080600080600080600060149054906101000a900460ff1615151561169757600080fd5b60028e6040518082805190602001908083835b602083106116c95780518252601f1990920191602091820191016116aa565b51815160209384036101000a600019018019909216911617905260405191909301945091925050808303816000865af115801561170a573d6000803e3d6000fd5b5050506040513d602081101561171f57600080fd5b5051985061172c8e610da6565b97509750975097509750670de0b6b3a76400009250339150349050601560009054906101000a9004600160a060020a0316600160a060020a031660018a8f8f8f604051600081526020016040526040518085600019166000191681526020018460ff1660ff1681526020018360001916600019168152602001826000191660001916815260200194505050505060206040516020810390808403906000865af11580156117dd573d6000803e3d6000fd5b50505060206040510351600160a060020a03161415156117fc57600080fd5b6002611806610938565b600781111561181157fe5b141561184357600160a060020a03821660009081526012602052604090205460ff16151561183e57600080fd5b61185f565b600361184d610938565b600781111561185857fe5b1415610221575b600160a060020a038216600090815260106020526040902054151561188857600c805460010190555b600160a060020a0382166000908152601060209081526040918290205482517f66098d4f000000000000000000000000000000000000000000000000000000008152600481019190915260248101849052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561191357600080fd5b505af4158015611927573d6000803e3d6000fd5b505050506040513d602081101561193d57600080fd5b5051600160a060020a03831660009081526010602090815260409182902092909255600a5481517f66098d4f000000000000000000000000000000000000000000000000000000008152600481019190915260248101849052905173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f9260448082019391829003018186803b1580156119cf57600080fd5b505af41580156119e3573d6000803e3d6000fd5b505050506040513d60208110156119f957600080fd5b5051600a819055600954611a119183918d9190611541565b15611a1b57600080fd5b3360009081526010602052604090205461271063ffffffff88168502041115611a4357600080fd5b3360009081526010602052604090205461271063ffffffff87168502041015611a6b57600080fd5b600554604051600160a060020a039091169082156108fc029083906000818181858888f193505050501515611a9f57600080fd5b60408051600160a060020a0384168152602081018390528082018c90526fffffffffffffffffffffffffffffffff891660608201526080810186905290517fb926bd06586c265869c2a70eaf4affb7b7b778b25883b85a123262d056f79c019181900360a00190a15060009d9c50505050505050505050505050565b600c5481565b600054600160a060020a03163314611b3857600080fd5b600160a060020a038216600081815260126020908152604091829020805460ff191685151590811790915582519384529083015280517fa54714518c5d275fdcd3d2a461e4858e4e8cb04fb93cd0bca9d6d34115f264409281900390910190a15050565b600054600160a060020a03163314611bb357600080fd5b600160a060020a0381161515611bc857600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600054600160a060020a03163314611c4757600080fd5b600154600c541115611c5857600080fd5b6005805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600b5481565b600254600160a060020a0316815600a165627a7a7230582005a68f2f1a7bf395ecb708187dfec7408bc250900ba183e4401870cbdb2acf960029", "direct_dependencies": ["BytesDeserializer", "SafeMathLib"], "full_dependencies": ["BytesDeserializer", "SafeMathLib"], "linkrefs": [{"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 7664}, {"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 8168}, {"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 8712}, {"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 9230}, {"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 9748}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 6792}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 10520}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 11216}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 13370}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 13748}], "linkrefs_runtime": [{"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 7024}, {"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 7528}, {"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 8072}, {"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 8590}, {"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 9108}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 6152}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 9880}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 10576}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 12730}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 13108}], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": false, "inputs": [{"name": "newCap", "type": "uint256"}], "name": "setWeiCap", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "ownerTestValue", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_signerAddress", "type": "address"}], "name": "setSignerAddress", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "isPricingSane", "outputs": [{"name": "sane", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "endsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "minimumFundingGoal", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getState", "outputs": [{"name": "", "type": "uint8"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setFinalizeAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "investedAmountOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "finalizeAgent", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "weiRaised", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isCrowdsale", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "finalize", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_pricingStrategy", "type": "address"}], "name": "setPricingStrategy", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "tokensSold", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "refund", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "signerAddress", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "weiRefunded", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "halt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "time", "type": "uint256"}], "name": "setEndsAt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "dataframe", "type": "bytes"}], "name": "getKYCPayload", "outputs": [{"name": "whitelistedAddress", "type": "address"}, {"name": "customerId", "type": "uint128"}, {"name": "minEth", "type": "uint32"}, {"name": "maxEth", "type": "uint32"}, {"name": "pricingInfo", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "pricingStrategy", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "loadedRefund", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isMinimumGoalReached", "outputs": [{"name": "reached", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "loadRefund", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "val", "type": "uint256"}], "name": "setOwnerTestValue", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "weisTotal", "type": "uint256"}, {"name": "pricePerToken", "type": "uint256"}], "name": "calculateTokens", "outputs": [{"name": "tokensTotal", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "multisigWallet", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "tokenAmountOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "weiAmount", "type": "uint256"}, {"name": "tokenAmount", "type": "uint256"}, {"name": "weiRaisedTotal", "type": "uint256"}, {"name": "tokensSoldTotal", "type": "uint256"}], "name": "isBreakingCap", "outputs": [{"name": "limitBroken", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isFinalizerSane", "outputs": [{"name": "sane", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "startsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "finalized", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "halted", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "saleWeiCap", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "earlyParticipantWhitelist", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "unhalt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "isCrowdsaleFull", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "dataframe", "type": "bytes"}, {"name": "v", "type": "uint8"}, {"name": "r", "type": "bytes32"}, {"name": "s", "type": "bytes32"}], "name": "buyWithKYCData", "outputs": [{"name": "tokenAmount", "type": "uint256"}], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "investorCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "status", "type": "bool"}], "name": "setEarlyParicipantWhitelist", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setMultisig", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "presaleWeiRaised", "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": "_multisigWallet", "type": "address"}, {"name": "_start", "type": "uint256"}, {"name": "_end", "type": "uint256"}, {"name": "_saleWeiCap", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"payable": true, "stateMutability": "payable", "type": "fallback"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "signer", "type": "address"}], "name": "SignerChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}, {"indexed": false, "name": "tokenAmount", "type": "uint256"}, {"indexed": false, "name": "customerId", "type": "uint128"}, {"indexed": false, "name": "pricingInfo", "type": "uint256"}], "name": "Prepurchased", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newCap", "type": "uint256"}], "name": "CapUpdated", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}, {"indexed": false, "name": "tokenAmount", "type": "uint256"}, {"indexed": false, "name": "customerId", "type": "uint128"}], "name": "Invested", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}], "name": "Refund", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newRequireCustomerId", "type": "bool"}, {"indexed": false, "name": "newRequiredSignedAddress", "type": "bool"}, {"indexed": false, "name": "newSignerAddress", "type": "address"}], "name": "InvestmentPolicyChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "addr", "type": "address"}, {"indexed": false, "name": "status", "type": "bool"}], "name": "Whitelisted", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newEndsAt", "type": "uint256"}], "name": "EndsAtChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "devdoc": {"methods": {"calculateTokens(uint256,uint256)": {"details": "Calculate tokens user will have for their purchase", "params": {"pricePerToken": "What is the price for one token", "weisTotal": "How much ethers (in wei) the user putssssss in"}, "return": "tokensTotal which is received tokens, token decimals included"}, "isMinimumGoalReached()": {"return": "true if the crowdsale has raised enough money to be a successful."}, "setPricingStrategy(address)": {"details": "Because we do not have token price set in presale, we do nothing. This will be removed in the future versions."}, "setSignerAddress(address)": {"details": "This function can set the server side address", "params": {"_signerAddress": "The address derived from server's private key"}}, "transferOwnership(address)": {"details": "Allows the current owner to transfer control of the contract to a newOwner.", "params": {"newOwner": "The address to transfer ownership to."}}}}, "userdoc": {"methods": {"buyWithKYCData(bytes,uint8,bytes32,bytes32)": {"notice": "A token purchase with anti-money laundering * \u00a9return tokenAmount How many tokens where bought"}, "finalize()": {"notice": "Finalize a succcesful crowdsale. * The owner can triggre a call the contract that provides post-crowdsale actions, like releasing the tokens."}, "getKYCPayload(bytes)": {"notice": "Same as above, but with pricing information included in the payload as the last integer.In a long run, deprecate the legacy methods above and only use this payload."}, "getState()": {"notice": "Presale state machine management. * Presale cannot fail; it is running until manually ended. "}, "isBreakingCap(uint256,uint256,uint256,uint256)": {"notice": "Called from invest() to confirm if the curret investment does not break our cap rule."}, "isCrowdsale()": {"notice": "Interface marker. "}, "isCrowdsaleFull()": {"notice": "We are sold out when our approve pool becomes empty."}, "isFinalizerSane()": {"notice": "Check if the contract relationship looks good."}, "isPricingSane()": {"notice": "Check if the contract relationship looks good."}, "loadRefund()": {"notice": "Allow load refunds back on the contract for the refunding. * The team can transfer the funds back on the smart contract in the case the minimum goal was not reached.."}, "refund()": {"notice": "Investors can claim refund. * Note that any refunds from proxy buyers should be handled separately, and not through this contract."}, "setEarlyParicipantWhitelist(address,bool)": {"notice": "Allow addresses to do early participation. * TODO: Fix spelling error in the name"}, "setEndsAt(uint256)": {"notice": "Allow crowdsale owner to close early or extend the crowdsale. * This is useful e.g. for a manual soft cap implementation: - after X amount is reached determine manual closing * This may put the crowdsale to an invalid state, but we trust owners know what they are doing. "}, "setFinalizeAgent(address)": {"notice": "Allow to (re)set finalize agent. * Design choice: no state restrictions on setting this, so that we can fix fat finger mistakes."}, "setMultisig(address)": {"notice": "Allow to change the team multisig address in the case of emergency. * This allows to save a deployed crowdsale wallet in the case the crowdsale has not yet begun (we have done only few test transactions). After the crowdsale is going then multisig address stays locked for the safety reasons."}, "setOwnerTestValue(uint256)": {"notice": "This is for manual testing of multisig wallet interaction "}, "setPricingStrategy(address)": {"notice": "Allow to (re)set pricing strategy."}, "setWeiCap(uint256)": {"notice": "Allow owner to adjust the cap during the presale. * This allows e.g. US dollar pegged caps."}}}}, "settings": {"compilationTarget": {"contracts/KYCPresale.sol": "KYCPresale"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/BytesDeserializer.sol": {"keccak256": "0xdd1718e5ea778d4dd36ccb98336360536beffdffd152bd9fb035124835fa4765", "urls": ["bzzr://ee94acd8149a77baf3f6881b995d1e9eba68c3225b2fe666dc0d402e0b68c5ce"]}, "contracts/CrowdsaleBase.sol": {"keccak256": "0xe2c9ed11183ce705616980df7b02544d72fe18b40395da7d9d4bcb621fb87871", "urls": ["bzzr://07f3887ba0d0eb3248b1ad3581480ed71a2fe70a47dcc283c4e97c8c92e0790a"]}, "contracts/FinalizeAgent.sol": {"keccak256": "0x309fd0510e0b3e2b5044e33f7c80cfb2d6f2a5697e41a5f185931d65770cfea9", "urls": ["bzzr://4e7ed6f82c0f542e92e56c12566b2ecd7666730865bf12566c27587ec64160ac"]}, "contracts/FractionalERC20.sol": {"keccak256": "0x75bc4ad90a8b13ce961c89b1bf405776f616e019d3a2720168f8e52be223198f", "urls": ["bzzr://6a3688f12da1a5c890ef06f80f883f6c5370886092d38a1b33cd4219b718478b"]}, "contracts/Haltable.sol": {"keccak256": "0x265dcf25e7c9ab4b6eecd2181f1b71334a1b5381a60f8db7d9526dab120f4b70", "urls": ["bzzr://d522e00fa9e075941469dd81738b59fdb99ce3c12cdc39e33abe40b588c4da9b"]}, "contracts/KYCPayloadDeserializer.sol": {"keccak256": "0x4dbf491aa75393638028f16bedbc395bbec6beb6721ed5d569a18da089faf182", "urls": ["bzzr://a9b13fd13eda2199df6497108c1a0313d1ce91366a48f8650d647a0d86c43c6c"]}, "contracts/KYCPresale.sol": {"keccak256": "0xe12e36f3f688289c03bf0a98f7e90162687eb2278463e0eb9b0a90384c2ff2eb", "urls": ["bzzr://fc823c4e1ffc92d3c021b16fae52154bd20e721c4eecba804d4bcd2dd6469086"]}, "contracts/PricingStrategy.sol": {"keccak256": "0x8df5093b7d07168ad994f9176de0bd2268f6563b1e8a3a448d8cfe7fe246c628", "urls": ["bzzr://ef5c944d51f739ab34e2c951d6ac82a7152e6bb844058a8e57bae52c14cbe16b"]}, "contracts/SafeMathLib.sol": {"keccak256": "0x501bfe31e274b9a5591f7c540bdced4d4312e27d4f19599147c9bbca3d9c6b18", "urls": ["bzzr://a80935ebddb06c247d71372d4e5833ee029f08633bd0fe4a274a57009567e5b9"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}}, "version": 1}, "name": "KYCPresale", "ordered_full_dependencies": ["BytesDeserializer", "SafeMathLib"], "source_path": "contracts/KYCPresale.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n/*\n * Haltable\n *\n * Abstract contract that allows children to implement an\n * emergency stop mechanism. Differs from Pausable by causing a throw when in halt mode.\n *\n *\n * Originally envisioned in FirstBlood ICO contract.\n */\ncontract Haltable is Ownable {\n bool public halted;\n\n modifier stopInEmergency {\n if (halted) throw;\n _;\n }\n\n modifier stopNonOwnersInEmergency {\n if (halted && msg.sender != owner) throw;\n _;\n }\n\n modifier onlyInEmergency {\n if (!halted) throw;\n _;\n }\n\n // called by the owner on emergency, triggers stopped state\n function halt() external onlyOwner {\n halted = true;\n }\n\n // called by the owner on end of emergency, returns to normal state\n function unhalt() external onlyOwner onlyInEmergency {\n halted = false;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Safe unsigned safe math.\n *\n * https://blog.aragon.one/library-driven-development-in-solidity-2bebcaf88736#.750gwtwli\n *\n * Originally from https://raw.githubusercontent.com/AragonOne/zeppelin-solidity/master/contracts/SafeMathLib.sol\n *\n * Maintained here until merged to mainline zeppelin-solidity.\n *\n */\nlibrary SafeMathLib {\n\n function times(uint a, uint b) returns (uint) {\n uint c = a * b;\n assert(a == 0 || c / a == b);\n return c;\n }\n\n function minus(uint a, uint b) returns (uint) {\n assert(b <= a);\n return a - b;\n }\n\n function plus(uint a, uint b) returns (uint) {\n uint c = a + b;\n assert(c>=a);\n return c;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n\n/**\n * A token that defines fractional units as decimals.\n */\ncontract FractionalERC20 is ERC20 {\n\n uint public decimals;\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Interface for defining crowdsale pricing.\n */\ncontract PricingStrategy {\n\n /** Interface declaration. */\n function isPricingStrategy() public constant returns (bool) {\n return true;\n }\n\n /** Self check if all references are correctly set.\n *\n * Checks that pricing strategy matches crowdsale parameters.\n */\n function isSane(address crowdsale) public constant returns (bool) {\n return true;\n }\n\n /**\n * @dev Pricing tells if this is a presale purchase or not.\n @param purchaser Address of the purchaser\n @return False by default, true if a presale purchaser\n */\n function isPresalePurchase(address purchaser) public constant returns (bool) {\n return false;\n }\n\n /**\n * When somebody tries to buy tokens for X eth, calculate how many tokens they get.\n *\n *\n * @param value - What is the value of the transaction send in as wei\n * @param tokensSold - how much tokens have been sold this far\n * @param weiRaised - how much money has been raised this far in the main token sale - this number excludes presale\n * @param msgSender - who is the investor of this transaction\n * @param decimals - how many decimal units the token has\n * @return Amount of tokens the investor receives\n */\n function calculatePrice(uint value, uint weiRaised, uint tokensSold, address msgSender, uint decimals) public constant returns (uint tokenAmount);\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Finalize agent defines what happens at the end of succeseful crowdsale.\n *\n * - Allocate tokens for founders, bounties and community\n * - Make tokens transferable\n * - etc.\n */\ncontract FinalizeAgent {\n\n function isFinalizeAgent() public constant returns(bool) {\n return true;\n }\n\n /** Return true if we can run finalizeCrowdsale() properly.\n *\n * This is a safety check function that doesn't allow crowdsale to begin\n * unless the finalizer has been set up properly.\n */\n function isSane() public constant returns (bool);\n\n /** Called once by crowdsale finalize() if the sale was success. */\n function finalizeCrowdsale();\n\n}\n\n\n\n/**\n * Crowdsale state machine without buy functionality.\n *\n * Implements basic state machine logic, but leaves out all buy functions,\n * so that subclasses can implement their own buying logic.\n *\n *\n * For the default buy() implementation see Crowdsale.sol.\n */\ncontract CrowdsaleBase is Haltable {\n\n /* Max investment count when we are still allowed to change the multisig address */\n uint public MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE = 5;\n\n using SafeMathLib for uint;\n\n /* The token we are selling */\n FractionalERC20 public token;\n\n /* How we are going to price our offering */\n PricingStrategy public pricingStrategy;\n\n /* Post-success callback */\n FinalizeAgent public finalizeAgent;\n\n /* tokens will be transfered from this address */\n address public multisigWallet;\n\n /* if the funding goal is not reached, investors may withdraw their funds */\n uint public minimumFundingGoal;\n\n /* the UNIX timestamp start date of the crowdsale */\n uint public startsAt;\n\n /* the UNIX timestamp end date of the crowdsale */\n uint public endsAt;\n\n /* the number of tokens already sold through this contract*/\n uint public tokensSold = 0;\n\n /* How many wei of funding we have raised */\n uint public weiRaised = 0;\n\n /* Calculate incoming funds from presale contracts and addresses */\n uint public presaleWeiRaised = 0;\n\n /* How many distinct addresses have invested */\n uint public investorCount = 0;\n\n /* How much wei we have returned back to the contract after a failed crowdfund. */\n uint public loadedRefund = 0;\n\n /* How much wei we have given back to investors.*/\n uint public weiRefunded = 0;\n\n /* Has this crowdsale been finalized */\n bool public finalized;\n\n /** How much ETH each address has invested to this crowdsale */\n mapping (address => uint256) public investedAmountOf;\n\n /** How much tokens this crowdsale has credited for each investor address */\n mapping (address => uint256) public tokenAmountOf;\n\n /** Addresses that are allowed to invest even before ICO offical opens. For testing, for ICO partners, etc. */\n mapping (address => bool) public earlyParticipantWhitelist;\n\n /** This is for manul testing for the interaction from owner wallet. You can set it to any value and inspect this in blockchain explorer to see that crowdsale interaction works. */\n uint public ownerTestValue;\n\n /** State machine\n *\n * - Preparing: All contract initialization calls and variables have not been set yet\n * - Prefunding: We have not passed start time yet\n * - Funding: Active crowdsale\n * - Success: Minimum funding goal reached\n * - Failure: Minimum funding goal not reached before ending time\n * - Finalized: The finalized has been called and succesfully executed\n * - Refunding: Refunds are loaded on the contract for reclaim.\n */\n enum State{Unknown, Preparing, PreFunding, Funding, Success, Failure, Finalized, Refunding}\n\n // A new investment was made\n event Invested(address investor, uint weiAmount, uint tokenAmount, uint128 customerId);\n\n // Refund was processed for a contributor\n event Refund(address investor, uint weiAmount);\n\n // The rules were changed what kind of investments we accept\n event InvestmentPolicyChanged(bool newRequireCustomerId, bool newRequiredSignedAddress, address newSignerAddress);\n\n // Address early participation whitelist status changed\n event Whitelisted(address addr, bool status);\n\n // Crowdsale end time has been changed\n event EndsAtChanged(uint newEndsAt);\n\n function CrowdsaleBase(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal) {\n\n owner = msg.sender;\n\n token = FractionalERC20(_token);\n setPricingStrategy(_pricingStrategy);\n\n multisigWallet = _multisigWallet;\n if(multisigWallet == 0) {\n throw;\n }\n\n if(_start == 0) {\n throw;\n }\n\n startsAt = _start;\n\n if(_end == 0) {\n throw;\n }\n\n endsAt = _end;\n\n // Don't mess the dates\n if(startsAt >= endsAt) {\n throw;\n }\n\n // Minimum funding goal can be zero\n minimumFundingGoal = _minimumFundingGoal;\n }\n\n /**\n * Don't expect to just send in money and get tokens.\n */\n function() payable {\n throw;\n }\n\n /**\n * @dev Make an investment.\n *\n * Crowdsale must be running for one to invest.\n * We must have not pressed the emergency brake.\n *\n * @param receiver The Ethereum address who receives the tokens\n * @param customerId (optional) UUID v4 to track the successful payments on the server side'\n * @param tokenAmount Amount of tokens which be credited to receiver\n *\n * @return tokensBought How mony tokens were bought\n */\n function buyTokens(address receiver, uint128 customerId, uint256 tokenAmount) stopInEmergency internal returns(uint tokensBought) {\n\n // Determine if it's a good time to accept investment from this participant\n if(getState() == State.PreFunding) {\n // Are we whitelisted for early deposit\n if(!earlyParticipantWhitelist[receiver]) {\n throw;\n }\n } else if(getState() == State.Funding) {\n // Retail participants can only come in when the crowdsale is running\n // pass\n } else {\n // Unwanted state\n throw;\n }\n\n uint weiAmount = msg.value;\n\n // Dust transaction\n require(tokenAmount != 0);\n\n if(investedAmountOf[receiver] == 0) {\n // A new investor\n investorCount++;\n }\n\n // Update investor\n investedAmountOf[receiver] = investedAmountOf[receiver].plus(weiAmount);\n tokenAmountOf[receiver] = tokenAmountOf[receiver].plus(tokenAmount);\n\n // Update totals\n weiRaised = weiRaised.plus(weiAmount);\n tokensSold = tokensSold.plus(tokenAmount);\n\n if(pricingStrategy.isPresalePurchase(receiver)) {\n presaleWeiRaised = presaleWeiRaised.plus(weiAmount);\n }\n\n // Check that we did not bust the cap\n require(!isBreakingCap(weiAmount, tokenAmount, weiRaised, tokensSold));\n\n assignTokens(receiver, tokenAmount);\n\n // Pocket the money, or fail the crowdsale if we for some reason cannot send the money to our multisig\n if(!multisigWallet.send(weiAmount)) throw;\n\n // Tell us invest was success\n Invested(receiver, weiAmount, tokenAmount, customerId);\n\n return tokenAmount;\n }\n\n /**\n * @dev Make an investment based on pricing strategy\n *\n * This is a wrapper for buyTokens(), but the amount of tokens receiver will\n * have depends on the pricing strategy used.\n *\n * @param receiver The Ethereum address who receives the tokens\n * @param customerId (optional) UUID v4 to track the successful payments on the server side'\n *\n * @return tokensBought How mony tokens were bought\n */\n function investInternal(address receiver, uint128 customerId) stopInEmergency internal returns(uint tokensBought) {\n return buyTokens(receiver, customerId, pricingStrategy.calculatePrice(msg.value, weiRaised - presaleWeiRaised, tokensSold, msg.sender, token.decimals()));\n }\n\n /**\n * @dev Calculate tokens user will have for their purchase\n *\n * @param weisTotal How much ethers (in wei) the user putssssss in\n * @param pricePerToken What is the price for one token\n *\n * @return tokensTotal which is received tokens, token decimals included\n */\n function calculateTokens(uint256 weisTotal, uint256 pricePerToken) public constant returns(uint tokensTotal) {\n // pricePerToken is how many full tokens, token decimal place included, you get for wei amount.\n // Because, in theory, decimal amount can vary, we do the exponent calculation here,\n // though gas wise using 10**18 constant would be much simpler.\n // Furthermore we could use rough amounts and take in raw wei per tokens amount,\n // but we lose too much accuracy for generic calculations, thus all these are\n // practically implemented as 10**18 fixed points.\n uint multiplier = 10 ** token.decimals();\n return weisTotal.times(multiplier)/pricePerToken;\n }\n\n /**\n * Finalize a succcesful crowdsale.\n *\n * The owner can triggre a call the contract that provides post-crowdsale actions, like releasing the tokens.\n */\n function finalize() public inState(State.Success) onlyOwner stopInEmergency {\n\n // Already finalized\n if(finalized) {\n throw;\n }\n\n // Finalizing is optional. We only call it if we are given a finalizing agent.\n if(address(finalizeAgent) != 0) {\n finalizeAgent.finalizeCrowdsale();\n }\n\n finalized = true;\n }\n\n /**\n * Allow to (re)set finalize agent.\n *\n * Design choice: no state restrictions on setting this, so that we can fix fat finger mistakes.\n */\n function setFinalizeAgent(FinalizeAgent addr) onlyOwner {\n finalizeAgent = addr;\n\n // Don't allow setting bad agent\n if(!finalizeAgent.isFinalizeAgent()) {\n throw;\n }\n }\n\n /**\n * Allow crowdsale owner to close early or extend the crowdsale.\n *\n * This is useful e.g. for a manual soft cap implementation:\n * - after X amount is reached determine manual closing\n *\n * This may put the crowdsale to an invalid state,\n * but we trust owners know what they are doing.\n *\n */\n function setEndsAt(uint time) onlyOwner {\n\n if(now > time) {\n throw; // Don't change past\n }\n\n if(startsAt > time) {\n throw; // Prevent human mistakes\n }\n\n endsAt = time;\n EndsAtChanged(endsAt);\n }\n\n /**\n * Allow to (re)set pricing strategy.\n *\n * Design choice: no state restrictions on the set, so that we can fix fat finger mistakes.\n */\n function setPricingStrategy(PricingStrategy _pricingStrategy) onlyOwner {\n pricingStrategy = _pricingStrategy;\n\n // Don't allow setting bad agent\n if(!pricingStrategy.isPricingStrategy()) {\n throw;\n }\n }\n\n /**\n * Allow to change the team multisig address in the case of emergency.\n *\n * This allows to save a deployed crowdsale wallet in the case the crowdsale has not yet begun\n * (we have done only few test transactions). After the crowdsale is going\n * then multisig address stays locked for the safety reasons.\n */\n function setMultisig(address addr) public onlyOwner {\n\n // Change\n if(investorCount > MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE) {\n throw;\n }\n\n multisigWallet = addr;\n }\n\n /**\n * Allow load refunds back on the contract for the refunding.\n *\n * The team can transfer the funds back on the smart contract in the case the minimum goal was not reached..\n */\n function loadRefund() public payable inState(State.Failure) {\n if(msg.value == 0) throw;\n loadedRefund = loadedRefund.plus(msg.value);\n }\n\n /**\n * Investors can claim refund.\n *\n * Note that any refunds from proxy buyers should be handled separately,\n * and not through this contract.\n */\n function refund() public inState(State.Refunding) {\n uint256 weiValue = investedAmountOf[msg.sender];\n if (weiValue == 0) throw;\n investedAmountOf[msg.sender] = 0;\n weiRefunded = weiRefunded.plus(weiValue);\n Refund(msg.sender, weiValue);\n if (!msg.sender.send(weiValue)) throw;\n }\n\n /**\n * @return true if the crowdsale has raised enough money to be a successful.\n */\n function isMinimumGoalReached() public constant returns (bool reached) {\n return weiRaised >= minimumFundingGoal;\n }\n\n /**\n * Check if the contract relationship looks good.\n */\n function isFinalizerSane() public constant returns (bool sane) {\n return finalizeAgent.isSane();\n }\n\n /**\n * Check if the contract relationship looks good.\n */\n function isPricingSane() public constant returns (bool sane) {\n return pricingStrategy.isSane(address(this));\n }\n\n /**\n * Crowdfund state machine management.\n *\n * We make it a function and do not assign the result to a variable, so there is no chance of the variable being stale.\n */\n function getState() public constant returns (State) {\n if(finalized) return State.Finalized;\n else if (address(finalizeAgent) == 0) return State.Preparing;\n else if (!finalizeAgent.isSane()) return State.Preparing;\n else if (!pricingStrategy.isSane(address(this))) return State.Preparing;\n else if (block.timestamp < startsAt) return State.PreFunding;\n else if (block.timestamp <= endsAt && !isCrowdsaleFull()) return State.Funding;\n else if (isMinimumGoalReached()) return State.Success;\n else if (!isMinimumGoalReached() && weiRaised > 0 && loadedRefund >= weiRaised) return State.Refunding;\n else return State.Failure;\n }\n\n /** This is for manual testing of multisig wallet interaction */\n function setOwnerTestValue(uint val) onlyOwner {\n ownerTestValue = val;\n }\n\n /**\n * Allow addresses to do early participation.\n *\n * TODO: Fix spelling error in the name\n */\n function setEarlyParicipantWhitelist(address addr, bool status) onlyOwner {\n earlyParticipantWhitelist[addr] = status;\n Whitelisted(addr, status);\n }\n\n\n /** Interface marker. */\n function isCrowdsale() public constant returns (bool) {\n return true;\n }\n\n //\n // Modifiers\n //\n\n /** Modified allowing execution only if the crowdsale is currently running. */\n modifier inState(State state) {\n if(getState() != state) throw;\n _;\n }\n\n\n //\n // Abstract functions\n //\n\n /**\n * Check if the current invested breaks our cap rules.\n *\n *\n * The child contract must define their own cap setting rules.\n * We allow a lot of flexibility through different capping strategies (ETH, token count)\n * Called from invest().\n *\n * @param weiAmount The amount of wei the investor tries to invest in the current transaction\n * @param tokenAmount The amount of tokens we try to give to the investor in the current transaction\n * @param weiRaisedTotal What would be our total raised balance after this transaction\n * @param tokensSoldTotal What would be our total sold tokens count after this transaction\n *\n * @return true if taking this investment would break our cap rules\n */\n function isBreakingCap(uint weiAmount, uint tokenAmount, uint weiRaisedTotal, uint tokensSoldTotal) constant returns (bool limitBroken);\n\n /**\n * Check if the current crowdsale is full and we can no longer sell any tokens.\n */\n function isCrowdsaleFull() public constant returns (bool);\n\n /**\n * Create new tokens or transfer issued tokens to the investor depending on the cap model.\n */\n function assignTokens(address receiver, uint tokenAmount) internal;\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n/**\n * Deserialize bytes payloads.\n *\n * Values are in big-endian byte order.\n *\n */\nlibrary BytesDeserializer {\n\n /**\n * Extract 256-bit worth of data from the bytes stream.\n */\n function slice32(bytes b, uint offset) constant returns (bytes32) {\n bytes32 out;\n\n for (uint i = 0; i < 32; i++) {\n out |= bytes32(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n /**\n * Extract Ethereum address worth of data from the bytes stream.\n */\n function sliceAddress(bytes b, uint offset) constant returns (address) {\n bytes32 out;\n\n for (uint i = 0; i < 20; i++) {\n out |= bytes32(b[offset + i] & 0xFF) >> ((i+12) * 8);\n }\n return address(uint(out));\n }\n\n /**\n * Extract 128-bit worth of data from the bytes stream.\n */\n function slice16(bytes b, uint offset) constant returns (bytes16) {\n bytes16 out;\n\n for (uint i = 0; i < 16; i++) {\n out |= bytes16(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n /**\n * Extract 32-bit worth of data from the bytes stream.\n */\n function slice4(bytes b, uint offset) constant returns (bytes4) {\n bytes4 out;\n\n for (uint i = 0; i < 4; i++) {\n out |= bytes4(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n /**\n * Extract 16-bit worth of data from the bytes stream.\n */\n function slice2(bytes b, uint offset) constant returns (bytes2) {\n bytes2 out;\n\n for (uint i = 0; i < 2; i++) {\n out |= bytes2(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n\n\n}\n\n\n/**\n * A mix-in contract to decode different signed KYC payloads.\n *\n * @notice This should be a library, but for the complexity and toolchain fragility risks involving of linking library inside library, we currently use this as a helper method mix-in.\n */\ncontract KYCPayloadDeserializer {\n\n using BytesDeserializer for bytes;\n\n // @notice this struct describes what kind of data we include in the payload, we do not use this directly\n // The bytes payload set on the server side\n // total 56 bytes\n struct KYCPayload {\n\n /** Customer whitelisted address where the deposit can come from */\n address whitelistedAddress; // 20 bytes\n\n /** Customer id, UUID v4 */\n uint128 customerId; // 16 bytes\n\n /**\n * Min amount this customer needs to invest in ETH. Set zero if no minimum. Expressed as parts of 10000. 1 ETH = 10000.\n * @notice Decided to use 32-bit words to make the copy-pasted Data field for the ICO transaction less lenghty.\n */\n uint32 minETH; // 4 bytes\n\n /** Max amount this customer can to invest in ETH. Set zero if no maximum. Expressed as parts of 10000. 1 ETH = 10000. */\n uint32 maxETH; // 4 bytes\n\n /**\n * Information about the price promised for this participant. It can be pricing tier id or directly one token price in weis.\n * @notice This is a later addition and not supported in all scenarios yet.\n */\n uint256 pricingInfo;\n }\n\n\n /**\n * Same as above, but with pricing information included in the payload as the last integer.\n *\n * @notice In a long run, deprecate the legacy methods above and only use this payload.\n */\n function getKYCPayload(bytes dataframe) public constant returns(address whitelistedAddress, uint128 customerId, uint32 minEth, uint32 maxEth, uint256 pricingInfo) {\n address _whitelistedAddress = dataframe.sliceAddress(0);\n uint128 _customerId = uint128(dataframe.slice16(20));\n uint32 _minETH = uint32(dataframe.slice4(36));\n uint32 _maxETH = uint32(dataframe.slice4(40));\n uint256 _pricingInfo = uint256(dataframe.slice32(44));\n return (_whitelistedAddress, _customerId, _minETH, _maxETH, _pricingInfo);\n }\n\n}\n\n\n/**\n * A presale smart contract that collects money from SAFT/SAFTE agreed buyers.\n *\n * Presale contract where we collect money for the token that does not exist yet.\n * The same KYC rules apply as in KYCCrowdsale. No tokens are issued in this point,\n * but they are delivered to the buyers after the token sale is over.\n *\n */\ncontract KYCPresale is CrowdsaleBase, KYCPayloadDeserializer {\n\n /** The cap of this presale contract in wei */\n uint256 public saleWeiCap;\n\n /** Server holds the private key to this address to decide if the AML payload is valid or not. */\n address public signerAddress;\n\n /** A new server-side signer key was set to be effective */\n event SignerChanged(address signer);\n\n /** An user made a prepurchase through KYC'ed interface. The money has been moved to the token sale multisig wallet. The buyer will receive their tokens in an airdrop after the token sale is over. */\n event Prepurchased(address investor, uint weiAmount, uint tokenAmount, uint128 customerId, uint256 pricingInfo);\n\n /** The owner changes the presale ETH cap during the sale */\n event CapUpdated(uint256 newCap);\n\n /**\n * Constructor.\n *\n * Presale does not know about token or pricing strategy, as they will be only available during the future airdrop.\n *\n * @dev The parent contract has some unnecessary variables for our use case. For this round of development, we chose to use null value for token and pricing strategy. In the future versions have a parent sale contract that does not assume an existing token.\n */\n function KYCPresale(address _multisigWallet, uint _start, uint _end, uint _saleWeiCap) CrowdsaleBase(FractionalERC20(address(1)), PricingStrategy(address(0)), _multisigWallet, _start, _end, 0) {\n saleWeiCap = _saleWeiCap;\n }\n\n /**\n * A token purchase with anti-money laundering\n *\n * \u00a9return tokenAmount How many tokens where bought\n */\n function buyWithKYCData(bytes dataframe, uint8 v, bytes32 r, bytes32 s) public payable returns(uint tokenAmount) {\n\n // Presale ended / emergency abort\n require(!halted);\n\n bytes32 hash = sha256(dataframe);\n var (whitelistedAddress, customerId, minETH, maxETH, pricingInfo) = getKYCPayload(dataframe);\n uint multiplier = 10 ** 18;\n address receiver = msg.sender;\n uint weiAmount = msg.value;\n\n // The payload was created by token sale server\n require(ecrecover(hash, v, r, s) == signerAddress);\n\n // Determine if it's a good time to accept investment from this participant\n if(getState() == State.PreFunding) {\n // Are we whitelisted for early deposit\n require(earlyParticipantWhitelist[receiver]);\n } else if(getState() == State.Funding) {\n // Retail participants can only come in when the crowdsale is running\n // pass\n } else {\n // Unwanted state\n revert();\n }\n\n if(investedAmountOf[receiver] == 0) {\n // A new investor\n investorCount++;\n }\n\n // Update per investor amount\n investedAmountOf[receiver] = investedAmountOf[receiver].plus(weiAmount);\n\n // Update totals\n weiRaised = weiRaised.plus(weiAmount);\n\n // Check that we did not bust the cap\n require(!isBreakingCap(weiAmount, tokenAmount, weiRaised, tokensSold));\n\n require(investedAmountOf[msg.sender] >= minETH * multiplier / 10000);\n require(investedAmountOf[msg.sender] <= maxETH * multiplier / 10000);\n\n // Pocket the money, or fail the crowdsale if we for some reason cannot send the money to our multisig\n require(multisigWallet.send(weiAmount));\n\n // Tell us invest was success\n Prepurchased(receiver, weiAmount, tokenAmount, customerId, pricingInfo);\n\n return 0; // In presale we do not issue actual tokens tyet\n }\n\n /// @dev This function can set the server side address\n /// @param _signerAddress The address derived from server's private key\n function setSignerAddress(address _signerAddress) onlyOwner {\n signerAddress = _signerAddress;\n SignerChanged(signerAddress);\n }\n\n /**\n * Called from invest() to confirm if the curret investment does not break our cap rule.\n */\n function isBreakingCap(uint weiAmount, uint tokenAmount, uint weiRaisedTotal, uint tokensSoldTotal) constant returns (bool limitBroken) {\n if(weiRaisedTotal > saleWeiCap) {\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * We are sold out when our approve pool becomes empty.\n */\n function isCrowdsaleFull() public constant returns (bool) {\n return weiRaised >= saleWeiCap;\n }\n\n /**\n * Allow owner to adjust the cap during the presale.\n *\n * This allows e.g. US dollar pegged caps.\n */\n function setWeiCap(uint newCap) public onlyOwner {\n saleWeiCap = newCap;\n CapUpdated(newCap);\n }\n\n /**\n * Because this is a presale, we do not issue any tokens yet.\n *\n * @dev Have this taken away from the parent contract?\n */\n function assignTokens(address receiver, uint tokenAmount) internal {\n revert();\n }\n\n /**\n * Allow to (re)set pricing strategy.\n *\n * @dev Because we do not have token price set in presale, we do nothing. This will be removed in the future versions.\n */\n function setPricingStrategy(PricingStrategy _pricingStrategy) onlyOwner {\n }\n\n /**\n * Presale state machine management.\n *\n * Presale cannot fail; it is running until manually ended.\n *\n */\n function getState() public constant returns (State) {\n if (block.timestamp < startsAt) {\n return State.PreFunding;\n } else {\n return State.Funding;\n }\n }\n\n}\n"}, "MilestonePricing": {"abi": [{"constant": true, "inputs": [], "name": "isPricingStrategy", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "milestoneCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "value", "type": "uint256"}, {"name": "weiRaised", "type": "uint256"}, {"name": "tokensSold", "type": "uint256"}, {"name": "msgSender", "type": "address"}, {"name": "decimals", "type": "uint256"}], "name": "calculatePrice", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "n", "type": "uint256"}], "name": "getMilestone", "outputs": [{"name": "", "type": "uint256"}, {"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getPricingStartsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getPricingEndsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "_crowdsale", "type": "address"}], "name": "isSane", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "MAX_MILESTONE", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "preicoAddress", "type": "address"}, {"name": "pricePerToken", "type": "uint256"}], "name": "setPreicoAddress", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "uint256"}], "name": "milestones", "outputs": [{"name": "time", "type": "uint256"}, {"name": "price", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getCurrentPrice", "outputs": [{"name": "result", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "purchaser", "type": "address"}], "name": "isPresalePurchase", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "preicoAddresses", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [{"name": "_milestones", "type": "uint256[]"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"payable": true, "stateMutability": "payable", "type": "fallback"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "bytecode": "0x608060405234801561001057600080fd5b506040516109ce3803806109ce83398101604052805160008054600160a060020a03191633178155910180519091908190600290066001148061005557508251601411155b1561005f57600080fd5b50508051600290046016556000805b82516002900481101561012c57828160020281518110151561008c57fe5b60209081029091010151600282600a81106100a357fe5b600202016000018190555082816002026001018151811015156100c257fe5b60209081029091010151600282600a81106100d957fe5b600202016001018190555081600014158015610106575081600282600a81106100fe57fe5b600202015411155b1561011057600080fd5b600281600a811061011d57fe5b6002020154915060010161006e565b60165460029060001901600a811061014057fe5b6002020160010154600014151561015657600080fd5b505050610866806101686000396000f3006080604052600436106100da5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166304bbc25581146100df5780630681ca551461010857806318a4155e1461012f5780632442e1cb1461015c5780632c9a0a951461018d5780636f079f90146101a25780638da5cb5b146101b75780638e768288146101e857806396821fc114610209578063e474f97a1461021e578063e89e4ed614610244578063eb91d37e1461025c578063f14ae17d14610271578063f1ef9a0814610292578063f2fde38b146102b3575b600080fd5b3480156100eb57600080fd5b506100f46102d4565b604080519115158252519081900360200190f35b34801561011457600080fd5b5061011d6102d9565b60408051918252519081900360200190f35b34801561013b57600080fd5b5061011d600435602435604435600160a060020a03606435166084356102df565b34801561016857600080fd5b50610174600435610492565b6040805192835260208301919091528051918290030190f35b34801561019957600080fd5b5061011d6104ca565b3480156101ae57600080fd5b5061011d6104da565b3480156101c357600080fd5b506101cc6104e4565b60408051600160a060020a039092168252519081900360200190f35b3480156101f457600080fd5b506100f4600160a060020a03600435166104f3565b34801561021557600080fd5b5061011d61061d565b34801561022a57600080fd5b50610242600160a060020a0360043516602435610622565b005b34801561025057600080fd5b50610174600435610655565b34801561026857600080fd5b5061011d610674565b34801561027d57600080fd5b506100f4600160a060020a0360043516610687565b34801561029e57600080fd5b5061011d600160a060020a03600435166106b8565b3480156102bf57600080fd5b50610242600160a060020a03600435166106ca565b600190565b60165481565b600160a060020a038216600090815260016020526040812054600a83900a9082908110156103ce57600160a060020a0385166000908152600160209081526040918290205482517f1d3b9edf000000000000000000000000000000000000000000000000000000008152600481018c9052602481018690529251909273__contracts/SafeMathLib.sol:SafeMathLi__92631d3b9edf92604480840193829003018186803b15801561039157600080fd5b505af41580156103a5573d6000803e3d6000fd5b505050506040513d60208110156103bb57600080fd5b50518115156103c657fe5b049250610487565b6103d6610674565b9050808873__contracts/SafeMathLib.sol:SafeMathLi__631d3b9edf9091856040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b15801561044e57600080fd5b505af4158015610462573d6000803e3d6000fd5b505050506040513d602081101561047857600080fd5b505181151561048357fe5b0492505b505095945050505050565b600080600283600a81106104a257fe5b6002020160000154600284600a811015156104b957fe5b600202016001015491509150915091565b60006104d461075e565b51905090565b60006104d4610793565b600054600160a060020a031681565b6000816104fe6104ca565b81600160a060020a031663af4686826040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561055557600080fd5b505af1158015610569573d6000803e3d6000fd5b505050506040513d602081101561057f57600080fd5b505114801561061657506105916104da565b81600160a060020a0316630a09284a6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156105e857600080fd5b505af11580156105fc573d6000803e3d6000fd5b505050506040513d602081101561061257600080fd5b5051145b9392505050565b600a81565b600054600160a060020a0316331461063957600080fd5b600160a060020a03909116600090815260016020526040902055565b600281600a811061066257fe5b60020201805460019091015490915082565b600061067e6107af565b60200151905090565b600160a060020a0381166000908152600160205260408120548110156106af575060016106b3565b5060005b919050565b60016020526000908152604090205481565b600054600160a060020a031633146106e157600080fd5b600160a060020a03811615156106f657600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b610766610823565b600260005b6002020160408051908101604052908160008201548152602001600182015481525050905090565b61079b610823565b60165460029060001901600a811061076b57fe5b6107b7610823565b60005b600a81101561081f57600281600a81106107d057fe5b60020201544210156108175760026000198201600a81106107ed57fe5b6002020160408051908101604052908160008201548152602001600182015481525050915061081f565b6001016107ba565b5090565b6040805180820190915260008082526020820152905600a165627a7a7230582076a5a0068d674dbb23c6d83c391f67b5a23f32d41f982e20329dc3cc3bb7ae8d0029", "bytecode_runtime": "0x6080604052600436106100da5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166304bbc25581146100df5780630681ca551461010857806318a4155e1461012f5780632442e1cb1461015c5780632c9a0a951461018d5780636f079f90146101a25780638da5cb5b146101b75780638e768288146101e857806396821fc114610209578063e474f97a1461021e578063e89e4ed614610244578063eb91d37e1461025c578063f14ae17d14610271578063f1ef9a0814610292578063f2fde38b146102b3575b600080fd5b3480156100eb57600080fd5b506100f46102d4565b604080519115158252519081900360200190f35b34801561011457600080fd5b5061011d6102d9565b60408051918252519081900360200190f35b34801561013b57600080fd5b5061011d600435602435604435600160a060020a03606435166084356102df565b34801561016857600080fd5b50610174600435610492565b6040805192835260208301919091528051918290030190f35b34801561019957600080fd5b5061011d6104ca565b3480156101ae57600080fd5b5061011d6104da565b3480156101c357600080fd5b506101cc6104e4565b60408051600160a060020a039092168252519081900360200190f35b3480156101f457600080fd5b506100f4600160a060020a03600435166104f3565b34801561021557600080fd5b5061011d61061d565b34801561022a57600080fd5b50610242600160a060020a0360043516602435610622565b005b34801561025057600080fd5b50610174600435610655565b34801561026857600080fd5b5061011d610674565b34801561027d57600080fd5b506100f4600160a060020a0360043516610687565b34801561029e57600080fd5b5061011d600160a060020a03600435166106b8565b3480156102bf57600080fd5b50610242600160a060020a03600435166106ca565b600190565b60165481565b600160a060020a038216600090815260016020526040812054600a83900a9082908110156103ce57600160a060020a0385166000908152600160209081526040918290205482517f1d3b9edf000000000000000000000000000000000000000000000000000000008152600481018c9052602481018690529251909273__contracts/SafeMathLib.sol:SafeMathLi__92631d3b9edf92604480840193829003018186803b15801561039157600080fd5b505af41580156103a5573d6000803e3d6000fd5b505050506040513d60208110156103bb57600080fd5b50518115156103c657fe5b049250610487565b6103d6610674565b9050808873__contracts/SafeMathLib.sol:SafeMathLi__631d3b9edf9091856040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b15801561044e57600080fd5b505af4158015610462573d6000803e3d6000fd5b505050506040513d602081101561047857600080fd5b505181151561048357fe5b0492505b505095945050505050565b600080600283600a81106104a257fe5b6002020160000154600284600a811015156104b957fe5b600202016001015491509150915091565b60006104d461075e565b51905090565b60006104d4610793565b600054600160a060020a031681565b6000816104fe6104ca565b81600160a060020a031663af4686826040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561055557600080fd5b505af1158015610569573d6000803e3d6000fd5b505050506040513d602081101561057f57600080fd5b505114801561061657506105916104da565b81600160a060020a0316630a09284a6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156105e857600080fd5b505af11580156105fc573d6000803e3d6000fd5b505050506040513d602081101561061257600080fd5b5051145b9392505050565b600a81565b600054600160a060020a0316331461063957600080fd5b600160a060020a03909116600090815260016020526040902055565b600281600a811061066257fe5b60020201805460019091015490915082565b600061067e6107af565b60200151905090565b600160a060020a0381166000908152600160205260408120548110156106af575060016106b3565b5060005b919050565b60016020526000908152604090205481565b600054600160a060020a031633146106e157600080fd5b600160a060020a03811615156106f657600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b610766610823565b600260005b6002020160408051908101604052908160008201548152602001600182015481525050905090565b61079b610823565b60165460029060001901600a811061076b57fe5b6107b7610823565b60005b600a81101561081f57600281600a81106107d057fe5b60020201544210156108175760026000198201600a81106107ed57fe5b6002020160408051908101604052908160008201548152602001600182015481525050915061081f565b6001016107ba565b5090565b6040805180820190915260008082526020820152905600a165627a7a7230582076a5a0068d674dbb23c6d83c391f67b5a23f32d41f982e20329dc3cc3bb7ae8d0029", "direct_dependencies": ["SafeMathLib"], "full_dependencies": ["SafeMathLib"], "linkrefs": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 2442}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 2696}], "linkrefs_runtime": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 1722}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 1976}], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": true, "inputs": [], "name": "isPricingStrategy", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "milestoneCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "value", "type": "uint256"}, {"name": "weiRaised", "type": "uint256"}, {"name": "tokensSold", "type": "uint256"}, {"name": "msgSender", "type": "address"}, {"name": "decimals", "type": "uint256"}], "name": "calculatePrice", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "n", "type": "uint256"}], "name": "getMilestone", "outputs": [{"name": "", "type": "uint256"}, {"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getPricingStartsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getPricingEndsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "_crowdsale", "type": "address"}], "name": "isSane", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "MAX_MILESTONE", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "preicoAddress", "type": "address"}, {"name": "pricePerToken", "type": "uint256"}], "name": "setPreicoAddress", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "uint256"}], "name": "milestones", "outputs": [{"name": "time", "type": "uint256"}, {"name": "price", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getCurrentPrice", "outputs": [{"name": "result", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "purchaser", "type": "address"}], "name": "isPresalePurchase", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "preicoAddresses", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [{"name": "_milestones", "type": "uint256[]"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"payable": true, "stateMutability": "payable", "type": "fallback"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "devdoc": {"methods": {"calculatePrice(uint256,uint256,uint256,address,uint256)": {"details": "Calculate the current price for buy in amount."}, "getCurrentPrice()": {"details": "Get the current price.", "return": "The current price or 0 if we are outside milestone period"}, "getMilestone(uint256)": {"details": "Iterate through milestones. You reach end of milestones when price = 0", "return": "tuple (time, price)"}, "setPreicoAddress(address,uint256)": {"details": "This is invoked once for every pre-ICO address, set pricePerToken to 0 to disable", "params": {"preicoAddress": "PresaleFundCollector address", "pricePerToken": "How many weis one token cost for pre-ico investors"}}, "transferOwnership(address)": {"details": "Allows the current owner to transfer control of the contract to a newOwner.", "params": {"newOwner": "The address to transfer ownership to."}}}}, "userdoc": {"methods": {"isPricingStrategy()": {"notice": "Interface declaration. "}}}}, "settings": {"compilationTarget": {"contracts/MilestonePricing.sol": "MilestonePricing"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/Crowdsale.sol": {"keccak256": "0x2697c26528f64bb954a7c2547d3b43317d2d2b02c7d9d05a7b1ab388cd79f65d", "urls": ["bzzr://f28b280794222114141c51dd5c388d403a7c98d8b51e04170a0e294246d5164b"]}, "contracts/CrowdsaleBase.sol": {"keccak256": "0xe2c9ed11183ce705616980df7b02544d72fe18b40395da7d9d4bcb621fb87871", "urls": ["bzzr://07f3887ba0d0eb3248b1ad3581480ed71a2fe70a47dcc283c4e97c8c92e0790a"]}, "contracts/FinalizeAgent.sol": {"keccak256": "0x309fd0510e0b3e2b5044e33f7c80cfb2d6f2a5697e41a5f185931d65770cfea9", "urls": ["bzzr://4e7ed6f82c0f542e92e56c12566b2ecd7666730865bf12566c27587ec64160ac"]}, "contracts/FractionalERC20.sol": {"keccak256": "0x75bc4ad90a8b13ce961c89b1bf405776f616e019d3a2720168f8e52be223198f", "urls": ["bzzr://6a3688f12da1a5c890ef06f80f883f6c5370886092d38a1b33cd4219b718478b"]}, "contracts/Haltable.sol": {"keccak256": "0x265dcf25e7c9ab4b6eecd2181f1b71334a1b5381a60f8db7d9526dab120f4b70", "urls": ["bzzr://d522e00fa9e075941469dd81738b59fdb99ce3c12cdc39e33abe40b588c4da9b"]}, "contracts/MilestonePricing.sol": {"keccak256": "0x9864d40b1794ed3d38af9f7d6fdd3d4f988b05234fef7f05b6df34674a10fddb", "urls": ["bzzr://790c4cb5af370af4185617838395077643f298593ac6035cabe75a4944eaa2b4"]}, "contracts/PricingStrategy.sol": {"keccak256": "0x8df5093b7d07168ad994f9176de0bd2268f6563b1e8a3a448d8cfe7fe246c628", "urls": ["bzzr://ef5c944d51f739ab34e2c951d6ac82a7152e6bb844058a8e57bae52c14cbe16b"]}, "contracts/SafeMathLib.sol": {"keccak256": "0x501bfe31e274b9a5591f7c540bdced4d4312e27d4f19599147c9bbca3d9c6b18", "urls": ["bzzr://a80935ebddb06c247d71372d4e5833ee029f08633bd0fe4a274a57009567e5b9"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}}, "version": 1}, "name": "MilestonePricing", "ordered_full_dependencies": ["SafeMathLib"], "source_path": "contracts/MilestonePricing.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Interface for defining crowdsale pricing.\n */\ncontract PricingStrategy {\n\n /** Interface declaration. */\n function isPricingStrategy() public constant returns (bool) {\n return true;\n }\n\n /** Self check if all references are correctly set.\n *\n * Checks that pricing strategy matches crowdsale parameters.\n */\n function isSane(address crowdsale) public constant returns (bool) {\n return true;\n }\n\n /**\n * @dev Pricing tells if this is a presale purchase or not.\n @param purchaser Address of the purchaser\n @return False by default, true if a presale purchaser\n */\n function isPresalePurchase(address purchaser) public constant returns (bool) {\n return false;\n }\n\n /**\n * When somebody tries to buy tokens for X eth, calculate how many tokens they get.\n *\n *\n * @param value - What is the value of the transaction send in as wei\n * @param tokensSold - how much tokens have been sold this far\n * @param weiRaised - how much money has been raised this far in the main token sale - this number excludes presale\n * @param msgSender - who is the investor of this transaction\n * @param decimals - how many decimal units the token has\n * @return Amount of tokens the investor receives\n */\n function calculatePrice(uint value, uint weiRaised, uint tokensSold, address msgSender, uint decimals) public constant returns (uint tokenAmount);\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Safe unsigned safe math.\n *\n * https://blog.aragon.one/library-driven-development-in-solidity-2bebcaf88736#.750gwtwli\n *\n * Originally from https://raw.githubusercontent.com/AragonOne/zeppelin-solidity/master/contracts/SafeMathLib.sol\n *\n * Maintained here until merged to mainline zeppelin-solidity.\n *\n */\nlibrary SafeMathLib {\n\n function times(uint a, uint b) returns (uint) {\n uint c = a * b;\n assert(a == 0 || c / a == b);\n return c;\n }\n\n function minus(uint a, uint b) returns (uint) {\n assert(b <= a);\n return a - b;\n }\n\n function plus(uint a, uint b) returns (uint) {\n uint c = a + b;\n assert(c>=a);\n return c;\n }\n\n}\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Finalize agent defines what happens at the end of succeseful crowdsale.\n *\n * - Allocate tokens for founders, bounties and community\n * - Make tokens transferable\n * - etc.\n */\ncontract FinalizeAgent {\n\n function isFinalizeAgent() public constant returns(bool) {\n return true;\n }\n\n /** Return true if we can run finalizeCrowdsale() properly.\n *\n * This is a safety check function that doesn't allow crowdsale to begin\n * unless the finalizer has been set up properly.\n */\n function isSane() public constant returns (bool);\n\n /** Called once by crowdsale finalize() if the sale was success. */\n function finalizeCrowdsale();\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n\n/**\n * A token that defines fractional units as decimals.\n */\ncontract FractionalERC20 is ERC20 {\n\n uint public decimals;\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n/*\n * Haltable\n *\n * Abstract contract that allows children to implement an\n * emergency stop mechanism. Differs from Pausable by causing a throw when in halt mode.\n *\n *\n * Originally envisioned in FirstBlood ICO contract.\n */\ncontract Haltable is Ownable {\n bool public halted;\n\n modifier stopInEmergency {\n if (halted) throw;\n _;\n }\n\n modifier stopNonOwnersInEmergency {\n if (halted && msg.sender != owner) throw;\n _;\n }\n\n modifier onlyInEmergency {\n if (!halted) throw;\n _;\n }\n\n // called by the owner on emergency, triggers stopped state\n function halt() external onlyOwner {\n halted = true;\n }\n\n // called by the owner on end of emergency, returns to normal state\n function unhalt() external onlyOwner onlyInEmergency {\n halted = false;\n }\n\n}\n\n\n\n\n\n\n\n/**\n * Crowdsale state machine without buy functionality.\n *\n * Implements basic state machine logic, but leaves out all buy functions,\n * so that subclasses can implement their own buying logic.\n *\n *\n * For the default buy() implementation see Crowdsale.sol.\n */\ncontract CrowdsaleBase is Haltable {\n\n /* Max investment count when we are still allowed to change the multisig address */\n uint public MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE = 5;\n\n using SafeMathLib for uint;\n\n /* The token we are selling */\n FractionalERC20 public token;\n\n /* How we are going to price our offering */\n PricingStrategy public pricingStrategy;\n\n /* Post-success callback */\n FinalizeAgent public finalizeAgent;\n\n /* tokens will be transfered from this address */\n address public multisigWallet;\n\n /* if the funding goal is not reached, investors may withdraw their funds */\n uint public minimumFundingGoal;\n\n /* the UNIX timestamp start date of the crowdsale */\n uint public startsAt;\n\n /* the UNIX timestamp end date of the crowdsale */\n uint public endsAt;\n\n /* the number of tokens already sold through this contract*/\n uint public tokensSold = 0;\n\n /* How many wei of funding we have raised */\n uint public weiRaised = 0;\n\n /* Calculate incoming funds from presale contracts and addresses */\n uint public presaleWeiRaised = 0;\n\n /* How many distinct addresses have invested */\n uint public investorCount = 0;\n\n /* How much wei we have returned back to the contract after a failed crowdfund. */\n uint public loadedRefund = 0;\n\n /* How much wei we have given back to investors.*/\n uint public weiRefunded = 0;\n\n /* Has this crowdsale been finalized */\n bool public finalized;\n\n /** How much ETH each address has invested to this crowdsale */\n mapping (address => uint256) public investedAmountOf;\n\n /** How much tokens this crowdsale has credited for each investor address */\n mapping (address => uint256) public tokenAmountOf;\n\n /** Addresses that are allowed to invest even before ICO offical opens. For testing, for ICO partners, etc. */\n mapping (address => bool) public earlyParticipantWhitelist;\n\n /** This is for manul testing for the interaction from owner wallet. You can set it to any value and inspect this in blockchain explorer to see that crowdsale interaction works. */\n uint public ownerTestValue;\n\n /** State machine\n *\n * - Preparing: All contract initialization calls and variables have not been set yet\n * - Prefunding: We have not passed start time yet\n * - Funding: Active crowdsale\n * - Success: Minimum funding goal reached\n * - Failure: Minimum funding goal not reached before ending time\n * - Finalized: The finalized has been called and succesfully executed\n * - Refunding: Refunds are loaded on the contract for reclaim.\n */\n enum State{Unknown, Preparing, PreFunding, Funding, Success, Failure, Finalized, Refunding}\n\n // A new investment was made\n event Invested(address investor, uint weiAmount, uint tokenAmount, uint128 customerId);\n\n // Refund was processed for a contributor\n event Refund(address investor, uint weiAmount);\n\n // The rules were changed what kind of investments we accept\n event InvestmentPolicyChanged(bool newRequireCustomerId, bool newRequiredSignedAddress, address newSignerAddress);\n\n // Address early participation whitelist status changed\n event Whitelisted(address addr, bool status);\n\n // Crowdsale end time has been changed\n event EndsAtChanged(uint newEndsAt);\n\n function CrowdsaleBase(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal) {\n\n owner = msg.sender;\n\n token = FractionalERC20(_token);\n setPricingStrategy(_pricingStrategy);\n\n multisigWallet = _multisigWallet;\n if(multisigWallet == 0) {\n throw;\n }\n\n if(_start == 0) {\n throw;\n }\n\n startsAt = _start;\n\n if(_end == 0) {\n throw;\n }\n\n endsAt = _end;\n\n // Don't mess the dates\n if(startsAt >= endsAt) {\n throw;\n }\n\n // Minimum funding goal can be zero\n minimumFundingGoal = _minimumFundingGoal;\n }\n\n /**\n * Don't expect to just send in money and get tokens.\n */\n function() payable {\n throw;\n }\n\n /**\n * @dev Make an investment.\n *\n * Crowdsale must be running for one to invest.\n * We must have not pressed the emergency brake.\n *\n * @param receiver The Ethereum address who receives the tokens\n * @param customerId (optional) UUID v4 to track the successful payments on the server side'\n * @param tokenAmount Amount of tokens which be credited to receiver\n *\n * @return tokensBought How mony tokens were bought\n */\n function buyTokens(address receiver, uint128 customerId, uint256 tokenAmount) stopInEmergency internal returns(uint tokensBought) {\n\n // Determine if it's a good time to accept investment from this participant\n if(getState() == State.PreFunding) {\n // Are we whitelisted for early deposit\n if(!earlyParticipantWhitelist[receiver]) {\n throw;\n }\n } else if(getState() == State.Funding) {\n // Retail participants can only come in when the crowdsale is running\n // pass\n } else {\n // Unwanted state\n throw;\n }\n\n uint weiAmount = msg.value;\n\n // Dust transaction\n require(tokenAmount != 0);\n\n if(investedAmountOf[receiver] == 0) {\n // A new investor\n investorCount++;\n }\n\n // Update investor\n investedAmountOf[receiver] = investedAmountOf[receiver].plus(weiAmount);\n tokenAmountOf[receiver] = tokenAmountOf[receiver].plus(tokenAmount);\n\n // Update totals\n weiRaised = weiRaised.plus(weiAmount);\n tokensSold = tokensSold.plus(tokenAmount);\n\n if(pricingStrategy.isPresalePurchase(receiver)) {\n presaleWeiRaised = presaleWeiRaised.plus(weiAmount);\n }\n\n // Check that we did not bust the cap\n require(!isBreakingCap(weiAmount, tokenAmount, weiRaised, tokensSold));\n\n assignTokens(receiver, tokenAmount);\n\n // Pocket the money, or fail the crowdsale if we for some reason cannot send the money to our multisig\n if(!multisigWallet.send(weiAmount)) throw;\n\n // Tell us invest was success\n Invested(receiver, weiAmount, tokenAmount, customerId);\n\n return tokenAmount;\n }\n\n /**\n * @dev Make an investment based on pricing strategy\n *\n * This is a wrapper for buyTokens(), but the amount of tokens receiver will\n * have depends on the pricing strategy used.\n *\n * @param receiver The Ethereum address who receives the tokens\n * @param customerId (optional) UUID v4 to track the successful payments on the server side'\n *\n * @return tokensBought How mony tokens were bought\n */\n function investInternal(address receiver, uint128 customerId) stopInEmergency internal returns(uint tokensBought) {\n return buyTokens(receiver, customerId, pricingStrategy.calculatePrice(msg.value, weiRaised - presaleWeiRaised, tokensSold, msg.sender, token.decimals()));\n }\n\n /**\n * @dev Calculate tokens user will have for their purchase\n *\n * @param weisTotal How much ethers (in wei) the user putssssss in\n * @param pricePerToken What is the price for one token\n *\n * @return tokensTotal which is received tokens, token decimals included\n */\n function calculateTokens(uint256 weisTotal, uint256 pricePerToken) public constant returns(uint tokensTotal) {\n // pricePerToken is how many full tokens, token decimal place included, you get for wei amount.\n // Because, in theory, decimal amount can vary, we do the exponent calculation here,\n // though gas wise using 10**18 constant would be much simpler.\n // Furthermore we could use rough amounts and take in raw wei per tokens amount,\n // but we lose too much accuracy for generic calculations, thus all these are\n // practically implemented as 10**18 fixed points.\n uint multiplier = 10 ** token.decimals();\n return weisTotal.times(multiplier)/pricePerToken;\n }\n\n /**\n * Finalize a succcesful crowdsale.\n *\n * The owner can triggre a call the contract that provides post-crowdsale actions, like releasing the tokens.\n */\n function finalize() public inState(State.Success) onlyOwner stopInEmergency {\n\n // Already finalized\n if(finalized) {\n throw;\n }\n\n // Finalizing is optional. We only call it if we are given a finalizing agent.\n if(address(finalizeAgent) != 0) {\n finalizeAgent.finalizeCrowdsale();\n }\n\n finalized = true;\n }\n\n /**\n * Allow to (re)set finalize agent.\n *\n * Design choice: no state restrictions on setting this, so that we can fix fat finger mistakes.\n */\n function setFinalizeAgent(FinalizeAgent addr) onlyOwner {\n finalizeAgent = addr;\n\n // Don't allow setting bad agent\n if(!finalizeAgent.isFinalizeAgent()) {\n throw;\n }\n }\n\n /**\n * Allow crowdsale owner to close early or extend the crowdsale.\n *\n * This is useful e.g. for a manual soft cap implementation:\n * - after X amount is reached determine manual closing\n *\n * This may put the crowdsale to an invalid state,\n * but we trust owners know what they are doing.\n *\n */\n function setEndsAt(uint time) onlyOwner {\n\n if(now > time) {\n throw; // Don't change past\n }\n\n if(startsAt > time) {\n throw; // Prevent human mistakes\n }\n\n endsAt = time;\n EndsAtChanged(endsAt);\n }\n\n /**\n * Allow to (re)set pricing strategy.\n *\n * Design choice: no state restrictions on the set, so that we can fix fat finger mistakes.\n */\n function setPricingStrategy(PricingStrategy _pricingStrategy) onlyOwner {\n pricingStrategy = _pricingStrategy;\n\n // Don't allow setting bad agent\n if(!pricingStrategy.isPricingStrategy()) {\n throw;\n }\n }\n\n /**\n * Allow to change the team multisig address in the case of emergency.\n *\n * This allows to save a deployed crowdsale wallet in the case the crowdsale has not yet begun\n * (we have done only few test transactions). After the crowdsale is going\n * then multisig address stays locked for the safety reasons.\n */\n function setMultisig(address addr) public onlyOwner {\n\n // Change\n if(investorCount > MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE) {\n throw;\n }\n\n multisigWallet = addr;\n }\n\n /**\n * Allow load refunds back on the contract for the refunding.\n *\n * The team can transfer the funds back on the smart contract in the case the minimum goal was not reached..\n */\n function loadRefund() public payable inState(State.Failure) {\n if(msg.value == 0) throw;\n loadedRefund = loadedRefund.plus(msg.value);\n }\n\n /**\n * Investors can claim refund.\n *\n * Note that any refunds from proxy buyers should be handled separately,\n * and not through this contract.\n */\n function refund() public inState(State.Refunding) {\n uint256 weiValue = investedAmountOf[msg.sender];\n if (weiValue == 0) throw;\n investedAmountOf[msg.sender] = 0;\n weiRefunded = weiRefunded.plus(weiValue);\n Refund(msg.sender, weiValue);\n if (!msg.sender.send(weiValue)) throw;\n }\n\n /**\n * @return true if the crowdsale has raised enough money to be a successful.\n */\n function isMinimumGoalReached() public constant returns (bool reached) {\n return weiRaised >= minimumFundingGoal;\n }\n\n /**\n * Check if the contract relationship looks good.\n */\n function isFinalizerSane() public constant returns (bool sane) {\n return finalizeAgent.isSane();\n }\n\n /**\n * Check if the contract relationship looks good.\n */\n function isPricingSane() public constant returns (bool sane) {\n return pricingStrategy.isSane(address(this));\n }\n\n /**\n * Crowdfund state machine management.\n *\n * We make it a function and do not assign the result to a variable, so there is no chance of the variable being stale.\n */\n function getState() public constant returns (State) {\n if(finalized) return State.Finalized;\n else if (address(finalizeAgent) == 0) return State.Preparing;\n else if (!finalizeAgent.isSane()) return State.Preparing;\n else if (!pricingStrategy.isSane(address(this))) return State.Preparing;\n else if (block.timestamp < startsAt) return State.PreFunding;\n else if (block.timestamp <= endsAt && !isCrowdsaleFull()) return State.Funding;\n else if (isMinimumGoalReached()) return State.Success;\n else if (!isMinimumGoalReached() && weiRaised > 0 && loadedRefund >= weiRaised) return State.Refunding;\n else return State.Failure;\n }\n\n /** This is for manual testing of multisig wallet interaction */\n function setOwnerTestValue(uint val) onlyOwner {\n ownerTestValue = val;\n }\n\n /**\n * Allow addresses to do early participation.\n *\n * TODO: Fix spelling error in the name\n */\n function setEarlyParicipantWhitelist(address addr, bool status) onlyOwner {\n earlyParticipantWhitelist[addr] = status;\n Whitelisted(addr, status);\n }\n\n\n /** Interface marker. */\n function isCrowdsale() public constant returns (bool) {\n return true;\n }\n\n //\n // Modifiers\n //\n\n /** Modified allowing execution only if the crowdsale is currently running. */\n modifier inState(State state) {\n if(getState() != state) throw;\n _;\n }\n\n\n //\n // Abstract functions\n //\n\n /**\n * Check if the current invested breaks our cap rules.\n *\n *\n * The child contract must define their own cap setting rules.\n * We allow a lot of flexibility through different capping strategies (ETH, token count)\n * Called from invest().\n *\n * @param weiAmount The amount of wei the investor tries to invest in the current transaction\n * @param tokenAmount The amount of tokens we try to give to the investor in the current transaction\n * @param weiRaisedTotal What would be our total raised balance after this transaction\n * @param tokensSoldTotal What would be our total sold tokens count after this transaction\n *\n * @return true if taking this investment would break our cap rules\n */\n function isBreakingCap(uint weiAmount, uint tokenAmount, uint weiRaisedTotal, uint tokensSoldTotal) constant returns (bool limitBroken);\n\n /**\n * Check if the current crowdsale is full and we can no longer sell any tokens.\n */\n function isCrowdsaleFull() public constant returns (bool);\n\n /**\n * Create new tokens or transfer issued tokens to the investor depending on the cap model.\n */\n function assignTokens(address receiver, uint tokenAmount) internal;\n}\n\n\n\n/**\n * Abstract base contract for token sales with the default buy entry points.\n *\n * Handle\n * - start and end dates\n * - accepting investments\n * - minimum funding goal and refund\n * - various statistics during the crowdfund\n * - different pricing strategies\n * - different investment policies (require server side customer id, allow only whitelisted addresses)\n *\n * Does not Handle\n *\n * - Token allocation (minting vs. transfer)\n * - Cap rules\n *\n */\ncontract Crowdsale is CrowdsaleBase {\n\n /* Do we need to have unique contributor id for each customer */\n bool public requireCustomerId;\n\n /**\n * Do we verify that contributor has been cleared on the server side (accredited investors only).\n * This method was first used in FirstBlood crowdsale to ensure all contributors have accepted terms on sale (on the web).\n */\n bool public requiredSignedAddress;\n\n /* Server side address that signed allowed contributors (Ethereum addresses) that can participate the crowdsale */\n address public signerAddress;\n\n function Crowdsale(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal) CrowdsaleBase(_token, _pricingStrategy, _multisigWallet, _start, _end, _minimumFundingGoal) {\n }\n\n /**\n * Preallocate tokens for the early investors.\n *\n * Preallocated tokens have been sold before the actual crowdsale opens.\n * This function mints the tokens and moves the crowdsale needle.\n *\n * Investor count is not handled; it is assumed this goes for multiple investors\n * and the token distribution happens outside the smart contract flow.\n *\n * No money is exchanged, as the crowdsale team already have received the payment.\n *\n * @param fullTokens tokens as full tokens - decimal places added internally\n * @param weiPrice Price of a single full token in wei\n *\n */\n function preallocate(address receiver, uint fullTokens, uint weiPrice) public onlyOwner {\n\n uint tokenAmount = fullTokens * 10**token.decimals();\n uint weiAmount = weiPrice * fullTokens; // This can be also 0, we give out tokens for free\n\n weiRaised = weiRaised.plus(weiAmount);\n tokensSold = tokensSold.plus(tokenAmount);\n\n investedAmountOf[receiver] = investedAmountOf[receiver].plus(weiAmount);\n tokenAmountOf[receiver] = tokenAmountOf[receiver].plus(tokenAmount);\n\n assignTokens(receiver, tokenAmount);\n\n // Tell us invest was success\n Invested(receiver, weiAmount, tokenAmount, 0);\n }\n\n /**\n * Allow anonymous contributions to this crowdsale.\n */\n function investWithSignedAddress(address addr, uint128 customerId, uint8 v, bytes32 r, bytes32 s) public payable {\n bytes32 hash = sha256(addr);\n if (ecrecover(hash, v, r, s) != signerAddress) throw;\n if(customerId == 0) throw; // UUIDv4 sanity check\n investInternal(addr, customerId);\n }\n\n /**\n * Track who is the customer making the payment so we can send thank you email.\n */\n function investWithCustomerId(address addr, uint128 customerId) public payable {\n if(requiredSignedAddress) throw; // Crowdsale allows only server-side signed participants\n if(customerId == 0) throw; // UUIDv4 sanity check\n investInternal(addr, customerId);\n }\n\n /**\n * Allow anonymous contributions to this crowdsale.\n */\n function invest(address addr) public payable {\n if(requireCustomerId) throw; // Crowdsale needs to track participants for thank you email\n if(requiredSignedAddress) throw; // Crowdsale allows only server-side signed participants\n investInternal(addr, 0);\n }\n\n /**\n * Invest to tokens, recognize the payer and clear his address.\n *\n */\n function buyWithSignedAddress(uint128 customerId, uint8 v, bytes32 r, bytes32 s) public payable {\n investWithSignedAddress(msg.sender, customerId, v, r, s);\n }\n\n /**\n * Invest to tokens, recognize the payer.\n *\n */\n function buyWithCustomerIdWithChecksum(uint128 customerId, bytes1 checksum) public payable {\n // see customerid.py\n if (bytes1(sha3(customerId)) != checksum) throw;\n investWithCustomerId(msg.sender, customerId);\n }\n\n /**\n * Legacy API signature.\n */\n function buyWithCustomerId(uint128 customerId) public payable {\n investWithCustomerId(msg.sender, customerId);\n }\n\n /**\n * The basic entry point to participate the crowdsale process.\n *\n * Pay for funding, get invested tokens back in the sender address.\n */\n function buy() public payable {\n invest(msg.sender);\n }\n\n /**\n * Set policy do we need to have server-side customer ids for the investments.\n *\n */\n function setRequireCustomerId(bool value) onlyOwner {\n requireCustomerId = value;\n InvestmentPolicyChanged(requireCustomerId, requiredSignedAddress, signerAddress);\n }\n\n /**\n * Set policy if all investors must be cleared on the server side first.\n *\n * This is e.g. for the accredited investor clearing.\n *\n */\n function setRequireSignedAddress(bool value, address _signerAddress) onlyOwner {\n requiredSignedAddress = value;\n signerAddress = _signerAddress;\n InvestmentPolicyChanged(requireCustomerId, requiredSignedAddress, signerAddress);\n }\n\n}\n\n\n\n\n\n/// @dev Time milestone based pricing with special support for pre-ico deals.\ncontract MilestonePricing is PricingStrategy, Ownable {\n\n using SafeMathLib for uint;\n\n uint public constant MAX_MILESTONE = 10;\n\n // This contains all pre-ICO addresses, and their prices (weis per token)\n mapping (address => uint) public preicoAddresses;\n\n /**\n * Define pricing schedule using milestones.\n */\n struct Milestone {\n\n // UNIX timestamp when this milestone kicks in\n uint time;\n\n // How many tokens per wei you will get after this milestone has been passed\n uint price;\n }\n\n // Store milestones in a fixed array, so that it can be seen in a blockchain explorer\n // Milestone 0 is always (0, 0)\n // (TODO: change this when we confirm dynamic arrays are explorable)\n Milestone[10] public milestones;\n\n // How many active milestones we have\n uint public milestoneCount;\n\n /// @dev Contruction, creating a list of milestones\n /// @param _milestones uint[] milestones Pairs of (time, price)\n function MilestonePricing(uint[] _milestones) {\n // Need to have tuples, length check\n if(_milestones.length % 2 == 1 || _milestones.length >= MAX_MILESTONE*2) {\n throw;\n }\n\n milestoneCount = _milestones.length / 2;\n\n uint lastTimestamp = 0;\n\n for(uint i=0; i<_milestones.length/2; i++) {\n milestones[i].time = _milestones[i*2];\n milestones[i].price = _milestones[i*2+1];\n\n // No invalid steps\n if((lastTimestamp != 0) && (milestones[i].time <= lastTimestamp)) {\n throw;\n }\n\n lastTimestamp = milestones[i].time;\n }\n\n // Last milestone price must be zero, terminating the crowdale\n if(milestones[milestoneCount-1].price != 0) {\n throw;\n }\n }\n\n /// @dev This is invoked once for every pre-ICO address, set pricePerToken\n /// to 0 to disable\n /// @param preicoAddress PresaleFundCollector address\n /// @param pricePerToken How many weis one token cost for pre-ico investors\n function setPreicoAddress(address preicoAddress, uint pricePerToken)\n public\n onlyOwner\n {\n preicoAddresses[preicoAddress] = pricePerToken;\n }\n\n /// @dev Iterate through milestones. You reach end of milestones when price = 0\n /// @return tuple (time, price)\n function getMilestone(uint n) public constant returns (uint, uint) {\n return (milestones[n].time, milestones[n].price);\n }\n\n function getFirstMilestone() private constant returns (Milestone) {\n return milestones[0];\n }\n\n function getLastMilestone() private constant returns (Milestone) {\n return milestones[milestoneCount-1];\n }\n\n function getPricingStartsAt() public constant returns (uint) {\n return getFirstMilestone().time;\n }\n\n function getPricingEndsAt() public constant returns (uint) {\n return getLastMilestone().time;\n }\n\n function isSane(address _crowdsale) public constant returns(bool) {\n Crowdsale crowdsale = Crowdsale(_crowdsale);\n return crowdsale.startsAt() == getPricingStartsAt() && crowdsale.endsAt() == getPricingEndsAt();\n }\n\n /// @dev Get the current milestone or bail out if we are not in the milestone periods.\n /// @return {[type]} [description]\n function getCurrentMilestone() private constant returns (Milestone) {\n uint i;\n\n for(i=0; i 0) {\n return value.times(multiplier) / preicoAddresses[msgSender];\n }\n\n uint price = getCurrentPrice();\n return value.times(multiplier) / price;\n }\n\n function isPresalePurchase(address purchaser) public constant returns (bool) {\n if(preicoAddresses[purchaser] > 0)\n return true;\n else\n return false;\n }\n\n function() payable {\n throw; // No money on this contract\n }\n\n}\n"}, "MintableToken": {"abi": [{"constant": true, "inputs": [], "name": "mintingFinished", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "approve", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "recoverTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_from", "type": "address"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "receiver", "type": "address"}, {"name": "amount", "type": "uint256"}], "name": "mint", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "mintAgents", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "state", "type": "bool"}], "name": "setMintAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_subtractedValue", "type": "uint256"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "tokensToBeReturned", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_addedValue", "type": "uint256"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}, {"name": "_spender", "type": "address"}], "name": "allowance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isToken", "outputs": [{"name": "weAre", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "addr", "type": "address"}, {"indexed": false, "name": "state", "type": "bool"}], "name": "MintingAgentChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "receiver", "type": "address"}, {"indexed": false, "name": "amount", "type": "uint256"}], "name": "Minted", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}, {"indexed": true, "name": "spender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "bytecode": "0x608060405260038054600160a860020a03191633179055610d23806100256000396000f3006080604052600436106100f05763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166305d2035b81146100f5578063095ea7b31461011e57806316114acd1461014257806318160ddd1461016557806323b872dd1461018c57806340c10f19146101b657806342c1867b146101da57806343214675146101fb578063661884631461022157806370a08231146102455780638da5cb5b14610266578063a9059cbb14610297578063c45d19db146102bb578063d73dd623146102dc578063dd62ed3e14610300578063eefa597b14610327578063f2fde38b1461033c575b600080fd5b34801561010157600080fd5b5061010a61035d565b604080519115158252519081900360200190f35b34801561012a57600080fd5b5061010a600160a060020a036004351660243561037e565b34801561014e57600080fd5b50610163600160a060020a03600435166103e4565b005b34801561017157600080fd5b5061017a6104b4565b60408051918252519081900360200190f35b34801561019857600080fd5b5061010a600160a060020a03600435811690602435166044356104ba565b3480156101c257600080fd5b50610163600160a060020a0360043516602435610631565b3480156101e657600080fd5b5061010a600160a060020a0360043516610828565b34801561020757600080fd5b50610163600160a060020a0360043516602435151561083d565b34801561022d57600080fd5b5061010a600160a060020a03600435166024356108e0565b34801561025157600080fd5b5061017a600160a060020a03600435166109d0565b34801561027257600080fd5b5061027b6109eb565b60408051600160a060020a039092168252519081900360200190f35b3480156102a357600080fd5b5061010a600160a060020a03600435166024356109fa565b3480156102c757600080fd5b5061017a600160a060020a0360043516610adb565b3480156102e857600080fd5b5061010a600160a060020a0360043516602435610b71565b34801561030c57600080fd5b5061017a600160a060020a0360043581169060243516610c0a565b34801561033357600080fd5b5061010a610c35565b34801561034857600080fd5b50610163600160a060020a0360043516610c3a565b60035474010000000000000000000000000000000000000000900460ff1681565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b600354600160a060020a031633146103fb57600080fd5b600354600160a060020a038083169163a9059cbb911661041a84610adb565b6040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b15801561048557600080fd5b505af1158015610499573d6000803e3d6000fd5b505050506040513d60208110156104af57600080fd5b505050565b60015490565b6000600160a060020a03831615156104d157600080fd5b600160a060020a0384166000908152602081905260409020548211156104f657600080fd5b600160a060020a038416600090815260026020908152604080832033845290915290205482111561052657600080fd5b600160a060020a03841660009081526020819052604090205461054f908363ffffffff610ccf16565b600160a060020a038086166000908152602081905260408082209390935590851681522054610584908363ffffffff610ce116565b600160a060020a038085166000908152602081815260408083209490945591871681526002825282812033825290915220546105c6908363ffffffff610ccf16565b600160a060020a03808616600081815260026020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b3360009081526004602052604090205460ff16151561064f57600080fd5b60035474010000000000000000000000000000000000000000900460ff161561067757600080fd5b60015473__contracts/SafeMathLib.sol:SafeMathLi__6366098d4f9091836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b1580156106ee57600080fd5b505af4158015610702573d6000803e3d6000fd5b505050506040513d602081101561071857600080fd5b5051600155600160a060020a038216600090815260208181526040918290205482517f66098d4f000000000000000000000000000000000000000000000000000000008152600481019190915260248101849052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b1580156107a657600080fd5b505af41580156107ba573d6000803e3d6000fd5b505050506040513d60208110156107d057600080fd5b5051600160a060020a0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b60046020526000908152604090205460ff1681565b600354600160a060020a0316331461085457600080fd5b60035474010000000000000000000000000000000000000000900460ff161561087c57600080fd5b600160a060020a038216600081815260046020908152604091829020805460ff191685151590811790915582519384529083015280517f4b0adf6c802794c7dde28a08a4e07131abcff3bf9603cd71f14f90bec7865efa9281900390910190a15050565b336000908152600260209081526040808320600160a060020a03861684529091528120548083111561093557336000908152600260209081526040808320600160a060020a038816845290915281205561096a565b610945818463ffffffff610ccf16565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a031660009081526020819052604090205490565b600354600160a060020a031681565b6000600160a060020a0383161515610a1157600080fd5b33600090815260208190526040902054821115610a2d57600080fd5b33600090815260208190526040902054610a4d908363ffffffff610ccf16565b3360009081526020819052604080822092909255600160a060020a03851681522054610a7f908363ffffffff610ce116565b600160a060020a038416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600091600160a060020a038416916370a082319160248082019260209290919082900301818787803b158015610b3f57600080fd5b505af1158015610b53573d6000803e3d6000fd5b505050506040513d6020811015610b6957600080fd5b505192915050565b336000908152600260209081526040808320600160a060020a0386168452909152812054610ba5908363ffffffff610ce116565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600190565b600354600160a060020a03163314610c5157600080fd5b600160a060020a0381161515610c6657600080fd5b600354604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600082821115610cdb57fe5b50900390565b600082820183811015610cf057fe5b93925050505600a165627a7a72305820e5c7f5b40bacf11f042f309019026e210005d705e51634cccba5a71f8aa276fa0029", "bytecode_runtime": "0x6080604052600436106100f05763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166305d2035b81146100f5578063095ea7b31461011e57806316114acd1461014257806318160ddd1461016557806323b872dd1461018c57806340c10f19146101b657806342c1867b146101da57806343214675146101fb578063661884631461022157806370a08231146102455780638da5cb5b14610266578063a9059cbb14610297578063c45d19db146102bb578063d73dd623146102dc578063dd62ed3e14610300578063eefa597b14610327578063f2fde38b1461033c575b600080fd5b34801561010157600080fd5b5061010a61035d565b604080519115158252519081900360200190f35b34801561012a57600080fd5b5061010a600160a060020a036004351660243561037e565b34801561014e57600080fd5b50610163600160a060020a03600435166103e4565b005b34801561017157600080fd5b5061017a6104b4565b60408051918252519081900360200190f35b34801561019857600080fd5b5061010a600160a060020a03600435811690602435166044356104ba565b3480156101c257600080fd5b50610163600160a060020a0360043516602435610631565b3480156101e657600080fd5b5061010a600160a060020a0360043516610828565b34801561020757600080fd5b50610163600160a060020a0360043516602435151561083d565b34801561022d57600080fd5b5061010a600160a060020a03600435166024356108e0565b34801561025157600080fd5b5061017a600160a060020a03600435166109d0565b34801561027257600080fd5b5061027b6109eb565b60408051600160a060020a039092168252519081900360200190f35b3480156102a357600080fd5b5061010a600160a060020a03600435166024356109fa565b3480156102c757600080fd5b5061017a600160a060020a0360043516610adb565b3480156102e857600080fd5b5061010a600160a060020a0360043516602435610b71565b34801561030c57600080fd5b5061017a600160a060020a0360043581169060243516610c0a565b34801561033357600080fd5b5061010a610c35565b34801561034857600080fd5b50610163600160a060020a0360043516610c3a565b60035474010000000000000000000000000000000000000000900460ff1681565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b600354600160a060020a031633146103fb57600080fd5b600354600160a060020a038083169163a9059cbb911661041a84610adb565b6040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b15801561048557600080fd5b505af1158015610499573d6000803e3d6000fd5b505050506040513d60208110156104af57600080fd5b505050565b60015490565b6000600160a060020a03831615156104d157600080fd5b600160a060020a0384166000908152602081905260409020548211156104f657600080fd5b600160a060020a038416600090815260026020908152604080832033845290915290205482111561052657600080fd5b600160a060020a03841660009081526020819052604090205461054f908363ffffffff610ccf16565b600160a060020a038086166000908152602081905260408082209390935590851681522054610584908363ffffffff610ce116565b600160a060020a038085166000908152602081815260408083209490945591871681526002825282812033825290915220546105c6908363ffffffff610ccf16565b600160a060020a03808616600081815260026020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b3360009081526004602052604090205460ff16151561064f57600080fd5b60035474010000000000000000000000000000000000000000900460ff161561067757600080fd5b60015473__contracts/SafeMathLib.sol:SafeMathLi__6366098d4f9091836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b1580156106ee57600080fd5b505af4158015610702573d6000803e3d6000fd5b505050506040513d602081101561071857600080fd5b5051600155600160a060020a038216600090815260208181526040918290205482517f66098d4f000000000000000000000000000000000000000000000000000000008152600481019190915260248101849052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b1580156107a657600080fd5b505af41580156107ba573d6000803e3d6000fd5b505050506040513d60208110156107d057600080fd5b5051600160a060020a0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b60046020526000908152604090205460ff1681565b600354600160a060020a0316331461085457600080fd5b60035474010000000000000000000000000000000000000000900460ff161561087c57600080fd5b600160a060020a038216600081815260046020908152604091829020805460ff191685151590811790915582519384529083015280517f4b0adf6c802794c7dde28a08a4e07131abcff3bf9603cd71f14f90bec7865efa9281900390910190a15050565b336000908152600260209081526040808320600160a060020a03861684529091528120548083111561093557336000908152600260209081526040808320600160a060020a038816845290915281205561096a565b610945818463ffffffff610ccf16565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a031660009081526020819052604090205490565b600354600160a060020a031681565b6000600160a060020a0383161515610a1157600080fd5b33600090815260208190526040902054821115610a2d57600080fd5b33600090815260208190526040902054610a4d908363ffffffff610ccf16565b3360009081526020819052604080822092909255600160a060020a03851681522054610a7f908363ffffffff610ce116565b600160a060020a038416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600091600160a060020a038416916370a082319160248082019260209290919082900301818787803b158015610b3f57600080fd5b505af1158015610b53573d6000803e3d6000fd5b505050506040513d6020811015610b6957600080fd5b505192915050565b336000908152600260209081526040808320600160a060020a0386168452909152812054610ba5908363ffffffff610ce116565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600190565b600354600160a060020a03163314610c5157600080fd5b600160a060020a0381161515610c6657600080fd5b600354604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600082821115610cdb57fe5b50900390565b600082820183811015610cf057fe5b93925050505600a165627a7a72305820e5c7f5b40bacf11f042f309019026e210005d705e51634cccba5a71f8aa276fa0029", "direct_dependencies": ["SafeMathLib"], "full_dependencies": ["SafeMathLib"], "linkrefs": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 3394}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 3882}], "linkrefs_runtime": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 3320}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 3808}], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": true, "inputs": [], "name": "mintingFinished", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "approve", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "recoverTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_from", "type": "address"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "receiver", "type": "address"}, {"name": "amount", "type": "uint256"}], "name": "mint", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "mintAgents", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "state", "type": "bool"}], "name": "setMintAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_subtractedValue", "type": "uint256"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "tokensToBeReturned", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_addedValue", "type": "uint256"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}, {"name": "_spender", "type": "address"}], "name": "allowance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isToken", "outputs": [{"name": "weAre", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "addr", "type": "address"}, {"indexed": false, "name": "state", "type": "bool"}], "name": "MintingAgentChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "receiver", "type": "address"}, {"indexed": false, "name": "amount", "type": "uint256"}], "name": "Minted", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}, {"indexed": true, "name": "spender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "devdoc": {"methods": {"allowance(address,address)": {"details": "Function to check the amount of tokens that an owner allowed to a spender.", "params": {"_owner": "address The address which owns the funds.", "_spender": "address The address which will spend the funds."}, "return": "A uint256 specifying the amount of tokens still available for the spender."}, "approve(address,uint256)": {"details": "Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729", "params": {"_spender": "The address which will spend the funds.", "_value": "The amount of tokens to be spent."}}, "balanceOf(address)": {"details": "Gets the balance of the specified address.", "params": {"_owner": "The address to query the the balance of."}, "return": "An uint256 representing the amount owned by the passed address."}, "decreaseApproval(address,uint256)": {"details": "Decrease the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[_spender] == 0. To decrement allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"_spender": "The address which will spend the funds.", "_subtractedValue": "The amount of tokens to decrease the allowance by."}}, "increaseApproval(address,uint256)": {"details": "Increase the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[_spender] == 0. To increment allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"_addedValue": "The amount of tokens to increase the allowance by.", "_spender": "The address which will spend the funds."}}, "recoverTokens(address)": {"details": "This will be invoked by the owner, when owner wants to rescue tokens", "params": {"token": "Token which will we rescue to the owner from the contract"}}, "tokensToBeReturned(address)": {"details": "Interface function, can be overwritten by the superclass", "params": {"token": "Token which balance we will check and return"}, "return": "The amount of tokens (in smallest denominator) the contract owns"}, "totalSupply()": {"details": "total number of tokens in existence"}, "transfer(address,uint256)": {"details": "transfer token for a specified address", "params": {"_to": "The address to transfer to.", "_value": "The amount to be transferred."}}, "transferFrom(address,address,uint256)": {"details": "Transfer tokens from one address to another", "params": {"_from": "address The address which you want to send tokens from", "_to": "address The address which you want to transfer to", "_value": "uint256 the amount of tokens to be transferred"}}, "transferOwnership(address)": {"details": "Allows the current owner to transfer control of the contract to a newOwner.", "params": {"newOwner": "The address to transfer ownership to."}}}}, "userdoc": {"methods": {"mint(address,uint256)": {"notice": "Create new tokens and allocate them to an address.. * Only callably by a crowdsale contract (mint agent)."}, "setMintAgent(address,bool)": {"notice": "Owner can allow a crowdsale contract to mint new tokens."}}}}, "settings": {"compilationTarget": {"contracts/MintableToken.sol": "MintableToken"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/MintableToken.sol": {"keccak256": "0x650e1d6b2bedcd36508918357c7cf4f36fdd093cd0c4d6342f4dcd3bdcdd7578", "urls": ["bzzr://7ba2ac0480d428066a18727e2adb76ba56856ecd37b4420e801131ec8f8f4be3"]}, "contracts/Recoverable.sol": {"keccak256": "0x311a332cdd87df6e00057f5455f4e68b043b5dbe211f6d68bc64e20817515635", "urls": ["bzzr://4fd99bcfb93baed6e7c8d22ee9ecc5c8346a1aa98288e77b01333b2c5d3f582d"]}, "contracts/SafeMathLib.sol": {"keccak256": "0x501bfe31e274b9a5591f7c540bdced4d4312e27d4f19599147c9bbca3d9c6b18", "urls": ["bzzr://a80935ebddb06c247d71372d4e5833ee029f08633bd0fe4a274a57009567e5b9"]}, "contracts/StandardTokenExt.sol": {"keccak256": "0x9ea2d4cec4dccd5639c05e6c23dd027d80b5e5a20abd99b280ab7b2631b5a5fc", "urls": ["bzzr://a52d8fc5a21bd83997aff19128e00dceb251df712207b61223894c8b7f42d5ff"]}, "zeppelin/contracts/math/SafeMath.sol": {"keccak256": "0x341ba8cb467a3623e819ba1a683ac1d264005186f308505214e5f6bc89446a08", "urls": ["bzzr://59b5652ee4e4a1b5a8f1a8906e14c84af43d636cf5ca0725cc1813aabe4c8c17"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}, "zeppelin/contracts/token/ERC20/BasicToken.sol": {"keccak256": "0x948404468d61ff35ea4194650670408dabd65da7f905a1c16888ab84520bf39e", "urls": ["bzzr://ea75e20f95d7e4e10394fe6bfaa8eee56b4757c2a6f1e8df4180d33afa621935"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}, "zeppelin/contracts/token/ERC20/StandardToken.sol": {"keccak256": "0xd2b344a5259e19ec143074cfa65637a10c40b68395c59808c4af13bccbb2de55", "urls": ["bzzr://d61a01175a7ca1ba9f4403de603c20b897e33ec425aef2d9f8a7f9ddfdfaf5b2"]}}, "version": 1}, "name": "MintableToken", "ordered_full_dependencies": ["SafeMathLib"], "source_path": "contracts/MintableToken.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n assert(c / a == b);\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n\n\n\n/**\n * @title Basic token\n * @dev Basic version of StandardToken, with no allowances.\n */\ncontract BasicToken is ERC20Basic {\n using SafeMath for uint256;\n\n mapping(address => uint256) balances;\n\n uint256 totalSupply_;\n\n /**\n * @dev total number of tokens in existence\n */\n function totalSupply() public view returns (uint256) {\n return totalSupply_;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param _to The address to transfer to.\n * @param _value The amount to be transferred.\n */\n function transfer(address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[msg.sender]);\n\n // SafeMath.sub will throw if there is not enough balance.\n balances[msg.sender] = balances[msg.sender].sub(_value);\n balances[_to] = balances[_to].add(_value);\n Transfer(msg.sender, _to, _value);\n return true;\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param _owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address _owner) public view returns (uint256 balance) {\n return balances[_owner];\n }\n\n}\n\n\n\n\n/**\n * @title Standard ERC20 token\n *\n * @dev Implementation of the basic standard token.\n * @dev https://github.com/ethereum/EIPs/issues/20\n * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol\n */\ncontract StandardToken is ERC20, BasicToken {\n\n mapping (address => mapping (address => uint256)) internal allowed;\n\n\n /**\n * @dev Transfer tokens from one address to another\n * @param _from address The address which you want to send tokens from\n * @param _to address The address which you want to transfer to\n * @param _value uint256 the amount of tokens to be transferred\n */\n function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[_from]);\n require(_value <= allowed[_from][msg.sender]);\n\n balances[_from] = balances[_from].sub(_value);\n balances[_to] = balances[_to].add(_value);\n allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);\n Transfer(_from, _to, _value);\n return true;\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n *\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param _spender The address which will spend the funds.\n * @param _value The amount of tokens to be spent.\n */\n function approve(address _spender, uint256 _value) public returns (bool) {\n allowed[msg.sender][_spender] = _value;\n Approval(msg.sender, _spender, _value);\n return true;\n }\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param _owner address The address which owns the funds.\n * @param _spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address _owner, address _spender) public view returns (uint256) {\n return allowed[_owner][_spender];\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(address _spender, uint _addedValue) public returns (bool) {\n allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {\n uint oldValue = allowed[msg.sender][_spender];\n if (_subtractedValue > oldValue) {\n allowed[msg.sender][_spender] = 0;\n } else {\n allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);\n }\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n\ncontract Recoverable is Ownable {\n\n /// @dev Empty constructor (for now)\n function Recoverable() {\n }\n\n /// @dev This will be invoked by the owner, when owner wants to rescue tokens\n /// @param token Token which will we rescue to the owner from the contract\n function recoverTokens(ERC20Basic token) onlyOwner public {\n token.transfer(owner, tokensToBeReturned(token));\n }\n\n /// @dev Interface function, can be overwritten by the superclass\n /// @param token Token which balance we will check and return\n /// @return The amount of tokens (in smallest denominator) the contract owns\n function tokensToBeReturned(ERC20Basic token) public returns (uint) {\n return token.balanceOf(this);\n }\n}\n\n\n\n/**\n * Standard EIP-20 token with an interface marker.\n *\n * @notice Interface marker is used by crowdsale contracts to validate that addresses point a good token contract.\n *\n */\ncontract StandardTokenExt is StandardToken, Recoverable {\n\n /* Interface declaration */\n function isToken() public constant returns (bool weAre) {\n return true;\n }\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Safe unsigned safe math.\n *\n * https://blog.aragon.one/library-driven-development-in-solidity-2bebcaf88736#.750gwtwli\n *\n * Originally from https://raw.githubusercontent.com/AragonOne/zeppelin-solidity/master/contracts/SafeMathLib.sol\n *\n * Maintained here until merged to mainline zeppelin-solidity.\n *\n */\nlibrary SafeMathLib {\n\n function times(uint a, uint b) returns (uint) {\n uint c = a * b;\n assert(a == 0 || c / a == b);\n return c;\n }\n\n function minus(uint a, uint b) returns (uint) {\n assert(b <= a);\n return a - b;\n }\n\n function plus(uint a, uint b) returns (uint) {\n uint c = a + b;\n assert(c>=a);\n return c;\n }\n\n}\n\n\n\n/**\n * A token that can increase its supply by another contract.\n *\n * This allows uncapped crowdsale by dynamically increasing the supply when money pours in.\n * Only mint agents, contracts whitelisted by owner, can mint new tokens.\n *\n */\ncontract MintableToken is StandardTokenExt {\n\n using SafeMathLib for uint;\n\n bool public mintingFinished = false;\n\n /** List of agents that are allowed to create new tokens */\n mapping (address => bool) public mintAgents;\n\n event MintingAgentChanged(address addr, bool state);\n event Minted(address receiver, uint amount);\n\n /**\n * Create new tokens and allocate them to an address..\n *\n * Only callably by a crowdsale contract (mint agent).\n */\n function mint(address receiver, uint amount) onlyMintAgent canMint public {\n totalSupply_ = totalSupply_.plus(amount);\n balances[receiver] = balances[receiver].plus(amount);\n\n // This will make the mint transaction apper in EtherScan.io\n // We can remove this after there is a standardized minting event\n Transfer(0, receiver, amount);\n }\n\n /**\n * Owner can allow a crowdsale contract to mint new tokens.\n */\n function setMintAgent(address addr, bool state) onlyOwner canMint public {\n mintAgents[addr] = state;\n MintingAgentChanged(addr, state);\n }\n\n modifier onlyMintAgent() {\n // Only crowdsale contracts are allowed to mint new tokens\n if(!mintAgents[msg.sender]) {\n throw;\n }\n _;\n }\n\n /** Make sure we are not done yet. */\n modifier canMint() {\n if(mintingFinished) throw;\n _;\n }\n}\n"}, "MintedEthCappedCrowdsale": {"abi": [{"constant": true, "inputs": [], "name": "ownerTestValue", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "requireCustomerId", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "invest", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "isPricingSane", "outputs": [{"name": "sane", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "endsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "minimumFundingGoal", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getState", "outputs": [{"name": "", "type": "uint8"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setFinalizeAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "customerId", "type": "uint128"}, {"name": "v", "type": "uint8"}, {"name": "r", "type": "bytes32"}, {"name": "s", "type": "bytes32"}], "name": "investWithSignedAddress", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "investedAmountOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "finalizeAgent", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "receiver", "type": "address"}, {"name": "fullTokens", "type": "uint256"}, {"name": "weiPrice", "type": "uint256"}], "name": "preallocate", "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": "isCrowdsale", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "finalize", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_pricingStrategy", "type": "address"}], "name": "setPricingStrategy", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "tokensSold", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "refund", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "signerAddress", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "weiRefunded", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "halt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}, {"name": "checksum", "type": "bytes1"}], "name": "buyWithCustomerIdWithChecksum", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "time", "type": "uint256"}], "name": "setEndsAt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "pricingStrategy", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "loadedRefund", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isMinimumGoalReached", "outputs": [{"name": "reached", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "bool"}], "name": "setRequireCustomerId", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "weiCap", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "loadRefund", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "val", "type": "uint256"}], "name": "setOwnerTestValue", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "weisTotal", "type": "uint256"}, {"name": "pricePerToken", "type": "uint256"}], "name": "calculateTokens", "outputs": [{"name": "tokensTotal", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "multisigWallet", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "tokenAmountOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}], "name": "buyWithCustomerId", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [{"name": "weiAmount", "type": "uint256"}, {"name": "tokenAmount", "type": "uint256"}, {"name": "weiRaisedTotal", "type": "uint256"}, {"name": "tokensSoldTotal", "type": "uint256"}], "name": "isBreakingCap", "outputs": [{"name": "limitBroken", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "buy", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "isFinalizerSane", "outputs": [{"name": "sane", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "startsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "finalized", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "halted", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "earlyParticipantWhitelist", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "unhalt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "requiredSignedAddress", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isCrowdsaleFull", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "investorCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "status", "type": "bool"}], "name": "setEarlyParicipantWhitelist", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "bool"}, {"name": "_signerAddress", "type": "address"}], "name": "setRequireSignedAddress", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "customerId", "type": "uint128"}], "name": "investWithCustomerId", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setMultisig", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}, {"name": "v", "type": "uint8"}, {"name": "r", "type": "bytes32"}, {"name": "s", "type": "bytes32"}], "name": "buyWithSignedAddress", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "presaleWeiRaised", "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": "_token", "type": "address"}, {"name": "_pricingStrategy", "type": "address"}, {"name": "_multisigWallet", "type": "address"}, {"name": "_start", "type": "uint256"}, {"name": "_end", "type": "uint256"}, {"name": "_minimumFundingGoal", "type": "uint256"}, {"name": "_weiCap", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"payable": true, "stateMutability": "payable", "type": "fallback"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}, {"indexed": false, "name": "tokenAmount", "type": "uint256"}, {"indexed": false, "name": "customerId", "type": "uint128"}], "name": "Invested", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}], "name": "Refund", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newRequireCustomerId", "type": "bool"}, {"indexed": false, "name": "newRequiredSignedAddress", "type": "bool"}, {"indexed": false, "name": "newSignerAddress", "type": "address"}], "name": "InvestmentPolicyChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "addr", "type": "address"}, {"indexed": false, "name": "status", "type": "bool"}], "name": "Whitelisted", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newEndsAt", "type": "uint256"}], "name": "EndsAtChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "bytecode": "0x6080604052600560015560006009556000600a556000600b556000600c556000600d556000600e553480156200003457600080fd5b5060405160e0806200264183398101604090815281516020830151918301516060840151608085015160a086015160c0909601516000805433600160a060020a0319918216811782161790915560028054909116600160a060020a0387161790559395929391929091868686868686858585858585620000bd856401000000006200013f810204565b60058054600160a060020a031916600160a060020a038681169190911791829055161515620000eb57600080fd5b821515620000f857600080fd5b60078390558115156200010a57600080fd5b600882905560075482116200011e57600080fd5b600655505050601598909855506200020c9c50505050505050505050505050565b600054600160a060020a031633146200015757600080fd5b60038054600160a060020a031916600160a060020a038381169190911791829055604080517f04bbc255000000000000000000000000000000000000000000000000000000008152905192909116916304bbc255916004808201926020929091908290030181600087803b158015620001cf57600080fd5b505af1158015620001e4573d6000803e3d6000fd5b505050506040513d6020811015620001fb57600080fd5b505115156200020957600080fd5b50565b612425806200021c6000396000f3006080604052600436106102925763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630226401d811461029757806303ca0eed146102be57806303f9c793146102e7578063062b01ce146102fd5780630a09284a1461031257806313f4e977146103275780631865c57d1461033c57806319b667da146103755780631a49803b146103965780631aae3460146103cb57806321d5c0f6146103ec57806332013ac31461041d5780634042b66f146104445780634551dd59146104595780634bb278f31461046e57806350c6773414610483578063518ab2a8146104a4578063590e1ae3146104b95780635b7633d0146104ce5780635da89ac0146104e35780635ed7ca5b146104f85780636203f09f1461050d57806363c6082f146105225780636e50eb3f1461056457806378b99c241461057c578063797d9437146105915780637c2e08a3146105a65780637f7d711e146105bb57806384fe5029146105d557806387612102146105ea5780638d51faec146105f25780638da5cb5b1461060a578063903cc5831461061f5780639075becf1461063a57806397b150ca1461064f57806399e9376c146106705780639d3c663f1461068d578063a6f2ae3a146106ae578063a7ba44c3146106b6578063af468682146106cb578063b3f05b97146106e0578063b9b8af0b146106f5578063cb16e6d01461070a578063cb3e64fd1461072b578063d222dc0414610740578063d5d0902114610755578063d7e64c001461076a578063eac249321461077f578063ed68ff2c146107a5578063ef869443146107cb578063f2fde38b146107f4578063f3283fba14610815578063f486972614610836578063f7c00e2f1461085f578063fc0c546a14610874575b600080fd5b3480156102a357600080fd5b506102ac610889565b60408051918252519081900360200190f35b3480156102ca57600080fd5b506102d361088f565b604080519115158252519081900360200190f35b6102fb600160a060020a0360043516610898565b005b34801561030957600080fd5b506102d36108cc565b34801561031e57600080fd5b506102ac610963565b34801561033357600080fd5b506102ac610969565b34801561034857600080fd5b5061035161096f565b6040518082600781111561036157fe5b60ff16815260200191505060405180910390f35b34801561038157600080fd5b506102fb600160a060020a0360043516610b5d565b6102fb600160a060020a03600435166fffffffffffffffffffffffffffffffff6024351660ff60443516606435608435610c2e565b3480156103d757600080fd5b506102ac600160a060020a0360043516610d56565b3480156103f857600080fd5b50610401610d68565b60408051600160a060020a039092168252519081900360200190f35b34801561042957600080fd5b506102fb600160a060020a0360043516602435604435610d77565b34801561045057600080fd5b506102ac61112d565b34801561046557600080fd5b506102d3611133565b34801561047a57600080fd5b506102fb611138565b34801561048f57600080fd5b506102fb600160a060020a036004351661123d565b3480156104b057600080fd5b506102ac6112d8565b3480156104c557600080fd5b506102fb6112de565b3480156104da57600080fd5b50610401611424565b3480156104ef57600080fd5b506102ac611439565b34801561050457600080fd5b506102fb61143f565b34801561051957600080fd5b506102ac61148d565b6102fb6fffffffffffffffffffffffffffffffff600435167fff0000000000000000000000000000000000000000000000000000000000000060243516611493565b34801561057057600080fd5b506102fb600435611505565b34801561058857600080fd5b50610401611573565b34801561059d57600080fd5b506102ac611582565b3480156105b257600080fd5b506102d3611588565b3480156105c757600080fd5b506102fb6004351515611593565b3480156105e157600080fd5b506102ac611617565b6102fb61161d565b3480156105fe57600080fd5b506102fb6004356116dd565b34801561061657600080fd5b506104016116f9565b34801561062b57600080fd5b506102ac600435602435611708565b34801561064657600080fd5b5061040161185f565b34801561065b57600080fd5b506102ac600160a060020a036004351661186e565b6102fb6fffffffffffffffffffffffffffffffff60043516611880565b34801561069957600080fd5b506102d360043560243560443560643561188a565b6102fb611895565b3480156106c257600080fd5b506102d36118a0565b3480156106d757600080fd5b506102ac61190e565b3480156106ec57600080fd5b506102d3611914565b34801561070157600080fd5b506102d361191d565b34801561071657600080fd5b506102d3600160a060020a036004351661193e565b34801561073757600080fd5b506102fb611953565b34801561074c57600080fd5b506102d36119b3565b34801561076157600080fd5b506102d36119c1565b34801561077657600080fd5b506102ac6119cc565b34801561078b57600080fd5b506102fb600160a060020a036004351660243515156119d2565b3480156107b157600080fd5b506102fb6004351515600160a060020a0360243516611a4d565b6102fb600160a060020a03600435166fffffffffffffffffffffffffffffffff60243516611afd565b34801561080057600080fd5b506102fb600160a060020a0360043516611b3f565b34801561082157600080fd5b506102fb600160a060020a0360043516611bd3565b6102fb6fffffffffffffffffffffffffffffffff6004351660ff60243516604435606435611c2a565b34801561086b57600080fd5b506102ac611c3d565b34801561088057600080fd5b50610401611c43565b60135481565b60145460ff1681565b60145460ff16156108a857600080fd5b601454610100900460ff16156108bd57600080fd5b6108c8816000611c52565b5050565b600354604080517f8e7682880000000000000000000000000000000000000000000000000000000081523060048201529051600092600160a060020a031691638e76828891602480830192602092919082900301818787803b15801561093157600080fd5b505af1158015610945573d6000803e3d6000fd5b505050506040513d602081101561095b57600080fd5b505190505b90565b60085481565b60065481565b600f5460009060ff161561098557506006610960565b600454600160a060020a0316151561099f57506001610960565b60048054604080517f82771c8e0000000000000000000000000000000000000000000000000000000081529051600160a060020a03909216926382771c8e9282820192602092908290030181600087803b1580156109fc57600080fd5b505af1158015610a10573d6000803e3d6000fd5b505050506040513d6020811015610a2657600080fd5b50511515610a3657506001610960565b600354604080517f8e7682880000000000000000000000000000000000000000000000000000000081523060048201529051600160a060020a0390921691638e768288916024808201926020929091908290030181600087803b158015610a9c57600080fd5b505af1158015610ab0573d6000803e3d6000fd5b505050506040513d6020811015610ac657600080fd5b50511515610ad657506001610960565b600754421015610ae857506002610960565b6008544211158015610aff5750610afd6119c1565b155b15610b0c57506003610960565b610b14611588565b15610b2157506004610960565b610b29611588565b158015610b3857506000600a54115b8015610b485750600a54600d5410155b15610b5557506007610960565b506005610960565b600054600160a060020a03163314610b7457600080fd5b6004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383811691909117808355604080517f614cb9040000000000000000000000000000000000000000000000000000000081529051919092169263614cb904928082019260209290918290030181600087803b158015610bf457600080fd5b505af1158015610c08573d6000803e3d6000fd5b505050506040513d6020811015610c1e57600080fd5b50511515610c2b57600080fd5b50565b60006002866040518082600160a060020a0316600160a060020a03166c010000000000000000000000000281526014019150506020604051808303816000865af1158015610c80573d6000803e3d6000fd5b5050506040513d6020811015610c9557600080fd5b5051601454604080516000808252602080830180855286905260ff8a16838501526060830189905260808301889052925194955062010000909304600160a060020a03169360019360a08084019493601f198401939081900390910191865af1158015610d06573d6000803e3d6000fd5b50505060206040510351600160a060020a0316141515610d2557600080fd5b6fffffffffffffffffffffffffffffffff85161515610d4357600080fd5b610d4d8686611c52565b50505050505050565b60106020526000908152604090205481565b600454600160a060020a031681565b600080548190600160a060020a03163314610d9157600080fd5b600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610dfd57600080fd5b505af1158015610e11573d6000803e3d6000fd5b505050506040513d6020811015610e2757600080fd5b5051600a8054604080516000805160206123da833981519152815260048101929092528688026024830181905290519390920a8702945090925073__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f91604480820192602092909190829003018186803b158015610e9d57600080fd5b505af4158015610eb1573d6000803e3d6000fd5b505050506040513d6020811015610ec757600080fd5b5051600a55600954604080516000805160206123da83398151915281526004810192909252602482018490525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b158015610f2f57600080fd5b505af4158015610f43573d6000803e3d6000fd5b505050506040513d6020811015610f5957600080fd5b5051600955600160a060020a0385166000908152601060209081526040918290205482516000805160206123da8339815191528152600481019190915260248101849052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b158015610fd757600080fd5b505af4158015610feb573d6000803e3d6000fd5b505050506040513d602081101561100157600080fd5b5051600160a060020a03861660009081526010602090815260408083209390935560118152908290205482516000805160206123da8339815191528152600481019190915260248101859052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561108757600080fd5b505af415801561109b573d6000803e3d6000fd5b505050506040513d60208110156110b157600080fd5b5051600160a060020a0386166000908152601160205260409020556110d68583611df9565b60408051600160a060020a0387168152602081018390528082018490526000606082015290517f0396f60aaad038749091d273dc13aaabc63db6e2271c7bad442d5cf25cc433509181900360800190a15050505050565b600a5481565b600190565b60048061114361096f565b600781111561114e57fe5b1461115857600080fd5b600054600160a060020a0316331461116f57600080fd5b60005474010000000000000000000000000000000000000000900460ff161561119757600080fd5b600f5460ff16156111a757600080fd5b600454600160a060020a03161561122d5760048054604080517f0bf318a30000000000000000000000000000000000000000000000000000000081529051600160a060020a0390921692630bf318a392828201926000929082900301818387803b15801561121457600080fd5b505af1158015611228573d6000803e3d6000fd5b505050505b50600f805460ff19166001179055565b600054600160a060020a0316331461125457600080fd5b6003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038381169190911791829055604080517f04bbc255000000000000000000000000000000000000000000000000000000008152905192909116916304bbc255916004808201926020929091908290030181600087803b158015610bf457600080fd5b60095481565b60006007806112eb61096f565b60078111156112f657fe5b1461130057600080fd5b33600090815260106020526040902054915081151561131e57600080fd5b33600090815260106020908152604080832092909255600e5482516000805160206123da8339815191528152600481019190915260248101859052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561139357600080fd5b505af41580156113a7573d6000803e3d6000fd5b505050506040513d60208110156113bd57600080fd5b5051600e55604080513381526020810184905281517fbb28353e4598c3b9199101a66e0989549b659a59a54d2c27fbb183f1932c8e6d929181900390910190a1604051339083156108fc029084906000818181858888f1935050505015156108c857600080fd5b601454620100009004600160a060020a031681565b600e5481565b600054600160a060020a0316331461145657600080fd5b6000805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b60015481565b604080517001000000000000000000000000000000006fffffffffffffffffffffffffffffffff851602815290519081900360100190207fff00000000000000000000000000000000000000000000000000000000000000908116908216146114fb57600080fd5b6108c83383611afd565b600054600160a060020a0316331461151c57600080fd5b8042111561152957600080fd5b80600754111561153857600080fd5b60088190556040805182815290517fd34bb772c4ae9baa99db852f622773b31c7827e8ee818449fef20d30980bd3109181900360200190a150565b600354600160a060020a031681565b600d5481565b600654600a54101590565b600054600160a060020a031633146115aa57600080fd5b6014805460ff191682151517908190556040805160ff808416151582526101008404161515602082015262010000909204600160a060020a031682820152517f48d826081348f5f00e8a33c9ae8ce89ed4c6e88400b585a478bc203d9e8177d3916060908290030190a150565b60155481565b60058061162861096f565b600781111561163357fe5b1461163d57600080fd5b34151561164957600080fd5b600d54604080516000805160206123da833981519152815260048101929092523460248301525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b1580156116ab57600080fd5b505af41580156116bf573d6000803e3d6000fd5b505050506040513d60208110156116d557600080fd5b5051600d5550565b600054600160a060020a031633146116f457600080fd5b601355565b600054600160a060020a031681565b600080600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561177757600080fd5b505af115801561178b573d6000803e3d6000fd5b505050506040513d60208110156117a157600080fd5b5051604080517f1d3b9edf00000000000000000000000000000000000000000000000000000000815260048101879052600a9290920a602483018190529051909250849173__contracts/SafeMathLib.sol:SafeMathLi__91631d3b9edf91604480820192602092909190829003018186803b15801561182157600080fd5b505af4158015611835573d6000803e3d6000fd5b505050506040513d602081101561184b57600080fd5b505181151561185657fe5b04949350505050565b600554600160a060020a031681565b60116020526000908152604090205481565b610c2b3382611afd565b506015541092915050565b61189e33610898565b565b6000600460009054906101000a9004600160a060020a0316600160a060020a03166382771c8e6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561093157600080fd5b60075481565b600f5460ff1681565b60005474010000000000000000000000000000000000000000900460ff1681565b60126020526000908152604090205460ff1681565b600054600160a060020a0316331461196a57600080fd5b60005474010000000000000000000000000000000000000000900460ff16151561199357600080fd5b6000805474ff000000000000000000000000000000000000000019169055565b601454610100900460ff1681565b601554600a54101590565b600c5481565b600054600160a060020a031633146119e957600080fd5b600160a060020a038216600081815260126020908152604091829020805460ff191685151590811790915582519384529083015280517fa54714518c5d275fdcd3d2a461e4858e4e8cb04fb93cd0bca9d6d34115f264409281900390910190a15050565b600054600160a060020a03163314611a6457600080fd5b60148054600160a060020a038084166201000090810275ffffffffffffffffffffffffffffffffffffffff00001987151561010090810261ff0019909616959095171617938490556040805160ff86811615158252948604909416151560208501529304168183015290517f48d826081348f5f00e8a33c9ae8ce89ed4c6e88400b585a478bc203d9e8177d39181900360600190a15050565b601454610100900460ff1615611b1257600080fd5b6fffffffffffffffffffffffffffffffff81161515611b3057600080fd5b611b3a8282611c52565b505050565b600054600160a060020a03163314611b5657600080fd5b600160a060020a0381161515611b6b57600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600054600160a060020a03163314611bea57600080fd5b600154600c541115611bfb57600080fd5b6005805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b611c373385858585610c2e565b50505050565b600b5481565b600254600160a060020a031681565b6000805474010000000000000000000000000000000000000000900460ff1615611c7b57600080fd5b611df28383600360009054906101000a9004600160a060020a0316600160a060020a03166318a4155e34600b54600a540360095433600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015611d1c57600080fd5b505af1158015611d30573d6000803e3d6000fd5b505050506040513d6020811015611d4657600080fd5b5051604080517c010000000000000000000000000000000000000000000000000000000063ffffffff8916028152600481019690965260248601949094526044850192909252600160a060020a0316606484015260848301525160a48083019260209291908290030181600087803b158015611dc157600080fd5b505af1158015611dd5573d6000803e3d6000fd5b505050506040513d6020811015611deb57600080fd5b5051611e7e565b9392505050565b600254604080517f40c10f19000000000000000000000000000000000000000000000000000000008152600160a060020a038581166004830152602482018590529151919092169182916340c10f199160448082019260009290919082900301818387803b158015611e6a57600080fd5b505af1158015610d4d573d6000803e3d6000fd5b60008054819074010000000000000000000000000000000000000000900460ff1615611ea957600080fd5b6002611eb361096f565b6007811115611ebe57fe5b1415611ef057600160a060020a03851660009081526012602052604090205460ff161515611eeb57600080fd5b611f0c565b6003611efa61096f565b6007811115611f0557fe5b1415610292575b5034821515611f1a57600080fd5b600160a060020a0385166000908152601060205260409020541515611f4357600c805460010190555b600160a060020a0385166000908152601060209081526040918290205482516000805160206123da8339815191528152600481019190915260248101849052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b158015611fbc57600080fd5b505af4158015611fd0573d6000803e3d6000fd5b505050506040513d6020811015611fe657600080fd5b5051600160a060020a03861660009081526010602090815260408083209390935560118152908290205482516000805160206123da8339815191528152600481019190915260248101869052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561206c57600080fd5b505af4158015612080573d6000803e3d6000fd5b505050506040513d602081101561209657600080fd5b5051600160a060020a03861660009081526011602090815260409182902092909255600a5481516000805160206123da8339815191528152600481019190915260248101849052905173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f9260448082019391829003018186803b15801561211657600080fd5b505af415801561212a573d6000803e3d6000fd5b505050506040513d602081101561214057600080fd5b5051600a55600954604080516000805160206123da83398151915281526004810192909252602482018590525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b1580156121a857600080fd5b505af41580156121bc573d6000803e3d6000fd5b505050506040513d60208110156121d257600080fd5b5051600955600354604080517ff14ae17d000000000000000000000000000000000000000000000000000000008152600160a060020a0388811660048301529151919092169163f14ae17d9160248083019260209291908290030181600087803b15801561223f57600080fd5b505af1158015612253573d6000803e3d6000fd5b505050506040513d602081101561226957600080fd5b50511561231757600b5473__contracts/SafeMathLib.sol:SafeMathLi__6366098d4f9091836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b1580156122e757600080fd5b505af41580156122fb573d6000803e3d6000fd5b505050506040513d602081101561231157600080fd5b5051600b555b6123278184600a5460095461188a565b1561233157600080fd5b61233b8584611df9565b600554604051600160a060020a039091169082156108fc029083906000818181858888f19350505050151561236f57600080fd5b60408051600160a060020a0387168152602081018390528082018590526fffffffffffffffffffffffffffffffff8616606082015290517f0396f60aaad038749091d273dc13aaabc63db6e2271c7bad442d5cf25cc433509181900360800190a150909392505050560066098d4f00000000000000000000000000000000000000000000000000000000a165627a7a72305820ccf242c2b1c36bba5a827f39ef1ddb685f427668fea0301bbdbe3b87959481560029", "bytecode_runtime": "0x6080604052600436106102925763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630226401d811461029757806303ca0eed146102be57806303f9c793146102e7578063062b01ce146102fd5780630a09284a1461031257806313f4e977146103275780631865c57d1461033c57806319b667da146103755780631a49803b146103965780631aae3460146103cb57806321d5c0f6146103ec57806332013ac31461041d5780634042b66f146104445780634551dd59146104595780634bb278f31461046e57806350c6773414610483578063518ab2a8146104a4578063590e1ae3146104b95780635b7633d0146104ce5780635da89ac0146104e35780635ed7ca5b146104f85780636203f09f1461050d57806363c6082f146105225780636e50eb3f1461056457806378b99c241461057c578063797d9437146105915780637c2e08a3146105a65780637f7d711e146105bb57806384fe5029146105d557806387612102146105ea5780638d51faec146105f25780638da5cb5b1461060a578063903cc5831461061f5780639075becf1461063a57806397b150ca1461064f57806399e9376c146106705780639d3c663f1461068d578063a6f2ae3a146106ae578063a7ba44c3146106b6578063af468682146106cb578063b3f05b97146106e0578063b9b8af0b146106f5578063cb16e6d01461070a578063cb3e64fd1461072b578063d222dc0414610740578063d5d0902114610755578063d7e64c001461076a578063eac249321461077f578063ed68ff2c146107a5578063ef869443146107cb578063f2fde38b146107f4578063f3283fba14610815578063f486972614610836578063f7c00e2f1461085f578063fc0c546a14610874575b600080fd5b3480156102a357600080fd5b506102ac610889565b60408051918252519081900360200190f35b3480156102ca57600080fd5b506102d361088f565b604080519115158252519081900360200190f35b6102fb600160a060020a0360043516610898565b005b34801561030957600080fd5b506102d36108cc565b34801561031e57600080fd5b506102ac610963565b34801561033357600080fd5b506102ac610969565b34801561034857600080fd5b5061035161096f565b6040518082600781111561036157fe5b60ff16815260200191505060405180910390f35b34801561038157600080fd5b506102fb600160a060020a0360043516610b5d565b6102fb600160a060020a03600435166fffffffffffffffffffffffffffffffff6024351660ff60443516606435608435610c2e565b3480156103d757600080fd5b506102ac600160a060020a0360043516610d56565b3480156103f857600080fd5b50610401610d68565b60408051600160a060020a039092168252519081900360200190f35b34801561042957600080fd5b506102fb600160a060020a0360043516602435604435610d77565b34801561045057600080fd5b506102ac61112d565b34801561046557600080fd5b506102d3611133565b34801561047a57600080fd5b506102fb611138565b34801561048f57600080fd5b506102fb600160a060020a036004351661123d565b3480156104b057600080fd5b506102ac6112d8565b3480156104c557600080fd5b506102fb6112de565b3480156104da57600080fd5b50610401611424565b3480156104ef57600080fd5b506102ac611439565b34801561050457600080fd5b506102fb61143f565b34801561051957600080fd5b506102ac61148d565b6102fb6fffffffffffffffffffffffffffffffff600435167fff0000000000000000000000000000000000000000000000000000000000000060243516611493565b34801561057057600080fd5b506102fb600435611505565b34801561058857600080fd5b50610401611573565b34801561059d57600080fd5b506102ac611582565b3480156105b257600080fd5b506102d3611588565b3480156105c757600080fd5b506102fb6004351515611593565b3480156105e157600080fd5b506102ac611617565b6102fb61161d565b3480156105fe57600080fd5b506102fb6004356116dd565b34801561061657600080fd5b506104016116f9565b34801561062b57600080fd5b506102ac600435602435611708565b34801561064657600080fd5b5061040161185f565b34801561065b57600080fd5b506102ac600160a060020a036004351661186e565b6102fb6fffffffffffffffffffffffffffffffff60043516611880565b34801561069957600080fd5b506102d360043560243560443560643561188a565b6102fb611895565b3480156106c257600080fd5b506102d36118a0565b3480156106d757600080fd5b506102ac61190e565b3480156106ec57600080fd5b506102d3611914565b34801561070157600080fd5b506102d361191d565b34801561071657600080fd5b506102d3600160a060020a036004351661193e565b34801561073757600080fd5b506102fb611953565b34801561074c57600080fd5b506102d36119b3565b34801561076157600080fd5b506102d36119c1565b34801561077657600080fd5b506102ac6119cc565b34801561078b57600080fd5b506102fb600160a060020a036004351660243515156119d2565b3480156107b157600080fd5b506102fb6004351515600160a060020a0360243516611a4d565b6102fb600160a060020a03600435166fffffffffffffffffffffffffffffffff60243516611afd565b34801561080057600080fd5b506102fb600160a060020a0360043516611b3f565b34801561082157600080fd5b506102fb600160a060020a0360043516611bd3565b6102fb6fffffffffffffffffffffffffffffffff6004351660ff60243516604435606435611c2a565b34801561086b57600080fd5b506102ac611c3d565b34801561088057600080fd5b50610401611c43565b60135481565b60145460ff1681565b60145460ff16156108a857600080fd5b601454610100900460ff16156108bd57600080fd5b6108c8816000611c52565b5050565b600354604080517f8e7682880000000000000000000000000000000000000000000000000000000081523060048201529051600092600160a060020a031691638e76828891602480830192602092919082900301818787803b15801561093157600080fd5b505af1158015610945573d6000803e3d6000fd5b505050506040513d602081101561095b57600080fd5b505190505b90565b60085481565b60065481565b600f5460009060ff161561098557506006610960565b600454600160a060020a0316151561099f57506001610960565b60048054604080517f82771c8e0000000000000000000000000000000000000000000000000000000081529051600160a060020a03909216926382771c8e9282820192602092908290030181600087803b1580156109fc57600080fd5b505af1158015610a10573d6000803e3d6000fd5b505050506040513d6020811015610a2657600080fd5b50511515610a3657506001610960565b600354604080517f8e7682880000000000000000000000000000000000000000000000000000000081523060048201529051600160a060020a0390921691638e768288916024808201926020929091908290030181600087803b158015610a9c57600080fd5b505af1158015610ab0573d6000803e3d6000fd5b505050506040513d6020811015610ac657600080fd5b50511515610ad657506001610960565b600754421015610ae857506002610960565b6008544211158015610aff5750610afd6119c1565b155b15610b0c57506003610960565b610b14611588565b15610b2157506004610960565b610b29611588565b158015610b3857506000600a54115b8015610b485750600a54600d5410155b15610b5557506007610960565b506005610960565b600054600160a060020a03163314610b7457600080fd5b6004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383811691909117808355604080517f614cb9040000000000000000000000000000000000000000000000000000000081529051919092169263614cb904928082019260209290918290030181600087803b158015610bf457600080fd5b505af1158015610c08573d6000803e3d6000fd5b505050506040513d6020811015610c1e57600080fd5b50511515610c2b57600080fd5b50565b60006002866040518082600160a060020a0316600160a060020a03166c010000000000000000000000000281526014019150506020604051808303816000865af1158015610c80573d6000803e3d6000fd5b5050506040513d6020811015610c9557600080fd5b5051601454604080516000808252602080830180855286905260ff8a16838501526060830189905260808301889052925194955062010000909304600160a060020a03169360019360a08084019493601f198401939081900390910191865af1158015610d06573d6000803e3d6000fd5b50505060206040510351600160a060020a0316141515610d2557600080fd5b6fffffffffffffffffffffffffffffffff85161515610d4357600080fd5b610d4d8686611c52565b50505050505050565b60106020526000908152604090205481565b600454600160a060020a031681565b600080548190600160a060020a03163314610d9157600080fd5b600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610dfd57600080fd5b505af1158015610e11573d6000803e3d6000fd5b505050506040513d6020811015610e2757600080fd5b5051600a8054604080516000805160206123da833981519152815260048101929092528688026024830181905290519390920a8702945090925073__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f91604480820192602092909190829003018186803b158015610e9d57600080fd5b505af4158015610eb1573d6000803e3d6000fd5b505050506040513d6020811015610ec757600080fd5b5051600a55600954604080516000805160206123da83398151915281526004810192909252602482018490525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b158015610f2f57600080fd5b505af4158015610f43573d6000803e3d6000fd5b505050506040513d6020811015610f5957600080fd5b5051600955600160a060020a0385166000908152601060209081526040918290205482516000805160206123da8339815191528152600481019190915260248101849052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b158015610fd757600080fd5b505af4158015610feb573d6000803e3d6000fd5b505050506040513d602081101561100157600080fd5b5051600160a060020a03861660009081526010602090815260408083209390935560118152908290205482516000805160206123da8339815191528152600481019190915260248101859052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561108757600080fd5b505af415801561109b573d6000803e3d6000fd5b505050506040513d60208110156110b157600080fd5b5051600160a060020a0386166000908152601160205260409020556110d68583611df9565b60408051600160a060020a0387168152602081018390528082018490526000606082015290517f0396f60aaad038749091d273dc13aaabc63db6e2271c7bad442d5cf25cc433509181900360800190a15050505050565b600a5481565b600190565b60048061114361096f565b600781111561114e57fe5b1461115857600080fd5b600054600160a060020a0316331461116f57600080fd5b60005474010000000000000000000000000000000000000000900460ff161561119757600080fd5b600f5460ff16156111a757600080fd5b600454600160a060020a03161561122d5760048054604080517f0bf318a30000000000000000000000000000000000000000000000000000000081529051600160a060020a0390921692630bf318a392828201926000929082900301818387803b15801561121457600080fd5b505af1158015611228573d6000803e3d6000fd5b505050505b50600f805460ff19166001179055565b600054600160a060020a0316331461125457600080fd5b6003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038381169190911791829055604080517f04bbc255000000000000000000000000000000000000000000000000000000008152905192909116916304bbc255916004808201926020929091908290030181600087803b158015610bf457600080fd5b60095481565b60006007806112eb61096f565b60078111156112f657fe5b1461130057600080fd5b33600090815260106020526040902054915081151561131e57600080fd5b33600090815260106020908152604080832092909255600e5482516000805160206123da8339815191528152600481019190915260248101859052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561139357600080fd5b505af41580156113a7573d6000803e3d6000fd5b505050506040513d60208110156113bd57600080fd5b5051600e55604080513381526020810184905281517fbb28353e4598c3b9199101a66e0989549b659a59a54d2c27fbb183f1932c8e6d929181900390910190a1604051339083156108fc029084906000818181858888f1935050505015156108c857600080fd5b601454620100009004600160a060020a031681565b600e5481565b600054600160a060020a0316331461145657600080fd5b6000805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b60015481565b604080517001000000000000000000000000000000006fffffffffffffffffffffffffffffffff851602815290519081900360100190207fff00000000000000000000000000000000000000000000000000000000000000908116908216146114fb57600080fd5b6108c83383611afd565b600054600160a060020a0316331461151c57600080fd5b8042111561152957600080fd5b80600754111561153857600080fd5b60088190556040805182815290517fd34bb772c4ae9baa99db852f622773b31c7827e8ee818449fef20d30980bd3109181900360200190a150565b600354600160a060020a031681565b600d5481565b600654600a54101590565b600054600160a060020a031633146115aa57600080fd5b6014805460ff191682151517908190556040805160ff808416151582526101008404161515602082015262010000909204600160a060020a031682820152517f48d826081348f5f00e8a33c9ae8ce89ed4c6e88400b585a478bc203d9e8177d3916060908290030190a150565b60155481565b60058061162861096f565b600781111561163357fe5b1461163d57600080fd5b34151561164957600080fd5b600d54604080516000805160206123da833981519152815260048101929092523460248301525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b1580156116ab57600080fd5b505af41580156116bf573d6000803e3d6000fd5b505050506040513d60208110156116d557600080fd5b5051600d5550565b600054600160a060020a031633146116f457600080fd5b601355565b600054600160a060020a031681565b600080600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561177757600080fd5b505af115801561178b573d6000803e3d6000fd5b505050506040513d60208110156117a157600080fd5b5051604080517f1d3b9edf00000000000000000000000000000000000000000000000000000000815260048101879052600a9290920a602483018190529051909250849173__contracts/SafeMathLib.sol:SafeMathLi__91631d3b9edf91604480820192602092909190829003018186803b15801561182157600080fd5b505af4158015611835573d6000803e3d6000fd5b505050506040513d602081101561184b57600080fd5b505181151561185657fe5b04949350505050565b600554600160a060020a031681565b60116020526000908152604090205481565b610c2b3382611afd565b506015541092915050565b61189e33610898565b565b6000600460009054906101000a9004600160a060020a0316600160a060020a03166382771c8e6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561093157600080fd5b60075481565b600f5460ff1681565b60005474010000000000000000000000000000000000000000900460ff1681565b60126020526000908152604090205460ff1681565b600054600160a060020a0316331461196a57600080fd5b60005474010000000000000000000000000000000000000000900460ff16151561199357600080fd5b6000805474ff000000000000000000000000000000000000000019169055565b601454610100900460ff1681565b601554600a54101590565b600c5481565b600054600160a060020a031633146119e957600080fd5b600160a060020a038216600081815260126020908152604091829020805460ff191685151590811790915582519384529083015280517fa54714518c5d275fdcd3d2a461e4858e4e8cb04fb93cd0bca9d6d34115f264409281900390910190a15050565b600054600160a060020a03163314611a6457600080fd5b60148054600160a060020a038084166201000090810275ffffffffffffffffffffffffffffffffffffffff00001987151561010090810261ff0019909616959095171617938490556040805160ff86811615158252948604909416151560208501529304168183015290517f48d826081348f5f00e8a33c9ae8ce89ed4c6e88400b585a478bc203d9e8177d39181900360600190a15050565b601454610100900460ff1615611b1257600080fd5b6fffffffffffffffffffffffffffffffff81161515611b3057600080fd5b611b3a8282611c52565b505050565b600054600160a060020a03163314611b5657600080fd5b600160a060020a0381161515611b6b57600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600054600160a060020a03163314611bea57600080fd5b600154600c541115611bfb57600080fd5b6005805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b611c373385858585610c2e565b50505050565b600b5481565b600254600160a060020a031681565b6000805474010000000000000000000000000000000000000000900460ff1615611c7b57600080fd5b611df28383600360009054906101000a9004600160a060020a0316600160a060020a03166318a4155e34600b54600a540360095433600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015611d1c57600080fd5b505af1158015611d30573d6000803e3d6000fd5b505050506040513d6020811015611d4657600080fd5b5051604080517c010000000000000000000000000000000000000000000000000000000063ffffffff8916028152600481019690965260248601949094526044850192909252600160a060020a0316606484015260848301525160a48083019260209291908290030181600087803b158015611dc157600080fd5b505af1158015611dd5573d6000803e3d6000fd5b505050506040513d6020811015611deb57600080fd5b5051611e7e565b9392505050565b600254604080517f40c10f19000000000000000000000000000000000000000000000000000000008152600160a060020a038581166004830152602482018590529151919092169182916340c10f199160448082019260009290919082900301818387803b158015611e6a57600080fd5b505af1158015610d4d573d6000803e3d6000fd5b60008054819074010000000000000000000000000000000000000000900460ff1615611ea957600080fd5b6002611eb361096f565b6007811115611ebe57fe5b1415611ef057600160a060020a03851660009081526012602052604090205460ff161515611eeb57600080fd5b611f0c565b6003611efa61096f565b6007811115611f0557fe5b1415610292575b5034821515611f1a57600080fd5b600160a060020a0385166000908152601060205260409020541515611f4357600c805460010190555b600160a060020a0385166000908152601060209081526040918290205482516000805160206123da8339815191528152600481019190915260248101849052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b158015611fbc57600080fd5b505af4158015611fd0573d6000803e3d6000fd5b505050506040513d6020811015611fe657600080fd5b5051600160a060020a03861660009081526010602090815260408083209390935560118152908290205482516000805160206123da8339815191528152600481019190915260248101869052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561206c57600080fd5b505af4158015612080573d6000803e3d6000fd5b505050506040513d602081101561209657600080fd5b5051600160a060020a03861660009081526011602090815260409182902092909255600a5481516000805160206123da8339815191528152600481019190915260248101849052905173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f9260448082019391829003018186803b15801561211657600080fd5b505af415801561212a573d6000803e3d6000fd5b505050506040513d602081101561214057600080fd5b5051600a55600954604080516000805160206123da83398151915281526004810192909252602482018590525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b1580156121a857600080fd5b505af41580156121bc573d6000803e3d6000fd5b505050506040513d60208110156121d257600080fd5b5051600955600354604080517ff14ae17d000000000000000000000000000000000000000000000000000000008152600160a060020a0388811660048301529151919092169163f14ae17d9160248083019260209291908290030181600087803b15801561223f57600080fd5b505af1158015612253573d6000803e3d6000fd5b505050506040513d602081101561226957600080fd5b50511561231757600b5473__contracts/SafeMathLib.sol:SafeMathLi__6366098d4f9091836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b1580156122e757600080fd5b505af41580156122fb573d6000803e3d6000fd5b505050506040513d602081101561231157600080fd5b5051600b555b6123278184600a5460095461188a565b1561233157600080fd5b61233b8584611df9565b600554604051600160a060020a039091169082156108fc029083906000818181858888f19350505050151561236f57600080fd5b60408051600160a060020a0387168152602081018390528082018590526fffffffffffffffffffffffffffffffff8616606082015290517f0396f60aaad038749091d273dc13aaabc63db6e2271c7bad442d5cf25cc433509181900360800190a150909392505050560066098d4f00000000000000000000000000000000000000000000000000000000a165627a7a72305820ccf242c2b1c36bba5a827f39ef1ddb685f427668fea0301bbdbe3b87959481560029", "direct_dependencies": ["SafeMathLib"], "full_dependencies": ["SafeMathLib"], "linkrefs": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 8446}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 8740}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 9082}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 9434}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 10994}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 12572}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 13318}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 17220}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 17572}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 17914}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 18198}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 18722}], "linkrefs_runtime": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 7366}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 7660}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 8002}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 8354}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 9914}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 11492}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 12238}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 16140}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 16492}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 16834}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 17118}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 17642}], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": true, "inputs": [], "name": "ownerTestValue", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "requireCustomerId", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "invest", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "isPricingSane", "outputs": [{"name": "sane", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "endsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "minimumFundingGoal", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getState", "outputs": [{"name": "", "type": "uint8"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setFinalizeAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "customerId", "type": "uint128"}, {"name": "v", "type": "uint8"}, {"name": "r", "type": "bytes32"}, {"name": "s", "type": "bytes32"}], "name": "investWithSignedAddress", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "investedAmountOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "finalizeAgent", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "receiver", "type": "address"}, {"name": "fullTokens", "type": "uint256"}, {"name": "weiPrice", "type": "uint256"}], "name": "preallocate", "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": "isCrowdsale", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "finalize", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_pricingStrategy", "type": "address"}], "name": "setPricingStrategy", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "tokensSold", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "refund", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "signerAddress", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "weiRefunded", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "halt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}, {"name": "checksum", "type": "bytes1"}], "name": "buyWithCustomerIdWithChecksum", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "time", "type": "uint256"}], "name": "setEndsAt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "pricingStrategy", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "loadedRefund", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isMinimumGoalReached", "outputs": [{"name": "reached", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "bool"}], "name": "setRequireCustomerId", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "weiCap", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "loadRefund", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "val", "type": "uint256"}], "name": "setOwnerTestValue", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "weisTotal", "type": "uint256"}, {"name": "pricePerToken", "type": "uint256"}], "name": "calculateTokens", "outputs": [{"name": "tokensTotal", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "multisigWallet", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "tokenAmountOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}], "name": "buyWithCustomerId", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [{"name": "weiAmount", "type": "uint256"}, {"name": "tokenAmount", "type": "uint256"}, {"name": "weiRaisedTotal", "type": "uint256"}, {"name": "tokensSoldTotal", "type": "uint256"}], "name": "isBreakingCap", "outputs": [{"name": "limitBroken", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "buy", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "isFinalizerSane", "outputs": [{"name": "sane", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "startsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "finalized", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "halted", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "earlyParticipantWhitelist", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "unhalt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "requiredSignedAddress", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isCrowdsaleFull", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "investorCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "status", "type": "bool"}], "name": "setEarlyParicipantWhitelist", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "bool"}, {"name": "_signerAddress", "type": "address"}], "name": "setRequireSignedAddress", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "customerId", "type": "uint128"}], "name": "investWithCustomerId", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setMultisig", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}, {"name": "v", "type": "uint8"}, {"name": "r", "type": "bytes32"}, {"name": "s", "type": "bytes32"}], "name": "buyWithSignedAddress", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "presaleWeiRaised", "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": "_token", "type": "address"}, {"name": "_pricingStrategy", "type": "address"}, {"name": "_multisigWallet", "type": "address"}, {"name": "_start", "type": "uint256"}, {"name": "_end", "type": "uint256"}, {"name": "_minimumFundingGoal", "type": "uint256"}, {"name": "_weiCap", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"payable": true, "stateMutability": "payable", "type": "fallback"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}, {"indexed": false, "name": "tokenAmount", "type": "uint256"}, {"indexed": false, "name": "customerId", "type": "uint128"}], "name": "Invested", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}], "name": "Refund", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newRequireCustomerId", "type": "bool"}, {"indexed": false, "name": "newRequiredSignedAddress", "type": "bool"}, {"indexed": false, "name": "newSignerAddress", "type": "address"}], "name": "InvestmentPolicyChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "addr", "type": "address"}, {"indexed": false, "name": "status", "type": "bool"}], "name": "Whitelisted", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newEndsAt", "type": "uint256"}], "name": "EndsAtChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "devdoc": {"methods": {"calculateTokens(uint256,uint256)": {"details": "Calculate tokens user will have for their purchase", "params": {"pricePerToken": "What is the price for one token", "weisTotal": "How much ethers (in wei) the user putssssss in"}, "return": "tokensTotal which is received tokens, token decimals included"}, "isMinimumGoalReached()": {"return": "true if the crowdsale has raised enough money to be a successful."}, "preallocate(address,uint256,uint256)": {"params": {"fullTokens": "tokens as full tokens - decimal places added internally", "weiPrice": "Price of a single full token in wei "}}, "transferOwnership(address)": {"details": "Allows the current owner to transfer control of the contract to a newOwner.", "params": {"newOwner": "The address to transfer ownership to."}}}}, "userdoc": {"methods": {"buy()": {"notice": "The basic entry point to participate the crowdsale process. * Pay for funding, get invested tokens back in the sender address."}, "buyWithCustomerId(uint128)": {"notice": "Legacy API signature."}, "buyWithCustomerIdWithChecksum(uint128,bytes1)": {"notice": "Invest to tokens, recognize the payer. "}, "buyWithSignedAddress(uint128,uint8,bytes32,bytes32)": {"notice": "Invest to tokens, recognize the payer and clear his address. "}, "finalize()": {"notice": "Finalize a succcesful crowdsale. * The owner can triggre a call the contract that provides post-crowdsale actions, like releasing the tokens."}, "getState()": {"notice": "Crowdfund state machine management. * We make it a function and do not assign the result to a variable, so there is no chance of the variable being stale."}, "invest(address)": {"notice": "Allow anonymous contributions to this crowdsale."}, "investWithCustomerId(address,uint128)": {"notice": "Track who is the customer making the payment so we can send thank you email."}, "investWithSignedAddress(address,uint128,uint8,bytes32,bytes32)": {"notice": "Allow anonymous contributions to this crowdsale."}, "isBreakingCap(uint256,uint256,uint256,uint256)": {"notice": "Called from invest() to confirm if the curret investment does not break our cap rule."}, "isCrowdsale()": {"notice": "Interface marker. "}, "isFinalizerSane()": {"notice": "Check if the contract relationship looks good."}, "isPricingSane()": {"notice": "Check if the contract relationship looks good."}, "loadRefund()": {"notice": "Allow load refunds back on the contract for the refunding. * The team can transfer the funds back on the smart contract in the case the minimum goal was not reached.."}, "preallocate(address,uint256,uint256)": {"notice": "Preallocate tokens for the early investors. * Preallocated tokens have been sold before the actual crowdsale opens. This function mints the tokens and moves the crowdsale needle. * Investor count is not handled; it is assumed this goes for multiple investors and the token distribution happens outside the smart contract flow. * No money is exchanged, as the crowdsale team already have received the payment."}, "refund()": {"notice": "Investors can claim refund. * Note that any refunds from proxy buyers should be handled separately, and not through this contract."}, "setEarlyParicipantWhitelist(address,bool)": {"notice": "Allow addresses to do early participation. * TODO: Fix spelling error in the name"}, "setEndsAt(uint256)": {"notice": "Allow crowdsale owner to close early or extend the crowdsale. * This is useful e.g. for a manual soft cap implementation: - after X amount is reached determine manual closing * This may put the crowdsale to an invalid state, but we trust owners know what they are doing. "}, "setFinalizeAgent(address)": {"notice": "Allow to (re)set finalize agent. * Design choice: no state restrictions on setting this, so that we can fix fat finger mistakes."}, "setMultisig(address)": {"notice": "Allow to change the team multisig address in the case of emergency. * This allows to save a deployed crowdsale wallet in the case the crowdsale has not yet begun (we have done only few test transactions). After the crowdsale is going then multisig address stays locked for the safety reasons."}, "setOwnerTestValue(uint256)": {"notice": "This is for manual testing of multisig wallet interaction "}, "setPricingStrategy(address)": {"notice": "Allow to (re)set pricing strategy. * Design choice: no state restrictions on the set, so that we can fix fat finger mistakes."}, "setRequireCustomerId(bool)": {"notice": "Set policy do we need to have server-side customer ids for the investments. "}, "setRequireSignedAddress(bool,address)": {"notice": "Set policy if all investors must be cleared on the server side first. * This is e.g. for the accredited investor clearing. "}}}}, "settings": {"compilationTarget": {"contracts/MintedEthCappedCrowdsale.sol": "MintedEthCappedCrowdsale"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/Crowdsale.sol": {"keccak256": "0x2697c26528f64bb954a7c2547d3b43317d2d2b02c7d9d05a7b1ab388cd79f65d", "urls": ["bzzr://f28b280794222114141c51dd5c388d403a7c98d8b51e04170a0e294246d5164b"]}, "contracts/CrowdsaleBase.sol": {"keccak256": "0xe2c9ed11183ce705616980df7b02544d72fe18b40395da7d9d4bcb621fb87871", "urls": ["bzzr://07f3887ba0d0eb3248b1ad3581480ed71a2fe70a47dcc283c4e97c8c92e0790a"]}, "contracts/FinalizeAgent.sol": {"keccak256": "0x309fd0510e0b3e2b5044e33f7c80cfb2d6f2a5697e41a5f185931d65770cfea9", "urls": ["bzzr://4e7ed6f82c0f542e92e56c12566b2ecd7666730865bf12566c27587ec64160ac"]}, "contracts/FractionalERC20.sol": {"keccak256": "0x75bc4ad90a8b13ce961c89b1bf405776f616e019d3a2720168f8e52be223198f", "urls": ["bzzr://6a3688f12da1a5c890ef06f80f883f6c5370886092d38a1b33cd4219b718478b"]}, "contracts/Haltable.sol": {"keccak256": "0x265dcf25e7c9ab4b6eecd2181f1b71334a1b5381a60f8db7d9526dab120f4b70", "urls": ["bzzr://d522e00fa9e075941469dd81738b59fdb99ce3c12cdc39e33abe40b588c4da9b"]}, "contracts/MintableToken.sol": {"keccak256": "0x650e1d6b2bedcd36508918357c7cf4f36fdd093cd0c4d6342f4dcd3bdcdd7578", "urls": ["bzzr://7ba2ac0480d428066a18727e2adb76ba56856ecd37b4420e801131ec8f8f4be3"]}, "contracts/MintedEthCappedCrowdsale.sol": {"keccak256": "0xa78d28210665878216d0e2b182ddd26c942f22e47f3a2d4633d03a05cafff3f1", "urls": ["bzzr://6818f7aa52d2c48dee78eeb477aeee9d9f890154581850e3f7178388fad81b92"]}, "contracts/PricingStrategy.sol": {"keccak256": "0x8df5093b7d07168ad994f9176de0bd2268f6563b1e8a3a448d8cfe7fe246c628", "urls": ["bzzr://ef5c944d51f739ab34e2c951d6ac82a7152e6bb844058a8e57bae52c14cbe16b"]}, "contracts/Recoverable.sol": {"keccak256": "0x311a332cdd87df6e00057f5455f4e68b043b5dbe211f6d68bc64e20817515635", "urls": ["bzzr://4fd99bcfb93baed6e7c8d22ee9ecc5c8346a1aa98288e77b01333b2c5d3f582d"]}, "contracts/SafeMathLib.sol": {"keccak256": "0x501bfe31e274b9a5591f7c540bdced4d4312e27d4f19599147c9bbca3d9c6b18", "urls": ["bzzr://a80935ebddb06c247d71372d4e5833ee029f08633bd0fe4a274a57009567e5b9"]}, "contracts/StandardTokenExt.sol": {"keccak256": "0x9ea2d4cec4dccd5639c05e6c23dd027d80b5e5a20abd99b280ab7b2631b5a5fc", "urls": ["bzzr://a52d8fc5a21bd83997aff19128e00dceb251df712207b61223894c8b7f42d5ff"]}, "zeppelin/contracts/math/SafeMath.sol": {"keccak256": "0x341ba8cb467a3623e819ba1a683ac1d264005186f308505214e5f6bc89446a08", "urls": ["bzzr://59b5652ee4e4a1b5a8f1a8906e14c84af43d636cf5ca0725cc1813aabe4c8c17"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}, "zeppelin/contracts/token/ERC20/BasicToken.sol": {"keccak256": "0x948404468d61ff35ea4194650670408dabd65da7f905a1c16888ab84520bf39e", "urls": ["bzzr://ea75e20f95d7e4e10394fe6bfaa8eee56b4757c2a6f1e8df4180d33afa621935"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}, "zeppelin/contracts/token/ERC20/StandardToken.sol": {"keccak256": "0xd2b344a5259e19ec143074cfa65637a10c40b68395c59808c4af13bccbb2de55", "urls": ["bzzr://d61a01175a7ca1ba9f4403de603c20b897e33ec425aef2d9f8a7f9ddfdfaf5b2"]}}, "version": 1}, "name": "MintedEthCappedCrowdsale", "ordered_full_dependencies": ["SafeMathLib"], "source_path": "contracts/MintedEthCappedCrowdsale.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Safe unsigned safe math.\n *\n * https://blog.aragon.one/library-driven-development-in-solidity-2bebcaf88736#.750gwtwli\n *\n * Originally from https://raw.githubusercontent.com/AragonOne/zeppelin-solidity/master/contracts/SafeMathLib.sol\n *\n * Maintained here until merged to mainline zeppelin-solidity.\n *\n */\nlibrary SafeMathLib {\n\n function times(uint a, uint b) returns (uint) {\n uint c = a * b;\n assert(a == 0 || c / a == b);\n return c;\n }\n\n function minus(uint a, uint b) returns (uint) {\n assert(b <= a);\n return a - b;\n }\n\n function plus(uint a, uint b) returns (uint) {\n uint c = a + b;\n assert(c>=a);\n return c;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Interface for defining crowdsale pricing.\n */\ncontract PricingStrategy {\n\n /** Interface declaration. */\n function isPricingStrategy() public constant returns (bool) {\n return true;\n }\n\n /** Self check if all references are correctly set.\n *\n * Checks that pricing strategy matches crowdsale parameters.\n */\n function isSane(address crowdsale) public constant returns (bool) {\n return true;\n }\n\n /**\n * @dev Pricing tells if this is a presale purchase or not.\n @param purchaser Address of the purchaser\n @return False by default, true if a presale purchaser\n */\n function isPresalePurchase(address purchaser) public constant returns (bool) {\n return false;\n }\n\n /**\n * When somebody tries to buy tokens for X eth, calculate how many tokens they get.\n *\n *\n * @param value - What is the value of the transaction send in as wei\n * @param tokensSold - how much tokens have been sold this far\n * @param weiRaised - how much money has been raised this far in the main token sale - this number excludes presale\n * @param msgSender - who is the investor of this transaction\n * @param decimals - how many decimal units the token has\n * @return Amount of tokens the investor receives\n */\n function calculatePrice(uint value, uint weiRaised, uint tokensSold, address msgSender, uint decimals) public constant returns (uint tokenAmount);\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Finalize agent defines what happens at the end of succeseful crowdsale.\n *\n * - Allocate tokens for founders, bounties and community\n * - Make tokens transferable\n * - etc.\n */\ncontract FinalizeAgent {\n\n function isFinalizeAgent() public constant returns(bool) {\n return true;\n }\n\n /** Return true if we can run finalizeCrowdsale() properly.\n *\n * This is a safety check function that doesn't allow crowdsale to begin\n * unless the finalizer has been set up properly.\n */\n function isSane() public constant returns (bool);\n\n /** Called once by crowdsale finalize() if the sale was success. */\n function finalizeCrowdsale();\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n\n/**\n * A token that defines fractional units as decimals.\n */\ncontract FractionalERC20 is ERC20 {\n\n uint public decimals;\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n/*\n * Haltable\n *\n * Abstract contract that allows children to implement an\n * emergency stop mechanism. Differs from Pausable by causing a throw when in halt mode.\n *\n *\n * Originally envisioned in FirstBlood ICO contract.\n */\ncontract Haltable is Ownable {\n bool public halted;\n\n modifier stopInEmergency {\n if (halted) throw;\n _;\n }\n\n modifier stopNonOwnersInEmergency {\n if (halted && msg.sender != owner) throw;\n _;\n }\n\n modifier onlyInEmergency {\n if (!halted) throw;\n _;\n }\n\n // called by the owner on emergency, triggers stopped state\n function halt() external onlyOwner {\n halted = true;\n }\n\n // called by the owner on end of emergency, returns to normal state\n function unhalt() external onlyOwner onlyInEmergency {\n halted = false;\n }\n\n}\n\n\n\n\n\n\n\n/**\n * Crowdsale state machine without buy functionality.\n *\n * Implements basic state machine logic, but leaves out all buy functions,\n * so that subclasses can implement their own buying logic.\n *\n *\n * For the default buy() implementation see Crowdsale.sol.\n */\ncontract CrowdsaleBase is Haltable {\n\n /* Max investment count when we are still allowed to change the multisig address */\n uint public MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE = 5;\n\n using SafeMathLib for uint;\n\n /* The token we are selling */\n FractionalERC20 public token;\n\n /* How we are going to price our offering */\n PricingStrategy public pricingStrategy;\n\n /* Post-success callback */\n FinalizeAgent public finalizeAgent;\n\n /* tokens will be transfered from this address */\n address public multisigWallet;\n\n /* if the funding goal is not reached, investors may withdraw their funds */\n uint public minimumFundingGoal;\n\n /* the UNIX timestamp start date of the crowdsale */\n uint public startsAt;\n\n /* the UNIX timestamp end date of the crowdsale */\n uint public endsAt;\n\n /* the number of tokens already sold through this contract*/\n uint public tokensSold = 0;\n\n /* How many wei of funding we have raised */\n uint public weiRaised = 0;\n\n /* Calculate incoming funds from presale contracts and addresses */\n uint public presaleWeiRaised = 0;\n\n /* How many distinct addresses have invested */\n uint public investorCount = 0;\n\n /* How much wei we have returned back to the contract after a failed crowdfund. */\n uint public loadedRefund = 0;\n\n /* How much wei we have given back to investors.*/\n uint public weiRefunded = 0;\n\n /* Has this crowdsale been finalized */\n bool public finalized;\n\n /** How much ETH each address has invested to this crowdsale */\n mapping (address => uint256) public investedAmountOf;\n\n /** How much tokens this crowdsale has credited for each investor address */\n mapping (address => uint256) public tokenAmountOf;\n\n /** Addresses that are allowed to invest even before ICO offical opens. For testing, for ICO partners, etc. */\n mapping (address => bool) public earlyParticipantWhitelist;\n\n /** This is for manul testing for the interaction from owner wallet. You can set it to any value and inspect this in blockchain explorer to see that crowdsale interaction works. */\n uint public ownerTestValue;\n\n /** State machine\n *\n * - Preparing: All contract initialization calls and variables have not been set yet\n * - Prefunding: We have not passed start time yet\n * - Funding: Active crowdsale\n * - Success: Minimum funding goal reached\n * - Failure: Minimum funding goal not reached before ending time\n * - Finalized: The finalized has been called and succesfully executed\n * - Refunding: Refunds are loaded on the contract for reclaim.\n */\n enum State{Unknown, Preparing, PreFunding, Funding, Success, Failure, Finalized, Refunding}\n\n // A new investment was made\n event Invested(address investor, uint weiAmount, uint tokenAmount, uint128 customerId);\n\n // Refund was processed for a contributor\n event Refund(address investor, uint weiAmount);\n\n // The rules were changed what kind of investments we accept\n event InvestmentPolicyChanged(bool newRequireCustomerId, bool newRequiredSignedAddress, address newSignerAddress);\n\n // Address early participation whitelist status changed\n event Whitelisted(address addr, bool status);\n\n // Crowdsale end time has been changed\n event EndsAtChanged(uint newEndsAt);\n\n function CrowdsaleBase(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal) {\n\n owner = msg.sender;\n\n token = FractionalERC20(_token);\n setPricingStrategy(_pricingStrategy);\n\n multisigWallet = _multisigWallet;\n if(multisigWallet == 0) {\n throw;\n }\n\n if(_start == 0) {\n throw;\n }\n\n startsAt = _start;\n\n if(_end == 0) {\n throw;\n }\n\n endsAt = _end;\n\n // Don't mess the dates\n if(startsAt >= endsAt) {\n throw;\n }\n\n // Minimum funding goal can be zero\n minimumFundingGoal = _minimumFundingGoal;\n }\n\n /**\n * Don't expect to just send in money and get tokens.\n */\n function() payable {\n throw;\n }\n\n /**\n * @dev Make an investment.\n *\n * Crowdsale must be running for one to invest.\n * We must have not pressed the emergency brake.\n *\n * @param receiver The Ethereum address who receives the tokens\n * @param customerId (optional) UUID v4 to track the successful payments on the server side'\n * @param tokenAmount Amount of tokens which be credited to receiver\n *\n * @return tokensBought How mony tokens were bought\n */\n function buyTokens(address receiver, uint128 customerId, uint256 tokenAmount) stopInEmergency internal returns(uint tokensBought) {\n\n // Determine if it's a good time to accept investment from this participant\n if(getState() == State.PreFunding) {\n // Are we whitelisted for early deposit\n if(!earlyParticipantWhitelist[receiver]) {\n throw;\n }\n } else if(getState() == State.Funding) {\n // Retail participants can only come in when the crowdsale is running\n // pass\n } else {\n // Unwanted state\n throw;\n }\n\n uint weiAmount = msg.value;\n\n // Dust transaction\n require(tokenAmount != 0);\n\n if(investedAmountOf[receiver] == 0) {\n // A new investor\n investorCount++;\n }\n\n // Update investor\n investedAmountOf[receiver] = investedAmountOf[receiver].plus(weiAmount);\n tokenAmountOf[receiver] = tokenAmountOf[receiver].plus(tokenAmount);\n\n // Update totals\n weiRaised = weiRaised.plus(weiAmount);\n tokensSold = tokensSold.plus(tokenAmount);\n\n if(pricingStrategy.isPresalePurchase(receiver)) {\n presaleWeiRaised = presaleWeiRaised.plus(weiAmount);\n }\n\n // Check that we did not bust the cap\n require(!isBreakingCap(weiAmount, tokenAmount, weiRaised, tokensSold));\n\n assignTokens(receiver, tokenAmount);\n\n // Pocket the money, or fail the crowdsale if we for some reason cannot send the money to our multisig\n if(!multisigWallet.send(weiAmount)) throw;\n\n // Tell us invest was success\n Invested(receiver, weiAmount, tokenAmount, customerId);\n\n return tokenAmount;\n }\n\n /**\n * @dev Make an investment based on pricing strategy\n *\n * This is a wrapper for buyTokens(), but the amount of tokens receiver will\n * have depends on the pricing strategy used.\n *\n * @param receiver The Ethereum address who receives the tokens\n * @param customerId (optional) UUID v4 to track the successful payments on the server side'\n *\n * @return tokensBought How mony tokens were bought\n */\n function investInternal(address receiver, uint128 customerId) stopInEmergency internal returns(uint tokensBought) {\n return buyTokens(receiver, customerId, pricingStrategy.calculatePrice(msg.value, weiRaised - presaleWeiRaised, tokensSold, msg.sender, token.decimals()));\n }\n\n /**\n * @dev Calculate tokens user will have for their purchase\n *\n * @param weisTotal How much ethers (in wei) the user putssssss in\n * @param pricePerToken What is the price for one token\n *\n * @return tokensTotal which is received tokens, token decimals included\n */\n function calculateTokens(uint256 weisTotal, uint256 pricePerToken) public constant returns(uint tokensTotal) {\n // pricePerToken is how many full tokens, token decimal place included, you get for wei amount.\n // Because, in theory, decimal amount can vary, we do the exponent calculation here,\n // though gas wise using 10**18 constant would be much simpler.\n // Furthermore we could use rough amounts and take in raw wei per tokens amount,\n // but we lose too much accuracy for generic calculations, thus all these are\n // practically implemented as 10**18 fixed points.\n uint multiplier = 10 ** token.decimals();\n return weisTotal.times(multiplier)/pricePerToken;\n }\n\n /**\n * Finalize a succcesful crowdsale.\n *\n * The owner can triggre a call the contract that provides post-crowdsale actions, like releasing the tokens.\n */\n function finalize() public inState(State.Success) onlyOwner stopInEmergency {\n\n // Already finalized\n if(finalized) {\n throw;\n }\n\n // Finalizing is optional. We only call it if we are given a finalizing agent.\n if(address(finalizeAgent) != 0) {\n finalizeAgent.finalizeCrowdsale();\n }\n\n finalized = true;\n }\n\n /**\n * Allow to (re)set finalize agent.\n *\n * Design choice: no state restrictions on setting this, so that we can fix fat finger mistakes.\n */\n function setFinalizeAgent(FinalizeAgent addr) onlyOwner {\n finalizeAgent = addr;\n\n // Don't allow setting bad agent\n if(!finalizeAgent.isFinalizeAgent()) {\n throw;\n }\n }\n\n /**\n * Allow crowdsale owner to close early or extend the crowdsale.\n *\n * This is useful e.g. for a manual soft cap implementation:\n * - after X amount is reached determine manual closing\n *\n * This may put the crowdsale to an invalid state,\n * but we trust owners know what they are doing.\n *\n */\n function setEndsAt(uint time) onlyOwner {\n\n if(now > time) {\n throw; // Don't change past\n }\n\n if(startsAt > time) {\n throw; // Prevent human mistakes\n }\n\n endsAt = time;\n EndsAtChanged(endsAt);\n }\n\n /**\n * Allow to (re)set pricing strategy.\n *\n * Design choice: no state restrictions on the set, so that we can fix fat finger mistakes.\n */\n function setPricingStrategy(PricingStrategy _pricingStrategy) onlyOwner {\n pricingStrategy = _pricingStrategy;\n\n // Don't allow setting bad agent\n if(!pricingStrategy.isPricingStrategy()) {\n throw;\n }\n }\n\n /**\n * Allow to change the team multisig address in the case of emergency.\n *\n * This allows to save a deployed crowdsale wallet in the case the crowdsale has not yet begun\n * (we have done only few test transactions). After the crowdsale is going\n * then multisig address stays locked for the safety reasons.\n */\n function setMultisig(address addr) public onlyOwner {\n\n // Change\n if(investorCount > MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE) {\n throw;\n }\n\n multisigWallet = addr;\n }\n\n /**\n * Allow load refunds back on the contract for the refunding.\n *\n * The team can transfer the funds back on the smart contract in the case the minimum goal was not reached..\n */\n function loadRefund() public payable inState(State.Failure) {\n if(msg.value == 0) throw;\n loadedRefund = loadedRefund.plus(msg.value);\n }\n\n /**\n * Investors can claim refund.\n *\n * Note that any refunds from proxy buyers should be handled separately,\n * and not through this contract.\n */\n function refund() public inState(State.Refunding) {\n uint256 weiValue = investedAmountOf[msg.sender];\n if (weiValue == 0) throw;\n investedAmountOf[msg.sender] = 0;\n weiRefunded = weiRefunded.plus(weiValue);\n Refund(msg.sender, weiValue);\n if (!msg.sender.send(weiValue)) throw;\n }\n\n /**\n * @return true if the crowdsale has raised enough money to be a successful.\n */\n function isMinimumGoalReached() public constant returns (bool reached) {\n return weiRaised >= minimumFundingGoal;\n }\n\n /**\n * Check if the contract relationship looks good.\n */\n function isFinalizerSane() public constant returns (bool sane) {\n return finalizeAgent.isSane();\n }\n\n /**\n * Check if the contract relationship looks good.\n */\n function isPricingSane() public constant returns (bool sane) {\n return pricingStrategy.isSane(address(this));\n }\n\n /**\n * Crowdfund state machine management.\n *\n * We make it a function and do not assign the result to a variable, so there is no chance of the variable being stale.\n */\n function getState() public constant returns (State) {\n if(finalized) return State.Finalized;\n else if (address(finalizeAgent) == 0) return State.Preparing;\n else if (!finalizeAgent.isSane()) return State.Preparing;\n else if (!pricingStrategy.isSane(address(this))) return State.Preparing;\n else if (block.timestamp < startsAt) return State.PreFunding;\n else if (block.timestamp <= endsAt && !isCrowdsaleFull()) return State.Funding;\n else if (isMinimumGoalReached()) return State.Success;\n else if (!isMinimumGoalReached() && weiRaised > 0 && loadedRefund >= weiRaised) return State.Refunding;\n else return State.Failure;\n }\n\n /** This is for manual testing of multisig wallet interaction */\n function setOwnerTestValue(uint val) onlyOwner {\n ownerTestValue = val;\n }\n\n /**\n * Allow addresses to do early participation.\n *\n * TODO: Fix spelling error in the name\n */\n function setEarlyParicipantWhitelist(address addr, bool status) onlyOwner {\n earlyParticipantWhitelist[addr] = status;\n Whitelisted(addr, status);\n }\n\n\n /** Interface marker. */\n function isCrowdsale() public constant returns (bool) {\n return true;\n }\n\n //\n // Modifiers\n //\n\n /** Modified allowing execution only if the crowdsale is currently running. */\n modifier inState(State state) {\n if(getState() != state) throw;\n _;\n }\n\n\n //\n // Abstract functions\n //\n\n /**\n * Check if the current invested breaks our cap rules.\n *\n *\n * The child contract must define their own cap setting rules.\n * We allow a lot of flexibility through different capping strategies (ETH, token count)\n * Called from invest().\n *\n * @param weiAmount The amount of wei the investor tries to invest in the current transaction\n * @param tokenAmount The amount of tokens we try to give to the investor in the current transaction\n * @param weiRaisedTotal What would be our total raised balance after this transaction\n * @param tokensSoldTotal What would be our total sold tokens count after this transaction\n *\n * @return true if taking this investment would break our cap rules\n */\n function isBreakingCap(uint weiAmount, uint tokenAmount, uint weiRaisedTotal, uint tokensSoldTotal) constant returns (bool limitBroken);\n\n /**\n * Check if the current crowdsale is full and we can no longer sell any tokens.\n */\n function isCrowdsaleFull() public constant returns (bool);\n\n /**\n * Create new tokens or transfer issued tokens to the investor depending on the cap model.\n */\n function assignTokens(address receiver, uint tokenAmount) internal;\n}\n\n\n\n/**\n * Abstract base contract for token sales with the default buy entry points.\n *\n * Handle\n * - start and end dates\n * - accepting investments\n * - minimum funding goal and refund\n * - various statistics during the crowdfund\n * - different pricing strategies\n * - different investment policies (require server side customer id, allow only whitelisted addresses)\n *\n * Does not Handle\n *\n * - Token allocation (minting vs. transfer)\n * - Cap rules\n *\n */\ncontract Crowdsale is CrowdsaleBase {\n\n /* Do we need to have unique contributor id for each customer */\n bool public requireCustomerId;\n\n /**\n * Do we verify that contributor has been cleared on the server side (accredited investors only).\n * This method was first used in FirstBlood crowdsale to ensure all contributors have accepted terms on sale (on the web).\n */\n bool public requiredSignedAddress;\n\n /* Server side address that signed allowed contributors (Ethereum addresses) that can participate the crowdsale */\n address public signerAddress;\n\n function Crowdsale(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal) CrowdsaleBase(_token, _pricingStrategy, _multisigWallet, _start, _end, _minimumFundingGoal) {\n }\n\n /**\n * Preallocate tokens for the early investors.\n *\n * Preallocated tokens have been sold before the actual crowdsale opens.\n * This function mints the tokens and moves the crowdsale needle.\n *\n * Investor count is not handled; it is assumed this goes for multiple investors\n * and the token distribution happens outside the smart contract flow.\n *\n * No money is exchanged, as the crowdsale team already have received the payment.\n *\n * @param fullTokens tokens as full tokens - decimal places added internally\n * @param weiPrice Price of a single full token in wei\n *\n */\n function preallocate(address receiver, uint fullTokens, uint weiPrice) public onlyOwner {\n\n uint tokenAmount = fullTokens * 10**token.decimals();\n uint weiAmount = weiPrice * fullTokens; // This can be also 0, we give out tokens for free\n\n weiRaised = weiRaised.plus(weiAmount);\n tokensSold = tokensSold.plus(tokenAmount);\n\n investedAmountOf[receiver] = investedAmountOf[receiver].plus(weiAmount);\n tokenAmountOf[receiver] = tokenAmountOf[receiver].plus(tokenAmount);\n\n assignTokens(receiver, tokenAmount);\n\n // Tell us invest was success\n Invested(receiver, weiAmount, tokenAmount, 0);\n }\n\n /**\n * Allow anonymous contributions to this crowdsale.\n */\n function investWithSignedAddress(address addr, uint128 customerId, uint8 v, bytes32 r, bytes32 s) public payable {\n bytes32 hash = sha256(addr);\n if (ecrecover(hash, v, r, s) != signerAddress) throw;\n if(customerId == 0) throw; // UUIDv4 sanity check\n investInternal(addr, customerId);\n }\n\n /**\n * Track who is the customer making the payment so we can send thank you email.\n */\n function investWithCustomerId(address addr, uint128 customerId) public payable {\n if(requiredSignedAddress) throw; // Crowdsale allows only server-side signed participants\n if(customerId == 0) throw; // UUIDv4 sanity check\n investInternal(addr, customerId);\n }\n\n /**\n * Allow anonymous contributions to this crowdsale.\n */\n function invest(address addr) public payable {\n if(requireCustomerId) throw; // Crowdsale needs to track participants for thank you email\n if(requiredSignedAddress) throw; // Crowdsale allows only server-side signed participants\n investInternal(addr, 0);\n }\n\n /**\n * Invest to tokens, recognize the payer and clear his address.\n *\n */\n function buyWithSignedAddress(uint128 customerId, uint8 v, bytes32 r, bytes32 s) public payable {\n investWithSignedAddress(msg.sender, customerId, v, r, s);\n }\n\n /**\n * Invest to tokens, recognize the payer.\n *\n */\n function buyWithCustomerIdWithChecksum(uint128 customerId, bytes1 checksum) public payable {\n // see customerid.py\n if (bytes1(sha3(customerId)) != checksum) throw;\n investWithCustomerId(msg.sender, customerId);\n }\n\n /**\n * Legacy API signature.\n */\n function buyWithCustomerId(uint128 customerId) public payable {\n investWithCustomerId(msg.sender, customerId);\n }\n\n /**\n * The basic entry point to participate the crowdsale process.\n *\n * Pay for funding, get invested tokens back in the sender address.\n */\n function buy() public payable {\n invest(msg.sender);\n }\n\n /**\n * Set policy do we need to have server-side customer ids for the investments.\n *\n */\n function setRequireCustomerId(bool value) onlyOwner {\n requireCustomerId = value;\n InvestmentPolicyChanged(requireCustomerId, requiredSignedAddress, signerAddress);\n }\n\n /**\n * Set policy if all investors must be cleared on the server side first.\n *\n * This is e.g. for the accredited investor clearing.\n *\n */\n function setRequireSignedAddress(bool value, address _signerAddress) onlyOwner {\n requiredSignedAddress = value;\n signerAddress = _signerAddress;\n InvestmentPolicyChanged(requireCustomerId, requiredSignedAddress, signerAddress);\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n assert(c / a == b);\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n\n\n\n/**\n * @title Basic token\n * @dev Basic version of StandardToken, with no allowances.\n */\ncontract BasicToken is ERC20Basic {\n using SafeMath for uint256;\n\n mapping(address => uint256) balances;\n\n uint256 totalSupply_;\n\n /**\n * @dev total number of tokens in existence\n */\n function totalSupply() public view returns (uint256) {\n return totalSupply_;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param _to The address to transfer to.\n * @param _value The amount to be transferred.\n */\n function transfer(address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[msg.sender]);\n\n // SafeMath.sub will throw if there is not enough balance.\n balances[msg.sender] = balances[msg.sender].sub(_value);\n balances[_to] = balances[_to].add(_value);\n Transfer(msg.sender, _to, _value);\n return true;\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param _owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address _owner) public view returns (uint256 balance) {\n return balances[_owner];\n }\n\n}\n\n\n\n\n/**\n * @title Standard ERC20 token\n *\n * @dev Implementation of the basic standard token.\n * @dev https://github.com/ethereum/EIPs/issues/20\n * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol\n */\ncontract StandardToken is ERC20, BasicToken {\n\n mapping (address => mapping (address => uint256)) internal allowed;\n\n\n /**\n * @dev Transfer tokens from one address to another\n * @param _from address The address which you want to send tokens from\n * @param _to address The address which you want to transfer to\n * @param _value uint256 the amount of tokens to be transferred\n */\n function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[_from]);\n require(_value <= allowed[_from][msg.sender]);\n\n balances[_from] = balances[_from].sub(_value);\n balances[_to] = balances[_to].add(_value);\n allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);\n Transfer(_from, _to, _value);\n return true;\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n *\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param _spender The address which will spend the funds.\n * @param _value The amount of tokens to be spent.\n */\n function approve(address _spender, uint256 _value) public returns (bool) {\n allowed[msg.sender][_spender] = _value;\n Approval(msg.sender, _spender, _value);\n return true;\n }\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param _owner address The address which owns the funds.\n * @param _spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address _owner, address _spender) public view returns (uint256) {\n return allowed[_owner][_spender];\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(address _spender, uint _addedValue) public returns (bool) {\n allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {\n uint oldValue = allowed[msg.sender][_spender];\n if (_subtractedValue > oldValue) {\n allowed[msg.sender][_spender] = 0;\n } else {\n allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);\n }\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\ncontract Recoverable is Ownable {\n\n /// @dev Empty constructor (for now)\n function Recoverable() {\n }\n\n /// @dev This will be invoked by the owner, when owner wants to rescue tokens\n /// @param token Token which will we rescue to the owner from the contract\n function recoverTokens(ERC20Basic token) onlyOwner public {\n token.transfer(owner, tokensToBeReturned(token));\n }\n\n /// @dev Interface function, can be overwritten by the superclass\n /// @param token Token which balance we will check and return\n /// @return The amount of tokens (in smallest denominator) the contract owns\n function tokensToBeReturned(ERC20Basic token) public returns (uint) {\n return token.balanceOf(this);\n }\n}\n\n\n\n/**\n * Standard EIP-20 token with an interface marker.\n *\n * @notice Interface marker is used by crowdsale contracts to validate that addresses point a good token contract.\n *\n */\ncontract StandardTokenExt is StandardToken, Recoverable {\n\n /* Interface declaration */\n function isToken() public constant returns (bool weAre) {\n return true;\n }\n}\n\n\n\n\n/**\n * A token that can increase its supply by another contract.\n *\n * This allows uncapped crowdsale by dynamically increasing the supply when money pours in.\n * Only mint agents, contracts whitelisted by owner, can mint new tokens.\n *\n */\ncontract MintableToken is StandardTokenExt {\n\n using SafeMathLib for uint;\n\n bool public mintingFinished = false;\n\n /** List of agents that are allowed to create new tokens */\n mapping (address => bool) public mintAgents;\n\n event MintingAgentChanged(address addr, bool state);\n event Minted(address receiver, uint amount);\n\n /**\n * Create new tokens and allocate them to an address..\n *\n * Only callably by a crowdsale contract (mint agent).\n */\n function mint(address receiver, uint amount) onlyMintAgent canMint public {\n totalSupply_ = totalSupply_.plus(amount);\n balances[receiver] = balances[receiver].plus(amount);\n\n // This will make the mint transaction apper in EtherScan.io\n // We can remove this after there is a standardized minting event\n Transfer(0, receiver, amount);\n }\n\n /**\n * Owner can allow a crowdsale contract to mint new tokens.\n */\n function setMintAgent(address addr, bool state) onlyOwner canMint public {\n mintAgents[addr] = state;\n MintingAgentChanged(addr, state);\n }\n\n modifier onlyMintAgent() {\n // Only crowdsale contracts are allowed to mint new tokens\n if(!mintAgents[msg.sender]) {\n throw;\n }\n _;\n }\n\n /** Make sure we are not done yet. */\n modifier canMint() {\n if(mintingFinished) throw;\n _;\n }\n}\n\n\n/**\n * ICO crowdsale contract that is capped by amout of ETH.\n *\n * - Tokens are dynamically created during the crowdsale\n *\n *\n */\ncontract MintedEthCappedCrowdsale is Crowdsale {\n\n /* Maximum amount of wei this crowdsale can raise. */\n uint public weiCap;\n\n function MintedEthCappedCrowdsale(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal, uint _weiCap) Crowdsale(_token, _pricingStrategy, _multisigWallet, _start, _end, _minimumFundingGoal) {\n weiCap = _weiCap;\n }\n\n /**\n * Called from invest() to confirm if the curret investment does not break our cap rule.\n */\n function isBreakingCap(uint weiAmount, uint tokenAmount, uint weiRaisedTotal, uint tokensSoldTotal) constant returns (bool limitBroken) {\n return weiRaisedTotal > weiCap;\n }\n\n function isCrowdsaleFull() public constant returns (bool) {\n return weiRaised >= weiCap;\n }\n\n /**\n * Dynamically create tokens and assign them to the investor.\n */\n function assignTokens(address receiver, uint tokenAmount) internal {\n MintableToken mintableToken = MintableToken(token);\n mintableToken.mint(receiver, tokenAmount);\n }\n}\n"}, "MintedTokenCappedCrowdsale": {"abi": [{"constant": true, "inputs": [], "name": "ownerTestValue", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "requireCustomerId", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "invest", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "isPricingSane", "outputs": [{"name": "sane", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "endsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "minimumFundingGoal", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getState", "outputs": [{"name": "", "type": "uint8"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setFinalizeAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "customerId", "type": "uint128"}, {"name": "v", "type": "uint8"}, {"name": "r", "type": "bytes32"}, {"name": "s", "type": "bytes32"}], "name": "investWithSignedAddress", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "investedAmountOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "finalizeAgent", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "receiver", "type": "address"}, {"name": "fullTokens", "type": "uint256"}, {"name": "weiPrice", "type": "uint256"}], "name": "preallocate", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "maximumSellableTokens", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "weiRaised", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isCrowdsale", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "finalize", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_pricingStrategy", "type": "address"}], "name": "setPricingStrategy", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "tokensSold", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "refund", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "signerAddress", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "weiRefunded", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "halt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}, {"name": "checksum", "type": "bytes1"}], "name": "buyWithCustomerIdWithChecksum", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "time", "type": "uint256"}], "name": "setEndsAt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "pricingStrategy", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "loadedRefund", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isMinimumGoalReached", "outputs": [{"name": "reached", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "bool"}], "name": "setRequireCustomerId", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "loadRefund", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "val", "type": "uint256"}], "name": "setOwnerTestValue", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "weisTotal", "type": "uint256"}, {"name": "pricePerToken", "type": "uint256"}], "name": "calculateTokens", "outputs": [{"name": "tokensTotal", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "multisigWallet", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "tokenAmountOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}], "name": "buyWithCustomerId", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [{"name": "weiAmount", "type": "uint256"}, {"name": "tokenAmount", "type": "uint256"}, {"name": "weiRaisedTotal", "type": "uint256"}, {"name": "tokensSoldTotal", "type": "uint256"}], "name": "isBreakingCap", "outputs": [{"name": "limitBroken", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "buy", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "isFinalizerSane", "outputs": [{"name": "sane", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "startsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "finalized", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "halted", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "earlyParticipantWhitelist", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "unhalt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "requiredSignedAddress", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isCrowdsaleFull", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "investorCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "status", "type": "bool"}], "name": "setEarlyParicipantWhitelist", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "bool"}, {"name": "_signerAddress", "type": "address"}], "name": "setRequireSignedAddress", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "customerId", "type": "uint128"}], "name": "investWithCustomerId", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setMultisig", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}, {"name": "v", "type": "uint8"}, {"name": "r", "type": "bytes32"}, {"name": "s", "type": "bytes32"}], "name": "buyWithSignedAddress", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "presaleWeiRaised", "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": "_token", "type": "address"}, {"name": "_pricingStrategy", "type": "address"}, {"name": "_multisigWallet", "type": "address"}, {"name": "_start", "type": "uint256"}, {"name": "_end", "type": "uint256"}, {"name": "_minimumFundingGoal", "type": "uint256"}, {"name": "_maximumSellableTokens", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"payable": true, "stateMutability": "payable", "type": "fallback"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}, {"indexed": false, "name": "tokenAmount", "type": "uint256"}, {"indexed": false, "name": "customerId", "type": "uint128"}], "name": "Invested", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}], "name": "Refund", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newRequireCustomerId", "type": "bool"}, {"indexed": false, "name": "newRequiredSignedAddress", "type": "bool"}, {"indexed": false, "name": "newSignerAddress", "type": "address"}], "name": "InvestmentPolicyChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "addr", "type": "address"}, {"indexed": false, "name": "status", "type": "bool"}], "name": "Whitelisted", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newEndsAt", "type": "uint256"}], "name": "EndsAtChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "bytecode": "0x6080604052600560015560006009556000600a556000600b556000600c556000600d556000600e553480156200003457600080fd5b5060405160e0806200264183398101604090815281516020830151918301516060840151608085015160a086015160c0909601516000805433600160a060020a0319918216811782161790915560028054909116600160a060020a0387161790559395929391929091868686868686858585858585620000bd856401000000006200013f810204565b60058054600160a060020a031916600160a060020a038681169190911791829055161515620000eb57600080fd5b821515620000f857600080fd5b60078390558115156200010a57600080fd5b600882905560075482116200011e57600080fd5b600655505050601598909855506200020c9c50505050505050505050505050565b600054600160a060020a031633146200015757600080fd5b60038054600160a060020a031916600160a060020a038381169190911791829055604080517f04bbc255000000000000000000000000000000000000000000000000000000008152905192909116916304bbc255916004808201926020929091908290030181600087803b158015620001cf57600080fd5b505af1158015620001e4573d6000803e3d6000fd5b505050506040513d6020811015620001fb57600080fd5b505115156200020957600080fd5b50565b612425806200021c6000396000f3006080604052600436106102925763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630226401d811461029757806303ca0eed146102be57806303f9c793146102e7578063062b01ce146102fd5780630a09284a1461031257806313f4e977146103275780631865c57d1461033c57806319b667da146103755780631a49803b146103965780631aae3460146103cb57806321d5c0f6146103ec57806332013ac31461041d5780633ad075ea146104445780634042b66f146104595780634551dd591461046e5780634bb278f31461048357806350c6773414610498578063518ab2a8146104b9578063590e1ae3146104ce5780635b7633d0146104e35780635da89ac0146104f85780635ed7ca5b1461050d5780636203f09f1461052257806363c6082f146105375780636e50eb3f1461057957806378b99c2414610591578063797d9437146105a65780637c2e08a3146105bb5780637f7d711e146105d057806387612102146105ea5780638d51faec146105f25780638da5cb5b1461060a578063903cc5831461061f5780639075becf1461063a57806397b150ca1461064f57806399e9376c146106705780639d3c663f1461068d578063a6f2ae3a146106ae578063a7ba44c3146106b6578063af468682146106cb578063b3f05b97146106e0578063b9b8af0b146106f5578063cb16e6d01461070a578063cb3e64fd1461072b578063d222dc0414610740578063d5d0902114610755578063d7e64c001461076a578063eac249321461077f578063ed68ff2c146107a5578063ef869443146107cb578063f2fde38b146107f4578063f3283fba14610815578063f486972614610836578063f7c00e2f1461085f578063fc0c546a14610874575b600080fd5b3480156102a357600080fd5b506102ac610889565b60408051918252519081900360200190f35b3480156102ca57600080fd5b506102d361088f565b604080519115158252519081900360200190f35b6102fb600160a060020a0360043516610898565b005b34801561030957600080fd5b506102d36108cc565b34801561031e57600080fd5b506102ac610963565b34801561033357600080fd5b506102ac610969565b34801561034857600080fd5b5061035161096f565b6040518082600781111561036157fe5b60ff16815260200191505060405180910390f35b34801561038157600080fd5b506102fb600160a060020a0360043516610b5d565b6102fb600160a060020a03600435166fffffffffffffffffffffffffffffffff6024351660ff60443516606435608435610c2e565b3480156103d757600080fd5b506102ac600160a060020a0360043516610d56565b3480156103f857600080fd5b50610401610d68565b60408051600160a060020a039092168252519081900360200190f35b34801561042957600080fd5b506102fb600160a060020a0360043516602435604435610d77565b34801561045057600080fd5b506102ac61112d565b34801561046557600080fd5b506102ac611133565b34801561047a57600080fd5b506102d3611139565b34801561048f57600080fd5b506102fb61113e565b3480156104a457600080fd5b506102fb600160a060020a0360043516611243565b3480156104c557600080fd5b506102ac6112de565b3480156104da57600080fd5b506102fb6112e4565b3480156104ef57600080fd5b5061040161142a565b34801561050457600080fd5b506102ac61143f565b34801561051957600080fd5b506102fb611445565b34801561052e57600080fd5b506102ac611493565b6102fb6fffffffffffffffffffffffffffffffff600435167fff0000000000000000000000000000000000000000000000000000000000000060243516611499565b34801561058557600080fd5b506102fb60043561150b565b34801561059d57600080fd5b50610401611579565b3480156105b257600080fd5b506102ac611588565b3480156105c757600080fd5b506102d361158e565b3480156105dc57600080fd5b506102fb6004351515611599565b6102fb61161d565b3480156105fe57600080fd5b506102fb6004356116dd565b34801561061657600080fd5b506104016116f9565b34801561062b57600080fd5b506102ac600435602435611708565b34801561064657600080fd5b5061040161185f565b34801561065b57600080fd5b506102ac600160a060020a036004351661186e565b6102fb6fffffffffffffffffffffffffffffffff60043516611880565b34801561069957600080fd5b506102d360043560243560443560643561188a565b6102fb611895565b3480156106c257600080fd5b506102d36118a0565b3480156106d757600080fd5b506102ac61190e565b3480156106ec57600080fd5b506102d3611914565b34801561070157600080fd5b506102d361191d565b34801561071657600080fd5b506102d3600160a060020a036004351661193e565b34801561073757600080fd5b506102fb611953565b34801561074c57600080fd5b506102d36119b3565b34801561076157600080fd5b506102d36119c1565b34801561077657600080fd5b506102ac6119cc565b34801561078b57600080fd5b506102fb600160a060020a036004351660243515156119d2565b3480156107b157600080fd5b506102fb6004351515600160a060020a0360243516611a4d565b6102fb600160a060020a03600435166fffffffffffffffffffffffffffffffff60243516611afd565b34801561080057600080fd5b506102fb600160a060020a0360043516611b3f565b34801561082157600080fd5b506102fb600160a060020a0360043516611bd3565b6102fb6fffffffffffffffffffffffffffffffff6004351660ff60243516604435606435611c2a565b34801561086b57600080fd5b506102ac611c3d565b34801561088057600080fd5b50610401611c43565b60135481565b60145460ff1681565b60145460ff16156108a857600080fd5b601454610100900460ff16156108bd57600080fd5b6108c8816000611c52565b5050565b600354604080517f8e7682880000000000000000000000000000000000000000000000000000000081523060048201529051600092600160a060020a031691638e76828891602480830192602092919082900301818787803b15801561093157600080fd5b505af1158015610945573d6000803e3d6000fd5b505050506040513d602081101561095b57600080fd5b505190505b90565b60085481565b60065481565b600f5460009060ff161561098557506006610960565b600454600160a060020a0316151561099f57506001610960565b60048054604080517f82771c8e0000000000000000000000000000000000000000000000000000000081529051600160a060020a03909216926382771c8e9282820192602092908290030181600087803b1580156109fc57600080fd5b505af1158015610a10573d6000803e3d6000fd5b505050506040513d6020811015610a2657600080fd5b50511515610a3657506001610960565b600354604080517f8e7682880000000000000000000000000000000000000000000000000000000081523060048201529051600160a060020a0390921691638e768288916024808201926020929091908290030181600087803b158015610a9c57600080fd5b505af1158015610ab0573d6000803e3d6000fd5b505050506040513d6020811015610ac657600080fd5b50511515610ad657506001610960565b600754421015610ae857506002610960565b6008544211158015610aff5750610afd6119c1565b155b15610b0c57506003610960565b610b1461158e565b15610b2157506004610960565b610b2961158e565b158015610b3857506000600a54115b8015610b485750600a54600d5410155b15610b5557506007610960565b506005610960565b600054600160a060020a03163314610b7457600080fd5b6004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383811691909117808355604080517f614cb9040000000000000000000000000000000000000000000000000000000081529051919092169263614cb904928082019260209290918290030181600087803b158015610bf457600080fd5b505af1158015610c08573d6000803e3d6000fd5b505050506040513d6020811015610c1e57600080fd5b50511515610c2b57600080fd5b50565b60006002866040518082600160a060020a0316600160a060020a03166c010000000000000000000000000281526014019150506020604051808303816000865af1158015610c80573d6000803e3d6000fd5b5050506040513d6020811015610c9557600080fd5b5051601454604080516000808252602080830180855286905260ff8a16838501526060830189905260808301889052925194955062010000909304600160a060020a03169360019360a08084019493601f198401939081900390910191865af1158015610d06573d6000803e3d6000fd5b50505060206040510351600160a060020a0316141515610d2557600080fd5b6fffffffffffffffffffffffffffffffff85161515610d4357600080fd5b610d4d8686611c52565b50505050505050565b60106020526000908152604090205481565b600454600160a060020a031681565b600080548190600160a060020a03163314610d9157600080fd5b600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610dfd57600080fd5b505af1158015610e11573d6000803e3d6000fd5b505050506040513d6020811015610e2757600080fd5b5051600a8054604080516000805160206123da833981519152815260048101929092528688026024830181905290519390920a8702945090925073__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f91604480820192602092909190829003018186803b158015610e9d57600080fd5b505af4158015610eb1573d6000803e3d6000fd5b505050506040513d6020811015610ec757600080fd5b5051600a55600954604080516000805160206123da83398151915281526004810192909252602482018490525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b158015610f2f57600080fd5b505af4158015610f43573d6000803e3d6000fd5b505050506040513d6020811015610f5957600080fd5b5051600955600160a060020a0385166000908152601060209081526040918290205482516000805160206123da8339815191528152600481019190915260248101849052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b158015610fd757600080fd5b505af4158015610feb573d6000803e3d6000fd5b505050506040513d602081101561100157600080fd5b5051600160a060020a03861660009081526010602090815260408083209390935560118152908290205482516000805160206123da8339815191528152600481019190915260248101859052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561108757600080fd5b505af415801561109b573d6000803e3d6000fd5b505050506040513d60208110156110b157600080fd5b5051600160a060020a0386166000908152601160205260409020556110d68583611df9565b60408051600160a060020a0387168152602081018390528082018490526000606082015290517f0396f60aaad038749091d273dc13aaabc63db6e2271c7bad442d5cf25cc433509181900360800190a15050505050565b60155481565b600a5481565b600190565b60048061114961096f565b600781111561115457fe5b1461115e57600080fd5b600054600160a060020a0316331461117557600080fd5b60005474010000000000000000000000000000000000000000900460ff161561119d57600080fd5b600f5460ff16156111ad57600080fd5b600454600160a060020a0316156112335760048054604080517f0bf318a30000000000000000000000000000000000000000000000000000000081529051600160a060020a0390921692630bf318a392828201926000929082900301818387803b15801561121a57600080fd5b505af115801561122e573d6000803e3d6000fd5b505050505b50600f805460ff19166001179055565b600054600160a060020a0316331461125a57600080fd5b6003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038381169190911791829055604080517f04bbc255000000000000000000000000000000000000000000000000000000008152905192909116916304bbc255916004808201926020929091908290030181600087803b158015610bf457600080fd5b60095481565b60006007806112f161096f565b60078111156112fc57fe5b1461130657600080fd5b33600090815260106020526040902054915081151561132457600080fd5b33600090815260106020908152604080832092909255600e5482516000805160206123da8339815191528152600481019190915260248101859052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561139957600080fd5b505af41580156113ad573d6000803e3d6000fd5b505050506040513d60208110156113c357600080fd5b5051600e55604080513381526020810184905281517fbb28353e4598c3b9199101a66e0989549b659a59a54d2c27fbb183f1932c8e6d929181900390910190a1604051339083156108fc029084906000818181858888f1935050505015156108c857600080fd5b601454620100009004600160a060020a031681565b600e5481565b600054600160a060020a0316331461145c57600080fd5b6000805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b60015481565b604080517001000000000000000000000000000000006fffffffffffffffffffffffffffffffff851602815290519081900360100190207fff000000000000000000000000000000000000000000000000000000000000009081169082161461150157600080fd5b6108c83383611afd565b600054600160a060020a0316331461152257600080fd5b8042111561152f57600080fd5b80600754111561153e57600080fd5b60088190556040805182815290517fd34bb772c4ae9baa99db852f622773b31c7827e8ee818449fef20d30980bd3109181900360200190a150565b600354600160a060020a031681565b600d5481565b600654600a54101590565b600054600160a060020a031633146115b057600080fd5b6014805460ff191682151517908190556040805160ff808416151582526101008404161515602082015262010000909204600160a060020a031682820152517f48d826081348f5f00e8a33c9ae8ce89ed4c6e88400b585a478bc203d9e8177d3916060908290030190a150565b60058061162861096f565b600781111561163357fe5b1461163d57600080fd5b34151561164957600080fd5b600d54604080516000805160206123da833981519152815260048101929092523460248301525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b1580156116ab57600080fd5b505af41580156116bf573d6000803e3d6000fd5b505050506040513d60208110156116d557600080fd5b5051600d5550565b600054600160a060020a031633146116f457600080fd5b601355565b600054600160a060020a031681565b600080600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561177757600080fd5b505af115801561178b573d6000803e3d6000fd5b505050506040513d60208110156117a157600080fd5b5051604080517f1d3b9edf00000000000000000000000000000000000000000000000000000000815260048101879052600a9290920a602483018190529051909250849173__contracts/SafeMathLib.sol:SafeMathLi__91631d3b9edf91604480820192602092909190829003018186803b15801561182157600080fd5b505af4158015611835573d6000803e3d6000fd5b505050506040513d602081101561184b57600080fd5b505181151561185657fe5b04949350505050565b600554600160a060020a031681565b60116020526000908152604090205481565b610c2b3382611afd565b601554109392505050565b61189e33610898565b565b6000600460009054906101000a9004600160a060020a0316600160a060020a03166382771c8e6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561093157600080fd5b60075481565b600f5460ff1681565b60005474010000000000000000000000000000000000000000900460ff1681565b60126020526000908152604090205460ff1681565b600054600160a060020a0316331461196a57600080fd5b60005474010000000000000000000000000000000000000000900460ff16151561199357600080fd5b6000805474ff000000000000000000000000000000000000000019169055565b601454610100900460ff1681565b601554600954101590565b600c5481565b600054600160a060020a031633146119e957600080fd5b600160a060020a038216600081815260126020908152604091829020805460ff191685151590811790915582519384529083015280517fa54714518c5d275fdcd3d2a461e4858e4e8cb04fb93cd0bca9d6d34115f264409281900390910190a15050565b600054600160a060020a03163314611a6457600080fd5b60148054600160a060020a038084166201000090810275ffffffffffffffffffffffffffffffffffffffff00001987151561010090810261ff0019909616959095171617938490556040805160ff86811615158252948604909416151560208501529304168183015290517f48d826081348f5f00e8a33c9ae8ce89ed4c6e88400b585a478bc203d9e8177d39181900360600190a15050565b601454610100900460ff1615611b1257600080fd5b6fffffffffffffffffffffffffffffffff81161515611b3057600080fd5b611b3a8282611c52565b505050565b600054600160a060020a03163314611b5657600080fd5b600160a060020a0381161515611b6b57600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600054600160a060020a03163314611bea57600080fd5b600154600c541115611bfb57600080fd5b6005805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b611c373385858585610c2e565b50505050565b600b5481565b600254600160a060020a031681565b6000805474010000000000000000000000000000000000000000900460ff1615611c7b57600080fd5b611df28383600360009054906101000a9004600160a060020a0316600160a060020a03166318a4155e34600b54600a540360095433600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015611d1c57600080fd5b505af1158015611d30573d6000803e3d6000fd5b505050506040513d6020811015611d4657600080fd5b5051604080517c010000000000000000000000000000000000000000000000000000000063ffffffff8916028152600481019690965260248601949094526044850192909252600160a060020a0316606484015260848301525160a48083019260209291908290030181600087803b158015611dc157600080fd5b505af1158015611dd5573d6000803e3d6000fd5b505050506040513d6020811015611deb57600080fd5b5051611e7e565b9392505050565b600254604080517f40c10f19000000000000000000000000000000000000000000000000000000008152600160a060020a038581166004830152602482018590529151919092169182916340c10f199160448082019260009290919082900301818387803b158015611e6a57600080fd5b505af1158015610d4d573d6000803e3d6000fd5b60008054819074010000000000000000000000000000000000000000900460ff1615611ea957600080fd5b6002611eb361096f565b6007811115611ebe57fe5b1415611ef057600160a060020a03851660009081526012602052604090205460ff161515611eeb57600080fd5b611f0c565b6003611efa61096f565b6007811115611f0557fe5b1415610292575b5034821515611f1a57600080fd5b600160a060020a0385166000908152601060205260409020541515611f4357600c805460010190555b600160a060020a0385166000908152601060209081526040918290205482516000805160206123da8339815191528152600481019190915260248101849052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b158015611fbc57600080fd5b505af4158015611fd0573d6000803e3d6000fd5b505050506040513d6020811015611fe657600080fd5b5051600160a060020a03861660009081526010602090815260408083209390935560118152908290205482516000805160206123da8339815191528152600481019190915260248101869052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561206c57600080fd5b505af4158015612080573d6000803e3d6000fd5b505050506040513d602081101561209657600080fd5b5051600160a060020a03861660009081526011602090815260409182902092909255600a5481516000805160206123da8339815191528152600481019190915260248101849052905173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f9260448082019391829003018186803b15801561211657600080fd5b505af415801561212a573d6000803e3d6000fd5b505050506040513d602081101561214057600080fd5b5051600a55600954604080516000805160206123da83398151915281526004810192909252602482018590525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b1580156121a857600080fd5b505af41580156121bc573d6000803e3d6000fd5b505050506040513d60208110156121d257600080fd5b5051600955600354604080517ff14ae17d000000000000000000000000000000000000000000000000000000008152600160a060020a0388811660048301529151919092169163f14ae17d9160248083019260209291908290030181600087803b15801561223f57600080fd5b505af1158015612253573d6000803e3d6000fd5b505050506040513d602081101561226957600080fd5b50511561231757600b5473__contracts/SafeMathLib.sol:SafeMathLi__6366098d4f9091836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b1580156122e757600080fd5b505af41580156122fb573d6000803e3d6000fd5b505050506040513d602081101561231157600080fd5b5051600b555b6123278184600a5460095461188a565b1561233157600080fd5b61233b8584611df9565b600554604051600160a060020a039091169082156108fc029083906000818181858888f19350505050151561236f57600080fd5b60408051600160a060020a0387168152602081018390528082018590526fffffffffffffffffffffffffffffffff8616606082015290517f0396f60aaad038749091d273dc13aaabc63db6e2271c7bad442d5cf25cc433509181900360800190a150909392505050560066098d4f00000000000000000000000000000000000000000000000000000000a165627a7a72305820a20a0cf7a49e6ae8a0e15e1d4a12ebecb57d0480fc1aff9ed5dfad6c9212dd080029", "bytecode_runtime": "0x6080604052600436106102925763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630226401d811461029757806303ca0eed146102be57806303f9c793146102e7578063062b01ce146102fd5780630a09284a1461031257806313f4e977146103275780631865c57d1461033c57806319b667da146103755780631a49803b146103965780631aae3460146103cb57806321d5c0f6146103ec57806332013ac31461041d5780633ad075ea146104445780634042b66f146104595780634551dd591461046e5780634bb278f31461048357806350c6773414610498578063518ab2a8146104b9578063590e1ae3146104ce5780635b7633d0146104e35780635da89ac0146104f85780635ed7ca5b1461050d5780636203f09f1461052257806363c6082f146105375780636e50eb3f1461057957806378b99c2414610591578063797d9437146105a65780637c2e08a3146105bb5780637f7d711e146105d057806387612102146105ea5780638d51faec146105f25780638da5cb5b1461060a578063903cc5831461061f5780639075becf1461063a57806397b150ca1461064f57806399e9376c146106705780639d3c663f1461068d578063a6f2ae3a146106ae578063a7ba44c3146106b6578063af468682146106cb578063b3f05b97146106e0578063b9b8af0b146106f5578063cb16e6d01461070a578063cb3e64fd1461072b578063d222dc0414610740578063d5d0902114610755578063d7e64c001461076a578063eac249321461077f578063ed68ff2c146107a5578063ef869443146107cb578063f2fde38b146107f4578063f3283fba14610815578063f486972614610836578063f7c00e2f1461085f578063fc0c546a14610874575b600080fd5b3480156102a357600080fd5b506102ac610889565b60408051918252519081900360200190f35b3480156102ca57600080fd5b506102d361088f565b604080519115158252519081900360200190f35b6102fb600160a060020a0360043516610898565b005b34801561030957600080fd5b506102d36108cc565b34801561031e57600080fd5b506102ac610963565b34801561033357600080fd5b506102ac610969565b34801561034857600080fd5b5061035161096f565b6040518082600781111561036157fe5b60ff16815260200191505060405180910390f35b34801561038157600080fd5b506102fb600160a060020a0360043516610b5d565b6102fb600160a060020a03600435166fffffffffffffffffffffffffffffffff6024351660ff60443516606435608435610c2e565b3480156103d757600080fd5b506102ac600160a060020a0360043516610d56565b3480156103f857600080fd5b50610401610d68565b60408051600160a060020a039092168252519081900360200190f35b34801561042957600080fd5b506102fb600160a060020a0360043516602435604435610d77565b34801561045057600080fd5b506102ac61112d565b34801561046557600080fd5b506102ac611133565b34801561047a57600080fd5b506102d3611139565b34801561048f57600080fd5b506102fb61113e565b3480156104a457600080fd5b506102fb600160a060020a0360043516611243565b3480156104c557600080fd5b506102ac6112de565b3480156104da57600080fd5b506102fb6112e4565b3480156104ef57600080fd5b5061040161142a565b34801561050457600080fd5b506102ac61143f565b34801561051957600080fd5b506102fb611445565b34801561052e57600080fd5b506102ac611493565b6102fb6fffffffffffffffffffffffffffffffff600435167fff0000000000000000000000000000000000000000000000000000000000000060243516611499565b34801561058557600080fd5b506102fb60043561150b565b34801561059d57600080fd5b50610401611579565b3480156105b257600080fd5b506102ac611588565b3480156105c757600080fd5b506102d361158e565b3480156105dc57600080fd5b506102fb6004351515611599565b6102fb61161d565b3480156105fe57600080fd5b506102fb6004356116dd565b34801561061657600080fd5b506104016116f9565b34801561062b57600080fd5b506102ac600435602435611708565b34801561064657600080fd5b5061040161185f565b34801561065b57600080fd5b506102ac600160a060020a036004351661186e565b6102fb6fffffffffffffffffffffffffffffffff60043516611880565b34801561069957600080fd5b506102d360043560243560443560643561188a565b6102fb611895565b3480156106c257600080fd5b506102d36118a0565b3480156106d757600080fd5b506102ac61190e565b3480156106ec57600080fd5b506102d3611914565b34801561070157600080fd5b506102d361191d565b34801561071657600080fd5b506102d3600160a060020a036004351661193e565b34801561073757600080fd5b506102fb611953565b34801561074c57600080fd5b506102d36119b3565b34801561076157600080fd5b506102d36119c1565b34801561077657600080fd5b506102ac6119cc565b34801561078b57600080fd5b506102fb600160a060020a036004351660243515156119d2565b3480156107b157600080fd5b506102fb6004351515600160a060020a0360243516611a4d565b6102fb600160a060020a03600435166fffffffffffffffffffffffffffffffff60243516611afd565b34801561080057600080fd5b506102fb600160a060020a0360043516611b3f565b34801561082157600080fd5b506102fb600160a060020a0360043516611bd3565b6102fb6fffffffffffffffffffffffffffffffff6004351660ff60243516604435606435611c2a565b34801561086b57600080fd5b506102ac611c3d565b34801561088057600080fd5b50610401611c43565b60135481565b60145460ff1681565b60145460ff16156108a857600080fd5b601454610100900460ff16156108bd57600080fd5b6108c8816000611c52565b5050565b600354604080517f8e7682880000000000000000000000000000000000000000000000000000000081523060048201529051600092600160a060020a031691638e76828891602480830192602092919082900301818787803b15801561093157600080fd5b505af1158015610945573d6000803e3d6000fd5b505050506040513d602081101561095b57600080fd5b505190505b90565b60085481565b60065481565b600f5460009060ff161561098557506006610960565b600454600160a060020a0316151561099f57506001610960565b60048054604080517f82771c8e0000000000000000000000000000000000000000000000000000000081529051600160a060020a03909216926382771c8e9282820192602092908290030181600087803b1580156109fc57600080fd5b505af1158015610a10573d6000803e3d6000fd5b505050506040513d6020811015610a2657600080fd5b50511515610a3657506001610960565b600354604080517f8e7682880000000000000000000000000000000000000000000000000000000081523060048201529051600160a060020a0390921691638e768288916024808201926020929091908290030181600087803b158015610a9c57600080fd5b505af1158015610ab0573d6000803e3d6000fd5b505050506040513d6020811015610ac657600080fd5b50511515610ad657506001610960565b600754421015610ae857506002610960565b6008544211158015610aff5750610afd6119c1565b155b15610b0c57506003610960565b610b1461158e565b15610b2157506004610960565b610b2961158e565b158015610b3857506000600a54115b8015610b485750600a54600d5410155b15610b5557506007610960565b506005610960565b600054600160a060020a03163314610b7457600080fd5b6004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383811691909117808355604080517f614cb9040000000000000000000000000000000000000000000000000000000081529051919092169263614cb904928082019260209290918290030181600087803b158015610bf457600080fd5b505af1158015610c08573d6000803e3d6000fd5b505050506040513d6020811015610c1e57600080fd5b50511515610c2b57600080fd5b50565b60006002866040518082600160a060020a0316600160a060020a03166c010000000000000000000000000281526014019150506020604051808303816000865af1158015610c80573d6000803e3d6000fd5b5050506040513d6020811015610c9557600080fd5b5051601454604080516000808252602080830180855286905260ff8a16838501526060830189905260808301889052925194955062010000909304600160a060020a03169360019360a08084019493601f198401939081900390910191865af1158015610d06573d6000803e3d6000fd5b50505060206040510351600160a060020a0316141515610d2557600080fd5b6fffffffffffffffffffffffffffffffff85161515610d4357600080fd5b610d4d8686611c52565b50505050505050565b60106020526000908152604090205481565b600454600160a060020a031681565b600080548190600160a060020a03163314610d9157600080fd5b600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610dfd57600080fd5b505af1158015610e11573d6000803e3d6000fd5b505050506040513d6020811015610e2757600080fd5b5051600a8054604080516000805160206123da833981519152815260048101929092528688026024830181905290519390920a8702945090925073__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f91604480820192602092909190829003018186803b158015610e9d57600080fd5b505af4158015610eb1573d6000803e3d6000fd5b505050506040513d6020811015610ec757600080fd5b5051600a55600954604080516000805160206123da83398151915281526004810192909252602482018490525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b158015610f2f57600080fd5b505af4158015610f43573d6000803e3d6000fd5b505050506040513d6020811015610f5957600080fd5b5051600955600160a060020a0385166000908152601060209081526040918290205482516000805160206123da8339815191528152600481019190915260248101849052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b158015610fd757600080fd5b505af4158015610feb573d6000803e3d6000fd5b505050506040513d602081101561100157600080fd5b5051600160a060020a03861660009081526010602090815260408083209390935560118152908290205482516000805160206123da8339815191528152600481019190915260248101859052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561108757600080fd5b505af415801561109b573d6000803e3d6000fd5b505050506040513d60208110156110b157600080fd5b5051600160a060020a0386166000908152601160205260409020556110d68583611df9565b60408051600160a060020a0387168152602081018390528082018490526000606082015290517f0396f60aaad038749091d273dc13aaabc63db6e2271c7bad442d5cf25cc433509181900360800190a15050505050565b60155481565b600a5481565b600190565b60048061114961096f565b600781111561115457fe5b1461115e57600080fd5b600054600160a060020a0316331461117557600080fd5b60005474010000000000000000000000000000000000000000900460ff161561119d57600080fd5b600f5460ff16156111ad57600080fd5b600454600160a060020a0316156112335760048054604080517f0bf318a30000000000000000000000000000000000000000000000000000000081529051600160a060020a0390921692630bf318a392828201926000929082900301818387803b15801561121a57600080fd5b505af115801561122e573d6000803e3d6000fd5b505050505b50600f805460ff19166001179055565b600054600160a060020a0316331461125a57600080fd5b6003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038381169190911791829055604080517f04bbc255000000000000000000000000000000000000000000000000000000008152905192909116916304bbc255916004808201926020929091908290030181600087803b158015610bf457600080fd5b60095481565b60006007806112f161096f565b60078111156112fc57fe5b1461130657600080fd5b33600090815260106020526040902054915081151561132457600080fd5b33600090815260106020908152604080832092909255600e5482516000805160206123da8339815191528152600481019190915260248101859052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561139957600080fd5b505af41580156113ad573d6000803e3d6000fd5b505050506040513d60208110156113c357600080fd5b5051600e55604080513381526020810184905281517fbb28353e4598c3b9199101a66e0989549b659a59a54d2c27fbb183f1932c8e6d929181900390910190a1604051339083156108fc029084906000818181858888f1935050505015156108c857600080fd5b601454620100009004600160a060020a031681565b600e5481565b600054600160a060020a0316331461145c57600080fd5b6000805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b60015481565b604080517001000000000000000000000000000000006fffffffffffffffffffffffffffffffff851602815290519081900360100190207fff000000000000000000000000000000000000000000000000000000000000009081169082161461150157600080fd5b6108c83383611afd565b600054600160a060020a0316331461152257600080fd5b8042111561152f57600080fd5b80600754111561153e57600080fd5b60088190556040805182815290517fd34bb772c4ae9baa99db852f622773b31c7827e8ee818449fef20d30980bd3109181900360200190a150565b600354600160a060020a031681565b600d5481565b600654600a54101590565b600054600160a060020a031633146115b057600080fd5b6014805460ff191682151517908190556040805160ff808416151582526101008404161515602082015262010000909204600160a060020a031682820152517f48d826081348f5f00e8a33c9ae8ce89ed4c6e88400b585a478bc203d9e8177d3916060908290030190a150565b60058061162861096f565b600781111561163357fe5b1461163d57600080fd5b34151561164957600080fd5b600d54604080516000805160206123da833981519152815260048101929092523460248301525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b1580156116ab57600080fd5b505af41580156116bf573d6000803e3d6000fd5b505050506040513d60208110156116d557600080fd5b5051600d5550565b600054600160a060020a031633146116f457600080fd5b601355565b600054600160a060020a031681565b600080600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561177757600080fd5b505af115801561178b573d6000803e3d6000fd5b505050506040513d60208110156117a157600080fd5b5051604080517f1d3b9edf00000000000000000000000000000000000000000000000000000000815260048101879052600a9290920a602483018190529051909250849173__contracts/SafeMathLib.sol:SafeMathLi__91631d3b9edf91604480820192602092909190829003018186803b15801561182157600080fd5b505af4158015611835573d6000803e3d6000fd5b505050506040513d602081101561184b57600080fd5b505181151561185657fe5b04949350505050565b600554600160a060020a031681565b60116020526000908152604090205481565b610c2b3382611afd565b601554109392505050565b61189e33610898565b565b6000600460009054906101000a9004600160a060020a0316600160a060020a03166382771c8e6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561093157600080fd5b60075481565b600f5460ff1681565b60005474010000000000000000000000000000000000000000900460ff1681565b60126020526000908152604090205460ff1681565b600054600160a060020a0316331461196a57600080fd5b60005474010000000000000000000000000000000000000000900460ff16151561199357600080fd5b6000805474ff000000000000000000000000000000000000000019169055565b601454610100900460ff1681565b601554600954101590565b600c5481565b600054600160a060020a031633146119e957600080fd5b600160a060020a038216600081815260126020908152604091829020805460ff191685151590811790915582519384529083015280517fa54714518c5d275fdcd3d2a461e4858e4e8cb04fb93cd0bca9d6d34115f264409281900390910190a15050565b600054600160a060020a03163314611a6457600080fd5b60148054600160a060020a038084166201000090810275ffffffffffffffffffffffffffffffffffffffff00001987151561010090810261ff0019909616959095171617938490556040805160ff86811615158252948604909416151560208501529304168183015290517f48d826081348f5f00e8a33c9ae8ce89ed4c6e88400b585a478bc203d9e8177d39181900360600190a15050565b601454610100900460ff1615611b1257600080fd5b6fffffffffffffffffffffffffffffffff81161515611b3057600080fd5b611b3a8282611c52565b505050565b600054600160a060020a03163314611b5657600080fd5b600160a060020a0381161515611b6b57600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600054600160a060020a03163314611bea57600080fd5b600154600c541115611bfb57600080fd5b6005805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b611c373385858585610c2e565b50505050565b600b5481565b600254600160a060020a031681565b6000805474010000000000000000000000000000000000000000900460ff1615611c7b57600080fd5b611df28383600360009054906101000a9004600160a060020a0316600160a060020a03166318a4155e34600b54600a540360095433600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015611d1c57600080fd5b505af1158015611d30573d6000803e3d6000fd5b505050506040513d6020811015611d4657600080fd5b5051604080517c010000000000000000000000000000000000000000000000000000000063ffffffff8916028152600481019690965260248601949094526044850192909252600160a060020a0316606484015260848301525160a48083019260209291908290030181600087803b158015611dc157600080fd5b505af1158015611dd5573d6000803e3d6000fd5b505050506040513d6020811015611deb57600080fd5b5051611e7e565b9392505050565b600254604080517f40c10f19000000000000000000000000000000000000000000000000000000008152600160a060020a038581166004830152602482018590529151919092169182916340c10f199160448082019260009290919082900301818387803b158015611e6a57600080fd5b505af1158015610d4d573d6000803e3d6000fd5b60008054819074010000000000000000000000000000000000000000900460ff1615611ea957600080fd5b6002611eb361096f565b6007811115611ebe57fe5b1415611ef057600160a060020a03851660009081526012602052604090205460ff161515611eeb57600080fd5b611f0c565b6003611efa61096f565b6007811115611f0557fe5b1415610292575b5034821515611f1a57600080fd5b600160a060020a0385166000908152601060205260409020541515611f4357600c805460010190555b600160a060020a0385166000908152601060209081526040918290205482516000805160206123da8339815191528152600481019190915260248101849052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b158015611fbc57600080fd5b505af4158015611fd0573d6000803e3d6000fd5b505050506040513d6020811015611fe657600080fd5b5051600160a060020a03861660009081526010602090815260408083209390935560118152908290205482516000805160206123da8339815191528152600481019190915260248101869052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561206c57600080fd5b505af4158015612080573d6000803e3d6000fd5b505050506040513d602081101561209657600080fd5b5051600160a060020a03861660009081526011602090815260409182902092909255600a5481516000805160206123da8339815191528152600481019190915260248101849052905173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f9260448082019391829003018186803b15801561211657600080fd5b505af415801561212a573d6000803e3d6000fd5b505050506040513d602081101561214057600080fd5b5051600a55600954604080516000805160206123da83398151915281526004810192909252602482018590525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b1580156121a857600080fd5b505af41580156121bc573d6000803e3d6000fd5b505050506040513d60208110156121d257600080fd5b5051600955600354604080517ff14ae17d000000000000000000000000000000000000000000000000000000008152600160a060020a0388811660048301529151919092169163f14ae17d9160248083019260209291908290030181600087803b15801561223f57600080fd5b505af1158015612253573d6000803e3d6000fd5b505050506040513d602081101561226957600080fd5b50511561231757600b5473__contracts/SafeMathLib.sol:SafeMathLi__6366098d4f9091836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b1580156122e757600080fd5b505af41580156122fb573d6000803e3d6000fd5b505050506040513d602081101561231157600080fd5b5051600b555b6123278184600a5460095461188a565b1561233157600080fd5b61233b8584611df9565b600554604051600160a060020a039091169082156108fc029083906000818181858888f19350505050151561236f57600080fd5b60408051600160a060020a0387168152602081018390528082018590526fffffffffffffffffffffffffffffffff8616606082015290517f0396f60aaad038749091d273dc13aaabc63db6e2271c7bad442d5cf25cc433509181900360800190a150909392505050560066098d4f00000000000000000000000000000000000000000000000000000000a165627a7a72305820a20a0cf7a49e6ae8a0e15e1d4a12ebecb57d0480fc1aff9ed5dfad6c9212dd080029", "direct_dependencies": ["SafeMathLib"], "full_dependencies": ["SafeMathLib"], "linkrefs": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 8446}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 8740}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 9082}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 9434}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 11006}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 12572}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 13318}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 17220}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 17572}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 17914}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 18198}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 18722}], "linkrefs_runtime": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 7366}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 7660}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 8002}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 8354}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 9926}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 11492}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 12238}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 16140}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 16492}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 16834}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 17118}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 17642}], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": true, "inputs": [], "name": "ownerTestValue", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "requireCustomerId", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "invest", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "isPricingSane", "outputs": [{"name": "sane", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "endsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "minimumFundingGoal", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getState", "outputs": [{"name": "", "type": "uint8"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setFinalizeAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "customerId", "type": "uint128"}, {"name": "v", "type": "uint8"}, {"name": "r", "type": "bytes32"}, {"name": "s", "type": "bytes32"}], "name": "investWithSignedAddress", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "investedAmountOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "finalizeAgent", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "receiver", "type": "address"}, {"name": "fullTokens", "type": "uint256"}, {"name": "weiPrice", "type": "uint256"}], "name": "preallocate", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "maximumSellableTokens", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "weiRaised", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isCrowdsale", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "finalize", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_pricingStrategy", "type": "address"}], "name": "setPricingStrategy", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "tokensSold", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "refund", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "signerAddress", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "weiRefunded", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "halt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}, {"name": "checksum", "type": "bytes1"}], "name": "buyWithCustomerIdWithChecksum", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "time", "type": "uint256"}], "name": "setEndsAt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "pricingStrategy", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "loadedRefund", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isMinimumGoalReached", "outputs": [{"name": "reached", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "bool"}], "name": "setRequireCustomerId", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "loadRefund", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "val", "type": "uint256"}], "name": "setOwnerTestValue", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "weisTotal", "type": "uint256"}, {"name": "pricePerToken", "type": "uint256"}], "name": "calculateTokens", "outputs": [{"name": "tokensTotal", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "multisigWallet", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "tokenAmountOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}], "name": "buyWithCustomerId", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [{"name": "weiAmount", "type": "uint256"}, {"name": "tokenAmount", "type": "uint256"}, {"name": "weiRaisedTotal", "type": "uint256"}, {"name": "tokensSoldTotal", "type": "uint256"}], "name": "isBreakingCap", "outputs": [{"name": "limitBroken", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "buy", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "isFinalizerSane", "outputs": [{"name": "sane", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "startsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "finalized", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "halted", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "earlyParticipantWhitelist", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "unhalt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "requiredSignedAddress", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isCrowdsaleFull", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "investorCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "status", "type": "bool"}], "name": "setEarlyParicipantWhitelist", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "bool"}, {"name": "_signerAddress", "type": "address"}], "name": "setRequireSignedAddress", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "customerId", "type": "uint128"}], "name": "investWithCustomerId", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setMultisig", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}, {"name": "v", "type": "uint8"}, {"name": "r", "type": "bytes32"}, {"name": "s", "type": "bytes32"}], "name": "buyWithSignedAddress", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "presaleWeiRaised", "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": "_token", "type": "address"}, {"name": "_pricingStrategy", "type": "address"}, {"name": "_multisigWallet", "type": "address"}, {"name": "_start", "type": "uint256"}, {"name": "_end", "type": "uint256"}, {"name": "_minimumFundingGoal", "type": "uint256"}, {"name": "_maximumSellableTokens", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"payable": true, "stateMutability": "payable", "type": "fallback"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}, {"indexed": false, "name": "tokenAmount", "type": "uint256"}, {"indexed": false, "name": "customerId", "type": "uint128"}], "name": "Invested", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}], "name": "Refund", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newRequireCustomerId", "type": "bool"}, {"indexed": false, "name": "newRequiredSignedAddress", "type": "bool"}, {"indexed": false, "name": "newSignerAddress", "type": "address"}], "name": "InvestmentPolicyChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "addr", "type": "address"}, {"indexed": false, "name": "status", "type": "bool"}], "name": "Whitelisted", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newEndsAt", "type": "uint256"}], "name": "EndsAtChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "devdoc": {"methods": {"calculateTokens(uint256,uint256)": {"details": "Calculate tokens user will have for their purchase", "params": {"pricePerToken": "What is the price for one token", "weisTotal": "How much ethers (in wei) the user putssssss in"}, "return": "tokensTotal which is received tokens, token decimals included"}, "isMinimumGoalReached()": {"return": "true if the crowdsale has raised enough money to be a successful."}, "preallocate(address,uint256,uint256)": {"params": {"fullTokens": "tokens as full tokens - decimal places added internally", "weiPrice": "Price of a single full token in wei "}}, "transferOwnership(address)": {"details": "Allows the current owner to transfer control of the contract to a newOwner.", "params": {"newOwner": "The address to transfer ownership to."}}}}, "userdoc": {"methods": {"buy()": {"notice": "The basic entry point to participate the crowdsale process. * Pay for funding, get invested tokens back in the sender address."}, "buyWithCustomerId(uint128)": {"notice": "Legacy API signature."}, "buyWithCustomerIdWithChecksum(uint128,bytes1)": {"notice": "Invest to tokens, recognize the payer. "}, "buyWithSignedAddress(uint128,uint8,bytes32,bytes32)": {"notice": "Invest to tokens, recognize the payer and clear his address. "}, "finalize()": {"notice": "Finalize a succcesful crowdsale. * The owner can triggre a call the contract that provides post-crowdsale actions, like releasing the tokens."}, "getState()": {"notice": "Crowdfund state machine management. * We make it a function and do not assign the result to a variable, so there is no chance of the variable being stale."}, "invest(address)": {"notice": "Allow anonymous contributions to this crowdsale."}, "investWithCustomerId(address,uint128)": {"notice": "Track who is the customer making the payment so we can send thank you email."}, "investWithSignedAddress(address,uint128,uint8,bytes32,bytes32)": {"notice": "Allow anonymous contributions to this crowdsale."}, "isBreakingCap(uint256,uint256,uint256,uint256)": {"notice": "Called from invest() to confirm if the curret investment does not break our cap rule."}, "isCrowdsale()": {"notice": "Interface marker. "}, "isFinalizerSane()": {"notice": "Check if the contract relationship looks good."}, "isPricingSane()": {"notice": "Check if the contract relationship looks good."}, "loadRefund()": {"notice": "Allow load refunds back on the contract for the refunding. * The team can transfer the funds back on the smart contract in the case the minimum goal was not reached.."}, "preallocate(address,uint256,uint256)": {"notice": "Preallocate tokens for the early investors. * Preallocated tokens have been sold before the actual crowdsale opens. This function mints the tokens and moves the crowdsale needle. * Investor count is not handled; it is assumed this goes for multiple investors and the token distribution happens outside the smart contract flow. * No money is exchanged, as the crowdsale team already have received the payment."}, "refund()": {"notice": "Investors can claim refund. * Note that any refunds from proxy buyers should be handled separately, and not through this contract."}, "setEarlyParicipantWhitelist(address,bool)": {"notice": "Allow addresses to do early participation. * TODO: Fix spelling error in the name"}, "setEndsAt(uint256)": {"notice": "Allow crowdsale owner to close early or extend the crowdsale. * This is useful e.g. for a manual soft cap implementation: - after X amount is reached determine manual closing * This may put the crowdsale to an invalid state, but we trust owners know what they are doing. "}, "setFinalizeAgent(address)": {"notice": "Allow to (re)set finalize agent. * Design choice: no state restrictions on setting this, so that we can fix fat finger mistakes."}, "setMultisig(address)": {"notice": "Allow to change the team multisig address in the case of emergency. * This allows to save a deployed crowdsale wallet in the case the crowdsale has not yet begun (we have done only few test transactions). After the crowdsale is going then multisig address stays locked for the safety reasons."}, "setOwnerTestValue(uint256)": {"notice": "This is for manual testing of multisig wallet interaction "}, "setPricingStrategy(address)": {"notice": "Allow to (re)set pricing strategy. * Design choice: no state restrictions on the set, so that we can fix fat finger mistakes."}, "setRequireCustomerId(bool)": {"notice": "Set policy do we need to have server-side customer ids for the investments. "}, "setRequireSignedAddress(bool,address)": {"notice": "Set policy if all investors must be cleared on the server side first. * This is e.g. for the accredited investor clearing. "}}}}, "settings": {"compilationTarget": {"contracts/MintedTokenCappedCrowdsale.sol": "MintedTokenCappedCrowdsale"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/Crowdsale.sol": {"keccak256": "0x2697c26528f64bb954a7c2547d3b43317d2d2b02c7d9d05a7b1ab388cd79f65d", "urls": ["bzzr://f28b280794222114141c51dd5c388d403a7c98d8b51e04170a0e294246d5164b"]}, "contracts/CrowdsaleBase.sol": {"keccak256": "0xe2c9ed11183ce705616980df7b02544d72fe18b40395da7d9d4bcb621fb87871", "urls": ["bzzr://07f3887ba0d0eb3248b1ad3581480ed71a2fe70a47dcc283c4e97c8c92e0790a"]}, "contracts/FinalizeAgent.sol": {"keccak256": "0x309fd0510e0b3e2b5044e33f7c80cfb2d6f2a5697e41a5f185931d65770cfea9", "urls": ["bzzr://4e7ed6f82c0f542e92e56c12566b2ecd7666730865bf12566c27587ec64160ac"]}, "contracts/FractionalERC20.sol": {"keccak256": "0x75bc4ad90a8b13ce961c89b1bf405776f616e019d3a2720168f8e52be223198f", "urls": ["bzzr://6a3688f12da1a5c890ef06f80f883f6c5370886092d38a1b33cd4219b718478b"]}, "contracts/Haltable.sol": {"keccak256": "0x265dcf25e7c9ab4b6eecd2181f1b71334a1b5381a60f8db7d9526dab120f4b70", "urls": ["bzzr://d522e00fa9e075941469dd81738b59fdb99ce3c12cdc39e33abe40b588c4da9b"]}, "contracts/MintableToken.sol": {"keccak256": "0x650e1d6b2bedcd36508918357c7cf4f36fdd093cd0c4d6342f4dcd3bdcdd7578", "urls": ["bzzr://7ba2ac0480d428066a18727e2adb76ba56856ecd37b4420e801131ec8f8f4be3"]}, "contracts/MintedTokenCappedCrowdsale.sol": {"keccak256": "0xcbf855529729f71de827a444174aca4b9ea24afd98732a1b1676e1e40002b3cd", "urls": ["bzzr://2f5eb43ec94474c403930e5230551d1e78b8501efbde429e3dc65a00e8c683ee"]}, "contracts/PricingStrategy.sol": {"keccak256": "0x8df5093b7d07168ad994f9176de0bd2268f6563b1e8a3a448d8cfe7fe246c628", "urls": ["bzzr://ef5c944d51f739ab34e2c951d6ac82a7152e6bb844058a8e57bae52c14cbe16b"]}, "contracts/Recoverable.sol": {"keccak256": "0x311a332cdd87df6e00057f5455f4e68b043b5dbe211f6d68bc64e20817515635", "urls": ["bzzr://4fd99bcfb93baed6e7c8d22ee9ecc5c8346a1aa98288e77b01333b2c5d3f582d"]}, "contracts/SafeMathLib.sol": {"keccak256": "0x501bfe31e274b9a5591f7c540bdced4d4312e27d4f19599147c9bbca3d9c6b18", "urls": ["bzzr://a80935ebddb06c247d71372d4e5833ee029f08633bd0fe4a274a57009567e5b9"]}, "contracts/StandardTokenExt.sol": {"keccak256": "0x9ea2d4cec4dccd5639c05e6c23dd027d80b5e5a20abd99b280ab7b2631b5a5fc", "urls": ["bzzr://a52d8fc5a21bd83997aff19128e00dceb251df712207b61223894c8b7f42d5ff"]}, "zeppelin/contracts/math/SafeMath.sol": {"keccak256": "0x341ba8cb467a3623e819ba1a683ac1d264005186f308505214e5f6bc89446a08", "urls": ["bzzr://59b5652ee4e4a1b5a8f1a8906e14c84af43d636cf5ca0725cc1813aabe4c8c17"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}, "zeppelin/contracts/token/ERC20/BasicToken.sol": {"keccak256": "0x948404468d61ff35ea4194650670408dabd65da7f905a1c16888ab84520bf39e", "urls": ["bzzr://ea75e20f95d7e4e10394fe6bfaa8eee56b4757c2a6f1e8df4180d33afa621935"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}, "zeppelin/contracts/token/ERC20/StandardToken.sol": {"keccak256": "0xd2b344a5259e19ec143074cfa65637a10c40b68395c59808c4af13bccbb2de55", "urls": ["bzzr://d61a01175a7ca1ba9f4403de603c20b897e33ec425aef2d9f8a7f9ddfdfaf5b2"]}}, "version": 1}, "name": "MintedTokenCappedCrowdsale", "ordered_full_dependencies": ["SafeMathLib"], "source_path": "contracts/MintedTokenCappedCrowdsale.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Safe unsigned safe math.\n *\n * https://blog.aragon.one/library-driven-development-in-solidity-2bebcaf88736#.750gwtwli\n *\n * Originally from https://raw.githubusercontent.com/AragonOne/zeppelin-solidity/master/contracts/SafeMathLib.sol\n *\n * Maintained here until merged to mainline zeppelin-solidity.\n *\n */\nlibrary SafeMathLib {\n\n function times(uint a, uint b) returns (uint) {\n uint c = a * b;\n assert(a == 0 || c / a == b);\n return c;\n }\n\n function minus(uint a, uint b) returns (uint) {\n assert(b <= a);\n return a - b;\n }\n\n function plus(uint a, uint b) returns (uint) {\n uint c = a + b;\n assert(c>=a);\n return c;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Interface for defining crowdsale pricing.\n */\ncontract PricingStrategy {\n\n /** Interface declaration. */\n function isPricingStrategy() public constant returns (bool) {\n return true;\n }\n\n /** Self check if all references are correctly set.\n *\n * Checks that pricing strategy matches crowdsale parameters.\n */\n function isSane(address crowdsale) public constant returns (bool) {\n return true;\n }\n\n /**\n * @dev Pricing tells if this is a presale purchase or not.\n @param purchaser Address of the purchaser\n @return False by default, true if a presale purchaser\n */\n function isPresalePurchase(address purchaser) public constant returns (bool) {\n return false;\n }\n\n /**\n * When somebody tries to buy tokens for X eth, calculate how many tokens they get.\n *\n *\n * @param value - What is the value of the transaction send in as wei\n * @param tokensSold - how much tokens have been sold this far\n * @param weiRaised - how much money has been raised this far in the main token sale - this number excludes presale\n * @param msgSender - who is the investor of this transaction\n * @param decimals - how many decimal units the token has\n * @return Amount of tokens the investor receives\n */\n function calculatePrice(uint value, uint weiRaised, uint tokensSold, address msgSender, uint decimals) public constant returns (uint tokenAmount);\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Finalize agent defines what happens at the end of succeseful crowdsale.\n *\n * - Allocate tokens for founders, bounties and community\n * - Make tokens transferable\n * - etc.\n */\ncontract FinalizeAgent {\n\n function isFinalizeAgent() public constant returns(bool) {\n return true;\n }\n\n /** Return true if we can run finalizeCrowdsale() properly.\n *\n * This is a safety check function that doesn't allow crowdsale to begin\n * unless the finalizer has been set up properly.\n */\n function isSane() public constant returns (bool);\n\n /** Called once by crowdsale finalize() if the sale was success. */\n function finalizeCrowdsale();\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n\n/**\n * A token that defines fractional units as decimals.\n */\ncontract FractionalERC20 is ERC20 {\n\n uint public decimals;\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n/*\n * Haltable\n *\n * Abstract contract that allows children to implement an\n * emergency stop mechanism. Differs from Pausable by causing a throw when in halt mode.\n *\n *\n * Originally envisioned in FirstBlood ICO contract.\n */\ncontract Haltable is Ownable {\n bool public halted;\n\n modifier stopInEmergency {\n if (halted) throw;\n _;\n }\n\n modifier stopNonOwnersInEmergency {\n if (halted && msg.sender != owner) throw;\n _;\n }\n\n modifier onlyInEmergency {\n if (!halted) throw;\n _;\n }\n\n // called by the owner on emergency, triggers stopped state\n function halt() external onlyOwner {\n halted = true;\n }\n\n // called by the owner on end of emergency, returns to normal state\n function unhalt() external onlyOwner onlyInEmergency {\n halted = false;\n }\n\n}\n\n\n\n\n\n\n\n/**\n * Crowdsale state machine without buy functionality.\n *\n * Implements basic state machine logic, but leaves out all buy functions,\n * so that subclasses can implement their own buying logic.\n *\n *\n * For the default buy() implementation see Crowdsale.sol.\n */\ncontract CrowdsaleBase is Haltable {\n\n /* Max investment count when we are still allowed to change the multisig address */\n uint public MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE = 5;\n\n using SafeMathLib for uint;\n\n /* The token we are selling */\n FractionalERC20 public token;\n\n /* How we are going to price our offering */\n PricingStrategy public pricingStrategy;\n\n /* Post-success callback */\n FinalizeAgent public finalizeAgent;\n\n /* tokens will be transfered from this address */\n address public multisigWallet;\n\n /* if the funding goal is not reached, investors may withdraw their funds */\n uint public minimumFundingGoal;\n\n /* the UNIX timestamp start date of the crowdsale */\n uint public startsAt;\n\n /* the UNIX timestamp end date of the crowdsale */\n uint public endsAt;\n\n /* the number of tokens already sold through this contract*/\n uint public tokensSold = 0;\n\n /* How many wei of funding we have raised */\n uint public weiRaised = 0;\n\n /* Calculate incoming funds from presale contracts and addresses */\n uint public presaleWeiRaised = 0;\n\n /* How many distinct addresses have invested */\n uint public investorCount = 0;\n\n /* How much wei we have returned back to the contract after a failed crowdfund. */\n uint public loadedRefund = 0;\n\n /* How much wei we have given back to investors.*/\n uint public weiRefunded = 0;\n\n /* Has this crowdsale been finalized */\n bool public finalized;\n\n /** How much ETH each address has invested to this crowdsale */\n mapping (address => uint256) public investedAmountOf;\n\n /** How much tokens this crowdsale has credited for each investor address */\n mapping (address => uint256) public tokenAmountOf;\n\n /** Addresses that are allowed to invest even before ICO offical opens. For testing, for ICO partners, etc. */\n mapping (address => bool) public earlyParticipantWhitelist;\n\n /** This is for manul testing for the interaction from owner wallet. You can set it to any value and inspect this in blockchain explorer to see that crowdsale interaction works. */\n uint public ownerTestValue;\n\n /** State machine\n *\n * - Preparing: All contract initialization calls and variables have not been set yet\n * - Prefunding: We have not passed start time yet\n * - Funding: Active crowdsale\n * - Success: Minimum funding goal reached\n * - Failure: Minimum funding goal not reached before ending time\n * - Finalized: The finalized has been called and succesfully executed\n * - Refunding: Refunds are loaded on the contract for reclaim.\n */\n enum State{Unknown, Preparing, PreFunding, Funding, Success, Failure, Finalized, Refunding}\n\n // A new investment was made\n event Invested(address investor, uint weiAmount, uint tokenAmount, uint128 customerId);\n\n // Refund was processed for a contributor\n event Refund(address investor, uint weiAmount);\n\n // The rules were changed what kind of investments we accept\n event InvestmentPolicyChanged(bool newRequireCustomerId, bool newRequiredSignedAddress, address newSignerAddress);\n\n // Address early participation whitelist status changed\n event Whitelisted(address addr, bool status);\n\n // Crowdsale end time has been changed\n event EndsAtChanged(uint newEndsAt);\n\n function CrowdsaleBase(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal) {\n\n owner = msg.sender;\n\n token = FractionalERC20(_token);\n setPricingStrategy(_pricingStrategy);\n\n multisigWallet = _multisigWallet;\n if(multisigWallet == 0) {\n throw;\n }\n\n if(_start == 0) {\n throw;\n }\n\n startsAt = _start;\n\n if(_end == 0) {\n throw;\n }\n\n endsAt = _end;\n\n // Don't mess the dates\n if(startsAt >= endsAt) {\n throw;\n }\n\n // Minimum funding goal can be zero\n minimumFundingGoal = _minimumFundingGoal;\n }\n\n /**\n * Don't expect to just send in money and get tokens.\n */\n function() payable {\n throw;\n }\n\n /**\n * @dev Make an investment.\n *\n * Crowdsale must be running for one to invest.\n * We must have not pressed the emergency brake.\n *\n * @param receiver The Ethereum address who receives the tokens\n * @param customerId (optional) UUID v4 to track the successful payments on the server side'\n * @param tokenAmount Amount of tokens which be credited to receiver\n *\n * @return tokensBought How mony tokens were bought\n */\n function buyTokens(address receiver, uint128 customerId, uint256 tokenAmount) stopInEmergency internal returns(uint tokensBought) {\n\n // Determine if it's a good time to accept investment from this participant\n if(getState() == State.PreFunding) {\n // Are we whitelisted for early deposit\n if(!earlyParticipantWhitelist[receiver]) {\n throw;\n }\n } else if(getState() == State.Funding) {\n // Retail participants can only come in when the crowdsale is running\n // pass\n } else {\n // Unwanted state\n throw;\n }\n\n uint weiAmount = msg.value;\n\n // Dust transaction\n require(tokenAmount != 0);\n\n if(investedAmountOf[receiver] == 0) {\n // A new investor\n investorCount++;\n }\n\n // Update investor\n investedAmountOf[receiver] = investedAmountOf[receiver].plus(weiAmount);\n tokenAmountOf[receiver] = tokenAmountOf[receiver].plus(tokenAmount);\n\n // Update totals\n weiRaised = weiRaised.plus(weiAmount);\n tokensSold = tokensSold.plus(tokenAmount);\n\n if(pricingStrategy.isPresalePurchase(receiver)) {\n presaleWeiRaised = presaleWeiRaised.plus(weiAmount);\n }\n\n // Check that we did not bust the cap\n require(!isBreakingCap(weiAmount, tokenAmount, weiRaised, tokensSold));\n\n assignTokens(receiver, tokenAmount);\n\n // Pocket the money, or fail the crowdsale if we for some reason cannot send the money to our multisig\n if(!multisigWallet.send(weiAmount)) throw;\n\n // Tell us invest was success\n Invested(receiver, weiAmount, tokenAmount, customerId);\n\n return tokenAmount;\n }\n\n /**\n * @dev Make an investment based on pricing strategy\n *\n * This is a wrapper for buyTokens(), but the amount of tokens receiver will\n * have depends on the pricing strategy used.\n *\n * @param receiver The Ethereum address who receives the tokens\n * @param customerId (optional) UUID v4 to track the successful payments on the server side'\n *\n * @return tokensBought How mony tokens were bought\n */\n function investInternal(address receiver, uint128 customerId) stopInEmergency internal returns(uint tokensBought) {\n return buyTokens(receiver, customerId, pricingStrategy.calculatePrice(msg.value, weiRaised - presaleWeiRaised, tokensSold, msg.sender, token.decimals()));\n }\n\n /**\n * @dev Calculate tokens user will have for their purchase\n *\n * @param weisTotal How much ethers (in wei) the user putssssss in\n * @param pricePerToken What is the price for one token\n *\n * @return tokensTotal which is received tokens, token decimals included\n */\n function calculateTokens(uint256 weisTotal, uint256 pricePerToken) public constant returns(uint tokensTotal) {\n // pricePerToken is how many full tokens, token decimal place included, you get for wei amount.\n // Because, in theory, decimal amount can vary, we do the exponent calculation here,\n // though gas wise using 10**18 constant would be much simpler.\n // Furthermore we could use rough amounts and take in raw wei per tokens amount,\n // but we lose too much accuracy for generic calculations, thus all these are\n // practically implemented as 10**18 fixed points.\n uint multiplier = 10 ** token.decimals();\n return weisTotal.times(multiplier)/pricePerToken;\n }\n\n /**\n * Finalize a succcesful crowdsale.\n *\n * The owner can triggre a call the contract that provides post-crowdsale actions, like releasing the tokens.\n */\n function finalize() public inState(State.Success) onlyOwner stopInEmergency {\n\n // Already finalized\n if(finalized) {\n throw;\n }\n\n // Finalizing is optional. We only call it if we are given a finalizing agent.\n if(address(finalizeAgent) != 0) {\n finalizeAgent.finalizeCrowdsale();\n }\n\n finalized = true;\n }\n\n /**\n * Allow to (re)set finalize agent.\n *\n * Design choice: no state restrictions on setting this, so that we can fix fat finger mistakes.\n */\n function setFinalizeAgent(FinalizeAgent addr) onlyOwner {\n finalizeAgent = addr;\n\n // Don't allow setting bad agent\n if(!finalizeAgent.isFinalizeAgent()) {\n throw;\n }\n }\n\n /**\n * Allow crowdsale owner to close early or extend the crowdsale.\n *\n * This is useful e.g. for a manual soft cap implementation:\n * - after X amount is reached determine manual closing\n *\n * This may put the crowdsale to an invalid state,\n * but we trust owners know what they are doing.\n *\n */\n function setEndsAt(uint time) onlyOwner {\n\n if(now > time) {\n throw; // Don't change past\n }\n\n if(startsAt > time) {\n throw; // Prevent human mistakes\n }\n\n endsAt = time;\n EndsAtChanged(endsAt);\n }\n\n /**\n * Allow to (re)set pricing strategy.\n *\n * Design choice: no state restrictions on the set, so that we can fix fat finger mistakes.\n */\n function setPricingStrategy(PricingStrategy _pricingStrategy) onlyOwner {\n pricingStrategy = _pricingStrategy;\n\n // Don't allow setting bad agent\n if(!pricingStrategy.isPricingStrategy()) {\n throw;\n }\n }\n\n /**\n * Allow to change the team multisig address in the case of emergency.\n *\n * This allows to save a deployed crowdsale wallet in the case the crowdsale has not yet begun\n * (we have done only few test transactions). After the crowdsale is going\n * then multisig address stays locked for the safety reasons.\n */\n function setMultisig(address addr) public onlyOwner {\n\n // Change\n if(investorCount > MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE) {\n throw;\n }\n\n multisigWallet = addr;\n }\n\n /**\n * Allow load refunds back on the contract for the refunding.\n *\n * The team can transfer the funds back on the smart contract in the case the minimum goal was not reached..\n */\n function loadRefund() public payable inState(State.Failure) {\n if(msg.value == 0) throw;\n loadedRefund = loadedRefund.plus(msg.value);\n }\n\n /**\n * Investors can claim refund.\n *\n * Note that any refunds from proxy buyers should be handled separately,\n * and not through this contract.\n */\n function refund() public inState(State.Refunding) {\n uint256 weiValue = investedAmountOf[msg.sender];\n if (weiValue == 0) throw;\n investedAmountOf[msg.sender] = 0;\n weiRefunded = weiRefunded.plus(weiValue);\n Refund(msg.sender, weiValue);\n if (!msg.sender.send(weiValue)) throw;\n }\n\n /**\n * @return true if the crowdsale has raised enough money to be a successful.\n */\n function isMinimumGoalReached() public constant returns (bool reached) {\n return weiRaised >= minimumFundingGoal;\n }\n\n /**\n * Check if the contract relationship looks good.\n */\n function isFinalizerSane() public constant returns (bool sane) {\n return finalizeAgent.isSane();\n }\n\n /**\n * Check if the contract relationship looks good.\n */\n function isPricingSane() public constant returns (bool sane) {\n return pricingStrategy.isSane(address(this));\n }\n\n /**\n * Crowdfund state machine management.\n *\n * We make it a function and do not assign the result to a variable, so there is no chance of the variable being stale.\n */\n function getState() public constant returns (State) {\n if(finalized) return State.Finalized;\n else if (address(finalizeAgent) == 0) return State.Preparing;\n else if (!finalizeAgent.isSane()) return State.Preparing;\n else if (!pricingStrategy.isSane(address(this))) return State.Preparing;\n else if (block.timestamp < startsAt) return State.PreFunding;\n else if (block.timestamp <= endsAt && !isCrowdsaleFull()) return State.Funding;\n else if (isMinimumGoalReached()) return State.Success;\n else if (!isMinimumGoalReached() && weiRaised > 0 && loadedRefund >= weiRaised) return State.Refunding;\n else return State.Failure;\n }\n\n /** This is for manual testing of multisig wallet interaction */\n function setOwnerTestValue(uint val) onlyOwner {\n ownerTestValue = val;\n }\n\n /**\n * Allow addresses to do early participation.\n *\n * TODO: Fix spelling error in the name\n */\n function setEarlyParicipantWhitelist(address addr, bool status) onlyOwner {\n earlyParticipantWhitelist[addr] = status;\n Whitelisted(addr, status);\n }\n\n\n /** Interface marker. */\n function isCrowdsale() public constant returns (bool) {\n return true;\n }\n\n //\n // Modifiers\n //\n\n /** Modified allowing execution only if the crowdsale is currently running. */\n modifier inState(State state) {\n if(getState() != state) throw;\n _;\n }\n\n\n //\n // Abstract functions\n //\n\n /**\n * Check if the current invested breaks our cap rules.\n *\n *\n * The child contract must define their own cap setting rules.\n * We allow a lot of flexibility through different capping strategies (ETH, token count)\n * Called from invest().\n *\n * @param weiAmount The amount of wei the investor tries to invest in the current transaction\n * @param tokenAmount The amount of tokens we try to give to the investor in the current transaction\n * @param weiRaisedTotal What would be our total raised balance after this transaction\n * @param tokensSoldTotal What would be our total sold tokens count after this transaction\n *\n * @return true if taking this investment would break our cap rules\n */\n function isBreakingCap(uint weiAmount, uint tokenAmount, uint weiRaisedTotal, uint tokensSoldTotal) constant returns (bool limitBroken);\n\n /**\n * Check if the current crowdsale is full and we can no longer sell any tokens.\n */\n function isCrowdsaleFull() public constant returns (bool);\n\n /**\n * Create new tokens or transfer issued tokens to the investor depending on the cap model.\n */\n function assignTokens(address receiver, uint tokenAmount) internal;\n}\n\n\n\n/**\n * Abstract base contract for token sales with the default buy entry points.\n *\n * Handle\n * - start and end dates\n * - accepting investments\n * - minimum funding goal and refund\n * - various statistics during the crowdfund\n * - different pricing strategies\n * - different investment policies (require server side customer id, allow only whitelisted addresses)\n *\n * Does not Handle\n *\n * - Token allocation (minting vs. transfer)\n * - Cap rules\n *\n */\ncontract Crowdsale is CrowdsaleBase {\n\n /* Do we need to have unique contributor id for each customer */\n bool public requireCustomerId;\n\n /**\n * Do we verify that contributor has been cleared on the server side (accredited investors only).\n * This method was first used in FirstBlood crowdsale to ensure all contributors have accepted terms on sale (on the web).\n */\n bool public requiredSignedAddress;\n\n /* Server side address that signed allowed contributors (Ethereum addresses) that can participate the crowdsale */\n address public signerAddress;\n\n function Crowdsale(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal) CrowdsaleBase(_token, _pricingStrategy, _multisigWallet, _start, _end, _minimumFundingGoal) {\n }\n\n /**\n * Preallocate tokens for the early investors.\n *\n * Preallocated tokens have been sold before the actual crowdsale opens.\n * This function mints the tokens and moves the crowdsale needle.\n *\n * Investor count is not handled; it is assumed this goes for multiple investors\n * and the token distribution happens outside the smart contract flow.\n *\n * No money is exchanged, as the crowdsale team already have received the payment.\n *\n * @param fullTokens tokens as full tokens - decimal places added internally\n * @param weiPrice Price of a single full token in wei\n *\n */\n function preallocate(address receiver, uint fullTokens, uint weiPrice) public onlyOwner {\n\n uint tokenAmount = fullTokens * 10**token.decimals();\n uint weiAmount = weiPrice * fullTokens; // This can be also 0, we give out tokens for free\n\n weiRaised = weiRaised.plus(weiAmount);\n tokensSold = tokensSold.plus(tokenAmount);\n\n investedAmountOf[receiver] = investedAmountOf[receiver].plus(weiAmount);\n tokenAmountOf[receiver] = tokenAmountOf[receiver].plus(tokenAmount);\n\n assignTokens(receiver, tokenAmount);\n\n // Tell us invest was success\n Invested(receiver, weiAmount, tokenAmount, 0);\n }\n\n /**\n * Allow anonymous contributions to this crowdsale.\n */\n function investWithSignedAddress(address addr, uint128 customerId, uint8 v, bytes32 r, bytes32 s) public payable {\n bytes32 hash = sha256(addr);\n if (ecrecover(hash, v, r, s) != signerAddress) throw;\n if(customerId == 0) throw; // UUIDv4 sanity check\n investInternal(addr, customerId);\n }\n\n /**\n * Track who is the customer making the payment so we can send thank you email.\n */\n function investWithCustomerId(address addr, uint128 customerId) public payable {\n if(requiredSignedAddress) throw; // Crowdsale allows only server-side signed participants\n if(customerId == 0) throw; // UUIDv4 sanity check\n investInternal(addr, customerId);\n }\n\n /**\n * Allow anonymous contributions to this crowdsale.\n */\n function invest(address addr) public payable {\n if(requireCustomerId) throw; // Crowdsale needs to track participants for thank you email\n if(requiredSignedAddress) throw; // Crowdsale allows only server-side signed participants\n investInternal(addr, 0);\n }\n\n /**\n * Invest to tokens, recognize the payer and clear his address.\n *\n */\n function buyWithSignedAddress(uint128 customerId, uint8 v, bytes32 r, bytes32 s) public payable {\n investWithSignedAddress(msg.sender, customerId, v, r, s);\n }\n\n /**\n * Invest to tokens, recognize the payer.\n *\n */\n function buyWithCustomerIdWithChecksum(uint128 customerId, bytes1 checksum) public payable {\n // see customerid.py\n if (bytes1(sha3(customerId)) != checksum) throw;\n investWithCustomerId(msg.sender, customerId);\n }\n\n /**\n * Legacy API signature.\n */\n function buyWithCustomerId(uint128 customerId) public payable {\n investWithCustomerId(msg.sender, customerId);\n }\n\n /**\n * The basic entry point to participate the crowdsale process.\n *\n * Pay for funding, get invested tokens back in the sender address.\n */\n function buy() public payable {\n invest(msg.sender);\n }\n\n /**\n * Set policy do we need to have server-side customer ids for the investments.\n *\n */\n function setRequireCustomerId(bool value) onlyOwner {\n requireCustomerId = value;\n InvestmentPolicyChanged(requireCustomerId, requiredSignedAddress, signerAddress);\n }\n\n /**\n * Set policy if all investors must be cleared on the server side first.\n *\n * This is e.g. for the accredited investor clearing.\n *\n */\n function setRequireSignedAddress(bool value, address _signerAddress) onlyOwner {\n requiredSignedAddress = value;\n signerAddress = _signerAddress;\n InvestmentPolicyChanged(requireCustomerId, requiredSignedAddress, signerAddress);\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n assert(c / a == b);\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n\n\n\n/**\n * @title Basic token\n * @dev Basic version of StandardToken, with no allowances.\n */\ncontract BasicToken is ERC20Basic {\n using SafeMath for uint256;\n\n mapping(address => uint256) balances;\n\n uint256 totalSupply_;\n\n /**\n * @dev total number of tokens in existence\n */\n function totalSupply() public view returns (uint256) {\n return totalSupply_;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param _to The address to transfer to.\n * @param _value The amount to be transferred.\n */\n function transfer(address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[msg.sender]);\n\n // SafeMath.sub will throw if there is not enough balance.\n balances[msg.sender] = balances[msg.sender].sub(_value);\n balances[_to] = balances[_to].add(_value);\n Transfer(msg.sender, _to, _value);\n return true;\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param _owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address _owner) public view returns (uint256 balance) {\n return balances[_owner];\n }\n\n}\n\n\n\n\n/**\n * @title Standard ERC20 token\n *\n * @dev Implementation of the basic standard token.\n * @dev https://github.com/ethereum/EIPs/issues/20\n * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol\n */\ncontract StandardToken is ERC20, BasicToken {\n\n mapping (address => mapping (address => uint256)) internal allowed;\n\n\n /**\n * @dev Transfer tokens from one address to another\n * @param _from address The address which you want to send tokens from\n * @param _to address The address which you want to transfer to\n * @param _value uint256 the amount of tokens to be transferred\n */\n function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[_from]);\n require(_value <= allowed[_from][msg.sender]);\n\n balances[_from] = balances[_from].sub(_value);\n balances[_to] = balances[_to].add(_value);\n allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);\n Transfer(_from, _to, _value);\n return true;\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n *\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param _spender The address which will spend the funds.\n * @param _value The amount of tokens to be spent.\n */\n function approve(address _spender, uint256 _value) public returns (bool) {\n allowed[msg.sender][_spender] = _value;\n Approval(msg.sender, _spender, _value);\n return true;\n }\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param _owner address The address which owns the funds.\n * @param _spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address _owner, address _spender) public view returns (uint256) {\n return allowed[_owner][_spender];\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(address _spender, uint _addedValue) public returns (bool) {\n allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {\n uint oldValue = allowed[msg.sender][_spender];\n if (_subtractedValue > oldValue) {\n allowed[msg.sender][_spender] = 0;\n } else {\n allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);\n }\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\ncontract Recoverable is Ownable {\n\n /// @dev Empty constructor (for now)\n function Recoverable() {\n }\n\n /// @dev This will be invoked by the owner, when owner wants to rescue tokens\n /// @param token Token which will we rescue to the owner from the contract\n function recoverTokens(ERC20Basic token) onlyOwner public {\n token.transfer(owner, tokensToBeReturned(token));\n }\n\n /// @dev Interface function, can be overwritten by the superclass\n /// @param token Token which balance we will check and return\n /// @return The amount of tokens (in smallest denominator) the contract owns\n function tokensToBeReturned(ERC20Basic token) public returns (uint) {\n return token.balanceOf(this);\n }\n}\n\n\n\n/**\n * Standard EIP-20 token with an interface marker.\n *\n * @notice Interface marker is used by crowdsale contracts to validate that addresses point a good token contract.\n *\n */\ncontract StandardTokenExt is StandardToken, Recoverable {\n\n /* Interface declaration */\n function isToken() public constant returns (bool weAre) {\n return true;\n }\n}\n\n\n\n\n/**\n * A token that can increase its supply by another contract.\n *\n * This allows uncapped crowdsale by dynamically increasing the supply when money pours in.\n * Only mint agents, contracts whitelisted by owner, can mint new tokens.\n *\n */\ncontract MintableToken is StandardTokenExt {\n\n using SafeMathLib for uint;\n\n bool public mintingFinished = false;\n\n /** List of agents that are allowed to create new tokens */\n mapping (address => bool) public mintAgents;\n\n event MintingAgentChanged(address addr, bool state);\n event Minted(address receiver, uint amount);\n\n /**\n * Create new tokens and allocate them to an address..\n *\n * Only callably by a crowdsale contract (mint agent).\n */\n function mint(address receiver, uint amount) onlyMintAgent canMint public {\n totalSupply_ = totalSupply_.plus(amount);\n balances[receiver] = balances[receiver].plus(amount);\n\n // This will make the mint transaction apper in EtherScan.io\n // We can remove this after there is a standardized minting event\n Transfer(0, receiver, amount);\n }\n\n /**\n * Owner can allow a crowdsale contract to mint new tokens.\n */\n function setMintAgent(address addr, bool state) onlyOwner canMint public {\n mintAgents[addr] = state;\n MintingAgentChanged(addr, state);\n }\n\n modifier onlyMintAgent() {\n // Only crowdsale contracts are allowed to mint new tokens\n if(!mintAgents[msg.sender]) {\n throw;\n }\n _;\n }\n\n /** Make sure we are not done yet. */\n modifier canMint() {\n if(mintingFinished) throw;\n _;\n }\n}\n\n\n/**\n * ICO crowdsale contract that is capped by amout of tokens.\n *\n * - Tokens are dynamically created during the crowdsale\n *\n *\n */\ncontract MintedTokenCappedCrowdsale is Crowdsale {\n\n /* Maximum amount of tokens this crowdsale can sell. */\n uint public maximumSellableTokens;\n\n function MintedTokenCappedCrowdsale(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal, uint _maximumSellableTokens) Crowdsale(_token, _pricingStrategy, _multisigWallet, _start, _end, _minimumFundingGoal) {\n maximumSellableTokens = _maximumSellableTokens;\n }\n\n /**\n * Called from invest() to confirm if the curret investment does not break our cap rule.\n */\n function isBreakingCap(uint weiAmount, uint tokenAmount, uint weiRaisedTotal, uint tokensSoldTotal) constant returns (bool limitBroken) {\n return tokensSoldTotal > maximumSellableTokens;\n }\n\n function isCrowdsaleFull() public constant returns (bool) {\n return tokensSold >= maximumSellableTokens;\n }\n\n /**\n * Dynamically create tokens and assign them to the investor.\n */\n function assignTokens(address receiver, uint tokenAmount) internal {\n MintableToken mintableToken = MintableToken(token);\n mintableToken.mint(receiver, tokenAmount);\n }\n}\n"}, "MockERC677Receiver": {"abi": [{"constant": false, "inputs": [{"name": "from", "type": "address"}, {"name": "amount", "type": "uint256"}, {"name": "data", "type": "bytes"}], "name": "tokenFallback", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}], "bytecode": "0x608060405234801561001057600080fd5b5060ff8061001f6000396000f300608060405260043610603e5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663c0ee0b8a81146043575b600080fd5b348015604e57600080fd5b50604080516020600460443581810135601f810184900484028501840190955284845260b694823573ffffffffffffffffffffffffffffffffffffffff1694602480359536959460649492019190819084018382808284375094975060ca9650505050505050565b604080519115158252519081900360200190f35b600193925050505600a165627a7a72305820e7504563cb1d33d5caf8010eab70daabdd447ebf68da6ba0fdb2ebce779942b90029", "bytecode_runtime": "0x608060405260043610603e5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663c0ee0b8a81146043575b600080fd5b348015604e57600080fd5b50604080516020600460443581810135601f810184900484028501840190955284845260b694823573ffffffffffffffffffffffffffffffffffffffff1694602480359536959460649492019190819084018382808284375094975060ca9650505050505050565b604080519115158252519081900360200190f35b600193925050505600a165627a7a72305820e7504563cb1d33d5caf8010eab70daabdd447ebf68da6ba0fdb2ebce779942b90029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": false, "inputs": [{"name": "from", "type": "address"}, {"name": "amount", "type": "uint256"}, {"name": "data", "type": "bytes"}], "name": "tokenFallback", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}], "devdoc": {"methods": {}}, "userdoc": {"methods": {}}}, "settings": {"compilationTarget": {"contracts/security-token/tests/MockERC677Receiver.sol": "MockERC677Receiver"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/security-token/ERC677.sol": {"keccak256": "0xf557f3e12aa7f5a23d40957d9ac216db0902997f70f856697529d55e9823e50a", "urls": ["bzzr://c924011b4a57d2eb355c276255fc7af284c2f5b20ece36957d23a2e058975349"]}, "contracts/security-token/tests/MockERC677Receiver.sol": {"keccak256": "0x38977c866a0cb676bc003c55190829ad22d5db882a6b68817ffcd2b1a383287a", "urls": ["bzzr://8b65b37486b417370e4099a9a6facae9fce14ebe7e9896884c7a10c6b3d67b23"]}}, "version": 1}, "name": "MockERC677Receiver", "ordered_full_dependencies": [], "source_path": "contracts/security-token/tests/MockERC677Receiver.sol", "source": "\n\ninterface ERC677Receiver {\n function tokenFallback(address from, uint256 amount, bytes data) returns (bool success);\n}\n\ninterface ERC677 {\n\n // TODO: Have a different event name to make sure that tools with bad APIs do not mix this with ERC-20 Transfer() event that lacks data parameter\n event ERC677Transfer(address from, address receiver, uint256 amount, bytes data);\n\n function transferAndCall(ERC677Receiver receiver, uint amount, bytes data) returns (bool success);\n}\n\n\ncontract MockERC677Receiver is ERC677Receiver {\n function tokenFallback(address from, uint256 amount, bytes data) returns (bool success) {\n return true;\n }\n}\n"}, "MockSecurityTransferAgent": {"abi": [{"constant": false, "inputs": [], "name": "freeze", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "from", "type": "address"}, {"name": "to", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "verify", "outputs": [{"name": "newValue", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}], "bytecode": "0x60806040526000805460ff1916905534801561001a57600080fd5b5060fc806100296000396000f30060806040526004361060485763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166362a5af3b8114604d578063ad076994146061575b600080fd5b348015605857600080fd5b50605f60a7565b005b348015606c57600080fd5b50609573ffffffffffffffffffffffffffffffffffffffff6004358116906024351660443560b6565b60408051918252519081900360200190f35b6000805460ff19166001179055565b6000805460ff161560c657600080fd5b50600193925050505600a165627a7a7230582039bf992ad66cde18600ad1fdad97b8f612ba942c1fa4e73db1b2623c89f26c820029", "bytecode_runtime": "0x60806040526004361060485763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166362a5af3b8114604d578063ad076994146061575b600080fd5b348015605857600080fd5b50605f60a7565b005b348015606c57600080fd5b50609573ffffffffffffffffffffffffffffffffffffffff6004358116906024351660443560b6565b60408051918252519081900360200190f35b6000805460ff19166001179055565b6000805460ff161560c657600080fd5b50600193925050505600a165627a7a7230582039bf992ad66cde18600ad1fdad97b8f612ba942c1fa4e73db1b2623c89f26c820029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": false, "inputs": [], "name": "freeze", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "from", "type": "address"}, {"name": "to", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "verify", "outputs": [{"name": "newValue", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}], "devdoc": {"methods": {}}, "userdoc": {"methods": {}}}, "settings": {"compilationTarget": {"contracts/security-token/tests/MockSecurityTransferAgent.sol": "MockSecurityTransferAgent"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/security-token/SecurityTransferAgentInterface.sol": {"keccak256": "0x23b8a61926435e2c583480c0de72a99b4f7ec8a4213ffc46711f83ecdeaf9186", "urls": ["bzzr://36be13b6cf1389357679705bd18969409ecde684ace2d9c5b606d8986e0231cd"]}, "contracts/security-token/tests/MockSecurityTransferAgent.sol": {"keccak256": "0xf526a6e9c8cff80b8b9d5875bb95a63d66ac2397ff172d0e3cfefee1a00dbfb4", "urls": ["bzzr://ee725688de36bda3b6bca193556a0654986bee03c9ef3ed6dc3e85952ed79edb"]}}, "version": 1}, "name": "MockSecurityTransferAgent", "ordered_full_dependencies": [], "source_path": "contracts/security-token/tests/MockSecurityTransferAgent.sol", "source": " pragma solidity ^0.4.18;\n\n\ninterface SecurityTransferAgent {\n function verify(address from, address to, uint256 value) public view returns (uint256 newValue);\n}\n\n\ncontract MockSecurityTransferAgent is SecurityTransferAgent {\n bool frozen = false;\n\n function MockSecurityTransferAgent() {\n // This is here for our verification code only\n }\n\n function freeze() public {\n frozen = true;\n }\n\n function verify(address from, address to, uint256 value) public view returns (uint256 newValue) {\n require(frozen == false);\n\n return 1;\n }\n}\n"}, "MultiSigWallet": {"abi": [{"constant": true, "inputs": [{"name": "", "type": "uint256"}], "name": "owners", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "owner", "type": "address"}], "name": "removeOwner", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "transactionId", "type": "uint256"}], "name": "revokeConfirmation", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "isOwner", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "uint256"}, {"name": "", "type": "address"}], "name": "confirmations", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "pending", "type": "bool"}, {"name": "executed", "type": "bool"}], "name": "getTransactionCount", "outputs": [{"name": "count", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "owner", "type": "address"}], "name": "addOwner", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "transactionId", "type": "uint256"}], "name": "isConfirmed", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "transactionId", "type": "uint256"}], "name": "getConfirmationCount", "outputs": [{"name": "count", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "uint256"}], "name": "transactions", "outputs": [{"name": "destination", "type": "address"}, {"name": "value", "type": "uint256"}, {"name": "data", "type": "bytes"}, {"name": "executed", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getOwners", "outputs": [{"name": "", "type": "address[]"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "from", "type": "uint256"}, {"name": "to", "type": "uint256"}, {"name": "pending", "type": "bool"}, {"name": "executed", "type": "bool"}], "name": "getTransactionIds", "outputs": [{"name": "_transactionIds", "type": "uint256[]"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "transactionId", "type": "uint256"}], "name": "getConfirmations", "outputs": [{"name": "_confirmations", "type": "address[]"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "transactionCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_required", "type": "uint256"}], "name": "changeRequirement", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "transactionId", "type": "uint256"}], "name": "confirmTransaction", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "destination", "type": "address"}, {"name": "value", "type": "uint256"}, {"name": "data", "type": "bytes"}], "name": "submitTransaction", "outputs": [{"name": "transactionId", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "MAX_OWNER_COUNT", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "required", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "owner", "type": "address"}, {"name": "newOwner", "type": "address"}], "name": "replaceOwner", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "transactionId", "type": "uint256"}], "name": "executeTransaction", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [{"name": "_owners", "type": "address[]"}, {"name": "_required", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"payable": true, "stateMutability": "payable", "type": "fallback"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "sender", "type": "address"}, {"indexed": true, "name": "transactionId", "type": "uint256"}], "name": "Confirmation", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "sender", "type": "address"}, {"indexed": true, "name": "transactionId", "type": "uint256"}], "name": "Revocation", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "transactionId", "type": "uint256"}], "name": "Submission", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "transactionId", "type": "uint256"}], "name": "Execution", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "transactionId", "type": "uint256"}], "name": "ExecutionFailure", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "sender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Deposit", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}], "name": "OwnerAddition", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}], "name": "OwnerRemoval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "required", "type": "uint256"}], "name": "RequirementChange", "type": "event"}], "bytecode": "0x60806040523480156200001157600080fd5b5060405162001631380380620016318339810160405280516020820151910180519091906000908260328211806200004857508181115b8062000052575080155b806200005c575081155b156200006757600080fd5b600092505b84518310156200013b576002600086858151811015156200008957fe5b6020908102909101810151600160a060020a031682528101919091526040016000205460ff1680620000dc57508483815181101515620000c557fe5b90602001906020020151600160a060020a03166000145b15620000e757600080fd5b6001600260008786815181101515620000fc57fe5b602090810291909101810151600160a060020a03168252810191909152604001600020805460ff1916911515919091179055600192909201916200006c565b84516200015090600390602088019062000162565b50505060049190915550620001f69050565b828054828255906000526020600020908101928215620001ba579160200282015b82811115620001ba5782518254600160a060020a031916600160a060020a0390911617825560209092019160019091019062000183565b50620001c8929150620001cc565b5090565b620001f391905b80821115620001c8578054600160a060020a0319168155600101620001d3565b90565b61142b80620002066000396000f30060806040526004361061011c5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663025e7c27811461015e578063173825d91461019257806320ea8d86146101b35780632f54bf6e146101cb5780633411c81c1461020057806354741525146102245780637065cb4814610255578063784547a7146102765780638b51d13f1461028e5780639ace38c2146102a6578063a0e67e2b14610361578063a8abe69a146103c6578063b5dc40c3146103eb578063b77bf60014610403578063ba51a6df14610418578063c01a8c8414610430578063c642747414610448578063d74f8edd146104b1578063dc8452cd146104c6578063e20056e6146104db578063ee22610b14610502575b600034111561015c5760408051348152905133917fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c919081900360200190a25b005b34801561016a57600080fd5b5061017660043561051a565b60408051600160a060020a039092168252519081900360200190f35b34801561019e57600080fd5b5061015c600160a060020a0360043516610542565b3480156101bf57600080fd5b5061015c6004356106b9565b3480156101d757600080fd5b506101ec600160a060020a0360043516610773565b604080519115158252519081900360200190f35b34801561020c57600080fd5b506101ec600435600160a060020a0360243516610788565b34801561023057600080fd5b50610243600435151560243515156107a8565b60408051918252519081900360200190f35b34801561026157600080fd5b5061015c600160a060020a0360043516610814565b34801561028257600080fd5b506101ec600435610931565b34801561029a57600080fd5b506102436004356109b5565b3480156102b257600080fd5b506102be600435610a24565b6040518085600160a060020a0316600160a060020a031681526020018481526020018060200183151515158152602001828103825284818151815260200191508051906020019080838360005b8381101561032357818101518382015260200161030b565b50505050905090810190601f1680156103505780820380516001836020036101000a031916815260200191505b509550505050505060405180910390f35b34801561036d57600080fd5b50610376610ae2565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156103b257818101518382015260200161039a565b505050509050019250505060405180910390f35b3480156103d257600080fd5b5061037660043560243560443515156064351515610b45565b3480156103f757600080fd5b50610376600435610c7e565b34801561040f57600080fd5b50610243610df7565b34801561042457600080fd5b5061015c600435610dfd565b34801561043c57600080fd5b5061015c600435610e74565b34801561045457600080fd5b50604080516020600460443581810135601f8101849004840285018401909552848452610243948235600160a060020a0316946024803595369594606494920191908190840183828082843750949750610f3f9650505050505050565b3480156104bd57600080fd5b50610243610f5e565b3480156104d257600080fd5b50610243610f63565b3480156104e757600080fd5b5061015c600160a060020a0360043581169060243516610f69565b34801561050e57600080fd5b5061015c6004356110f3565b600380548290811061052857fe5b600091825260209091200154600160a060020a0316905081565b600033301461055057600080fd5b600160a060020a038216600090815260026020526040902054829060ff16151561057957600080fd5b600160a060020a0383166000908152600260205260408120805460ff1916905591505b600354600019018210156106545782600160a060020a03166003838154811015156105c357fe5b600091825260209091200154600160a060020a03161415610649576003805460001981019081106105f057fe5b60009182526020909120015460038054600160a060020a03909216918490811061061657fe5b9060005260206000200160006101000a815481600160a060020a030219169083600160a060020a03160217905550610654565b60019091019061059c565b6003805460001901906106679082611343565b5060035460045411156106805760035461068090610dfd565b604051600160a060020a038416907f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9090600090a2505050565b3360008181526002602052604090205460ff1615156106d757600080fd5b60008281526001602090815260408083203380855292529091205483919060ff16151561070357600080fd5b600084815260208190526040902060030154849060ff161561072457600080fd5b6000858152600160209081526040808320338085529252808320805460ff191690555187927ff6a317157440607f36269043eb55f1287a5a19ba2216afeab88cd46cbcfb88e991a35050505050565b60026020526000908152604090205460ff1681565b600160209081526000928352604080842090915290825290205460ff1681565b6000805b60055481101561080d578380156107d5575060008181526020819052604090206003015460ff16155b806107f957508280156107f9575060008181526020819052604090206003015460ff165b15610805576001820191505b6001016107ac565b5092915050565b33301461082057600080fd5b600160a060020a038116600090815260026020526040902054819060ff161561084857600080fd5b81600160a060020a038116151561085e57600080fd5b600380549050600101600454603282118061087857508181115b80610881575080155b8061088a575081155b1561089457600080fd5b600160a060020a038516600081815260026020526040808220805460ff1916600190811790915560038054918201815583527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01805473ffffffffffffffffffffffffffffffffffffffff191684179055517ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d9190a25050505050565b600080805b6003548110156109ae576000848152600160205260408120600380549192918490811061095f57fe5b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610993576001820191505b6004548214156109a657600192506109ae565b600101610936565b5050919050565b6000805b600354811015610a1e57600083815260016020526040812060038054919291849081106109e257fe5b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610a16576001820191505b6001016109b9565b50919050565b6000602081815291815260409081902080546001808301546002808501805487516101009582161595909502600019011691909104601f8101889004880284018801909652858352600160a060020a0390931695909491929190830182828015610acf5780601f10610aa457610100808354040283529160200191610acf565b820191906000526020600020905b815481529060010190602001808311610ab257829003601f168201915b5050506003909301549192505060ff1684565b60606003805480602002602001604051908101604052809291908181526020018280548015610b3a57602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311610b1c575b505050505090505b90565b606080600080600554604051908082528060200260200182016040528015610b77578160200160208202803883390190505b50925060009150600090505b600554811015610bfe57858015610bac575060008181526020819052604090206003015460ff16155b80610bd05750848015610bd0575060008181526020819052604090206003015460ff165b15610bf657808383815181101515610be457fe5b60209081029091010152600191909101905b600101610b83565b878703604051908082528060200260200182016040528015610c2a578160200160208202803883390190505b5093508790505b86811015610c73578281815181101515610c4757fe5b9060200190602002015184898303815181101515610c6157fe5b60209081029091010152600101610c31565b505050949350505050565b606080600080600380549050604051908082528060200260200182016040528015610cb3578160200160208202803883390190505b50925060009150600090505b600354811015610d705760008581526001602052604081206003805491929184908110610ce857fe5b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610d68576003805482908110610d2357fe5b6000918252602090912001548351600160a060020a0390911690849084908110610d4957fe5b600160a060020a03909216602092830290910190910152600191909101905b600101610cbf565b81604051908082528060200260200182016040528015610d9a578160200160208202803883390190505b509350600090505b81811015610def578281815181101515610db857fe5b906020019060200201518482815181101515610dd057fe5b600160a060020a03909216602092830290910190910152600101610da2565b505050919050565b60055481565b333014610e0957600080fd5b600354816032821180610e1b57508181115b80610e24575080155b80610e2d575081155b15610e3757600080fd5b60048390556040805184815290517fa3f1ee9126a074d9326c682f561767f710e927faa811f7a99829d49dc421797a9181900360200190a1505050565b3360008181526002602052604090205460ff161515610e9257600080fd5b6000828152602081905260409020548290600160a060020a03161515610eb757600080fd5b60008381526001602090815260408083203380855292529091205484919060ff1615610ee257600080fd5b6000858152600160208181526040808420338086529252808420805460ff1916909317909255905187927f4a504a94899432a9846e1aa406dceb1bcfd538bb839071d49d1e5e23f5be30ef91a3610f38856110f3565b5050505050565b6000610f4c848484611253565b9050610f5781610e74565b9392505050565b603281565b60045481565b6000333014610f7757600080fd5b600160a060020a038316600090815260026020526040902054839060ff161515610fa057600080fd5b600160a060020a038316600090815260026020526040902054839060ff1615610fc857600080fd5b600092505b6003548310156110595784600160a060020a0316600384815481101515610ff057fe5b600091825260209091200154600160a060020a0316141561104e578360038481548110151561101b57fe5b9060005260206000200160006101000a815481600160a060020a030219169083600160a060020a03160217905550611059565b600190920191610fcd565b600160a060020a03808616600081815260026020526040808220805460ff1990811690915593881682528082208054909416600117909355915190917f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9091a2604051600160a060020a038516907ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d90600090a25050505050565b600081815260208190526040812060030154829060ff161561111457600080fd5b61111d83610931565b1561124e576000838152602081905260409081902060038101805460ff19166001908117909155815481830154935160028085018054959850600160a060020a03909316959492939192839285926000199183161561010002919091019091160480156111cb5780601f106111a0576101008083540402835291602001916111cb565b820191906000526020600020905b8154815290600101906020018083116111ae57829003601f168201915b505091505060006040518083038185875af192505050156112165760405183907f33e13ecb54c3076d8e8bb8c2881800a4d972b792045ffae98fdf46df365fed7590600090a261124e565b60405183907f526441bb6c1aba3c9a4a6ca1d6545da9c2333c8c48343ef398eb858d72b7923690600090a260038201805460ff191690555b505050565b600083600160a060020a038116151561126b57600080fd5b60055460408051608081018252600160a060020a0388811682526020808301898152838501898152600060608601819052878152808452959095208451815473ffffffffffffffffffffffffffffffffffffffff1916941693909317835551600183015592518051949650919390926112eb926002850192910190611367565b50606091909101516003909101805460ff191691151591909117905560058054600101905560405182907fc0ba8fe4b176c1714197d43b9cc6bcf797a4a7461c5fe8d0ef6e184ae7601e5190600090a2509392505050565b81548183558181111561124e5760008381526020902061124e9181019083016113e5565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106113a857805160ff19168380011785556113d5565b828001600101855582156113d5579182015b828111156113d55782518255916020019190600101906113ba565b506113e19291506113e5565b5090565b610b4291905b808211156113e157600081556001016113eb5600a165627a7a7230582039c1a07f2a2067d6c26254a72669acee8a559ff9f03a8df051532a0a1c3c6af50029", "bytecode_runtime": "0x60806040526004361061011c5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663025e7c27811461015e578063173825d91461019257806320ea8d86146101b35780632f54bf6e146101cb5780633411c81c1461020057806354741525146102245780637065cb4814610255578063784547a7146102765780638b51d13f1461028e5780639ace38c2146102a6578063a0e67e2b14610361578063a8abe69a146103c6578063b5dc40c3146103eb578063b77bf60014610403578063ba51a6df14610418578063c01a8c8414610430578063c642747414610448578063d74f8edd146104b1578063dc8452cd146104c6578063e20056e6146104db578063ee22610b14610502575b600034111561015c5760408051348152905133917fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c919081900360200190a25b005b34801561016a57600080fd5b5061017660043561051a565b60408051600160a060020a039092168252519081900360200190f35b34801561019e57600080fd5b5061015c600160a060020a0360043516610542565b3480156101bf57600080fd5b5061015c6004356106b9565b3480156101d757600080fd5b506101ec600160a060020a0360043516610773565b604080519115158252519081900360200190f35b34801561020c57600080fd5b506101ec600435600160a060020a0360243516610788565b34801561023057600080fd5b50610243600435151560243515156107a8565b60408051918252519081900360200190f35b34801561026157600080fd5b5061015c600160a060020a0360043516610814565b34801561028257600080fd5b506101ec600435610931565b34801561029a57600080fd5b506102436004356109b5565b3480156102b257600080fd5b506102be600435610a24565b6040518085600160a060020a0316600160a060020a031681526020018481526020018060200183151515158152602001828103825284818151815260200191508051906020019080838360005b8381101561032357818101518382015260200161030b565b50505050905090810190601f1680156103505780820380516001836020036101000a031916815260200191505b509550505050505060405180910390f35b34801561036d57600080fd5b50610376610ae2565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156103b257818101518382015260200161039a565b505050509050019250505060405180910390f35b3480156103d257600080fd5b5061037660043560243560443515156064351515610b45565b3480156103f757600080fd5b50610376600435610c7e565b34801561040f57600080fd5b50610243610df7565b34801561042457600080fd5b5061015c600435610dfd565b34801561043c57600080fd5b5061015c600435610e74565b34801561045457600080fd5b50604080516020600460443581810135601f8101849004840285018401909552848452610243948235600160a060020a0316946024803595369594606494920191908190840183828082843750949750610f3f9650505050505050565b3480156104bd57600080fd5b50610243610f5e565b3480156104d257600080fd5b50610243610f63565b3480156104e757600080fd5b5061015c600160a060020a0360043581169060243516610f69565b34801561050e57600080fd5b5061015c6004356110f3565b600380548290811061052857fe5b600091825260209091200154600160a060020a0316905081565b600033301461055057600080fd5b600160a060020a038216600090815260026020526040902054829060ff16151561057957600080fd5b600160a060020a0383166000908152600260205260408120805460ff1916905591505b600354600019018210156106545782600160a060020a03166003838154811015156105c357fe5b600091825260209091200154600160a060020a03161415610649576003805460001981019081106105f057fe5b60009182526020909120015460038054600160a060020a03909216918490811061061657fe5b9060005260206000200160006101000a815481600160a060020a030219169083600160a060020a03160217905550610654565b60019091019061059c565b6003805460001901906106679082611343565b5060035460045411156106805760035461068090610dfd565b604051600160a060020a038416907f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9090600090a2505050565b3360008181526002602052604090205460ff1615156106d757600080fd5b60008281526001602090815260408083203380855292529091205483919060ff16151561070357600080fd5b600084815260208190526040902060030154849060ff161561072457600080fd5b6000858152600160209081526040808320338085529252808320805460ff191690555187927ff6a317157440607f36269043eb55f1287a5a19ba2216afeab88cd46cbcfb88e991a35050505050565b60026020526000908152604090205460ff1681565b600160209081526000928352604080842090915290825290205460ff1681565b6000805b60055481101561080d578380156107d5575060008181526020819052604090206003015460ff16155b806107f957508280156107f9575060008181526020819052604090206003015460ff165b15610805576001820191505b6001016107ac565b5092915050565b33301461082057600080fd5b600160a060020a038116600090815260026020526040902054819060ff161561084857600080fd5b81600160a060020a038116151561085e57600080fd5b600380549050600101600454603282118061087857508181115b80610881575080155b8061088a575081155b1561089457600080fd5b600160a060020a038516600081815260026020526040808220805460ff1916600190811790915560038054918201815583527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01805473ffffffffffffffffffffffffffffffffffffffff191684179055517ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d9190a25050505050565b600080805b6003548110156109ae576000848152600160205260408120600380549192918490811061095f57fe5b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610993576001820191505b6004548214156109a657600192506109ae565b600101610936565b5050919050565b6000805b600354811015610a1e57600083815260016020526040812060038054919291849081106109e257fe5b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610a16576001820191505b6001016109b9565b50919050565b6000602081815291815260409081902080546001808301546002808501805487516101009582161595909502600019011691909104601f8101889004880284018801909652858352600160a060020a0390931695909491929190830182828015610acf5780601f10610aa457610100808354040283529160200191610acf565b820191906000526020600020905b815481529060010190602001808311610ab257829003601f168201915b5050506003909301549192505060ff1684565b60606003805480602002602001604051908101604052809291908181526020018280548015610b3a57602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311610b1c575b505050505090505b90565b606080600080600554604051908082528060200260200182016040528015610b77578160200160208202803883390190505b50925060009150600090505b600554811015610bfe57858015610bac575060008181526020819052604090206003015460ff16155b80610bd05750848015610bd0575060008181526020819052604090206003015460ff165b15610bf657808383815181101515610be457fe5b60209081029091010152600191909101905b600101610b83565b878703604051908082528060200260200182016040528015610c2a578160200160208202803883390190505b5093508790505b86811015610c73578281815181101515610c4757fe5b9060200190602002015184898303815181101515610c6157fe5b60209081029091010152600101610c31565b505050949350505050565b606080600080600380549050604051908082528060200260200182016040528015610cb3578160200160208202803883390190505b50925060009150600090505b600354811015610d705760008581526001602052604081206003805491929184908110610ce857fe5b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610d68576003805482908110610d2357fe5b6000918252602090912001548351600160a060020a0390911690849084908110610d4957fe5b600160a060020a03909216602092830290910190910152600191909101905b600101610cbf565b81604051908082528060200260200182016040528015610d9a578160200160208202803883390190505b509350600090505b81811015610def578281815181101515610db857fe5b906020019060200201518482815181101515610dd057fe5b600160a060020a03909216602092830290910190910152600101610da2565b505050919050565b60055481565b333014610e0957600080fd5b600354816032821180610e1b57508181115b80610e24575080155b80610e2d575081155b15610e3757600080fd5b60048390556040805184815290517fa3f1ee9126a074d9326c682f561767f710e927faa811f7a99829d49dc421797a9181900360200190a1505050565b3360008181526002602052604090205460ff161515610e9257600080fd5b6000828152602081905260409020548290600160a060020a03161515610eb757600080fd5b60008381526001602090815260408083203380855292529091205484919060ff1615610ee257600080fd5b6000858152600160208181526040808420338086529252808420805460ff1916909317909255905187927f4a504a94899432a9846e1aa406dceb1bcfd538bb839071d49d1e5e23f5be30ef91a3610f38856110f3565b5050505050565b6000610f4c848484611253565b9050610f5781610e74565b9392505050565b603281565b60045481565b6000333014610f7757600080fd5b600160a060020a038316600090815260026020526040902054839060ff161515610fa057600080fd5b600160a060020a038316600090815260026020526040902054839060ff1615610fc857600080fd5b600092505b6003548310156110595784600160a060020a0316600384815481101515610ff057fe5b600091825260209091200154600160a060020a0316141561104e578360038481548110151561101b57fe5b9060005260206000200160006101000a815481600160a060020a030219169083600160a060020a03160217905550611059565b600190920191610fcd565b600160a060020a03808616600081815260026020526040808220805460ff1990811690915593881682528082208054909416600117909355915190917f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9091a2604051600160a060020a038516907ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d90600090a25050505050565b600081815260208190526040812060030154829060ff161561111457600080fd5b61111d83610931565b1561124e576000838152602081905260409081902060038101805460ff19166001908117909155815481830154935160028085018054959850600160a060020a03909316959492939192839285926000199183161561010002919091019091160480156111cb5780601f106111a0576101008083540402835291602001916111cb565b820191906000526020600020905b8154815290600101906020018083116111ae57829003601f168201915b505091505060006040518083038185875af192505050156112165760405183907f33e13ecb54c3076d8e8bb8c2881800a4d972b792045ffae98fdf46df365fed7590600090a261124e565b60405183907f526441bb6c1aba3c9a4a6ca1d6545da9c2333c8c48343ef398eb858d72b7923690600090a260038201805460ff191690555b505050565b600083600160a060020a038116151561126b57600080fd5b60055460408051608081018252600160a060020a0388811682526020808301898152838501898152600060608601819052878152808452959095208451815473ffffffffffffffffffffffffffffffffffffffff1916941693909317835551600183015592518051949650919390926112eb926002850192910190611367565b50606091909101516003909101805460ff191691151591909117905560058054600101905560405182907fc0ba8fe4b176c1714197d43b9cc6bcf797a4a7461c5fe8d0ef6e184ae7601e5190600090a2509392505050565b81548183558181111561124e5760008381526020902061124e9181019083016113e5565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106113a857805160ff19168380011785556113d5565b828001600101855582156113d5579182015b828111156113d55782518255916020019190600101906113ba565b506113e19291506113e5565b5090565b610b4291905b808211156113e157600081556001016113eb5600a165627a7a7230582039c1a07f2a2067d6c26254a72669acee8a559ff9f03a8df051532a0a1c3c6af50029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": true, "inputs": [{"name": "", "type": "uint256"}], "name": "owners", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "owner", "type": "address"}], "name": "removeOwner", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "transactionId", "type": "uint256"}], "name": "revokeConfirmation", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "isOwner", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "uint256"}, {"name": "", "type": "address"}], "name": "confirmations", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "pending", "type": "bool"}, {"name": "executed", "type": "bool"}], "name": "getTransactionCount", "outputs": [{"name": "count", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "owner", "type": "address"}], "name": "addOwner", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "transactionId", "type": "uint256"}], "name": "isConfirmed", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "transactionId", "type": "uint256"}], "name": "getConfirmationCount", "outputs": [{"name": "count", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "uint256"}], "name": "transactions", "outputs": [{"name": "destination", "type": "address"}, {"name": "value", "type": "uint256"}, {"name": "data", "type": "bytes"}, {"name": "executed", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getOwners", "outputs": [{"name": "", "type": "address[]"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "from", "type": "uint256"}, {"name": "to", "type": "uint256"}, {"name": "pending", "type": "bool"}, {"name": "executed", "type": "bool"}], "name": "getTransactionIds", "outputs": [{"name": "_transactionIds", "type": "uint256[]"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "transactionId", "type": "uint256"}], "name": "getConfirmations", "outputs": [{"name": "_confirmations", "type": "address[]"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "transactionCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_required", "type": "uint256"}], "name": "changeRequirement", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "transactionId", "type": "uint256"}], "name": "confirmTransaction", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "destination", "type": "address"}, {"name": "value", "type": "uint256"}, {"name": "data", "type": "bytes"}], "name": "submitTransaction", "outputs": [{"name": "transactionId", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "MAX_OWNER_COUNT", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "required", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "owner", "type": "address"}, {"name": "newOwner", "type": "address"}], "name": "replaceOwner", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "transactionId", "type": "uint256"}], "name": "executeTransaction", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [{"name": "_owners", "type": "address[]"}, {"name": "_required", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"payable": true, "stateMutability": "payable", "type": "fallback"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "sender", "type": "address"}, {"indexed": true, "name": "transactionId", "type": "uint256"}], "name": "Confirmation", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "sender", "type": "address"}, {"indexed": true, "name": "transactionId", "type": "uint256"}], "name": "Revocation", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "transactionId", "type": "uint256"}], "name": "Submission", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "transactionId", "type": "uint256"}], "name": "Execution", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "transactionId", "type": "uint256"}], "name": "ExecutionFailure", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "sender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Deposit", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}], "name": "OwnerAddition", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}], "name": "OwnerRemoval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "required", "type": "uint256"}], "name": "RequirementChange", "type": "event"}], "devdoc": {"author": "Stefan George - ", "methods": {"addOwner(address)": {"details": "Allows to add a new owner. Transaction has to be sent by wallet.", "params": {"owner": "Address of new owner."}}, "changeRequirement(uint256)": {"details": "Allows to change the number of required confirmations. Transaction has to be sent by wallet.", "params": {"_required": "Number of required confirmations."}}, "confirmTransaction(uint256)": {"details": "Allows an owner to confirm a transaction.", "params": {"transactionId": "Transaction ID."}}, "executeTransaction(uint256)": {"details": "Allows anyone to execute a confirmed transaction.", "params": {"transactionId": "Transaction ID."}}, "getConfirmationCount(uint256)": {"details": "Returns number of confirmations of a transaction.", "params": {"transactionId": "Transaction ID."}, "return": "Number of confirmations."}, "getConfirmations(uint256)": {"details": "Returns array with owner addresses, which confirmed transaction.", "params": {"transactionId": "Transaction ID."}, "return": "Returns array of owner addresses."}, "getOwners()": {"details": "Returns list of owners.", "return": "List of owner addresses."}, "getTransactionCount(bool,bool)": {"details": "Returns total number of transactions after filers are applied.", "params": {"executed": "Include executed transactions.", "pending": "Include pending transactions."}, "return": "Total number of transactions after filters are applied."}, "getTransactionIds(uint256,uint256,bool,bool)": {"details": "Returns list of transaction IDs in defined range.", "params": {"executed": "Include executed transactions.", "from": "Index start position of transaction array.", "pending": "Include pending transactions.", "to": "Index end position of transaction array."}, "return": "Returns array of transaction IDs."}, "isConfirmed(uint256)": {"details": "Returns the confirmation status of a transaction.", "params": {"transactionId": "Transaction ID."}, "return": "Confirmation status."}, "removeOwner(address)": {"details": "Allows to remove an owner. Transaction has to be sent by wallet.", "params": {"owner": "Address of owner."}}, "replaceOwner(address,address)": {"details": "Allows to replace an owner with a new owner. Transaction has to be sent by wallet.", "params": {"owner": "Address of new owner."}}, "revokeConfirmation(uint256)": {"details": "Allows an owner to revoke a confirmation for a transaction.", "params": {"transactionId": "Transaction ID."}}, "submitTransaction(address,uint256,bytes)": {"details": "Allows an owner to submit and confirm a transaction.", "params": {"data": "Transaction data payload.", "destination": "Transaction target address.", "value": "Transaction ether value."}, "return": "Returns transaction ID."}}, "title": "Multisignature wallet - Allows multiple parties to agree on transactions before execution."}, "userdoc": {"methods": {}}}, "settings": {"compilationTarget": {"contracts/GnosisWallet.sol": "MultiSigWallet"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/GnosisWallet.sol": {"keccak256": "0x1b55f3015578d791361e10c43ff9ee240749bbeb87d2765542798d7ddcc61d11", "urls": ["bzzr://3eed486369c96bda6b7eba4442eed255ead1f5f024f33d1d66e920c65ba523d2"]}}, "version": 1}, "name": "MultiSigWallet", "ordered_full_dependencies": [], "source_path": "contracts/GnosisWallet.sol", "source": "/**\n * Originally from https://github.com/ConsenSys/MultiSigWallet\n */\n\n\n\n/// @title Multisignature wallet - Allows multiple parties to agree on transactions before execution.\n/// @author Stefan George - \ncontract MultiSigWallet {\n\n uint constant public MAX_OWNER_COUNT = 50;\n\n event Confirmation(address indexed sender, uint indexed transactionId);\n event Revocation(address indexed sender, uint indexed transactionId);\n event Submission(uint indexed transactionId);\n event Execution(uint indexed transactionId);\n event ExecutionFailure(uint indexed transactionId);\n event Deposit(address indexed sender, uint value);\n event OwnerAddition(address indexed owner);\n event OwnerRemoval(address indexed owner);\n event RequirementChange(uint required);\n\n mapping (uint => Transaction) public transactions;\n mapping (uint => mapping (address => bool)) public confirmations;\n mapping (address => bool) public isOwner;\n address[] public owners;\n uint public required;\n uint public transactionCount;\n\n struct Transaction {\n address destination;\n uint value;\n bytes data;\n bool executed;\n }\n\n modifier onlyWallet() {\n if (msg.sender != address(this))\n throw;\n _;\n }\n\n modifier ownerDoesNotExist(address owner) {\n if (isOwner[owner])\n throw;\n _;\n }\n\n modifier ownerExists(address owner) {\n if (!isOwner[owner])\n throw;\n _;\n }\n\n modifier transactionExists(uint transactionId) {\n if (transactions[transactionId].destination == 0)\n throw;\n _;\n }\n\n modifier confirmed(uint transactionId, address owner) {\n if (!confirmations[transactionId][owner])\n throw;\n _;\n }\n\n modifier notConfirmed(uint transactionId, address owner) {\n if (confirmations[transactionId][owner])\n throw;\n _;\n }\n\n modifier notExecuted(uint transactionId) {\n if (transactions[transactionId].executed)\n throw;\n _;\n }\n\n modifier notNull(address _address) {\n if (_address == 0)\n throw;\n _;\n }\n\n modifier validRequirement(uint ownerCount, uint _required) {\n if ( ownerCount > MAX_OWNER_COUNT\n || _required > ownerCount\n || _required == 0\n || ownerCount == 0)\n throw;\n _;\n }\n\n /// @dev Fallback function allows to deposit ether.\n function()\n payable\n {\n if (msg.value > 0)\n Deposit(msg.sender, msg.value);\n }\n\n /*\n * Public functions\n */\n /// @dev Contract constructor sets initial owners and required number of confirmations.\n /// @param _owners List of initial owners.\n /// @param _required Number of required confirmations.\n function MultiSigWallet(address[] _owners, uint _required)\n public\n validRequirement(_owners.length, _required)\n {\n for (uint i=0; i<_owners.length; i++) {\n if (isOwner[_owners[i]] || _owners[i] == 0)\n throw;\n isOwner[_owners[i]] = true;\n }\n owners = _owners;\n required = _required;\n }\n\n /// @dev Allows to add a new owner. Transaction has to be sent by wallet.\n /// @param owner Address of new owner.\n function addOwner(address owner)\n public\n onlyWallet\n ownerDoesNotExist(owner)\n notNull(owner)\n validRequirement(owners.length + 1, required)\n {\n isOwner[owner] = true;\n owners.push(owner);\n OwnerAddition(owner);\n }\n\n /// @dev Allows to remove an owner. Transaction has to be sent by wallet.\n /// @param owner Address of owner.\n function removeOwner(address owner)\n public\n onlyWallet\n ownerExists(owner)\n {\n isOwner[owner] = false;\n for (uint i=0; i owners.length)\n changeRequirement(owners.length);\n OwnerRemoval(owner);\n }\n\n /// @dev Allows to replace an owner with a new owner. Transaction has to be sent by wallet.\n /// @param owner Address of owner to be replaced.\n /// @param owner Address of new owner.\n function replaceOwner(address owner, address newOwner)\n public\n onlyWallet\n ownerExists(owner)\n ownerDoesNotExist(newOwner)\n {\n for (uint i=0; i=a);\n return c;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Interface for defining crowdsale pricing.\n */\ncontract PricingStrategy {\n\n /** Interface declaration. */\n function isPricingStrategy() public constant returns (bool) {\n return true;\n }\n\n /** Self check if all references are correctly set.\n *\n * Checks that pricing strategy matches crowdsale parameters.\n */\n function isSane(address crowdsale) public constant returns (bool) {\n return true;\n }\n\n /**\n * @dev Pricing tells if this is a presale purchase or not.\n @param purchaser Address of the purchaser\n @return False by default, true if a presale purchaser\n */\n function isPresalePurchase(address purchaser) public constant returns (bool) {\n return false;\n }\n\n /**\n * When somebody tries to buy tokens for X eth, calculate how many tokens they get.\n *\n *\n * @param value - What is the value of the transaction send in as wei\n * @param tokensSold - how much tokens have been sold this far\n * @param weiRaised - how much money has been raised this far in the main token sale - this number excludes presale\n * @param msgSender - who is the investor of this transaction\n * @param decimals - how many decimal units the token has\n * @return Amount of tokens the investor receives\n */\n function calculatePrice(uint value, uint weiRaised, uint tokensSold, address msgSender, uint decimals) public constant returns (uint tokenAmount);\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Finalize agent defines what happens at the end of succeseful crowdsale.\n *\n * - Allocate tokens for founders, bounties and community\n * - Make tokens transferable\n * - etc.\n */\ncontract FinalizeAgent {\n\n function isFinalizeAgent() public constant returns(bool) {\n return true;\n }\n\n /** Return true if we can run finalizeCrowdsale() properly.\n *\n * This is a safety check function that doesn't allow crowdsale to begin\n * unless the finalizer has been set up properly.\n */\n function isSane() public constant returns (bool);\n\n /** Called once by crowdsale finalize() if the sale was success. */\n function finalizeCrowdsale();\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n\n/**\n * A token that defines fractional units as decimals.\n */\ncontract FractionalERC20 is ERC20 {\n\n uint public decimals;\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n/*\n * Haltable\n *\n * Abstract contract that allows children to implement an\n * emergency stop mechanism. Differs from Pausable by causing a throw when in halt mode.\n *\n *\n * Originally envisioned in FirstBlood ICO contract.\n */\ncontract Haltable is Ownable {\n bool public halted;\n\n modifier stopInEmergency {\n if (halted) throw;\n _;\n }\n\n modifier stopNonOwnersInEmergency {\n if (halted && msg.sender != owner) throw;\n _;\n }\n\n modifier onlyInEmergency {\n if (!halted) throw;\n _;\n }\n\n // called by the owner on emergency, triggers stopped state\n function halt() external onlyOwner {\n halted = true;\n }\n\n // called by the owner on end of emergency, returns to normal state\n function unhalt() external onlyOwner onlyInEmergency {\n halted = false;\n }\n\n}\n\n\n\n\n\n\n\n/**\n * Crowdsale state machine without buy functionality.\n *\n * Implements basic state machine logic, but leaves out all buy functions,\n * so that subclasses can implement their own buying logic.\n *\n *\n * For the default buy() implementation see Crowdsale.sol.\n */\ncontract CrowdsaleBase is Haltable {\n\n /* Max investment count when we are still allowed to change the multisig address */\n uint public MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE = 5;\n\n using SafeMathLib for uint;\n\n /* The token we are selling */\n FractionalERC20 public token;\n\n /* How we are going to price our offering */\n PricingStrategy public pricingStrategy;\n\n /* Post-success callback */\n FinalizeAgent public finalizeAgent;\n\n /* tokens will be transfered from this address */\n address public multisigWallet;\n\n /* if the funding goal is not reached, investors may withdraw their funds */\n uint public minimumFundingGoal;\n\n /* the UNIX timestamp start date of the crowdsale */\n uint public startsAt;\n\n /* the UNIX timestamp end date of the crowdsale */\n uint public endsAt;\n\n /* the number of tokens already sold through this contract*/\n uint public tokensSold = 0;\n\n /* How many wei of funding we have raised */\n uint public weiRaised = 0;\n\n /* Calculate incoming funds from presale contracts and addresses */\n uint public presaleWeiRaised = 0;\n\n /* How many distinct addresses have invested */\n uint public investorCount = 0;\n\n /* How much wei we have returned back to the contract after a failed crowdfund. */\n uint public loadedRefund = 0;\n\n /* How much wei we have given back to investors.*/\n uint public weiRefunded = 0;\n\n /* Has this crowdsale been finalized */\n bool public finalized;\n\n /** How much ETH each address has invested to this crowdsale */\n mapping (address => uint256) public investedAmountOf;\n\n /** How much tokens this crowdsale has credited for each investor address */\n mapping (address => uint256) public tokenAmountOf;\n\n /** Addresses that are allowed to invest even before ICO offical opens. For testing, for ICO partners, etc. */\n mapping (address => bool) public earlyParticipantWhitelist;\n\n /** This is for manul testing for the interaction from owner wallet. You can set it to any value and inspect this in blockchain explorer to see that crowdsale interaction works. */\n uint public ownerTestValue;\n\n /** State machine\n *\n * - Preparing: All contract initialization calls and variables have not been set yet\n * - Prefunding: We have not passed start time yet\n * - Funding: Active crowdsale\n * - Success: Minimum funding goal reached\n * - Failure: Minimum funding goal not reached before ending time\n * - Finalized: The finalized has been called and succesfully executed\n * - Refunding: Refunds are loaded on the contract for reclaim.\n */\n enum State{Unknown, Preparing, PreFunding, Funding, Success, Failure, Finalized, Refunding}\n\n // A new investment was made\n event Invested(address investor, uint weiAmount, uint tokenAmount, uint128 customerId);\n\n // Refund was processed for a contributor\n event Refund(address investor, uint weiAmount);\n\n // The rules were changed what kind of investments we accept\n event InvestmentPolicyChanged(bool newRequireCustomerId, bool newRequiredSignedAddress, address newSignerAddress);\n\n // Address early participation whitelist status changed\n event Whitelisted(address addr, bool status);\n\n // Crowdsale end time has been changed\n event EndsAtChanged(uint newEndsAt);\n\n function CrowdsaleBase(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal) {\n\n owner = msg.sender;\n\n token = FractionalERC20(_token);\n setPricingStrategy(_pricingStrategy);\n\n multisigWallet = _multisigWallet;\n if(multisigWallet == 0) {\n throw;\n }\n\n if(_start == 0) {\n throw;\n }\n\n startsAt = _start;\n\n if(_end == 0) {\n throw;\n }\n\n endsAt = _end;\n\n // Don't mess the dates\n if(startsAt >= endsAt) {\n throw;\n }\n\n // Minimum funding goal can be zero\n minimumFundingGoal = _minimumFundingGoal;\n }\n\n /**\n * Don't expect to just send in money and get tokens.\n */\n function() payable {\n throw;\n }\n\n /**\n * @dev Make an investment.\n *\n * Crowdsale must be running for one to invest.\n * We must have not pressed the emergency brake.\n *\n * @param receiver The Ethereum address who receives the tokens\n * @param customerId (optional) UUID v4 to track the successful payments on the server side'\n * @param tokenAmount Amount of tokens which be credited to receiver\n *\n * @return tokensBought How mony tokens were bought\n */\n function buyTokens(address receiver, uint128 customerId, uint256 tokenAmount) stopInEmergency internal returns(uint tokensBought) {\n\n // Determine if it's a good time to accept investment from this participant\n if(getState() == State.PreFunding) {\n // Are we whitelisted for early deposit\n if(!earlyParticipantWhitelist[receiver]) {\n throw;\n }\n } else if(getState() == State.Funding) {\n // Retail participants can only come in when the crowdsale is running\n // pass\n } else {\n // Unwanted state\n throw;\n }\n\n uint weiAmount = msg.value;\n\n // Dust transaction\n require(tokenAmount != 0);\n\n if(investedAmountOf[receiver] == 0) {\n // A new investor\n investorCount++;\n }\n\n // Update investor\n investedAmountOf[receiver] = investedAmountOf[receiver].plus(weiAmount);\n tokenAmountOf[receiver] = tokenAmountOf[receiver].plus(tokenAmount);\n\n // Update totals\n weiRaised = weiRaised.plus(weiAmount);\n tokensSold = tokensSold.plus(tokenAmount);\n\n if(pricingStrategy.isPresalePurchase(receiver)) {\n presaleWeiRaised = presaleWeiRaised.plus(weiAmount);\n }\n\n // Check that we did not bust the cap\n require(!isBreakingCap(weiAmount, tokenAmount, weiRaised, tokensSold));\n\n assignTokens(receiver, tokenAmount);\n\n // Pocket the money, or fail the crowdsale if we for some reason cannot send the money to our multisig\n if(!multisigWallet.send(weiAmount)) throw;\n\n // Tell us invest was success\n Invested(receiver, weiAmount, tokenAmount, customerId);\n\n return tokenAmount;\n }\n\n /**\n * @dev Make an investment based on pricing strategy\n *\n * This is a wrapper for buyTokens(), but the amount of tokens receiver will\n * have depends on the pricing strategy used.\n *\n * @param receiver The Ethereum address who receives the tokens\n * @param customerId (optional) UUID v4 to track the successful payments on the server side'\n *\n * @return tokensBought How mony tokens were bought\n */\n function investInternal(address receiver, uint128 customerId) stopInEmergency internal returns(uint tokensBought) {\n return buyTokens(receiver, customerId, pricingStrategy.calculatePrice(msg.value, weiRaised - presaleWeiRaised, tokensSold, msg.sender, token.decimals()));\n }\n\n /**\n * @dev Calculate tokens user will have for their purchase\n *\n * @param weisTotal How much ethers (in wei) the user putssssss in\n * @param pricePerToken What is the price for one token\n *\n * @return tokensTotal which is received tokens, token decimals included\n */\n function calculateTokens(uint256 weisTotal, uint256 pricePerToken) public constant returns(uint tokensTotal) {\n // pricePerToken is how many full tokens, token decimal place included, you get for wei amount.\n // Because, in theory, decimal amount can vary, we do the exponent calculation here,\n // though gas wise using 10**18 constant would be much simpler.\n // Furthermore we could use rough amounts and take in raw wei per tokens amount,\n // but we lose too much accuracy for generic calculations, thus all these are\n // practically implemented as 10**18 fixed points.\n uint multiplier = 10 ** token.decimals();\n return weisTotal.times(multiplier)/pricePerToken;\n }\n\n /**\n * Finalize a succcesful crowdsale.\n *\n * The owner can triggre a call the contract that provides post-crowdsale actions, like releasing the tokens.\n */\n function finalize() public inState(State.Success) onlyOwner stopInEmergency {\n\n // Already finalized\n if(finalized) {\n throw;\n }\n\n // Finalizing is optional. We only call it if we are given a finalizing agent.\n if(address(finalizeAgent) != 0) {\n finalizeAgent.finalizeCrowdsale();\n }\n\n finalized = true;\n }\n\n /**\n * Allow to (re)set finalize agent.\n *\n * Design choice: no state restrictions on setting this, so that we can fix fat finger mistakes.\n */\n function setFinalizeAgent(FinalizeAgent addr) onlyOwner {\n finalizeAgent = addr;\n\n // Don't allow setting bad agent\n if(!finalizeAgent.isFinalizeAgent()) {\n throw;\n }\n }\n\n /**\n * Allow crowdsale owner to close early or extend the crowdsale.\n *\n * This is useful e.g. for a manual soft cap implementation:\n * - after X amount is reached determine manual closing\n *\n * This may put the crowdsale to an invalid state,\n * but we trust owners know what they are doing.\n *\n */\n function setEndsAt(uint time) onlyOwner {\n\n if(now > time) {\n throw; // Don't change past\n }\n\n if(startsAt > time) {\n throw; // Prevent human mistakes\n }\n\n endsAt = time;\n EndsAtChanged(endsAt);\n }\n\n /**\n * Allow to (re)set pricing strategy.\n *\n * Design choice: no state restrictions on the set, so that we can fix fat finger mistakes.\n */\n function setPricingStrategy(PricingStrategy _pricingStrategy) onlyOwner {\n pricingStrategy = _pricingStrategy;\n\n // Don't allow setting bad agent\n if(!pricingStrategy.isPricingStrategy()) {\n throw;\n }\n }\n\n /**\n * Allow to change the team multisig address in the case of emergency.\n *\n * This allows to save a deployed crowdsale wallet in the case the crowdsale has not yet begun\n * (we have done only few test transactions). After the crowdsale is going\n * then multisig address stays locked for the safety reasons.\n */\n function setMultisig(address addr) public onlyOwner {\n\n // Change\n if(investorCount > MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE) {\n throw;\n }\n\n multisigWallet = addr;\n }\n\n /**\n * Allow load refunds back on the contract for the refunding.\n *\n * The team can transfer the funds back on the smart contract in the case the minimum goal was not reached..\n */\n function loadRefund() public payable inState(State.Failure) {\n if(msg.value == 0) throw;\n loadedRefund = loadedRefund.plus(msg.value);\n }\n\n /**\n * Investors can claim refund.\n *\n * Note that any refunds from proxy buyers should be handled separately,\n * and not through this contract.\n */\n function refund() public inState(State.Refunding) {\n uint256 weiValue = investedAmountOf[msg.sender];\n if (weiValue == 0) throw;\n investedAmountOf[msg.sender] = 0;\n weiRefunded = weiRefunded.plus(weiValue);\n Refund(msg.sender, weiValue);\n if (!msg.sender.send(weiValue)) throw;\n }\n\n /**\n * @return true if the crowdsale has raised enough money to be a successful.\n */\n function isMinimumGoalReached() public constant returns (bool reached) {\n return weiRaised >= minimumFundingGoal;\n }\n\n /**\n * Check if the contract relationship looks good.\n */\n function isFinalizerSane() public constant returns (bool sane) {\n return finalizeAgent.isSane();\n }\n\n /**\n * Check if the contract relationship looks good.\n */\n function isPricingSane() public constant returns (bool sane) {\n return pricingStrategy.isSane(address(this));\n }\n\n /**\n * Crowdfund state machine management.\n *\n * We make it a function and do not assign the result to a variable, so there is no chance of the variable being stale.\n */\n function getState() public constant returns (State) {\n if(finalized) return State.Finalized;\n else if (address(finalizeAgent) == 0) return State.Preparing;\n else if (!finalizeAgent.isSane()) return State.Preparing;\n else if (!pricingStrategy.isSane(address(this))) return State.Preparing;\n else if (block.timestamp < startsAt) return State.PreFunding;\n else if (block.timestamp <= endsAt && !isCrowdsaleFull()) return State.Funding;\n else if (isMinimumGoalReached()) return State.Success;\n else if (!isMinimumGoalReached() && weiRaised > 0 && loadedRefund >= weiRaised) return State.Refunding;\n else return State.Failure;\n }\n\n /** This is for manual testing of multisig wallet interaction */\n function setOwnerTestValue(uint val) onlyOwner {\n ownerTestValue = val;\n }\n\n /**\n * Allow addresses to do early participation.\n *\n * TODO: Fix spelling error in the name\n */\n function setEarlyParicipantWhitelist(address addr, bool status) onlyOwner {\n earlyParticipantWhitelist[addr] = status;\n Whitelisted(addr, status);\n }\n\n\n /** Interface marker. */\n function isCrowdsale() public constant returns (bool) {\n return true;\n }\n\n //\n // Modifiers\n //\n\n /** Modified allowing execution only if the crowdsale is currently running. */\n modifier inState(State state) {\n if(getState() != state) throw;\n _;\n }\n\n\n //\n // Abstract functions\n //\n\n /**\n * Check if the current invested breaks our cap rules.\n *\n *\n * The child contract must define their own cap setting rules.\n * We allow a lot of flexibility through different capping strategies (ETH, token count)\n * Called from invest().\n *\n * @param weiAmount The amount of wei the investor tries to invest in the current transaction\n * @param tokenAmount The amount of tokens we try to give to the investor in the current transaction\n * @param weiRaisedTotal What would be our total raised balance after this transaction\n * @param tokensSoldTotal What would be our total sold tokens count after this transaction\n *\n * @return true if taking this investment would break our cap rules\n */\n function isBreakingCap(uint weiAmount, uint tokenAmount, uint weiRaisedTotal, uint tokensSoldTotal) constant returns (bool limitBroken);\n\n /**\n * Check if the current crowdsale is full and we can no longer sell any tokens.\n */\n function isCrowdsaleFull() public constant returns (bool);\n\n /**\n * Create new tokens or transfer issued tokens to the investor depending on the cap model.\n */\n function assignTokens(address receiver, uint tokenAmount) internal;\n}\n\n\n\n/**\n * Abstract base contract for token sales with the default buy entry points.\n *\n * Handle\n * - start and end dates\n * - accepting investments\n * - minimum funding goal and refund\n * - various statistics during the crowdfund\n * - different pricing strategies\n * - different investment policies (require server side customer id, allow only whitelisted addresses)\n *\n * Does not Handle\n *\n * - Token allocation (minting vs. transfer)\n * - Cap rules\n *\n */\ncontract Crowdsale is CrowdsaleBase {\n\n /* Do we need to have unique contributor id for each customer */\n bool public requireCustomerId;\n\n /**\n * Do we verify that contributor has been cleared on the server side (accredited investors only).\n * This method was first used in FirstBlood crowdsale to ensure all contributors have accepted terms on sale (on the web).\n */\n bool public requiredSignedAddress;\n\n /* Server side address that signed allowed contributors (Ethereum addresses) that can participate the crowdsale */\n address public signerAddress;\n\n function Crowdsale(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal) CrowdsaleBase(_token, _pricingStrategy, _multisigWallet, _start, _end, _minimumFundingGoal) {\n }\n\n /**\n * Preallocate tokens for the early investors.\n *\n * Preallocated tokens have been sold before the actual crowdsale opens.\n * This function mints the tokens and moves the crowdsale needle.\n *\n * Investor count is not handled; it is assumed this goes for multiple investors\n * and the token distribution happens outside the smart contract flow.\n *\n * No money is exchanged, as the crowdsale team already have received the payment.\n *\n * @param fullTokens tokens as full tokens - decimal places added internally\n * @param weiPrice Price of a single full token in wei\n *\n */\n function preallocate(address receiver, uint fullTokens, uint weiPrice) public onlyOwner {\n\n uint tokenAmount = fullTokens * 10**token.decimals();\n uint weiAmount = weiPrice * fullTokens; // This can be also 0, we give out tokens for free\n\n weiRaised = weiRaised.plus(weiAmount);\n tokensSold = tokensSold.plus(tokenAmount);\n\n investedAmountOf[receiver] = investedAmountOf[receiver].plus(weiAmount);\n tokenAmountOf[receiver] = tokenAmountOf[receiver].plus(tokenAmount);\n\n assignTokens(receiver, tokenAmount);\n\n // Tell us invest was success\n Invested(receiver, weiAmount, tokenAmount, 0);\n }\n\n /**\n * Allow anonymous contributions to this crowdsale.\n */\n function investWithSignedAddress(address addr, uint128 customerId, uint8 v, bytes32 r, bytes32 s) public payable {\n bytes32 hash = sha256(addr);\n if (ecrecover(hash, v, r, s) != signerAddress) throw;\n if(customerId == 0) throw; // UUIDv4 sanity check\n investInternal(addr, customerId);\n }\n\n /**\n * Track who is the customer making the payment so we can send thank you email.\n */\n function investWithCustomerId(address addr, uint128 customerId) public payable {\n if(requiredSignedAddress) throw; // Crowdsale allows only server-side signed participants\n if(customerId == 0) throw; // UUIDv4 sanity check\n investInternal(addr, customerId);\n }\n\n /**\n * Allow anonymous contributions to this crowdsale.\n */\n function invest(address addr) public payable {\n if(requireCustomerId) throw; // Crowdsale needs to track participants for thank you email\n if(requiredSignedAddress) throw; // Crowdsale allows only server-side signed participants\n investInternal(addr, 0);\n }\n\n /**\n * Invest to tokens, recognize the payer and clear his address.\n *\n */\n function buyWithSignedAddress(uint128 customerId, uint8 v, bytes32 r, bytes32 s) public payable {\n investWithSignedAddress(msg.sender, customerId, v, r, s);\n }\n\n /**\n * Invest to tokens, recognize the payer.\n *\n */\n function buyWithCustomerIdWithChecksum(uint128 customerId, bytes1 checksum) public payable {\n // see customerid.py\n if (bytes1(sha3(customerId)) != checksum) throw;\n investWithCustomerId(msg.sender, customerId);\n }\n\n /**\n * Legacy API signature.\n */\n function buyWithCustomerId(uint128 customerId) public payable {\n investWithCustomerId(msg.sender, customerId);\n }\n\n /**\n * The basic entry point to participate the crowdsale process.\n *\n * Pay for funding, get invested tokens back in the sender address.\n */\n function buy() public payable {\n invest(msg.sender);\n }\n\n /**\n * Set policy do we need to have server-side customer ids for the investments.\n *\n */\n function setRequireCustomerId(bool value) onlyOwner {\n requireCustomerId = value;\n InvestmentPolicyChanged(requireCustomerId, requiredSignedAddress, signerAddress);\n }\n\n /**\n * Set policy if all investors must be cleared on the server side first.\n *\n * This is e.g. for the accredited investor clearing.\n *\n */\n function setRequireSignedAddress(bool value, address _signerAddress) onlyOwner {\n requiredSignedAddress = value;\n signerAddress = _signerAddress;\n InvestmentPolicyChanged(requireCustomerId, requiredSignedAddress, signerAddress);\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n assert(c / a == b);\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n\n\n\n/**\n * @title Basic token\n * @dev Basic version of StandardToken, with no allowances.\n */\ncontract BasicToken is ERC20Basic {\n using SafeMath for uint256;\n\n mapping(address => uint256) balances;\n\n uint256 totalSupply_;\n\n /**\n * @dev total number of tokens in existence\n */\n function totalSupply() public view returns (uint256) {\n return totalSupply_;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param _to The address to transfer to.\n * @param _value The amount to be transferred.\n */\n function transfer(address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[msg.sender]);\n\n // SafeMath.sub will throw if there is not enough balance.\n balances[msg.sender] = balances[msg.sender].sub(_value);\n balances[_to] = balances[_to].add(_value);\n Transfer(msg.sender, _to, _value);\n return true;\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param _owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address _owner) public view returns (uint256 balance) {\n return balances[_owner];\n }\n\n}\n\n\n\n\n/**\n * @title Standard ERC20 token\n *\n * @dev Implementation of the basic standard token.\n * @dev https://github.com/ethereum/EIPs/issues/20\n * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol\n */\ncontract StandardToken is ERC20, BasicToken {\n\n mapping (address => mapping (address => uint256)) internal allowed;\n\n\n /**\n * @dev Transfer tokens from one address to another\n * @param _from address The address which you want to send tokens from\n * @param _to address The address which you want to transfer to\n * @param _value uint256 the amount of tokens to be transferred\n */\n function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[_from]);\n require(_value <= allowed[_from][msg.sender]);\n\n balances[_from] = balances[_from].sub(_value);\n balances[_to] = balances[_to].add(_value);\n allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);\n Transfer(_from, _to, _value);\n return true;\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n *\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param _spender The address which will spend the funds.\n * @param _value The amount of tokens to be spent.\n */\n function approve(address _spender, uint256 _value) public returns (bool) {\n allowed[msg.sender][_spender] = _value;\n Approval(msg.sender, _spender, _value);\n return true;\n }\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param _owner address The address which owns the funds.\n * @param _spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address _owner, address _spender) public view returns (uint256) {\n return allowed[_owner][_spender];\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(address _spender, uint _addedValue) public returns (bool) {\n allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {\n uint oldValue = allowed[msg.sender][_spender];\n if (_subtractedValue > oldValue) {\n allowed[msg.sender][_spender] = 0;\n } else {\n allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);\n }\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\ncontract Recoverable is Ownable {\n\n /// @dev Empty constructor (for now)\n function Recoverable() {\n }\n\n /// @dev This will be invoked by the owner, when owner wants to rescue tokens\n /// @param token Token which will we rescue to the owner from the contract\n function recoverTokens(ERC20Basic token) onlyOwner public {\n token.transfer(owner, tokensToBeReturned(token));\n }\n\n /// @dev Interface function, can be overwritten by the superclass\n /// @param token Token which balance we will check and return\n /// @return The amount of tokens (in smallest denominator) the contract owns\n function tokensToBeReturned(ERC20Basic token) public returns (uint) {\n return token.balanceOf(this);\n }\n}\n\n\n\n/**\n * Standard EIP-20 token with an interface marker.\n *\n * @notice Interface marker is used by crowdsale contracts to validate that addresses point a good token contract.\n *\n */\ncontract StandardTokenExt is StandardToken, Recoverable {\n\n /* Interface declaration */\n function isToken() public constant returns (bool weAre) {\n return true;\n }\n}\n\n\n\n/**\n * Define interface for releasing the token transfer after a successful crowdsale.\n */\ncontract ReleasableToken is StandardTokenExt {\n\n /* The finalizer contract that allows unlift the transfer limits on this token */\n address public releaseAgent;\n\n /** A crowdsale contract can release us to the wild if ICO success. If false we are are in transfer lock up period.*/\n bool public released = false;\n\n /** Map of agents that are allowed to transfer tokens regardless of the lock down period. These are crowdsale contracts and possible the team multisig itself. */\n mapping (address => bool) public transferAgents;\n\n /**\n * Limit token transfer until the crowdsale is over.\n *\n */\n modifier canTransfer(address _sender) {\n\n if(!released) {\n if(!transferAgents[_sender]) {\n throw;\n }\n }\n\n _;\n }\n\n /**\n * Set the contract that can call release and make the token transferable.\n *\n * Design choice. Allow reset the release agent to fix fat finger mistakes.\n */\n function setReleaseAgent(address addr) onlyOwner inReleaseState(false) public {\n\n // We don't do interface check here as we might want to a normal wallet address to act as a release agent\n releaseAgent = addr;\n }\n\n /**\n * Owner can allow a particular address (a crowdsale contract) to transfer tokens despite the lock up period.\n */\n function setTransferAgent(address addr, bool state) onlyOwner inReleaseState(false) public {\n transferAgents[addr] = state;\n }\n\n /**\n * One way function to release the tokens to the wild.\n *\n * Can be called only from the release agent that is the final ICO contract. It is only called if the crowdsale has been success (first milestone reached).\n */\n function releaseTokenTransfer() public onlyReleaseAgent {\n released = true;\n }\n\n /** The function can be called only before or after the tokens have been releasesd */\n modifier inReleaseState(bool releaseState) {\n if(releaseState != released) {\n throw;\n }\n _;\n }\n\n /** The function can be called only by a whitelisted release agent. */\n modifier onlyReleaseAgent() {\n if(msg.sender != releaseAgent) {\n throw;\n }\n _;\n }\n\n function transfer(address _to, uint _value) canTransfer(msg.sender) returns (bool success) {\n // Call StandardToken.transfer()\n return super.transfer(_to, _value);\n }\n\n function transferFrom(address _from, address _to, uint _value) canTransfer(_from) returns (bool success) {\n // Call StandardToken.transferForm()\n return super.transferFrom(_from, _to, _value);\n }\n\n}\n\n\n/**\n * A finalize agent that does nothing.\n *\n * - Token transfer must be manually released by the owner\n */\ncontract NullFinalizeAgent is FinalizeAgent {\n\n Crowdsale public crowdsale;\n\n function NullFinalizeAgent(Crowdsale _crowdsale) {\n crowdsale = _crowdsale;\n }\n\n /** Check that we can release the token */\n function isSane() public constant returns (bool) {\n return true;\n }\n\n /** Called once by crowdsale finalize() if the sale was success. */\n function finalizeCrowdsale() public {\n }\n\n}\n"}, "Ownable": {"abi": [{"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "bytecode": "0x608060405234801561001057600080fd5b5060008054600160a060020a031916331790556101ce806100326000396000f30060806040526004361061004b5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416638da5cb5b8114610050578063f2fde38b1461008e575b600080fd5b34801561005c57600080fd5b506100656100be565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561009a57600080fd5b506100bc73ffffffffffffffffffffffffffffffffffffffff600435166100da565b005b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1633146100fe57600080fd5b73ffffffffffffffffffffffffffffffffffffffff8116151561012057600080fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff191673ffffffffffffffffffffffffffffffffffffffff929092169190911790555600a165627a7a7230582011fbb79fb68811a9f5db8fdf02201415540235de06f1035b06aa4eb54c1ede720029", "bytecode_runtime": "0x60806040526004361061004b5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416638da5cb5b8114610050578063f2fde38b1461008e575b600080fd5b34801561005c57600080fd5b506100656100be565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561009a57600080fd5b506100bc73ffffffffffffffffffffffffffffffffffffffff600435166100da565b005b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1633146100fe57600080fd5b73ffffffffffffffffffffffffffffffffffffffff8116151561012057600080fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff191673ffffffffffffffffffffffffffffffffffffffff929092169190911790555600a165627a7a7230582011fbb79fb68811a9f5db8fdf02201415540235de06f1035b06aa4eb54c1ede720029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "devdoc": {"methods": {"transferOwnership(address)": {"details": "Allows the current owner to transfer control of the contract to a newOwner.", "params": {"newOwner": "The address to transfer ownership to."}}}, "title": "Ownable"}, "userdoc": {"methods": {}}}, "settings": {"compilationTarget": {"zeppelin/contracts/ownership/Ownable.sol": "Ownable"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}}, "version": 1}, "name": "Ownable", "ordered_full_dependencies": [], "source_path": "zeppelin/contracts/ownership/Ownable.sol", "source": "\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n"}, "PaymentForwarder": {"abi": [{"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}], "name": "payForMyself", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}, {"name": "benefactor", "type": "address"}], "name": "payWithoutChecksum", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}, {"name": "checksum", "type": "bytes1"}], "name": "payForMyselfWithChecksum", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [], "name": "halt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "customerCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "totalTransferred", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "halted", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}, {"name": "benefactor", "type": "address"}, {"name": "checksum", "type": "bytes1"}], "name": "pay", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [], "name": "unhalt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "teamMultisig", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "paymentsByBenefactor", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "uint128"}], "name": "paymentsByCustomer", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [{"name": "_owner", "type": "address"}, {"name": "_teamMultisig", "type": "address"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "source", "type": "address"}, {"indexed": false, "name": "amount", "type": "uint256"}, {"indexed": false, "name": "customerId", "type": "uint128"}, {"indexed": false, "name": "benefactor", "type": "address"}], "name": "PaymentForwarded", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "bytecode": "0x608060405234801561001057600080fd5b506040516040806107a98339810160405280516020909101516000805460018054600160a060020a03948516600160a060020a03199182161790915592909316928216331790911691909117905561073c8061006d6000396000f3006080604052600436106100cf5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663274465b481146100d457806331288397146100f357806346f2e8801461011c5780635ed7ca5b1461015e5780638da5cb5b146101735780639757e8a3146101a45780639b087b2d146101cb578063b9b8af0b146101e0578063bbc43d4114610209578063cb3e64fd14610257578063dbc0c0851461026c578063ef3336f514610281578063f2fde38b146102a2578063f9215676146102c3575b600080fd5b6100f16fffffffffffffffffffffffffffffffff600435166102ed565b005b6100f16fffffffffffffffffffffffffffffffff60043516600160a060020a03602435166102fa565b6100f16fffffffffffffffffffffffffffffffff600435167fff0000000000000000000000000000000000000000000000000000000000000060243516610431565b34801561016a57600080fd5b506100f16104a7565b34801561017f57600080fd5b506101886104f5565b60408051600160a060020a039092168252519081900360200190f35b3480156101b057600080fd5b506101b9610504565b60408051918252519081900360200190f35b3480156101d757600080fd5b506101b961050a565b3480156101ec57600080fd5b506101f5610510565b604080519115158252519081900360200190f35b6100f16fffffffffffffffffffffffffffffffff60043516600160a060020a03602435167fff0000000000000000000000000000000000000000000000000000000000000060443516610531565b34801561026357600080fd5b506100f16105e9565b34801561027857600080fd5b50610188610649565b34801561028d57600080fd5b506101b9600160a060020a0360043516610658565b3480156102ae57600080fd5b506100f1600160a060020a036004351661066a565b3480156102cf57600080fd5b506101b96fffffffffffffffffffffffffffffffff600435166106fe565b6102f781336102fa565b50565b6000805474010000000000000000000000000000000000000000900460ff161561032357600080fd5b506040805133815234602082018190526fffffffffffffffffffffffffffffffff851682840152600160a060020a038416606083015291517f4e4e2d6da11427f2d85d47e2bced64efa9ccd9694ae97786772a22d465bc80a49181900360800190a160028054820190556fffffffffffffffffffffffffffffffff831660009081526004602052604090205415156103bf576003805460010190555b6fffffffffffffffffffffffffffffffff83166000908152600460209081526040808320805485019055600160a060020a0380861684526005909252808320805485019055600154905191169183156108fc02918491818181858888f19350505050151561042c57600080fd5b505050565b604080517001000000000000000000000000000000006fffffffffffffffffffffffffffffffff851602815290519081900360100190207fff000000000000000000000000000000000000000000000000000000000000009081169082161461049957600080fd5b6104a382336102fa565b5050565b600054600160a060020a031633146104be57600080fd5b6000805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b600054600160a060020a031681565b60035481565b60025481565b60005474010000000000000000000000000000000000000000900460ff1681565b60005474010000000000000000000000000000000000000000900460ff161561055957600080fd5b604080517001000000000000000000000000000000006fffffffffffffffffffffffffffffffff86160281526c01000000000000000000000000600160a060020a03851602601082015290519081900360240190207fff00000000000000000000000000000000000000000000000000000000000000908116908216146105df57600080fd5b61042c83836102fa565b600054600160a060020a0316331461060057600080fd5b60005474010000000000000000000000000000000000000000900460ff16151561062957600080fd5b6000805474ff000000000000000000000000000000000000000019169055565b600154600160a060020a031681565b60056020526000908152604090205481565b600054600160a060020a0316331461068157600080fd5b600160a060020a038116151561069657600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600460205260009081526040902054815600a165627a7a72305820123d5cf6ed3d6023b06341b8768c945871e5dfbb5177354c5da93a103c9686f80029", "bytecode_runtime": "0x6080604052600436106100cf5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663274465b481146100d457806331288397146100f357806346f2e8801461011c5780635ed7ca5b1461015e5780638da5cb5b146101735780639757e8a3146101a45780639b087b2d146101cb578063b9b8af0b146101e0578063bbc43d4114610209578063cb3e64fd14610257578063dbc0c0851461026c578063ef3336f514610281578063f2fde38b146102a2578063f9215676146102c3575b600080fd5b6100f16fffffffffffffffffffffffffffffffff600435166102ed565b005b6100f16fffffffffffffffffffffffffffffffff60043516600160a060020a03602435166102fa565b6100f16fffffffffffffffffffffffffffffffff600435167fff0000000000000000000000000000000000000000000000000000000000000060243516610431565b34801561016a57600080fd5b506100f16104a7565b34801561017f57600080fd5b506101886104f5565b60408051600160a060020a039092168252519081900360200190f35b3480156101b057600080fd5b506101b9610504565b60408051918252519081900360200190f35b3480156101d757600080fd5b506101b961050a565b3480156101ec57600080fd5b506101f5610510565b604080519115158252519081900360200190f35b6100f16fffffffffffffffffffffffffffffffff60043516600160a060020a03602435167fff0000000000000000000000000000000000000000000000000000000000000060443516610531565b34801561026357600080fd5b506100f16105e9565b34801561027857600080fd5b50610188610649565b34801561028d57600080fd5b506101b9600160a060020a0360043516610658565b3480156102ae57600080fd5b506100f1600160a060020a036004351661066a565b3480156102cf57600080fd5b506101b96fffffffffffffffffffffffffffffffff600435166106fe565b6102f781336102fa565b50565b6000805474010000000000000000000000000000000000000000900460ff161561032357600080fd5b506040805133815234602082018190526fffffffffffffffffffffffffffffffff851682840152600160a060020a038416606083015291517f4e4e2d6da11427f2d85d47e2bced64efa9ccd9694ae97786772a22d465bc80a49181900360800190a160028054820190556fffffffffffffffffffffffffffffffff831660009081526004602052604090205415156103bf576003805460010190555b6fffffffffffffffffffffffffffffffff83166000908152600460209081526040808320805485019055600160a060020a0380861684526005909252808320805485019055600154905191169183156108fc02918491818181858888f19350505050151561042c57600080fd5b505050565b604080517001000000000000000000000000000000006fffffffffffffffffffffffffffffffff851602815290519081900360100190207fff000000000000000000000000000000000000000000000000000000000000009081169082161461049957600080fd5b6104a382336102fa565b5050565b600054600160a060020a031633146104be57600080fd5b6000805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b600054600160a060020a031681565b60035481565b60025481565b60005474010000000000000000000000000000000000000000900460ff1681565b60005474010000000000000000000000000000000000000000900460ff161561055957600080fd5b604080517001000000000000000000000000000000006fffffffffffffffffffffffffffffffff86160281526c01000000000000000000000000600160a060020a03851602601082015290519081900360240190207fff00000000000000000000000000000000000000000000000000000000000000908116908216146105df57600080fd5b61042c83836102fa565b600054600160a060020a0316331461060057600080fd5b60005474010000000000000000000000000000000000000000900460ff16151561062957600080fd5b6000805474ff000000000000000000000000000000000000000019169055565b600154600160a060020a031681565b60056020526000908152604090205481565b600054600160a060020a0316331461068157600080fd5b600160a060020a038116151561069657600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600460205260009081526040902054815600a165627a7a72305820123d5cf6ed3d6023b06341b8768c945871e5dfbb5177354c5da93a103c9686f80029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}], "name": "payForMyself", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}, {"name": "benefactor", "type": "address"}], "name": "payWithoutChecksum", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}, {"name": "checksum", "type": "bytes1"}], "name": "payForMyselfWithChecksum", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [], "name": "halt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "customerCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "totalTransferred", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "halted", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}, {"name": "benefactor", "type": "address"}, {"name": "checksum", "type": "bytes1"}], "name": "pay", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [], "name": "unhalt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "teamMultisig", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "paymentsByBenefactor", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "uint128"}], "name": "paymentsByCustomer", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [{"name": "_owner", "type": "address"}, {"name": "_teamMultisig", "type": "address"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "source", "type": "address"}, {"indexed": false, "name": "amount", "type": "uint256"}, {"indexed": false, "name": "customerId", "type": "uint128"}, {"indexed": false, "name": "benefactor", "type": "address"}], "name": "PaymentForwarded", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "devdoc": {"methods": {"pay(uint128,address,bytes1)": {"params": {"customerId": "Identifier in the central database, UUID v4 "}}, "payForMyselfWithChecksum(uint128,bytes1)": {"params": {"customerId": "Identifier in the central database, UUID v4 "}}, "transferOwnership(address)": {"details": "Allows the current owner to transfer control of the contract to a newOwner.", "params": {"newOwner": "The address to transfer ownership to."}}}}, "userdoc": {"methods": {"pay(uint128,address,bytes1)": {"notice": "Pay on a behalf of an address."}, "payForMyself(uint128)": {"notice": "Legacy API signature."}, "payForMyselfWithChecksum(uint128,bytes1)": {"notice": "Pay on a behalf of the sender."}}}}, "settings": {"compilationTarget": {"contracts/PaymentForwarder.sol": "PaymentForwarder"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/Haltable.sol": {"keccak256": "0x265dcf25e7c9ab4b6eecd2181f1b71334a1b5381a60f8db7d9526dab120f4b70", "urls": ["bzzr://d522e00fa9e075941469dd81738b59fdb99ce3c12cdc39e33abe40b588c4da9b"]}, "contracts/PaymentForwarder.sol": {"keccak256": "0xf7937378fd309771c8f8d8816f16ccb5fe1567759b0f961528b7284be4254f20", "urls": ["bzzr://01c5de9cbd95a656d0a477ff5108904bc5142327653ea40313feb59059cc8062"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}}, "version": 1}, "name": "PaymentForwarder", "ordered_full_dependencies": [], "source_path": "contracts/PaymentForwarder.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n/*\n * Haltable\n *\n * Abstract contract that allows children to implement an\n * emergency stop mechanism. Differs from Pausable by causing a throw when in halt mode.\n *\n *\n * Originally envisioned in FirstBlood ICO contract.\n */\ncontract Haltable is Ownable {\n bool public halted;\n\n modifier stopInEmergency {\n if (halted) throw;\n _;\n }\n\n modifier stopNonOwnersInEmergency {\n if (halted && msg.sender != owner) throw;\n _;\n }\n\n modifier onlyInEmergency {\n if (!halted) throw;\n _;\n }\n\n // called by the owner on emergency, triggers stopped state\n function halt() external onlyOwner {\n halted = true;\n }\n\n // called by the owner on end of emergency, returns to normal state\n function unhalt() external onlyOwner onlyInEmergency {\n halted = false;\n }\n\n}\n\n\n/**\n * Forward Ethereum payments to another wallet and track them with an event.\n *\n * Allows to identify customers who made Ethereum payment for a central token issuance.\n * Furthermore allow making a payment on behalf of another address.\n *\n * Allow pausing to signal the end of the crowdsale.\n */\ncontract PaymentForwarder is Haltable {\n\n /** Who will get all ETH in the end */\n address public teamMultisig;\n\n /** Total incoming money */\n uint public totalTransferred;\n\n /** How many distinct customers we have that have made a payment */\n uint public customerCount;\n\n /** Total incoming money per centrally tracked customer id */\n mapping(uint128 => uint) public paymentsByCustomer;\n\n /** Total incoming money per benefactor address */\n mapping(address => uint) public paymentsByBenefactor;\n\n /** A customer has made a payment. Benefactor is the address where the tokens will be ultimately issued.*/\n event PaymentForwarded(address source, uint amount, uint128 customerId, address benefactor);\n\n function PaymentForwarder(address _owner, address _teamMultisig) {\n teamMultisig = _teamMultisig;\n owner = _owner;\n }\n\n function payWithoutChecksum(uint128 customerId, address benefactor) public stopInEmergency payable {\n\n uint weiAmount = msg.value;\n\n PaymentForwarded(msg.sender, weiAmount, customerId, benefactor);\n\n // We trust Ethereum amounts cannot overflow uint256\n totalTransferred += weiAmount;\n\n if(paymentsByCustomer[customerId] == 0) {\n customerCount++;\n }\n\n paymentsByCustomer[customerId] += weiAmount;\n\n // We track benefactor addresses for extra safety;\n // In the case of central ETH issuance tracking has problems we can\n // construct ETH contributions solely based on blockchain data\n paymentsByBenefactor[benefactor] += weiAmount;\n\n // May run out of gas\n if(!teamMultisig.send(weiAmount)) throw;\n }\n\n /**\n * Pay on a behalf of an address.\n *\n * @param customerId Identifier in the central database, UUID v4\n *\n */\n function pay(uint128 customerId, address benefactor, bytes1 checksum) public stopInEmergency payable {\n // see customerid.py\n if (bytes1(sha3(customerId, benefactor)) != checksum) throw;\n payWithoutChecksum(customerId, benefactor);\n }\n\n /**\n * Pay on a behalf of the sender.\n *\n * @param customerId Identifier in the central database, UUID v4\n *\n */\n function payForMyselfWithChecksum(uint128 customerId, bytes1 checksum) public payable {\n // see customerid.py\n if (bytes1(sha3(customerId)) != checksum) throw;\n payWithoutChecksum(customerId, msg.sender);\n }\n\n /**\n * Legacy API signature.\n */\n function payForMyself(uint128 customerId) public payable {\n payWithoutChecksum(customerId, msg.sender);\n }\n\n}\n"}, "PaymentSplitter": {"abi": [{"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "recoverTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "uint256"}], "name": "parties", "outputs": [{"name": "addr", "type": "address"}, {"name": "slices", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSlices", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "tokensToBeReturned", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "split", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [{"name": "addresses", "type": "address[]"}, {"name": "slices", "type": "uint256[]"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"payable": true, "stateMutability": "payable", "type": "fallback"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "sender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Deposit", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "who", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Split", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "SplitTo", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "bytecode": "0x608060405234801561001057600080fd5b50604051610869380380610869833981016040528051602082015160008054600160a060020a031916331781559083018051929093018051909392146100dd57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f61646472657373657320616e6420736c69636573206d7573742062652065717560448201527f616c206c656e6774682e00000000000000000000000000000000000000000000606482015290519081900360840190fd5b600083511180156100ef575060648351105b151561018257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f416d6f756e74206f6620706172746965732069732065697468657220746f6f2060448201527f6d616e792c206f72207a65726f2e000000000000000000000000000000000000606482015290519081900360840190fd5b5060005b8251811015610259576002604080519081016040528085848151811015156101aa57fe5b90602001906020020151600160a060020a0316815260200184848151811015156101d057fe5b60209081029190910181015190915282546001808201855560009485529382902083516002909202018054600160a060020a031916600160a060020a03909216919091178155910151910155815161024e9083908390811061022e57fe5b60209081029091010151600154906401000000006105a861026182021704565b600190815501610186565b505050610277565b60008282018381101561027057fe5b9392505050565b6105e3806102866000396000f3006080604052600436106100825763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166316114acd81146100ba57806370651a18146100dd5780638d047d00146101185780638da5cb5b1461013f578063c45d19db14610170578063f2fde38b14610191578063f7654176146101b2575b60408051348152905133917fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c919081900360200190a2005b3480156100c657600080fd5b506100db600160a060020a03600435166101c7565b005b3480156100e957600080fd5b506100f5600435610297565b60408051600160a060020a03909316835260208301919091528051918290030190f35b34801561012457600080fd5b5061012d6102cd565b60408051918252519081900360200190f35b34801561014b57600080fd5b506101546102d3565b60408051600160a060020a039092168252519081900360200190f35b34801561017c57600080fd5b5061012d600160a060020a03600435166102e2565b34801561019d57600080fd5b506100db600160a060020a0360043516610378565b3480156101be57600080fd5b506100db61040c565b600054600160a060020a031633146101de57600080fd5b600054600160a060020a038083169163a9059cbb91166101fd846102e2565b6040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b15801561026857600080fd5b505af115801561027c573d6000803e3d6000fd5b505050506040513d602081101561029257600080fd5b505050565b60028054829081106102a557fe5b600091825260209091206002909102018054600190910154600160a060020a03909116915082565b60015481565b600054600160a060020a031681565b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600091600160a060020a038416916370a082319160248082019260209290919082900301818787803b15801561034657600080fd5b505af115801561035a573d6000803e3d6000fd5b505050506040513d602081101561037057600080fd5b505192915050565b600054600160a060020a0316331461038f57600080fd5b600160a060020a03811615156103a457600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6001543031906000908190819061042a90859063ffffffff61055a16565b9250600091505b60025482101561051e5761046e60028381548110151561044d57fe5b9060005260206000209060020201600101548461057690919063ffffffff16565b905060028281548110151561047f57fe5b60009182526020822060029091020154604051600160a060020a039091169183156108fc02918491818181858888f19350505050506002828154811015156104c357fe5b600091825260209182902060029091020154604080518481529051600160a060020a03909216927f8eb149b035c5f6f2d0957bc08ba5bae0e31139eab8eee6671cad10b105ec8c3c92918290030190a2600190910190610431565b60408051858152905133917fe1665329182bc1dab50c9b04ea6bd37107b73ed7c585951d808b02cd9b659627919081900360200190a250505050565b600080828481151561056857fe5b0490508091505b5092915050565b600080831515610589576000915061056f565b5082820282848281151561059957fe5b04146105a157fe5b9392505050565b6000828201838110156105a157fe00a165627a7a723058206dd924f6a5a850ba2b40d4c071a7f27dbbfea0bea55135019c294ba805a0deb70029", "bytecode_runtime": "0x6080604052600436106100825763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166316114acd81146100ba57806370651a18146100dd5780638d047d00146101185780638da5cb5b1461013f578063c45d19db14610170578063f2fde38b14610191578063f7654176146101b2575b60408051348152905133917fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c919081900360200190a2005b3480156100c657600080fd5b506100db600160a060020a03600435166101c7565b005b3480156100e957600080fd5b506100f5600435610297565b60408051600160a060020a03909316835260208301919091528051918290030190f35b34801561012457600080fd5b5061012d6102cd565b60408051918252519081900360200190f35b34801561014b57600080fd5b506101546102d3565b60408051600160a060020a039092168252519081900360200190f35b34801561017c57600080fd5b5061012d600160a060020a03600435166102e2565b34801561019d57600080fd5b506100db600160a060020a0360043516610378565b3480156101be57600080fd5b506100db61040c565b600054600160a060020a031633146101de57600080fd5b600054600160a060020a038083169163a9059cbb91166101fd846102e2565b6040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b15801561026857600080fd5b505af115801561027c573d6000803e3d6000fd5b505050506040513d602081101561029257600080fd5b505050565b60028054829081106102a557fe5b600091825260209091206002909102018054600190910154600160a060020a03909116915082565b60015481565b600054600160a060020a031681565b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600091600160a060020a038416916370a082319160248082019260209290919082900301818787803b15801561034657600080fd5b505af115801561035a573d6000803e3d6000fd5b505050506040513d602081101561037057600080fd5b505192915050565b600054600160a060020a0316331461038f57600080fd5b600160a060020a03811615156103a457600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6001543031906000908190819061042a90859063ffffffff61055a16565b9250600091505b60025482101561051e5761046e60028381548110151561044d57fe5b9060005260206000209060020201600101548461057690919063ffffffff16565b905060028281548110151561047f57fe5b60009182526020822060029091020154604051600160a060020a039091169183156108fc02918491818181858888f19350505050506002828154811015156104c357fe5b600091825260209182902060029091020154604080518481529051600160a060020a03909216927f8eb149b035c5f6f2d0957bc08ba5bae0e31139eab8eee6671cad10b105ec8c3c92918290030190a2600190910190610431565b60408051858152905133917fe1665329182bc1dab50c9b04ea6bd37107b73ed7c585951d808b02cd9b659627919081900360200190a250505050565b600080828481151561056857fe5b0490508091505b5092915050565b600080831515610589576000915061056f565b5082820282848281151561059957fe5b04146105a157fe5b9392505050565b6000828201838110156105a157fe00a165627a7a723058206dd924f6a5a850ba2b40d4c071a7f27dbbfea0bea55135019c294ba805a0deb70029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "recoverTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "uint256"}], "name": "parties", "outputs": [{"name": "addr", "type": "address"}, {"name": "slices", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSlices", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "tokensToBeReturned", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "split", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [{"name": "addresses", "type": "address[]"}, {"name": "slices", "type": "uint256[]"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"payable": true, "stateMutability": "payable", "type": "fallback"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "sender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Deposit", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "who", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Split", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "SplitTo", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "devdoc": {"methods": {"recoverTokens(address)": {"details": "This will be invoked by the owner, when owner wants to rescue tokens", "params": {"token": "Token which will we rescue to the owner from the contract"}}, "split()": {"details": "Split the ethers, and send to parties according to slices. This can be intentionally invoked by anyone: if some random person wants to pay for the gas, that's good for us."}, "tokensToBeReturned(address)": {"details": "Interface function, can be overwritten by the superclass", "params": {"token": "Token which balance we will check and return"}, "return": "The amount of tokens (in smallest denominator) the contract owns"}, "transferOwnership(address)": {"details": "Allows the current owner to transfer control of the contract to a newOwner.", "params": {"newOwner": "The address to transfer ownership to."}}}}, "userdoc": {"methods": {}}}, "settings": {"compilationTarget": {"contracts/PaymentSplitter.sol": "PaymentSplitter"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/PaymentSplitter.sol": {"keccak256": "0xe5142d5f28d263591e23f894740efecd170d0c2fc8809f43d4d4b27a1db2b0ea", "urls": ["bzzr://ce24a69c87e66a2446b059d9b17eaf431d74bdd76933116d6e033f6a0f4c7559"]}, "contracts/Recoverable.sol": {"keccak256": "0x311a332cdd87df6e00057f5455f4e68b043b5dbe211f6d68bc64e20817515635", "urls": ["bzzr://4fd99bcfb93baed6e7c8d22ee9ecc5c8346a1aa98288e77b01333b2c5d3f582d"]}, "zeppelin/contracts/math/SafeMath.sol": {"keccak256": "0x341ba8cb467a3623e819ba1a683ac1d264005186f308505214e5f6bc89446a08", "urls": ["bzzr://59b5652ee4e4a1b5a8f1a8906e14c84af43d636cf5ca0725cc1813aabe4c8c17"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}}, "version": 1}, "name": "PaymentSplitter", "ordered_full_dependencies": [], "source_path": "contracts/PaymentSplitter.sol", "source": "/**\n * This smart contract code is Copyright 2018 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * @dev Split ether between parties.\n * @author TokenMarket Ltd. / Ville Sundell \n *\n * Allows splitting payments between parties.\n * Ethers are split to parties, each party has slices they are entitled to.\n * Ethers of this smart contract are divided into slices upon split().\n */\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\ncontract Recoverable is Ownable {\n\n /// @dev Empty constructor (for now)\n function Recoverable() {\n }\n\n /// @dev This will be invoked by the owner, when owner wants to rescue tokens\n /// @param token Token which will we rescue to the owner from the contract\n function recoverTokens(ERC20Basic token) onlyOwner public {\n token.transfer(owner, tokensToBeReturned(token));\n }\n\n /// @dev Interface function, can be overwritten by the superclass\n /// @param token Token which balance we will check and return\n /// @return The amount of tokens (in smallest denominator) the contract owns\n function tokensToBeReturned(ERC20Basic token) public returns (uint) {\n return token.balanceOf(this);\n }\n}\n\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n assert(c / a == b);\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n\n\ncontract PaymentSplitter is Recoverable {\n using SafeMath for uint256; // We use only uint256 for safety reasons (no boxing)\n\n /// @dev Describes a party (address and amount of slices the party is entitled to)\n struct Party {\n address addr;\n uint256 slices;\n }\n\n /// @dev This is just a failsafe, so we can't initialize a contract where\n /// splitting would not be succesful in the future (for example because\n /// of decreased block gas limit):\n uint256 constant MAX_PARTIES = 100;\n /// @dev How many slices there are in total:\n uint256 public totalSlices;\n /// @dev Array of \"Party\"s for each party's address and amount of slices:\n Party[] public parties;\n\n /// @dev This event is emitted when someone makes a payment:\n /// (Gnosis MultiSigWallet compatible event)\n event Deposit(address indexed sender, uint256 value);\n /// @dev This event is emitted when someone splits the ethers between parties:\n /// (emitted once per call)\n event Split(address indexed who, uint256 value);\n /// @dev This event is emitted for every party we send ethers to:\n event SplitTo(address indexed to, uint256 value);\n\n /// @dev Constructor: takes list of parties and their slices.\n /// @param addresses List of addresses of the parties\n /// @param slices Slices of the parties. Will be added to totalSlices.\n function PaymentSplitter(address[] addresses, uint[] slices) public {\n require(addresses.length == slices.length, \"addresses and slices must be equal length.\");\n require(addresses.length > 0 && addresses.length < MAX_PARTIES, \"Amount of parties is either too many, or zero.\");\n\n for(uint i=0; i 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n\n\n/**\n * @author TokenMarket / Ville Sundell \n */\ncontract CheckpointToken is ERC677Token {\n using SafeMath for uint256; // We use only uint256 for safety reasons (no boxing)\n\n /// @dev Name of the token, usually the company and/or series (like \"TokenMeerkat Ltd. Series A\"):\n string public name;\n /// @dev Ticker symbol, usually bases on the \"name\" above (like \"MEER\"):\n string public symbol;\n /// @dev Decimals are usually set to 18 for EIP-20 tokens:\n uint256 public decimals;\n /// @dev If transferVerifier is set, that contract will be queried upon every token transaction:\n SecurityTransferAgent public transferVerifier;\n\n /// @dev Checkpoint is the fundamental unit for our internal accounting\n /// (who owns what, and at what moment in time)\n struct Checkpoint {\n uint256 blockNumber;\n uint256 value;\n }\n /// @dev This mapping contains checkpoints for every address:\n mapping (address => Checkpoint[]) public tokenBalances;\n /// @dev This is a one dimensional Checkpoint mapping of the overall token supply:\n Checkpoint[] public tokensTotal;\n\n /// @dev This mapping keeps account for approve() -> fransferFrom() pattern:\n mapping (address => mapping (address => uint256)) public allowed;\n\n /**\n * @dev Constructor for CheckpointToken, initializing the token\n *\n * Here we define initial values for name, symbol and decimals.\n *\n * @param _name Initial name of the token\n * @param _symbol Initial symbol of the token\n * @param _decimals Number of decimals for the token, industry standard is 18\n */\n function CheckpointToken(string _name, string _symbol, uint256 _decimals) public {\n name = _name;\n symbol = _symbol;\n decimals = _decimals;\n }\n\n /** PUBLIC FUNCTIONS\n ****************************************/\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param owner address The address which owns the funds.\n * @param spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address owner, address spender) public view returns (uint256) {\n return allowed[owner][spender];\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n *\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param spender The address which will spend the funds.\n * @param value The amount of tokens to be spent.\n * @return true if the call function was executed successfully\n */\n function approve(address spender, uint256 value) public returns (bool) {\n allowed[msg.sender][spender] = value;\n Approval(msg.sender, spender, value);\n return true;\n }\n\n /**\n * @dev Transfer tokens from one address to another\n * @param from address The address which you want to send tokens from\n * @param to address The address which you want to transfer to\n * @param value uint256 the amount of tokens to be transferred\n * @return true if the call function was executed successfully\n */\n function transferFrom(address from, address to, uint256 value) public returns (bool) {\n require(value <= allowed[from][msg.sender]);\n\n transferInternal(from, to, value);\n Transfer(from, to, value);\n return true;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param to The address to transfer to.\n * @param value The amount to be transferred.\n * @return true if the call function was executed successfully\n */\n function transfer(address to, uint256 value) public returns (bool) {\n transferInternal(msg.sender, to, value);\n Transfer(msg.sender, to, value);\n return true;\n }\n\n /**\n * @dev total number of tokens in existence\n * @return A uint256 specifying the total number of tokens in existence\n */\n function totalSupply() public view returns (uint256 tokenCount) {\n tokenCount = balanceAtBlock(tokensTotal, block.number);\n }\n\n /**\n * @dev total number of tokens in existence at the given block\n * @param blockNumber The block number we want to query for the total supply\n * @return A uint256 specifying the total number of tokens at a given block\n */\n function totalSupplyAt(uint256 blockNumber) public view returns (uint256 tokenCount) {\n tokenCount = balanceAtBlock(tokensTotal, blockNumber);\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address owner) public view returns (uint256 balance) {\n balance = balanceAtBlock(tokenBalances[owner], block.number);\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param owner The address to query the the balance of.\n * @param blockNumber The block number we want to query for the balance.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceAt(address owner, uint256 blockNumber) public view returns (uint256 balance) {\n balance = balanceAtBlock(tokenBalances[owner], blockNumber);\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param spender The address which will spend the funds.\n * @param addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(address spender, uint addedValue) public returns (bool) {\n allowed[msg.sender][spender] = allowed[msg.sender][spender].add(addedValue);\n Approval(msg.sender, spender, allowed[msg.sender][spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param spender The address which will spend the funds.\n * @param subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(address spender, uint subtractedValue) public returns (bool) {\n uint oldValue = allowed[msg.sender][spender];\n if (subtractedValue > oldValue) {\n allowed[msg.sender][spender] = 0;\n } else {\n allowed[msg.sender][spender] = oldValue.sub(subtractedValue);\n }\n Approval(msg.sender, spender, allowed[msg.sender][spender]);\n return true;\n }\n\n /**\n * @dev Addition to StandardToken methods. Increase the amount of tokens that\n * an owner allowed to a spender and execute a call with the sent data.\n *\n * This is originally from OpenZeppelin.\n *\n * approve should be called when allowed[spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param spender The address which will spend the funds.\n * @param addedValue The amount of tokens to increase the allowance by.\n * @param data ABI-encoded contract call to call `spender` address.\n */\n function increaseApproval(address spender, uint addedValue, bytes data) public returns (bool) {\n require(spender != address(this));\n\n increaseApproval(spender, addedValue);\n\n require(spender.call(data));\n\n return true;\n }\n\n /**\n * @dev Addition to StandardToken methods. Decrease the amount of tokens that\n * an owner allowed to a spender and execute a call with the sent data.\n *\n * This is originally from OpenZeppelin.\n *\n * approve should be called when allowed[spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param spender The address which will spend the funds.\n * @param subtractedValue The amount of tokens to decrease the allowance by.\n * @param data ABI-encoded contract call to call `spender` address.\n */\n function decreaseApproval(address spender, uint subtractedValue, bytes data) public returns (bool) {\n require(spender != address(this));\n\n decreaseApproval(spender, subtractedValue);\n\n require(spender.call(data));\n\n return true;\n }\n\n /** INTERNALS\n ****************************************/\n\n function balanceAtBlock(Checkpoint[] storage checkpoints, uint256 blockNumber) internal returns (uint256 balance) {\n uint256 currentBlockNumber;\n (currentBlockNumber, balance) = getCheckpoint(checkpoints, blockNumber);\n }\n\n function transferInternal(address from, address to, uint256 value) internal {\n uint256 fromBalance = balanceOf(from);\n uint256 toBalance = balanceOf(to);\n\n if (address(transferVerifier) != address(0)) {\n value = transferVerifier.verify(from, to, value);\n require(value > 0);\n }\n\n setCheckpoint(tokenBalances[from], fromBalance.sub(value));\n setCheckpoint(tokenBalances[to], toBalance.add(value));\n }\n\n\n /** CORE\n ** The Magic happens below:\n ***************************************/\n\n function setCheckpoint(Checkpoint[] storage checkpoints, uint256 newValue) internal {\n if ((checkpoints.length == 0) || (checkpoints[checkpoints.length.sub(1)].blockNumber < block.number)) {\n checkpoints.push(Checkpoint(block.number, newValue));\n } else {\n checkpoints[checkpoints.length.sub(1)] = Checkpoint(block.number, newValue);\n }\n }\n\n function getCheckpoint(Checkpoint[] storage checkpoints, uint256 blockNumber) internal returns (uint256 blockNumber_, uint256 value) {\n if (checkpoints.length == 0) {\n return (0, 0);\n }\n\n // Shortcut for the actual value\n if (blockNumber >= checkpoints[checkpoints.length.sub(1)].blockNumber) {\n return (checkpoints[checkpoints.length.sub(1)].blockNumber, checkpoints[checkpoints.length.sub(1)].value);\n }\n\n if (blockNumber < checkpoints[0].blockNumber) {\n return (0, 0);\n }\n\n // Binary search of the value in the array\n uint256 min = 0;\n uint256 max = checkpoints.length.sub(1);\n while (max > min) {\n uint256 mid = (max.add(min.add(1))).div(2);\n if (checkpoints[mid].blockNumber <= blockNumber) {\n min = mid;\n } else {\n max = mid.sub(1);\n }\n }\n\n return (checkpoints[min].blockNumber, checkpoints[min].value);\n }\n}\n\n\n\n\n/* Largely copied from https://github.com/OpenZeppelin/openzeppelin-solidity/pull/741/files */\n\ncontract ERC865 is CheckpointToken {\n /** @dev This is used to prevent nonce reuse: */\n mapping(bytes => bool) signatures;\n\n event TransferPreSigned(address indexed from, address indexed to, address indexed delegate, uint256 amount, uint256 fee);\n event Debug(address from, bytes32 hash);\n\n /**\n * @notice Submit a presigned transfer\n * @param _signature bytes The signature, issued by the owner.\n * @param _to address The address which you want to transfer to.\n * @param _value uint256 The amount of tokens to be transferred.\n * @param _fee uint256 The amount of tokens paid to msg.sender, by the person who used to own the tokens.\n * @param _nonce uint256 Presigned transaction number\n */\n function transferPreSigned(\n bytes _signature,\n address _to,\n uint256 _value,\n uint256 _fee,\n uint256 _nonce\n )\n public\n returns (bool)\n {\n require(_to != address(0));\n require(signatures[_signature] == false);\n bytes32 hashedTx = transferPreSignedHashing(address(this), _to, _value, _fee, _nonce);\n address from = recover(hashedTx, _signature);\n require(from != address(0));\n\n transferInternal(from, _to, _value);\n transferInternal(from, msg.sender, _fee);\n\n signatures[_signature] = true;\n TransferPreSigned(from, _to, msg.sender, _value, _fee);\n Transfer(from, _to, _value);\n Transfer(from, msg.sender, _fee);\n return true;\n }\n\n /**\n * @notice Hash (keccak256) of the payload used by transferPreSigned\n * @param _token address The address of the token.\n * @param _to address The address which you want to transfer to.\n * @param _value uint256 The amount of tokens to be transferred.\n * @param _fee uint256 The amount of tokens paid to msg.sender, by the owner.\n * @param _nonce uint256 Presigned transaction number.\n */\n function transferPreSignedHashing(\n address _token,\n address _to,\n uint256 _value,\n uint256 _fee,\n uint256 _nonce\n )\n public\n pure\n returns (bytes32)\n {\n /* \"48664c16\": transferPreSignedHashing(address,address,address,uint256,uint256,uint256) */\n return keccak256(bytes4(0x48664c16), _token, _to, _value, _fee, _nonce);\n }\n\n /**\n * @notice Recover signer address from a message by using his signature.\n * Signature is delivered as a byte array, hence need for this\n * implementation.\n * @param hash bytes32 message, the hash is the signed message. What is recovered is the signer address.\n * @param sig bytes signature, the signature is generated using web3.eth.sign()\n */\n function recover(bytes32 hash, bytes sig) public pure returns (address) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n\n /* Check the signature length */\n if (sig.length != 65) {\n return (address(0));\n }\n\n /* Divide the signature in r, s and v variables */\n assembly {\n r := mload(add(sig, 32))\n s := mload(add(sig, 64))\n v := byte(0, mload(add(sig, 96)))\n }\n\n /* Version of signature should be 27 or 28, but 0 and 1 are also possible versions */\n if (v < 27) {\n v += 27;\n }\n\n /* If the version is correct return the signer address */\n if (v != 27 && v != 28) {\n return (address(0));\n } else {\n return ecrecover(hash, v, r, s);\n }\n }\n\n}\n\n\n\n\n\n\n\n\n/**\n * @title Basic token\n * @dev Basic version of StandardToken, with no allowances.\n */\ncontract BasicToken is ERC20Basic {\n using SafeMath for uint256;\n\n mapping(address => uint256) balances;\n\n uint256 totalSupply_;\n\n /**\n * @dev total number of tokens in existence\n */\n function totalSupply() public view returns (uint256) {\n return totalSupply_;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param _to The address to transfer to.\n * @param _value The amount to be transferred.\n */\n function transfer(address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[msg.sender]);\n\n // SafeMath.sub will throw if there is not enough balance.\n balances[msg.sender] = balances[msg.sender].sub(_value);\n balances[_to] = balances[_to].add(_value);\n Transfer(msg.sender, _to, _value);\n return true;\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param _owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address _owner) public view returns (uint256 balance) {\n return balances[_owner];\n }\n\n}\n\n\n\n\n/**\n * @title Standard ERC20 token\n *\n * @dev Implementation of the basic standard token.\n * @dev https://github.com/ethereum/EIPs/issues/20\n * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol\n */\ncontract StandardToken is ERC20, BasicToken {\n\n mapping (address => mapping (address => uint256)) internal allowed;\n\n\n /**\n * @dev Transfer tokens from one address to another\n * @param _from address The address which you want to send tokens from\n * @param _to address The address which you want to transfer to\n * @param _value uint256 the amount of tokens to be transferred\n */\n function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[_from]);\n require(_value <= allowed[_from][msg.sender]);\n\n balances[_from] = balances[_from].sub(_value);\n balances[_to] = balances[_to].add(_value);\n allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);\n Transfer(_from, _to, _value);\n return true;\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n *\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param _spender The address which will spend the funds.\n * @param _value The amount of tokens to be spent.\n */\n function approve(address _spender, uint256 _value) public returns (bool) {\n allowed[msg.sender][_spender] = _value;\n Approval(msg.sender, _spender, _value);\n return true;\n }\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param _owner address The address which owns the funds.\n * @param _spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address _owner, address _spender) public view returns (uint256) {\n return allowed[_owner][_spender];\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(address _spender, uint _addedValue) public returns (bool) {\n allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {\n uint oldValue = allowed[msg.sender][_spender];\n if (_subtractedValue > oldValue) {\n allowed[msg.sender][_spender] = 0;\n } else {\n allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);\n }\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n}\n\n\ncontract InvestorInteractionContract is BogusAnnouncement, CheckpointToken, ERC865 {\n uint256 public blockNumber;\n CheckpointToken public token;\n mapping(address => bool) public balanceImported;\n\n KYCInterface public KYC;\n\n mapping(address => bytes32) public options;\n mapping(address => mapping(address => uint256)) public used;\n uint256 public optionsTotal;\n uint256 public maximumSupply;\n\n event OptionAdded(address option, bytes32 description);\n event IICCreated(address token, address KYC, uint256 blockNumber, uint256 maximumSupply);\n\n function InvestorInteractionContract(CheckpointToken _token, KYCInterface _KYC, bytes32 name, bytes32 URI, uint256 _type, uint256 _hash, uint256 _blockNumber, bytes32[] _options) CheckpointToken(\"\", \"\", 18) BogusAnnouncement(name, URI, _type, _hash) public {\n token = _token;\n if (_blockNumber > 0) {\n blockNumber = _blockNumber;\n } else {\n blockNumber = block.number;\n }\n KYC = _KYC;\n\n for(uint i=0; i<_options.length; i++) {\n address optionAddress = address(100 + i);\n options[optionAddress] = _options[i];\n\n OptionAdded(optionAddress, _options[i]);\n }\n\n maximumSupply = token.totalSupplyAt(blockNumber);\n\n IICCreated(_token, _KYC, _blockNumber, maximumSupply);\n }\n\n function importInvestor(address investor) public {\n // Anyone can invoke this for failsafe reasons\n\n require(balanceImported[investor] == false);\n\n uint256 value = token.balanceAt(investor, blockNumber);\n uint256 blackHoleBalance = balanceOf(address(0));\n uint256 totalSupplyNow = totalSupply();\n\n setCheckpoint(tokenBalances[address(0)], blackHoleBalance.add(value));\n transferInternal(address(0), investor, value);\n setCheckpoint(tokensTotal, totalSupplyNow.add(value));\n\n balanceImported[investor] = true;\n Transfer(address(0), investor, value);\n }\n\n function transferTrigger(address from, address to, uint256 amount) internal {\n used[to][from] += amount;\n }\n\n function transfer(address _to, uint256 _value) public returns (bool) {\n if (balanceImported[msg.sender] == false) {\n importInvestor(msg.sender);\n }\n\n if (options[_to] != 0) {\n require(KYC.isWhitelisted(msg.sender));\n transferTrigger(msg.sender, _to, _value);\n }\n\n // Doing this as msg.sender:\n return super.transfer(_to, _value);\n }\n\n function transferInvestorTokens(address to, uint256 amount) {\n transfer(to, amount);\n }\n\n function act(uint256 amount) external {\n // This is for the default action, address 100\n transferInvestorTokens(address(100), amount);\n }\n}\n\n\n\ncontract PayoutContract is InvestorInteractionContract {\n ERC20 payoutToken;\n address from;\n uint256 initialBalance;\n uint256 oneUnit;\n\n function PayoutContract(CheckpointToken _token, ERC20 _payoutToken, KYCInterface _KYC, bytes32 name, bytes32 URI, uint256 _type, uint256 _hash, bytes32[] _options) InvestorInteractionContract(_token, _KYC, name, URI, _type, _hash, 0, _options) {\n payoutToken = _payoutToken;\n from = msg.sender;\n }\n\n function fetchTokens() external {\n require(initialBalance == 0);\n\n uint256 allowed = payoutToken.allowance(from, address(this));\n payoutToken.transferFrom(from, address(this), allowed);\n\n initialBalance = payoutToken.balanceOf(address(this));\n oneUnit = initialBalance / maximumSupply;\n }\n\n function transferTrigger(address from, address to, uint256 amount) internal {\n payoutToken.transfer(from, amount * oneUnit);\n super.transferTrigger(from, to, amount);\n }\n\n}\n"}, "PreICOProxyBuyer": {"abi": [{"constant": true, "inputs": [], "name": "weiMinimumLimit", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "getState", "outputs": [{"name": "", "type": "uint8"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "getToken", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "balances", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "amount", "type": "uint256"}], "name": "claim", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "investor", "type": "address"}], "name": "getClaimLeft", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "uint256"}], "name": "investors", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "weiRaised", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_crowdsale", "type": "address"}], "name": "setCrowdsale", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "refund", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_timeLock", "type": "uint256"}], "name": "setTimeLock", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "halt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "freezeEndsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "tokensBought", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "weiCap", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "loadRefund", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "claimCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isPresale", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}], "name": "buyWithCustomerId", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "crowdsale", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "buy", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "weiMaximumLimit", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "halted", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "forceRefund", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "claimed", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "unhalt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "timeLock", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "claimAll", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "buyForEverybody", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalClaimed", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "investorCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "forcedRefund", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "investor", "type": "address"}], "name": "getClaimAmount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [{"name": "_owner", "type": "address"}, {"name": "_freezeEndsAt", "type": "uint256"}, {"name": "_weiMinimumLimit", "type": "uint256"}, {"name": "_weiMaximumLimit", "type": "uint256"}, {"name": "_weiCap", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"payable": true, "stateMutability": "payable", "type": "fallback"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}, {"indexed": false, "name": "tokenAmount", "type": "uint256"}, {"indexed": false, "name": "customerId", "type": "uint128"}], "name": "Invested", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Refunded", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "count", "type": "uint256"}], "name": "TokensBoughts", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "count", "type": "uint256"}], "name": "Distributed", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "bytecode": "0x608060405234801561001057600080fd5b5060405160a080611204833981016040908152815160208301519183015160608401516080909401516000805433600160a060020a03199182161716600160a060020a0385161790559193909183151561006957600080fd5b82151561007557600080fd5b81151561008157600080fd5b60079290925560085560095560065550611164806100a06000396000f3006080604052600436106101b65763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416631540fe2281146101bb5780631865c57d146101e257806321df0da71461021b57806327e235e31461024c578063379607f51461026d5780633c67b6b7146102875780633feb5f2b146102a85780634042b66f146102c0578063483a20b2146102d5578063590e1ae3146102f65780635bcb318a1461030b5780635ed7ca5b146103235780636962b01014610338578063732783ac1461034d57806384fe50291461036257806387612102146103775780638da4d3c91461037f5780638da5cb5b1461039457806395364a84146103a957806399e9376c146103d25780639c1e03a0146103ef578063a6f2ae3a14610404578063aa5581ef1461040c578063b9b8af0b14610421578063bd7427f814610436578063c884ef831461044b578063cb3e64fd1461046c578063d085835a14610481578063d1058e5914610496578063d4607048146104ab578063d54ad2a1146104c0578063d7e64c00146104d5578063dba2d875146104ea578063dde070e8146104ff578063f2fde38b14610520575b600080fd5b3480156101c757600080fd5b506101d0610541565b60408051918252519081900360200190f35b3480156101ee57600080fd5b506101f7610547565b6040518082600381111561020757fe5b60ff16815260200191505060405180910390f35b34801561022757600080fd5b50610230610586565b60408051600160a060020a039092168252519081900360200190f35b34801561025857600080fd5b506101d0600160a060020a0360043516610642565b34801561027957600080fd5b50610285600435610654565b005b34801561029357600080fd5b506101d0600160a060020a0360043516610826565b3480156102b457600080fd5b5061023060043561085e565b3480156102cc57600080fd5b506101d0610886565b3480156102e157600080fd5b50610285600160a060020a036004351661088c565b34801561030257600080fd5b50610285610966565b34801561031757600080fd5b50610285600435610a54565b34801561032f57600080fd5b50610285610a70565b34801561034457600080fd5b506101d0610abe565b34801561035957600080fd5b506101d0610ac4565b34801561036e57600080fd5b506101d0610aca565b610285610ad0565b34801561038b57600080fd5b506101d0610af1565b3480156103a057600080fd5b50610230610af7565b3480156103b557600080fd5b506103be610b06565b604080519115158252519081900360200190f35b6102856fffffffffffffffffffffffffffffffff60043516610b0b565b3480156103fb57600080fd5b50610230610b3c565b610285610b50565b34801561041857600080fd5b506101d0610b82565b34801561042d57600080fd5b506103be610b88565b34801561044257600080fd5b50610285610ba9565b34801561045757600080fd5b506101d0600160a060020a0360043516610bcf565b34801561047857600080fd5b50610285610be1565b34801561048d57600080fd5b506101d0610c41565b3480156104a257600080fd5b50610285610c47565b3480156104b757600080fd5b50610285610c58565b3480156104cc57600080fd5b506101d0610e46565b3480156104e157600080fd5b506101d0610e4c565b3480156104f657600080fd5b506103be610e52565b34801561050b57600080fd5b506101d0600160a060020a0360043516610e5b565b34801561052c57600080fd5b50610285600160a060020a0360043516610eba565b60075481565b600e5460009060ff161561055d57506003610583565b600a54151561057f57600654421061057757506003610583565b506001610583565b5060025b90565b600e546000906101009004600160a060020a031615156105a557600080fd5b600e60019054906101000a9004600160a060020a0316600160a060020a031663fc0c546a6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561061157600080fd5b505af1158015610625573d6000803e3d6000fd5b505050506040513d602081101561063b57600080fd5b5051905090565b60046020526000908152604090205481565b6000805474010000000000000000000000000000000000000000900460ff161561067d57600080fd5b600d54421161068b57600080fd5b503381151561069957600080fd5b816106a382610826565b10156106ae57600080fd5b600160a060020a03811660009081526005602052604090205415156106d757600b805460010190555b600160a060020a038116600090815260056020526040902054610700908363ffffffff610f4e16565b600160a060020a038216600090815260056020526040902055600c5461072c908363ffffffff610f4e16565b600c55610737610586565b600160a060020a031663a9059cbb82846040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b1580156107b257600080fd5b505af11580156107c6573d6000803e3d6000fd5b505050506040513d60208110156107dc57600080fd5b505060408051600160a060020a03831681526020810184905281517fb649c98f58055c520df0dcb5709eff2e931217ff2fb1e21376130d31bbb1c0af929181900390910190a15050565b600160a060020a0381166000908152600560205260408120546108589061084c84610e5b565b9063ffffffff610f6816565b92915050565b600380548290811061086c57fe5b600091825260209091200154600160a060020a0316905081565b60025481565b600054600160a060020a031633146108a357600080fd5b80600e60016101000a815481600160a060020a030219169083600160a060020a03160217905550600e60019054906101000a9004600160a060020a0316600160a060020a0316634551dd596040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561093657600080fd5b505af115801561094a573d6000803e3d6000fd5b505050506040513d602081101561096057600080fd5b50505b50565b60008054819074010000000000000000000000000000000000000000900460ff161561099157600080fd5b600361099b610547565b60038111156109a657fe5b146109b057600080fd5b3360008181526004602052604090205490925015156109ce57600080fd5b50600160a060020a038116600081815260046020526040808220805490839055905190929183919081818185875af1925050501515610a0c57600080fd5b60408051600160a060020a03841681526020810183905281517fd7dee2702d63ad89917b6a4da9981c90c4d24f8c2bdfd64c604ecae57d8d0651929181900390910190a15050565b600054600160a060020a03163314610a6b57600080fd5b600d55565b600054600160a060020a03163314610a8757600080fd5b6000805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b60065481565b600a5481565b60095481565b6003610ada610547565b6003811115610ae557fe5b14610aef57600080fd5b565b600b5481565b600054600160a060020a031681565b600190565b60005474010000000000000000000000000000000000000000900460ff1615610b3357600080fd5b61096381610f7a565b600e546101009004600160a060020a031681565b60005474010000000000000000000000000000000000000000900460ff1615610b7857600080fd5b610aef6000610f7a565b60085481565b60005474010000000000000000000000000000000000000000900460ff1681565b600054600160a060020a03163314610bc057600080fd5b600e805460ff19166001179055565b60056020526000908152604090205481565b600054600160a060020a03163314610bf857600080fd5b60005474010000000000000000000000000000000000000000900460ff161515610c2157600080fd5b6000805474ff000000000000000000000000000000000000000019169055565b600d5481565b610aef610c5333610826565b610654565b60005474010000000000000000000000000000000000000000900460ff168015610c8d5750600054600160a060020a03163314155b15610c9757600080fd5b6001610ca1610547565b6003811115610cac57fe5b14610cb657600080fd5b600e546101009004600160a060020a03161515610cd257600080fd5b600e54600254604080517f03f9c7930000000000000000000000000000000000000000000000000000000081523060048201529051610100909304600160a060020a0316926303f9c793929160248082019260009290919082900301818588803b158015610d3f57600080fd5b505af1158015610d53573d6000803e3d6000fd5b5050505050610d60610586565b600160a060020a03166370a08231306040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018082600160a060020a0316600160a060020a03168152602001915050602060405180830381600087803b158015610dd357600080fd5b505af1158015610de7573d6000803e3d6000fd5b505050506040513d6020811015610dfd57600080fd5b5051600a8190551515610e0f57600080fd5b600a5460408051918252517f6e1e34c7e3c3bcd68cb35ee1352c9d7320d7d1ab8ff8402c789a235f368a993e9181900360200190a1565b600c5481565b60015481565b600e5460ff1681565b60006002610e67610547565b6003811115610e7257fe5b14610e7c57600080fd5b600254600a54600160a060020a038416600090815260046020526040902054610eaa9163ffffffff61110d16565b811515610eb357fe5b0492915050565b600054600160a060020a03163314610ed157600080fd5b600160a060020a0381161515610ee657600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600082820183811015610f5d57fe5b8091505b5092915050565b600082821115610f7457fe5b50900390565b6000806001610f87610547565b6003811115610f9257fe5b14610f9c57600080fd5b341515610fa857600080fd5b50503360008181526004602052604081205490811190610fce903463ffffffff610f4e16565b600160a060020a038316600090815260046020526040902081905560075411806110115750600854600160a060020a038316600090815260046020526040902054115b1561101b57600080fd5b8015156110825760038054600180820183556000929092527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0385161790558054810190555b600254611095903463ffffffff610f4e16565b600281905560095410156110a857600080fd5b60408051600160a060020a03841681523460208201526000818301526fffffffffffffffffffffffffffffffff8516606082015290517f0396f60aaad038749091d273dc13aaabc63db6e2271c7bad442d5cf25cc433509181900360800190a1505050565b6000808315156111205760009150610f61565b5082820282848281151561113057fe5b0414610f5d57fe00a165627a7a723058200501a220feb2ade8970d1f8882ce10d49d7476e710086b8554a9d6504a3fc4c50029", "bytecode_runtime": "0x6080604052600436106101b65763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416631540fe2281146101bb5780631865c57d146101e257806321df0da71461021b57806327e235e31461024c578063379607f51461026d5780633c67b6b7146102875780633feb5f2b146102a85780634042b66f146102c0578063483a20b2146102d5578063590e1ae3146102f65780635bcb318a1461030b5780635ed7ca5b146103235780636962b01014610338578063732783ac1461034d57806384fe50291461036257806387612102146103775780638da4d3c91461037f5780638da5cb5b1461039457806395364a84146103a957806399e9376c146103d25780639c1e03a0146103ef578063a6f2ae3a14610404578063aa5581ef1461040c578063b9b8af0b14610421578063bd7427f814610436578063c884ef831461044b578063cb3e64fd1461046c578063d085835a14610481578063d1058e5914610496578063d4607048146104ab578063d54ad2a1146104c0578063d7e64c00146104d5578063dba2d875146104ea578063dde070e8146104ff578063f2fde38b14610520575b600080fd5b3480156101c757600080fd5b506101d0610541565b60408051918252519081900360200190f35b3480156101ee57600080fd5b506101f7610547565b6040518082600381111561020757fe5b60ff16815260200191505060405180910390f35b34801561022757600080fd5b50610230610586565b60408051600160a060020a039092168252519081900360200190f35b34801561025857600080fd5b506101d0600160a060020a0360043516610642565b34801561027957600080fd5b50610285600435610654565b005b34801561029357600080fd5b506101d0600160a060020a0360043516610826565b3480156102b457600080fd5b5061023060043561085e565b3480156102cc57600080fd5b506101d0610886565b3480156102e157600080fd5b50610285600160a060020a036004351661088c565b34801561030257600080fd5b50610285610966565b34801561031757600080fd5b50610285600435610a54565b34801561032f57600080fd5b50610285610a70565b34801561034457600080fd5b506101d0610abe565b34801561035957600080fd5b506101d0610ac4565b34801561036e57600080fd5b506101d0610aca565b610285610ad0565b34801561038b57600080fd5b506101d0610af1565b3480156103a057600080fd5b50610230610af7565b3480156103b557600080fd5b506103be610b06565b604080519115158252519081900360200190f35b6102856fffffffffffffffffffffffffffffffff60043516610b0b565b3480156103fb57600080fd5b50610230610b3c565b610285610b50565b34801561041857600080fd5b506101d0610b82565b34801561042d57600080fd5b506103be610b88565b34801561044257600080fd5b50610285610ba9565b34801561045757600080fd5b506101d0600160a060020a0360043516610bcf565b34801561047857600080fd5b50610285610be1565b34801561048d57600080fd5b506101d0610c41565b3480156104a257600080fd5b50610285610c47565b3480156104b757600080fd5b50610285610c58565b3480156104cc57600080fd5b506101d0610e46565b3480156104e157600080fd5b506101d0610e4c565b3480156104f657600080fd5b506103be610e52565b34801561050b57600080fd5b506101d0600160a060020a0360043516610e5b565b34801561052c57600080fd5b50610285600160a060020a0360043516610eba565b60075481565b600e5460009060ff161561055d57506003610583565b600a54151561057f57600654421061057757506003610583565b506001610583565b5060025b90565b600e546000906101009004600160a060020a031615156105a557600080fd5b600e60019054906101000a9004600160a060020a0316600160a060020a031663fc0c546a6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561061157600080fd5b505af1158015610625573d6000803e3d6000fd5b505050506040513d602081101561063b57600080fd5b5051905090565b60046020526000908152604090205481565b6000805474010000000000000000000000000000000000000000900460ff161561067d57600080fd5b600d54421161068b57600080fd5b503381151561069957600080fd5b816106a382610826565b10156106ae57600080fd5b600160a060020a03811660009081526005602052604090205415156106d757600b805460010190555b600160a060020a038116600090815260056020526040902054610700908363ffffffff610f4e16565b600160a060020a038216600090815260056020526040902055600c5461072c908363ffffffff610f4e16565b600c55610737610586565b600160a060020a031663a9059cbb82846040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b1580156107b257600080fd5b505af11580156107c6573d6000803e3d6000fd5b505050506040513d60208110156107dc57600080fd5b505060408051600160a060020a03831681526020810184905281517fb649c98f58055c520df0dcb5709eff2e931217ff2fb1e21376130d31bbb1c0af929181900390910190a15050565b600160a060020a0381166000908152600560205260408120546108589061084c84610e5b565b9063ffffffff610f6816565b92915050565b600380548290811061086c57fe5b600091825260209091200154600160a060020a0316905081565b60025481565b600054600160a060020a031633146108a357600080fd5b80600e60016101000a815481600160a060020a030219169083600160a060020a03160217905550600e60019054906101000a9004600160a060020a0316600160a060020a0316634551dd596040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561093657600080fd5b505af115801561094a573d6000803e3d6000fd5b505050506040513d602081101561096057600080fd5b50505b50565b60008054819074010000000000000000000000000000000000000000900460ff161561099157600080fd5b600361099b610547565b60038111156109a657fe5b146109b057600080fd5b3360008181526004602052604090205490925015156109ce57600080fd5b50600160a060020a038116600081815260046020526040808220805490839055905190929183919081818185875af1925050501515610a0c57600080fd5b60408051600160a060020a03841681526020810183905281517fd7dee2702d63ad89917b6a4da9981c90c4d24f8c2bdfd64c604ecae57d8d0651929181900390910190a15050565b600054600160a060020a03163314610a6b57600080fd5b600d55565b600054600160a060020a03163314610a8757600080fd5b6000805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b60065481565b600a5481565b60095481565b6003610ada610547565b6003811115610ae557fe5b14610aef57600080fd5b565b600b5481565b600054600160a060020a031681565b600190565b60005474010000000000000000000000000000000000000000900460ff1615610b3357600080fd5b61096381610f7a565b600e546101009004600160a060020a031681565b60005474010000000000000000000000000000000000000000900460ff1615610b7857600080fd5b610aef6000610f7a565b60085481565b60005474010000000000000000000000000000000000000000900460ff1681565b600054600160a060020a03163314610bc057600080fd5b600e805460ff19166001179055565b60056020526000908152604090205481565b600054600160a060020a03163314610bf857600080fd5b60005474010000000000000000000000000000000000000000900460ff161515610c2157600080fd5b6000805474ff000000000000000000000000000000000000000019169055565b600d5481565b610aef610c5333610826565b610654565b60005474010000000000000000000000000000000000000000900460ff168015610c8d5750600054600160a060020a03163314155b15610c9757600080fd5b6001610ca1610547565b6003811115610cac57fe5b14610cb657600080fd5b600e546101009004600160a060020a03161515610cd257600080fd5b600e54600254604080517f03f9c7930000000000000000000000000000000000000000000000000000000081523060048201529051610100909304600160a060020a0316926303f9c793929160248082019260009290919082900301818588803b158015610d3f57600080fd5b505af1158015610d53573d6000803e3d6000fd5b5050505050610d60610586565b600160a060020a03166370a08231306040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018082600160a060020a0316600160a060020a03168152602001915050602060405180830381600087803b158015610dd357600080fd5b505af1158015610de7573d6000803e3d6000fd5b505050506040513d6020811015610dfd57600080fd5b5051600a8190551515610e0f57600080fd5b600a5460408051918252517f6e1e34c7e3c3bcd68cb35ee1352c9d7320d7d1ab8ff8402c789a235f368a993e9181900360200190a1565b600c5481565b60015481565b600e5460ff1681565b60006002610e67610547565b6003811115610e7257fe5b14610e7c57600080fd5b600254600a54600160a060020a038416600090815260046020526040902054610eaa9163ffffffff61110d16565b811515610eb357fe5b0492915050565b600054600160a060020a03163314610ed157600080fd5b600160a060020a0381161515610ee657600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600082820183811015610f5d57fe5b8091505b5092915050565b600082821115610f7457fe5b50900390565b6000806001610f87610547565b6003811115610f9257fe5b14610f9c57600080fd5b341515610fa857600080fd5b50503360008181526004602052604081205490811190610fce903463ffffffff610f4e16565b600160a060020a038316600090815260046020526040902081905560075411806110115750600854600160a060020a038316600090815260046020526040902054115b1561101b57600080fd5b8015156110825760038054600180820183556000929092527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0385161790558054810190555b600254611095903463ffffffff610f4e16565b600281905560095410156110a857600080fd5b60408051600160a060020a03841681523460208201526000818301526fffffffffffffffffffffffffffffffff8516606082015290517f0396f60aaad038749091d273dc13aaabc63db6e2271c7bad442d5cf25cc433509181900360800190a1505050565b6000808315156111205760009150610f61565b5082820282848281151561113057fe5b0414610f5d57fe00a165627a7a723058200501a220feb2ade8970d1f8882ce10d49d7476e710086b8554a9d6504a3fc4c50029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": true, "inputs": [], "name": "weiMinimumLimit", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "getState", "outputs": [{"name": "", "type": "uint8"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "getToken", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "balances", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "amount", "type": "uint256"}], "name": "claim", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "investor", "type": "address"}], "name": "getClaimLeft", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "uint256"}], "name": "investors", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "weiRaised", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_crowdsale", "type": "address"}], "name": "setCrowdsale", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "refund", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_timeLock", "type": "uint256"}], "name": "setTimeLock", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "halt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "freezeEndsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "tokensBought", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "weiCap", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "loadRefund", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "claimCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isPresale", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}], "name": "buyWithCustomerId", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "crowdsale", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "buy", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "weiMaximumLimit", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "halted", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "forceRefund", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "claimed", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "unhalt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "timeLock", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "claimAll", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "buyForEverybody", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalClaimed", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "investorCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "forcedRefund", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "investor", "type": "address"}], "name": "getClaimAmount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [{"name": "_owner", "type": "address"}, {"name": "_freezeEndsAt", "type": "uint256"}, {"name": "_weiMinimumLimit", "type": "uint256"}, {"name": "_weiMaximumLimit", "type": "uint256"}, {"name": "_weiCap", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"payable": true, "stateMutability": "payable", "type": "fallback"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}, {"indexed": false, "name": "tokenAmount", "type": "uint256"}, {"indexed": false, "name": "customerId", "type": "uint128"}], "name": "Invested", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Refunded", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "count", "type": "uint256"}], "name": "TokensBoughts", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "count", "type": "uint256"}], "name": "Distributed", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "devdoc": {"methods": {"forceRefund()": {"details": "This is used in the first case scenario, this will force the state to refunding. This can be also used when the ICO fails to meet the cap."}, "loadRefund()": {"details": "This should be used if the Crowdsale fails, to receive the refuld money. we can't use Crowdsale's refund, since our default function does not accept money in."}, "setTimeLock(uint256)": {"details": "Setting timelock (delay) for claiming", "params": {"_timeLock": "Time after which claiming is possible"}}, "transferOwnership(address)": {"details": "Allows the current owner to transfer control of the contract to a newOwner.", "params": {"newOwner": "The address to transfer ownership to."}}}}, "userdoc": {"methods": {"buyForEverybody()": {"notice": "Load funds to the crowdsale for all investors. *"}, "claim(uint256)": {"notice": "Claim N bought tokens to the investor as the msg sender. "}, "claimAll()": {"notice": "Claim all remaining tokens for this investor."}, "getClaimAmount(address)": {"notice": "How may tokens each investor gets."}, "getClaimLeft(address)": {"notice": "How many tokens remain unclaimed for an investor."}, "getState()": {"notice": "Resolve the contract umambigious state."}, "getToken()": {"notice": "Get the token we are distributing."}, "isPresale()": {"notice": "Interface marker. "}, "refund()": {"notice": "ICO never happened. Allow refund."}, "setCrowdsale(address)": {"notice": "Set the target crowdsale where we will move presale funds when the crowdsale opens."}}}}, "settings": {"compilationTarget": {"contracts/PreICOProxyBuyer.sol": "PreICOProxyBuyer"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/Crowdsale.sol": {"keccak256": "0x2697c26528f64bb954a7c2547d3b43317d2d2b02c7d9d05a7b1ab388cd79f65d", "urls": ["bzzr://f28b280794222114141c51dd5c388d403a7c98d8b51e04170a0e294246d5164b"]}, "contracts/CrowdsaleBase.sol": {"keccak256": "0xe2c9ed11183ce705616980df7b02544d72fe18b40395da7d9d4bcb621fb87871", "urls": ["bzzr://07f3887ba0d0eb3248b1ad3581480ed71a2fe70a47dcc283c4e97c8c92e0790a"]}, "contracts/FinalizeAgent.sol": {"keccak256": "0x309fd0510e0b3e2b5044e33f7c80cfb2d6f2a5697e41a5f185931d65770cfea9", "urls": ["bzzr://4e7ed6f82c0f542e92e56c12566b2ecd7666730865bf12566c27587ec64160ac"]}, "contracts/FractionalERC20.sol": {"keccak256": "0x75bc4ad90a8b13ce961c89b1bf405776f616e019d3a2720168f8e52be223198f", "urls": ["bzzr://6a3688f12da1a5c890ef06f80f883f6c5370886092d38a1b33cd4219b718478b"]}, "contracts/Haltable.sol": {"keccak256": "0x265dcf25e7c9ab4b6eecd2181f1b71334a1b5381a60f8db7d9526dab120f4b70", "urls": ["bzzr://d522e00fa9e075941469dd81738b59fdb99ce3c12cdc39e33abe40b588c4da9b"]}, "contracts/PreICOProxyBuyer.sol": {"keccak256": "0x71ff0ea56115ab9b898a2cd599017e4fa0c02df2e862883ec967c4e821a5dec6", "urls": ["bzzr://7b244f1e8f508017f3d7d2682c7ae3d6920a8b9efb6d3c04baa3262a5fe40608"]}, "contracts/PricingStrategy.sol": {"keccak256": "0x8df5093b7d07168ad994f9176de0bd2268f6563b1e8a3a448d8cfe7fe246c628", "urls": ["bzzr://ef5c944d51f739ab34e2c951d6ac82a7152e6bb844058a8e57bae52c14cbe16b"]}, "contracts/SafeMathLib.sol": {"keccak256": "0x501bfe31e274b9a5591f7c540bdced4d4312e27d4f19599147c9bbca3d9c6b18", "urls": ["bzzr://a80935ebddb06c247d71372d4e5833ee029f08633bd0fe4a274a57009567e5b9"]}, "zeppelin/contracts/math/SafeMath.sol": {"keccak256": "0x341ba8cb467a3623e819ba1a683ac1d264005186f308505214e5f6bc89446a08", "urls": ["bzzr://59b5652ee4e4a1b5a8f1a8906e14c84af43d636cf5ca0725cc1813aabe4c8c17"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}}, "version": 1}, "name": "PreICOProxyBuyer", "ordered_full_dependencies": [], "source_path": "contracts/PreICOProxyBuyer.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n assert(c / a == b);\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Safe unsigned safe math.\n *\n * https://blog.aragon.one/library-driven-development-in-solidity-2bebcaf88736#.750gwtwli\n *\n * Originally from https://raw.githubusercontent.com/AragonOne/zeppelin-solidity/master/contracts/SafeMathLib.sol\n *\n * Maintained here until merged to mainline zeppelin-solidity.\n *\n */\nlibrary SafeMathLib {\n\n function times(uint a, uint b) returns (uint) {\n uint c = a * b;\n assert(a == 0 || c / a == b);\n return c;\n }\n\n function minus(uint a, uint b) returns (uint) {\n assert(b <= a);\n return a - b;\n }\n\n function plus(uint a, uint b) returns (uint) {\n uint c = a + b;\n assert(c>=a);\n return c;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Interface for defining crowdsale pricing.\n */\ncontract PricingStrategy {\n\n /** Interface declaration. */\n function isPricingStrategy() public constant returns (bool) {\n return true;\n }\n\n /** Self check if all references are correctly set.\n *\n * Checks that pricing strategy matches crowdsale parameters.\n */\n function isSane(address crowdsale) public constant returns (bool) {\n return true;\n }\n\n /**\n * @dev Pricing tells if this is a presale purchase or not.\n @param purchaser Address of the purchaser\n @return False by default, true if a presale purchaser\n */\n function isPresalePurchase(address purchaser) public constant returns (bool) {\n return false;\n }\n\n /**\n * When somebody tries to buy tokens for X eth, calculate how many tokens they get.\n *\n *\n * @param value - What is the value of the transaction send in as wei\n * @param tokensSold - how much tokens have been sold this far\n * @param weiRaised - how much money has been raised this far in the main token sale - this number excludes presale\n * @param msgSender - who is the investor of this transaction\n * @param decimals - how many decimal units the token has\n * @return Amount of tokens the investor receives\n */\n function calculatePrice(uint value, uint weiRaised, uint tokensSold, address msgSender, uint decimals) public constant returns (uint tokenAmount);\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Finalize agent defines what happens at the end of succeseful crowdsale.\n *\n * - Allocate tokens for founders, bounties and community\n * - Make tokens transferable\n * - etc.\n */\ncontract FinalizeAgent {\n\n function isFinalizeAgent() public constant returns(bool) {\n return true;\n }\n\n /** Return true if we can run finalizeCrowdsale() properly.\n *\n * This is a safety check function that doesn't allow crowdsale to begin\n * unless the finalizer has been set up properly.\n */\n function isSane() public constant returns (bool);\n\n /** Called once by crowdsale finalize() if the sale was success. */\n function finalizeCrowdsale();\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n\n/**\n * A token that defines fractional units as decimals.\n */\ncontract FractionalERC20 is ERC20 {\n\n uint public decimals;\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n/*\n * Haltable\n *\n * Abstract contract that allows children to implement an\n * emergency stop mechanism. Differs from Pausable by causing a throw when in halt mode.\n *\n *\n * Originally envisioned in FirstBlood ICO contract.\n */\ncontract Haltable is Ownable {\n bool public halted;\n\n modifier stopInEmergency {\n if (halted) throw;\n _;\n }\n\n modifier stopNonOwnersInEmergency {\n if (halted && msg.sender != owner) throw;\n _;\n }\n\n modifier onlyInEmergency {\n if (!halted) throw;\n _;\n }\n\n // called by the owner on emergency, triggers stopped state\n function halt() external onlyOwner {\n halted = true;\n }\n\n // called by the owner on end of emergency, returns to normal state\n function unhalt() external onlyOwner onlyInEmergency {\n halted = false;\n }\n\n}\n\n\n\n\n\n\n\n/**\n * Crowdsale state machine without buy functionality.\n *\n * Implements basic state machine logic, but leaves out all buy functions,\n * so that subclasses can implement their own buying logic.\n *\n *\n * For the default buy() implementation see Crowdsale.sol.\n */\ncontract CrowdsaleBase is Haltable {\n\n /* Max investment count when we are still allowed to change the multisig address */\n uint public MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE = 5;\n\n using SafeMathLib for uint;\n\n /* The token we are selling */\n FractionalERC20 public token;\n\n /* How we are going to price our offering */\n PricingStrategy public pricingStrategy;\n\n /* Post-success callback */\n FinalizeAgent public finalizeAgent;\n\n /* tokens will be transfered from this address */\n address public multisigWallet;\n\n /* if the funding goal is not reached, investors may withdraw their funds */\n uint public minimumFundingGoal;\n\n /* the UNIX timestamp start date of the crowdsale */\n uint public startsAt;\n\n /* the UNIX timestamp end date of the crowdsale */\n uint public endsAt;\n\n /* the number of tokens already sold through this contract*/\n uint public tokensSold = 0;\n\n /* How many wei of funding we have raised */\n uint public weiRaised = 0;\n\n /* Calculate incoming funds from presale contracts and addresses */\n uint public presaleWeiRaised = 0;\n\n /* How many distinct addresses have invested */\n uint public investorCount = 0;\n\n /* How much wei we have returned back to the contract after a failed crowdfund. */\n uint public loadedRefund = 0;\n\n /* How much wei we have given back to investors.*/\n uint public weiRefunded = 0;\n\n /* Has this crowdsale been finalized */\n bool public finalized;\n\n /** How much ETH each address has invested to this crowdsale */\n mapping (address => uint256) public investedAmountOf;\n\n /** How much tokens this crowdsale has credited for each investor address */\n mapping (address => uint256) public tokenAmountOf;\n\n /** Addresses that are allowed to invest even before ICO offical opens. For testing, for ICO partners, etc. */\n mapping (address => bool) public earlyParticipantWhitelist;\n\n /** This is for manul testing for the interaction from owner wallet. You can set it to any value and inspect this in blockchain explorer to see that crowdsale interaction works. */\n uint public ownerTestValue;\n\n /** State machine\n *\n * - Preparing: All contract initialization calls and variables have not been set yet\n * - Prefunding: We have not passed start time yet\n * - Funding: Active crowdsale\n * - Success: Minimum funding goal reached\n * - Failure: Minimum funding goal not reached before ending time\n * - Finalized: The finalized has been called and succesfully executed\n * - Refunding: Refunds are loaded on the contract for reclaim.\n */\n enum State{Unknown, Preparing, PreFunding, Funding, Success, Failure, Finalized, Refunding}\n\n // A new investment was made\n event Invested(address investor, uint weiAmount, uint tokenAmount, uint128 customerId);\n\n // Refund was processed for a contributor\n event Refund(address investor, uint weiAmount);\n\n // The rules were changed what kind of investments we accept\n event InvestmentPolicyChanged(bool newRequireCustomerId, bool newRequiredSignedAddress, address newSignerAddress);\n\n // Address early participation whitelist status changed\n event Whitelisted(address addr, bool status);\n\n // Crowdsale end time has been changed\n event EndsAtChanged(uint newEndsAt);\n\n function CrowdsaleBase(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal) {\n\n owner = msg.sender;\n\n token = FractionalERC20(_token);\n setPricingStrategy(_pricingStrategy);\n\n multisigWallet = _multisigWallet;\n if(multisigWallet == 0) {\n throw;\n }\n\n if(_start == 0) {\n throw;\n }\n\n startsAt = _start;\n\n if(_end == 0) {\n throw;\n }\n\n endsAt = _end;\n\n // Don't mess the dates\n if(startsAt >= endsAt) {\n throw;\n }\n\n // Minimum funding goal can be zero\n minimumFundingGoal = _minimumFundingGoal;\n }\n\n /**\n * Don't expect to just send in money and get tokens.\n */\n function() payable {\n throw;\n }\n\n /**\n * @dev Make an investment.\n *\n * Crowdsale must be running for one to invest.\n * We must have not pressed the emergency brake.\n *\n * @param receiver The Ethereum address who receives the tokens\n * @param customerId (optional) UUID v4 to track the successful payments on the server side'\n * @param tokenAmount Amount of tokens which be credited to receiver\n *\n * @return tokensBought How mony tokens were bought\n */\n function buyTokens(address receiver, uint128 customerId, uint256 tokenAmount) stopInEmergency internal returns(uint tokensBought) {\n\n // Determine if it's a good time to accept investment from this participant\n if(getState() == State.PreFunding) {\n // Are we whitelisted for early deposit\n if(!earlyParticipantWhitelist[receiver]) {\n throw;\n }\n } else if(getState() == State.Funding) {\n // Retail participants can only come in when the crowdsale is running\n // pass\n } else {\n // Unwanted state\n throw;\n }\n\n uint weiAmount = msg.value;\n\n // Dust transaction\n require(tokenAmount != 0);\n\n if(investedAmountOf[receiver] == 0) {\n // A new investor\n investorCount++;\n }\n\n // Update investor\n investedAmountOf[receiver] = investedAmountOf[receiver].plus(weiAmount);\n tokenAmountOf[receiver] = tokenAmountOf[receiver].plus(tokenAmount);\n\n // Update totals\n weiRaised = weiRaised.plus(weiAmount);\n tokensSold = tokensSold.plus(tokenAmount);\n\n if(pricingStrategy.isPresalePurchase(receiver)) {\n presaleWeiRaised = presaleWeiRaised.plus(weiAmount);\n }\n\n // Check that we did not bust the cap\n require(!isBreakingCap(weiAmount, tokenAmount, weiRaised, tokensSold));\n\n assignTokens(receiver, tokenAmount);\n\n // Pocket the money, or fail the crowdsale if we for some reason cannot send the money to our multisig\n if(!multisigWallet.send(weiAmount)) throw;\n\n // Tell us invest was success\n Invested(receiver, weiAmount, tokenAmount, customerId);\n\n return tokenAmount;\n }\n\n /**\n * @dev Make an investment based on pricing strategy\n *\n * This is a wrapper for buyTokens(), but the amount of tokens receiver will\n * have depends on the pricing strategy used.\n *\n * @param receiver The Ethereum address who receives the tokens\n * @param customerId (optional) UUID v4 to track the successful payments on the server side'\n *\n * @return tokensBought How mony tokens were bought\n */\n function investInternal(address receiver, uint128 customerId) stopInEmergency internal returns(uint tokensBought) {\n return buyTokens(receiver, customerId, pricingStrategy.calculatePrice(msg.value, weiRaised - presaleWeiRaised, tokensSold, msg.sender, token.decimals()));\n }\n\n /**\n * @dev Calculate tokens user will have for their purchase\n *\n * @param weisTotal How much ethers (in wei) the user putssssss in\n * @param pricePerToken What is the price for one token\n *\n * @return tokensTotal which is received tokens, token decimals included\n */\n function calculateTokens(uint256 weisTotal, uint256 pricePerToken) public constant returns(uint tokensTotal) {\n // pricePerToken is how many full tokens, token decimal place included, you get for wei amount.\n // Because, in theory, decimal amount can vary, we do the exponent calculation here,\n // though gas wise using 10**18 constant would be much simpler.\n // Furthermore we could use rough amounts and take in raw wei per tokens amount,\n // but we lose too much accuracy for generic calculations, thus all these are\n // practically implemented as 10**18 fixed points.\n uint multiplier = 10 ** token.decimals();\n return weisTotal.times(multiplier)/pricePerToken;\n }\n\n /**\n * Finalize a succcesful crowdsale.\n *\n * The owner can triggre a call the contract that provides post-crowdsale actions, like releasing the tokens.\n */\n function finalize() public inState(State.Success) onlyOwner stopInEmergency {\n\n // Already finalized\n if(finalized) {\n throw;\n }\n\n // Finalizing is optional. We only call it if we are given a finalizing agent.\n if(address(finalizeAgent) != 0) {\n finalizeAgent.finalizeCrowdsale();\n }\n\n finalized = true;\n }\n\n /**\n * Allow to (re)set finalize agent.\n *\n * Design choice: no state restrictions on setting this, so that we can fix fat finger mistakes.\n */\n function setFinalizeAgent(FinalizeAgent addr) onlyOwner {\n finalizeAgent = addr;\n\n // Don't allow setting bad agent\n if(!finalizeAgent.isFinalizeAgent()) {\n throw;\n }\n }\n\n /**\n * Allow crowdsale owner to close early or extend the crowdsale.\n *\n * This is useful e.g. for a manual soft cap implementation:\n * - after X amount is reached determine manual closing\n *\n * This may put the crowdsale to an invalid state,\n * but we trust owners know what they are doing.\n *\n */\n function setEndsAt(uint time) onlyOwner {\n\n if(now > time) {\n throw; // Don't change past\n }\n\n if(startsAt > time) {\n throw; // Prevent human mistakes\n }\n\n endsAt = time;\n EndsAtChanged(endsAt);\n }\n\n /**\n * Allow to (re)set pricing strategy.\n *\n * Design choice: no state restrictions on the set, so that we can fix fat finger mistakes.\n */\n function setPricingStrategy(PricingStrategy _pricingStrategy) onlyOwner {\n pricingStrategy = _pricingStrategy;\n\n // Don't allow setting bad agent\n if(!pricingStrategy.isPricingStrategy()) {\n throw;\n }\n }\n\n /**\n * Allow to change the team multisig address in the case of emergency.\n *\n * This allows to save a deployed crowdsale wallet in the case the crowdsale has not yet begun\n * (we have done only few test transactions). After the crowdsale is going\n * then multisig address stays locked for the safety reasons.\n */\n function setMultisig(address addr) public onlyOwner {\n\n // Change\n if(investorCount > MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE) {\n throw;\n }\n\n multisigWallet = addr;\n }\n\n /**\n * Allow load refunds back on the contract for the refunding.\n *\n * The team can transfer the funds back on the smart contract in the case the minimum goal was not reached..\n */\n function loadRefund() public payable inState(State.Failure) {\n if(msg.value == 0) throw;\n loadedRefund = loadedRefund.plus(msg.value);\n }\n\n /**\n * Investors can claim refund.\n *\n * Note that any refunds from proxy buyers should be handled separately,\n * and not through this contract.\n */\n function refund() public inState(State.Refunding) {\n uint256 weiValue = investedAmountOf[msg.sender];\n if (weiValue == 0) throw;\n investedAmountOf[msg.sender] = 0;\n weiRefunded = weiRefunded.plus(weiValue);\n Refund(msg.sender, weiValue);\n if (!msg.sender.send(weiValue)) throw;\n }\n\n /**\n * @return true if the crowdsale has raised enough money to be a successful.\n */\n function isMinimumGoalReached() public constant returns (bool reached) {\n return weiRaised >= minimumFundingGoal;\n }\n\n /**\n * Check if the contract relationship looks good.\n */\n function isFinalizerSane() public constant returns (bool sane) {\n return finalizeAgent.isSane();\n }\n\n /**\n * Check if the contract relationship looks good.\n */\n function isPricingSane() public constant returns (bool sane) {\n return pricingStrategy.isSane(address(this));\n }\n\n /**\n * Crowdfund state machine management.\n *\n * We make it a function and do not assign the result to a variable, so there is no chance of the variable being stale.\n */\n function getState() public constant returns (State) {\n if(finalized) return State.Finalized;\n else if (address(finalizeAgent) == 0) return State.Preparing;\n else if (!finalizeAgent.isSane()) return State.Preparing;\n else if (!pricingStrategy.isSane(address(this))) return State.Preparing;\n else if (block.timestamp < startsAt) return State.PreFunding;\n else if (block.timestamp <= endsAt && !isCrowdsaleFull()) return State.Funding;\n else if (isMinimumGoalReached()) return State.Success;\n else if (!isMinimumGoalReached() && weiRaised > 0 && loadedRefund >= weiRaised) return State.Refunding;\n else return State.Failure;\n }\n\n /** This is for manual testing of multisig wallet interaction */\n function setOwnerTestValue(uint val) onlyOwner {\n ownerTestValue = val;\n }\n\n /**\n * Allow addresses to do early participation.\n *\n * TODO: Fix spelling error in the name\n */\n function setEarlyParicipantWhitelist(address addr, bool status) onlyOwner {\n earlyParticipantWhitelist[addr] = status;\n Whitelisted(addr, status);\n }\n\n\n /** Interface marker. */\n function isCrowdsale() public constant returns (bool) {\n return true;\n }\n\n //\n // Modifiers\n //\n\n /** Modified allowing execution only if the crowdsale is currently running. */\n modifier inState(State state) {\n if(getState() != state) throw;\n _;\n }\n\n\n //\n // Abstract functions\n //\n\n /**\n * Check if the current invested breaks our cap rules.\n *\n *\n * The child contract must define their own cap setting rules.\n * We allow a lot of flexibility through different capping strategies (ETH, token count)\n * Called from invest().\n *\n * @param weiAmount The amount of wei the investor tries to invest in the current transaction\n * @param tokenAmount The amount of tokens we try to give to the investor in the current transaction\n * @param weiRaisedTotal What would be our total raised balance after this transaction\n * @param tokensSoldTotal What would be our total sold tokens count after this transaction\n *\n * @return true if taking this investment would break our cap rules\n */\n function isBreakingCap(uint weiAmount, uint tokenAmount, uint weiRaisedTotal, uint tokensSoldTotal) constant returns (bool limitBroken);\n\n /**\n * Check if the current crowdsale is full and we can no longer sell any tokens.\n */\n function isCrowdsaleFull() public constant returns (bool);\n\n /**\n * Create new tokens or transfer issued tokens to the investor depending on the cap model.\n */\n function assignTokens(address receiver, uint tokenAmount) internal;\n}\n\n\n\n/**\n * Abstract base contract for token sales with the default buy entry points.\n *\n * Handle\n * - start and end dates\n * - accepting investments\n * - minimum funding goal and refund\n * - various statistics during the crowdfund\n * - different pricing strategies\n * - different investment policies (require server side customer id, allow only whitelisted addresses)\n *\n * Does not Handle\n *\n * - Token allocation (minting vs. transfer)\n * - Cap rules\n *\n */\ncontract Crowdsale is CrowdsaleBase {\n\n /* Do we need to have unique contributor id for each customer */\n bool public requireCustomerId;\n\n /**\n * Do we verify that contributor has been cleared on the server side (accredited investors only).\n * This method was first used in FirstBlood crowdsale to ensure all contributors have accepted terms on sale (on the web).\n */\n bool public requiredSignedAddress;\n\n /* Server side address that signed allowed contributors (Ethereum addresses) that can participate the crowdsale */\n address public signerAddress;\n\n function Crowdsale(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal) CrowdsaleBase(_token, _pricingStrategy, _multisigWallet, _start, _end, _minimumFundingGoal) {\n }\n\n /**\n * Preallocate tokens for the early investors.\n *\n * Preallocated tokens have been sold before the actual crowdsale opens.\n * This function mints the tokens and moves the crowdsale needle.\n *\n * Investor count is not handled; it is assumed this goes for multiple investors\n * and the token distribution happens outside the smart contract flow.\n *\n * No money is exchanged, as the crowdsale team already have received the payment.\n *\n * @param fullTokens tokens as full tokens - decimal places added internally\n * @param weiPrice Price of a single full token in wei\n *\n */\n function preallocate(address receiver, uint fullTokens, uint weiPrice) public onlyOwner {\n\n uint tokenAmount = fullTokens * 10**token.decimals();\n uint weiAmount = weiPrice * fullTokens; // This can be also 0, we give out tokens for free\n\n weiRaised = weiRaised.plus(weiAmount);\n tokensSold = tokensSold.plus(tokenAmount);\n\n investedAmountOf[receiver] = investedAmountOf[receiver].plus(weiAmount);\n tokenAmountOf[receiver] = tokenAmountOf[receiver].plus(tokenAmount);\n\n assignTokens(receiver, tokenAmount);\n\n // Tell us invest was success\n Invested(receiver, weiAmount, tokenAmount, 0);\n }\n\n /**\n * Allow anonymous contributions to this crowdsale.\n */\n function investWithSignedAddress(address addr, uint128 customerId, uint8 v, bytes32 r, bytes32 s) public payable {\n bytes32 hash = sha256(addr);\n if (ecrecover(hash, v, r, s) != signerAddress) throw;\n if(customerId == 0) throw; // UUIDv4 sanity check\n investInternal(addr, customerId);\n }\n\n /**\n * Track who is the customer making the payment so we can send thank you email.\n */\n function investWithCustomerId(address addr, uint128 customerId) public payable {\n if(requiredSignedAddress) throw; // Crowdsale allows only server-side signed participants\n if(customerId == 0) throw; // UUIDv4 sanity check\n investInternal(addr, customerId);\n }\n\n /**\n * Allow anonymous contributions to this crowdsale.\n */\n function invest(address addr) public payable {\n if(requireCustomerId) throw; // Crowdsale needs to track participants for thank you email\n if(requiredSignedAddress) throw; // Crowdsale allows only server-side signed participants\n investInternal(addr, 0);\n }\n\n /**\n * Invest to tokens, recognize the payer and clear his address.\n *\n */\n function buyWithSignedAddress(uint128 customerId, uint8 v, bytes32 r, bytes32 s) public payable {\n investWithSignedAddress(msg.sender, customerId, v, r, s);\n }\n\n /**\n * Invest to tokens, recognize the payer.\n *\n */\n function buyWithCustomerIdWithChecksum(uint128 customerId, bytes1 checksum) public payable {\n // see customerid.py\n if (bytes1(sha3(customerId)) != checksum) throw;\n investWithCustomerId(msg.sender, customerId);\n }\n\n /**\n * Legacy API signature.\n */\n function buyWithCustomerId(uint128 customerId) public payable {\n investWithCustomerId(msg.sender, customerId);\n }\n\n /**\n * The basic entry point to participate the crowdsale process.\n *\n * Pay for funding, get invested tokens back in the sender address.\n */\n function buy() public payable {\n invest(msg.sender);\n }\n\n /**\n * Set policy do we need to have server-side customer ids for the investments.\n *\n */\n function setRequireCustomerId(bool value) onlyOwner {\n requireCustomerId = value;\n InvestmentPolicyChanged(requireCustomerId, requiredSignedAddress, signerAddress);\n }\n\n /**\n * Set policy if all investors must be cleared on the server side first.\n *\n * This is e.g. for the accredited investor clearing.\n *\n */\n function setRequireSignedAddress(bool value, address _signerAddress) onlyOwner {\n requiredSignedAddress = value;\n signerAddress = _signerAddress;\n InvestmentPolicyChanged(requireCustomerId, requiredSignedAddress, signerAddress);\n }\n\n}\n\n\n\n/**\n * Collect funds from presale investors, buy tokens for them in a single transaction and distribute out tokens.\n *\n * - Collect funds from pre-sale investors\n * - Send funds to the crowdsale when it opens\n * - Allow owner to set the crowdsale\n * - Have refund after X days as a safety hatch if the crowdsale doesn't materilize\n * - Allow unlimited investors\n * - Tokens are distributed on PreICOProxyBuyer smart contract first\n * - The original investors can claim their tokens from the smart contract after the token transfer has been released\n * - All functions can be halted by owner if something goes wrong\n *\n */\ncontract PreICOProxyBuyer is Ownable, Haltable {\n using SafeMath for uint;\n\n /** How many investors we have now */\n uint public investorCount;\n\n /** How many wei we have raised totla. */\n uint public weiRaised;\n\n /** Who are our investors (iterable) */\n address[] public investors;\n\n /** How much they have invested */\n mapping(address => uint) public balances;\n\n /** How many tokens investors have claimed */\n mapping(address => uint) public claimed;\n\n /** When our refund freeze is over (UNIT timestamp) */\n uint public freezeEndsAt;\n\n /** What is the minimum buy in */\n uint public weiMinimumLimit;\n\n /** What is the maximum buy in */\n uint public weiMaximumLimit;\n\n /** How many weis total we are allowed to collect. */\n uint public weiCap;\n\n /** How many tokens were bought */\n uint public tokensBought;\n\n /** How many investors have claimed their tokens */\n uint public claimCount;\n\n uint public totalClaimed;\n\n /** If timeLock > 0, claiming is possible only after the time has passed **/\n uint public timeLock;\n\n /** This is used to signal that we want the refund **/\n bool public forcedRefund;\n\n /** Our ICO contract where we will move the funds */\n Crowdsale public crowdsale;\n\n /** What is our current state. */\n enum State{Unknown, Funding, Distributing, Refunding}\n\n /** Somebody loaded their investment money */\n event Invested(address investor, uint weiAmount, uint tokenAmount, uint128 customerId);\n\n /** Refund claimed */\n event Refunded(address investor, uint value);\n\n /** We executed our buy */\n event TokensBoughts(uint count);\n\n /** We distributed tokens to an investor */\n event Distributed(address investor, uint count);\n\n /**\n * Create presale contract where lock up period is given days\n */\n function PreICOProxyBuyer(address _owner, uint _freezeEndsAt, uint _weiMinimumLimit, uint _weiMaximumLimit, uint _weiCap) {\n\n owner = _owner;\n\n // Give argument\n if(_freezeEndsAt == 0) {\n throw;\n }\n\n // Give argument\n if(_weiMinimumLimit == 0) {\n throw;\n }\n\n if(_weiMaximumLimit == 0) {\n throw;\n }\n\n weiMinimumLimit = _weiMinimumLimit;\n weiMaximumLimit = _weiMaximumLimit;\n weiCap = _weiCap;\n freezeEndsAt = _freezeEndsAt;\n }\n\n /**\n * Get the token we are distributing.\n */\n function getToken() public constant returns(FractionalERC20) {\n if(address(crowdsale) == 0) {\n throw;\n }\n\n return crowdsale.token();\n }\n\n /**\n * Participate to a presale.\n */\n function invest(uint128 customerId) private {\n\n // Cannot invest anymore through crowdsale when moving has begun\n if(getState() != State.Funding) throw;\n\n if(msg.value == 0) throw; // No empty buys\n\n address investor = msg.sender;\n\n bool existing = balances[investor] > 0;\n\n balances[investor] = balances[investor].add(msg.value);\n\n // Need to satisfy minimum and maximum limits\n if(balances[investor] < weiMinimumLimit || balances[investor] > weiMaximumLimit) {\n throw;\n }\n\n // This is a new investor\n if(!existing) {\n investors.push(investor);\n investorCount++;\n }\n\n weiRaised = weiRaised.add(msg.value);\n if(weiRaised > weiCap) {\n throw;\n }\n\n // We will use the same event form the Crowdsale for compatibility reasons\n // despite not having a token amount.\n Invested(investor, msg.value, 0, customerId);\n }\n\n function buyWithCustomerId(uint128 customerId) public stopInEmergency payable {\n invest(customerId);\n }\n\n function buy() public stopInEmergency payable {\n invest(0x0);\n }\n\n\n /**\n * Load funds to the crowdsale for all investors.\n *\n *\n */\n function buyForEverybody() stopNonOwnersInEmergency public {\n\n if(getState() != State.Funding) {\n // Only allow buy once\n throw;\n }\n\n // Crowdsale not yet set\n if(address(crowdsale) == 0) throw;\n\n // Buy tokens on the contract\n crowdsale.invest.value(weiRaised)(address(this));\n\n // Record how many tokens we got\n tokensBought = getToken().balanceOf(address(this));\n\n if(tokensBought == 0) {\n // Did not get any tokens\n throw;\n }\n\n TokensBoughts(tokensBought);\n }\n\n /**\n * How may tokens each investor gets.\n */\n function getClaimAmount(address investor) public constant returns (uint) {\n\n // Claims can be only made if we manage to buy tokens\n if(getState() != State.Distributing) {\n throw;\n }\n return balances[investor].mul(tokensBought) / weiRaised;\n }\n\n /**\n * How many tokens remain unclaimed for an investor.\n */\n function getClaimLeft(address investor) public constant returns (uint) {\n return getClaimAmount(investor).sub(claimed[investor]);\n }\n\n /**\n * Claim all remaining tokens for this investor.\n */\n function claimAll() {\n claim(getClaimLeft(msg.sender));\n }\n\n /**\n * Claim N bought tokens to the investor as the msg sender.\n *\n */\n function claim(uint amount) stopInEmergency {\n require (now > timeLock);\n\n address investor = msg.sender;\n\n if(amount == 0) {\n throw;\n }\n\n if(getClaimLeft(investor) < amount) {\n // Woops we cannot get more than we have left\n throw;\n }\n\n // We track who many investor have (partially) claimed their tokens\n if(claimed[investor] == 0) {\n claimCount++;\n }\n\n claimed[investor] = claimed[investor].add(amount);\n totalClaimed = totalClaimed.add(amount);\n getToken().transfer(investor, amount);\n\n Distributed(investor, amount);\n }\n\n /**\n * ICO never happened. Allow refund.\n */\n function refund() stopInEmergency {\n\n // Trying to ask refund too soon\n if(getState() != State.Refunding) throw;\n\n address investor = msg.sender;\n if(balances[investor] == 0) throw;\n uint amount = balances[investor];\n delete balances[investor];\n if(!(investor.call.value(amount)())) throw;\n Refunded(investor, amount);\n }\n\n /**\n * Set the target crowdsale where we will move presale funds when the crowdsale opens.\n */\n function setCrowdsale(Crowdsale _crowdsale) public onlyOwner {\n crowdsale = _crowdsale;\n\n // Check interface\n if(!crowdsale.isCrowdsale()) true;\n }\n\n /// @dev Setting timelock (delay) for claiming\n /// @param _timeLock Time after which claiming is possible\n function setTimeLock(uint _timeLock) public onlyOwner {\n timeLock = _timeLock;\n }\n\n /// @dev This is used in the first case scenario, this will force the state\n /// to refunding. This can be also used when the ICO fails to meet the cap.\n function forceRefund() public onlyOwner {\n forcedRefund = true;\n }\n\n /// @dev This should be used if the Crowdsale fails, to receive the refuld money.\n /// we can't use Crowdsale's refund, since our default function does not\n /// accept money in.\n function loadRefund() public payable {\n if(getState() != State.Refunding) throw;\n }\n\n /**\n * Resolve the contract umambigious state.\n */\n function getState() public returns(State) {\n if (forcedRefund)\n return State.Refunding;\n\n if(tokensBought == 0) {\n if(now >= freezeEndsAt) {\n return State.Refunding;\n } else {\n return State.Funding;\n }\n } else {\n return State.Distributing;\n }\n }\n\n /** Interface marker. */\n function isPresale() public constant returns (bool) {\n return true;\n }\n\n /** Explicitly call function from your wallet. */\n function() payable {\n throw;\n }\n}\n"}, "PreICOProxyBuyer_EventCompatibility": {"abi": [{"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}, {"indexed": false, "name": "customerId", "type": "uint128"}], "name": "Invested", "type": "event"}], "bytecode": "0x6080604052348015600f57600080fd5b50603580601d6000396000f3006080604052600080fd00a165627a7a723058201403684205ddb2937a620fe8f22720d78660448a61a8aac626fcf51627b7231a0029", "bytecode_runtime": "0x6080604052600080fd00a165627a7a723058201403684205ddb2937a620fe8f22720d78660448a61a8aac626fcf51627b7231a0029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}, {"indexed": false, "name": "customerId", "type": "uint128"}], "name": "Invested", "type": "event"}], "devdoc": {"methods": {}}, "userdoc": {"methods": {}}}, "settings": {"compilationTarget": {"contracts/PreICOProxyBuyer_EventCompatibility.sol": "PreICOProxyBuyer_EventCompatibility"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/PreICOProxyBuyer_EventCompatibility.sol": {"keccak256": "0xcdba01bfcc55ac11283149b002015cd1aa9c70f847e8824a3718f072a6fad4ba", "urls": ["bzzr://068ad1a2d54d6330ee66f091d2da29f4b7eb5720892d013fb40378c359397114"]}}, "version": 1}, "name": "PreICOProxyBuyer_EventCompatibility", "ordered_full_dependencies": [], "source_path": "contracts/PreICOProxyBuyer_EventCompatibility.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * ABI compatibility shim to get.\n *\n * You can use this shim to get events out of old PreICOProxyBuyer contracts.\n */\ncontract PreICOProxyBuyer_EventCompatibility {\n\n /** Somebody loaded their investment money */\n event Invested(address investor, uint weiAmount, uint128 customerId);\n\n}\n"}, "PresaleFundCollector": {"abi": [{"constant": true, "inputs": [], "name": "weiMinimumLimit", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "investor", "type": "address"}], "name": "participateCrowdsaleInvestor", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "balances", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "uint256"}], "name": "investors", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_crowdsale", "type": "address"}], "name": "setCrowdsale", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "refund", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "freezeEndsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "MAX_INVESTORS", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "crowdsale", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "participateCrowdsaleAll", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "moving", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "investorCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "invest", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [{"name": "_owner", "type": "address"}, {"name": "_freezeEndsAt", "type": "uint256"}, {"name": "_weiMinimumLimit", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"payable": true, "stateMutability": "payable", "type": "fallback"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Invested", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Refunded", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "bytecode": "0x6080604052602060015534801561001557600080fd5b506040516060806108398339810160409081528151602083015191909201516000805433600160a060020a03199182161716600160a060020a03851617905581151561006057600080fd5b80151561006c57600080fd5b600655600555506107b7806100826000396000f3006080604052600436106100da5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416631540fe2281146100df57806324ae84cc1461010657806327e235e3146101295780633feb5f2b1461014a578063483a20b21461017e578063590e1ae31461019f5780636962b010146101b45780636a34480b146101c95780638da5cb5b146101de5780639c1e03a0146101f3578063b8e3e6da14610208578063cb11526d1461021d578063d7e64c0014610246578063e8b5e51f1461025b578063f2fde38b14610263575b600080fd5b3480156100eb57600080fd5b506100f4610284565b60408051918252519081900360200190f35b34801561011257600080fd5b50610127600160a060020a036004351661028a565b005b34801561013557600080fd5b506100f4600160a060020a0360043516610377565b34801561015657600080fd5b50610162600435610389565b60408051600160a060020a039092168252519081900360200190f35b34801561018a57600080fd5b50610127600160a060020a03600435166103b1565b3480156101ab57600080fd5b506101276103fd565b3480156101c057600080fd5b506100f46104c7565b3480156101d557600080fd5b506100f46104cd565b3480156101ea57600080fd5b506101626104d3565b3480156101ff57600080fd5b506101626104e2565b34801561021457600080fd5b506101276104f6565b34801561022957600080fd5b5061023261053a565b604080519115158252519081900360200190f35b34801561025257600080fd5b506100f4610543565b610127610549565b34801561026f57600080fd5b50610127600160a060020a03600435166106f7565b60065481565b6007546000906101009004600160a060020a031615156102a957600080fd5b6007805460ff19166001179055600160a060020a03821660009081526004602052604081205411156103735750600160a060020a03808216600081815260046020819052604080832080549084905560075482517f03f9c7930000000000000000000000000000000000000000000000000000000081529384019590955290519094610100909404909316926303f9c7939285926024808201939182900301818588803b15801561035957600080fd5b505af115801561036d573d6000803e3d6000fd5b50505050505b5050565b60046020526000908152604090205481565b600380548290811061039757fe5b600091825260209091200154600160a060020a0316905081565b600054600160a060020a031633146103c857600080fd5b60078054600160a060020a039092166101000274ffffffffffffffffffffffffffffffffffffffff0019909216919091179055565b60008060055442101561040f57600080fd5b6007805460ff1916600117905533600081815260046020526040902054909250151561043a57600080fd5b50600160a060020a038116600081815260046020526040808220805490839055905190929183156108fc02918491818181858888f19350505050151561047f57600080fd5b60408051600160a060020a03841681526020810183905281517fd7dee2702d63ad89917b6a4da9981c90c4d24f8c2bdfd64c604ecae57d8d0651929181900390910190a15050565b60055481565b60015481565b600054600160a060020a031681565b6007546101009004600160a060020a031681565b60005b6003548110156105375761052f60038281548110151561051557fe5b600091825260209091200154600160a060020a031661028a565b6001016104f9565b50565b60075460ff1681565b60025481565b600754600090819060ff161561055e57600080fd5b50503360008181526004602081815260408084205481517f66098d4f000000000000000000000000000000000000000000000000000000008152938401819052346024850152905193109273__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b1580156105e157600080fd5b505af41580156105f5573d6000803e3d6000fd5b505050506040513d602081101561060b57600080fd5b5051600160a060020a0383166000908152600460205260409020819055600654111561063657600080fd5b8015156106b0576001546002541061064d57600080fd5b60038054600180820183556000929092527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0385161790556002805490910190555b60408051600160a060020a038416815234602082015281517fc3f75dfc78f6efac88ad5abb5e606276b903647d97b2a62a1ef89840a658bbc3929181900390910190a15050565b600054600160a060020a0316331461070e57600080fd5b600160a060020a038116151561072357600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790555600a165627a7a72305820a4eb307d8bb79f882d5ae13b82bb5a660d65dc4a79bc8689f97101e5ab9257a30029", "bytecode_runtime": "0x6080604052600436106100da5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416631540fe2281146100df57806324ae84cc1461010657806327e235e3146101295780633feb5f2b1461014a578063483a20b21461017e578063590e1ae31461019f5780636962b010146101b45780636a34480b146101c95780638da5cb5b146101de5780639c1e03a0146101f3578063b8e3e6da14610208578063cb11526d1461021d578063d7e64c0014610246578063e8b5e51f1461025b578063f2fde38b14610263575b600080fd5b3480156100eb57600080fd5b506100f4610284565b60408051918252519081900360200190f35b34801561011257600080fd5b50610127600160a060020a036004351661028a565b005b34801561013557600080fd5b506100f4600160a060020a0360043516610377565b34801561015657600080fd5b50610162600435610389565b60408051600160a060020a039092168252519081900360200190f35b34801561018a57600080fd5b50610127600160a060020a03600435166103b1565b3480156101ab57600080fd5b506101276103fd565b3480156101c057600080fd5b506100f46104c7565b3480156101d557600080fd5b506100f46104cd565b3480156101ea57600080fd5b506101626104d3565b3480156101ff57600080fd5b506101626104e2565b34801561021457600080fd5b506101276104f6565b34801561022957600080fd5b5061023261053a565b604080519115158252519081900360200190f35b34801561025257600080fd5b506100f4610543565b610127610549565b34801561026f57600080fd5b50610127600160a060020a03600435166106f7565b60065481565b6007546000906101009004600160a060020a031615156102a957600080fd5b6007805460ff19166001179055600160a060020a03821660009081526004602052604081205411156103735750600160a060020a03808216600081815260046020819052604080832080549084905560075482517f03f9c7930000000000000000000000000000000000000000000000000000000081529384019590955290519094610100909404909316926303f9c7939285926024808201939182900301818588803b15801561035957600080fd5b505af115801561036d573d6000803e3d6000fd5b50505050505b5050565b60046020526000908152604090205481565b600380548290811061039757fe5b600091825260209091200154600160a060020a0316905081565b600054600160a060020a031633146103c857600080fd5b60078054600160a060020a039092166101000274ffffffffffffffffffffffffffffffffffffffff0019909216919091179055565b60008060055442101561040f57600080fd5b6007805460ff1916600117905533600081815260046020526040902054909250151561043a57600080fd5b50600160a060020a038116600081815260046020526040808220805490839055905190929183156108fc02918491818181858888f19350505050151561047f57600080fd5b60408051600160a060020a03841681526020810183905281517fd7dee2702d63ad89917b6a4da9981c90c4d24f8c2bdfd64c604ecae57d8d0651929181900390910190a15050565b60055481565b60015481565b600054600160a060020a031681565b6007546101009004600160a060020a031681565b60005b6003548110156105375761052f60038281548110151561051557fe5b600091825260209091200154600160a060020a031661028a565b6001016104f9565b50565b60075460ff1681565b60025481565b600754600090819060ff161561055e57600080fd5b50503360008181526004602081815260408084205481517f66098d4f000000000000000000000000000000000000000000000000000000008152938401819052346024850152905193109273__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b1580156105e157600080fd5b505af41580156105f5573d6000803e3d6000fd5b505050506040513d602081101561060b57600080fd5b5051600160a060020a0383166000908152600460205260409020819055600654111561063657600080fd5b8015156106b0576001546002541061064d57600080fd5b60038054600180820183556000929092527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0385161790556002805490910190555b60408051600160a060020a038416815234602082015281517fc3f75dfc78f6efac88ad5abb5e606276b903647d97b2a62a1ef89840a658bbc3929181900390910190a15050565b600054600160a060020a0316331461070e57600080fd5b600160a060020a038116151561072357600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790555600a165627a7a72305820a4eb307d8bb79f882d5ae13b82bb5a660d65dc4a79bc8689f97101e5ab9257a30029", "direct_dependencies": ["SafeMathLib"], "full_dependencies": ["SafeMathLib"], "linkrefs": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 3162}], "linkrefs_runtime": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 2902}], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": true, "inputs": [], "name": "weiMinimumLimit", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "investor", "type": "address"}], "name": "participateCrowdsaleInvestor", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "balances", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "uint256"}], "name": "investors", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_crowdsale", "type": "address"}], "name": "setCrowdsale", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "refund", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "freezeEndsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "MAX_INVESTORS", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "crowdsale", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "participateCrowdsaleAll", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "moving", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "investorCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "invest", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [{"name": "_owner", "type": "address"}, {"name": "_freezeEndsAt", "type": "uint256"}, {"name": "_weiMinimumLimit", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"payable": true, "stateMutability": "payable", "type": "fallback"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Invested", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Refunded", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "devdoc": {"methods": {"transferOwnership(address)": {"details": "Allows the current owner to transfer control of the contract to a newOwner.", "params": {"newOwner": "The address to transfer ownership to."}}}}, "userdoc": {"methods": {"invest()": {"notice": "Participate to a presale."}, "participateCrowdsaleAll()": {"notice": "Load funds to the crowdsale for all investor. "}, "participateCrowdsaleInvestor(address)": {"notice": "Load funds to the crowdsale for a single investor."}, "refund()": {"notice": "ICO never happened. Allow refund."}, "setCrowdsale(address)": {"notice": "Set the target crowdsale where we will move presale funds when the crowdsale opens."}}}}, "settings": {"compilationTarget": {"contracts/PresaleFundCollector.sol": "PresaleFundCollector"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/Crowdsale.sol": {"keccak256": "0x2697c26528f64bb954a7c2547d3b43317d2d2b02c7d9d05a7b1ab388cd79f65d", "urls": ["bzzr://f28b280794222114141c51dd5c388d403a7c98d8b51e04170a0e294246d5164b"]}, "contracts/CrowdsaleBase.sol": {"keccak256": "0xe2c9ed11183ce705616980df7b02544d72fe18b40395da7d9d4bcb621fb87871", "urls": ["bzzr://07f3887ba0d0eb3248b1ad3581480ed71a2fe70a47dcc283c4e97c8c92e0790a"]}, "contracts/FinalizeAgent.sol": {"keccak256": "0x309fd0510e0b3e2b5044e33f7c80cfb2d6f2a5697e41a5f185931d65770cfea9", "urls": ["bzzr://4e7ed6f82c0f542e92e56c12566b2ecd7666730865bf12566c27587ec64160ac"]}, "contracts/FractionalERC20.sol": {"keccak256": "0x75bc4ad90a8b13ce961c89b1bf405776f616e019d3a2720168f8e52be223198f", "urls": ["bzzr://6a3688f12da1a5c890ef06f80f883f6c5370886092d38a1b33cd4219b718478b"]}, "contracts/Haltable.sol": {"keccak256": "0x265dcf25e7c9ab4b6eecd2181f1b71334a1b5381a60f8db7d9526dab120f4b70", "urls": ["bzzr://d522e00fa9e075941469dd81738b59fdb99ce3c12cdc39e33abe40b588c4da9b"]}, "contracts/PresaleFundCollector.sol": {"keccak256": "0xfb15ce89ad0b78b5efb7d8f133d2f399c96246d8dd2548d563e41844e3b8239f", "urls": ["bzzr://1b2a4847f49a63cce5e01d2357e23822bf7cdb668e9ad8e7cea8315d0a15a579"]}, "contracts/PricingStrategy.sol": {"keccak256": "0x8df5093b7d07168ad994f9176de0bd2268f6563b1e8a3a448d8cfe7fe246c628", "urls": ["bzzr://ef5c944d51f739ab34e2c951d6ac82a7152e6bb844058a8e57bae52c14cbe16b"]}, "contracts/SafeMathLib.sol": {"keccak256": "0x501bfe31e274b9a5591f7c540bdced4d4312e27d4f19599147c9bbca3d9c6b18", "urls": ["bzzr://a80935ebddb06c247d71372d4e5833ee029f08633bd0fe4a274a57009567e5b9"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}}, "version": 1}, "name": "PresaleFundCollector", "ordered_full_dependencies": ["SafeMathLib"], "source_path": "contracts/PresaleFundCollector.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Safe unsigned safe math.\n *\n * https://blog.aragon.one/library-driven-development-in-solidity-2bebcaf88736#.750gwtwli\n *\n * Originally from https://raw.githubusercontent.com/AragonOne/zeppelin-solidity/master/contracts/SafeMathLib.sol\n *\n * Maintained here until merged to mainline zeppelin-solidity.\n *\n */\nlibrary SafeMathLib {\n\n function times(uint a, uint b) returns (uint) {\n uint c = a * b;\n assert(a == 0 || c / a == b);\n return c;\n }\n\n function minus(uint a, uint b) returns (uint) {\n assert(b <= a);\n return a - b;\n }\n\n function plus(uint a, uint b) returns (uint) {\n uint c = a + b;\n assert(c>=a);\n return c;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Interface for defining crowdsale pricing.\n */\ncontract PricingStrategy {\n\n /** Interface declaration. */\n function isPricingStrategy() public constant returns (bool) {\n return true;\n }\n\n /** Self check if all references are correctly set.\n *\n * Checks that pricing strategy matches crowdsale parameters.\n */\n function isSane(address crowdsale) public constant returns (bool) {\n return true;\n }\n\n /**\n * @dev Pricing tells if this is a presale purchase or not.\n @param purchaser Address of the purchaser\n @return False by default, true if a presale purchaser\n */\n function isPresalePurchase(address purchaser) public constant returns (bool) {\n return false;\n }\n\n /**\n * When somebody tries to buy tokens for X eth, calculate how many tokens they get.\n *\n *\n * @param value - What is the value of the transaction send in as wei\n * @param tokensSold - how much tokens have been sold this far\n * @param weiRaised - how much money has been raised this far in the main token sale - this number excludes presale\n * @param msgSender - who is the investor of this transaction\n * @param decimals - how many decimal units the token has\n * @return Amount of tokens the investor receives\n */\n function calculatePrice(uint value, uint weiRaised, uint tokensSold, address msgSender, uint decimals) public constant returns (uint tokenAmount);\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Finalize agent defines what happens at the end of succeseful crowdsale.\n *\n * - Allocate tokens for founders, bounties and community\n * - Make tokens transferable\n * - etc.\n */\ncontract FinalizeAgent {\n\n function isFinalizeAgent() public constant returns(bool) {\n return true;\n }\n\n /** Return true if we can run finalizeCrowdsale() properly.\n *\n * This is a safety check function that doesn't allow crowdsale to begin\n * unless the finalizer has been set up properly.\n */\n function isSane() public constant returns (bool);\n\n /** Called once by crowdsale finalize() if the sale was success. */\n function finalizeCrowdsale();\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n\n/**\n * A token that defines fractional units as decimals.\n */\ncontract FractionalERC20 is ERC20 {\n\n uint public decimals;\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n/*\n * Haltable\n *\n * Abstract contract that allows children to implement an\n * emergency stop mechanism. Differs from Pausable by causing a throw when in halt mode.\n *\n *\n * Originally envisioned in FirstBlood ICO contract.\n */\ncontract Haltable is Ownable {\n bool public halted;\n\n modifier stopInEmergency {\n if (halted) throw;\n _;\n }\n\n modifier stopNonOwnersInEmergency {\n if (halted && msg.sender != owner) throw;\n _;\n }\n\n modifier onlyInEmergency {\n if (!halted) throw;\n _;\n }\n\n // called by the owner on emergency, triggers stopped state\n function halt() external onlyOwner {\n halted = true;\n }\n\n // called by the owner on end of emergency, returns to normal state\n function unhalt() external onlyOwner onlyInEmergency {\n halted = false;\n }\n\n}\n\n\n\n\n\n\n\n/**\n * Crowdsale state machine without buy functionality.\n *\n * Implements basic state machine logic, but leaves out all buy functions,\n * so that subclasses can implement their own buying logic.\n *\n *\n * For the default buy() implementation see Crowdsale.sol.\n */\ncontract CrowdsaleBase is Haltable {\n\n /* Max investment count when we are still allowed to change the multisig address */\n uint public MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE = 5;\n\n using SafeMathLib for uint;\n\n /* The token we are selling */\n FractionalERC20 public token;\n\n /* How we are going to price our offering */\n PricingStrategy public pricingStrategy;\n\n /* Post-success callback */\n FinalizeAgent public finalizeAgent;\n\n /* tokens will be transfered from this address */\n address public multisigWallet;\n\n /* if the funding goal is not reached, investors may withdraw their funds */\n uint public minimumFundingGoal;\n\n /* the UNIX timestamp start date of the crowdsale */\n uint public startsAt;\n\n /* the UNIX timestamp end date of the crowdsale */\n uint public endsAt;\n\n /* the number of tokens already sold through this contract*/\n uint public tokensSold = 0;\n\n /* How many wei of funding we have raised */\n uint public weiRaised = 0;\n\n /* Calculate incoming funds from presale contracts and addresses */\n uint public presaleWeiRaised = 0;\n\n /* How many distinct addresses have invested */\n uint public investorCount = 0;\n\n /* How much wei we have returned back to the contract after a failed crowdfund. */\n uint public loadedRefund = 0;\n\n /* How much wei we have given back to investors.*/\n uint public weiRefunded = 0;\n\n /* Has this crowdsale been finalized */\n bool public finalized;\n\n /** How much ETH each address has invested to this crowdsale */\n mapping (address => uint256) public investedAmountOf;\n\n /** How much tokens this crowdsale has credited for each investor address */\n mapping (address => uint256) public tokenAmountOf;\n\n /** Addresses that are allowed to invest even before ICO offical opens. For testing, for ICO partners, etc. */\n mapping (address => bool) public earlyParticipantWhitelist;\n\n /** This is for manul testing for the interaction from owner wallet. You can set it to any value and inspect this in blockchain explorer to see that crowdsale interaction works. */\n uint public ownerTestValue;\n\n /** State machine\n *\n * - Preparing: All contract initialization calls and variables have not been set yet\n * - Prefunding: We have not passed start time yet\n * - Funding: Active crowdsale\n * - Success: Minimum funding goal reached\n * - Failure: Minimum funding goal not reached before ending time\n * - Finalized: The finalized has been called and succesfully executed\n * - Refunding: Refunds are loaded on the contract for reclaim.\n */\n enum State{Unknown, Preparing, PreFunding, Funding, Success, Failure, Finalized, Refunding}\n\n // A new investment was made\n event Invested(address investor, uint weiAmount, uint tokenAmount, uint128 customerId);\n\n // Refund was processed for a contributor\n event Refund(address investor, uint weiAmount);\n\n // The rules were changed what kind of investments we accept\n event InvestmentPolicyChanged(bool newRequireCustomerId, bool newRequiredSignedAddress, address newSignerAddress);\n\n // Address early participation whitelist status changed\n event Whitelisted(address addr, bool status);\n\n // Crowdsale end time has been changed\n event EndsAtChanged(uint newEndsAt);\n\n function CrowdsaleBase(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal) {\n\n owner = msg.sender;\n\n token = FractionalERC20(_token);\n setPricingStrategy(_pricingStrategy);\n\n multisigWallet = _multisigWallet;\n if(multisigWallet == 0) {\n throw;\n }\n\n if(_start == 0) {\n throw;\n }\n\n startsAt = _start;\n\n if(_end == 0) {\n throw;\n }\n\n endsAt = _end;\n\n // Don't mess the dates\n if(startsAt >= endsAt) {\n throw;\n }\n\n // Minimum funding goal can be zero\n minimumFundingGoal = _minimumFundingGoal;\n }\n\n /**\n * Don't expect to just send in money and get tokens.\n */\n function() payable {\n throw;\n }\n\n /**\n * @dev Make an investment.\n *\n * Crowdsale must be running for one to invest.\n * We must have not pressed the emergency brake.\n *\n * @param receiver The Ethereum address who receives the tokens\n * @param customerId (optional) UUID v4 to track the successful payments on the server side'\n * @param tokenAmount Amount of tokens which be credited to receiver\n *\n * @return tokensBought How mony tokens were bought\n */\n function buyTokens(address receiver, uint128 customerId, uint256 tokenAmount) stopInEmergency internal returns(uint tokensBought) {\n\n // Determine if it's a good time to accept investment from this participant\n if(getState() == State.PreFunding) {\n // Are we whitelisted for early deposit\n if(!earlyParticipantWhitelist[receiver]) {\n throw;\n }\n } else if(getState() == State.Funding) {\n // Retail participants can only come in when the crowdsale is running\n // pass\n } else {\n // Unwanted state\n throw;\n }\n\n uint weiAmount = msg.value;\n\n // Dust transaction\n require(tokenAmount != 0);\n\n if(investedAmountOf[receiver] == 0) {\n // A new investor\n investorCount++;\n }\n\n // Update investor\n investedAmountOf[receiver] = investedAmountOf[receiver].plus(weiAmount);\n tokenAmountOf[receiver] = tokenAmountOf[receiver].plus(tokenAmount);\n\n // Update totals\n weiRaised = weiRaised.plus(weiAmount);\n tokensSold = tokensSold.plus(tokenAmount);\n\n if(pricingStrategy.isPresalePurchase(receiver)) {\n presaleWeiRaised = presaleWeiRaised.plus(weiAmount);\n }\n\n // Check that we did not bust the cap\n require(!isBreakingCap(weiAmount, tokenAmount, weiRaised, tokensSold));\n\n assignTokens(receiver, tokenAmount);\n\n // Pocket the money, or fail the crowdsale if we for some reason cannot send the money to our multisig\n if(!multisigWallet.send(weiAmount)) throw;\n\n // Tell us invest was success\n Invested(receiver, weiAmount, tokenAmount, customerId);\n\n return tokenAmount;\n }\n\n /**\n * @dev Make an investment based on pricing strategy\n *\n * This is a wrapper for buyTokens(), but the amount of tokens receiver will\n * have depends on the pricing strategy used.\n *\n * @param receiver The Ethereum address who receives the tokens\n * @param customerId (optional) UUID v4 to track the successful payments on the server side'\n *\n * @return tokensBought How mony tokens were bought\n */\n function investInternal(address receiver, uint128 customerId) stopInEmergency internal returns(uint tokensBought) {\n return buyTokens(receiver, customerId, pricingStrategy.calculatePrice(msg.value, weiRaised - presaleWeiRaised, tokensSold, msg.sender, token.decimals()));\n }\n\n /**\n * @dev Calculate tokens user will have for their purchase\n *\n * @param weisTotal How much ethers (in wei) the user putssssss in\n * @param pricePerToken What is the price for one token\n *\n * @return tokensTotal which is received tokens, token decimals included\n */\n function calculateTokens(uint256 weisTotal, uint256 pricePerToken) public constant returns(uint tokensTotal) {\n // pricePerToken is how many full tokens, token decimal place included, you get for wei amount.\n // Because, in theory, decimal amount can vary, we do the exponent calculation here,\n // though gas wise using 10**18 constant would be much simpler.\n // Furthermore we could use rough amounts and take in raw wei per tokens amount,\n // but we lose too much accuracy for generic calculations, thus all these are\n // practically implemented as 10**18 fixed points.\n uint multiplier = 10 ** token.decimals();\n return weisTotal.times(multiplier)/pricePerToken;\n }\n\n /**\n * Finalize a succcesful crowdsale.\n *\n * The owner can triggre a call the contract that provides post-crowdsale actions, like releasing the tokens.\n */\n function finalize() public inState(State.Success) onlyOwner stopInEmergency {\n\n // Already finalized\n if(finalized) {\n throw;\n }\n\n // Finalizing is optional. We only call it if we are given a finalizing agent.\n if(address(finalizeAgent) != 0) {\n finalizeAgent.finalizeCrowdsale();\n }\n\n finalized = true;\n }\n\n /**\n * Allow to (re)set finalize agent.\n *\n * Design choice: no state restrictions on setting this, so that we can fix fat finger mistakes.\n */\n function setFinalizeAgent(FinalizeAgent addr) onlyOwner {\n finalizeAgent = addr;\n\n // Don't allow setting bad agent\n if(!finalizeAgent.isFinalizeAgent()) {\n throw;\n }\n }\n\n /**\n * Allow crowdsale owner to close early or extend the crowdsale.\n *\n * This is useful e.g. for a manual soft cap implementation:\n * - after X amount is reached determine manual closing\n *\n * This may put the crowdsale to an invalid state,\n * but we trust owners know what they are doing.\n *\n */\n function setEndsAt(uint time) onlyOwner {\n\n if(now > time) {\n throw; // Don't change past\n }\n\n if(startsAt > time) {\n throw; // Prevent human mistakes\n }\n\n endsAt = time;\n EndsAtChanged(endsAt);\n }\n\n /**\n * Allow to (re)set pricing strategy.\n *\n * Design choice: no state restrictions on the set, so that we can fix fat finger mistakes.\n */\n function setPricingStrategy(PricingStrategy _pricingStrategy) onlyOwner {\n pricingStrategy = _pricingStrategy;\n\n // Don't allow setting bad agent\n if(!pricingStrategy.isPricingStrategy()) {\n throw;\n }\n }\n\n /**\n * Allow to change the team multisig address in the case of emergency.\n *\n * This allows to save a deployed crowdsale wallet in the case the crowdsale has not yet begun\n * (we have done only few test transactions). After the crowdsale is going\n * then multisig address stays locked for the safety reasons.\n */\n function setMultisig(address addr) public onlyOwner {\n\n // Change\n if(investorCount > MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE) {\n throw;\n }\n\n multisigWallet = addr;\n }\n\n /**\n * Allow load refunds back on the contract for the refunding.\n *\n * The team can transfer the funds back on the smart contract in the case the minimum goal was not reached..\n */\n function loadRefund() public payable inState(State.Failure) {\n if(msg.value == 0) throw;\n loadedRefund = loadedRefund.plus(msg.value);\n }\n\n /**\n * Investors can claim refund.\n *\n * Note that any refunds from proxy buyers should be handled separately,\n * and not through this contract.\n */\n function refund() public inState(State.Refunding) {\n uint256 weiValue = investedAmountOf[msg.sender];\n if (weiValue == 0) throw;\n investedAmountOf[msg.sender] = 0;\n weiRefunded = weiRefunded.plus(weiValue);\n Refund(msg.sender, weiValue);\n if (!msg.sender.send(weiValue)) throw;\n }\n\n /**\n * @return true if the crowdsale has raised enough money to be a successful.\n */\n function isMinimumGoalReached() public constant returns (bool reached) {\n return weiRaised >= minimumFundingGoal;\n }\n\n /**\n * Check if the contract relationship looks good.\n */\n function isFinalizerSane() public constant returns (bool sane) {\n return finalizeAgent.isSane();\n }\n\n /**\n * Check if the contract relationship looks good.\n */\n function isPricingSane() public constant returns (bool sane) {\n return pricingStrategy.isSane(address(this));\n }\n\n /**\n * Crowdfund state machine management.\n *\n * We make it a function and do not assign the result to a variable, so there is no chance of the variable being stale.\n */\n function getState() public constant returns (State) {\n if(finalized) return State.Finalized;\n else if (address(finalizeAgent) == 0) return State.Preparing;\n else if (!finalizeAgent.isSane()) return State.Preparing;\n else if (!pricingStrategy.isSane(address(this))) return State.Preparing;\n else if (block.timestamp < startsAt) return State.PreFunding;\n else if (block.timestamp <= endsAt && !isCrowdsaleFull()) return State.Funding;\n else if (isMinimumGoalReached()) return State.Success;\n else if (!isMinimumGoalReached() && weiRaised > 0 && loadedRefund >= weiRaised) return State.Refunding;\n else return State.Failure;\n }\n\n /** This is for manual testing of multisig wallet interaction */\n function setOwnerTestValue(uint val) onlyOwner {\n ownerTestValue = val;\n }\n\n /**\n * Allow addresses to do early participation.\n *\n * TODO: Fix spelling error in the name\n */\n function setEarlyParicipantWhitelist(address addr, bool status) onlyOwner {\n earlyParticipantWhitelist[addr] = status;\n Whitelisted(addr, status);\n }\n\n\n /** Interface marker. */\n function isCrowdsale() public constant returns (bool) {\n return true;\n }\n\n //\n // Modifiers\n //\n\n /** Modified allowing execution only if the crowdsale is currently running. */\n modifier inState(State state) {\n if(getState() != state) throw;\n _;\n }\n\n\n //\n // Abstract functions\n //\n\n /**\n * Check if the current invested breaks our cap rules.\n *\n *\n * The child contract must define their own cap setting rules.\n * We allow a lot of flexibility through different capping strategies (ETH, token count)\n * Called from invest().\n *\n * @param weiAmount The amount of wei the investor tries to invest in the current transaction\n * @param tokenAmount The amount of tokens we try to give to the investor in the current transaction\n * @param weiRaisedTotal What would be our total raised balance after this transaction\n * @param tokensSoldTotal What would be our total sold tokens count after this transaction\n *\n * @return true if taking this investment would break our cap rules\n */\n function isBreakingCap(uint weiAmount, uint tokenAmount, uint weiRaisedTotal, uint tokensSoldTotal) constant returns (bool limitBroken);\n\n /**\n * Check if the current crowdsale is full and we can no longer sell any tokens.\n */\n function isCrowdsaleFull() public constant returns (bool);\n\n /**\n * Create new tokens or transfer issued tokens to the investor depending on the cap model.\n */\n function assignTokens(address receiver, uint tokenAmount) internal;\n}\n\n\n\n/**\n * Abstract base contract for token sales with the default buy entry points.\n *\n * Handle\n * - start and end dates\n * - accepting investments\n * - minimum funding goal and refund\n * - various statistics during the crowdfund\n * - different pricing strategies\n * - different investment policies (require server side customer id, allow only whitelisted addresses)\n *\n * Does not Handle\n *\n * - Token allocation (minting vs. transfer)\n * - Cap rules\n *\n */\ncontract Crowdsale is CrowdsaleBase {\n\n /* Do we need to have unique contributor id for each customer */\n bool public requireCustomerId;\n\n /**\n * Do we verify that contributor has been cleared on the server side (accredited investors only).\n * This method was first used in FirstBlood crowdsale to ensure all contributors have accepted terms on sale (on the web).\n */\n bool public requiredSignedAddress;\n\n /* Server side address that signed allowed contributors (Ethereum addresses) that can participate the crowdsale */\n address public signerAddress;\n\n function Crowdsale(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal) CrowdsaleBase(_token, _pricingStrategy, _multisigWallet, _start, _end, _minimumFundingGoal) {\n }\n\n /**\n * Preallocate tokens for the early investors.\n *\n * Preallocated tokens have been sold before the actual crowdsale opens.\n * This function mints the tokens and moves the crowdsale needle.\n *\n * Investor count is not handled; it is assumed this goes for multiple investors\n * and the token distribution happens outside the smart contract flow.\n *\n * No money is exchanged, as the crowdsale team already have received the payment.\n *\n * @param fullTokens tokens as full tokens - decimal places added internally\n * @param weiPrice Price of a single full token in wei\n *\n */\n function preallocate(address receiver, uint fullTokens, uint weiPrice) public onlyOwner {\n\n uint tokenAmount = fullTokens * 10**token.decimals();\n uint weiAmount = weiPrice * fullTokens; // This can be also 0, we give out tokens for free\n\n weiRaised = weiRaised.plus(weiAmount);\n tokensSold = tokensSold.plus(tokenAmount);\n\n investedAmountOf[receiver] = investedAmountOf[receiver].plus(weiAmount);\n tokenAmountOf[receiver] = tokenAmountOf[receiver].plus(tokenAmount);\n\n assignTokens(receiver, tokenAmount);\n\n // Tell us invest was success\n Invested(receiver, weiAmount, tokenAmount, 0);\n }\n\n /**\n * Allow anonymous contributions to this crowdsale.\n */\n function investWithSignedAddress(address addr, uint128 customerId, uint8 v, bytes32 r, bytes32 s) public payable {\n bytes32 hash = sha256(addr);\n if (ecrecover(hash, v, r, s) != signerAddress) throw;\n if(customerId == 0) throw; // UUIDv4 sanity check\n investInternal(addr, customerId);\n }\n\n /**\n * Track who is the customer making the payment so we can send thank you email.\n */\n function investWithCustomerId(address addr, uint128 customerId) public payable {\n if(requiredSignedAddress) throw; // Crowdsale allows only server-side signed participants\n if(customerId == 0) throw; // UUIDv4 sanity check\n investInternal(addr, customerId);\n }\n\n /**\n * Allow anonymous contributions to this crowdsale.\n */\n function invest(address addr) public payable {\n if(requireCustomerId) throw; // Crowdsale needs to track participants for thank you email\n if(requiredSignedAddress) throw; // Crowdsale allows only server-side signed participants\n investInternal(addr, 0);\n }\n\n /**\n * Invest to tokens, recognize the payer and clear his address.\n *\n */\n function buyWithSignedAddress(uint128 customerId, uint8 v, bytes32 r, bytes32 s) public payable {\n investWithSignedAddress(msg.sender, customerId, v, r, s);\n }\n\n /**\n * Invest to tokens, recognize the payer.\n *\n */\n function buyWithCustomerIdWithChecksum(uint128 customerId, bytes1 checksum) public payable {\n // see customerid.py\n if (bytes1(sha3(customerId)) != checksum) throw;\n investWithCustomerId(msg.sender, customerId);\n }\n\n /**\n * Legacy API signature.\n */\n function buyWithCustomerId(uint128 customerId) public payable {\n investWithCustomerId(msg.sender, customerId);\n }\n\n /**\n * The basic entry point to participate the crowdsale process.\n *\n * Pay for funding, get invested tokens back in the sender address.\n */\n function buy() public payable {\n invest(msg.sender);\n }\n\n /**\n * Set policy do we need to have server-side customer ids for the investments.\n *\n */\n function setRequireCustomerId(bool value) onlyOwner {\n requireCustomerId = value;\n InvestmentPolicyChanged(requireCustomerId, requiredSignedAddress, signerAddress);\n }\n\n /**\n * Set policy if all investors must be cleared on the server side first.\n *\n * This is e.g. for the accredited investor clearing.\n *\n */\n function setRequireSignedAddress(bool value, address _signerAddress) onlyOwner {\n requiredSignedAddress = value;\n signerAddress = _signerAddress;\n InvestmentPolicyChanged(requireCustomerId, requiredSignedAddress, signerAddress);\n }\n\n}\n\n\n\n/**\n * Collect funds from presale investors to be send to the crowdsale smart contract later.\n *\n * - Collect funds from pre-sale investors\n * - Send funds to the crowdsale when it opens\n * - Allow owner to set the crowdsale\n * - Have refund after X days as a safety hatch if the crowdsale doesn't materilize\n *\n */\ncontract PresaleFundCollector is Ownable {\n\n using SafeMathLib for uint;\n\n /** How many investors when can carry per a single contract */\n uint public MAX_INVESTORS = 32;\n\n /** How many investors we have now */\n uint public investorCount;\n\n /** Who are our investors (iterable) */\n address[] public investors;\n\n /** How much they have invested */\n mapping(address => uint) public balances;\n\n /** When our refund freeze is over (UNIX timestamp) */\n uint public freezeEndsAt;\n\n /** What is the minimum buy in */\n uint public weiMinimumLimit;\n\n /** Have we begun to move funds */\n bool public moving;\n\n /** Our ICO contract where we will move the funds */\n Crowdsale public crowdsale;\n\n event Invested(address investor, uint value);\n event Refunded(address investor, uint value);\n\n /**\n * Create presale contract where lock up period is given days\n */\n function PresaleFundCollector(address _owner, uint _freezeEndsAt, uint _weiMinimumLimit) {\n\n owner = _owner;\n\n // Give argument\n if(_freezeEndsAt == 0) {\n throw;\n }\n\n // Give argument\n if(_weiMinimumLimit == 0) {\n throw;\n }\n\n weiMinimumLimit = _weiMinimumLimit;\n freezeEndsAt = _freezeEndsAt;\n }\n\n /**\n * Participate to a presale.\n */\n function invest() public payable {\n\n // Cannot invest anymore through crowdsale when moving has begun\n if(moving) throw;\n\n address investor = msg.sender;\n\n bool existing = balances[investor] > 0;\n\n balances[investor] = balances[investor].plus(msg.value);\n\n // Need to fulfill minimum limit\n if(balances[investor] < weiMinimumLimit) {\n throw;\n }\n\n // This is a new investor\n if(!existing) {\n\n // Limit number of investors to prevent too long loops\n if(investorCount >= MAX_INVESTORS) throw;\n\n investors.push(investor);\n investorCount++;\n }\n\n Invested(investor, msg.value);\n }\n\n /**\n * Load funds to the crowdsale for a single investor.\n */\n function participateCrowdsaleInvestor(address investor) public {\n\n // Crowdsale not yet set\n if(address(crowdsale) == 0) throw;\n\n moving = true;\n\n if(balances[investor] > 0) {\n uint amount = balances[investor];\n delete balances[investor];\n crowdsale.invest.value(amount)(investor);\n }\n }\n\n /**\n * Load funds to the crowdsale for all investor.\n *\n */\n function participateCrowdsaleAll() public {\n\n // We might hit a max gas limit in this loop,\n // and in this case you can simply call participateCrowdsaleInvestor() for all investors\n for(uint i=0; i bool) bearer;\n }\n\n /**\n * @dev give an address access to this role\n */\n function add(Role storage role, address addr)\n internal\n {\n role.bearer[addr] = true;\n }\n\n /**\n * @dev remove an address' access to this role\n */\n function remove(Role storage role, address addr)\n internal\n {\n role.bearer[addr] = false;\n }\n\n /**\n * @dev check if an address has this role\n * // reverts\n */\n function check(Role storage role, address addr)\n view\n internal\n {\n require(has(role, addr));\n }\n\n /**\n * @dev check if an address has this role\n * @return bool\n */\n function has(Role storage role, address addr)\n view\n internal\n returns (bool)\n {\n return role.bearer[addr];\n }\n}\n\n\n\n/**\n * @title RBAC (Role-Based Access Control)\n * @author Matt Condon (@Shrugs)\n * @dev Stores and provides setters and getters for roles and addresses.\n * Supports unlimited numbers of roles and addresses.\n * See //contracts/mocks/RBACMock.sol for an example of usage.\n * This RBAC method uses strings to key roles. It may be beneficial\n * for you to write your own implementation of this interface using Enums or similar.\n * It's also recommended that you define constants in the contract, like ROLE_ADMIN below,\n * to avoid typos.\n */\ncontract RBAC {\n using Roles for Roles.Role;\n\n mapping (string => Roles.Role) private roles;\n\n event RoleAdded(address addr, string roleName);\n event RoleRemoved(address addr, string roleName);\n\n /**\n * A constant role name for indicating admins.\n */\n string public constant ROLE_ADMIN = \"admin\";\n\n /**\n * @dev constructor. Sets msg.sender as admin by default\n */\n function RBAC()\n public\n {\n addRole(msg.sender, ROLE_ADMIN);\n }\n\n /**\n * @dev reverts if addr does not have role\n * @param addr address\n * @param roleName the name of the role\n * // reverts\n */\n function checkRole(address addr, string roleName)\n view\n public\n {\n roles[roleName].check(addr);\n }\n\n /**\n * @dev determine if addr has role\n * @param addr address\n * @param roleName the name of the role\n * @return bool\n */\n function hasRole(address addr, string roleName)\n view\n public\n returns (bool)\n {\n return roles[roleName].has(addr);\n }\n\n /**\n * @dev add a role to an address\n * @param addr address\n * @param roleName the name of the role\n */\n function adminAddRole(address addr, string roleName)\n onlyAdmin\n public\n {\n addRole(addr, roleName);\n }\n\n /**\n * @dev remove a role from an address\n * @param addr address\n * @param roleName the name of the role\n */\n function adminRemoveRole(address addr, string roleName)\n onlyAdmin\n public\n {\n removeRole(addr, roleName);\n }\n\n /**\n * @dev add a role to an address\n * @param addr address\n * @param roleName the name of the role\n */\n function addRole(address addr, string roleName)\n internal\n {\n roles[roleName].add(addr);\n RoleAdded(addr, roleName);\n }\n\n /**\n * @dev remove a role from an address\n * @param addr address\n * @param roleName the name of the role\n */\n function removeRole(address addr, string roleName)\n internal\n {\n roles[roleName].remove(addr);\n RoleRemoved(addr, roleName);\n }\n\n /**\n * @dev modifier to scope access to a single role (uses msg.sender as addr)\n * @param roleName the name of the role\n * // reverts\n */\n modifier onlyRole(string roleName)\n {\n checkRole(msg.sender, roleName);\n _;\n }\n\n /**\n * @dev modifier to scope access to admins\n * // reverts\n */\n modifier onlyAdmin()\n {\n checkRole(msg.sender, ROLE_ADMIN);\n _;\n }\n\n /**\n * @dev modifier to scope access to a set of roles (uses msg.sender as addr)\n * @param roleNames the names of the roles to scope access to\n * // reverts\n *\n * @TODO - when solidity supports dynamic arrays as arguments to modifiers, provide this\n * see: https://github.com/ethereum/solidity/issues/2467\n */\n // modifier onlyRoles(string[] roleNames) {\n // bool hasAnyRole = false;\n // for (uint8 i = 0; i < roleNames.length; i++) {\n // if (hasRole(msg.sender, roleNames[i])) {\n // hasAnyRole = true;\n // break;\n // }\n // }\n\n // require(hasAnyRole);\n\n // _;\n // }\n}\n"}, "Recoverable": {"abi": [{"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "recoverTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "tokensToBeReturned", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "bytecode": "0x608060405234801561001057600080fd5b5060008054600160a060020a031916331790556103f9806100326000396000f3006080604052600436106100615763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166316114acd81146100665780638da5cb5b14610096578063c45d19db146100d4578063f2fde38b14610114575b600080fd5b34801561007257600080fd5b5061009473ffffffffffffffffffffffffffffffffffffffff60043516610142565b005b3480156100a257600080fd5b506100ab610246565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b3480156100e057600080fd5b5061010273ffffffffffffffffffffffffffffffffffffffff60043516610262565b60408051918252519081900360200190f35b34801561012057600080fd5b5061009473ffffffffffffffffffffffffffffffffffffffff60043516610305565b60005473ffffffffffffffffffffffffffffffffffffffff16331461016657600080fd5b60005473ffffffffffffffffffffffffffffffffffffffff8083169163a9059cbb911661019284610262565b6040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561021757600080fd5b505af115801561022b573d6000803e3d6000fd5b505050506040513d602081101561024157600080fd5b505050565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905160009173ffffffffffffffffffffffffffffffffffffffff8416916370a082319160248082019260209290919082900301818787803b1580156102d357600080fd5b505af11580156102e7573d6000803e3d6000fd5b505050506040513d60208110156102fd57600080fd5b505192915050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461032957600080fd5b73ffffffffffffffffffffffffffffffffffffffff8116151561034b57600080fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff191673ffffffffffffffffffffffffffffffffffffffff929092169190911790555600a165627a7a7230582033246ccce11761e81fd21f9366984525779e2df75d872573e2952fd4013df6c30029", "bytecode_runtime": "0x6080604052600436106100615763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166316114acd81146100665780638da5cb5b14610096578063c45d19db146100d4578063f2fde38b14610114575b600080fd5b34801561007257600080fd5b5061009473ffffffffffffffffffffffffffffffffffffffff60043516610142565b005b3480156100a257600080fd5b506100ab610246565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b3480156100e057600080fd5b5061010273ffffffffffffffffffffffffffffffffffffffff60043516610262565b60408051918252519081900360200190f35b34801561012057600080fd5b5061009473ffffffffffffffffffffffffffffffffffffffff60043516610305565b60005473ffffffffffffffffffffffffffffffffffffffff16331461016657600080fd5b60005473ffffffffffffffffffffffffffffffffffffffff8083169163a9059cbb911661019284610262565b6040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561021757600080fd5b505af115801561022b573d6000803e3d6000fd5b505050506040513d602081101561024157600080fd5b505050565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905160009173ffffffffffffffffffffffffffffffffffffffff8416916370a082319160248082019260209290919082900301818787803b1580156102d357600080fd5b505af11580156102e7573d6000803e3d6000fd5b505050506040513d60208110156102fd57600080fd5b505192915050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461032957600080fd5b73ffffffffffffffffffffffffffffffffffffffff8116151561034b57600080fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff191673ffffffffffffffffffffffffffffffffffffffff929092169190911790555600a165627a7a7230582033246ccce11761e81fd21f9366984525779e2df75d872573e2952fd4013df6c30029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "recoverTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "tokensToBeReturned", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "devdoc": {"methods": {"recoverTokens(address)": {"details": "This will be invoked by the owner, when owner wants to rescue tokens", "params": {"token": "Token which will we rescue to the owner from the contract"}}, "tokensToBeReturned(address)": {"details": "Interface function, can be overwritten by the superclass", "params": {"token": "Token which balance we will check and return"}, "return": "The amount of tokens (in smallest denominator) the contract owns"}, "transferOwnership(address)": {"details": "Allows the current owner to transfer control of the contract to a newOwner.", "params": {"newOwner": "The address to transfer ownership to."}}}}, "userdoc": {"methods": {}}}, "settings": {"compilationTarget": {"contracts/Recoverable.sol": "Recoverable"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/Recoverable.sol": {"keccak256": "0x311a332cdd87df6e00057f5455f4e68b043b5dbe211f6d68bc64e20817515635", "urls": ["bzzr://4fd99bcfb93baed6e7c8d22ee9ecc5c8346a1aa98288e77b01333b2c5d3f582d"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}}, "version": 1}, "name": "Recoverable", "ordered_full_dependencies": [], "source_path": "contracts/Recoverable.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\ncontract Recoverable is Ownable {\n\n /// @dev Empty constructor (for now)\n function Recoverable() {\n }\n\n /// @dev This will be invoked by the owner, when owner wants to rescue tokens\n /// @param token Token which will we rescue to the owner from the contract\n function recoverTokens(ERC20Basic token) onlyOwner public {\n token.transfer(owner, tokensToBeReturned(token));\n }\n\n /// @dev Interface function, can be overwritten by the superclass\n /// @param token Token which balance we will check and return\n /// @return The amount of tokens (in smallest denominator) the contract owns\n function tokensToBeReturned(ERC20Basic token) public returns (uint) {\n return token.balanceOf(this);\n }\n}\n"}, "RelaunchedCrowdsale": {"abi": [{"constant": true, "inputs": [], "name": "ownerTestValue", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "requireCustomerId", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "invest", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "isPricingSane", "outputs": [{"name": "sane", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "endsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "minimumFundingGoal", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_addr", "type": "address"}, {"name": "_weiAmount", "type": "uint256"}, {"name": "_tokenAmount", "type": "uint256"}, {"name": "_originalTxHash", "type": "uint256"}], "name": "setInvestorData", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "getState", "outputs": [{"name": "", "type": "uint8"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setFinalizeAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "customerId", "type": "uint128"}, {"name": "v", "type": "uint8"}, {"name": "r", "type": "bytes32"}, {"name": "s", "type": "bytes32"}], "name": "investWithSignedAddress", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "investedAmountOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "finalizeAgent", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "receiver", "type": "address"}, {"name": "fullTokens", "type": "uint256"}, {"name": "weiPrice", "type": "uint256"}], "name": "preallocate", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "maximumSellableTokens", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "weiRaised", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isCrowdsale", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "finalize", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_pricingStrategy", "type": "address"}], "name": "setPricingStrategy", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "tokensSold", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "refund", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "signerAddress", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "uint256"}], "name": "reissuedTransactions", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "weiRefunded", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "halt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}, {"name": "checksum", "type": "bytes1"}], "name": "buyWithCustomerIdWithChecksum", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "time", "type": "uint256"}], "name": "setEndsAt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "pricingStrategy", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "loadedRefund", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isMinimumGoalReached", "outputs": [{"name": "reached", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "bool"}], "name": "setRequireCustomerId", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "loadRefund", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "val", "type": "uint256"}], "name": "setOwnerTestValue", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "weisTotal", "type": "uint256"}, {"name": "pricePerToken", "type": "uint256"}], "name": "calculateTokens", "outputs": [{"name": "tokensTotal", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "multisigWallet", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "tokenAmountOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}], "name": "buyWithCustomerId", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [{"name": "weiAmount", "type": "uint256"}, {"name": "tokenAmount", "type": "uint256"}, {"name": "weiRaisedTotal", "type": "uint256"}, {"name": "tokensSoldTotal", "type": "uint256"}], "name": "isBreakingCap", "outputs": [{"name": "limitBroken", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "buy", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "isFinalizerSane", "outputs": [{"name": "sane", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "startsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "finalized", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "halted", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "earlyParticipantWhitelist", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "unhalt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "requiredSignedAddress", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isCrowdsaleFull", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "investorCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "status", "type": "bool"}], "name": "setEarlyParicipantWhitelist", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_originalTxHash", "type": "uint256"}], "name": "getRestoredTransactionStatus", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "bool"}, {"name": "_signerAddress", "type": "address"}], "name": "setRequireSignedAddress", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "customerId", "type": "uint128"}], "name": "investWithCustomerId", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "_addr", "type": "address"}, {"name": "_weiAmount", "type": "uint256"}, {"name": "_tokenAmount", "type": "uint256"}, {"name": "_originalTxHash", "type": "uint256"}], "name": "setInvestorDataAndIssueNewToken", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setMultisig", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}, {"name": "v", "type": "uint8"}, {"name": "r", "type": "bytes32"}, {"name": "s", "type": "bytes32"}], "name": "buyWithSignedAddress", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "presaleWeiRaised", "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": "_token", "type": "address"}, {"name": "_pricingStrategy", "type": "address"}, {"name": "_multisigWallet", "type": "address"}, {"name": "_start", "type": "uint256"}, {"name": "_end", "type": "uint256"}, {"name": "_minimumFundingGoal", "type": "uint256"}, {"name": "_maximumSellableTokens", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"payable": true, "stateMutability": "payable", "type": "fallback"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "addr", "type": "address"}, {"indexed": false, "name": "originalTxHash", "type": "uint256"}], "name": "RestoredInvestment", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}, {"indexed": false, "name": "tokenAmount", "type": "uint256"}, {"indexed": false, "name": "customerId", "type": "uint128"}], "name": "Invested", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}], "name": "Refund", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newRequireCustomerId", "type": "bool"}, {"indexed": false, "name": "newRequiredSignedAddress", "type": "bool"}, {"indexed": false, "name": "newSignerAddress", "type": "address"}], "name": "InvestmentPolicyChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "addr", "type": "address"}, {"indexed": false, "name": "status", "type": "bool"}], "name": "Whitelisted", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newEndsAt", "type": "uint256"}], "name": "EndsAtChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "bytecode": "0x6080604052600560015560006009556000600a556000600b556000600c556000600d556000600e553480156200003457600080fd5b5060405160e0806200293a83398101604090815281516020830151918301516060840151608085015160a086015160c0909601516000805433600160a060020a0319918216811782161790915560028054909116600160a060020a038716179055939592939192909186868686868686868686868686858585858585620000c48564010000000062000153810204565b60058054600160a060020a031916600160a060020a038681169190911791829055161515620000f257600080fd5b821515620000ff57600080fd5b60078390558115156200011157600080fd5b600882905560075482116200012557600080fd5b8060068190555050505050505050505050505080601581905550505050505050505050505050505062000220565b600054600160a060020a031633146200016b57600080fd5b60038054600160a060020a031916600160a060020a038381169190911791829055604080517f04bbc255000000000000000000000000000000000000000000000000000000008152905192909116916304bbc255916004808201926020929091908290030181600087803b158015620001e357600080fd5b505af1158015620001f8573d6000803e3d6000fd5b505050506040513d60208110156200020f57600080fd5b505115156200021d57600080fd5b50565b61270a80620002306000396000f3006080604052600436106102be5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630226401d81146102c357806303ca0eed146102ea57806303f9c79314610313578063062b01ce146103295780630a09284a1461033e57806313f4e9771461035357806316164e15146103685780631865c57d1461039257806319b667da146103cb5780631a49803b146103ec5780631aae34601461042157806321d5c0f61461044257806332013ac3146104735780633ad075ea1461049a5780634042b66f146104af5780634551dd59146104c45780634bb278f3146104d957806350c67734146104ee578063518ab2a81461050f578063590e1ae3146105245780635b7633d0146105395780635d2fea9d1461054e5780635da89ac0146105665780635ed7ca5b1461057b5780636203f09f1461059057806363c6082f146105a55780636e50eb3f146105e757806378b99c24146105ff578063797d9437146106145780637c2e08a3146106295780637f7d711e1461063e57806387612102146106585780638d51faec146106605780638da5cb5b14610678578063903cc5831461068d5780639075becf146106a857806397b150ca146106bd57806399e9376c146106de5780639d3c663f146106fb578063a6f2ae3a1461071c578063a7ba44c314610724578063af46868214610739578063b3f05b971461074e578063b9b8af0b14610763578063cb16e6d014610778578063cb3e64fd14610799578063d222dc04146107ae578063d5d09021146107c3578063d7e64c00146107d8578063eac24932146107ed578063ed2f5b1a14610813578063ed68ff2c1461082b578063ef86944314610851578063f04cb80c1461087a578063f2fde38b146108a4578063f3283fba146108c5578063f4869726146108e6578063f7c00e2f1461090f578063fc0c546a14610924575b600080fd5b3480156102cf57600080fd5b506102d8610939565b60408051918252519081900360200190f35b3480156102f657600080fd5b506102ff61093f565b604080519115158252519081900360200190f35b610327600160a060020a0360043516610948565b005b34801561033557600080fd5b506102ff61097c565b34801561034a57600080fd5b506102d8610a13565b34801561035f57600080fd5b506102d8610a19565b34801561037457600080fd5b50610327600160a060020a0360043516602435604435606435610a1f565b34801561039e57600080fd5b506103a7610b2b565b604051808260078111156103b757fe5b60ff16815260200191505060405180910390f35b3480156103d757600080fd5b50610327600160a060020a0360043516610d19565b610327600160a060020a03600435166fffffffffffffffffffffffffffffffff6024351660ff60443516606435608435610dea565b34801561042d57600080fd5b506102d8600160a060020a0360043516610f12565b34801561044e57600080fd5b50610457610f24565b60408051600160a060020a039092168252519081900360200190f35b34801561047f57600080fd5b50610327600160a060020a0360043516602435604435610f33565b3480156104a657600080fd5b506102d86112e9565b3480156104bb57600080fd5b506102d86112ef565b3480156104d057600080fd5b506102ff6112f5565b3480156104e557600080fd5b506103276112fa565b3480156104fa57600080fd5b50610327600160a060020a03600435166113ff565b34801561051b57600080fd5b506102d861149a565b34801561053057600080fd5b506103276114a0565b34801561054557600080fd5b506104576115e6565b34801561055a57600080fd5b506102ff6004356115fb565b34801561057257600080fd5b506102d8611610565b34801561058757600080fd5b50610327611616565b34801561059c57600080fd5b506102d8611664565b6103276fffffffffffffffffffffffffffffffff600435167fff000000000000000000000000000000000000000000000000000000000000006024351661166a565b3480156105f357600080fd5b506103276004356116dc565b34801561060b57600080fd5b5061045761174a565b34801561062057600080fd5b506102d8611759565b34801561063557600080fd5b506102ff61175f565b34801561064a57600080fd5b50610327600435151561176a565b6103276117ee565b34801561066c57600080fd5b506103276004356118ae565b34801561068457600080fd5b506104576118ca565b34801561069957600080fd5b506102d86004356024356118d9565b3480156106b457600080fd5b50610457611a30565b3480156106c957600080fd5b506102d8600160a060020a0360043516611a3f565b6103276fffffffffffffffffffffffffffffffff60043516611a51565b34801561070757600080fd5b506102ff600435602435604435606435611a5b565b610327611a66565b34801561073057600080fd5b506102ff611a71565b34801561074557600080fd5b506102d8611adf565b34801561075a57600080fd5b506102ff611ae5565b34801561076f57600080fd5b506102ff611aee565b34801561078457600080fd5b506102ff600160a060020a0360043516611b0f565b3480156107a557600080fd5b50610327611b24565b3480156107ba57600080fd5b506102ff611b84565b3480156107cf57600080fd5b506102ff611b92565b3480156107e457600080fd5b506102d8611b9d565b3480156107f957600080fd5b50610327600160a060020a03600435166024351515611ba3565b34801561081f57600080fd5b506102ff600435611c1e565b34801561083757600080fd5b506103276004351515600160a060020a0360243516611c33565b610327600160a060020a03600435166fffffffffffffffffffffffffffffffff60243516611ce3565b34801561088657600080fd5b50610327600160a060020a0360043516602435604435606435611d25565b3480156108b057600080fd5b50610327600160a060020a0360043516611e24565b3480156108d157600080fd5b50610327600160a060020a0360043516611eb8565b6103276fffffffffffffffffffffffffffffffff6004351660ff60243516604435606435611f0f565b34801561091b57600080fd5b506102d8611f22565b34801561093057600080fd5b50610457611f28565b60135481565b60145460ff1681565b60145460ff161561095857600080fd5b601454610100900460ff161561096d57600080fd5b610978816000611f37565b5050565b600354604080517f8e7682880000000000000000000000000000000000000000000000000000000081523060048201529051600092600160a060020a031691638e76828891602480830192602092919082900301818787803b1580156109e157600080fd5b505af11580156109f5573d6000803e3d6000fd5b505050506040513d6020811015610a0b57600080fd5b505190505b90565b60085481565b60065481565b600054600160a060020a03163314610a3657600080fd5b600160a060020a0384166000908152601060205260409020541515610a5f57600c805460010190555b600160a060020a038416600081815260106020908152604080832080548801905560118252808320805487019055600a805488019055600980548701905580519384529083018690528281018590526060830191909152517f0396f60aaad038749091d273dc13aaabc63db6e2271c7bad442d5cf25cc433509181900360800190a160408051600160a060020a03861681526020810183905281517f08b1adf3440f557bc3ad64e718e68b3656a43fdde2a00cbecf89765352b76cb6929181900390910190a150505050565b600f5460009060ff1615610b4157506006610a10565b600454600160a060020a03161515610b5b57506001610a10565b60048054604080517f82771c8e0000000000000000000000000000000000000000000000000000000081529051600160a060020a03909216926382771c8e9282820192602092908290030181600087803b158015610bb857600080fd5b505af1158015610bcc573d6000803e3d6000fd5b505050506040513d6020811015610be257600080fd5b50511515610bf257506001610a10565b600354604080517f8e7682880000000000000000000000000000000000000000000000000000000081523060048201529051600160a060020a0390921691638e768288916024808201926020929091908290030181600087803b158015610c5857600080fd5b505af1158015610c6c573d6000803e3d6000fd5b505050506040513d6020811015610c8257600080fd5b50511515610c9257506001610a10565b600754421015610ca457506002610a10565b6008544211158015610cbb5750610cb9611b92565b155b15610cc857506003610a10565b610cd061175f565b15610cdd57506004610a10565b610ce561175f565b158015610cf457506000600a54115b8015610d045750600a54600d5410155b15610d1157506007610a10565b506005610a10565b600054600160a060020a03163314610d3057600080fd5b6004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383811691909117808355604080517f614cb9040000000000000000000000000000000000000000000000000000000081529051919092169263614cb904928082019260209290918290030181600087803b158015610db057600080fd5b505af1158015610dc4573d6000803e3d6000fd5b505050506040513d6020811015610dda57600080fd5b50511515610de757600080fd5b50565b60006002866040518082600160a060020a0316600160a060020a03166c010000000000000000000000000281526014019150506020604051808303816000865af1158015610e3c573d6000803e3d6000fd5b5050506040513d6020811015610e5157600080fd5b5051601454604080516000808252602080830180855286905260ff8a16838501526060830189905260808301889052925194955062010000909304600160a060020a03169360019360a08084019493601f198401939081900390910191865af1158015610ec2573d6000803e3d6000fd5b50505060206040510351600160a060020a0316141515610ee157600080fd5b6fffffffffffffffffffffffffffffffff85161515610eff57600080fd5b610f098686611f37565b50505050505050565b60106020526000908152604090205481565b600454600160a060020a031681565b600080548190600160a060020a03163314610f4d57600080fd5b600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610fb957600080fd5b505af1158015610fcd573d6000803e3d6000fd5b505050506040513d6020811015610fe357600080fd5b5051600a8054604080516000805160206126bf833981519152815260048101929092528688026024830181905290519390920a8702945090925073__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f91604480820192602092909190829003018186803b15801561105957600080fd5b505af415801561106d573d6000803e3d6000fd5b505050506040513d602081101561108357600080fd5b5051600a55600954604080516000805160206126bf83398151915281526004810192909252602482018490525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b1580156110eb57600080fd5b505af41580156110ff573d6000803e3d6000fd5b505050506040513d602081101561111557600080fd5b5051600955600160a060020a0385166000908152601060209081526040918290205482516000805160206126bf8339815191528152600481019190915260248101849052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561119357600080fd5b505af41580156111a7573d6000803e3d6000fd5b505050506040513d60208110156111bd57600080fd5b5051600160a060020a03861660009081526010602090815260408083209390935560118152908290205482516000805160206126bf8339815191528152600481019190915260248101859052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561124357600080fd5b505af4158015611257573d6000803e3d6000fd5b505050506040513d602081101561126d57600080fd5b5051600160a060020a03861660009081526011602052604090205561129285836120de565b60408051600160a060020a0387168152602081018390528082018490526000606082015290517f0396f60aaad038749091d273dc13aaabc63db6e2271c7bad442d5cf25cc433509181900360800190a15050505050565b60155481565b600a5481565b600190565b600480611305610b2b565b600781111561131057fe5b1461131a57600080fd5b600054600160a060020a0316331461133157600080fd5b60005474010000000000000000000000000000000000000000900460ff161561135957600080fd5b600f5460ff161561136957600080fd5b600454600160a060020a0316156113ef5760048054604080517f0bf318a30000000000000000000000000000000000000000000000000000000081529051600160a060020a0390921692630bf318a392828201926000929082900301818387803b1580156113d657600080fd5b505af11580156113ea573d6000803e3d6000fd5b505050505b50600f805460ff19166001179055565b600054600160a060020a0316331461141657600080fd5b6003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038381169190911791829055604080517f04bbc255000000000000000000000000000000000000000000000000000000008152905192909116916304bbc255916004808201926020929091908290030181600087803b158015610db057600080fd5b60095481565b60006007806114ad610b2b565b60078111156114b857fe5b146114c257600080fd5b3360009081526010602052604090205491508115156114e057600080fd5b33600090815260106020908152604080832092909255600e5482516000805160206126bf8339815191528152600481019190915260248101859052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561155557600080fd5b505af4158015611569573d6000803e3d6000fd5b505050506040513d602081101561157f57600080fd5b5051600e55604080513381526020810184905281517fbb28353e4598c3b9199101a66e0989549b659a59a54d2c27fbb183f1932c8e6d929181900390910190a1604051339083156108fc029084906000818181858888f19350505050151561097857600080fd5b601454620100009004600160a060020a031681565b60166020526000908152604090205460ff1681565b600e5481565b600054600160a060020a0316331461162d57600080fd5b6000805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b60015481565b604080517001000000000000000000000000000000006fffffffffffffffffffffffffffffffff851602815290519081900360100190207fff00000000000000000000000000000000000000000000000000000000000000908116908216146116d257600080fd5b6109783383611ce3565b600054600160a060020a031633146116f357600080fd5b8042111561170057600080fd5b80600754111561170f57600080fd5b60088190556040805182815290517fd34bb772c4ae9baa99db852f622773b31c7827e8ee818449fef20d30980bd3109181900360200190a150565b600354600160a060020a031681565b600d5481565b600654600a54101590565b600054600160a060020a0316331461178157600080fd5b6014805460ff191682151517908190556040805160ff808416151582526101008404161515602082015262010000909204600160a060020a031682820152517f48d826081348f5f00e8a33c9ae8ce89ed4c6e88400b585a478bc203d9e8177d3916060908290030190a150565b6005806117f9610b2b565b600781111561180457fe5b1461180e57600080fd5b34151561181a57600080fd5b600d54604080516000805160206126bf833981519152815260048101929092523460248301525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b15801561187c57600080fd5b505af4158015611890573d6000803e3d6000fd5b505050506040513d60208110156118a657600080fd5b5051600d5550565b600054600160a060020a031633146118c557600080fd5b601355565b600054600160a060020a031681565b600080600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561194857600080fd5b505af115801561195c573d6000803e3d6000fd5b505050506040513d602081101561197257600080fd5b5051604080517f1d3b9edf00000000000000000000000000000000000000000000000000000000815260048101879052600a9290920a602483018190529051909250849173__contracts/SafeMathLib.sol:SafeMathLi__91631d3b9edf91604480820192602092909190829003018186803b1580156119f257600080fd5b505af4158015611a06573d6000803e3d6000fd5b505050506040513d6020811015611a1c57600080fd5b5051811515611a2757fe5b04949350505050565b600554600160a060020a031681565b60116020526000908152604090205481565b610de73382611ce3565b601554109392505050565b611a6f33610948565b565b6000600460009054906101000a9004600160a060020a0316600160a060020a03166382771c8e6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156109e157600080fd5b60075481565b600f5460ff1681565b60005474010000000000000000000000000000000000000000900460ff1681565b60126020526000908152604090205460ff1681565b600054600160a060020a03163314611b3b57600080fd5b60005474010000000000000000000000000000000000000000900460ff161515611b6457600080fd5b6000805474ff000000000000000000000000000000000000000019169055565b601454610100900460ff1681565b601554600954101590565b600c5481565b600054600160a060020a03163314611bba57600080fd5b600160a060020a038216600081815260126020908152604091829020805460ff191685151590811790915582519384529083015280517fa54714518c5d275fdcd3d2a461e4858e4e8cb04fb93cd0bca9d6d34115f264409281900390910190a15050565b60009081526016602052604090205460ff1690565b600054600160a060020a03163314611c4a57600080fd5b60148054600160a060020a038084166201000090810275ffffffffffffffffffffffffffffffffffffffff00001987151561010090810261ff0019909616959095171617938490556040805160ff86811615158252948604909416151560208501529304168183015290517f48d826081348f5f00e8a33c9ae8ce89ed4c6e88400b585a478bc203d9e8177d39181900360600190a15050565b601454610100900460ff1615611cf857600080fd5b6fffffffffffffffffffffffffffffffff81161515611d1657600080fd5b611d208282611f37565b505050565b60008054600160a060020a03163314611d3d57600080fd5b60008281526016602052604090205460ff1615611d5957600080fd5b611d6585858585610a1f565b611d758484600a54600954611a5b565b15611d7f57600080fd5b50600081815260166020526040808220805460ff1916600117905560025481517f40c10f19000000000000000000000000000000000000000000000000000000008152600160a060020a038881166004830152602482018790529251929091169283926340c10f1992604480820193929182900301818387803b158015611e0557600080fd5b505af1158015611e19573d6000803e3d6000fd5b505050505050505050565b600054600160a060020a03163314611e3b57600080fd5b600160a060020a0381161515611e5057600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600054600160a060020a03163314611ecf57600080fd5b600154600c541115611ee057600080fd5b6005805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b611f1c3385858585610dea565b50505050565b600b5481565b600254600160a060020a031681565b6000805474010000000000000000000000000000000000000000900460ff1615611f6057600080fd5b6120d78383600360009054906101000a9004600160a060020a0316600160a060020a03166318a4155e34600b54600a540360095433600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561200157600080fd5b505af1158015612015573d6000803e3d6000fd5b505050506040513d602081101561202b57600080fd5b5051604080517c010000000000000000000000000000000000000000000000000000000063ffffffff8916028152600481019690965260248601949094526044850192909252600160a060020a0316606484015260848301525160a48083019260209291908290030181600087803b1580156120a657600080fd5b505af11580156120ba573d6000803e3d6000fd5b505050506040513d60208110156120d057600080fd5b5051612163565b9392505050565b600254604080517f40c10f19000000000000000000000000000000000000000000000000000000008152600160a060020a038581166004830152602482018590529151919092169182916340c10f199160448082019260009290919082900301818387803b15801561214f57600080fd5b505af1158015610f09573d6000803e3d6000fd5b60008054819074010000000000000000000000000000000000000000900460ff161561218e57600080fd5b6002612198610b2b565b60078111156121a357fe5b14156121d557600160a060020a03851660009081526012602052604090205460ff1615156121d057600080fd5b6121f1565b60036121df610b2b565b60078111156121ea57fe5b14156102be575b50348215156121ff57600080fd5b600160a060020a038516600090815260106020526040902054151561222857600c805460010190555b600160a060020a0385166000908152601060209081526040918290205482516000805160206126bf8339815191528152600481019190915260248101849052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b1580156122a157600080fd5b505af41580156122b5573d6000803e3d6000fd5b505050506040513d60208110156122cb57600080fd5b5051600160a060020a03861660009081526010602090815260408083209390935560118152908290205482516000805160206126bf8339815191528152600481019190915260248101869052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561235157600080fd5b505af4158015612365573d6000803e3d6000fd5b505050506040513d602081101561237b57600080fd5b5051600160a060020a03861660009081526011602090815260409182902092909255600a5481516000805160206126bf8339815191528152600481019190915260248101849052905173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f9260448082019391829003018186803b1580156123fb57600080fd5b505af415801561240f573d6000803e3d6000fd5b505050506040513d602081101561242557600080fd5b5051600a55600954604080516000805160206126bf83398151915281526004810192909252602482018590525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b15801561248d57600080fd5b505af41580156124a1573d6000803e3d6000fd5b505050506040513d60208110156124b757600080fd5b5051600955600354604080517ff14ae17d000000000000000000000000000000000000000000000000000000008152600160a060020a0388811660048301529151919092169163f14ae17d9160248083019260209291908290030181600087803b15801561252457600080fd5b505af1158015612538573d6000803e3d6000fd5b505050506040513d602081101561254e57600080fd5b5051156125fc57600b5473__contracts/SafeMathLib.sol:SafeMathLi__6366098d4f9091836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b1580156125cc57600080fd5b505af41580156125e0573d6000803e3d6000fd5b505050506040513d60208110156125f657600080fd5b5051600b555b61260c8184600a54600954611a5b565b1561261657600080fd5b61262085846120de565b600554604051600160a060020a039091169082156108fc029083906000818181858888f19350505050151561265457600080fd5b60408051600160a060020a0387168152602081018390528082018590526fffffffffffffffffffffffffffffffff8616606082015290517f0396f60aaad038749091d273dc13aaabc63db6e2271c7bad442d5cf25cc433509181900360800190a150909392505050560066098d4f00000000000000000000000000000000000000000000000000000000a165627a7a72305820537e20e1f4e1a8ba39ab38b36b061dd9a767870fe94ab2d6ff1875238f42624e0029", "bytecode_runtime": "0x6080604052600436106102be5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630226401d81146102c357806303ca0eed146102ea57806303f9c79314610313578063062b01ce146103295780630a09284a1461033e57806313f4e9771461035357806316164e15146103685780631865c57d1461039257806319b667da146103cb5780631a49803b146103ec5780631aae34601461042157806321d5c0f61461044257806332013ac3146104735780633ad075ea1461049a5780634042b66f146104af5780634551dd59146104c45780634bb278f3146104d957806350c67734146104ee578063518ab2a81461050f578063590e1ae3146105245780635b7633d0146105395780635d2fea9d1461054e5780635da89ac0146105665780635ed7ca5b1461057b5780636203f09f1461059057806363c6082f146105a55780636e50eb3f146105e757806378b99c24146105ff578063797d9437146106145780637c2e08a3146106295780637f7d711e1461063e57806387612102146106585780638d51faec146106605780638da5cb5b14610678578063903cc5831461068d5780639075becf146106a857806397b150ca146106bd57806399e9376c146106de5780639d3c663f146106fb578063a6f2ae3a1461071c578063a7ba44c314610724578063af46868214610739578063b3f05b971461074e578063b9b8af0b14610763578063cb16e6d014610778578063cb3e64fd14610799578063d222dc04146107ae578063d5d09021146107c3578063d7e64c00146107d8578063eac24932146107ed578063ed2f5b1a14610813578063ed68ff2c1461082b578063ef86944314610851578063f04cb80c1461087a578063f2fde38b146108a4578063f3283fba146108c5578063f4869726146108e6578063f7c00e2f1461090f578063fc0c546a14610924575b600080fd5b3480156102cf57600080fd5b506102d8610939565b60408051918252519081900360200190f35b3480156102f657600080fd5b506102ff61093f565b604080519115158252519081900360200190f35b610327600160a060020a0360043516610948565b005b34801561033557600080fd5b506102ff61097c565b34801561034a57600080fd5b506102d8610a13565b34801561035f57600080fd5b506102d8610a19565b34801561037457600080fd5b50610327600160a060020a0360043516602435604435606435610a1f565b34801561039e57600080fd5b506103a7610b2b565b604051808260078111156103b757fe5b60ff16815260200191505060405180910390f35b3480156103d757600080fd5b50610327600160a060020a0360043516610d19565b610327600160a060020a03600435166fffffffffffffffffffffffffffffffff6024351660ff60443516606435608435610dea565b34801561042d57600080fd5b506102d8600160a060020a0360043516610f12565b34801561044e57600080fd5b50610457610f24565b60408051600160a060020a039092168252519081900360200190f35b34801561047f57600080fd5b50610327600160a060020a0360043516602435604435610f33565b3480156104a657600080fd5b506102d86112e9565b3480156104bb57600080fd5b506102d86112ef565b3480156104d057600080fd5b506102ff6112f5565b3480156104e557600080fd5b506103276112fa565b3480156104fa57600080fd5b50610327600160a060020a03600435166113ff565b34801561051b57600080fd5b506102d861149a565b34801561053057600080fd5b506103276114a0565b34801561054557600080fd5b506104576115e6565b34801561055a57600080fd5b506102ff6004356115fb565b34801561057257600080fd5b506102d8611610565b34801561058757600080fd5b50610327611616565b34801561059c57600080fd5b506102d8611664565b6103276fffffffffffffffffffffffffffffffff600435167fff000000000000000000000000000000000000000000000000000000000000006024351661166a565b3480156105f357600080fd5b506103276004356116dc565b34801561060b57600080fd5b5061045761174a565b34801561062057600080fd5b506102d8611759565b34801561063557600080fd5b506102ff61175f565b34801561064a57600080fd5b50610327600435151561176a565b6103276117ee565b34801561066c57600080fd5b506103276004356118ae565b34801561068457600080fd5b506104576118ca565b34801561069957600080fd5b506102d86004356024356118d9565b3480156106b457600080fd5b50610457611a30565b3480156106c957600080fd5b506102d8600160a060020a0360043516611a3f565b6103276fffffffffffffffffffffffffffffffff60043516611a51565b34801561070757600080fd5b506102ff600435602435604435606435611a5b565b610327611a66565b34801561073057600080fd5b506102ff611a71565b34801561074557600080fd5b506102d8611adf565b34801561075a57600080fd5b506102ff611ae5565b34801561076f57600080fd5b506102ff611aee565b34801561078457600080fd5b506102ff600160a060020a0360043516611b0f565b3480156107a557600080fd5b50610327611b24565b3480156107ba57600080fd5b506102ff611b84565b3480156107cf57600080fd5b506102ff611b92565b3480156107e457600080fd5b506102d8611b9d565b3480156107f957600080fd5b50610327600160a060020a03600435166024351515611ba3565b34801561081f57600080fd5b506102ff600435611c1e565b34801561083757600080fd5b506103276004351515600160a060020a0360243516611c33565b610327600160a060020a03600435166fffffffffffffffffffffffffffffffff60243516611ce3565b34801561088657600080fd5b50610327600160a060020a0360043516602435604435606435611d25565b3480156108b057600080fd5b50610327600160a060020a0360043516611e24565b3480156108d157600080fd5b50610327600160a060020a0360043516611eb8565b6103276fffffffffffffffffffffffffffffffff6004351660ff60243516604435606435611f0f565b34801561091b57600080fd5b506102d8611f22565b34801561093057600080fd5b50610457611f28565b60135481565b60145460ff1681565b60145460ff161561095857600080fd5b601454610100900460ff161561096d57600080fd5b610978816000611f37565b5050565b600354604080517f8e7682880000000000000000000000000000000000000000000000000000000081523060048201529051600092600160a060020a031691638e76828891602480830192602092919082900301818787803b1580156109e157600080fd5b505af11580156109f5573d6000803e3d6000fd5b505050506040513d6020811015610a0b57600080fd5b505190505b90565b60085481565b60065481565b600054600160a060020a03163314610a3657600080fd5b600160a060020a0384166000908152601060205260409020541515610a5f57600c805460010190555b600160a060020a038416600081815260106020908152604080832080548801905560118252808320805487019055600a805488019055600980548701905580519384529083018690528281018590526060830191909152517f0396f60aaad038749091d273dc13aaabc63db6e2271c7bad442d5cf25cc433509181900360800190a160408051600160a060020a03861681526020810183905281517f08b1adf3440f557bc3ad64e718e68b3656a43fdde2a00cbecf89765352b76cb6929181900390910190a150505050565b600f5460009060ff1615610b4157506006610a10565b600454600160a060020a03161515610b5b57506001610a10565b60048054604080517f82771c8e0000000000000000000000000000000000000000000000000000000081529051600160a060020a03909216926382771c8e9282820192602092908290030181600087803b158015610bb857600080fd5b505af1158015610bcc573d6000803e3d6000fd5b505050506040513d6020811015610be257600080fd5b50511515610bf257506001610a10565b600354604080517f8e7682880000000000000000000000000000000000000000000000000000000081523060048201529051600160a060020a0390921691638e768288916024808201926020929091908290030181600087803b158015610c5857600080fd5b505af1158015610c6c573d6000803e3d6000fd5b505050506040513d6020811015610c8257600080fd5b50511515610c9257506001610a10565b600754421015610ca457506002610a10565b6008544211158015610cbb5750610cb9611b92565b155b15610cc857506003610a10565b610cd061175f565b15610cdd57506004610a10565b610ce561175f565b158015610cf457506000600a54115b8015610d045750600a54600d5410155b15610d1157506007610a10565b506005610a10565b600054600160a060020a03163314610d3057600080fd5b6004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383811691909117808355604080517f614cb9040000000000000000000000000000000000000000000000000000000081529051919092169263614cb904928082019260209290918290030181600087803b158015610db057600080fd5b505af1158015610dc4573d6000803e3d6000fd5b505050506040513d6020811015610dda57600080fd5b50511515610de757600080fd5b50565b60006002866040518082600160a060020a0316600160a060020a03166c010000000000000000000000000281526014019150506020604051808303816000865af1158015610e3c573d6000803e3d6000fd5b5050506040513d6020811015610e5157600080fd5b5051601454604080516000808252602080830180855286905260ff8a16838501526060830189905260808301889052925194955062010000909304600160a060020a03169360019360a08084019493601f198401939081900390910191865af1158015610ec2573d6000803e3d6000fd5b50505060206040510351600160a060020a0316141515610ee157600080fd5b6fffffffffffffffffffffffffffffffff85161515610eff57600080fd5b610f098686611f37565b50505050505050565b60106020526000908152604090205481565b600454600160a060020a031681565b600080548190600160a060020a03163314610f4d57600080fd5b600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610fb957600080fd5b505af1158015610fcd573d6000803e3d6000fd5b505050506040513d6020811015610fe357600080fd5b5051600a8054604080516000805160206126bf833981519152815260048101929092528688026024830181905290519390920a8702945090925073__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f91604480820192602092909190829003018186803b15801561105957600080fd5b505af415801561106d573d6000803e3d6000fd5b505050506040513d602081101561108357600080fd5b5051600a55600954604080516000805160206126bf83398151915281526004810192909252602482018490525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b1580156110eb57600080fd5b505af41580156110ff573d6000803e3d6000fd5b505050506040513d602081101561111557600080fd5b5051600955600160a060020a0385166000908152601060209081526040918290205482516000805160206126bf8339815191528152600481019190915260248101849052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561119357600080fd5b505af41580156111a7573d6000803e3d6000fd5b505050506040513d60208110156111bd57600080fd5b5051600160a060020a03861660009081526010602090815260408083209390935560118152908290205482516000805160206126bf8339815191528152600481019190915260248101859052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561124357600080fd5b505af4158015611257573d6000803e3d6000fd5b505050506040513d602081101561126d57600080fd5b5051600160a060020a03861660009081526011602052604090205561129285836120de565b60408051600160a060020a0387168152602081018390528082018490526000606082015290517f0396f60aaad038749091d273dc13aaabc63db6e2271c7bad442d5cf25cc433509181900360800190a15050505050565b60155481565b600a5481565b600190565b600480611305610b2b565b600781111561131057fe5b1461131a57600080fd5b600054600160a060020a0316331461133157600080fd5b60005474010000000000000000000000000000000000000000900460ff161561135957600080fd5b600f5460ff161561136957600080fd5b600454600160a060020a0316156113ef5760048054604080517f0bf318a30000000000000000000000000000000000000000000000000000000081529051600160a060020a0390921692630bf318a392828201926000929082900301818387803b1580156113d657600080fd5b505af11580156113ea573d6000803e3d6000fd5b505050505b50600f805460ff19166001179055565b600054600160a060020a0316331461141657600080fd5b6003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038381169190911791829055604080517f04bbc255000000000000000000000000000000000000000000000000000000008152905192909116916304bbc255916004808201926020929091908290030181600087803b158015610db057600080fd5b60095481565b60006007806114ad610b2b565b60078111156114b857fe5b146114c257600080fd5b3360009081526010602052604090205491508115156114e057600080fd5b33600090815260106020908152604080832092909255600e5482516000805160206126bf8339815191528152600481019190915260248101859052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561155557600080fd5b505af4158015611569573d6000803e3d6000fd5b505050506040513d602081101561157f57600080fd5b5051600e55604080513381526020810184905281517fbb28353e4598c3b9199101a66e0989549b659a59a54d2c27fbb183f1932c8e6d929181900390910190a1604051339083156108fc029084906000818181858888f19350505050151561097857600080fd5b601454620100009004600160a060020a031681565b60166020526000908152604090205460ff1681565b600e5481565b600054600160a060020a0316331461162d57600080fd5b6000805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b60015481565b604080517001000000000000000000000000000000006fffffffffffffffffffffffffffffffff851602815290519081900360100190207fff00000000000000000000000000000000000000000000000000000000000000908116908216146116d257600080fd5b6109783383611ce3565b600054600160a060020a031633146116f357600080fd5b8042111561170057600080fd5b80600754111561170f57600080fd5b60088190556040805182815290517fd34bb772c4ae9baa99db852f622773b31c7827e8ee818449fef20d30980bd3109181900360200190a150565b600354600160a060020a031681565b600d5481565b600654600a54101590565b600054600160a060020a0316331461178157600080fd5b6014805460ff191682151517908190556040805160ff808416151582526101008404161515602082015262010000909204600160a060020a031682820152517f48d826081348f5f00e8a33c9ae8ce89ed4c6e88400b585a478bc203d9e8177d3916060908290030190a150565b6005806117f9610b2b565b600781111561180457fe5b1461180e57600080fd5b34151561181a57600080fd5b600d54604080516000805160206126bf833981519152815260048101929092523460248301525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b15801561187c57600080fd5b505af4158015611890573d6000803e3d6000fd5b505050506040513d60208110156118a657600080fd5b5051600d5550565b600054600160a060020a031633146118c557600080fd5b601355565b600054600160a060020a031681565b600080600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561194857600080fd5b505af115801561195c573d6000803e3d6000fd5b505050506040513d602081101561197257600080fd5b5051604080517f1d3b9edf00000000000000000000000000000000000000000000000000000000815260048101879052600a9290920a602483018190529051909250849173__contracts/SafeMathLib.sol:SafeMathLi__91631d3b9edf91604480820192602092909190829003018186803b1580156119f257600080fd5b505af4158015611a06573d6000803e3d6000fd5b505050506040513d6020811015611a1c57600080fd5b5051811515611a2757fe5b04949350505050565b600554600160a060020a031681565b60116020526000908152604090205481565b610de73382611ce3565b601554109392505050565b611a6f33610948565b565b6000600460009054906101000a9004600160a060020a0316600160a060020a03166382771c8e6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156109e157600080fd5b60075481565b600f5460ff1681565b60005474010000000000000000000000000000000000000000900460ff1681565b60126020526000908152604090205460ff1681565b600054600160a060020a03163314611b3b57600080fd5b60005474010000000000000000000000000000000000000000900460ff161515611b6457600080fd5b6000805474ff000000000000000000000000000000000000000019169055565b601454610100900460ff1681565b601554600954101590565b600c5481565b600054600160a060020a03163314611bba57600080fd5b600160a060020a038216600081815260126020908152604091829020805460ff191685151590811790915582519384529083015280517fa54714518c5d275fdcd3d2a461e4858e4e8cb04fb93cd0bca9d6d34115f264409281900390910190a15050565b60009081526016602052604090205460ff1690565b600054600160a060020a03163314611c4a57600080fd5b60148054600160a060020a038084166201000090810275ffffffffffffffffffffffffffffffffffffffff00001987151561010090810261ff0019909616959095171617938490556040805160ff86811615158252948604909416151560208501529304168183015290517f48d826081348f5f00e8a33c9ae8ce89ed4c6e88400b585a478bc203d9e8177d39181900360600190a15050565b601454610100900460ff1615611cf857600080fd5b6fffffffffffffffffffffffffffffffff81161515611d1657600080fd5b611d208282611f37565b505050565b60008054600160a060020a03163314611d3d57600080fd5b60008281526016602052604090205460ff1615611d5957600080fd5b611d6585858585610a1f565b611d758484600a54600954611a5b565b15611d7f57600080fd5b50600081815260166020526040808220805460ff1916600117905560025481517f40c10f19000000000000000000000000000000000000000000000000000000008152600160a060020a038881166004830152602482018790529251929091169283926340c10f1992604480820193929182900301818387803b158015611e0557600080fd5b505af1158015611e19573d6000803e3d6000fd5b505050505050505050565b600054600160a060020a03163314611e3b57600080fd5b600160a060020a0381161515611e5057600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600054600160a060020a03163314611ecf57600080fd5b600154600c541115611ee057600080fd5b6005805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b611f1c3385858585610dea565b50505050565b600b5481565b600254600160a060020a031681565b6000805474010000000000000000000000000000000000000000900460ff1615611f6057600080fd5b6120d78383600360009054906101000a9004600160a060020a0316600160a060020a03166318a4155e34600b54600a540360095433600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561200157600080fd5b505af1158015612015573d6000803e3d6000fd5b505050506040513d602081101561202b57600080fd5b5051604080517c010000000000000000000000000000000000000000000000000000000063ffffffff8916028152600481019690965260248601949094526044850192909252600160a060020a0316606484015260848301525160a48083019260209291908290030181600087803b1580156120a657600080fd5b505af11580156120ba573d6000803e3d6000fd5b505050506040513d60208110156120d057600080fd5b5051612163565b9392505050565b600254604080517f40c10f19000000000000000000000000000000000000000000000000000000008152600160a060020a038581166004830152602482018590529151919092169182916340c10f199160448082019260009290919082900301818387803b15801561214f57600080fd5b505af1158015610f09573d6000803e3d6000fd5b60008054819074010000000000000000000000000000000000000000900460ff161561218e57600080fd5b6002612198610b2b565b60078111156121a357fe5b14156121d557600160a060020a03851660009081526012602052604090205460ff1615156121d057600080fd5b6121f1565b60036121df610b2b565b60078111156121ea57fe5b14156102be575b50348215156121ff57600080fd5b600160a060020a038516600090815260106020526040902054151561222857600c805460010190555b600160a060020a0385166000908152601060209081526040918290205482516000805160206126bf8339815191528152600481019190915260248101849052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b1580156122a157600080fd5b505af41580156122b5573d6000803e3d6000fd5b505050506040513d60208110156122cb57600080fd5b5051600160a060020a03861660009081526010602090815260408083209390935560118152908290205482516000805160206126bf8339815191528152600481019190915260248101869052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561235157600080fd5b505af4158015612365573d6000803e3d6000fd5b505050506040513d602081101561237b57600080fd5b5051600160a060020a03861660009081526011602090815260409182902092909255600a5481516000805160206126bf8339815191528152600481019190915260248101849052905173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f9260448082019391829003018186803b1580156123fb57600080fd5b505af415801561240f573d6000803e3d6000fd5b505050506040513d602081101561242557600080fd5b5051600a55600954604080516000805160206126bf83398151915281526004810192909252602482018590525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b15801561248d57600080fd5b505af41580156124a1573d6000803e3d6000fd5b505050506040513d60208110156124b757600080fd5b5051600955600354604080517ff14ae17d000000000000000000000000000000000000000000000000000000008152600160a060020a0388811660048301529151919092169163f14ae17d9160248083019260209291908290030181600087803b15801561252457600080fd5b505af1158015612538573d6000803e3d6000fd5b505050506040513d602081101561254e57600080fd5b5051156125fc57600b5473__contracts/SafeMathLib.sol:SafeMathLi__6366098d4f9091836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b1580156125cc57600080fd5b505af41580156125e0573d6000803e3d6000fd5b505050506040513d60208110156125f657600080fd5b5051600b555b61260c8184600a54600954611a5b565b1561261657600080fd5b61262085846120de565b600554604051600160a060020a039091169082156108fc029083906000818181858888f19350505050151561265457600080fd5b60408051600160a060020a0387168152602081018390528082018590526fffffffffffffffffffffffffffffffff8616606082015290517f0396f60aaad038749091d273dc13aaabc63db6e2271c7bad442d5cf25cc433509181900360800190a150909392505050560066098d4f00000000000000000000000000000000000000000000000000000000a165627a7a72305820537e20e1f4e1a8ba39ab38b36b061dd9a767870fe94ab2d6ff1875238f42624e0029", "direct_dependencies": ["SafeMathLib"], "full_dependencies": ["SafeMathLib"], "linkrefs": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 9374}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 9668}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 10010}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 10362}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 11934}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 13542}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 14288}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 18742}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 19094}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 19436}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 19720}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 20244}], "linkrefs_runtime": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 8254}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 8548}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 8890}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 9242}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 10814}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 12422}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 13168}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 17622}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 17974}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 18316}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 18600}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 19124}], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": true, "inputs": [], "name": "ownerTestValue", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "requireCustomerId", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "invest", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "isPricingSane", "outputs": [{"name": "sane", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "endsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "minimumFundingGoal", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_addr", "type": "address"}, {"name": "_weiAmount", "type": "uint256"}, {"name": "_tokenAmount", "type": "uint256"}, {"name": "_originalTxHash", "type": "uint256"}], "name": "setInvestorData", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "getState", "outputs": [{"name": "", "type": "uint8"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setFinalizeAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "customerId", "type": "uint128"}, {"name": "v", "type": "uint8"}, {"name": "r", "type": "bytes32"}, {"name": "s", "type": "bytes32"}], "name": "investWithSignedAddress", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "investedAmountOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "finalizeAgent", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "receiver", "type": "address"}, {"name": "fullTokens", "type": "uint256"}, {"name": "weiPrice", "type": "uint256"}], "name": "preallocate", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "maximumSellableTokens", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "weiRaised", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isCrowdsale", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "finalize", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_pricingStrategy", "type": "address"}], "name": "setPricingStrategy", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "tokensSold", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "refund", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "signerAddress", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "uint256"}], "name": "reissuedTransactions", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "weiRefunded", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "halt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}, {"name": "checksum", "type": "bytes1"}], "name": "buyWithCustomerIdWithChecksum", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "time", "type": "uint256"}], "name": "setEndsAt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "pricingStrategy", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "loadedRefund", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isMinimumGoalReached", "outputs": [{"name": "reached", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "bool"}], "name": "setRequireCustomerId", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "loadRefund", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "val", "type": "uint256"}], "name": "setOwnerTestValue", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "weisTotal", "type": "uint256"}, {"name": "pricePerToken", "type": "uint256"}], "name": "calculateTokens", "outputs": [{"name": "tokensTotal", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "multisigWallet", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "tokenAmountOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}], "name": "buyWithCustomerId", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [{"name": "weiAmount", "type": "uint256"}, {"name": "tokenAmount", "type": "uint256"}, {"name": "weiRaisedTotal", "type": "uint256"}, {"name": "tokensSoldTotal", "type": "uint256"}], "name": "isBreakingCap", "outputs": [{"name": "limitBroken", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "buy", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "isFinalizerSane", "outputs": [{"name": "sane", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "startsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "finalized", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "halted", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "earlyParticipantWhitelist", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "unhalt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "requiredSignedAddress", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isCrowdsaleFull", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "investorCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "status", "type": "bool"}], "name": "setEarlyParicipantWhitelist", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_originalTxHash", "type": "uint256"}], "name": "getRestoredTransactionStatus", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "bool"}, {"name": "_signerAddress", "type": "address"}], "name": "setRequireSignedAddress", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "customerId", "type": "uint128"}], "name": "investWithCustomerId", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "_addr", "type": "address"}, {"name": "_weiAmount", "type": "uint256"}, {"name": "_tokenAmount", "type": "uint256"}, {"name": "_originalTxHash", "type": "uint256"}], "name": "setInvestorDataAndIssueNewToken", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setMultisig", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}, {"name": "v", "type": "uint8"}, {"name": "r", "type": "bytes32"}, {"name": "s", "type": "bytes32"}], "name": "buyWithSignedAddress", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "presaleWeiRaised", "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": "_token", "type": "address"}, {"name": "_pricingStrategy", "type": "address"}, {"name": "_multisigWallet", "type": "address"}, {"name": "_start", "type": "uint256"}, {"name": "_end", "type": "uint256"}, {"name": "_minimumFundingGoal", "type": "uint256"}, {"name": "_maximumSellableTokens", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"payable": true, "stateMutability": "payable", "type": "fallback"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "addr", "type": "address"}, {"indexed": false, "name": "originalTxHash", "type": "uint256"}], "name": "RestoredInvestment", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}, {"indexed": false, "name": "tokenAmount", "type": "uint256"}, {"indexed": false, "name": "customerId", "type": "uint128"}], "name": "Invested", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}], "name": "Refund", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newRequireCustomerId", "type": "bool"}, {"indexed": false, "name": "newRequiredSignedAddress", "type": "bool"}, {"indexed": false, "name": "newSignerAddress", "type": "address"}], "name": "InvestmentPolicyChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "addr", "type": "address"}, {"indexed": false, "name": "status", "type": "bool"}], "name": "Whitelisted", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newEndsAt", "type": "uint256"}], "name": "EndsAtChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "devdoc": {"methods": {"calculateTokens(uint256,uint256)": {"details": "Calculate tokens user will have for their purchase", "params": {"pricePerToken": "What is the price for one token", "weisTotal": "How much ethers (in wei) the user putssssss in"}, "return": "tokensTotal which is received tokens, token decimals included"}, "isMinimumGoalReached()": {"return": "true if the crowdsale has raised enough money to be a successful."}, "preallocate(address,uint256,uint256)": {"params": {"fullTokens": "tokens as full tokens - decimal places added internally", "weiPrice": "Price of a single full token in wei "}}, "transferOwnership(address)": {"details": "Allows the current owner to transfer control of the contract to a newOwner.", "params": {"newOwner": "The address to transfer ownership to."}}}}, "userdoc": {"methods": {"buy()": {"notice": "The basic entry point to participate the crowdsale process. * Pay for funding, get invested tokens back in the sender address."}, "buyWithCustomerId(uint128)": {"notice": "Legacy API signature."}, "buyWithCustomerIdWithChecksum(uint128,bytes1)": {"notice": "Invest to tokens, recognize the payer. "}, "buyWithSignedAddress(uint128,uint8,bytes32,bytes32)": {"notice": "Invest to tokens, recognize the payer and clear his address. "}, "finalize()": {"notice": "Finalize a succcesful crowdsale. * The owner can triggre a call the contract that provides post-crowdsale actions, like releasing the tokens."}, "getRestoredTransactionStatus(uint256)": {"notice": "Check if a particular transaction has already been written."}, "getState()": {"notice": "Crowdfund state machine management. * We make it a function and do not assign the result to a variable, so there is no chance of the variable being stale."}, "invest(address)": {"notice": "Allow anonymous contributions to this crowdsale."}, "investWithCustomerId(address,uint128)": {"notice": "Track who is the customer making the payment so we can send thank you email."}, "investWithSignedAddress(address,uint128,uint8,bytes32,bytes32)": {"notice": "Allow anonymous contributions to this crowdsale."}, "isBreakingCap(uint256,uint256,uint256,uint256)": {"notice": "Called from invest() to confirm if the curret investment does not break our cap rule."}, "isCrowdsale()": {"notice": "Interface marker. "}, "isFinalizerSane()": {"notice": "Check if the contract relationship looks good."}, "isPricingSane()": {"notice": "Check if the contract relationship looks good."}, "loadRefund()": {"notice": "Allow load refunds back on the contract for the refunding. * The team can transfer the funds back on the smart contract in the case the minimum goal was not reached.."}, "preallocate(address,uint256,uint256)": {"notice": "Preallocate tokens for the early investors. * Preallocated tokens have been sold before the actual crowdsale opens. This function mints the tokens and moves the crowdsale needle. * Investor count is not handled; it is assumed this goes for multiple investors and the token distribution happens outside the smart contract flow. * No money is exchanged, as the crowdsale team already have received the payment."}, "refund()": {"notice": "Investors can claim refund. * Note that any refunds from proxy buyers should be handled separately, and not through this contract."}, "setEarlyParicipantWhitelist(address,bool)": {"notice": "Allow addresses to do early participation. * TODO: Fix spelling error in the name"}, "setEndsAt(uint256)": {"notice": "Allow crowdsale owner to close early or extend the crowdsale. * This is useful e.g. for a manual soft cap implementation: - after X amount is reached determine manual closing * This may put the crowdsale to an invalid state, but we trust owners know what they are doing. "}, "setFinalizeAgent(address)": {"notice": "Allow to (re)set finalize agent. * Design choice: no state restrictions on setting this, so that we can fix fat finger mistakes."}, "setInvestorData(address,uint256,uint256,uint256)": {"notice": "Rebuild the previous invest data back to the crowdsale."}, "setInvestorDataAndIssueNewToken(address,uint256,uint256,uint256)": {"notice": "Rebuild the previous invest data and do a token reissuance."}, "setMultisig(address)": {"notice": "Allow to change the team multisig address in the case of emergency. * This allows to save a deployed crowdsale wallet in the case the crowdsale has not yet begun (we have done only few test transactions). After the crowdsale is going then multisig address stays locked for the safety reasons."}, "setOwnerTestValue(uint256)": {"notice": "This is for manual testing of multisig wallet interaction "}, "setPricingStrategy(address)": {"notice": "Allow to (re)set pricing strategy. * Design choice: no state restrictions on the set, so that we can fix fat finger mistakes."}, "setRequireCustomerId(bool)": {"notice": "Set policy do we need to have server-side customer ids for the investments. "}, "setRequireSignedAddress(bool,address)": {"notice": "Set policy if all investors must be cleared on the server side first. * This is e.g. for the accredited investor clearing. "}}}}, "settings": {"compilationTarget": {"contracts/RelaunchedCrowdsale.sol": "RelaunchedCrowdsale"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/Crowdsale.sol": {"keccak256": "0x2697c26528f64bb954a7c2547d3b43317d2d2b02c7d9d05a7b1ab388cd79f65d", "urls": ["bzzr://f28b280794222114141c51dd5c388d403a7c98d8b51e04170a0e294246d5164b"]}, "contracts/CrowdsaleBase.sol": {"keccak256": "0xe2c9ed11183ce705616980df7b02544d72fe18b40395da7d9d4bcb621fb87871", "urls": ["bzzr://07f3887ba0d0eb3248b1ad3581480ed71a2fe70a47dcc283c4e97c8c92e0790a"]}, "contracts/FinalizeAgent.sol": {"keccak256": "0x309fd0510e0b3e2b5044e33f7c80cfb2d6f2a5697e41a5f185931d65770cfea9", "urls": ["bzzr://4e7ed6f82c0f542e92e56c12566b2ecd7666730865bf12566c27587ec64160ac"]}, "contracts/FractionalERC20.sol": {"keccak256": "0x75bc4ad90a8b13ce961c89b1bf405776f616e019d3a2720168f8e52be223198f", "urls": ["bzzr://6a3688f12da1a5c890ef06f80f883f6c5370886092d38a1b33cd4219b718478b"]}, "contracts/Haltable.sol": {"keccak256": "0x265dcf25e7c9ab4b6eecd2181f1b71334a1b5381a60f8db7d9526dab120f4b70", "urls": ["bzzr://d522e00fa9e075941469dd81738b59fdb99ce3c12cdc39e33abe40b588c4da9b"]}, "contracts/MintableToken.sol": {"keccak256": "0x650e1d6b2bedcd36508918357c7cf4f36fdd093cd0c4d6342f4dcd3bdcdd7578", "urls": ["bzzr://7ba2ac0480d428066a18727e2adb76ba56856ecd37b4420e801131ec8f8f4be3"]}, "contracts/MintedTokenCappedCrowdsale.sol": {"keccak256": "0xcbf855529729f71de827a444174aca4b9ea24afd98732a1b1676e1e40002b3cd", "urls": ["bzzr://2f5eb43ec94474c403930e5230551d1e78b8501efbde429e3dc65a00e8c683ee"]}, "contracts/PricingStrategy.sol": {"keccak256": "0x8df5093b7d07168ad994f9176de0bd2268f6563b1e8a3a448d8cfe7fe246c628", "urls": ["bzzr://ef5c944d51f739ab34e2c951d6ac82a7152e6bb844058a8e57bae52c14cbe16b"]}, "contracts/Recoverable.sol": {"keccak256": "0x311a332cdd87df6e00057f5455f4e68b043b5dbe211f6d68bc64e20817515635", "urls": ["bzzr://4fd99bcfb93baed6e7c8d22ee9ecc5c8346a1aa98288e77b01333b2c5d3f582d"]}, "contracts/RelaunchedCrowdsale.sol": {"keccak256": "0xbfef650ef850ce660cbcdd7575fec4f52e17b65ae67f7dec3e932e6aac70adf8", "urls": ["bzzr://8c579bbf22ecbc5445323d7a012be9735c8a376f7abb4cdeb43a6dd05f69681f"]}, "contracts/SafeMathLib.sol": {"keccak256": "0x501bfe31e274b9a5591f7c540bdced4d4312e27d4f19599147c9bbca3d9c6b18", "urls": ["bzzr://a80935ebddb06c247d71372d4e5833ee029f08633bd0fe4a274a57009567e5b9"]}, "contracts/StandardTokenExt.sol": {"keccak256": "0x9ea2d4cec4dccd5639c05e6c23dd027d80b5e5a20abd99b280ab7b2631b5a5fc", "urls": ["bzzr://a52d8fc5a21bd83997aff19128e00dceb251df712207b61223894c8b7f42d5ff"]}, "zeppelin/contracts/math/SafeMath.sol": {"keccak256": "0x341ba8cb467a3623e819ba1a683ac1d264005186f308505214e5f6bc89446a08", "urls": ["bzzr://59b5652ee4e4a1b5a8f1a8906e14c84af43d636cf5ca0725cc1813aabe4c8c17"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}, "zeppelin/contracts/token/ERC20/BasicToken.sol": {"keccak256": "0x948404468d61ff35ea4194650670408dabd65da7f905a1c16888ab84520bf39e", "urls": ["bzzr://ea75e20f95d7e4e10394fe6bfaa8eee56b4757c2a6f1e8df4180d33afa621935"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}, "zeppelin/contracts/token/ERC20/StandardToken.sol": {"keccak256": "0xd2b344a5259e19ec143074cfa65637a10c40b68395c59808c4af13bccbb2de55", "urls": ["bzzr://d61a01175a7ca1ba9f4403de603c20b897e33ec425aef2d9f8a7f9ddfdfaf5b2"]}}, "version": 1}, "name": "RelaunchedCrowdsale", "ordered_full_dependencies": ["SafeMathLib"], "source_path": "contracts/RelaunchedCrowdsale.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Safe unsigned safe math.\n *\n * https://blog.aragon.one/library-driven-development-in-solidity-2bebcaf88736#.750gwtwli\n *\n * Originally from https://raw.githubusercontent.com/AragonOne/zeppelin-solidity/master/contracts/SafeMathLib.sol\n *\n * Maintained here until merged to mainline zeppelin-solidity.\n *\n */\nlibrary SafeMathLib {\n\n function times(uint a, uint b) returns (uint) {\n uint c = a * b;\n assert(a == 0 || c / a == b);\n return c;\n }\n\n function minus(uint a, uint b) returns (uint) {\n assert(b <= a);\n return a - b;\n }\n\n function plus(uint a, uint b) returns (uint) {\n uint c = a + b;\n assert(c>=a);\n return c;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Interface for defining crowdsale pricing.\n */\ncontract PricingStrategy {\n\n /** Interface declaration. */\n function isPricingStrategy() public constant returns (bool) {\n return true;\n }\n\n /** Self check if all references are correctly set.\n *\n * Checks that pricing strategy matches crowdsale parameters.\n */\n function isSane(address crowdsale) public constant returns (bool) {\n return true;\n }\n\n /**\n * @dev Pricing tells if this is a presale purchase or not.\n @param purchaser Address of the purchaser\n @return False by default, true if a presale purchaser\n */\n function isPresalePurchase(address purchaser) public constant returns (bool) {\n return false;\n }\n\n /**\n * When somebody tries to buy tokens for X eth, calculate how many tokens they get.\n *\n *\n * @param value - What is the value of the transaction send in as wei\n * @param tokensSold - how much tokens have been sold this far\n * @param weiRaised - how much money has been raised this far in the main token sale - this number excludes presale\n * @param msgSender - who is the investor of this transaction\n * @param decimals - how many decimal units the token has\n * @return Amount of tokens the investor receives\n */\n function calculatePrice(uint value, uint weiRaised, uint tokensSold, address msgSender, uint decimals) public constant returns (uint tokenAmount);\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Finalize agent defines what happens at the end of succeseful crowdsale.\n *\n * - Allocate tokens for founders, bounties and community\n * - Make tokens transferable\n * - etc.\n */\ncontract FinalizeAgent {\n\n function isFinalizeAgent() public constant returns(bool) {\n return true;\n }\n\n /** Return true if we can run finalizeCrowdsale() properly.\n *\n * This is a safety check function that doesn't allow crowdsale to begin\n * unless the finalizer has been set up properly.\n */\n function isSane() public constant returns (bool);\n\n /** Called once by crowdsale finalize() if the sale was success. */\n function finalizeCrowdsale();\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n\n/**\n * A token that defines fractional units as decimals.\n */\ncontract FractionalERC20 is ERC20 {\n\n uint public decimals;\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n/*\n * Haltable\n *\n * Abstract contract that allows children to implement an\n * emergency stop mechanism. Differs from Pausable by causing a throw when in halt mode.\n *\n *\n * Originally envisioned in FirstBlood ICO contract.\n */\ncontract Haltable is Ownable {\n bool public halted;\n\n modifier stopInEmergency {\n if (halted) throw;\n _;\n }\n\n modifier stopNonOwnersInEmergency {\n if (halted && msg.sender != owner) throw;\n _;\n }\n\n modifier onlyInEmergency {\n if (!halted) throw;\n _;\n }\n\n // called by the owner on emergency, triggers stopped state\n function halt() external onlyOwner {\n halted = true;\n }\n\n // called by the owner on end of emergency, returns to normal state\n function unhalt() external onlyOwner onlyInEmergency {\n halted = false;\n }\n\n}\n\n\n\n\n\n\n\n/**\n * Crowdsale state machine without buy functionality.\n *\n * Implements basic state machine logic, but leaves out all buy functions,\n * so that subclasses can implement their own buying logic.\n *\n *\n * For the default buy() implementation see Crowdsale.sol.\n */\ncontract CrowdsaleBase is Haltable {\n\n /* Max investment count when we are still allowed to change the multisig address */\n uint public MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE = 5;\n\n using SafeMathLib for uint;\n\n /* The token we are selling */\n FractionalERC20 public token;\n\n /* How we are going to price our offering */\n PricingStrategy public pricingStrategy;\n\n /* Post-success callback */\n FinalizeAgent public finalizeAgent;\n\n /* tokens will be transfered from this address */\n address public multisigWallet;\n\n /* if the funding goal is not reached, investors may withdraw their funds */\n uint public minimumFundingGoal;\n\n /* the UNIX timestamp start date of the crowdsale */\n uint public startsAt;\n\n /* the UNIX timestamp end date of the crowdsale */\n uint public endsAt;\n\n /* the number of tokens already sold through this contract*/\n uint public tokensSold = 0;\n\n /* How many wei of funding we have raised */\n uint public weiRaised = 0;\n\n /* Calculate incoming funds from presale contracts and addresses */\n uint public presaleWeiRaised = 0;\n\n /* How many distinct addresses have invested */\n uint public investorCount = 0;\n\n /* How much wei we have returned back to the contract after a failed crowdfund. */\n uint public loadedRefund = 0;\n\n /* How much wei we have given back to investors.*/\n uint public weiRefunded = 0;\n\n /* Has this crowdsale been finalized */\n bool public finalized;\n\n /** How much ETH each address has invested to this crowdsale */\n mapping (address => uint256) public investedAmountOf;\n\n /** How much tokens this crowdsale has credited for each investor address */\n mapping (address => uint256) public tokenAmountOf;\n\n /** Addresses that are allowed to invest even before ICO offical opens. For testing, for ICO partners, etc. */\n mapping (address => bool) public earlyParticipantWhitelist;\n\n /** This is for manul testing for the interaction from owner wallet. You can set it to any value and inspect this in blockchain explorer to see that crowdsale interaction works. */\n uint public ownerTestValue;\n\n /** State machine\n *\n * - Preparing: All contract initialization calls and variables have not been set yet\n * - Prefunding: We have not passed start time yet\n * - Funding: Active crowdsale\n * - Success: Minimum funding goal reached\n * - Failure: Minimum funding goal not reached before ending time\n * - Finalized: The finalized has been called and succesfully executed\n * - Refunding: Refunds are loaded on the contract for reclaim.\n */\n enum State{Unknown, Preparing, PreFunding, Funding, Success, Failure, Finalized, Refunding}\n\n // A new investment was made\n event Invested(address investor, uint weiAmount, uint tokenAmount, uint128 customerId);\n\n // Refund was processed for a contributor\n event Refund(address investor, uint weiAmount);\n\n // The rules were changed what kind of investments we accept\n event InvestmentPolicyChanged(bool newRequireCustomerId, bool newRequiredSignedAddress, address newSignerAddress);\n\n // Address early participation whitelist status changed\n event Whitelisted(address addr, bool status);\n\n // Crowdsale end time has been changed\n event EndsAtChanged(uint newEndsAt);\n\n function CrowdsaleBase(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal) {\n\n owner = msg.sender;\n\n token = FractionalERC20(_token);\n setPricingStrategy(_pricingStrategy);\n\n multisigWallet = _multisigWallet;\n if(multisigWallet == 0) {\n throw;\n }\n\n if(_start == 0) {\n throw;\n }\n\n startsAt = _start;\n\n if(_end == 0) {\n throw;\n }\n\n endsAt = _end;\n\n // Don't mess the dates\n if(startsAt >= endsAt) {\n throw;\n }\n\n // Minimum funding goal can be zero\n minimumFundingGoal = _minimumFundingGoal;\n }\n\n /**\n * Don't expect to just send in money and get tokens.\n */\n function() payable {\n throw;\n }\n\n /**\n * @dev Make an investment.\n *\n * Crowdsale must be running for one to invest.\n * We must have not pressed the emergency brake.\n *\n * @param receiver The Ethereum address who receives the tokens\n * @param customerId (optional) UUID v4 to track the successful payments on the server side'\n * @param tokenAmount Amount of tokens which be credited to receiver\n *\n * @return tokensBought How mony tokens were bought\n */\n function buyTokens(address receiver, uint128 customerId, uint256 tokenAmount) stopInEmergency internal returns(uint tokensBought) {\n\n // Determine if it's a good time to accept investment from this participant\n if(getState() == State.PreFunding) {\n // Are we whitelisted for early deposit\n if(!earlyParticipantWhitelist[receiver]) {\n throw;\n }\n } else if(getState() == State.Funding) {\n // Retail participants can only come in when the crowdsale is running\n // pass\n } else {\n // Unwanted state\n throw;\n }\n\n uint weiAmount = msg.value;\n\n // Dust transaction\n require(tokenAmount != 0);\n\n if(investedAmountOf[receiver] == 0) {\n // A new investor\n investorCount++;\n }\n\n // Update investor\n investedAmountOf[receiver] = investedAmountOf[receiver].plus(weiAmount);\n tokenAmountOf[receiver] = tokenAmountOf[receiver].plus(tokenAmount);\n\n // Update totals\n weiRaised = weiRaised.plus(weiAmount);\n tokensSold = tokensSold.plus(tokenAmount);\n\n if(pricingStrategy.isPresalePurchase(receiver)) {\n presaleWeiRaised = presaleWeiRaised.plus(weiAmount);\n }\n\n // Check that we did not bust the cap\n require(!isBreakingCap(weiAmount, tokenAmount, weiRaised, tokensSold));\n\n assignTokens(receiver, tokenAmount);\n\n // Pocket the money, or fail the crowdsale if we for some reason cannot send the money to our multisig\n if(!multisigWallet.send(weiAmount)) throw;\n\n // Tell us invest was success\n Invested(receiver, weiAmount, tokenAmount, customerId);\n\n return tokenAmount;\n }\n\n /**\n * @dev Make an investment based on pricing strategy\n *\n * This is a wrapper for buyTokens(), but the amount of tokens receiver will\n * have depends on the pricing strategy used.\n *\n * @param receiver The Ethereum address who receives the tokens\n * @param customerId (optional) UUID v4 to track the successful payments on the server side'\n *\n * @return tokensBought How mony tokens were bought\n */\n function investInternal(address receiver, uint128 customerId) stopInEmergency internal returns(uint tokensBought) {\n return buyTokens(receiver, customerId, pricingStrategy.calculatePrice(msg.value, weiRaised - presaleWeiRaised, tokensSold, msg.sender, token.decimals()));\n }\n\n /**\n * @dev Calculate tokens user will have for their purchase\n *\n * @param weisTotal How much ethers (in wei) the user putssssss in\n * @param pricePerToken What is the price for one token\n *\n * @return tokensTotal which is received tokens, token decimals included\n */\n function calculateTokens(uint256 weisTotal, uint256 pricePerToken) public constant returns(uint tokensTotal) {\n // pricePerToken is how many full tokens, token decimal place included, you get for wei amount.\n // Because, in theory, decimal amount can vary, we do the exponent calculation here,\n // though gas wise using 10**18 constant would be much simpler.\n // Furthermore we could use rough amounts and take in raw wei per tokens amount,\n // but we lose too much accuracy for generic calculations, thus all these are\n // practically implemented as 10**18 fixed points.\n uint multiplier = 10 ** token.decimals();\n return weisTotal.times(multiplier)/pricePerToken;\n }\n\n /**\n * Finalize a succcesful crowdsale.\n *\n * The owner can triggre a call the contract that provides post-crowdsale actions, like releasing the tokens.\n */\n function finalize() public inState(State.Success) onlyOwner stopInEmergency {\n\n // Already finalized\n if(finalized) {\n throw;\n }\n\n // Finalizing is optional. We only call it if we are given a finalizing agent.\n if(address(finalizeAgent) != 0) {\n finalizeAgent.finalizeCrowdsale();\n }\n\n finalized = true;\n }\n\n /**\n * Allow to (re)set finalize agent.\n *\n * Design choice: no state restrictions on setting this, so that we can fix fat finger mistakes.\n */\n function setFinalizeAgent(FinalizeAgent addr) onlyOwner {\n finalizeAgent = addr;\n\n // Don't allow setting bad agent\n if(!finalizeAgent.isFinalizeAgent()) {\n throw;\n }\n }\n\n /**\n * Allow crowdsale owner to close early or extend the crowdsale.\n *\n * This is useful e.g. for a manual soft cap implementation:\n * - after X amount is reached determine manual closing\n *\n * This may put the crowdsale to an invalid state,\n * but we trust owners know what they are doing.\n *\n */\n function setEndsAt(uint time) onlyOwner {\n\n if(now > time) {\n throw; // Don't change past\n }\n\n if(startsAt > time) {\n throw; // Prevent human mistakes\n }\n\n endsAt = time;\n EndsAtChanged(endsAt);\n }\n\n /**\n * Allow to (re)set pricing strategy.\n *\n * Design choice: no state restrictions on the set, so that we can fix fat finger mistakes.\n */\n function setPricingStrategy(PricingStrategy _pricingStrategy) onlyOwner {\n pricingStrategy = _pricingStrategy;\n\n // Don't allow setting bad agent\n if(!pricingStrategy.isPricingStrategy()) {\n throw;\n }\n }\n\n /**\n * Allow to change the team multisig address in the case of emergency.\n *\n * This allows to save a deployed crowdsale wallet in the case the crowdsale has not yet begun\n * (we have done only few test transactions). After the crowdsale is going\n * then multisig address stays locked for the safety reasons.\n */\n function setMultisig(address addr) public onlyOwner {\n\n // Change\n if(investorCount > MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE) {\n throw;\n }\n\n multisigWallet = addr;\n }\n\n /**\n * Allow load refunds back on the contract for the refunding.\n *\n * The team can transfer the funds back on the smart contract in the case the minimum goal was not reached..\n */\n function loadRefund() public payable inState(State.Failure) {\n if(msg.value == 0) throw;\n loadedRefund = loadedRefund.plus(msg.value);\n }\n\n /**\n * Investors can claim refund.\n *\n * Note that any refunds from proxy buyers should be handled separately,\n * and not through this contract.\n */\n function refund() public inState(State.Refunding) {\n uint256 weiValue = investedAmountOf[msg.sender];\n if (weiValue == 0) throw;\n investedAmountOf[msg.sender] = 0;\n weiRefunded = weiRefunded.plus(weiValue);\n Refund(msg.sender, weiValue);\n if (!msg.sender.send(weiValue)) throw;\n }\n\n /**\n * @return true if the crowdsale has raised enough money to be a successful.\n */\n function isMinimumGoalReached() public constant returns (bool reached) {\n return weiRaised >= minimumFundingGoal;\n }\n\n /**\n * Check if the contract relationship looks good.\n */\n function isFinalizerSane() public constant returns (bool sane) {\n return finalizeAgent.isSane();\n }\n\n /**\n * Check if the contract relationship looks good.\n */\n function isPricingSane() public constant returns (bool sane) {\n return pricingStrategy.isSane(address(this));\n }\n\n /**\n * Crowdfund state machine management.\n *\n * We make it a function and do not assign the result to a variable, so there is no chance of the variable being stale.\n */\n function getState() public constant returns (State) {\n if(finalized) return State.Finalized;\n else if (address(finalizeAgent) == 0) return State.Preparing;\n else if (!finalizeAgent.isSane()) return State.Preparing;\n else if (!pricingStrategy.isSane(address(this))) return State.Preparing;\n else if (block.timestamp < startsAt) return State.PreFunding;\n else if (block.timestamp <= endsAt && !isCrowdsaleFull()) return State.Funding;\n else if (isMinimumGoalReached()) return State.Success;\n else if (!isMinimumGoalReached() && weiRaised > 0 && loadedRefund >= weiRaised) return State.Refunding;\n else return State.Failure;\n }\n\n /** This is for manual testing of multisig wallet interaction */\n function setOwnerTestValue(uint val) onlyOwner {\n ownerTestValue = val;\n }\n\n /**\n * Allow addresses to do early participation.\n *\n * TODO: Fix spelling error in the name\n */\n function setEarlyParicipantWhitelist(address addr, bool status) onlyOwner {\n earlyParticipantWhitelist[addr] = status;\n Whitelisted(addr, status);\n }\n\n\n /** Interface marker. */\n function isCrowdsale() public constant returns (bool) {\n return true;\n }\n\n //\n // Modifiers\n //\n\n /** Modified allowing execution only if the crowdsale is currently running. */\n modifier inState(State state) {\n if(getState() != state) throw;\n _;\n }\n\n\n //\n // Abstract functions\n //\n\n /**\n * Check if the current invested breaks our cap rules.\n *\n *\n * The child contract must define their own cap setting rules.\n * We allow a lot of flexibility through different capping strategies (ETH, token count)\n * Called from invest().\n *\n * @param weiAmount The amount of wei the investor tries to invest in the current transaction\n * @param tokenAmount The amount of tokens we try to give to the investor in the current transaction\n * @param weiRaisedTotal What would be our total raised balance after this transaction\n * @param tokensSoldTotal What would be our total sold tokens count after this transaction\n *\n * @return true if taking this investment would break our cap rules\n */\n function isBreakingCap(uint weiAmount, uint tokenAmount, uint weiRaisedTotal, uint tokensSoldTotal) constant returns (bool limitBroken);\n\n /**\n * Check if the current crowdsale is full and we can no longer sell any tokens.\n */\n function isCrowdsaleFull() public constant returns (bool);\n\n /**\n * Create new tokens or transfer issued tokens to the investor depending on the cap model.\n */\n function assignTokens(address receiver, uint tokenAmount) internal;\n}\n\n\n\n/**\n * Abstract base contract for token sales with the default buy entry points.\n *\n * Handle\n * - start and end dates\n * - accepting investments\n * - minimum funding goal and refund\n * - various statistics during the crowdfund\n * - different pricing strategies\n * - different investment policies (require server side customer id, allow only whitelisted addresses)\n *\n * Does not Handle\n *\n * - Token allocation (minting vs. transfer)\n * - Cap rules\n *\n */\ncontract Crowdsale is CrowdsaleBase {\n\n /* Do we need to have unique contributor id for each customer */\n bool public requireCustomerId;\n\n /**\n * Do we verify that contributor has been cleared on the server side (accredited investors only).\n * This method was first used in FirstBlood crowdsale to ensure all contributors have accepted terms on sale (on the web).\n */\n bool public requiredSignedAddress;\n\n /* Server side address that signed allowed contributors (Ethereum addresses) that can participate the crowdsale */\n address public signerAddress;\n\n function Crowdsale(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal) CrowdsaleBase(_token, _pricingStrategy, _multisigWallet, _start, _end, _minimumFundingGoal) {\n }\n\n /**\n * Preallocate tokens for the early investors.\n *\n * Preallocated tokens have been sold before the actual crowdsale opens.\n * This function mints the tokens and moves the crowdsale needle.\n *\n * Investor count is not handled; it is assumed this goes for multiple investors\n * and the token distribution happens outside the smart contract flow.\n *\n * No money is exchanged, as the crowdsale team already have received the payment.\n *\n * @param fullTokens tokens as full tokens - decimal places added internally\n * @param weiPrice Price of a single full token in wei\n *\n */\n function preallocate(address receiver, uint fullTokens, uint weiPrice) public onlyOwner {\n\n uint tokenAmount = fullTokens * 10**token.decimals();\n uint weiAmount = weiPrice * fullTokens; // This can be also 0, we give out tokens for free\n\n weiRaised = weiRaised.plus(weiAmount);\n tokensSold = tokensSold.plus(tokenAmount);\n\n investedAmountOf[receiver] = investedAmountOf[receiver].plus(weiAmount);\n tokenAmountOf[receiver] = tokenAmountOf[receiver].plus(tokenAmount);\n\n assignTokens(receiver, tokenAmount);\n\n // Tell us invest was success\n Invested(receiver, weiAmount, tokenAmount, 0);\n }\n\n /**\n * Allow anonymous contributions to this crowdsale.\n */\n function investWithSignedAddress(address addr, uint128 customerId, uint8 v, bytes32 r, bytes32 s) public payable {\n bytes32 hash = sha256(addr);\n if (ecrecover(hash, v, r, s) != signerAddress) throw;\n if(customerId == 0) throw; // UUIDv4 sanity check\n investInternal(addr, customerId);\n }\n\n /**\n * Track who is the customer making the payment so we can send thank you email.\n */\n function investWithCustomerId(address addr, uint128 customerId) public payable {\n if(requiredSignedAddress) throw; // Crowdsale allows only server-side signed participants\n if(customerId == 0) throw; // UUIDv4 sanity check\n investInternal(addr, customerId);\n }\n\n /**\n * Allow anonymous contributions to this crowdsale.\n */\n function invest(address addr) public payable {\n if(requireCustomerId) throw; // Crowdsale needs to track participants for thank you email\n if(requiredSignedAddress) throw; // Crowdsale allows only server-side signed participants\n investInternal(addr, 0);\n }\n\n /**\n * Invest to tokens, recognize the payer and clear his address.\n *\n */\n function buyWithSignedAddress(uint128 customerId, uint8 v, bytes32 r, bytes32 s) public payable {\n investWithSignedAddress(msg.sender, customerId, v, r, s);\n }\n\n /**\n * Invest to tokens, recognize the payer.\n *\n */\n function buyWithCustomerIdWithChecksum(uint128 customerId, bytes1 checksum) public payable {\n // see customerid.py\n if (bytes1(sha3(customerId)) != checksum) throw;\n investWithCustomerId(msg.sender, customerId);\n }\n\n /**\n * Legacy API signature.\n */\n function buyWithCustomerId(uint128 customerId) public payable {\n investWithCustomerId(msg.sender, customerId);\n }\n\n /**\n * The basic entry point to participate the crowdsale process.\n *\n * Pay for funding, get invested tokens back in the sender address.\n */\n function buy() public payable {\n invest(msg.sender);\n }\n\n /**\n * Set policy do we need to have server-side customer ids for the investments.\n *\n */\n function setRequireCustomerId(bool value) onlyOwner {\n requireCustomerId = value;\n InvestmentPolicyChanged(requireCustomerId, requiredSignedAddress, signerAddress);\n }\n\n /**\n * Set policy if all investors must be cleared on the server side first.\n *\n * This is e.g. for the accredited investor clearing.\n *\n */\n function setRequireSignedAddress(bool value, address _signerAddress) onlyOwner {\n requiredSignedAddress = value;\n signerAddress = _signerAddress;\n InvestmentPolicyChanged(requireCustomerId, requiredSignedAddress, signerAddress);\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n assert(c / a == b);\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n\n\n\n/**\n * @title Basic token\n * @dev Basic version of StandardToken, with no allowances.\n */\ncontract BasicToken is ERC20Basic {\n using SafeMath for uint256;\n\n mapping(address => uint256) balances;\n\n uint256 totalSupply_;\n\n /**\n * @dev total number of tokens in existence\n */\n function totalSupply() public view returns (uint256) {\n return totalSupply_;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param _to The address to transfer to.\n * @param _value The amount to be transferred.\n */\n function transfer(address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[msg.sender]);\n\n // SafeMath.sub will throw if there is not enough balance.\n balances[msg.sender] = balances[msg.sender].sub(_value);\n balances[_to] = balances[_to].add(_value);\n Transfer(msg.sender, _to, _value);\n return true;\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param _owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address _owner) public view returns (uint256 balance) {\n return balances[_owner];\n }\n\n}\n\n\n\n\n/**\n * @title Standard ERC20 token\n *\n * @dev Implementation of the basic standard token.\n * @dev https://github.com/ethereum/EIPs/issues/20\n * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol\n */\ncontract StandardToken is ERC20, BasicToken {\n\n mapping (address => mapping (address => uint256)) internal allowed;\n\n\n /**\n * @dev Transfer tokens from one address to another\n * @param _from address The address which you want to send tokens from\n * @param _to address The address which you want to transfer to\n * @param _value uint256 the amount of tokens to be transferred\n */\n function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[_from]);\n require(_value <= allowed[_from][msg.sender]);\n\n balances[_from] = balances[_from].sub(_value);\n balances[_to] = balances[_to].add(_value);\n allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);\n Transfer(_from, _to, _value);\n return true;\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n *\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param _spender The address which will spend the funds.\n * @param _value The amount of tokens to be spent.\n */\n function approve(address _spender, uint256 _value) public returns (bool) {\n allowed[msg.sender][_spender] = _value;\n Approval(msg.sender, _spender, _value);\n return true;\n }\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param _owner address The address which owns the funds.\n * @param _spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address _owner, address _spender) public view returns (uint256) {\n return allowed[_owner][_spender];\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(address _spender, uint _addedValue) public returns (bool) {\n allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {\n uint oldValue = allowed[msg.sender][_spender];\n if (_subtractedValue > oldValue) {\n allowed[msg.sender][_spender] = 0;\n } else {\n allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);\n }\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\ncontract Recoverable is Ownable {\n\n /// @dev Empty constructor (for now)\n function Recoverable() {\n }\n\n /// @dev This will be invoked by the owner, when owner wants to rescue tokens\n /// @param token Token which will we rescue to the owner from the contract\n function recoverTokens(ERC20Basic token) onlyOwner public {\n token.transfer(owner, tokensToBeReturned(token));\n }\n\n /// @dev Interface function, can be overwritten by the superclass\n /// @param token Token which balance we will check and return\n /// @return The amount of tokens (in smallest denominator) the contract owns\n function tokensToBeReturned(ERC20Basic token) public returns (uint) {\n return token.balanceOf(this);\n }\n}\n\n\n\n/**\n * Standard EIP-20 token with an interface marker.\n *\n * @notice Interface marker is used by crowdsale contracts to validate that addresses point a good token contract.\n *\n */\ncontract StandardTokenExt is StandardToken, Recoverable {\n\n /* Interface declaration */\n function isToken() public constant returns (bool weAre) {\n return true;\n }\n}\n\n\n\n\n/**\n * A token that can increase its supply by another contract.\n *\n * This allows uncapped crowdsale by dynamically increasing the supply when money pours in.\n * Only mint agents, contracts whitelisted by owner, can mint new tokens.\n *\n */\ncontract MintableToken is StandardTokenExt {\n\n using SafeMathLib for uint;\n\n bool public mintingFinished = false;\n\n /** List of agents that are allowed to create new tokens */\n mapping (address => bool) public mintAgents;\n\n event MintingAgentChanged(address addr, bool state);\n event Minted(address receiver, uint amount);\n\n /**\n * Create new tokens and allocate them to an address..\n *\n * Only callably by a crowdsale contract (mint agent).\n */\n function mint(address receiver, uint amount) onlyMintAgent canMint public {\n totalSupply_ = totalSupply_.plus(amount);\n balances[receiver] = balances[receiver].plus(amount);\n\n // This will make the mint transaction apper in EtherScan.io\n // We can remove this after there is a standardized minting event\n Transfer(0, receiver, amount);\n }\n\n /**\n * Owner can allow a crowdsale contract to mint new tokens.\n */\n function setMintAgent(address addr, bool state) onlyOwner canMint public {\n mintAgents[addr] = state;\n MintingAgentChanged(addr, state);\n }\n\n modifier onlyMintAgent() {\n // Only crowdsale contracts are allowed to mint new tokens\n if(!mintAgents[msg.sender]) {\n throw;\n }\n _;\n }\n\n /** Make sure we are not done yet. */\n modifier canMint() {\n if(mintingFinished) throw;\n _;\n }\n}\n\n\n/**\n * ICO crowdsale contract that is capped by amout of tokens.\n *\n * - Tokens are dynamically created during the crowdsale\n *\n *\n */\ncontract MintedTokenCappedCrowdsale is Crowdsale {\n\n /* Maximum amount of tokens this crowdsale can sell. */\n uint public maximumSellableTokens;\n\n function MintedTokenCappedCrowdsale(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal, uint _maximumSellableTokens) Crowdsale(_token, _pricingStrategy, _multisigWallet, _start, _end, _minimumFundingGoal) {\n maximumSellableTokens = _maximumSellableTokens;\n }\n\n /**\n * Called from invest() to confirm if the curret investment does not break our cap rule.\n */\n function isBreakingCap(uint weiAmount, uint tokenAmount, uint weiRaisedTotal, uint tokensSoldTotal) constant returns (bool limitBroken) {\n return tokensSoldTotal > maximumSellableTokens;\n }\n\n function isCrowdsaleFull() public constant returns (bool) {\n return tokensSold >= maximumSellableTokens;\n }\n\n /**\n * Dynamically create tokens and assign them to the investor.\n */\n function assignTokens(address receiver, uint tokenAmount) internal {\n MintableToken mintableToken = MintableToken(token);\n mintableToken.mint(receiver, tokenAmount);\n }\n}\n\n\n\n/**\n * A crowdsale that retains the previous token, but changes some parameters.\n *\n * Investor data can be manually fed in.\n *\n * Mostly useful as a hot fix.\n *\n */\ncontract RelaunchedCrowdsale is MintedTokenCappedCrowdsale {\n\n // This transaction was restored from a previous crowdsale\n event RestoredInvestment(address addr, uint originalTxHash);\n\n mapping(uint => bool) public reissuedTransactions;\n\n function RelaunchedCrowdsale(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal, uint _maximumSellableTokens) MintedTokenCappedCrowdsale(_token, _pricingStrategy, _multisigWallet, _start, _end, _minimumFundingGoal, _maximumSellableTokens) {\n }\n\n /**\n * Check if a particular transaction has already been written.\n */\n function getRestoredTransactionStatus(uint _originalTxHash) public constant returns(bool) {\n return reissuedTransactions[_originalTxHash];\n }\n\n /**\n * Rebuild the previous invest data back to the crowdsale.\n */\n function setInvestorData(address _addr, uint _weiAmount, uint _tokenAmount, uint _originalTxHash) onlyOwner public {\n\n if(investedAmountOf[_addr] == 0) {\n investorCount++;\n }\n\n investedAmountOf[_addr] += _weiAmount;\n tokenAmountOf[_addr] += _tokenAmount;\n\n weiRaised += _weiAmount;\n tokensSold += _tokenAmount;\n\n Invested(_addr, _weiAmount, _tokenAmount, 0);\n RestoredInvestment(_addr, _originalTxHash);\n }\n\n /**\n * Rebuild the previous invest data and do a token reissuance.\n */\n function setInvestorDataAndIssueNewToken(address _addr, uint _weiAmount, uint _tokenAmount, uint _originalTxHash) onlyOwner public {\n\n // This transaction has already been rebuild\n if(reissuedTransactions[_originalTxHash]) {\n throw;\n }\n\n setInvestorData(_addr, _weiAmount, _tokenAmount, _originalTxHash);\n\n // Check that we did not bust the cap in the restoration process\n if(isBreakingCap(_weiAmount, _tokenAmount, weiRaised, tokensSold)) {\n throw;\n }\n\n // Mark transaction processed\n reissuedTransactions[_originalTxHash] = true;\n\n // Mint new token to give it to the original investor\n MintableToken mintableToken = MintableToken(token);\n mintableToken.mint(_addr, _tokenAmount);\n }\n\n}\n"}, "ReleasableToken": {"abi": [{"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "state", "type": "bool"}], "name": "setTransferAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "approve", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "recoverTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_from", "type": "address"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setReleaseAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "releaseTokenTransfer", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_subtractedValue", "type": "uint256"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "transferAgents", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "released", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "tokensToBeReturned", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "releaseAgent", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_addedValue", "type": "uint256"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}, {"name": "_spender", "type": "address"}], "name": "allowance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isToken", "outputs": [{"name": "weAre", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}, {"indexed": true, "name": "spender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "bytecode": "0x60806040526004805460a060020a60ff021916905560038054600160a060020a03191633179055610cc9806100356000396000f3006080604052600436106101065763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166302f652a3811461010b578063095ea7b31461013357806316114acd1461016b57806318160ddd1461018c57806323b872dd146101b357806329ff4f53146101dd5780635f412d4f146101fe578063661884631461021357806370a0823114610237578063867c2857146102585780638da5cb5b1461027957806396132521146102aa578063a9059cbb146102bf578063c45d19db146102e3578063d1f276d314610304578063d73dd62314610319578063dd62ed3e1461033d578063eefa597b14610364578063f2fde38b14610379575b600080fd5b34801561011757600080fd5b50610131600160a060020a0360043516602435151561039a565b005b34801561013f57600080fd5b50610157600160a060020a0360043516602435610408565b604080519115158252519081900360200190f35b34801561017757600080fd5b50610131600160a060020a036004351661046e565b34801561019857600080fd5b506101a161053e565b60408051918252519081900360200190f35b3480156101bf57600080fd5b50610157600160a060020a0360043581169060243516604435610544565b3480156101e957600080fd5b50610131600160a060020a03600435166105a8565b34801561020a57600080fd5b5061013161061a565b34801561021f57600080fd5b50610157600160a060020a0360043516602435610668565b34801561024357600080fd5b506101a1600160a060020a0360043516610758565b34801561026457600080fd5b50610157600160a060020a0360043516610773565b34801561028557600080fd5b5061028e610788565b60408051600160a060020a039092168252519081900360200190f35b3480156102b657600080fd5b50610157610797565b3480156102cb57600080fd5b50610157600160a060020a03600435166024356107b8565b3480156102ef57600080fd5b506101a1600160a060020a036004351661081a565b34801561031057600080fd5b5061028e6108b0565b34801561032557600080fd5b50610157600160a060020a03600435166024356108bf565b34801561034957600080fd5b506101a1600160a060020a0360043581169060243516610958565b34801561037057600080fd5b50610157610983565b34801561038557600080fd5b50610131600160a060020a0360043516610988565b600354600160a060020a031633146103b157600080fd5b60045460009074010000000000000000000000000000000000000000900460ff16156103dc57600080fd5b50600160a060020a03919091166000908152600560205260409020805460ff1916911515919091179055565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b600354600160a060020a0316331461048557600080fd5b600354600160a060020a038083169163a9059cbb91166104a48461081a565b6040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b15801561050f57600080fd5b505af1158015610523573d6000803e3d6000fd5b505050506040513d602081101561053957600080fd5b505050565b60015490565b600454600090849074010000000000000000000000000000000000000000900460ff16151561059457600160a060020a03811660009081526005602052604090205460ff16151561059457600080fd5b61059f858585610a1d565b95945050505050565b600354600160a060020a031633146105bf57600080fd5b60045460009074010000000000000000000000000000000000000000900460ff16156105ea57600080fd5b506004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600454600160a060020a0316331461063157600080fd5b6004805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b336000908152600260209081526040808320600160a060020a0386168452909152812054808311156106bd57336000908152600260209081526040808320600160a060020a03881684529091528120556106f2565b6106cd818463ffffffff610b9416565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a031660009081526020819052604090205490565b60056020526000908152604090205460ff1681565b600354600160a060020a031681565b60045474010000000000000000000000000000000000000000900460ff1681565b600454600090339074010000000000000000000000000000000000000000900460ff16151561080857600160a060020a03811660009081526005602052604090205460ff16151561080857600080fd5b6108128484610ba6565b949350505050565b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600091600160a060020a038416916370a082319160248082019260209290919082900301818787803b15801561087e57600080fd5b505af1158015610892573d6000803e3d6000fd5b505050506040513d60208110156108a857600080fd5b505192915050565b600454600160a060020a031681565b336000908152600260209081526040808320600160a060020a03861684529091528120546108f3908363ffffffff610c8716565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600190565b600354600160a060020a0316331461099f57600080fd5b600160a060020a03811615156109b457600080fd5b600354604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6000600160a060020a0383161515610a3457600080fd5b600160a060020a038416600090815260208190526040902054821115610a5957600080fd5b600160a060020a0384166000908152600260209081526040808320338452909152902054821115610a8957600080fd5b600160a060020a038416600090815260208190526040902054610ab2908363ffffffff610b9416565b600160a060020a038086166000908152602081905260408082209390935590851681522054610ae7908363ffffffff610c8716565b600160a060020a03808516600090815260208181526040808320949094559187168152600282528281203382529091522054610b29908363ffffffff610b9416565b600160a060020a03808616600081815260026020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b600082821115610ba057fe5b50900390565b6000600160a060020a0383161515610bbd57600080fd5b33600090815260208190526040902054821115610bd957600080fd5b33600090815260208190526040902054610bf9908363ffffffff610b9416565b3360009081526020819052604080822092909255600160a060020a03851681522054610c2b908363ffffffff610c8716565b600160a060020a038416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b600082820183811015610c9657fe5b93925050505600a165627a7a72305820027b3e806c7779a98106f964ebb311fc74ea801b7a47a3c6c75a2ecc0b723eaf0029", "bytecode_runtime": "0x6080604052600436106101065763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166302f652a3811461010b578063095ea7b31461013357806316114acd1461016b57806318160ddd1461018c57806323b872dd146101b357806329ff4f53146101dd5780635f412d4f146101fe578063661884631461021357806370a0823114610237578063867c2857146102585780638da5cb5b1461027957806396132521146102aa578063a9059cbb146102bf578063c45d19db146102e3578063d1f276d314610304578063d73dd62314610319578063dd62ed3e1461033d578063eefa597b14610364578063f2fde38b14610379575b600080fd5b34801561011757600080fd5b50610131600160a060020a0360043516602435151561039a565b005b34801561013f57600080fd5b50610157600160a060020a0360043516602435610408565b604080519115158252519081900360200190f35b34801561017757600080fd5b50610131600160a060020a036004351661046e565b34801561019857600080fd5b506101a161053e565b60408051918252519081900360200190f35b3480156101bf57600080fd5b50610157600160a060020a0360043581169060243516604435610544565b3480156101e957600080fd5b50610131600160a060020a03600435166105a8565b34801561020a57600080fd5b5061013161061a565b34801561021f57600080fd5b50610157600160a060020a0360043516602435610668565b34801561024357600080fd5b506101a1600160a060020a0360043516610758565b34801561026457600080fd5b50610157600160a060020a0360043516610773565b34801561028557600080fd5b5061028e610788565b60408051600160a060020a039092168252519081900360200190f35b3480156102b657600080fd5b50610157610797565b3480156102cb57600080fd5b50610157600160a060020a03600435166024356107b8565b3480156102ef57600080fd5b506101a1600160a060020a036004351661081a565b34801561031057600080fd5b5061028e6108b0565b34801561032557600080fd5b50610157600160a060020a03600435166024356108bf565b34801561034957600080fd5b506101a1600160a060020a0360043581169060243516610958565b34801561037057600080fd5b50610157610983565b34801561038557600080fd5b50610131600160a060020a0360043516610988565b600354600160a060020a031633146103b157600080fd5b60045460009074010000000000000000000000000000000000000000900460ff16156103dc57600080fd5b50600160a060020a03919091166000908152600560205260409020805460ff1916911515919091179055565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b600354600160a060020a0316331461048557600080fd5b600354600160a060020a038083169163a9059cbb91166104a48461081a565b6040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b15801561050f57600080fd5b505af1158015610523573d6000803e3d6000fd5b505050506040513d602081101561053957600080fd5b505050565b60015490565b600454600090849074010000000000000000000000000000000000000000900460ff16151561059457600160a060020a03811660009081526005602052604090205460ff16151561059457600080fd5b61059f858585610a1d565b95945050505050565b600354600160a060020a031633146105bf57600080fd5b60045460009074010000000000000000000000000000000000000000900460ff16156105ea57600080fd5b506004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600454600160a060020a0316331461063157600080fd5b6004805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b336000908152600260209081526040808320600160a060020a0386168452909152812054808311156106bd57336000908152600260209081526040808320600160a060020a03881684529091528120556106f2565b6106cd818463ffffffff610b9416565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a031660009081526020819052604090205490565b60056020526000908152604090205460ff1681565b600354600160a060020a031681565b60045474010000000000000000000000000000000000000000900460ff1681565b600454600090339074010000000000000000000000000000000000000000900460ff16151561080857600160a060020a03811660009081526005602052604090205460ff16151561080857600080fd5b6108128484610ba6565b949350505050565b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600091600160a060020a038416916370a082319160248082019260209290919082900301818787803b15801561087e57600080fd5b505af1158015610892573d6000803e3d6000fd5b505050506040513d60208110156108a857600080fd5b505192915050565b600454600160a060020a031681565b336000908152600260209081526040808320600160a060020a03861684529091528120546108f3908363ffffffff610c8716565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600190565b600354600160a060020a0316331461099f57600080fd5b600160a060020a03811615156109b457600080fd5b600354604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6000600160a060020a0383161515610a3457600080fd5b600160a060020a038416600090815260208190526040902054821115610a5957600080fd5b600160a060020a0384166000908152600260209081526040808320338452909152902054821115610a8957600080fd5b600160a060020a038416600090815260208190526040902054610ab2908363ffffffff610b9416565b600160a060020a038086166000908152602081905260408082209390935590851681522054610ae7908363ffffffff610c8716565b600160a060020a03808516600090815260208181526040808320949094559187168152600282528281203382529091522054610b29908363ffffffff610b9416565b600160a060020a03808616600081815260026020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b600082821115610ba057fe5b50900390565b6000600160a060020a0383161515610bbd57600080fd5b33600090815260208190526040902054821115610bd957600080fd5b33600090815260208190526040902054610bf9908363ffffffff610b9416565b3360009081526020819052604080822092909255600160a060020a03851681522054610c2b908363ffffffff610c8716565b600160a060020a038416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b600082820183811015610c9657fe5b93925050505600a165627a7a72305820027b3e806c7779a98106f964ebb311fc74ea801b7a47a3c6c75a2ecc0b723eaf0029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "state", "type": "bool"}], "name": "setTransferAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "approve", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "recoverTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_from", "type": "address"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setReleaseAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "releaseTokenTransfer", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_subtractedValue", "type": "uint256"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "transferAgents", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "released", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "tokensToBeReturned", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "releaseAgent", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_addedValue", "type": "uint256"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}, {"name": "_spender", "type": "address"}], "name": "allowance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isToken", "outputs": [{"name": "weAre", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}, {"indexed": true, "name": "spender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "devdoc": {"methods": {"allowance(address,address)": {"details": "Function to check the amount of tokens that an owner allowed to a spender.", "params": {"_owner": "address The address which owns the funds.", "_spender": "address The address which will spend the funds."}, "return": "A uint256 specifying the amount of tokens still available for the spender."}, "approve(address,uint256)": {"details": "Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729", "params": {"_spender": "The address which will spend the funds.", "_value": "The amount of tokens to be spent."}}, "balanceOf(address)": {"details": "Gets the balance of the specified address.", "params": {"_owner": "The address to query the the balance of."}, "return": "An uint256 representing the amount owned by the passed address."}, "decreaseApproval(address,uint256)": {"details": "Decrease the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[_spender] == 0. To decrement allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"_spender": "The address which will spend the funds.", "_subtractedValue": "The amount of tokens to decrease the allowance by."}}, "increaseApproval(address,uint256)": {"details": "Increase the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[_spender] == 0. To increment allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"_addedValue": "The amount of tokens to increase the allowance by.", "_spender": "The address which will spend the funds."}}, "recoverTokens(address)": {"details": "This will be invoked by the owner, when owner wants to rescue tokens", "params": {"token": "Token which will we rescue to the owner from the contract"}}, "tokensToBeReturned(address)": {"details": "Interface function, can be overwritten by the superclass", "params": {"token": "Token which balance we will check and return"}, "return": "The amount of tokens (in smallest denominator) the contract owns"}, "totalSupply()": {"details": "total number of tokens in existence"}, "transferOwnership(address)": {"details": "Allows the current owner to transfer control of the contract to a newOwner.", "params": {"newOwner": "The address to transfer ownership to."}}}}, "userdoc": {"methods": {"releaseTokenTransfer()": {"notice": "One way function to release the tokens to the wild. * Can be called only from the release agent that is the final ICO contract. It is only called if the crowdsale has been success (first milestone reached)."}, "setReleaseAgent(address)": {"notice": "Set the contract that can call release and make the token transferable. * Design choice. Allow reset the release agent to fix fat finger mistakes."}, "setTransferAgent(address,bool)": {"notice": "Owner can allow a particular address (a crowdsale contract) to transfer tokens despite the lock up period."}}}}, "settings": {"compilationTarget": {"contracts/ReleasableToken.sol": "ReleasableToken"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/Recoverable.sol": {"keccak256": "0x311a332cdd87df6e00057f5455f4e68b043b5dbe211f6d68bc64e20817515635", "urls": ["bzzr://4fd99bcfb93baed6e7c8d22ee9ecc5c8346a1aa98288e77b01333b2c5d3f582d"]}, "contracts/ReleasableToken.sol": {"keccak256": "0x2c50180d0c1eab1aa63a04da3ae87ee2c482665d2a1a42c5f05b11234a7edaf4", "urls": ["bzzr://10752c317eba5c42e2848722689cfee4fffb7bcb42f3346e1a20715d843798e8"]}, "contracts/StandardTokenExt.sol": {"keccak256": "0x9ea2d4cec4dccd5639c05e6c23dd027d80b5e5a20abd99b280ab7b2631b5a5fc", "urls": ["bzzr://a52d8fc5a21bd83997aff19128e00dceb251df712207b61223894c8b7f42d5ff"]}, "zeppelin/contracts/math/SafeMath.sol": {"keccak256": "0x341ba8cb467a3623e819ba1a683ac1d264005186f308505214e5f6bc89446a08", "urls": ["bzzr://59b5652ee4e4a1b5a8f1a8906e14c84af43d636cf5ca0725cc1813aabe4c8c17"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}, "zeppelin/contracts/token/ERC20/BasicToken.sol": {"keccak256": "0x948404468d61ff35ea4194650670408dabd65da7f905a1c16888ab84520bf39e", "urls": ["bzzr://ea75e20f95d7e4e10394fe6bfaa8eee56b4757c2a6f1e8df4180d33afa621935"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}, "zeppelin/contracts/token/ERC20/StandardToken.sol": {"keccak256": "0xd2b344a5259e19ec143074cfa65637a10c40b68395c59808c4af13bccbb2de55", "urls": ["bzzr://d61a01175a7ca1ba9f4403de603c20b897e33ec425aef2d9f8a7f9ddfdfaf5b2"]}}, "version": 1}, "name": "ReleasableToken", "ordered_full_dependencies": [], "source_path": "contracts/ReleasableToken.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n assert(c / a == b);\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n\n\n\n/**\n * @title Basic token\n * @dev Basic version of StandardToken, with no allowances.\n */\ncontract BasicToken is ERC20Basic {\n using SafeMath for uint256;\n\n mapping(address => uint256) balances;\n\n uint256 totalSupply_;\n\n /**\n * @dev total number of tokens in existence\n */\n function totalSupply() public view returns (uint256) {\n return totalSupply_;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param _to The address to transfer to.\n * @param _value The amount to be transferred.\n */\n function transfer(address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[msg.sender]);\n\n // SafeMath.sub will throw if there is not enough balance.\n balances[msg.sender] = balances[msg.sender].sub(_value);\n balances[_to] = balances[_to].add(_value);\n Transfer(msg.sender, _to, _value);\n return true;\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param _owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address _owner) public view returns (uint256 balance) {\n return balances[_owner];\n }\n\n}\n\n\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n\n\n/**\n * @title Standard ERC20 token\n *\n * @dev Implementation of the basic standard token.\n * @dev https://github.com/ethereum/EIPs/issues/20\n * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol\n */\ncontract StandardToken is ERC20, BasicToken {\n\n mapping (address => mapping (address => uint256)) internal allowed;\n\n\n /**\n * @dev Transfer tokens from one address to another\n * @param _from address The address which you want to send tokens from\n * @param _to address The address which you want to transfer to\n * @param _value uint256 the amount of tokens to be transferred\n */\n function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[_from]);\n require(_value <= allowed[_from][msg.sender]);\n\n balances[_from] = balances[_from].sub(_value);\n balances[_to] = balances[_to].add(_value);\n allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);\n Transfer(_from, _to, _value);\n return true;\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n *\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param _spender The address which will spend the funds.\n * @param _value The amount of tokens to be spent.\n */\n function approve(address _spender, uint256 _value) public returns (bool) {\n allowed[msg.sender][_spender] = _value;\n Approval(msg.sender, _spender, _value);\n return true;\n }\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param _owner address The address which owns the funds.\n * @param _spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address _owner, address _spender) public view returns (uint256) {\n return allowed[_owner][_spender];\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(address _spender, uint _addedValue) public returns (bool) {\n allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {\n uint oldValue = allowed[msg.sender][_spender];\n if (_subtractedValue > oldValue) {\n allowed[msg.sender][_spender] = 0;\n } else {\n allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);\n }\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n\ncontract Recoverable is Ownable {\n\n /// @dev Empty constructor (for now)\n function Recoverable() {\n }\n\n /// @dev This will be invoked by the owner, when owner wants to rescue tokens\n /// @param token Token which will we rescue to the owner from the contract\n function recoverTokens(ERC20Basic token) onlyOwner public {\n token.transfer(owner, tokensToBeReturned(token));\n }\n\n /// @dev Interface function, can be overwritten by the superclass\n /// @param token Token which balance we will check and return\n /// @return The amount of tokens (in smallest denominator) the contract owns\n function tokensToBeReturned(ERC20Basic token) public returns (uint) {\n return token.balanceOf(this);\n }\n}\n\n\n\n/**\n * Standard EIP-20 token with an interface marker.\n *\n * @notice Interface marker is used by crowdsale contracts to validate that addresses point a good token contract.\n *\n */\ncontract StandardTokenExt is StandardToken, Recoverable {\n\n /* Interface declaration */\n function isToken() public constant returns (bool weAre) {\n return true;\n }\n}\n\n\n\n/**\n * Define interface for releasing the token transfer after a successful crowdsale.\n */\ncontract ReleasableToken is StandardTokenExt {\n\n /* The finalizer contract that allows unlift the transfer limits on this token */\n address public releaseAgent;\n\n /** A crowdsale contract can release us to the wild if ICO success. If false we are are in transfer lock up period.*/\n bool public released = false;\n\n /** Map of agents that are allowed to transfer tokens regardless of the lock down period. These are crowdsale contracts and possible the team multisig itself. */\n mapping (address => bool) public transferAgents;\n\n /**\n * Limit token transfer until the crowdsale is over.\n *\n */\n modifier canTransfer(address _sender) {\n\n if(!released) {\n if(!transferAgents[_sender]) {\n throw;\n }\n }\n\n _;\n }\n\n /**\n * Set the contract that can call release and make the token transferable.\n *\n * Design choice. Allow reset the release agent to fix fat finger mistakes.\n */\n function setReleaseAgent(address addr) onlyOwner inReleaseState(false) public {\n\n // We don't do interface check here as we might want to a normal wallet address to act as a release agent\n releaseAgent = addr;\n }\n\n /**\n * Owner can allow a particular address (a crowdsale contract) to transfer tokens despite the lock up period.\n */\n function setTransferAgent(address addr, bool state) onlyOwner inReleaseState(false) public {\n transferAgents[addr] = state;\n }\n\n /**\n * One way function to release the tokens to the wild.\n *\n * Can be called only from the release agent that is the final ICO contract. It is only called if the crowdsale has been success (first milestone reached).\n */\n function releaseTokenTransfer() public onlyReleaseAgent {\n released = true;\n }\n\n /** The function can be called only before or after the tokens have been releasesd */\n modifier inReleaseState(bool releaseState) {\n if(releaseState != released) {\n throw;\n }\n _;\n }\n\n /** The function can be called only by a whitelisted release agent. */\n modifier onlyReleaseAgent() {\n if(msg.sender != releaseAgent) {\n throw;\n }\n _;\n }\n\n function transfer(address _to, uint _value) canTransfer(msg.sender) returns (bool success) {\n // Call StandardToken.transfer()\n return super.transfer(_to, _value);\n }\n\n function transferFrom(address _from, address _to, uint _value) canTransfer(_from) returns (bool success) {\n // Call StandardToken.transferForm()\n return super.transferFrom(_from, _to, _value);\n }\n\n}\n"}, "RestrictedTransferAgent": {"abi": [{"constant": true, "inputs": [{"name": "from", "type": "address"}, {"name": "to", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "verify", "outputs": [{"name": "newValue", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [{"name": "_KYC", "type": "address"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}], "bytecode": "0x608060405234801561001057600080fd5b506040516020806101ee833981016040525160008054600160a060020a03909216600160a060020a031990921691909117905561019c806100526000396000f3006080604052600436106100405763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663ad0769948114610045575b600080fd5b34801561005157600080fd5b5061007c73ffffffffffffffffffffffffffffffffffffffff6004358116906024351660443561008e565b60408051918252519081900360200190f35b6000805473ffffffffffffffffffffffffffffffffffffffff1615156100b5575080610169565b60008054604080517f3af32abf00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff878116600483015291519190921692633af32abf92602480820193602093909283900390910190829087803b15801561012d57600080fd5b505af1158015610141573d6000803e3d6000fd5b505050506040513d602081101561015757600080fd5b505115610165575080610169565b5060005b93925050505600a165627a7a7230582090d7e3b060eaff357c2c7f794bac5ad5e9b3007b07f172ab84767aacf4dc61350029", "bytecode_runtime": "0x6080604052600436106100405763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663ad0769948114610045575b600080fd5b34801561005157600080fd5b5061007c73ffffffffffffffffffffffffffffffffffffffff6004358116906024351660443561008e565b60408051918252519081900360200190f35b6000805473ffffffffffffffffffffffffffffffffffffffff1615156100b5575080610169565b60008054604080517f3af32abf00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff878116600483015291519190921692633af32abf92602480820193602093909283900390910190829087803b15801561012d57600080fd5b505af1158015610141573d6000803e3d6000fd5b505050506040513d602081101561015757600080fd5b505115610165575080610169565b5060005b93925050505600a165627a7a7230582090d7e3b060eaff357c2c7f794bac5ad5e9b3007b07f172ab84767aacf4dc61350029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": true, "inputs": [{"name": "from", "type": "address"}, {"name": "to", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "verify", "outputs": [{"name": "newValue", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [{"name": "_KYC", "type": "address"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}], "devdoc": {"methods": {"verify(address,address,uint256)": {"details": "Checking if transfer can happen, and if so, what is the right amount", "params": {"from": "The account sending the tokens", "to": "The account receiving the tokens", "value": "The indended amount"}, "return": "The actual amount permitted"}}}, "userdoc": {"methods": {}}}, "settings": {"compilationTarget": {"contracts/security-token/RestrictedTransferAgent.sol": "RestrictedTransferAgent"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/security-token/KYCInterface.sol": {"keccak256": "0x29b1037cfb17f26421589f64eb271362aa9fbfd1f975e68df8071fd98be2052c", "urls": ["bzzr://f815559e1245fd3603a1baf5f3ad7ed7d571690b35f131cb27e0fcf8246c34a4"]}, "contracts/security-token/RestrictedTransferAgent.sol": {"keccak256": "0x4b240be52a599b8e850756a3d1ef2c3fc6ef8e059d8c3a90776fea658df045ec", "urls": ["bzzr://616b9b9cc0f7addefdbf352cb8ffa5c10f81e6ceee88a13dbd436dd9097db7dd"]}, "contracts/security-token/SecurityTransferAgentInterface.sol": {"keccak256": "0x23b8a61926435e2c583480c0de72a99b4f7ec8a4213ffc46711f83ecdeaf9186", "urls": ["bzzr://36be13b6cf1389357679705bd18969409ecde684ace2d9c5b606d8986e0231cd"]}}, "version": 1}, "name": "RestrictedTransferAgent", "ordered_full_dependencies": [], "source_path": "contracts/security-token/RestrictedTransferAgent.sol", "source": "\n\ninterface KYCInterface {\n event Whitelisted(address who, uint128 nonce);\n\n function isWhitelisted(address who) external view returns(bool);\n}\n\n\ninterface SecurityTransferAgent {\n function verify(address from, address to, uint256 value) public view returns (uint256 newValue);\n}\n\n\ncontract RestrictedTransferAgent is SecurityTransferAgent {\n\n KYCInterface KYC;\n\n function RestrictedTransferAgent(KYCInterface _KYC) {\n KYC = _KYC;\n }\n\n /**\n * @dev Checking if transfer can happen, and if so, what is the right amount\n *\n * @param from The account sending the tokens\n * @param to The account receiving the tokens\n * @param value The indended amount\n * @return The actual amount permitted\n */\n function verify(address from, address to, uint256 value) public view returns (uint256 newValue) {\n if (address(KYC) == address(0)) {\n return value;\n }\n\n if (KYC.isWhitelisted(to)) {\n return value;\n } else {\n return 0;\n }\n }\n}\n"}, "Roles": {"abi": [], "bytecode": "0x604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600080fd00a165627a7a72305820454b2ed1ab7179358549ecb27f4fc7360fa94e7d2fd6be354bae7674cb11038c0029", "bytecode_runtime": "0x73000000000000000000000000000000000000000030146080604052600080fd00a165627a7a72305820454b2ed1ab7179358549ecb27f4fc7360fa94e7d2fd6be354bae7674cb11038c0029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [], "devdoc": {"author": "Francisco Giordano (@frangio)", "methods": {}, "title": "Roles"}, "userdoc": {"methods": {}}}, "settings": {"compilationTarget": {"zeppelin/contracts/ownership/rbac/Roles.sol": "Roles"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"zeppelin/contracts/ownership/rbac/Roles.sol": {"keccak256": "0xbab0d0ae15daca818349ead8040dd1794327e2b9a616749fc69a29a5ad85be58", "urls": ["bzzr://5443bb48b0678d3c6cbb48869517d004564ad35e20d96ac9727738b5f8bc45e4"]}}, "version": 1}, "name": "Roles", "ordered_full_dependencies": [], "source_path": "zeppelin/contracts/ownership/rbac/Roles.sol", "source": "\n\n/**\n * @title Roles\n * @author Francisco Giordano (@frangio)\n * @dev Library for managing addresses assigned to a Role.\n * See RBAC.sol for example usage.\n */\nlibrary Roles {\n struct Role {\n mapping (address => bool) bearer;\n }\n\n /**\n * @dev give an address access to this role\n */\n function add(Role storage role, address addr)\n internal\n {\n role.bearer[addr] = true;\n }\n\n /**\n * @dev remove an address' access to this role\n */\n function remove(Role storage role, address addr)\n internal\n {\n role.bearer[addr] = false;\n }\n\n /**\n * @dev check if an address has this role\n * // reverts\n */\n function check(Role storage role, address addr)\n view\n internal\n {\n require(has(role, addr));\n }\n\n /**\n * @dev check if an address has this role\n * @return bool\n */\n function has(Role storage role, address addr)\n view\n internal\n returns (bool)\n {\n return role.bearer[addr];\n }\n}\n"}, "SafeMath": {"abi": [], "bytecode": "0x604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600080fd00a165627a7a723058204341d26a4e3577ffacdeae015a23d15ef6797c43c52b9b2ae29f6f3f384fb1c70029", "bytecode_runtime": "0x73000000000000000000000000000000000000000030146080604052600080fd00a165627a7a723058204341d26a4e3577ffacdeae015a23d15ef6797c43c52b9b2ae29f6f3f384fb1c70029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [], "devdoc": {"methods": {}, "title": "SafeMath"}, "userdoc": {"methods": {}}}, "settings": {"compilationTarget": {"zeppelin/contracts/math/SafeMath.sol": "SafeMath"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"zeppelin/contracts/math/SafeMath.sol": {"keccak256": "0x341ba8cb467a3623e819ba1a683ac1d264005186f308505214e5f6bc89446a08", "urls": ["bzzr://59b5652ee4e4a1b5a8f1a8906e14c84af43d636cf5ca0725cc1813aabe4c8c17"]}}, "version": 1}, "name": "SafeMath", "ordered_full_dependencies": [], "source_path": "zeppelin/contracts/math/SafeMath.sol", "source": "\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n assert(c / a == b);\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n"}, "SafeMathLib": {"abi": [{"constant": false, "inputs": [{"name": "a", "type": "uint256"}, {"name": "b", "type": "uint256"}], "name": "times", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "a", "type": "uint256"}, {"name": "b", "type": "uint256"}], "name": "plus", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "a", "type": "uint256"}, {"name": "b", "type": "uint256"}], "name": "minus", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}], "bytecode": "0x61014d610030600b82828239805160001a6073146000811461002057610022565bfe5b5030600052607381538281f300730000000000000000000000000000000000000000301460806040526004361061006d5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416631d3b9edf811461007257806366098d4f1461009f578063f4f3bdc1146100ba575b600080fd5b81801561007e57600080fd5b5061008d6004356024356100d5565b60408051918252519081900360200190f35b8180156100ab57600080fd5b5061008d600435602435610100565b8180156100c657600080fd5b5061008d60043560243561010f565b60008282028315806100f157508284828115156100ee57fe5b04145b15156100f957fe5b9392505050565b6000828201838110156100f957fe5b60008282111561011b57fe5b509003905600a165627a7a72305820a82a698ff7591b80a6dfbe5c85ceece5c3afecad975cc3a15dd0de62722265e70029", "bytecode_runtime": "0x730000000000000000000000000000000000000000301460806040526004361061006d5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416631d3b9edf811461007257806366098d4f1461009f578063f4f3bdc1146100ba575b600080fd5b81801561007e57600080fd5b5061008d6004356024356100d5565b60408051918252519081900360200190f35b8180156100ab57600080fd5b5061008d600435602435610100565b8180156100c657600080fd5b5061008d60043560243561010f565b60008282028315806100f157508284828115156100ee57fe5b04145b15156100f957fe5b9392505050565b6000828201838110156100f957fe5b60008282111561011b57fe5b509003905600a165627a7a72305820a82a698ff7591b80a6dfbe5c85ceece5c3afecad975cc3a15dd0de62722265e70029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": false, "inputs": [{"name": "a", "type": "uint256"}, {"name": "b", "type": "uint256"}], "name": "times", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "a", "type": "uint256"}, {"name": "b", "type": "uint256"}], "name": "plus", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "a", "type": "uint256"}, {"name": "b", "type": "uint256"}], "name": "minus", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}], "devdoc": {"methods": {}}, "userdoc": {"methods": {}}}, "settings": {"compilationTarget": {"contracts/SafeMathLib.sol": "SafeMathLib"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/SafeMathLib.sol": {"keccak256": "0x501bfe31e274b9a5591f7c540bdced4d4312e27d4f19599147c9bbca3d9c6b18", "urls": ["bzzr://a80935ebddb06c247d71372d4e5833ee029f08633bd0fe4a274a57009567e5b9"]}}, "version": 1}, "name": "SafeMathLib", "ordered_full_dependencies": [], "source_path": "contracts/SafeMathLib.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Safe unsigned safe math.\n *\n * https://blog.aragon.one/library-driven-development-in-solidity-2bebcaf88736#.750gwtwli\n *\n * Originally from https://raw.githubusercontent.com/AragonOne/zeppelin-solidity/master/contracts/SafeMathLib.sol\n *\n * Maintained here until merged to mainline zeppelin-solidity.\n *\n */\nlibrary SafeMathLib {\n\n function times(uint a, uint b) returns (uint) {\n uint c = a * b;\n assert(a == 0 || c / a == b);\n return c;\n }\n\n function minus(uint a, uint b) returns (uint) {\n assert(b <= a);\n return a - b;\n }\n\n function plus(uint a, uint b) returns (uint) {\n uint c = a + b;\n assert(c>=a);\n return c;\n }\n\n}\n"}, "SecurityToken": {"abi": [{"constant": true, "inputs": [], "name": "name", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "approve", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "addr", "type": "address"}, {"name": "roleName", "type": "string"}], "name": "checkRole", "outputs": [], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_signature", "type": "bytes"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}, {"name": "_fee", "type": "uint256"}, {"name": "_nonce", "type": "uint256"}], "name": "transferPreSigned", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_token", "type": "address"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}, {"name": "_fee", "type": "uint256"}, {"name": "_nonce", "type": "uint256"}], "name": "transferPreSignedHashing", "outputs": [{"name": "", "type": "bytes32"}], "payable": false, "stateMutability": "pure", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "recoverTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "addedValue", "type": "uint256"}, {"name": "data", "type": "bytes"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "tokenCount", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "announcement", "type": "address"}], "name": "announce", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "hash", "type": "bytes32"}, {"name": "sig", "type": "bytes"}], "name": "recover", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "pure", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "uint256"}], "name": "announcements", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "addr", "type": "address"}, {"name": "roleName", "type": "string"}], "name": "hasRole", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "from", "type": "address"}, {"name": "to", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "decimals", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "from", "type": "address"}, {"name": "to", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "forceTransfer", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "owner", "type": "address"}, {"name": "blockNumber", "type": "uint256"}], "name": "balanceAt", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "announcementsByAddress", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "receiver", "type": "address"}, {"name": "amount", "type": "uint256"}, {"name": "data", "type": "bytes"}], "name": "transferAndCall", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}, {"name": "", "type": "uint256"}], "name": "tokenBalances", "outputs": [{"name": "blockNumber", "type": "uint256"}, {"name": "value", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "uint256"}], "name": "tokensTotal", "outputs": [{"name": "blockNumber", "type": "uint256"}, {"name": "value", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "version", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "url", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}, {"name": "", "type": "address"}], "name": "allowed", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_name", "type": "string"}, {"name": "_symbol", "type": "string"}, {"name": "_url", "type": "string"}], "name": "setTokenInformation", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "subtractedValue", "type": "uint256"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "uint256"}], "name": "burnTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "owner", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "subtractedValue", "type": "uint256"}, {"name": "data", "type": "bytes"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "roleName", "type": "string"}], "name": "adminRemoveRole", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "transferVerifier", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "symbol", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "blockNumber", "type": "uint256"}], "name": "totalSupplyAt", "outputs": [{"name": "tokenCount", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "uint256"}], "name": "issueTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "to", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "roleName", "type": "string"}], "name": "adminAddRole", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "tokensToBeReturned", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "ROLE_ADMIN", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "addedValue", "type": "uint256"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "owner", "type": "address"}, {"name": "spender", "type": "address"}], "name": "allowance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newVerifier", "type": "address"}], "name": "setTransactionVerifier", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [{"name": "_name", "type": "string"}, {"name": "_symbol", "type": "string"}, {"name": "_url", "type": "string"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Issued", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "burner", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Burned", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Forced", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "announcement", "type": "address"}, {"indexed": true, "name": "announcementType", "type": "uint256"}, {"indexed": true, "name": "announcementName", "type": "bytes32"}, {"indexed": false, "name": "announcementURI", "type": "bytes32"}, {"indexed": false, "name": "announcementHash", "type": "uint256"}], "name": "Announced", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newName", "type": "string"}, {"indexed": false, "name": "newSymbol", "type": "string"}, {"indexed": false, "name": "newUrl", "type": "string"}], "name": "UpdatedTokenInformation", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newVerifier", "type": "address"}], "name": "UpdatedTransactionVerifier", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": true, "name": "delegate", "type": "address"}, {"indexed": false, "name": "amount", "type": "uint256"}, {"indexed": false, "name": "fee", "type": "uint256"}], "name": "TransferPreSigned", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "from", "type": "address"}, {"indexed": false, "name": "hash", "type": "bytes32"}], "name": "Debug", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "addr", "type": "address"}, {"indexed": false, "name": "roleName", "type": "string"}], "name": "RoleAdded", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "addr", "type": "address"}, {"indexed": false, "name": "roleName", "type": "string"}], "name": "RoleRemoved", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "from", "type": "address"}, {"indexed": false, "name": "receiver", "type": "address"}, {"indexed": false, "name": "amount", "type": "uint256"}, {"indexed": false, "name": "data", "type": "bytes"}], "name": "ERC677Transfer", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}, {"indexed": true, "name": "spender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "bytecode": "0x60c0604052600960808190527f544d2d303120302e31000000000000000000000000000000000000000000000060a09081526200004091600a91906200046c565b503480156200004e57600080fd5b5060405162002f4538038062002f4583398101604090815281516020808401519284015191840180519094938401939290920191849184916012916200009a916000918601906200046c565b508151620000b09060019060208501906200046c565b50600255505060408051808201909152600581527f61646d696e00000000000000000000000000000000000000000000000000000060208201526200010090339064010000000062000311810204565b60088054600160a060020a0319163317905580516200012790600b9060208401906200046c565b5062000178336040805190810160405280600a81526020017f616e6e6f756e636528290000000000000000000000000000000000000000000081525062000311640100000000026401000000009004565b620001c8336040805190810160405280600f81526020017f666f7263655472616e736665722829000000000000000000000000000000000081525062000311640100000000026401000000009004565b62000218336040805190810160405280600d81526020017f6973737565546f6b656e7328290000000000000000000000000000000000000081525062000311640100000000026401000000009004565b62000268336040805190810160405280600c81526020017f6275726e546f6b656e732829000000000000000000000000000000000000000081525062000311640100000000026401000000009004565b620002b8336040805190810160405280601581526020017f736574546f6b656e496e666f726d6174696f6e2829000000000000000000000081525062000311640100000000026401000000009004565b62000308336040805190810160405280601881526020017f7365745472616e73616374696f6e56657269666965722829000000000000000081525062000311640100000000026401000000009004565b50505062000511565b6200038d826007836040518082805190602001908083835b602083106200034a5780518252601f19909201916020918201910162000329565b51815160209384036101000a6000190180199092169116179052920194855250604051938490030190922092915050640100000000620004478102620029211704565b7fbfec83d64eaa953f2708271a023ab9ee82057f8f3578d548c1a4ba0b5b70048982826040518083600160a060020a0316600160a060020a0316815260200180602001828103825283818151815260200191508051906020019080838360005b8381101562000407578181015183820152602001620003ed565b50505050905090810190601f168015620004355780820380516001836020036101000a031916815260200191505b50935050505060405180910390a15050565b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620004af57805160ff1916838001178555620004df565b82800160010185558215620004df579182015b82811115620004df578251825591602001919060010190620004c2565b50620004ed929150620004f1565b5090565b6200050e91905b80821115620004ed5760008155600101620004f8565b90565b612a2480620005216000396000f3006080604052600436106102035763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde038114610208578063095ea7b3146102925780630988ca8c146102ca5780631296830d1461033357806315420b71146103a657806316114acd146103e857806316ca3b631461040957806318160ddd1461047257806318913e211461048757806319045a25146104a85780631bcfbe3114610522578063217fe6c61461053a57806323b872dd146105a1578063313ce567146105cb57806333bebb77146105e05780633b8e6f2e1461060a5780633f9ed88c1461062e5780634000aea01461064f57806348ff5665146106b85780634f0092ab146106f557806354fd4d501461070d5780635600f04f146107225780635c658165146107375780635c7181bc1461075e57806366188463146107965780636d1b229d146107ba57806370a08231146107d25780637272ad49146107f357806388cee87e1461085c5780638da5cb5b146108c35780638daed528146108d857806395d89b41146108ed578063981b24d014610902578063a5820daa1461091a578063a9059cbb14610932578063b25fa92c14610956578063c45d19db146109bd578063d391014b146109de578063d73dd623146109f3578063dd62ed3e14610a17578063eeac096914610a3e578063f2fde38b14610a5f575b600080fd5b34801561021457600080fd5b5061021d610a80565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561025757818101518382015260200161023f565b50505050905090810190601f1680156102845780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561029e57600080fd5b506102b6600160a060020a0360043516602435610b0e565b604080519115158252519081900360200190f35b3480156102d657600080fd5b5060408051602060046024803582810135601f8101859004850286018501909652858552610331958335600160a060020a0316953695604494919390910191908190840183828082843750949750610b749650505050505050565b005b34801561033f57600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526102b694369492936024939284019190819084018382808284375094975050508335600160a060020a0316945050506020820135916040810135915060600135610be2565b3480156103b257600080fd5b506103d6600160a060020a0360043581169060243516604435606435608435610e02565b60408051918252519081900360200190f35b3480156103f457600080fd5b50610331600160a060020a0360043516610e74565b34801561041557600080fd5b50604080516020600460443581810135601f81018490048402850184019095528484526102b6948235600160a060020a0316946024803595369594606494920191908190840183828082843750949750610f449650505050505050565b34801561047e57600080fd5b506103d6610ff4565b34801561049357600080fd5b50610331600160a060020a0360043516611006565b3480156104b457600080fd5b5060408051602060046024803582810135601f81018590048502860185019096528585526105069583359536956044949193909101919081908401838280828437509497506112fb9650505050505050565b60408051600160a060020a039092168252519081900360200190f35b34801561052e57600080fd5b506105066004356113d0565b34801561054657600080fd5b5060408051602060046024803582810135601f81018590048502860185019096528585526102b6958335600160a060020a03169536956044949193909101919081908401838280828437509497506113f89650505050505050565b3480156105ad57600080fd5b506102b6600160a060020a0360043581169060243516604435611464565b3480156105d757600080fd5b506103d66114f4565b3480156105ec57600080fd5b50610331600160a060020a03600435811690602435166044356114fa565b34801561061657600080fd5b506103d6600160a060020a0360043516602435611594565b34801561063a57600080fd5b506103d6600160a060020a03600435166115b6565b34801561065b57600080fd5b50604080516020600460443581810135601f81018490048402850184019095528484526102b6948235600160a060020a03169460248035953695946064949201919081908401838280828437509497506115c89650505050505050565b3480156106c457600080fd5b506106dc600160a060020a03600435166024356117d1565b6040805192835260208301919091528051918290030190f35b34801561070157600080fd5b506106dc60043561180c565b34801561071957600080fd5b5061021d611838565b34801561072e57600080fd5b5061021d611893565b34801561074357600080fd5b506103d6600160a060020a03600435811690602435166118ee565b34801561076a57600080fd5b50610331602460048035828101929082013591813580830192908201359160443591820191013561190b565b3480156107a257600080fd5b506102b6600160a060020a0360043516602435611b2b565b3480156107c657600080fd5b50610331600435611c1b565b3480156107de57600080fd5b506103d6600160a060020a0360043516611d21565b3480156107ff57600080fd5b50604080516020600460443581810135601f81018490048402850184019095528484526102b6948235600160a060020a0316946024803595369594606494920191908190840183828082843750949750611d499650505050505050565b34801561086857600080fd5b5060408051602060046024803582810135601f8101859004850286018501909652858552610331958335600160a060020a0316953695604494919390910191908190840183828082843750949750611d6b9650505050505050565b3480156108cf57600080fd5b50610506611db4565b3480156108e457600080fd5b50610506611dc3565b3480156108f957600080fd5b5061021d611dd2565b34801561090e57600080fd5b506103d6600435611e2c565b34801561092657600080fd5b50610331600435611e39565b34801561093e57600080fd5b506102b6600160a060020a0360043516602435611f3b565b34801561096257600080fd5b5060408051602060046024803582810135601f8101859004850286018501909652858552610331958335600160a060020a0316953695604494919390910191908190840183828082843750949750611f919650505050505050565b3480156109c957600080fd5b506103d6600160a060020a0360043516611fda565b3480156109ea57600080fd5b5061021d612070565b3480156109ff57600080fd5b506102b6600160a060020a03600435166024356120a7565b348015610a2357600080fd5b506103d6600160a060020a0360043581169060243516612140565b348015610a4a57600080fd5b50610331600160a060020a036004351661216b565b348015610a6b57600080fd5b50610331600160a060020a036004351661220b565b6000805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610b065780601f10610adb57610100808354040283529160200191610b06565b820191906000526020600020905b815481529060010190602001808311610ae957829003601f168201915b505050505081565b336000818152600660209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b610bde826007836040518082805190602001908083835b60208310610baa5780518252601f199092019160209182019101610b8b565b51815160209384036101000a60001901801990921691161790529201948552506040519384900301909220929150506122a0565b5050565b60008080600160a060020a0387161515610bfb57600080fd5b6009886040518082805190602001908083835b60208310610c2d5780518252601f199092019160209182019101610c0e565b51815160209384036101000a600019018019909216911617905292019485525060405193849003019092205460ff16159150610c6a905057600080fd5b610c773088888888610e02565b9150610c8382896112fb565b9050600160a060020a0381161515610c9a57600080fd5b610ca58188886122b5565b610cb08133876122b5565b60016009896040518082805190602001908083835b60208310610ce45780518252601f199092019160209182019101610cc5565b51815160209384036101000a6000190180199092169116179052920194855250604080519485900382018520805460ff1916961515969096179095558a84528301899052505081513392600160a060020a038b811693908616927fec5a73fd1f178be20c1bca1b406cbf4b5c20d833b66e582fc122fb4baa0fc2a4929181900390910190a486600160a060020a031681600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef886040518082815260200191505060405180910390a36040805186815290513391600160a060020a038416917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a3506001979650505050505050565b604080517f48664c160000000000000000000000000000000000000000000000000000000081526c01000000000000000000000000600160a060020a0397881681026004830152959096169094026018860152602c850192909252604c840152606c8301525190819003608c01902090565b600854600160a060020a03163314610e8b57600080fd5b600854600160a060020a038083169163a9059cbb9116610eaa84611fda565b6040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b158015610f1557600080fd5b505af1158015610f29573d6000803e3d6000fd5b505050506040513d6020811015610f3f57600080fd5b505050565b6000600160a060020a038416301415610f5c57600080fd5b610f6684846120a7565b5083600160a060020a03168260405180828051906020019080838360005b83811015610f9c578181015183820152602001610f84565b50505050905090810190601f168015610fc95780820380516001836020036101000a031916815260200191505b509150506000604051808303816000865af19150501515610fe957600080fd5b5060015b9392505050565b60006110016005436123f1565b905090565b60408051808201909152600a81527f616e6e6f756e636528290000000000000000000000000000000000000000000060208201526110443382610b74565b600c80546001810182557fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c701805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03851690811790915590546000828152600d602090815260408083209390935582517f9ea0c08c0000000000000000000000000000000000000000000000000000000081529251639ea0c08c93600480820194918390030190829087803b1580156110fa57600080fd5b505af115801561110e573d6000803e3d6000fd5b505050506040513d602081101561112457600080fd5b5051604080517f5fcce2790000000000000000000000000000000000000000000000000000000081529051600160a060020a03851691635fcce2799160048083019260209291908290030181600087803b15801561118157600080fd5b505af1158015611195573d6000803e3d6000fd5b505050506040513d60208110156111ab57600080fd5b5051604080517ff31294a40000000000000000000000000000000000000000000000000000000081529051600160a060020a038616917fecae36ae461af9b3746319bfdbfefc7de682e71e22dd901cbec95ad177c33db491839163f31294a49160048083019260209291908290030181600087803b15801561122c57600080fd5b505af1158015611240573d6000803e3d6000fd5b505050506040513d602081101561125657600080fd5b5051604080517f1274c3f30000000000000000000000000000000000000000000000000000000081529051600160a060020a03891691631274c3f39160048083019260209291908290030181600087803b1580156112b357600080fd5b505af11580156112c7573d6000803e3d6000fd5b505050506040513d60208110156112dd57600080fd5b50516040805192835260208301919091528051918290030190a45050565b6000806000808451604114151561131557600093506113c7565b50505060208201516040830151606084015160001a601b60ff8216101561133a57601b015b8060ff16601b1415801561135257508060ff16601c14155b1561136057600093506113c7565b60408051600080825260208083018085528a905260ff8516838501526060830187905260808301869052925160019360a0808501949193601f19840193928390039091019190865af11580156113ba573d6000803e3d6000fd5b5050506020604051035193505b50505092915050565b600c8054829081106113de57fe5b600091825260209091200154600160a060020a0316905081565b6000610fed836007846040518082805190602001908083835b602083106114305780518252601f199092019160209182019101611411565b51815160209384036101000a6000190180199092169116179052920194855250604051938490030190922092915050612407565b600160a060020a038316600090815260066020908152604080832033845290915281205482111561149457600080fd5b61149f8484846122b5565b82600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a35060019392505050565b60025481565b60408051808201909152600f81527f666f7263655472616e736665722829000000000000000000000000000000000060208201526115383382610b74565b6115438484846122b5565b82600160a060020a031684600160a060020a03167f768ff242747198c58dcb1136fb640adf7a199de1789b75bc95b6f787668b51b7846040518082815260200191505060405180910390a350505050565b600160a060020a0382166000908152600460205260408120610fed90836123f1565b600d6020526000908152604090205481565b60006115d48484611f3b565b15156115df57600080fd5b7f72db2339068fd324bbc28f2944e01064da539ac76064b6ce4a97a5f81de43dd6338585856040518085600160a060020a0316600160a060020a0316815260200184600160a060020a0316600160a060020a0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561167757818101518382015260200161165f565b50505050905090810190601f1680156116a45780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a183600160a060020a031663c0ee0b8a3385856040518463ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018084600160a060020a0316600160a060020a0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561174c578181015183820152602001611734565b50505050905090810190601f1680156117795780820380516001836020036101000a031916815260200191505b50945050505050602060405180830381600087803b15801561179a57600080fd5b505af11580156117ae573d6000803e3d6000fd5b505050506040513d60208110156117c457600080fd5b50511515610fed57600080fd5b6004602052816000526040600020818154811015156117ec57fe5b600091825260209091206002909102018054600190910154909250905082565b600580548290811061181a57fe5b60009182526020909120600290910201805460019091015490915082565b600a805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610b065780601f10610adb57610100808354040283529160200191610b06565b600b805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610b065780601f10610adb57610100808354040283529160200191610b06565b600660209081526000928352604080842090915290825290205481565b60408051808201909152601581527f736574546f6b656e496e666f726d6174696f6e2829000000000000000000000060208201526119493382610b74565b6119556000888861295d565b506119626001868661295d565b5061196f600b848461295d565b507fe7be9e386976ab29f9c6b6277a4bb92fe29d2ce986625e4bd063d90b5b4e986960006001600b60405180806020018060200180602001848103845287818154600181600116156101000203166002900481526020019150805460018160011615610100020316600290048015611a285780601f106119fd57610100808354040283529160200191611a28565b820191906000526020600020905b815481529060010190602001808311611a0b57829003601f168201915b5050848103835286546002600019610100600184161502019091160480825260209091019087908015611a9c5780601f10611a7157610100808354040283529160200191611a9c565b820191906000526020600020905b815481529060010190602001808311611a7f57829003601f168201915b5050848103825285546002600019610100600184161502019091160480825260209091019086908015611b105780601f10611ae557610100808354040283529160200191611b10565b820191906000526020600020905b815481529060010190602001808311611af357829003601f168201915b5050965050505050505060405180910390a150505050505050565b336000908152600660209081526040808320600160a060020a038616845290915281205480831115611b8057336000908152600660209081526040808320600160a060020a0388168452909152812055611bb5565b611b90818463ffffffff61242616565b336000908152600660209081526040808320600160a060020a03891684529091529020555b336000818152600660209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b60008060006040805190810160405280600c81526020017f6275726e546f6b656e7328290000000000000000000000000000000000000000815250611c603382610b74565b309350611c6c84611d21565b9250611c76610ff4565b9150611c84846000876122b5565b600080526004602052611cc67f17ef568e3e12ab5b9c7254a8d58478811de00f9e6eb34345acd53bf8fd09d3ec611cc1858863ffffffff61242616565b612438565b611cdb6005611cc1848863ffffffff61242616565b604080518681529051600160a060020a038616917f696de425f79f4a40bc6d2122ca50507f0efbeabbff86a84871b7196ab8ea8df7919081900360200190a25050505050565b600160a060020a0381166000908152600460205260408120611d4390436123f1565b92915050565b6000600160a060020a038416301415611d6157600080fd5b610f668484611b2b565b611daa336040805190810160405280600581526020017f61646d696e000000000000000000000000000000000000000000000000000000815250610b74565b610bde828261250e565b600854600160a060020a031681565b600354600160a060020a031681565b60018054604080516020600284861615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610b065780601f10610adb57610100808354040283529160200191610b06565b6000611d436005836123f1565b60008060006040805190810160405280600d81526020017f6973737565546f6b656e73282900000000000000000000000000000000000000815250611e7e3382610b74565b339350611e8b6000611d21565b9250611e95610ff4565b6000805260046020529150611ed47f17ef568e3e12ab5b9c7254a8d58478811de00f9e6eb34345acd53bf8fd09d3ec611cc1858863ffffffff61262f16565b611ee0600085876122b5565b611ef56005611cc1848863ffffffff61262f16565b604080518681529051600160a060020a038616917fa59f12e354e8cd10bb74c559844c2dd69a5458e31fe56c7594c62ca57480509a919081900360200190a25050505050565b6000611f483384846122b5565b604080518381529051600160a060020a0385169133917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a350600192915050565b611fd0336040805190810160405280600581526020017f61646d696e000000000000000000000000000000000000000000000000000000815250610b74565b610bde828261263e565b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600091600160a060020a038416916370a082319160248082019260209290919082900301818787803b15801561203e57600080fd5b505af1158015612052573d6000803e3d6000fd5b505050506040513d602081101561206857600080fd5b505192915050565b60408051808201909152600581527f61646d696e000000000000000000000000000000000000000000000000000000602082015281565b336000908152600660209081526040808320600160a060020a03861684529091528120546120db908363ffffffff61262f16565b336000818152600660209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a03918216600090815260066020908152604080832093909416825291909152205490565b60408051808201909152601881527f7365745472616e73616374696f6e56657269666965722829000000000000000060208201526121a93382610b74565b60038054600160a060020a03841673ffffffffffffffffffffffffffffffffffffffff19909116811790915560408051918252517fe87a0b647188a1482a1a619a8d3eaba4275e36eed81b5247a12e24a4df2032fb9181900360200190a15050565b600854600160a060020a0316331461222257600080fd5b600160a060020a038116151561223757600080fd5b600854604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36008805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6122aa8282612407565b1515610bde57600080fd5b6000806122c185611d21565b91506122cc84611d21565b600354909150600160a060020a03161561239257600354604080517fad076994000000000000000000000000000000000000000000000000000000008152600160a060020a0388811660048301528781166024830152604482018790529151919092169163ad0769949160648083019260209291908290030181600087803b15801561235757600080fd5b505af115801561236b573d6000803e3d6000fd5b505050506040513d602081101561238157600080fd5b505192506000831161239257600080fd5b600160a060020a03851660009081526004602052604090206123be90611cc1848663ffffffff61242616565b600160a060020a03841660009081526004602052604090206123ea90611cc1838663ffffffff61262f16565b5050505050565b6000806123fe848461271f565b95945050505050565b600160a060020a03166000908152602091909152604090205460ff1690565b60008282111561243257fe5b50900390565b81541580612476575081544390839061245890600163ffffffff61242616565b8154811061246257fe5b906000526020600020906002020160000154105b156124b8576040805180820190915243815260208082018381528454600181810187556000878152939093209351600290910290930192835551910155610bde565b6040805180820190915243815260208101829052825483906124e190600163ffffffff61242616565b815481106124eb57fe5b600091825260209182902083516002909202019081559101516001909101555050565b612578826007836040518082805190602001908083835b602083106125445780518252601f199092019160209182019101612525565b51815160209384036101000a60001901801990921691161790529201948552506040519384900301909220929150506128ff565b7fd211483f91fc6eff862467f8de606587a30c8fc9981056f051b897a418df803a82826040518083600160a060020a0316600160a060020a0316815260200180602001828103825283818151815260200191508051906020019080838360005b838110156125f05781810151838201526020016125d8565b50505050905090810190601f16801561261d5780820380516001836020036101000a031916815260200191505b50935050505060405180910390a15050565b600082820183811015610fed57fe5b6126a8826007836040518082805190602001908083835b602083106126745780518252601f199092019160209182019101612655565b51815160209384036101000a6000190180199092169116179052920194855250604051938490030190922092915050612921565b7fbfec83d64eaa953f2708271a023ab9ee82057f8f3578d548c1a4ba0b5b70048982826040518083600160a060020a0316600160a060020a031681526020018060200182810382528381815181526020019150805190602001908083836000838110156125f05781810151838201526020016125d8565b600080600080600086805490506000141561274057600094508493506128f5565b8654879061275590600163ffffffff61242616565b8154811061275f57fe5b600091825260209091206002909102015486106127e0578654879061278b90600163ffffffff61242616565b8154811061279557fe5b6000918252602090912060029091020154875488906127bb90600163ffffffff61242616565b815481106127c557fe5b906000526020600020906002020160010154945094506128f5565b8660008154811015156127ef57fe5b90600052602060002090600202016000015486101561281457600094508493506128f5565b86546000935061282b90600163ffffffff61242616565b91505b828211156128b057612868600261285c61284f86600163ffffffff61262f16565b859063ffffffff61262f16565b9063ffffffff61294616565b905085878281548110151561287957fe5b600091825260209091206002909102015411612897578092506128ab565b6128a881600163ffffffff61242616565b91505b61282e565b86838154811015156128be57fe5b90600052602060002090600202016000015487848154811015156128de57fe5b906000526020600020906002020160010154945094505b5050509250929050565b600160a060020a0316600090815260209190915260409020805460ff19169055565b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b600080828481151561295457fe5b04949350505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061299e5782800160ff198235161785556129cb565b828001600101855582156129cb579182015b828111156129cb5782358255916020019190600101906129b0565b506129d79291506129db565b5090565b6129f591905b808211156129d757600081556001016129e1565b905600a165627a7a723058204680ff247d8eda0fc3096eccdf318f2a73b5051da9fd47a2cca4599a74b4d8920029", "bytecode_runtime": "0x6080604052600436106102035763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde038114610208578063095ea7b3146102925780630988ca8c146102ca5780631296830d1461033357806315420b71146103a657806316114acd146103e857806316ca3b631461040957806318160ddd1461047257806318913e211461048757806319045a25146104a85780631bcfbe3114610522578063217fe6c61461053a57806323b872dd146105a1578063313ce567146105cb57806333bebb77146105e05780633b8e6f2e1461060a5780633f9ed88c1461062e5780634000aea01461064f57806348ff5665146106b85780634f0092ab146106f557806354fd4d501461070d5780635600f04f146107225780635c658165146107375780635c7181bc1461075e57806366188463146107965780636d1b229d146107ba57806370a08231146107d25780637272ad49146107f357806388cee87e1461085c5780638da5cb5b146108c35780638daed528146108d857806395d89b41146108ed578063981b24d014610902578063a5820daa1461091a578063a9059cbb14610932578063b25fa92c14610956578063c45d19db146109bd578063d391014b146109de578063d73dd623146109f3578063dd62ed3e14610a17578063eeac096914610a3e578063f2fde38b14610a5f575b600080fd5b34801561021457600080fd5b5061021d610a80565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561025757818101518382015260200161023f565b50505050905090810190601f1680156102845780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561029e57600080fd5b506102b6600160a060020a0360043516602435610b0e565b604080519115158252519081900360200190f35b3480156102d657600080fd5b5060408051602060046024803582810135601f8101859004850286018501909652858552610331958335600160a060020a0316953695604494919390910191908190840183828082843750949750610b749650505050505050565b005b34801561033f57600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526102b694369492936024939284019190819084018382808284375094975050508335600160a060020a0316945050506020820135916040810135915060600135610be2565b3480156103b257600080fd5b506103d6600160a060020a0360043581169060243516604435606435608435610e02565b60408051918252519081900360200190f35b3480156103f457600080fd5b50610331600160a060020a0360043516610e74565b34801561041557600080fd5b50604080516020600460443581810135601f81018490048402850184019095528484526102b6948235600160a060020a0316946024803595369594606494920191908190840183828082843750949750610f449650505050505050565b34801561047e57600080fd5b506103d6610ff4565b34801561049357600080fd5b50610331600160a060020a0360043516611006565b3480156104b457600080fd5b5060408051602060046024803582810135601f81018590048502860185019096528585526105069583359536956044949193909101919081908401838280828437509497506112fb9650505050505050565b60408051600160a060020a039092168252519081900360200190f35b34801561052e57600080fd5b506105066004356113d0565b34801561054657600080fd5b5060408051602060046024803582810135601f81018590048502860185019096528585526102b6958335600160a060020a03169536956044949193909101919081908401838280828437509497506113f89650505050505050565b3480156105ad57600080fd5b506102b6600160a060020a0360043581169060243516604435611464565b3480156105d757600080fd5b506103d66114f4565b3480156105ec57600080fd5b50610331600160a060020a03600435811690602435166044356114fa565b34801561061657600080fd5b506103d6600160a060020a0360043516602435611594565b34801561063a57600080fd5b506103d6600160a060020a03600435166115b6565b34801561065b57600080fd5b50604080516020600460443581810135601f81018490048402850184019095528484526102b6948235600160a060020a03169460248035953695946064949201919081908401838280828437509497506115c89650505050505050565b3480156106c457600080fd5b506106dc600160a060020a03600435166024356117d1565b6040805192835260208301919091528051918290030190f35b34801561070157600080fd5b506106dc60043561180c565b34801561071957600080fd5b5061021d611838565b34801561072e57600080fd5b5061021d611893565b34801561074357600080fd5b506103d6600160a060020a03600435811690602435166118ee565b34801561076a57600080fd5b50610331602460048035828101929082013591813580830192908201359160443591820191013561190b565b3480156107a257600080fd5b506102b6600160a060020a0360043516602435611b2b565b3480156107c657600080fd5b50610331600435611c1b565b3480156107de57600080fd5b506103d6600160a060020a0360043516611d21565b3480156107ff57600080fd5b50604080516020600460443581810135601f81018490048402850184019095528484526102b6948235600160a060020a0316946024803595369594606494920191908190840183828082843750949750611d499650505050505050565b34801561086857600080fd5b5060408051602060046024803582810135601f8101859004850286018501909652858552610331958335600160a060020a0316953695604494919390910191908190840183828082843750949750611d6b9650505050505050565b3480156108cf57600080fd5b50610506611db4565b3480156108e457600080fd5b50610506611dc3565b3480156108f957600080fd5b5061021d611dd2565b34801561090e57600080fd5b506103d6600435611e2c565b34801561092657600080fd5b50610331600435611e39565b34801561093e57600080fd5b506102b6600160a060020a0360043516602435611f3b565b34801561096257600080fd5b5060408051602060046024803582810135601f8101859004850286018501909652858552610331958335600160a060020a0316953695604494919390910191908190840183828082843750949750611f919650505050505050565b3480156109c957600080fd5b506103d6600160a060020a0360043516611fda565b3480156109ea57600080fd5b5061021d612070565b3480156109ff57600080fd5b506102b6600160a060020a03600435166024356120a7565b348015610a2357600080fd5b506103d6600160a060020a0360043581169060243516612140565b348015610a4a57600080fd5b50610331600160a060020a036004351661216b565b348015610a6b57600080fd5b50610331600160a060020a036004351661220b565b6000805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610b065780601f10610adb57610100808354040283529160200191610b06565b820191906000526020600020905b815481529060010190602001808311610ae957829003601f168201915b505050505081565b336000818152600660209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b610bde826007836040518082805190602001908083835b60208310610baa5780518252601f199092019160209182019101610b8b565b51815160209384036101000a60001901801990921691161790529201948552506040519384900301909220929150506122a0565b5050565b60008080600160a060020a0387161515610bfb57600080fd5b6009886040518082805190602001908083835b60208310610c2d5780518252601f199092019160209182019101610c0e565b51815160209384036101000a600019018019909216911617905292019485525060405193849003019092205460ff16159150610c6a905057600080fd5b610c773088888888610e02565b9150610c8382896112fb565b9050600160a060020a0381161515610c9a57600080fd5b610ca58188886122b5565b610cb08133876122b5565b60016009896040518082805190602001908083835b60208310610ce45780518252601f199092019160209182019101610cc5565b51815160209384036101000a6000190180199092169116179052920194855250604080519485900382018520805460ff1916961515969096179095558a84528301899052505081513392600160a060020a038b811693908616927fec5a73fd1f178be20c1bca1b406cbf4b5c20d833b66e582fc122fb4baa0fc2a4929181900390910190a486600160a060020a031681600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef886040518082815260200191505060405180910390a36040805186815290513391600160a060020a038416917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a3506001979650505050505050565b604080517f48664c160000000000000000000000000000000000000000000000000000000081526c01000000000000000000000000600160a060020a0397881681026004830152959096169094026018860152602c850192909252604c840152606c8301525190819003608c01902090565b600854600160a060020a03163314610e8b57600080fd5b600854600160a060020a038083169163a9059cbb9116610eaa84611fda565b6040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b158015610f1557600080fd5b505af1158015610f29573d6000803e3d6000fd5b505050506040513d6020811015610f3f57600080fd5b505050565b6000600160a060020a038416301415610f5c57600080fd5b610f6684846120a7565b5083600160a060020a03168260405180828051906020019080838360005b83811015610f9c578181015183820152602001610f84565b50505050905090810190601f168015610fc95780820380516001836020036101000a031916815260200191505b509150506000604051808303816000865af19150501515610fe957600080fd5b5060015b9392505050565b60006110016005436123f1565b905090565b60408051808201909152600a81527f616e6e6f756e636528290000000000000000000000000000000000000000000060208201526110443382610b74565b600c80546001810182557fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c701805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03851690811790915590546000828152600d602090815260408083209390935582517f9ea0c08c0000000000000000000000000000000000000000000000000000000081529251639ea0c08c93600480820194918390030190829087803b1580156110fa57600080fd5b505af115801561110e573d6000803e3d6000fd5b505050506040513d602081101561112457600080fd5b5051604080517f5fcce2790000000000000000000000000000000000000000000000000000000081529051600160a060020a03851691635fcce2799160048083019260209291908290030181600087803b15801561118157600080fd5b505af1158015611195573d6000803e3d6000fd5b505050506040513d60208110156111ab57600080fd5b5051604080517ff31294a40000000000000000000000000000000000000000000000000000000081529051600160a060020a038616917fecae36ae461af9b3746319bfdbfefc7de682e71e22dd901cbec95ad177c33db491839163f31294a49160048083019260209291908290030181600087803b15801561122c57600080fd5b505af1158015611240573d6000803e3d6000fd5b505050506040513d602081101561125657600080fd5b5051604080517f1274c3f30000000000000000000000000000000000000000000000000000000081529051600160a060020a03891691631274c3f39160048083019260209291908290030181600087803b1580156112b357600080fd5b505af11580156112c7573d6000803e3d6000fd5b505050506040513d60208110156112dd57600080fd5b50516040805192835260208301919091528051918290030190a45050565b6000806000808451604114151561131557600093506113c7565b50505060208201516040830151606084015160001a601b60ff8216101561133a57601b015b8060ff16601b1415801561135257508060ff16601c14155b1561136057600093506113c7565b60408051600080825260208083018085528a905260ff8516838501526060830187905260808301869052925160019360a0808501949193601f19840193928390039091019190865af11580156113ba573d6000803e3d6000fd5b5050506020604051035193505b50505092915050565b600c8054829081106113de57fe5b600091825260209091200154600160a060020a0316905081565b6000610fed836007846040518082805190602001908083835b602083106114305780518252601f199092019160209182019101611411565b51815160209384036101000a6000190180199092169116179052920194855250604051938490030190922092915050612407565b600160a060020a038316600090815260066020908152604080832033845290915281205482111561149457600080fd5b61149f8484846122b5565b82600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a35060019392505050565b60025481565b60408051808201909152600f81527f666f7263655472616e736665722829000000000000000000000000000000000060208201526115383382610b74565b6115438484846122b5565b82600160a060020a031684600160a060020a03167f768ff242747198c58dcb1136fb640adf7a199de1789b75bc95b6f787668b51b7846040518082815260200191505060405180910390a350505050565b600160a060020a0382166000908152600460205260408120610fed90836123f1565b600d6020526000908152604090205481565b60006115d48484611f3b565b15156115df57600080fd5b7f72db2339068fd324bbc28f2944e01064da539ac76064b6ce4a97a5f81de43dd6338585856040518085600160a060020a0316600160a060020a0316815260200184600160a060020a0316600160a060020a0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561167757818101518382015260200161165f565b50505050905090810190601f1680156116a45780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a183600160a060020a031663c0ee0b8a3385856040518463ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018084600160a060020a0316600160a060020a0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561174c578181015183820152602001611734565b50505050905090810190601f1680156117795780820380516001836020036101000a031916815260200191505b50945050505050602060405180830381600087803b15801561179a57600080fd5b505af11580156117ae573d6000803e3d6000fd5b505050506040513d60208110156117c457600080fd5b50511515610fed57600080fd5b6004602052816000526040600020818154811015156117ec57fe5b600091825260209091206002909102018054600190910154909250905082565b600580548290811061181a57fe5b60009182526020909120600290910201805460019091015490915082565b600a805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610b065780601f10610adb57610100808354040283529160200191610b06565b600b805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610b065780601f10610adb57610100808354040283529160200191610b06565b600660209081526000928352604080842090915290825290205481565b60408051808201909152601581527f736574546f6b656e496e666f726d6174696f6e2829000000000000000000000060208201526119493382610b74565b6119556000888861295d565b506119626001868661295d565b5061196f600b848461295d565b507fe7be9e386976ab29f9c6b6277a4bb92fe29d2ce986625e4bd063d90b5b4e986960006001600b60405180806020018060200180602001848103845287818154600181600116156101000203166002900481526020019150805460018160011615610100020316600290048015611a285780601f106119fd57610100808354040283529160200191611a28565b820191906000526020600020905b815481529060010190602001808311611a0b57829003601f168201915b5050848103835286546002600019610100600184161502019091160480825260209091019087908015611a9c5780601f10611a7157610100808354040283529160200191611a9c565b820191906000526020600020905b815481529060010190602001808311611a7f57829003601f168201915b5050848103825285546002600019610100600184161502019091160480825260209091019086908015611b105780601f10611ae557610100808354040283529160200191611b10565b820191906000526020600020905b815481529060010190602001808311611af357829003601f168201915b5050965050505050505060405180910390a150505050505050565b336000908152600660209081526040808320600160a060020a038616845290915281205480831115611b8057336000908152600660209081526040808320600160a060020a0388168452909152812055611bb5565b611b90818463ffffffff61242616565b336000908152600660209081526040808320600160a060020a03891684529091529020555b336000818152600660209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b60008060006040805190810160405280600c81526020017f6275726e546f6b656e7328290000000000000000000000000000000000000000815250611c603382610b74565b309350611c6c84611d21565b9250611c76610ff4565b9150611c84846000876122b5565b600080526004602052611cc67f17ef568e3e12ab5b9c7254a8d58478811de00f9e6eb34345acd53bf8fd09d3ec611cc1858863ffffffff61242616565b612438565b611cdb6005611cc1848863ffffffff61242616565b604080518681529051600160a060020a038616917f696de425f79f4a40bc6d2122ca50507f0efbeabbff86a84871b7196ab8ea8df7919081900360200190a25050505050565b600160a060020a0381166000908152600460205260408120611d4390436123f1565b92915050565b6000600160a060020a038416301415611d6157600080fd5b610f668484611b2b565b611daa336040805190810160405280600581526020017f61646d696e000000000000000000000000000000000000000000000000000000815250610b74565b610bde828261250e565b600854600160a060020a031681565b600354600160a060020a031681565b60018054604080516020600284861615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610b065780601f10610adb57610100808354040283529160200191610b06565b6000611d436005836123f1565b60008060006040805190810160405280600d81526020017f6973737565546f6b656e73282900000000000000000000000000000000000000815250611e7e3382610b74565b339350611e8b6000611d21565b9250611e95610ff4565b6000805260046020529150611ed47f17ef568e3e12ab5b9c7254a8d58478811de00f9e6eb34345acd53bf8fd09d3ec611cc1858863ffffffff61262f16565b611ee0600085876122b5565b611ef56005611cc1848863ffffffff61262f16565b604080518681529051600160a060020a038616917fa59f12e354e8cd10bb74c559844c2dd69a5458e31fe56c7594c62ca57480509a919081900360200190a25050505050565b6000611f483384846122b5565b604080518381529051600160a060020a0385169133917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a350600192915050565b611fd0336040805190810160405280600581526020017f61646d696e000000000000000000000000000000000000000000000000000000815250610b74565b610bde828261263e565b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600091600160a060020a038416916370a082319160248082019260209290919082900301818787803b15801561203e57600080fd5b505af1158015612052573d6000803e3d6000fd5b505050506040513d602081101561206857600080fd5b505192915050565b60408051808201909152600581527f61646d696e000000000000000000000000000000000000000000000000000000602082015281565b336000908152600660209081526040808320600160a060020a03861684529091528120546120db908363ffffffff61262f16565b336000818152600660209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a03918216600090815260066020908152604080832093909416825291909152205490565b60408051808201909152601881527f7365745472616e73616374696f6e56657269666965722829000000000000000060208201526121a93382610b74565b60038054600160a060020a03841673ffffffffffffffffffffffffffffffffffffffff19909116811790915560408051918252517fe87a0b647188a1482a1a619a8d3eaba4275e36eed81b5247a12e24a4df2032fb9181900360200190a15050565b600854600160a060020a0316331461222257600080fd5b600160a060020a038116151561223757600080fd5b600854604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36008805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6122aa8282612407565b1515610bde57600080fd5b6000806122c185611d21565b91506122cc84611d21565b600354909150600160a060020a03161561239257600354604080517fad076994000000000000000000000000000000000000000000000000000000008152600160a060020a0388811660048301528781166024830152604482018790529151919092169163ad0769949160648083019260209291908290030181600087803b15801561235757600080fd5b505af115801561236b573d6000803e3d6000fd5b505050506040513d602081101561238157600080fd5b505192506000831161239257600080fd5b600160a060020a03851660009081526004602052604090206123be90611cc1848663ffffffff61242616565b600160a060020a03841660009081526004602052604090206123ea90611cc1838663ffffffff61262f16565b5050505050565b6000806123fe848461271f565b95945050505050565b600160a060020a03166000908152602091909152604090205460ff1690565b60008282111561243257fe5b50900390565b81541580612476575081544390839061245890600163ffffffff61242616565b8154811061246257fe5b906000526020600020906002020160000154105b156124b8576040805180820190915243815260208082018381528454600181810187556000878152939093209351600290910290930192835551910155610bde565b6040805180820190915243815260208101829052825483906124e190600163ffffffff61242616565b815481106124eb57fe5b600091825260209182902083516002909202019081559101516001909101555050565b612578826007836040518082805190602001908083835b602083106125445780518252601f199092019160209182019101612525565b51815160209384036101000a60001901801990921691161790529201948552506040519384900301909220929150506128ff565b7fd211483f91fc6eff862467f8de606587a30c8fc9981056f051b897a418df803a82826040518083600160a060020a0316600160a060020a0316815260200180602001828103825283818151815260200191508051906020019080838360005b838110156125f05781810151838201526020016125d8565b50505050905090810190601f16801561261d5780820380516001836020036101000a031916815260200191505b50935050505060405180910390a15050565b600082820183811015610fed57fe5b6126a8826007836040518082805190602001908083835b602083106126745780518252601f199092019160209182019101612655565b51815160209384036101000a6000190180199092169116179052920194855250604051938490030190922092915050612921565b7fbfec83d64eaa953f2708271a023ab9ee82057f8f3578d548c1a4ba0b5b70048982826040518083600160a060020a0316600160a060020a031681526020018060200182810382528381815181526020019150805190602001908083836000838110156125f05781810151838201526020016125d8565b600080600080600086805490506000141561274057600094508493506128f5565b8654879061275590600163ffffffff61242616565b8154811061275f57fe5b600091825260209091206002909102015486106127e0578654879061278b90600163ffffffff61242616565b8154811061279557fe5b6000918252602090912060029091020154875488906127bb90600163ffffffff61242616565b815481106127c557fe5b906000526020600020906002020160010154945094506128f5565b8660008154811015156127ef57fe5b90600052602060002090600202016000015486101561281457600094508493506128f5565b86546000935061282b90600163ffffffff61242616565b91505b828211156128b057612868600261285c61284f86600163ffffffff61262f16565b859063ffffffff61262f16565b9063ffffffff61294616565b905085878281548110151561287957fe5b600091825260209091206002909102015411612897578092506128ab565b6128a881600163ffffffff61242616565b91505b61282e565b86838154811015156128be57fe5b90600052602060002090600202016000015487848154811015156128de57fe5b906000526020600020906002020160010154945094505b5050509250929050565b600160a060020a0316600090815260209190915260409020805460ff19169055565b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b600080828481151561295457fe5b04949350505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061299e5782800160ff198235161785556129cb565b828001600101855582156129cb579182015b828111156129cb5782358255916020019190600101906129b0565b506129d79291506129db565b5090565b6129f591905b808211156129d757600081556001016129e1565b905600a165627a7a723058204680ff247d8eda0fc3096eccdf318f2a73b5051da9fd47a2cca4599a74b4d8920029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": true, "inputs": [], "name": "name", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "approve", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "addr", "type": "address"}, {"name": "roleName", "type": "string"}], "name": "checkRole", "outputs": [], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_signature", "type": "bytes"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}, {"name": "_fee", "type": "uint256"}, {"name": "_nonce", "type": "uint256"}], "name": "transferPreSigned", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_token", "type": "address"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}, {"name": "_fee", "type": "uint256"}, {"name": "_nonce", "type": "uint256"}], "name": "transferPreSignedHashing", "outputs": [{"name": "", "type": "bytes32"}], "payable": false, "stateMutability": "pure", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "recoverTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "addedValue", "type": "uint256"}, {"name": "data", "type": "bytes"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "tokenCount", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "announcement", "type": "address"}], "name": "announce", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "hash", "type": "bytes32"}, {"name": "sig", "type": "bytes"}], "name": "recover", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "pure", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "uint256"}], "name": "announcements", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "addr", "type": "address"}, {"name": "roleName", "type": "string"}], "name": "hasRole", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "from", "type": "address"}, {"name": "to", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "decimals", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "from", "type": "address"}, {"name": "to", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "forceTransfer", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "owner", "type": "address"}, {"name": "blockNumber", "type": "uint256"}], "name": "balanceAt", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "announcementsByAddress", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "receiver", "type": "address"}, {"name": "amount", "type": "uint256"}, {"name": "data", "type": "bytes"}], "name": "transferAndCall", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}, {"name": "", "type": "uint256"}], "name": "tokenBalances", "outputs": [{"name": "blockNumber", "type": "uint256"}, {"name": "value", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "uint256"}], "name": "tokensTotal", "outputs": [{"name": "blockNumber", "type": "uint256"}, {"name": "value", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "version", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "url", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}, {"name": "", "type": "address"}], "name": "allowed", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_name", "type": "string"}, {"name": "_symbol", "type": "string"}, {"name": "_url", "type": "string"}], "name": "setTokenInformation", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "subtractedValue", "type": "uint256"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "uint256"}], "name": "burnTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "owner", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "subtractedValue", "type": "uint256"}, {"name": "data", "type": "bytes"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "roleName", "type": "string"}], "name": "adminRemoveRole", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "transferVerifier", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "symbol", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "blockNumber", "type": "uint256"}], "name": "totalSupplyAt", "outputs": [{"name": "tokenCount", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "uint256"}], "name": "issueTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "to", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "roleName", "type": "string"}], "name": "adminAddRole", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "tokensToBeReturned", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "ROLE_ADMIN", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "addedValue", "type": "uint256"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "owner", "type": "address"}, {"name": "spender", "type": "address"}], "name": "allowance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newVerifier", "type": "address"}], "name": "setTransactionVerifier", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [{"name": "_name", "type": "string"}, {"name": "_symbol", "type": "string"}, {"name": "_url", "type": "string"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Issued", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "burner", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Burned", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Forced", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "announcement", "type": "address"}, {"indexed": true, "name": "announcementType", "type": "uint256"}, {"indexed": true, "name": "announcementName", "type": "bytes32"}, {"indexed": false, "name": "announcementURI", "type": "bytes32"}, {"indexed": false, "name": "announcementHash", "type": "uint256"}], "name": "Announced", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newName", "type": "string"}, {"indexed": false, "name": "newSymbol", "type": "string"}, {"indexed": false, "name": "newUrl", "type": "string"}], "name": "UpdatedTokenInformation", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newVerifier", "type": "address"}], "name": "UpdatedTransactionVerifier", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": true, "name": "delegate", "type": "address"}, {"indexed": false, "name": "amount", "type": "uint256"}, {"indexed": false, "name": "fee", "type": "uint256"}], "name": "TransferPreSigned", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "from", "type": "address"}, {"indexed": false, "name": "hash", "type": "bytes32"}], "name": "Debug", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "addr", "type": "address"}, {"indexed": false, "name": "roleName", "type": "string"}], "name": "RoleAdded", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "addr", "type": "address"}, {"indexed": false, "name": "roleName", "type": "string"}], "name": "RoleRemoved", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "from", "type": "address"}, {"indexed": false, "name": "receiver", "type": "address"}, {"indexed": false, "name": "amount", "type": "uint256"}, {"indexed": false, "name": "data", "type": "bytes"}], "name": "ERC677Transfer", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}, {"indexed": true, "name": "spender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "devdoc": {"author": "TokenMarket / Ville Sundell ", "methods": {"adminAddRole(address,string)": {"details": "add a role to an address", "params": {"addr": "address", "roleName": "the name of the role"}}, "adminRemoveRole(address,string)": {"details": "remove a role from an address", "params": {"addr": "address", "roleName": "the name of the role"}}, "allowance(address,address)": {"details": "Function to check the amount of tokens that an owner allowed to a spender.", "params": {"owner": "address The address which owns the funds.", "spender": "address The address which will spend the funds."}, "return": "A uint256 specifying the amount of tokens still available for the spender."}, "announce(address)": {"details": "Function to announce Announcements. * Announcements can be for instance for dividend sharing, voting, or just for general announcements. * Instead of storing the announcement details, we just broadcast them as an event, and store only the address.", "params": {"announcement": "Address of the Announcement"}}, "approve(address,uint256)": {"details": "Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729", "params": {"spender": "The address which will spend the funds.", "value": "The amount of tokens to be spent."}, "return": "true if the call function was executed successfully"}, "balanceAt(address,uint256)": {"details": "Gets the balance of the specified address.", "params": {"blockNumber": "The block number we want to query for the balance.", "owner": "The address to query the the balance of."}, "return": "An uint256 representing the amount owned by the passed address."}, "balanceOf(address)": {"details": "Gets the balance of the specified address.", "params": {"owner": "The address to query the the balance of."}, "return": "An uint256 representing the amount owned by the passed address."}, "burnTokens(uint256)": {"details": "Burn tokens from contract's own balance by a board decission * Burn tokens from contract's own balance to prevent accidental burnings. This is intended to be called by the BAC (The Board). The BAC must have the RBAC role ROLE_BURN.", "params": {"value": "Token amount to burn from this contract's balance"}}, "checkRole(address,string)": {"details": "reverts if addr does not have role", "params": {"addr": "address", "roleName": "the name of the role // reverts"}}, "decreaseApproval(address,uint256)": {"details": "Decrease the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[spender] == 0. To decrement allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"spender": "The address which will spend the funds.", "subtractedValue": "The amount of tokens to decrease the allowance by."}}, "decreaseApproval(address,uint256,bytes)": {"details": "Addition to StandardToken methods. Decrease the amount of tokens that an owner allowed to a spender and execute a call with the sent data. * This is originally from OpenZeppelin. * approve should be called when allowed[spender] == 0. To decrement allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"data": "ABI-encoded contract call to call `spender` address.", "spender": "The address which will spend the funds.", "subtractedValue": "The amount of tokens to decrease the allowance by."}}, "forceTransfer(address,address,uint256)": {"details": "Function to forcefully transfer tokens from A to B by board decission * This must be implemented carefully, since this is a very critical part to ensure investor safety. * This is intended to be called by the BAC (The Board). The BAC must have the RBAC role ROLE_FORCE.", "params": {"from": "Address of the account to confisticate the tokens from", "to": "Address to deposit the confisticated token to", "value": "amount of tokens to be confisticated"}}, "hasRole(address,string)": {"details": "determine if addr has role", "params": {"addr": "address", "roleName": "the name of the role"}, "return": "bool"}, "increaseApproval(address,uint256)": {"details": "Increase the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[spender] == 0. To increment allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"addedValue": "The amount of tokens to increase the allowance by.", "spender": "The address which will spend the funds."}}, "increaseApproval(address,uint256,bytes)": {"details": "Addition to StandardToken methods. Increase the amount of tokens that an owner allowed to a spender and execute a call with the sent data. * This is originally from OpenZeppelin. * approve should be called when allowed[spender] == 0. To increment allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"addedValue": "The amount of tokens to increase the allowance by.", "data": "ABI-encoded contract call to call `spender` address.", "spender": "The address which will spend the funds."}}, "issueTokens(uint256)": {"details": "Issue new tokens to the board by a board decission * Issue new tokens. This is intended to be called by the BAC (The Board). The BAC must have the RBAC role ROLE_ISSUE.", "params": {"value": "Token amount to issue"}}, "recover(bytes32,bytes)": {"params": {"hash": "bytes32 message, the hash is the signed message. What is recovered is the signer address.", "sig": "bytes signature, the signature is generated using web3.eth.sign()"}}, "recoverTokens(address)": {"details": "This will be invoked by the owner, when owner wants to rescue tokens", "params": {"token": "Token which will we rescue to the owner from the contract"}}, "setTokenInformation(string,string,string)": {"details": "Permissioned users (The Board, BAC) can update token information here. * It is often useful to conceal the actual token association, until the token operations, like central issuance or reissuance have been completed. * This function allows the token owner to rename the token after the operations have been completed and then point the audience to use the token contract. * The BAC must have the RBAC role ROLE_INFO.", "params": {"_name": "New name of the token", "_symbol": "New symbol of the token", "_url": "New URL of the token"}}, "setTransactionVerifier(address)": {"details": "Set transaction verifier * This sets a SecurityTransferAgent to be used as a transaction verifier for each transfer. This is implemented for possible regulatory requirements.", "params": {"newVerifier": "Address of the SecurityTransferAgent used as verifier"}}, "tokensToBeReturned(address)": {"details": "Interface function, can be overwritten by the superclass", "params": {"token": "Token which balance we will check and return"}, "return": "The amount of tokens (in smallest denominator) the contract owns"}, "totalSupply()": {"details": "total number of tokens in existence", "return": "A uint256 specifying the total number of tokens in existence"}, "totalSupplyAt(uint256)": {"details": "total number of tokens in existence at the given block", "params": {"blockNumber": "The block number we want to query for the total supply"}, "return": "A uint256 specifying the total number of tokens at a given block"}, "transfer(address,uint256)": {"details": "transfer token for a specified address", "params": {"to": "The address to transfer to.", "value": "The amount to be transferred."}, "return": "true if the call function was executed successfully"}, "transferFrom(address,address,uint256)": {"details": "Transfer tokens from one address to another", "params": {"from": "address The address which you want to send tokens from", "to": "address The address which you want to transfer to", "value": "uint256 the amount of tokens to be transferred"}, "return": "true if the call function was executed successfully"}, "transferOwnership(address)": {"details": "Allows the current owner to transfer control of the contract to a newOwner.", "params": {"newOwner": "The address to transfer ownership to."}}, "transferPreSigned(bytes,address,uint256,uint256,uint256)": {"params": {"_fee": "uint256 The amount of tokens paid to msg.sender, by the person who used to own the tokens.", "_nonce": "uint256 Presigned transaction number", "_signature": "bytes The signature, issued by the owner.", "_to": "address The address which you want to transfer to.", "_value": "uint256 The amount of tokens to be transferred."}}, "transferPreSignedHashing(address,address,uint256,uint256,uint256)": {"params": {"_fee": "uint256 The amount of tokens paid to msg.sender, by the owner.", "_nonce": "uint256 Presigned transaction number.", "_to": "address The address which you want to transfer to.", "_token": "address The address of the token.", "_value": "uint256 The amount of tokens to be transferred."}}}}, "userdoc": {"methods": {"recover(bytes32,bytes)": {"notice": "Recover signer address from a message by using his signature. Signature is delivered as a byte array, hence need for this implementation."}, "transferPreSigned(bytes,address,uint256,uint256,uint256)": {"notice": "Submit a presigned transfer"}, "transferPreSignedHashing(address,address,uint256,uint256,uint256)": {"notice": "Hash (keccak256) of the payload used by transferPreSigned"}}}}, "settings": {"compilationTarget": {"contracts/security-token/SecurityToken.sol": "SecurityToken"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/Recoverable.sol": {"keccak256": "0x311a332cdd87df6e00057f5455f4e68b043b5dbe211f6d68bc64e20817515635", "urls": ["bzzr://4fd99bcfb93baed6e7c8d22ee9ecc5c8346a1aa98288e77b01333b2c5d3f582d"]}, "contracts/security-token/AnnouncementInterface.sol": {"keccak256": "0x7342d2aabc3f7218475bce224c709f9cf9cb26f4bd8c4f239558b43cdc6f3a06", "urls": ["bzzr://76d87e1d0f51c3a95f775dab82d67982f3a4a5a9c690499b13feffaf902ed762"]}, "contracts/security-token/CheckpointToken.sol": {"keccak256": "0xef922aeddfc702a53f7b2030a9737e375b7f6d34b56c5b144603dca1bcbdcc58", "urls": ["bzzr://9c4eeae60ae624abb2dfd48cb917e3e32f11f6dc2ac42fa65b17fc4ae157b75c"]}, "contracts/security-token/ERC677.sol": {"keccak256": "0xf557f3e12aa7f5a23d40957d9ac216db0902997f70f856697529d55e9823e50a", "urls": ["bzzr://c924011b4a57d2eb355c276255fc7af284c2f5b20ece36957d23a2e058975349"]}, "contracts/security-token/ERC677Token.sol": {"keccak256": "0xd67b6b0d3c7e9def09554b11c35f3b609a87ae2ea0f5853f0ca745f7f6366866", "urls": ["bzzr://bcd0f5e4bad7064ea5d8fe4e4e8a276af4ebddc4c7c25703c2dd32ca9ff715f7"]}, "contracts/security-token/ERC865.sol": {"keccak256": "0x326ad6a9d49740439036de2eb866edeabde2e12710ad03d4a3709a41e827ea96", "urls": ["bzzr://1a82e221a8da7446b644300d00183eefe1015f4a9ecd3d2ccbfa99c6bc68f9f3"]}, "contracts/security-token/SecurityToken.sol": {"keccak256": "0x8d9678f90efa37f4f2de7afe96461386b542afab25de7fda64ed9fc528cd11d2", "urls": ["bzzr://faceabd20ee611176551937704f35c249d1f472c1961fe44f95126767c92be98"]}, "contracts/security-token/SecurityTransferAgentInterface.sol": {"keccak256": "0x23b8a61926435e2c583480c0de72a99b4f7ec8a4213ffc46711f83ecdeaf9186", "urls": ["bzzr://36be13b6cf1389357679705bd18969409ecde684ace2d9c5b606d8986e0231cd"]}, "zeppelin/contracts/math/SafeMath.sol": {"keccak256": "0x341ba8cb467a3623e819ba1a683ac1d264005186f308505214e5f6bc89446a08", "urls": ["bzzr://59b5652ee4e4a1b5a8f1a8906e14c84af43d636cf5ca0725cc1813aabe4c8c17"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}, "zeppelin/contracts/ownership/rbac/RBAC.sol": {"keccak256": "0xb650bc4db8fdafa9105e3bf30d349f3a0b3100f1fe154f1bdf7731b0f3399559", "urls": ["bzzr://76284fb23a5f9ecd9737c37582046224a32079263a05be7d5ccef91e678959c9"]}, "zeppelin/contracts/ownership/rbac/Roles.sol": {"keccak256": "0xbab0d0ae15daca818349ead8040dd1794327e2b9a616749fc69a29a5ad85be58", "urls": ["bzzr://5443bb48b0678d3c6cbb48869517d004564ad35e20d96ac9727738b5f8bc45e4"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}}, "version": 1}, "name": "SecurityToken", "ordered_full_dependencies": [], "source_path": "contracts/security-token/SecurityToken.sol", "source": "/**\n * This smart contract code is Copyright 2018, 2019 TokenMarket Ltd. For more information see https://tokenmarket.net\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n * NatSpec is used intentionally to cover also other than public functions.\n * Solidity 0.4.18 is intentionally used: it's stable, and our framework is\n * based on that.\n */\n\n\n/**\n * This smart contract code is Copyright 2018, 2019 TokenMarket Ltd. For more information see https://tokenmarket.net\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n * NatSpec is used intentionally to cover also other than public functions.\n * Solidity 0.4.18 is intentionally used: it's stable, and our framework is\n * based on that.\n */\n\n\n\ninterface SecurityTransferAgent {\n function verify(address from, address to, uint256 value) public view returns (uint256 newValue);\n}\n\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n\ninterface ERC677Receiver {\n function tokenFallback(address from, uint256 amount, bytes data) returns (bool success);\n}\n\ninterface ERC677 {\n\n // TODO: Have a different event name to make sure that tools with bad APIs do not mix this with ERC-20 Transfer() event that lacks data parameter\n event ERC677Transfer(address from, address receiver, uint256 amount, bytes data);\n\n function transferAndCall(ERC677Receiver receiver, uint amount, bytes data) returns (bool success);\n}\n\n\n\ncontract ERC677Token is ERC20, ERC677 {\n function transferAndCall(ERC677Receiver receiver, uint amount, bytes data) returns (bool success) {\n require(transfer(address(receiver), amount));\n\n ERC677Transfer(msg.sender, address(receiver), amount, data);\n\n require(receiver.tokenFallback(msg.sender, amount, data));\n }\n}\n\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n assert(c / a == b);\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n\n\n/**\n * @author TokenMarket / Ville Sundell \n */\ncontract CheckpointToken is ERC677Token {\n using SafeMath for uint256; // We use only uint256 for safety reasons (no boxing)\n\n /// @dev Name of the token, usually the company and/or series (like \"TokenMeerkat Ltd. Series A\"):\n string public name;\n /// @dev Ticker symbol, usually bases on the \"name\" above (like \"MEER\"):\n string public symbol;\n /// @dev Decimals are usually set to 18 for EIP-20 tokens:\n uint256 public decimals;\n /// @dev If transferVerifier is set, that contract will be queried upon every token transaction:\n SecurityTransferAgent public transferVerifier;\n\n /// @dev Checkpoint is the fundamental unit for our internal accounting\n /// (who owns what, and at what moment in time)\n struct Checkpoint {\n uint256 blockNumber;\n uint256 value;\n }\n /// @dev This mapping contains checkpoints for every address:\n mapping (address => Checkpoint[]) public tokenBalances;\n /// @dev This is a one dimensional Checkpoint mapping of the overall token supply:\n Checkpoint[] public tokensTotal;\n\n /// @dev This mapping keeps account for approve() -> fransferFrom() pattern:\n mapping (address => mapping (address => uint256)) public allowed;\n\n /**\n * @dev Constructor for CheckpointToken, initializing the token\n *\n * Here we define initial values for name, symbol and decimals.\n *\n * @param _name Initial name of the token\n * @param _symbol Initial symbol of the token\n * @param _decimals Number of decimals for the token, industry standard is 18\n */\n function CheckpointToken(string _name, string _symbol, uint256 _decimals) public {\n name = _name;\n symbol = _symbol;\n decimals = _decimals;\n }\n\n /** PUBLIC FUNCTIONS\n ****************************************/\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param owner address The address which owns the funds.\n * @param spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address owner, address spender) public view returns (uint256) {\n return allowed[owner][spender];\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n *\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param spender The address which will spend the funds.\n * @param value The amount of tokens to be spent.\n * @return true if the call function was executed successfully\n */\n function approve(address spender, uint256 value) public returns (bool) {\n allowed[msg.sender][spender] = value;\n Approval(msg.sender, spender, value);\n return true;\n }\n\n /**\n * @dev Transfer tokens from one address to another\n * @param from address The address which you want to send tokens from\n * @param to address The address which you want to transfer to\n * @param value uint256 the amount of tokens to be transferred\n * @return true if the call function was executed successfully\n */\n function transferFrom(address from, address to, uint256 value) public returns (bool) {\n require(value <= allowed[from][msg.sender]);\n\n transferInternal(from, to, value);\n Transfer(from, to, value);\n return true;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param to The address to transfer to.\n * @param value The amount to be transferred.\n * @return true if the call function was executed successfully\n */\n function transfer(address to, uint256 value) public returns (bool) {\n transferInternal(msg.sender, to, value);\n Transfer(msg.sender, to, value);\n return true;\n }\n\n /**\n * @dev total number of tokens in existence\n * @return A uint256 specifying the total number of tokens in existence\n */\n function totalSupply() public view returns (uint256 tokenCount) {\n tokenCount = balanceAtBlock(tokensTotal, block.number);\n }\n\n /**\n * @dev total number of tokens in existence at the given block\n * @param blockNumber The block number we want to query for the total supply\n * @return A uint256 specifying the total number of tokens at a given block\n */\n function totalSupplyAt(uint256 blockNumber) public view returns (uint256 tokenCount) {\n tokenCount = balanceAtBlock(tokensTotal, blockNumber);\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address owner) public view returns (uint256 balance) {\n balance = balanceAtBlock(tokenBalances[owner], block.number);\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param owner The address to query the the balance of.\n * @param blockNumber The block number we want to query for the balance.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceAt(address owner, uint256 blockNumber) public view returns (uint256 balance) {\n balance = balanceAtBlock(tokenBalances[owner], blockNumber);\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param spender The address which will spend the funds.\n * @param addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(address spender, uint addedValue) public returns (bool) {\n allowed[msg.sender][spender] = allowed[msg.sender][spender].add(addedValue);\n Approval(msg.sender, spender, allowed[msg.sender][spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param spender The address which will spend the funds.\n * @param subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(address spender, uint subtractedValue) public returns (bool) {\n uint oldValue = allowed[msg.sender][spender];\n if (subtractedValue > oldValue) {\n allowed[msg.sender][spender] = 0;\n } else {\n allowed[msg.sender][spender] = oldValue.sub(subtractedValue);\n }\n Approval(msg.sender, spender, allowed[msg.sender][spender]);\n return true;\n }\n\n /**\n * @dev Addition to StandardToken methods. Increase the amount of tokens that\n * an owner allowed to a spender and execute a call with the sent data.\n *\n * This is originally from OpenZeppelin.\n *\n * approve should be called when allowed[spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param spender The address which will spend the funds.\n * @param addedValue The amount of tokens to increase the allowance by.\n * @param data ABI-encoded contract call to call `spender` address.\n */\n function increaseApproval(address spender, uint addedValue, bytes data) public returns (bool) {\n require(spender != address(this));\n\n increaseApproval(spender, addedValue);\n\n require(spender.call(data));\n\n return true;\n }\n\n /**\n * @dev Addition to StandardToken methods. Decrease the amount of tokens that\n * an owner allowed to a spender and execute a call with the sent data.\n *\n * This is originally from OpenZeppelin.\n *\n * approve should be called when allowed[spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param spender The address which will spend the funds.\n * @param subtractedValue The amount of tokens to decrease the allowance by.\n * @param data ABI-encoded contract call to call `spender` address.\n */\n function decreaseApproval(address spender, uint subtractedValue, bytes data) public returns (bool) {\n require(spender != address(this));\n\n decreaseApproval(spender, subtractedValue);\n\n require(spender.call(data));\n\n return true;\n }\n\n /** INTERNALS\n ****************************************/\n\n function balanceAtBlock(Checkpoint[] storage checkpoints, uint256 blockNumber) internal returns (uint256 balance) {\n uint256 currentBlockNumber;\n (currentBlockNumber, balance) = getCheckpoint(checkpoints, blockNumber);\n }\n\n function transferInternal(address from, address to, uint256 value) internal {\n uint256 fromBalance = balanceOf(from);\n uint256 toBalance = balanceOf(to);\n\n if (address(transferVerifier) != address(0)) {\n value = transferVerifier.verify(from, to, value);\n require(value > 0);\n }\n\n setCheckpoint(tokenBalances[from], fromBalance.sub(value));\n setCheckpoint(tokenBalances[to], toBalance.add(value));\n }\n\n\n /** CORE\n ** The Magic happens below:\n ***************************************/\n\n function setCheckpoint(Checkpoint[] storage checkpoints, uint256 newValue) internal {\n if ((checkpoints.length == 0) || (checkpoints[checkpoints.length.sub(1)].blockNumber < block.number)) {\n checkpoints.push(Checkpoint(block.number, newValue));\n } else {\n checkpoints[checkpoints.length.sub(1)] = Checkpoint(block.number, newValue);\n }\n }\n\n function getCheckpoint(Checkpoint[] storage checkpoints, uint256 blockNumber) internal returns (uint256 blockNumber_, uint256 value) {\n if (checkpoints.length == 0) {\n return (0, 0);\n }\n\n // Shortcut for the actual value\n if (blockNumber >= checkpoints[checkpoints.length.sub(1)].blockNumber) {\n return (checkpoints[checkpoints.length.sub(1)].blockNumber, checkpoints[checkpoints.length.sub(1)].value);\n }\n\n if (blockNumber < checkpoints[0].blockNumber) {\n return (0, 0);\n }\n\n // Binary search of the value in the array\n uint256 min = 0;\n uint256 max = checkpoints.length.sub(1);\n while (max > min) {\n uint256 mid = (max.add(min.add(1))).div(2);\n if (checkpoints[mid].blockNumber <= blockNumber) {\n min = mid;\n } else {\n max = mid.sub(1);\n }\n }\n\n return (checkpoints[min].blockNumber, checkpoints[min].value);\n }\n}\n\n\n\n\n/* Largely copied from https://github.com/OpenZeppelin/openzeppelin-solidity/pull/741/files */\n\ncontract ERC865 is CheckpointToken {\n /** @dev This is used to prevent nonce reuse: */\n mapping(bytes => bool) signatures;\n\n event TransferPreSigned(address indexed from, address indexed to, address indexed delegate, uint256 amount, uint256 fee);\n event Debug(address from, bytes32 hash);\n\n /**\n * @notice Submit a presigned transfer\n * @param _signature bytes The signature, issued by the owner.\n * @param _to address The address which you want to transfer to.\n * @param _value uint256 The amount of tokens to be transferred.\n * @param _fee uint256 The amount of tokens paid to msg.sender, by the person who used to own the tokens.\n * @param _nonce uint256 Presigned transaction number\n */\n function transferPreSigned(\n bytes _signature,\n address _to,\n uint256 _value,\n uint256 _fee,\n uint256 _nonce\n )\n public\n returns (bool)\n {\n require(_to != address(0));\n require(signatures[_signature] == false);\n bytes32 hashedTx = transferPreSignedHashing(address(this), _to, _value, _fee, _nonce);\n address from = recover(hashedTx, _signature);\n require(from != address(0));\n\n transferInternal(from, _to, _value);\n transferInternal(from, msg.sender, _fee);\n\n signatures[_signature] = true;\n TransferPreSigned(from, _to, msg.sender, _value, _fee);\n Transfer(from, _to, _value);\n Transfer(from, msg.sender, _fee);\n return true;\n }\n\n /**\n * @notice Hash (keccak256) of the payload used by transferPreSigned\n * @param _token address The address of the token.\n * @param _to address The address which you want to transfer to.\n * @param _value uint256 The amount of tokens to be transferred.\n * @param _fee uint256 The amount of tokens paid to msg.sender, by the owner.\n * @param _nonce uint256 Presigned transaction number.\n */\n function transferPreSignedHashing(\n address _token,\n address _to,\n uint256 _value,\n uint256 _fee,\n uint256 _nonce\n )\n public\n pure\n returns (bytes32)\n {\n /* \"48664c16\": transferPreSignedHashing(address,address,address,uint256,uint256,uint256) */\n return keccak256(bytes4(0x48664c16), _token, _to, _value, _fee, _nonce);\n }\n\n /**\n * @notice Recover signer address from a message by using his signature.\n * Signature is delivered as a byte array, hence need for this\n * implementation.\n * @param hash bytes32 message, the hash is the signed message. What is recovered is the signer address.\n * @param sig bytes signature, the signature is generated using web3.eth.sign()\n */\n function recover(bytes32 hash, bytes sig) public pure returns (address) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n\n /* Check the signature length */\n if (sig.length != 65) {\n return (address(0));\n }\n\n /* Divide the signature in r, s and v variables */\n assembly {\n r := mload(add(sig, 32))\n s := mload(add(sig, 64))\n v := byte(0, mload(add(sig, 96)))\n }\n\n /* Version of signature should be 27 or 28, but 0 and 1 are also possible versions */\n if (v < 27) {\n v += 27;\n }\n\n /* If the version is correct return the signer address */\n if (v != 27 && v != 28) {\n return (address(0));\n } else {\n return ecrecover(hash, v, r, s);\n }\n }\n\n}\n\n/**\n * @dev Interface for general announcements about the security.\n *\n * Announcements can be for instance for dividend sharing, voting, or\n * just for general announcements.\n */\n\ninterface Announcement {\n function announcementName() public view returns (bytes32);\n function announcementURI() public view returns (bytes32);\n function announcementType() public view returns (uint256);\n function announcementHash() public view returns (uint256);\n}\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n\ncontract Recoverable is Ownable {\n\n /// @dev Empty constructor (for now)\n function Recoverable() {\n }\n\n /// @dev This will be invoked by the owner, when owner wants to rescue tokens\n /// @param token Token which will we rescue to the owner from the contract\n function recoverTokens(ERC20Basic token) onlyOwner public {\n token.transfer(owner, tokensToBeReturned(token));\n }\n\n /// @dev Interface function, can be overwritten by the superclass\n /// @param token Token which balance we will check and return\n /// @return The amount of tokens (in smallest denominator) the contract owns\n function tokensToBeReturned(ERC20Basic token) public returns (uint) {\n return token.balanceOf(this);\n }\n}\n\n\n\n\n\n/**\n * @title Roles\n * @author Francisco Giordano (@frangio)\n * @dev Library for managing addresses assigned to a Role.\n * See RBAC.sol for example usage.\n */\nlibrary Roles {\n struct Role {\n mapping (address => bool) bearer;\n }\n\n /**\n * @dev give an address access to this role\n */\n function add(Role storage role, address addr)\n internal\n {\n role.bearer[addr] = true;\n }\n\n /**\n * @dev remove an address' access to this role\n */\n function remove(Role storage role, address addr)\n internal\n {\n role.bearer[addr] = false;\n }\n\n /**\n * @dev check if an address has this role\n * // reverts\n */\n function check(Role storage role, address addr)\n view\n internal\n {\n require(has(role, addr));\n }\n\n /**\n * @dev check if an address has this role\n * @return bool\n */\n function has(Role storage role, address addr)\n view\n internal\n returns (bool)\n {\n return role.bearer[addr];\n }\n}\n\n\n\n/**\n * @title RBAC (Role-Based Access Control)\n * @author Matt Condon (@Shrugs)\n * @dev Stores and provides setters and getters for roles and addresses.\n * Supports unlimited numbers of roles and addresses.\n * See //contracts/mocks/RBACMock.sol for an example of usage.\n * This RBAC method uses strings to key roles. It may be beneficial\n * for you to write your own implementation of this interface using Enums or similar.\n * It's also recommended that you define constants in the contract, like ROLE_ADMIN below,\n * to avoid typos.\n */\ncontract RBAC {\n using Roles for Roles.Role;\n\n mapping (string => Roles.Role) private roles;\n\n event RoleAdded(address addr, string roleName);\n event RoleRemoved(address addr, string roleName);\n\n /**\n * A constant role name for indicating admins.\n */\n string public constant ROLE_ADMIN = \"admin\";\n\n /**\n * @dev constructor. Sets msg.sender as admin by default\n */\n function RBAC()\n public\n {\n addRole(msg.sender, ROLE_ADMIN);\n }\n\n /**\n * @dev reverts if addr does not have role\n * @param addr address\n * @param roleName the name of the role\n * // reverts\n */\n function checkRole(address addr, string roleName)\n view\n public\n {\n roles[roleName].check(addr);\n }\n\n /**\n * @dev determine if addr has role\n * @param addr address\n * @param roleName the name of the role\n * @return bool\n */\n function hasRole(address addr, string roleName)\n view\n public\n returns (bool)\n {\n return roles[roleName].has(addr);\n }\n\n /**\n * @dev add a role to an address\n * @param addr address\n * @param roleName the name of the role\n */\n function adminAddRole(address addr, string roleName)\n onlyAdmin\n public\n {\n addRole(addr, roleName);\n }\n\n /**\n * @dev remove a role from an address\n * @param addr address\n * @param roleName the name of the role\n */\n function adminRemoveRole(address addr, string roleName)\n onlyAdmin\n public\n {\n removeRole(addr, roleName);\n }\n\n /**\n * @dev add a role to an address\n * @param addr address\n * @param roleName the name of the role\n */\n function addRole(address addr, string roleName)\n internal\n {\n roles[roleName].add(addr);\n RoleAdded(addr, roleName);\n }\n\n /**\n * @dev remove a role from an address\n * @param addr address\n * @param roleName the name of the role\n */\n function removeRole(address addr, string roleName)\n internal\n {\n roles[roleName].remove(addr);\n RoleRemoved(addr, roleName);\n }\n\n /**\n * @dev modifier to scope access to a single role (uses msg.sender as addr)\n * @param roleName the name of the role\n * // reverts\n */\n modifier onlyRole(string roleName)\n {\n checkRole(msg.sender, roleName);\n _;\n }\n\n /**\n * @dev modifier to scope access to admins\n * // reverts\n */\n modifier onlyAdmin()\n {\n checkRole(msg.sender, ROLE_ADMIN);\n _;\n }\n\n /**\n * @dev modifier to scope access to a set of roles (uses msg.sender as addr)\n * @param roleNames the names of the roles to scope access to\n * // reverts\n *\n * @TODO - when solidity supports dynamic arrays as arguments to modifiers, provide this\n * see: https://github.com/ethereum/solidity/issues/2467\n */\n // modifier onlyRoles(string[] roleNames) {\n // bool hasAnyRole = false;\n // for (uint8 i = 0; i < roleNames.length; i++) {\n // if (hasRole(msg.sender, roleNames[i])) {\n // hasAnyRole = true;\n // break;\n // }\n // }\n\n // require(hasAnyRole);\n\n // _;\n // }\n}\n\n\n\n/**\n * @author TokenMarket / Ville Sundell \n */\ncontract SecurityToken is CheckpointToken, RBAC, Recoverable, ERC865 {\n using SafeMath for uint256; // We use only uint256 for safety reasons (no boxing)\n\n string constant ROLE_ANNOUNCE = \"announce()\";\n string constant ROLE_FORCE = \"forceTransfer()\";\n string constant ROLE_ISSUE = \"issueTokens()\";\n string constant ROLE_BURN = \"burnTokens()\";\n string constant ROLE_INFO = \"setTokenInformation()\";\n string constant ROLE_SETVERIFIER = \"setTransactionVerifier()\";\n\n /// @dev Version string telling the token is TM-01, and its version:\n string public version = 'TM-01 0.1';\n\n /// @dev URL where you can get more information about the security\n /// (for example company website or investor interface):\n string public url;\n\n /** SecurityToken specific events **/\n /// @dev This is emitted when new tokens are created:\n event Issued(address indexed to, uint256 value);\n /// @dev This is emitted when tokens are burned from token's own stash:\n event Burned(address indexed burner, uint256 value);\n /// @dev This is emitted upon forceful transfer of tokens by the Board:\n event Forced(address indexed from, address indexed to, uint256 value);\n /// @dev This is emitted when new announcements (like dividends, voting, etc.) are issued by the Board:\n event Announced(address indexed announcement, uint256 indexed announcementType, bytes32 indexed announcementName, bytes32 announcementURI, uint256 announcementHash);\n /// @dev This is emitted when token information is changed:\n event UpdatedTokenInformation(string newName, string newSymbol, string newUrl);\n /// @dev This is emitted when transaction verifier (the contract which would check KYC, etc.):\n event UpdatedTransactionVerifier(address newVerifier);\n\n /// @dev Address list of Announcements (see \"interface Announcement\").\n /// Announcements are things like votings, dividends, or any kind of\n /// smart contract:\n address[] public announcements;\n /// @dev For performance reasons, we also maintain address based mapping of\n /// Announcements:\n mapping(address => uint256) public announcementsByAddress;\n\n /**\n * @dev Contructor to create SecurityToken, and subsequent CheckpointToken.\n *\n * CheckpointToken will be created with hardcoded 18 decimals.\n *\n * @param _name Initial name of the token\n * @param _symbol Initial symbol of the token\n */\n function SecurityToken(string _name, string _symbol, string _url) CheckpointToken(_name, _symbol, 18) public {\n url = _url;\n\n addRole(msg.sender, ROLE_ANNOUNCE);\n addRole(msg.sender, ROLE_FORCE);\n addRole(msg.sender, ROLE_ISSUE);\n addRole(msg.sender, ROLE_BURN);\n addRole(msg.sender, ROLE_INFO);\n addRole(msg.sender, ROLE_SETVERIFIER);\n }\n\n /**\n * @dev Function to announce Announcements.\n *\n * Announcements can be for instance for dividend sharing, voting, or\n * just for general announcements.\n *\n * Instead of storing the announcement details, we just broadcast them as an\n * event, and store only the address.\n *\n * @param announcement Address of the Announcement\n */\n function announce(Announcement announcement) external onlyRole(ROLE_ANNOUNCE) {\n announcements.push(announcement);\n announcementsByAddress[address(announcement)] = announcements.length;\n Announced(address(announcement), announcement.announcementType(), announcement.announcementName(), announcement.announcementURI(), announcement.announcementHash());\n }\n\n /**\n * @dev Function to forcefully transfer tokens from A to B by board decission\n *\n * This must be implemented carefully, since this is a very critical part\n * to ensure investor safety.\n *\n * This is intended to be called by the BAC (The Board).\n * The BAC must have the RBAC role ROLE_FORCE.\n *\n * @param from Address of the account to confisticate the tokens from\n * @param to Address to deposit the confisticated token to\n * @param value amount of tokens to be confisticated\n */\n function forceTransfer(address from, address to, uint256 value) external onlyRole(ROLE_FORCE) {\n transferInternal(from, to, value);\n\n Forced(from, to, value);\n }\n\n /**\n * @dev Issue new tokens to the board by a board decission\n *\n * Issue new tokens. This is intended to be called by the BAC (The Board).\n * The BAC must have the RBAC role ROLE_ISSUE.\n *\n * @param value Token amount to issue\n */\n function issueTokens(uint256 value) external onlyRole(ROLE_ISSUE) {\n address issuer = msg.sender;\n uint256 blackHoleBalance = balanceOf(address(0));\n uint256 totalSupplyNow = totalSupply();\n\n setCheckpoint(tokenBalances[address(0)], blackHoleBalance.add(value));\n transferInternal(address(0), issuer, value);\n setCheckpoint(tokensTotal, totalSupplyNow.add(value));\n\n Issued(issuer, value);\n }\n\n /**\n * @dev Burn tokens from contract's own balance by a board decission\n *\n * Burn tokens from contract's own balance to prevent accidental burnings.\n * This is intended to be called by the BAC (The Board).\n * The BAC must have the RBAC role ROLE_BURN.\n *\n * @param value Token amount to burn from this contract's balance\n */\n function burnTokens(uint256 value) external onlyRole(ROLE_BURN) {\n address burner = address(this);\n uint256 burnerBalance = balanceOf(burner);\n uint256 totalSupplyNow = totalSupply();\n\n transferInternal(burner, address(0), value);\n setCheckpoint(tokenBalances[address(0)], burnerBalance.sub(value));\n setCheckpoint(tokensTotal, totalSupplyNow.sub(value));\n\n Burned(burner, value);\n }\n\n /**\n * @dev Permissioned users (The Board, BAC) can update token information here.\n *\n * It is often useful to conceal the actual token association, until\n * the token operations, like central issuance or reissuance have been completed.\n *\n * This function allows the token owner to rename the token after the operations\n * have been completed and then point the audience to use the token contract.\n *\n * The BAC must have the RBAC role ROLE_INFO.\n *\n * @param _name New name of the token\n * @param _symbol New symbol of the token\n * @param _url New URL of the token\n */\n function setTokenInformation(string _name, string _symbol, string _url) external onlyRole(ROLE_INFO) {\n name = _name;\n symbol = _symbol;\n url = _url;\n\n UpdatedTokenInformation(name, symbol, url);\n }\n\n /**\n * @dev Set transaction verifier\n *\n * This sets a SecurityTransferAgent to be used as a transaction verifier for\n * each transfer. This is implemented for possible regulatory requirements.\n *\n * @param newVerifier Address of the SecurityTransferAgent used as verifier\n */\n function setTransactionVerifier(SecurityTransferAgent newVerifier) external onlyRole(ROLE_SETVERIFIER) {\n transferVerifier = newVerifier;\n\n UpdatedTransactionVerifier(newVerifier);\n }\n}\n"}, "SecurityTransferAgent": {"abi": [{"constant": true, "inputs": [{"name": "from", "type": "address"}, {"name": "to", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "verify", "outputs": [{"name": "newValue", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}], "bytecode": "0x", "bytecode_runtime": "0x", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": null, "name": "SecurityTransferAgent", "ordered_full_dependencies": [], "source_path": "contracts/security-token/SecurityTransferAgentInterface.sol"}, "SimpleReleaseAgent": {"abi": [{"constant": false, "inputs": [], "name": "release", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [{"name": "_token", "type": "address"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}], "bytecode": "0x608060405234801561001057600080fd5b50604051602080610154833981016040525160008054600160a060020a03909216600160a060020a0319909216919091179055610102806100526000396000f300608060405260043610603e5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166386d1a69f81146043575b600080fd5b348015604e57600080fd5b5060556057565b005b60008054604080517f5f412d4f000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff90921692635f412d4f9260048084019382900301818387803b15801560bd57600080fd5b505af115801560d0573d6000803e3d6000fd5b505050505600a165627a7a72305820c58bc47425c0f1f89ec1a7f178a674f4cba748a93a6922472396251a5679e1a60029", "bytecode_runtime": "0x608060405260043610603e5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166386d1a69f81146043575b600080fd5b348015604e57600080fd5b5060556057565b005b60008054604080517f5f412d4f000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff90921692635f412d4f9260048084019382900301818387803b15801560bd57600080fd5b505af115801560d0573d6000803e3d6000fd5b505050505600a165627a7a72305820c58bc47425c0f1f89ec1a7f178a674f4cba748a93a6922472396251a5679e1a60029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": false, "inputs": [], "name": "release", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [{"name": "_token", "type": "address"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}], "devdoc": {"methods": {}}, "userdoc": {"methods": {}}}, "settings": {"compilationTarget": {"contracts/test/SimpleReleaseAgent.sol": "SimpleReleaseAgent"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/Recoverable.sol": {"keccak256": "0x311a332cdd87df6e00057f5455f4e68b043b5dbe211f6d68bc64e20817515635", "urls": ["bzzr://4fd99bcfb93baed6e7c8d22ee9ecc5c8346a1aa98288e77b01333b2c5d3f582d"]}, "contracts/ReleasableToken.sol": {"keccak256": "0x2c50180d0c1eab1aa63a04da3ae87ee2c482665d2a1a42c5f05b11234a7edaf4", "urls": ["bzzr://10752c317eba5c42e2848722689cfee4fffb7bcb42f3346e1a20715d843798e8"]}, "contracts/StandardTokenExt.sol": {"keccak256": "0x9ea2d4cec4dccd5639c05e6c23dd027d80b5e5a20abd99b280ab7b2631b5a5fc", "urls": ["bzzr://a52d8fc5a21bd83997aff19128e00dceb251df712207b61223894c8b7f42d5ff"]}, "contracts/test/SimpleReleaseAgent.sol": {"keccak256": "0x750f2db486d31b8aa3aeebd4ea427984c4f0268f56a7aa7524c2f43aac1382e3", "urls": ["bzzr://c529081777e40389dfc7142f3fe41bb4ecf213078d202a0df20295ae89c3291a"]}, "zeppelin/contracts/math/SafeMath.sol": {"keccak256": "0x341ba8cb467a3623e819ba1a683ac1d264005186f308505214e5f6bc89446a08", "urls": ["bzzr://59b5652ee4e4a1b5a8f1a8906e14c84af43d636cf5ca0725cc1813aabe4c8c17"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}, "zeppelin/contracts/token/ERC20/BasicToken.sol": {"keccak256": "0x948404468d61ff35ea4194650670408dabd65da7f905a1c16888ab84520bf39e", "urls": ["bzzr://ea75e20f95d7e4e10394fe6bfaa8eee56b4757c2a6f1e8df4180d33afa621935"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}, "zeppelin/contracts/token/ERC20/StandardToken.sol": {"keccak256": "0xd2b344a5259e19ec143074cfa65637a10c40b68395c59808c4af13bccbb2de55", "urls": ["bzzr://d61a01175a7ca1ba9f4403de603c20b897e33ec425aef2d9f8a7f9ddfdfaf5b2"]}}, "version": 1}, "name": "SimpleReleaseAgent", "ordered_full_dependencies": [], "source_path": "contracts/test/SimpleReleaseAgent.sol", "source": "\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n assert(c / a == b);\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n\n\n\n/**\n * @title Basic token\n * @dev Basic version of StandardToken, with no allowances.\n */\ncontract BasicToken is ERC20Basic {\n using SafeMath for uint256;\n\n mapping(address => uint256) balances;\n\n uint256 totalSupply_;\n\n /**\n * @dev total number of tokens in existence\n */\n function totalSupply() public view returns (uint256) {\n return totalSupply_;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param _to The address to transfer to.\n * @param _value The amount to be transferred.\n */\n function transfer(address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[msg.sender]);\n\n // SafeMath.sub will throw if there is not enough balance.\n balances[msg.sender] = balances[msg.sender].sub(_value);\n balances[_to] = balances[_to].add(_value);\n Transfer(msg.sender, _to, _value);\n return true;\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param _owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address _owner) public view returns (uint256 balance) {\n return balances[_owner];\n }\n\n}\n\n\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n\n\n/**\n * @title Standard ERC20 token\n *\n * @dev Implementation of the basic standard token.\n * @dev https://github.com/ethereum/EIPs/issues/20\n * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol\n */\ncontract StandardToken is ERC20, BasicToken {\n\n mapping (address => mapping (address => uint256)) internal allowed;\n\n\n /**\n * @dev Transfer tokens from one address to another\n * @param _from address The address which you want to send tokens from\n * @param _to address The address which you want to transfer to\n * @param _value uint256 the amount of tokens to be transferred\n */\n function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[_from]);\n require(_value <= allowed[_from][msg.sender]);\n\n balances[_from] = balances[_from].sub(_value);\n balances[_to] = balances[_to].add(_value);\n allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);\n Transfer(_from, _to, _value);\n return true;\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n *\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param _spender The address which will spend the funds.\n * @param _value The amount of tokens to be spent.\n */\n function approve(address _spender, uint256 _value) public returns (bool) {\n allowed[msg.sender][_spender] = _value;\n Approval(msg.sender, _spender, _value);\n return true;\n }\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param _owner address The address which owns the funds.\n * @param _spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address _owner, address _spender) public view returns (uint256) {\n return allowed[_owner][_spender];\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(address _spender, uint _addedValue) public returns (bool) {\n allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {\n uint oldValue = allowed[msg.sender][_spender];\n if (_subtractedValue > oldValue) {\n allowed[msg.sender][_spender] = 0;\n } else {\n allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);\n }\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n\ncontract Recoverable is Ownable {\n\n /// @dev Empty constructor (for now)\n function Recoverable() {\n }\n\n /// @dev This will be invoked by the owner, when owner wants to rescue tokens\n /// @param token Token which will we rescue to the owner from the contract\n function recoverTokens(ERC20Basic token) onlyOwner public {\n token.transfer(owner, tokensToBeReturned(token));\n }\n\n /// @dev Interface function, can be overwritten by the superclass\n /// @param token Token which balance we will check and return\n /// @return The amount of tokens (in smallest denominator) the contract owns\n function tokensToBeReturned(ERC20Basic token) public returns (uint) {\n return token.balanceOf(this);\n }\n}\n\n\n\n/**\n * Standard EIP-20 token with an interface marker.\n *\n * @notice Interface marker is used by crowdsale contracts to validate that addresses point a good token contract.\n *\n */\ncontract StandardTokenExt is StandardToken, Recoverable {\n\n /* Interface declaration */\n function isToken() public constant returns (bool weAre) {\n return true;\n }\n}\n\n\n\n/**\n * Define interface for releasing the token transfer after a successful crowdsale.\n */\ncontract ReleasableToken is StandardTokenExt {\n\n /* The finalizer contract that allows unlift the transfer limits on this token */\n address public releaseAgent;\n\n /** A crowdsale contract can release us to the wild if ICO success. If false we are are in transfer lock up period.*/\n bool public released = false;\n\n /** Map of agents that are allowed to transfer tokens regardless of the lock down period. These are crowdsale contracts and possible the team multisig itself. */\n mapping (address => bool) public transferAgents;\n\n /**\n * Limit token transfer until the crowdsale is over.\n *\n */\n modifier canTransfer(address _sender) {\n\n if(!released) {\n if(!transferAgents[_sender]) {\n throw;\n }\n }\n\n _;\n }\n\n /**\n * Set the contract that can call release and make the token transferable.\n *\n * Design choice. Allow reset the release agent to fix fat finger mistakes.\n */\n function setReleaseAgent(address addr) onlyOwner inReleaseState(false) public {\n\n // We don't do interface check here as we might want to a normal wallet address to act as a release agent\n releaseAgent = addr;\n }\n\n /**\n * Owner can allow a particular address (a crowdsale contract) to transfer tokens despite the lock up period.\n */\n function setTransferAgent(address addr, bool state) onlyOwner inReleaseState(false) public {\n transferAgents[addr] = state;\n }\n\n /**\n * One way function to release the tokens to the wild.\n *\n * Can be called only from the release agent that is the final ICO contract. It is only called if the crowdsale has been success (first milestone reached).\n */\n function releaseTokenTransfer() public onlyReleaseAgent {\n released = true;\n }\n\n /** The function can be called only before or after the tokens have been releasesd */\n modifier inReleaseState(bool releaseState) {\n if(releaseState != released) {\n throw;\n }\n _;\n }\n\n /** The function can be called only by a whitelisted release agent. */\n modifier onlyReleaseAgent() {\n if(msg.sender != releaseAgent) {\n throw;\n }\n _;\n }\n\n function transfer(address _to, uint _value) canTransfer(msg.sender) returns (bool success) {\n // Call StandardToken.transfer()\n return super.transfer(_to, _value);\n }\n\n function transferFrom(address _from, address _to, uint _value) canTransfer(_from) returns (bool success) {\n // Call StandardToken.transferForm()\n return super.transferFrom(_from, _to, _value);\n }\n\n}\n\n\n\n/**\n * To test transfer lock up release.\n */\ncontract SimpleReleaseAgent {\n\n ReleasableToken token;\n\n function SimpleReleaseAgent(ReleasableToken _token) {\n token = _token;\n }\n\n function release() {\n token.releaseTokenTransfer();\n }\n}\n"}, "StandardToken": {"abi": [{"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "approve", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_from", "type": "address"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_subtractedValue", "type": "uint256"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_addedValue", "type": "uint256"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}, {"name": "_spender", "type": "address"}], "name": "allowance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}, {"indexed": true, "name": "spender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "bytecode": "0x608060405234801561001057600080fd5b506106b6806100206000396000f30060806040526004361061008d5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663095ea7b3811461009257806318160ddd146100ca57806323b872dd146100f1578063661884631461011b57806370a082311461013f578063a9059cbb14610160578063d73dd62314610184578063dd62ed3e146101a8575b600080fd5b34801561009e57600080fd5b506100b6600160a060020a03600435166024356101cf565b604080519115158252519081900360200190f35b3480156100d657600080fd5b506100df610235565b60408051918252519081900360200190f35b3480156100fd57600080fd5b506100b6600160a060020a036004358116906024351660443561023b565b34801561012757600080fd5b506100b6600160a060020a03600435166024356103b2565b34801561014b57600080fd5b506100df600160a060020a03600435166104a2565b34801561016c57600080fd5b506100b6600160a060020a03600435166024356104bd565b34801561019057600080fd5b506100b6600160a060020a036004351660243561059e565b3480156101b457600080fd5b506100df600160a060020a0360043581169060243516610637565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b60015490565b6000600160a060020a038316151561025257600080fd5b600160a060020a03841660009081526020819052604090205482111561027757600080fd5b600160a060020a03841660009081526002602090815260408083203384529091529020548211156102a757600080fd5b600160a060020a0384166000908152602081905260409020546102d0908363ffffffff61066216565b600160a060020a038086166000908152602081905260408082209390935590851681522054610305908363ffffffff61067416565b600160a060020a03808516600090815260208181526040808320949094559187168152600282528281203382529091522054610347908363ffffffff61066216565b600160a060020a03808616600081815260026020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b336000908152600260209081526040808320600160a060020a03861684529091528120548083111561040757336000908152600260209081526040808320600160a060020a038816845290915281205561043c565b610417818463ffffffff61066216565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a031660009081526020819052604090205490565b6000600160a060020a03831615156104d457600080fd5b336000908152602081905260409020548211156104f057600080fd5b33600090815260208190526040902054610510908363ffffffff61066216565b3360009081526020819052604080822092909255600160a060020a03851681522054610542908363ffffffff61067416565b600160a060020a038416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b336000908152600260209081526040808320600160a060020a03861684529091528120546105d2908363ffffffff61067416565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b60008282111561066e57fe5b50900390565b60008282018381101561068357fe5b93925050505600a165627a7a723058206203fafd36d4444c52e80e7e105864295b1b8096ffc13d27f7715248d3b35df80029", "bytecode_runtime": "0x60806040526004361061008d5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663095ea7b3811461009257806318160ddd146100ca57806323b872dd146100f1578063661884631461011b57806370a082311461013f578063a9059cbb14610160578063d73dd62314610184578063dd62ed3e146101a8575b600080fd5b34801561009e57600080fd5b506100b6600160a060020a03600435166024356101cf565b604080519115158252519081900360200190f35b3480156100d657600080fd5b506100df610235565b60408051918252519081900360200190f35b3480156100fd57600080fd5b506100b6600160a060020a036004358116906024351660443561023b565b34801561012757600080fd5b506100b6600160a060020a03600435166024356103b2565b34801561014b57600080fd5b506100df600160a060020a03600435166104a2565b34801561016c57600080fd5b506100b6600160a060020a03600435166024356104bd565b34801561019057600080fd5b506100b6600160a060020a036004351660243561059e565b3480156101b457600080fd5b506100df600160a060020a0360043581169060243516610637565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b60015490565b6000600160a060020a038316151561025257600080fd5b600160a060020a03841660009081526020819052604090205482111561027757600080fd5b600160a060020a03841660009081526002602090815260408083203384529091529020548211156102a757600080fd5b600160a060020a0384166000908152602081905260409020546102d0908363ffffffff61066216565b600160a060020a038086166000908152602081905260408082209390935590851681522054610305908363ffffffff61067416565b600160a060020a03808516600090815260208181526040808320949094559187168152600282528281203382529091522054610347908363ffffffff61066216565b600160a060020a03808616600081815260026020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b336000908152600260209081526040808320600160a060020a03861684529091528120548083111561040757336000908152600260209081526040808320600160a060020a038816845290915281205561043c565b610417818463ffffffff61066216565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a031660009081526020819052604090205490565b6000600160a060020a03831615156104d457600080fd5b336000908152602081905260409020548211156104f057600080fd5b33600090815260208190526040902054610510908363ffffffff61066216565b3360009081526020819052604080822092909255600160a060020a03851681522054610542908363ffffffff61067416565b600160a060020a038416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b336000908152600260209081526040808320600160a060020a03861684529091528120546105d2908363ffffffff61067416565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b60008282111561066e57fe5b50900390565b60008282018381101561068357fe5b93925050505600a165627a7a723058206203fafd36d4444c52e80e7e105864295b1b8096ffc13d27f7715248d3b35df80029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "approve", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_from", "type": "address"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_subtractedValue", "type": "uint256"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_addedValue", "type": "uint256"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}, {"name": "_spender", "type": "address"}], "name": "allowance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}, {"indexed": true, "name": "spender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "devdoc": {"methods": {"allowance(address,address)": {"details": "Function to check the amount of tokens that an owner allowed to a spender.", "params": {"_owner": "address The address which owns the funds.", "_spender": "address The address which will spend the funds."}, "return": "A uint256 specifying the amount of tokens still available for the spender."}, "approve(address,uint256)": {"details": "Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729", "params": {"_spender": "The address which will spend the funds.", "_value": "The amount of tokens to be spent."}}, "balanceOf(address)": {"details": "Gets the balance of the specified address.", "params": {"_owner": "The address to query the the balance of."}, "return": "An uint256 representing the amount owned by the passed address."}, "decreaseApproval(address,uint256)": {"details": "Decrease the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[_spender] == 0. To decrement allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"_spender": "The address which will spend the funds.", "_subtractedValue": "The amount of tokens to decrease the allowance by."}}, "increaseApproval(address,uint256)": {"details": "Increase the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[_spender] == 0. To increment allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"_addedValue": "The amount of tokens to increase the allowance by.", "_spender": "The address which will spend the funds."}}, "totalSupply()": {"details": "total number of tokens in existence"}, "transfer(address,uint256)": {"details": "transfer token for a specified address", "params": {"_to": "The address to transfer to.", "_value": "The amount to be transferred."}}, "transferFrom(address,address,uint256)": {"details": "Transfer tokens from one address to another", "params": {"_from": "address The address which you want to send tokens from", "_to": "address The address which you want to transfer to", "_value": "uint256 the amount of tokens to be transferred"}}}, "title": "Standard ERC20 token"}, "userdoc": {"methods": {}}}, "settings": {"compilationTarget": {"zeppelin/contracts/token/ERC20/StandardToken.sol": "StandardToken"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"zeppelin/contracts/math/SafeMath.sol": {"keccak256": "0x341ba8cb467a3623e819ba1a683ac1d264005186f308505214e5f6bc89446a08", "urls": ["bzzr://59b5652ee4e4a1b5a8f1a8906e14c84af43d636cf5ca0725cc1813aabe4c8c17"]}, "zeppelin/contracts/token/ERC20/BasicToken.sol": {"keccak256": "0x948404468d61ff35ea4194650670408dabd65da7f905a1c16888ab84520bf39e", "urls": ["bzzr://ea75e20f95d7e4e10394fe6bfaa8eee56b4757c2a6f1e8df4180d33afa621935"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}, "zeppelin/contracts/token/ERC20/StandardToken.sol": {"keccak256": "0xd2b344a5259e19ec143074cfa65637a10c40b68395c59808c4af13bccbb2de55", "urls": ["bzzr://d61a01175a7ca1ba9f4403de603c20b897e33ec425aef2d9f8a7f9ddfdfaf5b2"]}}, "version": 1}, "name": "StandardToken", "ordered_full_dependencies": [], "source_path": "zeppelin/contracts/token/ERC20/StandardToken.sol", "source": "\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n assert(c / a == b);\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n\n\n\n/**\n * @title Basic token\n * @dev Basic version of StandardToken, with no allowances.\n */\ncontract BasicToken is ERC20Basic {\n using SafeMath for uint256;\n\n mapping(address => uint256) balances;\n\n uint256 totalSupply_;\n\n /**\n * @dev total number of tokens in existence\n */\n function totalSupply() public view returns (uint256) {\n return totalSupply_;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param _to The address to transfer to.\n * @param _value The amount to be transferred.\n */\n function transfer(address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[msg.sender]);\n\n // SafeMath.sub will throw if there is not enough balance.\n balances[msg.sender] = balances[msg.sender].sub(_value);\n balances[_to] = balances[_to].add(_value);\n Transfer(msg.sender, _to, _value);\n return true;\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param _owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address _owner) public view returns (uint256 balance) {\n return balances[_owner];\n }\n\n}\n\n\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n\n\n/**\n * @title Standard ERC20 token\n *\n * @dev Implementation of the basic standard token.\n * @dev https://github.com/ethereum/EIPs/issues/20\n * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol\n */\ncontract StandardToken is ERC20, BasicToken {\n\n mapping (address => mapping (address => uint256)) internal allowed;\n\n\n /**\n * @dev Transfer tokens from one address to another\n * @param _from address The address which you want to send tokens from\n * @param _to address The address which you want to transfer to\n * @param _value uint256 the amount of tokens to be transferred\n */\n function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[_from]);\n require(_value <= allowed[_from][msg.sender]);\n\n balances[_from] = balances[_from].sub(_value);\n balances[_to] = balances[_to].add(_value);\n allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);\n Transfer(_from, _to, _value);\n return true;\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n *\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param _spender The address which will spend the funds.\n * @param _value The amount of tokens to be spent.\n */\n function approve(address _spender, uint256 _value) public returns (bool) {\n allowed[msg.sender][_spender] = _value;\n Approval(msg.sender, _spender, _value);\n return true;\n }\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param _owner address The address which owns the funds.\n * @param _spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address _owner, address _spender) public view returns (uint256) {\n return allowed[_owner][_spender];\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(address _spender, uint _addedValue) public returns (bool) {\n allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {\n uint oldValue = allowed[msg.sender][_spender];\n if (_subtractedValue > oldValue) {\n allowed[msg.sender][_spender] = 0;\n } else {\n allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);\n }\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n}\n"}, "StandardTokenExt": {"abi": [{"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "approve", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "recoverTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_from", "type": "address"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_subtractedValue", "type": "uint256"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "tokensToBeReturned", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_addedValue", "type": "uint256"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}, {"name": "_spender", "type": "address"}], "name": "allowance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isToken", "outputs": [{"name": "weAre", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}, {"indexed": true, "name": "spender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "bytecode": "0x608060405260038054600160a060020a031916331790556109a7806100256000396000f3006080604052600436106100c45763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663095ea7b381146100c957806316114acd1461010157806318160ddd1461012457806323b872dd1461014b578063661884631461017557806370a08231146101995780638da5cb5b146101ba578063a9059cbb146101eb578063c45d19db1461020f578063d73dd62314610230578063dd62ed3e14610254578063eefa597b1461027b578063f2fde38b14610290575b600080fd5b3480156100d557600080fd5b506100ed600160a060020a03600435166024356102b1565b604080519115158252519081900360200190f35b34801561010d57600080fd5b50610122600160a060020a0360043516610317565b005b34801561013057600080fd5b506101396103e7565b60408051918252519081900360200190f35b34801561015757600080fd5b506100ed600160a060020a03600435811690602435166044356103ed565b34801561018157600080fd5b506100ed600160a060020a0360043516602435610564565b3480156101a557600080fd5b50610139600160a060020a0360043516610654565b3480156101c657600080fd5b506101cf61066f565b60408051600160a060020a039092168252519081900360200190f35b3480156101f757600080fd5b506100ed600160a060020a036004351660243561067e565b34801561021b57600080fd5b50610139600160a060020a036004351661075f565b34801561023c57600080fd5b506100ed600160a060020a03600435166024356107f5565b34801561026057600080fd5b50610139600160a060020a036004358116906024351661088e565b34801561028757600080fd5b506100ed6108b9565b34801561029c57600080fd5b50610122600160a060020a03600435166108be565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b600354600160a060020a0316331461032e57600080fd5b600354600160a060020a038083169163a9059cbb911661034d8461075f565b6040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b1580156103b857600080fd5b505af11580156103cc573d6000803e3d6000fd5b505050506040513d60208110156103e257600080fd5b505050565b60015490565b6000600160a060020a038316151561040457600080fd5b600160a060020a03841660009081526020819052604090205482111561042957600080fd5b600160a060020a038416600090815260026020908152604080832033845290915290205482111561045957600080fd5b600160a060020a038416600090815260208190526040902054610482908363ffffffff61095316565b600160a060020a0380861660009081526020819052604080822093909355908516815220546104b7908363ffffffff61096516565b600160a060020a038085166000908152602081815260408083209490945591871681526002825282812033825290915220546104f9908363ffffffff61095316565b600160a060020a03808616600081815260026020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b336000908152600260209081526040808320600160a060020a0386168452909152812054808311156105b957336000908152600260209081526040808320600160a060020a03881684529091528120556105ee565b6105c9818463ffffffff61095316565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a031660009081526020819052604090205490565b600354600160a060020a031681565b6000600160a060020a038316151561069557600080fd5b336000908152602081905260409020548211156106b157600080fd5b336000908152602081905260409020546106d1908363ffffffff61095316565b3360009081526020819052604080822092909255600160a060020a03851681522054610703908363ffffffff61096516565b600160a060020a038416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600091600160a060020a038416916370a082319160248082019260209290919082900301818787803b1580156107c357600080fd5b505af11580156107d7573d6000803e3d6000fd5b505050506040513d60208110156107ed57600080fd5b505192915050565b336000908152600260209081526040808320600160a060020a0386168452909152812054610829908363ffffffff61096516565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600190565b600354600160a060020a031633146108d557600080fd5b600160a060020a03811615156108ea57600080fd5b600354604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60008282111561095f57fe5b50900390565b60008282018381101561097457fe5b93925050505600a165627a7a72305820285f247a9929c9aeec7184efa843cec0387d3fbb8120cc837d3fad108790cb780029", "bytecode_runtime": "0x6080604052600436106100c45763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663095ea7b381146100c957806316114acd1461010157806318160ddd1461012457806323b872dd1461014b578063661884631461017557806370a08231146101995780638da5cb5b146101ba578063a9059cbb146101eb578063c45d19db1461020f578063d73dd62314610230578063dd62ed3e14610254578063eefa597b1461027b578063f2fde38b14610290575b600080fd5b3480156100d557600080fd5b506100ed600160a060020a03600435166024356102b1565b604080519115158252519081900360200190f35b34801561010d57600080fd5b50610122600160a060020a0360043516610317565b005b34801561013057600080fd5b506101396103e7565b60408051918252519081900360200190f35b34801561015757600080fd5b506100ed600160a060020a03600435811690602435166044356103ed565b34801561018157600080fd5b506100ed600160a060020a0360043516602435610564565b3480156101a557600080fd5b50610139600160a060020a0360043516610654565b3480156101c657600080fd5b506101cf61066f565b60408051600160a060020a039092168252519081900360200190f35b3480156101f757600080fd5b506100ed600160a060020a036004351660243561067e565b34801561021b57600080fd5b50610139600160a060020a036004351661075f565b34801561023c57600080fd5b506100ed600160a060020a03600435166024356107f5565b34801561026057600080fd5b50610139600160a060020a036004358116906024351661088e565b34801561028757600080fd5b506100ed6108b9565b34801561029c57600080fd5b50610122600160a060020a03600435166108be565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b600354600160a060020a0316331461032e57600080fd5b600354600160a060020a038083169163a9059cbb911661034d8461075f565b6040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b1580156103b857600080fd5b505af11580156103cc573d6000803e3d6000fd5b505050506040513d60208110156103e257600080fd5b505050565b60015490565b6000600160a060020a038316151561040457600080fd5b600160a060020a03841660009081526020819052604090205482111561042957600080fd5b600160a060020a038416600090815260026020908152604080832033845290915290205482111561045957600080fd5b600160a060020a038416600090815260208190526040902054610482908363ffffffff61095316565b600160a060020a0380861660009081526020819052604080822093909355908516815220546104b7908363ffffffff61096516565b600160a060020a038085166000908152602081815260408083209490945591871681526002825282812033825290915220546104f9908363ffffffff61095316565b600160a060020a03808616600081815260026020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b336000908152600260209081526040808320600160a060020a0386168452909152812054808311156105b957336000908152600260209081526040808320600160a060020a03881684529091528120556105ee565b6105c9818463ffffffff61095316565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a031660009081526020819052604090205490565b600354600160a060020a031681565b6000600160a060020a038316151561069557600080fd5b336000908152602081905260409020548211156106b157600080fd5b336000908152602081905260409020546106d1908363ffffffff61095316565b3360009081526020819052604080822092909255600160a060020a03851681522054610703908363ffffffff61096516565b600160a060020a038416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600091600160a060020a038416916370a082319160248082019260209290919082900301818787803b1580156107c357600080fd5b505af11580156107d7573d6000803e3d6000fd5b505050506040513d60208110156107ed57600080fd5b505192915050565b336000908152600260209081526040808320600160a060020a0386168452909152812054610829908363ffffffff61096516565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600190565b600354600160a060020a031633146108d557600080fd5b600160a060020a03811615156108ea57600080fd5b600354604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60008282111561095f57fe5b50900390565b60008282018381101561097457fe5b93925050505600a165627a7a72305820285f247a9929c9aeec7184efa843cec0387d3fbb8120cc837d3fad108790cb780029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "approve", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "recoverTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_from", "type": "address"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_subtractedValue", "type": "uint256"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "tokensToBeReturned", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_addedValue", "type": "uint256"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}, {"name": "_spender", "type": "address"}], "name": "allowance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isToken", "outputs": [{"name": "weAre", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}, {"indexed": true, "name": "spender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "devdoc": {"methods": {"allowance(address,address)": {"details": "Function to check the amount of tokens that an owner allowed to a spender.", "params": {"_owner": "address The address which owns the funds.", "_spender": "address The address which will spend the funds."}, "return": "A uint256 specifying the amount of tokens still available for the spender."}, "approve(address,uint256)": {"details": "Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729", "params": {"_spender": "The address which will spend the funds.", "_value": "The amount of tokens to be spent."}}, "balanceOf(address)": {"details": "Gets the balance of the specified address.", "params": {"_owner": "The address to query the the balance of."}, "return": "An uint256 representing the amount owned by the passed address."}, "decreaseApproval(address,uint256)": {"details": "Decrease the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[_spender] == 0. To decrement allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"_spender": "The address which will spend the funds.", "_subtractedValue": "The amount of tokens to decrease the allowance by."}}, "increaseApproval(address,uint256)": {"details": "Increase the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[_spender] == 0. To increment allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"_addedValue": "The amount of tokens to increase the allowance by.", "_spender": "The address which will spend the funds."}}, "recoverTokens(address)": {"details": "This will be invoked by the owner, when owner wants to rescue tokens", "params": {"token": "Token which will we rescue to the owner from the contract"}}, "tokensToBeReturned(address)": {"details": "Interface function, can be overwritten by the superclass", "params": {"token": "Token which balance we will check and return"}, "return": "The amount of tokens (in smallest denominator) the contract owns"}, "totalSupply()": {"details": "total number of tokens in existence"}, "transfer(address,uint256)": {"details": "transfer token for a specified address", "params": {"_to": "The address to transfer to.", "_value": "The amount to be transferred."}}, "transferFrom(address,address,uint256)": {"details": "Transfer tokens from one address to another", "params": {"_from": "address The address which you want to send tokens from", "_to": "address The address which you want to transfer to", "_value": "uint256 the amount of tokens to be transferred"}}, "transferOwnership(address)": {"details": "Allows the current owner to transfer control of the contract to a newOwner.", "params": {"newOwner": "The address to transfer ownership to."}}}}, "userdoc": {"methods": {}}}, "settings": {"compilationTarget": {"contracts/StandardTokenExt.sol": "StandardTokenExt"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/Recoverable.sol": {"keccak256": "0x311a332cdd87df6e00057f5455f4e68b043b5dbe211f6d68bc64e20817515635", "urls": ["bzzr://4fd99bcfb93baed6e7c8d22ee9ecc5c8346a1aa98288e77b01333b2c5d3f582d"]}, "contracts/StandardTokenExt.sol": {"keccak256": "0x9ea2d4cec4dccd5639c05e6c23dd027d80b5e5a20abd99b280ab7b2631b5a5fc", "urls": ["bzzr://a52d8fc5a21bd83997aff19128e00dceb251df712207b61223894c8b7f42d5ff"]}, "zeppelin/contracts/math/SafeMath.sol": {"keccak256": "0x341ba8cb467a3623e819ba1a683ac1d264005186f308505214e5f6bc89446a08", "urls": ["bzzr://59b5652ee4e4a1b5a8f1a8906e14c84af43d636cf5ca0725cc1813aabe4c8c17"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}, "zeppelin/contracts/token/ERC20/BasicToken.sol": {"keccak256": "0x948404468d61ff35ea4194650670408dabd65da7f905a1c16888ab84520bf39e", "urls": ["bzzr://ea75e20f95d7e4e10394fe6bfaa8eee56b4757c2a6f1e8df4180d33afa621935"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}, "zeppelin/contracts/token/ERC20/StandardToken.sol": {"keccak256": "0xd2b344a5259e19ec143074cfa65637a10c40b68395c59808c4af13bccbb2de55", "urls": ["bzzr://d61a01175a7ca1ba9f4403de603c20b897e33ec425aef2d9f8a7f9ddfdfaf5b2"]}}, "version": 1}, "name": "StandardTokenExt", "ordered_full_dependencies": [], "source_path": "contracts/StandardTokenExt.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n assert(c / a == b);\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n\n\n\n/**\n * @title Basic token\n * @dev Basic version of StandardToken, with no allowances.\n */\ncontract BasicToken is ERC20Basic {\n using SafeMath for uint256;\n\n mapping(address => uint256) balances;\n\n uint256 totalSupply_;\n\n /**\n * @dev total number of tokens in existence\n */\n function totalSupply() public view returns (uint256) {\n return totalSupply_;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param _to The address to transfer to.\n * @param _value The amount to be transferred.\n */\n function transfer(address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[msg.sender]);\n\n // SafeMath.sub will throw if there is not enough balance.\n balances[msg.sender] = balances[msg.sender].sub(_value);\n balances[_to] = balances[_to].add(_value);\n Transfer(msg.sender, _to, _value);\n return true;\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param _owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address _owner) public view returns (uint256 balance) {\n return balances[_owner];\n }\n\n}\n\n\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n\n\n/**\n * @title Standard ERC20 token\n *\n * @dev Implementation of the basic standard token.\n * @dev https://github.com/ethereum/EIPs/issues/20\n * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol\n */\ncontract StandardToken is ERC20, BasicToken {\n\n mapping (address => mapping (address => uint256)) internal allowed;\n\n\n /**\n * @dev Transfer tokens from one address to another\n * @param _from address The address which you want to send tokens from\n * @param _to address The address which you want to transfer to\n * @param _value uint256 the amount of tokens to be transferred\n */\n function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[_from]);\n require(_value <= allowed[_from][msg.sender]);\n\n balances[_from] = balances[_from].sub(_value);\n balances[_to] = balances[_to].add(_value);\n allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);\n Transfer(_from, _to, _value);\n return true;\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n *\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param _spender The address which will spend the funds.\n * @param _value The amount of tokens to be spent.\n */\n function approve(address _spender, uint256 _value) public returns (bool) {\n allowed[msg.sender][_spender] = _value;\n Approval(msg.sender, _spender, _value);\n return true;\n }\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param _owner address The address which owns the funds.\n * @param _spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address _owner, address _spender) public view returns (uint256) {\n return allowed[_owner][_spender];\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(address _spender, uint _addedValue) public returns (bool) {\n allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {\n uint oldValue = allowed[msg.sender][_spender];\n if (_subtractedValue > oldValue) {\n allowed[msg.sender][_spender] = 0;\n } else {\n allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);\n }\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n\ncontract Recoverable is Ownable {\n\n /// @dev Empty constructor (for now)\n function Recoverable() {\n }\n\n /// @dev This will be invoked by the owner, when owner wants to rescue tokens\n /// @param token Token which will we rescue to the owner from the contract\n function recoverTokens(ERC20Basic token) onlyOwner public {\n token.transfer(owner, tokensToBeReturned(token));\n }\n\n /// @dev Interface function, can be overwritten by the superclass\n /// @param token Token which balance we will check and return\n /// @return The amount of tokens (in smallest denominator) the contract owns\n function tokensToBeReturned(ERC20Basic token) public returns (uint) {\n return token.balanceOf(this);\n }\n}\n\n\n\n/**\n * Standard EIP-20 token with an interface marker.\n *\n * @notice Interface marker is used by crowdsale contracts to validate that addresses point a good token contract.\n *\n */\ncontract StandardTokenExt is StandardToken, Recoverable {\n\n /* Interface declaration */\n function isToken() public constant returns (bool weAre) {\n return true;\n }\n}\n"}, "TestBytesDeserializer": {"abi": [{"constant": true, "inputs": [{"name": "b", "type": "bytes"}, {"name": "offset", "type": "uint256"}], "name": "getUint32", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "b", "type": "bytes"}, {"name": "offset", "type": "uint256"}], "name": "getBytes32", "outputs": [{"name": "", "type": "bytes32"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "b", "type": "bytes"}, {"name": "offset", "type": "uint256"}], "name": "getUint256", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "b", "type": "bytes"}, {"name": "offset", "type": "uint256"}], "name": "getAddress", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "b", "type": "bytes"}, {"name": "offset", "type": "uint256"}], "name": "getUint16", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "b", "type": "bytes"}, {"name": "offset", "type": "uint256"}], "name": "getUint128", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}], "bytecode": "0x608060405234801561001057600080fd5b506107ca806100206000396000f3006080604052600436106100775763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416631de8e96a811461007c578063510a6cca146100e9578063816b9d85146100e957806394ca2cb51461014457806395adae4f146101c8578063c804796a14610223575b600080fd5b34801561008857600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526100d7943694929360249392840191908190840183828082843750949750509335945061027e9350505050565b60408051918252519081900360200190f35b3480156100f557600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526100d794369492936024939284019190819084018382808284375094975050933594506103ad9350505050565b34801561015057600080fd5b506040805160206004803580820135601f810184900484028501840190955284845261019f94369492936024939284019190819084018382808284375094975050933594506104b69350505050565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b3480156101d457600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526100d794369492936024939284019190819084018382808284375094975050933594506105409350505050565b34801561022f57600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526100d7943694929360249392840191908190840183828082843750949750509335945061066f9350505050565b604080517fd54dd8f9000000000000000000000000000000000000000000000000000000008152602481018390526004810191825283516044820152835160009273__contracts/BytesDeserializer.sol:Byte__9263d54dd8f99287928792909182916064019060208601908083838c5b838110156103095781810151838201526020016102f1565b50505050905090810190601f1680156103365780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b15801561035457600080fd5b505af4158015610368573d6000803e3d6000fd5b505050506040513d602081101561037e57600080fd5b50517c0100000000000000000000000000000000000000000000000000000000900463ffffffff169392505050565b604080517f2e1eb7fe000000000000000000000000000000000000000000000000000000008152602481018390526004810191825283516044820152835160009273__contracts/BytesDeserializer.sol:Byte__92632e1eb7fe9287928792909182916064019060208601908083838c5b83811015610438578181015183820152602001610420565b50505050905090810190601f1680156104655780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b15801561048357600080fd5b505af4158015610497573d6000803e3d6000fd5b505050506040513d60208110156104ad57600080fd5b50519392505050565b604080517fb655e138000000000000000000000000000000000000000000000000000000008152602481018390526004810191825283516044820152835160009273__contracts/BytesDeserializer.sol:Byte__9263b655e1389287928792909182916064019060208601908083838c83811015610438578181015183820152602001610420565b604080517f20956341000000000000000000000000000000000000000000000000000000008152602481018390526004810191825283516044820152835160009273__contracts/BytesDeserializer.sol:Byte__9263209563419287928792909182916064019060208601908083838c5b838110156105cb5781810151838201526020016105b3565b50505050905090810190601f1680156105f85780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b15801561061657600080fd5b505af415801561062a573d6000803e3d6000fd5b505050506040513d602081101561064057600080fd5b50517e01000000000000000000000000000000000000000000000000000000000000900461ffff169392505050565b604080517f16419aa7000000000000000000000000000000000000000000000000000000008152602481018390526004810191825283516044820152835160009273__contracts/BytesDeserializer.sol:Byte__926316419aa79287928792909182916064019060208601908083838c5b838110156106fa5781810151838201526020016106e2565b50505050905090810190601f1680156107275780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b15801561074557600080fd5b505af4158015610759573d6000803e3d6000fd5b505050506040513d602081101561076f57600080fd5b505170010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff1693925050505600a165627a7a7230582029d391725229c06b3cf053ddb1c15523ae99445c678d03fe19c25a4c0f336beb0029", "bytecode_runtime": "0x6080604052600436106100775763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416631de8e96a811461007c578063510a6cca146100e9578063816b9d85146100e957806394ca2cb51461014457806395adae4f146101c8578063c804796a14610223575b600080fd5b34801561008857600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526100d7943694929360249392840191908190840183828082843750949750509335945061027e9350505050565b60408051918252519081900360200190f35b3480156100f557600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526100d794369492936024939284019190819084018382808284375094975050933594506103ad9350505050565b34801561015057600080fd5b506040805160206004803580820135601f810184900484028501840190955284845261019f94369492936024939284019190819084018382808284375094975050933594506104b69350505050565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b3480156101d457600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526100d794369492936024939284019190819084018382808284375094975050933594506105409350505050565b34801561022f57600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526100d7943694929360249392840191908190840183828082843750949750509335945061066f9350505050565b604080517fd54dd8f9000000000000000000000000000000000000000000000000000000008152602481018390526004810191825283516044820152835160009273__contracts/BytesDeserializer.sol:Byte__9263d54dd8f99287928792909182916064019060208601908083838c5b838110156103095781810151838201526020016102f1565b50505050905090810190601f1680156103365780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b15801561035457600080fd5b505af4158015610368573d6000803e3d6000fd5b505050506040513d602081101561037e57600080fd5b50517c0100000000000000000000000000000000000000000000000000000000900463ffffffff169392505050565b604080517f2e1eb7fe000000000000000000000000000000000000000000000000000000008152602481018390526004810191825283516044820152835160009273__contracts/BytesDeserializer.sol:Byte__92632e1eb7fe9287928792909182916064019060208601908083838c5b83811015610438578181015183820152602001610420565b50505050905090810190601f1680156104655780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b15801561048357600080fd5b505af4158015610497573d6000803e3d6000fd5b505050506040513d60208110156104ad57600080fd5b50519392505050565b604080517fb655e138000000000000000000000000000000000000000000000000000000008152602481018390526004810191825283516044820152835160009273__contracts/BytesDeserializer.sol:Byte__9263b655e1389287928792909182916064019060208601908083838c83811015610438578181015183820152602001610420565b604080517f20956341000000000000000000000000000000000000000000000000000000008152602481018390526004810191825283516044820152835160009273__contracts/BytesDeserializer.sol:Byte__9263209563419287928792909182916064019060208601908083838c5b838110156105cb5781810151838201526020016105b3565b50505050905090810190601f1680156105f85780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b15801561061657600080fd5b505af415801561062a573d6000803e3d6000fd5b505050506040513d602081101561064057600080fd5b50517e01000000000000000000000000000000000000000000000000000000000000900461ffff169392505050565b604080517f16419aa7000000000000000000000000000000000000000000000000000000008152602481018390526004810191825283516044820152835160009273__contracts/BytesDeserializer.sol:Byte__926316419aa79287928792909182916064019060208601908083838c5b838110156106fa5781810151838201526020016106e2565b50505050905090810190601f1680156107275780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b15801561074557600080fd5b505af4158015610759573d6000803e3d6000fd5b505050506040513d602081101561076f57600080fd5b505170010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff1693925050505600a165627a7a7230582029d391725229c06b3cf053ddb1c15523ae99445c678d03fe19c25a4c0f336beb0029", "direct_dependencies": ["BytesDeserializer"], "full_dependencies": ["BytesDeserializer"], "linkrefs": [{"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 1474}, {"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 2080}, {"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 2610}, {"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 2886}, {"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 3492}], "linkrefs_runtime": [{"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 1410}, {"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 2016}, {"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 2546}, {"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 2822}, {"length": 40, "name": "BytesDeserializer", "source_path": "contracts/BytesDeserializer.sol", "start": 3428}], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": true, "inputs": [{"name": "b", "type": "bytes"}, {"name": "offset", "type": "uint256"}], "name": "getUint32", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "b", "type": "bytes"}, {"name": "offset", "type": "uint256"}], "name": "getBytes32", "outputs": [{"name": "", "type": "bytes32"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "b", "type": "bytes"}, {"name": "offset", "type": "uint256"}], "name": "getUint256", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "b", "type": "bytes"}, {"name": "offset", "type": "uint256"}], "name": "getAddress", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "b", "type": "bytes"}, {"name": "offset", "type": "uint256"}], "name": "getUint16", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "b", "type": "bytes"}, {"name": "offset", "type": "uint256"}], "name": "getUint128", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}], "devdoc": {"methods": {}}, "userdoc": {"methods": {}}}, "settings": {"compilationTarget": {"contracts/test/TestBytesDeserializer.sol": "TestBytesDeserializer"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/BytesDeserializer.sol": {"keccak256": "0xdd1718e5ea778d4dd36ccb98336360536beffdffd152bd9fb035124835fa4765", "urls": ["bzzr://ee94acd8149a77baf3f6881b995d1e9eba68c3225b2fe666dc0d402e0b68c5ce"]}, "contracts/test/TestBytesDeserializer.sol": {"keccak256": "0x68e742c290f49846fc6be2614628c4c77f4c32516f66457ed0971b7a812e1292", "urls": ["bzzr://54d75c8f326b75f8d963df2805ce0678facd1b5cd7c81a5a96df24ef42047cc9"]}}, "version": 1}, "name": "TestBytesDeserializer", "ordered_full_dependencies": ["BytesDeserializer"], "source_path": "contracts/test/TestBytesDeserializer.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n/**\n * Deserialize bytes payloads.\n *\n * Values are in big-endian byte order.\n *\n */\nlibrary BytesDeserializer {\n\n /**\n * Extract 256-bit worth of data from the bytes stream.\n */\n function slice32(bytes b, uint offset) constant returns (bytes32) {\n bytes32 out;\n\n for (uint i = 0; i < 32; i++) {\n out |= bytes32(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n /**\n * Extract Ethereum address worth of data from the bytes stream.\n */\n function sliceAddress(bytes b, uint offset) constant returns (address) {\n bytes32 out;\n\n for (uint i = 0; i < 20; i++) {\n out |= bytes32(b[offset + i] & 0xFF) >> ((i+12) * 8);\n }\n return address(uint(out));\n }\n\n /**\n * Extract 128-bit worth of data from the bytes stream.\n */\n function slice16(bytes b, uint offset) constant returns (bytes16) {\n bytes16 out;\n\n for (uint i = 0; i < 16; i++) {\n out |= bytes16(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n /**\n * Extract 32-bit worth of data from the bytes stream.\n */\n function slice4(bytes b, uint offset) constant returns (bytes4) {\n bytes4 out;\n\n for (uint i = 0; i < 4; i++) {\n out |= bytes4(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n /**\n * Extract 16-bit worth of data from the bytes stream.\n */\n function slice2(bytes b, uint offset) constant returns (bytes2) {\n bytes2 out;\n\n for (uint i = 0; i < 2; i++) {\n out |= bytes2(b[offset + i] & 0xFF) >> (i * 8);\n }\n return out;\n }\n\n\n\n}\n\n\ncontract TestBytesDeserializer {\n\n using BytesDeserializer for bytes;\n\n function getUint256(bytes b, uint offset) public constant returns (uint256) {\n return uint256(b.slice32(offset));\n }\n\n function getUint128(bytes b, uint offset) public constant returns (uint256) {\n return uint128(b.slice16(offset));\n }\n\n function getUint32(bytes b, uint offset) public constant returns (uint256) {\n return uint32(b.slice4(offset));\n }\n\n function getUint16(bytes b, uint offset) public constant returns (uint256) {\n return uint16(b.slice2(offset));\n }\n\n function getBytes32(bytes b, uint offset) public constant returns (bytes32) {\n return b.slice32(offset);\n }\n\n function getAddress(bytes b, uint offset) public constant returns (address) {\n return b.sliceAddress(offset);\n }\n\n}\n"}, "TestCheckpointFailsafe": {"abi": [{"constant": true, "inputs": [{"name": "token", "type": "address"}, {"name": "blockNumber", "type": "uint256"}, {"name": "who", "type": "address"}, {"name": "index", "type": "uint256"}], "name": "getTokenBalance", "outputs": [{"name": "result", "type": "bool"}, {"name": "balance", "type": "uint256"}, {"name": "latestBlock", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}], "bytecode": "0x608060405234801561001057600080fd5b5061028b806100206000396000f3006080604052600436106100405763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166304e9827a8114610045575b600080fd5b34801561005157600080fd5b5061008073ffffffffffffffffffffffffffffffffffffffff60043581169060243590604435166064356100a0565b604080519315158452602084019290925282820152519081900360600190f35b60008060008060008873ffffffffffffffffffffffffffffffffffffffff166348ff566588886040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828152602001925050506040805180830381600087803b15801561014a57600080fd5b505af115801561015e573d6000803e3d6000fd5b505050506040513d604081101561017457600080fd5b508051602090910151604080517f48ff566500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b8116600483015260018b0160248301528251939850939650928c16926348ff566592604480830193928290030181600087803b1580156101f957600080fd5b505af115801561020d573d6000803e3d6000fd5b505050506040513d604081101561022357600080fd5b508051602090910151909250905087831080159061024057508188105b1561024e5760019450610253565b600094505b505094509450949150505600a165627a7a723058209499aa9234e8afb725647558aada381328c946ec4900b568d5f191b1c641f1110029", "bytecode_runtime": "0x6080604052600436106100405763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166304e9827a8114610045575b600080fd5b34801561005157600080fd5b5061008073ffffffffffffffffffffffffffffffffffffffff60043581169060243590604435166064356100a0565b604080519315158452602084019290925282820152519081900360600190f35b60008060008060008873ffffffffffffffffffffffffffffffffffffffff166348ff566588886040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828152602001925050506040805180830381600087803b15801561014a57600080fd5b505af115801561015e573d6000803e3d6000fd5b505050506040513d604081101561017457600080fd5b508051602090910151604080517f48ff566500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b8116600483015260018b0160248301528251939850939650928c16926348ff566592604480830193928290030181600087803b1580156101f957600080fd5b505af115801561020d573d6000803e3d6000fd5b505050506040513d604081101561022357600080fd5b508051602090910151909250905087831080159061024057508188105b1561024e5760019450610253565b600094505b505094509450949150505600a165627a7a723058209499aa9234e8afb725647558aada381328c946ec4900b568d5f191b1c641f1110029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": true, "inputs": [{"name": "token", "type": "address"}, {"name": "blockNumber", "type": "uint256"}, {"name": "who", "type": "address"}, {"name": "index", "type": "uint256"}], "name": "getTokenBalance", "outputs": [{"name": "result", "type": "bool"}, {"name": "balance", "type": "uint256"}, {"name": "latestBlock", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}], "devdoc": {"methods": {}}, "userdoc": {"methods": {}}}, "settings": {"compilationTarget": {"contracts/security-token/tests/TestCheckpointFailsafe.sol": "TestCheckpointFailsafe"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/security-token/CheckpointToken.sol": {"keccak256": "0xef922aeddfc702a53f7b2030a9737e375b7f6d34b56c5b144603dca1bcbdcc58", "urls": ["bzzr://9c4eeae60ae624abb2dfd48cb917e3e32f11f6dc2ac42fa65b17fc4ae157b75c"]}, "contracts/security-token/ERC677.sol": {"keccak256": "0xf557f3e12aa7f5a23d40957d9ac216db0902997f70f856697529d55e9823e50a", "urls": ["bzzr://c924011b4a57d2eb355c276255fc7af284c2f5b20ece36957d23a2e058975349"]}, "contracts/security-token/ERC677Token.sol": {"keccak256": "0xd67b6b0d3c7e9def09554b11c35f3b609a87ae2ea0f5853f0ca745f7f6366866", "urls": ["bzzr://bcd0f5e4bad7064ea5d8fe4e4e8a276af4ebddc4c7c25703c2dd32ca9ff715f7"]}, "contracts/security-token/SecurityTransferAgentInterface.sol": {"keccak256": "0x23b8a61926435e2c583480c0de72a99b4f7ec8a4213ffc46711f83ecdeaf9186", "urls": ["bzzr://36be13b6cf1389357679705bd18969409ecde684ace2d9c5b606d8986e0231cd"]}, "contracts/security-token/tests/TestCheckpointFailsafe.sol": {"keccak256": "0x48beb1d85156cfd47e145e7aa84aabec823cc71bdce5a5653ac272f7ae796b7e", "urls": ["bzzr://bd1e4c35cd54c7d6da5ae2121a6a32a30cb04734cf2e9072513cc485b754f3e9"]}, "zeppelin/contracts/math/SafeMath.sol": {"keccak256": "0x341ba8cb467a3623e819ba1a683ac1d264005186f308505214e5f6bc89446a08", "urls": ["bzzr://59b5652ee4e4a1b5a8f1a8906e14c84af43d636cf5ca0725cc1813aabe4c8c17"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}}, "version": 1}, "name": "TestCheckpointFailsafe", "ordered_full_dependencies": [], "source_path": "contracts/security-token/tests/TestCheckpointFailsafe.sol", "source": "\n/**\n * This smart contract code is Copyright 2018, 2019 TokenMarket Ltd. For more information see https://tokenmarket.net\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n * NatSpec is used intentionally to cover also other than public functions.\n * Solidity 0.4.18 is intentionally used: it's stable, and our framework is\n * based on that.\n */\n\n\n\ninterface SecurityTransferAgent {\n function verify(address from, address to, uint256 value) public view returns (uint256 newValue);\n}\n\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n\ninterface ERC677Receiver {\n function tokenFallback(address from, uint256 amount, bytes data) returns (bool success);\n}\n\ninterface ERC677 {\n\n // TODO: Have a different event name to make sure that tools with bad APIs do not mix this with ERC-20 Transfer() event that lacks data parameter\n event ERC677Transfer(address from, address receiver, uint256 amount, bytes data);\n\n function transferAndCall(ERC677Receiver receiver, uint amount, bytes data) returns (bool success);\n}\n\n\n\ncontract ERC677Token is ERC20, ERC677 {\n function transferAndCall(ERC677Receiver receiver, uint amount, bytes data) returns (bool success) {\n require(transfer(address(receiver), amount));\n\n ERC677Transfer(msg.sender, address(receiver), amount, data);\n\n require(receiver.tokenFallback(msg.sender, amount, data));\n }\n}\n\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n assert(c / a == b);\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n\n\n/**\n * @author TokenMarket / Ville Sundell \n */\ncontract CheckpointToken is ERC677Token {\n using SafeMath for uint256; // We use only uint256 for safety reasons (no boxing)\n\n /// @dev Name of the token, usually the company and/or series (like \"TokenMeerkat Ltd. Series A\"):\n string public name;\n /// @dev Ticker symbol, usually bases on the \"name\" above (like \"MEER\"):\n string public symbol;\n /// @dev Decimals are usually set to 18 for EIP-20 tokens:\n uint256 public decimals;\n /// @dev If transferVerifier is set, that contract will be queried upon every token transaction:\n SecurityTransferAgent public transferVerifier;\n\n /// @dev Checkpoint is the fundamental unit for our internal accounting\n /// (who owns what, and at what moment in time)\n struct Checkpoint {\n uint256 blockNumber;\n uint256 value;\n }\n /// @dev This mapping contains checkpoints for every address:\n mapping (address => Checkpoint[]) public tokenBalances;\n /// @dev This is a one dimensional Checkpoint mapping of the overall token supply:\n Checkpoint[] public tokensTotal;\n\n /// @dev This mapping keeps account for approve() -> fransferFrom() pattern:\n mapping (address => mapping (address => uint256)) public allowed;\n\n /**\n * @dev Constructor for CheckpointToken, initializing the token\n *\n * Here we define initial values for name, symbol and decimals.\n *\n * @param _name Initial name of the token\n * @param _symbol Initial symbol of the token\n * @param _decimals Number of decimals for the token, industry standard is 18\n */\n function CheckpointToken(string _name, string _symbol, uint256 _decimals) public {\n name = _name;\n symbol = _symbol;\n decimals = _decimals;\n }\n\n /** PUBLIC FUNCTIONS\n ****************************************/\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param owner address The address which owns the funds.\n * @param spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address owner, address spender) public view returns (uint256) {\n return allowed[owner][spender];\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n *\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param spender The address which will spend the funds.\n * @param value The amount of tokens to be spent.\n * @return true if the call function was executed successfully\n */\n function approve(address spender, uint256 value) public returns (bool) {\n allowed[msg.sender][spender] = value;\n Approval(msg.sender, spender, value);\n return true;\n }\n\n /**\n * @dev Transfer tokens from one address to another\n * @param from address The address which you want to send tokens from\n * @param to address The address which you want to transfer to\n * @param value uint256 the amount of tokens to be transferred\n * @return true if the call function was executed successfully\n */\n function transferFrom(address from, address to, uint256 value) public returns (bool) {\n require(value <= allowed[from][msg.sender]);\n\n transferInternal(from, to, value);\n Transfer(from, to, value);\n return true;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param to The address to transfer to.\n * @param value The amount to be transferred.\n * @return true if the call function was executed successfully\n */\n function transfer(address to, uint256 value) public returns (bool) {\n transferInternal(msg.sender, to, value);\n Transfer(msg.sender, to, value);\n return true;\n }\n\n /**\n * @dev total number of tokens in existence\n * @return A uint256 specifying the total number of tokens in existence\n */\n function totalSupply() public view returns (uint256 tokenCount) {\n tokenCount = balanceAtBlock(tokensTotal, block.number);\n }\n\n /**\n * @dev total number of tokens in existence at the given block\n * @param blockNumber The block number we want to query for the total supply\n * @return A uint256 specifying the total number of tokens at a given block\n */\n function totalSupplyAt(uint256 blockNumber) public view returns (uint256 tokenCount) {\n tokenCount = balanceAtBlock(tokensTotal, blockNumber);\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address owner) public view returns (uint256 balance) {\n balance = balanceAtBlock(tokenBalances[owner], block.number);\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param owner The address to query the the balance of.\n * @param blockNumber The block number we want to query for the balance.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceAt(address owner, uint256 blockNumber) public view returns (uint256 balance) {\n balance = balanceAtBlock(tokenBalances[owner], blockNumber);\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param spender The address which will spend the funds.\n * @param addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(address spender, uint addedValue) public returns (bool) {\n allowed[msg.sender][spender] = allowed[msg.sender][spender].add(addedValue);\n Approval(msg.sender, spender, allowed[msg.sender][spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param spender The address which will spend the funds.\n * @param subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(address spender, uint subtractedValue) public returns (bool) {\n uint oldValue = allowed[msg.sender][spender];\n if (subtractedValue > oldValue) {\n allowed[msg.sender][spender] = 0;\n } else {\n allowed[msg.sender][spender] = oldValue.sub(subtractedValue);\n }\n Approval(msg.sender, spender, allowed[msg.sender][spender]);\n return true;\n }\n\n /**\n * @dev Addition to StandardToken methods. Increase the amount of tokens that\n * an owner allowed to a spender and execute a call with the sent data.\n *\n * This is originally from OpenZeppelin.\n *\n * approve should be called when allowed[spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param spender The address which will spend the funds.\n * @param addedValue The amount of tokens to increase the allowance by.\n * @param data ABI-encoded contract call to call `spender` address.\n */\n function increaseApproval(address spender, uint addedValue, bytes data) public returns (bool) {\n require(spender != address(this));\n\n increaseApproval(spender, addedValue);\n\n require(spender.call(data));\n\n return true;\n }\n\n /**\n * @dev Addition to StandardToken methods. Decrease the amount of tokens that\n * an owner allowed to a spender and execute a call with the sent data.\n *\n * This is originally from OpenZeppelin.\n *\n * approve should be called when allowed[spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param spender The address which will spend the funds.\n * @param subtractedValue The amount of tokens to decrease the allowance by.\n * @param data ABI-encoded contract call to call `spender` address.\n */\n function decreaseApproval(address spender, uint subtractedValue, bytes data) public returns (bool) {\n require(spender != address(this));\n\n decreaseApproval(spender, subtractedValue);\n\n require(spender.call(data));\n\n return true;\n }\n\n /** INTERNALS\n ****************************************/\n\n function balanceAtBlock(Checkpoint[] storage checkpoints, uint256 blockNumber) internal returns (uint256 balance) {\n uint256 currentBlockNumber;\n (currentBlockNumber, balance) = getCheckpoint(checkpoints, blockNumber);\n }\n\n function transferInternal(address from, address to, uint256 value) internal {\n uint256 fromBalance = balanceOf(from);\n uint256 toBalance = balanceOf(to);\n\n if (address(transferVerifier) != address(0)) {\n value = transferVerifier.verify(from, to, value);\n require(value > 0);\n }\n\n setCheckpoint(tokenBalances[from], fromBalance.sub(value));\n setCheckpoint(tokenBalances[to], toBalance.add(value));\n }\n\n\n /** CORE\n ** The Magic happens below:\n ***************************************/\n\n function setCheckpoint(Checkpoint[] storage checkpoints, uint256 newValue) internal {\n if ((checkpoints.length == 0) || (checkpoints[checkpoints.length.sub(1)].blockNumber < block.number)) {\n checkpoints.push(Checkpoint(block.number, newValue));\n } else {\n checkpoints[checkpoints.length.sub(1)] = Checkpoint(block.number, newValue);\n }\n }\n\n function getCheckpoint(Checkpoint[] storage checkpoints, uint256 blockNumber) internal returns (uint256 blockNumber_, uint256 value) {\n if (checkpoints.length == 0) {\n return (0, 0);\n }\n\n // Shortcut for the actual value\n if (blockNumber >= checkpoints[checkpoints.length.sub(1)].blockNumber) {\n return (checkpoints[checkpoints.length.sub(1)].blockNumber, checkpoints[checkpoints.length.sub(1)].value);\n }\n\n if (blockNumber < checkpoints[0].blockNumber) {\n return (0, 0);\n }\n\n // Binary search of the value in the array\n uint256 min = 0;\n uint256 max = checkpoints.length.sub(1);\n while (max > min) {\n uint256 mid = (max.add(min.add(1))).div(2);\n if (checkpoints[mid].blockNumber <= blockNumber) {\n min = mid;\n } else {\n max = mid.sub(1);\n }\n }\n\n return (checkpoints[min].blockNumber, checkpoints[min].value);\n }\n}\n\n\ncontract TestCheckpointFailsafe {\n function getTokenBalance(CheckpointToken token, uint blockNumber, address who, uint index) public constant returns (bool result, uint balance, uint latestBlock) {\n uint tmpBlock;\n uint tmpBalance;\n\n (latestBlock, balance) = token.tokenBalances(who, index);\n (tmpBlock, tmpBalance) = token.tokenBalances(who, index+1);\n\n if (latestBlock >= blockNumber && blockNumber < tmpBlock) {\n result = true;\n } else {\n result = false;\n }\n }\n}\n"}, "TestMigrationTarget": {"abi": [{"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "approve", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "recoverTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_from", "type": "address"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "originalSupply", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isUpgradeAgent", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_subtractedValue", "type": "uint256"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_from", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "upgradeFrom", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "oldToken", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "tokensToBeReturned", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_addedValue", "type": "uint256"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}, {"name": "_spender", "type": "address"}], "name": "allowance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isToken", "outputs": [{"name": "weAre", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [{"name": "_oldToken", "type": "address"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"payable": true, "stateMutability": "payable", "type": "fallback"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}, {"indexed": true, "name": "spender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "bytecode": "0x608060405234801561001057600080fd5b50604051602080610cfc833981016040525160038054600160a060020a0319908116331790915560058054600160a060020a0380851691909316179081905516151561005b57600080fd5b80600160a060020a03166318160ddd6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156100b257600080fd5b505af11580156100c6573d6000803e3d6000fd5b505050506040513d60208110156100dc57600080fd5b5051600681905515156100ee57600080fd5b50610bfe806100fe6000396000f3006080604052600436106100f05763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663095ea7b381146100f557806316114acd1461012d57806318160ddd1461015057806323b872dd146101775780634b2ba0dd146101a157806361d3d7a6146101b657806366188463146101cb57806370a08231146101ef578063753e88e5146102105780638da5cb5b14610234578063a9059cbb14610265578063b31c710a14610289578063c45d19db1461029e578063d73dd623146102bf578063dd62ed3e146102e3578063eefa597b146101b6578063f2fde38b1461030a575b600080fd5b34801561010157600080fd5b50610119600160a060020a036004351660243561032b565b604080519115158252519081900360200190f35b34801561013957600080fd5b5061014e600160a060020a0360043516610391565b005b34801561015c57600080fd5b50610165610461565b60408051918252519081900360200190f35b34801561018357600080fd5b50610119600160a060020a0360043581169060243516604435610467565b3480156101ad57600080fd5b506101656105de565b3480156101c257600080fd5b506101196105e4565b3480156101d757600080fd5b50610119600160a060020a03600435166024356105e9565b3480156101fb57600080fd5b50610165600160a060020a03600435166106d9565b34801561021c57600080fd5b5061014e600160a060020a03600435166024356106f4565b34801561024057600080fd5b506102496108bc565b60408051600160a060020a039092168252519081900360200190f35b34801561027157600080fd5b50610119600160a060020a03600435166024356108cb565b34801561029557600080fd5b506102496109ac565b3480156102aa57600080fd5b50610165600160a060020a03600435166109bb565b3480156102cb57600080fd5b50610119600160a060020a0360043516602435610a51565b3480156102ef57600080fd5b50610165600160a060020a0360043581169060243516610aea565b34801561031657600080fd5b5061014e600160a060020a0360043516610b15565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b600354600160a060020a031633146103a857600080fd5b600354600160a060020a038083169163a9059cbb91166103c7846109bb565b6040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b15801561043257600080fd5b505af1158015610446573d6000803e3d6000fd5b505050506040513d602081101561045c57600080fd5b505050565b60015490565b6000600160a060020a038316151561047e57600080fd5b600160a060020a0384166000908152602081905260409020548211156104a357600080fd5b600160a060020a03841660009081526002602090815260408083203384529091529020548211156104d357600080fd5b600160a060020a0384166000908152602081905260409020546104fc908363ffffffff610baa16565b600160a060020a038086166000908152602081905260408082209390935590851681522054610531908363ffffffff610bbc16565b600160a060020a03808516600090815260208181526040808320949094559187168152600282528281203382529091522054610573908363ffffffff610baa16565b600160a060020a03808616600081815260026020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b60065481565b600190565b336000908152600260209081526040808320600160a060020a03861684529091528120548083111561063e57336000908152600260209081526040808320600160a060020a0388168452909152812055610673565b61064e818463ffffffff610baa16565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a031660009081526020819052604090205490565b600554600160a060020a0316331461070b57600080fd5b60015473__contracts/SafeMathLib.sol:SafeMathLi__6366098d4f9091836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b15801561078257600080fd5b505af4158015610796573d6000803e3d6000fd5b505050506040513d60208110156107ac57600080fd5b5051600155600160a060020a038216600090815260208181526040918290205482517f66098d4f000000000000000000000000000000000000000000000000000000008152600481019190915260248101849052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561083a57600080fd5b505af415801561084e573d6000803e3d6000fd5b505050506040513d602081101561086457600080fd5b5051600160a060020a0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b600354600160a060020a031681565b6000600160a060020a03831615156108e257600080fd5b336000908152602081905260409020548211156108fe57600080fd5b3360009081526020819052604090205461091e908363ffffffff610baa16565b3360009081526020819052604080822092909255600160a060020a03851681522054610950908363ffffffff610bbc16565b600160a060020a038416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b600554600160a060020a031681565b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600091600160a060020a038416916370a082319160248082019260209290919082900301818787803b158015610a1f57600080fd5b505af1158015610a33573d6000803e3d6000fd5b505050506040513d6020811015610a4957600080fd5b505192915050565b336000908152600260209081526040808320600160a060020a0386168452909152812054610a85908363ffffffff610bbc16565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600354600160a060020a03163314610b2c57600080fd5b600160a060020a0381161515610b4157600080fd5b600354604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600082821115610bb657fe5b50900390565b600082820183811015610bcb57fe5b93925050505600a165627a7a723058201028c1c13f458cb553a8dc31899dbfe16ebedf48201e2f7da738cee28234f9910029", "bytecode_runtime": "0x6080604052600436106100f05763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663095ea7b381146100f557806316114acd1461012d57806318160ddd1461015057806323b872dd146101775780634b2ba0dd146101a157806361d3d7a6146101b657806366188463146101cb57806370a08231146101ef578063753e88e5146102105780638da5cb5b14610234578063a9059cbb14610265578063b31c710a14610289578063c45d19db1461029e578063d73dd623146102bf578063dd62ed3e146102e3578063eefa597b146101b6578063f2fde38b1461030a575b600080fd5b34801561010157600080fd5b50610119600160a060020a036004351660243561032b565b604080519115158252519081900360200190f35b34801561013957600080fd5b5061014e600160a060020a0360043516610391565b005b34801561015c57600080fd5b50610165610461565b60408051918252519081900360200190f35b34801561018357600080fd5b50610119600160a060020a0360043581169060243516604435610467565b3480156101ad57600080fd5b506101656105de565b3480156101c257600080fd5b506101196105e4565b3480156101d757600080fd5b50610119600160a060020a03600435166024356105e9565b3480156101fb57600080fd5b50610165600160a060020a03600435166106d9565b34801561021c57600080fd5b5061014e600160a060020a03600435166024356106f4565b34801561024057600080fd5b506102496108bc565b60408051600160a060020a039092168252519081900360200190f35b34801561027157600080fd5b50610119600160a060020a03600435166024356108cb565b34801561029557600080fd5b506102496109ac565b3480156102aa57600080fd5b50610165600160a060020a03600435166109bb565b3480156102cb57600080fd5b50610119600160a060020a0360043516602435610a51565b3480156102ef57600080fd5b50610165600160a060020a0360043581169060243516610aea565b34801561031657600080fd5b5061014e600160a060020a0360043516610b15565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b600354600160a060020a031633146103a857600080fd5b600354600160a060020a038083169163a9059cbb91166103c7846109bb565b6040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b15801561043257600080fd5b505af1158015610446573d6000803e3d6000fd5b505050506040513d602081101561045c57600080fd5b505050565b60015490565b6000600160a060020a038316151561047e57600080fd5b600160a060020a0384166000908152602081905260409020548211156104a357600080fd5b600160a060020a03841660009081526002602090815260408083203384529091529020548211156104d357600080fd5b600160a060020a0384166000908152602081905260409020546104fc908363ffffffff610baa16565b600160a060020a038086166000908152602081905260408082209390935590851681522054610531908363ffffffff610bbc16565b600160a060020a03808516600090815260208181526040808320949094559187168152600282528281203382529091522054610573908363ffffffff610baa16565b600160a060020a03808616600081815260026020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b60065481565b600190565b336000908152600260209081526040808320600160a060020a03861684529091528120548083111561063e57336000908152600260209081526040808320600160a060020a0388168452909152812055610673565b61064e818463ffffffff610baa16565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a031660009081526020819052604090205490565b600554600160a060020a0316331461070b57600080fd5b60015473__contracts/SafeMathLib.sol:SafeMathLi__6366098d4f9091836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b15801561078257600080fd5b505af4158015610796573d6000803e3d6000fd5b505050506040513d60208110156107ac57600080fd5b5051600155600160a060020a038216600090815260208181526040918290205482517f66098d4f000000000000000000000000000000000000000000000000000000008152600481019190915260248101849052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561083a57600080fd5b505af415801561084e573d6000803e3d6000fd5b505050506040513d602081101561086457600080fd5b5051600160a060020a0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b600354600160a060020a031681565b6000600160a060020a03831615156108e257600080fd5b336000908152602081905260409020548211156108fe57600080fd5b3360009081526020819052604090205461091e908363ffffffff610baa16565b3360009081526020819052604080822092909255600160a060020a03851681522054610950908363ffffffff610bbc16565b600160a060020a038416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b600554600160a060020a031681565b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600091600160a060020a038416916370a082319160248082019260209290919082900301818787803b158015610a1f57600080fd5b505af1158015610a33573d6000803e3d6000fd5b505050506040513d6020811015610a4957600080fd5b505192915050565b336000908152600260209081526040808320600160a060020a0386168452909152812054610a85908363ffffffff610bbc16565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600354600160a060020a03163314610b2c57600080fd5b600160a060020a0381161515610b4157600080fd5b600354604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600082821115610bb657fe5b50900390565b600082820183811015610bcb57fe5b93925050505600a165627a7a723058201028c1c13f458cb553a8dc31899dbfe16ebedf48201e2f7da738cee28234f9910029", "direct_dependencies": ["SafeMathLib"], "full_dependencies": ["SafeMathLib"], "linkrefs": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 4124}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 4612}], "linkrefs_runtime": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 3616}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 4104}], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "approve", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "recoverTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_from", "type": "address"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "originalSupply", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isUpgradeAgent", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_subtractedValue", "type": "uint256"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_from", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "upgradeFrom", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "oldToken", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "tokensToBeReturned", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_addedValue", "type": "uint256"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}, {"name": "_spender", "type": "address"}], "name": "allowance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isToken", "outputs": [{"name": "weAre", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [{"name": "_oldToken", "type": "address"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"payable": true, "stateMutability": "payable", "type": "fallback"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}, {"indexed": true, "name": "spender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "devdoc": {"methods": {"allowance(address,address)": {"details": "Function to check the amount of tokens that an owner allowed to a spender.", "params": {"_owner": "address The address which owns the funds.", "_spender": "address The address which will spend the funds."}, "return": "A uint256 specifying the amount of tokens still available for the spender."}, "approve(address,uint256)": {"details": "Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729", "params": {"_spender": "The address which will spend the funds.", "_value": "The amount of tokens to be spent."}}, "balanceOf(address)": {"details": "Gets the balance of the specified address.", "params": {"_owner": "The address to query the the balance of."}, "return": "An uint256 representing the amount owned by the passed address."}, "decreaseApproval(address,uint256)": {"details": "Decrease the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[_spender] == 0. To decrement allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"_spender": "The address which will spend the funds.", "_subtractedValue": "The amount of tokens to decrease the allowance by."}}, "increaseApproval(address,uint256)": {"details": "Increase the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[_spender] == 0. To increment allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"_addedValue": "The amount of tokens to increase the allowance by.", "_spender": "The address which will spend the funds."}}, "recoverTokens(address)": {"details": "This will be invoked by the owner, when owner wants to rescue tokens", "params": {"token": "Token which will we rescue to the owner from the contract"}}, "tokensToBeReturned(address)": {"details": "Interface function, can be overwritten by the superclass", "params": {"token": "Token which balance we will check and return"}, "return": "The amount of tokens (in smallest denominator) the contract owns"}, "totalSupply()": {"details": "total number of tokens in existence"}, "transfer(address,uint256)": {"details": "transfer token for a specified address", "params": {"_to": "The address to transfer to.", "_value": "The amount to be transferred."}}, "transferFrom(address,address,uint256)": {"details": "Transfer tokens from one address to another", "params": {"_from": "address The address which you want to send tokens from", "_to": "address The address which you want to transfer to", "_value": "uint256 the amount of tokens to be transferred"}}, "transferOwnership(address)": {"details": "Allows the current owner to transfer control of the contract to a newOwner.", "params": {"newOwner": "The address to transfer ownership to."}}}}, "userdoc": {"methods": {"isUpgradeAgent()": {"notice": "Interface marker "}}}}, "settings": {"compilationTarget": {"contracts/test/TestMigrationTarget.sol": "TestMigrationTarget"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/MintableToken.sol": {"keccak256": "0x650e1d6b2bedcd36508918357c7cf4f36fdd093cd0c4d6342f4dcd3bdcdd7578", "urls": ["bzzr://7ba2ac0480d428066a18727e2adb76ba56856ecd37b4420e801131ec8f8f4be3"]}, "contracts/Recoverable.sol": {"keccak256": "0x311a332cdd87df6e00057f5455f4e68b043b5dbe211f6d68bc64e20817515635", "urls": ["bzzr://4fd99bcfb93baed6e7c8d22ee9ecc5c8346a1aa98288e77b01333b2c5d3f582d"]}, "contracts/SafeMathLib.sol": {"keccak256": "0x501bfe31e274b9a5591f7c540bdced4d4312e27d4f19599147c9bbca3d9c6b18", "urls": ["bzzr://a80935ebddb06c247d71372d4e5833ee029f08633bd0fe4a274a57009567e5b9"]}, "contracts/StandardTokenExt.sol": {"keccak256": "0x9ea2d4cec4dccd5639c05e6c23dd027d80b5e5a20abd99b280ab7b2631b5a5fc", "urls": ["bzzr://a52d8fc5a21bd83997aff19128e00dceb251df712207b61223894c8b7f42d5ff"]}, "contracts/UpgradeAgent.sol": {"keccak256": "0x88e793f72feca4a18d2cd06e6037c1413d7b963eabcf5626d60bfb9d04d6e8e6", "urls": ["bzzr://87e39a65cf25d539ab49ad7e759b3298b8a19272964e69e3f2432f0323f30025"]}, "contracts/UpgradeableToken.sol": {"keccak256": "0xa74fc300c514564ece81c86905502c2de674b69c0633b133af19c1ba027da2c9", "urls": ["bzzr://55bc0b908c94781462b8959f051c6dbb53c35641b0f8cb38d74632ad6bf95e52"]}, "contracts/test/TestMigrationTarget.sol": {"keccak256": "0x513d13f3ce0df07833d65d0623e7abb333fd7c3b2108a0fe2ac2858c779d5f43", "urls": ["bzzr://5746677c3b6f2f23846dbdb584058ee097ab4520016a33aaaa9914b8329aa22e"]}, "zeppelin/contracts/math/SafeMath.sol": {"keccak256": "0x341ba8cb467a3623e819ba1a683ac1d264005186f308505214e5f6bc89446a08", "urls": ["bzzr://59b5652ee4e4a1b5a8f1a8906e14c84af43d636cf5ca0725cc1813aabe4c8c17"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}, "zeppelin/contracts/token/ERC20/BasicToken.sol": {"keccak256": "0x948404468d61ff35ea4194650670408dabd65da7f905a1c16888ab84520bf39e", "urls": ["bzzr://ea75e20f95d7e4e10394fe6bfaa8eee56b4757c2a6f1e8df4180d33afa621935"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}, "zeppelin/contracts/token/ERC20/StandardToken.sol": {"keccak256": "0xd2b344a5259e19ec143074cfa65637a10c40b68395c59808c4af13bccbb2de55", "urls": ["bzzr://d61a01175a7ca1ba9f4403de603c20b897e33ec425aef2d9f8a7f9ddfdfaf5b2"]}}, "version": 1}, "name": "TestMigrationTarget", "ordered_full_dependencies": ["SafeMathLib"], "source_path": "contracts/test/TestMigrationTarget.sol", "source": "\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Safe unsigned safe math.\n *\n * https://blog.aragon.one/library-driven-development-in-solidity-2bebcaf88736#.750gwtwli\n *\n * Originally from https://raw.githubusercontent.com/AragonOne/zeppelin-solidity/master/contracts/SafeMathLib.sol\n *\n * Maintained here until merged to mainline zeppelin-solidity.\n *\n */\nlibrary SafeMathLib {\n\n function times(uint a, uint b) returns (uint) {\n uint c = a * b;\n assert(a == 0 || c / a == b);\n return c;\n }\n\n function minus(uint a, uint b) returns (uint) {\n assert(b <= a);\n return a - b;\n }\n\n function plus(uint a, uint b) returns (uint) {\n uint c = a + b;\n assert(c>=a);\n return c;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n assert(c / a == b);\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n\n\n\n/**\n * @title Basic token\n * @dev Basic version of StandardToken, with no allowances.\n */\ncontract BasicToken is ERC20Basic {\n using SafeMath for uint256;\n\n mapping(address => uint256) balances;\n\n uint256 totalSupply_;\n\n /**\n * @dev total number of tokens in existence\n */\n function totalSupply() public view returns (uint256) {\n return totalSupply_;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param _to The address to transfer to.\n * @param _value The amount to be transferred.\n */\n function transfer(address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[msg.sender]);\n\n // SafeMath.sub will throw if there is not enough balance.\n balances[msg.sender] = balances[msg.sender].sub(_value);\n balances[_to] = balances[_to].add(_value);\n Transfer(msg.sender, _to, _value);\n return true;\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param _owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address _owner) public view returns (uint256 balance) {\n return balances[_owner];\n }\n\n}\n\n\n\n\n/**\n * @title Standard ERC20 token\n *\n * @dev Implementation of the basic standard token.\n * @dev https://github.com/ethereum/EIPs/issues/20\n * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol\n */\ncontract StandardToken is ERC20, BasicToken {\n\n mapping (address => mapping (address => uint256)) internal allowed;\n\n\n /**\n * @dev Transfer tokens from one address to another\n * @param _from address The address which you want to send tokens from\n * @param _to address The address which you want to transfer to\n * @param _value uint256 the amount of tokens to be transferred\n */\n function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[_from]);\n require(_value <= allowed[_from][msg.sender]);\n\n balances[_from] = balances[_from].sub(_value);\n balances[_to] = balances[_to].add(_value);\n allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);\n Transfer(_from, _to, _value);\n return true;\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n *\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param _spender The address which will spend the funds.\n * @param _value The amount of tokens to be spent.\n */\n function approve(address _spender, uint256 _value) public returns (bool) {\n allowed[msg.sender][_spender] = _value;\n Approval(msg.sender, _spender, _value);\n return true;\n }\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param _owner address The address which owns the funds.\n * @param _spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address _owner, address _spender) public view returns (uint256) {\n return allowed[_owner][_spender];\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(address _spender, uint _addedValue) public returns (bool) {\n allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {\n uint oldValue = allowed[msg.sender][_spender];\n if (_subtractedValue > oldValue) {\n allowed[msg.sender][_spender] = 0;\n } else {\n allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);\n }\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n\ncontract Recoverable is Ownable {\n\n /// @dev Empty constructor (for now)\n function Recoverable() {\n }\n\n /// @dev This will be invoked by the owner, when owner wants to rescue tokens\n /// @param token Token which will we rescue to the owner from the contract\n function recoverTokens(ERC20Basic token) onlyOwner public {\n token.transfer(owner, tokensToBeReturned(token));\n }\n\n /// @dev Interface function, can be overwritten by the superclass\n /// @param token Token which balance we will check and return\n /// @return The amount of tokens (in smallest denominator) the contract owns\n function tokensToBeReturned(ERC20Basic token) public returns (uint) {\n return token.balanceOf(this);\n }\n}\n\n\n\n/**\n * Standard EIP-20 token with an interface marker.\n *\n * @notice Interface marker is used by crowdsale contracts to validate that addresses point a good token contract.\n *\n */\ncontract StandardTokenExt is StandardToken, Recoverable {\n\n /* Interface declaration */\n function isToken() public constant returns (bool weAre) {\n return true;\n }\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Upgrade agent interface inspired by Lunyr.\n *\n * Upgrade agent transfers tokens to a new contract.\n * Upgrade agent itself can be the token contract, or just a middle man contract doing the heavy lifting.\n */\ncontract UpgradeAgent {\n\n uint public originalSupply;\n\n /** Interface marker */\n function isUpgradeAgent() public constant returns (bool) {\n return true;\n }\n\n function upgradeFrom(address _from, uint256 _value) public;\n\n}\n\n\n/**\n * A token upgrade mechanism where users can opt-in amount of tokens to the next smart contract revision.\n *\n * First envisioned by Golem and Lunyr projects.\n */\ncontract UpgradeableToken is StandardTokenExt {\n\n /** Contract / person who can set the upgrade path. This can be the same as team multisig wallet, as what it is with its default value. */\n address public upgradeMaster;\n\n /** The next contract where the tokens will be migrated. */\n UpgradeAgent public upgradeAgent;\n\n /** How many tokens we have upgraded by now. */\n uint256 public totalUpgraded;\n\n /**\n * Upgrade states.\n *\n * - NotAllowed: The child contract has not reached a condition where the upgrade can bgun\n * - WaitingForAgent: Token allows upgrade, but we don't have a new agent yet\n * - ReadyToUpgrade: The agent is set, but not a single token has been upgraded yet\n * - Upgrading: Upgrade agent is set and the balance holders can upgrade their tokens\n *\n */\n enum UpgradeState {Unknown, NotAllowed, WaitingForAgent, ReadyToUpgrade, Upgrading}\n\n /**\n * Somebody has upgraded some of his tokens.\n */\n event Upgrade(address indexed _from, address indexed _to, uint256 _value);\n\n /**\n * New upgrade agent available.\n */\n event UpgradeAgentSet(address agent);\n\n /**\n * Do not allow construction without upgrade master set.\n */\n function UpgradeableToken(address _upgradeMaster) {\n upgradeMaster = _upgradeMaster;\n }\n\n /**\n * Allow the token holder to upgrade some of their tokens to a new contract.\n */\n function upgrade(uint256 value) public {\n\n UpgradeState state = getUpgradeState();\n if(!(state == UpgradeState.ReadyToUpgrade || state == UpgradeState.Upgrading)) {\n // Called in a bad state\n throw;\n }\n\n // Validate input value.\n if (value == 0) throw;\n\n balances[msg.sender] = balances[msg.sender].sub(value);\n\n // Take tokens out from circulation\n totalSupply_ = totalSupply_.sub(value);\n totalUpgraded = totalUpgraded.add(value);\n\n // Upgrade agent reissues the tokens\n upgradeAgent.upgradeFrom(msg.sender, value);\n Upgrade(msg.sender, upgradeAgent, value);\n }\n\n /**\n * Set an upgrade agent that handles\n */\n function setUpgradeAgent(address agent) external {\n\n if(!canUpgrade()) {\n // The token is not yet in a state that we could think upgrading\n throw;\n }\n\n if (agent == 0x0) throw;\n // Only a master can designate the next agent\n if (msg.sender != upgradeMaster) throw;\n // Upgrade has already begun for an agent\n if (getUpgradeState() == UpgradeState.Upgrading) throw;\n\n upgradeAgent = UpgradeAgent(agent);\n\n // Bad interface\n if(!upgradeAgent.isUpgradeAgent()) throw;\n // Make sure that token supplies match in source and target\n if (upgradeAgent.originalSupply() != totalSupply_) throw;\n\n UpgradeAgentSet(upgradeAgent);\n }\n\n /**\n * Get the state of the token upgrade.\n */\n function getUpgradeState() public constant returns(UpgradeState) {\n if(!canUpgrade()) return UpgradeState.NotAllowed;\n else if(address(upgradeAgent) == 0x00) return UpgradeState.WaitingForAgent;\n else if(totalUpgraded == 0) return UpgradeState.ReadyToUpgrade;\n else return UpgradeState.Upgrading;\n }\n\n /**\n * Change the upgrade master.\n *\n * This allows us to set a new owner for the upgrade mechanism.\n */\n function setUpgradeMaster(address master) public {\n if (master == 0x0) throw;\n if (msg.sender != upgradeMaster) throw;\n upgradeMaster = master;\n }\n\n /**\n * Child contract can enable to provide the condition when the upgrade can begun.\n */\n function canUpgrade() public constant returns(bool) {\n return true;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n\n/**\n * A token that can increase its supply by another contract.\n *\n * This allows uncapped crowdsale by dynamically increasing the supply when money pours in.\n * Only mint agents, contracts whitelisted by owner, can mint new tokens.\n *\n */\ncontract MintableToken is StandardTokenExt {\n\n using SafeMathLib for uint;\n\n bool public mintingFinished = false;\n\n /** List of agents that are allowed to create new tokens */\n mapping (address => bool) public mintAgents;\n\n event MintingAgentChanged(address addr, bool state);\n event Minted(address receiver, uint amount);\n\n /**\n * Create new tokens and allocate them to an address..\n *\n * Only callably by a crowdsale contract (mint agent).\n */\n function mint(address receiver, uint amount) onlyMintAgent canMint public {\n totalSupply_ = totalSupply_.plus(amount);\n balances[receiver] = balances[receiver].plus(amount);\n\n // This will make the mint transaction apper in EtherScan.io\n // We can remove this after there is a standardized minting event\n Transfer(0, receiver, amount);\n }\n\n /**\n * Owner can allow a crowdsale contract to mint new tokens.\n */\n function setMintAgent(address addr, bool state) onlyOwner canMint public {\n mintAgents[addr] = state;\n MintingAgentChanged(addr, state);\n }\n\n modifier onlyMintAgent() {\n // Only crowdsale contracts are allowed to mint new tokens\n if(!mintAgents[msg.sender]) {\n throw;\n }\n _;\n }\n\n /** Make sure we are not done yet. */\n modifier canMint() {\n if(mintingFinished) throw;\n _;\n }\n}\n\n\n/**\n * A sample token that is used as a migration testing target.\n *\n * This is not an actual token, but just a stub used in testing.\n */\ncontract TestMigrationTarget is StandardTokenExt, UpgradeAgent {\n\n using SafeMathLib for uint;\n\n UpgradeableToken public oldToken;\n\n uint public originalSupply;\n\n function TestMigrationTarget(UpgradeableToken _oldToken) {\n\n oldToken = _oldToken;\n\n // Let's not set bad old token\n if(address(oldToken) == 0) {\n throw;\n }\n\n // Let's make sure we have something to migrate\n originalSupply = _oldToken.totalSupply();\n if(originalSupply == 0) {\n throw;\n }\n }\n\n function upgradeFrom(address _from, uint256 _value) public {\n if (msg.sender != address(oldToken)) throw; // only upgrade from oldToken\n\n // Mint new tokens to the migrator\n totalSupply_ = totalSupply_.plus(_value);\n balances[_from] = balances[_from].plus(_value);\n Transfer(0, _from, _value);\n }\n\n function() public payable {\n throw;\n }\n\n}\n"}, "TestSolidityAddressHash": {"abi": [{"constant": true, "inputs": [], "name": "leftPad", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getHashLeftPad", "outputs": [{"name": "", "type": "bytes32"}], "payable": false, "stateMutability": "view", "type": "function"}], "bytecode": "0x608060405260008054600160a060020a03191672b5557397b157a17fb1abca97a38e4646bedb8817905534801561003557600080fd5b50610176806100456000396000f30060806040526004361061004b5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663b2d55f6c8114610050578063ceb413851461008e575b600080fd5b34801561005c57600080fd5b506100656100b5565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561009a57600080fd5b506100a36100d1565b60408051918252519081900360200190f35b60005473ffffffffffffffffffffffffffffffffffffffff1681565b600080546040805173ffffffffffffffffffffffffffffffffffffffff9092166c010000000000000000000000000282525182916002916014808301926020929190829003018186865af115801561012d573d6000803e3d6000fd5b5050506040513d602081101561014257600080fd5b5051929150505600a165627a7a72305820b39c24d5e7475f7976a9e9ad9a77d939c28b7616a9adb938ea191dc3a79841aa0029", "bytecode_runtime": "0x60806040526004361061004b5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663b2d55f6c8114610050578063ceb413851461008e575b600080fd5b34801561005c57600080fd5b506100656100b5565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561009a57600080fd5b506100a36100d1565b60408051918252519081900360200190f35b60005473ffffffffffffffffffffffffffffffffffffffff1681565b600080546040805173ffffffffffffffffffffffffffffffffffffffff9092166c010000000000000000000000000282525182916002916014808301926020929190829003018186865af115801561012d573d6000803e3d6000fd5b5050506040513d602081101561014257600080fd5b5051929150505600a165627a7a72305820b39c24d5e7475f7976a9e9ad9a77d939c28b7616a9adb938ea191dc3a79841aa0029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": true, "inputs": [], "name": "leftPad", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getHashLeftPad", "outputs": [{"name": "", "type": "bytes32"}], "payable": false, "stateMutability": "view", "type": "function"}], "devdoc": {"methods": {}}, "userdoc": {"methods": {}}}, "settings": {"compilationTarget": {"contracts/test/TestSolidityAddressHash.sol": "TestSolidityAddressHash"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/test/TestSolidityAddressHash.sol": {"keccak256": "0x07ac47cbce4a8d8752f055bb69b40d68a23be63e0979445a9cb24d9647cf467d", "urls": ["bzzr://8b7238513d31a339ebdf3d2cf3070ac4899b7bd8e1e590f7dc8408bccc593ed8"]}}, "version": 1}, "name": "TestSolidityAddressHash", "ordered_full_dependencies": [], "source_path": "contracts/test/TestSolidityAddressHash.sol", "source": "\n/**\n * Test address hash behavior with left and right padded zeroes.\n */\ncontract TestSolidityAddressHash {\n\n address public leftPad = 0x00b5557397B157a17fb1AbCa97a38e4646BEDb88;\n\n // Solidity 0.4.11+ needs a valid address here\n //address public rightPad = 00x88b5557397B157a17fb1AbCa97a38e4646BEDb00;\n\n function getHashLeftPad() public constant returns (bytes32) {\n bytes32 hash = sha256(leftPad);\n return hash;\n }\n\n /*\n function getHashRightPad() public constant returns (bytes32) {\n bytes32 hash = sha256(rightPad);\n return hash;\n }*/\n\n}\n"}, "TimeVault": {"abi": [{"constant": true, "inputs": [], "name": "getTokenBalance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isTimeVault", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "unlockedAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "unlock", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "teamMultisig", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "token", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [{"name": "_teamMultisig", "type": "address"}, {"name": "_token", "type": "address"}, {"name": "_unlockedAt", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"payable": false, "stateMutability": "nonpayable", "type": "fallback"}, {"anonymous": false, "inputs": [], "name": "Unlocked", "type": "event"}], "bytecode": "0x60806040526000805460ff1916600117905534801561001d57600080fd5b5060405160608061044b83398101604090815281516020830151919092015160018054600160a060020a031916600160a060020a0380861691909117918290556000805461010060a860020a03191661010083871602179055600283905516151561008757600080fd5b6000546101009004600160a060020a031615156100a357600080fd5b505050610396806100b56000396000f3006080604052600436106100775763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166382b2e257811461008957806389c1108d146100b05780638cb1e9c1146100d9578063a69df4b5146100ee578063dbc0c08514610105578063fc0c546a14610143575b34801561008357600080fd5b50600080fd5b34801561009557600080fd5b5061009e610158565b60408051918252519081900360200190f35b3480156100bc57600080fd5b506100c5610200565b604080519115158252519081900360200190f35b3480156100e557600080fd5b5061009e610209565b3480156100fa57600080fd5b5061010361020f565b005b34801561011157600080fd5b5061011a61032d565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561014f57600080fd5b5061011a610349565b60008054604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905161010090920473ffffffffffffffffffffffffffffffffffffffff16916370a082319160248082019260209290919082900301818787803b1580156101cf57600080fd5b505af11580156101e3573d6000803e3d6000fd5b505050506040513d60208110156101f957600080fd5b5051905090565b60005460ff1681565b60025481565b60025442101561021e57600080fd5b60005460015473ffffffffffffffffffffffffffffffffffffffff61010090920482169163a9059cbb9116610251610158565b6040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156102d657600080fd5b505af11580156102ea573d6000803e3d6000fd5b505050506040513d602081101561030057600080fd5b50506040517f19aad37188a1d3921e29eb3c66acf43d81975e107cb650d58cca878627955fd690600090a1565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b600054610100900473ffffffffffffffffffffffffffffffffffffffff16815600a165627a7a72305820cf8b7c079444960b2d41bf50cc5e31d9507812ccc7a11dd6758238d9a0d565ce0029", "bytecode_runtime": "0x6080604052600436106100775763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166382b2e257811461008957806389c1108d146100b05780638cb1e9c1146100d9578063a69df4b5146100ee578063dbc0c08514610105578063fc0c546a14610143575b34801561008357600080fd5b50600080fd5b34801561009557600080fd5b5061009e610158565b60408051918252519081900360200190f35b3480156100bc57600080fd5b506100c5610200565b604080519115158252519081900360200190f35b3480156100e557600080fd5b5061009e610209565b3480156100fa57600080fd5b5061010361020f565b005b34801561011157600080fd5b5061011a61032d565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561014f57600080fd5b5061011a610349565b60008054604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905161010090920473ffffffffffffffffffffffffffffffffffffffff16916370a082319160248082019260209290919082900301818787803b1580156101cf57600080fd5b505af11580156101e3573d6000803e3d6000fd5b505050506040513d60208110156101f957600080fd5b5051905090565b60005460ff1681565b60025481565b60025442101561021e57600080fd5b60005460015473ffffffffffffffffffffffffffffffffffffffff61010090920482169163a9059cbb9116610251610158565b6040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156102d657600080fd5b505af11580156102ea573d6000803e3d6000fd5b505050506040513d602081101561030057600080fd5b50506040517f19aad37188a1d3921e29eb3c66acf43d81975e107cb650d58cca878627955fd690600090a1565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b600054610100900473ffffffffffffffffffffffffffffffffffffffff16815600a165627a7a72305820cf8b7c079444960b2d41bf50cc5e31d9507812ccc7a11dd6758238d9a0d565ce0029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": true, "inputs": [], "name": "getTokenBalance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isTimeVault", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "unlockedAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "unlock", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "teamMultisig", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "token", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [{"name": "_teamMultisig", "type": "address"}, {"name": "_token", "type": "address"}, {"name": "_unlockedAt", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"payable": false, "stateMutability": "nonpayable", "type": "fallback"}, {"anonymous": false, "inputs": [], "name": "Unlocked", "type": "event"}], "devdoc": {"methods": {}}, "userdoc": {"methods": {}}}, "settings": {"compilationTarget": {"contracts/TimeVault.sol": "TimeVault"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/Recoverable.sol": {"keccak256": "0x311a332cdd87df6e00057f5455f4e68b043b5dbe211f6d68bc64e20817515635", "urls": ["bzzr://4fd99bcfb93baed6e7c8d22ee9ecc5c8346a1aa98288e77b01333b2c5d3f582d"]}, "contracts/StandardTokenExt.sol": {"keccak256": "0x9ea2d4cec4dccd5639c05e6c23dd027d80b5e5a20abd99b280ab7b2631b5a5fc", "urls": ["bzzr://a52d8fc5a21bd83997aff19128e00dceb251df712207b61223894c8b7f42d5ff"]}, "contracts/TimeVault.sol": {"keccak256": "0xa18e04c4f5f8e45712d8fba67ec5296eefeeb716ab70b59465e64678f00c82bd", "urls": ["bzzr://8b279a3ab2afb95d8e0c993f54014b4c1a08019fc177ce8240456ca8391e0aa2"]}, "zeppelin/contracts/math/SafeMath.sol": {"keccak256": "0x341ba8cb467a3623e819ba1a683ac1d264005186f308505214e5f6bc89446a08", "urls": ["bzzr://59b5652ee4e4a1b5a8f1a8906e14c84af43d636cf5ca0725cc1813aabe4c8c17"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}, "zeppelin/contracts/token/ERC20/BasicToken.sol": {"keccak256": "0x948404468d61ff35ea4194650670408dabd65da7f905a1c16888ab84520bf39e", "urls": ["bzzr://ea75e20f95d7e4e10394fe6bfaa8eee56b4757c2a6f1e8df4180d33afa621935"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}, "zeppelin/contracts/token/ERC20/StandardToken.sol": {"keccak256": "0xd2b344a5259e19ec143074cfa65637a10c40b68395c59808c4af13bccbb2de55", "urls": ["bzzr://d61a01175a7ca1ba9f4403de603c20b897e33ec425aef2d9f8a7f9ddfdfaf5b2"]}}, "version": 1}, "name": "TimeVault", "ordered_full_dependencies": [], "source_path": "contracts/TimeVault.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n assert(c / a == b);\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n\n\n\n/**\n * @title Basic token\n * @dev Basic version of StandardToken, with no allowances.\n */\ncontract BasicToken is ERC20Basic {\n using SafeMath for uint256;\n\n mapping(address => uint256) balances;\n\n uint256 totalSupply_;\n\n /**\n * @dev total number of tokens in existence\n */\n function totalSupply() public view returns (uint256) {\n return totalSupply_;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param _to The address to transfer to.\n * @param _value The amount to be transferred.\n */\n function transfer(address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[msg.sender]);\n\n // SafeMath.sub will throw if there is not enough balance.\n balances[msg.sender] = balances[msg.sender].sub(_value);\n balances[_to] = balances[_to].add(_value);\n Transfer(msg.sender, _to, _value);\n return true;\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param _owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address _owner) public view returns (uint256 balance) {\n return balances[_owner];\n }\n\n}\n\n\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n\n\n/**\n * @title Standard ERC20 token\n *\n * @dev Implementation of the basic standard token.\n * @dev https://github.com/ethereum/EIPs/issues/20\n * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol\n */\ncontract StandardToken is ERC20, BasicToken {\n\n mapping (address => mapping (address => uint256)) internal allowed;\n\n\n /**\n * @dev Transfer tokens from one address to another\n * @param _from address The address which you want to send tokens from\n * @param _to address The address which you want to transfer to\n * @param _value uint256 the amount of tokens to be transferred\n */\n function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[_from]);\n require(_value <= allowed[_from][msg.sender]);\n\n balances[_from] = balances[_from].sub(_value);\n balances[_to] = balances[_to].add(_value);\n allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);\n Transfer(_from, _to, _value);\n return true;\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n *\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param _spender The address which will spend the funds.\n * @param _value The amount of tokens to be spent.\n */\n function approve(address _spender, uint256 _value) public returns (bool) {\n allowed[msg.sender][_spender] = _value;\n Approval(msg.sender, _spender, _value);\n return true;\n }\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param _owner address The address which owns the funds.\n * @param _spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address _owner, address _spender) public view returns (uint256) {\n return allowed[_owner][_spender];\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(address _spender, uint _addedValue) public returns (bool) {\n allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {\n uint oldValue = allowed[msg.sender][_spender];\n if (_subtractedValue > oldValue) {\n allowed[msg.sender][_spender] = 0;\n } else {\n allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);\n }\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n\ncontract Recoverable is Ownable {\n\n /// @dev Empty constructor (for now)\n function Recoverable() {\n }\n\n /// @dev This will be invoked by the owner, when owner wants to rescue tokens\n /// @param token Token which will we rescue to the owner from the contract\n function recoverTokens(ERC20Basic token) onlyOwner public {\n token.transfer(owner, tokensToBeReturned(token));\n }\n\n /// @dev Interface function, can be overwritten by the superclass\n /// @param token Token which balance we will check and return\n /// @return The amount of tokens (in smallest denominator) the contract owns\n function tokensToBeReturned(ERC20Basic token) public returns (uint) {\n return token.balanceOf(this);\n }\n}\n\n\n\n/**\n * Standard EIP-20 token with an interface marker.\n *\n * @notice Interface marker is used by crowdsale contracts to validate that addresses point a good token contract.\n *\n */\ncontract StandardTokenExt is StandardToken, Recoverable {\n\n /* Interface declaration */\n function isToken() public constant returns (bool weAre) {\n return true;\n }\n}\n\n\n/**\n *\n * Time-locked token vault of allocated founder tokens.\n *\n * First used by Lunyr https://github.com/Lunyr/crowdsale-contracts\n *\n *\n * See TokenVault for multi user implementation.\n */\ncontract TimeVault {\n\n /** Interface flag to determine if address is for a real contract or not */\n bool public isTimeVault = true;\n\n /** Token we are holding */\n StandardTokenExt public token;\n\n /** Address that can claim tokens */\n address public teamMultisig;\n\n /** UNIX timestamp when tokens can be claimed. */\n uint256 public unlockedAt;\n\n event Unlocked();\n\n function TimeVault(address _teamMultisig, StandardTokenExt _token, uint _unlockedAt) {\n\n teamMultisig = _teamMultisig;\n token = _token;\n unlockedAt = _unlockedAt;\n\n // Sanity check\n if (teamMultisig == 0x0) throw;\n if (address(token) == 0x0) throw;\n }\n\n function getTokenBalance() public constant returns (uint) {\n return token.balanceOf(address(this));\n }\n\n function unlock() public {\n // Wait your turn!\n if (now < unlockedAt) throw;\n\n // StandardToken will throw in the case of transaction fails\n token.transfer(teamMultisig, getTokenBalance());\n\n Unlocked();\n }\n\n // disallow ETH payment for this vault\n function () { throw; }\n\n}\n"}, "TokenTranchePricing": {"abi": [{"constant": true, "inputs": [], "name": "isPricingStrategy", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "value", "type": "uint256"}, {"name": "weiRaised", "type": "uint256"}, {"name": "tokensSold", "type": "uint256"}, {"name": "msgSender", "type": "address"}, {"name": "decimals", "type": "uint256"}], "name": "calculatePrice", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "uint256"}], "name": "tranches", "outputs": [{"name": "amount", "type": "uint256"}, {"name": "price", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getPricingStartsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "trancheCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getPricingEndsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "MAX_TRANCHES", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "_crowdsale", "type": "address"}], "name": "isSane", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "tokensSold", "type": "uint256"}], "name": "getCurrentPrice", "outputs": [{"name": "result", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "n", "type": "uint256"}], "name": "getTranche", "outputs": [{"name": "", "type": "uint256"}, {"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "preicoAddress", "type": "address"}, {"name": "pricePerToken", "type": "uint256"}], "name": "setPreicoAddress", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "purchaser", "type": "address"}], "name": "isPresalePurchase", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "preicoAddresses", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [{"name": "_tranches", "type": "uint256[]"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"payable": true, "stateMutability": "payable", "type": "fallback"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "bytecode": "0x608060405234801561001057600080fd5b5060405161088738038061088783398101604052805160008054600160a060020a03191633178155910180519091908190600290066001148061005557508251601411155b1561005f57600080fd5b50508051600290046016556000805b82516002900481101561012c57828160020281518110151561008c57fe5b60209081029091010151600282600a81106100a357fe5b600202016000018190555082816002026001018151811015156100c257fe5b60209081029091010151600282600a81106100d957fe5b600202016001018190555081600014158015610106575081600282600a81106100fe57fe5b600202015411155b1561011057600080fd5b600281600a811061011d57fe5b6002020154915060010161006e565b60165460029060001901600a811061014057fe5b6002020160010154600014151561015657600080fd5b50505061071f806101686000396000f3006080604052600436106100da5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166304bbc25581146100df57806318a4155e1461010857806326c25962146101475780632c9a0a951461017857806359eb82241461018d5780636f079f90146101a257806389506a44146101b75780638da5cb5b146101cc5780638e768288146101fd578063c55d0f561461021e578063d972e8ad14610236578063e474f97a1461024e578063f14ae17d14610274578063f1ef9a0814610295578063f2fde38b146102b6575b600080fd5b3480156100eb57600080fd5b506100f46102d7565b604080519115158252519081900360200190f35b34801561011457600080fd5b50610135600435602435604435600160a060020a03606435166084356102dc565b60408051918252519081900360200190f35b34801561015357600080fd5b5061015f600435610490565b6040805192835260208301919091528051918290030190f35b34801561018457600080fd5b506101356104af565b34801561019957600080fd5b506101356104bf565b3480156101ae57600080fd5b506101356104c5565b3480156101c357600080fd5b506101356104cf565b3480156101d857600080fd5b506101e16104d4565b60408051600160a060020a039092168252519081900360200190f35b34801561020957600080fd5b506100f4600160a060020a03600435166104e3565b34801561022a57600080fd5b506101356004356104e9565b34801561024257600080fd5b5061015f6004356104fe565b34801561025a57600080fd5b50610272600160a060020a0360043516602435610536565b005b34801561028057600080fd5b506100f4600160a060020a0360043516610569565b3480156102a157600080fd5b50610135600160a060020a036004351661056f565b3480156102c257600080fd5b50610272600160a060020a0360043516610581565b600190565b600160a060020a038216600090815260016020526040812054600a83900a9082908110156103cb57600160a060020a0385166000908152600160209081526040918290205482517f1d3b9edf000000000000000000000000000000000000000000000000000000008152600481018c9052602481018690529251909273__contracts/SafeMathLib.sol:SafeMathLi__92631d3b9edf92604480840193829003018186803b15801561038e57600080fd5b505af41580156103a2573d6000803e3d6000fd5b505050506040513d60208110156103b857600080fd5b50518115156103c357fe5b049250610485565b6103d4866104e9565b9050808873__contracts/SafeMathLib.sol:SafeMathLi__631d3b9edf9091856040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b15801561044c57600080fd5b505af4158015610460573d6000803e3d6000fd5b505050506040513d602081101561047657600080fd5b505181151561048157fe5b0492505b505095945050505050565b600281600a811061049d57fe5b60020201805460019091015490915082565b60006104b9610615565b51905090565b60165481565b60006104b961064a565b600a81565b600054600160a060020a031681565b50600190565b60006104f482610666565b6020015192915050565b600080600283600a811061050e57fe5b6002020160000154600284600a8110151561052557fe5b600202016001015491509150915091565b600054600160a060020a0316331461054d57600080fd5b600160a060020a03909116600090815260016020526040902055565b50600090565b60016020526000908152604090205481565b600054600160a060020a0316331461059857600080fd5b600160a060020a03811615156105ad57600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b61061d6106dc565b600260005b6002020160408051908101604052908160008201548152602001600182015481525050905090565b6106526106dc565b60165460029060001901600a811061062257fe5b61066e6106dc565b60005b600a8110156106d657600281600a811061068757fe5b60020201548310156106ce5760026000198201600a81106106a457fe5b600202016040805190810160405290816000820154815260200160018201548152505091506106d6565b600101610671565b50919050565b6040805180820190915260008082526020820152905600a165627a7a72305820f0db255245865908b2777e82e39f41fe1a35748bc607b649a73911012cceb1490029", "bytecode_runtime": "0x6080604052600436106100da5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166304bbc25581146100df57806318a4155e1461010857806326c25962146101475780632c9a0a951461017857806359eb82241461018d5780636f079f90146101a257806389506a44146101b75780638da5cb5b146101cc5780638e768288146101fd578063c55d0f561461021e578063d972e8ad14610236578063e474f97a1461024e578063f14ae17d14610274578063f1ef9a0814610295578063f2fde38b146102b6575b600080fd5b3480156100eb57600080fd5b506100f46102d7565b604080519115158252519081900360200190f35b34801561011457600080fd5b50610135600435602435604435600160a060020a03606435166084356102dc565b60408051918252519081900360200190f35b34801561015357600080fd5b5061015f600435610490565b6040805192835260208301919091528051918290030190f35b34801561018457600080fd5b506101356104af565b34801561019957600080fd5b506101356104bf565b3480156101ae57600080fd5b506101356104c5565b3480156101c357600080fd5b506101356104cf565b3480156101d857600080fd5b506101e16104d4565b60408051600160a060020a039092168252519081900360200190f35b34801561020957600080fd5b506100f4600160a060020a03600435166104e3565b34801561022a57600080fd5b506101356004356104e9565b34801561024257600080fd5b5061015f6004356104fe565b34801561025a57600080fd5b50610272600160a060020a0360043516602435610536565b005b34801561028057600080fd5b506100f4600160a060020a0360043516610569565b3480156102a157600080fd5b50610135600160a060020a036004351661056f565b3480156102c257600080fd5b50610272600160a060020a0360043516610581565b600190565b600160a060020a038216600090815260016020526040812054600a83900a9082908110156103cb57600160a060020a0385166000908152600160209081526040918290205482517f1d3b9edf000000000000000000000000000000000000000000000000000000008152600481018c9052602481018690529251909273__contracts/SafeMathLib.sol:SafeMathLi__92631d3b9edf92604480840193829003018186803b15801561038e57600080fd5b505af41580156103a2573d6000803e3d6000fd5b505050506040513d60208110156103b857600080fd5b50518115156103c357fe5b049250610485565b6103d4866104e9565b9050808873__contracts/SafeMathLib.sol:SafeMathLi__631d3b9edf9091856040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b15801561044c57600080fd5b505af4158015610460573d6000803e3d6000fd5b505050506040513d602081101561047657600080fd5b505181151561048157fe5b0492505b505095945050505050565b600281600a811061049d57fe5b60020201805460019091015490915082565b60006104b9610615565b51905090565b60165481565b60006104b961064a565b600a81565b600054600160a060020a031681565b50600190565b60006104f482610666565b6020015192915050565b600080600283600a811061050e57fe5b6002020160000154600284600a8110151561052557fe5b600202016001015491509150915091565b600054600160a060020a0316331461054d57600080fd5b600160a060020a03909116600090815260016020526040902055565b50600090565b60016020526000908152604090205481565b600054600160a060020a0316331461059857600080fd5b600160a060020a03811615156105ad57600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b61061d6106dc565b600260005b6002020160408051908101604052908160008201548152602001600182015481525050905090565b6106526106dc565b60165460029060001901600a811061062257fe5b61066e6106dc565b60005b600a8110156106d657600281600a811061068757fe5b60020201548310156106ce5760026000198201600a81106106a457fe5b600202016040805190810160405290816000820154815260200160018201548152505091506106d6565b600101610671565b50919050565b6040805180820190915260008082526020820152905600a165627a7a72305820f0db255245865908b2777e82e39f41fe1a35748bc607b649a73911012cceb1490029", "direct_dependencies": ["SafeMathLib"], "full_dependencies": ["SafeMathLib"], "linkrefs": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 2436}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 2692}], "linkrefs_runtime": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 1716}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 1972}], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": true, "inputs": [], "name": "isPricingStrategy", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "value", "type": "uint256"}, {"name": "weiRaised", "type": "uint256"}, {"name": "tokensSold", "type": "uint256"}, {"name": "msgSender", "type": "address"}, {"name": "decimals", "type": "uint256"}], "name": "calculatePrice", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "uint256"}], "name": "tranches", "outputs": [{"name": "amount", "type": "uint256"}, {"name": "price", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getPricingStartsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "trancheCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getPricingEndsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "MAX_TRANCHES", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "_crowdsale", "type": "address"}], "name": "isSane", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "tokensSold", "type": "uint256"}], "name": "getCurrentPrice", "outputs": [{"name": "result", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "n", "type": "uint256"}], "name": "getTranche", "outputs": [{"name": "", "type": "uint256"}, {"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "preicoAddress", "type": "address"}, {"name": "pricePerToken", "type": "uint256"}], "name": "setPreicoAddress", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "purchaser", "type": "address"}], "name": "isPresalePurchase", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "preicoAddresses", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [{"name": "_tranches", "type": "uint256[]"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"payable": true, "stateMutability": "payable", "type": "fallback"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "devdoc": {"methods": {"calculatePrice(uint256,uint256,uint256,address,uint256)": {"details": "Calculate the current price for buy in amount."}, "getCurrentPrice(uint256)": {"details": "Get the current price.", "params": {"tokensSold": "total amount of tokens sold, for calculating the current tranche"}, "return": "The current price or 0 if we are outside trache ranges"}, "getTranche(uint256)": {"details": "Iterate through tranches. You reach end of tranches when price = 0", "return": "tuple (time, price)"}, "isPresalePurchase(address)": {"details": "Pricing tells if this is a presale purchase or not.", "params": {"purchaser": "Address of the purchaser"}, "return": "False by default, true if a presale purchaser"}, "setPreicoAddress(address,uint256)": {"details": "This is invoked once for every pre-ICO address, set pricePerToken to 0 to disable", "params": {"preicoAddress": "PresaleFundCollector address", "pricePerToken": "How many weis one token cost for pre-ico investors"}}, "transferOwnership(address)": {"details": "Allows the current owner to transfer control of the contract to a newOwner.", "params": {"newOwner": "The address to transfer ownership to."}}}}, "userdoc": {"methods": {"isPricingStrategy()": {"notice": "Interface declaration. "}}}}, "settings": {"compilationTarget": {"contracts/TokenTranchePricing.sol": "TokenTranchePricing"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/Crowdsale.sol": {"keccak256": "0x2697c26528f64bb954a7c2547d3b43317d2d2b02c7d9d05a7b1ab388cd79f65d", "urls": ["bzzr://f28b280794222114141c51dd5c388d403a7c98d8b51e04170a0e294246d5164b"]}, "contracts/CrowdsaleBase.sol": {"keccak256": "0xe2c9ed11183ce705616980df7b02544d72fe18b40395da7d9d4bcb621fb87871", "urls": ["bzzr://07f3887ba0d0eb3248b1ad3581480ed71a2fe70a47dcc283c4e97c8c92e0790a"]}, "contracts/FinalizeAgent.sol": {"keccak256": "0x309fd0510e0b3e2b5044e33f7c80cfb2d6f2a5697e41a5f185931d65770cfea9", "urls": ["bzzr://4e7ed6f82c0f542e92e56c12566b2ecd7666730865bf12566c27587ec64160ac"]}, "contracts/FractionalERC20.sol": {"keccak256": "0x75bc4ad90a8b13ce961c89b1bf405776f616e019d3a2720168f8e52be223198f", "urls": ["bzzr://6a3688f12da1a5c890ef06f80f883f6c5370886092d38a1b33cd4219b718478b"]}, "contracts/Haltable.sol": {"keccak256": "0x265dcf25e7c9ab4b6eecd2181f1b71334a1b5381a60f8db7d9526dab120f4b70", "urls": ["bzzr://d522e00fa9e075941469dd81738b59fdb99ce3c12cdc39e33abe40b588c4da9b"]}, "contracts/PricingStrategy.sol": {"keccak256": "0x8df5093b7d07168ad994f9176de0bd2268f6563b1e8a3a448d8cfe7fe246c628", "urls": ["bzzr://ef5c944d51f739ab34e2c951d6ac82a7152e6bb844058a8e57bae52c14cbe16b"]}, "contracts/SafeMathLib.sol": {"keccak256": "0x501bfe31e274b9a5591f7c540bdced4d4312e27d4f19599147c9bbca3d9c6b18", "urls": ["bzzr://a80935ebddb06c247d71372d4e5833ee029f08633bd0fe4a274a57009567e5b9"]}, "contracts/TokenTranchePricing.sol": {"keccak256": "0xb141f1583a49d484cd165b59f69688b404ede1abf0c7eb75f773fff78a0b22ff", "urls": ["bzzr://44a8680817476a5c8fdf69f959f37bee0e9c66bb94ba5f4d344872e5ce22bfe1"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}}, "version": 1}, "name": "TokenTranchePricing", "ordered_full_dependencies": ["SafeMathLib"], "source_path": "contracts/TokenTranchePricing.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Interface for defining crowdsale pricing.\n */\ncontract PricingStrategy {\n\n /** Interface declaration. */\n function isPricingStrategy() public constant returns (bool) {\n return true;\n }\n\n /** Self check if all references are correctly set.\n *\n * Checks that pricing strategy matches crowdsale parameters.\n */\n function isSane(address crowdsale) public constant returns (bool) {\n return true;\n }\n\n /**\n * @dev Pricing tells if this is a presale purchase or not.\n @param purchaser Address of the purchaser\n @return False by default, true if a presale purchaser\n */\n function isPresalePurchase(address purchaser) public constant returns (bool) {\n return false;\n }\n\n /**\n * When somebody tries to buy tokens for X eth, calculate how many tokens they get.\n *\n *\n * @param value - What is the value of the transaction send in as wei\n * @param tokensSold - how much tokens have been sold this far\n * @param weiRaised - how much money has been raised this far in the main token sale - this number excludes presale\n * @param msgSender - who is the investor of this transaction\n * @param decimals - how many decimal units the token has\n * @return Amount of tokens the investor receives\n */\n function calculatePrice(uint value, uint weiRaised, uint tokensSold, address msgSender, uint decimals) public constant returns (uint tokenAmount);\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Safe unsigned safe math.\n *\n * https://blog.aragon.one/library-driven-development-in-solidity-2bebcaf88736#.750gwtwli\n *\n * Originally from https://raw.githubusercontent.com/AragonOne/zeppelin-solidity/master/contracts/SafeMathLib.sol\n *\n * Maintained here until merged to mainline zeppelin-solidity.\n *\n */\nlibrary SafeMathLib {\n\n function times(uint a, uint b) returns (uint) {\n uint c = a * b;\n assert(a == 0 || c / a == b);\n return c;\n }\n\n function minus(uint a, uint b) returns (uint) {\n assert(b <= a);\n return a - b;\n }\n\n function plus(uint a, uint b) returns (uint) {\n uint c = a + b;\n assert(c>=a);\n return c;\n }\n\n}\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Finalize agent defines what happens at the end of succeseful crowdsale.\n *\n * - Allocate tokens for founders, bounties and community\n * - Make tokens transferable\n * - etc.\n */\ncontract FinalizeAgent {\n\n function isFinalizeAgent() public constant returns(bool) {\n return true;\n }\n\n /** Return true if we can run finalizeCrowdsale() properly.\n *\n * This is a safety check function that doesn't allow crowdsale to begin\n * unless the finalizer has been set up properly.\n */\n function isSane() public constant returns (bool);\n\n /** Called once by crowdsale finalize() if the sale was success. */\n function finalizeCrowdsale();\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n\n/**\n * A token that defines fractional units as decimals.\n */\ncontract FractionalERC20 is ERC20 {\n\n uint public decimals;\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n/*\n * Haltable\n *\n * Abstract contract that allows children to implement an\n * emergency stop mechanism. Differs from Pausable by causing a throw when in halt mode.\n *\n *\n * Originally envisioned in FirstBlood ICO contract.\n */\ncontract Haltable is Ownable {\n bool public halted;\n\n modifier stopInEmergency {\n if (halted) throw;\n _;\n }\n\n modifier stopNonOwnersInEmergency {\n if (halted && msg.sender != owner) throw;\n _;\n }\n\n modifier onlyInEmergency {\n if (!halted) throw;\n _;\n }\n\n // called by the owner on emergency, triggers stopped state\n function halt() external onlyOwner {\n halted = true;\n }\n\n // called by the owner on end of emergency, returns to normal state\n function unhalt() external onlyOwner onlyInEmergency {\n halted = false;\n }\n\n}\n\n\n\n\n\n\n\n/**\n * Crowdsale state machine without buy functionality.\n *\n * Implements basic state machine logic, but leaves out all buy functions,\n * so that subclasses can implement their own buying logic.\n *\n *\n * For the default buy() implementation see Crowdsale.sol.\n */\ncontract CrowdsaleBase is Haltable {\n\n /* Max investment count when we are still allowed to change the multisig address */\n uint public MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE = 5;\n\n using SafeMathLib for uint;\n\n /* The token we are selling */\n FractionalERC20 public token;\n\n /* How we are going to price our offering */\n PricingStrategy public pricingStrategy;\n\n /* Post-success callback */\n FinalizeAgent public finalizeAgent;\n\n /* tokens will be transfered from this address */\n address public multisigWallet;\n\n /* if the funding goal is not reached, investors may withdraw their funds */\n uint public minimumFundingGoal;\n\n /* the UNIX timestamp start date of the crowdsale */\n uint public startsAt;\n\n /* the UNIX timestamp end date of the crowdsale */\n uint public endsAt;\n\n /* the number of tokens already sold through this contract*/\n uint public tokensSold = 0;\n\n /* How many wei of funding we have raised */\n uint public weiRaised = 0;\n\n /* Calculate incoming funds from presale contracts and addresses */\n uint public presaleWeiRaised = 0;\n\n /* How many distinct addresses have invested */\n uint public investorCount = 0;\n\n /* How much wei we have returned back to the contract after a failed crowdfund. */\n uint public loadedRefund = 0;\n\n /* How much wei we have given back to investors.*/\n uint public weiRefunded = 0;\n\n /* Has this crowdsale been finalized */\n bool public finalized;\n\n /** How much ETH each address has invested to this crowdsale */\n mapping (address => uint256) public investedAmountOf;\n\n /** How much tokens this crowdsale has credited for each investor address */\n mapping (address => uint256) public tokenAmountOf;\n\n /** Addresses that are allowed to invest even before ICO offical opens. For testing, for ICO partners, etc. */\n mapping (address => bool) public earlyParticipantWhitelist;\n\n /** This is for manul testing for the interaction from owner wallet. You can set it to any value and inspect this in blockchain explorer to see that crowdsale interaction works. */\n uint public ownerTestValue;\n\n /** State machine\n *\n * - Preparing: All contract initialization calls and variables have not been set yet\n * - Prefunding: We have not passed start time yet\n * - Funding: Active crowdsale\n * - Success: Minimum funding goal reached\n * - Failure: Minimum funding goal not reached before ending time\n * - Finalized: The finalized has been called and succesfully executed\n * - Refunding: Refunds are loaded on the contract for reclaim.\n */\n enum State{Unknown, Preparing, PreFunding, Funding, Success, Failure, Finalized, Refunding}\n\n // A new investment was made\n event Invested(address investor, uint weiAmount, uint tokenAmount, uint128 customerId);\n\n // Refund was processed for a contributor\n event Refund(address investor, uint weiAmount);\n\n // The rules were changed what kind of investments we accept\n event InvestmentPolicyChanged(bool newRequireCustomerId, bool newRequiredSignedAddress, address newSignerAddress);\n\n // Address early participation whitelist status changed\n event Whitelisted(address addr, bool status);\n\n // Crowdsale end time has been changed\n event EndsAtChanged(uint newEndsAt);\n\n function CrowdsaleBase(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal) {\n\n owner = msg.sender;\n\n token = FractionalERC20(_token);\n setPricingStrategy(_pricingStrategy);\n\n multisigWallet = _multisigWallet;\n if(multisigWallet == 0) {\n throw;\n }\n\n if(_start == 0) {\n throw;\n }\n\n startsAt = _start;\n\n if(_end == 0) {\n throw;\n }\n\n endsAt = _end;\n\n // Don't mess the dates\n if(startsAt >= endsAt) {\n throw;\n }\n\n // Minimum funding goal can be zero\n minimumFundingGoal = _minimumFundingGoal;\n }\n\n /**\n * Don't expect to just send in money and get tokens.\n */\n function() payable {\n throw;\n }\n\n /**\n * @dev Make an investment.\n *\n * Crowdsale must be running for one to invest.\n * We must have not pressed the emergency brake.\n *\n * @param receiver The Ethereum address who receives the tokens\n * @param customerId (optional) UUID v4 to track the successful payments on the server side'\n * @param tokenAmount Amount of tokens which be credited to receiver\n *\n * @return tokensBought How mony tokens were bought\n */\n function buyTokens(address receiver, uint128 customerId, uint256 tokenAmount) stopInEmergency internal returns(uint tokensBought) {\n\n // Determine if it's a good time to accept investment from this participant\n if(getState() == State.PreFunding) {\n // Are we whitelisted for early deposit\n if(!earlyParticipantWhitelist[receiver]) {\n throw;\n }\n } else if(getState() == State.Funding) {\n // Retail participants can only come in when the crowdsale is running\n // pass\n } else {\n // Unwanted state\n throw;\n }\n\n uint weiAmount = msg.value;\n\n // Dust transaction\n require(tokenAmount != 0);\n\n if(investedAmountOf[receiver] == 0) {\n // A new investor\n investorCount++;\n }\n\n // Update investor\n investedAmountOf[receiver] = investedAmountOf[receiver].plus(weiAmount);\n tokenAmountOf[receiver] = tokenAmountOf[receiver].plus(tokenAmount);\n\n // Update totals\n weiRaised = weiRaised.plus(weiAmount);\n tokensSold = tokensSold.plus(tokenAmount);\n\n if(pricingStrategy.isPresalePurchase(receiver)) {\n presaleWeiRaised = presaleWeiRaised.plus(weiAmount);\n }\n\n // Check that we did not bust the cap\n require(!isBreakingCap(weiAmount, tokenAmount, weiRaised, tokensSold));\n\n assignTokens(receiver, tokenAmount);\n\n // Pocket the money, or fail the crowdsale if we for some reason cannot send the money to our multisig\n if(!multisigWallet.send(weiAmount)) throw;\n\n // Tell us invest was success\n Invested(receiver, weiAmount, tokenAmount, customerId);\n\n return tokenAmount;\n }\n\n /**\n * @dev Make an investment based on pricing strategy\n *\n * This is a wrapper for buyTokens(), but the amount of tokens receiver will\n * have depends on the pricing strategy used.\n *\n * @param receiver The Ethereum address who receives the tokens\n * @param customerId (optional) UUID v4 to track the successful payments on the server side'\n *\n * @return tokensBought How mony tokens were bought\n */\n function investInternal(address receiver, uint128 customerId) stopInEmergency internal returns(uint tokensBought) {\n return buyTokens(receiver, customerId, pricingStrategy.calculatePrice(msg.value, weiRaised - presaleWeiRaised, tokensSold, msg.sender, token.decimals()));\n }\n\n /**\n * @dev Calculate tokens user will have for their purchase\n *\n * @param weisTotal How much ethers (in wei) the user putssssss in\n * @param pricePerToken What is the price for one token\n *\n * @return tokensTotal which is received tokens, token decimals included\n */\n function calculateTokens(uint256 weisTotal, uint256 pricePerToken) public constant returns(uint tokensTotal) {\n // pricePerToken is how many full tokens, token decimal place included, you get for wei amount.\n // Because, in theory, decimal amount can vary, we do the exponent calculation here,\n // though gas wise using 10**18 constant would be much simpler.\n // Furthermore we could use rough amounts and take in raw wei per tokens amount,\n // but we lose too much accuracy for generic calculations, thus all these are\n // practically implemented as 10**18 fixed points.\n uint multiplier = 10 ** token.decimals();\n return weisTotal.times(multiplier)/pricePerToken;\n }\n\n /**\n * Finalize a succcesful crowdsale.\n *\n * The owner can triggre a call the contract that provides post-crowdsale actions, like releasing the tokens.\n */\n function finalize() public inState(State.Success) onlyOwner stopInEmergency {\n\n // Already finalized\n if(finalized) {\n throw;\n }\n\n // Finalizing is optional. We only call it if we are given a finalizing agent.\n if(address(finalizeAgent) != 0) {\n finalizeAgent.finalizeCrowdsale();\n }\n\n finalized = true;\n }\n\n /**\n * Allow to (re)set finalize agent.\n *\n * Design choice: no state restrictions on setting this, so that we can fix fat finger mistakes.\n */\n function setFinalizeAgent(FinalizeAgent addr) onlyOwner {\n finalizeAgent = addr;\n\n // Don't allow setting bad agent\n if(!finalizeAgent.isFinalizeAgent()) {\n throw;\n }\n }\n\n /**\n * Allow crowdsale owner to close early or extend the crowdsale.\n *\n * This is useful e.g. for a manual soft cap implementation:\n * - after X amount is reached determine manual closing\n *\n * This may put the crowdsale to an invalid state,\n * but we trust owners know what they are doing.\n *\n */\n function setEndsAt(uint time) onlyOwner {\n\n if(now > time) {\n throw; // Don't change past\n }\n\n if(startsAt > time) {\n throw; // Prevent human mistakes\n }\n\n endsAt = time;\n EndsAtChanged(endsAt);\n }\n\n /**\n * Allow to (re)set pricing strategy.\n *\n * Design choice: no state restrictions on the set, so that we can fix fat finger mistakes.\n */\n function setPricingStrategy(PricingStrategy _pricingStrategy) onlyOwner {\n pricingStrategy = _pricingStrategy;\n\n // Don't allow setting bad agent\n if(!pricingStrategy.isPricingStrategy()) {\n throw;\n }\n }\n\n /**\n * Allow to change the team multisig address in the case of emergency.\n *\n * This allows to save a deployed crowdsale wallet in the case the crowdsale has not yet begun\n * (we have done only few test transactions). After the crowdsale is going\n * then multisig address stays locked for the safety reasons.\n */\n function setMultisig(address addr) public onlyOwner {\n\n // Change\n if(investorCount > MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE) {\n throw;\n }\n\n multisigWallet = addr;\n }\n\n /**\n * Allow load refunds back on the contract for the refunding.\n *\n * The team can transfer the funds back on the smart contract in the case the minimum goal was not reached..\n */\n function loadRefund() public payable inState(State.Failure) {\n if(msg.value == 0) throw;\n loadedRefund = loadedRefund.plus(msg.value);\n }\n\n /**\n * Investors can claim refund.\n *\n * Note that any refunds from proxy buyers should be handled separately,\n * and not through this contract.\n */\n function refund() public inState(State.Refunding) {\n uint256 weiValue = investedAmountOf[msg.sender];\n if (weiValue == 0) throw;\n investedAmountOf[msg.sender] = 0;\n weiRefunded = weiRefunded.plus(weiValue);\n Refund(msg.sender, weiValue);\n if (!msg.sender.send(weiValue)) throw;\n }\n\n /**\n * @return true if the crowdsale has raised enough money to be a successful.\n */\n function isMinimumGoalReached() public constant returns (bool reached) {\n return weiRaised >= minimumFundingGoal;\n }\n\n /**\n * Check if the contract relationship looks good.\n */\n function isFinalizerSane() public constant returns (bool sane) {\n return finalizeAgent.isSane();\n }\n\n /**\n * Check if the contract relationship looks good.\n */\n function isPricingSane() public constant returns (bool sane) {\n return pricingStrategy.isSane(address(this));\n }\n\n /**\n * Crowdfund state machine management.\n *\n * We make it a function and do not assign the result to a variable, so there is no chance of the variable being stale.\n */\n function getState() public constant returns (State) {\n if(finalized) return State.Finalized;\n else if (address(finalizeAgent) == 0) return State.Preparing;\n else if (!finalizeAgent.isSane()) return State.Preparing;\n else if (!pricingStrategy.isSane(address(this))) return State.Preparing;\n else if (block.timestamp < startsAt) return State.PreFunding;\n else if (block.timestamp <= endsAt && !isCrowdsaleFull()) return State.Funding;\n else if (isMinimumGoalReached()) return State.Success;\n else if (!isMinimumGoalReached() && weiRaised > 0 && loadedRefund >= weiRaised) return State.Refunding;\n else return State.Failure;\n }\n\n /** This is for manual testing of multisig wallet interaction */\n function setOwnerTestValue(uint val) onlyOwner {\n ownerTestValue = val;\n }\n\n /**\n * Allow addresses to do early participation.\n *\n * TODO: Fix spelling error in the name\n */\n function setEarlyParicipantWhitelist(address addr, bool status) onlyOwner {\n earlyParticipantWhitelist[addr] = status;\n Whitelisted(addr, status);\n }\n\n\n /** Interface marker. */\n function isCrowdsale() public constant returns (bool) {\n return true;\n }\n\n //\n // Modifiers\n //\n\n /** Modified allowing execution only if the crowdsale is currently running. */\n modifier inState(State state) {\n if(getState() != state) throw;\n _;\n }\n\n\n //\n // Abstract functions\n //\n\n /**\n * Check if the current invested breaks our cap rules.\n *\n *\n * The child contract must define their own cap setting rules.\n * We allow a lot of flexibility through different capping strategies (ETH, token count)\n * Called from invest().\n *\n * @param weiAmount The amount of wei the investor tries to invest in the current transaction\n * @param tokenAmount The amount of tokens we try to give to the investor in the current transaction\n * @param weiRaisedTotal What would be our total raised balance after this transaction\n * @param tokensSoldTotal What would be our total sold tokens count after this transaction\n *\n * @return true if taking this investment would break our cap rules\n */\n function isBreakingCap(uint weiAmount, uint tokenAmount, uint weiRaisedTotal, uint tokensSoldTotal) constant returns (bool limitBroken);\n\n /**\n * Check if the current crowdsale is full and we can no longer sell any tokens.\n */\n function isCrowdsaleFull() public constant returns (bool);\n\n /**\n * Create new tokens or transfer issued tokens to the investor depending on the cap model.\n */\n function assignTokens(address receiver, uint tokenAmount) internal;\n}\n\n\n\n/**\n * Abstract base contract for token sales with the default buy entry points.\n *\n * Handle\n * - start and end dates\n * - accepting investments\n * - minimum funding goal and refund\n * - various statistics during the crowdfund\n * - different pricing strategies\n * - different investment policies (require server side customer id, allow only whitelisted addresses)\n *\n * Does not Handle\n *\n * - Token allocation (minting vs. transfer)\n * - Cap rules\n *\n */\ncontract Crowdsale is CrowdsaleBase {\n\n /* Do we need to have unique contributor id for each customer */\n bool public requireCustomerId;\n\n /**\n * Do we verify that contributor has been cleared on the server side (accredited investors only).\n * This method was first used in FirstBlood crowdsale to ensure all contributors have accepted terms on sale (on the web).\n */\n bool public requiredSignedAddress;\n\n /* Server side address that signed allowed contributors (Ethereum addresses) that can participate the crowdsale */\n address public signerAddress;\n\n function Crowdsale(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal) CrowdsaleBase(_token, _pricingStrategy, _multisigWallet, _start, _end, _minimumFundingGoal) {\n }\n\n /**\n * Preallocate tokens for the early investors.\n *\n * Preallocated tokens have been sold before the actual crowdsale opens.\n * This function mints the tokens and moves the crowdsale needle.\n *\n * Investor count is not handled; it is assumed this goes for multiple investors\n * and the token distribution happens outside the smart contract flow.\n *\n * No money is exchanged, as the crowdsale team already have received the payment.\n *\n * @param fullTokens tokens as full tokens - decimal places added internally\n * @param weiPrice Price of a single full token in wei\n *\n */\n function preallocate(address receiver, uint fullTokens, uint weiPrice) public onlyOwner {\n\n uint tokenAmount = fullTokens * 10**token.decimals();\n uint weiAmount = weiPrice * fullTokens; // This can be also 0, we give out tokens for free\n\n weiRaised = weiRaised.plus(weiAmount);\n tokensSold = tokensSold.plus(tokenAmount);\n\n investedAmountOf[receiver] = investedAmountOf[receiver].plus(weiAmount);\n tokenAmountOf[receiver] = tokenAmountOf[receiver].plus(tokenAmount);\n\n assignTokens(receiver, tokenAmount);\n\n // Tell us invest was success\n Invested(receiver, weiAmount, tokenAmount, 0);\n }\n\n /**\n * Allow anonymous contributions to this crowdsale.\n */\n function investWithSignedAddress(address addr, uint128 customerId, uint8 v, bytes32 r, bytes32 s) public payable {\n bytes32 hash = sha256(addr);\n if (ecrecover(hash, v, r, s) != signerAddress) throw;\n if(customerId == 0) throw; // UUIDv4 sanity check\n investInternal(addr, customerId);\n }\n\n /**\n * Track who is the customer making the payment so we can send thank you email.\n */\n function investWithCustomerId(address addr, uint128 customerId) public payable {\n if(requiredSignedAddress) throw; // Crowdsale allows only server-side signed participants\n if(customerId == 0) throw; // UUIDv4 sanity check\n investInternal(addr, customerId);\n }\n\n /**\n * Allow anonymous contributions to this crowdsale.\n */\n function invest(address addr) public payable {\n if(requireCustomerId) throw; // Crowdsale needs to track participants for thank you email\n if(requiredSignedAddress) throw; // Crowdsale allows only server-side signed participants\n investInternal(addr, 0);\n }\n\n /**\n * Invest to tokens, recognize the payer and clear his address.\n *\n */\n function buyWithSignedAddress(uint128 customerId, uint8 v, bytes32 r, bytes32 s) public payable {\n investWithSignedAddress(msg.sender, customerId, v, r, s);\n }\n\n /**\n * Invest to tokens, recognize the payer.\n *\n */\n function buyWithCustomerIdWithChecksum(uint128 customerId, bytes1 checksum) public payable {\n // see customerid.py\n if (bytes1(sha3(customerId)) != checksum) throw;\n investWithCustomerId(msg.sender, customerId);\n }\n\n /**\n * Legacy API signature.\n */\n function buyWithCustomerId(uint128 customerId) public payable {\n investWithCustomerId(msg.sender, customerId);\n }\n\n /**\n * The basic entry point to participate the crowdsale process.\n *\n * Pay for funding, get invested tokens back in the sender address.\n */\n function buy() public payable {\n invest(msg.sender);\n }\n\n /**\n * Set policy do we need to have server-side customer ids for the investments.\n *\n */\n function setRequireCustomerId(bool value) onlyOwner {\n requireCustomerId = value;\n InvestmentPolicyChanged(requireCustomerId, requiredSignedAddress, signerAddress);\n }\n\n /**\n * Set policy if all investors must be cleared on the server side first.\n *\n * This is e.g. for the accredited investor clearing.\n *\n */\n function setRequireSignedAddress(bool value, address _signerAddress) onlyOwner {\n requiredSignedAddress = value;\n signerAddress = _signerAddress;\n InvestmentPolicyChanged(requireCustomerId, requiredSignedAddress, signerAddress);\n }\n\n}\n\n\n\n\n/// @dev Tranche based pricing with special support for pre-ico deals.\n/// Implementing \"first price\" tranches, meaning, that if buyers order is\n/// covering more than one tranche, the price of the lowest tranche will apply\n/// to the whole order.\ncontract TokenTranchePricing is PricingStrategy, Ownable {\n\n using SafeMathLib for uint;\n\n uint public constant MAX_TRANCHES = 10;\n\n // This contains all pre-ICO addresses, and their prices (weis per token)\n mapping (address => uint) public preicoAddresses;\n\n /**\n * Define pricing schedule using tranches.\n */\n struct Tranche {\n\n // Amount in weis when this tranche becomes active\n uint amount;\n\n // How many tokens per satoshi you will get while this tranche is active\n uint price;\n }\n\n // Store tranches in a fixed array, so that it can be seen in a blockchain explorer\n // Tranche 0 is always (0, 0)\n // (TODO: change this when we confirm dynamic arrays are explorable)\n Tranche[10] public tranches;\n\n // How many active tranches we have\n uint public trancheCount;\n\n /// @dev Contruction, creating a list of tranches\n /// @param _tranches uint[] tranches Pairs of (start amount, price)\n function TokenTranchePricing(uint[] _tranches) {\n // Need to have tuples, length check\n if(_tranches.length % 2 == 1 || _tranches.length >= MAX_TRANCHES*2) {\n throw;\n }\n\n trancheCount = _tranches.length / 2;\n\n uint highestAmount = 0;\n\n for(uint i=0; i<_tranches.length/2; i++) {\n tranches[i].amount = _tranches[i*2];\n tranches[i].price = _tranches[i*2+1];\n\n // No invalid steps\n if((highestAmount != 0) && (tranches[i].amount <= highestAmount)) {\n throw;\n }\n\n highestAmount = tranches[i].amount;\n }\n\n // Last tranche price must be zero, terminating the crowdale\n if(tranches[trancheCount-1].price != 0) {\n throw;\n }\n }\n\n /// @dev This is invoked once for every pre-ICO address, set pricePerToken\n /// to 0 to disable\n /// @param preicoAddress PresaleFundCollector address\n /// @param pricePerToken How many weis one token cost for pre-ico investors\n function setPreicoAddress(address preicoAddress, uint pricePerToken)\n public\n onlyOwner\n {\n preicoAddresses[preicoAddress] = pricePerToken;\n }\n\n /// @dev Iterate through tranches. You reach end of tranches when price = 0\n /// @return tuple (time, price)\n function getTranche(uint n) public constant returns (uint, uint) {\n return (tranches[n].amount, tranches[n].price);\n }\n\n function getFirstTranche() private constant returns (Tranche) {\n return tranches[0];\n }\n\n function getLastTranche() private constant returns (Tranche) {\n return tranches[trancheCount-1];\n }\n\n function getPricingStartsAt() public constant returns (uint) {\n return getFirstTranche().amount;\n }\n\n function getPricingEndsAt() public constant returns (uint) {\n return getLastTranche().amount;\n }\n\n function isSane(address _crowdsale) public constant returns(bool) {\n // Our tranches are not bound by time, so we can't really check are we sane\n // so we presume we are ;)\n // In the future we could save and track raised tokens, and compare it to\n // the Crowdsale contract.\n return true;\n }\n\n /// @dev Get the current tranche or bail out if we are not in the tranche periods.\n /// @param tokensSold total amount of tokens sold, for calculating the current tranche\n /// @return {[type]} [description]\n function getCurrentTranche(uint tokensSold) private constant returns (Tranche) {\n uint i;\n\n for(i=0; i < tranches.length; i++) {\n if(tokensSold < tranches[i].amount) {\n return tranches[i-1];\n }\n }\n }\n\n /// @dev Get the current price.\n /// @param tokensSold total amount of tokens sold, for calculating the current tranche\n /// @return The current price or 0 if we are outside trache ranges\n function getCurrentPrice(uint tokensSold) public constant returns (uint result) {\n return getCurrentTranche(tokensSold).price;\n }\n\n /// @dev Calculate the current price for buy in amount.\n function calculatePrice(uint value, uint weiRaised, uint tokensSold, address msgSender, uint decimals) public constant returns (uint) {\n\n uint multiplier = 10 ** decimals;\n\n // This investor is coming through pre-ico\n if(preicoAddresses[msgSender] > 0) {\n return value.times(multiplier) / preicoAddresses[msgSender];\n }\n\n uint price = getCurrentPrice(tokensSold);\n return value.times(multiplier) / price;\n }\n\n function() payable {\n throw; // No money on this contract\n }\n\n}\n"}, "TokenVault": {"abi": [{"constant": true, "inputs": [], "name": "tokensAllocatedTotal", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getBalance", "outputs": [{"name": "howManyTokensCurrentlyInVault", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "recoverTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "getState", "outputs": [{"name": "", "type": "uint8"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "lastClaimedAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "balances", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "tokensPerSecond", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "claim", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "freezeEndsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "tokensToBeAllocated", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "lockedAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "investor", "type": "address"}], "name": "getMaxClaimByNow", "outputs": [{"name": "claimableAmount", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "tokenToClaim", "type": "address"}], "name": "tokensToBeReturned", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "investor", "type": "address"}], "name": "getCurrentlyClaimableAmount", "outputs": [{"name": "claimableAmount", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "claimed", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "totalClaimed", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "investorCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "investor", "type": "address"}, {"name": "amount", "type": "uint256"}, {"name": "_tokensPerSecond", "type": "uint256"}], "name": "setInvestor", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "lock", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "recoverFailedLock", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "token", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [{"name": "_owner", "type": "address"}, {"name": "_freezeEndsAt", "type": "uint256"}, {"name": "_token", "type": "address"}, {"name": "_tokensToBeAllocated", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Allocated", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investors", "type": "address"}, {"indexed": false, "name": "count", "type": "uint256"}], "name": "Distributed", "type": "event"}, {"anonymous": false, "inputs": [], "name": "Locked", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "bytecode": "0x608060405234801561001057600080fd5b506040516080806110ca83398101604090815281516020830151918301516060909301516000805433600160a060020a03199182161716600160a060020a03808516919091179182905592949216151561006957600080fd5b600b8054600160a060020a031916600160a060020a038481169190911791829055604080517feefa597b0000000000000000000000000000000000000000000000000000000081529051929091169163eefa597b916004808201926020929091908290030181600087803b1580156100e057600080fd5b505af11580156100f4573d6000803e3d6000fd5b505050506040513d602081101561010a57600080fd5b5051151561011757600080fd5b82151561012357600080fd5b80151561012f57600080fd5b428310156101405742600855610146565b60088390555b600255505050610f6f8061015b6000396000f3006080604052600436106101325763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166311e48cdf811461013757806312065fe01461015e57806316114acd146101735780631865c57d1461019657806326a40c99146101cf57806327e235e3146101f05780633b659474146102115780634e71d92d146102325780636962b010146102475780638da5cb5b1461025c578063990ca3ff1461028d578063b2163482146102a2578063b784892c146102b7578063c45d19db146102d8578063c828e6ee146102f9578063c884ef831461031a578063d54ad2a11461033b578063d7e64c0014610350578063dfdfeb2014610365578063f2fde38b1461038c578063f83d08ba146103ad578063f85b2160146103c2578063fc0c546a146103d7575b600080fd5b34801561014357600080fd5b5061014c6103ec565b60408051918252519081900360200190f35b34801561016a57600080fd5b5061014c6103f2565b34801561017f57600080fd5b50610194600160a060020a0360043516610489565b005b3480156101a257600080fd5b506101ab610559565b604051808260038111156101bb57fe5b60ff16815260200191505060405180910390f35b3480156101db57600080fd5b5061014c600160a060020a0360043516610588565b3480156101fc57600080fd5b5061014c600160a060020a036004351661059a565b34801561021d57600080fd5b5061014c600160a060020a03600435166105ac565b34801561023e57600080fd5b506101946105be565b34801561025357600080fd5b5061014c610723565b34801561026857600080fd5b50610271610729565b60408051600160a060020a039092168252519081900360200190f35b34801561029957600080fd5b5061014c610738565b3480156102ae57600080fd5b5061014c61073e565b3480156102c357600080fd5b5061014c600160a060020a0360043516610744565b3480156102e457600080fd5b5061014c600160a060020a03600435166108ea565b34801561030557600080fd5b5061014c600160a060020a0360043516610a2e565b34801561032657600080fd5b5061014c600160a060020a0360043516610b53565b34801561034757600080fd5b5061014c610b65565b34801561035c57600080fd5b5061014c610b6b565b34801561037157600080fd5b50610194600160a060020a0360043516602435604435610b71565b34801561039857600080fd5b50610194600160a060020a0360043516610c3c565b3480156103b957600080fd5b50610194610cd0565b3480156103ce57600080fd5b50610194610dd9565b3480156103e357600080fd5b50610271610f34565b60045481565b600b54604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600092600160a060020a0316916370a0823191602480830192602092919082900301818787803b15801561045757600080fd5b505af115801561046b573d6000803e3d6000fd5b505050506040513d602081101561048157600080fd5b505190505b90565b600054600160a060020a031633146104a057600080fd5b600054600160a060020a038083169163a9059cbb91166104bf846108ea565b6040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b15801561052a57600080fd5b505af115801561053e573d6000803e3d6000fd5b505050506040513d602081101561055457600080fd5b505050565b60006009546000141561056e57506001610486565b60085442111561058057506003610486565b506002610486565b60076020526000908152604090205481565b60056020526000908152604090205481565b600a6020526000908152604090205481565b600954339060009015156105d157600080fd5b6008544210156105e057600080fd5b600160a060020a038216600090815260056020526040902054151561060457600080fd5b61060d82610a2e565b90506000811161061c57600080fd5b600160a060020a038083166000818152600760209081526040808320429055600682528083208054870190556003805487019055600b5481517fa9059cbb000000000000000000000000000000000000000000000000000000008152600481019590955260248501879052905194169363a9059cbb93604480820194918390030190829087803b1580156106af57600080fd5b505af11580156106c3573d6000803e3d6000fd5b505050506040513d60208110156106d957600080fd5b505060408051600160a060020a03841681526020810183905281517fb649c98f58055c520df0dcb5709eff2e931217ff2fb1e21376130d31bbb1c0af929181900390910190a15050565b60085481565b600054600160a060020a031681565b60025481565b60095481565b60008060008060085442101561075d57600093506108e2565b600160a060020a03851660009081526007602052604090205492508215156107855760085492505b604080517ff4f3bdc100000000000000000000000000000000000000000000000000000000815242600482015260248101859052905173__contracts/SafeMathLib.sol:SafeMathLi__9163f4f3bdc1916044808301926020929190829003018186803b1580156107f657600080fd5b505af415801561080a573d6000803e3d6000fd5b505050506040513d602081101561082057600080fd5b5051600160a060020a0386166000908152600a60209081526040918290205482517f1d3b9edf000000000000000000000000000000000000000000000000000000008152600481018590526024810191909152915192945073__contracts/SafeMathLib.sol:SafeMathLi__92631d3b9edf926044808201939291829003018186803b1580156108b057600080fd5b505af41580156108c4573d6000803e3d6000fd5b505050506040513d60208110156108da57600080fd5b505193508390505b505050919050565b600b54600090600160a060020a03838116911614156109b45761090b6103f2565b73__contracts/SafeMathLib.sol:SafeMathLi__63f4f3bdc190916004546040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b15801561098157600080fd5b505af4158015610995573d6000803e3d6000fd5b505050506040513d60208110156109ab57600080fd5b50519050610a29565b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600160a060020a038416916370a082319160248083019260209291908290030181600087803b158015610a1557600080fd5b505af1158015610995573d6000803e3d6000fd5b919050565b600160a060020a038116600090815260056020908152604080832054600683528184205482517ff4f3bdc10000000000000000000000000000000000000000000000000000000081526004810192909252602482015290518392839273__contracts/SafeMathLib.sol:SafeMathLi__9263f4f3bdc192604480840193919291829003018186803b158015610ac357600080fd5b505af4158015610ad7573d6000803e3d6000fd5b505050506040513d6020811015610aed57600080fd5b5051600854909250421015610b055760009250610b4c565b610b0e84610744565b600160a060020a0385166000908152600a60205260408120549192501015610b485781811115610b4057819250610b4c565b809250610b4c565b8192505b5050919050565b60066020526000908152604090205481565b60035481565b60015481565b600054600160a060020a03163314610b8857600080fd5b60006009541115610b9857600080fd5b811515610ba457600080fd5b600160a060020a0383166000908152600560205260408120541115610bc857600080fd5b600160a060020a038316600081815260056020908152604080832086905560018054810190556004805487019055600a8252918290208490558151928352820184905280517f472f36e28bb47edb7c69c9e2ac00a77c66b505df54e9c818ac57110b0629e8c39281900390910190a1505050565b600054600160a060020a03163314610c5357600080fd5b600160a060020a0381161515610c6857600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600054600160a060020a03163314610ce757600080fd5b60006009541115610cf757600080fd5b60025460045414610d0757600080fd5b60048054600b54604080517f70a082310000000000000000000000000000000000000000000000000000000081523094810194909452519192600160a060020a03909116916370a08231916024808201926020929091908290030181600087803b158015610d7457600080fd5b505af1158015610d88573d6000803e3d6000fd5b505050506040513d6020811015610d9e57600080fd5b505114610daa57600080fd5b426009556040517f0f2e5b6c72c6a4491efd919a9f9a409f324ef0708c11ee57d410c2cb06c0992b90600090a1565b600054600160a060020a03163314610df057600080fd5b60006009541115610e0057600080fd5b600b5460008054604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600160a060020a039485169463a9059cbb9493169285926370a082319260248083019360209383900390910190829087803b158015610e7457600080fd5b505af1158015610e88573d6000803e3d6000fd5b505050506040513d6020811015610e9e57600080fd5b5051604080517c010000000000000000000000000000000000000000000000000000000063ffffffff8616028152600160a060020a03909316600484015260248301919091525160448083019260209291908290030181600087803b158015610f0657600080fd5b505af1158015610f1a573d6000803e3d6000fd5b505050506040513d6020811015610f3057600080fd5b5050565b600b54600160a060020a0316815600a165627a7a72305820e4d21d541f09322acad026f3847af6a215221498497acd71aa33553b8565fabb0029", "bytecode_runtime": "0x6080604052600436106101325763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166311e48cdf811461013757806312065fe01461015e57806316114acd146101735780631865c57d1461019657806326a40c99146101cf57806327e235e3146101f05780633b659474146102115780634e71d92d146102325780636962b010146102475780638da5cb5b1461025c578063990ca3ff1461028d578063b2163482146102a2578063b784892c146102b7578063c45d19db146102d8578063c828e6ee146102f9578063c884ef831461031a578063d54ad2a11461033b578063d7e64c0014610350578063dfdfeb2014610365578063f2fde38b1461038c578063f83d08ba146103ad578063f85b2160146103c2578063fc0c546a146103d7575b600080fd5b34801561014357600080fd5b5061014c6103ec565b60408051918252519081900360200190f35b34801561016a57600080fd5b5061014c6103f2565b34801561017f57600080fd5b50610194600160a060020a0360043516610489565b005b3480156101a257600080fd5b506101ab610559565b604051808260038111156101bb57fe5b60ff16815260200191505060405180910390f35b3480156101db57600080fd5b5061014c600160a060020a0360043516610588565b3480156101fc57600080fd5b5061014c600160a060020a036004351661059a565b34801561021d57600080fd5b5061014c600160a060020a03600435166105ac565b34801561023e57600080fd5b506101946105be565b34801561025357600080fd5b5061014c610723565b34801561026857600080fd5b50610271610729565b60408051600160a060020a039092168252519081900360200190f35b34801561029957600080fd5b5061014c610738565b3480156102ae57600080fd5b5061014c61073e565b3480156102c357600080fd5b5061014c600160a060020a0360043516610744565b3480156102e457600080fd5b5061014c600160a060020a03600435166108ea565b34801561030557600080fd5b5061014c600160a060020a0360043516610a2e565b34801561032657600080fd5b5061014c600160a060020a0360043516610b53565b34801561034757600080fd5b5061014c610b65565b34801561035c57600080fd5b5061014c610b6b565b34801561037157600080fd5b50610194600160a060020a0360043516602435604435610b71565b34801561039857600080fd5b50610194600160a060020a0360043516610c3c565b3480156103b957600080fd5b50610194610cd0565b3480156103ce57600080fd5b50610194610dd9565b3480156103e357600080fd5b50610271610f34565b60045481565b600b54604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600092600160a060020a0316916370a0823191602480830192602092919082900301818787803b15801561045757600080fd5b505af115801561046b573d6000803e3d6000fd5b505050506040513d602081101561048157600080fd5b505190505b90565b600054600160a060020a031633146104a057600080fd5b600054600160a060020a038083169163a9059cbb91166104bf846108ea565b6040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b15801561052a57600080fd5b505af115801561053e573d6000803e3d6000fd5b505050506040513d602081101561055457600080fd5b505050565b60006009546000141561056e57506001610486565b60085442111561058057506003610486565b506002610486565b60076020526000908152604090205481565b60056020526000908152604090205481565b600a6020526000908152604090205481565b600954339060009015156105d157600080fd5b6008544210156105e057600080fd5b600160a060020a038216600090815260056020526040902054151561060457600080fd5b61060d82610a2e565b90506000811161061c57600080fd5b600160a060020a038083166000818152600760209081526040808320429055600682528083208054870190556003805487019055600b5481517fa9059cbb000000000000000000000000000000000000000000000000000000008152600481019590955260248501879052905194169363a9059cbb93604480820194918390030190829087803b1580156106af57600080fd5b505af11580156106c3573d6000803e3d6000fd5b505050506040513d60208110156106d957600080fd5b505060408051600160a060020a03841681526020810183905281517fb649c98f58055c520df0dcb5709eff2e931217ff2fb1e21376130d31bbb1c0af929181900390910190a15050565b60085481565b600054600160a060020a031681565b60025481565b60095481565b60008060008060085442101561075d57600093506108e2565b600160a060020a03851660009081526007602052604090205492508215156107855760085492505b604080517ff4f3bdc100000000000000000000000000000000000000000000000000000000815242600482015260248101859052905173__contracts/SafeMathLib.sol:SafeMathLi__9163f4f3bdc1916044808301926020929190829003018186803b1580156107f657600080fd5b505af415801561080a573d6000803e3d6000fd5b505050506040513d602081101561082057600080fd5b5051600160a060020a0386166000908152600a60209081526040918290205482517f1d3b9edf000000000000000000000000000000000000000000000000000000008152600481018590526024810191909152915192945073__contracts/SafeMathLib.sol:SafeMathLi__92631d3b9edf926044808201939291829003018186803b1580156108b057600080fd5b505af41580156108c4573d6000803e3d6000fd5b505050506040513d60208110156108da57600080fd5b505193508390505b505050919050565b600b54600090600160a060020a03838116911614156109b45761090b6103f2565b73__contracts/SafeMathLib.sol:SafeMathLi__63f4f3bdc190916004546040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b15801561098157600080fd5b505af4158015610995573d6000803e3d6000fd5b505050506040513d60208110156109ab57600080fd5b50519050610a29565b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600160a060020a038416916370a082319160248083019260209291908290030181600087803b158015610a1557600080fd5b505af1158015610995573d6000803e3d6000fd5b919050565b600160a060020a038116600090815260056020908152604080832054600683528184205482517ff4f3bdc10000000000000000000000000000000000000000000000000000000081526004810192909252602482015290518392839273__contracts/SafeMathLib.sol:SafeMathLi__9263f4f3bdc192604480840193919291829003018186803b158015610ac357600080fd5b505af4158015610ad7573d6000803e3d6000fd5b505050506040513d6020811015610aed57600080fd5b5051600854909250421015610b055760009250610b4c565b610b0e84610744565b600160a060020a0385166000908152600a60205260408120549192501015610b485781811115610b4057819250610b4c565b809250610b4c565b8192505b5050919050565b60066020526000908152604090205481565b60035481565b60015481565b600054600160a060020a03163314610b8857600080fd5b60006009541115610b9857600080fd5b811515610ba457600080fd5b600160a060020a0383166000908152600560205260408120541115610bc857600080fd5b600160a060020a038316600081815260056020908152604080832086905560018054810190556004805487019055600a8252918290208490558151928352820184905280517f472f36e28bb47edb7c69c9e2ac00a77c66b505df54e9c818ac57110b0629e8c39281900390910190a1505050565b600054600160a060020a03163314610c5357600080fd5b600160a060020a0381161515610c6857600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600054600160a060020a03163314610ce757600080fd5b60006009541115610cf757600080fd5b60025460045414610d0757600080fd5b60048054600b54604080517f70a082310000000000000000000000000000000000000000000000000000000081523094810194909452519192600160a060020a03909116916370a08231916024808201926020929091908290030181600087803b158015610d7457600080fd5b505af1158015610d88573d6000803e3d6000fd5b505050506040513d6020811015610d9e57600080fd5b505114610daa57600080fd5b426009556040517f0f2e5b6c72c6a4491efd919a9f9a409f324ef0708c11ee57d410c2cb06c0992b90600090a1565b600054600160a060020a03163314610df057600080fd5b60006009541115610e0057600080fd5b600b5460008054604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600160a060020a039485169463a9059cbb9493169285926370a082319260248083019360209383900390910190829087803b158015610e7457600080fd5b505af1158015610e88573d6000803e3d6000fd5b505050506040513d6020811015610e9e57600080fd5b5051604080517c010000000000000000000000000000000000000000000000000000000063ffffffff8616028152600160a060020a03909316600484015260248301919091525160448083019260209291908290030181600087803b158015610f0657600080fd5b505af1158015610f1a573d6000803e3d6000fd5b505050506040513d6020811015610f3057600080fd5b5050565b600b54600160a060020a0316815600a165627a7a72305820e4d21d541f09322acad026f3847af6a215221498497acd71aa33553b8565fabb0029", "direct_dependencies": ["SafeMathLib"], "full_dependencies": ["SafeMathLib"], "linkrefs": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 4656}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 5034}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 5328}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 6094}], "linkrefs_runtime": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 3962}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 4340}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 4634}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 5400}], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": true, "inputs": [], "name": "tokensAllocatedTotal", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getBalance", "outputs": [{"name": "howManyTokensCurrentlyInVault", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "recoverTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "getState", "outputs": [{"name": "", "type": "uint8"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "lastClaimedAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "balances", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "tokensPerSecond", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "claim", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "freezeEndsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "tokensToBeAllocated", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "lockedAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "investor", "type": "address"}], "name": "getMaxClaimByNow", "outputs": [{"name": "claimableAmount", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "tokenToClaim", "type": "address"}], "name": "tokensToBeReturned", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "investor", "type": "address"}], "name": "getCurrentlyClaimableAmount", "outputs": [{"name": "claimableAmount", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "claimed", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "totalClaimed", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "investorCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "investor", "type": "address"}, {"name": "amount", "type": "uint256"}, {"name": "_tokensPerSecond", "type": "uint256"}], "name": "setInvestor", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "lock", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "recoverFailedLock", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "token", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [{"name": "_owner", "type": "address"}, {"name": "_freezeEndsAt", "type": "uint256"}, {"name": "_token", "type": "address"}, {"name": "_tokensToBeAllocated", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Allocated", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investors", "type": "address"}, {"indexed": false, "name": "count", "type": "uint256"}], "name": "Distributed", "type": "event"}, {"anonymous": false, "inputs": [], "name": "Locked", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "devdoc": {"methods": {"claim()": {"details": "Claim N bought tokens to the investor as the msg sender"}, "getBalance()": {"details": "Get the current balance of tokens in the vault", "return": "uint How many tokens there are currently in vault"}, "getCurrentlyClaimableAmount(address)": {"details": "Check how many tokens \"investor\" can claim, based on the previous claims and tokens left", "params": {"investor": "Address of the investor"}, "return": "uint How many tokens the investor can claim now"}, "getMaxClaimByNow(address)": {"details": "How much the investor could claim based on the current time and his previous claims", "params": {"investor": "Address of the investor"}, "return": "uint How many tokens the investor can claim now"}, "getState()": {"details": "Resolve the contract umambigious state"}, "lock()": {"details": "Lock the vault - All balances have been loaded in correctly - Tokens are transferred on this vault correctly - Checks are in place to prevent creating a vault that is locked with incorrect token balances."}, "recoverFailedLock()": {"details": "In the case locking failed, then allow the owner to reclaim the tokens on the contract."}, "recoverTokens(address)": {"details": "This will be invoked by the owner, when owner wants to rescue tokens", "params": {"token": "Token which will we rescue to the owner from the contract"}}, "setInvestor(address,uint256,uint256)": {"details": "Add a participant to this Vault", "params": {"_tokensPerSecond": "Define the tap: how many tokens we permit the participant to withdraw per second, 0 to disable tap", "amount": "Amount of tokens this participant is entitled to in total", "investor": "Address of the participant who will be added to this vault"}}, "tokensToBeReturned(address)": {"details": "This function is prototyped in Recoverable contract"}, "transferOwnership(address)": {"details": "Allows the current owner to transfer control of the contract to a newOwner.", "params": {"newOwner": "The address to transfer ownership to."}}}}, "userdoc": {"methods": {}}}, "settings": {"compilationTarget": {"contracts/TokenVault.sol": "TokenVault"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/Recoverable.sol": {"keccak256": "0x311a332cdd87df6e00057f5455f4e68b043b5dbe211f6d68bc64e20817515635", "urls": ["bzzr://4fd99bcfb93baed6e7c8d22ee9ecc5c8346a1aa98288e77b01333b2c5d3f582d"]}, "contracts/SafeMathLib.sol": {"keccak256": "0x501bfe31e274b9a5591f7c540bdced4d4312e27d4f19599147c9bbca3d9c6b18", "urls": ["bzzr://a80935ebddb06c247d71372d4e5833ee029f08633bd0fe4a274a57009567e5b9"]}, "contracts/StandardTokenExt.sol": {"keccak256": "0x9ea2d4cec4dccd5639c05e6c23dd027d80b5e5a20abd99b280ab7b2631b5a5fc", "urls": ["bzzr://a52d8fc5a21bd83997aff19128e00dceb251df712207b61223894c8b7f42d5ff"]}, "contracts/TokenVault.sol": {"keccak256": "0xcc1cd0ee9c92665b9909cc0d9d998a4574f74425b5dc2311d5ee42d4673c6506", "urls": ["bzzr://df3e3e132175695259b53fce6e64cc6658b313f00893e8efcaa5cc00ae8b5d54"]}, "zeppelin/contracts/math/SafeMath.sol": {"keccak256": "0x341ba8cb467a3623e819ba1a683ac1d264005186f308505214e5f6bc89446a08", "urls": ["bzzr://59b5652ee4e4a1b5a8f1a8906e14c84af43d636cf5ca0725cc1813aabe4c8c17"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}, "zeppelin/contracts/token/ERC20/BasicToken.sol": {"keccak256": "0x948404468d61ff35ea4194650670408dabd65da7f905a1c16888ab84520bf39e", "urls": ["bzzr://ea75e20f95d7e4e10394fe6bfaa8eee56b4757c2a6f1e8df4180d33afa621935"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}, "zeppelin/contracts/token/ERC20/StandardToken.sol": {"keccak256": "0xd2b344a5259e19ec143074cfa65637a10c40b68395c59808c4af13bccbb2de55", "urls": ["bzzr://d61a01175a7ca1ba9f4403de603c20b897e33ec425aef2d9f8a7f9ddfdfaf5b2"]}}, "version": 1}, "name": "TokenVault", "ordered_full_dependencies": ["SafeMathLib"], "source_path": "contracts/TokenVault.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\ncontract Recoverable is Ownable {\n\n /// @dev Empty constructor (for now)\n function Recoverable() {\n }\n\n /// @dev This will be invoked by the owner, when owner wants to rescue tokens\n /// @param token Token which will we rescue to the owner from the contract\n function recoverTokens(ERC20Basic token) onlyOwner public {\n token.transfer(owner, tokensToBeReturned(token));\n }\n\n /// @dev Interface function, can be overwritten by the superclass\n /// @param token Token which balance we will check and return\n /// @return The amount of tokens (in smallest denominator) the contract owns\n function tokensToBeReturned(ERC20Basic token) public returns (uint) {\n return token.balanceOf(this);\n }\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Safe unsigned safe math.\n *\n * https://blog.aragon.one/library-driven-development-in-solidity-2bebcaf88736#.750gwtwli\n *\n * Originally from https://raw.githubusercontent.com/AragonOne/zeppelin-solidity/master/contracts/SafeMathLib.sol\n *\n * Maintained here until merged to mainline zeppelin-solidity.\n *\n */\nlibrary SafeMathLib {\n\n function times(uint a, uint b) returns (uint) {\n uint c = a * b;\n assert(a == 0 || c / a == b);\n return c;\n }\n\n function minus(uint a, uint b) returns (uint) {\n assert(b <= a);\n return a - b;\n }\n\n function plus(uint a, uint b) returns (uint) {\n uint c = a + b;\n assert(c>=a);\n return c;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n assert(c / a == b);\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n\n\n\n/**\n * @title Basic token\n * @dev Basic version of StandardToken, with no allowances.\n */\ncontract BasicToken is ERC20Basic {\n using SafeMath for uint256;\n\n mapping(address => uint256) balances;\n\n uint256 totalSupply_;\n\n /**\n * @dev total number of tokens in existence\n */\n function totalSupply() public view returns (uint256) {\n return totalSupply_;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param _to The address to transfer to.\n * @param _value The amount to be transferred.\n */\n function transfer(address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[msg.sender]);\n\n // SafeMath.sub will throw if there is not enough balance.\n balances[msg.sender] = balances[msg.sender].sub(_value);\n balances[_to] = balances[_to].add(_value);\n Transfer(msg.sender, _to, _value);\n return true;\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param _owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address _owner) public view returns (uint256 balance) {\n return balances[_owner];\n }\n\n}\n\n\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n\n\n/**\n * @title Standard ERC20 token\n *\n * @dev Implementation of the basic standard token.\n * @dev https://github.com/ethereum/EIPs/issues/20\n * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol\n */\ncontract StandardToken is ERC20, BasicToken {\n\n mapping (address => mapping (address => uint256)) internal allowed;\n\n\n /**\n * @dev Transfer tokens from one address to another\n * @param _from address The address which you want to send tokens from\n * @param _to address The address which you want to transfer to\n * @param _value uint256 the amount of tokens to be transferred\n */\n function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[_from]);\n require(_value <= allowed[_from][msg.sender]);\n\n balances[_from] = balances[_from].sub(_value);\n balances[_to] = balances[_to].add(_value);\n allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);\n Transfer(_from, _to, _value);\n return true;\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n *\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param _spender The address which will spend the funds.\n * @param _value The amount of tokens to be spent.\n */\n function approve(address _spender, uint256 _value) public returns (bool) {\n allowed[msg.sender][_spender] = _value;\n Approval(msg.sender, _spender, _value);\n return true;\n }\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param _owner address The address which owns the funds.\n * @param _spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address _owner, address _spender) public view returns (uint256) {\n return allowed[_owner][_spender];\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(address _spender, uint _addedValue) public returns (bool) {\n allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {\n uint oldValue = allowed[msg.sender][_spender];\n if (_subtractedValue > oldValue) {\n allowed[msg.sender][_spender] = 0;\n } else {\n allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);\n }\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n}\n\n\n\n\n/**\n * Standard EIP-20 token with an interface marker.\n *\n * @notice Interface marker is used by crowdsale contracts to validate that addresses point a good token contract.\n *\n */\ncontract StandardTokenExt is StandardToken, Recoverable {\n\n /* Interface declaration */\n function isToken() public constant returns (bool weAre) {\n return true;\n }\n}\n\n\n\n/**\n * Hold tokens for a group investor of investors until the unlock date.\n *\n * After the unlock date the investor can claim their tokens.\n *\n * Steps\n *\n * - Prepare a spreadsheet for token allocation\n * - Deploy this contract, with the sum to tokens to be distributed, from the owner account\n * - Call setInvestor for all investors from the owner account using a local script and CSV input\n * - Move tokensToBeAllocated in this contract using StandardToken.transfer()\n * - Call lock from the owner account\n * - Wait until the freeze period is over\n * - After the freeze time is over investors can call claim() from their address to get their tokens\n * - Tokens vest to the investors with individual schedules\n *\n */\ncontract TokenVault is Ownable, Recoverable {\n using SafeMathLib for uint;\n\n /** How many investors we have now */\n uint public investorCount;\n\n /** Sum from the spreadsheet how much tokens we should get on the contract. If the sum does not match at the time of the lock the vault is faulty and must be recreated.*/\n uint public tokensToBeAllocated;\n\n /** How many tokens investors have claimed so far */\n uint public totalClaimed;\n\n /** How many tokens our internal book keeping tells us to have at the time of lock() when all investor data has been loaded */\n uint public tokensAllocatedTotal;\n\n /** How much we have allocated to the investors invested */\n mapping(address => uint) public balances;\n\n /** How many tokens investors have claimed */\n mapping(address => uint) public claimed;\n\n /** When was the last claim by an investor **/\n mapping(address => uint) public lastClaimedAt;\n\n /** When our claim freeze is over (UNIX timestamp) - this is when the tokensPerSecond starts running */\n uint public freezeEndsAt;\n\n /** When this vault was locked (UNIX timestamp) */\n uint public lockedAt;\n\n /** defining the taps per account **/\n mapping(address => uint256) public tokensPerSecond;\n\n /** We can also define our own token, which will override the ICO one ***/\n StandardTokenExt public token;\n\n /** What is our current state.\n *\n * Loading: Investor data is being loaded and contract not yet locked\n * Holding: Holding tokens for investors\n * Distributing: Freeze time is over, investors can claim their tokens\n */\n enum State{Unknown, Loading, Holding, Distributing}\n\n /** We allocated tokens for investor */\n event Allocated(address investor, uint value);\n\n /** We distributed tokens to an investor */\n event Distributed(address investors, uint count);\n\n event Locked();\n\n /**\n * Create presale contract where lock up period is given days\n *\n * @param _owner Who can load investor data and lock\n * @param _freezeEndsAt UNIX timestamp when the vault unlocks\n * @param _token Token contract address we are distributing\n * @param _tokensToBeAllocated Total number of tokens this vault will hold - including decimal multiplication\n */\n function TokenVault(address _owner, uint _freezeEndsAt, StandardTokenExt _token, uint _tokensToBeAllocated) {\n\n owner = _owner;\n\n // Invalid owner\n if(owner == 0) {\n throw;\n }\n\n token = _token;\n\n // Check the address looks like a token contract\n if(!token.isToken()) {\n throw;\n }\n\n // Give argument\n if(_freezeEndsAt == 0) {\n throw;\n }\n\n // Sanity check on _tokensToBeAllocated\n if(_tokensToBeAllocated == 0) {\n throw;\n }\n\n if (_freezeEndsAt < now) {\n freezeEndsAt = now;\n } else {\n freezeEndsAt = _freezeEndsAt;\n }\n tokensToBeAllocated = _tokensToBeAllocated;\n }\n\n /**\n * @dev Add a participant to this Vault\n * @param investor Address of the participant who will be added to this vault\n * @param amount Amount of tokens this participant is entitled to in total\n * @param _tokensPerSecond Define the tap: how many tokens we permit the participant to withdraw per second, 0 to disable tap\n */\n function setInvestor(address investor, uint amount, uint _tokensPerSecond) public onlyOwner {\n\n if(lockedAt > 0) {\n // Cannot add new investors after the vault is locked\n throw;\n }\n\n if(amount == 0) throw; // No empty buys\n\n // Don't allow reset\n if(balances[investor] > 0) {\n throw;\n }\n\n balances[investor] = amount;\n\n investorCount++;\n\n tokensAllocatedTotal += amount;\n\n tokensPerSecond[investor] = _tokensPerSecond;\n\n Allocated(investor, amount);\n }\n\n /// @dev Lock the vault\n /// - All balances have been loaded in correctly\n /// - Tokens are transferred on this vault correctly\n /// - Checks are in place to prevent creating a vault that is locked with incorrect token balances.\n function lock() onlyOwner {\n\n if(lockedAt > 0) {\n throw; // Already locked\n }\n\n // Spreadsheet sum does not match to what we have loaded to the investor data\n if(tokensAllocatedTotal != tokensToBeAllocated) {\n throw;\n }\n\n // Do not lock the vault if the given tokens are not on this contract\n if(token.balanceOf(address(this)) != tokensAllocatedTotal) {\n throw;\n }\n\n lockedAt = now;\n\n Locked();\n }\n\n /// @dev In the case locking failed, then allow the owner to reclaim the tokens on the contract.\n function recoverFailedLock() onlyOwner {\n if(lockedAt > 0) {\n throw;\n }\n\n // Transfer all tokens on this contract back to the owner\n token.transfer(owner, token.balanceOf(address(this)));\n }\n\n /// @dev Get the current balance of tokens in the vault\n /// @return uint How many tokens there are currently in vault\n function getBalance() public constant returns (uint howManyTokensCurrentlyInVault) {\n return token.balanceOf(address(this));\n }\n\n /// @dev How much the investor could claim based on the current time and his previous claims\n /// @param investor Address of the investor\n /// @return uint How many tokens the investor can claim now\n function getMaxClaimByNow(address investor) public constant returns (uint claimableAmount) {\n\n if (now < freezeEndsAt) {\n return 0;\n }\n\n uint previousClaimAt = lastClaimedAt[investor];\n\n // This investor has not claimed tokens yet.... start counting from the unfreeze time\n if (previousClaimAt == 0) {\n previousClaimAt = freezeEndsAt;\n }\n\n uint passed = now.minus(previousClaimAt);\n uint maxClaim = passed.times(tokensPerSecond[investor]);\n return maxClaim;\n }\n\n /// @dev Check how many tokens \"investor\" can claim, based on the previous claims and tokens left\n /// @param investor Address of the investor\n /// @return uint How many tokens the investor can claim now\n function getCurrentlyClaimableAmount(address investor) public constant returns (uint claimableAmount) {\n\n uint maxTokensLeft = balances[investor].minus(claimed[investor]);\n\n if (now < freezeEndsAt) {\n return 0;\n }\n\n uint maxClaim = getMaxClaimByNow(investor);\n\n if (tokensPerSecond[investor] > 0) {\n // This investor is vesting over time\n\n if (maxClaim > maxTokensLeft) {\n return maxTokensLeft;\n } else {\n return maxClaim;\n }\n } else {\n // This investor gets all tokens when the vault unlocks\n return maxTokensLeft;\n }\n }\n\n /// @dev Claim N bought tokens to the investor as the msg sender\n function claim() public {\n\n address investor = msg.sender;\n\n if(lockedAt == 0) {\n throw; // We were never locked\n }\n\n if(now < freezeEndsAt) {\n throw; // Trying to claim early\n }\n\n if(balances[investor] == 0) {\n // Not our investor\n throw;\n }\n\n uint amount = getCurrentlyClaimableAmount(investor);\n\n require(amount > 0); // This gives somewhat better user experience as running transactions with zero claim amounts might confuse users\n\n // Update when and how much tokens the investor has claimed\n lastClaimedAt[investor] = now;\n claimed[investor] += amount;\n\n // Update our bean counter\n totalClaimed += amount;\n\n // Send tokens to the investors\n token.transfer(investor, amount);\n Distributed(investor, amount);\n }\n\n /// @dev This function is prototyped in Recoverable contract\n function tokensToBeReturned(ERC20Basic tokenToClaim) public returns (uint) {\n if (address(tokenToClaim) == address(token)) {\n return getBalance().minus(tokensAllocatedTotal);\n } else {\n return tokenToClaim.balanceOf(this);\n }\n }\n\n /// @dev Resolve the contract umambigious state\n function getState() public constant returns(State) {\n if(lockedAt == 0) {\n return State.Loading;\n } else if(now > freezeEndsAt) {\n return State.Distributing;\n } else {\n return State.Holding;\n }\n }\n\n}\n"}, "UncappedCrowdsale": {"abi": [{"constant": true, "inputs": [], "name": "ownerTestValue", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "requireCustomerId", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "invest", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "isPricingSane", "outputs": [{"name": "sane", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "endsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "minimumFundingGoal", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getState", "outputs": [{"name": "", "type": "uint8"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setFinalizeAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "customerId", "type": "uint128"}, {"name": "v", "type": "uint8"}, {"name": "r", "type": "bytes32"}, {"name": "s", "type": "bytes32"}], "name": "investWithSignedAddress", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "investedAmountOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "finalizeAgent", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "receiver", "type": "address"}, {"name": "fullTokens", "type": "uint256"}, {"name": "weiPrice", "type": "uint256"}], "name": "preallocate", "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": "isCrowdsale", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "finalize", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_pricingStrategy", "type": "address"}], "name": "setPricingStrategy", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "tokensSold", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "refund", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "signerAddress", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "weiRefunded", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "halt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}, {"name": "checksum", "type": "bytes1"}], "name": "buyWithCustomerIdWithChecksum", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "time", "type": "uint256"}], "name": "setEndsAt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "pricingStrategy", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "loadedRefund", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isMinimumGoalReached", "outputs": [{"name": "reached", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "bool"}], "name": "setRequireCustomerId", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "loadRefund", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "val", "type": "uint256"}], "name": "setOwnerTestValue", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "weisTotal", "type": "uint256"}, {"name": "pricePerToken", "type": "uint256"}], "name": "calculateTokens", "outputs": [{"name": "tokensTotal", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "multisigWallet", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "tokenAmountOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}], "name": "buyWithCustomerId", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [{"name": "weiAmount", "type": "uint256"}, {"name": "tokenAmount", "type": "uint256"}, {"name": "weiRaisedTotal", "type": "uint256"}, {"name": "tokensSoldTotal", "type": "uint256"}], "name": "isBreakingCap", "outputs": [{"name": "limitBroken", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "buy", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "isFinalizerSane", "outputs": [{"name": "sane", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "startsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "finalized", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "halted", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "earlyParticipantWhitelist", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "unhalt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "requiredSignedAddress", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isCrowdsaleFull", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "investorCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "status", "type": "bool"}], "name": "setEarlyParicipantWhitelist", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "bool"}, {"name": "_signerAddress", "type": "address"}], "name": "setRequireSignedAddress", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "customerId", "type": "uint128"}], "name": "investWithCustomerId", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setMultisig", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}, {"name": "v", "type": "uint8"}, {"name": "r", "type": "bytes32"}, {"name": "s", "type": "bytes32"}], "name": "buyWithSignedAddress", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "presaleWeiRaised", "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": "_token", "type": "address"}, {"name": "_pricingStrategy", "type": "address"}, {"name": "_multisigWallet", "type": "address"}, {"name": "_start", "type": "uint256"}, {"name": "_end", "type": "uint256"}, {"name": "_minimumFundingGoal", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"payable": true, "stateMutability": "payable", "type": "fallback"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}, {"indexed": false, "name": "tokenAmount", "type": "uint256"}, {"indexed": false, "name": "customerId", "type": "uint128"}], "name": "Invested", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}], "name": "Refund", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newRequireCustomerId", "type": "bool"}, {"indexed": false, "name": "newRequiredSignedAddress", "type": "bool"}, {"indexed": false, "name": "newSignerAddress", "type": "address"}], "name": "InvestmentPolicyChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "addr", "type": "address"}, {"indexed": false, "name": "status", "type": "bool"}], "name": "Whitelisted", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newEndsAt", "type": "uint256"}], "name": "EndsAtChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "bytecode": "0x6080604052600560015560006009556000600a556000600b556000600c556000600d556000600e553480156200003457600080fd5b5060405160c0806200260883398101604090815281516020830151918301516060840151608085015160a0909501516000805433600160a060020a0319918216811782161790915560028054909116600160a060020a03861617905592949192909190858585858585858585858585620000b78564010000000062000133810204565b60058054600160a060020a031916600160a060020a038681169190911791829055161515620000e557600080fd5b821515620000f257600080fd5b60078390558115156200010457600080fd5b600882905560075482116200011857600080fd5b60065550620002009f50505050505050505050505050505050565b600054600160a060020a031633146200014b57600080fd5b60038054600160a060020a031916600160a060020a038381169190911791829055604080517f04bbc255000000000000000000000000000000000000000000000000000000008152905192909116916304bbc255916004808201926020929091908290030181600087803b158015620001c357600080fd5b505af1158015620001d8573d6000803e3d6000fd5b505050506040513d6020811015620001ef57600080fd5b50511515620001fd57600080fd5b50565b6123f880620002106000396000f3006080604052600436106102875763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630226401d811461028c57806303ca0eed146102b357806303f9c793146102dc578063062b01ce146102f25780630a09284a1461030757806313f4e9771461031c5780631865c57d1461033157806319b667da1461036a5780631a49803b1461038b5780631aae3460146103c057806321d5c0f6146103e157806332013ac3146104125780634042b66f146104395780634551dd591461044e5780634bb278f31461046357806350c6773414610478578063518ab2a814610499578063590e1ae3146104ae5780635b7633d0146104c35780635da89ac0146104d85780635ed7ca5b146104ed5780636203f09f1461050257806363c6082f146105175780636e50eb3f1461055957806378b99c2414610571578063797d9437146105865780637c2e08a31461059b5780637f7d711e146105b057806387612102146105ca5780638d51faec146105d25780638da5cb5b146105ea578063903cc583146105ff5780639075becf1461061a57806397b150ca1461062f57806399e9376c146106505780639d3c663f1461066d578063a6f2ae3a1461068e578063a7ba44c314610696578063af468682146106ab578063b3f05b97146106c0578063b9b8af0b146106d5578063cb16e6d0146106ea578063cb3e64fd1461070b578063d222dc0414610720578063d5d0902114610735578063d7e64c001461074a578063eac249321461075f578063ed68ff2c14610785578063ef869443146107ab578063f2fde38b146107d4578063f3283fba146107f5578063f486972614610816578063f7c00e2f1461083f578063fc0c546a14610854575b600080fd5b34801561029857600080fd5b506102a1610869565b60408051918252519081900360200190f35b3480156102bf57600080fd5b506102c861086f565b604080519115158252519081900360200190f35b6102f0600160a060020a0360043516610878565b005b3480156102fe57600080fd5b506102c86108ac565b34801561031357600080fd5b506102a1610943565b34801561032857600080fd5b506102a1610949565b34801561033d57600080fd5b5061034661094f565b6040518082600781111561035657fe5b60ff16815260200191505060405180910390f35b34801561037657600080fd5b506102f0600160a060020a0360043516610b3d565b6102f0600160a060020a03600435166fffffffffffffffffffffffffffffffff6024351660ff60443516606435608435610c0e565b3480156103cc57600080fd5b506102a1600160a060020a0360043516610d36565b3480156103ed57600080fd5b506103f6610d48565b60408051600160a060020a039092168252519081900360200190f35b34801561041e57600080fd5b506102f0600160a060020a0360043516602435604435610d57565b34801561044557600080fd5b506102a161110d565b34801561045a57600080fd5b506102c8611113565b34801561046f57600080fd5b506102f0611118565b34801561048457600080fd5b506102f0600160a060020a036004351661121d565b3480156104a557600080fd5b506102a16112b8565b3480156104ba57600080fd5b506102f06112be565b3480156104cf57600080fd5b506103f6611404565b3480156104e457600080fd5b506102a1611419565b3480156104f957600080fd5b506102f061141f565b34801561050e57600080fd5b506102a161146d565b6102f06fffffffffffffffffffffffffffffffff600435167fff0000000000000000000000000000000000000000000000000000000000000060243516611473565b34801561056557600080fd5b506102f06004356114e5565b34801561057d57600080fd5b506103f6611553565b34801561059257600080fd5b506102a1611562565b3480156105a757600080fd5b506102c8611568565b3480156105bc57600080fd5b506102f06004351515611573565b6102f06115f7565b3480156105de57600080fd5b506102f06004356116b7565b3480156105f657600080fd5b506103f66116d3565b34801561060b57600080fd5b506102a16004356024356116e2565b34801561062657600080fd5b506103f6611839565b34801561063b57600080fd5b506102a1600160a060020a0360043516611848565b6102f06fffffffffffffffffffffffffffffffff6004351661185a565b34801561067957600080fd5b506102c8600435602435604435606435611864565b6102f061186e565b3480156106a257600080fd5b506102c8611879565b3480156106b757600080fd5b506102a16118e7565b3480156106cc57600080fd5b506102c86118ed565b3480156106e157600080fd5b506102c86118f6565b3480156106f657600080fd5b506102c8600160a060020a0360043516611917565b34801561071757600080fd5b506102f061192c565b34801561072c57600080fd5b506102c861198c565b34801561074157600080fd5b506102c861199a565b34801561075657600080fd5b506102a161199f565b34801561076b57600080fd5b506102f0600160a060020a036004351660243515156119a5565b34801561079157600080fd5b506102f06004351515600160a060020a0360243516611a20565b6102f0600160a060020a03600435166fffffffffffffffffffffffffffffffff60243516611ad0565b3480156107e057600080fd5b506102f0600160a060020a0360043516611b12565b34801561080157600080fd5b506102f0600160a060020a0360043516611ba6565b6102f06fffffffffffffffffffffffffffffffff6004351660ff60243516604435606435611bfd565b34801561084b57600080fd5b506102a1611c10565b34801561086057600080fd5b506103f6611c16565b60135481565b60145460ff1681565b60145460ff161561088857600080fd5b601454610100900460ff161561089d57600080fd5b6108a8816000611c25565b5050565b600354604080517f8e7682880000000000000000000000000000000000000000000000000000000081523060048201529051600092600160a060020a031691638e76828891602480830192602092919082900301818787803b15801561091157600080fd5b505af1158015610925573d6000803e3d6000fd5b505050506040513d602081101561093b57600080fd5b505190505b90565b60085481565b60065481565b600f5460009060ff161561096557506006610940565b600454600160a060020a0316151561097f57506001610940565b60048054604080517f82771c8e0000000000000000000000000000000000000000000000000000000081529051600160a060020a03909216926382771c8e9282820192602092908290030181600087803b1580156109dc57600080fd5b505af11580156109f0573d6000803e3d6000fd5b505050506040513d6020811015610a0657600080fd5b50511515610a1657506001610940565b600354604080517f8e7682880000000000000000000000000000000000000000000000000000000081523060048201529051600160a060020a0390921691638e768288916024808201926020929091908290030181600087803b158015610a7c57600080fd5b505af1158015610a90573d6000803e3d6000fd5b505050506040513d6020811015610aa657600080fd5b50511515610ab657506001610940565b600754421015610ac857506002610940565b6008544211158015610adf5750610add61199a565b155b15610aec57506003610940565b610af4611568565b15610b0157506004610940565b610b09611568565b158015610b1857506000600a54115b8015610b285750600a54600d5410155b15610b3557506007610940565b506005610940565b600054600160a060020a03163314610b5457600080fd5b6004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383811691909117808355604080517f614cb9040000000000000000000000000000000000000000000000000000000081529051919092169263614cb904928082019260209290918290030181600087803b158015610bd457600080fd5b505af1158015610be8573d6000803e3d6000fd5b505050506040513d6020811015610bfe57600080fd5b50511515610c0b57600080fd5b50565b60006002866040518082600160a060020a0316600160a060020a03166c010000000000000000000000000281526014019150506020604051808303816000865af1158015610c60573d6000803e3d6000fd5b5050506040513d6020811015610c7557600080fd5b5051601454604080516000808252602080830180855286905260ff8a16838501526060830189905260808301889052925194955062010000909304600160a060020a03169360019360a08084019493601f198401939081900390910191865af1158015610ce6573d6000803e3d6000fd5b50505060206040510351600160a060020a0316141515610d0557600080fd5b6fffffffffffffffffffffffffffffffff85161515610d2357600080fd5b610d2d8686611c25565b50505050505050565b60106020526000908152604090205481565b600454600160a060020a031681565b600080548190600160a060020a03163314610d7157600080fd5b600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610ddd57600080fd5b505af1158015610df1573d6000803e3d6000fd5b505050506040513d6020811015610e0757600080fd5b5051600a8054604080516000805160206123ad833981519152815260048101929092528688026024830181905290519390920a8702945090925073__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f91604480820192602092909190829003018186803b158015610e7d57600080fd5b505af4158015610e91573d6000803e3d6000fd5b505050506040513d6020811015610ea757600080fd5b5051600a55600954604080516000805160206123ad83398151915281526004810192909252602482018490525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b158015610f0f57600080fd5b505af4158015610f23573d6000803e3d6000fd5b505050506040513d6020811015610f3957600080fd5b5051600955600160a060020a0385166000908152601060209081526040918290205482516000805160206123ad8339815191528152600481019190915260248101849052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b158015610fb757600080fd5b505af4158015610fcb573d6000803e3d6000fd5b505050506040513d6020811015610fe157600080fd5b5051600160a060020a03861660009081526010602090815260408083209390935560118152908290205482516000805160206123ad8339815191528152600481019190915260248101859052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561106757600080fd5b505af415801561107b573d6000803e3d6000fd5b505050506040513d602081101561109157600080fd5b5051600160a060020a0386166000908152601160205260409020556110b68583611dcc565b60408051600160a060020a0387168152602081018390528082018490526000606082015290517f0396f60aaad038749091d273dc13aaabc63db6e2271c7bad442d5cf25cc433509181900360800190a15050505050565b600a5481565b600190565b60048061112361094f565b600781111561112e57fe5b1461113857600080fd5b600054600160a060020a0316331461114f57600080fd5b60005474010000000000000000000000000000000000000000900460ff161561117757600080fd5b600f5460ff161561118757600080fd5b600454600160a060020a03161561120d5760048054604080517f0bf318a30000000000000000000000000000000000000000000000000000000081529051600160a060020a0390921692630bf318a392828201926000929082900301818387803b1580156111f457600080fd5b505af1158015611208573d6000803e3d6000fd5b505050505b50600f805460ff19166001179055565b600054600160a060020a0316331461123457600080fd5b6003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038381169190911791829055604080517f04bbc255000000000000000000000000000000000000000000000000000000008152905192909116916304bbc255916004808201926020929091908290030181600087803b158015610bd457600080fd5b60095481565b60006007806112cb61094f565b60078111156112d657fe5b146112e057600080fd5b3360009081526010602052604090205491508115156112fe57600080fd5b33600090815260106020908152604080832092909255600e5482516000805160206123ad8339815191528152600481019190915260248101859052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561137357600080fd5b505af4158015611387573d6000803e3d6000fd5b505050506040513d602081101561139d57600080fd5b5051600e55604080513381526020810184905281517fbb28353e4598c3b9199101a66e0989549b659a59a54d2c27fbb183f1932c8e6d929181900390910190a1604051339083156108fc029084906000818181858888f1935050505015156108a857600080fd5b601454620100009004600160a060020a031681565b600e5481565b600054600160a060020a0316331461143657600080fd5b6000805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b60015481565b604080517001000000000000000000000000000000006fffffffffffffffffffffffffffffffff851602815290519081900360100190207fff00000000000000000000000000000000000000000000000000000000000000908116908216146114db57600080fd5b6108a83383611ad0565b600054600160a060020a031633146114fc57600080fd5b8042111561150957600080fd5b80600754111561151857600080fd5b60088190556040805182815290517fd34bb772c4ae9baa99db852f622773b31c7827e8ee818449fef20d30980bd3109181900360200190a150565b600354600160a060020a031681565b600d5481565b600654600a54101590565b600054600160a060020a0316331461158a57600080fd5b6014805460ff191682151517908190556040805160ff808416151582526101008404161515602082015262010000909204600160a060020a031682820152517f48d826081348f5f00e8a33c9ae8ce89ed4c6e88400b585a478bc203d9e8177d3916060908290030190a150565b60058061160261094f565b600781111561160d57fe5b1461161757600080fd5b34151561162357600080fd5b600d54604080516000805160206123ad833981519152815260048101929092523460248301525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b15801561168557600080fd5b505af4158015611699573d6000803e3d6000fd5b505050506040513d60208110156116af57600080fd5b5051600d5550565b600054600160a060020a031633146116ce57600080fd5b601355565b600054600160a060020a031681565b600080600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561175157600080fd5b505af1158015611765573d6000803e3d6000fd5b505050506040513d602081101561177b57600080fd5b5051604080517f1d3b9edf00000000000000000000000000000000000000000000000000000000815260048101879052600a9290920a602483018190529051909250849173__contracts/SafeMathLib.sol:SafeMathLi__91631d3b9edf91604480820192602092909190829003018186803b1580156117fb57600080fd5b505af415801561180f573d6000803e3d6000fd5b505050506040513d602081101561182557600080fd5b505181151561183057fe5b04949350505050565b600554600160a060020a031681565b60116020526000908152604090205481565b610c0b3382611ad0565b6000949350505050565b61187733610878565b565b6000600460009054906101000a9004600160a060020a0316600160a060020a03166382771c8e6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561091157600080fd5b60075481565b600f5460ff1681565b60005474010000000000000000000000000000000000000000900460ff1681565b60126020526000908152604090205460ff1681565b600054600160a060020a0316331461194357600080fd5b60005474010000000000000000000000000000000000000000900460ff16151561196c57600080fd5b6000805474ff000000000000000000000000000000000000000019169055565b601454610100900460ff1681565b600090565b600c5481565b600054600160a060020a031633146119bc57600080fd5b600160a060020a038216600081815260126020908152604091829020805460ff191685151590811790915582519384529083015280517fa54714518c5d275fdcd3d2a461e4858e4e8cb04fb93cd0bca9d6d34115f264409281900390910190a15050565b600054600160a060020a03163314611a3757600080fd5b60148054600160a060020a038084166201000090810275ffffffffffffffffffffffffffffffffffffffff00001987151561010090810261ff0019909616959095171617938490556040805160ff86811615158252948604909416151560208501529304168183015290517f48d826081348f5f00e8a33c9ae8ce89ed4c6e88400b585a478bc203d9e8177d39181900360600190a15050565b601454610100900460ff1615611ae557600080fd5b6fffffffffffffffffffffffffffffffff81161515611b0357600080fd5b611b0d8282611c25565b505050565b600054600160a060020a03163314611b2957600080fd5b600160a060020a0381161515611b3e57600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600054600160a060020a03163314611bbd57600080fd5b600154600c541115611bce57600080fd5b6005805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b611c0a3385858585610c0e565b50505050565b600b5481565b600254600160a060020a031681565b6000805474010000000000000000000000000000000000000000900460ff1615611c4e57600080fd5b611dc58383600360009054906101000a9004600160a060020a0316600160a060020a03166318a4155e34600b54600a540360095433600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015611cef57600080fd5b505af1158015611d03573d6000803e3d6000fd5b505050506040513d6020811015611d1957600080fd5b5051604080517c010000000000000000000000000000000000000000000000000000000063ffffffff8916028152600481019690965260248601949094526044850192909252600160a060020a0316606484015260848301525160a48083019260209291908290030181600087803b158015611d9457600080fd5b505af1158015611da8573d6000803e3d6000fd5b505050506040513d6020811015611dbe57600080fd5b5051611e51565b9392505050565b600254604080517f40c10f19000000000000000000000000000000000000000000000000000000008152600160a060020a038581166004830152602482018590529151919092169182916340c10f199160448082019260009290919082900301818387803b158015611e3d57600080fd5b505af1158015610d2d573d6000803e3d6000fd5b60008054819074010000000000000000000000000000000000000000900460ff1615611e7c57600080fd5b6002611e8661094f565b6007811115611e9157fe5b1415611ec357600160a060020a03851660009081526012602052604090205460ff161515611ebe57600080fd5b611edf565b6003611ecd61094f565b6007811115611ed857fe5b1415610287575b5034821515611eed57600080fd5b600160a060020a0385166000908152601060205260409020541515611f1657600c805460010190555b600160a060020a0385166000908152601060209081526040918290205482516000805160206123ad8339815191528152600481019190915260248101849052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b158015611f8f57600080fd5b505af4158015611fa3573d6000803e3d6000fd5b505050506040513d6020811015611fb957600080fd5b5051600160a060020a03861660009081526010602090815260408083209390935560118152908290205482516000805160206123ad8339815191528152600481019190915260248101869052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561203f57600080fd5b505af4158015612053573d6000803e3d6000fd5b505050506040513d602081101561206957600080fd5b5051600160a060020a03861660009081526011602090815260409182902092909255600a5481516000805160206123ad8339815191528152600481019190915260248101849052905173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f9260448082019391829003018186803b1580156120e957600080fd5b505af41580156120fd573d6000803e3d6000fd5b505050506040513d602081101561211357600080fd5b5051600a55600954604080516000805160206123ad83398151915281526004810192909252602482018590525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b15801561217b57600080fd5b505af415801561218f573d6000803e3d6000fd5b505050506040513d60208110156121a557600080fd5b5051600955600354604080517ff14ae17d000000000000000000000000000000000000000000000000000000008152600160a060020a0388811660048301529151919092169163f14ae17d9160248083019260209291908290030181600087803b15801561221257600080fd5b505af1158015612226573d6000803e3d6000fd5b505050506040513d602081101561223c57600080fd5b5051156122ea57600b5473__contracts/SafeMathLib.sol:SafeMathLi__6366098d4f9091836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b1580156122ba57600080fd5b505af41580156122ce573d6000803e3d6000fd5b505050506040513d60208110156122e457600080fd5b5051600b555b6122fa8184600a54600954611864565b1561230457600080fd5b61230e8584611dcc565b600554604051600160a060020a039091169082156108fc029083906000818181858888f19350505050151561234257600080fd5b60408051600160a060020a0387168152602081018390528082018590526fffffffffffffffffffffffffffffffff8616606082015290517f0396f60aaad038749091d273dc13aaabc63db6e2271c7bad442d5cf25cc433509181900360800190a150909392505050560066098d4f00000000000000000000000000000000000000000000000000000000a165627a7a72305820118c4fedd39f95cf3aa895d2f13ce2e11c5e9c8574679b8f8c347a1baea69f600029", "bytecode_runtime": "0x6080604052600436106102875763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630226401d811461028c57806303ca0eed146102b357806303f9c793146102dc578063062b01ce146102f25780630a09284a1461030757806313f4e9771461031c5780631865c57d1461033157806319b667da1461036a5780631a49803b1461038b5780631aae3460146103c057806321d5c0f6146103e157806332013ac3146104125780634042b66f146104395780634551dd591461044e5780634bb278f31461046357806350c6773414610478578063518ab2a814610499578063590e1ae3146104ae5780635b7633d0146104c35780635da89ac0146104d85780635ed7ca5b146104ed5780636203f09f1461050257806363c6082f146105175780636e50eb3f1461055957806378b99c2414610571578063797d9437146105865780637c2e08a31461059b5780637f7d711e146105b057806387612102146105ca5780638d51faec146105d25780638da5cb5b146105ea578063903cc583146105ff5780639075becf1461061a57806397b150ca1461062f57806399e9376c146106505780639d3c663f1461066d578063a6f2ae3a1461068e578063a7ba44c314610696578063af468682146106ab578063b3f05b97146106c0578063b9b8af0b146106d5578063cb16e6d0146106ea578063cb3e64fd1461070b578063d222dc0414610720578063d5d0902114610735578063d7e64c001461074a578063eac249321461075f578063ed68ff2c14610785578063ef869443146107ab578063f2fde38b146107d4578063f3283fba146107f5578063f486972614610816578063f7c00e2f1461083f578063fc0c546a14610854575b600080fd5b34801561029857600080fd5b506102a1610869565b60408051918252519081900360200190f35b3480156102bf57600080fd5b506102c861086f565b604080519115158252519081900360200190f35b6102f0600160a060020a0360043516610878565b005b3480156102fe57600080fd5b506102c86108ac565b34801561031357600080fd5b506102a1610943565b34801561032857600080fd5b506102a1610949565b34801561033d57600080fd5b5061034661094f565b6040518082600781111561035657fe5b60ff16815260200191505060405180910390f35b34801561037657600080fd5b506102f0600160a060020a0360043516610b3d565b6102f0600160a060020a03600435166fffffffffffffffffffffffffffffffff6024351660ff60443516606435608435610c0e565b3480156103cc57600080fd5b506102a1600160a060020a0360043516610d36565b3480156103ed57600080fd5b506103f6610d48565b60408051600160a060020a039092168252519081900360200190f35b34801561041e57600080fd5b506102f0600160a060020a0360043516602435604435610d57565b34801561044557600080fd5b506102a161110d565b34801561045a57600080fd5b506102c8611113565b34801561046f57600080fd5b506102f0611118565b34801561048457600080fd5b506102f0600160a060020a036004351661121d565b3480156104a557600080fd5b506102a16112b8565b3480156104ba57600080fd5b506102f06112be565b3480156104cf57600080fd5b506103f6611404565b3480156104e457600080fd5b506102a1611419565b3480156104f957600080fd5b506102f061141f565b34801561050e57600080fd5b506102a161146d565b6102f06fffffffffffffffffffffffffffffffff600435167fff0000000000000000000000000000000000000000000000000000000000000060243516611473565b34801561056557600080fd5b506102f06004356114e5565b34801561057d57600080fd5b506103f6611553565b34801561059257600080fd5b506102a1611562565b3480156105a757600080fd5b506102c8611568565b3480156105bc57600080fd5b506102f06004351515611573565b6102f06115f7565b3480156105de57600080fd5b506102f06004356116b7565b3480156105f657600080fd5b506103f66116d3565b34801561060b57600080fd5b506102a16004356024356116e2565b34801561062657600080fd5b506103f6611839565b34801561063b57600080fd5b506102a1600160a060020a0360043516611848565b6102f06fffffffffffffffffffffffffffffffff6004351661185a565b34801561067957600080fd5b506102c8600435602435604435606435611864565b6102f061186e565b3480156106a257600080fd5b506102c8611879565b3480156106b757600080fd5b506102a16118e7565b3480156106cc57600080fd5b506102c86118ed565b3480156106e157600080fd5b506102c86118f6565b3480156106f657600080fd5b506102c8600160a060020a0360043516611917565b34801561071757600080fd5b506102f061192c565b34801561072c57600080fd5b506102c861198c565b34801561074157600080fd5b506102c861199a565b34801561075657600080fd5b506102a161199f565b34801561076b57600080fd5b506102f0600160a060020a036004351660243515156119a5565b34801561079157600080fd5b506102f06004351515600160a060020a0360243516611a20565b6102f0600160a060020a03600435166fffffffffffffffffffffffffffffffff60243516611ad0565b3480156107e057600080fd5b506102f0600160a060020a0360043516611b12565b34801561080157600080fd5b506102f0600160a060020a0360043516611ba6565b6102f06fffffffffffffffffffffffffffffffff6004351660ff60243516604435606435611bfd565b34801561084b57600080fd5b506102a1611c10565b34801561086057600080fd5b506103f6611c16565b60135481565b60145460ff1681565b60145460ff161561088857600080fd5b601454610100900460ff161561089d57600080fd5b6108a8816000611c25565b5050565b600354604080517f8e7682880000000000000000000000000000000000000000000000000000000081523060048201529051600092600160a060020a031691638e76828891602480830192602092919082900301818787803b15801561091157600080fd5b505af1158015610925573d6000803e3d6000fd5b505050506040513d602081101561093b57600080fd5b505190505b90565b60085481565b60065481565b600f5460009060ff161561096557506006610940565b600454600160a060020a0316151561097f57506001610940565b60048054604080517f82771c8e0000000000000000000000000000000000000000000000000000000081529051600160a060020a03909216926382771c8e9282820192602092908290030181600087803b1580156109dc57600080fd5b505af11580156109f0573d6000803e3d6000fd5b505050506040513d6020811015610a0657600080fd5b50511515610a1657506001610940565b600354604080517f8e7682880000000000000000000000000000000000000000000000000000000081523060048201529051600160a060020a0390921691638e768288916024808201926020929091908290030181600087803b158015610a7c57600080fd5b505af1158015610a90573d6000803e3d6000fd5b505050506040513d6020811015610aa657600080fd5b50511515610ab657506001610940565b600754421015610ac857506002610940565b6008544211158015610adf5750610add61199a565b155b15610aec57506003610940565b610af4611568565b15610b0157506004610940565b610b09611568565b158015610b1857506000600a54115b8015610b285750600a54600d5410155b15610b3557506007610940565b506005610940565b600054600160a060020a03163314610b5457600080fd5b6004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383811691909117808355604080517f614cb9040000000000000000000000000000000000000000000000000000000081529051919092169263614cb904928082019260209290918290030181600087803b158015610bd457600080fd5b505af1158015610be8573d6000803e3d6000fd5b505050506040513d6020811015610bfe57600080fd5b50511515610c0b57600080fd5b50565b60006002866040518082600160a060020a0316600160a060020a03166c010000000000000000000000000281526014019150506020604051808303816000865af1158015610c60573d6000803e3d6000fd5b5050506040513d6020811015610c7557600080fd5b5051601454604080516000808252602080830180855286905260ff8a16838501526060830189905260808301889052925194955062010000909304600160a060020a03169360019360a08084019493601f198401939081900390910191865af1158015610ce6573d6000803e3d6000fd5b50505060206040510351600160a060020a0316141515610d0557600080fd5b6fffffffffffffffffffffffffffffffff85161515610d2357600080fd5b610d2d8686611c25565b50505050505050565b60106020526000908152604090205481565b600454600160a060020a031681565b600080548190600160a060020a03163314610d7157600080fd5b600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610ddd57600080fd5b505af1158015610df1573d6000803e3d6000fd5b505050506040513d6020811015610e0757600080fd5b5051600a8054604080516000805160206123ad833981519152815260048101929092528688026024830181905290519390920a8702945090925073__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f91604480820192602092909190829003018186803b158015610e7d57600080fd5b505af4158015610e91573d6000803e3d6000fd5b505050506040513d6020811015610ea757600080fd5b5051600a55600954604080516000805160206123ad83398151915281526004810192909252602482018490525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b158015610f0f57600080fd5b505af4158015610f23573d6000803e3d6000fd5b505050506040513d6020811015610f3957600080fd5b5051600955600160a060020a0385166000908152601060209081526040918290205482516000805160206123ad8339815191528152600481019190915260248101849052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b158015610fb757600080fd5b505af4158015610fcb573d6000803e3d6000fd5b505050506040513d6020811015610fe157600080fd5b5051600160a060020a03861660009081526010602090815260408083209390935560118152908290205482516000805160206123ad8339815191528152600481019190915260248101859052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561106757600080fd5b505af415801561107b573d6000803e3d6000fd5b505050506040513d602081101561109157600080fd5b5051600160a060020a0386166000908152601160205260409020556110b68583611dcc565b60408051600160a060020a0387168152602081018390528082018490526000606082015290517f0396f60aaad038749091d273dc13aaabc63db6e2271c7bad442d5cf25cc433509181900360800190a15050505050565b600a5481565b600190565b60048061112361094f565b600781111561112e57fe5b1461113857600080fd5b600054600160a060020a0316331461114f57600080fd5b60005474010000000000000000000000000000000000000000900460ff161561117757600080fd5b600f5460ff161561118757600080fd5b600454600160a060020a03161561120d5760048054604080517f0bf318a30000000000000000000000000000000000000000000000000000000081529051600160a060020a0390921692630bf318a392828201926000929082900301818387803b1580156111f457600080fd5b505af1158015611208573d6000803e3d6000fd5b505050505b50600f805460ff19166001179055565b600054600160a060020a0316331461123457600080fd5b6003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038381169190911791829055604080517f04bbc255000000000000000000000000000000000000000000000000000000008152905192909116916304bbc255916004808201926020929091908290030181600087803b158015610bd457600080fd5b60095481565b60006007806112cb61094f565b60078111156112d657fe5b146112e057600080fd5b3360009081526010602052604090205491508115156112fe57600080fd5b33600090815260106020908152604080832092909255600e5482516000805160206123ad8339815191528152600481019190915260248101859052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561137357600080fd5b505af4158015611387573d6000803e3d6000fd5b505050506040513d602081101561139d57600080fd5b5051600e55604080513381526020810184905281517fbb28353e4598c3b9199101a66e0989549b659a59a54d2c27fbb183f1932c8e6d929181900390910190a1604051339083156108fc029084906000818181858888f1935050505015156108a857600080fd5b601454620100009004600160a060020a031681565b600e5481565b600054600160a060020a0316331461143657600080fd5b6000805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b60015481565b604080517001000000000000000000000000000000006fffffffffffffffffffffffffffffffff851602815290519081900360100190207fff00000000000000000000000000000000000000000000000000000000000000908116908216146114db57600080fd5b6108a83383611ad0565b600054600160a060020a031633146114fc57600080fd5b8042111561150957600080fd5b80600754111561151857600080fd5b60088190556040805182815290517fd34bb772c4ae9baa99db852f622773b31c7827e8ee818449fef20d30980bd3109181900360200190a150565b600354600160a060020a031681565b600d5481565b600654600a54101590565b600054600160a060020a0316331461158a57600080fd5b6014805460ff191682151517908190556040805160ff808416151582526101008404161515602082015262010000909204600160a060020a031682820152517f48d826081348f5f00e8a33c9ae8ce89ed4c6e88400b585a478bc203d9e8177d3916060908290030190a150565b60058061160261094f565b600781111561160d57fe5b1461161757600080fd5b34151561162357600080fd5b600d54604080516000805160206123ad833981519152815260048101929092523460248301525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b15801561168557600080fd5b505af4158015611699573d6000803e3d6000fd5b505050506040513d60208110156116af57600080fd5b5051600d5550565b600054600160a060020a031633146116ce57600080fd5b601355565b600054600160a060020a031681565b600080600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561175157600080fd5b505af1158015611765573d6000803e3d6000fd5b505050506040513d602081101561177b57600080fd5b5051604080517f1d3b9edf00000000000000000000000000000000000000000000000000000000815260048101879052600a9290920a602483018190529051909250849173__contracts/SafeMathLib.sol:SafeMathLi__91631d3b9edf91604480820192602092909190829003018186803b1580156117fb57600080fd5b505af415801561180f573d6000803e3d6000fd5b505050506040513d602081101561182557600080fd5b505181151561183057fe5b04949350505050565b600554600160a060020a031681565b60116020526000908152604090205481565b610c0b3382611ad0565b6000949350505050565b61187733610878565b565b6000600460009054906101000a9004600160a060020a0316600160a060020a03166382771c8e6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561091157600080fd5b60075481565b600f5460ff1681565b60005474010000000000000000000000000000000000000000900460ff1681565b60126020526000908152604090205460ff1681565b600054600160a060020a0316331461194357600080fd5b60005474010000000000000000000000000000000000000000900460ff16151561196c57600080fd5b6000805474ff000000000000000000000000000000000000000019169055565b601454610100900460ff1681565b600090565b600c5481565b600054600160a060020a031633146119bc57600080fd5b600160a060020a038216600081815260126020908152604091829020805460ff191685151590811790915582519384529083015280517fa54714518c5d275fdcd3d2a461e4858e4e8cb04fb93cd0bca9d6d34115f264409281900390910190a15050565b600054600160a060020a03163314611a3757600080fd5b60148054600160a060020a038084166201000090810275ffffffffffffffffffffffffffffffffffffffff00001987151561010090810261ff0019909616959095171617938490556040805160ff86811615158252948604909416151560208501529304168183015290517f48d826081348f5f00e8a33c9ae8ce89ed4c6e88400b585a478bc203d9e8177d39181900360600190a15050565b601454610100900460ff1615611ae557600080fd5b6fffffffffffffffffffffffffffffffff81161515611b0357600080fd5b611b0d8282611c25565b505050565b600054600160a060020a03163314611b2957600080fd5b600160a060020a0381161515611b3e57600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600054600160a060020a03163314611bbd57600080fd5b600154600c541115611bce57600080fd5b6005805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b611c0a3385858585610c0e565b50505050565b600b5481565b600254600160a060020a031681565b6000805474010000000000000000000000000000000000000000900460ff1615611c4e57600080fd5b611dc58383600360009054906101000a9004600160a060020a0316600160a060020a03166318a4155e34600b54600a540360095433600260009054906101000a9004600160a060020a0316600160a060020a031663313ce5676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015611cef57600080fd5b505af1158015611d03573d6000803e3d6000fd5b505050506040513d6020811015611d1957600080fd5b5051604080517c010000000000000000000000000000000000000000000000000000000063ffffffff8916028152600481019690965260248601949094526044850192909252600160a060020a0316606484015260848301525160a48083019260209291908290030181600087803b158015611d9457600080fd5b505af1158015611da8573d6000803e3d6000fd5b505050506040513d6020811015611dbe57600080fd5b5051611e51565b9392505050565b600254604080517f40c10f19000000000000000000000000000000000000000000000000000000008152600160a060020a038581166004830152602482018590529151919092169182916340c10f199160448082019260009290919082900301818387803b158015611e3d57600080fd5b505af1158015610d2d573d6000803e3d6000fd5b60008054819074010000000000000000000000000000000000000000900460ff1615611e7c57600080fd5b6002611e8661094f565b6007811115611e9157fe5b1415611ec357600160a060020a03851660009081526012602052604090205460ff161515611ebe57600080fd5b611edf565b6003611ecd61094f565b6007811115611ed857fe5b1415610287575b5034821515611eed57600080fd5b600160a060020a0385166000908152601060205260409020541515611f1657600c805460010190555b600160a060020a0385166000908152601060209081526040918290205482516000805160206123ad8339815191528152600481019190915260248101849052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b158015611f8f57600080fd5b505af4158015611fa3573d6000803e3d6000fd5b505050506040513d6020811015611fb957600080fd5b5051600160a060020a03861660009081526010602090815260408083209390935560118152908290205482516000805160206123ad8339815191528152600481019190915260248101869052915173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f926044808301939192829003018186803b15801561203f57600080fd5b505af4158015612053573d6000803e3d6000fd5b505050506040513d602081101561206957600080fd5b5051600160a060020a03861660009081526011602090815260409182902092909255600a5481516000805160206123ad8339815191528152600481019190915260248101849052905173__contracts/SafeMathLib.sol:SafeMathLi__926366098d4f9260448082019391829003018186803b1580156120e957600080fd5b505af41580156120fd573d6000803e3d6000fd5b505050506040513d602081101561211357600080fd5b5051600a55600954604080516000805160206123ad83398151915281526004810192909252602482018590525173__contracts/SafeMathLib.sol:SafeMathLi__916366098d4f916044808301926020929190829003018186803b15801561217b57600080fd5b505af415801561218f573d6000803e3d6000fd5b505050506040513d60208110156121a557600080fd5b5051600955600354604080517ff14ae17d000000000000000000000000000000000000000000000000000000008152600160a060020a0388811660048301529151919092169163f14ae17d9160248083019260209291908290030181600087803b15801561221257600080fd5b505af1158015612226573d6000803e3d6000fd5b505050506040513d602081101561223c57600080fd5b5051156122ea57600b5473__contracts/SafeMathLib.sol:SafeMathLi__6366098d4f9091836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b1580156122ba57600080fd5b505af41580156122ce573d6000803e3d6000fd5b505050506040513d60208110156122e457600080fd5b5051600b555b6122fa8184600a54600954611864565b1561230457600080fd5b61230e8584611dcc565b600554604051600160a060020a039091169082156108fc029083906000818181858888f19350505050151561234257600080fd5b60408051600160a060020a0387168152602081018390528082018590526fffffffffffffffffffffffffffffffff8616606082015290517f0396f60aaad038749091d273dc13aaabc63db6e2271c7bad442d5cf25cc433509181900360800190a150909392505050560066098d4f00000000000000000000000000000000000000000000000000000000a165627a7a72305820118c4fedd39f95cf3aa895d2f13ce2e11c5e9c8574679b8f8c347a1baea69f600029", "direct_dependencies": ["SafeMathLib"], "full_dependencies": ["SafeMathLib"], "linkrefs": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 8358}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 8652}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 8994}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 9346}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 10906}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 12472}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 13218}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 17106}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 17458}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 17800}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 18084}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 18608}], "linkrefs_runtime": [{"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 7302}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 7596}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 7938}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 8290}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 9850}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 11416}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 12162}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 16050}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 16402}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 16744}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 17028}, {"length": 40, "name": "SafeMathLib", "source_path": "contracts/SafeMathLib.sol", "start": 17552}], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": true, "inputs": [], "name": "ownerTestValue", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "requireCustomerId", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "invest", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "isPricingSane", "outputs": [{"name": "sane", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "endsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "minimumFundingGoal", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getState", "outputs": [{"name": "", "type": "uint8"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setFinalizeAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "customerId", "type": "uint128"}, {"name": "v", "type": "uint8"}, {"name": "r", "type": "bytes32"}, {"name": "s", "type": "bytes32"}], "name": "investWithSignedAddress", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "investedAmountOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "finalizeAgent", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "receiver", "type": "address"}, {"name": "fullTokens", "type": "uint256"}, {"name": "weiPrice", "type": "uint256"}], "name": "preallocate", "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": "isCrowdsale", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "finalize", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "_pricingStrategy", "type": "address"}], "name": "setPricingStrategy", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "tokensSold", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "refund", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "signerAddress", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "weiRefunded", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "halt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}, {"name": "checksum", "type": "bytes1"}], "name": "buyWithCustomerIdWithChecksum", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "time", "type": "uint256"}], "name": "setEndsAt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "pricingStrategy", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "loadedRefund", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isMinimumGoalReached", "outputs": [{"name": "reached", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "bool"}], "name": "setRequireCustomerId", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "loadRefund", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "val", "type": "uint256"}], "name": "setOwnerTestValue", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "weisTotal", "type": "uint256"}, {"name": "pricePerToken", "type": "uint256"}], "name": "calculateTokens", "outputs": [{"name": "tokensTotal", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "multisigWallet", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "tokenAmountOf", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}], "name": "buyWithCustomerId", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [{"name": "weiAmount", "type": "uint256"}, {"name": "tokenAmount", "type": "uint256"}, {"name": "weiRaisedTotal", "type": "uint256"}, {"name": "tokensSoldTotal", "type": "uint256"}], "name": "isBreakingCap", "outputs": [{"name": "limitBroken", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "buy", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "isFinalizerSane", "outputs": [{"name": "sane", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "startsAt", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "finalized", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "halted", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "earlyParticipantWhitelist", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "unhalt", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "requiredSignedAddress", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isCrowdsaleFull", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "investorCount", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "status", "type": "bool"}], "name": "setEarlyParicipantWhitelist", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "bool"}, {"name": "_signerAddress", "type": "address"}], "name": "setRequireSignedAddress", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}, {"name": "customerId", "type": "uint128"}], "name": "investWithCustomerId", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "addr", "type": "address"}], "name": "setMultisig", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "customerId", "type": "uint128"}, {"name": "v", "type": "uint8"}, {"name": "r", "type": "bytes32"}, {"name": "s", "type": "bytes32"}], "name": "buyWithSignedAddress", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": true, "inputs": [], "name": "presaleWeiRaised", "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": "_token", "type": "address"}, {"name": "_pricingStrategy", "type": "address"}, {"name": "_multisigWallet", "type": "address"}, {"name": "_start", "type": "uint256"}, {"name": "_end", "type": "uint256"}, {"name": "_minimumFundingGoal", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"payable": true, "stateMutability": "payable", "type": "fallback"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}, {"indexed": false, "name": "tokenAmount", "type": "uint256"}, {"indexed": false, "name": "customerId", "type": "uint128"}], "name": "Invested", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "investor", "type": "address"}, {"indexed": false, "name": "weiAmount", "type": "uint256"}], "name": "Refund", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newRequireCustomerId", "type": "bool"}, {"indexed": false, "name": "newRequiredSignedAddress", "type": "bool"}, {"indexed": false, "name": "newSignerAddress", "type": "address"}], "name": "InvestmentPolicyChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "addr", "type": "address"}, {"indexed": false, "name": "status", "type": "bool"}], "name": "Whitelisted", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "newEndsAt", "type": "uint256"}], "name": "EndsAtChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}], "devdoc": {"methods": {"calculateTokens(uint256,uint256)": {"details": "Calculate tokens user will have for their purchase", "params": {"pricePerToken": "What is the price for one token", "weisTotal": "How much ethers (in wei) the user putssssss in"}, "return": "tokensTotal which is received tokens, token decimals included"}, "isMinimumGoalReached()": {"return": "true if the crowdsale has raised enough money to be a successful."}, "preallocate(address,uint256,uint256)": {"params": {"fullTokens": "tokens as full tokens - decimal places added internally", "weiPrice": "Price of a single full token in wei "}}, "transferOwnership(address)": {"details": "Allows the current owner to transfer control of the contract to a newOwner.", "params": {"newOwner": "The address to transfer ownership to."}}}}, "userdoc": {"methods": {"buy()": {"notice": "The basic entry point to participate the crowdsale process. * Pay for funding, get invested tokens back in the sender address."}, "buyWithCustomerId(uint128)": {"notice": "Legacy API signature."}, "buyWithCustomerIdWithChecksum(uint128,bytes1)": {"notice": "Invest to tokens, recognize the payer. "}, "buyWithSignedAddress(uint128,uint8,bytes32,bytes32)": {"notice": "Invest to tokens, recognize the payer and clear his address. "}, "finalize()": {"notice": "Finalize a succcesful crowdsale. * The owner can triggre a call the contract that provides post-crowdsale actions, like releasing the tokens."}, "getState()": {"notice": "Crowdfund state machine management. * We make it a function and do not assign the result to a variable, so there is no chance of the variable being stale."}, "invest(address)": {"notice": "Allow anonymous contributions to this crowdsale."}, "investWithCustomerId(address,uint128)": {"notice": "Track who is the customer making the payment so we can send thank you email."}, "investWithSignedAddress(address,uint128,uint8,bytes32,bytes32)": {"notice": "Allow anonymous contributions to this crowdsale."}, "isBreakingCap(uint256,uint256,uint256,uint256)": {"notice": "Called from invest() to confirm if the curret investment does not break our cap rule."}, "isCrowdsale()": {"notice": "Interface marker. "}, "isFinalizerSane()": {"notice": "Check if the contract relationship looks good."}, "isPricingSane()": {"notice": "Check if the contract relationship looks good."}, "loadRefund()": {"notice": "Allow load refunds back on the contract for the refunding. * The team can transfer the funds back on the smart contract in the case the minimum goal was not reached.."}, "preallocate(address,uint256,uint256)": {"notice": "Preallocate tokens for the early investors. * Preallocated tokens have been sold before the actual crowdsale opens. This function mints the tokens and moves the crowdsale needle. * Investor count is not handled; it is assumed this goes for multiple investors and the token distribution happens outside the smart contract flow. * No money is exchanged, as the crowdsale team already have received the payment."}, "refund()": {"notice": "Investors can claim refund. * Note that any refunds from proxy buyers should be handled separately, and not through this contract."}, "setEarlyParicipantWhitelist(address,bool)": {"notice": "Allow addresses to do early participation. * TODO: Fix spelling error in the name"}, "setEndsAt(uint256)": {"notice": "Allow crowdsale owner to close early or extend the crowdsale. * This is useful e.g. for a manual soft cap implementation: - after X amount is reached determine manual closing * This may put the crowdsale to an invalid state, but we trust owners know what they are doing. "}, "setFinalizeAgent(address)": {"notice": "Allow to (re)set finalize agent. * Design choice: no state restrictions on setting this, so that we can fix fat finger mistakes."}, "setMultisig(address)": {"notice": "Allow to change the team multisig address in the case of emergency. * This allows to save a deployed crowdsale wallet in the case the crowdsale has not yet begun (we have done only few test transactions). After the crowdsale is going then multisig address stays locked for the safety reasons."}, "setOwnerTestValue(uint256)": {"notice": "This is for manual testing of multisig wallet interaction "}, "setPricingStrategy(address)": {"notice": "Allow to (re)set pricing strategy. * Design choice: no state restrictions on the set, so that we can fix fat finger mistakes."}, "setRequireCustomerId(bool)": {"notice": "Set policy do we need to have server-side customer ids for the investments. "}, "setRequireSignedAddress(bool,address)": {"notice": "Set policy if all investors must be cleared on the server side first. * This is e.g. for the accredited investor clearing. "}}}}, "settings": {"compilationTarget": {"contracts/UncappedCrowdsale.sol": "UncappedCrowdsale"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/Crowdsale.sol": {"keccak256": "0x2697c26528f64bb954a7c2547d3b43317d2d2b02c7d9d05a7b1ab388cd79f65d", "urls": ["bzzr://f28b280794222114141c51dd5c388d403a7c98d8b51e04170a0e294246d5164b"]}, "contracts/CrowdsaleBase.sol": {"keccak256": "0xe2c9ed11183ce705616980df7b02544d72fe18b40395da7d9d4bcb621fb87871", "urls": ["bzzr://07f3887ba0d0eb3248b1ad3581480ed71a2fe70a47dcc283c4e97c8c92e0790a"]}, "contracts/FinalizeAgent.sol": {"keccak256": "0x309fd0510e0b3e2b5044e33f7c80cfb2d6f2a5697e41a5f185931d65770cfea9", "urls": ["bzzr://4e7ed6f82c0f542e92e56c12566b2ecd7666730865bf12566c27587ec64160ac"]}, "contracts/FractionalERC20.sol": {"keccak256": "0x75bc4ad90a8b13ce961c89b1bf405776f616e019d3a2720168f8e52be223198f", "urls": ["bzzr://6a3688f12da1a5c890ef06f80f883f6c5370886092d38a1b33cd4219b718478b"]}, "contracts/Haltable.sol": {"keccak256": "0x265dcf25e7c9ab4b6eecd2181f1b71334a1b5381a60f8db7d9526dab120f4b70", "urls": ["bzzr://d522e00fa9e075941469dd81738b59fdb99ce3c12cdc39e33abe40b588c4da9b"]}, "contracts/MintableToken.sol": {"keccak256": "0x650e1d6b2bedcd36508918357c7cf4f36fdd093cd0c4d6342f4dcd3bdcdd7578", "urls": ["bzzr://7ba2ac0480d428066a18727e2adb76ba56856ecd37b4420e801131ec8f8f4be3"]}, "contracts/PricingStrategy.sol": {"keccak256": "0x8df5093b7d07168ad994f9176de0bd2268f6563b1e8a3a448d8cfe7fe246c628", "urls": ["bzzr://ef5c944d51f739ab34e2c951d6ac82a7152e6bb844058a8e57bae52c14cbe16b"]}, "contracts/Recoverable.sol": {"keccak256": "0x311a332cdd87df6e00057f5455f4e68b043b5dbe211f6d68bc64e20817515635", "urls": ["bzzr://4fd99bcfb93baed6e7c8d22ee9ecc5c8346a1aa98288e77b01333b2c5d3f582d"]}, "contracts/SafeMathLib.sol": {"keccak256": "0x501bfe31e274b9a5591f7c540bdced4d4312e27d4f19599147c9bbca3d9c6b18", "urls": ["bzzr://a80935ebddb06c247d71372d4e5833ee029f08633bd0fe4a274a57009567e5b9"]}, "contracts/StandardTokenExt.sol": {"keccak256": "0x9ea2d4cec4dccd5639c05e6c23dd027d80b5e5a20abd99b280ab7b2631b5a5fc", "urls": ["bzzr://a52d8fc5a21bd83997aff19128e00dceb251df712207b61223894c8b7f42d5ff"]}, "contracts/UncappedCrowdsale.sol": {"keccak256": "0xba56ad309742dffe5ff5fd759e19623483d772869314a1a82ed30adb6a784cb3", "urls": ["bzzr://af4e7e11ee75dc4ae2af5d95d01a8da056bb9b4e47259c2e651706e2c7a10da4"]}, "zeppelin/contracts/math/SafeMath.sol": {"keccak256": "0x341ba8cb467a3623e819ba1a683ac1d264005186f308505214e5f6bc89446a08", "urls": ["bzzr://59b5652ee4e4a1b5a8f1a8906e14c84af43d636cf5ca0725cc1813aabe4c8c17"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}, "zeppelin/contracts/token/ERC20/BasicToken.sol": {"keccak256": "0x948404468d61ff35ea4194650670408dabd65da7f905a1c16888ab84520bf39e", "urls": ["bzzr://ea75e20f95d7e4e10394fe6bfaa8eee56b4757c2a6f1e8df4180d33afa621935"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}, "zeppelin/contracts/token/ERC20/StandardToken.sol": {"keccak256": "0xd2b344a5259e19ec143074cfa65637a10c40b68395c59808c4af13bccbb2de55", "urls": ["bzzr://d61a01175a7ca1ba9f4403de603c20b897e33ec425aef2d9f8a7f9ddfdfaf5b2"]}}, "version": 1}, "name": "UncappedCrowdsale", "ordered_full_dependencies": ["SafeMathLib"], "source_path": "contracts/UncappedCrowdsale.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Safe unsigned safe math.\n *\n * https://blog.aragon.one/library-driven-development-in-solidity-2bebcaf88736#.750gwtwli\n *\n * Originally from https://raw.githubusercontent.com/AragonOne/zeppelin-solidity/master/contracts/SafeMathLib.sol\n *\n * Maintained here until merged to mainline zeppelin-solidity.\n *\n */\nlibrary SafeMathLib {\n\n function times(uint a, uint b) returns (uint) {\n uint c = a * b;\n assert(a == 0 || c / a == b);\n return c;\n }\n\n function minus(uint a, uint b) returns (uint) {\n assert(b <= a);\n return a - b;\n }\n\n function plus(uint a, uint b) returns (uint) {\n uint c = a + b;\n assert(c>=a);\n return c;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Interface for defining crowdsale pricing.\n */\ncontract PricingStrategy {\n\n /** Interface declaration. */\n function isPricingStrategy() public constant returns (bool) {\n return true;\n }\n\n /** Self check if all references are correctly set.\n *\n * Checks that pricing strategy matches crowdsale parameters.\n */\n function isSane(address crowdsale) public constant returns (bool) {\n return true;\n }\n\n /**\n * @dev Pricing tells if this is a presale purchase or not.\n @param purchaser Address of the purchaser\n @return False by default, true if a presale purchaser\n */\n function isPresalePurchase(address purchaser) public constant returns (bool) {\n return false;\n }\n\n /**\n * When somebody tries to buy tokens for X eth, calculate how many tokens they get.\n *\n *\n * @param value - What is the value of the transaction send in as wei\n * @param tokensSold - how much tokens have been sold this far\n * @param weiRaised - how much money has been raised this far in the main token sale - this number excludes presale\n * @param msgSender - who is the investor of this transaction\n * @param decimals - how many decimal units the token has\n * @return Amount of tokens the investor receives\n */\n function calculatePrice(uint value, uint weiRaised, uint tokensSold, address msgSender, uint decimals) public constant returns (uint tokenAmount);\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Finalize agent defines what happens at the end of succeseful crowdsale.\n *\n * - Allocate tokens for founders, bounties and community\n * - Make tokens transferable\n * - etc.\n */\ncontract FinalizeAgent {\n\n function isFinalizeAgent() public constant returns(bool) {\n return true;\n }\n\n /** Return true if we can run finalizeCrowdsale() properly.\n *\n * This is a safety check function that doesn't allow crowdsale to begin\n * unless the finalizer has been set up properly.\n */\n function isSane() public constant returns (bool);\n\n /** Called once by crowdsale finalize() if the sale was success. */\n function finalizeCrowdsale();\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n\n/**\n * A token that defines fractional units as decimals.\n */\ncontract FractionalERC20 is ERC20 {\n\n uint public decimals;\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n/*\n * Haltable\n *\n * Abstract contract that allows children to implement an\n * emergency stop mechanism. Differs from Pausable by causing a throw when in halt mode.\n *\n *\n * Originally envisioned in FirstBlood ICO contract.\n */\ncontract Haltable is Ownable {\n bool public halted;\n\n modifier stopInEmergency {\n if (halted) throw;\n _;\n }\n\n modifier stopNonOwnersInEmergency {\n if (halted && msg.sender != owner) throw;\n _;\n }\n\n modifier onlyInEmergency {\n if (!halted) throw;\n _;\n }\n\n // called by the owner on emergency, triggers stopped state\n function halt() external onlyOwner {\n halted = true;\n }\n\n // called by the owner on end of emergency, returns to normal state\n function unhalt() external onlyOwner onlyInEmergency {\n halted = false;\n }\n\n}\n\n\n\n\n\n\n\n/**\n * Crowdsale state machine without buy functionality.\n *\n * Implements basic state machine logic, but leaves out all buy functions,\n * so that subclasses can implement their own buying logic.\n *\n *\n * For the default buy() implementation see Crowdsale.sol.\n */\ncontract CrowdsaleBase is Haltable {\n\n /* Max investment count when we are still allowed to change the multisig address */\n uint public MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE = 5;\n\n using SafeMathLib for uint;\n\n /* The token we are selling */\n FractionalERC20 public token;\n\n /* How we are going to price our offering */\n PricingStrategy public pricingStrategy;\n\n /* Post-success callback */\n FinalizeAgent public finalizeAgent;\n\n /* tokens will be transfered from this address */\n address public multisigWallet;\n\n /* if the funding goal is not reached, investors may withdraw their funds */\n uint public minimumFundingGoal;\n\n /* the UNIX timestamp start date of the crowdsale */\n uint public startsAt;\n\n /* the UNIX timestamp end date of the crowdsale */\n uint public endsAt;\n\n /* the number of tokens already sold through this contract*/\n uint public tokensSold = 0;\n\n /* How many wei of funding we have raised */\n uint public weiRaised = 0;\n\n /* Calculate incoming funds from presale contracts and addresses */\n uint public presaleWeiRaised = 0;\n\n /* How many distinct addresses have invested */\n uint public investorCount = 0;\n\n /* How much wei we have returned back to the contract after a failed crowdfund. */\n uint public loadedRefund = 0;\n\n /* How much wei we have given back to investors.*/\n uint public weiRefunded = 0;\n\n /* Has this crowdsale been finalized */\n bool public finalized;\n\n /** How much ETH each address has invested to this crowdsale */\n mapping (address => uint256) public investedAmountOf;\n\n /** How much tokens this crowdsale has credited for each investor address */\n mapping (address => uint256) public tokenAmountOf;\n\n /** Addresses that are allowed to invest even before ICO offical opens. For testing, for ICO partners, etc. */\n mapping (address => bool) public earlyParticipantWhitelist;\n\n /** This is for manul testing for the interaction from owner wallet. You can set it to any value and inspect this in blockchain explorer to see that crowdsale interaction works. */\n uint public ownerTestValue;\n\n /** State machine\n *\n * - Preparing: All contract initialization calls and variables have not been set yet\n * - Prefunding: We have not passed start time yet\n * - Funding: Active crowdsale\n * - Success: Minimum funding goal reached\n * - Failure: Minimum funding goal not reached before ending time\n * - Finalized: The finalized has been called and succesfully executed\n * - Refunding: Refunds are loaded on the contract for reclaim.\n */\n enum State{Unknown, Preparing, PreFunding, Funding, Success, Failure, Finalized, Refunding}\n\n // A new investment was made\n event Invested(address investor, uint weiAmount, uint tokenAmount, uint128 customerId);\n\n // Refund was processed for a contributor\n event Refund(address investor, uint weiAmount);\n\n // The rules were changed what kind of investments we accept\n event InvestmentPolicyChanged(bool newRequireCustomerId, bool newRequiredSignedAddress, address newSignerAddress);\n\n // Address early participation whitelist status changed\n event Whitelisted(address addr, bool status);\n\n // Crowdsale end time has been changed\n event EndsAtChanged(uint newEndsAt);\n\n function CrowdsaleBase(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal) {\n\n owner = msg.sender;\n\n token = FractionalERC20(_token);\n setPricingStrategy(_pricingStrategy);\n\n multisigWallet = _multisigWallet;\n if(multisigWallet == 0) {\n throw;\n }\n\n if(_start == 0) {\n throw;\n }\n\n startsAt = _start;\n\n if(_end == 0) {\n throw;\n }\n\n endsAt = _end;\n\n // Don't mess the dates\n if(startsAt >= endsAt) {\n throw;\n }\n\n // Minimum funding goal can be zero\n minimumFundingGoal = _minimumFundingGoal;\n }\n\n /**\n * Don't expect to just send in money and get tokens.\n */\n function() payable {\n throw;\n }\n\n /**\n * @dev Make an investment.\n *\n * Crowdsale must be running for one to invest.\n * We must have not pressed the emergency brake.\n *\n * @param receiver The Ethereum address who receives the tokens\n * @param customerId (optional) UUID v4 to track the successful payments on the server side'\n * @param tokenAmount Amount of tokens which be credited to receiver\n *\n * @return tokensBought How mony tokens were bought\n */\n function buyTokens(address receiver, uint128 customerId, uint256 tokenAmount) stopInEmergency internal returns(uint tokensBought) {\n\n // Determine if it's a good time to accept investment from this participant\n if(getState() == State.PreFunding) {\n // Are we whitelisted for early deposit\n if(!earlyParticipantWhitelist[receiver]) {\n throw;\n }\n } else if(getState() == State.Funding) {\n // Retail participants can only come in when the crowdsale is running\n // pass\n } else {\n // Unwanted state\n throw;\n }\n\n uint weiAmount = msg.value;\n\n // Dust transaction\n require(tokenAmount != 0);\n\n if(investedAmountOf[receiver] == 0) {\n // A new investor\n investorCount++;\n }\n\n // Update investor\n investedAmountOf[receiver] = investedAmountOf[receiver].plus(weiAmount);\n tokenAmountOf[receiver] = tokenAmountOf[receiver].plus(tokenAmount);\n\n // Update totals\n weiRaised = weiRaised.plus(weiAmount);\n tokensSold = tokensSold.plus(tokenAmount);\n\n if(pricingStrategy.isPresalePurchase(receiver)) {\n presaleWeiRaised = presaleWeiRaised.plus(weiAmount);\n }\n\n // Check that we did not bust the cap\n require(!isBreakingCap(weiAmount, tokenAmount, weiRaised, tokensSold));\n\n assignTokens(receiver, tokenAmount);\n\n // Pocket the money, or fail the crowdsale if we for some reason cannot send the money to our multisig\n if(!multisigWallet.send(weiAmount)) throw;\n\n // Tell us invest was success\n Invested(receiver, weiAmount, tokenAmount, customerId);\n\n return tokenAmount;\n }\n\n /**\n * @dev Make an investment based on pricing strategy\n *\n * This is a wrapper for buyTokens(), but the amount of tokens receiver will\n * have depends on the pricing strategy used.\n *\n * @param receiver The Ethereum address who receives the tokens\n * @param customerId (optional) UUID v4 to track the successful payments on the server side'\n *\n * @return tokensBought How mony tokens were bought\n */\n function investInternal(address receiver, uint128 customerId) stopInEmergency internal returns(uint tokensBought) {\n return buyTokens(receiver, customerId, pricingStrategy.calculatePrice(msg.value, weiRaised - presaleWeiRaised, tokensSold, msg.sender, token.decimals()));\n }\n\n /**\n * @dev Calculate tokens user will have for their purchase\n *\n * @param weisTotal How much ethers (in wei) the user putssssss in\n * @param pricePerToken What is the price for one token\n *\n * @return tokensTotal which is received tokens, token decimals included\n */\n function calculateTokens(uint256 weisTotal, uint256 pricePerToken) public constant returns(uint tokensTotal) {\n // pricePerToken is how many full tokens, token decimal place included, you get for wei amount.\n // Because, in theory, decimal amount can vary, we do the exponent calculation here,\n // though gas wise using 10**18 constant would be much simpler.\n // Furthermore we could use rough amounts and take in raw wei per tokens amount,\n // but we lose too much accuracy for generic calculations, thus all these are\n // practically implemented as 10**18 fixed points.\n uint multiplier = 10 ** token.decimals();\n return weisTotal.times(multiplier)/pricePerToken;\n }\n\n /**\n * Finalize a succcesful crowdsale.\n *\n * The owner can triggre a call the contract that provides post-crowdsale actions, like releasing the tokens.\n */\n function finalize() public inState(State.Success) onlyOwner stopInEmergency {\n\n // Already finalized\n if(finalized) {\n throw;\n }\n\n // Finalizing is optional. We only call it if we are given a finalizing agent.\n if(address(finalizeAgent) != 0) {\n finalizeAgent.finalizeCrowdsale();\n }\n\n finalized = true;\n }\n\n /**\n * Allow to (re)set finalize agent.\n *\n * Design choice: no state restrictions on setting this, so that we can fix fat finger mistakes.\n */\n function setFinalizeAgent(FinalizeAgent addr) onlyOwner {\n finalizeAgent = addr;\n\n // Don't allow setting bad agent\n if(!finalizeAgent.isFinalizeAgent()) {\n throw;\n }\n }\n\n /**\n * Allow crowdsale owner to close early or extend the crowdsale.\n *\n * This is useful e.g. for a manual soft cap implementation:\n * - after X amount is reached determine manual closing\n *\n * This may put the crowdsale to an invalid state,\n * but we trust owners know what they are doing.\n *\n */\n function setEndsAt(uint time) onlyOwner {\n\n if(now > time) {\n throw; // Don't change past\n }\n\n if(startsAt > time) {\n throw; // Prevent human mistakes\n }\n\n endsAt = time;\n EndsAtChanged(endsAt);\n }\n\n /**\n * Allow to (re)set pricing strategy.\n *\n * Design choice: no state restrictions on the set, so that we can fix fat finger mistakes.\n */\n function setPricingStrategy(PricingStrategy _pricingStrategy) onlyOwner {\n pricingStrategy = _pricingStrategy;\n\n // Don't allow setting bad agent\n if(!pricingStrategy.isPricingStrategy()) {\n throw;\n }\n }\n\n /**\n * Allow to change the team multisig address in the case of emergency.\n *\n * This allows to save a deployed crowdsale wallet in the case the crowdsale has not yet begun\n * (we have done only few test transactions). After the crowdsale is going\n * then multisig address stays locked for the safety reasons.\n */\n function setMultisig(address addr) public onlyOwner {\n\n // Change\n if(investorCount > MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE) {\n throw;\n }\n\n multisigWallet = addr;\n }\n\n /**\n * Allow load refunds back on the contract for the refunding.\n *\n * The team can transfer the funds back on the smart contract in the case the minimum goal was not reached..\n */\n function loadRefund() public payable inState(State.Failure) {\n if(msg.value == 0) throw;\n loadedRefund = loadedRefund.plus(msg.value);\n }\n\n /**\n * Investors can claim refund.\n *\n * Note that any refunds from proxy buyers should be handled separately,\n * and not through this contract.\n */\n function refund() public inState(State.Refunding) {\n uint256 weiValue = investedAmountOf[msg.sender];\n if (weiValue == 0) throw;\n investedAmountOf[msg.sender] = 0;\n weiRefunded = weiRefunded.plus(weiValue);\n Refund(msg.sender, weiValue);\n if (!msg.sender.send(weiValue)) throw;\n }\n\n /**\n * @return true if the crowdsale has raised enough money to be a successful.\n */\n function isMinimumGoalReached() public constant returns (bool reached) {\n return weiRaised >= minimumFundingGoal;\n }\n\n /**\n * Check if the contract relationship looks good.\n */\n function isFinalizerSane() public constant returns (bool sane) {\n return finalizeAgent.isSane();\n }\n\n /**\n * Check if the contract relationship looks good.\n */\n function isPricingSane() public constant returns (bool sane) {\n return pricingStrategy.isSane(address(this));\n }\n\n /**\n * Crowdfund state machine management.\n *\n * We make it a function and do not assign the result to a variable, so there is no chance of the variable being stale.\n */\n function getState() public constant returns (State) {\n if(finalized) return State.Finalized;\n else if (address(finalizeAgent) == 0) return State.Preparing;\n else if (!finalizeAgent.isSane()) return State.Preparing;\n else if (!pricingStrategy.isSane(address(this))) return State.Preparing;\n else if (block.timestamp < startsAt) return State.PreFunding;\n else if (block.timestamp <= endsAt && !isCrowdsaleFull()) return State.Funding;\n else if (isMinimumGoalReached()) return State.Success;\n else if (!isMinimumGoalReached() && weiRaised > 0 && loadedRefund >= weiRaised) return State.Refunding;\n else return State.Failure;\n }\n\n /** This is for manual testing of multisig wallet interaction */\n function setOwnerTestValue(uint val) onlyOwner {\n ownerTestValue = val;\n }\n\n /**\n * Allow addresses to do early participation.\n *\n * TODO: Fix spelling error in the name\n */\n function setEarlyParicipantWhitelist(address addr, bool status) onlyOwner {\n earlyParticipantWhitelist[addr] = status;\n Whitelisted(addr, status);\n }\n\n\n /** Interface marker. */\n function isCrowdsale() public constant returns (bool) {\n return true;\n }\n\n //\n // Modifiers\n //\n\n /** Modified allowing execution only if the crowdsale is currently running. */\n modifier inState(State state) {\n if(getState() != state) throw;\n _;\n }\n\n\n //\n // Abstract functions\n //\n\n /**\n * Check if the current invested breaks our cap rules.\n *\n *\n * The child contract must define their own cap setting rules.\n * We allow a lot of flexibility through different capping strategies (ETH, token count)\n * Called from invest().\n *\n * @param weiAmount The amount of wei the investor tries to invest in the current transaction\n * @param tokenAmount The amount of tokens we try to give to the investor in the current transaction\n * @param weiRaisedTotal What would be our total raised balance after this transaction\n * @param tokensSoldTotal What would be our total sold tokens count after this transaction\n *\n * @return true if taking this investment would break our cap rules\n */\n function isBreakingCap(uint weiAmount, uint tokenAmount, uint weiRaisedTotal, uint tokensSoldTotal) constant returns (bool limitBroken);\n\n /**\n * Check if the current crowdsale is full and we can no longer sell any tokens.\n */\n function isCrowdsaleFull() public constant returns (bool);\n\n /**\n * Create new tokens or transfer issued tokens to the investor depending on the cap model.\n */\n function assignTokens(address receiver, uint tokenAmount) internal;\n}\n\n\n\n/**\n * Abstract base contract for token sales with the default buy entry points.\n *\n * Handle\n * - start and end dates\n * - accepting investments\n * - minimum funding goal and refund\n * - various statistics during the crowdfund\n * - different pricing strategies\n * - different investment policies (require server side customer id, allow only whitelisted addresses)\n *\n * Does not Handle\n *\n * - Token allocation (minting vs. transfer)\n * - Cap rules\n *\n */\ncontract Crowdsale is CrowdsaleBase {\n\n /* Do we need to have unique contributor id for each customer */\n bool public requireCustomerId;\n\n /**\n * Do we verify that contributor has been cleared on the server side (accredited investors only).\n * This method was first used in FirstBlood crowdsale to ensure all contributors have accepted terms on sale (on the web).\n */\n bool public requiredSignedAddress;\n\n /* Server side address that signed allowed contributors (Ethereum addresses) that can participate the crowdsale */\n address public signerAddress;\n\n function Crowdsale(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal) CrowdsaleBase(_token, _pricingStrategy, _multisigWallet, _start, _end, _minimumFundingGoal) {\n }\n\n /**\n * Preallocate tokens for the early investors.\n *\n * Preallocated tokens have been sold before the actual crowdsale opens.\n * This function mints the tokens and moves the crowdsale needle.\n *\n * Investor count is not handled; it is assumed this goes for multiple investors\n * and the token distribution happens outside the smart contract flow.\n *\n * No money is exchanged, as the crowdsale team already have received the payment.\n *\n * @param fullTokens tokens as full tokens - decimal places added internally\n * @param weiPrice Price of a single full token in wei\n *\n */\n function preallocate(address receiver, uint fullTokens, uint weiPrice) public onlyOwner {\n\n uint tokenAmount = fullTokens * 10**token.decimals();\n uint weiAmount = weiPrice * fullTokens; // This can be also 0, we give out tokens for free\n\n weiRaised = weiRaised.plus(weiAmount);\n tokensSold = tokensSold.plus(tokenAmount);\n\n investedAmountOf[receiver] = investedAmountOf[receiver].plus(weiAmount);\n tokenAmountOf[receiver] = tokenAmountOf[receiver].plus(tokenAmount);\n\n assignTokens(receiver, tokenAmount);\n\n // Tell us invest was success\n Invested(receiver, weiAmount, tokenAmount, 0);\n }\n\n /**\n * Allow anonymous contributions to this crowdsale.\n */\n function investWithSignedAddress(address addr, uint128 customerId, uint8 v, bytes32 r, bytes32 s) public payable {\n bytes32 hash = sha256(addr);\n if (ecrecover(hash, v, r, s) != signerAddress) throw;\n if(customerId == 0) throw; // UUIDv4 sanity check\n investInternal(addr, customerId);\n }\n\n /**\n * Track who is the customer making the payment so we can send thank you email.\n */\n function investWithCustomerId(address addr, uint128 customerId) public payable {\n if(requiredSignedAddress) throw; // Crowdsale allows only server-side signed participants\n if(customerId == 0) throw; // UUIDv4 sanity check\n investInternal(addr, customerId);\n }\n\n /**\n * Allow anonymous contributions to this crowdsale.\n */\n function invest(address addr) public payable {\n if(requireCustomerId) throw; // Crowdsale needs to track participants for thank you email\n if(requiredSignedAddress) throw; // Crowdsale allows only server-side signed participants\n investInternal(addr, 0);\n }\n\n /**\n * Invest to tokens, recognize the payer and clear his address.\n *\n */\n function buyWithSignedAddress(uint128 customerId, uint8 v, bytes32 r, bytes32 s) public payable {\n investWithSignedAddress(msg.sender, customerId, v, r, s);\n }\n\n /**\n * Invest to tokens, recognize the payer.\n *\n */\n function buyWithCustomerIdWithChecksum(uint128 customerId, bytes1 checksum) public payable {\n // see customerid.py\n if (bytes1(sha3(customerId)) != checksum) throw;\n investWithCustomerId(msg.sender, customerId);\n }\n\n /**\n * Legacy API signature.\n */\n function buyWithCustomerId(uint128 customerId) public payable {\n investWithCustomerId(msg.sender, customerId);\n }\n\n /**\n * The basic entry point to participate the crowdsale process.\n *\n * Pay for funding, get invested tokens back in the sender address.\n */\n function buy() public payable {\n invest(msg.sender);\n }\n\n /**\n * Set policy do we need to have server-side customer ids for the investments.\n *\n */\n function setRequireCustomerId(bool value) onlyOwner {\n requireCustomerId = value;\n InvestmentPolicyChanged(requireCustomerId, requiredSignedAddress, signerAddress);\n }\n\n /**\n * Set policy if all investors must be cleared on the server side first.\n *\n * This is e.g. for the accredited investor clearing.\n *\n */\n function setRequireSignedAddress(bool value, address _signerAddress) onlyOwner {\n requiredSignedAddress = value;\n signerAddress = _signerAddress;\n InvestmentPolicyChanged(requireCustomerId, requiredSignedAddress, signerAddress);\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n assert(c / a == b);\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n\n\n\n/**\n * @title Basic token\n * @dev Basic version of StandardToken, with no allowances.\n */\ncontract BasicToken is ERC20Basic {\n using SafeMath for uint256;\n\n mapping(address => uint256) balances;\n\n uint256 totalSupply_;\n\n /**\n * @dev total number of tokens in existence\n */\n function totalSupply() public view returns (uint256) {\n return totalSupply_;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param _to The address to transfer to.\n * @param _value The amount to be transferred.\n */\n function transfer(address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[msg.sender]);\n\n // SafeMath.sub will throw if there is not enough balance.\n balances[msg.sender] = balances[msg.sender].sub(_value);\n balances[_to] = balances[_to].add(_value);\n Transfer(msg.sender, _to, _value);\n return true;\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param _owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address _owner) public view returns (uint256 balance) {\n return balances[_owner];\n }\n\n}\n\n\n\n\n/**\n * @title Standard ERC20 token\n *\n * @dev Implementation of the basic standard token.\n * @dev https://github.com/ethereum/EIPs/issues/20\n * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol\n */\ncontract StandardToken is ERC20, BasicToken {\n\n mapping (address => mapping (address => uint256)) internal allowed;\n\n\n /**\n * @dev Transfer tokens from one address to another\n * @param _from address The address which you want to send tokens from\n * @param _to address The address which you want to transfer to\n * @param _value uint256 the amount of tokens to be transferred\n */\n function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[_from]);\n require(_value <= allowed[_from][msg.sender]);\n\n balances[_from] = balances[_from].sub(_value);\n balances[_to] = balances[_to].add(_value);\n allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);\n Transfer(_from, _to, _value);\n return true;\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n *\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param _spender The address which will spend the funds.\n * @param _value The amount of tokens to be spent.\n */\n function approve(address _spender, uint256 _value) public returns (bool) {\n allowed[msg.sender][_spender] = _value;\n Approval(msg.sender, _spender, _value);\n return true;\n }\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param _owner address The address which owns the funds.\n * @param _spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address _owner, address _spender) public view returns (uint256) {\n return allowed[_owner][_spender];\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(address _spender, uint _addedValue) public returns (bool) {\n allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {\n uint oldValue = allowed[msg.sender][_spender];\n if (_subtractedValue > oldValue) {\n allowed[msg.sender][_spender] = 0;\n } else {\n allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);\n }\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\ncontract Recoverable is Ownable {\n\n /// @dev Empty constructor (for now)\n function Recoverable() {\n }\n\n /// @dev This will be invoked by the owner, when owner wants to rescue tokens\n /// @param token Token which will we rescue to the owner from the contract\n function recoverTokens(ERC20Basic token) onlyOwner public {\n token.transfer(owner, tokensToBeReturned(token));\n }\n\n /// @dev Interface function, can be overwritten by the superclass\n /// @param token Token which balance we will check and return\n /// @return The amount of tokens (in smallest denominator) the contract owns\n function tokensToBeReturned(ERC20Basic token) public returns (uint) {\n return token.balanceOf(this);\n }\n}\n\n\n\n/**\n * Standard EIP-20 token with an interface marker.\n *\n * @notice Interface marker is used by crowdsale contracts to validate that addresses point a good token contract.\n *\n */\ncontract StandardTokenExt is StandardToken, Recoverable {\n\n /* Interface declaration */\n function isToken() public constant returns (bool weAre) {\n return true;\n }\n}\n\n\n\n\n/**\n * A token that can increase its supply by another contract.\n *\n * This allows uncapped crowdsale by dynamically increasing the supply when money pours in.\n * Only mint agents, contracts whitelisted by owner, can mint new tokens.\n *\n */\ncontract MintableToken is StandardTokenExt {\n\n using SafeMathLib for uint;\n\n bool public mintingFinished = false;\n\n /** List of agents that are allowed to create new tokens */\n mapping (address => bool) public mintAgents;\n\n event MintingAgentChanged(address addr, bool state);\n event Minted(address receiver, uint amount);\n\n /**\n * Create new tokens and allocate them to an address..\n *\n * Only callably by a crowdsale contract (mint agent).\n */\n function mint(address receiver, uint amount) onlyMintAgent canMint public {\n totalSupply_ = totalSupply_.plus(amount);\n balances[receiver] = balances[receiver].plus(amount);\n\n // This will make the mint transaction apper in EtherScan.io\n // We can remove this after there is a standardized minting event\n Transfer(0, receiver, amount);\n }\n\n /**\n * Owner can allow a crowdsale contract to mint new tokens.\n */\n function setMintAgent(address addr, bool state) onlyOwner canMint public {\n mintAgents[addr] = state;\n MintingAgentChanged(addr, state);\n }\n\n modifier onlyMintAgent() {\n // Only crowdsale contracts are allowed to mint new tokens\n if(!mintAgents[msg.sender]) {\n throw;\n }\n _;\n }\n\n /** Make sure we are not done yet. */\n modifier canMint() {\n if(mintingFinished) throw;\n _;\n }\n}\n\n\n\n/**\n * Uncapped ICO crowdsale contract.\n *\n *\n * Intended usage\n *\n * - A short time window\n * - Flat price\n * - No cap\n *\n */\ncontract UncappedCrowdsale is Crowdsale {\n\n function UncappedCrowdsale(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal) Crowdsale(_token, _pricingStrategy, _multisigWallet, _start, _end, _minimumFundingGoal) {\n\n }\n\n /**\n * Called from invest() to confirm if the curret investment does not break our cap rule.\n */\n function isBreakingCap(uint weiAmount, uint tokenAmount, uint weiRaisedTotal, uint tokensSoldTotal) constant returns (bool limitBroken) {\n return false;\n }\n\n function isCrowdsaleFull() public constant returns (bool) {\n // Uncle Scrooge\n return false;\n }\n\n function assignTokens(address receiver, uint tokenAmount) internal {\n MintableToken mintableToken = MintableToken(token);\n mintableToken.mint(receiver, tokenAmount);\n }\n}\n"}, "UnrestrictedTransferAgent": {"abi": [{"constant": true, "inputs": [{"name": "from", "type": "address"}, {"name": "to", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "verify", "outputs": [{"name": "newValue", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}], "bytecode": "0x608060405234801561001057600080fd5b5060bb8061001f6000396000f300608060405260043610603e5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663ad07699481146043575b600080fd5b348015604e57600080fd5b50607773ffffffffffffffffffffffffffffffffffffffff600435811690602435166044356089565b60408051918252519081900360200190f35b929150505600a165627a7a7230582037db7f336ecdd710e64701aeb63eb44adb37e3900d173153979de0395011caa30029", "bytecode_runtime": "0x608060405260043610603e5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663ad07699481146043575b600080fd5b348015604e57600080fd5b50607773ffffffffffffffffffffffffffffffffffffffff600435811690602435166044356089565b60408051918252519081900360200190f35b929150505600a165627a7a7230582037db7f336ecdd710e64701aeb63eb44adb37e3900d173153979de0395011caa30029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": true, "inputs": [{"name": "from", "type": "address"}, {"name": "to", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "verify", "outputs": [{"name": "newValue", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}], "devdoc": {"methods": {"verify(address,address,uint256)": {"details": "Checking if transfer can happen, and if so, what is the right amount", "params": {"from": "The account sending the tokens", "to": "The account receiving the tokens", "value": "The indended amount"}, "return": "The actual amount permitted"}}}, "userdoc": {"methods": {}}}, "settings": {"compilationTarget": {"contracts/security-token/UnrestrictedTransferAgent.sol": "UnrestrictedTransferAgent"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/security-token/SecurityTransferAgentInterface.sol": {"keccak256": "0x23b8a61926435e2c583480c0de72a99b4f7ec8a4213ffc46711f83ecdeaf9186", "urls": ["bzzr://36be13b6cf1389357679705bd18969409ecde684ace2d9c5b606d8986e0231cd"]}, "contracts/security-token/UnrestrictedTransferAgent.sol": {"keccak256": "0x4d6b48208775f87070bb0885ecac8cd804da813c451eacdf20031127fe5992f4", "urls": ["bzzr://514bfb255f786b42115e2c779d2b1f10a1e8997959e78092c2c71b06c4ac15cb"]}}, "version": 1}, "name": "UnrestrictedTransferAgent", "ordered_full_dependencies": [], "source_path": "contracts/security-token/UnrestrictedTransferAgent.sol", "source": "\n\ninterface SecurityTransferAgent {\n function verify(address from, address to, uint256 value) public view returns (uint256 newValue);\n}\n\n\n/** Transfer agent for a security token that does not limit transfers any way */\ncontract UnrestrictedTransferAgent is SecurityTransferAgent {\n\n function UnrestrictedTransferAgent() {\n }\n\n /**\n * @dev Checking if transfer can happen, and if so, what is the right amount\n *\n * @param from The account sending the tokens\n * @param to The account receiving the tokens\n * @param value The indended amount\n * @return The actual amount permitted\n */\n function verify(address from, address to, uint256 value) public view returns (uint256 newValue) {\n return value;\n }\n}\n"}, "UpgradeAgent": {"abi": [{"constant": true, "inputs": [], "name": "originalSupply", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isUpgradeAgent", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_from", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "upgradeFrom", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}], "bytecode": "0x", "bytecode_runtime": "0x", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": null, "name": "UpgradeAgent", "ordered_full_dependencies": [], "source_path": "contracts/UpgradeAgent.sol"}, "UpgradeableToken": {"abi": [{"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "approve", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "recoverTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_from", "type": "address"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "uint256"}], "name": "upgrade", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "upgradeAgent", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "upgradeMaster", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_subtractedValue", "type": "uint256"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getUpgradeState", "outputs": [{"name": "", "type": "uint8"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "canUpgrade", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "tokensToBeReturned", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalUpgraded", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_addedValue", "type": "uint256"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "agent", "type": "address"}], "name": "setUpgradeAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}, {"name": "_spender", "type": "address"}], "name": "allowance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isToken", "outputs": [{"name": "weAre", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "master", "type": "address"}], "name": "setUpgradeMaster", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [{"name": "_upgradeMaster", "type": "address"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "_from", "type": "address"}, {"indexed": true, "name": "_to", "type": "address"}, {"indexed": false, "name": "_value", "type": "uint256"}], "name": "Upgrade", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "agent", "type": "address"}], "name": "UpgradeAgentSet", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}, {"indexed": true, "name": "spender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "bytecode": "0x608060405234801561001057600080fd5b50604051602080610f6c83398101604052516003805433600160a060020a03199182161790915560048054909116600160a060020a03909216919091179055610f0e8061005e6000396000f30060806040526004361061011c5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663095ea7b3811461012157806316114acd1461015957806318160ddd1461017c57806323b872dd146101a357806345977d03146101cd5780635de4ccb0146101e5578063600440cb14610216578063661884631461022b57806370a082311461024f5780638444b391146102705780638da5cb5b146102a95780639738968c146102be578063a9059cbb146102d3578063c45d19db146102f7578063c752ff6214610318578063d73dd6231461032d578063d7e7088a14610351578063dd62ed3e14610372578063eefa597b146102be578063f2fde38b14610399578063ffeb7d75146103ba575b600080fd5b34801561012d57600080fd5b50610145600160a060020a03600435166024356103db565b604080519115158252519081900360200190f35b34801561016557600080fd5b5061017a600160a060020a0360043516610441565b005b34801561018857600080fd5b50610191610511565b60408051918252519081900360200190f35b3480156101af57600080fd5b50610145600160a060020a0360043581169060243516604435610518565b3480156101d957600080fd5b5061017a60043561068f565b3480156101f157600080fd5b506101fa610800565b60408051600160a060020a039092168252519081900360200190f35b34801561022257600080fd5b506101fa61080f565b34801561023757600080fd5b50610145600160a060020a036004351660243561081e565b34801561025b57600080fd5b50610191600160a060020a036004351661090e565b34801561027c57600080fd5b50610285610929565b6040518082600481111561029557fe5b60ff16815260200191505060405180910390f35b3480156102b557600080fd5b506101fa610974565b3480156102ca57600080fd5b50610145610983565b3480156102df57600080fd5b50610145600160a060020a0360043516602435610988565b34801561030357600080fd5b50610191600160a060020a0360043516610a69565b34801561032457600080fd5b50610191610aff565b34801561033957600080fd5b50610145600160a060020a0360043516602435610b05565b34801561035d57600080fd5b5061017a600160a060020a0360043516610b9e565b34801561037e57600080fd5b50610191600160a060020a0360043581169060243516610d9f565b3480156103a557600080fd5b5061017a600160a060020a0360043516610dca565b3480156103c657600080fd5b5061017a600160a060020a0360043516610e5f565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b600354600160a060020a0316331461045857600080fd5b600354600160a060020a038083169163a9059cbb911661047784610a69565b6040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b1580156104e257600080fd5b505af11580156104f6573d6000803e3d6000fd5b505050506040513d602081101561050c57600080fd5b505050565b6001545b90565b6000600160a060020a038316151561052f57600080fd5b600160a060020a03841660009081526020819052604090205482111561055457600080fd5b600160a060020a038416600090815260026020908152604080832033845290915290205482111561058457600080fd5b600160a060020a0384166000908152602081905260409020546105ad908363ffffffff610eba16565b600160a060020a0380861660009081526020819052604080822093909355908516815220546105e2908363ffffffff610ecc16565b600160a060020a03808516600090815260208181526040808320949094559187168152600282528281203382529091522054610624908363ffffffff610eba16565b600160a060020a03808616600081815260026020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b6000610699610929565b905060038160048111156106a957fe5b14806106c0575060048160048111156106be57fe5b145b15156106cb57600080fd5b8115156106d757600080fd5b336000908152602081905260409020546106f7908363ffffffff610eba16565b3360009081526020819052604090205560015461071a908363ffffffff610eba16565b600155600654610730908363ffffffff610ecc16565b600655600554604080517f753e88e5000000000000000000000000000000000000000000000000000000008152336004820152602481018590529051600160a060020a039092169163753e88e59160448082019260009290919082900301818387803b15801561079f57600080fd5b505af11580156107b3573d6000803e3d6000fd5b5050600554604080518681529051600160a060020a0390921693503392507f7e5c344a8141a805725cb476f76c6953b842222b967edd1f78ddb6e8b3f397ac919081900360200190a35050565b600554600160a060020a031681565b600454600160a060020a031681565b336000908152600260209081526040808320600160a060020a03861684529091528120548083111561087357336000908152600260209081526040808320600160a060020a03881684529091528120556108a8565b610883818463ffffffff610eba16565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a031660009081526020819052604090205490565b6000610933610983565b151561094157506001610515565b600554600160a060020a0316151561095b57506002610515565b600654151561096c57506003610515565b506004610515565b600354600160a060020a031681565b600190565b6000600160a060020a038316151561099f57600080fd5b336000908152602081905260409020548211156109bb57600080fd5b336000908152602081905260409020546109db908363ffffffff610eba16565b3360009081526020819052604080822092909255600160a060020a03851681522054610a0d908363ffffffff610ecc16565b600160a060020a038416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600091600160a060020a038416916370a082319160248082019260209290919082900301818787803b158015610acd57600080fd5b505af1158015610ae1573d6000803e3d6000fd5b505050506040513d6020811015610af757600080fd5b505192915050565b60065481565b336000908152600260209081526040808320600160a060020a0386168452909152812054610b39908363ffffffff610ecc16565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b610ba6610983565b1515610bb157600080fd5b600160a060020a0381161515610bc657600080fd5b600454600160a060020a03163314610bdd57600080fd5b6004610be7610929565b6004811115610bf257fe5b1415610bfd57600080fd5b6005805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038381169190911791829055604080517f61d3d7a6000000000000000000000000000000000000000000000000000000008152905192909116916361d3d7a6916004808201926020929091908290030181600087803b158015610c8157600080fd5b505af1158015610c95573d6000803e3d6000fd5b505050506040513d6020811015610cab57600080fd5b50511515610cb857600080fd5b600154600560009054906101000a9004600160a060020a0316600160a060020a0316634b2ba0dd6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610d2757600080fd5b505af1158015610d3b573d6000803e3d6000fd5b505050506040513d6020811015610d5157600080fd5b505114610d5d57600080fd5b60055460408051600160a060020a039092168252517f7845d5aa74cc410e35571258d954f23b82276e160fe8c188fa80566580f279cc9181900360200190a150565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600354600160a060020a03163314610de157600080fd5b600160a060020a0381161515610df657600080fd5b600354604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600160a060020a0381161515610e7457600080fd5b600454600160a060020a03163314610e8b57600080fd5b6004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600082821115610ec657fe5b50900390565b600082820183811015610edb57fe5b93925050505600a165627a7a7230582082879722ab70821c8489841842c27232f04b658f588b83672247a30a5e2236250029", "bytecode_runtime": "0x60806040526004361061011c5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663095ea7b3811461012157806316114acd1461015957806318160ddd1461017c57806323b872dd146101a357806345977d03146101cd5780635de4ccb0146101e5578063600440cb14610216578063661884631461022b57806370a082311461024f5780638444b391146102705780638da5cb5b146102a95780639738968c146102be578063a9059cbb146102d3578063c45d19db146102f7578063c752ff6214610318578063d73dd6231461032d578063d7e7088a14610351578063dd62ed3e14610372578063eefa597b146102be578063f2fde38b14610399578063ffeb7d75146103ba575b600080fd5b34801561012d57600080fd5b50610145600160a060020a03600435166024356103db565b604080519115158252519081900360200190f35b34801561016557600080fd5b5061017a600160a060020a0360043516610441565b005b34801561018857600080fd5b50610191610511565b60408051918252519081900360200190f35b3480156101af57600080fd5b50610145600160a060020a0360043581169060243516604435610518565b3480156101d957600080fd5b5061017a60043561068f565b3480156101f157600080fd5b506101fa610800565b60408051600160a060020a039092168252519081900360200190f35b34801561022257600080fd5b506101fa61080f565b34801561023757600080fd5b50610145600160a060020a036004351660243561081e565b34801561025b57600080fd5b50610191600160a060020a036004351661090e565b34801561027c57600080fd5b50610285610929565b6040518082600481111561029557fe5b60ff16815260200191505060405180910390f35b3480156102b557600080fd5b506101fa610974565b3480156102ca57600080fd5b50610145610983565b3480156102df57600080fd5b50610145600160a060020a0360043516602435610988565b34801561030357600080fd5b50610191600160a060020a0360043516610a69565b34801561032457600080fd5b50610191610aff565b34801561033957600080fd5b50610145600160a060020a0360043516602435610b05565b34801561035d57600080fd5b5061017a600160a060020a0360043516610b9e565b34801561037e57600080fd5b50610191600160a060020a0360043581169060243516610d9f565b3480156103a557600080fd5b5061017a600160a060020a0360043516610dca565b3480156103c657600080fd5b5061017a600160a060020a0360043516610e5f565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b600354600160a060020a0316331461045857600080fd5b600354600160a060020a038083169163a9059cbb911661047784610a69565b6040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b1580156104e257600080fd5b505af11580156104f6573d6000803e3d6000fd5b505050506040513d602081101561050c57600080fd5b505050565b6001545b90565b6000600160a060020a038316151561052f57600080fd5b600160a060020a03841660009081526020819052604090205482111561055457600080fd5b600160a060020a038416600090815260026020908152604080832033845290915290205482111561058457600080fd5b600160a060020a0384166000908152602081905260409020546105ad908363ffffffff610eba16565b600160a060020a0380861660009081526020819052604080822093909355908516815220546105e2908363ffffffff610ecc16565b600160a060020a03808516600090815260208181526040808320949094559187168152600282528281203382529091522054610624908363ffffffff610eba16565b600160a060020a03808616600081815260026020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b6000610699610929565b905060038160048111156106a957fe5b14806106c0575060048160048111156106be57fe5b145b15156106cb57600080fd5b8115156106d757600080fd5b336000908152602081905260409020546106f7908363ffffffff610eba16565b3360009081526020819052604090205560015461071a908363ffffffff610eba16565b600155600654610730908363ffffffff610ecc16565b600655600554604080517f753e88e5000000000000000000000000000000000000000000000000000000008152336004820152602481018590529051600160a060020a039092169163753e88e59160448082019260009290919082900301818387803b15801561079f57600080fd5b505af11580156107b3573d6000803e3d6000fd5b5050600554604080518681529051600160a060020a0390921693503392507f7e5c344a8141a805725cb476f76c6953b842222b967edd1f78ddb6e8b3f397ac919081900360200190a35050565b600554600160a060020a031681565b600454600160a060020a031681565b336000908152600260209081526040808320600160a060020a03861684529091528120548083111561087357336000908152600260209081526040808320600160a060020a03881684529091528120556108a8565b610883818463ffffffff610eba16565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a031660009081526020819052604090205490565b6000610933610983565b151561094157506001610515565b600554600160a060020a0316151561095b57506002610515565b600654151561096c57506003610515565b506004610515565b600354600160a060020a031681565b600190565b6000600160a060020a038316151561099f57600080fd5b336000908152602081905260409020548211156109bb57600080fd5b336000908152602081905260409020546109db908363ffffffff610eba16565b3360009081526020819052604080822092909255600160a060020a03851681522054610a0d908363ffffffff610ecc16565b600160a060020a038416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600091600160a060020a038416916370a082319160248082019260209290919082900301818787803b158015610acd57600080fd5b505af1158015610ae1573d6000803e3d6000fd5b505050506040513d6020811015610af757600080fd5b505192915050565b60065481565b336000908152600260209081526040808320600160a060020a0386168452909152812054610b39908363ffffffff610ecc16565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b610ba6610983565b1515610bb157600080fd5b600160a060020a0381161515610bc657600080fd5b600454600160a060020a03163314610bdd57600080fd5b6004610be7610929565b6004811115610bf257fe5b1415610bfd57600080fd5b6005805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038381169190911791829055604080517f61d3d7a6000000000000000000000000000000000000000000000000000000008152905192909116916361d3d7a6916004808201926020929091908290030181600087803b158015610c8157600080fd5b505af1158015610c95573d6000803e3d6000fd5b505050506040513d6020811015610cab57600080fd5b50511515610cb857600080fd5b600154600560009054906101000a9004600160a060020a0316600160a060020a0316634b2ba0dd6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610d2757600080fd5b505af1158015610d3b573d6000803e3d6000fd5b505050506040513d6020811015610d5157600080fd5b505114610d5d57600080fd5b60055460408051600160a060020a039092168252517f7845d5aa74cc410e35571258d954f23b82276e160fe8c188fa80566580f279cc9181900360200190a150565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600354600160a060020a03163314610de157600080fd5b600160a060020a0381161515610df657600080fd5b600354604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600160a060020a0381161515610e7457600080fd5b600454600160a060020a03163314610e8b57600080fd5b6004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600082821115610ec657fe5b50900390565b600082820183811015610edb57fe5b93925050505600a165627a7a7230582082879722ab70821c8489841842c27232f04b658f588b83672247a30a5e2236250029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "approve", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "recoverTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_from", "type": "address"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "value", "type": "uint256"}], "name": "upgrade", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "upgradeAgent", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "upgradeMaster", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_subtractedValue", "type": "uint256"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getUpgradeState", "outputs": [{"name": "", "type": "uint8"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "canUpgrade", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "token", "type": "address"}], "name": "tokensToBeReturned", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalUpgraded", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_spender", "type": "address"}, {"name": "_addedValue", "type": "uint256"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "agent", "type": "address"}], "name": "setUpgradeAgent", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_owner", "type": "address"}, {"name": "_spender", "type": "address"}], "name": "allowance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isToken", "outputs": [{"name": "weAre", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "master", "type": "address"}], "name": "setUpgradeMaster", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"inputs": [{"name": "_upgradeMaster", "type": "address"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "_from", "type": "address"}, {"indexed": true, "name": "_to", "type": "address"}, {"indexed": false, "name": "_value", "type": "uint256"}], "name": "Upgrade", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "agent", "type": "address"}], "name": "UpgradeAgentSet", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}, {"indexed": true, "name": "spender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "devdoc": {"methods": {"allowance(address,address)": {"details": "Function to check the amount of tokens that an owner allowed to a spender.", "params": {"_owner": "address The address which owns the funds.", "_spender": "address The address which will spend the funds."}, "return": "A uint256 specifying the amount of tokens still available for the spender."}, "approve(address,uint256)": {"details": "Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729", "params": {"_spender": "The address which will spend the funds.", "_value": "The amount of tokens to be spent."}}, "balanceOf(address)": {"details": "Gets the balance of the specified address.", "params": {"_owner": "The address to query the the balance of."}, "return": "An uint256 representing the amount owned by the passed address."}, "decreaseApproval(address,uint256)": {"details": "Decrease the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[_spender] == 0. To decrement allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"_spender": "The address which will spend the funds.", "_subtractedValue": "The amount of tokens to decrease the allowance by."}}, "increaseApproval(address,uint256)": {"details": "Increase the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[_spender] == 0. To increment allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"_addedValue": "The amount of tokens to increase the allowance by.", "_spender": "The address which will spend the funds."}}, "recoverTokens(address)": {"details": "This will be invoked by the owner, when owner wants to rescue tokens", "params": {"token": "Token which will we rescue to the owner from the contract"}}, "tokensToBeReturned(address)": {"details": "Interface function, can be overwritten by the superclass", "params": {"token": "Token which balance we will check and return"}, "return": "The amount of tokens (in smallest denominator) the contract owns"}, "totalSupply()": {"details": "total number of tokens in existence"}, "transfer(address,uint256)": {"details": "transfer token for a specified address", "params": {"_to": "The address to transfer to.", "_value": "The amount to be transferred."}}, "transferFrom(address,address,uint256)": {"details": "Transfer tokens from one address to another", "params": {"_from": "address The address which you want to send tokens from", "_to": "address The address which you want to transfer to", "_value": "uint256 the amount of tokens to be transferred"}}, "transferOwnership(address)": {"details": "Allows the current owner to transfer control of the contract to a newOwner.", "params": {"newOwner": "The address to transfer ownership to."}}}}, "userdoc": {"methods": {"canUpgrade()": {"notice": "Child contract can enable to provide the condition when the upgrade can begun."}, "getUpgradeState()": {"notice": "Get the state of the token upgrade."}, "setUpgradeAgent(address)": {"notice": "Set an upgrade agent that handles"}, "setUpgradeMaster(address)": {"notice": "Change the upgrade master. * This allows us to set a new owner for the upgrade mechanism."}, "upgrade(uint256)": {"notice": "Allow the token holder to upgrade some of their tokens to a new contract."}}}}, "settings": {"compilationTarget": {"contracts/UpgradeableToken.sol": "UpgradeableToken"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/Recoverable.sol": {"keccak256": "0x311a332cdd87df6e00057f5455f4e68b043b5dbe211f6d68bc64e20817515635", "urls": ["bzzr://4fd99bcfb93baed6e7c8d22ee9ecc5c8346a1aa98288e77b01333b2c5d3f582d"]}, "contracts/StandardTokenExt.sol": {"keccak256": "0x9ea2d4cec4dccd5639c05e6c23dd027d80b5e5a20abd99b280ab7b2631b5a5fc", "urls": ["bzzr://a52d8fc5a21bd83997aff19128e00dceb251df712207b61223894c8b7f42d5ff"]}, "contracts/UpgradeAgent.sol": {"keccak256": "0x88e793f72feca4a18d2cd06e6037c1413d7b963eabcf5626d60bfb9d04d6e8e6", "urls": ["bzzr://87e39a65cf25d539ab49ad7e759b3298b8a19272964e69e3f2432f0323f30025"]}, "contracts/UpgradeableToken.sol": {"keccak256": "0xa74fc300c514564ece81c86905502c2de674b69c0633b133af19c1ba027da2c9", "urls": ["bzzr://55bc0b908c94781462b8959f051c6dbb53c35641b0f8cb38d74632ad6bf95e52"]}, "zeppelin/contracts/math/SafeMath.sol": {"keccak256": "0x341ba8cb467a3623e819ba1a683ac1d264005186f308505214e5f6bc89446a08", "urls": ["bzzr://59b5652ee4e4a1b5a8f1a8906e14c84af43d636cf5ca0725cc1813aabe4c8c17"]}, "zeppelin/contracts/ownership/Ownable.sol": {"keccak256": "0x1ad4ec802268eb3e02e732ecf8b65c39bb00cdf448e7737aea27ecfa9fd10d6a", "urls": ["bzzr://48e1527fc312977c07458860913fb596a78b3f1744202b75b8d27dcfe8bbea3b"]}, "zeppelin/contracts/token/ERC20/BasicToken.sol": {"keccak256": "0x948404468d61ff35ea4194650670408dabd65da7f905a1c16888ab84520bf39e", "urls": ["bzzr://ea75e20f95d7e4e10394fe6bfaa8eee56b4757c2a6f1e8df4180d33afa621935"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}, "zeppelin/contracts/token/ERC20/StandardToken.sol": {"keccak256": "0xd2b344a5259e19ec143074cfa65637a10c40b68395c59808c4af13bccbb2de55", "urls": ["bzzr://d61a01175a7ca1ba9f4403de603c20b897e33ec425aef2d9f8a7f9ddfdfaf5b2"]}}, "version": 1}, "name": "UpgradeableToken", "ordered_full_dependencies": [], "source_path": "contracts/UpgradeableToken.sol", "source": "/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n\n\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n assert(c / a == b);\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n\n\n\n/**\n * @title Basic token\n * @dev Basic version of StandardToken, with no allowances.\n */\ncontract BasicToken is ERC20Basic {\n using SafeMath for uint256;\n\n mapping(address => uint256) balances;\n\n uint256 totalSupply_;\n\n /**\n * @dev total number of tokens in existence\n */\n function totalSupply() public view returns (uint256) {\n return totalSupply_;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param _to The address to transfer to.\n * @param _value The amount to be transferred.\n */\n function transfer(address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[msg.sender]);\n\n // SafeMath.sub will throw if there is not enough balance.\n balances[msg.sender] = balances[msg.sender].sub(_value);\n balances[_to] = balances[_to].add(_value);\n Transfer(msg.sender, _to, _value);\n return true;\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param _owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address _owner) public view returns (uint256 balance) {\n return balances[_owner];\n }\n\n}\n\n\n\n\n/**\n * @title Standard ERC20 token\n *\n * @dev Implementation of the basic standard token.\n * @dev https://github.com/ethereum/EIPs/issues/20\n * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol\n */\ncontract StandardToken is ERC20, BasicToken {\n\n mapping (address => mapping (address => uint256)) internal allowed;\n\n\n /**\n * @dev Transfer tokens from one address to another\n * @param _from address The address which you want to send tokens from\n * @param _to address The address which you want to transfer to\n * @param _value uint256 the amount of tokens to be transferred\n */\n function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[_from]);\n require(_value <= allowed[_from][msg.sender]);\n\n balances[_from] = balances[_from].sub(_value);\n balances[_to] = balances[_to].add(_value);\n allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);\n Transfer(_from, _to, _value);\n return true;\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n *\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param _spender The address which will spend the funds.\n * @param _value The amount of tokens to be spent.\n */\n function approve(address _spender, uint256 _value) public returns (bool) {\n allowed[msg.sender][_spender] = _value;\n Approval(msg.sender, _spender, _value);\n return true;\n }\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param _owner address The address which owns the funds.\n * @param _spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address _owner, address _spender) public view returns (uint256) {\n return allowed[_owner][_spender];\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(address _spender, uint _addedValue) public returns (bool) {\n allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {\n uint oldValue = allowed[msg.sender][_spender];\n if (_subtractedValue > oldValue) {\n allowed[msg.sender][_spender] = 0;\n } else {\n allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);\n }\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n\n\n\ncontract Recoverable is Ownable {\n\n /// @dev Empty constructor (for now)\n function Recoverable() {\n }\n\n /// @dev This will be invoked by the owner, when owner wants to rescue tokens\n /// @param token Token which will we rescue to the owner from the contract\n function recoverTokens(ERC20Basic token) onlyOwner public {\n token.transfer(owner, tokensToBeReturned(token));\n }\n\n /// @dev Interface function, can be overwritten by the superclass\n /// @param token Token which balance we will check and return\n /// @return The amount of tokens (in smallest denominator) the contract owns\n function tokensToBeReturned(ERC20Basic token) public returns (uint) {\n return token.balanceOf(this);\n }\n}\n\n\n\n/**\n * Standard EIP-20 token with an interface marker.\n *\n * @notice Interface marker is used by crowdsale contracts to validate that addresses point a good token contract.\n *\n */\ncontract StandardTokenExt is StandardToken, Recoverable {\n\n /* Interface declaration */\n function isToken() public constant returns (bool weAre) {\n return true;\n }\n}\n\n/**\n * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net\n *\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n */\n\n\n/**\n * Upgrade agent interface inspired by Lunyr.\n *\n * Upgrade agent transfers tokens to a new contract.\n * Upgrade agent itself can be the token contract, or just a middle man contract doing the heavy lifting.\n */\ncontract UpgradeAgent {\n\n uint public originalSupply;\n\n /** Interface marker */\n function isUpgradeAgent() public constant returns (bool) {\n return true;\n }\n\n function upgradeFrom(address _from, uint256 _value) public;\n\n}\n\n\n/**\n * A token upgrade mechanism where users can opt-in amount of tokens to the next smart contract revision.\n *\n * First envisioned by Golem and Lunyr projects.\n */\ncontract UpgradeableToken is StandardTokenExt {\n\n /** Contract / person who can set the upgrade path. This can be the same as team multisig wallet, as what it is with its default value. */\n address public upgradeMaster;\n\n /** The next contract where the tokens will be migrated. */\n UpgradeAgent public upgradeAgent;\n\n /** How many tokens we have upgraded by now. */\n uint256 public totalUpgraded;\n\n /**\n * Upgrade states.\n *\n * - NotAllowed: The child contract has not reached a condition where the upgrade can bgun\n * - WaitingForAgent: Token allows upgrade, but we don't have a new agent yet\n * - ReadyToUpgrade: The agent is set, but not a single token has been upgraded yet\n * - Upgrading: Upgrade agent is set and the balance holders can upgrade their tokens\n *\n */\n enum UpgradeState {Unknown, NotAllowed, WaitingForAgent, ReadyToUpgrade, Upgrading}\n\n /**\n * Somebody has upgraded some of his tokens.\n */\n event Upgrade(address indexed _from, address indexed _to, uint256 _value);\n\n /**\n * New upgrade agent available.\n */\n event UpgradeAgentSet(address agent);\n\n /**\n * Do not allow construction without upgrade master set.\n */\n function UpgradeableToken(address _upgradeMaster) {\n upgradeMaster = _upgradeMaster;\n }\n\n /**\n * Allow the token holder to upgrade some of their tokens to a new contract.\n */\n function upgrade(uint256 value) public {\n\n UpgradeState state = getUpgradeState();\n if(!(state == UpgradeState.ReadyToUpgrade || state == UpgradeState.Upgrading)) {\n // Called in a bad state\n throw;\n }\n\n // Validate input value.\n if (value == 0) throw;\n\n balances[msg.sender] = balances[msg.sender].sub(value);\n\n // Take tokens out from circulation\n totalSupply_ = totalSupply_.sub(value);\n totalUpgraded = totalUpgraded.add(value);\n\n // Upgrade agent reissues the tokens\n upgradeAgent.upgradeFrom(msg.sender, value);\n Upgrade(msg.sender, upgradeAgent, value);\n }\n\n /**\n * Set an upgrade agent that handles\n */\n function setUpgradeAgent(address agent) external {\n\n if(!canUpgrade()) {\n // The token is not yet in a state that we could think upgrading\n throw;\n }\n\n if (agent == 0x0) throw;\n // Only a master can designate the next agent\n if (msg.sender != upgradeMaster) throw;\n // Upgrade has already begun for an agent\n if (getUpgradeState() == UpgradeState.Upgrading) throw;\n\n upgradeAgent = UpgradeAgent(agent);\n\n // Bad interface\n if(!upgradeAgent.isUpgradeAgent()) throw;\n // Make sure that token supplies match in source and target\n if (upgradeAgent.originalSupply() != totalSupply_) throw;\n\n UpgradeAgentSet(upgradeAgent);\n }\n\n /**\n * Get the state of the token upgrade.\n */\n function getUpgradeState() public constant returns(UpgradeState) {\n if(!canUpgrade()) return UpgradeState.NotAllowed;\n else if(address(upgradeAgent) == 0x00) return UpgradeState.WaitingForAgent;\n else if(totalUpgraded == 0) return UpgradeState.ReadyToUpgrade;\n else return UpgradeState.Upgrading;\n }\n\n /**\n * Change the upgrade master.\n *\n * This allows us to set a new owner for the upgrade mechanism.\n */\n function setUpgradeMaster(address master) public {\n if (master == 0x0) throw;\n if (msg.sender != upgradeMaster) throw;\n upgradeMaster = master;\n }\n\n /**\n * Child contract can enable to provide the condition when the upgrade can begun.\n */\n function canUpgrade() public constant returns(bool) {\n return true;\n }\n\n}\n"}, "VotingContract": {"abi": [{"constant": true, "inputs": [], "name": "maximumSupply", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "name", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "approve", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "announcementHash", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_signature", "type": "bytes"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}, {"name": "_fee", "type": "uint256"}, {"name": "_nonce", "type": "uint256"}], "name": "transferPreSigned", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_token", "type": "address"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}, {"name": "_fee", "type": "uint256"}, {"name": "_nonce", "type": "uint256"}], "name": "transferPreSignedHashing", "outputs": [{"name": "", "type": "bytes32"}], "payable": false, "stateMutability": "pure", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "addedValue", "type": "uint256"}, {"name": "data", "type": "bytes"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "tokenCount", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "hash", "type": "bytes32"}, {"name": "sig", "type": "bytes"}], "name": "recover", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "pure", "type": "function"}, {"constant": false, "inputs": [{"name": "from", "type": "address"}, {"name": "to", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "investor", "type": "address"}], "name": "importInvestor", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "decimals", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "owner", "type": "address"}, {"name": "blockNumber", "type": "uint256"}], "name": "balanceAt", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "receiver", "type": "address"}, {"name": "amount", "type": "uint256"}, {"name": "data", "type": "bytes"}], "name": "transferAndCall", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}, {"name": "", "type": "uint256"}], "name": "tokenBalances", "outputs": [{"name": "blockNumber", "type": "uint256"}, {"name": "value", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "uint256"}], "name": "tokensTotal", "outputs": [{"name": "blockNumber", "type": "uint256"}, {"name": "value", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}, {"name": "", "type": "address"}], "name": "used", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "blockNumber", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}, {"name": "", "type": "address"}], "name": "allowed", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "announcementType", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "subtractedValue", "type": "uint256"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "owner", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "subtractedValue", "type": "uint256"}, {"name": "data", "type": "bytes"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "balanceImported", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "options", "outputs": [{"name": "", "type": "bytes32"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "to", "type": "address"}, {"name": "amount", "type": "uint256"}], "name": "transferInvestorTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "transferVerifier", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "symbol", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "blockNumber", "type": "uint256"}], "name": "totalSupplyAt", "outputs": [{"name": "tokenCount", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "announcementName", "outputs": [{"name": "", "type": "bytes32"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "KYC", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "optionsTotal", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "amount", "type": "uint256"}], "name": "act", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "addedValue", "type": "uint256"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "owner", "type": "address"}, {"name": "spender", "type": "address"}], "name": "allowance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "announcementURI", "outputs": [{"name": "", "type": "bytes32"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "token", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [{"name": "_token", "type": "address"}, {"name": "_KYC", "type": "address"}, {"name": "name", "type": "bytes32"}, {"name": "URI", "type": "bytes32"}, {"name": "_type", "type": "uint256"}, {"name": "_hash", "type": "uint256"}, {"name": "_options", "type": "bytes32[]"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "option", "type": "address"}, {"indexed": false, "name": "description", "type": "bytes32"}], "name": "OptionAdded", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "token", "type": "address"}, {"indexed": false, "name": "KYC", "type": "address"}, {"indexed": false, "name": "blockNumber", "type": "uint256"}, {"indexed": false, "name": "maximumSupply", "type": "uint256"}], "name": "IICCreated", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": true, "name": "delegate", "type": "address"}, {"indexed": false, "name": "amount", "type": "uint256"}, {"indexed": false, "name": "fee", "type": "uint256"}], "name": "TransferPreSigned", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "from", "type": "address"}, {"indexed": false, "name": "hash", "type": "bytes32"}], "name": "Debug", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "from", "type": "address"}, {"indexed": false, "name": "receiver", "type": "address"}, {"indexed": false, "name": "amount", "type": "uint256"}, {"indexed": false, "name": "data", "type": "bytes"}], "name": "ERC677Transfer", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}, {"indexed": true, "name": "spender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "bytecode": "0x60806040523480156200001157600080fd5b5060405162001f0138038062001f018339810160408181528251602080850151838601516060870151608088015160a089015160c08a0151868a01808a526000808c528a51988901909a52898852858a556001859055600284905560038390558a51989b969a959994989397929691909101948b948b948b948b948b948b94938b938593849392601291620000aa9160049190620002cd565b508151620000c0906005906020850190620002cd565b506006555050600d8054600160a060020a031916600160a060020a038c161790556000841115620000f657600c849055620000fb565b43600c555b600f8054600160a060020a031916600160a060020a038b16179055600091505b8251821015620001c75781606401905082828151811015156200013a57fe5b6020908102909101810151600160a060020a0383166000908152601090925260409091205582517f4657af31f793f7106e2139bb6d8ae7293c2af46cf8c457b73c33d316f78bb24f9082908590859081106200019257fe5b602090810290910181015160408051600160a060020a039094168452918301528051918290030190a16001909101906200011b565b600d54600c54604080517f981b24d0000000000000000000000000000000000000000000000000000000008152600481019290925251600160a060020a039092169163981b24d0916024808201926020929091908290030181600087803b1580156200023257600080fd5b505af115801562000247573d6000803e3d6000fd5b505050506040513d60208110156200025e57600080fd5b5051601381905560408051600160a060020a03808e1682528c1660208201528082018790526060810192909252517fe7c73ce173192d0e4ea6632e934e4df90b0a61a55086c4dc27534581a54518d69181900360800190a1505050505050505050505050505050505062000372565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200031057805160ff191683800117855562000340565b8280016001018555821562000340579182015b828111156200034057825182559160200191906001019062000323565b506200034e92915062000352565b5090565b6200036f91905b808211156200034e576000815560010162000359565b90565b611b7f80620003826000396000f3006080604052600436106101d75763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630480e58b81146101dc57806306fdde0314610203578063095ea7b31461028d5780631274c3f3146102c55780631296830d146102da57806315420b711461034d57806316ca3b631461037d57806318160ddd146103e657806319045a25146103fb57806323b872dd146104755780632eb0236a1461049f578063313ce567146104c25780633b8e6f2e146104d75780634000aea0146104fb57806348ff5665146105645780634f0092ab146105a15780635195afa5146105b957806357e871e7146105e05780635c658165146105f55780635fcce2791461061c578063661884631461063157806370a08231146106555780637272ad4914610676578063755d76b7146106df57806382fae9c1146107005780638cd98ee3146107215780638daed5281461074557806395d89b411461075a578063981b24d01461076f5780639ea0c08c14610787578063a12a6bb01461079c578063a9059cbb146107b1578063a9ec80d8146107d5578063c9ee7e02146107ea578063d73dd62314610802578063dd62ed3e14610826578063f31294a41461084d578063fc0c546a14610862575b600080fd5b3480156101e857600080fd5b506101f1610877565b60408051918252519081900360200190f35b34801561020f57600080fd5b5061021861087d565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561025257818101518382015260200161023a565b50505050905090810190601f16801561027f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561029957600080fd5b506102b1600160a060020a036004351660243561090b565b604080519115158252519081900360200190f35b3480156102d157600080fd5b506101f1610971565b3480156102e657600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526102b194369492936024939284019190819084018382808284375094975050508335600160a060020a0316945050506020820135916040810135915060600135610977565b34801561035957600080fd5b506101f1600160a060020a0360043581169060243516604435606435608435610b97565b34801561038957600080fd5b50604080516020600460443581810135601f81018490048402850184019095528484526102b1948235600160a060020a0316946024803595369594606494920191908190840183828082843750949750610c099650505050505050565b3480156103f257600080fd5b506101f1610cb9565b34801561040757600080fd5b5060408051602060046024803582810135601f8101859004850286018501909652858552610459958335953695604494919390910191908190840183828082843750949750610ccb9650505050505050565b60408051600160a060020a039092168252519081900360200190f35b34801561048157600080fd5b506102b1600160a060020a0360043581169060243516604435610da0565b3480156104ab57600080fd5b506104c0600160a060020a0360043516610e30565b005b3480156104ce57600080fd5b506101f1610fd2565b3480156104e357600080fd5b506101f1600160a060020a0360043516602435610fd8565b34801561050757600080fd5b50604080516020600460443581810135601f81018490048402850184019095528484526102b1948235600160a060020a0316946024803595369594606494920191908190840183828082843750949750610ffa9650505050505050565b34801561057057600080fd5b50610588600160a060020a0360043516602435611203565b6040805192835260208301919091528051918290030190f35b3480156105ad57600080fd5b5061058860043561123e565b3480156105c557600080fd5b506101f1600160a060020a036004358116906024351661126a565b3480156105ec57600080fd5b506101f1611287565b34801561060157600080fd5b506101f1600160a060020a036004358116906024351661128d565b34801561062857600080fd5b506101f16112aa565b34801561063d57600080fd5b506102b1600160a060020a03600435166024356112b0565b34801561066157600080fd5b506101f1600160a060020a03600435166113a0565b34801561068257600080fd5b50604080516020600460443581810135601f81018490048402850184019095528484526102b1948235600160a060020a03169460248035953695946064949201919081908401838280828437509497506113c89650505050505050565b3480156106eb57600080fd5b506102b1600160a060020a03600435166113ea565b34801561070c57600080fd5b506101f1600160a060020a03600435166113ff565b34801561072d57600080fd5b506104c0600160a060020a0360043516602435611411565b34801561075157600080fd5b50610459611420565b34801561076657600080fd5b5061021861142f565b34801561077b57600080fd5b506101f160043561148a565b34801561079357600080fd5b506101f1611497565b3480156107a857600080fd5b5061045961149d565b3480156107bd57600080fd5b506102b1600160a060020a03600435166024356114ac565b3480156107e157600080fd5b506101f161159e565b3480156107f657600080fd5b506104c06004356115a4565b34801561080e57600080fd5b506102b1600160a060020a03600435166024356115b2565b34801561083257600080fd5b506101f1600160a060020a036004358116906024351661164b565b34801561085957600080fd5b506101f1611676565b34801561086e57600080fd5b5061045961167c565b60135481565b6004805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156109035780601f106108d857610100808354040283529160200191610903565b820191906000526020600020905b8154815290600101906020018083116108e657829003601f168201915b505050505081565b336000818152600a60209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b60035481565b60008080600160a060020a038716151561099057600080fd5b600b886040518082805190602001908083835b602083106109c25780518252601f1990920191602091820191016109a3565b51815160209384036101000a600019018019909216911617905292019485525060405193849003019092205460ff161591506109ff905057600080fd5b610a0c3088888888610b97565b9150610a188289610ccb565b9050600160a060020a0381161515610a2f57600080fd5b610a3a81888861168b565b610a4581338761168b565b6001600b896040518082805190602001908083835b60208310610a795780518252601f199092019160209182019101610a5a565b51815160209384036101000a6000190180199092169116179052920194855250604080519485900382018520805460ff1916961515969096179095558a84528301899052505081513392600160a060020a038b811693908616927fec5a73fd1f178be20c1bca1b406cbf4b5c20d833b66e582fc122fb4baa0fc2a4929181900390910190a486600160a060020a031681600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef886040518082815260200191505060405180910390a36040805186815290513391600160a060020a038416917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a3506001979650505050505050565b604080517f48664c160000000000000000000000000000000000000000000000000000000081526c01000000000000000000000000600160a060020a0397881681026004830152959096169094026018860152602c850192909252604c840152606c8301525190819003608c01902090565b6000600160a060020a038416301415610c2157600080fd5b610c2b84846115b2565b5083600160a060020a03168260405180828051906020019080838360005b83811015610c61578181015183820152602001610c49565b50505050905090810190601f168015610c8e5780820380516001836020036101000a031916815260200191505b509150506000604051808303816000865af19150501515610cae57600080fd5b5060015b9392505050565b6000610cc66009436117c7565b905090565b60008060008084516041141515610ce55760009350610d97565b50505060208201516040830151606084015160001a601b60ff82161015610d0a57601b015b8060ff16601b14158015610d2257508060ff16601c14155b15610d305760009350610d97565b60408051600080825260208083018085528a905260ff8516838501526060830187905260808301869052925160019360a0808501949193601f19840193928390039091019190865af1158015610d8a573d6000803e3d6000fd5b5050506020604051035193505b50505092915050565b600160a060020a0383166000908152600a60209081526040808320338452909152812054821115610dd057600080fd5b610ddb84848461168b565b82600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a35060019392505050565b600160a060020a0381166000908152600e60205260408120548190819060ff1615610e5a57600080fd5b600d54600c54604080517f3b8e6f2e000000000000000000000000000000000000000000000000000000008152600160a060020a038881166004830152602482019390935290519190921691633b8e6f2e9160448083019260209291908290030181600087803b158015610ecd57600080fd5b505af1158015610ee1573d6000803e3d6000fd5b505050506040513d6020811015610ef757600080fd5b50519250610f0560006113a0565b9150610f0f610cb9565b6000805260086020529050610f537f5eff886ea0ce6ca488a3d6e336d6c0f75f46d19b42c06ce5ee98e42c96d256c7610f4e848663ffffffff6117dd16565b6117ec565b610f5f6000858561168b565b610f746009610f4e838663ffffffff6117dd16565b600160a060020a0384166000818152600e60209081526040808320805460ff19166001179055805187815290517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a350505050565b60065481565b600160a060020a0382166000908152600860205260408120610cb290836117c7565b600061100684846114ac565b151561101157600080fd5b7f72db2339068fd324bbc28f2944e01064da539ac76064b6ce4a97a5f81de43dd6338585856040518085600160a060020a0316600160a060020a0316815260200184600160a060020a0316600160a060020a0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156110a9578181015183820152602001611091565b50505050905090810190601f1680156110d65780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a183600160a060020a031663c0ee0b8a3385856040518463ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018084600160a060020a0316600160a060020a0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561117e578181015183820152602001611166565b50505050905090810190601f1680156111ab5780820380516001836020036101000a031916815260200191505b50945050505050602060405180830381600087803b1580156111cc57600080fd5b505af11580156111e0573d6000803e3d6000fd5b505050506040513d60208110156111f657600080fd5b50511515610cb257600080fd5b60086020528160005260406000208181548110151561121e57fe5b600091825260209091206002909102018054600190910154909250905082565b600980548290811061124c57fe5b60009182526020909120600290910201805460019091015490915082565b601160209081526000928352604080842090915290825290205481565b600c5481565b600a60209081526000928352604080842090915290825290205481565b60025481565b336000908152600a60209081526040808320600160a060020a03861684529091528120548083111561130557336000908152600a60209081526040808320600160a060020a038816845290915281205561133a565b611315818463ffffffff6118c316565b336000908152600a60209081526040808320600160a060020a03891684529091529020555b336000818152600a60209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a03811660009081526008602052604081206113c290436117c7565b92915050565b6000600160a060020a0384163014156113e057600080fd5b610c2b84846112b0565b600e6020526000908152604090205460ff1681565b60106020526000908152604090205481565b61141b82826114ac565b505050565b600754600160a060020a031681565b6005805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156109035780601f106108d857610100808354040283529160200191610903565b60006113c26009836117c7565b60005481565b600f54600160a060020a031681565b336000908152600e602052604081205460ff1615156114ce576114ce33610e30565b600160a060020a0383166000908152601060205260409020541561159457600f54604080517f3af32abf0000000000000000000000000000000000000000000000000000000081523360048201529051600160a060020a0390921691633af32abf916024808201926020929091908290030181600087803b15801561155257600080fd5b505af1158015611566573d6000803e3d6000fd5b505050506040513d602081101561157c57600080fd5b5051151561158957600080fd5b6115943384846118d5565b610cb28383611906565b60125481565b6115af606482611411565b50565b336000908152600a60209081526040808320600160a060020a03861684529091528120546115e6908363ffffffff6117dd16565b336000818152600a60209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a039182166000908152600a6020908152604080832093909416825291909152205490565b60015481565b600d54600160a060020a031681565b600080611697856113a0565b91506116a2846113a0565b600754909150600160a060020a03161561176857600754604080517fad076994000000000000000000000000000000000000000000000000000000008152600160a060020a0388811660048301528781166024830152604482018790529151919092169163ad0769949160648083019260209291908290030181600087803b15801561172d57600080fd5b505af1158015611741573d6000803e3d6000fd5b505050506040513d602081101561175757600080fd5b505192506000831161176857600080fd5b600160a060020a038516600090815260086020526040902061179490610f4e848663ffffffff6118c316565b600160a060020a03841660009081526008602052604090206117c090610f4e838663ffffffff6117dd16565b5050505050565b6000806117d4848461195c565b95945050505050565b600082820183811015610cb257fe5b8154158061182a575081544390839061180c90600163ffffffff6118c316565b8154811061181657fe5b906000526020600020906002020160000154105b1561186c5760408051808201909152438152602080820183815284546001818101875560008781529390932093516002909102909301928355519101556118bf565b60408051808201909152438152602081018290528254839061189590600163ffffffff6118c316565b8154811061189f57fe5b600091825260209182902083516002909202019081559101516001909101555b5050565b6000828211156118cf57fe5b50900390565b600160a060020a03918216600090815260116020908152604080832095909416825293909352912080549091019055565b600061191333848461168b565b604080518381529051600160a060020a0385169133917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a350600192915050565b600080600080600086805490506000141561197d5760009450849350611b32565b8654879061199290600163ffffffff6118c316565b8154811061199c57fe5b60009182526020909120600290910201548610611a1d57865487906119c890600163ffffffff6118c316565b815481106119d257fe5b6000918252602090912060029091020154875488906119f890600163ffffffff6118c316565b81548110611a0257fe5b90600052602060002090600202016001015494509450611b32565b866000815481101515611a2c57fe5b906000526020600020906002020160000154861015611a515760009450849350611b32565b865460009350611a6890600163ffffffff6118c316565b91505b82821115611aed57611aa56002611a99611a8c86600163ffffffff6117dd16565b859063ffffffff6117dd16565b9063ffffffff611b3c16565b9050858782815481101515611ab657fe5b600091825260209091206002909102015411611ad457809250611ae8565b611ae581600163ffffffff6118c316565b91505b611a6b565b8683815481101515611afb57fe5b9060005260206000209060020201600001548784815481101515611b1b57fe5b906000526020600020906002020160010154945094505b5050509250929050565b6000808284811515611b4a57fe5b049493505050505600a165627a7a72305820ce3be7521f5794db2129e317d888ecbd07bd91fee02d33e14da52c43c0377ae40029", "bytecode_runtime": "0x6080604052600436106101d75763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630480e58b81146101dc57806306fdde0314610203578063095ea7b31461028d5780631274c3f3146102c55780631296830d146102da57806315420b711461034d57806316ca3b631461037d57806318160ddd146103e657806319045a25146103fb57806323b872dd146104755780632eb0236a1461049f578063313ce567146104c25780633b8e6f2e146104d75780634000aea0146104fb57806348ff5665146105645780634f0092ab146105a15780635195afa5146105b957806357e871e7146105e05780635c658165146105f55780635fcce2791461061c578063661884631461063157806370a08231146106555780637272ad4914610676578063755d76b7146106df57806382fae9c1146107005780638cd98ee3146107215780638daed5281461074557806395d89b411461075a578063981b24d01461076f5780639ea0c08c14610787578063a12a6bb01461079c578063a9059cbb146107b1578063a9ec80d8146107d5578063c9ee7e02146107ea578063d73dd62314610802578063dd62ed3e14610826578063f31294a41461084d578063fc0c546a14610862575b600080fd5b3480156101e857600080fd5b506101f1610877565b60408051918252519081900360200190f35b34801561020f57600080fd5b5061021861087d565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561025257818101518382015260200161023a565b50505050905090810190601f16801561027f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561029957600080fd5b506102b1600160a060020a036004351660243561090b565b604080519115158252519081900360200190f35b3480156102d157600080fd5b506101f1610971565b3480156102e657600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526102b194369492936024939284019190819084018382808284375094975050508335600160a060020a0316945050506020820135916040810135915060600135610977565b34801561035957600080fd5b506101f1600160a060020a0360043581169060243516604435606435608435610b97565b34801561038957600080fd5b50604080516020600460443581810135601f81018490048402850184019095528484526102b1948235600160a060020a0316946024803595369594606494920191908190840183828082843750949750610c099650505050505050565b3480156103f257600080fd5b506101f1610cb9565b34801561040757600080fd5b5060408051602060046024803582810135601f8101859004850286018501909652858552610459958335953695604494919390910191908190840183828082843750949750610ccb9650505050505050565b60408051600160a060020a039092168252519081900360200190f35b34801561048157600080fd5b506102b1600160a060020a0360043581169060243516604435610da0565b3480156104ab57600080fd5b506104c0600160a060020a0360043516610e30565b005b3480156104ce57600080fd5b506101f1610fd2565b3480156104e357600080fd5b506101f1600160a060020a0360043516602435610fd8565b34801561050757600080fd5b50604080516020600460443581810135601f81018490048402850184019095528484526102b1948235600160a060020a0316946024803595369594606494920191908190840183828082843750949750610ffa9650505050505050565b34801561057057600080fd5b50610588600160a060020a0360043516602435611203565b6040805192835260208301919091528051918290030190f35b3480156105ad57600080fd5b5061058860043561123e565b3480156105c557600080fd5b506101f1600160a060020a036004358116906024351661126a565b3480156105ec57600080fd5b506101f1611287565b34801561060157600080fd5b506101f1600160a060020a036004358116906024351661128d565b34801561062857600080fd5b506101f16112aa565b34801561063d57600080fd5b506102b1600160a060020a03600435166024356112b0565b34801561066157600080fd5b506101f1600160a060020a03600435166113a0565b34801561068257600080fd5b50604080516020600460443581810135601f81018490048402850184019095528484526102b1948235600160a060020a03169460248035953695946064949201919081908401838280828437509497506113c89650505050505050565b3480156106eb57600080fd5b506102b1600160a060020a03600435166113ea565b34801561070c57600080fd5b506101f1600160a060020a03600435166113ff565b34801561072d57600080fd5b506104c0600160a060020a0360043516602435611411565b34801561075157600080fd5b50610459611420565b34801561076657600080fd5b5061021861142f565b34801561077b57600080fd5b506101f160043561148a565b34801561079357600080fd5b506101f1611497565b3480156107a857600080fd5b5061045961149d565b3480156107bd57600080fd5b506102b1600160a060020a03600435166024356114ac565b3480156107e157600080fd5b506101f161159e565b3480156107f657600080fd5b506104c06004356115a4565b34801561080e57600080fd5b506102b1600160a060020a03600435166024356115b2565b34801561083257600080fd5b506101f1600160a060020a036004358116906024351661164b565b34801561085957600080fd5b506101f1611676565b34801561086e57600080fd5b5061045961167c565b60135481565b6004805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156109035780601f106108d857610100808354040283529160200191610903565b820191906000526020600020905b8154815290600101906020018083116108e657829003601f168201915b505050505081565b336000818152600a60209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b60035481565b60008080600160a060020a038716151561099057600080fd5b600b886040518082805190602001908083835b602083106109c25780518252601f1990920191602091820191016109a3565b51815160209384036101000a600019018019909216911617905292019485525060405193849003019092205460ff161591506109ff905057600080fd5b610a0c3088888888610b97565b9150610a188289610ccb565b9050600160a060020a0381161515610a2f57600080fd5b610a3a81888861168b565b610a4581338761168b565b6001600b896040518082805190602001908083835b60208310610a795780518252601f199092019160209182019101610a5a565b51815160209384036101000a6000190180199092169116179052920194855250604080519485900382018520805460ff1916961515969096179095558a84528301899052505081513392600160a060020a038b811693908616927fec5a73fd1f178be20c1bca1b406cbf4b5c20d833b66e582fc122fb4baa0fc2a4929181900390910190a486600160a060020a031681600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef886040518082815260200191505060405180910390a36040805186815290513391600160a060020a038416917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a3506001979650505050505050565b604080517f48664c160000000000000000000000000000000000000000000000000000000081526c01000000000000000000000000600160a060020a0397881681026004830152959096169094026018860152602c850192909252604c840152606c8301525190819003608c01902090565b6000600160a060020a038416301415610c2157600080fd5b610c2b84846115b2565b5083600160a060020a03168260405180828051906020019080838360005b83811015610c61578181015183820152602001610c49565b50505050905090810190601f168015610c8e5780820380516001836020036101000a031916815260200191505b509150506000604051808303816000865af19150501515610cae57600080fd5b5060015b9392505050565b6000610cc66009436117c7565b905090565b60008060008084516041141515610ce55760009350610d97565b50505060208201516040830151606084015160001a601b60ff82161015610d0a57601b015b8060ff16601b14158015610d2257508060ff16601c14155b15610d305760009350610d97565b60408051600080825260208083018085528a905260ff8516838501526060830187905260808301869052925160019360a0808501949193601f19840193928390039091019190865af1158015610d8a573d6000803e3d6000fd5b5050506020604051035193505b50505092915050565b600160a060020a0383166000908152600a60209081526040808320338452909152812054821115610dd057600080fd5b610ddb84848461168b565b82600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a35060019392505050565b600160a060020a0381166000908152600e60205260408120548190819060ff1615610e5a57600080fd5b600d54600c54604080517f3b8e6f2e000000000000000000000000000000000000000000000000000000008152600160a060020a038881166004830152602482019390935290519190921691633b8e6f2e9160448083019260209291908290030181600087803b158015610ecd57600080fd5b505af1158015610ee1573d6000803e3d6000fd5b505050506040513d6020811015610ef757600080fd5b50519250610f0560006113a0565b9150610f0f610cb9565b6000805260086020529050610f537f5eff886ea0ce6ca488a3d6e336d6c0f75f46d19b42c06ce5ee98e42c96d256c7610f4e848663ffffffff6117dd16565b6117ec565b610f5f6000858561168b565b610f746009610f4e838663ffffffff6117dd16565b600160a060020a0384166000818152600e60209081526040808320805460ff19166001179055805187815290517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a350505050565b60065481565b600160a060020a0382166000908152600860205260408120610cb290836117c7565b600061100684846114ac565b151561101157600080fd5b7f72db2339068fd324bbc28f2944e01064da539ac76064b6ce4a97a5f81de43dd6338585856040518085600160a060020a0316600160a060020a0316815260200184600160a060020a0316600160a060020a0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156110a9578181015183820152602001611091565b50505050905090810190601f1680156110d65780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a183600160a060020a031663c0ee0b8a3385856040518463ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018084600160a060020a0316600160a060020a0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561117e578181015183820152602001611166565b50505050905090810190601f1680156111ab5780820380516001836020036101000a031916815260200191505b50945050505050602060405180830381600087803b1580156111cc57600080fd5b505af11580156111e0573d6000803e3d6000fd5b505050506040513d60208110156111f657600080fd5b50511515610cb257600080fd5b60086020528160005260406000208181548110151561121e57fe5b600091825260209091206002909102018054600190910154909250905082565b600980548290811061124c57fe5b60009182526020909120600290910201805460019091015490915082565b601160209081526000928352604080842090915290825290205481565b600c5481565b600a60209081526000928352604080842090915290825290205481565b60025481565b336000908152600a60209081526040808320600160a060020a03861684529091528120548083111561130557336000908152600a60209081526040808320600160a060020a038816845290915281205561133a565b611315818463ffffffff6118c316565b336000908152600a60209081526040808320600160a060020a03891684529091529020555b336000818152600a60209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a03811660009081526008602052604081206113c290436117c7565b92915050565b6000600160a060020a0384163014156113e057600080fd5b610c2b84846112b0565b600e6020526000908152604090205460ff1681565b60106020526000908152604090205481565b61141b82826114ac565b505050565b600754600160a060020a031681565b6005805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156109035780601f106108d857610100808354040283529160200191610903565b60006113c26009836117c7565b60005481565b600f54600160a060020a031681565b336000908152600e602052604081205460ff1615156114ce576114ce33610e30565b600160a060020a0383166000908152601060205260409020541561159457600f54604080517f3af32abf0000000000000000000000000000000000000000000000000000000081523360048201529051600160a060020a0390921691633af32abf916024808201926020929091908290030181600087803b15801561155257600080fd5b505af1158015611566573d6000803e3d6000fd5b505050506040513d602081101561157c57600080fd5b5051151561158957600080fd5b6115943384846118d5565b610cb28383611906565b60125481565b6115af606482611411565b50565b336000908152600a60209081526040808320600160a060020a03861684529091528120546115e6908363ffffffff6117dd16565b336000818152600a60209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a039182166000908152600a6020908152604080832093909416825291909152205490565b60015481565b600d54600160a060020a031681565b600080611697856113a0565b91506116a2846113a0565b600754909150600160a060020a03161561176857600754604080517fad076994000000000000000000000000000000000000000000000000000000008152600160a060020a0388811660048301528781166024830152604482018790529151919092169163ad0769949160648083019260209291908290030181600087803b15801561172d57600080fd5b505af1158015611741573d6000803e3d6000fd5b505050506040513d602081101561175757600080fd5b505192506000831161176857600080fd5b600160a060020a038516600090815260086020526040902061179490610f4e848663ffffffff6118c316565b600160a060020a03841660009081526008602052604090206117c090610f4e838663ffffffff6117dd16565b5050505050565b6000806117d4848461195c565b95945050505050565b600082820183811015610cb257fe5b8154158061182a575081544390839061180c90600163ffffffff6118c316565b8154811061181657fe5b906000526020600020906002020160000154105b1561186c5760408051808201909152438152602080820183815284546001818101875560008781529390932093516002909102909301928355519101556118bf565b60408051808201909152438152602081018290528254839061189590600163ffffffff6118c316565b8154811061189f57fe5b600091825260209182902083516002909202019081559101516001909101555b5050565b6000828211156118cf57fe5b50900390565b600160a060020a03918216600090815260116020908152604080832095909416825293909352912080549091019055565b600061191333848461168b565b604080518381529051600160a060020a0385169133917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a350600192915050565b600080600080600086805490506000141561197d5760009450849350611b32565b8654879061199290600163ffffffff6118c316565b8154811061199c57fe5b60009182526020909120600290910201548610611a1d57865487906119c890600163ffffffff6118c316565b815481106119d257fe5b6000918252602090912060029091020154875488906119f890600163ffffffff6118c316565b81548110611a0257fe5b90600052602060002090600202016001015494509450611b32565b866000815481101515611a2c57fe5b906000526020600020906002020160000154861015611a515760009450849350611b32565b865460009350611a6890600163ffffffff6118c316565b91505b82821115611aed57611aa56002611a99611a8c86600163ffffffff6117dd16565b859063ffffffff6117dd16565b9063ffffffff611b3c16565b9050858782815481101515611ab657fe5b600091825260209091206002909102015411611ad457809250611ae8565b611ae581600163ffffffff6118c316565b91505b611a6b565b8683815481101515611afb57fe5b9060005260206000209060020201600001548784815481101515611b1b57fe5b906000526020600020906002020160010154945094505b5050509250929050565b6000808284811515611b4a57fe5b049493505050505600a165627a7a72305820ce3be7521f5794db2129e317d888ecbd07bd91fee02d33e14da52c43c0377ae40029", "direct_dependencies": [], "full_dependencies": [], "linkrefs": [], "linkrefs_runtime": [], "metadata": {"compiler": {"version": "0.4.25+commit.59dbf8f1"}, "language": "Solidity", "output": {"abi": [{"constant": true, "inputs": [], "name": "maximumSupply", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "name", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "approve", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "announcementHash", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_signature", "type": "bytes"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}, {"name": "_fee", "type": "uint256"}, {"name": "_nonce", "type": "uint256"}], "name": "transferPreSigned", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "_token", "type": "address"}, {"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}, {"name": "_fee", "type": "uint256"}, {"name": "_nonce", "type": "uint256"}], "name": "transferPreSignedHashing", "outputs": [{"name": "", "type": "bytes32"}], "payable": false, "stateMutability": "pure", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "addedValue", "type": "uint256"}, {"name": "data", "type": "bytes"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"name": "tokenCount", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "hash", "type": "bytes32"}, {"name": "sig", "type": "bytes"}], "name": "recover", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "pure", "type": "function"}, {"constant": false, "inputs": [{"name": "from", "type": "address"}, {"name": "to", "type": "address"}, {"name": "value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "investor", "type": "address"}], "name": "importInvestor", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "decimals", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "owner", "type": "address"}, {"name": "blockNumber", "type": "uint256"}], "name": "balanceAt", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "receiver", "type": "address"}, {"name": "amount", "type": "uint256"}, {"name": "data", "type": "bytes"}], "name": "transferAndCall", "outputs": [{"name": "success", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}, {"name": "", "type": "uint256"}], "name": "tokenBalances", "outputs": [{"name": "blockNumber", "type": "uint256"}, {"name": "value", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "uint256"}], "name": "tokensTotal", "outputs": [{"name": "blockNumber", "type": "uint256"}, {"name": "value", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}, {"name": "", "type": "address"}], "name": "used", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "blockNumber", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}, {"name": "", "type": "address"}], "name": "allowed", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "announcementType", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "subtractedValue", "type": "uint256"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "owner", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "subtractedValue", "type": "uint256"}, {"name": "data", "type": "bytes"}], "name": "decreaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "balanceImported", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "", "type": "address"}], "name": "options", "outputs": [{"name": "", "type": "bytes32"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "to", "type": "address"}, {"name": "amount", "type": "uint256"}], "name": "transferInvestorTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "transferVerifier", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "symbol", "outputs": [{"name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"name": "blockNumber", "type": "uint256"}], "name": "totalSupplyAt", "outputs": [{"name": "tokenCount", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "announcementName", "outputs": [{"name": "", "type": "bytes32"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "KYC", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "optionsTotal", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "amount", "type": "uint256"}], "name": "act", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "addedValue", "type": "uint256"}], "name": "increaseApproval", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"name": "owner", "type": "address"}, {"name": "spender", "type": "address"}], "name": "allowance", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "announcementURI", "outputs": [{"name": "", "type": "bytes32"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "token", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [{"name": "_token", "type": "address"}, {"name": "_KYC", "type": "address"}, {"name": "name", "type": "bytes32"}, {"name": "URI", "type": "bytes32"}, {"name": "_type", "type": "uint256"}, {"name": "_hash", "type": "uint256"}, {"name": "_options", "type": "bytes32[]"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "option", "type": "address"}, {"indexed": false, "name": "description", "type": "bytes32"}], "name": "OptionAdded", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "token", "type": "address"}, {"indexed": false, "name": "KYC", "type": "address"}, {"indexed": false, "name": "blockNumber", "type": "uint256"}, {"indexed": false, "name": "maximumSupply", "type": "uint256"}], "name": "IICCreated", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": true, "name": "delegate", "type": "address"}, {"indexed": false, "name": "amount", "type": "uint256"}, {"indexed": false, "name": "fee", "type": "uint256"}], "name": "TransferPreSigned", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "from", "type": "address"}, {"indexed": false, "name": "hash", "type": "bytes32"}], "name": "Debug", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "name": "from", "type": "address"}, {"indexed": false, "name": "receiver", "type": "address"}, {"indexed": false, "name": "amount", "type": "uint256"}, {"indexed": false, "name": "data", "type": "bytes"}], "name": "ERC677Transfer", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}, {"indexed": true, "name": "spender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}], "devdoc": {"methods": {"allowance(address,address)": {"details": "Function to check the amount of tokens that an owner allowed to a spender.", "params": {"owner": "address The address which owns the funds.", "spender": "address The address which will spend the funds."}, "return": "A uint256 specifying the amount of tokens still available for the spender."}, "approve(address,uint256)": {"details": "Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729", "params": {"spender": "The address which will spend the funds.", "value": "The amount of tokens to be spent."}, "return": "true if the call function was executed successfully"}, "balanceAt(address,uint256)": {"details": "Gets the balance of the specified address.", "params": {"blockNumber": "The block number we want to query for the balance.", "owner": "The address to query the the balance of."}, "return": "An uint256 representing the amount owned by the passed address."}, "balanceOf(address)": {"details": "Gets the balance of the specified address.", "params": {"owner": "The address to query the the balance of."}, "return": "An uint256 representing the amount owned by the passed address."}, "decreaseApproval(address,uint256)": {"details": "Decrease the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[spender] == 0. To decrement allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"spender": "The address which will spend the funds.", "subtractedValue": "The amount of tokens to decrease the allowance by."}}, "decreaseApproval(address,uint256,bytes)": {"details": "Addition to StandardToken methods. Decrease the amount of tokens that an owner allowed to a spender and execute a call with the sent data. * This is originally from OpenZeppelin. * approve should be called when allowed[spender] == 0. To decrement allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"data": "ABI-encoded contract call to call `spender` address.", "spender": "The address which will spend the funds.", "subtractedValue": "The amount of tokens to decrease the allowance by."}}, "increaseApproval(address,uint256)": {"details": "Increase the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[spender] == 0. To increment allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"addedValue": "The amount of tokens to increase the allowance by.", "spender": "The address which will spend the funds."}}, "increaseApproval(address,uint256,bytes)": {"details": "Addition to StandardToken methods. Increase the amount of tokens that an owner allowed to a spender and execute a call with the sent data. * This is originally from OpenZeppelin. * approve should be called when allowed[spender] == 0. To increment allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol", "params": {"addedValue": "The amount of tokens to increase the allowance by.", "data": "ABI-encoded contract call to call `spender` address.", "spender": "The address which will spend the funds."}}, "recover(bytes32,bytes)": {"params": {"hash": "bytes32 message, the hash is the signed message. What is recovered is the signer address.", "sig": "bytes signature, the signature is generated using web3.eth.sign()"}}, "totalSupply()": {"details": "total number of tokens in existence", "return": "A uint256 specifying the total number of tokens in existence"}, "totalSupplyAt(uint256)": {"details": "total number of tokens in existence at the given block", "params": {"blockNumber": "The block number we want to query for the total supply"}, "return": "A uint256 specifying the total number of tokens at a given block"}, "transferFrom(address,address,uint256)": {"details": "Transfer tokens from one address to another", "params": {"from": "address The address which you want to send tokens from", "to": "address The address which you want to transfer to", "value": "uint256 the amount of tokens to be transferred"}, "return": "true if the call function was executed successfully"}, "transferPreSigned(bytes,address,uint256,uint256,uint256)": {"params": {"_fee": "uint256 The amount of tokens paid to msg.sender, by the person who used to own the tokens.", "_nonce": "uint256 Presigned transaction number", "_signature": "bytes The signature, issued by the owner.", "_to": "address The address which you want to transfer to.", "_value": "uint256 The amount of tokens to be transferred."}}, "transferPreSignedHashing(address,address,uint256,uint256,uint256)": {"params": {"_fee": "uint256 The amount of tokens paid to msg.sender, by the owner.", "_nonce": "uint256 Presigned transaction number.", "_to": "address The address which you want to transfer to.", "_token": "address The address of the token.", "_value": "uint256 The amount of tokens to be transferred."}}}}, "userdoc": {"methods": {"recover(bytes32,bytes)": {"notice": "Recover signer address from a message by using his signature. Signature is delivered as a byte array, hence need for this implementation."}, "transferPreSigned(bytes,address,uint256,uint256,uint256)": {"notice": "Submit a presigned transfer"}, "transferPreSignedHashing(address,address,uint256,uint256,uint256)": {"notice": "Hash (keccak256) of the payload used by transferPreSigned"}}}}, "settings": {"compilationTarget": {"contracts/security-token/tests/VotingContract.sol": "VotingContract"}, "evmVersion": "byzantium", "libraries": {}, "optimizer": {"enabled": true, "runs": 500}, "remappings": [":zeppelin=zeppelin"]}, "sources": {"contracts/security-token/CheckpointToken.sol": {"keccak256": "0xef922aeddfc702a53f7b2030a9737e375b7f6d34b56c5b144603dca1bcbdcc58", "urls": ["bzzr://9c4eeae60ae624abb2dfd48cb917e3e32f11f6dc2ac42fa65b17fc4ae157b75c"]}, "contracts/security-token/ERC677.sol": {"keccak256": "0xf557f3e12aa7f5a23d40957d9ac216db0902997f70f856697529d55e9823e50a", "urls": ["bzzr://c924011b4a57d2eb355c276255fc7af284c2f5b20ece36957d23a2e058975349"]}, "contracts/security-token/ERC677Token.sol": {"keccak256": "0xd67b6b0d3c7e9def09554b11c35f3b609a87ae2ea0f5853f0ca745f7f6366866", "urls": ["bzzr://bcd0f5e4bad7064ea5d8fe4e4e8a276af4ebddc4c7c25703c2dd32ca9ff715f7"]}, "contracts/security-token/ERC865.sol": {"keccak256": "0x326ad6a9d49740439036de2eb866edeabde2e12710ad03d4a3709a41e827ea96", "urls": ["bzzr://1a82e221a8da7446b644300d00183eefe1015f4a9ecd3d2ccbfa99c6bc68f9f3"]}, "contracts/security-token/KYCInterface.sol": {"keccak256": "0x29b1037cfb17f26421589f64eb271362aa9fbfd1f975e68df8071fd98be2052c", "urls": ["bzzr://f815559e1245fd3603a1baf5f3ad7ed7d571690b35f131cb27e0fcf8246c34a4"]}, "contracts/security-token/SecurityTransferAgentInterface.sol": {"keccak256": "0x23b8a61926435e2c583480c0de72a99b4f7ec8a4213ffc46711f83ecdeaf9186", "urls": ["bzzr://36be13b6cf1389357679705bd18969409ecde684ace2d9c5b606d8986e0231cd"]}, "contracts/security-token/tests/BogusAnnouncement.sol": {"keccak256": "0x2acace3c803b98f5aa174ddf3eb1af7dec2b67c4d6c34d1ef69fa88a2851a68b", "urls": ["bzzr://74b212027437f6f197cc0d9cd06f056e02be9595cf7b45582b41f14a080d51d3"]}, "contracts/security-token/tests/InvestorInteractionContract.sol": {"keccak256": "0x2a4149dfcef2c7a3e9327ea07cce094bb8bda4ff2f18506e8054788bedf741ff", "urls": ["bzzr://343e1ebb08208bffd6c6b0a5a41d9cbb081c1f200b534cd01e0c67d29b163543"]}, "contracts/security-token/tests/VotingContract.sol": {"keccak256": "0xfc6723f114c20b91e41d9ace0e2df875780e6f3cc13650ea3fe2b0a516eeb031", "urls": ["bzzr://ecddbce4c10cd494cac4870f805fd902e16c9ee9fdd44e2731bf4a204750eefe"]}, "zeppelin/contracts/math/SafeMath.sol": {"keccak256": "0x341ba8cb467a3623e819ba1a683ac1d264005186f308505214e5f6bc89446a08", "urls": ["bzzr://59b5652ee4e4a1b5a8f1a8906e14c84af43d636cf5ca0725cc1813aabe4c8c17"]}, "zeppelin/contracts/token/ERC20/BasicToken.sol": {"keccak256": "0x948404468d61ff35ea4194650670408dabd65da7f905a1c16888ab84520bf39e", "urls": ["bzzr://ea75e20f95d7e4e10394fe6bfaa8eee56b4757c2a6f1e8df4180d33afa621935"]}, "zeppelin/contracts/token/ERC20/ERC20.sol": {"keccak256": "0xd0b7ada654221cc9e4cb4a97754b99d2e7c2fb824303f1ba5f1661f4e8086751", "urls": ["bzzr://95e6edb880940b6e1182c30f97e674a3598768fca1607d9fa145840ec3dddf97"]}, "zeppelin/contracts/token/ERC20/ERC20Basic.sol": {"keccak256": "0x1fd84910b5033c9d169995cd88bdd465d37d4a384ef2837b238b88cd26ef74e7", "urls": ["bzzr://620436dae6ea9102dd7372bf01ceb67d052c3a02d8b23a5d1648bd48a99edf62"]}, "zeppelin/contracts/token/ERC20/StandardToken.sol": {"keccak256": "0xd2b344a5259e19ec143074cfa65637a10c40b68395c59808c4af13bccbb2de55", "urls": ["bzzr://d61a01175a7ca1ba9f4403de603c20b897e33ec425aef2d9f8a7f9ddfdfaf5b2"]}}, "version": 1}, "name": "VotingContract", "ordered_full_dependencies": [], "source_path": "contracts/security-token/tests/VotingContract.sol", "source": "\n\n\ncontract BogusAnnouncement {\n bytes32 public announcementName;\n bytes32 public announcementURI;\n uint256 public announcementType;\n uint256 public announcementHash;\n\n function BogusAnnouncement(bytes32 _announcementName, bytes32 _announcementURI, uint256 _announcementType, uint256 _announcementHash) public {\n announcementName = _announcementName;\n announcementURI = _announcementURI;\n announcementType = _announcementType;\n announcementHash = _announcementHash;\n }\n}\n\n\ninterface KYCInterface {\n event Whitelisted(address who, uint128 nonce);\n\n function isWhitelisted(address who) external view returns(bool);\n}\n\n/**\n * This smart contract code is Copyright 2018, 2019 TokenMarket Ltd. For more information see https://tokenmarket.net\n * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt\n * NatSpec is used intentionally to cover also other than public functions.\n * Solidity 0.4.18 is intentionally used: it's stable, and our framework is\n * based on that.\n */\n\n\n\ninterface SecurityTransferAgent {\n function verify(address from, address to, uint256 value) public view returns (uint256 newValue);\n}\n\n\n\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n\ninterface ERC677Receiver {\n function tokenFallback(address from, uint256 amount, bytes data) returns (bool success);\n}\n\ninterface ERC677 {\n\n // TODO: Have a different event name to make sure that tools with bad APIs do not mix this with ERC-20 Transfer() event that lacks data parameter\n event ERC677Transfer(address from, address receiver, uint256 amount, bytes data);\n\n function transferAndCall(ERC677Receiver receiver, uint amount, bytes data) returns (bool success);\n}\n\n\n\ncontract ERC677Token is ERC20, ERC677 {\n function transferAndCall(ERC677Receiver receiver, uint amount, bytes data) returns (bool success) {\n require(transfer(address(receiver), amount));\n\n ERC677Transfer(msg.sender, address(receiver), amount, data);\n\n require(receiver.tokenFallback(msg.sender, amount, data));\n }\n}\n\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n assert(c / a == b);\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n\n\n/**\n * @author TokenMarket / Ville Sundell \n */\ncontract CheckpointToken is ERC677Token {\n using SafeMath for uint256; // We use only uint256 for safety reasons (no boxing)\n\n /// @dev Name of the token, usually the company and/or series (like \"TokenMeerkat Ltd. Series A\"):\n string public name;\n /// @dev Ticker symbol, usually bases on the \"name\" above (like \"MEER\"):\n string public symbol;\n /// @dev Decimals are usually set to 18 for EIP-20 tokens:\n uint256 public decimals;\n /// @dev If transferVerifier is set, that contract will be queried upon every token transaction:\n SecurityTransferAgent public transferVerifier;\n\n /// @dev Checkpoint is the fundamental unit for our internal accounting\n /// (who owns what, and at what moment in time)\n struct Checkpoint {\n uint256 blockNumber;\n uint256 value;\n }\n /// @dev This mapping contains checkpoints for every address:\n mapping (address => Checkpoint[]) public tokenBalances;\n /// @dev This is a one dimensional Checkpoint mapping of the overall token supply:\n Checkpoint[] public tokensTotal;\n\n /// @dev This mapping keeps account for approve() -> fransferFrom() pattern:\n mapping (address => mapping (address => uint256)) public allowed;\n\n /**\n * @dev Constructor for CheckpointToken, initializing the token\n *\n * Here we define initial values for name, symbol and decimals.\n *\n * @param _name Initial name of the token\n * @param _symbol Initial symbol of the token\n * @param _decimals Number of decimals for the token, industry standard is 18\n */\n function CheckpointToken(string _name, string _symbol, uint256 _decimals) public {\n name = _name;\n symbol = _symbol;\n decimals = _decimals;\n }\n\n /** PUBLIC FUNCTIONS\n ****************************************/\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param owner address The address which owns the funds.\n * @param spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address owner, address spender) public view returns (uint256) {\n return allowed[owner][spender];\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n *\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param spender The address which will spend the funds.\n * @param value The amount of tokens to be spent.\n * @return true if the call function was executed successfully\n */\n function approve(address spender, uint256 value) public returns (bool) {\n allowed[msg.sender][spender] = value;\n Approval(msg.sender, spender, value);\n return true;\n }\n\n /**\n * @dev Transfer tokens from one address to another\n * @param from address The address which you want to send tokens from\n * @param to address The address which you want to transfer to\n * @param value uint256 the amount of tokens to be transferred\n * @return true if the call function was executed successfully\n */\n function transferFrom(address from, address to, uint256 value) public returns (bool) {\n require(value <= allowed[from][msg.sender]);\n\n transferInternal(from, to, value);\n Transfer(from, to, value);\n return true;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param to The address to transfer to.\n * @param value The amount to be transferred.\n * @return true if the call function was executed successfully\n */\n function transfer(address to, uint256 value) public returns (bool) {\n transferInternal(msg.sender, to, value);\n Transfer(msg.sender, to, value);\n return true;\n }\n\n /**\n * @dev total number of tokens in existence\n * @return A uint256 specifying the total number of tokens in existence\n */\n function totalSupply() public view returns (uint256 tokenCount) {\n tokenCount = balanceAtBlock(tokensTotal, block.number);\n }\n\n /**\n * @dev total number of tokens in existence at the given block\n * @param blockNumber The block number we want to query for the total supply\n * @return A uint256 specifying the total number of tokens at a given block\n */\n function totalSupplyAt(uint256 blockNumber) public view returns (uint256 tokenCount) {\n tokenCount = balanceAtBlock(tokensTotal, blockNumber);\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address owner) public view returns (uint256 balance) {\n balance = balanceAtBlock(tokenBalances[owner], block.number);\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param owner The address to query the the balance of.\n * @param blockNumber The block number we want to query for the balance.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceAt(address owner, uint256 blockNumber) public view returns (uint256 balance) {\n balance = balanceAtBlock(tokenBalances[owner], blockNumber);\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param spender The address which will spend the funds.\n * @param addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(address spender, uint addedValue) public returns (bool) {\n allowed[msg.sender][spender] = allowed[msg.sender][spender].add(addedValue);\n Approval(msg.sender, spender, allowed[msg.sender][spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param spender The address which will spend the funds.\n * @param subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(address spender, uint subtractedValue) public returns (bool) {\n uint oldValue = allowed[msg.sender][spender];\n if (subtractedValue > oldValue) {\n allowed[msg.sender][spender] = 0;\n } else {\n allowed[msg.sender][spender] = oldValue.sub(subtractedValue);\n }\n Approval(msg.sender, spender, allowed[msg.sender][spender]);\n return true;\n }\n\n /**\n * @dev Addition to StandardToken methods. Increase the amount of tokens that\n * an owner allowed to a spender and execute a call with the sent data.\n *\n * This is originally from OpenZeppelin.\n *\n * approve should be called when allowed[spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param spender The address which will spend the funds.\n * @param addedValue The amount of tokens to increase the allowance by.\n * @param data ABI-encoded contract call to call `spender` address.\n */\n function increaseApproval(address spender, uint addedValue, bytes data) public returns (bool) {\n require(spender != address(this));\n\n increaseApproval(spender, addedValue);\n\n require(spender.call(data));\n\n return true;\n }\n\n /**\n * @dev Addition to StandardToken methods. Decrease the amount of tokens that\n * an owner allowed to a spender and execute a call with the sent data.\n *\n * This is originally from OpenZeppelin.\n *\n * approve should be called when allowed[spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param spender The address which will spend the funds.\n * @param subtractedValue The amount of tokens to decrease the allowance by.\n * @param data ABI-encoded contract call to call `spender` address.\n */\n function decreaseApproval(address spender, uint subtractedValue, bytes data) public returns (bool) {\n require(spender != address(this));\n\n decreaseApproval(spender, subtractedValue);\n\n require(spender.call(data));\n\n return true;\n }\n\n /** INTERNALS\n ****************************************/\n\n function balanceAtBlock(Checkpoint[] storage checkpoints, uint256 blockNumber) internal returns (uint256 balance) {\n uint256 currentBlockNumber;\n (currentBlockNumber, balance) = getCheckpoint(checkpoints, blockNumber);\n }\n\n function transferInternal(address from, address to, uint256 value) internal {\n uint256 fromBalance = balanceOf(from);\n uint256 toBalance = balanceOf(to);\n\n if (address(transferVerifier) != address(0)) {\n value = transferVerifier.verify(from, to, value);\n require(value > 0);\n }\n\n setCheckpoint(tokenBalances[from], fromBalance.sub(value));\n setCheckpoint(tokenBalances[to], toBalance.add(value));\n }\n\n\n /** CORE\n ** The Magic happens below:\n ***************************************/\n\n function setCheckpoint(Checkpoint[] storage checkpoints, uint256 newValue) internal {\n if ((checkpoints.length == 0) || (checkpoints[checkpoints.length.sub(1)].blockNumber < block.number)) {\n checkpoints.push(Checkpoint(block.number, newValue));\n } else {\n checkpoints[checkpoints.length.sub(1)] = Checkpoint(block.number, newValue);\n }\n }\n\n function getCheckpoint(Checkpoint[] storage checkpoints, uint256 blockNumber) internal returns (uint256 blockNumber_, uint256 value) {\n if (checkpoints.length == 0) {\n return (0, 0);\n }\n\n // Shortcut for the actual value\n if (blockNumber >= checkpoints[checkpoints.length.sub(1)].blockNumber) {\n return (checkpoints[checkpoints.length.sub(1)].blockNumber, checkpoints[checkpoints.length.sub(1)].value);\n }\n\n if (blockNumber < checkpoints[0].blockNumber) {\n return (0, 0);\n }\n\n // Binary search of the value in the array\n uint256 min = 0;\n uint256 max = checkpoints.length.sub(1);\n while (max > min) {\n uint256 mid = (max.add(min.add(1))).div(2);\n if (checkpoints[mid].blockNumber <= blockNumber) {\n min = mid;\n } else {\n max = mid.sub(1);\n }\n }\n\n return (checkpoints[min].blockNumber, checkpoints[min].value);\n }\n}\n\n\n\n\n/* Largely copied from https://github.com/OpenZeppelin/openzeppelin-solidity/pull/741/files */\n\ncontract ERC865 is CheckpointToken {\n /** @dev This is used to prevent nonce reuse: */\n mapping(bytes => bool) signatures;\n\n event TransferPreSigned(address indexed from, address indexed to, address indexed delegate, uint256 amount, uint256 fee);\n event Debug(address from, bytes32 hash);\n\n /**\n * @notice Submit a presigned transfer\n * @param _signature bytes The signature, issued by the owner.\n * @param _to address The address which you want to transfer to.\n * @param _value uint256 The amount of tokens to be transferred.\n * @param _fee uint256 The amount of tokens paid to msg.sender, by the person who used to own the tokens.\n * @param _nonce uint256 Presigned transaction number\n */\n function transferPreSigned(\n bytes _signature,\n address _to,\n uint256 _value,\n uint256 _fee,\n uint256 _nonce\n )\n public\n returns (bool)\n {\n require(_to != address(0));\n require(signatures[_signature] == false);\n bytes32 hashedTx = transferPreSignedHashing(address(this), _to, _value, _fee, _nonce);\n address from = recover(hashedTx, _signature);\n require(from != address(0));\n\n transferInternal(from, _to, _value);\n transferInternal(from, msg.sender, _fee);\n\n signatures[_signature] = true;\n TransferPreSigned(from, _to, msg.sender, _value, _fee);\n Transfer(from, _to, _value);\n Transfer(from, msg.sender, _fee);\n return true;\n }\n\n /**\n * @notice Hash (keccak256) of the payload used by transferPreSigned\n * @param _token address The address of the token.\n * @param _to address The address which you want to transfer to.\n * @param _value uint256 The amount of tokens to be transferred.\n * @param _fee uint256 The amount of tokens paid to msg.sender, by the owner.\n * @param _nonce uint256 Presigned transaction number.\n */\n function transferPreSignedHashing(\n address _token,\n address _to,\n uint256 _value,\n uint256 _fee,\n uint256 _nonce\n )\n public\n pure\n returns (bytes32)\n {\n /* \"48664c16\": transferPreSignedHashing(address,address,address,uint256,uint256,uint256) */\n return keccak256(bytes4(0x48664c16), _token, _to, _value, _fee, _nonce);\n }\n\n /**\n * @notice Recover signer address from a message by using his signature.\n * Signature is delivered as a byte array, hence need for this\n * implementation.\n * @param hash bytes32 message, the hash is the signed message. What is recovered is the signer address.\n * @param sig bytes signature, the signature is generated using web3.eth.sign()\n */\n function recover(bytes32 hash, bytes sig) public pure returns (address) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n\n /* Check the signature length */\n if (sig.length != 65) {\n return (address(0));\n }\n\n /* Divide the signature in r, s and v variables */\n assembly {\n r := mload(add(sig, 32))\n s := mload(add(sig, 64))\n v := byte(0, mload(add(sig, 96)))\n }\n\n /* Version of signature should be 27 or 28, but 0 and 1 are also possible versions */\n if (v < 27) {\n v += 27;\n }\n\n /* If the version is correct return the signer address */\n if (v != 27 && v != 28) {\n return (address(0));\n } else {\n return ecrecover(hash, v, r, s);\n }\n }\n\n}\n\n\n\n\n\n\n\n\n/**\n * @title Basic token\n * @dev Basic version of StandardToken, with no allowances.\n */\ncontract BasicToken is ERC20Basic {\n using SafeMath for uint256;\n\n mapping(address => uint256) balances;\n\n uint256 totalSupply_;\n\n /**\n * @dev total number of tokens in existence\n */\n function totalSupply() public view returns (uint256) {\n return totalSupply_;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param _to The address to transfer to.\n * @param _value The amount to be transferred.\n */\n function transfer(address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[msg.sender]);\n\n // SafeMath.sub will throw if there is not enough balance.\n balances[msg.sender] = balances[msg.sender].sub(_value);\n balances[_to] = balances[_to].add(_value);\n Transfer(msg.sender, _to, _value);\n return true;\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param _owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address _owner) public view returns (uint256 balance) {\n return balances[_owner];\n }\n\n}\n\n\n\n\n/**\n * @title Standard ERC20 token\n *\n * @dev Implementation of the basic standard token.\n * @dev https://github.com/ethereum/EIPs/issues/20\n * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol\n */\ncontract StandardToken is ERC20, BasicToken {\n\n mapping (address => mapping (address => uint256)) internal allowed;\n\n\n /**\n * @dev Transfer tokens from one address to another\n * @param _from address The address which you want to send tokens from\n * @param _to address The address which you want to transfer to\n * @param _value uint256 the amount of tokens to be transferred\n */\n function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[_from]);\n require(_value <= allowed[_from][msg.sender]);\n\n balances[_from] = balances[_from].sub(_value);\n balances[_to] = balances[_to].add(_value);\n allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);\n Transfer(_from, _to, _value);\n return true;\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n *\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param _spender The address which will spend the funds.\n * @param _value The amount of tokens to be spent.\n */\n function approve(address _spender, uint256 _value) public returns (bool) {\n allowed[msg.sender][_spender] = _value;\n Approval(msg.sender, _spender, _value);\n return true;\n }\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param _owner address The address which owns the funds.\n * @param _spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address _owner, address _spender) public view returns (uint256) {\n return allowed[_owner][_spender];\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(address _spender, uint _addedValue) public returns (bool) {\n allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {\n uint oldValue = allowed[msg.sender][_spender];\n if (_subtractedValue > oldValue) {\n allowed[msg.sender][_spender] = 0;\n } else {\n allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);\n }\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n}\n\n\ncontract InvestorInteractionContract is BogusAnnouncement, CheckpointToken, ERC865 {\n uint256 public blockNumber;\n CheckpointToken public token;\n mapping(address => bool) public balanceImported;\n\n KYCInterface public KYC;\n\n mapping(address => bytes32) public options;\n mapping(address => mapping(address => uint256)) public used;\n uint256 public optionsTotal;\n uint256 public maximumSupply;\n\n event OptionAdded(address option, bytes32 description);\n event IICCreated(address token, address KYC, uint256 blockNumber, uint256 maximumSupply);\n\n function InvestorInteractionContract(CheckpointToken _token, KYCInterface _KYC, bytes32 name, bytes32 URI, uint256 _type, uint256 _hash, uint256 _blockNumber, bytes32[] _options) CheckpointToken(\"\", \"\", 18) BogusAnnouncement(name, URI, _type, _hash) public {\n token = _token;\n if (_blockNumber > 0) {\n blockNumber = _blockNumber;\n } else {\n blockNumber = block.number;\n }\n KYC = _KYC;\n\n for(uint i=0; i<_options.length; i++) {\n address optionAddress = address(100 + i);\n options[optionAddress] = _options[i];\n\n OptionAdded(optionAddress, _options[i]);\n }\n\n maximumSupply = token.totalSupplyAt(blockNumber);\n\n IICCreated(_token, _KYC, _blockNumber, maximumSupply);\n }\n\n function importInvestor(address investor) public {\n // Anyone can invoke this for failsafe reasons\n\n require(balanceImported[investor] == false);\n\n uint256 value = token.balanceAt(investor, blockNumber);\n uint256 blackHoleBalance = balanceOf(address(0));\n uint256 totalSupplyNow = totalSupply();\n\n setCheckpoint(tokenBalances[address(0)], blackHoleBalance.add(value));\n transferInternal(address(0), investor, value);\n setCheckpoint(tokensTotal, totalSupplyNow.add(value));\n\n balanceImported[investor] = true;\n Transfer(address(0), investor, value);\n }\n\n function transferTrigger(address from, address to, uint256 amount) internal {\n used[to][from] += amount;\n }\n\n function transfer(address _to, uint256 _value) public returns (bool) {\n if (balanceImported[msg.sender] == false) {\n importInvestor(msg.sender);\n }\n\n if (options[_to] != 0) {\n require(KYC.isWhitelisted(msg.sender));\n transferTrigger(msg.sender, _to, _value);\n }\n\n // Doing this as msg.sender:\n return super.transfer(_to, _value);\n }\n\n function transferInvestorTokens(address to, uint256 amount) {\n transfer(to, amount);\n }\n\n function act(uint256 amount) external {\n // This is for the default action, address 100\n transferInvestorTokens(address(100), amount);\n }\n}\n\n\n\ncontract VotingContract is InvestorInteractionContract {\n\n function VotingContract(CheckpointToken _token, KYCInterface _KYC, bytes32 name, bytes32 URI, uint256 _type, uint256 _hash, bytes32[] _options) InvestorInteractionContract(_token, _KYC, name, URI, _type, _hash, 0, _options) {\n\n }\n}\n"}} \ No newline at end of file