Cryo Explorer Ethereum Mainnet

Address Contract Partially Verified

Address 0x2270F16112E3CC36228a98336aa0A35BD6ce1cAc
Balance 0 ETH
Nonce 1
Code Size 18242 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

18242 bytes
0x60806040526004361061036d575f3560e01c806370a08231116101c5578063b98a1cd4116100f6578063dd62ed3e11610094578063e708ce551161006e578063e708ce5514610cc8578063f2fde38b14610cf0578063f40acc3d14610d18578063f9c683c014610d4257610374565b8063dd62ed3e14610c28578063e01bb68814610c64578063e192d48514610c8c57610374565b8063cc1776d3116100d0578063cc1776d314610b6c578063cc274b2914610b9a578063cf059b9f14610bc2578063d4d7b19a14610bec57610374565b8063b98a1cd414610ada578063bd65870214610b16578063c15d854f14610b3e57610374565b806393e6b04a116101635780639dee70dd1161013d5780639dee70dd14610a0a578063a82ed9ec14610a38578063a9059cbb14610a62578063b1bd377414610a9e57610374565b806393e6b04a1461097a57806394da5dbf146109a457806395d89b41146109e057610374565b80637437681e1161019f5780637437681e146108d457806376e88ddb146108fe5780638a8c523c146109265780638da5cb5b1461095057610374565b806370a0823114610858578063715018a61461089457806373ad468a146108aa57610374565b8063313ce5671161029f578063573d8cf91161023d57806364c653c11161021757806364c653c1146107c6578063658d4b7f146107f057806366eb3785146108185780636cf3fdb91461082e57610374565b8063573d8cf9146107485780635e3568b814610772578063615494be1461079c57610374565b80634f7041a5116102795780634f7041a51461068c57806351fdefc9146106ba578063526b13fd146106e4578063571ac8b01461070c57610374565b8063313ce567146105fe5780633307d372146106285780633f4218e01461065057610374565b806318160ddd1161030c578063295a5212116102e6578063295a52121461054657806329691448146105705780632a11ced01461059a5780632c957aa0146105d657610374565b806318160ddd146104b2578063204a6836146104dc57806323b872dd1461050a57610374565b806306fdde031161034857806306fdde03146103fa578063095ea7b314610424578063142a271114610460578063166319eb1461048a57610374565b8062adef68146103785780630445b667146103a6578063057a2c0e146103d057610374565b3661037457005b5f80fd5b348015610383575f80fd5b5061038c610d6a565b60405161039d959493929190613984565b60405180910390f35b3480156103b1575f80fd5b506103ba610dc9565b6040516103c791906139ed565b60405180910390f35b3480156103db575f80fd5b506103e4610dcf565b6040516103f191906139ed565b60405180910390f35b348015610405575f80fd5b5061040e610dd5565b60405161041b9190613a90565b60405180910390f35b34801561042f575f80fd5b5061044a60048036038101906104459190613b3c565b610e65565b6040516104579190613b94565b60405180910390f35b34801561046b575f80fd5b50610474610f52565b60405161048191906139ed565b60405180910390f35b348015610495575f80fd5b506104b060048036038101906104ab9190613bad565b610f58565b005b3480156104bd575f80fd5b506104c6610fa2565b6040516104d391906139ed565b60405180910390f35b3480156104e7575f80fd5b506104f0610fab565b604051610501959493929190613984565b60405180910390f35b348015610515575f80fd5b50610530600480360381019061052b9190613c5e565b61100a565b60405161053d9190613b94565b60405180910390f35b348015610551575f80fd5b5061055a61127a565b6040516105679190613cae565b60405180910390f35b34801561057b575f80fd5b5061058461128c565b6040516105919190613b94565b60405180910390f35b3480156105a5575f80fd5b506105c060048036038101906105bb9190613cc7565b61129f565b6040516105cd9190613d01565b60405180910390f35b3480156105e1575f80fd5b506105fc60048036038101906105f79190613d44565b6112da565b005b348015610609575f80fd5b5061061261133a565b60405161061f9190613cae565b60405180910390f35b348015610633575f80fd5b5061064e60048036038101906106499190613d44565b61134f565b005b34801561065b575f80fd5b5061067660048036038101906106719190613d82565b6113af565b6040516106839190613b94565b60405180910390f35b348015610697575f80fd5b506106a06113cc565b6040516106b1959493929190613984565b60405180910390f35b3480156106c5575f80fd5b506106ce61142b565b6040516106db91906139ed565b60405180910390f35b3480156106ef575f80fd5b5061070a60048036038101906107059190613dad565b611431565b005b348015610717575f80fd5b50610732600480360381019061072d9190613d82565b61148c565b60405161073f9190613b94565b60405180910390f35b348015610753575f80fd5b5061075c6114a0565b60405161076991906139ed565b60405180910390f35b34801561077d575f80fd5b506107866114a6565b60405161079391906139ed565b60405180910390f35b3480156107a7575f80fd5b506107b06114ac565b6040516107bd91906139ed565b60405180910390f35b3480156107d1575f80fd5b506107da6114b2565b6040516107e791906139ed565b60405180910390f35b3480156107fb575f80fd5b5061081660048036038101906108119190613d44565b6114b8565b005b348015610823575f80fd5b5061082c611518565b005b348015610839575f80fd5b50610842611538565b60405161084f91906139ed565b60405180910390f35b348015610863575f80fd5b5061087e60048036038101906108799190613d82565b61153e565b60405161088b91906139ed565b60405180910390f35b34801561089f575f80fd5b506108a8611616565b005b3480156108b5575f80fd5b506108be611629565b6040516108cb91906139ed565b60405180910390f35b3480156108df575f80fd5b506108e861162f565b6040516108f591906139ed565b60405180910390f35b348015610909575f80fd5b50610924600480360381019061091f9190613dad565b611635565b005b348015610931575f80fd5b5061093a61165a565b6040516109479190613b94565b60405180910390f35b34801561095b575f80fd5b5061096461166c565b6040516109719190613d01565b60405180910390f35b348015610985575f80fd5b5061098e611693565b60405161099b9190613b94565b60405180910390f35b3480156109af575f80fd5b506109ca60048036038101906109c59190613d82565b6116a6565b6040516109d79190613b94565b60405180910390f35b3480156109eb575f80fd5b506109f46116c3565b604051610a019190613a90565b60405180910390f35b348015610a15575f80fd5b50610a1e611753565b604051610a2f959493929190613984565b60405180910390f35b348015610a43575f80fd5b50610a4c6117b2565b604051610a599190613e33565b60405180910390f35b348015610a6d575f80fd5b50610a886004803603810190610a839190613b3c565b6117d7565b604051610a959190613b94565b60405180910390f35b348015610aa9575f80fd5b50610ac46004803603810190610abf9190613d82565b6117eb565b604051610ad19190613b94565b60405180910390f35b348015610ae5575f80fd5b50610b006004803603810190610afb9190613cc7565b611808565b604051610b0d9190613d01565b60405180910390f35b348015610b21575f80fd5b50610b3c6004803603810190610b379190613e76565b611843565b005b348015610b49575f80fd5b50610b52611857565b604051610b63959493929190613984565b60405180910390f35b348015610b77575f80fd5b50610b806118b6565b604051610b91959493929190613984565b60405180910390f35b348015610ba5575f80fd5b50610bc06004803603810190610bbb9190613cc7565b611915565b005b348015610bcd575f80fd5b50610bd6611927565b604051610be391906139ed565b60405180910390f35b348015610bf7575f80fd5b50610c126004803603810190610c0d9190613d82565b61192d565b604051610c1f9190613b94565b60405180910390f35b348015610c33575f80fd5b50610c4e6004803603810190610c499190613ea1565b61194a565b604051610c5b91906139ed565b60405180910390f35b348015610c6f575f80fd5b50610c8a6004803603810190610c859190613d82565b6119cc565b005b348015610c97575f80fd5b50610cb26004803603810190610cad9190613edf565b611a17565b604051610cbf9190613b94565b60405180910390f35b348015610cd3575f80fd5b50610cee6004803603810190610ce99190613dad565b611a41565b005b348015610cfb575f80fd5b50610d166004803603810190610d119190613d82565b611a66565b005b348015610d23575f80fd5b50610d2c611ae8565b604051610d399190613d01565b60405180910390f35b348015610d4d575f80fd5b50610d686004803603810190610d639190613f7e565b611b0d565b005b601d805f015f9054906101000a900460ff1690805f0160019054906101000a900460ff1690805f0160029054906101000a900460ff1690805f0160039054906101000a900460ff1690805f0160049054906101000a900460ff16905085565b600e5481565b601b5481565b606060058054610de490613ff6565b80601f0160208091040260200160405190810160405280929190818152602001828054610e1090613ff6565b8015610e5b5780601f10610e3257610100808354040283529160200191610e5b565b820191905f5260205f20905b815481529060010190602001808311610e3e57829003601f168201915b5050505050905090565b5f81600a5f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92584604051610f4091906139ed565b60405180910390a36001905092915050565b602f5481565b610f60611ca9565b87600f81905550866010819055508560118190555084601281905550836013819055508260148190555081601581905550806016819055505050505050505050565b5f600854905090565b601f805f015f9054906101000a900460ff1690805f0160019054906101000a900460ff1690805f0160029054906101000a900460ff1690805f0160039054906101000a900460ff1690805f0160049054906101000a900460ff16905085565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600a5f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054146112665781600a5f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20541015611165576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161115c90614070565b60405180910390fd5b81600a5f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20546111e991906140bb565b600a5f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055505b611271848484611d27565b90509392505050565b601a5f9054906101000a900460ff1681565b600b60019054906101000a900460ff1681565b602d81815481106112ae575f80fd5b905f5260205f20015f915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6112e2611ca9565b80602b5f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055505050565b5f60075f9054906101000a900460ff16905090565b611357611ca9565b80602a5f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055505050565b6029602052805f5260405f205f915054906101000a900460ff1681565b6025805f015f9054906101000a900460ff1690805f0160019054906101000a900460ff1690805f0160029054906101000a900460ff1690805f0160039054906101000a900460ff1690805f0160049054906101000a900460ff16905085565b60175481565b611439611ca9565b80600b5f6101000a81548160ff0219169083151502179055507fa2974e0f27442edd60c8b32f67b3197c4da62252841bfed6068f393c853de223816040516114819190613b94565b60405180910390a150565b5f61149982600854610e65565b9050919050565b601c5481565b60225481565b602e5481565b60185481565b6114c0611ca9565b8060295f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055505050565b611520611ca9565b611528611fed565b156115365761153561208a565b5b565b60195481565b5f8060095f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050602a5f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff161580156115d857505f602e54115b80156115e957506002602d80549050115b1561160d57602d80549050816115ff919061411b565b8161160a919061414b565b90505b80915050919050565b61161e611ca9565b6116275f61230e565b565b600c5481565b600d5481565b61163d611ca9565b80600b60016101000a81548160ff02191690831515021790555050565b600b5f9054906101000a900460ff1681565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b601a60019054906101000a900460ff1681565b602b602052805f5260405f205f915054906101000a900460ff1681565b6060600680546116d290613ff6565b80601f01602080910402602001604051908101604052809291908181526020018280546116fe90613ff6565b80156117495780601f1061172057610100808354040283529160200191611749565b820191905f5260205f20905b81548152906001019060200180831161172c57829003601f168201915b5050505050905090565b601e805f015f9054906101000a900460ff1690805f0160019054906101000a900460ff1690805f0160029054906101000a900460ff1690805f0160039054906101000a900460ff1690805f0160049054906101000a900460ff16905085565b60275f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f6117e3338484611d27565b905092915050565b602a602052805f5260405f205f915054906101000a900460ff1681565b60248181548110611817575f80fd5b905f5260205f20015f915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61184b611ca9565b611854816123cf565b50565b6020805f015f9054906101000a900460ff1690805f0160019054906101000a900460ff1690805f0160029054906101000a900460ff1690805f0160039054906101000a900460ff1690805f0160049054906101000a900460ff16905085565b6026805f015f9054906101000a900460ff1690805f0160019054906101000a900460ff1690805f0160029054906101000a900460ff1690805f0160039054906101000a900460ff1690805f0160049054906101000a900460ff16905085565b61191d611ca9565b80600e8190555050565b60215481565b602c602052805f5260405f205f915054906101000a900460ff1681565b5f600a5f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905092915050565b6119d4611ca9565b8060025f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6023602052815f5260405f20602052805f5260405f205f915091509054906101000a900460ff1681565b611a49611ca9565b80601a60016101000a81548160ff02191690831515021790555050565b611a6e611ca9565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611adc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ad3906141ee565b60405180910390fd5b611ae58161230e565b50565b60285f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b611b15611ca9565b5f602f5411611b59576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b5090614256565b60405180910390fd5b5f82829050602f54611b6b919061411b565b90505f602f819055505f5b838390508160ff161015611ca3578160095f86868560ff16818110611b9e57611b9d614274565b5b9050602002016020810190611bb39190613d82565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f828254611bfa919061414b565b9250508190555083838260ff16818110611c1757611c16614274565b5b9050602002016020810190611c2c9190613d82565b73ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051611c8891906139ed565b60405180910390a38080611c9b906142a1565b915050611b76565b50505050565b611cb161262b565b73ffffffffffffffffffffffffffffffffffffffff16611ccf61166c565b73ffffffffffffffffffffffffffffffffffffffff1614611d25576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d1c90614313565b60405180910390fd5b565b5f611d328484612632565b611d3c8383612733565b60305f9054906101000a900460ff1615611d6257611d5b848484612828565b9050611fe6565b611d6a611fed565b15611d7857611d7761208a565b5b602a5f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16611dd057611dcf84612a04565b5b611e57826040518060400160405280601481526020017f496e73756666696369656e742042616c616e636500000000000000000000000081525060095f8873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054612a949092919063ffffffff16565b60095f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550611ea184612ae8565b5f611eac8585612e30565b611eb65782611ec1565b611ec08584612f86565b5b9050611f138160095f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054612fc490919063ffffffff16565b60095f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550611f5d84612ae8565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85604051611fba91906139ed565b60405180910390a3601a60019054906101000a900460ff1615611fe057611fdf612fd9565b5b60019150505b9392505050565b5f60285f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141580156120575750600b60019054906101000a900460ff165b801561206f575060305f9054906101000a900460ff16155b80156120855750600e546120823061153e565b10155b905090565b600160305f6101000a81548160ff0219169083151502179055505f6120ae3061153e565b90506120db60275f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682610e65565b505f600267ffffffffffffffff8111156120f8576120f7614331565b5b6040519080825280602002602001820160405280156121265781602001602082028036833780820191505090505b50905030815f8151811061213d5761213c614274565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060275f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa1580156121e1573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906122059190614372565b8160018151811061221957612218614274565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060275f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac947835f8430426040518663ffffffff1660e01b81526004016122b595949392919061448d565b5f604051808303815f87803b1580156122cc575f80fd5b505af11580156122de573d5f803e3d5ffd5b505050505f4790506122f0818461304b565b5050505f60305f6101000a81548160ff021916908315150217905550565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6002601a5f9054906101000a900460ff1660ff161480156123f4575060028160ff1614155b15612402576124016132ac565b5b60028160ff16036125d057601f60255f82015f9054906101000a900460ff16815f015f6101000a81548160ff021916908360ff1602179055505f820160019054906101000a900460ff16815f0160016101000a81548160ff021916908360ff1602179055505f820160029054906101000a900460ff16815f0160026101000a81548160ff021916908360ff1602179055505f820160039054906101000a900460ff16815f0160036101000a81548160ff021916908360ff1602179055505f820160049054906101000a900460ff16815f0160046101000a81548160ff021916908360ff160217905550905050602060265f82015f9054906101000a900460ff16815f015f6101000a81548160ff021916908360ff1602179055505f820160019054906101000a900460ff16815f0160016101000a81548160ff021916908360ff1602179055505f820160029054906101000a900460ff16815f0160026101000a81548160ff021916908360ff1602179055505f820160039054906101000a900460ff16815f0160036101000a81548160ff021916908360ff1602179055505f820160049054906101000a900460ff16815f0160046101000a81548160ff021916908360ff1602179055509050505b80601a5f6101000a81548160ff021916908360ff16021790555042601b819055507f3767691dd0ddd9d4be17e4e8e94e164993de91ae51d4fad9ad16b3ff4b7b1e86816040516126209190613cae565b60405180910390a150565b5f33905090565b600b5f9054906101000a900460ff1661272f5760285f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141580156126ef575060285f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b61272e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127259061452f565b60405180910390fd5b5b5050565b602b5f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff1661282457600d548111156127c6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127bd906145bd565b60405180910390fd5b5f816127d18461153e565b6127db919061414b565b9050600c54811115612822576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161281990614625565b60405180910390fd5b505b5050565b5f6128b0826040518060400160405280601481526020017f496e73756666696369656e742042616c616e636500000000000000000000000081525060095f8873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054612a949092919063ffffffff16565b60095f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055506128fa84612ae8565b61294a8260095f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054612fc490919063ffffffff16565b60095f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f208190555061299483612ae8565b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516129f191906139ed565b60405180910390a3600190509392505050565b5f602e541115612a91575f602d80549050602e54612a22919061411b565b905080602e5f828254612a3591906140bb565b925050819055508060095f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f828254612a88919061414b565b92505081905550505b50565b5f838311158290612adb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612ad29190613a90565b60405180910390fd5b5082840390509392505050565b5f612af28261153e565b90505f811115612c0557602c5f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16612c00576001602c5f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff021916908315150217905550602d82908060018154018082558091505060019003905f5260205f20015f9091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b612e2c565b602c5f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff1615612e2b575f602c5f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055505f5b6001602d80549050612cbc91906140bb565b811015612de5578273ffffffffffffffffffffffffffffffffffffffff16602d8281548110612cee57612ced614274565b5b905f5260205f20015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603612dd857602d6001602d80549050612d4591906140bb565b81548110612d5657612d55614274565b5b905f5260205f20015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16602d8281548110612d9257612d91614274565b5b905f5260205f20015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b8080600101915050612caa565b50602d805480612df857612df7614643565b5b600190038181905f5260205f20015f6101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905590555b5b5050565b5f60285f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16148015612ed4575060295f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16155b80612f7e575060285f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16148015612f7d575060295f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16155b5b905092915050565b5f80601a5f9054906101000a900460ff1660ff161115612fb157612faa83836133a9565b9050612fbe565b612fbb8383613710565b90505b92915050565b5f8183612fd1919061414b565b905092915050565b5f601a5f9054906101000a900460ff1690505f8160ff1603612ffb5750613049565b5f601b544261300a91906140bb565b9050601c5481101561301d575050613049565b60018261302a9190614670565b915060028260ff16111561303d57600191505b613046826123cf565b50505b565b5f60195460185460175461305f919061414b565b613069919061414b565b90505f816017548561307b91906146a4565b613085919061411b565b90505f826017548561309791906146a4565b6130a1919061411b565b90505f83601854876130b391906146a4565b6130bd919061411b565b90505f84601854876130cf91906146a4565b6130d9919061411b565b90505f8285896130e991906140bb565b6130f391906140bb565b90505f82858961310391906140bb565b61310d91906140bb565b90505f8611156131955760035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc8790811502906040515f60405180830381858888f1935050505015801561317b573d5f803e3d5ffd5b508460175f82825461318d91906140bb565b925050819055505b5f84111561321b5760045f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc8590811502906040515f60405180830381858888f19350505050158015613201573d5f803e3d5ffd5b508260185f82825461321391906140bb565b925050819055505b5f8211156132a15760025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc8390811502906040515f60405180830381858888f19350505050158015613287573d5f803e3d5ffd5b508060195f82825461329991906140bb565b925050819055505b505050505050505050565b600160225f8282546132be919061414b565b925050819055505f60248054905090505f60215414806132dd57505f81145b156132e857506133a7565b5f816021546132f7919061411b565b90505f5b828110156133a3575f6024828154811061331857613317614274565b5b905f5260205f20015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508260095f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825461338e919061414b565b925050819055505080806001019150506132fb565b5050505b565b5f8060266040518060a00160405290815f82015f9054906101000a900460ff1660ff1660ff1681526020015f820160019054906101000a900460ff1660ff1660ff1681526020015f820160029054906101000a900460ff1660ff1660ff1681526020015f820160039054906101000a900460ff1660ff1660ff1681526020015f820160049054906101000a900460ff1660ff1660ff168152505090505f60285f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16036135395760256040518060a00160405290815f82015f9054906101000a900460ff1660ff1660ff1681526020015f820160019054906101000a900460ff1660ff1660ff1681526020015f820160029054906101000a900460ff1660ff1660ff1681526020015f820160039054906101000a900460ff1660ff1660ff1681526020015f820160049054906101000a900460ff1660ff1660ff16815250509150600190505b5f6064836080015160ff168661354f91906146a4565b613559919061411b565b90505f835f015160ff1611156135fd575f836080015160ff16845f015160ff168361358491906146a4565b61358e919061411b565b90508060195f8282546135a1919061414b565b925050819055508060095f3073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546135f4919061414b565b92505081905550505b5f836060015160ff1611156136f2575f836080015160ff16846060015160ff168361362891906146a4565b613632919061411b565b90508060095f61dead73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f828254613682919061414b565b9250508190555061dead73ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516136e891906139ed565b60405180910390a3505b613705818661395490919063ffffffff16565b935050505092915050565b5f8060135490505f60145490505f60155490505f601654905060285f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff160361379257600f5493506010549250601154915060125490505b5f606485886137a191906146a4565b6137ab919061411b565b90505f606485896137bc91906146a4565b6137c6919061411b565b90505f6064848a6137d791906146a4565b6137e1919061411b565b90505f6064868b6137f291906146a4565b6137fc919061411b565b90505f86111561385a5780602e5f828254613817919061414b565b925050819055507f0541e0aba34cd8c84288e3db56e060e69892cb7cedbcf6d9dee2b48d9c24536481602e546040516138519291906146e5565b60405180910390a15b8360175f82825461386b919061414b565b925050819055508260185f828254613883919061414b565b925050819055508160195f82825461389b919061414b565b925050819055508183856138af919061414b565b6138b9919061414b565b60095f3073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f828254613904919061414b565b925050819055505f8183858761391a919061414b565b613924919061414b565b61392e919061414b565b9050613943818c61395490919063ffffffff16565b995050505050505050505092915050565b5f818361396191906140bb565b905092915050565b5f60ff82169050919050565b61397e81613969565b82525050565b5f60a0820190506139975f830188613975565b6139a46020830187613975565b6139b16040830186613975565b6139be6060830185613975565b6139cb6080830184613975565b9695505050505050565b5f819050919050565b6139e7816139d5565b82525050565b5f602082019050613a005f8301846139de565b92915050565b5f81519050919050565b5f82825260208201905092915050565b5f5b83811015613a3d578082015181840152602081019050613a22565b5f8484015250505050565b5f601f19601f8301169050919050565b5f613a6282613a06565b613a6c8185613a10565b9350613a7c818560208601613a20565b613a8581613a48565b840191505092915050565b5f6020820190508181035f830152613aa88184613a58565b905092915050565b5f80fd5b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f613ae182613ab8565b9050919050565b613af181613ad7565b8114613afb575f80fd5b50565b5f81359050613b0c81613ae8565b92915050565b613b1b816139d5565b8114613b25575f80fd5b50565b5f81359050613b3681613b12565b92915050565b5f8060408385031215613b5257613b51613ab0565b5b5f613b5f85828601613afe565b9250506020613b7085828601613b28565b9150509250929050565b5f8115159050919050565b613b8e81613b7a565b82525050565b5f602082019050613ba75f830184613b85565b92915050565b5f805f805f805f80610100898b031215613bca57613bc9613ab0565b5b5f613bd78b828c01613b28565b9850506020613be88b828c01613b28565b9750506040613bf98b828c01613b28565b9650506060613c0a8b828c01613b28565b9550506080613c1b8b828c01613b28565b94505060a0613c2c8b828c01613b28565b93505060c0613c3d8b828c01613b28565b92505060e0613c4e8b828c01613b28565b9150509295985092959890939650565b5f805f60608486031215613c7557613c74613ab0565b5b5f613c8286828701613afe565b9350506020613c9386828701613afe565b9250506040613ca486828701613b28565b9150509250925092565b5f602082019050613cc15f830184613975565b92915050565b5f60208284031215613cdc57613cdb613ab0565b5b5f613ce984828501613b28565b91505092915050565b613cfb81613ad7565b82525050565b5f602082019050613d145f830184613cf2565b92915050565b613d2381613b7a565b8114613d2d575f80fd5b50565b5f81359050613d3e81613d1a565b92915050565b5f8060408385031215613d5a57613d59613ab0565b5b5f613d6785828601613afe565b9250506020613d7885828601613d30565b9150509250929050565b5f60208284031215613d9757613d96613ab0565b5b5f613da484828501613afe565b91505092915050565b5f60208284031215613dc257613dc1613ab0565b5b5f613dcf84828501613d30565b91505092915050565b5f819050919050565b5f613dfb613df6613df184613ab8565b613dd8565b613ab8565b9050919050565b5f613e0c82613de1565b9050919050565b5f613e1d82613e02565b9050919050565b613e2d81613e13565b82525050565b5f602082019050613e465f830184613e24565b92915050565b613e5581613969565b8114613e5f575f80fd5b50565b5f81359050613e7081613e4c565b92915050565b5f60208284031215613e8b57613e8a613ab0565b5b5f613e9884828501613e62565b91505092915050565b5f8060408385031215613eb757613eb6613ab0565b5b5f613ec485828601613afe565b9250506020613ed585828601613afe565b9150509250929050565b5f8060408385031215613ef557613ef4613ab0565b5b5f613f0285828601613b28565b9250506020613f1385828601613afe565b9150509250929050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f840112613f3e57613f3d613f1d565b5b8235905067ffffffffffffffff811115613f5b57613f5a613f21565b5b602083019150836020820283011115613f7757613f76613f25565b5b9250929050565b5f8060208385031215613f9457613f93613ab0565b5b5f83013567ffffffffffffffff811115613fb157613fb0613ab4565b5b613fbd85828601613f29565b92509250509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061400d57607f821691505b6020821081036140205761401f613fc9565b5b50919050565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000005f82015250565b5f61405a601d83613a10565b915061406582614026565b602082019050919050565b5f6020820190508181035f8301526140878161404e565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6140c5826139d5565b91506140d0836139d5565b92508282039050818111156140e8576140e761408e565b5b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f614125826139d5565b9150614130836139d5565b9250826141405761413f6140ee565b5b828204905092915050565b5f614155826139d5565b9150614160836139d5565b92508282019050808211156141785761417761408e565b5b92915050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f20615f8201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b5f6141d8602683613a10565b91506141e38261417e565b604082019050919050565b5f6020820190508181035f830152614205816141cc565b9050919050565b7f5265776172642073686f756c6420626520617661696c61626c650000000000005f82015250565b5f614240601a83613a10565b915061424b8261420c565b602082019050919050565b5f6020820190508181035f83015261426d81614234565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f6142ab82613969565b915060ff82036142be576142bd61408e565b5b600182019050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725f82015250565b5f6142fd602083613a10565b9150614308826142c9565b602082019050919050565b5f6020820190508181035f83015261432a816142f1565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f8151905061436c81613ae8565b92915050565b5f6020828403121561438757614386613ab0565b5b5f6143948482850161435e565b91505092915050565b5f819050919050565b5f6143c06143bb6143b68461439d565b613dd8565b6139d5565b9050919050565b6143d0816143a6565b82525050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b61440881613ad7565b82525050565b5f61441983836143ff565b60208301905092915050565b5f602082019050919050565b5f61443b826143d6565b61444581856143e0565b9350614450836143f0565b805f5b83811015614480578151614467888261440e565b975061447283614425565b925050600181019050614453565b5085935050505092915050565b5f60a0820190506144a05f8301886139de565b6144ad60208301876143c7565b81810360408301526144bf8186614431565b90506144ce6060830185613cf2565b6144db60808301846139de565b9695505050505050565b7f54726164696e672069732064697361626c6564210000000000000000000000005f82015250565b5f614519601483613a10565b9150614524826144e5565b602082019050919050565b5f6020820190508181035f8301526145468161450d565b9050919050565b7f4d6178207472616e73616374696f6e20616d6f756e74206973206c696d6974655f8201527f6421000000000000000000000000000000000000000000000000000000000000602082015250565b5f6145a7602283613a10565b91506145b28261454d565b604082019050919050565b5f6020820190508181035f8301526145d48161459b565b9050919050565b7f4d61782062616c616e6365206973206c696d69746564210000000000000000005f82015250565b5f61460f601783613a10565b915061461a826145db565b602082019050919050565b5f6020820190508181035f83015261463c81614603565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603160045260245ffd5b5f61467a82613969565b915061468583613969565b9250828201905060ff81111561469e5761469d61408e565b5b92915050565b5f6146ae826139d5565b91506146b9836139d5565b92508282026146c7816139d5565b915082820484148315176146de576146dd61408e565b5b5092915050565b5f6040820190506146f85f8301856139de565b61470560208301846139de565b939250505056fea2646970667358221220fb469c1240ae25a1035eebe96479969f7019aa5976034d769f4535ef89fea93564736f6c63430008160033

