Cryo Explorer Ethereum Mainnet

Address Contract Partially Verified

Address 0x958A03181806cb8807beF40e864e55f89B3393D3
Balance 0 ETH
Nonce 1
Code Size 21779 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

21779 bytes
0x608060405234801561001057600080fd5b506004361061030c5760003560e01c80636ffc22b81161019d578063b4ecb847116100e9578063dd62ed3e116100a2578063efa408de1161007c578063efa408de1461116b578063f2274abb14611473578063f2fde38b146114cd578063ffeb7d75146115115761030c565b8063dd62ed3e1461108f578063df8de3e714611107578063eefa597b1461114b5761030c565b8063b4ecb84714610f4d578063c331051714610fa7578063c752ff6214610fc5578063d1f276d314610fe3578063d7e7088a14611017578063d8542d511461105b5761030c565b80638da5cb5b1161015657806396132521116101305780639613252114610e455780639738968c14610e65578063a457c2d714610e85578063a9059cbb14610ee95761030c565b80638da5cb5b14610d3457806395d89b4114610d6857806395fe6f1d14610deb5761030c565b80636ffc22b814610b6f57806370a0823114610bb35780637386f0a714610c0b578063753e88e514610c635780638444b39114610cb1578063867c285714610cda5761030c565b806342c1867b1161025c57806351ed17a4116102155780635f412d4f116101ef5780635f412d4f14610ab9578063600440cb14610ac3578063612544b314610af757806361d3d7a614610b4f5761030c565b806351ed17a41461098c5780635c65816514610a0d5780635de4ccb014610a855761030c565b806342c1867b146106ec578063432146751461074657806345977d031461079657806345e7e140146107c45780634b2ba0dd1461081c5780634eee966f1461083a5761030c565b806327e235e3116102c957806339509351116102a357806339509351146105c45780633d0acdaa146106285780633fa615b01461068057806340c10f191461069e5761030c565b806327e235e31461050a57806329ff4f5314610562578063313ce567146105a65761030c565b806302f652a31461031157806305d2035b1461036157806306fdde0314610381578063095ea7b31461040457806318160ddd1461046857806323b872dd14610486575b600080fd5b61035f6004803603604081101561032757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803515159060200190929190505050611555565b005b61036961170a565b60405180821515815260200191505060405180910390f35b61038961171d565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156103c95780820151818401526020810190506103ae565b50505050905090810190601f1680156103f65780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6104506004803603604081101561041a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506117bb565b60405180821515815260200191505060405180910390f35b610470611a9b565b6040518082815260200191505060405180910390f35b6104f26004803603606081101561049c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611aa1565b60405180821515815260200191505060405180910390f35b61054c6004803603602081101561052057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611ed4565b6040518082815260200191505060405180910390f35b6105a46004803603602081101561057857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611eec565b005b6105ae612106565b6040518082815260200191505060405180910390f35b610610600480360360408110156105da57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061210c565b60405180821515815260200191505060405180910390f35b61066a6004803603602081101561063e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506124a2565b6040518082815260200191505060405180910390f35b6106886124ee565b6040518082815260200191505060405180910390f35b6106ea600480360360408110156106b457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506124f4565b005b61072e6004803603602081101561070257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612852565b60405180821515815260200191505060405180910390f35b6107946004803603604081101561075c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803515159060200190929190505050612872565b005b6107c2600480360360208110156107ac57600080fd5b8101908080359060200190929190505050612a1e565b005b610806600480360360208110156107da57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612ed1565b6040518082815260200191505060405180910390f35b610824612f1d565b6040518082815260200191505060405180910390f35b61098a6004803603604081101561085057600080fd5b810190808035906020019064010000000081111561086d57600080fd5b82018360208201111561087f57600080fd5b803590602001918460018302840111640100000000831117156108a157600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019064010000000081111561090457600080fd5b82018360208201111561091657600080fd5b8035906020019184600183028401116401000000008311171561093857600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050612f23565b005b6109ce600480360360208110156109a257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506130f4565b60405180878152602001868152602001858152602001841515815260200183151581526020018215158152602001965050505050505060405180910390f35b610a6f60048036036040811015610a2357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613157565b6040518082815260200191505060405180910390f35b610a8d61317c565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610ac16131a2565b005b610acb61328a565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610b3960048036036020811015610b0d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506132b0565b6040518082815260200191505060405180910390f35b610b576132fc565b60405180821515815260200191505060405180910390f35b610bb160048036036020811015610b8557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061330f565b005b610bf560048036036020811015610bc957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061347c565b6040518082815260200191505060405180910390f35b610c3760048036036020811015610c2157600080fd5b81019080803590602001909291905050506134c5565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610caf60048036036040811015610c7957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050613504565b005b610cb9613714565b60405180826004811115610cc957fe5b815260200191505060405180910390f35b610d1c60048036036020811015610cf057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506137a7565b60405180821515815260200191505060405180910390f35b610d3c6137c7565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610d706137ed565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610db0578082015181840152602081019050610d95565b50505050905090810190601f168015610ddd5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610e2d60048036036020811015610e0157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061388b565b60405180821515815260200191505060405180910390f35b610e4d6138e4565b60405180821515815260200191505060405180910390f35b610e6d6138f7565b60405180821515815260200191505060405180910390f35b610ed160048036036040811015610e9b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061391e565b60405180821515815260200191505060405180910390f35b610f3560048036036040811015610eff57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050613d89565b60405180821515815260200191505060405180910390f35b610f8f60048036036020811015610f6357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613e73565b60405180821515815260200191505060405180910390f35b610faf613ecc565b6040518082815260200191505060405180910390f35b610fcd613ed2565b6040518082815260200191505060405180910390f35b610feb613ed8565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6110596004803603602081101561102d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613efe565b005b6110636142c0565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6110f1600480360360408110156110a557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506142e6565b6040518082815260200191505060405180910390f35b6111496004803603602081101561111d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061436d565b005b611153614607565b60405180821515815260200191505060405180910390f35b611471600480360360a081101561118157600080fd5b810190808035906020019064010000000081111561119e57600080fd5b8201836020820111156111b057600080fd5b803590602001918460208302840111640100000000831117156111d257600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019064010000000081111561123257600080fd5b82018360208201111561124457600080fd5b8035906020019184602083028401116401000000008311171561126657600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803590602001906401000000008111156112c657600080fd5b8201836020820111156112d857600080fd5b803590602001918460208302840111640100000000831117156112fa57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019064010000000081111561135a57600080fd5b82018360208201111561136c57600080fd5b8035906020019184602083028401116401000000008311171561138e57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803590602001906401000000008111156113ee57600080fd5b82018360208201111561140057600080fd5b8035906020019184602083028401116401000000008311171561142257600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050614610565b005b6114b56004803603602081101561148957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506147e4565b60405180821515815260200191505060405180910390f35b61150f600480360360208110156114e357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061483d565b005b6115536004803603602081101561152757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614991565b005b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146115af57600080fd5b6000600460149054906101000a900460ff16151581151514611639576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4e6f7420696e2072656c6561736564207374617465000000000000000000000081525060200191505060405180910390fd5b81600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507fed1ac4893a9f15c91db48b531385560822de7e6cbe0c96becd32c44a4d493d7a338484604051808473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018215158152602001935050505060405180910390a1505050565b600660009054906101000a900460ff1681565b600e8054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156117b35780601f10611788576101008083540402835291602001916117b3565b820191906000526020600020905b81548152906001019060200180831161179657829003601f168201915b505050505081565b600080821415611833576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f43616e6e6f7420617070726f766520302076616c75650000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156118d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f43616e6e6f7420617070726f766520666f72204e756c6c20614444524553530081525060200191505060405180910390fd5b6000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054146119ab576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603c815260200180615354603c913960400191505060405180910390fd5b81600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60005481565b600080600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205473f0f59ddc5dbc8175e4ab7934919552ada1c138c66366098d4f9091856040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b158015611bbb57600080fd5b505af4158015611bcf573d6000803e3d6000fd5b505050506040513d6020811015611be557600080fd5b8101908080519060200190929190505050600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205473f0f59ddc5dbc8175e4ab7934919552ada1c138c663f4f3bdc19091856040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b158015611cd157600080fd5b505af4158015611ce5573d6000803e3d6000fd5b505050506040513d6020811015611cfb57600080fd5b8101908080519060200190929190505050600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508073f0f59ddc5dbc8175e4ab7934919552ada1c138c663f4f3bdc19091856040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b158015611da857600080fd5b505af4158015611dbc573d6000803e3d6000fd5b505050506040513d6020811015611dd257600080fd5b8101908080519060200190929190505050600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a360019150509392505050565b60016020528060005260406000206000915090505481565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611f4657600080fd5b6000600460149054906101000a900460ff16151581151514611fd0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4e6f7420696e2072656c6561736564207374617465000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612056576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602481526020018061545c6024913960400191505060405180910390fd5b81600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f53ad6c516bf269067125fc12d6ff230c46f078425b8d3e024eceea3a514979863383604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a15050565b60105481565b600080821415612184576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f43616e6e6f7420616464203020616c6c6f77616e63652076616c75650000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415612227576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f43616e6e6f7420616c6c6f7720666f72204e756c6c206164647265737300000081525060200191505060405180910390fd5b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205473f0f59ddc5dbc8175e4ab7934919552ada1c138c66366098d4f9091846040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b1580156122fc57600080fd5b505af4158015612310573d6000803e3d6000fd5b505050506040513d602081101561232657600080fd5b8101908080519060200190929190505050600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b6000600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101549050919050565b60115481565b600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16612596576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260378152602001806153906037913960400191505060405180910390fd5b600660009054906101000a900460ff16156125b057600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612636576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806153f16023913960400191505060405180910390fd5b60005473f0f59ddc5dbc8175e4ab7934919552ada1c138c66366098d4f9091836040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b15801561269157600080fd5b505af41580156126a5573d6000803e3d6000fd5b505050506040513d60208110156126bb57600080fd5b8101908080519060200190929190505050600081905550600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205473f0f59ddc5dbc8175e4ab7934919552ada1c138c66366098d4f9091836040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b15801561276a57600080fd5b505af415801561277e573d6000803e3d6000fd5b505050506040513d602081101561279457600080fd5b8101908080519060200190929190505050600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b60076020528060005260406000206000915054906101000a900460ff1681565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146128cc57600080fd5b600660009054906101000a900460ff16156128e657600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561296c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806154bd6021913960400191505060405180910390fd5b80600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507f4b0adf6c802794c7dde28a08a4e07131abcff3bf9603cd71f14f90bec7865efa8282604051808373ffffffffffffffffffffffffffffffffffffffff16815260200182151581526020019250505060405180910390a15050565b6000612a28613714565b905060036004811115612a3757fe5b816004811115612a4357fe5b1480612a645750600480811115612a5657fe5b816004811115612a6257fe5b145b612ad6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f43616c6c656420696e206261642053746174650000000000000000000000000081525060200191505060405180910390fd5b6000821415612b4d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f496e76616c696420696e7075742076616c75650000000000000000000000000081525060200191505060405180910390fd5b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205473f0f59ddc5dbc8175e4ab7934919552ada1c138c663f4f3bdc19091846040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b158015612be557600080fd5b505af4158015612bf9573d6000803e3d6000fd5b505050506040513d6020811015612c0f57600080fd5b8101908080519060200190929190505050600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555060005473f0f59ddc5dbc8175e4ab7934919552ada1c138c663f4f3bdc19091846040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b158015612cbe57600080fd5b505af4158015612cd2573d6000803e3d6000fd5b505050506040513d6020811015612ce857600080fd5b8101908080519060200190929190505050600081905550600d5473f0f59ddc5dbc8175e4ab7934919552ada1c138c66366098d4f9091846040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b158015612d5a57600080fd5b505af4158015612d6e573d6000803e3d6000fd5b505050506040513d6020811015612d8457600080fd5b8101908080519060200190929190505050600d81905550600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663753e88e533846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b158015612e2e57600080fd5b505af1158015612e42573d6000803e3d6000fd5b50505050600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f7e5c344a8141a805725cb476f76c6953b842222b967edd1f78ddb6e8b3f397ac846040518082815260200191505060405180910390a35050565b6000600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600201549050919050565b60125481565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614612f7d57600080fd5b81600e9080519060200190612f939291906152a8565b5080600f9080519060200190612faa9291906152a8565b507fd131ab1e6f279deea74e13a18477e13e2107deb6dc8ae955648948be5841fb46600e600f60405180806020018060200183810383528581815460018160011615610100020316600290048152602001915080546001816001161561010002031660029004801561305d5780601f106130325761010080835404028352916020019161305d565b820191906000526020600020905b81548152906001019060200180831161304057829003601f168201915b50508381038252848181546001816001161561010002031660029004815260200191508054600181600116156101000203166002900480156130e05780601f106130b5576101008083540402835291602001916130e0565b820191906000526020600020905b8154815290600101906020018083116130c357829003601f168201915b505094505050505060405180910390a15050565b60086020528060005260406000206000915090508060000154908060010154908060020154908060030160009054906101000a900460ff16908060030160019054906101000a900460ff16908060030160029054906101000a900460ff16905086565b6002602052816000526040600020602052806000526040600020600091509150505481565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614613265576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f4e6f742072656c65617365206167656e7400000000000000000000000000000081525060200191505060405180910390fd5b6001600660006101000a81548160ff021916908315150217905550613288614b88565b565b600b60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001549050919050565b601360149054906101000a900460ff1681565b600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166133b1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260378152602001806153906037913960400191505060405180910390fd5b600660009054906101000a900460ff16156133cb57600080fd5b6000600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905060018160030160016101000a81548160ff0219169083151502179055507ff30c7fcd9fd678846e18459c28dc824d5d764462d6a7984e536eca43e2c747d982604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a15050565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600981815481106134d557600080fd5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461355e57600080fd5b600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205473f0f59ddc5dbc8175e4ab7934919552ada1c138c66366098d4f9091836040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b1580156135f657600080fd5b505af415801561360a573d6000803e3d6000fd5b505050506040513d602081101561362057600080fd5b8101908080519060200190929190505050600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555060005473f0f59ddc5dbc8175e4ab7934919552ada1c138c66366098d4f9091836040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b1580156136cf57600080fd5b505af41580156136e3573d6000803e3d6000fd5b505050506040513d60208110156136f957600080fd5b81019080805190602001909291905050506000819055505050565b600061371e6138f7565b61372b57600190506137a4565b600073ffffffffffffffffffffffffffffffffffffffff16600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141561378b57600290506137a4565b6000600d54141561379f57600390506137a4565b600490505b90565b60056020528060005260406000206000915054906101000a900460ff1681565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600f8054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156138835780601f1061385857610100808354040283529160200191613883565b820191906000526020600020905b81548152906001019060200180831161386657829003601f168201915b505050505081565b6000600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030160009054906101000a900460ff169050919050565b600460149054906101000a900460ff1681565b6000600460149054906101000a900460ff1680156139195750613918614c68565b5b905090565b600080821415613996576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f43616e6e6f742061646420302064656372656173652076616c7565000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415613a39576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f43616e6e6f7420616c6c6f7720666f72204e756c6c206164647265737300000081525060200191505060405180910390fd5b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115613b0e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602281526020018061543a6022913960400191505060405180910390fd5b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205473f0f59ddc5dbc8175e4ab7934919552ada1c138c663f4f3bdc19091846040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b158015613be357600080fd5b505af4158015613bf7573d6000803e3d6000fd5b505050506040513d6020811015613c0d57600080fd5b8101908080519060200190929190505050600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b600033600460149054906101000a900460ff16613e6057600560008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16613e5f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f4e6f742041205472616e73666572204167656e7400000000000000000000000081525060200191505060405180910390fd5b5b613e6a8484614c71565b91505092915050565b6000600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030160019054906101000a900460ff169050919050565b600a5481565b600d5481565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b613f066138f7565b613f5b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603d815260200180615480603d913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415613ffe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f43616e6e6f74206265205a65726f20416464726573730000000000000000000081525060200191505060405180910390fd5b600b60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146140a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806153c7602a913960400191505060405180910390fd5b6004808111156140b057fe5b6140b8613714565b60048111156140c357fe5b141561411a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806154146026913960400191505060405180910390fd5b80600c60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166361d3d7a66040518163ffffffff1660e01b815260040160206040518083038186803b1580156141c357600080fd5b505afa1580156141d7573d6000803e3d6000fd5b505050506040513d60208110156141ed57600080fd5b8101908080519060200190929190505050614270576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f42616420696e746572666163650000000000000000000000000000000000000081525060200191505060405180910390fd5b7f7845d5aa74cc410e35571258d954f23b82276e160fe8c188fa80566580f279cc81604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a150565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146143c757600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561440157600080fd5b600081905060008173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561446f57600080fd5b505afa158015614483573d6000803e3d6000fd5b505050506040513d602081101561449957600080fd5b810190808051906020019092919050505090508173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561453f57600080fd5b505af1158015614553573d6000803e3d6000fd5b505050506040513d602081101561456957600080fd5b810190808051906020019092919050505050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167ff931edb47c50b4b4104c187b5814a9aef5f709e17e2ecf9617e860cacade929c836040518082815260200191505060405180910390a3505050565b60006001905090565b600660009054906101000a900460ff161561462a57600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461468457600080fd5b600b60009054906101000a900460ff161561469b57fe5b83518551146146a657fe5b82518451146146b157fe5b81518351146146bc57fe5b60005b855181101561478957600073ffffffffffffffffffffffffffffffffffffffff168682815181106146ec57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff161461477c5761477b86828151811061471e57fe5b602002602001015186838151811061473257fe5b602002602001015186848151811061474657fe5b602002602001015186858151811061475a57fe5b602002602001015186868151811061476e57fe5b6020026020010151614d5b565b5b80806001019150506146bf565b506001600b60006101000a81548160ff0219169083151502179055507ff5d05f4d917e73fd3cfc7c78b8b428aadb7942b9ab681a3e74be043a4ca6c8b585516040518082815260200191505060405180910390a15050505050565b6000600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030160029054906101000a900460ff169050919050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461489757600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156148d157600080fd5b8073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415614a34576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f43616e6e6f7420736574206d617374657220636f6e747261637420746f20300081525060200191505060405180910390fd5b600b60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614614af7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f4d73672053656e646572206e6f742075706772616465206d617374657200000081525060200191505060405180910390fd5b80600b60016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f0bae748e6d38d2b1532af619519837d91d74845ad693f6f229677b4ac20b2d5081604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a150565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614614c4b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f4e6f742072656c65617365206167656e7400000000000000000000000000000081525060200191505060405180910390fd5b6001600460146101000a81548160ff021916908315150217905550565b60006001905090565b600033600460149054906101000a900460ff16614d4857600560008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16614d47576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f4e6f742041205472616e73666572204167656e7400000000000000000000000081525060200191505060405180910390fd5b5b614d52848461500b565b91505092915050565b600660009054906101000a900460ff1615614d7557600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614614dcf57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415614e0657fe5b614e0f8561388b565b614f0f576009859080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600a5473f0f59ddc5dbc8175e4ab7934919552ada1c138c66366098d4f909160016040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b158015614ed257600080fd5b505af4158015614ee6573d6000803e3d6000fd5b505050506040513d6020811015614efc57600080fd5b8101908080519060200190929190505050505b6040518060c00160405280858152602001848152602001838152602001600115158152602001600015158152602001821515815250600860008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008201518160000155602082015181600101556040820151816002015560608201518160030160006101000a81548160ff02191690831515021790555060808201518160030160016101000a81548160ff02191690831515021790555060a08201518160030160026101000a81548160ff0219169083151502179055509050505050505050565b6000600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205473f0f59ddc5dbc8175e4ab7934919552ada1c138c663f4f3bdc19091846040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b1580156150a557600080fd5b505af41580156150b9573d6000803e3d6000fd5b505050506040513d60208110156150cf57600080fd5b8101908080519060200190929190505050600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205473f0f59ddc5dbc8175e4ab7934919552ada1c138c66366098d4f9091846040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b1580156151bb57600080fd5b505af41580156151cf573d6000803e3d6000fd5b505050506040513d60208110156151e557600080fd5b8101908080519060200190929190505050600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b828054600181600116156101000203166002900490600052602060002090601f0160209004810192826152de5760008555615325565b82601f106152f757805160ff1916838001178555615325565b82800160010185558215615325579182015b82811115615324578251825591602001919060010190615309565b5b5090506153329190615336565b5090565b5b8082111561534f576000816000905550600101615337565b509056fe5370656e64657220616c726561647920617070726f7665642c696e737465616420696e6372656173652f646563726561736520616c6c6f77616e63654f6e6c792063726f776473616c6520636f6e7472616374732061726520616c6c6f77656420746f206d696e74206e657720746f6b656e734f6e6c792061206d61737465722063616e2064657369676e61746520746865206e657874206167656e7452656365697665722063616e6e6f7420626520746865204e756c6c2041646472657373557067726164652068617320616c726561647920626567756e20666f7220616e206167656e7443616e6e6f742072656d6f7665206d6f7265207468616e20616c6c6f77616e63652152656c65617365204167656e742063616e6e6f74206265204e756c6c204164647265737354686520746f6b656e206973206e6f742079657420696e2061207374617465207468617420776520636f756c64207468696e6b20757067726164696e674d696e74204167656e742043616e6e6f74206265204e756c6c2041646472657373a264697066735822122066e058b734dcdf765f01ba0c61e7e06db674abcceaa9ccd987eae0b8b3b29c4e64736f6c63430007060033

