Address Contract Partially Verified
Address
0x8079751Edb6Bf16078B07585eE60010f430617D5
Balance
0 ETH
Nonce
1
Code Size
10277 bytes
Creator
0x4c147F12...A63E at tx 0x56e84f90...3fac89
Indexed Transactions
0
Contract Bytecode
10277 bytes
0x60806040526004361061030e575f3560e01c80638da5cb5b11610195578063cb963728116100ea578063e6c1909b1161008e578063f2fde38b1161006b578063f2fde38b14610960578063f53bc8351461097f578063f8b45b051461099e578063fd72e22a146109b357005b8063e6c1909b14610902578063ee5ecc8914610922578063ef998cf01461094157005b8063d5759ba3116100c7578063d5759ba31461086a578063dcf7aef31461088a578063dd62ed3e146108a9578063e2f45605146108ed57005b8063cb96372814610817578063d00efb2f14610836578063d26ed3e31461084b57005b8063acb2ad6f11610151578063b62496f51161012e578063b62496f5146107a1578063b8eb3546146107cf578063bc063e1a146107e4578063c04a5414146107f857005b8063acb2ad6f1461074e578063ad29ffde14610763578063afa4f3b21461078257005b80638da5cb5b146106a257806395927c25146106be57806395d89b41146106dd5780639a7a23d6146106f15780639c0db5f314610710578063a9059cbb1461072f57005b806349bd5a5e116102635780635d0044ca1161020757806370db69d6116101e457806370db69d614610645578063715018a61461065a57806372ac24861461066e578063790ca4131461068d57005b80635d0044ca146105d25780636ca541e5146105f157806370a082311461061157005b8063538ba4f911610240578063538ba4f9146105535780635932ead11461056657806359512ab0146105855780635cce86cd146105a457005b806349bd5a5e146104dd5780634e6fd6c4146105105780634fbee1931461052557005b806323b872dd116102ca578063313ce567116102a7578063313ce567146104605780633bbac5791461047b57806341aea9de146104a957806347062402146104c857005b806323b872dd1461040c5780632b14ca561461042b578063307aebc91461044057005b806301339c211461031757806306fdde031461032b578063095ea7b314610355578063106a5a8f146103845780631694505e146103a357806318160ddd146103ee57005b3661031557005b005b348015610322575f80fd5b506103156109d2565b348015610336575f80fd5b5061033f610a52565b60405161034c9190612460565b60405180910390f35b348015610360575f80fd5b5061037461036f3660046124a9565b610ae2565b604051901515815260200161034c565b34801561038f575f80fd5b5061031561039e3660046124e0565b610afb565b3480156103ae575f80fd5b506103d67f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d81565b6040516001600160a01b03909116815260200161034c565b3480156103f9575f80fd5b506003545b60405190815260200161034c565b348015610417575f80fd5b50610374610426366004612562565b610b4b565b348015610436575f80fd5b506103fe60105481565b34801561044b575f80fd5b5060075461037490600160c01b900460ff1681565b34801561046b575f80fd5b506040516012815260200161034c565b348015610486575f80fd5b506103746104953660046125a0565b60126020525f908152604090205460ff1681565b3480156104b4575f80fd5b506103156104c33660046125c2565b610b6e565b3480156104d3575f80fd5b506103fe600f5481565b3480156104e8575f80fd5b506103d67f000000000000000000000000f6527fa6d4daa480a66f4bfa8f647041323790b981565b34801561051b575f80fd5b506103d661dead81565b348015610530575f80fd5b5061037461053f3660046125a0565b60136020525f908152604090205460ff1681565b34801561055e575f80fd5b506103d65f81565b348015610571575f80fd5b506103156105803660046125c2565b610bce565b348015610590575f80fd5b5061031561059f3660046125c2565b610c23565b3480156105af575f80fd5b506103746105be3660046125a0565b60146020525f908152604090205460ff1681565b3480156105dd575f80fd5b506103156105ec3660046125dd565b610c78565b3480156105fc575f80fd5b5060075461037490600160a81b900460ff1681565b34801561061c575f80fd5b506103fe61062b3660046125a0565b6001600160a01b03165f9081526001602052604090205490565b348015610650575f80fd5b506103fe600b5481565b348015610665575f80fd5b50610315610cf5565b348015610679575f80fd5b506103156106883660046125a0565b610d08565b348015610698575f80fd5b506103fe60095481565b3480156106ad575f80fd5b505f546001600160a01b03166103d6565b3480156106c9575f80fd5b506103156106d83660046125dd565b610d96565b3480156106e8575f80fd5b5061033f610dfd565b3480156106fc575f80fd5b5061031561070b3660046125f4565b610e0c565b34801561071b575f80fd5b5061031561072a3660046124e0565b610e5a565b34801561073a575f80fd5b506103746107493660046124a9565b611067565b348015610759575f80fd5b506103fe60115481565b34801561076e575f80fd5b5061031561077d3660046124e0565b611074565b34801561078d575f80fd5b5061031561079c3660046125dd565b6110be565b3480156107ac575f80fd5b506103746107bb3660046125a0565b60156020525f908152604090205460ff1681565b3480156107da575f80fd5b506103fe600c5481565b3480156107ef575f80fd5b506103fe601981565b348015610803575f80fd5b506007546103d6906001600160a01b031681565b348015610822575f80fd5b506103156108313660046125a0565b611188565b348015610841575f80fd5b506103fe60085481565b348015610856575f80fd5b506103156108653660046125dd565b61136a565b348015610875575f80fd5b5060075461037490600160a01b900460ff1681565b348015610895575f80fd5b506103156108a43660046125dd565b6113d1565b3480156108b4575f80fd5b506103fe6108c336600461262b565b6001600160a01b039182165f90815260026020908152604080832093909416825291909152205490565b3480156108f8575f80fd5b506103fe600e5481565b34801561090d575f80fd5b5060075461037490600160b01b900460ff1681565b34801561092d575f80fd5b5061031561093c3660046125a0565b611438565b34801561094c575f80fd5b5061031561095b3660046125dd565b6114be565b34801561096b575f80fd5b5061031561097a3660046125a0565b61153b565b34801561098a575f80fd5b506103156109993660046125dd565b611578565b3480156109a9575f80fd5b506103fe600d5481565b3480156109be575f80fd5b506006546103d6906001600160a01b031681565b6109da6115f5565b600754600160c01b900460ff1615610a0d5760405162461bcd60e51b8152600401610a0490612657565b60405180910390fd5b6007805460ff60c01b1916600160c01b17905543600855426009556040517f02ac8168caf2f254b394bd39e19417c5c28124ab89c9bc2d44921b19808e2669905f90a1565b606060048054610a6190612676565b80601f0160208091040260200160405190810160405280929190818152602001828054610a8d90612676565b8015610ad85780601f10610aaf57610100808354040283529160200191610ad8565b820191905f5260205f20905b815481529060010190602001808311610abb57829003601f168201915b5050505050905090565b5f33610aef818585611621565b60019150505b92915050565b610b036115f5565b5f5b82811015610b4557610b3d848483818110610b2257610b226126ae565b9050602002016020810190610b3791906125a0565b83611633565b600101610b05565b50505050565b5f33610b5885828561168e565b610b63858585611703565b506001949350505050565b610b766115f5565b60078054821515600160a01b0260ff60a01b199091161790556040517ff771b1e218dc92494b39e21852f9c24c3b448d6697c2b485cc1f0cff3c9ec78190610bc390831515815260200190565b60405180910390a150565b610bd66115f5565b60078054821515600160a81b0260ff60a81b199091161790556040517f381fb4c4aa72df83c60e7e567b9b6faf3fc2b05a6da932da9f071d63442c828f90610bc390831515815260200190565b610c2b6115f5565b60078054821515600160b01b0260ff60b01b199091161790556040517f06cf69227e5c2b5a71319bc3784f6a5355ea0ba2a69bc4c39d64413dfa5a012b90610bc390831515815260200190565b610c806115f5565b6103e8610c8c60035490565b610c979060036126d6565b610ca191906126ed565b811015610cc05760405162461bcd60e51b8152600401610a0490612657565b600d8190556040518181527fa2c87c3e7a3048198ae94e814f6a27e12a4e2a7476e33a0db4d97ffeaf63618690602001610bc3565b610cfd6115f5565b610d065f611760565b565b610d106115f5565b6001600160a01b038116610d365760405162461bcd60e51b8152600401610a0490612657565b600780546001600160a01b038381166001600160a01b03198316811790935560408051938452911660208301819052917f2b355c7f17401d9755d704a4cf6149a26deb56a381bb5d06c87b608183dbe09c91015b60405180910390a15050565b610d9e6115f5565b6019811115610dbf5760405162461bcd60e51b8152600401610a0490612657565b601080549082905560408051838152602081018390527f125b37650f21d088600cef1223439f6a8bd70800debfd486c503a8a2d19d4b019101610d8a565b606060058054610a6190612676565b610e146115f5565b6001600160a01b0382165f9081526015602052604090205460ff1615610e4c5760405162461bcd60e51b8152600401610a0490612657565b610e5682826117a4565b5050565b610e626115f5565b5f5b82811015610b455760155f858584818110610e8157610e816126ae565b9050602002016020810190610e9691906125a0565b6001600160a01b0316815260208101919091526040015f205460ff16158015610f1757507f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b0316848483818110610ef657610ef66126ae565b9050602002016020810190610f0b91906125a0565b6001600160a01b031614155b8015610f52575030848483818110610f3157610f316126ae565b9050602002016020810190610f4691906125a0565b6001600160a01b031614155b8015610f8d57505f848483818110610f6c57610f6c6126ae565b9050602002016020810190610f8191906125a0565b6001600160a01b031614155b801561102a575060135f858584818110610fa957610fa96126ae565b9050602002016020810190610fbe91906125a0565b6001600160a01b0316815260208101919091526040015f205460ff1615801561102a575060145f858584818110610ff757610ff76126ae565b905060200201602081019061100c91906125a0565b6001600160a01b0316815260208101919091526040015f205460ff16155b1561105f5761105f848483818110611044576110446126ae565b905060200201602081019061105991906125a0565b836117ff565b600101610e64565b5f33610aef818585611703565b61107c6115f5565b5f5b82811015610b45576110b684848381811061109b5761109b6126ae565b90506020020160208101906110b091906125a0565b8361185a565b60010161107e565b6110c66115f5565b5f6110d060035490565b9050620f42406110e18260016126d6565b6110eb91906126ed565b82101561110a5760405162461bcd60e51b8152600401610a0490612657565b6103e86111188260056126d6565b61112291906126ed565b8211156111415760405162461bcd60e51b8152600401610a0490612657565b600e80549083905560408051848152602081018390527f190dc7c30bc62ef30e35c5f5512ad715a1bd03230f2d89c965249246c8d8ecca91015b60405180910390a1505050565b6111906115f5565b335f6001600160a01b0383166112345750475f816111c05760405162461bcd60e51b8152600401610a0490612657565b6040516001600160a01b0384169083905f81818185875af1925050503d805f8114611206576040519150601f19603f3d011682016040523d82523d5f602084013e61120b565b606091505b5050809150508061122e5760405162461bcd60e51b8152600401610a0490612657565b5061132b565b6040516370a0823160e01b81523060048201526001600160a01b038416906370a0823190602401602060405180830381865afa158015611276573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061129a919061270c565b90505f81116112bb5760405162461bcd60e51b8152600401610a0490612657565b60405163a9059cbb60e01b8152336004820152602481018290526001600160a01b0384169063a9059cbb906044016020604051808303815f875af1158015611305573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906113299190612723565b505b604080516001600160a01b0385168152602081018390527f07c81a5e6d155913a9ed2ce53630058179c89fc94bb5de130620b0245c9f6a0b910161117b565b6113726115f5565b60198111156113935760405162461bcd60e51b8152600401610a0490612657565b601180549082905560408051838152602081018390527f8fd531ce6f3cbc5b8cc01a0413b630e3f11569780ee5cf8d0c78e03bca30bc259101610d8a565b6113d96115f5565b60198111156113fa5760405162461bcd60e51b8152600401610a0490612657565b600f80549082905560408051838152602081018390527f5fcc0eea159d45a3b8d481be746c9beed251431a542a5fed4484be37ab783e8d9101610d8a565b6114406115f5565b6001600160a01b0381166114665760405162461bcd60e51b8152600401610a0490612657565b600680546001600160a01b038381166001600160a01b03198316811790935560408051938452911660208301819052917fe20a721838fcbbb3840bd5d97dde1ffeb479fe73d75736fa6fdfc0f220aae0059101610d8a565b6114c66115f5565b6103e86114d260035490565b6114dd9060026126d6565b6114e791906126ed565b8110156115065760405162461bcd60e51b8152600401610a0490612657565b600c8190556040518181527f3c0ac525ebd597ae4e1201e687d8a7424b740a53b775b1527eb1c1936c1bd3b790602001610bc3565b6115436115f5565b6001600160a01b03811661156c57604051631e4fbdf760e01b81525f6004820152602401610a04565b61157581611760565b50565b6115806115f5565b6103e861158c60035490565b6115979060026126d6565b6115a191906126ed565b8110156115c05760405162461bcd60e51b8152600401610a0490612657565b600b8190556040518181527f16fd9174d80e7089ed0c10c47c8079476be2ec28b97c4b40846cffd8a7aa9e9f90602001610bc3565b5f546001600160a01b03163314610d065760405163118cdaa760e01b8152336004820152602401610a04565b61162e83838360016118b5565b505050565b6001600160a01b0382165f81815260146020908152604091829020805460ff19168515159081179091558251938452908301527f4b89c347592b1d537e066cb4ed98d87696ae35164745d7e370e4add16941dc929101610d8a565b6001600160a01b038381165f908152600260209081526040808320938616835292905220545f198114610b4557818110156116f557604051637dc7a0d960e11b81526001600160a01b03841660048201526024810182905260448101839052606401610a04565b610b4584848484035f6118b5565b6001600160a01b03831661172c57604051634b637e8f60e11b81525f6004820152602401610a04565b6001600160a01b0382166117555760405163ec442f0560e01b81525f6004820152602401610a04565b61162e838383611987565b5f546001600160a01b031680156117855761177b815f61185a565b611785815f611633565b61179082600161185a565b61179b826001611633565b610e5682612057565b6001600160a01b0382165f81815260156020908152604091829020805460ff19168515159081179091558251938452908301527fffa9187bf1f18bf477bd0ea1bcbb64e93b6a98132473929edfce215cd9b16fab9101610d8a565b6001600160a01b0382165f81815260126020908152604091829020805460ff19168515159081179091558251938452908301527ff7f8b40d08076851dfb7cfd6c584ae9a829a570f264abee45e0d7ca342ae8dc89101610d8a565b6001600160a01b0382165f81815260136020908152604091829020805460ff19168515159081179091558251938452908301527f9d8f7706ea1113d1a167b526eca956215946dd36cc7df39eb16180222d8b5df79101610d8a565b6001600160a01b0384166118de5760405163e602df0560e01b81525f6004820152602401610a04565b6001600160a01b03831661190757604051634a1406b160e11b81525f6004820152602401610a04565b6001600160a01b038085165f9081526002602090815260408083209387168352929052208290558015610b4557826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161197991815260200190565b60405180910390a350505050565b6001600160a01b0383165f908152601260205260409020543390329060ff16156119c35760405162461bcd60e51b8152600401610a0490612657565b846001600160a01b0316826001600160a01b031614806119fb57506001600160a01b0382165f9081526012602052604090205460ff16155b611a175760405162461bcd60e51b8152600401610a0490612657565b846001600160a01b0316816001600160a01b03161480611a485750816001600160a01b0316816001600160a01b0316145b80611a6b57506001600160a01b0381165f9081526012602052604090205460ff16155b611a875760405162461bcd60e51b8152600401610a0490612657565b600754600160c01b900460ff1680611ab657506001600160a01b0385165f9081526014602052604090205460ff165b80611ad857506001600160a01b0384165f9081526014602052604090205460ff165b611af45760405162461bcd60e51b8152600401610a0490612657565b6007545f90600160a01b900460ff168015611b195750600754600160b81b900460ff16155b8015611b5f57506001600160a01b0386165f9081526014602052604090205460ff1680611b5d57506001600160a01b0385165f9081526014602052604090205460ff165b155b90508015611e55575f546001600160a01b03878116911614801590611b9157505f546001600160a01b03868116911614155b8015611ba557506001600160a01b03851615155b8015611bbc57506001600160a01b03851661dead14155b15611e5557600754600160a81b900460ff1615611cdf577f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b0316856001600160a01b031614158015611c4757507f000000000000000000000000f6527fa6d4daa480a66f4bfa8f647041323790b96001600160a01b0316856001600160a01b031614155b15611cdf57611c5760034361273e565b6001600160a01b0383165f90815260166020526040902054108015611c9c5750611c8260034361273e565b6001600160a01b0386165f90815260166020526040902054105b611cb85760405162461bcd60e51b8152600401610a0490612657565b6001600160a01b038083165f90815260166020526040808220439081905592881682529020555b6001600160a01b0386165f9081526015602052604090205460ff168015611d1e57506001600160a01b0385165f9081526014602052604090205460ff16155b15611d8d57600b54841115611d455760405162461bcd60e51b8152600401610a0490612657565b600d546001600160a01b0386165f90815260016020526040902054611d6a9086612751565b1115611d885760405162461bcd60e51b8152600401610a0490612657565b611e55565b6001600160a01b0385165f9081526015602052604090205460ff168015611dcc57506001600160a01b0386165f9081526014602052604090205460ff16155b15611df357600c54841115611d885760405162461bcd60e51b8152600401610a0490612657565b6001600160a01b0385165f9081526014602052604090205460ff16611e5557600d546001600160a01b0386165f90815260016020526040902054611e379086612751565b1115611e555760405162461bcd60e51b8152600401610a0490612657565b6007545f90600160b01b900460ff168015611e7a5750600754600160b81b900460ff16155b8015611ec057506001600160a01b0387165f9081526013602052604090205460ff1680611ebe57506001600160a01b0386165f9081526013602052604090205460ff165b155b90508015611fe1576001600160a01b0386165f9081526015602052604081205460ff168015611ef057505f601054115b15611f1657606460105487611f0591906126d6565b611f0f91906126ed565b9050611fc2565b6001600160a01b0388165f9081526015602052604090205460ff168015611f3e57505f600f54115b15611f53576064600f5487611f0591906126d6565b6001600160a01b0387165f9081526015602052604090205460ff16158015611f9357506001600160a01b0388165f9081526015602052604090205460ff16155b8015611fa057505f601154115b15611fc257606460115487611fb591906126d6565b611fbf91906126ed565b90505b8015611fdf57611fd2818761273e565b9550611fdf8830836120a6565b505b305f90815260016020526040902054600e5481101582801561201b57506001600160a01b0389165f9081526015602052604090205460ff16155b80156120245750805b1561204157600a544311156120415761203c826121cc565b43600a555b61204c8989896120a6565b505050505050505050565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b0383166120d0578060035f8282546120c59190612751565b909155506121409050565b6001600160a01b0383165f90815260016020526040902054818110156121225760405163391434e360e21b81526001600160a01b03851660048201526024810182905260448101839052606401610a04565b6001600160a01b0384165f9081526001602052604090209082900390555b6001600160a01b03821661215c5760038054829003905561217a565b6001600160a01b0382165f9081526001602052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516121bf91815260200190565b60405180910390a3505050565b6007805460ff60b81b1916600160b81b1790556040805160028082526060820183525f928392919060208301908036833701905050905030815f81518110612216576122166126ae565b60200260200101906001600160a01b031690816001600160a01b0316815250507f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015612292573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906122b69190612764565b816001815181106122c9576122c96126ae565b60200260200101906001600160a01b031690816001600160a01b0316815250505f600e5460046122f991906126d6565b905080841115612307578093505b60405163791ac94760e01b81526001600160a01b037f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d169063791ac9479061235b9087905f9087903090429060040161277f565b5f604051808303815f87803b158015612372575f80fd5b505af1158015612384573d5f803e3d5ffd5b504792505f915061239890506002836126ed565b90505f6123a5828461273e565b6006546040519192506001600160a01b03169083905f81818185875af1925050503d805f81146123f0576040519150601f19603f3d011682016040523d82523d5f602084013e6123f5565b606091505b50506007546040519197506001600160a01b03169082905f81818185875af1925050503d805f8114612442576040519150601f19603f3d011682016040523d82523d5f602084013e612447565b606091505b50506007805460ff60b81b191690555050505050505050565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b6001600160a01b0381168114611575575f80fd5b5f80604083850312156124ba575f80fd5b82356124c581612495565b946020939093013593505050565b8015158114611575575f80fd5b5f805f604084860312156124f2575f80fd5b833567ffffffffffffffff811115612508575f80fd5b8401601f81018613612518575f80fd5b803567ffffffffffffffff81111561252e575f80fd5b8660208260051b8401011115612542575f80fd5b602091820194509250840135612557816124d3565b809150509250925092565b5f805f60608486031215612574575f80fd5b833561257f81612495565b9250602084013561258f81612495565b929592945050506040919091013590565b5f602082840312156125b0575f80fd5b81356125bb81612495565b9392505050565b5f602082840312156125d2575f80fd5b81356125bb816124d3565b5f602082840312156125ed575f80fd5b5035919050565b5f8060408385031215612605575f80fd5b823561261081612495565b91506020830135612620816124d3565b809150509250929050565b5f806040838503121561263c575f80fd5b823561264781612495565b9150602083013561262081612495565b60208082526005908201526432b93937b960d91b604082015260600190565b600181811c9082168061268a57607f821691505b6020821081036126a857634e487b7160e01b5f52602260045260245ffd5b50919050565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b8082028115828204841417610af557610af56126c2565b5f8261270757634e487b7160e01b5f52601260045260245ffd5b500490565b5f6020828403121561271c575f80fd5b5051919050565b5f60208284031215612733575f80fd5b81516125bb816124d3565b81810381811115610af557610af56126c2565b80820180821115610af557610af56126c2565b5f60208284031215612774575f80fd5b81516125bb81612495565b5f60a0820187835286602084015260a0604084015280865180835260c0850191506020880192505f5b818110156127cf5783516001600160a01b03168352602093840193909201916001016127a8565b50506001600160a01b03959095166060840152505060800152939250505056fea2646970667358221220260f1a9c4df0a1ba225851e815307581584f59bfba31bb89e42f46b5478d3dd264736f6c634300081a0033
Verified Source Code Partial Match
Compiler: v0.8.26+commit.8a97fa7a
EVM: cancun
Optimization: Yes (200 runs)
hushr.sol 1204 lines
// SPDX-License-Identifier: MIT
pragma solidity 0.8.26;
// 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;
}
contract hushr is Ownable, ERC20 {
IUniswapV2Router public immutable uniswapV2Router;
address public constant ZERO_ADDRESS = address(0);
address public constant DEAD_ADDRESS = address(0xdEaD);
address public immutable uniswapV2Pair;
address public operationsWallet;
address public developmentWallet;
bool public isLimitsEnabled;
bool public isCooldownEnabled;
bool public isTaxEnabled;
bool private inSwapBack;
bool public isLaunched;
uint256 public launchBlock;
uint256 public launchTime;
uint256 private lastSwapBackExecutionBlock;
uint256 public constant MAX_FEE = 25;
uint256 public maxBuy;
uint256 public maxSell;
uint256 public maxWallet;
uint256 public swapTokensAtAmount;
uint256 public buyFee;
uint256 public sellFee;
uint256 public transferFee;
mapping(address => bool) public isBot;
mapping(address => bool) public isExcludedFromFees;
mapping(address => bool) public isExcludedFromLimits;
mapping(address => bool) public automatedMarketMakerPairs;
mapping(address => uint256) private _holderLastTransferTimestamp;
event Launch();
event SetOperationsWallet(address newWallet, address oldWallet);
event SetDevelopmentWallet(address newWallet, address oldWallet);
event SetLimitsEnabled(bool status);
event SetCooldownEnabled(bool status);
event SetTaxesEnabled(bool status);
event SetMaxBuy(uint256 amount);
event SetMaxSell(uint256 amount);
event SetMaxWallet(uint256 amount);
event SetSwapTokensAtAmount(uint256 newValue, uint256 oldValue);
event SetBuyFees(uint256 newValue, uint256 oldValue);
event SetSellFees(uint256 newValue, uint256 oldValue);
event SetTransferFees(uint256 newValue, uint256 oldValue);
event ExcludeFromFees(address account, bool isExcluded);
event ExcludeFromLimits(address account, bool isExcluded);
event SetBots(address account, bool isExcluded);
event SetAutomatedMarketMakerPair(address pair, bool value);
event WithdrawStuckTokens(address token, uint256 amount);
modifier lockSwapBack() {
inSwapBack = true;
_;
inSwapBack = false;
}
constructor() Ownable(msg.sender) ERC20("hushr", "HUSHR") {
address sender = msg.sender;
_mint(sender, 100_000_000 ether);
uint256 totalSupply = totalSupply();
operationsWallet = 0x73CC1C3f10093848520E97e04f35b746ba7E8562;
developmentWallet = 0x252b0E1503C8d87b7f594416831Aa472C50b9E67;
maxBuy = (totalSupply * 10) / 1000;
maxSell = (totalSupply * 10) / 1000;
maxWallet = (totalSupply * 10) / 1000;
swapTokensAtAmount = (totalSupply * 5) / 10000;
isLimitsEnabled = true;
isCooldownEnabled = true;
isTaxEnabled = true;
buyFee = 15;
sellFee = 35;
transferFee = 0;
uniswapV2Router = IUniswapV2Router(
0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D
);
uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory()).createPair(
address(this),
uniswapV2Router.WETH()
);
_setAutomatedMarketMakerPair(uniswapV2Pair, true);
_approve(address(this), address(uniswapV2Router), type(uint256).max);
_excludeFromFees(address(this), true);
_excludeFromFees(address(0xdead), true);
_excludeFromFees(sender, true);
_excludeFromFees(operationsWallet, true);
_excludeFromFees(developmentWallet, true);
_excludeFromLimits(address(this), true);
_excludeFromLimits(address(0xdead), true);
_excludeFromLimits(sender, true);
_excludeFromLimits(operationsWallet, true);
_excludeFromLimits(developmentWallet, true);
}
receive() external payable {}
fallback() external payable {}
function _transferOwnership(address newOwner) internal override {
address oldOwner = owner();
if (oldOwner != address(0)) {
_excludeFromFees(oldOwner, false);
_excludeFromLimits(oldOwner, false);
}
_excludeFromFees(newOwner, true);
_excludeFromLimits(newOwner, true);
super._transferOwnership(newOwner);
}
function launch() external onlyOwner {
require(!isLaunched, "error");
isLaunched = true;
launchBlock = block.number;
launchTime = block.timestamp;
emit Launch();
}
function setOperationsWallet(address _operationsWallet) external onlyOwner {
require(_operationsWallet != address(0), "error");
address oldWallet = operationsWallet;
operationsWallet = _operationsWallet;
emit SetOperationsWallet(operationsWallet, oldWallet);
}
function setDevelopmentWallet(address _developmentWallet)
external
onlyOwner
{
require(_developmentWallet != address(0), "error");
address oldWallet = developmentWallet;
developmentWallet = _developmentWallet;
emit SetDevelopmentWallet(developmentWallet, oldWallet);
}
function setLimitsEnabled(bool value) external onlyOwner {
isLimitsEnabled = value;
emit SetLimitsEnabled(value);
}
function setCooldownEnabled(bool value) external onlyOwner {
isCooldownEnabled = value;
emit SetCooldownEnabled(value);
}
function setTaxesEnabled(bool value) external onlyOwner {
isTaxEnabled = value;
emit SetTaxesEnabled(value);
}
function setMaxBuy(uint256 amount) external onlyOwner {
require(amount >= ((totalSupply() * 2) / 1000), "error");
maxBuy = amount;
emit SetMaxBuy(maxBuy);
}
function setMaxSell(uint256 amount) external onlyOwner {
require(amount >= ((totalSupply() * 2) / 1000), "error");
maxSell = amount;
emit SetMaxSell(maxSell);
}
function setMaxWallet(uint256 amount) external onlyOwner {
require(amount >= ((totalSupply() * 3) / 1000), "error");
maxWallet = amount;
emit SetMaxWallet(maxWallet);
}
function setSwapTokensAtAmount(uint256 amount) external onlyOwner {
uint256 _totalSupply = totalSupply();
require(amount >= (_totalSupply * 1) / 1000000, "error");
require(amount <= (_totalSupply * 5) / 1000, "error");
uint256 oldValue = swapTokensAtAmount;
swapTokensAtAmount = amount;
emit SetSwapTokensAtAmount(amount, oldValue);
}
function setBuyFees(uint256 _buyFee) external onlyOwner {
require(_buyFee <= MAX_FEE, "error");
uint256 oldValue = buyFee;
buyFee = _buyFee;
emit SetBuyFees(_buyFee, oldValue);
}
function setSellFees(uint256 _sellFee) external onlyOwner {
require(_sellFee <= MAX_FEE, "error");
uint256 oldValue = sellFee;
sellFee = _sellFee;
emit SetSellFees(_sellFee, oldValue);
}
function setTransferFees(uint256 _transferFee) external onlyOwner {
require(_transferFee <= MAX_FEE, "error");
uint256 oldValue = transferFee;
transferFee = _transferFee;
emit SetTransferFees(_transferFee, oldValue);
}
function excludeFromFees(address[] calldata accounts, bool value)
external
onlyOwner
{
for (uint256 i = 0; i < accounts.length; i++) {
_excludeFromFees(accounts[i], value);
}
}
function excludeFromLimits(address[] calldata accounts, bool value)
external
onlyOwner
{
for (uint256 i = 0; i < accounts.length; i++) {
_excludeFromLimits(accounts[i], value);
}
}
function setBots(address[] calldata accounts, bool value)
external
onlyOwner
{
for (uint256 i = 0; i < accounts.length; i++) {
if (
(!automatedMarketMakerPairs[accounts[i]]) &&
(accounts[i] != address(uniswapV2Router)) &&
(accounts[i] != address(this)) &&
(accounts[i] != ZERO_ADDRESS) &&
(!isExcludedFromFees[accounts[i]] &&
!isExcludedFromLimits[accounts[i]])
) _setBots(accounts[i], value);
}
}
function setAutomatedMarketMakerPair(address pair, bool value)
external
onlyOwner
{
require(!automatedMarketMakerPairs[pair], "error");
_setAutomatedMarketMakerPair(pair, value);
}
function withdrawStuckTokens(address _token) external onlyOwner {
address sender = msg.sender;
uint256 amount;
if (_token == ZERO_ADDRESS) {
bool success;
amount = address(this).balance;
require(amount > 0, "error");
(success, ) = address(sender).call{value: amount}("");
require(success, "error");
} else {
amount = IERC20(_token).balanceOf(address(this));
require(amount > 0, "error");
IERC20(_token).transfer(msg.sender, amount);
}
emit WithdrawStuckTokens(_token, amount);
}
function _update(
address from,
address to,
uint256 amount
) internal virtual override {
address sender = msg.sender;
address origin = tx.origin;
require(!isBot[from], "error");
require(sender == from || !isBot[sender], "error");
require(
origin == from || origin == sender || !isBot[origin],
"error"
);
require(
isLaunched ||
isExcludedFromLimits[from] ||
isExcludedFromLimits[to],
"error"
);
bool limits = isLimitsEnabled &&
!inSwapBack &&
!(isExcludedFromLimits[from] || isExcludedFromLimits[to]);
if (limits) {
if (
from != owner() &&
to != owner() &&
to != ZERO_ADDRESS &&
to != DEAD_ADDRESS
) {
if (isCooldownEnabled) {
if (to != address(uniswapV2Router) && to != uniswapV2Pair) {
require(
_holderLastTransferTimestamp[origin] <
block.number - 3 &&
_holderLastTransferTimestamp[to] <
block.number - 3,
"error"
);
_holderLastTransferTimestamp[origin] = block.number;
_holderLastTransferTimestamp[to] = block.number;
}
}
if (
automatedMarketMakerPairs[from] && !isExcludedFromLimits[to]
) {
require(amount <= maxBuy, "error");
require(
amount + balanceOf(to) <= maxWallet,
"error"
);
} else if (
automatedMarketMakerPairs[to] && !isExcludedFromLimits[from]
) {
require(amount <= maxSell, "error");
} else if (!isExcludedFromLimits[to]) {
require(
amount + balanceOf(to) <= maxWallet,
"error"
);
}
}
}
bool takeFee = isTaxEnabled &&
!inSwapBack &&
!(isExcludedFromFees[from] || isExcludedFromFees[to]);
if (takeFee) {
uint256 fees = 0;
if (automatedMarketMakerPairs[to] && sellFee > 0) {
fees = (amount * sellFee) / 100;
} else if (automatedMarketMakerPairs[from] && buyFee > 0) {
fees = (amount * buyFee) / 100;
} else if (
!automatedMarketMakerPairs[to] &&
!automatedMarketMakerPairs[from] &&
transferFee > 0
) {
fees = (amount * transferFee) / 100;
}
if (fees > 0) {
amount -= fees;
super._update(from, address(this), fees);
}
}
uint256 balance = balanceOf(address(this));
bool shouldSwap = balance >= swapTokensAtAmount;
if (takeFee && !automatedMarketMakerPairs[from] && shouldSwap) {
if (block.number > lastSwapBackExecutionBlock) {
_swapBack(balance);
lastSwapBackExecutionBlock = block.number;
}
}
super._update(from, to, amount);
}
function _swapBack(uint256 balance) internal virtual lockSwapBack {
bool success;
address[] memory path = new address[](2);
path[0] = address(this);
path[1] = uniswapV2Router.WETH();
uint256 maxSwapAmount = swapTokensAtAmount * 4;
if (balance > maxSwapAmount) {
balance = maxSwapAmount;
}
uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(
balance,
0,
path,
address(this),
block.timestamp
);
uint256 ethBalance = address(this).balance;
uint256 ethForOperations = ethBalance / 2;
uint256 ethForDevelopment = ethBalance - ethForOperations;
(success, ) = address(operationsWallet).call{value: ethForOperations}(
""
);
(success, ) = address(developmentWallet).call{value: ethForDevelopment}(
""
);
}
function _excludeFromFees(address account, bool value) internal virtual {
isExcludedFromFees[account] = value;
emit ExcludeFromFees(account, value);
}
function _excludeFromLimits(address account, bool value) internal virtual {
isExcludedFromLimits[account] = value;
emit ExcludeFromLimits(account, value);
}
function _setBots(address account, bool value) internal virtual {
isBot[account] = value;
emit SetBots(account, value);
}
function _setAutomatedMarketMakerPair(address pair, bool value)
internal
virtual
{
automatedMarketMakerPairs[pair] = value;
emit SetAutomatedMarketMakerPair(pair, value);
}
}
Read Contract
DEAD_ADDRESS 0x4e6fd6c4 → address
MAX_FEE 0xbc063e1a → uint256
ZERO_ADDRESS 0x538ba4f9 → address
allowance 0xdd62ed3e → uint256
automatedMarketMakerPairs 0xb62496f5 → bool
balanceOf 0x70a08231 → uint256
buyFee 0x47062402 → uint256
decimals 0x313ce567 → uint8
developmentWallet 0xc04a5414 → address
isBot 0x3bbac579 → bool
isCooldownEnabled 0x6ca541e5 → bool
isExcludedFromFees 0x4fbee193 → bool
isExcludedFromLimits 0x5cce86cd → bool
isLaunched 0x307aebc9 → bool
isLimitsEnabled 0xd5759ba3 → bool
isTaxEnabled 0xe6c1909b → bool
launchBlock 0xd00efb2f → uint256
launchTime 0x790ca413 → uint256
maxBuy 0x70db69d6 → uint256
maxSell 0xb8eb3546 → uint256
maxWallet 0xf8b45b05 → uint256
name 0x06fdde03 → string
operationsWallet 0xfd72e22a → address
owner 0x8da5cb5b → address
sellFee 0x2b14ca56 → uint256
swapTokensAtAmount 0xe2f45605 → uint256
symbol 0x95d89b41 → string
totalSupply 0x18160ddd → uint256
transferFee 0xacb2ad6f → uint256
uniswapV2Pair 0x49bd5a5e → address
uniswapV2Router 0x1694505e → address
Write Contract 23 functions
These functions modify contract state and require a wallet transaction to execute.
approve 0x095ea7b3
address spender
uint256 value
returns: bool
excludeFromFees 0xad29ffde
address[] accounts
bool value
excludeFromLimits 0x106a5a8f
address[] accounts
bool value
launch 0x01339c21
No parameters
renounceOwnership 0x715018a6
No parameters
setAutomatedMarketMakerPair 0x9a7a23d6
address pair
bool value
setBots 0x9c0db5f3
address[] accounts
bool value
setBuyFees 0xdcf7aef3
uint256 _buyFee
setCooldownEnabled 0x5932ead1
bool value
setDevelopmentWallet 0x72ac2486
address _developmentWallet
setLimitsEnabled 0x41aea9de
bool value
setMaxBuy 0xf53bc835
uint256 amount
setMaxSell 0xef998cf0
uint256 amount
setMaxWallet 0x5d0044ca
uint256 amount
setOperationsWallet 0xee5ecc89
address _operationsWallet
setSellFees 0x95927c25
uint256 _sellFee
setSwapTokensAtAmount 0xafa4f3b2
uint256 amount
setTaxesEnabled 0x59512ab0
bool value
setTransferFees 0xd26ed3e3
uint256 _transferFee
transfer 0xa9059cbb
address to
uint256 value
returns: bool
transferFrom 0x23b872dd
address from
address to
uint256 value
returns: bool
transferOwnership 0xf2fde38b
address newOwner
withdrawStuckTokens 0xcb963728
address _token
Recent Transactions
No transactions found for this address