Verified Source Code Partial Match

Compiler: v0.8.22+commit.4fc1097e EVM: shanghai Optimization: No
PYRO.sol 1104 lines
/*
https://www.pyrocontract.com/
https://twitter.com/PyroContract
https://t.me/pyroeth
*/

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.19;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
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 amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` 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 amount) 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 `amount` 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 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` 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 amount
    ) external returns (bool);
}

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // 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 (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

    /**
     * @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) {
        return a + b;
    }

    /**
     * @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 a - b;
    }

    /**
     * @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) {
        return a * b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting 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 a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b <= a, errorMessage);
            return a - b;
        }
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting 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) {
        unchecked {
            require(b > 0, errorMessage);
            return a / b;
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * 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) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

/**
 * @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;
    }
}

/**
 * @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.
 */
abstract 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() {
        _transferOwnership(_msgSender());
    }

    /**
     * @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 {
        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 {
        _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 {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _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);
    }
}

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);
    function removeLiquidity(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB);
    function removeLiquidityETH(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external returns (uint amountToken, uint amountETH);
    function removeLiquidityWithPermit(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountA, uint amountB);
    function removeLiquidityETHWithPermit(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountToken, uint amountETH);
    function swapExactTokensForTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);
    function swapTokensForExactTokens(
        uint amountOut,
        uint amountInMax,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);
    function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        payable
        returns (uint[] memory amounts);
    function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)
        external
        returns (uint[] memory amounts);
    function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        returns (uint[] memory amounts);
    function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)
        external
        payable
        returns (uint[] memory amounts);

    function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
    function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
    function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);
    function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
    function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
}

interface IUniswapV2Router02 is IUniswapV2Router01 {
    function removeLiquidityETHSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external returns (uint amountETH);
    function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountETH);

    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;
    function swapExactTokensForETHSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;
}

interface IUniswapV2Factory {
    event PairCreated(address indexed token0, address indexed token1, address pair, uint);

    function feeTo() external view returns (address);
    function feeToSetter() external view returns (address);

    function getPair(address tokenA, address tokenB) external view returns (address pair);
    function allPairs(uint) external view returns (address pair);
    function allPairsLength() external view returns (uint);

    function createPair(address tokenA, address tokenB) external returns (address pair);

    function setFeeTo(address) external;
    function setFeeToSetter(address) external;
}

interface IUniswapV2Pair {
    event Approval(address indexed owner, address indexed spender, uint value);
    event Transfer(address indexed from, address indexed to, uint value);

    function name() external pure returns (string memory);
    function symbol() external pure returns (string memory);
    function decimals() external pure returns (uint8);
    function totalSupply() external view returns (uint);
    function balanceOf(address owner) external view returns (uint);
    function allowance(address owner, address spender) external view returns (uint);

    function approve(address spender, uint value) external returns (bool);
    function transfer(address to, uint value) external returns (bool);
    function transferFrom(address from, address to, uint value) external returns (bool);

    function DOMAIN_SEPARATOR() external view returns (bytes32);
    function PERMIT_TYPEHASH() external pure returns (bytes32);
    function nonces(address owner) external view returns (uint);

    function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;

    event Mint(address indexed sender, uint amount0, uint amount1);
    event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);
    event Swap(
        address indexed sender,
        uint amount0In,
        uint amount1In,
        uint amount0Out,
        uint amount1Out,
        address indexed to
    );
    event Sync(uint112 reserve0, uint112 reserve1);

    function MINIMUM_LIQUIDITY() external pure returns (uint);
    function factory() external view returns (address);
    function token0() external view returns (address);
    function token1() external view returns (address);
    function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
    function price0CumulativeLast() external view returns (uint);
    function price1CumulativeLast() external view returns (uint);
    function kLast() external view returns (uint);

    function mint(address to) external returns (uint liquidity);
    function burn(address to) external returns (uint amount0, uint amount1);
    function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
    function skim(address to) external;
    function sync() external;

    function initialize(address, address) external;
}

contract PYRO is IERC20, Ownable {
    using SafeMath for uint256;

    address private constant DEAD = address(0xdead);
    address private constant ZERO = address(0);
    address private devAddress = address(0xe5fBF047201c9F038e24C61A64583fa734af1ae5);
    address private treasuryAddress = address(0xe5fBF047201c9F038e24C61A64583fa734af1ae5);
    address private marketingAddress = address(0xe5fBF047201c9F038e24C61A64583fa734af1ae5);
    address private liquidityAddress = address(0x7ffF15a1cee6dD5f0C90A1589C54642C4F6505f6);
    /**
     * Token Assets
     * name, symbol, _decimals totalSupply
     * This will be defined when we deploy the contract.
     */
    string private _name = "PYRO";
    string private _symbol = "PYRO";
    uint8 private _decimals = 18;
    uint256 private _totalSupply = 1_000_000_000 * (10 ** _decimals);  // 1 billion

    mapping(address => uint256) private _balances;
    mapping(address => mapping(address => uint256)) private _allowances;

    bool public enableTrading = true;
    bool public enableSwap = false;
    uint256 public maxBalance = _totalSupply * 2 / 100; // 2%
    uint256 public maxTx = _totalSupply * 2 / 100;  // 2%
    uint256 public swapThreshold = (_totalSupply * 4) / 10000;  // 0.04%

    uint256 _buyMarketingFee = 25;
    uint256 _buyLiquidityFee = 0;
    uint256 _buyReflectionFee = 0;
    uint256 _buyTreasuryFee = 0;

    uint256 _sellMarketingFee = 25;
    uint256 _sellLiquidityFee = 0;
    uint256 _sellReflectionFee = 0;
    uint256 _sellTreasuryFee = 0;

    uint256 public marketingDebt = 0;
    uint256 public liquidityDebt = 0;
    uint256 public treasuryDebt = 0;
    /**
     * Mode & Fee
     * mode0 = prefee system
     * mode1(BuyTax: treasury=0%, SellTax: treasury=0%)
     * mode2(BuyTax: burn=3%, SellTax: burn=3%)
     */
    uint8 public mode = 0;  // current mode
    bool public isAutoMode = false;
    uint256 public modeStartTime = 0;
    uint256 public modePeriod = 1 hours;
    struct Fee {
        uint8 treasury;
        uint8 reflection;
        uint8 lucky;
        uint8 burn;
        uint8 total;
    }
    // mode == 0: pre fees
    // Mode 1
    Fee public mode1BuyTax = Fee({treasury: 0, reflection: 0, lucky: 0, burn: 0, total: 0});
    Fee public mode1SellTax = Fee({treasury: 0, reflection: 0, lucky: 0, burn: 0, total: 0});
    // Mode 2
    Fee public mode2BuyTax = Fee({treasury: 0, reflection: 0, lucky: 0, burn: 3, total: 3});
    Fee public mode2SellTax = Fee({treasury: 0, reflection: 0, lucky: 0, burn: 3, total: 3});
    uint256 public mode2ReflectionAmount = 0;
    uint256 public session = 0;
    // session => (buyer => true/false)
    mapping(uint256 => mapping(address => bool)) public isMode6Buyer;
    address[] public mode2Buyers;

    Fee public buyTax;
    Fee public sellTax;

    IUniswapV2Router02 public UNISWAP_V2_ROUTER;
    address public UNISWAP_V2_PAIR;

    mapping(address => bool) public isFeeExempt;
    mapping(address => bool) public isReflectionExempt;
    mapping(address => bool) public isBalanceExempt;

    mapping(address => bool) public isHolder;
    address[] public holders;
    uint256 public totalReflectionAmount;
    uint256 public topHolderReflectionAmount;

    // events
    event UpdateMode(uint8 mode);
    event Reflection(uint256 amountAdded, uint256 totalAmountAccumulated);
    event ChangeTradingStatus(bool status);

    bool inSwap;
    modifier swapping() {
        inSwap = true;
        _;
        inSwap = false;
    }

    constructor () {
        require(devAddress != msg.sender, "Please set a different wallet for devAddress");
        UNISWAP_V2_ROUTER = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);  // mainnet = goerli
        UNISWAP_V2_PAIR = IUniswapV2Factory(UNISWAP_V2_ROUTER.factory()).createPair(address(this), UNISWAP_V2_ROUTER.WETH());
        _allowances[address(this)][address(UNISWAP_V2_ROUTER)] = _totalSupply;
        _allowances[address(this)][address(UNISWAP_V2_PAIR)] = _totalSupply;
        _allowances[address(this)][msg.sender] = _totalSupply;

        isFeeExempt[msg.sender] = true;
        isFeeExempt[devAddress] = true;
        isFeeExempt[treasuryAddress] = true;
        isFeeExempt[marketingAddress] = true;
        isFeeExempt[liquidityAddress] = true;
        isFeeExempt[ZERO] = true;
        isFeeExempt[DEAD] = true;
        isFeeExempt[address(this)] = true;
        isFeeExempt[address(UNISWAP_V2_ROUTER)] = true;
        isFeeExempt[UNISWAP_V2_PAIR] = true;

        isReflectionExempt[address(this)] = true;
        isReflectionExempt[address(UNISWAP_V2_ROUTER)] = true;
        isReflectionExempt[UNISWAP_V2_PAIR] = true;
        isReflectionExempt[msg.sender] = true;
        isReflectionExempt[ZERO] = true;
        isReflectionExempt[DEAD] = true;

        isBalanceExempt[ZERO] = true;
        isBalanceExempt[DEAD] = true;
        isBalanceExempt[address(UNISWAP_V2_ROUTER)] = true;
        isBalanceExempt[address(UNISWAP_V2_PAIR)] = true;
        isBalanceExempt[devAddress] = true;
        isBalanceExempt[msg.sender] = true;
        isBalanceExempt[address(this)] = true;

        buyTax = mode1BuyTax;
        sellTax = mode1SellTax;

        uint256 devAmount = _totalSupply * 5 / 100;
        _balances[devAddress] = devAmount;
        emit Transfer(ZERO, devAddress, devAmount);
        isHolder[devAddress] = true;
        holders.push(devAddress);

        uint256 circulationAmount = _totalSupply - devAmount;
        _balances[msg.sender] = circulationAmount;
        emit Transfer(ZERO, msg.sender, circulationAmount);
        isHolder[msg.sender] = true;
        holders.push(msg.sender);
    }

    receive() external payable {}
    /**
     * ERC20 Standard methods with override
     */
    function totalSupply() external view override returns (uint256) {
        return _totalSupply;
    }

    function decimals() external view returns (uint8) {
        return _decimals;
    }

    function symbol() external view returns (string memory) {
        return _symbol;
    }

    function name() external view returns (string memory) {
        return _name;
    }

    function balanceOf(address account) public view override returns (uint256) {
        uint256 totalBalance = _balances[account];
        if (!isReflectionExempt[account] && totalReflectionAmount > 0 && holders.length > 2) {
            totalBalance += totalBalance / holders.length;
        }
        return totalBalance;
    }

    function allowance(address holder, address spender) external view override returns (uint256) {
        return _allowances[holder][spender];
    }

    function approve(address spender, uint256 amount) public override returns (bool) {
        _allowances[msg.sender][spender] = amount;
        emit Approval(msg.sender, spender, amount);
        return true;
    }

    function approveMax(address spender) external returns (bool) {
        return approve(spender, _totalSupply);
    }

    function transfer(address recipient, uint256 amount) external override returns (bool) {
        return _transferFrom(msg.sender, recipient, amount);
    }

    function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) {
        if (_allowances[sender][msg.sender] != type(uint256).max) {
            require(_allowances[sender][msg.sender] >= amount, "ERC20: insufficient allowance");
            _allowances[sender][msg.sender] = _allowances[sender][msg.sender] - amount;
        }

        return _transferFrom(sender, recipient, amount);
    }

    function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) {
        _checkBuySell(sender, recipient);
        _checkLimitations(recipient, amount);
        if (inSwap) {
            return _basicTransfer(sender, recipient, amount);
        }
        if (_shouldSwapBack()) {
            _swapBack();
        }
        if (!isReflectionExempt[sender]){
            _claim(sender);
        }
        _balances[sender] = _balances[sender].sub(amount, "Insufficient Balance");
        _updateHolders(sender);
        uint256 amountReceived = _shouldTakeFee(sender, recipient) ? _takeFees(sender, amount) : amount;
        _balances[recipient] = _balances[recipient].add(amountReceived);
        _updateHolders(recipient);
        emit Transfer(sender, recipient, amount);

        if (isAutoMode) {
            autoUpdateMode();
        }

        return true;
    }

    function _basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) {
        _balances[sender] = _balances[sender].sub(amount, "Insufficient Balance");
        _updateHolders(sender);
        _balances[recipient] = _balances[recipient].add(amount);
        _updateHolders(recipient);
        emit Transfer(sender, recipient, amount);
        return true;
    }

    function _takePreFees(address sender, uint256 amount) internal returns (uint256) {
        uint256 _marketingFee = _sellMarketingFee;
        uint256 _liquidityFee = _sellLiquidityFee;
        uint256 _reflectionFee = _sellReflectionFee;
        uint256 _treasuryFee = _sellTreasuryFee;
        if (sender == UNISWAP_V2_PAIR) {
            _marketingFee = _buyMarketingFee;
            _liquidityFee = _buyLiquidityFee;
            _reflectionFee = _buyReflectionFee;
            _treasuryFee = _buyTreasuryFee;
        }
        uint256 _marketingAmount = amount * _marketingFee / 100;
        uint256 _liquidityAmount = amount * _liquidityFee / 100;
        uint256 _treasuryAmount = amount * _treasuryFee / 100;
        uint256 _reflectionFeeAmount = amount * _reflectionFee / 100;
        if (_reflectionFee > 0) {
            totalReflectionAmount += _reflectionFeeAmount;
            emit Reflection(_reflectionFeeAmount, totalReflectionAmount);
        }
        marketingDebt += _marketingAmount;
        liquidityDebt += _liquidityAmount;
        treasuryDebt += _treasuryAmount;
        _balances[address(this)] += _marketingAmount + _liquidityAmount + _treasuryAmount;
        uint256 _totalFeeAmount = _marketingAmount + _liquidityAmount + _treasuryAmount + _reflectionFeeAmount;
        return amount.sub(_totalFeeAmount);
    }

    function _takeModeFees(address sender, uint256 amount) internal returns (uint256) {
        Fee memory _feeTax = sellTax;
        bool _isBuy = false;
        if (sender == UNISWAP_V2_PAIR) {
            _feeTax = buyTax;
            _isBuy = true;
        }
        uint256 feeAmount = amount * _feeTax.total / 100;
        if (_feeTax.treasury > 0) {
            uint256 _treasuryFeeAmount = feeAmount * _feeTax.treasury / _feeTax.total;
            treasuryDebt += _treasuryFeeAmount;
            _balances[address(this)] += _treasuryFeeAmount;
        }
        if (_feeTax.burn > 0) {
            uint256 _burnFeeAmount = feeAmount * _feeTax.burn / _feeTax.total;
            _balances[DEAD] += _burnFeeAmount;
            emit Transfer(address(this), DEAD, _burnFeeAmount);
        }

        return amount.sub(feeAmount);
    }

    function _takeFees(address sender, uint256 amount) internal returns (uint256) {
        if (mode > 0) {
            return _takeModeFees(sender, amount);
        } else {
            return _takePreFees(sender, amount);
        }
    }

    function _shouldTakeFee(address sender, address recipient) internal view returns (bool) {
        return (recipient == UNISWAP_V2_PAIR && !isFeeExempt[sender]) || (sender == UNISWAP_V2_PAIR && !isFeeExempt[recipient]);
    }

    function _checkBuySell(address sender, address recipient) internal view {
        if (!enableTrading) {
            require(sender != UNISWAP_V2_PAIR && recipient != UNISWAP_V2_PAIR, "Trading is disabled!");
        }
    }

    function _checkLimitations(address recipient, uint256 amount) internal view {
        if (!isBalanceExempt[recipient]) {
            require(amount <= maxTx, "Max transaction amount is limited!");
            uint256 suggestBalance = balanceOf(recipient) + amount;
            require(suggestBalance <= maxBalance, "Max balance is limited!");
        }
    }
    
    function _updateHolders(address holder) internal {
        uint256 balance = balanceOf(holder);
        if (balance > 0) {
            if (!isHolder[holder]) {
                isHolder[holder] = true;
                holders.push(holder);
            }
        } else {
            if (isHolder[holder]) {
                isHolder[holder] = false;
                for(uint256 i = 0; i < holders.length - 1; i++) {
                    if (holders[i] == holder) {
                        holders[i] = holders[holders.length - 1];
                    }
                }
                holders.pop();
            }
        }
    }

    function _claim(address holder) internal {
        if (totalReflectionAmount > 0) {
            uint256 oneReflection = totalReflectionAmount / holders.length;
            totalReflectionAmount -= oneReflection;
            _balances[holder] += oneReflection;
        }
    }

    function _shouldSwapBack() internal view returns (bool) {
        return msg.sender != UNISWAP_V2_PAIR && 
            enableSwap && 
            !inSwap && 
            balanceOf(address(this)) >= swapThreshold;
    }

    function _swapBack() internal swapping {
        uint256 amountToSwap = balanceOf(address(this));
        approve(address(UNISWAP_V2_ROUTER), amountToSwap);
        // swap
        address[] memory path = new address[](2);
        path[0] = address(this);
        path[1] = UNISWAP_V2_ROUTER.WETH();
        UNISWAP_V2_ROUTER.swapExactTokensForETHSupportingFeeOnTransferTokens(
            amountToSwap, 0, path, address(this), block.timestamp
        );
        uint256 amountETH = address(this).balance;
        _sendFeeETH(amountETH, amountToSwap);
    }

    function _sendFeeETH(uint256 amount, uint256 swapAmount) internal {
        uint256 totalDebt = marketingDebt + liquidityDebt + treasuryDebt;
        uint256 marketingProfit = amount * marketingDebt / totalDebt;
        uint256 marketingSwapAmount = swapAmount * marketingDebt / totalDebt;
        uint256 liquidityProfit = amount * liquidityDebt / totalDebt;
        uint256 liquiditySwapAmount = swapAmount * liquidityDebt / totalDebt;
        uint256 treasuryProfit = amount - marketingProfit - liquidityProfit;
        uint256 treasurySwapAmount = swapAmount - marketingSwapAmount - liquiditySwapAmount;
        if (marketingProfit > 0) {
            payable(marketingAddress).transfer(marketingProfit);
            marketingDebt -= marketingSwapAmount;
        }
        if (liquidityProfit > 0) {
            payable(liquidityAddress).transfer(liquidityProfit);
            liquidityDebt -= liquiditySwapAmount;
        }
        if (treasuryProfit > 0) {
            payable(treasuryAddress).transfer(treasuryProfit);
            treasuryDebt -= treasurySwapAmount;
        }
    }

    function _mode2Distribution() internal {
        session += 1;
        uint256 _buyersLen = mode2Buyers.length;
        if (mode2ReflectionAmount == 0 || _buyersLen == 0) return;
        uint256 _buyerReflection = mode2ReflectionAmount / _buyersLen;
        for (uint256 i = 0; i < _buyersLen; i++) {
            address _buyer = mode2Buyers[i];
            _balances[_buyer] += _buyerReflection;
        }
    }

    function _changeMode(uint8 mode_) internal {
        if (mode == 2 && mode_ != 2) {
            _mode2Distribution();
        }
        if (mode_ == 2) {
            buyTax = mode2BuyTax;
            sellTax = mode2SellTax;
        }
        mode = mode_;
        modeStartTime = block.timestamp;
        emit UpdateMode(mode_);
    }

    function autoUpdateMode() internal {
        uint8 _currentMode = mode;
        if (_currentMode == 0) {
            return;
        }
        uint256 deltaTime = block.timestamp - modeStartTime;
        if (deltaTime < modePeriod) {
            return;
        }
        _currentMode += 1;
        if (_currentMode > 2) {
            _currentMode = 1;
        }
        _changeMode(_currentMode);
    }

    function DefaultMode(uint8 mode_) external onlyOwner {
        _changeMode(mode_);
    }

    function DragonForm(bool isAuto_) external onlyOwner {
        isAutoMode = isAuto_;
    }

    function rewardTopHolders(address[] calldata _topHolders) public onlyOwner {
        require(topHolderReflectionAmount > 0, "Reward should be available");
        uint256 oneReward = topHolderReflectionAmount / _topHolders.length;
        topHolderReflectionAmount = 0;
        for (uint8 i = 0; i < _topHolders.length; i++) {
            _balances[_topHolders[i]] += oneReward;
            emit Transfer(address(this), _topHolders[i], oneReward);
        }
    }

    function setFeeReceivers(address treasury_) external onlyOwner {
        treasuryAddress = treasury_;
    }

    function setIsFeeExempt(address holder, bool exempt) external onlyOwner {
        isFeeExempt[holder] = exempt;
    }

    function setIsReflectionExempt(address holder, bool exempt) external onlyOwner {
        isReflectionExempt[holder] = exempt;
    }

    function setIsBalanceExempt(address holder, bool exempt) external onlyOwner {
        isBalanceExempt[holder] = exempt;
    }

    function changeTradingStatus(bool _status) external onlyOwner {
        enableTrading = _status;
        emit ChangeTradingStatus(_status);
    }

    function updatePreFees(
        uint256 buyMarketingFee_,
        uint256 buyLiquidityFee_,
        uint256 buyReflectionFee_,
        uint256 buyTreasuryFee_,
        uint256 sellMarketingFee_,
        uint256 sellLiquidityFee_,
        uint256 sellReflectionFee_,
        uint256 sellTreasuryFee_
    ) external onlyOwner {
        _buyMarketingFee = buyMarketingFee_;
        _buyLiquidityFee = buyLiquidityFee_;
        _buyReflectionFee = buyReflectionFee_;
        _buyTreasuryFee = buyTreasuryFee_;

        _sellMarketingFee = sellMarketingFee_;
        _sellLiquidityFee = sellLiquidityFee_;
        _sellReflectionFee = sellReflectionFee_;
        _sellTreasuryFee = sellTreasuryFee_;
    }

    function updateSwapThreshold(uint256 _swapThreshold) external onlyOwner {
        swapThreshold = _swapThreshold;
    }

    function manualSwapBack() external onlyOwner {
        if (_shouldSwapBack()) {
            _swapBack();
        }
    }

    function changeSwapStatus(bool _enableSwap) external onlyOwner {
        enableSwap = _enableSwap;
    }
}