Verified Source Code Partial Match

Compiler: v0.7.6+commit.7338295f EVM: istanbul Optimization: No
ERC20.sol 17 lines
// SPDX-License-Identifier: MIT
pragma solidity 0.7.6;


import "./ERC20Basic.sol";


/**
 * @title ERC20 interface
 * @dev see https://github.com/ethereum/EIPs/issues/20
 */
abstract contract ERC20 is ERC20Basic {
    function allowance(address owner, address spender) public view virtual returns (uint256);
    function transferFrom(address from, address to, uint256 value) public virtual returns (bool);
    function approve(address spender, uint256 value) public virtual returns (bool);
    event Approval(address indexed owner, address indexed spender, uint256 value);
}
Ownable.sol 40 lines
// SPDX-License-Identifier: MIT
pragma solidity 0.7.6;


/**
 * @title Ownable
 * @dev The Ownable contract has an owner address, and provides basic authorization control
 * functions, this simplifies the implementation of "user permissions".
 */
contract Ownable {
    address public owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
    * @dev The Ownable constructor sets the original `owner` of the contract to the sender
    * account.
    */
    constructor ()  {
        owner = msg.sender;
    }

    /**
    * @dev Throws if called by any account other than the owner.
    */
    modifier onlyOwner() {
        require(msg.sender == owner);
        _;
    }

    /**
    * @dev Allows the current owner to transfer control of the contract to a newOwner.
    * @param newOwner The address to transfer ownership to.
    */
    function transferOwnership(address newOwner) public onlyOwner {
        require(newOwner != address(0));
        emit OwnershipTransferred(owner, newOwner);
        owner = newOwner;
    }
}
ERC20Basic.sol 15 lines
// SPDX-License-Identifier: MIT
pragma solidity 0.7.6;


