Cryo Explorer Ethereum Mainnet

Address Contract Partially Verified

Address 0x3fa807B6F8d4c407e6E605368F4372d14658b38C
Balance 0.168240 ETH
Nonce 1
Code Size 18619 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

18619 bytes
0x6080604052600436106103e85760003560e01c80637d1db4a511610208578063cba0e99611610118578063edcdb806116100ab578063f2fde38b1161007a578063f2fde38b14610d77578063f84354f114610daa578063fcdc7b1d14610ddd578063fd72c23614610e10578063ff12bbf414610e43576103ef565b8063edcdb80614610cf0578063efeb97e114610d05578063f2029d6b14610d2f578063f2cc0c1814610d44576103ef565b8063de52014b116100e7578063de52014b14610c7f578063de9eb45814610c94578063e064648a14610cc2578063ec342ad014610907576103ef565b8063cba0e99614610bce578063cc2d025914610c01578063cdfd3b2514610c16578063dd62ed3e14610c44576103ef565b80639f9a4e7f1161019b578063a6f8fe451161016a578063a6f8fe4514610b2c578063a9059cbb14610b41578063c835e7e114610b7a578063c9e6da1914610ba4578063cabcc71814610bb9576103ef565b80639f9a4e7f14610a77578063a0ac5e1914610aa3578063a457c2d714610ab8578063a486309d14610af1576103ef565b80638cf57cb9116101d75780638cf57cb914610a055780638da5cb5b14610a1a5780639437b8fa14610a2f57806395d89b4114610a62576103ef565b80637d1db4a51461099c5780637dbaed88146109b157806389687116146109db5780638aadb809146109f0576103ef565b806339509351116103035780634a74bb021161029657806361fd49e21161026557806361fd49e2146108f257806364dd48f51461090757806370a082311461091c578063715018a61461094f5780637af548c114610964576103ef565b80634a74bb02146108825780634ada218b14610897578063583e0568146108ac5780635afbfd38146108dd576103ef565b80634549b039116102d25780634549b039146107e5578063465b5381146108175780634773a6a9146108435780634a1e772614610858576103ef565b806339509351146107185780633986829d146107515780633af9e6691461077f57806343684b21146107b2576103ef565b806318160ddd1161037b57806329bf8a241161034a57806329bf8a24146106805780632d83811914610695578063313ce567146106bf578063319d30e2146106ea576103ef565b806318160ddd146105cb5780631bbae6e0146105e057806323b872dd1461060a5780632411e7171461064d576103ef565b80630e4db802116103b75780630e4db8021461053357806311d3e6c41461056e57806313114a9d1461058357806316b627d114610598576103ef565b806304cf8682146103f4578063053ab1821461043057806306fdde031461045c578063095ea7b3146104e6576103ef565b366103ef57005b600080fd5b34801561040057600080fd5b5061041e6004803603602081101561041757600080fd5b5035610e7e565b60408051918252519081900360200190f35b34801561043c57600080fd5b5061045a6004803603602081101561045357600080fd5b5035610eab565b005b34801561046857600080fd5b50610471610fb5565b6040805160208082528351818301528351919283929083019185019080838360005b838110156104ab578181015183820152602001610493565b50505050905090810190601f1680156104d85780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156104f257600080fd5b5061051f6004803603604081101561050957600080fd5b506001600160a01b038135169060200135611040565b604080519115158252519081900360200190f35b34801561053f57600080fd5b5061045a6004803603604081101561055657600080fd5b506001600160a01b038135169060200135151561105e565b34801561057a57600080fd5b5061041e611126565b34801561058f57600080fd5b5061041e611135565b3480156105a457600080fd5b5061051f600480360360208110156105bb57600080fd5b50356001600160a01b031661113b565b3480156105d757600080fd5b5061041e611150565b3480156105ec57600080fd5b5061045a6004803603602081101561060357600080fd5b5035611156565b34801561061657600080fd5b5061051f6004803603606081101561062d57600080fd5b506001600160a01b0381358116916020810135909116906040013561122c565b34801561065957600080fd5b5061045a6004803603602081101561067057600080fd5b50356001600160a01b03166112b4565b34801561068c57600080fd5b5061041e6113c3565b3480156106a157600080fd5b5061041e600480360360208110156106b857600080fd5b50356113c9565b3480156106cb57600080fd5b506106d4611422565b6040805160ff9092168252519081900360200190f35b3480156106f657600080fd5b5061045a6004803603602081101561070d57600080fd5b503561ffff1661142b565b34801561072457600080fd5b5061051f6004803603604081101561073b57600080fd5b506001600160a01b0381351690602001356114de565b34801561075d57600080fd5b5061045a6004803603602081101561077457600080fd5b503561ffff16611571565b34801561078b57600080fd5b5061041e600480360360208110156107a257600080fd5b50356001600160a01b031661162c565b3480156107be57600080fd5b5061051f600480360360208110156107d557600080fd5b50356001600160a01b031661164e565b3480156107f157600080fd5b5061041e6004803603604081101561080857600080fd5b50803590602001351515611663565b34801561082357600080fd5b5061082c611732565b6040805161ffff9092168252519081900360200190f35b34801561084f57600080fd5b5061082c611743565b34801561086457600080fd5b5061045a6004803603602081101561087b57600080fd5b503561174d565b34801561088e57600080fd5b5061051f611875565b3480156108a357600080fd5b5061051f611883565b3480156108b857600080fd5b506108c1611892565b604080516001600160a01b039092168252519081900360200190f35b3480156108e957600080fd5b506108c16118b6565b3480156108fe57600080fd5b5061041e6118c5565b34801561091357600080fd5b5061041e6118cb565b34801561092857600080fd5b5061041e6004803603602081101561093f57600080fd5b50356001600160a01b03166118d3565b34801561095b57600080fd5b5061045a611957565b34801561097057600080fd5b5061041e6004803603606081101561098757600080fd5b508035906020810135906040013515156119f9565b3480156109a857600080fd5b5061041e611dd2565b3480156109bd57600080fd5b5061041e600480360360208110156109d457600080fd5b5035611dd8565b3480156109e757600080fd5b506108c1611dfc565b3480156109fc57600080fd5b5061041e611e0b565b348015610a1157600080fd5b506108c1611e11565b348015610a2657600080fd5b506108c1611e20565b348015610a3b57600080fd5b5061051f60048036036020811015610a5257600080fd5b50356001600160a01b0316611e2f565b348015610a6e57600080fd5b50610471611e44565b348015610a8357600080fd5b5061045a60048036036020811015610a9a57600080fd5b50351515611e9f565b348015610aaf57600080fd5b5061045a611f46565b348015610ac457600080fd5b5061051f60048036036040811015610adb57600080fd5b506001600160a01b038135169060200135611fda565b348015610afd57600080fd5b5061045a60048036036040811015610b1457600080fd5b506001600160a01b03813516906020013515156120c3565b348015610b3857600080fd5b5061082c61218b565b348015610b4d57600080fd5b5061051f60048036036040811015610b6457600080fd5b506001600160a01b03813516906020013561219d565b348015610b8657600080fd5b506108c160048036036020811015610b9d57600080fd5b50356121b1565b348015610bb057600080fd5b506108c16121d8565b348015610bc557600080fd5b506108c16121e7565b348015610bda57600080fd5b5061051f60048036036020811015610bf157600080fd5b50356001600160a01b03166121fb565b348015610c0d57600080fd5b5061082c612219565b348015610c2257600080fd5b5061045a60048036036020811015610c3957600080fd5b503561ffff16612223565b348015610c5057600080fd5b5061041e60048036036040811015610c6757600080fd5b506001600160a01b03813581169160200135166122a0565b348015610c8b57600080fd5b5061082c6122cb565b348015610ca057600080fd5b5061045a60048036036020811015610cb757600080fd5b503561ffff166122db565b348015610cce57600080fd5b5061045a60048036036020811015610ce557600080fd5b503561ffff16612357565b348015610cfc57600080fd5b5061041e61240a565b348015610d1157600080fd5b5061045a60048036036020811015610d2857600080fd5b5035612410565b348015610d3b57600080fd5b506108c16124e6565b348015610d5057600080fd5b5061045a60048036036020811015610d6757600080fd5b50356001600160a01b03166124f5565b348015610d8357600080fd5b5061045a60048036036020811015610d9a57600080fd5b50356001600160a01b031661267b565b348015610db657600080fd5b5061045a60048036036020811015610dcd57600080fd5b50356001600160a01b0316612773565b348015610de957600080fd5b5061045a60048036036020811015610e0057600080fd5b50356001600160a01b0316612934565b348015610e1c57600080fd5b5061045a60048036036020811015610e3357600080fd5b50356001600160a01b03166129ae565b348015610e4f57600080fd5b5061045a60048036036040811015610e6657600080fd5b506001600160a01b0381351690602001351515612aac565b6015546000908190610ea290606490610e9c90869061ffff16612b74565b90612c0f565b9150505b919050565b6000610eb5612cba565b6001600160a01b0381166000908152600a602052604090205490915060ff1615610f105760405162461bcd60e51b815260040180806020018281038252602c81526020018061485a602c913960400191505060405180910390fd5b6000610f1a612cbe565b90506000610f41600654610f3b633b9aca0087612b7490919063ffffffff16565b90612bcd565b90506000610f4f8284612b74565b6001600160a01b038516600090815260076020526040902054909150610f759082612c78565b6001600160a01b038516600090815260076020526040902055601754610f9b9082612c78565b601755601654610fab9086612ce1565b6016555050505050565b6002805460408051602060018416156101000260001901909316849004601f810184900484028201840190925281815292918301828280156110385780601f1061100d57610100808354040283529160200191611038565b820191906000526020600020905b81548152906001019060200180831161101b57829003601f168201915b505050505081565b600061105461104d612cba565b8484612d3b565b5060015b92915050565b611066612cba565b6000546001600160a01b039081169116146110b6576040805162461bcd60e51b815260206004820181905260248201526000805160206147d3833981519152604482015290519081900360640190fd5b604080516001600160a01b0384168152821515602082015281517fccb445f982fb5bec43b7eaff800f9e4bea4ae44fb3d94599db92469b49fbf34f929181900390910190a16001600160a01b03919091166000908152600e60205260409020805460ff1916911515919091179055565b6000611130612e27565b905090565b60165490565b600d6020526000908152604090205460ff1681565b60145490565b61115e612cba565b6000546001600160a01b039081169116146111ae576040805162461bcd60e51b815260206004820181905260248201526000805160206147d3833981519152604482015290519081900360640190fd5b6305f5e1008110156111f15760405162461bcd60e51b81526004018080602001828103825260318152602001806145e16031913960400191505060405180910390fd5b60198190556040805182815290517f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf9181900360200190a150565b6000611239848484612e3c565b6112a984611245612cba565b6112a485604051806060016040528060288152602001614780602891396001600160a01b038a16600090815260096020526040812090611283612cba565b6001600160a01b0316815260208101919091526040016000205491906132a0565b612d3b565b5060015b9392505050565b6112bc612cba565b6000546001600160a01b0390811691161461130c576040805162461bcd60e51b815260206004820181905260248201526000805160206147d3833981519152604482015290519081900360640190fd5b6001600160a01b038116611367576040805162461bcd60e51b815260206004820152601b60248201527f6e657720726562617365722069732061646472657373207a65726f0000000000604482015290519081900360640190fd5b6001546040516001600160a01b038084169216907fe8a195812977ad9c31215cd36cddec4a0a2cef58eb984d1169225de6e823ff4390600090a3600180546001600160a01b0319166001600160a01b0392909216919091179055565b60065481565b600060175482111561140c5760405162461bcd60e51b815260040180806020018281038252602a81526020018061463b602a913960400191505060405180910390fd5b6000611416612cbe565b9050610ea28382612bcd565b60045460ff1681565b611433612cba565b6000546001600160a01b03908116911614611483576040805162461bcd60e51b815260206004820181905260248201526000805160206147d3833981519152604482015290519081900360640190fd5b60028161ffff16116114c65760405162461bcd60e51b81526004018080602001828103825260348152602001806145ad6034913960400191505060405180910390fd5b6018805461ffff191661ffff92909216919091179055565b3360009081526009602090815260408083206001600160a01b038616845290915281205461150c9083612ce1565b3360008181526009602090815260408083206001600160a01b0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b611579612cba565b6000546001600160a01b039081169116146115c9576040805162461bcd60e51b815260206004820181905260248201526000805160206147d3833981519152604482015290519081900360640190fd5b60328161ffff161061160c5760405162461bcd60e51b815260040180806020018281038252602d815260200180614753602d913960400191505060405180910390fd5b6015805461ffff909216620100000263ffff000019909216919091179055565b6001600160a01b038116600090815260076020526040812054611058906113c9565b600c6020526000908152604090205460ff1681565b60006014548311156116bc576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d757374206265206c657373207468616e20737570706c7900604482015290519081900360640190fd5b60006116c6612cbe565b905060006116e7600654610f3b633b9aca0088612b7490919063ffffffff16565b905060006116f482611dd8565b905060006117028385612b74565b90508561171457935061105892505050565b6000611721848487613337565b509197506110589650505050505050565b601554600160301b900461ffff1681565b60155461ffff1681565b611755612cba565b6000546001600160a01b039081169116146117a5576040805162461bcd60e51b815260206004820181905260248201526000805160206147d3833981519152604482015290519081900360640190fd5b633b9aca0081101580156117bf57506501d1a94a20008111155b6117fa5760405162461bcd60e51b815260040180806020018281038252603a815260200180614573603a913960400191505060405180910390fd5b601b54811161183a5760405162461bcd60e51b81526004018080602001828103825260418152602001806146c26041913960600191505060405180910390fd5b601a8190556040805182815290517f5948780118f41f7c4577ae4619d5cbd064057bd8562d9f7b7e60324053375c009181900360200190a150565b601d54610100900460ff1681565b601d5462010000900460ff1681565b7f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d81565b6010546001600160a01b031690565b601c5481565b633b9aca0081565b6001600160a01b0381166000908152600a602052604081205460ff161561192a576006546001600160a01b03831660009081526008602052604090205461192391633b9aca0091610f3b91612b74565b9050610ea6565b6001600160a01b03821660009081526007602052604081205461194c906113c9565b9050610ea2816133c2565b61195f612cba565b6000546001600160a01b039081169116146119af576040805162461bcd60e51b815260206004820181905260248201526000805160206147d3833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000611a03612cba565b6001546001600160a01b03908116911614611a5d576040805162461bcd60e51b815260206004820152601560248201527431b0b63632b91034b9903737ba103932b130b9b2b960591b604482015290519081900360640190fd5b6000611a67612cbe565b905082611c22576000611a8e633b9aca00610f3b611a858289612c78565b60065490612b74565b600681905560045461010090046001600160a01b0316600090815260076020526040902054909150611ae390633b9aca0090610f3b908490611add90611ad49088612bcd565b60135490612c78565b90612b74565b601455600654604080519182525187917f11c6bf55864ff83827df712625d7a80e5583eef0264921025e7cd22003a21511919081900360200190a2601160009054906101000a90046001600160a01b03166001600160a01b031663fff6cae96040518163ffffffff1660e01b8152600401600060405180830381600087803b158015611b6e57600080fd5b505af1158015611b82573d6000803e3d6000fd5b5050505060005b601254811015611c1557600060128281548110611ba257fe5b60009182526020822001546040805160016209351760e01b0319815290516001600160a01b039092169350839263fff6cae99260048084019382900301818387803b158015611bf057600080fd5b505af1158015611c04573d6000803e3d6000fd5b505060019093019250611b89915050565b50601454925050506112ad565b6000611c39633b9aca00610f3b611a858289612ce1565b9050611c43612e27565b811015611c54576006819055611c60565b611c5c612e27565b6006555b60065460045461010090046001600160a01b0316600090815260076020526040902054611ca091633b9aca0091610f3b9190611add90611ad49088612bcd565b601455600654604080519182525187917f11c6bf55864ff83827df712625d7a80e5583eef0264921025e7cd22003a21511919081900360200190a2601160009054906101000a90046001600160a01b03166001600160a01b031663fff6cae96040518163ffffffff1660e01b8152600401600060405180830381600087803b158015611d2b57600080fd5b505af1158015611d3f573d6000803e3d6000fd5b5050505060005b601254811015611c1557600060128281548110611d5f57fe5b60009182526020822001546040805160016209351760e01b0319815290516001600160a01b039092169350839263fff6cae99260048084019382900301818387803b158015611dad57600080fd5b505af1158015611dc1573d6000803e3d6000fd5b505060019093019250611d46915050565b60195481565b6015546000908190610ea290606490610e9c90869062010000900461ffff16612b74565b6001546001600160a01b031690565b601a5481565b6005546001600160a01b031681565b6000546001600160a01b031690565b600e6020526000908152604090205460ff1681565b6003805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156110385780601f1061100d57610100808354040283529160200191611038565b611ea7612cba565b6000546001600160a01b03908116911614611ef7576040805162461bcd60e51b815260206004820181905260248201526000805160206147d3833981519152604482015290519081900360640190fd5b601d8054821515610100810261ff00199092169190911790915560408051918252517f53726dfcaf90650aa7eb35524f4d3220f07413c8d6cb404cc8c18bf5591bc1599181900360200190a150565b611f4e612cba565b6000546001600160a01b03908116911614611f9e576040805162461bcd60e51b815260206004820181905260248201526000805160206147d3833981519152604482015290519081900360640190fd5b601d805462ff00001916620100001790556040517f799663458a5ef2936f7fa0c99b3336c69c25890f82974f04e811e5bb359186c790600090a1565b3360009081526009602090815260408083206001600160a01b038616845290915281205480831061202e573360009081526009602090815260408083206001600160a01b038816845290915281205561205d565b6120388184612c78565b3360009081526009602090815260408083206001600160a01b03891684529091529020555b3360008181526009602090815260408083206001600160a01b0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b6120cb612cba565b6000546001600160a01b0390811691161461211b576040805162461bcd60e51b815260206004820181905260248201526000805160206147d3833981519152604482015290519081900360640190fd5b604080516001600160a01b0384168152821515602082015281517f88cf9b943f64811022537ee9f0141770d85e612eae3a3a39241abe5ca9f11382929181900390910190a16001600160a01b03919091166000908152600d60205260409020805460ff1916911515919091179055565b601554640100000000900461ffff1681565b60006110546121aa612cba565b8484612e3c565b601281815481106121be57fe5b6000918252602090912001546001600160a01b0316905081565b600f546001600160a01b031690565b60045461010090046001600160a01b031681565b6001600160a01b03166000908152600a602052604090205460ff1690565b60185461ffff1681565b61222b612cba565b6000546001600160a01b0390811691161461227b576040805162461bcd60e51b815260206004820181905260248201526000805160206147d3833981519152604482015290519081900360640190fd5b6015805461ffff909216600160301b0267ffff00000000000019909216919091179055565b6001600160a01b03918216600090815260096020908152604080832093909416825291909152205490565b60155462010000900461ffff1681565b6122e3612cba565b6000546001600160a01b03908116911614612333576040805162461bcd60e51b815260206004820181905260248201526000805160206147d3833981519152604482015290519081900360640190fd5b6015805461ffff9092166401000000000265ffff0000000019909216919091179055565b61235f612cba565b6000546001600160a01b039081169116146123af576040805162461bcd60e51b815260206004820181905260248201526000805160206147d3833981519152604482015290519081900360640190fd5b60328161ffff16106123f25760405162461bcd60e51b81526004018080602001828103825260268152602001806148346026913960400191505060405180910390fd5b6015805461ffff191661ffff92909216919091179055565b601b5481565b612418612cba565b6000546001600160a01b03908116911614612468576040805162461bcd60e51b815260206004820181905260248201526000805160206147d3833981519152604482015290519081900360640190fd5b6305f5e1008110156124ab5760405162461bcd60e51b815260040180806020018281038252603781526020018061468b6037913960400191505060405180910390fd5b601b8190556040805182815290517f74272e6f6c75e19c6f48bb75e2724eb55e3e1726f8b81d97f1db21d22ead93dc9181900360200190a150565b6011546001600160a01b031681565b6124fd612cba565b6000546001600160a01b0390811691161461254d576040805162461bcd60e51b815260206004820181905260248201526000805160206147d3833981519152604482015290519081900360640190fd5b6001600160a01b0381166000908152600a602052604090205460ff16156125bb576040805162461bcd60e51b815260206004820152601b60248201527f4163636f756e7420697320616c7265616479206578636c756465640000000000604482015290519081900360640190fd5b6001600160a01b03811660009081526007602052604090205415612615576001600160a01b0381166000908152600760205260409020546125fb906113c9565b6001600160a01b0382166000908152600760205260409020555b6001600160a01b03166000818152600a60205260408120805460ff19166001908117909155600b805491820181559091527f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db90180546001600160a01b0319169091179055565b612683612cba565b6000546001600160a01b039081169116146126d3576040805162461bcd60e51b815260206004820181905260248201526000805160206147d3833981519152604482015290519081900360640190fd5b6001600160a01b0381166127185760405162461bcd60e51b81526004018080602001828103825260268152602001806146656026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b61277b612cba565b6000546001600160a01b039081169116146127cb576040805162461bcd60e51b815260206004820181905260248201526000805160206147d3833981519152604482015290519081900360640190fd5b6001600160a01b0381166000908152600a602052604090205460ff16612838576040805162461bcd60e51b815260206004820152601b60248201527f4163636f756e7420697320616c7265616479206578636c756465640000000000604482015290519081900360640190fd5b60005b600b5481101561293057816001600160a01b0316600b828154811061285c57fe5b6000918252602090912001546001600160a01b0316141561292857600b8054600019810190811061288957fe5b600091825260209091200154600b80546001600160a01b0390921691839081106128af57fe5b600091825260208083209190910180546001600160a01b0319166001600160a01b039485161790559184168152600782526040808220829055600a90925220805460ff19169055600b80548061290157fe5b600082815260209020810160001990810180546001600160a01b0319169055019055612930565b60010161283b565b5050565b61293c612cba565b6000546001600160a01b0390811691161461298c576040805162461bcd60e51b815260206004820181905260248201526000805160206147d3833981519152604482015290519081900360640190fd5b600580546001600160a01b0319166001600160a01b0392909216919091179055565b6129b6612cba565b6000546001600160a01b03908116911614612a06576040805162461bcd60e51b815260206004820181905260248201526000805160206147d3833981519152604482015290519081900360640190fd5b806001600160a01b031663fff6cae96040518163ffffffff1660e01b8152600401600060405180830381600087803b158015612a4157600080fd5b505af1158015612a55573d6000803e3d6000fd5b5050601280546001810182556000919091527fbb8a6a4669ba250d26cd7a459eca9d215f8307e33aebe50379bc5a3617ec34440180546001600160a01b0319166001600160a01b0394909416939093179092555050565b612ab4612cba565b6000546001600160a01b03908116911614612b04576040805162461bcd60e51b815260206004820181905260248201526000805160206147d3833981519152604482015290519081900360640190fd5b604080516001600160a01b0384168152821515602082015281517fc3d26c130d120a4bb874de56c8b5fb727ad2cfc3551ca49cd42ef248e893b69a929181900390910190a16001600160a01b03919091166000908152600c60205260409020805460ff1916911515919091179055565b600082612b8357506000611058565b82820282848281612b9057fe5b04146112ad5760405162461bcd60e51b81526004018080602001828103825260218152602001806147326021913960400191505060405180910390fd5b60006112ad83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506133e2565b600081612c51576040805162461bcd60e51b815260206004820152600b60248201526a446976206279207a65726f60a81b604482015290519081900360640190fd5b6000828481612c5c57fe5b049050828481612c6857fe5b06156112ad576001019392505050565b60006112ad83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506132a0565b3390565b6000806000612ccb613447565b9092509050612cda8282612bcd565b9250505090565b6000828201838110156112ad576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6001600160a01b038316612d805760405162461bcd60e51b81526004018080602001828103825260238152602001806145506023913960400191505060405180910390fd5b6001600160a01b038216612dc55760405162461bcd60e51b81526004018080602001828103825260218152602001806148136021913960400191505060405180910390fd5b6001600160a01b03808416600081815260096020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b600060135460001981612e3657fe5b04905090565b6001600160a01b038316612e815760405162461bcd60e51b815260040180806020018281038252602b8152602001806147a8602b913960400191505060405180910390fd5b6001600160a01b038216612ec65760405162461bcd60e51b81526004018080602001828103825260298152602001806146126029913960400191505060405180910390fd5b60008111612f055760405162461bcd60e51b815260040180806020018281038252602f815260200180614703602f913960400191505060405180910390fd5b612f0d611e20565b6001600160a01b0316836001600160a01b031614158015612f475750612f31611e20565b6001600160a01b0316826001600160a01b031614155b8015612f565750601d5460ff16155b1561306457601954811115612f9c5760405162461bcd60e51b815260040180806020018281038252602e815260200180614522602e913960400191505060405180910390fd5b600f546001600160a01b0316612fb0612cba565b6001600160a01b03161480612ffd57507f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b0316612ff2612cba565b6001600160a01b0316145b80156130125750601d5462010000900460ff16155b15613064576040805162461bcd60e51b815260206004820152601a60248201527f526973653a2074726164696e672069732064697361626c65642e000000000000604482015290519081900360640190fd5b601d5460ff16613147576000613079306118d3565b90506000601a5482101590507f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156130de57600080fd5b505afa1580156130f2573d6000803e3d6000fd5b505050506040513d602081101561310857600080fd5b5081905080156131235750600f546001600160a01b03163314155b80156131365750601d54610100900460ff165b1561314457613144826135aa565b50505b6001600160a01b0383166000908152600a602052604090205460ff16801561318857506001600160a01b0382166000908152600a602052604090205460ff16155b1561319d5761319883838361373a565b61329b565b6001600160a01b0383166000908152600a602052604090205460ff161580156131de57506001600160a01b0382166000908152600a602052604090205460ff165b156131ee5761319883838361396f565b6001600160a01b0383166000908152600a602052604090205460ff1615801561323057506001600160a01b0382166000908152600a602052604090205460ff16155b1561324057613198838383613b1d565b6001600160a01b0383166000908152600a602052604090205460ff16801561328057506001600160a01b0382166000908152600a602052604090205460ff165b1561329057613198838383613b7c565b61329b838383613b1d565b505050565b6000818484111561332f5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156132f45781810151838201526020016132dc565b50505050905090810190601f1680156133215780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b601854600090819081908190819061335490899061ffff16612bcd565b60155490915060009061338990889061ffff600160301b82048116916401000000009004168b028161338257fe5b0490612b74565b905060006133a18261339b8b8b612b74565b90612c78565b905060006133b18b858585613d31565b9b929a509298509650945050505050565b600080610ea2633b9aca00610f3b60065486612b7490919063ffffffff16565b600081836134315760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156132f45781810151838201526020016132dc565b50600083858161343d57fe5b0495945050505050565b6017546013546000918291825b600b54811015613578578260076000600b848154811061347057fe5b60009182526020808320909101546001600160a01b0316835282019290925260400190205411806134d557508160086000600b84815481106134ae57fe5b60009182526020808320909101546001600160a01b03168352820192909252604001902054115b156134ec57601754601354945094505050506135a6565b61352c60076000600b848154811061350057fe5b60009182526020808320909101546001600160a01b031683528201929092526040019020548490612c78565b925061356e60086000600b848154811061354257fe5b60009182526020808320909101546001600160a01b031683528201929092526040019020548390612c78565b9150600101613454565b5060135460175461358891612bcd565b8210156135a0576017546013549350935050506135a6565b90925090505b9091565b601d805460ff19166001179055601b546000906135c8908390612c78565b905060006135e1601c5483612c0f90919063ffffffff16565b905060006135ef8383612c78565b905060006135fe836002612bcd565b9050600061360c8483612c78565b90504761361883613d4e565b60006136244783612c78565b90506136308382613f5d565b7f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561368957600080fd5b505afa15801561369d573d6000803e3d6000fd5b505050506040513d60208110156136b357600080fd5b5051604080518681526020810184905280820186905290516001600160a01b03909216917fa5edfeb09a3d7a0edab24279a4ca1c35b82bb038f8a7eb53339c904a217fe1f69181900360600190a26011546137199030906001600160a01b031687612e3c565b6137263032601b54612e3c565b5050601d805460ff19169055505050505050565b6000613744612cbe565b90506000613765600654610f3b633b9aca0086612b7490919063ffffffff16565b905060006137738284612b74565b6001600160a01b0387166000908152600860205260409020549091506137999085612c78565b6001600160a01b0387166000908152600860209081526040808320939093556007905220546137c89082612c78565b6001600160a01b038716600090815260076020526040902055601d5460ff1615613859576001600160a01b03851660009081526007602052604090205461380f9082612ce1565b6001600160a01b0380871660008181526007602090815260409182902094909455805188815290519193928a16926000805160206147f383398151915292918290030190a3613967565b61386285614045565b156138e557600061387283610e7e565b905060008060008061388586868a613337565b935093509350935060008060008061389d8b8a614063565b93509350935093506138ba6138b1836133c2565b60145490612c78565b6014556138c786846140dc565b6138d78f8f848b8b8a8a88614100565b505050505050505050613967565b6138ef8686614265565b6138fe57600061387283611dd8565b6001600160a01b0385166000908152600760205260409020546139219082612ce1565b6001600160a01b0380871660008181526007602090815260409182902094909455805188815290519193928a16926000805160206147f383398151915292918290030190a35b505050505050565b6000613979612cbe565b9050600061399a600654610f3b633b9aca0086612b7490919063ffffffff16565b905060006139a88284612b74565b6001600160a01b0387166000908152600760205260409020549091506139ce9082612c78565b6001600160a01b038716600090815260076020526040902055601d5460ff1615613a15576001600160a01b03851660009081526007602052604090205461380f9082612ce1565b613a1e85614045565b15613a94576000613a2e83610e7e565b90506000806000613a40858589613337565b93509350935050600080600080613a578a89614063565b9350935093509350613a6b6138b1836133c2565b601455613a7886846140dc565b613a878e8e848a8989876142a8565b5050505050505050613967565b613a9e8686614265565b613aad576000613a2e83611dd8565b6001600160a01b038516600090815260086020526040902054613ad09083612ce1565b6001600160a01b0380871660008181526008602090815260409182902094909455805188815290519193928a16926000805160206147f383398151915292918290030190a3505050505050565b6000613b27612cbe565b90506000613b48600654610f3b633b9aca0086612b7490919063ffffffff16565b90506000613b568284612b74565b6001600160a01b0387166000908152600760205260409020549091506137c89082612c78565b6000613b86612cbe565b90506000613ba7600654610f3b633b9aca0086612b7490919063ffffffff16565b90506000613bb58284612b74565b6001600160a01b038716600090815260086020526040902054909150613bdb9085612c78565b6001600160a01b038716600090815260086020908152604080832093909355600790522054613c0a9082612c78565b6001600160a01b038716600090815260076020526040902055601d5460ff1615613c51576001600160a01b03851660009081526007602052604090205461380f9082612ce1565b613c5a85614045565b15613cc6576000613c6a83610e7e565b9050600080600080613c7d86868a613337565b9350935093509350600080600080613c958b8a614063565b9350935093509350613ca96138b1836133c2565b601455613cb686846140dc565b6138d78f8f848b8b8a8a8861441a565b613cd08686614265565b613cdf576000613c6a83611dd8565b6001600160a01b038516600090815260076020526040902054613d029082612ce1565b6001600160a01b038616600090815260076020908152604080832093909355600890522054613ad09083612ce1565b600080613d448361339b86818a8a612c78565b9695505050505050565b60408051600280825260608083018452926020830190803683370190505090503081600081518110613d7c57fe5b60200260200101906001600160a01b031690816001600160a01b0316815250507f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015613df557600080fd5b505afa158015613e09573d6000803e3d6000fd5b505050506040513d6020811015613e1f57600080fd5b5051815182906001908110613e3057fe5b60200260200101906001600160a01b031690816001600160a01b031681525050613e7b307f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d84612d3b565b7f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b031663791ac9478360008430426040518663ffffffff1660e01b81526004018086815260200185815260200180602001846001600160a01b03168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015613f20578181015183820152602001613f08565b505050509050019650505050505050600060405180830381600087803b158015613f4957600080fd5b505af1158015613967573d6000803e3d6000fd5b613f88307f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d84612d3b565b6040805163f305d71960e01b8152306004820181905260248201859052600060448301819052606483015260848201524260a482015290516001600160a01b037f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d169163f305d71991849160c48082019260609290919082900301818588803b15801561401457600080fd5b505af1158015614028573d6000803e3d6000fd5b50505050506040513d606081101561403f57600080fd5b50505050565b6001600160a01b03166000908152600e602052604090205460ff1690565b601854600090819081908190819061408090889061ffff16612bcd565b60155490915060009061ffff600160301b82048116916401000000009004168802816140a857fe5b04905060006140b78883612c78565b905060006140cb8261339b85818e89612c78565b9a9399509197509550909350505050565b6017546140e99083612c78565b6017556016546140f99082612ce1565b6016555050565b60045461010090046001600160a01b031660009081526007602052604090205461412a9085612ce1565b6004546001600160a01b03610100909104811660009081526007602052604080822093909355908916815220546141619086612ce1565b6001600160a01b0380891660009081526007602052604080822093909355600554909116815220546141939084612ce1565b6005546001600160a01b039081166000908152600760205260409020919091558781169089166000805160206147f38339815191526141d1856133c2565b60408051918252519081900360200190a36004546001600160a01b0361010090910481169089166000805160206147f3833981519152614210896133c2565b60408051918252519081900360200190a36005546001600160a01b039081169089166000805160206147f383398151915261424a846133c2565b60408051918252519081900360200190a35050505050505050565b6001600160a01b0382166000908152600c602052604081205460ff16806112ad5750506001600160a01b03166000908152600d602052604090205460ff16919050565b60045461010090046001600160a01b03166000908152600760205260409020546142d29084612ce1565b6004546001600160a01b0361010090910481166000908152600760209081526040808320949094559189168152600890915220546143109085612ce1565b6001600160a01b038088166000908152600860209081526040808320949094556005549092168152600790915220546143499083612ce1565b6005546001600160a01b039081166000908152600760205260409020919091558681169088166000805160206147f3833981519152614387876133c2565b60408051918252519081900360200190a36004546001600160a01b0361010090910481169088166000805160206147f38339815191526143c6886133c2565b60408051918252519081900360200190a36005546001600160a01b039081169088166000805160206147f3833981519152614400846133c2565b60408051918252519081900360200190a350505050505050565b60045461010090046001600160a01b03166000908152600760205260409020546144449085612ce1565b6004546001600160a01b036101009091048116600090815260076020526040808220939093559089168152205461447b9086612ce1565b6001600160a01b0388166000908152600760209081526040808320939093556008905220546144aa9084612ce1565b6001600160a01b038089166000908152600860209081526040808320949094556005549092168152600790915220546144e39083612ce1565b6005546001600160a01b039081166000908152600760205260409020919091558781169089166000805160206147f38339815191526141d1866133c256fe526973653a205472616e7366657220616d6f756e74206578636565647320746865206d61785478416d6f756e742e526973653a20617070726f76652066726f6d20746865207a65726f2061646472657373526973653a206d696e546f6b656e4265666f7265537761702073686f756c64206265206265747765656e203120616e6420323030302052495345526973653a204672696374696f6e6c657373207969656c64206665652073686f756c64206265206c657373207468616e20353025526973653a206d61785478416d6f756e742073686f756c642062652067726561746572207468616e20302e312052495345526973653a2063616e6e6f74207472616e7366657220746f20746865207a65726f2061646472657373416d6f756e74206d757374206265206c657373207468616e20746f74616c207265666c656374696f6e734f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373526973653a206175746f5377617043616c6c65724665652073686f756c642062652067726561746572207468616e20302e312052495345526973653a206d696e546f6b656e4265666f7265537761702073686f756c642062652067726561746572207468616e206175746f5377617043616c6c6572466565526973653a205472616e7366657220616d6f756e74206d7573742062652067726561746572207468616e207a65726f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77526973653a205472616e73616374696f6e206665652073686f756c64206265206c657373207468616e2034302545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365526973653a2063616e6e6f74207472616e736665722066726f6d20746865207a65726f20616464726573734f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef526973653a20617070726f766520746f20746865207a65726f2061646472657373526973653a2053656c6c206665652073686f756c64206265206c657373207468616e203530254578636c75646564206164647265737365732063616e6e6f742063616c6c20746869732066756e6374696f6ea264697066735822122024bad7b5cac201d7bb5fb879ad5a462629b4711a59f95b45a68f87ca5979f35064736f6c634300060c0033