Read Contract

UNISWAP_V2_PAIR 0xf40acc3d → address
UNISWAP_V2_ROUTER 0xa82ed9ec → address
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
buyTax 0x4f7041a5 → uint8, uint8, uint8, uint8, uint8
decimals 0x313ce567 → uint8
enableSwap 0x29691448 → bool
enableTrading 0x8a8c523c → bool
holders 0x2a11ced0 → address
isAutoMode 0x93e6b04a → bool
isBalanceExempt 0x94da5dbf → bool
isFeeExempt 0x3f4218e0 → bool
isHolder 0xd4d7b19a → bool
isMode6Buyer 0xe192d485 → bool
isReflectionExempt 0xb1bd3774 → bool
liquidityDebt 0x64c653c1 → uint256
marketingDebt 0x51fdefc9 → uint256
maxBalance 0x73ad468a → uint256
maxTx 0x7437681e → uint256
mode 0x295a5212 → uint8
mode1BuyTax 0x00adef68 → uint8, uint8, uint8, uint8, uint8
mode1SellTax 0x9dee70dd → uint8, uint8, uint8, uint8, uint8
mode2BuyTax 0x204a6836 → uint8, uint8, uint8, uint8, uint8
mode2Buyers 0xb98a1cd4 → address
mode2ReflectionAmount 0xcf059b9f → uint256
mode2SellTax 0xc15d854f → uint8, uint8, uint8, uint8, uint8
modePeriod 0x573d8cf9 → uint256
modeStartTime 0x057a2c0e → uint256
name 0x06fdde03 → string
owner 0x8da5cb5b → address
sellTax 0xcc1776d3 → uint8, uint8, uint8, uint8, uint8
session 0x5e3568b8 → uint256
swapThreshold 0x0445b667 → uint256
symbol 0x95d89b41 → string
topHolderReflectionAmount 0x142a2711 → uint256
totalReflectionAmount 0x615494be → uint256
totalSupply 0x18160ddd → uint256
treasuryDebt 0x6cf3fdb9 → uint256