/**
 * @title ERC20Basic
 * @dev Simpler version of ERC20 interface
 * @dev see https://github.com/ethereum/EIPs/issues/179
 */
abstract contract ERC20Basic {
    uint256 public totalSupply;
    function balanceOf(address who) public view virtual returns (uint256);
    function transfer(address to, uint256 value) public virtual returns (bool);
    event Transfer(address indexed from, address indexed to, uint256 value);
}
UpgradeAgent.sol 28 lines
// SPDX-License-Identifier: MIT
/**
 * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net
 *
 * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt
 */

pragma solidity 0.7.6;


/**
 * Upgrade agent interface inspired by Lunyr.
 *
 * Upgrade agent transfers tokens to a new contract.
 * Upgrade agent itself can be the token contract, or just a middle man contract doing the heavy lifting.
 */
abstract contract UpgradeAgent {

    uint public originalSupply;

    /** Interface marker */
    function isUpgradeAgent() public pure returns (bool) {
        return true;
    }

    function upgradeFrom(address _from, uint256 _value) public virtual;

}
StandardToken.sol 99 lines
// SPDX-License-Identifier: MIT
/**
 * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net
 *
 * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt
 */

pragma solidity 0.7.6;


import "./ERC20.sol";
import "./SafeMathLibExt.sol";