Verified Source Code Partial Match

Compiler: v0.6.12+commit.27d51765 EVM: istanbul Optimization: Yes (200 runs)
Rise.sol 923 lines
/* 
   SPDX-License-Identifier: MIT
   https://riseprotocol.io
   Copyright 2020
*/

/// SWC-103:  Floating Pragma

interface IUniswapV2Factory {
    function createPair(address tokenA, address tokenB) external returns (address pair);
}

interface IUniswapV2Pair {
    function sync() external;
}

interface IUniswapV2Router01 {
    function factory() external pure returns (address);
    function WETH() external pure returns (address);
    function addLiquidity(
        address tokenA,
        address tokenB,
        uint amountADesired,
        uint amountBDesired,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB, uint liquidity);
    function addLiquidityETH(
        address token,
        uint amountTokenDesired,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}

interface IUniswapV2Router02 is IUniswapV2Router01 {
    function removeLiquidityETHSupportingFeeOnTransferTokens(
      address token,
      uint liquidity,
      uint amountTokenMin,
      uint amountETHMin,
      address to,
      uint deadline
    ) external returns (uint amountETH);
    function swapExactTokensForETHSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;
    function swapExactTokensForTokensSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;
    function swapExactETHForTokensSupportingFeeOnTransferTokens(
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external payable;
}

pragma solidity 0.6.12;

import "./RiseSafeMath.sol";
import "./Ownable.sol";
import "./Rebaser.sol";
import "./Address.sol";

contract Rise is Ownable, Rebasable
{
    using RiseSafeMath for uint256;
	using Address for address;
	
	IUniswapV2Router02 public immutable _uniswapV2Router;

    event Transfer(address indexed from, address indexed to, uint amount);
    event Approval(address indexed owner, address indexed spender, uint amount);

    event Rebase(uint256 indexed epoch, uint256 scalingFactor);

    event WhitelistFrom(address _addr, bool _whitelisted);
    event WhitelistTo(address _addr, bool _whitelisted);
    event UniswapPairAddress(address _addr, bool _whitelisted);

    string public name     = "Rise Protocol";
    string public symbol   = "RISE";
    uint8  public decimals = 9;


    address public BurnAddress = 0x000000000000000000000000000000000000dEaD;
	
    address public rewardAddress;


    /**
     * @notice Internal decimals used to handle scaling factor
     */
    uint256 public constant internalDecimals = 10**9;

    /**
     * @notice Used for percentage maths
     */
    uint256 public constant BASE = 10**9;

    /**
     * @notice Scaling factor that adjusts everyone's balances
     */
    uint256 public RiseScalingFactor  = BASE;

	mapping (address => uint256) private _rOwned;
	mapping (address => uint256) private _tOwned;
    mapping (address => mapping (address => uint256)) internal _allowedFragments;
	
	mapping (address => bool) private _isExcluded;
    address[] private _excluded;

    mapping(address => bool) public whitelistFrom;
    mapping(address => bool) public whitelistTo;
    mapping(address => bool) public uniswapPairAddress;
	address private currentPoolAddress;
	address private currentPairTokenAddress;
	address public uniswapETHPool;
	address[] public futurePools;


    uint256 initSupply = 10**5 * 10**9;
    uint256 _totalSupply = 10**5 * 10**9;
    uint16 public SELL_FEE = 6;
    uint16 public TX_FEE = 2;
    uint16 public BURN_TOP = 1;
	uint16 public BURN_BOTTOM = 2;
	uint256 private _tFeeTotal;
	uint256 private constant MAX = ~uint256(0);
    uint256 private _rTotal = (MAX - (MAX % _totalSupply));
	uint16 public FYFee = 100;
	uint256 public _maxTxAmount = 500 * 10**9;
	uint256 public _minTokensBeforeSwap = 100 * 10**9;
	uint256 public _autoSwapCallerFee = 2 * 10**9;
	uint256 public liquidityRewardRate = 2;
	
	bool private inSwapAndLiquify;
    bool public swapAndLiquifyEnabled;
    bool public tradingEnabled;
	
	event MaxTxAmountUpdated(uint256 maxTxAmount);
	event TradingEnabled();
    event SwapAndLiquifyEnabledUpdated(bool enabled);
    event SwapAndLiquify(
        address indexed pairTokenAddress,
        uint256 tokensSwapped,
        uint256 pairTokenReceived,
        uint256 tokensIntoLiqudity
    );
	event MinTokensBeforeSwapUpdated(uint256 minTokensBeforeSwap);
    event AutoSwapCallerFeeUpdated(uint256 autoSwapCallerFee);
	
	modifier lockTheSwap {
        inSwapAndLiquify = true;
        _;
        inSwapAndLiquify = false;
    }

    constructor(IUniswapV2Router02 uniswapV2Router)
    public
    Ownable()
    Rebasable()
    {
		_uniswapV2Router = uniswapV2Router;
        
        currentPoolAddress = IUniswapV2Factory(uniswapV2Router.factory())
            .createPair(address(this), uniswapV2Router.WETH());
        currentPairTokenAddress = uniswapV2Router.WETH();
        uniswapETHPool = currentPoolAddress;
		rewardAddress = address(this);
        
        updateSwapAndLiquifyEnabled(false);
        
        _rOwned[_msgSender()] = reflectionFromToken(_totalSupply, false);
        
        emit Transfer(address(0), _msgSender(), _totalSupply);
    }

    function totalSupply() public view returns (uint256)
    {
        return _totalSupply;
    }

    function getSellBurn(uint256 value) public view returns (uint256)
    {
        uint256 nPercent = value.mul(SELL_FEE).divRound(100);
        return nPercent;
    }

    function getTxBurn(uint256 value) public view returns (uint256)
    {
        uint256 nPercent = value.mul(TX_FEE).divRound(100);
        return nPercent;
    }

    function _isWhitelisted(address _from, address _to) internal view returns (bool)
    {
        return whitelistFrom[_from]||whitelistTo[_to];
    }

    function _isUniswapPairAddress(address _addr) internal view returns (bool)
    {
        return uniswapPairAddress[_addr];
    }

    function setWhitelistedTo(address _addr, bool _whitelisted) external onlyOwner
    {
        emit WhitelistTo(_addr, _whitelisted);
        whitelistTo[_addr] = _whitelisted;
    }

    function setTxFee(uint16 fee) external onlyOwner
    {
		require(fee < 50, 'Rise: Transaction fee should be less than 40%');
        TX_FEE = fee;
    }
	
	function setFYFee(uint16 fee) external onlyOwner
    {
		require(fee > 2, 'Rise: Frictionless yield fee should be less than 50%');
        FYFee = fee;
    }

    function setSellFee(uint16 fee) external onlyOwner
    {
		require(fee < 50, 'Rise: Sell fee should be less than 50%');
        SELL_FEE = fee;
    }
	
    function setBurnTop(uint16 burntop) external onlyOwner
    {
        BURN_TOP = burntop;
    }
	
	function setBurnBottom(uint16 burnbottom) external onlyOwner
    {
        BURN_BOTTOM = burnbottom;
    }
	
    function setWhitelistedFrom(address _addr, bool _whitelisted) external onlyOwner
    {
        emit WhitelistFrom(_addr, _whitelisted);
        whitelistFrom[_addr] = _whitelisted;
    }

    function setUniswapPairAddress(address _addr, bool _whitelisted) external onlyOwner 
	{
        emit UniswapPairAddress(_addr, _whitelisted);
        uniswapPairAddress[_addr] = _whitelisted;
    }
	
	function addfuturePool(address futurePool) external onlyOwner
	{
		IUniswapV2Pair(futurePool).sync();
		futurePools.push(futurePool);
	}

    function maxScalingFactor() external view returns (uint256)
    {
        return _maxScalingFactor();
    }

    function _maxScalingFactor() internal view returns (uint256)
    {
        // scaling factor can only go up to 2**256-1 = initSupply * RiseScalingFactor
        // this is used to check if RiseScalingFactor will be too high to compute balances when rebasing.
        return uint256(-1) / initSupply;
    }

   function transfer(address recipient, uint256 amount) public returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

    function transferFrom(address sender, address recipient, uint256 amount) public returns (bool) {
		_transfer(sender, recipient, amount);
		// decrease allowance
        _approve(sender, _msgSender(), _allowedFragments[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
        return true;
    }

	function balanceOf(address account) public view returns (uint256) {
	  
        if (_isExcluded[account]) return _tOwned[account].mul(RiseScalingFactor).div(internalDecimals);
        uint256 tOwned = tokenFromReflection(_rOwned[account]);
		return _scaling(tOwned);
	}

    function balanceOfUnderlying(address account) external view returns (uint256)
    {
        return tokenFromReflection(_rOwned[account]);
    }

    
    function allowance(address owner_, address spender) external view returns (uint256)
    {
        return _allowedFragments[owner_][spender];
    }

    function approve(address spender, uint256 amount) public returns (bool) {
        _approve(_msgSender(), spender, amount);
        return true;
    }

    function increaseAllowance(address spender, uint256 addedValue) external returns (bool)
    {
        _allowedFragments[msg.sender][spender] = _allowedFragments[msg.sender][spender].add(addedValue);
        emit Approval(msg.sender, spender, _allowedFragments[msg.sender][spender]);
        return true;
    }

    function decreaseAllowance(address spender, uint256 subtractedValue) external returns (bool)
    {
        uint256 oldValue = _allowedFragments[msg.sender][spender];
        if (subtractedValue >= oldValue)
        {
            _allowedFragments[msg.sender][spender] = 0;
        }
        else
        {
            _allowedFragments[msg.sender][spender] = oldValue.sub(subtractedValue);
        }

        emit Approval(msg.sender, spender, _allowedFragments[msg.sender][spender]);
        return true;
    }
	
	function _approve(address owner, address spender, uint256 amount) private {
        require(owner != address(0), "Rise: approve from the zero address");
        require(spender != address(0), "Rise: approve to the zero address");

        _allowedFragments[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }
	
	function isExcluded(address account) public view returns (bool) 
	{
        return _isExcluded[account];
    }
	
	function totalFees() public view returns (uint256) 
	{
        return _tFeeTotal;
    }
	
	function reflect(uint256 tAmount) public 
	{
        address sender = _msgSender();
        require(!_isExcluded[sender], "Excluded addresses cannot call this function");
        uint256 currentRate = _getRate();
        uint256 TAmount = tAmount.mul(internalDecimals).div(RiseScalingFactor);
		uint256 rAmount = TAmount.mul(currentRate);
        _rOwned[sender] = _rOwned[sender].sub(rAmount);
        _rTotal = _rTotal.sub(rAmount);
        _tFeeTotal = _tFeeTotal.add(tAmount);
    }
	
	function reflectionFromToken(uint256 tAmount, bool deductTransferFee) public view returns(uint256) 
	{
        require(tAmount <= _totalSupply, "Amount must be less than supply");
        uint256 currentRate = _getRate();
        uint256 TAmount = tAmount.mul(internalDecimals).div(RiseScalingFactor);
        uint256 fee = getTxBurn(TAmount);
		uint256 rAmount = TAmount.mul(currentRate);
        if (!deductTransferFee) {
            return rAmount;
        } else {
            (uint256 rTransferAmount,,,) = _getRValues(TAmount, fee, currentRate);
            return rTransferAmount;
        }
    }
	
	function tokenFromReflection(uint256 rAmount) public view returns(uint256) 
	{
        require(rAmount <= _rTotal, "Amount must be less than total reflections");
        uint256 currentRate =  _getRate();
        return rAmount.div(currentRate);
    }
	
	function excludeAccount(address account) external onlyOwner() 
	{
        require(!_isExcluded[account], "Account is already excluded");
        if(_rOwned[account] > 0) {
            _rOwned[account] = tokenFromReflection(_rOwned[account]);
        }
        _isExcluded[account] = true;
        _excluded.push(account);
    }
	
	function includeAccount(address account) external onlyOwner() 
	{
        require(_isExcluded[account], "Account is already excluded");
        for (uint256 i = 0; i < _excluded.length; i++) {
            if (_excluded[i] == account) {
                _excluded[i] = _excluded[_excluded.length - 1];
                _rOwned[account] = 0;
                _isExcluded[account] = false;
                _excluded.pop();
                break;
            }
        }
    }
	
	function _transfer(address sender, address recipient, uint256 amount) private 
	{
        
		require(sender != address(0), "Rise: cannot transfer from the zero address");
        require(recipient != address(0), "Rise: cannot transfer to the zero address");
        require(amount > 0, "Rise: Transfer amount must be greater than zero");
		
		if(sender != owner() && recipient != owner() && !inSwapAndLiquify) {
            require(amount <= _maxTxAmount, "Rise: Transfer amount exceeds the maxTxAmount.");
            if((_msgSender() == currentPoolAddress || _msgSender() == address(_uniswapV2Router)) && !tradingEnabled)
                require(false, "Rise: trading is disabled.");
        }
        
        if(!inSwapAndLiquify) {
            uint256 lockedBalanceForPool = balanceOf(address(this));
            bool overMinTokenBalance = lockedBalanceForPool >= _minTokensBeforeSwap;
			currentPairTokenAddress == _uniswapV2Router.WETH();
            if (
                overMinTokenBalance &&
                msg.sender != currentPoolAddress &&
                swapAndLiquifyEnabled
            ) {
                swapAndLiquifyForEth(lockedBalanceForPool);
            }
        }
		
        if (_isExcluded[sender] && !_isExcluded[recipient]) {
            _transferFromExcluded(sender, recipient, amount);
        } else if (!_isExcluded[sender] && _isExcluded[recipient]) {
            _transferToExcluded(sender, recipient, amount);
        } else if (!_isExcluded[sender] && !_isExcluded[recipient]) {
            _transferStandard(sender, recipient, amount);
        } else if (_isExcluded[sender] && _isExcluded[recipient]) {
            _transferBothExcluded(sender, recipient, amount);
        } else {
            _transferStandard(sender, recipient, amount);
        }
    }
	
	receive() external payable {}
    
    function swapAndLiquifyForEth(uint256 lockedBalanceForPool) private lockTheSwap {
        // split the contract balance except swapCallerFee into halves
        uint256 lockedForSwap = lockedBalanceForPool.sub(_autoSwapCallerFee);
		uint256 forLiquidity = lockedForSwap.divRound(liquidityRewardRate);
		uint256 forLiquidityReward = lockedForSwap.sub(forLiquidity);
        uint256 half = forLiquidity.div(2);
        uint256 otherHalf = forLiquidity.sub(half);

        // capture the contract's current ETH balance.
        // this is so that we can capture exactly the amount of ETH that the
        // swap creates, and not make the liquidity event include any ETH that
        // has been manually sent to the contract
        uint256 initialBalance = address(this).balance;

        // swap tokens for ETH
        swapTokensForEth(half);
        
        // how much ETH did we just swap into?
        uint256 newBalance = address(this).balance.sub(initialBalance);

        // add liquidity to uniswap
        addLiquidityForEth(otherHalf, newBalance);
        
        emit SwapAndLiquify(_uniswapV2Router.WETH(), half, newBalance, otherHalf);
        
		_transfer(address(this), uniswapETHPool, forLiquidityReward);
        _transfer(address(this), tx.origin, _autoSwapCallerFee);
    }
    
    function swapTokensForEth(uint256 tokenAmount) private {
        // generate the uniswap pair path of token -> weth
        address[] memory path = new address[](2);
        path[0] = address(this);
        path[1] = _uniswapV2Router.WETH();

        _approve(address(this), address(_uniswapV2Router), tokenAmount);

        // make the swap
        _uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(
            tokenAmount,
            0, // accept any amount of ETH
            path,
            address(this),
            block.timestamp
        );
    }

    function addLiquidityForEth(uint256 tokenAmount, uint256 ethAmount) private {
        // approve token transfer to cover all possible scenarios
        _approve(address(this), address(_uniswapV2Router), tokenAmount);

        // add the liquidity
        _uniswapV2Router.addLiquidityETH{value: ethAmount}(
            address(this),
            tokenAmount,
            0, // slippage is unavoidable
            0, // slippage is unavoidable
            address(this),
            block.timestamp
        );
    }

	
	function _transferStandard(address sender, address recipient, uint256 tAmount) private 
	{
	    uint256 currentRate =  _getRate();
		uint256 TAmount = tAmount.mul(internalDecimals).div(RiseScalingFactor);
		uint256 rAmount = TAmount.mul(currentRate);
		_rOwned[sender] = _rOwned[sender].sub(rAmount);
		
		if(inSwapAndLiquify) {
            _rOwned[recipient] = _rOwned[recipient].add(rAmount);
            emit Transfer(sender, recipient, tAmount);
		}
		
	    else if (_isUniswapPairAddress(recipient))
        {
		 uint256 fee = getSellBurn(TAmount);
		(uint256 rTransferAmount, uint256 rBurnFee, uint256 rFYFee, uint256 rRewardFee) = _getRValues(rAmount, fee, currentRate);
		(uint256 tTransferAmount, uint256 tFYFee, uint256 tBurnFee, uint256 tRewardFee) = _getTValues(TAmount, fee);
		_totalSupply = _totalSupply.sub(_scaling(tBurnFee));
		_reflectFee(rFYFee, tFYFee);
		_transferStandardSell(sender, recipient, tBurnFee, rTransferAmount, rBurnFee, rRewardFee, tTransferAmount, tRewardFee);
        }
        else
        {
            if(!_isWhitelisted(sender, recipient))
            {
	     uint256 fee = getTxBurn(TAmount);
		(uint256 rTransferAmount, uint256 rBurnFee, uint256 rFYFee, uint256 rRewardFee) = _getRValues(rAmount, fee, currentRate);
		(uint256 tTransferAmount, uint256 tFYFee, uint256 tBurnFee, uint256 tRewardFee) = _getTValues(TAmount, fee);
		_totalSupply = _totalSupply.sub(_scaling(tBurnFee));
		_reflectFee(rFYFee, tFYFee);
		_transferStandardTx(sender, recipient, tBurnFee, rTransferAmount, rBurnFee, rRewardFee, tTransferAmount, tRewardFee);
            }
            else
            {           
                _rOwned[recipient] = _rOwned[recipient].add(rAmount);
                emit Transfer(sender, recipient, tAmount);
             }
        }
    }
    
    function _transferStandardSell(address sender, address recipient, uint256 tBurnFee, uint256 rTransferAmount, uint256 rBurnFee, uint256 rRewardFee, uint256 tTransferAmount, uint256 tRewardFee) private 
	{
            _rOwned[BurnAddress] = _rOwned[BurnAddress].add(rBurnFee);        
            _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);
            _rOwned[rewardAddress] = _rOwned[rewardAddress].add(rRewardFee);
		
            emit Transfer(sender, recipient, _scaling(tTransferAmount));
            emit Transfer(sender, BurnAddress, _scaling(tBurnFee));
            emit Transfer(sender, rewardAddress, _scaling(tRewardFee));
        
    }
    
    function _transferStandardTx(address sender, address recipient, uint256 tBurnFee, uint256 rTransferAmount, uint256 rBurnFee, uint256 rRewardFee, uint256 tTransferAmount, uint256 tRewardFee) private 
	{        
                _rOwned[BurnAddress] = _rOwned[BurnAddress].add(rBurnFee);                
                _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);
                _rOwned[rewardAddress] = _rOwned[rewardAddress].add(rRewardFee);
			
                emit Transfer(sender, recipient, _scaling(tTransferAmount));
                emit Transfer(sender, BurnAddress, _scaling(tBurnFee));
                emit Transfer(sender, rewardAddress, _scaling(tRewardFee));
        
    }

    function _transferToExcluded(address sender, address recipient, uint256 tAmount) private 
	{
		uint256 currentRate =  _getRate();
		uint256 TAmount = tAmount.mul(internalDecimals).div(RiseScalingFactor);
		uint256 rAmount = TAmount.mul(currentRate);
        _rOwned[sender] = _rOwned[sender].sub(rAmount);

		if(inSwapAndLiquify) {
            _rOwned[recipient] = _rOwned[recipient].add(rAmount);
            emit Transfer(sender, recipient, tAmount);
		}
		
		else if(_isUniswapPairAddress(recipient))
        {
		 uint256 fee = getSellBurn(TAmount);
		(, uint256 rBurnFee, uint256 rFYFee, uint256 rRewardFee) = _getRValues(rAmount, fee, currentRate);
		(uint256 tTransferAmount, uint256 tFYFee, uint256 tBurnFee, uint256 tRewardFee) = _getTValues(TAmount, fee);
		_totalSupply = _totalSupply.sub(_scaling(tBurnFee));
		_reflectFee(rFYFee, tFYFee);
		_transferToExcludedSell(sender, recipient, tBurnFee, rBurnFee, rRewardFee, tTransferAmount, tRewardFee);
        }
        else
        {
            if(!_isWhitelisted(sender, recipient))
            {
	     uint256 fee = getTxBurn(TAmount);
		(, uint256 rBurnFee, uint256 rFYFee, uint256 rRewardFee) = _getRValues(rAmount, fee, currentRate);
		(uint256 tTransferAmount, uint256 tFYFee, uint256 tBurnFee, uint256 tRewardFee) = _getTValues(TAmount, fee);
		_totalSupply = _totalSupply.sub(_scaling(tBurnFee));
		_reflectFee(rFYFee, tFYFee);
        _transferToExcludedSell(sender, recipient, tBurnFee, rBurnFee, rRewardFee, tTransferAmount, tRewardFee);
            }
            else
            {
                _tOwned[recipient] = _tOwned[recipient].add(TAmount);
                emit Transfer(sender, recipient, tAmount);
             }
        }
    }
    
    function _transferToExcludedSell (address sender, address recipient, uint256 tBurnFee, uint256 tTransferAmount, uint256 rBurnFee, uint256 rRewardFee, uint256 tRewardFee) private 
	{
            _rOwned[BurnAddress] = _rOwned[BurnAddress].add(rBurnFee);
            _tOwned[recipient] = _tOwned[recipient].add(tTransferAmount);
            _rOwned[rewardAddress] = _rOwned[rewardAddress].add(rRewardFee);
            emit Transfer(sender, recipient, _scaling(tTransferAmount));
            emit Transfer(sender, BurnAddress, _scaling(tBurnFee));
            emit Transfer(sender, rewardAddress, _scaling(tRewardFee));
        
    }
    
    function _transferToExcludedTx (address sender, address recipient, uint256 tBurnFee, uint256 tTransferAmount, uint256 rBurnFee, uint256 rRewardFee, uint256 tRewardFee) private 
	{        
                _rOwned[BurnAddress] = _rOwned[BurnAddress].add(rBurnFee);
                _tOwned[recipient] = _tOwned[recipient].add(tTransferAmount);
                _rOwned[rewardAddress] = _rOwned[rewardAddress].add(rRewardFee);
                emit Transfer(sender, recipient, _scaling(tTransferAmount));
                emit Transfer(sender, BurnAddress, _scaling(tBurnFee));
                emit Transfer(sender, rewardAddress, _scaling(tRewardFee));
    }
         
    function _transferFromExcluded(address sender, address recipient, uint256 tAmount) private 
	{
		uint256 currentRate =  _getRate();
		uint256 TAmount = tAmount.mul(internalDecimals).div(RiseScalingFactor);
		uint256 rAmount = TAmount.mul(currentRate);
        _tOwned[sender] = _tOwned[sender].sub(tAmount);
		_rOwned[sender] = _rOwned[sender].sub(rAmount);
		
		if(inSwapAndLiquify) {
            _rOwned[recipient] = _rOwned[recipient].add(rAmount);
            emit Transfer(sender, recipient, tAmount);
		}
		
		else if(_isUniswapPairAddress(recipient))
        {
		 uint256 fee = getSellBurn(TAmount);
		(uint256 rTransferAmount, uint256 rBurnFee, uint256 rFYFee, uint256 rRewardFee) = _getRValues(rAmount, fee, currentRate);
		(uint256 tTransferAmount, uint256 tFYFee, uint256 tBurnFee, uint256 tRewardFee) = _getTValues(TAmount, fee);
		_totalSupply = _totalSupply.sub(_scaling(tBurnFee));
		_reflectFee(rFYFee, tFYFee);
		_transferFromExcludedSell(sender, recipient, tBurnFee, rTransferAmount, rBurnFee, rRewardFee, tTransferAmount, tRewardFee);
        }
        else
        {
            if(!_isWhitelisted(sender, recipient))
            {
	     uint256 fee = getTxBurn(TAmount);
		(uint256 rTransferAmount, uint256 rBurnFee, uint256 rFYFee, uint256 rRewardFee) = _getRValues(rAmount, fee, currentRate);
		(uint256 tTransferAmount, uint256 tFYFee, uint256 tBurnFee, uint256 tRewardFee) = _getTValues(TAmount, fee);
		_totalSupply = _totalSupply.sub(_scaling(tBurnFee));
		_reflectFee(rFYFee, tFYFee);
		_transferFromExcludedTx(sender, recipient, tBurnFee, rTransferAmount, rBurnFee, rRewardFee, tTransferAmount, tRewardFee);
                
            }
            else
            {
                _rOwned[recipient] = _rOwned[recipient].add(rAmount);
                emit Transfer(sender, recipient, tAmount);
             }
        }
    }
    
    function _transferFromExcludedSell(address sender, address recipient, uint256 tBurnFee, uint256 rTransferAmount, uint256 rBurnFee, uint256 rRewardFee, uint256 tTransferAmount, uint256 tRewardFee) private 
	{
            _rOwned[BurnAddress] = _rOwned[BurnAddress].add(rBurnFee);
            _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);
            _rOwned[rewardAddress] = _rOwned[rewardAddress].add(rRewardFee);
            emit Transfer(sender, recipient, _scaling(tTransferAmount));
            emit Transfer(sender, BurnAddress, _scaling(tBurnFee));
            emit Transfer(sender, rewardAddress, _scaling(tRewardFee));
    }
    
    function _transferFromExcludedTx(address sender, address recipient, uint256 tBurnFee, uint256 rTransferAmount, uint256 rBurnFee, uint256 rRewardFee, uint256 tTransferAmount, uint256 tRewardFee) private 
	{
                _rOwned[BurnAddress] = _rOwned[BurnAddress].add(rBurnFee);
                _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);
                _rOwned[rewardAddress] = _rOwned[rewardAddress].add(rRewardFee);
                emit Transfer(sender, recipient, _scaling(tTransferAmount));
                emit Transfer(sender, BurnAddress, _scaling(tBurnFee));
                emit Transfer(sender, rewardAddress, _scaling(tRewardFee));
    }
    
