Cryo Explorer Ethereum Mainnet

Address Contract Verified

Address 0x00000Ccf3147AC1eF96a184BDdf65B923E7B0846
Balance 0 ETH
Nonce 1
Code Size 9826 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

9826 bytes
0x6080604052600436106102f5575f3560e01c8063728d41c911610195578063a985ceef116100ea578063da0103bd1161008e578063dd62ed3e1161006b578063dd62ed3e146108fc578063f2fde38b14610940578063f5fc361c1461095f578063fccc28131461097e57005b8063da0103bd1461089a578063da4493f6146108b9578063dbe66ca0146108ce57005b8063c16dd4a4116100c7578063c16dd4a414610814578063c31c9c0714610833578063cc1776d314610866578063ce657cce1461087b57005b8063a985ceef146107a7578063ad29ffde146107c7578063b4b11b95146107e657005b80638da5cb5b11610151578063a49a910f1161012e578063a49a910f1461072a578063a64e4f8a14610749578063a901dd9214610769578063a9059cbb1461078857005b80638da5cb5b146106db5780638ea5220f146106f757806395d89b411461071657005b8063728d41c914610631578063757765f8146106505780637b812b411461066f5780637f635cc01461069d57806380faa3d2146106b15780638124f7ac146106c657005b8063346cc7be1161024b578063652e2f041161020757806368b69b9b116101e457806368b69b9b146105b55780636aa5b37f146105d457806370a08231146105e9578063715018a61461061d57005b8063652e2f041461056c578063667f65261461058157806366a88d96146105a057005b8063346cc7be146104c65780633582ad23146104e557806336884b6e146105055780634a8c1fb4146105245780634f7041a514610544578063538ba4f91461055957005b80631ecd7d6e116102b257806326991cc81161028f57806326991cc8146104225780632dc0562d1461046d5780632f6f30ea1461048c578063313ce567146104ab57005b80631ecd7d6e146103c057806323b872dd146103d5578063259827e3146103f457005b806306fdde03146102f7578063095ea7b3146103215780630bd05b6914610350578063106a5a8f1461036457806318160ddd146103835780631816467f146103a1575b005b348015610302575f5ffd5b5061030b610993565b604051610318919061229c565b60405180910390f35b34801561032c575f5ffd5b5061034061033b3660046122e5565b610a23565b6040519015158152602001610318565b34801561035b575f5ffd5b506102f5610a3c565b34801561036f575f5ffd5b506102f561037e36600461231c565b610ab4565b34801561038e575f5ffd5b506003545b604051908152602001610318565b3480156103ac575f5ffd5b506102f56103bb36600461239e565b610b04565b3480156103cb575f5ffd5b50610393600e5481565b3480156103e0575f5ffd5b506103406103ef3660046123c0565b610b93565b3480156103ff575f5ffd5b5061034061040e36600461239e565b60126020525f908152604090205460ff1681565b34801561042d575f5ffd5b506104557f000000000000000000000000f2ede4c0ae6f8ec2d6124ff6de08441f6c08206881565b6040516001600160a01b039091168152602001610318565b348015610478575f5ffd5b50600654610455906001600160a01b031681565b348015610497575f5ffd5b506102f56104a636600461231c565b610bb6565b3480156104b6575f5ffd5b5060405160128152602001610318565b3480156104d1575f5ffd5b506102f56104e036600461239e565b610dc3565b3480156104f0575f5ffd5b5060075461034090600160a01b900460ff1681565b348015610510575f5ffd5b506102f561051f3660046123fe565b610fb1565b34801561052f575f5ffd5b5060075461034090600160c01b900460ff1681565b34801561054f575f5ffd5b50610393600f5481565b348015610564575f5ffd5b506104555f81565b348015610577575f5ffd5b50610393600c5481565b34801561058c575f5ffd5b506102f561059b366004612415565b610ff5565b3480156105ab575f5ffd5b50610393600d5481565b3480156105c0575f5ffd5b506102f56105cf366004612435565b611008565b3480156105df575f5ffd5b50610393600b5481565b3480156105f4575f5ffd5b5061039361060336600461239e565b6001600160a01b03165f9081526001602052604090205490565b348015610628575f5ffd5b506102f561105d565b34801561063c575f5ffd5b506102f561064b3660046123fe565b611070565b34801561065b575f5ffd5b506102f561066a3660046123fe565b6110ad565b34801561067a575f5ffd5b5061034061068936600461239e565b60146020525f908152604090205460ff1681565b3480156106a8575f5ffd5b50610393602381565b3480156106bc575f5ffd5b5061039360085481565b3480156106d1575f5ffd5b5061039360115481565b3480156106e6575f5ffd5b505f546001600160a01b0316610455565b348015610702575f5ffd5b50600754610455906001600160a01b031681565b348015610721575f5ffd5b5061030b6110ea565b348015610735575f5ffd5b506102f56107443660046123fe565b6110f9565b348015610754575f5ffd5b5060075461034090600160b01b900460ff1681565b348015610774575f5ffd5b506102f5610783366004612435565b6111bc565b348015610793575f5ffd5b506103406107a23660046122e5565b611211565b3480156107b2575f5ffd5b5060075461034090600160a81b900460ff1681565b3480156107d2575f5ffd5b506102f56107e136600461231c565b61121e565b3480156107f1575f5ffd5b5061034061080036600461239e565b60156020525f908152604090205460ff1681565b34801561081f575f5ffd5b506102f561082e366004612450565b611268565b34801561083e575f5ffd5b506104557f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d81565b348015610871575f5ffd5b5061039360105481565b348015610886575f5ffd5b506102f5610895366004612435565b6112b7565b3480156108a5575f5ffd5b506102f56108b43660046123fe565b61130c565b3480156108c4575f5ffd5b5061039360095481565b3480156108d9575f5ffd5b506103406108e836600461239e565b60136020525f908152604090205460ff1681565b348015610907575f5ffd5b50610393610916366004612487565b6001600160a01b039182165f90815260026020908152604080832093909416825291909152205490565b34801561094b575f5ffd5b506102f561095a36600461239e565b611352565b34801561096a575f5ffd5b506102f561097936600461239e565b611394565b348015610989575f5ffd5b5061045561dead81565b6060600480546109a2906124b3565b80601f01602080910402602001604051908101604052809291908181526020018280546109ce906124b3565b8015610a195780601f106109f057610100808354040283529160200191610a19565b820191905f5260205f20905b8154815290600101906020018083116109fc57829003601f168201915b5050505050905090565b5f33610a3081858561141b565b60019150505b92915050565b610a4461142d565b600754600160c01b900460ff1615610a6f5760405163ef65161f60e01b815260040160405180910390fd5b6007805460ff60c01b1916600160c01b17905543600855426009556040517f6603428d483ce13b6662b7a6848d769996e12e801bed4b0f1b9e8d10f64d38ba905f90a1565b610abc61142d565b5f5b82811015610afe57610af6848483818110610adb57610adb6124eb565b9050602002016020810190610af0919061239e565b83611459565b600101610abe565b50505050565b610b0c61142d565b6001600160a01b038116610b335760405163e6c4247b60e01b815260040160405180910390fd5b600780546001600160a01b038381166001600160a01b03198316811790935560408051938452911660208301819052917f0db17895a9d092fb3ca24d626f2150dd80c185b0706b36f1040ee239f56cb87191015b60405180910390a15050565b5f33610ba08582856114b4565b610bab858585611529565b506001949350505050565b610bbe61142d565b5f5b82811015610afe5760155f858584818110610bdd57610bdd6124eb565b9050602002016020810190610bf2919061239e565b6001600160a01b0316815260208101919091526040015f205460ff16158015610c7357507f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b0316848483818110610c5257610c526124eb565b9050602002016020810190610c67919061239e565b6001600160a01b031614155b8015610cae575030848483818110610c8d57610c8d6124eb565b9050602002016020810190610ca2919061239e565b6001600160a01b031614155b8015610ce957505f848483818110610cc857610cc86124eb565b9050602002016020810190610cdd919061239e565b6001600160a01b031614155b8015610d86575060135f858584818110610d0557610d056124eb565b9050602002016020810190610d1a919061239e565b6001600160a01b0316815260208101919091526040015f205460ff16158015610d86575060145f858584818110610d5357610d536124eb565b9050602002016020810190610d68919061239e565b6001600160a01b0316815260208101919091526040015f205460ff16155b15610dbb57610dbb848483818110610da057610da06124eb565b9050602002016020810190610db5919061239e565b83611586565b600101610bc0565b610dcb61142d565b335f6001600160a01b038316610e715750475f81610dfc5760405163cff858f960e01b815260040160405180910390fd5b6040516001600160a01b0384169083905f81818185875af1925050503d805f8114610e42576040519150601f19603f3d011682016040523d82523d5f602084013e610e47565b606091505b50508091505080610e6b57604051634088176760e11b815260040160405180910390fd5b50610f69565b6040516370a0823160e01b81523060048201526001600160a01b038416906370a0823190602401602060405180830381865afa158015610eb3573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610ed791906124ff565b90505f8111610ef957604051637dd28aa760e11b815260040160405180910390fd5b60405163a9059cbb60e01b8152336004820152602481018290526001600160a01b0384169063a9059cbb906044016020604051808303815f875af1158015610f43573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610f679190612516565b505b604080516001600160a01b0385168152602081018390527f7aba7eca7d870d5f2f93298379a43957082ef15cdcf64db1f7c731c6b3a2fa4991015b60405180910390a1505050565b610fb961142d565b600c8190556040518181527f1f41d239159181ddefb13e99853e0e4998e0556aa1f2281281c783e309281062906020015b60405180910390a150565b610ffd61142d565b600f91909155601055565b61101061142d565b60078054821515600160a81b0260ff60a81b199091161790556040517f6a53d6c83a7a55d7a07bd490493fceb559161cce588908714e497e54044777d990610fea90831515815260200190565b61106561142d565b61106e5f6115e1565b565b61107861142d565b600d8190556040518181527fe2e6151ed0b472c61401059745339ca42474813911b22d24023385def6377e1c90602001610fea565b6110b561142d565b600b8190556040518181527f85668e92bc538f5c140067d68e3375c65b9e4545d2822ec8d807c6782f747d6290602001610fea565b6060600580546109a2906124b3565b61110161142d565b5f61110b60035490565b9050620f424061111c826001612545565b611126919061255c565b8210156111465760405163617ab12d60e11b815260040160405180910390fd5b6103e8611154826005612545565b61115e919061255c565b82111561117e57604051630625040160e01b815260040160405180910390fd5b600e80549083905560408051848152602081018390527f65a8c7442ea496b0a28890f1ef48a9819d1f5d747e9a8df155fe862dfd493c959101610fa4565b6111c461142d565b60078054821515600160b01b0260ff60b01b199091161790556040517fa6a3dda702515d3130fef8b72d8e25f9aebd0d02e89d10d63c0c31d80b52f4a090610fea90831515815260200190565b5f33610a30818585611529565b61122661142d565b5f5b82811015610afe57611260848483818110611245576112456124eb565b905060200201602081019061125a919061239e565b83611625565b600101611228565b61127061142d565b6001600160a01b0382165f9081526015602052604090205460ff16156112a957604051630138835f60e11b815260040160405180910390fd5b6112b38282611680565b5050565b6112bf61142d565b60078054821515600160a01b0260ff60a01b199091161790556040517f1da197dc3cab4eceaefd5d0c34df2ed3a08f20a207fb1910c0eceb361e2c965c90610fea90831515815260200190565b61131461142d565b601180549082905560408051838152602081018390527f6a7b998a4adc393cb692c67fcd563e7971e2ea6f3fe7c9b8fb6dd53cf5b627d09101610b87565b61135a61142d565b6001600160a01b03811661138857604051631e4fbdf760e01b81525f60048201526024015b60405180910390fd5b611391816115e1565b50565b61139c61142d565b6001600160a01b0381166113c35760405163e6c4247b60e01b815260040160405180910390fd5b600680546001600160a01b038381166001600160a01b03198316811790935560408051938452911660208301819052917fb3dd4b0ccf73b51db7cb2a59fb88d1082b0fa9389d4ce0e85100fe3b26af78c49101610b87565b61142883838360016116db565b505050565b5f546001600160a01b0316331461106e5760405163118cdaa760e01b815233600482015260240161137f565b6001600160a01b0382165f81815260146020908152604091829020805460ff19168515159081179091558251938452908301527f74392251b09500cc108c71712e5e7e0392be9075a74a24f1494551cfa8e068709101610b87565b6001600160a01b038381165f908152600260209081526040808320938616835292905220545f198114610afe578181101561151b57604051637dc7a0d960e11b81526001600160a01b0384166004820152602481018290526044810183905260640161137f565b610afe84848484035f6116db565b6001600160a01b03831661155257604051634b637e8f60e11b81525f600482015260240161137f565b6001600160a01b03821661157b5760405163ec442f0560e01b81525f600482015260240161137f565b6114288383836117ad565b6001600160a01b0382165f81815260126020908152604091829020805460ff19168515159081179091558251938452908301527f066e0c23b9ae0bb92a88e9b0985bb7d85fce062730057312b99a9e243fde5ee19101610b87565b5f546001600160a01b03168015611606576115fc815f611625565b611606815f611459565b611611826001611625565b61161c826001611459565b6112b382611e93565b6001600160a01b0382165f81815260136020908152604091829020805460ff19168515159081179091558251938452908301527f3499bfcf9673677ba552f3fe2ea274ec7e6246da31c3c87e115b45a9b0db2efb9101610b87565b6001600160a01b0382165f81815260156020908152604091829020805460ff19168515159081179091558251938452908301527f024f6c8d60a57c94822c46d989fd6935057590269281b07fe8327d7e9bc424219101610b87565b6001600160a01b0384166117045760405163e602df0560e01b81525f600482015260240161137f565b6001600160a01b03831661172d57604051634a1406b160e11b81525f600482015260240161137f565b6001600160a01b038085165f9081526002602090815260408083209387168352929052208290558015610afe57826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161179f91815260200190565b60405180910390a350505050565b6001600160a01b0383165f908152601260205260409020543390329060ff16156117ea57604051631a30f03760e31b815260040160405180910390fd5b846001600160a01b0316826001600160a01b0316148061182257506001600160a01b0382165f9081526012602052604090205460ff16155b61183f57604051631a30f03760e31b815260040160405180910390fd5b846001600160a01b0316816001600160a01b031614806118705750816001600160a01b0316816001600160a01b0316145b8061189357506001600160a01b0381165f9081526012602052604090205460ff16155b6118b057604051631a30f03760e31b815260040160405180910390fd5b600754600160c01b900460ff16806118df57506001600160a01b0385165f9081526014602052604090205460ff165b8061190157506001600160a01b0384165f9081526014602052604090205460ff165b61191e5760405163037c597f60e01b815260040160405180910390fd5b6007545f90600160a01b900460ff1680156119435750600754600160b81b900460ff16155b801561198957506001600160a01b0386165f9081526014602052604090205460ff168061198757506001600160a01b0385165f9081526014602052604090205460ff165b155b90508015611c84575f546001600160a01b038781169116148015906119bb57505f546001600160a01b03868116911614155b80156119cf57506001600160a01b03851615155b80156119e657506001600160a01b03851661dead14155b15611c8457600754600160a81b900460ff1615611b0a577f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b0316856001600160a01b031614158015611a7157507f000000000000000000000000f2ede4c0ae6f8ec2d6124ff6de08441f6c0820686001600160a01b0316856001600160a01b031614155b15611b0a57611a8160034361257b565b6001600160a01b0383165f90815260166020526040902054108015611ac65750611aac60034361257b565b6001600160a01b0386165f90815260166020526040902054105b611ae3576040516329a226cf60e11b815260040160405180910390fd5b6001600160a01b038083165f90815260166020526040808220439081905592881682529020555b6001600160a01b0386165f9081526015602052604090205460ff168015611b4957506001600160a01b0385165f9081526014602052604090205460ff16155b15611bba57600b54841115611b71576040516344df090f60e11b815260040160405180910390fd5b600d546001600160a01b0386165f90815260016020526040902054611b96908661258e565b1115611bb557604051633b63e02960e11b815260040160405180910390fd5b611c84565b6001600160a01b0385165f9081526015602052604090205460ff168015611bf957506001600160a01b0386165f9081526014602052604090205460ff16155b15611c2157600c54841115611bb557604051630a8e28e160e41b815260040160405180910390fd5b6001600160a01b0385165f9081526014602052604090205460ff16611c8457600d546001600160a01b0386165f90815260016020526040902054611c65908661258e565b1115611c8457604051633b63e02960e11b815260040160405180910390fd5b6007545f90600160b01b900460ff168015611ca95750600754600160b81b900460ff16155b8015611cef57506001600160a01b0387165f9081526013602052604090205460ff1680611ced57506001600160a01b0386165f9081526013602052604090205460ff165b155b90508015611e10576001600160a01b0386165f9081526015602052604081205460ff168015611d1f57505f601054115b15611d4557606460105487611d349190612545565b611d3e919061255c565b9050611df1565b6001600160a01b0388165f9081526015602052604090205460ff168015611d6d57505f600f54115b15611d82576064600f5487611d349190612545565b6001600160a01b0387165f9081526015602052604090205460ff16158015611dc257506001600160a01b0388165f9081526015602052604090205460ff16155b8015611dcf57505f601154115b15611df157606460115487611de49190612545565b611dee919061255c565b90505b8015611e0e57611e01818761257b565b9550611e0e883083611ee2565b505b305f90815260016020526040902054600e54811015828015611e4a57506001600160a01b0389165f9081526015602052604090205460ff16155b8015611e535750805b15611e7d57600a5443118015611e6a575060085443115b15611e7d57611e7882612008565b43600a555b611e88898989611ee2565b505050505050505050565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038316611f0c578060035f828254611f01919061258e565b90915550611f7c9050565b6001600160a01b0383165f9081526001602052604090205481811015611f5e5760405163391434e360e21b81526001600160a01b0385166004820152602481018290526044810183905260640161137f565b6001600160a01b0384165f9081526001602052604090209082900390555b6001600160a01b038216611f9857600380548290039055611fb6565b6001600160a01b0382165f9081526001602052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051611ffb91815260200190565b60405180910390a3505050565b6007805460ff60b81b1916600160b81b1790556040805160028082526060820183525f928392919060208301908036833701905050905030815f81518110612052576120526124eb565b60200260200101906001600160a01b031690816001600160a01b0316815250507f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa1580156120ce573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906120f291906125a1565b81600181518110612105576121056124eb565b60200260200101906001600160a01b031690816001600160a01b0316815250505f600e5460146121359190612545565b905080841115612143578093505b60405163791ac94760e01b81526001600160a01b037f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d169063791ac947906121979087905f908790309042906004016125bc565b5f604051808303815f87803b1580156121ae575f5ffd5b505af11580156121c0573d5f5f3e3d5ffd5b504792505f91506121d4905060028361255c565b90505f6121e1828461257b565b6006546040519192506001600160a01b03169083905f81818185875af1925050503d805f811461222c576040519150601f19603f3d011682016040523d82523d5f602084013e612231565b606091505b50506007546040519197506001600160a01b03169082905f81818185875af1925050503d805f811461227e576040519150601f19603f3d011682016040523d82523d5f602084013e612283565b606091505b50506007805460ff60b81b191690555050505050505050565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b6001600160a01b0381168114611391575f5ffd5b5f5f604083850312156122f6575f5ffd5b8235612301816122d1565b946020939093013593505050565b8015158114611391575f5ffd5b5f5f5f6040848603121561232e575f5ffd5b833567ffffffffffffffff811115612344575f5ffd5b8401601f81018613612354575f5ffd5b803567ffffffffffffffff81111561236a575f5ffd5b8660208260051b840101111561237e575f5ffd5b6020918201945092508401356123938161230f565b809150509250925092565b5f602082840312156123ae575f5ffd5b81356123b9816122d1565b9392505050565b5f5f5f606084860312156123d2575f5ffd5b83356123dd816122d1565b925060208401356123ed816122d1565b929592945050506040919091013590565b5f6020828403121561240e575f5ffd5b5035919050565b5f5f60408385031215612426575f5ffd5b50508035926020909101359150565b5f60208284031215612445575f5ffd5b81356123b98161230f565b5f5f60408385031215612461575f5ffd5b823561246c816122d1565b9150602083013561247c8161230f565b809150509250929050565b5f5f60408385031215612498575f5ffd5b82356124a3816122d1565b9150602083013561247c816122d1565b600181811c908216806124c757607f821691505b6020821081036124e557634e487b7160e01b5f52602260045260245ffd5b50919050565b634e487b7160e01b5f52603260045260245ffd5b5f6020828403121561250f575f5ffd5b5051919050565b5f60208284031215612526575f5ffd5b81516123b98161230f565b634e487b7160e01b5f52601160045260245ffd5b8082028115828204841417610a3657610a36612531565b5f8261257657634e487b7160e01b5f52601260045260245ffd5b500490565b81810381811115610a3657610a36612531565b80820180821115610a3657610a36612531565b5f602082840312156125b1575f5ffd5b81516123b9816122d1565b5f60a0820187835286602084015260a0604084015280865180835260c0850191506020880192505f5b8181101561260c5783516001600160a01b03168352602093840193909201916001016125e5565b50506001600160a01b03959095166060840152505060800152939250505056fea26469706673582212201d78fdc236b5657861d9c767daaaea121e58874e02bc0b73d13807d09744834c64736f6c634300081c0033