/**
 * Standard ERC20 token with Short Hand Attack and approve() race condition mitigation.
 *
 * Based on code by FirstBlood:
 * https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
 */
contract StandardToken is ERC20 {

    using SafeMathLibExt for uint256;

    /* Token supply got increased and a new owner received these tokens */
    event Minted(address receiver, uint256 amount);

    /* Actual balances of token holders */
    mapping(address => uint256) public balances;

    /* approve() allowances */
    mapping (address => mapping (address => uint256)) public allowed;

    /* Interface declaration */
    function isToken() public pure returns (bool weAre) {
        return true;
    }

    function transfer(address _to, uint256 _value) public virtual override returns (bool success) {
        balances[msg.sender] = balances[msg.sender].minus(_value);
        balances[_to] = balances[_to].plus(_value);
        emit Transfer(msg.sender, _to, _value);
        return true;
    }

    function transferFrom(address _from, address _to, uint256 _value) public virtual override returns (bool success) {
        uint256 _allowance = allowed[_from][msg.sender];

        balances[_to] = balances[_to].plus(_value);
        balances[_from] = balances[_from].minus(_value);
        allowed[_from][msg.sender] = _allowance.minus(_value);
        emit Transfer(_from, _to, _value);
        return true;
    }

    function balanceOf(address _owner) public view virtual override returns (uint256 balance) {
        return balances[_owner];
    }

    function approve(address _spender, uint256 _value) public  virtual override returns (bool success) {

        // To change the approve amount you first have to reduce the addresses`
        //  allowance to zero by calling `approve(_spender, 0)` if it is not
        //  already 0 to mitigate the race condition described here:
        //  https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
        // if ((_addedValue != 0) && (allowed[msg.sender][_spender] != 0)) revert();
        if(_value == 0 ) revert("Cannot approve 0 value");
        if(_spender == address(0)) revert("Cannot approve for Null aDDRESS");
        if(allowed[msg.sender][_spender] != 0 ) revert("Spender already approved,instead increase/decrease allowance");

        allowed[msg.sender][_spender] = _value;
        emit Approval(msg.sender, _spender, _value);
        return true;
    }

    function increaseAllowance(address _spender, uint256 _addedValue) public virtual returns (bool) {
        if(_addedValue == 0 ) revert("Cannot add 0 allowance value");
        if(_spender == address(0)) revert("Cannot allow for Null address");

        allowed[msg.sender][_spender] = allowed[msg.sender][_spender].plus(_addedValue);
        emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
        return true;
    }

    function decreaseAllowance(address _spender, uint256 _subtractedValue) public virtual returns (bool) {
        if(_subtractedValue == 0 ) revert("Cannot add 0 decrease value");
        if(_spender == address(0)) revert("Cannot allow for Null address");
        require(_subtractedValue <= allowed[msg.sender][_spender], "Cannot remove more than allowance!");
        
        allowed[msg.sender][_spender] = allowed[msg.sender][_spender].minus(_subtractedValue);
        emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
        return true;
    }

    function allowance(address _owner, address _spender) public view virtual override returns (uint256 remaining) {
        return allowed[_owner][_spender];
    }

}
SafeMathLibExt.sol 47 lines
// SPDX-License-Identifier: MIT
/**
 * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net
 *
 * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt
 */