    function _transferBothExcluded(address sender, address recipient, uint256 tAmount) private 
	{
	    uint256 currentRate =  _getRate();
		uint256 TAmount = tAmount.mul(internalDecimals).div(RiseScalingFactor);
		uint256 rAmount = TAmount.mul(currentRate);
        _tOwned[sender] = _tOwned[sender].sub(tAmount);
		_rOwned[sender] = _rOwned[sender].sub(rAmount);
		
		if(inSwapAndLiquify) {
            _rOwned[recipient] = _rOwned[recipient].add(rAmount);
            emit Transfer(sender, recipient, tAmount);
		}
		
        else if(_isUniswapPairAddress(recipient))
        {
		 uint256 fee = getSellBurn(TAmount);
		(uint256 rTransferAmount, uint256 rBurnFee, uint256 rFYFee, uint256 rRewardFee) = _getRValues(rAmount, fee, currentRate);
		(uint256 tTransferAmount, uint256 tFYFee, uint256 tBurnFee, uint256 tRewardFee) = _getTValues(TAmount, fee);
            _totalSupply = _totalSupply.sub(_scaling(tBurnFee));
            _reflectFee(rFYFee, tFYFee);
            _transferBothExcludedSell(sender, recipient, tBurnFee, rTransferAmount, rBurnFee, rRewardFee, tTransferAmount, tRewardFee);
            
        }
        else
        {
            if(!_isWhitelisted(sender, recipient))
            {
	     uint256 fee = getTxBurn(TAmount);
		(uint256 rTransferAmount, uint256 rBurnFee, uint256 rFYFee, uint256 rRewardFee) = _getRValues(rAmount, fee, currentRate);
		(uint256 tTransferAmount, uint256 tFYFee, uint256 tBurnFee, uint256 tRewardFee) = _getTValues(TAmount, fee);
           _totalSupply = _totalSupply.sub(_scaling(tBurnFee));
            _reflectFee(rFYFee, tFYFee);
            _transferBothExcludedTx(sender, recipient, tBurnFee, rTransferAmount, rBurnFee, rRewardFee, tTransferAmount, tRewardFee);
            }
            else
            {
                _rOwned[recipient] = _rOwned[recipient].add(rAmount);
				_tOwned[recipient] = _tOwned[recipient].add(TAmount);
                emit Transfer(sender, recipient, tAmount);
             }
        }
    }
    