Verified Source Code Full Match

Compiler: v0.8.28+commit.7893614a EVM: cancun Optimization: Yes (200 runs)
PILLAR.sol 1172 lines
// SPDX-License-Identifier: MIT
pragma solidity 0.8.28;

// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)
/**
 * @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 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);
}

// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Metadata.sol)

/**
 * @dev Interface for the optional metadata functions from the ERC20 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);
}

// OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol)

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

// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol)

/**
 * @dev Standard ERC20 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 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 ERC721 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens.
 */
interface IERC721Errors {
    /**
     * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-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 ERC1155 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 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);
}

// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/ERC20.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 ERC20
 * applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 */
abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {
    mapping(address => uint256) private _balances;

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

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * All two of these 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}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * 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:
     * ```
     * 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);
            }
        }
    }
}

// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.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);
    }
}

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

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;
}

pragma solidity ^0.8.0;

contract PILLAR is Ownable, ERC20 {
    IUniswapV2Router public immutable swapRouter;

    address public constant ZERO_ADDRESS = address(0);
    address public constant BURN_ADDRESS = address(0xdEaD);

    address public immutable swapPair;
    address public taxWallet;
    address public devWallet;

    bool public limitsEnabled;
    bool public cooldownEnabled;
    bool public feesEnabled;
    bool private inSwapProcess;
    bool public isActivated;

    uint256 public activationBlock;
    uint256 public activationTime;

    uint256 private lastSwapBlock;

    uint256 public constant MAX_TOTAL_FEE = 35;

    uint256 public maxBuyLimit;
    uint256 public maxSellLimit;
    uint256 public maxWalletLimit;

    uint256 public tokensForSwap;
    uint256 public buyTax;
    uint256 public sellTax;
    uint256 public transferTax;

    mapping(address => bool) public blacklistedBots;
    mapping(address => bool) public excludedFromFees;
    mapping(address => bool) public excludedFromLimits;
    mapping(address => bool) public marketPairs;
    mapping(address => uint256) private _lastTransferBlock;

    event Activation();
    event taxWalletUpdated(address newWallet, address oldWallet);
    event DevWalletUpdated(address newWallet, address oldWallet);
    event LimitsStatusChanged(bool status);
    event CooldownStatusChanged(bool status);
    event FeesStatusChanged(bool status);
    event MaxBuyLimitUpdated(uint256 amount);
    event MaxSellLimitUpdated(uint256 amount);
    event MaxWalletLimitUpdated(uint256 amount);
    event TokensForSwapUpdated(uint256 newValue, uint256 oldValue);
    event BuyTaxUpdated(uint256 newValue, uint256 oldValue);
    event SellTaxUpdated(uint256 newValue, uint256 oldValue);
    event TransferTaxUpdated(uint256 newValue, uint256 oldValue);
    event ExcludedFromFees(address account, bool isExcluded);
    event ExcludedFromLimits(address account, bool isExcluded);
    event BotStatusUpdated(address account, bool isBlacklisted);
    event MarketPairStatusUpdated(address pair, bool value);
    event StuckTokensWithdrawn(address token, uint256 amount);

    error AlreadyActivated();
    error InvalidAddress();
    error AmountTooSmall();
    error AmountTooLarge();
    error FeeTooHigh();
    error PairAlreadySet();
    error NoETHToWithdraw();
    error NoTokensToWithdraw();
    error ETHWithdrawalFailed();
    error BotActivityDetected();
    error TransferCooldown();
    error ExceedsMaxBuyLimit();
    error ExceedsMaxSellLimit();
    error ExceedsMaxWalletLimit();
    error NotActivated();

    modifier lockSwapProcess() {
        inSwapProcess = true;
        _;
        inSwapProcess = false;
    }

    constructor() Ownable(msg.sender) ERC20("Pillar Finance", "PILLAR") {
        address owner = msg.sender;
        _mint(owner, 100_000_000 ether);
        uint256 totalSupplyTokens = totalSupply();

        taxWallet = 0x62E1D168f28e970370b3359Cf58653db79f33C61;
        devWallet = 0x5d5B4253AD0C7e927B5ed3efC3c43D899076779D;

        maxBuyLimit = (totalSupplyTokens * 1) / 100;
        maxSellLimit = (totalSupplyTokens * 1) / 100;
        maxWalletLimit = (totalSupplyTokens * 1) / 100;
        tokensForSwap = (totalSupplyTokens * 5) / 10000;

        limitsEnabled = true;
        cooldownEnabled = false;
        feesEnabled = true;

        buyTax = 30;
        sellTax = 35;
        transferTax = 0;

        swapRouter = IUniswapV2Router(
            0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D
        );

        swapPair = IUniswapV2Factory(swapRouter.factory()).createPair(
            address(this),
            swapRouter.WETH()
        );

        _setMarketPair(swapPair, true);
        _approve(address(this), address(swapRouter), type(uint256).max);
        _excludeFromFees(address(this), true);
        _excludeFromFees(BURN_ADDRESS, true);
        _excludeFromFees(owner, true);
        _excludeFromFees(taxWallet, true);
        _excludeFromFees(devWallet, true);
        _excludeFromLimits(address(this), true);
        _excludeFromLimits(BURN_ADDRESS, true);
        _excludeFromLimits(owner, true);
        _excludeFromLimits(taxWallet, true);
        _excludeFromLimits(devWallet, true);
    }

    receive() external payable {}

    fallback() external payable {}

    function _transferOwnership(address newOwner) internal override {
        address oldOwner = owner();
        if (oldOwner != ZERO_ADDRESS) {
            _excludeFromFees(oldOwner, false);
            _excludeFromLimits(oldOwner, false);
        }
        _excludeFromFees(newOwner, true);
        _excludeFromLimits(newOwner, true);
        super._transferOwnership(newOwner);
    }

    function activateTrading() external onlyOwner {
        require(!isActivated, AlreadyActivated());
        isActivated = true;
        activationBlock = block.number;
        activationTime = block.timestamp;
        emit Activation();
    }

    function updatetaxWallet(address _taxWallet) external onlyOwner {
        require(_taxWallet != ZERO_ADDRESS, InvalidAddress());
        address oldWallet = taxWallet;
        taxWallet = _taxWallet;
        emit taxWalletUpdated(taxWallet, oldWallet);
    }

    function updateDevWallet(address _devWallet) external onlyOwner {
        require(_devWallet != ZERO_ADDRESS, InvalidAddress());
        address oldWallet = devWallet;
        devWallet = _devWallet;
        emit DevWalletUpdated(devWallet, oldWallet);
    }

    function changeLimitsEnabled(bool value) external onlyOwner {
        limitsEnabled = value;
        emit LimitsStatusChanged(value);
    }

    function changeCooldownEnabled(bool value) external onlyOwner {
        cooldownEnabled = value;
        emit CooldownStatusChanged(value);
    }

    function setFeesEnabled(bool value) external onlyOwner {
        feesEnabled = value;
        emit FeesStatusChanged(value);
    }

    function setMaxBuyLimit(uint256 amount) external onlyOwner {
        maxBuyLimit = amount;
        emit MaxBuyLimitUpdated(maxBuyLimit);
    }

    function setMaxSellLimit(uint256 amount) external onlyOwner {
        maxSellLimit = amount;
        emit MaxSellLimitUpdated(maxSellLimit);
    }

    function setMaxWalletLimit(uint256 amount) external onlyOwner {
        maxWalletLimit = amount;
        emit MaxWalletLimitUpdated(maxWalletLimit);
    }

    function setTokensForSwap(uint256 amount) external onlyOwner {
        uint256 totalSupplyTokens = totalSupply();
        require(amount >= (totalSupplyTokens * 1) / 1000000, AmountTooSmall());
        require(amount <= (totalSupplyTokens * 5) / 1000, AmountTooLarge());
        uint256 oldValue = tokensForSwap;
        tokensForSwap = amount;
        emit TokensForSwapUpdated(amount, oldValue);
    }

    function setTax(uint256 _buyTax, uint256 _sellTax) external onlyOwner {
        buyTax = _buyTax;
        sellTax = _sellTax;
    }

    function changeTransferTax(uint256 _transferTax) external onlyOwner {
        uint256 oldValue = transferTax;
        transferTax = _transferTax;
        emit TransferTaxUpdated(_transferTax, 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 setBlacklistedBots(
        address[] calldata accounts,
        bool value
    ) external onlyOwner {
        for (uint256 i = 0; i < accounts.length; i++) {
            if (
                (!marketPairs[accounts[i]]) &&
                (accounts[i] != address(swapRouter)) &&
                (accounts[i] != address(this)) &&
                (accounts[i] != ZERO_ADDRESS) &&
                (!excludedFromFees[accounts[i]] &&
                    !excludedFromLimits[accounts[i]])
            ) _updateBotStatus(accounts[i], value);
        }
    }

    function setMarketPair(address pair, bool value) external onlyOwner {
        require(!marketPairs[pair], PairAlreadySet());
        _setMarketPair(pair, value);
    }

    function clearStuckTokens(address _token) external onlyOwner {
        address owner = msg.sender;
        uint256 amount;
        if (_token == ZERO_ADDRESS) {
            bool success;
            amount = address(this).balance;
            require(amount > 0, NoETHToWithdraw());
            (success, ) = address(owner).call{value: amount}("");
            require(success, ETHWithdrawalFailed());
        } else {
            amount = IERC20(_token).balanceOf(address(this));
            require(amount > 0, NoTokensToWithdraw());
            IERC20(_token).transfer(msg.sender, amount);
        }
        emit StuckTokensWithdrawn(_token, amount);
    }

    function _update(
        address from,
        address to,
        uint256 amount
    ) internal virtual override {
        address sender = msg.sender;
        address origin = tx.origin;

        require(!blacklistedBots[from], BotActivityDetected());
        require(
            sender == from || !blacklistedBots[sender],
            BotActivityDetected()
        );
        require(
            origin == from || origin == sender || !blacklistedBots[origin],
            BotActivityDetected()
        );

        require(
            isActivated || excludedFromLimits[from] || excludedFromLimits[to],
            NotActivated()
        );

        bool applyLimits = limitsEnabled &&
            !inSwapProcess &&
            !(excludedFromLimits[from] || excludedFromLimits[to]);
        if (applyLimits) {
            if (
                from != owner() &&
                to != owner() &&
                to != ZERO_ADDRESS &&
                to != BURN_ADDRESS
            ) {
                if (cooldownEnabled) {
                    if (to != address(swapRouter) && to != swapPair) {
                        require(
                            _lastTransferBlock[origin] < block.number - 3 &&
                                _lastTransferBlock[to] < block.number - 3,
                            TransferCooldown()
                        );
                        _lastTransferBlock[origin] = block.number;
                        _lastTransferBlock[to] = block.number;
                    }
                }

                if (marketPairs[from] && !excludedFromLimits[to]) {
                    require(amount <= maxBuyLimit, ExceedsMaxBuyLimit());
                    require(
                        amount + balanceOf(to) <= maxWalletLimit,
                        ExceedsMaxWalletLimit()
                    );
                } else if (marketPairs[to] && !excludedFromLimits[from]) {
                    require(amount <= maxSellLimit, ExceedsMaxSellLimit());
                } else if (!excludedFromLimits[to]) {
                    require(
                        amount + balanceOf(to) <= maxWalletLimit,
                        ExceedsMaxWalletLimit()
                    );
                }
            }
        }

        bool applyFee = feesEnabled &&
            !inSwapProcess &&
            !(excludedFromFees[from] || excludedFromFees[to]);

        if (applyFee) {
            uint256 feeAmount = 0;
            if (marketPairs[to] && sellTax > 0) {
                feeAmount = (amount * sellTax) / 100;
            } else if (marketPairs[from] && buyTax > 0) {
                feeAmount = (amount * buyTax) / 100;
            } else if (
                !marketPairs[to] && !marketPairs[from] && transferTax > 0
            ) {
                feeAmount = (amount * transferTax) / 100;
            }

            if (feeAmount > 0) {
                amount -= feeAmount;
                super._update(from, address(this), feeAmount);
            }
        }

        uint256 contractTokenBalance = balanceOf(address(this));
        bool canSwap = contractTokenBalance >= tokensForSwap;
        if (applyFee && !marketPairs[from] && canSwap) {
            if (block.number > lastSwapBlock && block.number > activationBlock) {
                _swapTokens(contractTokenBalance);
                lastSwapBlock = block.number;
            }
        }

        super._update(from, to, amount);
    }

    function _swapTokens(uint256 tokenAmount) internal virtual lockSwapProcess {
        bool success;
        address[] memory path = new address[](2);
        path[0] = address(this);
        path[1] = swapRouter.WETH();

        uint256 maxSwapAmount = tokensForSwap * 20;

        if (tokenAmount > maxSwapAmount) {
            tokenAmount = maxSwapAmount;
        }

        swapRouter.swapExactTokensForETHSupportingFeeOnTransferTokens(
            tokenAmount,
            0,
            path,
            address(this),
            block.timestamp
        );

        uint256 ethBalance = address(this).balance;

        uint256 ethForRevenue = ethBalance / 2;
        uint256 ethForDevelopment = ethBalance - ethForRevenue;

        (success, ) = address(taxWallet).call{value: ethForRevenue}("");
        (success, ) = address(devWallet).call{value: ethForDevelopment}("");
    }

    function _excludeFromFees(address account, bool value) internal virtual {
        excludedFromFees[account] = value;
        emit ExcludedFromFees(account, value);
    }

    function _excludeFromLimits(address account, bool value) internal virtual {
        excludedFromLimits[account] = value;
        emit ExcludedFromLimits(account, value);
    }

    function _updateBotStatus(address account, bool value) internal virtual {
        blacklistedBots[account] = value;
        emit BotStatusUpdated(account, value);
    }

    function _setMarketPair(address pair, bool value) internal virtual {
        marketPairs[pair] = value;
        emit MarketPairStatusUpdated(pair, value);
    }
}

Read Contract

BURN_ADDRESS 0xfccc2813 → address
MAX_TOTAL_FEE 0x7f635cc0 → uint256
ZERO_ADDRESS 0x538ba4f9 → address
activationBlock 0x80faa3d2 → uint256
activationTime 0xda4493f6 → uint256
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
blacklistedBots 0x259827e3 → bool
buyTax 0x4f7041a5 → uint256
cooldownEnabled 0xa985ceef → bool
decimals 0x313ce567 → uint8
devWallet 0x8ea5220f → address
excludedFromFees 0xdbe66ca0 → bool
excludedFromLimits 0x7b812b41 → bool
feesEnabled 0xa64e4f8a → bool
isActivated 0x4a8c1fb4 → bool
limitsEnabled 0x3582ad23 → bool
marketPairs 0xb4b11b95 → bool
maxBuyLimit 0x6aa5b37f → uint256
maxSellLimit 0x652e2f04 → uint256
maxWalletLimit 0x66a88d96 → uint256
name 0x06fdde03 → string
owner 0x8da5cb5b → address
sellTax 0xcc1776d3 → uint256
swapPair 0x26991cc8 → address
swapRouter 0xc31c9c07 → address
symbol 0x95d89b41 → string
taxWallet 0x2dc0562d → address
tokensForSwap 0x1ecd7d6e → uint256
totalSupply 0x18160ddd → uint256
transferTax 0x8124f7ac → uint256

Write Contract 22 functions

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

activateTrading 0x0bd05b69
No parameters
approve 0x095ea7b3
address spender
uint256 value
returns: bool
changeCooldownEnabled 0x68b69b9b
bool value
changeLimitsEnabled 0xce657cce
bool value
changeTransferTax 0xda0103bd
uint256 _transferTax
clearStuckTokens 0x346cc7be
address _token
excludeFromFees 0xad29ffde
address[] accounts
bool value
excludeFromLimits 0x106a5a8f
address[] accounts
bool value
renounceOwnership 0x715018a6
No parameters
setBlacklistedBots 0x2f6f30ea
address[] accounts
bool value
setFeesEnabled 0xa901dd92
bool value
setMarketPair 0xc16dd4a4
address pair
bool value
setMaxBuyLimit 0x757765f8
uint256 amount
setMaxSellLimit 0x36884b6e
uint256 amount
setMaxWalletLimit 0x728d41c9
uint256 amount
setTax 0x667f6526
uint256 _buyTax
uint256 _sellTax
setTokensForSwap 0xa49a910f
uint256 amount
transfer 0xa9059cbb
address to
uint256 value
returns: bool
transferFrom 0x23b872dd
address from
address to
uint256 value
returns: bool
transferOwnership 0xf2fde38b
address newOwner
updateDevWallet 0x1816467f
address _devWallet
updatetaxWallet 0xf5fc361c
address _taxWallet

Recent Transactions

No transactions found for this address