pragma solidity 0.7.6;


/**
 * Safe unsigned safe math.
 *
 * https://blog.aragon.one/library-driven-development-in-solidity-2bebcaf88736#.750gwtwli
 *
 * Originally from https://raw.githubusercontent.com/AragonOne/zeppelin-solidity/master/contracts/SafeMathLib.sol
 *
 * Maintained here until merged to mainline zeppelin-solidity.
 *
 */
library SafeMathLibExt {

    function times(uint a, uint b) public pure returns (uint) {
        uint c = a * b;
        assert(a == 0 || c / a == b);
        return c;
    }

    function divides(uint a, uint b) public pure returns (uint) {
        assert(b > 0);
        uint c = a / b;
        assert(a == b * c + a % b);
        return c;
    }

    function minus(uint a, uint b) public pure returns (uint) {
        assert(b <= a);
        return a - b;
    }

    function plus(uint a, uint b) public pure returns (uint) {
        uint c = a + b;
        assert(c >= a);
        return c;
    }

}
ReleasableToken.sol 107 lines
// SPDX-License-Identifier: MIT
/**
 * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net
 *
 * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt
 */

pragma solidity 0.7.6;

import "./Ownable.sol";
import "./StandardToken.sol";


  /**
  * Define interface for releasing the token transfer after a successful crowdsale.
  */
contract ReleasableToken is StandardToken, Ownable {
    
    event ReleaseAgentSet(address caller, address agent);
    event TransferAgentSet(address callet, address agent, bool set);
    
    /* The finalizer contract that allows unlift the transfer limits on this token */
    address public releaseAgent;

    /** A crowdsale contract can release us to the wild if ICO success. 
        If false we are are in transfer lock up period.*/
    bool public released = false;

    /** 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. */
    mapping (address => bool) public transferAgents;

    

    /**
    * Limit token transfer until the crowdsale is over.
    *
    */
    modifier canTransfer(address _sender) {

        if (!released) {
            if (!transferAgents[_sender]) {
                revert("Not A Transfer Agent");
            }
        }
        _;
    }

    /**
    * Set the contract that can call release and make the token transferable.
    *
    * Design choice. Allow reset the release agent to fix fat finger mistakes.
    */
    function setReleaseAgent(address addr) public onlyOwner inReleaseState(false) {
        require(addr != address(0), "Release Agent cannot be Null Address");
        // We don't do interface check here as we might want to a normal wallet address to act as a release agent
        releaseAgent = addr;

        emit ReleaseAgentSet(msg.sender, addr);
    }

    /**
    * Owner can allow a particular address (a crowdsale contract) to transfer tokens despite the lock up period.
    */
    function setTransferAgent(address addr, bool state) public onlyOwner inReleaseState(false) {
        transferAgents[addr] = state;

        emit TransferAgentSet(msg.sender, addr, state);
    }

    /**
    * 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).
    */
    function releaseTokenTransfer() public virtual onlyReleaseAgent {
        released = true;
    }

    /** The function can be called only before or after the tokens have been releasesd */
    modifier inReleaseState(bool releaseState) {
        if (releaseState != released) {
            revert("Not in released state");
        }
        _;
    }

    /** The function can be called only by a whitelisted release agent. */
    modifier onlyReleaseAgent() {
        if (msg.sender != releaseAgent) {
            revert("Not release agent");
        }
        _;
    }

    function transfer(address _to, uint _value) public virtual override canTransfer(msg.sender) returns (bool success) {
        // Call StandardToken.transfer()
        return super.transfer(_to, _value);
    }

    function transferFrom(address _from, address _to, uint _value) public virtual override canTransfer(_from) returns (bool success) {
        // Call StandardToken.transferForm()
        return super.transferFrom(_from, _to, _value);
    }

}
MintableTokenExt.sol 167 lines
// SPDX-License-Identifier: MIT
/**
 * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net
 *
 * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt
 */