    function _transferBothExcludedSell(address sender, address recipient, uint256 tBurnFee, uint256 rTransferAmount, uint256 rBurnFee, uint256 tTransferAmount, uint256 rRewardFee, uint256 tRewardFee) private 
	{   
            _rOwned[BurnAddress] = _rOwned[BurnAddress].add(rBurnFee);
            _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);
			_tOwned[recipient] = _tOwned[recipient].add(tTransferAmount);
            _rOwned[rewardAddress] = _rOwned[rewardAddress].add(rRewardFee);
			
            emit Transfer(sender, recipient, _scaling(tTransferAmount));
            emit Transfer(sender, BurnAddress, _scaling(tBurnFee));
            emit Transfer(sender, rewardAddress, _scaling(tRewardFee));
        
    }
    
     function _transferBothExcludedTx(address sender, address recipient, uint256 tBurnFee, uint256 rTransferAmount, uint256 rBurnFee, uint256 tTransferAmount, uint256 rRewardFee, uint256 tRewardFee) private 
	 {
                _rOwned[BurnAddress] = _rOwned[BurnAddress].add(rBurnFee);
                _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);
				_tOwned[recipient] = _tOwned[recipient].add(tTransferAmount);
                _rOwned[rewardAddress] = _rOwned[rewardAddress].add(rRewardFee);
				
