Address Contract Verified
Address
0x9eac760d89805558D1A657b59beD313766e09E61
Balance
0 ETH
Nonce
1
Code Size
17717 bytes
Creator
0xA81b698D...62aE at tx 0x9dda2b6c...f8dfa4
Indexed Transactions
0
Contract Bytecode
17717 bytes
0x60806040526004361061025f575f3560e01c80637ca8448a11610143578063c0246668116100b5578063e2f4560511610079578063e2f45605146108e6578063f11a24d314610910578063f2fde38b1461093a578063f637434214610962578063f8b45b051461098c578063fe575a87146109b657610266565b8063c024666814610806578063c8c8ebe41461082e578063d85ba06314610858578063dd62ed3e14610882578063e19b2823146108be57610266565b80639c6868af116101075780639c6868af146106ea578063a457c2d714610700578063a9059cbb1461073c578063b62496f514610778578063bbc0c742146107b4578063bc205ad3146107de57610266565b80637ca8448a146106305780638a8c523c146106585780638da5cb5b1461066e57806395d89b41146106985780639a7a23d6146106c257610266565b8063313ce567116101dc5780636ddd1713116101a05780636ddd17131461053a57806370a0823114610564578063715018a6146105a05780637571336a146105b657806375e3661e146105de578063782c4e991461060657610266565b8063313ce56714610444578063395093511461046e57806349bd5a5e146104aa5780634fbee193146104d45780636a486a8e1461051057610266565b806318160ddd1161022357806318160ddd1461036057806319eab0421461038a5780631a8145bb146103b457806323b872dd146103de57806324b9f3c11461041a57610266565b806306fdde031461026a578063095ea7b31461029457806310d5de53146102d0578063156c2f351461030c5780631694505e1461033657610266565b3661026657005b5f80fd5b348015610275575f80fd5b5061027e6109f2565b60405161028b919061330b565b60405180910390f35b34801561029f575f80fd5b506102ba60048036038101906102b591906133bc565b610a82565b6040516102c79190613414565b60405180910390f35b3480156102db575f80fd5b506102f660048036038101906102f1919061342d565b610a9f565b6040516103039190613414565b60405180910390f35b348015610317575f80fd5b50610320610abc565b60405161032d9190613467565b60405180910390f35b348015610341575f80fd5b5061034a610ac2565b60405161035791906134db565b60405180910390f35b34801561036b575f80fd5b50610374610ae6565b6040516103819190613467565b60405180910390f35b348015610395575f80fd5b5061039e610aef565b6040516103ab9190613467565b60405180910390f35b3480156103bf575f80fd5b506103c8610af5565b6040516103d59190613467565b60405180910390f35b3480156103e9575f80fd5b5061040460048036038101906103ff91906134f4565b610afb565b6040516104119190613414565b60405180910390f35b348015610425575f80fd5b5061042e610bed565b60405161043b9190613467565b60405180910390f35b34801561044f575f80fd5b50610458610bf3565b604051610465919061355f565b60405180910390f35b348015610479575f80fd5b50610494600480360381019061048f91906133bc565b610bfb565b6040516104a19190613414565b60405180910390f35b3480156104b5575f80fd5b506104be610ca2565b6040516104cb9190613587565b60405180910390f35b3480156104df575f80fd5b506104fa60048036038101906104f5919061342d565b610cc6565b6040516105079190613414565b60405180910390f35b34801561051b575f80fd5b50610524610d18565b6040516105319190613467565b60405180910390f35b348015610545575f80fd5b5061054e610d1e565b60405161055b9190613414565b60405180910390f35b34801561056f575f80fd5b5061058a6004803603810190610585919061342d565b610d31565b6040516105979190613467565b60405180910390f35b3480156105ab575f80fd5b506105b4610d76565b005b3480156105c1575f80fd5b506105dc60048036038101906105d791906135ca565b610dfd565b005b3480156105e9575f80fd5b5061060460048036038101906105ff919061342d565b610ed1565b005b348015610611575f80fd5b5061061a610fbd565b6040516106279190613587565b60405180910390f35b34801561063b575f80fd5b506106566004803603810190610651919061342d565b610fe1565b005b348015610663575f80fd5b5061066c6110eb565b005b348015610679575f80fd5b5061068261119e565b60405161068f9190613587565b60405180910390f35b3480156106a3575f80fd5b506106ac6111c6565b6040516106b9919061330b565b60405180910390f35b3480156106cd575f80fd5b506106e860048036038101906106e391906135ca565b611256565b005b3480156106f5575f80fd5b506106fe61136e565b005b34801561070b575f80fd5b50610726600480360381019061072191906133bc565b611440565b6040516107339190613414565b60405180910390f35b348015610747575f80fd5b50610762600480360381019061075d91906133bc565b611526565b60405161076f9190613414565b60405180910390f35b348015610783575f80fd5b5061079e6004803603810190610799919061342d565b611543565b6040516107ab9190613414565b60405180910390f35b3480156107bf575f80fd5b506107c8611560565b6040516107d59190613414565b60405180910390f35b3480156107e9575f80fd5b5061080460048036038101906107ff9190613608565b611572565b005b348015610811575f80fd5b5061082c600480360381019061082791906135ca565b611771565b005b348015610839575f80fd5b50610842611893565b60405161084f9190613467565b60405180910390f35b348015610863575f80fd5b5061086c611899565b6040516108799190613467565b60405180910390f35b34801561088d575f80fd5b506108a860048036038101906108a39190613608565b61189f565b6040516108b59190613467565b60405180910390f35b3480156108c9575f80fd5b506108e460048036038101906108df919061342d565b611921565b005b3480156108f1575f80fd5b506108fa611ae9565b6040516109079190613467565b60405180910390f35b34801561091b575f80fd5b50610924611b0d565b6040516109319190613467565b60405180910390f35b348015610945575f80fd5b50610960600480360381019061095b919061342d565b611b13565b005b34801561096d575f80fd5b50610976611c09565b6040516109839190613467565b60405180910390f35b348015610997575f80fd5b506109a0611c0f565b6040516109ad9190613467565b60405180910390f35b3480156109c1575f80fd5b506109dc60048036038101906109d7919061342d565b611c15565b6040516109e99190613414565b60405180910390f35b606060038054610a0190613673565b80601f0160208091040260200160405190810160405280929190818152602001828054610a2d90613673565b8015610a785780601f10610a4f57610100808354040283529160200191610a78565b820191905f5260205f20905b815481529060010190602001808311610a5b57829003601f168201915b5050505050905090565b5f610a95610a8e611c67565b8484611c6e565b6001905092915050565b6013602052805f5260405f205f915054906101000a900460ff1681565b600b5481565b7f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d81565b5f600254905090565b600e5481565b60115481565b5f610b07848484611e31565b5f60015f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f610b4e611c67565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905082811015610bcd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bc490613713565b60405180910390fd5b610be185610bd9611c67565b858403611c6e565b60019150509392505050565b60105481565b5f6012905090565b5f610c98610c07611c67565b848460015f610c14611c67565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054610c93919061375e565b611c6e565b6001905092915050565b7f000000000000000000000000f5cbda728ed45dfea6755c1914a43621e7c8a54481565b5f60125f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff169050919050565b600d5481565b600860019054906101000a900460ff1681565b5f805f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b610d7e611c67565b73ffffffffffffffffffffffffffffffffffffffff16610d9c61119e565b73ffffffffffffffffffffffffffffffffffffffff1614610df2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610de9906137db565b60405180910390fd5b610dfb5f61295d565b565b610e05611c67565b73ffffffffffffffffffffffffffffffffffffffff16610e2361119e565b73ffffffffffffffffffffffffffffffffffffffff1614610e79576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e70906137db565b60405180910390fd5b8060135f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055505050565b610ed9611c67565b73ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000621761e815c634ce1143a1dcd186221644884a6f73ffffffffffffffffffffffffffffffffffffffff1614610f66576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f5d90613843565b60405180910390fd5b5f60095f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff02191690831515021790555050565b7f000000000000000000000000621761e815c634ce1143a1dcd186221644884a6f81565b610fe9611c67565b73ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000621761e815c634ce1143a1dcd186221644884a6f73ffffffffffffffffffffffffffffffffffffffff1614611076576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161106d90613843565b60405180910390fd5b5f8173ffffffffffffffffffffffffffffffffffffffff164760405161109b9061388e565b5f6040518083038185875af1925050503d805f81146110d5576040519150601f19603f3d011682016040523d82523d5f602084013e6110da565b606091505b50509050806110e7575f80fd5b5050565b6110f3611c67565b73ffffffffffffffffffffffffffffffffffffffff1661111161119e565b73ffffffffffffffffffffffffffffffffffffffff1614611167576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161115e906137db565b60405180910390fd5b600160085f6101000a81548160ff0219169083151502179055506001600860016101000a81548160ff021916908315150217905550565b5f60055f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6060600480546111d590613673565b80601f016020809104026020016040519081016040528092919081815260200182805461120190613673565b801561124c5780601f106112235761010080835404028352916020019161124c565b820191905f5260205f20905b81548152906001019060200180831161122f57829003601f168201915b5050505050905090565b61125e611c67565b73ffffffffffffffffffffffffffffffffffffffff1661127c61119e565b73ffffffffffffffffffffffffffffffffffffffff16146112d2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112c9906137db565b60405180910390fd5b7f000000000000000000000000f5cbda728ed45dfea6755c1914a43621e7c8a54473ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611360576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161135790613912565b60405180910390fd5b61136a8282612a20565b5050565b611376611c67565b73ffffffffffffffffffffffffffffffffffffffff1661139461119e565b73ffffffffffffffffffffffffffffffffffffffff16146113ea576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113e1906137db565b60405180910390fd5b6a084595161401484a0000006006819055506a14adf4b7320334b90000006007819055506004600b819055506001600c819055506005600a819055506004600e819055506001600f819055506005600d81905550565b5f8060015f61144d611c67565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905082811015611507576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114fe906139a0565b60405180910390fd5b61151b611512611c67565b85858403611c6e565b600191505092915050565b5f611539611532611c67565b8484611e31565b6001905092915050565b6014602052805f5260405f205f915054906101000a900460ff1681565b60085f9054906101000a900460ff1681565b61157a611c67565b73ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000621761e815c634ce1143a1dcd186221644884a6f73ffffffffffffffffffffffffffffffffffffffff1614611607576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115fe90613843565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611675576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161166c90613a08565b60405180910390fd5b5f8273ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016116af9190613587565b602060405180830381865afa1580156116ca573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116ee9190613a3a565b90508273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff1660e01b815260040161172b929190613a65565b6020604051808303815f875af1158015611747573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061176b9190613aa0565b50505050565b611779611c67565b73ffffffffffffffffffffffffffffffffffffffff1661179761119e565b73ffffffffffffffffffffffffffffffffffffffff16146117ed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117e4906137db565b60405180910390fd5b8060125f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff167f9d8f7706ea1113d1a167b526eca956215946dd36cc7df39eb16180222d8b5df7826040516118879190613414565b60405180910390a25050565b60065481565b600a5481565b5f60015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905092915050565b611929611c67565b73ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000621761e815c634ce1143a1dcd186221644884a6f73ffffffffffffffffffffffffffffffffffffffff16146119b6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119ad90613843565b60405180910390fd5b7f000000000000000000000000f5cbda728ed45dfea6755c1914a43621e7c8a54473ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614158015611a525750737a250d5630b4cf539739df2c5dacb4c659f2488d73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b611a91576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a8890613b3b565b60405180910390fd5b600160095f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff02191690831515021790555050565b7f0000000000000000000000000000000000000000000069e10de76676d080000081565b600c5481565b611b1b611c67565b73ffffffffffffffffffffffffffffffffffffffff16611b3961119e565b73ffffffffffffffffffffffffffffffffffffffff1614611b8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b86906137db565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611bfd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bf490613bc9565b60405180910390fd5b611c068161295d565b50565b600f5481565b60075481565b5f60095f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff169050919050565b5f33905090565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611cdc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cd390613c57565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611d4a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d4190613ce5565b60405180910390fd5b8060015f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051611e249190613467565b60405180910390a3505050565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611e9f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e9690613d73565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611f0d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f0490613e01565b60405180910390fd5b60095f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff1615611f97576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f8e90613e69565b60405180910390fd5b60095f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff1615612021576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161201890613ed1565b60405180910390fd5b5f81036120385761203383835f612abe565b612958565b61204061119e565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156120ae575061207e61119e565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156120e657505f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b8015612120575061dead73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156121395750600560149054906101000a900460ff16155b156125065760085f9054906101000a900460ff1661222c5760125f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16806121ec575060125f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff165b61222b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161222290613f39565b60405180910390fd5b5b60145f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff1680156122c9575060135f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16155b1561237057600654811115612313576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161230a90613fc7565b60405180910390fd5b60075461231f83610d31565b8261232a919061375e565b111561236b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123629061402f565b60405180910390fd5b612505565b60145f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16801561240d575060135f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16155b1561245c57600654811115612457576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161244e906140bd565b60405180910390fd5b612504565b60135f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16612503576007546124b683610d31565b826124c1919061375e565b1115612502576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124f99061402f565b60405180910390fd5b5b5b5b5b5f61251030610d31565b90505f7f0000000000000000000000000000000000000000000069e10de76676d080000082101590508080156125525750600860019054906101000a900460ff165b801561256b5750600560149054906101000a900460ff16155b80156125be575060145f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16155b8015612611575060125f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16155b8015612664575060125f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16155b156126a7576001600560146101000a81548160ff02191690831515021790555061268c612d33565b5f600560146101000a81548160ff0219169083151502179055505b5f600560149054906101000a900460ff1615905060125f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff1680612756575060125f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff165b1561275f575f90505b5f81156129485760145f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff1680156127bd57505f600d54115b15612847576064600d54866127d291906140db565b6127dc9190614149565b9050600d54600f54826127ef91906140db565b6127f99190614149565b60115f828254612809919061375e565b92505081905550600d54600e548261282191906140db565b61282b9190614149565b60105f82825461283b919061375e565b92505081905550612925565b60145f8873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16801561289e57505f600a54115b15612924576064600a54866128b391906140db565b6128bd9190614149565b9050600a54600c54826128d091906140db565b6128da9190614149565b60115f8282546128ea919061375e565b92505081905550600a54600b548261290291906140db565b61290c9190614149565b60105f82825461291c919061375e565b925050819055505b5b5f81111561293957612938873083612abe565b5b80856129459190614179565b94505b612953878787612abe565b505050505b505050565b5f60055f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508160055f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b8060145f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055508015158273ffffffffffffffffffffffffffffffffffffffff167fffa9187bf1f18bf477bd0ea1bcbb64e93b6a98132473929edfce215cd9b16fab60405160405180910390a35050565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603612b2c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b2390613d73565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603612b9a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b9190613e01565b60405180910390fd5b612ba5838383612f66565b5f805f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905081811015612c28576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c1f9061421c565b60405180910390fd5b8181035f808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550815f808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f828254612cb6919061375e565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051612d1a9190613467565b60405180910390a3612d2d848484612f6b565b50505050565b5f612d3d30610d31565b90505f601054601154612d50919061375e565b90505f80831480612d6057505f82145b15612d6d57505050612f64565b60147f0000000000000000000000000000000000000000000069e10de76676d0800000612d9a91906140db565b831115612dd15760147f0000000000000000000000000000000000000000000069e10de76676d0800000612dce91906140db565b92505b5f60028360115486612de391906140db565b612ded9190614149565b612df79190614149565b90505f8185612e069190614179565b90505f479050612e1582612f70565b5f8147612e229190614179565b90505f6002601154612e349190614149565b87612e3f9190614179565b60105483612e4d91906140db565b612e579190614149565b90505f8183612e669190614179565b90505f86118015612e7657505f81115b15612ec357612e8586826131a3565b7f17bbfb9a6069321b6ded73bd96327c9e6b7212a5cd51ff219cd61370acafb5618582601154604051612eba9392919061423a565b60405180910390a15b5f6011819055505f6010819055507f000000000000000000000000621761e815c634ce1143a1dcd186221644884a6f73ffffffffffffffffffffffffffffffffffffffff1647604051612f159061388e565b5f6040518083038185875af1925050503d805f8114612f4f576040519150601f19603f3d011682016040523d82523d5f602084013e612f54565b606091505b5050809750505050505050505050505b565b505050565b505050565b5f600267ffffffffffffffff811115612f8c57612f8b61426f565b5b604051908082528060200260200182016040528015612fba5781602001602082028036833780820191505090505b50905030815f81518110612fd157612fd061429c565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d73ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015613074573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061309891906142dd565b816001815181106130ac576130ab61429c565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050613111307f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d84611c6e565b7f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d73ffffffffffffffffffffffffffffffffffffffff1663791ac947835f8430426040518663ffffffff1660e01b81526004016131729594939291906143f8565b5f604051808303815f87803b158015613189575f80fd5b505af115801561319b573d5f803e3d5ffd5b505050505050565b6131ce307f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d84611c6e565b7f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d73ffffffffffffffffffffffffffffffffffffffff1663f305d7198230855f8061321761119e565b426040518863ffffffff1660e01b815260040161323996959493929190614450565b60606040518083038185885af1158015613255573d5f803e3d5ffd5b50505050506040513d601f19601f8201168201806040525081019061327a91906144af565b5050505050565b5f81519050919050565b5f82825260208201905092915050565b5f5b838110156132b857808201518184015260208101905061329d565b5f8484015250505050565b5f601f19601f8301169050919050565b5f6132dd82613281565b6132e7818561328b565b93506132f781856020860161329b565b613300816132c3565b840191505092915050565b5f6020820190508181035f83015261332381846132d3565b905092915050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6133588261332f565b9050919050565b6133688161334e565b8114613372575f80fd5b50565b5f813590506133838161335f565b92915050565b5f819050919050565b61339b81613389565b81146133a5575f80fd5b50565b5f813590506133b681613392565b92915050565b5f80604083850312156133d2576133d161332b565b5b5f6133df85828601613375565b92505060206133f0858286016133a8565b9150509250929050565b5f8115159050919050565b61340e816133fa565b82525050565b5f6020820190506134275f830184613405565b92915050565b5f602082840312156134425761344161332b565b5b5f61344f84828501613375565b91505092915050565b61346181613389565b82525050565b5f60208201905061347a5f830184613458565b92915050565b5f819050919050565b5f6134a361349e6134998461332f565b613480565b61332f565b9050919050565b5f6134b482613489565b9050919050565b5f6134c5826134aa565b9050919050565b6134d5816134bb565b82525050565b5f6020820190506134ee5f8301846134cc565b92915050565b5f805f6060848603121561350b5761350a61332b565b5b5f61351886828701613375565b935050602061352986828701613375565b925050604061353a868287016133a8565b9150509250925092565b5f60ff82169050919050565b61355981613544565b82525050565b5f6020820190506135725f830184613550565b92915050565b6135818161334e565b82525050565b5f60208201905061359a5f830184613578565b92915050565b6135a9816133fa565b81146135b3575f80fd5b50565b5f813590506135c4816135a0565b92915050565b5f80604083850312156135e0576135df61332b565b5b5f6135ed85828601613375565b92505060206135fe858286016135b6565b9150509250929050565b5f806040838503121561361e5761361d61332b565b5b5f61362b85828601613375565b925050602061363c85828601613375565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061368a57607f821691505b60208210810361369d5761369c613646565b5b50919050565b7f45524332303a207472616e7366657220616d6f756e74206578636565647320615f8201527f6c6c6f77616e6365000000000000000000000000000000000000000000000000602082015250565b5f6136fd60288361328b565b9150613708826136a3565b604082019050919050565b5f6020820190508181035f83015261372a816136f1565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f61376882613389565b915061377383613389565b925082820190508082111561378b5761378a613731565b5b92915050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725f82015250565b5f6137c560208361328b565b91506137d082613791565b602082019050919050565b5f6020820190508181035f8301526137f2816137b9565b9050919050565b7f546f6b656e3a2063616c6c6572206973206e6f74207468652048656c706572005f82015250565b5f61382d601f8361328b565b9150613838826137f9565b602082019050919050565b5f6020820190508181035f83015261385a81613821565b9050919050565b5f81905092915050565b50565b5f6138795f83613861565b91506138848261386b565b5f82019050919050565b5f6138988261386e565b9150819050919050565b7f54686520706169722063616e6e6f742062652072656d6f7665642066726f6d205f8201527f6175746f6d617465644d61726b65744d616b6572506169727300000000000000602082015250565b5f6138fc60398361328b565b9150613907826138a2565b604082019050919050565b5f6020820190508181035f830152613929816138f0565b9050919050565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f775f8201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b5f61398a60258361328b565b915061399582613930565b604082019050919050565b5f6020820190508181035f8301526139b78161397e565b9050919050565b7f5f746f6b656e20616464726573732063616e6e6f7420626520300000000000005f82015250565b5f6139f2601a8361328b565b91506139fd826139be565b602082019050919050565b5f6020820190508181035f830152613a1f816139e6565b9050919050565b5f81519050613a3481613392565b92915050565b5f60208284031215613a4f57613a4e61332b565b5b5f613a5c84828501613a26565b91505092915050565b5f604082019050613a785f830185613578565b613a856020830184613458565b9392505050565b5f81519050613a9a816135a0565b92915050565b5f60208284031215613ab557613ab461332b565b5b5f613ac284828501613a8c565b91505092915050565b7f43616e6e6f7420626c61636b6c69737420746f6b656e277320763220726f75745f8201527f6572206f7220763220706f6f6c2e000000000000000000000000000000000000602082015250565b5f613b25602e8361328b565b9150613b3082613acb565b604082019050919050565b5f6020820190508181035f830152613b5281613b19565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f20615f8201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b5f613bb360268361328b565b9150613bbe82613b59565b604082019050919050565b5f6020820190508181035f830152613be081613ba7565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f206164645f8201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b5f613c4160248361328b565b9150613c4c82613be7565b604082019050919050565b5f6020820190508181035f830152613c6e81613c35565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f2061646472655f8201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b5f613ccf60228361328b565b9150613cda82613c75565b604082019050919050565b5f6020820190508181035f830152613cfc81613cc3565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f2061645f8201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b5f613d5d60258361328b565b9150613d6882613d03565b604082019050919050565b5f6020820190508181035f830152613d8a81613d51565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f20616464725f8201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b5f613deb60238361328b565b9150613df682613d91565b604082019050919050565b5f6020820190508181035f830152613e1881613ddf565b9050919050565b7f53656e64657220626c61636b6c697374656400000000000000000000000000005f82015250565b5f613e5360128361328b565b9150613e5e82613e1f565b602082019050919050565b5f6020820190508181035f830152613e8081613e47565b9050919050565b7f526563656976657220626c61636b6c69737465640000000000000000000000005f82015250565b5f613ebb60148361328b565b9150613ec682613e87565b602082019050919050565b5f6020820190508181035f830152613ee881613eaf565b9050919050565b7f54726164696e67206973206e6f74206163746976652e000000000000000000005f82015250565b5f613f2360168361328b565b9150613f2e82613eef565b602082019050919050565b5f6020820190508181035f830152613f5081613f17565b9050919050565b7f427579207472616e7366657220616d6f756e74206578636565647320746865205f8201527f6d61785472616e73616374696f6e416d6f756e742e0000000000000000000000602082015250565b5f613fb160358361328b565b9150613fbc82613f57565b604082019050919050565b5f6020820190508181035f830152613fde81613fa5565b9050919050565b7f4d61782077616c6c6574206578636565646564000000000000000000000000005f82015250565b5f61401960138361328b565b915061402482613fe5565b602082019050919050565b5f6020820190508181035f8301526140468161400d565b9050919050565b7f53656c6c207472616e7366657220616d6f756e742065786365656473207468655f8201527f206d61785472616e73616374696f6e416d6f756e742e00000000000000000000602082015250565b5f6140a760368361328b565b91506140b28261404d565b604082019050919050565b5f6020820190508181035f8301526140d48161409b565b9050919050565b5f6140e582613389565b91506140f083613389565b92508282026140fe81613389565b9150828204841483151761411557614114613731565b5b5092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f61415382613389565b915061415e83613389565b92508261416e5761416d61411c565b5b828204905092915050565b5f61418382613389565b915061418e83613389565b92508282039050818111156141a6576141a5613731565b5b92915050565b7f45524332303a207472616e7366657220616d6f756e74206578636565647320625f8201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b5f61420660268361328b565b9150614211826141ac565b604082019050919050565b5f6020820190508181035f830152614233816141fa565b9050919050565b5f60608201905061424d5f830186613458565b61425a6020830185613458565b6142676040830184613458565b949350505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f815190506142d78161335f565b92915050565b5f602082840312156142f2576142f161332b565b5b5f6142ff848285016142c9565b91505092915050565b5f819050919050565b5f61432b61432661432184614308565b613480565b613389565b9050919050565b61433b81614311565b82525050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b6143738161334e565b82525050565b5f614384838361436a565b60208301905092915050565b5f602082019050919050565b5f6143a682614341565b6143b0818561434b565b93506143bb8361435b565b805f5b838110156143eb5781516143d28882614379565b97506143dd83614390565b9250506001810190506143be565b5085935050505092915050565b5f60a08201905061440b5f830188613458565b6144186020830187614332565b818103604083015261442a818661439c565b90506144396060830185613578565b6144466080830184613458565b9695505050505050565b5f60c0820190506144635f830189613578565b6144706020830188613458565b61447d6040830187614332565b61448a6060830186614332565b6144976080830185613578565b6144a460a0830184613458565b979650505050505050565b5f805f606084860312156144c6576144c561332b565b5b5f6144d386828701613a26565b93505060206144e486828701613a26565b92505060406144f586828701613a26565b915050925092509256fea26469706673582212201dd4c0260b0f0aa324bb6d155bf57a1b4681d65657612eefb16f6b0a274c37aa64736f6c63430008140033
Verified Source Code Full Match
Compiler: v0.8.20+commit.a1b79de6
EVM: shanghai
Optimization: No
Membot.sol 1396 lines
// SPDX-License-Identifier: MIT
//
// @@@@@@@@ @@@@@@@@
// /@@@@@@@@@ @@@@@@@@@,
// @@@@@@@@@@& @@@@@@@@@@@
// *@@@@@@@@@@@%%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%&@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// .@@@@@@@@* @@@@@@@@@@@@@@@@@@@@@@@@ /@@@@@@@@
// @@@@@# @@@@@@@@@@@@@@@@@@@@@@ &@@@@@
// *@@@@ /@@@@@@@@@@@@@@@@@@* /@@@@
// /@@@@@@@ @@@@@@@*
// @@@@@@@@@* @@@@@@@/ &@@@@@@@ *@@@@@@@@&
// @@@@@@@@@ @@@@@@@@ @@@@@@@@ @@@@@@@@@
// *@@@@@@@@@ .@@@@@@@@ @@@@@@@@ @@@@@@@@@
// *@@@@@@@@@ *@@@@@@@@ @@@@@@@@ @@@@@@@@@
// @@@@@@@@@ .@@@@@@@@ @@@@@@@@ @@@@@@@@@
// @@@@@@@@@ @@@@@@@@ @@@@@@@@ ,@@@@@@@@@
// @@@@@@@& @@@@@@@@
// /@@@@ &@@@@@@@@@@@@@@@@# @@@@
// @@@@@ &@@@@@@@@@@@@@@@@@@@@( .@@@@%
// (@@@@@@ &@@@@@@@@@@@@@@@@@@@@@@( ,@@@@@@,
// ,@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// (@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@,
//
// The #1 Discord trading tool, sniper & wallet - https://discord.gg/membot
// https://twitter.com/MembotETH | https://membot.tools
//
pragma solidity 0.8.20;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_transferOwnership(_msgSender());
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
_;
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}
////// lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol
// OpenZeppelin Contracts v4.4.0 (token/ERC20/IERC20.sol)
/* pragma solidity ^0.8.0; */
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
/**
* @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);
}
////// lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Metadata.sol
// OpenZeppelin Contracts v4.4.0 (token/ERC20/extensions/IERC20Metadata.sol)
/* pragma solidity ^0.8.0; */
/* import "../IERC20.sol"; */
/**
* @dev Interface for the optional metadata functions from the ERC20 standard.
*
* _Available since v4.1._
*/
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);
}
/**
* @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}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our guide
* https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
* to implement supply mechanisms].
*
* 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.
*
* Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
* functions have been added to mitigate the well-known issues around setting
* allowances. See {IERC20-approve}.
*/
contract ERC20 is Context, IERC20, IERC20Metadata {
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}.
*
* The default value of {decimals} is 18. To select a different value for
* {decimals} you should overload it.
*
* 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 override returns (string memory) {
return _name;
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view virtual override 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 value {ERC20} uses, unless this function is
* 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 override returns (uint8) {
return 18;
}
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view virtual override returns (uint256) {
return _totalSupply;
}
/**
* @dev See {IERC20-balanceOf}.
*/
function balanceOf(address account) public view virtual override returns (uint256) {
return _balances[account];
}
/**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(_msgSender(), recipient, amount);
return true;
}
/**
* @dev See {IERC20-allowance}.
*/
function allowance(address owner, address spender) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
/**
* @dev See {IERC20-approve}.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(address spender, uint256 amount) public virtual override returns (bool) {
_approve(_msgSender(), spender, amount);
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}.
*
* Requirements:
*
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
* - the caller must have allowance for ``sender``'s tokens of at least
* `amount`.
*/
function transferFrom(
address sender,
address recipient,
uint256 amount
) public virtual override returns (bool) {
_transfer(sender, recipient, amount);
uint256 currentAllowance = _allowances[sender][_msgSender()];
require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance");
unchecked {
_approve(sender, _msgSender(), currentAllowance - amount);
}
return true;
}
/**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);
return true;
}
/**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `spender` must have allowance for the caller of at least
* `subtractedValue`.
*/
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
uint256 currentAllowance = _allowances[_msgSender()][spender];
require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
unchecked {
_approve(_msgSender(), spender, currentAllowance - subtractedValue);
}
return true;
}
/**
* @dev Moves `amount` of tokens from `sender` to `recipient`.
*
* 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.
*
* Requirements:
*
* - `sender` cannot be the zero address.
* - `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
*/
function _transfer(
address sender,
address recipient,
uint256 amount
) internal virtual {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
_beforeTokenTransfer(sender, recipient, amount);
uint256 senderBalance = _balances[sender];
require(senderBalance >= amount, "ERC20: transfer amount exceeds balance");
unchecked {
_balances[sender] = senderBalance - amount;
}
_balances[recipient] += amount;
emit Transfer(sender, recipient, amount);
_afterTokenTransfer(sender, recipient, amount);
}
/** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
*/
function _mint(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: mint to the zero address");
_beforeTokenTransfer(address(0), account, amount);
_totalSupply += amount;
_balances[account] += amount;
emit Transfer(address(0), account, amount);
_afterTokenTransfer(address(0), account, amount);
}
/**
* @dev Destroys `amount` tokens from `account`, reducing the
* total supply.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
*/
function _burn(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: burn from the zero address");
_beforeTokenTransfer(account, address(0), amount);
uint256 accountBalance = _balances[account];
require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
unchecked {
_balances[account] = accountBalance - amount;
}
_totalSupply -= amount;
emit Transfer(account, address(0), amount);
_afterTokenTransfer(account, address(0), amount);
}
/**
* @dev Sets `amount` 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.
*/
function _approve(
address owner,
address spender,
uint256 amount
) internal virtual {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
/**
* @dev Hook that is called before any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* will be transferred to `to`.
* - when `from` is zero, `amount` tokens will be minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
/**
* @dev Hook that is called after any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* has been transferred to `to`.
* - when `from` is zero, `amount` tokens have been minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens have been burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _afterTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
}
/**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
* now has built in overflow checking.
*/
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the substraction of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b > a) return (false, 0);
return (true, a - b);
}
}
/**
* @dev Returns the multiplication of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) return (true, 0);
uint256 c = a * b;
if (c / a != b) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the division of two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a / b);
}
}
/**
* @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a % b);
}
}
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
return a + b;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return a - b;
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
return a * b;
}
/**
* @dev Returns the integer division of two unsigned integers, reverting on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator.
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return a / b;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return a % b;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {trySub}.
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b <= a, errorMessage);
return a - b;
}
}
/**
* @dev Returns the integer division of two unsigned integers, reverting with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a / b;
}
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting with custom message when dividing by zero.
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {tryMod}.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a % b;
}
}
}
interface IUniswapV2Factory {
event PairCreated(
address indexed token0,
address indexed token1,
address pair,
uint256
);
function feeTo() external view returns (address);
function feeToSetter() external view returns (address);
function getPair(address tokenA, address tokenB)
external
view
returns (address pair);
function allPairs(uint256) external view returns (address pair);
function allPairsLength() external view returns (uint256);
function createPair(address tokenA, address tokenB)
external
returns (address pair);
function setFeeTo(address) external;
function setFeeToSetter(address) external;
}
////// src/IUniswapV2Pair.sol
/* pragma solidity 0.8.10; */
/* pragma experimental ABIEncoderV2; */
interface IUniswapV2Pair {
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
event Transfer(address indexed from, address indexed to, uint256 value);
function name() external pure returns (string memory);
function symbol() external pure returns (string memory);
function decimals() external pure returns (uint8);
function totalSupply() external view returns (uint256);
function balanceOf(address owner) external view returns (uint256);
function allowance(address owner, address spender)
external
view
returns (uint256);
function approve(address spender, uint256 value) external returns (bool);
function transfer(address to, uint256 value) external returns (bool);
function transferFrom(
address from,
address to,
uint256 value
) external returns (bool);
function DOMAIN_SEPARATOR() external view returns (bytes32);
function PERMIT_TYPEHASH() external pure returns (bytes32);
function nonces(address owner) external view returns (uint256);
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
event Mint(address indexed sender, uint256 amount0, uint256 amount1);
event Burn(
address indexed sender,
uint256 amount0,
uint256 amount1,
address indexed to
);
event Swap(
address indexed sender,
uint256 amount0In,
uint256 amount1In,
uint256 amount0Out,
uint256 amount1Out,
address indexed to
);
event Sync(uint112 reserve0, uint112 reserve1);
function MINIMUM_LIQUIDITY() external pure returns (uint256);
function factory() external view returns (address);
function token0() external view returns (address);
function token1() external view returns (address);
function getReserves()
external
view
returns (
uint112 reserve0,
uint112 reserve1,
uint32 blockTimestampLast
);
function price0CumulativeLast() external view returns (uint256);
function price1CumulativeLast() external view returns (uint256);
function kLast() external view returns (uint256);
function mint(address to) external returns (uint256 liquidity);
function burn(address to)
external
returns (uint256 amount0, uint256 amount1);
function swap(
uint256 amount0Out,
uint256 amount1Out,
address to,
bytes calldata data
) external;
function skim(address to) external;
function sync() external;
function initialize(address, address) external;
}
interface IUniswapV2Router02 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidity(
address tokenA,
address tokenB,
uint256 amountADesired,
uint256 amountBDesired,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline
)
external
returns (
uint256 amountA,
uint256 amountB,
uint256 liquidity
);
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
)
external
payable
returns (
uint256 amountToken,
uint256 amountETH,
uint256 liquidity
);
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
}
contract Membot is ERC20, Ownable {
IUniswapV2Router02 public immutable uniswapV2Router;
address public immutable uniswapV2Pair;
bool private swapping;
address public immutable revShareWallet;
uint256 public maxTransactionAmount;
uint256 immutable public swapTokensAtAmount;
uint256 public maxWallet;
bool public tradingActive = false;
bool public swapEnabled = false;
// Anti-bot and anti-whale mappings and variables
mapping(address => bool) blacklisted;
uint256 public buyTotalFees;
uint256 public buyRevShareFee;
uint256 public buyLiquidityFee;
uint256 public sellTotalFees;
uint256 public sellRevShareFee;
uint256 public sellLiquidityFee;
uint256 public tokensForRevShare;
uint256 public tokensForLiquidity;
// Exclude from fees and max transaction amount
mapping(address => bool) private _isExcludedFromFees;
mapping(address => bool) public _isExcludedMaxTransactionAmount;
// Store addresses that a automatic market maker pairs. Any transfer *to* these addresses
// could be subject to a maximum transfer amount
mapping(address => bool) public automatedMarketMakerPairs;
event UpdateUniswapV2Router(
address indexed newAddress,
address indexed oldAddress
);
event ExcludeFromFees(address indexed account, bool isExcluded);
event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value);
event SwapAndLiquify(
uint256 tokensSwapped,
uint256 ethReceived,
uint256 tokensIntoLiquidity
);
constructor() ERC20("Membot", "MEMBOT") {
IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(
0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D //Uniswap V2 Router
);
excludeFromMaxTransaction(address(_uniswapV2Router), true);
uniswapV2Router = _uniswapV2Router;
// Creates the Uniswap Pair
uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory())
.createPair(address(this), _uniswapV2Router.WETH());
excludeFromMaxTransaction(address(uniswapV2Pair), true);
_setAutomatedMarketMakerPair(address(uniswapV2Pair), true);
uint256 _buyRevShareFee = 8; // Lowered to 4% after launch
uint256 _buyLiquidityFee = 2; // Lowered to 1% after launch
uint256 _sellRevShareFee = 8; // Lowered to 4% after launch
uint256 _sellLiquidityFee = 2; // Lowered to 1% after launch
uint256 totalSupply = 1_000_000_000 * 1e18; // 1 million
maxTransactionAmount = 5000000 * 1e18; // 0.5%
maxWallet = 5000000 * 1e18; // 0.5%
swapTokensAtAmount = (totalSupply * 5) / 10000; // 0.05%
buyRevShareFee = _buyRevShareFee;
buyLiquidityFee = _buyLiquidityFee;
buyTotalFees = buyRevShareFee + buyLiquidityFee;
sellRevShareFee = _sellRevShareFee;
sellLiquidityFee = _sellLiquidityFee;
sellTotalFees = sellRevShareFee + sellLiquidityFee;
revShareWallet = address(0x621761e815c634cE1143a1dCd186221644884A6f ); // Set as revShare wallet - Helper Contract
// Exclude from paying fees or having max transaction amount if; is owner, is deployer, is dead address.
excludeFromFees(owner(), true);
excludeFromFees(address(this), true);
excludeFromFees(address(0xdead), true);
excludeFromMaxTransaction(owner(), true);
excludeFromMaxTransaction(address(this), true);
excludeFromMaxTransaction(address(0xdead), true);
/*
_mint is an internal function in ERC20.sol that is only called here,
and CANNOT be called ever again
*/
_mint(msg.sender, totalSupply);
}
receive() external payable {}
// Will enable trading, once this is toggeled, it will not be able to be turned off.
function enableTrading() external onlyOwner {
tradingActive = true;
swapEnabled = true;
}
// Trigger this post launch once price is more stable. Made to avoid whales and snipers hogging supply.
function updateLimitsAndFees() external onlyOwner {
maxTransactionAmount = 10_000_000 * (10**18); // 1%
maxWallet = 25_000_000 * (10**18); // 2.5%
buyRevShareFee = 4; // 4%
buyLiquidityFee = 1; // 1%
buyTotalFees = 5;
sellRevShareFee = 4; // 4%
sellLiquidityFee = 1; // 1%
sellTotalFees = 5;
}
function excludeFromMaxTransaction(address updAds, bool isEx)
public
onlyOwner
{
_isExcludedMaxTransactionAmount[updAds] = isEx;
}
function excludeFromFees(address account, bool excluded) public onlyOwner {
_isExcludedFromFees[account] = excluded;
emit ExcludeFromFees(account, excluded);
}
function setAutomatedMarketMakerPair(address pair, bool value)
public
onlyOwner
{
require(
pair != uniswapV2Pair,
"The pair cannot be removed from automatedMarketMakerPairs"
);
_setAutomatedMarketMakerPair(pair, value);
}
function _setAutomatedMarketMakerPair(address pair, bool value) private {
automatedMarketMakerPairs[pair] = value;
emit SetAutomatedMarketMakerPair(pair, value);
}
function isExcludedFromFees(address account) public view returns (bool) {
return _isExcludedFromFees[account];
}
function isBlacklisted(address account) public view returns (bool) {
return blacklisted[account];
}
function _transfer(
address from,
address to,
uint256 amount
) internal override {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
require(!blacklisted[from],"Sender blacklisted");
require(!blacklisted[to],"Receiver blacklisted");
if (amount == 0) {
super._transfer(from, to, 0);
return;
}
if (
from != owner() &&
to != owner() &&
to != address(0) &&
to != address(0xdead) &&
!swapping
) {
if (!tradingActive) {
require(
_isExcludedFromFees[from] || _isExcludedFromFees[to],
"Trading is not active."
);
}
// Buying
if (
automatedMarketMakerPairs[from] &&
!_isExcludedMaxTransactionAmount[to]
) {
require(
amount <= maxTransactionAmount,
"Buy transfer amount exceeds the maxTransactionAmount."
);
require(
amount + balanceOf(to) <= maxWallet,
"Max wallet exceeded"
);
}
// Selling
else if (
automatedMarketMakerPairs[to] &&
!_isExcludedMaxTransactionAmount[from]
) {
require(
amount <= maxTransactionAmount,
"Sell transfer amount exceeds the maxTransactionAmount."
);
} else if (!_isExcludedMaxTransactionAmount[to]) {
require(
amount + balanceOf(to) <= maxWallet,
"Max wallet exceeded"
);
}
}
uint256 contractTokenBalance = balanceOf(address(this));
bool canSwap = contractTokenBalance >= swapTokensAtAmount;
if (
canSwap &&
swapEnabled &&
!swapping &&
!automatedMarketMakerPairs[from] &&
!_isExcludedFromFees[from] &&
!_isExcludedFromFees[to]
) {
swapping = true;
swapBack();
swapping = false;
}
bool takeFee = !swapping;
// If any account belongs to _isExcludedFromFee account then remove the fee
if (_isExcludedFromFees[from] || _isExcludedFromFees[to]) {
takeFee = false;
}
uint256 fees = 0;
// Only take fees on buys/sells, do not take on wallet transfers
if (takeFee) {
// Sell
if (automatedMarketMakerPairs[to] && sellTotalFees > 0) {
fees = (amount * sellTotalFees) / 100;
tokensForLiquidity += (fees * sellLiquidityFee) / sellTotalFees;
tokensForRevShare += (fees * sellRevShareFee) / sellTotalFees;
}
// Buy
else if (automatedMarketMakerPairs[from] && buyTotalFees > 0) {
fees = (amount * buyTotalFees) / 100;
tokensForLiquidity += (fees * buyLiquidityFee) / buyTotalFees;
tokensForRevShare += (fees * buyRevShareFee) / buyTotalFees;
}
if (fees > 0) {
super._transfer(from, address(this), fees);
}
amount -= fees;
}
super._transfer(from, to, amount);
}
function swapTokensForEth(uint256 tokenAmount) private {
// Generate the uniswap pair path of token -> weth
address[] memory path = new address[](2);
path[0] = address(this);
path[1] = uniswapV2Router.WETH();
_approve(address(this), address(uniswapV2Router), tokenAmount);
// Make the swap
uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(
tokenAmount,
0, // Accept any amount of ETH; ignore slippage
path,
address(this),
block.timestamp
);
}
function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private {
// approve token transfer to cover all possible scenarios
_approve(address(this), address(uniswapV2Router), tokenAmount);
// add the liquidity
uniswapV2Router.addLiquidityETH{value: ethAmount}(
address(this),
tokenAmount,
0, // Slippage is unavoidable
0, // Slippage is unavoidable
owner(),
block.timestamp
);
}
function swapBack() private {
uint256 contractBalance = balanceOf(address(this));
uint256 totalTokensToSwap = tokensForLiquidity +
tokensForRevShare;
bool success;
if (contractBalance == 0 || totalTokensToSwap == 0) {
return;
}
if (contractBalance > swapTokensAtAmount * 20) {
contractBalance = swapTokensAtAmount * 20;
}
// Halve the amount of liquidity tokens
uint256 liquidityTokens = (contractBalance * tokensForLiquidity) /
totalTokensToSwap /
2;
uint256 amountToSwapForETH = contractBalance - liquidityTokens;
uint256 initialETHBalance = address(this).balance;
swapTokensForEth(amountToSwapForETH);
uint256 ethBalance = address(this).balance - initialETHBalance;
uint256 ethForRevShare = (ethBalance * tokensForRevShare) / (totalTokensToSwap - (tokensForLiquidity / 2));
uint256 ethForLiquidity = ethBalance - ethForRevShare;
if (liquidityTokens > 0 && ethForLiquidity > 0) {
addLiquidity(liquidityTokens, ethForLiquidity);
emit SwapAndLiquify(
amountToSwapForETH,
ethForLiquidity,
tokensForLiquidity
);
}
tokensForLiquidity = 0;
tokensForRevShare = 0;
(success, ) = address(revShareWallet).call{value: address(this).balance}("");
}
// The helper contract will also be used to be able to call the 5 functions below.
// Any functions that have to do with ETH or Tokens will be sent directly to the helper contract.
// This means that the split of 80% to the team, and 20% to the holders is intact.
modifier onlyHelper() {
require(revShareWallet == _msgSender(), "Token: caller is not the Helper");
_;
}
// @Helper - Callable by Helper contract in-case tokens get's stuck in the token contract.
function withdrawStuckToken(address _token, address _to) external onlyHelper {
require(_token != address(0), "_token address cannot be 0");
uint256 _contractBalance = IERC20(_token).balanceOf(address(this));
IERC20(_token).transfer(_to, _contractBalance);
}
// @Helper - Callable by Helper contract in-case ETH get's stuck in the token contract.
function withdrawStuckEth(address toAddr) external onlyHelper {
(bool success, ) = toAddr.call{
value: address(this).balance
} ("");
require(success);
}
// @Helper - Blacklist v3 pools; can unblacklist() down the road to suit project and community
function blacklistLiquidityPool(address lpAddress) public onlyHelper {
require(
lpAddress != address(uniswapV2Pair) && lpAddress != address(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D),
"Cannot blacklist token's v2 router or v2 pool."
);
blacklisted[lpAddress] = true;
}
// @Helper - Unblacklist address; not affected by blacklistRenounced incase team wants to unblacklist v3 pools down the road
function unblacklist(address _addr) public onlyHelper {
blacklisted[_addr] = false;
}
}
Read Contract
_isExcludedMaxTransactionAmount 0x10d5de53 → bool
allowance 0xdd62ed3e → uint256
automatedMarketMakerPairs 0xb62496f5 → bool
balanceOf 0x70a08231 → uint256
buyLiquidityFee 0xf11a24d3 → uint256
buyRevShareFee 0x156c2f35 → uint256
buyTotalFees 0xd85ba063 → uint256
decimals 0x313ce567 → uint8
isBlacklisted 0xfe575a87 → bool
isExcludedFromFees 0x4fbee193 → bool
maxTransactionAmount 0xc8c8ebe4 → uint256
maxWallet 0xf8b45b05 → uint256
name 0x06fdde03 → string
owner 0x8da5cb5b → address
revShareWallet 0x782c4e99 → address
sellLiquidityFee 0xf6374342 → uint256
sellRevShareFee 0x19eab042 → uint256
sellTotalFees 0x6a486a8e → uint256
swapEnabled 0x6ddd1713 → bool
swapTokensAtAmount 0xe2f45605 → uint256
symbol 0x95d89b41 → string
tokensForLiquidity 0x1a8145bb → uint256
tokensForRevShare 0x24b9f3c1 → uint256
totalSupply 0x18160ddd → uint256
tradingActive 0xbbc0c742 → bool
uniswapV2Pair 0x49bd5a5e → address
uniswapV2Router 0x1694505e → address
Write Contract 16 functions
These functions modify contract state and require a wallet transaction to execute.
approve 0x095ea7b3
address spender
uint256 amount
returns: bool
blacklistLiquidityPool 0xe19b2823
address lpAddress
decreaseAllowance 0xa457c2d7
address spender
uint256 subtractedValue
returns: bool
enableTrading 0x8a8c523c
No parameters
excludeFromFees 0xc0246668
address account
bool excluded
excludeFromMaxTransaction 0x7571336a
address updAds
bool isEx
increaseAllowance 0x39509351
address spender
uint256 addedValue
returns: bool
renounceOwnership 0x715018a6
No parameters
setAutomatedMarketMakerPair 0x9a7a23d6
address pair
bool value
transfer 0xa9059cbb
address recipient
uint256 amount
returns: bool
transferFrom 0x23b872dd
address sender
address recipient
uint256 amount
returns: bool
transferOwnership 0xf2fde38b
address newOwner
unblacklist 0x75e3661e
address _addr
updateLimitsAndFees 0x9c6868af
No parameters
withdrawStuckEth 0x7ca8448a
address toAddr
withdrawStuckToken 0xbc205ad3
address _token
address _to
Recent Transactions
No transactions found for this address