pragma solidity 0.7.6;

import "./SafeMathLibExt.sol";
import "./ERC20.sol";
import "./Ownable.sol";
import "./StandardToken.sol";


/**
 * A token that can increase its supply by another contract.
 *
 * This allows uncapped crowdsale by dynamically increasing the supply when money pours in.
 * Only mint agents, contracts whitelisted by owner, can mint new tokens.
 *
 */
contract MintableTokenExt is StandardToken, Ownable {

    using SafeMathLibExt for uint;

    bool public mintingFinished = false;

    /** List of agents that are allowed to create new tokens */
    mapping (address => bool) public mintAgents;

    event MintingAgentChanged(address addr, bool state  );
    event ReversedTokenListMultipleSet(uint length);
    event FinalizedReversedAddress(address addr);

    /** inPercentageUnit is percents of tokens multiplied to 10 up to percents decimals.
    * For example, for reserved tokens in percents 2.54%
    * inPercentageUnit = 254
    * inPercentageDecimals = 2
    */
    struct ReservedTokensData {
        uint inTokens;
        uint inPercentageUnit;
        uint inPercentageDecimals;
        bool isReserved;
        bool isDistributed;
        bool isVested;
    }

    mapping (address => ReservedTokensData) public reservedTokensList;
    address[] public reservedTokensDestinations;
    uint public reservedTokensDestinationsLen = 0;
    bool private reservedTokensDestinationsAreSet = false;

    modifier onlyMintAgent() {
        // Only crowdsale contracts are allowed to mint new tokens
        if (!mintAgents[msg.sender]) {
            revert("Only crowdsale contracts are allowed to mint new tokens");
        }
        _;
    }

    /** Make sure we are not done yet. */
    modifier canMint() {
        if (mintingFinished) revert();
        _;
    }

    function finalizeReservedAddress(address addr) public onlyMintAgent canMint {
        ReservedTokensData storage reservedTokensData = reservedTokensList[addr];
        reservedTokensData.isDistributed = true;

        emit FinalizedReversedAddress(addr);
    }

    function isAddressReserved(address addr)  public  view virtual returns (bool isReserved) {
        return reservedTokensList[addr].isReserved;
    }

    function areTokensDistributedForAddress(address addr) public view returns (bool isDistributed) {
        return reservedTokensList[addr].isDistributed;
    }

    function getReservedTokens(address addr) public view returns (uint inTokens) {
        return reservedTokensList[addr].inTokens;
    }

    function getReservedPercentageUnit(address addr) public view returns (uint inPercentageUnit) {
        return reservedTokensList[addr].inPercentageUnit;
    }

    function getReservedPercentageDecimals(address addr) public view returns (uint inPercentageDecimals) {
        return reservedTokensList[addr].inPercentageDecimals;
    }

    function getReservedIsVested(address addr) public view returns (bool isVested) {
        return reservedTokensList[addr].isVested;
    }

    function setReservedTokensListMultiple(
        address[] memory addrs, 
        uint[] memory inTokens, 
        uint[] memory inPercentageUnit, 
        uint[] memory inPercentageDecimals,
        bool[] memory isVested
        ) public canMint onlyOwner {
        assert(!reservedTokensDestinationsAreSet);
        assert(addrs.length == inTokens.length);
        assert(inTokens.length == inPercentageUnit.length);
        assert(inPercentageUnit.length == inPercentageDecimals.length);
        for (uint iterator = 0; iterator < addrs.length; iterator++) {
            if (addrs[iterator] != address(0)) {
                setReservedTokensList(
                    addrs[iterator],
                    inTokens[iterator],
                    inPercentageUnit[iterator],
                    inPercentageDecimals[iterator],
                    isVested[iterator]
                    );
            }
        }
        reservedTokensDestinationsAreSet = true;

        emit ReversedTokenListMultipleSet(addrs.length);
    }

    /**
    * Create new tokens and allocate them to an address..
    *
    * Only callably by a crowdsale contract (mint agent).
    */
    function mint(address receiver, uint amount) public onlyMintAgent canMint {
        require(receiver != address(0), "Receiver cannot be the Null Address");
        totalSupply = totalSupply.plus(amount);
        balances[receiver] = balances[receiver].plus(amount);

        // This will make the mint transaction apper in EtherScan.io
        // We can remove this after there is a standardized minting event
        emit Transfer(address(0), receiver, amount);
    }

    /**
    * Owner can allow a crowdsale contract to mint new tokens.
    */
    function setMintAgent(address addr, bool state) public onlyOwner canMint {
        require(addr != address(0), "Mint Agent Cannot be Null Address");
        mintAgents[addr] = state;
        emit MintingAgentChanged(addr, state);
    }

    function setReservedTokensList(address addr, uint inTokens, uint inPercentageUnit, uint inPercentageDecimals,bool isVested) 
    private canMint onlyOwner {
        assert(addr != address(0));
        if (!isAddressReserved(addr)) {
            reservedTokensDestinations.push(addr);
            reservedTokensDestinationsLen.plus(1);
        }

        reservedTokensList[addr] = ReservedTokensData({
            inTokens: inTokens,
            inPercentageUnit: inPercentageUnit,
            inPercentageDecimals: inPercentageDecimals,
            isReserved: true,
            isDistributed: false,
            isVested:isVested
        });
    }
}
UpgradeableToken.sol 144 lines
// SPDX-License-Identifier: MIT
/**
 * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net
 *
 * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt
 */

pragma solidity 0.7.6;

import "./ERC20.sol";
import "./StandardToken.sol";
import "./UpgradeAgent.sol";


/**
 * A token upgrade mechanism where users can opt-in amount of tokens to the next smart contract revision.
 *
 * First envisioned by Golem and Lunyr projects.
 */