                emit Transfer(sender, recipient, _scaling(tTransferAmount));
                emit Transfer(sender, BurnAddress, _scaling(tBurnFee));
                emit Transfer(sender, rewardAddress, _scaling(tRewardFee));
     }
	 
	function _scaling(uint256 amount) private view returns (uint256)
	
	{
		uint256 scaledAmount = amount.mul(RiseScalingFactor).div(internalDecimals);
		return(scaledAmount);
	}

    function _reflectFee(uint256 rFee, uint256 tFee) private 
	{
        _rTotal = _rTotal.sub(rFee);
        _tFeeTotal = _tFeeTotal.add(tFee);
    }

    function _getTValues(uint256 TAmount, uint256 fee) private view returns (uint256, uint256, uint256, uint256) 
	{
        uint256 tFYFee = TAmount.div(FYFee); 
		uint256 tBurnFee = BURN_TOP*fee/BURN_BOTTOM;
		uint256 tRewardFee = fee.sub(tBurnFee);
        uint256 tTransferAmount = TAmount.sub(tFYFee).sub(tBurnFee).sub(tRewardFee);
        return (tTransferAmount, tFYFee, tBurnFee, tRewardFee);
    }
	
    function _getRValues(uint256 rAmount, uint256 fee, uint256 currentRate) private view returns (uint256, uint256, uint256, uint256) 
	{
        uint256 rFYFee = rAmount.div(FYFee);
		uint256 rBurnFee = (BURN_TOP*fee/BURN_BOTTOM).mul(currentRate);
		uint256 rRewardFee = fee.mul(currentRate).sub(rBurnFee);
		uint256 rTransferAmount = _getRValues2(rAmount, rFYFee, rBurnFee, rRewardFee);
        return (rTransferAmount, rBurnFee, rFYFee, rRewardFee);
    }
	
	function _getRValues2(uint256 rAmount, uint256 rFYFee, uint256 rBurnFee, uint256 rRewardFee) private pure returns (uint256) 
	{
        uint256 rTransferAmount = rAmount.sub(rFYFee).sub(rBurnFee).sub(rRewardFee);
        return (rTransferAmount);
    }
	

    function _getRate() private view returns(uint256) 
	{
        (uint256 rSupply, uint256 tSupply) = _getCurrentSupply();
        return rSupply.div(tSupply);
    }

    function _getCurrentSupply() private view returns(uint256, uint256) 
	{
        uint256 rSupply = _rTotal;
        uint256 tSupply = initSupply;      
        for (uint256 i = 0; i < _excluded.length; i++) {
            if (_rOwned[_excluded[i]] > rSupply || _tOwned[_excluded[i]] > tSupply) return (_rTotal, initSupply);
            rSupply = rSupply.sub(_rOwned[_excluded[i]]);
            tSupply = tSupply.sub(_tOwned[_excluded[i]]);
        }
        if (rSupply < _rTotal.div(initSupply)) return (_rTotal, initSupply);
        return (rSupply, tSupply);
    }

    function _setRewardAddress(address rewards_) external onlyOwner
    {
        rewardAddress = rewards_;
    }

    /**
    * @notice Initiates a new rebase operation, provided the minimum time period has elapsed.
    *
    * @dev The supply adjustment equals (totalSupply * DeviationFromTargetRate) / rebaseLag
    *      Where DeviationFromTargetRate is (MarketOracleRate - targetRate) / targetRate
    *      and targetRate is CpiOracleRate / baseCpi
    */
    function rebase(uint256 epoch, uint256 indexDelta, bool positive) external onlyRebaser returns (uint256)
    {
		uint256 currentRate = _getRate();
        if (!positive)
        {
		uint256 newScalingFactor = RiseScalingFactor.mul(BASE.sub(indexDelta)).div(BASE);
		RiseScalingFactor = newScalingFactor;
        _totalSupply = ((initSupply.sub(_rOwned[BurnAddress].div(currentRate))
            .mul(RiseScalingFactor).div(internalDecimals)));
        emit Rebase(epoch, RiseScalingFactor);
		IUniswapV2Pair(uniswapETHPool).sync();
		for (uint256 i = 0; i < futurePools.length; i++) {
			address futurePoolAddress = futurePools[i];
			IUniswapV2Pair(futurePoolAddress).sync();
		}
        return _totalSupply;
        }
		
        else 
		{
        uint256 newScalingFactor = RiseScalingFactor.mul(BASE.add(indexDelta)).div(BASE);
        if (newScalingFactor < _maxScalingFactor())
        {
            RiseScalingFactor = newScalingFactor;
        }
        else
        {
            RiseScalingFactor = _maxScalingFactor();
        }

        _totalSupply = ((initSupply.sub(_rOwned[BurnAddress].div(currentRate))
            .mul(RiseScalingFactor).div(internalDecimals)));
        emit Rebase(epoch, RiseScalingFactor);
		IUniswapV2Pair(uniswapETHPool).sync();
		for (uint256 i = 0; i < futurePools.length; i++) {
			address futurePoolAddress = futurePools[i];
			IUniswapV2Pair(futurePoolAddress).sync();
		}
        return _totalSupply;
		}
	}
	
	function getCurrentPoolAddress() public view returns(address) {
        return currentPoolAddress;
    }
    
    function getCurrentPairTokenAddress() public view returns(address) {
        return currentPairTokenAddress;
    }
	
	function _setMaxTxAmount(uint256 maxTxAmount) external onlyOwner() {
        require(maxTxAmount >= 10**8 , 'Rise: maxTxAmount should be greater than 0.1 RISE');
        _maxTxAmount = maxTxAmount;
        emit MaxTxAmountUpdated(maxTxAmount);
    }
	
	function _setMinTokensBeforeSwap(uint256 minTokensBeforeSwap) external onlyOwner() {
        require(minTokensBeforeSwap >= 1 * 10**9 && minTokensBeforeSwap <= 2000 * 10**9, 'Rise: minTokenBeforeSwap should be between 1 and 2000 RISE');
        require(minTokensBeforeSwap > _autoSwapCallerFee , 'Rise: minTokenBeforeSwap should be greater than autoSwapCallerFee');
        _minTokensBeforeSwap = minTokensBeforeSwap;
        emit MinTokensBeforeSwapUpdated(minTokensBeforeSwap);
    }
	
	function _setAutoSwapCallerFee(uint256 autoSwapCallerFee) external onlyOwner() {
        require(autoSwapCallerFee >= 10**8, 'Rise: autoSwapCallerFee should be greater than 0.1 RISE');
        _autoSwapCallerFee = autoSwapCallerFee;
        emit AutoSwapCallerFeeUpdated(autoSwapCallerFee);
    }
	
	function updateSwapAndLiquifyEnabled(bool _enabled) public onlyOwner {
        swapAndLiquifyEnabled = _enabled;
        emit SwapAndLiquifyEnabledUpdated(_enabled);
    }
	
	function _enableTrading() external onlyOwner() {
        tradingEnabled = true;
        TradingEnabled();
    }
}
Address.sol 143 lines
// File: openzeppelin-solidity\contracts\utils\Address.sol

