Address Contract Verified
Address
0x2C431766E48Ec4A17dc052d9d3feF6b6A9ae8D62
Balance
0 ETH
Nonce
1
Code Size
10407 bytes
Creator
0xDfDDa14d...Ef72 at tx 0xeeba3113...c2a7cc
Indexed Transactions
0
Contract Bytecode
10407 bytes
0x6080604052600436106102f5575f3560e01c80638da5cb5b11610195578063c2300bef116100ea578063e6c1909b1161008e578063f2fde38b1161006b578063f2fde38b14610935578063f53bc83514610954578063f8b45b0514610973578063fd72e22a1461098857005b8063e6c1909b146108d7578063ee5ecc89146108f7578063ef998cf01461091657005b8063d5759ba3116100c7578063d5759ba31461083f578063dcf7aef31461085f578063dd62ed3e1461087e578063e2f45605146108c257005b8063c2300bef146107ed578063cb96372814610801578063d26ed3e31461082057005b8063acb2ad6f11610151578063b0ed273c1161012e578063b0ed273c1461076c578063b62496f51461078b578063b8eb3546146107b9578063c04a5414146107ce57005b8063acb2ad6f14610719578063ad29ffde1461072e578063afa4f3b21461074d57005b80638da5cb5b1461066d57806395927c251461068957806395d89b41146106a85780639a7a23d6146106bc5780639c0db5f3146106db578063a9059cbb146106fa57005b806349bd5a5e1161024b5780635cce86cd1161020757806370a08231116101e457806370a08231146105f157806370db69d614610625578063715018a61461063a57806372ac24861461064e57005b80635cce86cd146105845780635d0044ca146105b25780636ca541e5146105d157005b806349bd5a5e146104bd5780634e6fd6c4146104f05780634fbee19314610505578063538ba4f9146105335780635932ead11461054657806359512ab01461056557005b806323b872dd116102b2578063313ce5671161028f578063313ce567146104405780633bbac5791461045b57806341aea9de1461048957806347062402146104a857005b806323b872dd146103ec5780632b14ca561461040b578063307aebc91461042057005b806301339c21146102f757806306fdde031461030b578063095ea7b314610335578063106a5a8f146103645780631694505e1461038357806318160ddd146103ce575b005b348015610302575f5ffd5b506102f56109a7565b348015610316575f5ffd5b5061031f610a17565b60405161032c9190612501565b60405180910390f35b348015610340575f5ffd5b5061035461034f36600461254a565b610aa7565b604051901515815260200161032c565b34801561036f575f5ffd5b506102f561037e366004612581565b610ac0565b34801561038e575f5ffd5b506103b67f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d81565b6040516001600160a01b03909116815260200161032c565b3480156103d9575f5ffd5b506003545b60405190815260200161032c565b3480156103f7575f5ffd5b50610354610406366004612603565b610b10565b348015610416575f5ffd5b506103de600e5481565b34801561042b575f5ffd5b5060075461035490600160c01b900460ff1681565b34801561044b575f5ffd5b506040516012815260200161032c565b348015610466575f5ffd5b50610354610475366004612641565b60116020525f908152604090205460ff1681565b348015610494575f5ffd5b506102f56104a3366004612663565b610b33565b3480156104b3575f5ffd5b506103de600d5481565b3480156104c8575f5ffd5b506103b67f0000000000000000000000005b24ba115ad47e4b2806fbb5cff27d52858ca0be81565b3480156104fb575f5ffd5b506103b661dead81565b348015610510575f5ffd5b5061035461051f366004612641565b60126020525f908152604090205460ff1681565b34801561053e575f5ffd5b506103b65f81565b348015610551575f5ffd5b506102f5610560366004612663565b610b93565b348015610570575f5ffd5b506102f561057f366004612663565b610be8565b34801561058f575f5ffd5b5061035461059e366004612641565b60136020525f908152604090205460ff1681565b3480156105bd575f5ffd5b506102f56105cc36600461267e565b610c3d565b3480156105dc575f5ffd5b5060075461035490600160a81b900460ff1681565b3480156105fc575f5ffd5b506103de61060b366004612641565b6001600160a01b03165f9081526001602052604090205490565b348015610630575f5ffd5b506103de60095481565b348015610645575f5ffd5b506102f5610cbb565b348015610659575f5ffd5b506102f5610668366004612641565b610cce565b348015610678575f5ffd5b505f546001600160a01b03166103b6565b348015610694575f5ffd5b506102f56106a336600461267e565b610d80565b3480156106b3575f5ffd5b5061031f610de8565b3480156106c7575f5ffd5b506102f56106d6366004612695565b610df7565b3480156106e6575f5ffd5b506102f56106f5366004612581565b610e46565b348015610705575f5ffd5b5061035461071436600461254a565b611053565b348015610724575f5ffd5b506103de600f5481565b348015610739575f5ffd5b506102f5610748366004612581565b611060565b348015610758575f5ffd5b506102f561076736600461267e565b6110aa565b348015610777575f5ffd5b506102f561078636600461267e565b611176565b348015610796575f5ffd5b506103546107a5366004612641565b60146020525f908152604090205460ff1681565b3480156107c4575f5ffd5b506103de600a5481565b3480156107d9575f5ffd5b506007546103b6906001600160a01b031681565b3480156107f8575f5ffd5b506103de601481565b34801561080c575f5ffd5b506102f561081b366004612641565b6111de565b34801561082b575f5ffd5b506102f561083a36600461267e565b6113c3565b34801561084a575f5ffd5b5060075461035490600160a01b900460ff1681565b34801561086a575f5ffd5b506102f561087936600461267e565b61142b565b348015610889575f5ffd5b506103de6108983660046126cc565b6001600160a01b039182165f90815260026020908152604080832093909416825291909152205490565b3480156108cd575f5ffd5b506103de600c5481565b3480156108e2575f5ffd5b5060075461035490600160b01b900460ff1681565b348015610902575f5ffd5b506102f5610911366004612641565b611493565b348015610921575f5ffd5b506102f561093036600461267e565b61153d565b348015610940575f5ffd5b506102f561094f366004612641565b6115bb565b34801561095f575f5ffd5b506102f561096e36600461267e565b6115fd565b34801561097e575f5ffd5b506103de600b5481565b348015610993575f5ffd5b506006546103b6906001600160a01b031681565b6109af61167b565b600754600160c01b900460ff16156109da576040516319f4db0f60e31b815260040160405180910390fd5b6007805460ff60c01b1916600160c01b1790556040517f02ac8168caf2f254b394bd39e19417c5c28124ab89c9bc2d44921b19808e2669905f90a1565b606060048054610a26906126f8565b80601f0160208091040260200160405190810160405280929190818152602001828054610a52906126f8565b8015610a9d5780601f10610a7457610100808354040283529160200191610a9d565b820191905f5260205f20905b815481529060010190602001808311610a8057829003601f168201915b5050505050905090565b5f33610ab48185856116a7565b60019150505b92915050565b610ac861167b565b5f5b82811015610b0a57610b02848483818110610ae757610ae7612730565b9050602002016020810190610afc9190612641565b836116b9565b600101610aca565b50505050565b5f33610b1d858285611714565b610b2885858561178a565b506001949350505050565b610b3b61167b565b60078054821515600160a01b0260ff60a01b199091161790556040517ff771b1e218dc92494b39e21852f9c24c3b448d6697c2b485cc1f0cff3c9ec78190610b8890831515815260200190565b60405180910390a150565b610b9b61167b565b60078054821515600160a81b0260ff60a81b199091161790556040517f381fb4c4aa72df83c60e7e567b9b6faf3fc2b05a6da932da9f071d63442c828f90610b8890831515815260200190565b610bf061167b565b60078054821515600160b01b0260ff60b01b199091161790556040517f06cf69227e5c2b5a71319bc3784f6a5355ea0ba2a69bc4c39d64413dfa5a012b90610b8890831515815260200190565b610c4561167b565b6103e8610c5160035490565b610c5c906003612758565b610c66919061276f565b811015610c8657604051631fbaba3560e01b815260040160405180910390fd5b600b8190556040518181527fa2c87c3e7a3048198ae94e814f6a27e12a4e2a7476e33a0db4d97ffeaf63618690602001610b88565b610cc361167b565b610ccc5f6117e7565b565b6007546001600160a01b03163314610cf957604051636edaef2f60e11b815260040160405180910390fd5b6001600160a01b038116610d2057604051639fabe1c160e01b815260040160405180910390fd5b600780546001600160a01b038381166001600160a01b03198316811790935560408051938452911660208301819052917f2b355c7f17401d9755d704a4cf6149a26deb56a381bb5d06c87b608183dbe09c91015b60405180910390a15050565b610d8861167b565b6014811115610daa5760405163cd4e616760e01b815260040160405180910390fd5b600e80549082905560408051838152602081018390527f125b37650f21d088600cef1223439f6a8bd70800debfd486c503a8a2d19d4b019101610d74565b606060058054610a26906126f8565b610dff61167b565b6001600160a01b0382165f9081526014602052604090205460ff1615610e38576040516304eb79b560e31b815260040160405180910390fd5b610e42828261182b565b5050565b610e4e61167b565b5f5b82811015610b0a5760145f858584818110610e6d57610e6d612730565b9050602002016020810190610e829190612641565b6001600160a01b0316815260208101919091526040015f205460ff16158015610f0357507f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b0316848483818110610ee257610ee2612730565b9050602002016020810190610ef79190612641565b6001600160a01b031614155b8015610f3e575030848483818110610f1d57610f1d612730565b9050602002016020810190610f329190612641565b6001600160a01b031614155b8015610f7957505f848483818110610f5857610f58612730565b9050602002016020810190610f6d9190612641565b6001600160a01b031614155b8015611016575060125f858584818110610f9557610f95612730565b9050602002016020810190610faa9190612641565b6001600160a01b0316815260208101919091526040015f205460ff16158015611016575060135f858584818110610fe357610fe3612730565b9050602002016020810190610ff89190612641565b6001600160a01b0316815260208101919091526040015f205460ff16155b1561104b5761104b84848381811061103057611030612730565b90506020020160208101906110459190612641565b83611886565b600101610e50565b5f33610ab481858561178a565b61106861167b565b5f5b82811015610b0a576110a284848381811061108757611087612730565b905060200201602081019061109c9190612641565b836118e1565b60010161106a565b6110b261167b565b5f6110bc60035490565b9050620f42406110cd826001612758565b6110d7919061276f565b8210156110f757604051631fbaba3560e01b815260040160405180910390fd5b6103e8611105826005612758565b61110f919061276f565b82111561112f5760405163fd7850ad60e01b815260040160405180910390fd5b600c80549083905560408051848152602081018390527f190dc7c30bc62ef30e35c5f5512ad715a1bd03230f2d89c965249246c8d8ecca91015b60405180910390a1505050565b61117e61167b565b60148110156111a057604051637974d25f60e11b815260040160405180910390fd5b601080549082905560408051838152602081018390527f994fb1b51dba7883ed3c66a9e679f1be98c2a47cca8ad263abff0c223935c1989101610d74565b6111e661167b565b335f6001600160a01b03831661128c5750475f8161121757604051634870bf9160e01b815260040160405180910390fd5b6040516001600160a01b0384169083905f81818185875af1925050503d805f811461125d576040519150601f19603f3d011682016040523d82523d5f602084013e611262565b606091505b5050809150508061128657604051633398652560e11b815260040160405180910390fd5b50611384565b6040516370a0823160e01b81523060048201526001600160a01b038416906370a0823190602401602060405180830381865afa1580156112ce573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906112f2919061278e565b90505f81116113145760405163df95788360e01b815260040160405180910390fd5b60405163a9059cbb60e01b8152336004820152602481018290526001600160a01b0384169063a9059cbb906044016020604051808303815f875af115801561135e573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061138291906127a5565b505b604080516001600160a01b0385168152602081018390527f07c81a5e6d155913a9ed2ce53630058179c89fc94bb5de130620b0245c9f6a0b9101611169565b6113cb61167b565b60148111156113ed5760405163cd4e616760e01b815260040160405180910390fd5b600f80549082905560408051838152602081018390527f8fd531ce6f3cbc5b8cc01a0413b630e3f11569780ee5cf8d0c78e03bca30bc259101610d74565b61143361167b565b60148111156114555760405163cd4e616760e01b815260040160405180910390fd5b600d80549082905560408051838152602081018390527f5fcc0eea159d45a3b8d481be746c9beed251431a542a5fed4484be37ab783e8d9101610d74565b6006546001600160a01b031633146114be57604051636edaef2f60e11b815260040160405180910390fd5b6001600160a01b0381166114e557604051639fabe1c160e01b815260040160405180910390fd5b600680546001600160a01b038381166001600160a01b03198316811790935560408051938452911660208301819052917fe20a721838fcbbb3840bd5d97dde1ffeb479fe73d75736fa6fdfc0f220aae0059101610d74565b61154561167b565b6103e861155160035490565b61155c906002612758565b611566919061276f565b81101561158657604051631fbaba3560e01b815260040160405180910390fd5b600a8190556040518181527f3c0ac525ebd597ae4e1201e687d8a7424b740a53b775b1527eb1c1936c1bd3b790602001610b88565b6115c361167b565b6001600160a01b0381166115f157604051631e4fbdf760e01b81525f60048201526024015b60405180910390fd5b6115fa816117e7565b50565b61160561167b565b6103e861161160035490565b61161c906002612758565b611626919061276f565b81101561164657604051631fbaba3560e01b815260040160405180910390fd5b60098190556040518181527f16fd9174d80e7089ed0c10c47c8079476be2ec28b97c4b40846cffd8a7aa9e9f90602001610b88565b5f546001600160a01b03163314610ccc5760405163118cdaa760e01b81523360048201526024016115e8565b6116b4838383600161193c565b505050565b6001600160a01b0382165f81815260136020908152604091829020805460ff19168515159081179091558251938452908301527f4b89c347592b1d537e066cb4ed98d87696ae35164745d7e370e4add16941dc929101610d74565b6001600160a01b038381165f908152600260209081526040808320938616835292905220545f19811015610b0a578181101561177c57604051637dc7a0d960e11b81526001600160a01b038416600482015260248101829052604481018390526064016115e8565b610b0a84848484035f61193c565b6001600160a01b0383166117b357604051634b637e8f60e11b81525f60048201526024016115e8565b6001600160a01b0382166117dc5760405163ec442f0560e01b81525f60048201526024016115e8565b6116b4838383611a0e565b5f546001600160a01b0316801561180c57611802815f6118e1565b61180c815f6116b9565b6118178260016118e1565b6118228260016116b9565b610e42826120ea565b6001600160a01b0382165f81815260146020908152604091829020805460ff19168515159081179091558251938452908301527fffa9187bf1f18bf477bd0ea1bcbb64e93b6a98132473929edfce215cd9b16fab9101610d74565b6001600160a01b0382165f81815260116020908152604091829020805460ff19168515159081179091558251938452908301527ff7f8b40d08076851dfb7cfd6c584ae9a829a570f264abee45e0d7ca342ae8dc89101610d74565b6001600160a01b0382165f81815260126020908152604091829020805460ff19168515159081179091558251938452908301527f9d8f7706ea1113d1a167b526eca956215946dd36cc7df39eb16180222d8b5df79101610d74565b6001600160a01b0384166119655760405163e602df0560e01b81525f60048201526024016115e8565b6001600160a01b03831661198e57604051634a1406b160e11b81525f60048201526024016115e8565b6001600160a01b038085165f9081526002602090815260408083209387168352929052208290558015610b0a57826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92584604051611a0091815260200190565b60405180910390a350505050565b6001600160a01b0383165f9081526011602052604090205433903290439060ff1615611a4d576040516339a9b03560e21b815260040160405180910390fd5b856001600160a01b0316836001600160a01b03161480611a8557506001600160a01b0383165f9081526011602052604090205460ff16155b611aa2576040516339a9b03560e21b815260040160405180910390fd5b856001600160a01b0316826001600160a01b03161480611ad35750826001600160a01b0316826001600160a01b0316145b80611af657506001600160a01b0382165f9081526011602052604090205460ff16155b611b13576040516339a9b03560e21b815260040160405180910390fd5b600754600160c01b900460ff1680611b4257506001600160a01b0386165f9081526013602052604090205460ff165b80611b6457506001600160a01b0385165f9081526013602052604090205460ff165b611b8157604051638dda39df60e01b815260040160405180910390fd5b6007545f90600160a01b900460ff168015611ba65750600754600160b81b900460ff16155b8015611bec57506001600160a01b0387165f9081526013602052604090205460ff1680611bea57506001600160a01b0386165f9081526013602052604090205460ff165b155b90508015611ee6575f546001600160a01b03888116911614801590611c1e57505f546001600160a01b03878116911614155b8015611c3257506001600160a01b03861615155b8015611c4957506001600160a01b03861661dead14155b15611ee657600754600160a81b900460ff1615611d6c577f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b0316866001600160a01b031614158015611cd457507f0000000000000000000000005b24ba115ad47e4b2806fbb5cff27d52858ca0be6001600160a01b0316866001600160a01b031614155b15611d6c57611ce46003836127c0565b6001600160a01b0384165f90815260156020526040902054108015611d295750611d0f6003836127c0565b6001600160a01b0387165f90815260156020526040902054105b611d4657604051630301a6ed60e61b815260040160405180910390fd5b6001600160a01b038084165f908152601560205260408082208590559188168152208290555b6001600160a01b0387165f9081526014602052604090205460ff168015611dab57506001600160a01b0386165f9081526013602052604090205460ff16155b15611e1c57600954851115611dd357604051632c676b8560e21b815260040160405180910390fd5b600b546001600160a01b0387165f90815260016020526040902054611df890876127d3565b1115611e175760405163d867451160e01b815260040160405180910390fd5b611ee6565b6001600160a01b0386165f9081526014602052604090205460ff168015611e5b57506001600160a01b0387165f9081526013602052604090205460ff16155b15611e8357600a54851115611e17576040516338aa438560e21b815260040160405180910390fd5b6001600160a01b0386165f9081526013602052604090205460ff16611ee657600b546001600160a01b0387165f90815260016020526040902054611ec790876127d3565b1115611ee65760405163d867451160e01b815260040160405180910390fd5b6007545f90600160b01b900460ff168015611f0b5750600754600160b81b900460ff16155b8015611f5157506001600160a01b0388165f9081526012602052604090205460ff1680611f4f57506001600160a01b0387165f9081526012602052604090205460ff165b155b90508015612072576001600160a01b0387165f9081526014602052604081205460ff168015611f8157505f600e54115b15611fa7576064600e5488611f969190612758565b611fa0919061276f565b9050612053565b6001600160a01b0389165f9081526014602052604090205460ff168015611fcf57505f600d54115b15611fe4576064600d5488611f969190612758565b6001600160a01b0388165f9081526014602052604090205460ff1615801561202457506001600160a01b0389165f9081526014602052604090205460ff16155b801561203157505f600f54115b15612053576064600f54886120469190612758565b612050919061276f565b90505b80156120705761206381886127c0565b9650612070893083612139565b505b305f90815260016020526040902054600c548110158280156120ac57506001600160a01b038a165f9081526014602052604090205460ff16155b80156120b55750805b156120d3576008548511156120d3576120cd8261225f565b60088590555b6120de8a8a8a612139565b50505050505050505050565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038316612163578060035f82825461215891906127d3565b909155506121d39050565b6001600160a01b0383165f90815260016020526040902054818110156121b55760405163391434e360e21b81526001600160a01b038516600482015260248101829052604481018390526064016115e8565b6001600160a01b0384165f9081526001602052604090209082900390555b6001600160a01b0382166121ef5760038054829003905561220d565b6001600160a01b0382165f9081526001602052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161225291815260200190565b60405180910390a3505050565b6007805460ff60b81b1916600160b81b1790556040805160028082526060820183525f928392919060208301908036833701905050905030815f815181106122a9576122a9612730565b60200260200101906001600160a01b031690816001600160a01b0316815250507f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015612325573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061234991906127e6565b8160018151811061235c5761235c612730565b60200260200101906001600160a01b031690816001600160a01b0316815250505f600c54601461238c9190612758565b90508084111561239a578093505b60405163791ac94760e01b81526001600160a01b037f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d169063791ac947906123ee9087905f90879030904290600401612801565b5f604051808303815f87803b158015612405575f5ffd5b505af1158015612417573d5f5f3e3d5ffd5b50506010544792505f915060649061242f9084612758565b612439919061276f565b90505f61244682846127c0565b6006546040519192506001600160a01b03169082905f81818185875af1925050503d805f8114612491576040519150601f19603f3d011682016040523d82523d5f602084013e612496565b606091505b50506007546040519197506001600160a01b03169083905f81818185875af1925050503d805f81146124e3576040519150601f19603f3d011682016040523d82523d5f602084013e6124e8565b606091505b50506007805460ff60b81b191690555050505050505050565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b6001600160a01b03811681146115fa575f5ffd5b5f5f6040838503121561255b575f5ffd5b823561256681612536565b946020939093013593505050565b80151581146115fa575f5ffd5b5f5f5f60408486031215612593575f5ffd5b833567ffffffffffffffff8111156125a9575f5ffd5b8401601f810186136125b9575f5ffd5b803567ffffffffffffffff8111156125cf575f5ffd5b8660208260051b84010111156125e3575f5ffd5b6020918201945092508401356125f881612574565b809150509250925092565b5f5f5f60608486031215612615575f5ffd5b833561262081612536565b9250602084013561263081612536565b929592945050506040919091013590565b5f60208284031215612651575f5ffd5b813561265c81612536565b9392505050565b5f60208284031215612673575f5ffd5b813561265c81612574565b5f6020828403121561268e575f5ffd5b5035919050565b5f5f604083850312156126a6575f5ffd5b82356126b181612536565b915060208301356126c181612574565b809150509250929050565b5f5f604083850312156126dd575f5ffd5b82356126e881612536565b915060208301356126c181612536565b600181811c9082168061270c57607f821691505b60208210810361272a57634e487b7160e01b5f52602260045260245ffd5b50919050565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b8082028115828204841417610aba57610aba612744565b5f8261278957634e487b7160e01b5f52601260045260245ffd5b500490565b5f6020828403121561279e575f5ffd5b5051919050565b5f602082840312156127b5575f5ffd5b815161265c81612574565b81810381811115610aba57610aba612744565b80820180821115610aba57610aba612744565b5f602082840312156127f6575f5ffd5b815161265c81612536565b5f60a0820187835286602084015260a0604084015280865180835260c0850191506020880192505f5b818110156128515783516001600160a01b031683526020938401939092019160010161282a565b50506001600160a01b03959095166060840152505060800152939250505056fea26469706673582212204ba41526dfd0f2ca7d5f112c3b344ed120ae755ebf466bdc70dfcf03ad9d9dc264736f6c634300081e0033
Verified Source Code Full Match
Compiler: v0.8.30+commit.73712a01
EVM: prague
Optimization: Yes (200 runs)
Ownable.sol 100 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)
pragma solidity ^0.8.20;
import {Context} from "../utils/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.
*
* The initial owner is set to the address provided by the deployer. 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.
*/
abstract contract Ownable is Context {
address private _owner;
/**
* @dev The caller account is not authorized to perform an operation.
*/
error OwnableUnauthorizedAccount(address account);
/**
* @dev The owner is not a valid owner account. (eg. `address(0)`)
*/
error OwnableInvalidOwner(address owner);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the address provided by the deployer as the initial owner.
*/
constructor(address initialOwner) {
if (initialOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_transferOwnership(initialOwner);
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
if (owner() != _msgSender()) {
revert OwnableUnauthorizedAccount(_msgSender());
}
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby disabling any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(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 {
if (newOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}
draft-IERC6093.sol 161 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (interfaces/draft-IERC6093.sol)
pragma solidity ^0.8.20;
/**
* @dev Standard ERC-20 Errors
* Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-20 tokens.
*/
interface IERC20Errors {
/**
* @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
* @param balance Current balance for the interacting account.
* @param needed Minimum amount required to perform a transfer.
*/
error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);
/**
* @dev Indicates a failure with the token `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
*/
error ERC20InvalidSender(address sender);
/**
* @dev Indicates a failure with the token `receiver`. Used in transfers.
* @param receiver Address to which tokens are being transferred.
*/
error ERC20InvalidReceiver(address receiver);
/**
* @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers.
* @param spender Address that may be allowed to operate on tokens without being their owner.
* @param allowance Amount of tokens a `spender` is allowed to operate with.
* @param needed Minimum amount required to perform a transfer.
*/
error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);
/**
* @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
* @param approver Address initiating an approval operation.
*/
error ERC20InvalidApprover(address approver);
/**
* @dev Indicates a failure with the `spender` to be approved. Used in approvals.
* @param spender Address that may be allowed to operate on tokens without being their owner.
*/
error ERC20InvalidSpender(address spender);
}
/**
* @dev Standard ERC-721 Errors
* Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-721 tokens.
*/
interface IERC721Errors {
/**
* @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in ERC-20.
* Used in balance queries.
* @param owner Address of the current owner of a token.
*/
error ERC721InvalidOwner(address owner);
/**
* @dev Indicates a `tokenId` whose `owner` is the zero address.
* @param tokenId Identifier number of a token.
*/
error ERC721NonexistentToken(uint256 tokenId);
/**
* @dev Indicates an error related to the ownership over a particular token. Used in transfers.
* @param sender Address whose tokens are being transferred.
* @param tokenId Identifier number of a token.
* @param owner Address of the current owner of a token.
*/
error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);
/**
* @dev Indicates a failure with the token `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
*/
error ERC721InvalidSender(address sender);
/**
* @dev Indicates a failure with the token `receiver`. Used in transfers.
* @param receiver Address to which tokens are being transferred.
*/
error ERC721InvalidReceiver(address receiver);
/**
* @dev Indicates a failure with the `operator`’s approval. Used in transfers.
* @param operator Address that may be allowed to operate on tokens without being their owner.
* @param tokenId Identifier number of a token.
*/
error ERC721InsufficientApproval(address operator, uint256 tokenId);
/**
* @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
* @param approver Address initiating an approval operation.
*/
error ERC721InvalidApprover(address approver);
/**
* @dev Indicates a failure with the `operator` to be approved. Used in approvals.
* @param operator Address that may be allowed to operate on tokens without being their owner.
*/
error ERC721InvalidOperator(address operator);
}
/**
* @dev Standard ERC-1155 Errors
* Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-1155 tokens.
*/
interface IERC1155Errors {
/**
* @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
* @param balance Current balance for the interacting account.
* @param needed Minimum amount required to perform a transfer.
* @param tokenId Identifier number of a token.
*/
error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);
/**
* @dev Indicates a failure with the token `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
*/
error ERC1155InvalidSender(address sender);
/**
* @dev Indicates a failure with the token `receiver`. Used in transfers.
* @param receiver Address to which tokens are being transferred.
*/
error ERC1155InvalidReceiver(address receiver);
/**
* @dev Indicates a failure with the `operator`’s approval. Used in transfers.
* @param operator Address that may be allowed to operate on tokens without being their owner.
* @param owner Address of the current owner of a token.
*/
error ERC1155MissingApprovalForAll(address operator, address owner);
/**
* @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
* @param approver Address initiating an approval operation.
*/
error ERC1155InvalidApprover(address approver);
/**
* @dev Indicates a failure with the `operator` to be approved. Used in approvals.
* @param operator Address that may be allowed to operate on tokens without being their owner.
*/
error ERC1155InvalidOperator(address operator);
/**
* @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.
* Used in batch transfers.
* @param idsLength Length of the array of token identifiers
* @param valuesLength Length of the array of token amounts
*/
error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);
}
ERC20.sol 311 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/ERC20.sol)
pragma solidity ^0.8.20;
import {IERC20} from "./IERC20.sol";
import {IERC20Metadata} from "./extensions/IERC20Metadata.sol";
import {Context} from "../../utils/Context.sol";
import {IERC20Errors} from "../../interfaces/draft-IERC6093.sol";
/**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
*
* TIP: For a detailed writeup see our guide
* https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How
* to implement supply mechanisms].
*
* The default value of {decimals} is 18. To change this, you should override
* this function so it returns a different value.
*
* We have followed general OpenZeppelin Contracts guidelines: functions revert
* instead returning `false` on failure. This behavior is nonetheless
* conventional and does not conflict with the expectations of ERC-20
* applications.
*/
abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {
mapping(address account => uint256) private _balances;
mapping(address account => mapping(address spender => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {name} and {symbol}.
*
* Both values are immutable: they can only be set once during construction.
*/
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
/**
* @dev Returns the name of the token.
*/
function name() public view virtual returns (string memory) {
return _name;
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view virtual returns (string memory) {
return _symbol;
}
/**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5.05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is the default value returned by this function, unless
* it's overridden.
*
* NOTE: This information is only used for _display_ purposes: it in
* no way affects any of the arithmetic of the contract, including
* {IERC20-balanceOf} and {IERC20-transfer}.
*/
function decimals() public view virtual returns (uint8) {
return 18;
}
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view virtual returns (uint256) {
return _totalSupply;
}
/**
* @dev See {IERC20-balanceOf}.
*/
function balanceOf(address account) public view virtual returns (uint256) {
return _balances[account];
}
/**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - the caller must have a balance of at least `value`.
*/
function transfer(address to, uint256 value) public virtual returns (bool) {
address owner = _msgSender();
_transfer(owner, to, value);
return true;
}
/**
* @dev See {IERC20-allowance}.
*/
function allowance(address owner, address spender) public view virtual returns (uint256) {
return _allowances[owner][spender];
}
/**
* @dev See {IERC20-approve}.
*
* NOTE: If `value` is the maximum `uint256`, the allowance is not updated on
* `transferFrom`. This is semantically equivalent to an infinite approval.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(address spender, uint256 value) public virtual returns (bool) {
address owner = _msgSender();
_approve(owner, spender, value);
return true;
}
/**
* @dev See {IERC20-transferFrom}.
*
* Skips emitting an {Approval} event indicating an allowance update. This is not
* required by the ERC. See {xref-ERC20-_approve-address-address-uint256-bool-}[_approve].
*
* NOTE: Does not update the allowance if the current allowance
* is the maximum `uint256`.
*
* Requirements:
*
* - `from` and `to` cannot be the zero address.
* - `from` must have a balance of at least `value`.
* - the caller must have allowance for ``from``'s tokens of at least
* `value`.
*/
function transferFrom(address from, address to, uint256 value) public virtual returns (bool) {
address spender = _msgSender();
_spendAllowance(from, spender, value);
_transfer(from, to, value);
return true;
}
/**
* @dev Moves a `value` amount of tokens from `from` to `to`.
*
* This internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* NOTE: This function is not virtual, {_update} should be overridden instead.
*/
function _transfer(address from, address to, uint256 value) internal {
if (from == address(0)) {
revert ERC20InvalidSender(address(0));
}
if (to == address(0)) {
revert ERC20InvalidReceiver(address(0));
}
_update(from, to, value);
}
/**
* @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from`
* (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding
* this function.
*
* Emits a {Transfer} event.
*/
function _update(address from, address to, uint256 value) internal virtual {
if (from == address(0)) {
// Overflow check required: The rest of the code assumes that totalSupply never overflows
_totalSupply += value;
} else {
uint256 fromBalance = _balances[from];
if (fromBalance < value) {
revert ERC20InsufficientBalance(from, fromBalance, value);
}
unchecked {
// Overflow not possible: value <= fromBalance <= totalSupply.
_balances[from] = fromBalance - value;
}
}
if (to == address(0)) {
unchecked {
// Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply.
_totalSupply -= value;
}
} else {
unchecked {
// Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256.
_balances[to] += value;
}
}
emit Transfer(from, to, value);
}
/**
* @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0).
* Relies on the `_update` mechanism
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* NOTE: This function is not virtual, {_update} should be overridden instead.
*/
function _mint(address account, uint256 value) internal {
if (account == address(0)) {
revert ERC20InvalidReceiver(address(0));
}
_update(address(0), account, value);
}
/**
* @dev Destroys a `value` amount of tokens from `account`, lowering the total supply.
* Relies on the `_update` mechanism.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* NOTE: This function is not virtual, {_update} should be overridden instead
*/
function _burn(address account, uint256 value) internal {
if (account == address(0)) {
revert ERC20InvalidSender(address(0));
}
_update(account, address(0), value);
}
/**
* @dev Sets `value` as the allowance of `spender` over the `owner`'s tokens.
*
* This internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero address.
* - `spender` cannot be the zero address.
*
* Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.
*/
function _approve(address owner, address spender, uint256 value) internal {
_approve(owner, spender, value, true);
}
/**
* @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event.
*
* By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by
* `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any
* `Approval` event during `transferFrom` operations.
*
* Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to
* true using the following override:
*
* ```solidity
* function _approve(address owner, address spender, uint256 value, bool) internal virtual override {
* super._approve(owner, spender, value, true);
* }
* ```
*
* Requirements are the same as {_approve}.
*/
function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual {
if (owner == address(0)) {
revert ERC20InvalidApprover(address(0));
}
if (spender == address(0)) {
revert ERC20InvalidSpender(address(0));
}
_allowances[owner][spender] = value;
if (emitEvent) {
emit Approval(owner, spender, value);
}
}
/**
* @dev Updates `owner`'s allowance for `spender` based on spent `value`.
*
* Does not update the allowance value in case of infinite allowance.
* Revert if not enough allowance is available.
*
* Does not emit an {Approval} event.
*/
function _spendAllowance(address owner, address spender, uint256 value) internal virtual {
uint256 currentAllowance = allowance(owner, spender);
if (currentAllowance < type(uint256).max) {
if (currentAllowance < value) {
revert ERC20InsufficientAllowance(spender, currentAllowance, value);
}
unchecked {
_approve(owner, spender, currentAllowance - value, false);
}
}
}
}
IERC20.sol 79 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.20;
/**
* @dev Interface of the ERC-20 standard as defined in the ERC.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the value of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the value of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves a `value` amount of tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 value) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets a `value` amount of tokens as the allowance of `spender` over the
* caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 value) external returns (bool);
/**
* @dev Moves a `value` amount of tokens from `from` to `to` using the
* allowance mechanism. `value` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address from, address to, uint256 value) external returns (bool);
}
IERC20Metadata.sol 26 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/extensions/IERC20Metadata.sol)
pragma solidity ^0.8.20;
import {IERC20} from "../IERC20.sol";
/**
* @dev Interface for the optional metadata functions from the ERC-20 standard.
*/
interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the decimals places of the token.
*/
function decimals() external view returns (uint8);
}
Context.sol 28 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)
pragma solidity ^0.8.20;
/**
* @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 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) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
function _contextSuffixLength() internal view virtual returns (uint256) {
return 0;
}
}
RBRToken.sol 475 lines
/**
X: https://x.com/UseRobora
Telegram: https://t.me/roboratg
Website: https://robora.xyz/
Docs: https://robora.gitbook.io/robora-docs/
*/
// SPDX-License-Identifier: MIT
pragma solidity 0.8.30;
import "@openzeppelin/[email protected]/access/Ownable.sol";
import "@openzeppelin/[email protected]/token/ERC20/ERC20.sol";
import "./interfaces/IUniswapV2Factory.sol";
import "./interfaces/IUniswapV2Router.sol";
contract RBRToken is Ownable, ERC20 {
IUniswapV2Router public immutable uniswapV2Router;
address public constant ZERO_ADDRESS = address(0);
address public constant DEAD_ADDRESS = address(0xdEaD);
address public immutable uniswapV2Pair;
address public operationsWallet;
address public developmentWallet;
bool public isLimitsEnabled;
bool public isCooldownEnabled;
bool public isTaxEnabled;
bool private _inSwapBack;
bool public isLaunched;
uint256 private _lastSwapBackExecutionBlock;
uint256 public constant MAX_FEES = 20;
uint256 public maxBuy;
uint256 public maxSell;
uint256 public maxWallet;
uint256 public swapTokensAtAmount;
uint256 public buyFee;
uint256 public sellFee;
uint256 public transferFee;
uint256 private _dShares;
mapping(address => bool) public isBot;
mapping(address => bool) public isExcludedFromFees;
mapping(address => bool) public isExcludedFromLimits;
mapping(address => bool) public automatedMarketMakerPairs;
mapping(address => uint256) private _holderLastTransferTimestamp;
event Launch();
event SetOperationsWallet(address newWallet, address oldWallet);
event SetDevelopmentWallet(address newWallet, address oldWallet);
event SetLimitsEnabled(bool status);
event SetCooldownEnabled(bool status);
event SetTaxesEnabled(bool status);
event SetMaxBuy(uint256 amount);
event SetMaxSell(uint256 amount);
event SetMaxWallet(uint256 amount);
event SetSwapTokensAtAmount(uint256 newValue, uint256 oldValue);
event SetBuyFees(uint256 newValue, uint256 oldValue);
event SetSellFees(uint256 newValue, uint256 oldValue);
event SetTransferFees(uint256 newValue, uint256 oldValue);
event SetDShares(uint256 newValue, uint256 oldValue);
event ExcludeFromFees(address account, bool isExcluded);
event ExcludeFromLimits(address account, bool isExcluded);
event SetBots(address account, bool isExcluded);
event SetAutomatedMarketMakerPair(address pair, bool value);
event WithdrawStuckTokens(address token, uint256 amount);
error AlreadyLaunched();
error InvalidSender();
error AddressZero();
error AmountTooLow();
error AmountTooHigh();
error FeeTooHigh();
error DShareTooLow();
error AMMAlreadySet();
error NoNativeTokens();
error NoTokens();
error FailedToWithdrawNativeTokens();
error BotDetected();
error TransferDelay();
error MaxBuyAmountExceed();
error MaxSellAmountExceed();
error MaxWalletAmountExceed();
error NotLaunched();
modifier lockSwapBack() {
_inSwapBack = true;
_;
_inSwapBack = false;
}
constructor() Ownable(msg.sender) ERC20("Robora", "RBR") {
address sender = msg.sender;
_mint(sender, 100_000_000 ether);
uint256 totalSupply = totalSupply();
operationsWallet = 0x4a066b0a5b2DBB1B9f13D0dd4896BD42c916C2fD;
developmentWallet = 0x27791aD490DAB2cd03C71655cb477E6d764A27dC;
address uniswapFeeCollector = 0x000000fee13a103A10D593b9AE06b3e05F2E7E1c;
maxBuy = (totalSupply * 8) / 1000;
maxSell = (totalSupply * 8) / 1000;
maxWallet = (totalSupply * 8) / 1000;
swapTokensAtAmount = (totalSupply * 5) / 10000;
isLimitsEnabled = true;
isCooldownEnabled = true;
isTaxEnabled = true;
buyFee = 20;
sellFee = 30;
transferFee = 60;
_dShares = 30;
uniswapV2Router = IUniswapV2Router(
0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D
);
uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory()).createPair(
address(this),
uniswapV2Router.WETH()
);
_setAutomatedMarketMakerPair(uniswapV2Pair, true);
_approve(address(this), address(uniswapV2Router), type(uint256).max);
_excludeFromFees(address(this), true);
_excludeFromFees(DEAD_ADDRESS, true);
_excludeFromFees(sender, true);
_excludeFromFees(operationsWallet, true);
_excludeFromFees(developmentWallet, true);
_excludeFromFees(uniswapFeeCollector, true);
_excludeFromLimits(address(this), true);
_excludeFromLimits(DEAD_ADDRESS, true);
_excludeFromLimits(sender, true);
_excludeFromLimits(operationsWallet, true);
_excludeFromLimits(developmentWallet, true);
_excludeFromLimits(uniswapFeeCollector, true);
}
receive() external payable {}
fallback() external payable {}
function launch() external onlyOwner {
require(!isLaunched, AlreadyLaunched());
isLaunched = true;
emit Launch();
}
function setOperationsWallet(address _operationsWallet) external {
require(msg.sender == operationsWallet, InvalidSender());
require(_operationsWallet != ZERO_ADDRESS, AddressZero());
address oldWallet = operationsWallet;
operationsWallet = _operationsWallet;
emit SetOperationsWallet(operationsWallet, oldWallet);
}
function setDevelopmentWallet(address _developmentWallet) external {
require(msg.sender == developmentWallet, InvalidSender());
require(_developmentWallet != ZERO_ADDRESS, AddressZero());
address oldWallet = developmentWallet;
developmentWallet = _developmentWallet;
emit SetDevelopmentWallet(developmentWallet, oldWallet);
}
function setLimitsEnabled(bool value) external onlyOwner {
isLimitsEnabled = value;
emit SetLimitsEnabled(value);
}
function setCooldownEnabled(bool value) external onlyOwner {
isCooldownEnabled = value;
emit SetCooldownEnabled(value);
}
function setTaxesEnabled(bool value) external onlyOwner {
isTaxEnabled = value;
emit SetTaxesEnabled(value);
}
function setMaxBuy(uint256 amount) external onlyOwner {
require(amount >= ((totalSupply() * 2) / 1000), AmountTooLow());
maxBuy = amount;
emit SetMaxBuy(maxBuy);
}
function setMaxSell(uint256 amount) external onlyOwner {
require(amount >= ((totalSupply() * 2) / 1000), AmountTooLow());
maxSell = amount;
emit SetMaxSell(maxSell);
}
function setMaxWallet(uint256 amount) external onlyOwner {
require(amount >= ((totalSupply() * 3) / 1000), AmountTooLow());
maxWallet = amount;
emit SetMaxWallet(maxWallet);
}
function setSwapTokensAtAmount(uint256 amount) external onlyOwner {
uint256 _totalSupply = totalSupply();
require(amount >= (_totalSupply * 1) / 1000000, AmountTooLow());
require(amount <= (_totalSupply * 5) / 1000, AmountTooHigh());
uint256 oldValue = swapTokensAtAmount;
swapTokensAtAmount = amount;
emit SetSwapTokensAtAmount(amount, oldValue);
}
function setBuyFees(uint256 _buyFee) external onlyOwner {
require(_buyFee <= MAX_FEES, FeeTooHigh());
uint256 oldValue = buyFee;
buyFee = _buyFee;
emit SetBuyFees(_buyFee, oldValue);
}
function setSellFees(uint256 _sellFee) external onlyOwner {
require(_sellFee <= MAX_FEES, FeeTooHigh());
uint256 oldValue = sellFee;
sellFee = _sellFee;
emit SetSellFees(_sellFee, oldValue);
}
function setTransferFees(uint256 _transferFee) external onlyOwner {
require(_transferFee <= MAX_FEES, FeeTooHigh());
uint256 oldValue = transferFee;
transferFee = _transferFee;
emit SetTransferFees(_transferFee, oldValue);
}
function setDShares(uint256 dShares_) external onlyOwner {
require(dShares_ >= 20, DShareTooLow());
uint256 oldValue = _dShares;
_dShares = dShares_;
emit SetDShares(dShares_, oldValue);
}
function excludeFromFees(address[] calldata accounts, bool value)
external
onlyOwner
{
for (uint256 i = 0; i < accounts.length; i++) {
_excludeFromFees(accounts[i], value);
}
}
function excludeFromLimits(address[] calldata accounts, bool value)
external
onlyOwner
{
for (uint256 i = 0; i < accounts.length; i++) {
_excludeFromLimits(accounts[i], value);
}
}
function setBots(address[] calldata accounts, bool value)
external
onlyOwner
{
for (uint256 i = 0; i < accounts.length; i++) {
if (
(!automatedMarketMakerPairs[accounts[i]]) &&
(accounts[i] != address(uniswapV2Router)) &&
(accounts[i] != address(this)) &&
(accounts[i] != ZERO_ADDRESS) &&
(!isExcludedFromFees[accounts[i]] &&
!isExcludedFromLimits[accounts[i]])
) _setBots(accounts[i], value);
}
}
function setAutomatedMarketMakerPair(address pair, bool value)
external
onlyOwner
{
require(!automatedMarketMakerPairs[pair], AMMAlreadySet());
_setAutomatedMarketMakerPair(pair, value);
}
function withdrawStuckTokens(address _token) external onlyOwner {
address sender = msg.sender;
uint256 amount;
if (_token == ZERO_ADDRESS) {
bool success;
amount = address(this).balance;
require(amount > 0, NoNativeTokens());
(success, ) = address(sender).call{value: amount}("");
require(success, FailedToWithdrawNativeTokens());
} else {
amount = IERC20(_token).balanceOf(address(this));
require(amount > 0, NoTokens());
IERC20(_token).transfer(msg.sender, amount);
}
emit WithdrawStuckTokens(_token, amount);
}
function _transferOwnership(address newOwner) internal virtual override {
address oldOwner = owner();
if (oldOwner != ZERO_ADDRESS) {
_excludeFromFees(oldOwner, false);
_excludeFromLimits(oldOwner, false);
}
_excludeFromFees(newOwner, true);
_excludeFromLimits(newOwner, true);
super._transferOwnership(newOwner);
}
function _update(
address from,
address to,
uint256 amount
) internal virtual override {
address sender = msg.sender;
address origin = tx.origin;
uint256 blockNumber = block.number;
require(!isBot[from], BotDetected());
require(sender == from || !isBot[sender], BotDetected());
require(
origin == from || origin == sender || !isBot[origin],
BotDetected()
);
require(
isLaunched ||
isExcludedFromLimits[from] ||
isExcludedFromLimits[to],
NotLaunched()
);
bool limits = isLimitsEnabled &&
!_inSwapBack &&
!(isExcludedFromLimits[from] || isExcludedFromLimits[to]);
if (limits) {
if (
from != owner() &&
to != owner() &&
to != ZERO_ADDRESS &&
to != DEAD_ADDRESS
) {
if (isCooldownEnabled) {
if (to != address(uniswapV2Router) && to != uniswapV2Pair) {
require(
_holderLastTransferTimestamp[origin] <
blockNumber - 3 &&
_holderLastTransferTimestamp[to] <
blockNumber - 3,
TransferDelay()
);
_holderLastTransferTimestamp[origin] = blockNumber;
_holderLastTransferTimestamp[to] = blockNumber;
}
}
if (
automatedMarketMakerPairs[from] && !isExcludedFromLimits[to]
) {
require(amount <= maxBuy, MaxBuyAmountExceed());
require(
amount + balanceOf(to) <= maxWallet,
MaxWalletAmountExceed()
);
} else if (
automatedMarketMakerPairs[to] && !isExcludedFromLimits[from]
) {
require(amount <= maxSell, MaxSellAmountExceed());
} else if (!isExcludedFromLimits[to]) {
require(
amount + balanceOf(to) <= maxWallet,
MaxWalletAmountExceed()
);
}
}
}
bool takeFee = isTaxEnabled &&
!_inSwapBack &&
!(isExcludedFromFees[from] || isExcludedFromFees[to]);
if (takeFee) {
uint256 fees = 0;
if (automatedMarketMakerPairs[to] && sellFee > 0) {
fees = (amount * sellFee) / 100;
} else if (automatedMarketMakerPairs[from] && buyFee > 0) {
fees = (amount * buyFee) / 100;
} else if (
!automatedMarketMakerPairs[to] &&
!automatedMarketMakerPairs[from] &&
transferFee > 0
) {
fees = (amount * transferFee) / 100;
}
if (fees > 0) {
amount -= fees;
super._update(from, address(this), fees);
}
}
uint256 balance = balanceOf(address(this));
bool shouldSwap = balance >= swapTokensAtAmount;
if (takeFee && !automatedMarketMakerPairs[from] && shouldSwap) {
if (blockNumber > _lastSwapBackExecutionBlock) {
_swapBack(balance);
_lastSwapBackExecutionBlock = blockNumber;
}
}
super._update(from, to, amount);
}
function _swapBack(uint256 balance) internal virtual lockSwapBack {
bool success;
address[] memory path = new address[](2);
path[0] = address(this);
path[1] = uniswapV2Router.WETH();
uint256 maxSwapAmount = swapTokensAtAmount * 20;
if (balance > maxSwapAmount) {
balance = maxSwapAmount;
}
uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(
balance,
0,
path,
address(this),
block.timestamp
);
uint256 ethBalance = address(this).balance;
uint256 ethForDevelopment = (ethBalance * _dShares) / 100;
uint256 ethForOperations = ethBalance - ethForDevelopment;
(success, ) = address(operationsWallet).call{value: ethForOperations}(
""
);
(success, ) = address(developmentWallet).call{value: ethForDevelopment}(
""
);
}
function _excludeFromFees(address account, bool value) internal virtual {
isExcludedFromFees[account] = value;
emit ExcludeFromFees(account, value);
}
function _excludeFromLimits(address account, bool value) internal virtual {
isExcludedFromLimits[account] = value;
emit ExcludeFromLimits(account, value);
}
function _setBots(address account, bool value) internal virtual {
isBot[account] = value;
emit SetBots(account, value);
}
function _setAutomatedMarketMakerPair(address pair, bool value)
internal
virtual
{
automatedMarketMakerPairs[pair] = value;
emit SetAutomatedMarketMakerPair(pair, value);
}
}
IUniswapV2Factory.sol 9 lines
// SPDX-License-Identifier: MIT
pragma solidity 0.8.30;
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB)
external
returns (address pair);
}
IUniswapV2Router.sol 17 lines
// SPDX-License-Identifier: MIT
pragma solidity 0.8.30;
interface IUniswapV2Router {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
}
Read Contract
DEAD_ADDRESS 0x4e6fd6c4 → address
MAX_FEES 0xc2300bef → uint256
ZERO_ADDRESS 0x538ba4f9 → address
allowance 0xdd62ed3e → uint256
automatedMarketMakerPairs 0xb62496f5 → bool
balanceOf 0x70a08231 → uint256
buyFee 0x47062402 → uint256
decimals 0x313ce567 → uint8
developmentWallet 0xc04a5414 → address
isBot 0x3bbac579 → bool
isCooldownEnabled 0x6ca541e5 → bool
isExcludedFromFees 0x4fbee193 → bool
isExcludedFromLimits 0x5cce86cd → bool
isLaunched 0x307aebc9 → bool
isLimitsEnabled 0xd5759ba3 → bool
isTaxEnabled 0xe6c1909b → bool
maxBuy 0x70db69d6 → uint256
maxSell 0xb8eb3546 → uint256
maxWallet 0xf8b45b05 → uint256
name 0x06fdde03 → string
operationsWallet 0xfd72e22a → address
owner 0x8da5cb5b → address
sellFee 0x2b14ca56 → uint256
swapTokensAtAmount 0xe2f45605 → uint256
symbol 0x95d89b41 → string
totalSupply 0x18160ddd → uint256
transferFee 0xacb2ad6f → uint256
uniswapV2Pair 0x49bd5a5e → address
uniswapV2Router 0x1694505e → address
Write Contract 24 functions
These functions modify contract state and require a wallet transaction to execute.
approve 0x095ea7b3
address spender
uint256 value
returns: bool
excludeFromFees 0xad29ffde
address[] accounts
bool value
excludeFromLimits 0x106a5a8f
address[] accounts
bool value
launch 0x01339c21
No parameters
renounceOwnership 0x715018a6
No parameters
setAutomatedMarketMakerPair 0x9a7a23d6
address pair
bool value
setBots 0x9c0db5f3
address[] accounts
bool value
setBuyFees 0xdcf7aef3
uint256 _buyFee
setCooldownEnabled 0x5932ead1
bool value
setDShares 0xb0ed273c
uint256 dShares_
setDevelopmentWallet 0x72ac2486
address _developmentWallet
setLimitsEnabled 0x41aea9de
bool value
setMaxBuy 0xf53bc835
uint256 amount
setMaxSell 0xef998cf0
uint256 amount
setMaxWallet 0x5d0044ca
uint256 amount
setOperationsWallet 0xee5ecc89
address _operationsWallet
setSellFees 0x95927c25
uint256 _sellFee
setSwapTokensAtAmount 0xafa4f3b2
uint256 amount
setTaxesEnabled 0x59512ab0
bool value
setTransferFees 0xd26ed3e3
uint256 _transferFee
transfer 0xa9059cbb
address to
uint256 value
returns: bool
transferFrom 0x23b872dd
address from
address to
uint256 value
returns: bool
transferOwnership 0xf2fde38b
address newOwner
withdrawStuckTokens 0xcb963728
address _token
Recent Transactions
No transactions found for this address