contract UpgradeableToken is StandardToken {
    using SafeMathLibExt for uint;

    /** 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. */
    address public upgradeMaster;

    /** The next contract where the tokens will be migrated. */
    UpgradeAgent public upgradeAgent;

    /** How many tokens we have upgraded by now. */
    uint256 public totalUpgraded;
    /**
    * Upgrade states.
    *
    * - NotAllowed: The child contract has not reached a condition where the upgrade can bgun
    * - WaitingForAgent: Token allows upgrade, but we don't have a new agent yet
    * - ReadyToUpgrade: The agent is set, but not a single token has been upgraded yet
    * - Upgrading: Upgrade agent is set and the balance holders can upgrade their tokens
    *
    */
    enum UpgradeState {Unknown, NotAllowed, WaitingForAgent, ReadyToUpgrade, Upgrading}

    /**
    * Somebody has upgraded some of his tokens.
    */
    event Upgrade(address indexed _from, address indexed _to, uint256 _value);

    /**
    * New upgrade agent available.
    */
    event UpgradeAgentSet(address agent);

    /**
    * New upgrade master available.
    */   
    event UpgradeMasterSet(address agent);


    /**
    * Do not allow construction without upgrade master set.
    */
    constructor(address _upgradeMaster) {
        require(_upgradeMaster != address(0), "Upgrade Master cannot be Null Address");
        upgradeMaster = _upgradeMaster;
    }

    /**
    * Allow the token holder to upgrade some of their tokens to a new contract.
    */
    function upgrade(uint256 value) public {

        UpgradeState state = getUpgradeState();
        if (!(state == UpgradeState.ReadyToUpgrade || state == UpgradeState.Upgrading)) {
            // Called in a bad state
            revert("Called in bad State");
        }

        // Validate input value.
        if (value == 0) revert("Invalid input value");

        balances[msg.sender] = balances[msg.sender].minus(value);

        // Take tokens out from circulation
        totalSupply = totalSupply.minus(value);
        totalUpgraded = totalUpgraded.plus(value);

        // Upgrade agent reissues the tokens
        upgradeAgent.upgradeFrom(msg.sender, value);
        emit Upgrade(msg.sender, address(upgradeAgent), value);
    }

    /**
    * Child contract can enable to provide the condition when the upgrade can begun.
    */
    function canUpgrade() public virtual returns(bool) {
        return true;
    }

    /**
    * Set an upgrade agent that handles
    */
    function setUpgradeAgent(address agent) external {
        if (!canUpgrade()) {
            // The token is not yet in a state that we could think upgrading
            revert("The token is not yet in a state that we could think upgrading");
        }

        if (agent == address(0)) revert("Cannot be Zero Address");
        // Only a master can designate the next agent
        if (msg.sender != upgradeMaster) revert("Only a master can designate the next agent");
        // Upgrade has already begun for an agent
        if (getUpgradeState() == UpgradeState.Upgrading) revert("Upgrade has already begun for an agent");

        upgradeAgent = UpgradeAgent(agent);

        // Bad interface
        if (!upgradeAgent.isUpgradeAgent()) revert("Bad interface");      

        emit UpgradeAgentSet(agent);
    }

    /**
    * Get the state of the token upgrade.
    */
    function getUpgradeState() public returns(UpgradeState) {
        if (!canUpgrade()) return UpgradeState.NotAllowed;
        else if (address(upgradeAgent) == address(0)) return UpgradeState.WaitingForAgent;
        else if (totalUpgraded == 0) return UpgradeState.ReadyToUpgrade;
        else return UpgradeState.Upgrading;
    }

    /**
    * Change the upgrade master.
    *
    * This allows us to set a new owner for the upgrade mechanism.
    */
    function setUpgradeMaster(address master) public {
        if (master == address(0)) revert("Cannot set master contract to 0");
        if (msg.sender != upgradeMaster) revert("Msg Sender not upgrade master");
        upgradeMaster = master;

        emit UpgradeMasterSet(master);
    }
}
CrowdsaleTokenExt.sol 150 lines
// SPDX-License-Identifier: MIT
/**
 * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net
 *
 * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt
 */

pragma solidity 0.7.6;

import "./StandardToken.sol";
import "./UpgradeableToken.sol";
import "./ReleasableToken.sol";
import "./MintableTokenExt.sol";


/**
 * A crowdsaled token.
 *
 * An ERC-20 token designed specifically for crowdsales with investor protection and further development path.
 *
 * - The token transfer() is disabled until the crowdsale is over
 * - The token contract gives an opt-in upgrade path to a new contract
 * - The same token can be part of several crowdsales through approve() mechanism
 * - The token can be capped (supply set in the constructor) or uncapped (crowdsale contract can mint new tokens)
 *
 */
contract CrowdsaleTokenExt is ReleasableToken, MintableTokenExt, UpgradeableToken {
    using SafeMathLibExt for uint256;

    /** Name and symbol were updated. */
    event UpdatedTokenInformation(string newName, string newSymbol);

    event ClaimedTokens(address indexed _token, address indexed _controller, uint256 _amount);

    string public name;

    string public symbol;

    uint public decimals;

    /* Minimum ammount of tokens every buyer can buy. */
    uint256 public minCap;

    /**
    * Construct the token.
    *
    * This token must be created through a team multisig wallet, so that it is owned by that wallet.
    *
    * @param _name Token name
    * @param _symbol Token symbol - should be all caps
    * @param _initialSupply How many tokens we start with
    * @param _decimals Number of decimal places
    * @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.
    */
    constructor(string memory _name, string memory _symbol, uint256 _initialSupply, uint _decimals, bool _mintable, uint256 _globalMinCap) 
     UpgradeableToken(msg.sender) {

        // Create any address, can be transferred
        // to team multisig via changeOwner(),
        // also remember to call setUpgradeMaster()
        owner = msg.sender;

        name = _name;
        symbol = _symbol;

        totalSupply = _initialSupply;

        decimals = _decimals;

        minCap = _globalMinCap;

        // Create initially all balance on the team multisig
        balances[owner] = totalSupply;

        if (totalSupply > 0) {
            emit Minted(owner, totalSupply);
        }

        // No more new supply allowed after the token creation
        if (!_mintable) {
            mintingFinished = true;
            if (totalSupply == 0) {
                revert("annot create a token without supply and no minting"); // Cannot create a token without supply and no minting
            }
        }
    }

    /**
    * When token is released to be transferable, enforce no new tokens can be created.
    */
    function releaseTokenTransfer() public virtual override onlyReleaseAgent {
        mintingFinished = true;
        super.releaseTokenTransfer();
    }

    /**
    * Allow upgrade agent functionality kick in only if the crowdsale was success.
    */
    function canUpgrade() public virtual override returns(bool) {
        return released && super.canUpgrade();
    }

    /**
    * 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.
    */
    function setTokenInformation(string memory _name, string memory _symbol) external onlyOwner {
        name = _name;
        symbol = _symbol;

        emit UpdatedTokenInformation(name, symbol);
    }

    /**
    * Claim tokens that were accidentally sent to this contract.
    *
    * @param _token The address of the token contract that you want to recover.
    */
    function claimTokens(address _token) external onlyOwner {
        require(_token != address(0));

        ERC20 token = ERC20(_token);
        uint256 balance = token.balanceOf(address(this));
        token.transfer(owner, balance);

        emit ClaimedTokens(_token, owner, balance);
    }

    function transferFrom(address _from, address _to, uint256 _value) public virtual override(StandardToken,ReleasableToken) returns (bool success) {
        uint256 _allowance = allowed[_from][msg.sender];

        balances[_to] = balances[_to].plus(_value);
        balances[_from] = balances[_from].minus(_value);
        allowed[_from][msg.sender] = _allowance.minus(_value);
        emit Transfer(_from, _to, _value);
        return true;
    }

    function transfer(address _to, uint256 _value) public virtual override(StandardToken,ReleasableToken) canTransfer(msg.sender) returns (bool success) {
        // Call StandardToken.transfer()
        return super.transfer(_to, _value);
    }

}
CrowdsaleTokenExtv1.sol 61 lines
// SPDX-License-Identifier: MIT
/**
 * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net
 *
 * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt
 */