// SPDX-License-Identifier: MIT

pragma solidity ^0.6.2;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // According to EIP-1052, 0x0 is the value returned for not-yet created accounts
        // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
        // for accounts without code, i.e. `keccak256('')`
        bytes32 codehash;
        bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
        // solhint-disable-next-line no-inline-assembly
        assembly { codehash := extcodehash(account) }
        return (codehash != accountHash && codehash != 0x0);
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (bool success, ) = recipient.call{ value: amount }("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain`call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
      return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
        return _functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        return _functionCallWithValue(target, data, value, errorMessage);
    }

    function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {
        require(isContract(target), "Address: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: weiValue }(data);
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}
Context.sol 24 lines
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

/*
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with GSN meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address payable) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}
Ownable.sol 68 lines
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

import "./Context.sol";
/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
contract Ownable is Context {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor () internal {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(_owner == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = address(0);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}
Rebaser.sol 31 lines
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.6.12;

import "./Ownable.sol";

contract Rebasable is Ownable {
  address private _rebaser;

  event TransferredRebasership(address indexed previousRebaser, address indexed newRebaser);

  constructor() internal {
    address msgSender = _msgSender();
    _rebaser = msgSender;
    emit TransferredRebasership(address(0), msgSender);
  }

  function Rebaser() public view returns(address) {
    return _rebaser;
  }

  modifier onlyRebaser() {
    require(_rebaser == _msgSender(), "caller is not rebaser");
    _;
  }

  function transferRebasership(address newRebaser) public virtual onlyOwner {
    require(newRebaser != address(0), "new rebaser is address zero");
    emit TransferredRebasership(_rebaser, newRebaser);
    _rebaser = newRebaser;
  }
}
RiseSafeMath.sol 176 lines
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library RiseSafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return sub(a, b, "SafeMath: subtraction overflow");
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;

        return c;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return div(a, b, "SafeMath: division by zero");
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return mod(a, b, "SafeMath: modulo by zero");
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts with custom message when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }

    function ceil(uint256 a, uint256 m) internal pure returns (uint256)
    {
        uint256 c = add(a,m);
        uint256 d = sub(c,1);
        return mul(div(d,m),m);
    }

    function divRound(uint256 x, uint256 y) internal pure returns (uint256) {
        require(y != 0, "Div by zero");
        uint256 r = x / y;
        if (x % y != 0) {
            r = r + 1;
        }

        return r;
    }
}

Read Contract

BASE 0xec342ad0 → uint256
BURN_BOTTOM 0x465b5381 → uint16
BURN_TOP 0xa6f8fe45 → uint16
BurnAddress 0xcabcc718 → address
FYFee 0xcc2d0259 → uint16
Rebaser 0x89687116 → address
RiseScalingFactor 0x29bf8a24 → uint256
SELL_FEE 0x4773a6a9 → uint16
TX_FEE 0xde52014b → uint16
_autoSwapCallerFee 0xedcdb806 → uint256
_maxTxAmount 0x7d1db4a5 → uint256
_minTokensBeforeSwap 0x8aadb809 → uint256
_uniswapV2Router 0x583e0568 → address
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
balanceOfUnderlying 0x3af9e669 → uint256
decimals 0x313ce567 → uint8
futurePools 0xc835e7e1 → address
getCurrentPairTokenAddress 0x5afbfd38 → address
getCurrentPoolAddress 0xc9e6da19 → address
getSellBurn 0x04cf8682 → uint256
getTxBurn 0x7dbaed88 → uint256
internalDecimals 0x64dd48f5 → uint256
isExcluded 0xcba0e996 → bool
liquidityRewardRate 0x61fd49e2 → uint256
maxScalingFactor 0x11d3e6c4 → uint256
name 0x06fdde03 → string
owner 0x8da5cb5b → address
reflectionFromToken 0x4549b039 → uint256
rewardAddress 0x8cf57cb9 → address
swapAndLiquifyEnabled 0x4a74bb02 → bool
symbol 0x95d89b41 → string
tokenFromReflection 0x2d838119 → uint256
totalFees 0x13114a9d → uint256
totalSupply 0x18160ddd → uint256
tradingEnabled 0x4ada218b → bool
uniswapETHPool 0xf2029d6b → address
uniswapPairAddress 0x9437b8fa → bool
whitelistFrom 0x43684b21 → bool
whitelistTo 0x16b627d1 → bool

Write Contract 27 functions

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

_enableTrading 0xa0ac5e19
No parameters
_setAutoSwapCallerFee 0xefeb97e1
uint256 autoSwapCallerFee
_setMaxTxAmount 0x1bbae6e0
uint256 maxTxAmount
_setMinTokensBeforeSwap 0x4a1e7726
uint256 minTokensBeforeSwap
_setRewardAddress 0xfcdc7b1d
address rewards_
addfuturePool 0xfd72c236
address futurePool
approve 0x095ea7b3
address spender
uint256 amount
returns: bool
decreaseAllowance 0xa457c2d7
address spender
uint256 subtractedValue
returns: bool
excludeAccount 0xf2cc0c18
address account
includeAccount 0xf84354f1
address account
increaseAllowance 0x39509351
address spender
uint256 addedValue
returns: bool
rebase 0x7af548c1
uint256 epoch
uint256 indexDelta
bool positive
returns: uint256
reflect 0x053ab182
uint256 tAmount
renounceOwnership 0x715018a6
No parameters
setBurnBottom 0xcdfd3b25
uint16 burnbottom
setBurnTop 0xde9eb458
uint16 burntop
setFYFee 0x319d30e2
uint16 fee
setSellFee 0xe064648a
uint16 fee
setTxFee 0x3986829d
uint16 fee
setUniswapPairAddress 0x0e4db802
address _addr
bool _whitelisted
setWhitelistedFrom 0xff12bbf4
address _addr
bool _whitelisted
setWhitelistedTo 0xa486309d
address _addr
bool _whitelisted
transfer 0xa9059cbb
address recipient
uint256 amount
returns: bool
transferFrom 0x23b872dd
address sender
address recipient
uint256 amount
returns: bool
transferOwnership 0xf2fde38b
address newOwner
transferRebasership 0x2411e717
address newRebaser
updateSwapAndLiquifyEnabled 0x9f9a4e7f
bool _enabled

Recent Transactions

No transactions found for this address