Write Contract 18 functions

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

DefaultMode 0xbd658702
uint8 mode_
DragonForm 0xe708ce55
bool isAuto_
approve 0x095ea7b3
address spender
uint256 amount
returns: bool
approveMax 0x571ac8b0
address spender
returns: bool
changeSwapStatus 0x76e88ddb
bool _enableSwap
changeTradingStatus 0x526b13fd
bool _status
manualSwapBack 0x66eb3785
No parameters
renounceOwnership 0x715018a6
No parameters
rewardTopHolders 0xf9c683c0
address[] _topHolders
setFeeReceivers 0xe01bb688
address treasury_
setIsBalanceExempt 0x2c957aa0
address holder
bool exempt
setIsFeeExempt 0x658d4b7f
address holder
bool exempt
setIsReflectionExempt 0x3307d372
address holder
bool exempt
transfer 0xa9059cbb
address recipient
uint256 amount
returns: bool
transferFrom 0x23b872dd
address sender
address recipient
uint256 amount
returns: bool
transferOwnership 0xf2fde38b
address newOwner
updatePreFees 0x166319eb
uint256 buyMarketingFee_
uint256 buyLiquidityFee_
uint256 buyReflectionFee_
uint256 buyTreasuryFee_
uint256 sellMarketingFee_
uint256 sellLiquidityFee_
uint256 sellReflectionFee_
uint256 sellTreasuryFee_
updateSwapThreshold 0xcc274b29
uint256 _swapThreshold

Recent Transactions

No transactions found for this address