pragma solidity 0.7.6;

import "./CrowdsaleTokenExt.sol";
import "./SafeMathLibExt.sol";

/**
 * A crowdsaled token.
 *
 * An ERC-20 token designed specifically for crowdsales with investor protection and further development path.
 *
 * - The token transfer() is disabled until the crowdsale is over
 * - The token contract gives an opt-in upgrade path to a new contract
 * - The same token can be part of several crowdsales through approve() mechanism
 * - The token can be capped (supply set in the constructor) or uncapped (crowdsale contract can mint new tokens)
 *
 */
contract CrowdsaleTokenExtv1 is CrowdsaleTokenExt {
    using SafeMathLibExt for uint256;

    uint256 public originalSupply;

    address public oldTokenAddress;

    bool public isUpgradeAgent = false;
    /**
    * Construct the token.
    *
    * This token must be created through a team multisig wallet, so that it is owned by that wallet.
    *
    * @param _name Token name
    * @param _symbol Token symbol - should be all caps
    * @param _initialSupply How many tokens we start with
    * @param _decimals Number of decimal places
    * @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.
    */
    constructor(string memory _name, string memory _symbol, uint256 _initialSupply, uint256 _decimals, bool _mintable, 
    uint256 _globalMinCap, address _oldTokenAddress, uint256 _originalSupply) 
     CrowdsaleTokenExt(_name, _symbol, _initialSupply, _decimals, _mintable, _globalMinCap) {    
        originalSupply = _originalSupply;
        oldTokenAddress = _oldTokenAddress;
        isUpgradeAgent = true;    
    }

    function upgradeFrom(address _from, uint256 value) public {
        // Make sure the call is from old token contract
        require(msg.sender == oldTokenAddress);
        // Validate input value.
        balances[_from] = balances[_from].plus(value);
        // Take tokens out from circulation
        totalSupply = totalSupply.plus(value);
    }

}

Read Contract

allowance 0xdd62ed3e → uint256
allowed 0x5c658165 → uint256
areTokensDistributedForAddress 0xb4ecb847 → bool
balanceOf 0x70a08231 → uint256
balances 0x27e235e3 → uint256
decimals 0x313ce567 → uint256
getReservedIsVested 0xf2274abb → bool
getReservedPercentageDecimals 0x45e7e140 → uint256
getReservedPercentageUnit 0x3d0acdaa → uint256
getReservedTokens 0x612544b3 → uint256
isAddressReserved 0x95fe6f1d → bool
isToken 0xeefa597b → bool
isUpgradeAgent 0x61d3d7a6 → bool
minCap 0x3fa615b0 → uint256
mintAgents 0x42c1867b → bool
mintingFinished 0x05d2035b → bool
name 0x06fdde03 → string
oldTokenAddress 0xd8542d51 → address
originalSupply 0x4b2ba0dd → uint256
owner 0x8da5cb5b → address
releaseAgent 0xd1f276d3 → address
released 0x96132521 → bool
reservedTokensDestinations 0x7386f0a7 → address
reservedTokensDestinationsLen 0xc3310517 → uint256
reservedTokensList 0x51ed17a4 → uint256, uint256, uint256, bool, bool, bool
symbol 0x95d89b41 → string
totalSupply 0x18160ddd → uint256
totalUpgraded 0xc752ff62 → uint256
transferAgents 0x867c2857 → bool
upgradeAgent 0x5de4ccb0 → address
upgradeMaster 0x600440cb → address

Write Contract 21 functions

These functions modify contract state and require a wallet transaction to execute.

approve 0x095ea7b3
address _spender
uint256 _value
returns: bool
canUpgrade 0x9738968c
No parameters
returns: bool
claimTokens 0xdf8de3e7
address _token
decreaseAllowance 0xa457c2d7
address _spender
uint256 _subtractedValue
returns: bool
finalizeReservedAddress 0x6ffc22b8
address addr
getUpgradeState 0x8444b391
No parameters
returns: uint8
increaseAllowance 0x39509351
address _spender
uint256 _addedValue
returns: bool
mint 0x40c10f19
address receiver
uint256 amount
releaseTokenTransfer 0x5f412d4f
No parameters
setMintAgent 0x43214675
address addr
bool state
setReleaseAgent 0x29ff4f53
address addr
setReservedTokensListMultiple 0xefa408de
address[] addrs
uint256[] inTokens
uint256[] inPercentageUnit
uint256[] inPercentageDecimals
bool[] isVested
setTokenInformation 0x4eee966f
string _name
string _symbol
setTransferAgent 0x02f652a3
address addr
bool state
setUpgradeAgent 0xd7e7088a
address agent
setUpgradeMaster 0xffeb7d75
address master
transfer 0xa9059cbb
address _to
uint256 _value
returns: bool
transferFrom 0x23b872dd
address _from
address _to
uint256 _value
returns: bool
transferOwnership 0xf2fde38b
address newOwner
upgrade 0x45977d03
uint256 value
upgradeFrom 0x753e88e5
address _from
uint256 value

Recent Transactions

No transactions found for this address